Skip to content

Commit edeedb6

Browse files
committed
typedef: add dbDoc object
1 parent 6834775 commit edeedb6

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

lib/typedef.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,16 @@ const { ACTIONS } = Utils.ACTIONS;
132132
* @property {boolean} [schema] - if set to true, a schema graph will be created
133133
*/
134134

135+
/**
136+
* @typedef {Object} DbDoc
137+
* @property {string} id - "Database ID"
138+
* @property {string} [label] - "Textual DB Name"
139+
* @property {string} [comment] - "Text description of DB"
140+
* @property {string} [organization] - "Organization to which the db belongs"
141+
* @property {boolean} [public] -
142+
* @property {boolean} [schema] - if set to true, a schema graph will be created
143+
*/
144+
135145
/**
136146
*@typedef {Object} RemoteRepoDetails - {remote: "origin", "remote_branch": "main", "author":
137147
"admin","message": "message"}

lib/woqlClient.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -460,10 +460,7 @@ WOQLClient.prototype.createDatabase = function (dbId, dbDetails, orgId) {
460460

461461
/**
462462
* Update a database in TerminusDB server
463-
* @param {string} dbId - The id of the database to be updated
464-
* @param {typedef.DbDetails} dbDetails - object containing details about the database to be updated
465-
* @param {string} [orgId] - optional organization id - if absent default local organization
466-
* id is used
463+
* @param {typedef.DbDoc} dbDoc - object containing details about the database to be updated
467464
* @returns {Promise} A promise that returns the call response object, or an Error if rejected.
468465
* @example
469466
* client.updateDatabase({id: "mydb", label: "My Database", comment: "Testing"})

0 commit comments

Comments
 (0)