Skip to content

Commit 9a7b72e

Browse files
authored
Merge pull request #285 from terminusdb/fix-type
Fix type
2 parents 3d33714 + 5b02e13 commit 9a7b72e

File tree

4 files changed

+233
-4
lines changed

4 files changed

+233
-4
lines changed

RELEASE_NOTES.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# TerminusDB Client v10.0.30
2+
## Fixes 🛠
3+
* Fix DiffObject type definition
4+
15
# TerminusDB Client v10.0.29
26
## Fixes 🛠
37
* Fix getCommitsLog in WOQLClient

docs/api/typedef.md

+225
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,225 @@
1+
2+
# TypeDef
3+
##### TypeDef
4+
Type definitions
5+
6+
7+
## DocParamsGet
8+
##### DocParamsGet: ` Object`
9+
the GET document interface query parameters
10+
11+
**Properties**
12+
13+
| Name | Type | Description |
14+
| --- | --- | --- |
15+
| [query] | <code>object</code> | object that descrive the document query |
16+
| [graph_type] | <code>GraphType</code> | instance|schema, default value is instance. Used to switch between getting documents from the instance or the schema graph. |
17+
| [type] | <code>string</code> | only documents of the given type are returned. |
18+
| [id] | <code>string</code> | only the document with the given ID is returned. |
19+
| [prefixed] | <code>boolean</code> | default is true, return IRIs using a prefixed notation wherever possible. If false, full IRIs are used. |
20+
| [minimized] | <code>boolean</code> | default is false, return the documents with very little whitespace. Each json document will be on its own line. |
21+
| [unfold] | <code>boolean</code> | default is false, any subdocuments contained in the returned document are returned too. If false, these are referred to by their ID instead. |
22+
| [skip] | <code>number</code> | default is 0, How many results to skip |
23+
| [count] | <code>number</code> | count - How many results to return. If this option is absent, all results are returned. |
24+
| [as_list] | <code>boolean</code> | default is false, If true, don't return a stream of json objects, but a json list. |
25+
| [graph_type] | <code>string</code> | instance|schema default value is instance |
26+
27+
28+
## DocParamsPost
29+
##### DocParamsPost: ` Object`
30+
the POST document interface query parameters
31+
32+
**Properties**
33+
34+
| Name | Type | Description |
35+
| --- | --- | --- |
36+
| [raw_json] | <code>boolean</code> | default is false, If true, the input documents are treated as raw JSON, inserted as type sys:JSONDocument and are not subject to schema restrictions. |
37+
| [graph_type] | <code>GraphType</code> | default is instance instance|schema Used to switch between getting documents from the instance or the schema graph. |
38+
| [full_replace] | <code>boolean</code> | default is false, If true, all existing documents are deleted before inserting the posted documents. This allows the full replacement of the contents of a database. This is especially useful for replacing the schema. |
39+
40+
41+
## DocParamsPut
42+
##### DocParamsPut: ` Object`
43+
the PUT document interface query parameters
44+
45+
**Properties**
46+
47+
| Name | Type | Description |
48+
| --- | --- | --- |
49+
| [raw_json] | <code>boolean</code> | default is false, If true, the input documents are treated as raw JSON, inserted as type sys:JSONDocument and are not subject to schema restrictions. |
50+
| [create] | <code>boolean</code> | If true, the function will create a new document if it doesn't exist. |
51+
| [graph_type] | <code>GraphType</code> | default is instance, instance|schema Used to switch between getting documents from the instance or the schema graph. |
52+
53+
54+
## DocParamsDelete
55+
##### DocParamsDelete: ` Object`
56+
the DELETE document interface query parameters
57+
58+
**Properties**
59+
60+
| Name | Type | Description |
61+
| --- | --- | --- |
62+
| [graph_type] | <code>GraphType</code> | default is instance, instance|schema Used to switch between getting documents from the instance or the schema graph. |
63+
| id | <code>string</code> \| <code>array</code> | a single id or a list of ids to delete. |
64+
| [nuke] | <code>boolean</code> | default is false, If true, delete everything at this resource location (dangerous!). |
65+
66+
67+
## GraphRef
68+
##### GraphRef: ` "schema/main"` | ` "instance/main" ` | ` string `
69+
70+
## DataFormatObj
71+
##### DataFormatObj: ` Object`
72+
(export/import)
73+
74+
**Properties**
75+
76+
| Name | Type | Description |
77+
| --- | --- | --- |
78+
| [type] | <code>&quot;csv&quot;</code> \| <code>&quot;turtle&quot;</code> | the format type |
79+
| [format_header] | <code>string</code> | header format type |
80+
81+
82+
## FuntionType
83+
##### FuntionType: ` "add_quad"` | ` "delete_quad" ` | ` "add_triple" ` | ` "delete_triple" ` | ` "quad" ` | ` "triple" `
84+
85+
## ResourceType
86+
##### ResourceType: ` "commits"` | ` "meta" ` | ` "branch" ` | ` "ref" ` | ` "repo" ` | ` "db" `
87+
88+
## GraphType
89+
##### GraphType: ` "instance"` | ` "schema" `
90+
91+
## CredentialObj
92+
##### CredentialObj: ` Object`
93+
**Properties**
94+
95+
| Name | Type | Description |
96+
| --- | --- | --- |
97+
| type | <code>&#x27;basic&#x27;</code> \| <code>&#x27;jwt&#x27;</code> \| <code>&#x27;apikey&#x27;</code> | the authorization type of an TerminusDB connection |
98+
| [user] | <code>string</code> \| <code>boolean</code> | the user id | I don't need the user with the jwt token |
99+
| key | <code>string</code> | the connection key |
100+
101+
102+
## ActionType
103+
##### ActionType: ` 'graph'` | ` 'db' ` | ` 'clone' ` | ` 'triples' ` | ` 'woql' ` | ` 'fetch' ` | ` 'pull' ` | ` 'rebase' ` | ` 'branch' ` | ` 'reset' ` | ` 'push' ` | ` 'squash' `
104+
105+
## ParamsObj
106+
##### ParamsObj: ` Object`
107+
**Properties**
108+
109+
| Name | Type | Description |
110+
| --- | --- | --- |
111+
| [key] | <code>string</code> | api key for basic auth |
112+
| [jwt] | <code>string</code> | jwt token to connect with terminusX server |
113+
| [user] | <code>string</code> | the user id, we use this for basic authentication and for identify the commits author |
114+
| [organization] | <code>string</code> | set organization to this id |
115+
| [db] | <code>string</code> | set cursor to this db |
116+
| [repo] | <code>RepoType</code> \| <code>string</code> | set cursor to this repo |
117+
| [branch] | <code>string</code> | set branch to this id |
118+
| [ref] | <code>string</code> | set commit ref |
119+
| [default_branch_id] | <code>string</code> | set the default branch id |
120+
| [token] | <code>string</code> | Api token to connect with TerminusX |
121+
122+
123+
## RolesObj
124+
##### RolesObj: ` Object`
125+
**Properties**
126+
127+
| Name | Type | Description |
128+
| --- | --- | --- |
129+
| agent_name | <code>string</code> | the Authorization connection's type |
130+
| [database_name] | <code>string</code> | the user id | I don't need the user with the jwt token |
131+
| [organization_name] | <code>string</code> | the connection key |
132+
| [actions] | <code>array</code> | list of roles |
133+
| [invitation] | <code>string</code> | - |
134+
135+
136+
## ScopeType
137+
##### ScopeType: ` "database"` | ` "organization" `
138+
139+
## RepoType
140+
##### RepoType: ` "local"` | ` "remote" `
141+
142+
## DbDetails
143+
##### DbDetails: ` Object`
144+
**Properties**
145+
146+
| Name | Type | Description |
147+
| --- | --- | --- |
148+
| label | <code>string</code> | "Textual DB Name" |
149+
| [comment] | <code>string</code> | "Text description of DB" |
150+
| [public] | <code>boolean</code> | - |
151+
| [schema] | <code>boolean</code> | if set to true, a schema graph will be created |
152+
153+
154+
## DbDoc
155+
##### DbDoc: ` Object`
156+
**Properties**
157+
158+
| Name | Type | Description |
159+
| --- | --- | --- |
160+
| id | <code>string</code> | "Database ID" |
161+
| [label] | <code>string</code> | "Textual DB Name" |
162+
| [comment] | <code>string</code> | "Text description of DB" |
163+
| [organization] | <code>string</code> | "Organization to which the db belongs" |
164+
| [public] | <code>boolean</code> | - |
165+
| [schema] | <code>boolean</code> | if set to true, a schema graph will be created |
166+
167+
168+
## RemoteRepoDetails
169+
##### RemoteRepoDetails: ` Object`
170+
{remote: "origin", "remote_branch": "main", "author":
171+
"admin","message": "message"}
172+
173+
**Properties**
174+
175+
| Name | Type | Description |
176+
| --- | --- | --- |
177+
| [remote] | <code>string</code> | remote server url |
178+
| remote_branch | <code>string</code> | remote branch name |
179+
| [author] | <code>string</code> | if it is undefined it get the current author |
180+
| [message] | <code>string</code> | the update commit message |
181+
182+
183+
## CloneSourceDetails
184+
##### CloneSourceDetails: ` Object`
185+
**Properties**
186+
187+
| Name | Type | Description |
188+
| --- | --- | --- |
189+
| remote_url | <code>string</code> | the remote db source url |
190+
| [label] | <code>string</code> | |
191+
| [comment] | <code>string</code> | |
192+
193+
194+
## CapabilityCommand
195+
##### CapabilityCommand: ` "grant"` | ` "revoke" `
196+
the manage capability command type
197+
198+
199+
## RolesActions
200+
##### RolesActions: ` Array.<ACTIONS>`
201+
[ACTIONS.CREATE_DATABASE | ACTIONS.DELETE_DATABASE]
202+
203+
204+
## DocHistoryParams
205+
##### DocHistoryParams: ` Object`
206+
**Properties**
207+
208+
| Name | Type | Description |
209+
| --- | --- | --- |
210+
| [start] | <code>number</code> | Index to start from, 0 is the default |
211+
| [count] | <code>number</code> | Amount of commits to show, 10 is the default |
212+
| [updated] | <code>boolean</code> | Last updated time (excludes history) false is the default |
213+
| [created] | <code>boolean</code> | Created date of object (excludes history) false is the default |
214+
215+
216+
## DiffObject
217+
##### DiffObject: ` Object`
218+
**Properties**
219+
220+
| Name | Type | Description |
221+
| --- | --- | --- |
222+
| [keep] | <code>Object</code> | Index to start from, 0 is the default |
223+
| [count] | <code>number</code> | Last updated time (excludes history) false is the default |
224+
| [start] | <code>number</code> | Amount of commits to show, 10 is the default |
225+

lib/typedef.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -179,9 +179,9 @@ const { ACTIONS } = Utils.ACTIONS;
179179

180180
/**
181181
* @typedef {Object} DiffObject
182-
* @property {keep} [Object] - Index to start from, 0 is the default
183-
* @property {start} [number] - Amount of commits to show, 10 is the default
184-
* @property {count} [number] - Last updated time (excludes history) false is the default
182+
* @property {Object} [keep] - Index to start from, 0 is the default
183+
* @property {number} [count] - Last updated time (excludes history) false is the default
184+
* @property {number} [start] - Amount of commits to show, 10 is the default
185185
*/
186186

187187
module.exports = {};

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@terminusdb/terminusdb-client",
3-
"version": "10.0.29",
3+
"version": "10.0.30",
44
"description": "TerminusDB client library",
55
"main": "index.js",
66
"types": "./dist/typescript/index.d.ts",

0 commit comments

Comments
 (0)