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,624 @@
1
+ /**
2
+ * - JSON-LD representation of a WOQL query
3
+ */
4
+ export type WOQLJson = any;
5
+ /**
6
+ * - WOQL Query Builder class
7
+ */
8
+ export type WOQLQuery = any;
9
+ /**
10
+ * - the GET document interface query parameters
11
+ */
12
+ export type DocParamsGet = {
13
+ /**
14
+ * - object that descrive the document query
15
+ */
16
+ query?: object;
17
+ /**
18
+ * - instance|schema, default value is instance.
19
+ * Used to switch between getting documents from the instance or the schema graph.
20
+ */
21
+ graph_type?: GraphType;
22
+ /**
23
+ * - only documents of the given type are returned.
24
+ */
25
+ type?: string;
26
+ /**
27
+ * - only the document with the given ID is returned.
28
+ */
29
+ id?: string;
30
+ /**
31
+ * - default is true, return IRIs using a prefixed notation wherever
32
+ * possible. If false, full IRIs are used.
33
+ */
34
+ prefixed?: boolean;
35
+ /**
36
+ * - default is false, return the documents with very
37
+ * little whitespace. Each json document will be on its own line.
38
+ */
39
+ minimized?: boolean;
40
+ /**
41
+ * - default is false, any subdocuments contained in the returned
42
+ * document are returned too. If false, these are referred to by their ID instead.
43
+ */
44
+ unfold?: boolean;
45
+ /**
46
+ * - default is 0, How many results to skip
47
+ */
48
+ skip?: number;
49
+ /**
50
+ * count - How many results to return. If this option is absent, all
51
+ * results are returned.
52
+ */
53
+ count?: number;
54
+ /**
55
+ * default is false, If true, don't return a stream of json objects,
56
+ * but a json list.
57
+ */
58
+ as_list?: boolean;
59
+ };
60
+ /**
61
+ * - the POST document interface query parameters
62
+ */
63
+ export type DocParamsPost = {
64
+ /**
65
+ * - default is false, If true, the input documents
66
+ * are treated as raw JSON, inserted as type sys:JSONDocument and are not subject
67
+ * to schema restrictions.
68
+ */
69
+ raw_json?: boolean;
70
+ /**
71
+ * - default is instance instance|schema Used to switch between
72
+ * getting documents from the instance or the schema graph.
73
+ */
74
+ graph_type?: GraphType;
75
+ /**
76
+ * - default is false, If true, all existing documents are deleted
77
+ * before inserting the posted documents. This allows the full replacement of the contents of a
78
+ * database. This is especially useful for replacing the schema.
79
+ */
80
+ full_replace?: boolean;
81
+ };
82
+ /**
83
+ * - the PUT document interface query parameters
84
+ */
85
+ export type DocParamsPut = {
86
+ /**
87
+ * - default is false, If true, the input documents
88
+ * are treated as raw JSON, inserted as type sys:JSONDocument and are not subject
89
+ * to schema restrictions.
90
+ */
91
+ raw_json?: boolean;
92
+ /**
93
+ * - If true, the function will create
94
+ * a new document if it doesn't exist.
95
+ */
96
+ create?: boolean;
97
+ /**
98
+ * - default is instance, instance|schema Used to switch between
99
+ * getting documents from the instance or the schema graph.
100
+ */
101
+ graph_type?: GraphType;
102
+ };
103
+ /**
104
+ * - the DELETE document interface query parameters
105
+ */
106
+ export type DocParamsDelete = {
107
+ /**
108
+ * - default is instance, instance|schema Used to switch between
109
+ * getting documents from the instance or the schema graph.
110
+ */
111
+ graph_type?: GraphType;
112
+ /**
113
+ * - a single id or a list of ids to delete.
114
+ */
115
+ id: string | any[];
116
+ /**
117
+ * - default is false, If true, delete everything at this resource
118
+ * location (dangerous!).
119
+ */
120
+ nuke?: boolean;
121
+ };
122
+ export type GraphRef = "schema/main" | "instance/main" | string;
123
+ /**
124
+ * (export/import)
125
+ */
126
+ export type DataFormatObj = {
127
+ /**
128
+ * the format type
129
+ */
130
+ type?: "csv" | "turtle";
131
+ /**
132
+ * header format type
133
+ */
134
+ format_header?: string;
135
+ };
136
+ export type FuntionType = "add_quad" | "delete_quad" | "add_triple" | "delete_triple" | "quad" | "triple";
137
+ export type ResourceType = "commits" | "meta" | "branch" | "ref" | "repo" | "db";
138
+ export type GraphType = "instance" | "schema";
139
+ export type CredentialObj = {
140
+ /**
141
+ * - the authorization type of an TerminusDB connection
142
+ */
143
+ type: "basic" | "jwt" | "apikey";
144
+ /**
145
+ * - the user id | I don't need the user with the jwt token
146
+ */
147
+ user?: string | boolean;
148
+ /**
149
+ * - the connection key
150
+ */
151
+ key: string;
152
+ };
153
+ export type ActionType = "graph" | "db" | "clone" | "triples" | "woql" | "fetch" | "pull" | "rebase" | "branch" | "reset" | "push" | "squash";
154
+ export type ParamsObj = {
155
+ /**
156
+ * - api key for basic auth
157
+ */
158
+ key?: string;
159
+ /**
160
+ * - jwt token to connect with terminusX server
161
+ */
162
+ jwt?: string;
163
+ /**
164
+ * - the user id, we use this for basic authentication and for
165
+ * identify the commits author
166
+ */
167
+ user?: string;
168
+ /**
169
+ * - set organization to this id
170
+ */
171
+ organization?: string;
172
+ /**
173
+ * - set cursor to this db
174
+ */
175
+ db?: string;
176
+ /**
177
+ * - set cursor to this repo
178
+ */
179
+ repo?: RepoType | string;
180
+ /**
181
+ * - set branch to this id
182
+ */
183
+ branch?: string;
184
+ /**
185
+ * - set commit ref
186
+ */
187
+ ref?: string;
188
+ /**
189
+ * - set the default branch id
190
+ */
191
+ default_branch_id?: string;
192
+ /**
193
+ * - Api token to connect with TerminusX
194
+ */
195
+ token?: string;
196
+ };
197
+ export type RolesObj = {
198
+ /**
199
+ * - the Authorization connection's type
200
+ */
201
+ agent_name: string;
202
+ /**
203
+ * - the user id | I don't need the user with the jwt token
204
+ */
205
+ database_name?: string;
206
+ /**
207
+ * - the connection key
208
+ */
209
+ organization_name?: string;
210
+ /**
211
+ * - list of roles
212
+ */
213
+ actions?: any[];
214
+ /**
215
+ * -
216
+ */
217
+ invitation?: string;
218
+ };
219
+ export type ScopeType = "database" | "organization";
220
+ export type RepoType = "local" | "remote";
221
+ export type DbDetails = {
222
+ /**
223
+ * - "Textual DB Name"
224
+ */
225
+ label: string;
226
+ /**
227
+ * - "Text description of DB"
228
+ */
229
+ comment?: string;
230
+ /**
231
+ * -
232
+ */
233
+ public?: boolean;
234
+ /**
235
+ * - if set to true, a schema graph will be created
236
+ */
237
+ schema?: boolean;
238
+ };
239
+ export type DbDoc = {
240
+ /**
241
+ * - "Database ID"
242
+ */
243
+ id: string;
244
+ /**
245
+ * - "Textual DB Name"
246
+ */
247
+ label?: string;
248
+ /**
249
+ * - "Text description of DB"
250
+ */
251
+ comment?: string;
252
+ /**
253
+ * - "Organization to which the db belongs"
254
+ */
255
+ organization?: string;
256
+ /**
257
+ * -
258
+ */
259
+ public?: boolean;
260
+ /**
261
+ * - if set to true, a schema graph will be created
262
+ */
263
+ schema?: boolean;
264
+ };
265
+ /**
266
+ * - {remote: "origin", "remote_branch": "main", "author":
267
+ * "admin","message": "message"}
268
+ */
269
+ export type RemoteRepoDetails = {
270
+ /**
271
+ * - remote server url
272
+ */
273
+ remote?: string;
274
+ /**
275
+ * - remote branch name
276
+ */
277
+ remote_branch: string;
278
+ /**
279
+ * - if it is undefined it get the current author
280
+ */
281
+ author?: string;
282
+ /**
283
+ * - the update commit message
284
+ */
285
+ message?: string;
286
+ };
287
+ export type CloneSourceDetails = {
288
+ /**
289
+ * - the remote db source url
290
+ */
291
+ remote_url: string;
292
+ label?: string;
293
+ comment?: string;
294
+ };
295
+ /**
296
+ * - the manage capability command type
297
+ */
298
+ export type CapabilityCommand = "grant" | "revoke";
299
+ /**
300
+ * - [ACTIONS.CREATE_DATABASE | ACTIONS.DELETE_DATABASE]
301
+ */
302
+ export type RolesActions = any[];
303
+ export type DocHistoryParams = {
304
+ /**
305
+ * - Index to start from, 0 is the default
306
+ */
307
+ start?: number;
308
+ /**
309
+ * - Amount of commits to show, 10 is the default
310
+ */
311
+ count?: number;
312
+ /**
313
+ * - Last updated time (excludes history) false is the default
314
+ */
315
+ updated?: boolean;
316
+ /**
317
+ * - Created date of object (excludes history) false is the default
318
+ */
319
+ created?: boolean;
320
+ };
321
+ export type DiffObject = {
322
+ /**
323
+ * - Index to start from, 0 is the default
324
+ */
325
+ keep?: any;
326
+ /**
327
+ * - Last updated time (excludes history) false is the default
328
+ */
329
+ count?: number;
330
+ /**
331
+ * - Amount of commits to show, 10 is the default
332
+ */
333
+ start?: number;
334
+ };
335
+ /**
336
+ * - { filename: "data.csv", data: "col1;col2\nval1;val2" }
337
+ */
338
+ export type NamedResourceData = {
339
+ /**
340
+ * - Filename referenced in the WOQL query
341
+ */
342
+ filename: string;
343
+ /**
344
+ * - Attached data, such as CSV contents
345
+ */
346
+ data: string | Blob | Buffer;
347
+ };
348
+ /**
349
+ * - Represents a document frame, object frame, or property frame
350
+ * in the viewer system. Frames are used to describe the structure and properties of data
351
+ * being displayed or validated.
352
+ */
353
+ export type Frame = {
354
+ /**
355
+ * - Subject identifier
356
+ */
357
+ subject?: string;
358
+ /**
359
+ * - Property name
360
+ */
361
+ property?: string;
362
+ /**
363
+ * - Type information (e.g., xsd:string, schema:Person)
364
+ */
365
+ type?: string;
366
+ /**
367
+ * - Frame value
368
+ */
369
+ value?: any;
370
+ /**
371
+ * - Depth in frame hierarchy
372
+ */
373
+ depth?: number;
374
+ /**
375
+ * - Property range/type
376
+ */
377
+ range?: string;
378
+ /**
379
+ * - Display label
380
+ */
381
+ label?: string;
382
+ /**
383
+ * - Parent frame reference
384
+ */
385
+ parent?: any;
386
+ /**
387
+ * - Child frames
388
+ */
389
+ children?: any[];
390
+ /**
391
+ * - Frame status: 'updated' | 'error' | 'new' | 'ok'
392
+ */
393
+ status?: string;
394
+ /**
395
+ * - Whether this represents a literal value
396
+ */
397
+ literal?: boolean;
398
+ /**
399
+ * - Index in parent collection
400
+ */
401
+ index?: number;
402
+ /**
403
+ * - Nested frame data
404
+ */
405
+ frame?: any;
406
+ /**
407
+ * - Class of the subject
408
+ */
409
+ subjectClass?: string;
410
+ };
411
+ /**
412
+ * Result from WOQL.localize() function - a two-element array [localizedFn, vars]
413
+ */
414
+ export type LocalizeResult = {
415
+ /**
416
+ * 0 - Localized function that wraps queries
417
+ */
418
+ "": (arg0: WOQLQuery | undefined) => WOQLQuery;
419
+ };
420
+ /**
421
+ *@typedef {Object} DocParamsGet - the GET document interface query parameters
422
+ *@property {object} [query] - object that descrive the document query
423
+ *@property {GraphType} [graph_type] - instance|schema, default value is instance.
424
+ *Used to switch between getting documents from the instance or the schema graph.
425
+ *@property {string} [type] - only documents of the given type are returned.
426
+ *@property {string} [id] - only the document with the given ID is returned.
427
+ *@property {boolean} [prefixed] - default is true, return IRIs using a prefixed notation wherever
428
+ *possible. If false, full IRIs are used.
429
+ *@property {boolean} [minimized] - default is false, return the documents with very
430
+ little whitespace. Each json document will be on its own line.
431
+ *@property {boolean} [unfold] - default is false, any subdocuments contained in the returned
432
+ document are returned too. If false, these are referred to by their ID instead.
433
+ *@property {number} [skip] - default is 0, How many results to skip
434
+ *@property {number} [count] count - How many results to return. If this option is absent, all
435
+ results are returned.
436
+ *@property {boolean} [as_list] default is false, If true, don't return a stream of json objects,
437
+ but a json list.
438
+ *@property {string} [graph_type] - instance|schema default value is instance
439
+ */
440
+ /**
441
+ *@typedef {Object} DocParamsPost - the POST document interface query parameters
442
+ *@property {boolean} [raw_json] - default is false, If true, the input documents
443
+ are treated as raw JSON, inserted as type sys:JSONDocument and are not subject
444
+ to schema restrictions.
445
+ *@property {GraphType} [graph_type] - default is instance instance|schema Used to switch between
446
+ getting documents from the instance or the schema graph.
447
+ *@property {boolean} [full_replace] - default is false, If true, all existing documents are deleted
448
+ before inserting the posted documents. This allows the full replacement of the contents of a
449
+ database. This is especially useful for replacing the schema.
450
+ */
451
+ /**
452
+ *@typedef {Object} DocParamsPut - the PUT document interface query parameters
453
+ *@property {boolean} [raw_json] - default is false, If true, the input documents
454
+ are treated as raw JSON, inserted as type sys:JSONDocument and are not subject
455
+ to schema restrictions.
456
+ *@property {boolean} [create] - If true, the function will create
457
+ a new document if it doesn't exist.
458
+ *@property {GraphType} [graph_type] - default is instance, instance|schema Used to switch between
459
+ getting documents from the instance or the schema graph.
460
+ */
461
+ /**
462
+ *@typedef {Object} DocParamsDelete - the DELETE document interface query parameters
463
+ *@property {GraphType} [graph_type] - default is instance, instance|schema Used to switch between
464
+ getting documents from the instance or the schema graph.
465
+ *@property {string|array} id - a single id or a list of ids to delete.
466
+ *@property {boolean} [nuke] - default is false, If true, delete everything at this resource
467
+ location (dangerous!).
468
+ */
469
+ /**
470
+ * @typedef {"schema/main" | "instance/main" | string} GraphRef
471
+ */
472
+ /**
473
+ * @typedef {Object} DataFormatObj (export/import)
474
+ * @property {"csv"|"turtle"} [type] the format type
475
+ * @property {string} [format_header] header format type
476
+ */
477
+ /**
478
+ * @typedef {"add_quad" | "delete_quad" | "add_triple" | "delete_triple" | "quad" |
479
+ * "triple"} FuntionType
480
+ */
481
+ /**
482
+ * @typedef {"commits"|"meta"|"branch"|"ref"|"repo"|"db"} ResourceType
483
+ */
484
+ /**
485
+ *@typedef {"instance" | "schema" } GraphType
486
+ */
487
+ /**
488
+ * @typedef {Object} CredentialObj
489
+ * @property {'basic'|'jwt'|'apikey'} type - the authorization type of an TerminusDB connection
490
+ * @property {string | boolean} [user] - the user id | I don't need the user with the jwt token
491
+ * @property {string} key - the connection key
492
+ */
493
+ /**
494
+ * @typedef {'graph'|'db'|'clone'|'triples'|'woql'|'fetch'|'pull'|'rebase'|'branch'|'reset'|
495
+ * 'push'|'squash'} ActionType
496
+ */
497
+ /**
498
+ * @typedef {Object} ParamsObj
499
+ * @property {string} [key] - api key for basic auth
500
+ * @property {string} [jwt] - jwt token to connect with terminusX server
501
+ * @property {string} [user] - the user id, we use this for basic authentication and for
502
+ * identify the commits author
503
+ * @property {string} [organization] - set organization to this id
504
+ * @property {string} [db] - set cursor to this db
505
+ * @property {RepoType | string} [repo] - set cursor to this repo
506
+ * @property {string} [branch] - set branch to this id
507
+ * @property {string} [ref] - set commit ref
508
+ * @property {string} [default_branch_id] - set the default branch id
509
+ * @property {string} [token] - Api token to connect with TerminusX
510
+ */
511
+ /**
512
+ * @typedef {Object} RolesObj
513
+ * @property {string} agent_name - the Authorization connection's type
514
+ * @property {string} [database_name] - the user id | I don't need the user with the jwt token
515
+ * @property {string} [organization_name] - the connection key
516
+ * @property {array} [actions] - list of roles
517
+ * @property {string} [invitation] -
518
+ */
519
+ /**
520
+ * @typedef {"database"|"organization"} ScopeType
521
+ */
522
+ /**
523
+ * @typedef {"local"|"remote"} RepoType
524
+ */
525
+ /**
526
+ * @typedef {Object} DbDetails
527
+ * @property {string} label - "Textual DB Name"
528
+ * @property {string} [comment] - "Text description of DB"
529
+ * @property {boolean} [public] -
530
+ * @property {boolean} [schema] - if set to true, a schema graph will be created
531
+ */
532
+ /**
533
+ * @typedef {Object} DbDoc
534
+ * @property {string} id - "Database ID"
535
+ * @property {string} [label] - "Textual DB Name"
536
+ * @property {string} [comment] - "Text description of DB"
537
+ * @property {string} [organization] - "Organization to which the db belongs"
538
+ * @property {boolean} [public] -
539
+ * @property {boolean} [schema] - if set to true, a schema graph will be created
540
+ */
541
+ /**
542
+ *@typedef {Object} RemoteRepoDetails - {remote: "origin", "remote_branch": "main", "author":
543
+ "admin","message": "message"}
544
+ *@property {string} [remote] - remote server url
545
+ *@property {string} remote_branch - remote branch name
546
+ *@property {string} [author] - if it is undefined it get the current author
547
+ *@property {string} [message] - the update commit message
548
+ *
549
+ */
550
+ /**
551
+ * @typedef {Object} CloneSourceDetails
552
+ * @property {string} remote_url - the remote db source url
553
+ * @property {string} [label]
554
+ * @property {string} [comment]
555
+ */
556
+ /**
557
+ * @typedef {"grant" | "revoke"} CapabilityCommand - the manage capability command type
558
+ */
559
+ /**
560
+ * @typedef {ACTIONS[]} RolesActions - [ACTIONS.CREATE_DATABASE | ACTIONS.DELETE_DATABASE]
561
+ */
562
+ /**
563
+ * @typedef {Object} DocHistoryParams
564
+ * @property {number} [start] - Index to start from, 0 is the default
565
+ * @property {number} [count] - Amount of commits to show, 10 is the default
566
+ * @property {boolean} [updated] - Last updated time (excludes history) false is the default
567
+ * @property {boolean} [created] - Created date of object (excludes history) false is the default
568
+ */
569
+ /**
570
+ * @typedef {Object} DiffObject
571
+ * @property {Object} [keep] - Index to start from, 0 is the default
572
+ * @property {number} [count] - Last updated time (excludes history) false is the default
573
+ * @property {number} [start] - Amount of commits to show, 10 is the default
574
+ */
575
+ /**
576
+ * @typedef {Object} NamedResourceData - { filename: "data.csv", data: "col1;col2\nval1;val2" }
577
+ * @property {string} filename - Filename referenced in the WOQL query
578
+ * @property {string|Blob|Buffer} data - Attached data, such as CSV contents
579
+ */
580
+ /**
581
+ * @typedef {Object} Frame - Represents a document frame, object frame, or property frame
582
+ * in the viewer system. Frames are used to describe the structure and properties of data
583
+ * being displayed or validated.
584
+ * @property {string} [subject] - Subject identifier
585
+ * @property {string} [property] - Property name
586
+ * @property {string} [type] - Type information (e.g., xsd:string, schema:Person)
587
+ * @property {*} [value] - Frame value
588
+ * @property {number} [depth] - Depth in frame hierarchy
589
+ * @property {string} [range] - Property range/type
590
+ * @property {string} [label] - Display label
591
+ * @property {Object} [parent] - Parent frame reference
592
+ * @property {Array} [children] - Child frames
593
+ * @property {string} [status] - Frame status: 'updated' | 'error' | 'new' | 'ok'
594
+ * @property {boolean} [literal] - Whether this represents a literal value
595
+ * @property {number} [index] - Index in parent collection
596
+ * @property {Object} [frame] - Nested frame data
597
+ * @property {string} [subjectClass] - Class of the subject
598
+ */
599
+ /**
600
+ * @typedef {Object} WOQLJson - JSON-LD representation of a WOQL query
601
+ * @property {string} @type - The WOQL operation type (e.g., 'Triple', 'And', 'Select', 'Or')
602
+ * @property {*} [subject] - Subject for triple patterns
603
+ * @property {*} [predicate] - Predicate for triple patterns
604
+ * @property {*} [object] - Object for triple patterns
605
+ * @property {WOQLJson[]} [and] - Array of queries for 'And' operations
606
+ * @property {WOQLJson[]} [or] - Array of queries for 'Or' operations
607
+ * @property {WOQLJson} [query] - Nested query for operations like 'Select', 'Using'
608
+ * @property {string[]} [variables] - Variable list for 'Select' operations
609
+ * @property {string} [graph] - Graph identifier for graph operations
610
+ * @property {*} [consequent] - Consequent for path queries
611
+ * @property {string} [path_pattern] - Pattern for path queries
612
+ * Additional properties depend on the specific WOQL operation type
613
+ */
614
+ /**
615
+ * @typedef {Object} WOQLQuery - WOQL Query Builder class
616
+ */
617
+ /**
618
+ * Result from WOQL.localize() function - a two-element array [localizedFn, vars]
619
+ * @typedef {Object} LocalizeResult
620
+ * @property {function(WOQLQuery=): WOQLQuery} 0 - Localized function that wraps queries
621
+ * @property {Object.<string, Var>} 1 - Variables object with unique names
622
+ */
623
+ export const WOQLJson: {};
624
+ export const WOQLQuery: {};