terminusdb 12.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (86) hide show
  1. package/Contributing.md +36 -0
  2. package/LICENSE +201 -0
  3. package/README.md +175 -0
  4. package/RELEASE_NOTES.md +462 -0
  5. package/dist/index.html +22 -0
  6. package/dist/terminusdb-client.min.js +3 -0
  7. package/dist/terminusdb-client.min.js.LICENSE.txt +188 -0
  8. package/dist/terminusdb-client.min.js.map +1 -0
  9. package/dist/typescript/index.d.ts +14 -0
  10. package/dist/typescript/lib/accessControl.d.ts +554 -0
  11. package/dist/typescript/lib/axiosInstance.d.ts +2 -0
  12. package/dist/typescript/lib/connectionConfig.d.ts +381 -0
  13. package/dist/typescript/lib/const.d.ts +54 -0
  14. package/dist/typescript/lib/dispatchRequest.d.ts +17 -0
  15. package/dist/typescript/lib/errorMessage.d.ts +25 -0
  16. package/dist/typescript/lib/query/woqlBuilder.d.ts +75 -0
  17. package/dist/typescript/lib/query/woqlCore.d.ts +341 -0
  18. package/dist/typescript/lib/query/woqlDoc.d.ts +63 -0
  19. package/dist/typescript/lib/query/woqlLibrary.d.ts +718 -0
  20. package/dist/typescript/lib/query/woqlPrinter.d.ts +71 -0
  21. package/dist/typescript/lib/query/woqlQuery.d.ts +833 -0
  22. package/dist/typescript/lib/typedef.d.ts +624 -0
  23. package/dist/typescript/lib/utils.d.ts +199 -0
  24. package/dist/typescript/lib/valueHash.d.ts +146 -0
  25. package/dist/typescript/lib/viewer/chartConfig.d.ts +62 -0
  26. package/dist/typescript/lib/viewer/chooserConfig.d.ts +38 -0
  27. package/dist/typescript/lib/viewer/documentFrame.d.ts +44 -0
  28. package/dist/typescript/lib/viewer/frameConfig.d.ts +74 -0
  29. package/dist/typescript/lib/viewer/frameRule.d.ts +145 -0
  30. package/dist/typescript/lib/viewer/graphConfig.d.ts +73 -0
  31. package/dist/typescript/lib/viewer/objectFrame.d.ts +212 -0
  32. package/dist/typescript/lib/viewer/streamConfig.d.ts +23 -0
  33. package/dist/typescript/lib/viewer/tableConfig.d.ts +66 -0
  34. package/dist/typescript/lib/viewer/terminusRule.d.ts +75 -0
  35. package/dist/typescript/lib/viewer/viewConfig.d.ts +47 -0
  36. package/dist/typescript/lib/viewer/woqlChart.d.ts +1 -0
  37. package/dist/typescript/lib/viewer/woqlChooser.d.ts +56 -0
  38. package/dist/typescript/lib/viewer/woqlGraph.d.ts +26 -0
  39. package/dist/typescript/lib/viewer/woqlPaging.d.ts +1 -0
  40. package/dist/typescript/lib/viewer/woqlResult.d.ts +128 -0
  41. package/dist/typescript/lib/viewer/woqlRule.d.ts +96 -0
  42. package/dist/typescript/lib/viewer/woqlStream.d.ts +31 -0
  43. package/dist/typescript/lib/viewer/woqlTable.d.ts +102 -0
  44. package/dist/typescript/lib/viewer/woqlView.d.ts +49 -0
  45. package/dist/typescript/lib/woql.d.ts +1267 -0
  46. package/dist/typescript/lib/woqlClient.d.ts +1216 -0
  47. package/index.js +28 -0
  48. package/lib/.eslintrc +1 -0
  49. package/lib/accessControl.js +988 -0
  50. package/lib/axiosInstance.js +5 -0
  51. package/lib/connectionConfig.js +765 -0
  52. package/lib/const.js +59 -0
  53. package/lib/dispatchRequest.js +236 -0
  54. package/lib/errorMessage.js +110 -0
  55. package/lib/query/woqlBuilder.js +234 -0
  56. package/lib/query/woqlCore.js +934 -0
  57. package/lib/query/woqlDoc.js +177 -0
  58. package/lib/query/woqlLibrary.js +1015 -0
  59. package/lib/query/woqlPrinter.js +476 -0
  60. package/lib/query/woqlQuery.js +1865 -0
  61. package/lib/typedef.js +248 -0
  62. package/lib/utils.js +817 -0
  63. package/lib/valueHash.js_old +581 -0
  64. package/lib/viewer/chartConfig.js +411 -0
  65. package/lib/viewer/chooserConfig.js +234 -0
  66. package/lib/viewer/documentFrame.js +206 -0
  67. package/lib/viewer/frameConfig.js +469 -0
  68. package/lib/viewer/frameRule.js +519 -0
  69. package/lib/viewer/graphConfig.js +345 -0
  70. package/lib/viewer/objectFrame.js +1550 -0
  71. package/lib/viewer/streamConfig.js +82 -0
  72. package/lib/viewer/tableConfig.js +310 -0
  73. package/lib/viewer/terminusRule.js +196 -0
  74. package/lib/viewer/viewConfig.js +219 -0
  75. package/lib/viewer/woqlChart.js +17 -0
  76. package/lib/viewer/woqlChooser.js +171 -0
  77. package/lib/viewer/woqlGraph.js +295 -0
  78. package/lib/viewer/woqlPaging.js +148 -0
  79. package/lib/viewer/woqlResult.js +258 -0
  80. package/lib/viewer/woqlRule.js +312 -0
  81. package/lib/viewer/woqlStream.js +27 -0
  82. package/lib/viewer/woqlTable.js +332 -0
  83. package/lib/viewer/woqlView.js +107 -0
  84. package/lib/woql.js +1693 -0
  85. package/lib/woqlClient.js +2091 -0
  86. package/package.json +110 -0
@@ -0,0 +1,381 @@
1
+ export = ConnectionConfig;
2
+ /**
3
+ * @file Terminus DB connection configuration
4
+ * @license Apache Version 2
5
+ * @description Object representing the state of a connection to a terminus db - these are:
6
+ * provides methods for getting and setting connection parameters
7
+ * @constructor
8
+ * @param {string} serverUrl - the terminusdb server url
9
+ * @param {typedef.ParamsObj} [params] - an object with the following connection parameters:
10
+ */
11
+ declare function ConnectionConfig(serverUrl: string, params?: typedef.ParamsObj): void;
12
+ declare class ConnectionConfig {
13
+ /**
14
+ * @file Terminus DB connection configuration
15
+ * @license Apache Version 2
16
+ * @description Object representing the state of a connection to a terminus db - these are:
17
+ * provides methods for getting and setting connection parameters
18
+ * @constructor
19
+ * @param {string} serverUrl - the terminusdb server url
20
+ * @param {typedef.ParamsObj} [params] - an object with the following connection parameters:
21
+ */
22
+ constructor(serverUrl: string, params?: typedef.ParamsObj);
23
+ /**
24
+ * @type {string}
25
+ */
26
+ server: string;
27
+ baseServer: any;
28
+ /** @type {typedef.CredentialObj} */
29
+ remote_auth: typedef.CredentialObj;
30
+ /** @type {typedef.CredentialObj } */
31
+ local_auth: typedef.CredentialObj;
32
+ /** @type {string | boolean} */
33
+ organizationid: string | boolean;
34
+ /** @type {string | boolean} */
35
+ dbid: string | boolean;
36
+ default_branch_id: string;
37
+ default_repo_id: string;
38
+ system_db: string;
39
+ api_extension: string;
40
+ branchid: string;
41
+ repoid: string;
42
+ /** @type {string | boolean} */
43
+ refid: string | boolean;
44
+ /** @type {string | boolean} */
45
+ connection_error: string | boolean;
46
+ /**
47
+ * Creates a new connection config object and copies all the state information from this one into it
48
+ * @returns {ConnectionConfig}
49
+ */
50
+ copy(): ConnectionConfig;
51
+ /**
52
+ * updates connection config with new parameters
53
+ * @param {typedef.ParamsObj} params - an object with the following connection parameters:
54
+ */
55
+ update(params: typedef.ParamsObj): void;
56
+ /**
57
+ * Simple gets to retrieve current connection status
58
+ * Gets the current server url
59
+ * @returns {string}
60
+ */
61
+ serverURL(): string;
62
+ /**
63
+ * Simple gets to retrieve current connection status
64
+ * Gets the current server url
65
+ * @returns {string}
66
+ */
67
+ author(): string;
68
+ /**
69
+ * Gets the server connection url
70
+ * @returns {string}
71
+ */
72
+ apiURL(): string;
73
+ /**
74
+ * Gets the server connection url info
75
+ * @returns {string}
76
+ */
77
+ apiURLInfo(): string;
78
+ /**
79
+ * Gets the current database id
80
+ * @returns {string | boolean}
81
+ */
82
+ db(): string | boolean;
83
+ /**
84
+ * Gets the current branch id
85
+ * @returns {string}
86
+ */
87
+ branch(): string;
88
+ /**
89
+ * Gets the current commit ref id
90
+ * @returns {string | boolean}
91
+ */
92
+ ref(): string | boolean;
93
+ /**
94
+ * Gets the current organization id
95
+ * @returns {string | boolean}
96
+ */
97
+ organization(): string | boolean;
98
+ /**
99
+ * Gets the current organization id
100
+ * @returns {string}
101
+ */
102
+ repo(): string;
103
+ /**
104
+ *Gets the local Authorization credentials
105
+ *return {CredentialObj | boolean}
106
+ */
107
+ localAuth(): false | typedef.CredentialObj;
108
+ /**
109
+ *Gets the local user name
110
+ *return {string | boolean}
111
+ */
112
+ localUser(): string | boolean;
113
+ /**
114
+ *Gets the current user name
115
+ *@param {boolean} [ignoreJwt]
116
+ *return {string | boolean}
117
+ */
118
+ user(ignoreJwt?: boolean): string | boolean;
119
+ /**
120
+ * Check the server URL
121
+ * @param {string} str - the server url string
122
+ * @returns {string}
123
+ */
124
+ parseServerURL(str: string): string;
125
+ serverUrlEncoding(str: any): any;
126
+ /**
127
+ * Clear cursor for connection
128
+ */
129
+ clearCursor(): void;
130
+ /**
131
+ * @param {string | boolean} errorMessage
132
+ */
133
+ setError(errorMessage: string | boolean): void;
134
+ /**
135
+ * Set the organization to which the connected db belongs
136
+ * (not the users organization - set in capabilities)
137
+ * @param {string | boolean} [orgId]
138
+ */
139
+ setOrganization(orgId?: string | boolean): void;
140
+ /**
141
+ * Set the local identifier of db
142
+ * @param {string | boolean} dbId - database Id
143
+ */
144
+ setDB(dbId: string | boolean): void;
145
+ /**
146
+ * Set the repository type |local|remote|
147
+ * @param {typedef.RepoType | string} repoId - for the local server - identifier of repo
148
+ */
149
+ setRepo(repoId: typedef.RepoType | string): void;
150
+ /**
151
+ * @param {string} [branchId] - id of branch
152
+ */
153
+ setBranch(branchId?: string): void;
154
+ /**
155
+ * Set an Reference ID or Commit ID.
156
+ * Commit IDs are unique hashes that are created whenever a new commit is recorded
157
+ * @param {string | boolean} refId - commit reference id
158
+ */
159
+ setRef(refId: string | boolean): void;
160
+ /**
161
+ * set the local database connection credential
162
+ * @param {string} [remoteKey] - jwt auth api key
163
+ * @param {string} [remoteUserID] - remote user id
164
+ */
165
+ setRemoteBasicAuth(remoteKey?: string, remoteUserID?: string): void;
166
+ /**
167
+ * set the local database connection credential
168
+ * @param {string} [userKey] - basic auth api key
169
+ * @param {string} [userId] - user id
170
+ * @param {string} [type] - basic|jwt|apikey
171
+ */
172
+ setLocalBasicAuth(userKey?: string, userId?: string, type?: string): void;
173
+ /**
174
+ * Set the local server connection credential
175
+ * @param {typedef.CredentialObj} newCredential
176
+ */
177
+ setLocalAuth(newCredential: typedef.CredentialObj): void;
178
+ /**
179
+ * Set the remote server connection credential
180
+ * @param {typedef.CredentialObj} newCredential
181
+ */
182
+ setRemoteAuth(newCredential: typedef.CredentialObj): void;
183
+ /**
184
+ *Gets the remote Authorization credentials
185
+ *to connect the local db with a remote terminusdb database for push-pull-clone actions
186
+ *return {CredentialObj| boolean}
187
+ */
188
+ remoteAuth(): false | typedef.CredentialObj;
189
+ /**
190
+ * Generate the db endpoit url for create / delete db
191
+ * @returns {string}
192
+ */
193
+ dbURL(): string;
194
+ /**
195
+ * Generate URL for the user's api endpoint
196
+ * @param {string} [user] - the user id
197
+ * @returns {string}
198
+ */
199
+ userURL(user?: string): string;
200
+ /**
201
+ * Generate URL for the user's organization api endpoint
202
+ * @param {string} orgId - the organization id
203
+ * @param {string} [action] - the organization id
204
+ * @returns {string}
205
+ */
206
+ organizationURL(orgId: string, action?: string): string;
207
+ /**
208
+ * Generate URL for the user's organization api endpoint
209
+ * @param {string} orgId - the organization id
210
+ * @param {string} [action] - the organization id
211
+ * @returns {string}
212
+ */
213
+ userOrganizationsURL(): string;
214
+ /**
215
+ * Generate URL for the user's roles api endpoint
216
+ * @returns {string}
217
+ */
218
+ rolesURL(): string;
219
+ /**
220
+ * Generate URL to update the user's role api endpoint
221
+ * @returns {string}
222
+ */
223
+ updateRolesURL(): string;
224
+ /**
225
+ * Generate URL for create / delete graph api endpoint
226
+ * @param {string} graphType
227
+ * @returns {string}
228
+ */
229
+ graphURL(graphType: string): string;
230
+ /**
231
+ * Generate URL for get / set schema api endpoint
232
+ * @param {string} graphType
233
+ * @returns {string}
234
+ */
235
+ triplesURL(graphType: string): string;
236
+ /**
237
+ * Generate URL for add / get csv api endpoint
238
+ * @returns {string}
239
+ */
240
+ csvURL(): string;
241
+ /**
242
+ * Generate URL for woql query api endpoint
243
+ * @returns {string}
244
+ */
245
+ queryURL(): string;
246
+ /**
247
+ * Generate URL for get back the commits logs
248
+ * @returns {string}
249
+ */
250
+ log(): string;
251
+ /**
252
+ * get the url to update the organization role in the system database
253
+ * don't change the end point (this is a terminus db server end point)
254
+ * @returns {string}
255
+ */
256
+ updateOrganizationRoleURL(): string;
257
+ /**
258
+ * Generate URL for clone db endpoint
259
+ * @param {string} [newRepoId] the repository id
260
+ * @returns {string}
261
+ */
262
+ cloneURL(newRepoId?: string): string;
263
+ /**
264
+ * URL at which a db can be cloned
265
+ * @returns {string}
266
+ */
267
+ cloneableURL(): string;
268
+ /**
269
+ * Generate URL for pull endpoint
270
+ * @returns {string}
271
+ */
272
+ pullURL(): string;
273
+ /**
274
+ * Generate URL for pull endpoint
275
+ * @returns {string}
276
+ */
277
+ patchURL(): string;
278
+ /**
279
+ * Generate URL for diff endpoint
280
+ * @returns {string}
281
+ */
282
+ diffURL(): string;
283
+ /**
284
+ * Generate URL for diff endpoint
285
+ * @returns {string}
286
+ */
287
+ applyURL(): string;
288
+ /**
289
+ * Generate url portion consisting of organization/dbid
290
+ * (unless dbid = system dbname in which case there is no organization)
291
+ * @property {typedef.DocParamsPost|Object} params
292
+ */
293
+ docHistoryURL(params: any): string;
294
+ /**
295
+ * Generate URL for fetch endpoint
296
+ * @param {string} remoteName
297
+ * @returns {string}
298
+ */
299
+ fetchURL(remoteName: string): string;
300
+ /**
301
+ * Generate URL for remote endpoint
302
+ * @param {string} [remoteName] - optional remote name
303
+ * @returns {string}
304
+ */
305
+ remoteURL(remoteName?: string): string;
306
+ /**
307
+ * Generate URL for rebase endpoint
308
+ * @returns {string}
309
+ */
310
+ rebaseURL(): string;
311
+ /**
312
+ * Generate URL for reset endpoint
313
+ * @returns {string}
314
+ */
315
+ resetURL(): string;
316
+ /**
317
+ * Generate URL for push endpoint
318
+ * @returns {string}
319
+ */
320
+ pushURL(): string;
321
+ /**
322
+ * Generate URL for branch endpoint
323
+ * @param {string} branchId - the branch id
324
+ * @returns {string}
325
+ */
326
+ branchURL(branchId: string): string;
327
+ /**
328
+ * Generate URL for branch squash endpoint
329
+ */
330
+ squashBranchURL(nuid: any): string;
331
+ /**
332
+ * Generate URL for branch reset endpoint
333
+ */
334
+ resetBranchUrl(nuid: any): string;
335
+ /**
336
+ * Generate URL for commit descriptor
337
+ * @param {string} commitId
338
+ * @returns {string} a commit pathname
339
+ */
340
+ commitDescriptorUrl(commitId: string): string;
341
+ /**
342
+ * Generate URL for optimizing db branch
343
+ */
344
+ optimizeBranchUrl(branchId: any): string;
345
+ /**
346
+ * Generate base db url consisting of server/action/organization/dbid
347
+ * @param {typedef.ActionType} action
348
+ * @returns {string}
349
+ */
350
+ dbBase(action: typedef.ActionType): string;
351
+ /**
352
+ * Generate base branch url consisting of server/action/organization/dbid/branchid
353
+ * @param {typedef.ActionType} action
354
+ * @returns {string}
355
+ */
356
+ repoBase(action: typedef.ActionType): string;
357
+ /**
358
+ * Get database branch Url
359
+ * Generate base branch url consisting of server/action/organization/dbid/branchid
360
+ * @param {typedef.ActionType} action
361
+ * @returns {string}
362
+ */
363
+ branchBase(action: typedef.ActionType): string;
364
+ /**
365
+ * Generate url portion consisting of organization/dbid
366
+ * (unless dbid = system dbname in which case there is no organization)
367
+ * @returns {string|boolean}
368
+ */
369
+ dbURLFragment(): string | boolean;
370
+ /**
371
+ * Generate url portion consisting of organization/dbid
372
+ * (unless dbid = system dbname in which case there is no organization)
373
+ * @property {typedef.DocParamsPost|Object} params
374
+ */
375
+ documentURL(params: any): string;
376
+ prefixesURL(): string;
377
+ prefixURL(): string;
378
+ queryParameter(params: any): string;
379
+ jsonSchemaURL(params: any): string;
380
+ }
381
+ import typedef = require("./typedef");
@@ -0,0 +1,54 @@
1
+ declare const _exports: Readonly<{
2
+ POST: "POST";
3
+ GET: "GET";
4
+ DELETE: "DELETE";
5
+ PUT: "PUT";
6
+ HEAD: "HEAD";
7
+ QUERY_DOCUMENT: "QUERY_DOCUMENT";
8
+ SQUASH_BRANCH: "SQUASH_BRANCH";
9
+ UPDATE_SCHEMA: "UPDATE_SCHEMA";
10
+ CONNECT: "connect";
11
+ CREATE_DATABASE: "create_database";
12
+ READ_DATABASE: "read_database";
13
+ UPDATE_DATABASE: "update_database";
14
+ CREATE_USER: "create_user";
15
+ READ_USER: "read_user";
16
+ UPDATE_USER: "update_user";
17
+ CREATE_ORGANIZATION: "create_organization";
18
+ READ_ORGANIZATION: "read_organization";
19
+ UPDATE_ORGANIZATION: "update_organization";
20
+ GET_ROLES: "get_roles";
21
+ UPDATE_ROLES: "update_roles";
22
+ CREATE_GRAPH: "create_graph";
23
+ GET_TRIPLES: "get_triples";
24
+ INSERT_TRIPLES: "insert_triples";
25
+ UPDATE_TRIPLES: "update_triples";
26
+ CLASS_FRAME: "class_frame";
27
+ WOQL_QUERY: "woql_query";
28
+ CLONE: "clone";
29
+ CSV: "csv";
30
+ WOQL: "woql";
31
+ FRAME: "frame";
32
+ PUSH: "push";
33
+ PULL: "pull";
34
+ FETCH: "fetch";
35
+ REBASE: "rebase";
36
+ RESET: "reset";
37
+ BRANCH: "branch";
38
+ REMOTE: "remote";
39
+ CREATE_REMOTE: "create_remote";
40
+ GET_REMOTE: "get_remote";
41
+ UPDATE_REMOTE: "update_remote";
42
+ DELETE_REMOTE: "delete_remote";
43
+ RESET_BRANCH: "reset_branch";
44
+ ADD_CSV: "add_csv";
45
+ GET_CSV: "get_csv";
46
+ UPDATE_CSV: "update_csv";
47
+ MESSAGE: "message";
48
+ ACTION: "action";
49
+ INFO: "info";
50
+ OPTIMIZE_SYSTEM: "optimize_system";
51
+ GET_DIFF: "getDiff";
52
+ PATCH: "patch";
53
+ }>;
54
+ export = _exports;
@@ -0,0 +1,17 @@
1
+ export = DispatchRequest;
2
+ /**
3
+ * @file Dispatch Request
4
+ * @license Apache Version 2
5
+ * @description Functions for dispatching API requests via the axios library.
6
+ * @param {string} url API endpoint URL
7
+ * @param {string} action API action
8
+ * @param {object} payload data to be transmitted to endpoint
9
+ * @param {typedef.CredentialObj} local_auth the local authorization object
10
+ * @param {typedef.CredentialObj} remote_auth the remote authoriuzation object
11
+ * @param {object} customHeaders all the custom header to add to your call
12
+ * @param {boolean} [getDataVersion] If true the function will return object having result
13
+ * and dataVersion.
14
+ * @param {boolean} [compress] If true, compress the data with gzip if its size is bigger than 1024
15
+ */
16
+ declare function DispatchRequest(url: string, action: string, payload: object, local_auth: typedef.CredentialObj, remote_auth?: typedef.CredentialObj, customHeaders?: object, getDataVersion?: boolean, compress?: boolean): Promise<any>;
17
+ import typedef = require("./typedef");
@@ -0,0 +1,25 @@
1
+ export function apiErrorFormatted(url: any, options: any, err: any): Error;
2
+ export function getErrorAsMessage(url: any, api: any, err: any): string;
3
+ export function getAPIErrorMessage(url: any, api: any, err: any): string;
4
+ export function getAccessDeniedMessage(url: any, api: any, err: any): string;
5
+ export function accessDenied(action: any, db: any, server: any): {
6
+ status: number;
7
+ url: any;
8
+ type: string;
9
+ action: any;
10
+ body: string;
11
+ };
12
+ export function getInvalidURIMessage(url: any, call: any): string;
13
+ export function getInvalidParameterMessage(call: any, msg: any): string;
14
+ /**
15
+ * Utility functions for generating and retrieving error messages
16
+ * and storing error state
17
+ */
18
+ export function parseAPIError(response: any): {
19
+ status: any;
20
+ type: any;
21
+ body: any;
22
+ url: any;
23
+ headers: any;
24
+ redirected: any;
25
+ };
@@ -0,0 +1,75 @@
1
+ export = WOQLQuery;
2
+ declare class WOQLQuery extends WOQLQueryExt {
3
+ /**
4
+ * @param {typedef.GraphRef} [Graph] - the resource identifier of a graph possible
5
+ * @param {string|Var} [Subj] - The IRI of a triple’s subject or a variable
6
+ * @param {string|Var} [Pred] - The IRI of a property or a variable
7
+ * @param {string|Var} [Obj] - The IRI of a node or a variable, or a literal
8
+ * @returns {WOQLQuery} - A WOQLQuery which contains the pattern matching expression
9
+ */
10
+ /**
11
+ * Simple composite functions which produce WOQL queries
12
+ */
13
+ star(Graph: any, Subj: any, Pred: any, Obj: any): WOQLQueryExt;
14
+ /**
15
+ * @param {string|Var} [Subj] - The IRI of a triple’s subject or a variable
16
+ * @param {string|Var} [Pred] - The IRI of a property or a variable
17
+ * @param {string|Var} [Obj] - The IRI of a node or a variable, or a literal
18
+ * @param {typedef.GraphRef} [Graph] - the resource identifier of a graph possible
19
+ * @returns {WOQLQuery} - A WOQLQuery which contains the pattern matching expression
20
+ */
21
+ all(Subj?: string | Var, Pred?: string | Var, Obj?: string | Var, Graph?: typedef.GraphRef): WOQLQuery;
22
+ /**
23
+ * Update a pattern matching rule for the triple (Subject, Predicate, oldObjValue) with the
24
+ * new one (Subject, Predicate, newObjValue)
25
+ * @param {string|Var} subject - The IRI of a triple’s subject or a variable
26
+ * @param {string|Var} predicate - The IRI of a property or a variable
27
+ * @param {string|Var} newObjValue - The value to update or a literal
28
+ * @param {string|Var} oldObjValue - The old value of the object
29
+ * @returns {WOQLQuery} A WOQLQuery which contains the a Update Triple Statement
30
+ */
31
+ update_triple(subject: string | Var, predicate: string | Var, newObjValue: string | Var, oldObjValue: string | Var): WOQLQuery;
32
+ /**
33
+ * @description Update a pattern matching rule for the quad [S, P, O, G]
34
+ * (Subject, Predicate, Object, Graph)
35
+ * @param {string} subject - The IRI of a triple’s subject or a variable
36
+ * @param {string} predicate - The IRI of a property or a variable
37
+ * @param {string} newObject - The value to update or a literal
38
+ * @param {string} graph - the resource identifier of a graph possible value are
39
+ * schema/{main - myschema - *} | instance/{main - myschema - *} | inference/{main - myschema - *}
40
+ * @returns {WOQLQuery} A WOQLQuery which contains the a Update Quad Statement
41
+ */
42
+ update_quad(subject: string, predicate: string, newObject: string, graph: string): WOQLQuery;
43
+ /**
44
+ * Deletes all triples in the passed graph (defaults to instance/main)
45
+ * @param {typedef.GraphRef} [graphRef] - Resource String identifying the graph from
46
+ * which all triples will be removed
47
+ * @returns {WOQLQuery} - A WOQLQuery which contains the deletion expression
48
+ */
49
+ nuke(graphRef?: typedef.GraphRef): WOQLQuery;
50
+ /**
51
+ * @param {string|Var} node - The IRI of a node or a variable containing an IRI which will
52
+ * be the subject of the builder functions
53
+ * @param {typedef.FuntionType} [type] - Optional type of builder function to build
54
+ * (default is triple)
55
+ * @returns {WOQLQuery} - A WOQLQuery which contains the partial Node pattern matching expression
56
+ */
57
+ node(node: string | Var, type?: typedef.FuntionType): WOQLQuery;
58
+ /**
59
+ * Sets the graph resource ID that will be used for subsequent chained function calls
60
+ * @param {typedef.GraphRef} [graphRef] Resource String identifying the graph which will
61
+ * be used for subsequent chained schema calls
62
+ * @returns {WOQLQuery} A WOQLQuery which contains the partial Graph pattern matching expression
63
+ */
64
+ graph(graphRef?: typedef.GraphRef): WOQLQuery;
65
+ _set_context(ctxt: any): WOQLQuery;
66
+ /**
67
+ * @param {string|Var} id - IRI string or variable containing
68
+ * @param {string|Var} type - IRI string or variable containing the IRI of the
69
+ * @param {typedef.GraphRef} [refGraph] - Optional Graph resource identifier
70
+ * @returns {WOQLQuery} A WOQLQuery which contains the insert expression
71
+ */
72
+ insert(id: string | Var, type: string | Var, refGraph?: typedef.GraphRef): WOQLQuery;
73
+ }
74
+ import WOQLQueryExt = require("./woqlQuery");
75
+ import typedef = require("../typedef");