@@ -165,7 +165,6 @@ WOQLClient.prototype.databaseInfo = function(dbId) {
165
165
WOQLClient . prototype . db = function ( dbId ) {
166
166
if ( typeof dbId !== 'undefined' ) {
167
167
this . connectionConfig . setDB ( dbId )
168
- //this.checkout("_commits")
169
168
}
170
169
return this . connectionConfig . db ( )
171
170
}
@@ -875,6 +874,7 @@ WOQLClient.prototype.dispatch = async function(action, apiUrl, payload) {
875
874
const param = this . connectionConfig . tokenParameter
876
875
await axios . post ( param . url , param . options ) . then ( result => result . data ) . then ( data => {
877
876
if ( data . access_token ) {
877
+ console . log ( "ACCESS_TOKEN" , data . access_token )
878
878
this . localAuth ( { "key" :data . access_token , "type" :"jwt" } )
879
879
}
880
880
} )
@@ -1291,6 +1291,21 @@ WOQLClient.prototype.schema = function(type,dbId){
1291
1291
return this . dispatch ( CONST . GET , this . connectionConfig . jsonSchemaURL ( params ) )
1292
1292
}
1293
1293
1294
+ WOQLClient . prototype . classes = function ( dbId ) {
1295
+ const params = { 'graph_type' :"schema" , "as_list" :true , "type" :"sys:Class" }
1296
+ return this . getDocument ( params , dbId )
1297
+ }
1298
+
1299
+ WOQLClient . prototype . getDocuments = async function ( dbId ) {
1300
+ const params = { 'graph_type' :"schema" , "as_list" :true , "type" :"sys:Class" }
1301
+ const result = await this . getDocument ( params , dbId )
1302
+ let documents = [ ]
1303
+ if ( result ) {
1304
+ documents = result . filter ( item => ! item [ '@subdocument' ] ) ;
1305
+ }
1306
+ return documents
1307
+ }
1308
+
1294
1309
WOQLClient . prototype . branches = async function ( dbId ) {
1295
1310
const params = { type :'Branch' , 'as_list' :true }
1296
1311
const branch = this . checkout ( )
0 commit comments