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,188 @@
1
+ /*!
2
+ * The buffer module from node.js, for the browser.
3
+ *
4
+ * @author Feross Aboukhadijeh <https://feross.org>
5
+ * @license MIT
6
+ */
7
+
8
+ /*! Axios v1.13.5 Copyright (c) 2026 Matt Zabriskie and contributors */
9
+
10
+ /*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
11
+
12
+ /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */
13
+
14
+ /**
15
+ * @file Dispatch Request
16
+ * @license Apache Version 2
17
+ * @description Functions for dispatching API requests via the axios library.
18
+ * @param {string} url API endpoint URL
19
+ * @param {string} action API action
20
+ * @param {object} payload data to be transmitted to endpoint
21
+ * @param {typedef.CredentialObj} local_auth the local authorization object
22
+ * @param {typedef.CredentialObj} remote_auth the remote authoriuzation object
23
+ * @param {object} customHeaders all the custom header to add to your call
24
+ * @param {boolean} [getDataVersion] If true the function will return object having result
25
+ * and dataVersion.
26
+ * @param {boolean} [compress] If true, compress the data with gzip if its size is bigger than 1024
27
+ */
28
+
29
+ /**
30
+ * @file Document Frame
31
+ * @license Apache Version 2
32
+ */
33
+
34
+ /**
35
+ * @file Document Rule
36
+ * @license Apache Version 2
37
+ */
38
+
39
+ /**
40
+ * @file Frame Config
41
+ * @license Apache Version 2
42
+ */
43
+
44
+ /**
45
+ * @file Frame Rule
46
+ * @license Apache Version 2
47
+ */
48
+
49
+ /**
50
+ * @file Javascript Terminus Document Classes
51
+ * @license Apache Version 2
52
+ * Helper classes for accessing documents returned by the Terminus DB API programmatically
53
+ *
54
+ * @example
55
+ * let doc = new TerminusDocument(client);
56
+ *
57
+ * //These set the objects document property and return promises:
58
+ *
59
+ * doc.loadDocument(URL).then(() => console.log(this.document));
60
+ * doc.loadComplete(URL, CLS).then(() => console.log(this.document))
61
+ * doc.loadSchema(cls).then(() => console.log(this.document))
62
+ *
63
+ * //These just set the object's document property
64
+ * doc.loadJSON(json_frames, cls) //console.log(this.document)
65
+ * doc.loadDataFrames(json_frames, cls)
66
+ * doc.loadClassFrames(json_frames, cls)
67
+ * @description Represents a frame for programmatic access to object frame,
68
+ * anywhere within a document
69
+ * Recursive data structure where this.children contains an indexed array of object frames
70
+ * and this.dataframes contains a property indexed array of data frames
71
+ * Every object frame carries a reference to its classframe
72
+ * This gives us instructions as to how to create new frames according to the schema
73
+ * After that it's turtles all the way down.
74
+ * @param cls - ID of the class (URL)
75
+ * @param classframe - an array of frames representing a class
76
+ * @param archetypes list of class frames
77
+ * @param parent parent object
78
+ * @returns {ObjectFrame}
79
+ */
80
+
81
+ /**
82
+ * @file Terminus Client Utility Functions
83
+ * @license Apache Version 2
84
+ * Object for bunding up common Terminus Utility Functions
85
+ */
86
+
87
+ /**
88
+ * @file Terminus Constants
89
+ * @license Apache Version 2
90
+ * Constants representing API actions
91
+ */
92
+
93
+ /**
94
+ * @file Terminus DB connection configuration
95
+ * @license Apache Version 2
96
+ * @description Object representing the state of a connection to a terminus db - these are:
97
+ * provides methods for getting and setting connection parameters
98
+ * @constructor
99
+ * @param {string} serverUrl - the terminusdb server url
100
+ * @param {typedef.ParamsObj} [params] - an object with the following connection parameters:
101
+ */
102
+
103
+ /**
104
+ * @file Terminus Rules
105
+ * @license Apache Version 2
106
+ * Abstract object to support applying matching rules to result sets and documents
107
+ * sub-classes are FrameRule and WOQLRule - this just has common functions
108
+ */
109
+
110
+ /**
111
+ * @file WOQL Rules
112
+ * @license Apache Version 2
113
+ * WOQL Rules support pattern matching on results of WOQL Queries
114
+ */
115
+
116
+ /**
117
+ * @license Apache Version 2
118
+ * @module AccessControl
119
+ * @constructor AccessControl
120
+ * @description The AccessControl is a driver to work with
121
+ * TerminusDB and TerminusX access control api
122
+ * for the credential you can use the JWT token, the API token or
123
+ * the basic authentication with username and password
124
+ * @example
125
+ * //connect with the API token
126
+ * //(to request a token create an account in https://terminusdb.com/)
127
+ * const accessContol = new AccessControl("https://servername.com",
128
+ * {organization:"my_team_name",
129
+ * token:"dGVybWludXNkYjovLy9kYXRhL2tleXNfYXB........"})
130
+ * accessControl.getOrgUsers().then(result=>{
131
+ * console.log(result)
132
+ * })
133
+ *
134
+ * //connect with the jwt token this type of connection is only for the dashboard
135
+ * //or for application integrate with our login workflow
136
+ * const accessContol = new AccessControl("https://servername.com",
137
+ * {organization:"my_team_name",
138
+ * jwt:"eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6IkpXUjBIOXYyeTFORUd........"})
139
+ * accessControl.getOrgUsers().then(result=>{
140
+ * console.log(result)
141
+ * })
142
+ *
143
+ * //if the jwt is expired you can change it with
144
+ * accessControl.setJwtToken("eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6IkpXUjBIOXYy
145
+ * eTFORUd.......")
146
+ *
147
+ * //connect with the base authentication this type of connection is only for the local installation
148
+ * const accessContol = new AccessControl("http://127.0.0.1:6363",
149
+ * {organization:"my_team_name", user:"admin"
150
+ * key:"mykey"})
151
+ * accessControl.getOrgUsers().then(result=>{
152
+ * console.log(result)
153
+ * })
154
+ *
155
+ */
156
+
157
+ /**
158
+ * @license Apache Version 2
159
+ * @module WOQLLibrary
160
+ * @constructor WOQLLibrary
161
+ * @description Library Functions to manage the commits graph
162
+ * @example
163
+ * const woqlLib = WOQLLibrary()
164
+ * woqlLib.branches()
165
+ *
166
+ * //or you can call this functions using WOQL Class
167
+ * WOQL.lib().branches()
168
+ * */
169
+
170
+ /**
171
+ * @module WOQLResult
172
+ * @license Apache Version 2
173
+ * Object representing the result of a WOQL Query
174
+ * @param {object} results result JSON object as returned by WOQL query
175
+ * @param {WOQLQuery} query the query object that generated the result
176
+ * @param {object} [config] optional result configuration options object
177
+ * [config.no_compress] by default all URLs are compressed where possible (v:X rather than http://.../variable/x) set to true to return non-compressed values
178
+ * [config.context] specify the JSON-LD context to use for compressing results - by default
179
+ * the query context will be used
180
+ */
181
+
182
+ /**
183
+ * @module WOQLTable
184
+ * @license Apache Version 2
185
+ * @param {WOQLClient} [client] we need an client if we do a server side pagination,sorting etc...
186
+ * @param {WOQLTableConfig} [config]
187
+ * @returns {WOQLTable}
188
+ */