@3sixty/auditable-item-graph-service 0.0.0-stage → 0.20.0-next.0
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.
- package/LICENSE +201 -0
- package/README.md +26 -2
- package/dist/es/auditableItemGraphRoutes.js +1136 -0
- package/dist/es/auditableItemGraphRoutes.js.map +1 -0
- package/dist/es/auditableItemGraphService.js +1913 -0
- package/dist/es/auditableItemGraphService.js.map +1 -0
- package/dist/es/entities/auditableItemGraphAlias.js +70 -0
- package/dist/es/entities/auditableItemGraphAlias.js.map +1 -0
- package/dist/es/entities/auditableItemGraphChangeset.js +79 -0
- package/dist/es/entities/auditableItemGraphChangeset.js.map +1 -0
- package/dist/es/entities/auditableItemGraphEdge.js +70 -0
- package/dist/es/entities/auditableItemGraphEdge.js.map +1 -0
- package/dist/es/entities/auditableItemGraphPatch.js +45 -0
- package/dist/es/entities/auditableItemGraphPatch.js.map +1 -0
- package/dist/es/entities/auditableItemGraphResource.js +54 -0
- package/dist/es/entities/auditableItemGraphResource.js.map +1 -0
- package/dist/es/entities/auditableItemGraphVertex.js +97 -0
- package/dist/es/entities/auditableItemGraphVertex.js.map +1 -0
- package/dist/es/entities/auditableItemGraphVertexIndex.js +95 -0
- package/dist/es/entities/auditableItemGraphVertexIndex.js.map +1 -0
- package/dist/es/entities/auditableItemGraphVertexV0.js +107 -0
- package/dist/es/entities/auditableItemGraphVertexV0.js.map +1 -0
- package/dist/es/entities/auditableItemGraphVertexV1.js +113 -0
- package/dist/es/entities/auditableItemGraphVertexV1.js.map +1 -0
- package/dist/es/index.js +19 -0
- package/dist/es/index.js.map +1 -0
- package/dist/es/models/IAuditableItemGraphServiceConfig.js +4 -0
- package/dist/es/models/IAuditableItemGraphServiceConfig.js.map +1 -0
- package/dist/es/models/IAuditableItemGraphServiceConstructorOptions.js +2 -0
- package/dist/es/models/IAuditableItemGraphServiceConstructorOptions.js.map +1 -0
- package/dist/es/models/IAuditableItemGraphServiceContext.js +4 -0
- package/dist/es/models/IAuditableItemGraphServiceContext.js.map +1 -0
- package/dist/es/restEntryPoints.js +13 -0
- package/dist/es/restEntryPoints.js.map +1 -0
- package/dist/es/schema.js +27 -0
- package/dist/es/schema.js.map +1 -0
- package/dist/es/utils/auditableItemGraphVertexIndexHelper.js +57 -0
- package/dist/es/utils/auditableItemGraphVertexIndexHelper.js.map +1 -0
- package/dist/types/auditableItemGraphRoutes.d.ts +94 -0
- package/dist/types/auditableItemGraphService.d.ts +164 -0
- package/dist/types/entities/auditableItemGraphAlias.d.ts +34 -0
- package/dist/types/entities/auditableItemGraphChangeset.d.ts +34 -0
- package/dist/types/entities/auditableItemGraphEdge.d.ts +34 -0
- package/dist/types/entities/auditableItemGraphPatch.d.ts +21 -0
- package/dist/types/entities/auditableItemGraphResource.d.ts +26 -0
- package/dist/types/entities/auditableItemGraphVertex.d.ts +50 -0
- package/dist/types/entities/auditableItemGraphVertexIndex.d.ts +39 -0
- package/dist/types/entities/auditableItemGraphVertexV0.d.ts +53 -0
- package/dist/types/entities/auditableItemGraphVertexV1.d.ts +58 -0
- package/dist/types/index.d.ts +16 -0
- package/dist/types/models/IAuditableItemGraphServiceConfig.d.ts +9 -0
- package/dist/types/models/IAuditableItemGraphServiceConstructorOptions.d.ts +38 -0
- package/dist/types/models/IAuditableItemGraphServiceContext.d.ts +17 -0
- package/dist/types/restEntryPoints.d.ts +5 -0
- package/dist/types/schema.d.ts +4 -0
- package/dist/types/utils/auditableItemGraphVertexIndexHelper.d.ts +25 -0
- package/docs/changelog.md +0 -0
- package/docs/examples.md +273 -0
- package/docs/open-api/spec.json +2190 -0
- package/docs/reference/classes/AuditableItemGraphAlias.md +69 -0
- package/docs/reference/classes/AuditableItemGraphChangeset.md +69 -0
- package/docs/reference/classes/AuditableItemGraphEdge.md +69 -0
- package/docs/reference/classes/AuditableItemGraphPatch.md +45 -0
- package/docs/reference/classes/AuditableItemGraphResource.md +53 -0
- package/docs/reference/classes/AuditableItemGraphService.md +539 -0
- package/docs/reference/classes/AuditableItemGraphVertex.md +93 -0
- package/docs/reference/classes/AuditableItemGraphVertexIndex.md +75 -0
- package/docs/reference/classes/AuditableItemGraphVertexIndexHelper.md +84 -0
- package/docs/reference/classes/AuditableItemGraphVertexV0.md +101 -0
- package/docs/reference/classes/AuditableItemGraphVertexV1.md +109 -0
- package/docs/reference/functions/auditableItemGraphChangesetGet.md +31 -0
- package/docs/reference/functions/auditableItemGraphChangesetList.md +31 -0
- package/docs/reference/functions/auditableItemGraphCreate.md +37 -0
- package/docs/reference/functions/auditableItemGraphGet.md +31 -0
- package/docs/reference/functions/auditableItemGraphList.md +31 -0
- package/docs/reference/functions/auditableItemGraphRemoveProof.md +31 -0
- package/docs/reference/functions/auditableItemGraphUpdate.md +31 -0
- package/docs/reference/functions/auditableItemGraphUpdatePartial.md +31 -0
- package/docs/reference/functions/auditableItemGraphVersionGet.md +31 -0
- package/docs/reference/functions/auditableItemGraphVersionList.md +31 -0
- package/docs/reference/functions/generateRestRoutesAuditableItemGraph.md +25 -0
- package/docs/reference/functions/initSchema.md +9 -0
- package/docs/reference/index.md +40 -0
- package/docs/reference/interfaces/IAuditableItemGraphServiceConfig.md +11 -0
- package/docs/reference/interfaces/IAuditableItemGraphServiceConstructorOptions.md +83 -0
- package/docs/reference/variables/restEntryPoints.md +5 -0
- package/docs/reference/variables/tagsAuditableItemGraph.md +5 -0
- package/locales/en.json +34 -0
- package/package.json +64 -5
|
@@ -0,0 +1,539 @@
|
|
|
1
|
+
# Class: AuditableItemGraphService
|
|
2
|
+
|
|
3
|
+
Class for performing auditable item graph operations.
|
|
4
|
+
|
|
5
|
+
## Implements
|
|
6
|
+
|
|
7
|
+
- `IAuditableItemGraphComponent`
|
|
8
|
+
- `IHealthProviderComponent`
|
|
9
|
+
|
|
10
|
+
## Constructors
|
|
11
|
+
|
|
12
|
+
### Constructor
|
|
13
|
+
|
|
14
|
+
> **new AuditableItemGraphService**(`options?`): `AuditableItemGraphService`
|
|
15
|
+
|
|
16
|
+
Create a new instance of AuditableItemGraphService.
|
|
17
|
+
|
|
18
|
+
#### Parameters
|
|
19
|
+
|
|
20
|
+
##### options?
|
|
21
|
+
|
|
22
|
+
[`IAuditableItemGraphServiceConstructorOptions`](../interfaces/IAuditableItemGraphServiceConstructorOptions.md)
|
|
23
|
+
|
|
24
|
+
The dependencies for the auditable item graph connector.
|
|
25
|
+
|
|
26
|
+
#### Returns
|
|
27
|
+
|
|
28
|
+
`AuditableItemGraphService`
|
|
29
|
+
|
|
30
|
+
## Properties
|
|
31
|
+
|
|
32
|
+
### CLASS\_NAME {#class_name}
|
|
33
|
+
|
|
34
|
+
> `readonly` `static` **CLASS\_NAME**: `string`
|
|
35
|
+
|
|
36
|
+
Runtime name for the class.
|
|
37
|
+
|
|
38
|
+
***
|
|
39
|
+
|
|
40
|
+
### NAMESPACE\_CHANGESET {#namespace_changeset}
|
|
41
|
+
|
|
42
|
+
> `readonly` `static` **NAMESPACE\_CHANGESET**: `string` = `"changeset"`
|
|
43
|
+
|
|
44
|
+
The namespace for the service changeset.
|
|
45
|
+
|
|
46
|
+
***
|
|
47
|
+
|
|
48
|
+
### NAMESPACE\_EDGE {#namespace_edge}
|
|
49
|
+
|
|
50
|
+
> `readonly` `static` **NAMESPACE\_EDGE**: `string` = `"edge"`
|
|
51
|
+
|
|
52
|
+
The namespace for the service edge.
|
|
53
|
+
|
|
54
|
+
## Methods
|
|
55
|
+
|
|
56
|
+
### className() {#classname}
|
|
57
|
+
|
|
58
|
+
> **className**(): `string`
|
|
59
|
+
|
|
60
|
+
Returns the class name of the component.
|
|
61
|
+
|
|
62
|
+
#### Returns
|
|
63
|
+
|
|
64
|
+
`string`
|
|
65
|
+
|
|
66
|
+
The class name of the component.
|
|
67
|
+
|
|
68
|
+
#### Implementation of
|
|
69
|
+
|
|
70
|
+
`IAuditableItemGraphComponent.className`
|
|
71
|
+
|
|
72
|
+
***
|
|
73
|
+
|
|
74
|
+
### healthApplication() {#healthapplication}
|
|
75
|
+
|
|
76
|
+
> **healthApplication**(`callback`): `Promise`\<`IHealth`[] \| `undefined`\>
|
|
77
|
+
|
|
78
|
+
Runs a set/get/remove cycle against the vertex entity storage using the organisation identity
|
|
79
|
+
from the current context.
|
|
80
|
+
|
|
81
|
+
#### Parameters
|
|
82
|
+
|
|
83
|
+
##### callback
|
|
84
|
+
|
|
85
|
+
`HealthApplicationCallback`
|
|
86
|
+
|
|
87
|
+
The callback to invoke when a deferred health result is ready.
|
|
88
|
+
|
|
89
|
+
#### Returns
|
|
90
|
+
|
|
91
|
+
`Promise`\<`IHealth`[] \| `undefined`\>
|
|
92
|
+
|
|
93
|
+
The health status of the service.
|
|
94
|
+
|
|
95
|
+
#### Implementation of
|
|
96
|
+
|
|
97
|
+
`IHealthProviderComponent.healthApplication`
|
|
98
|
+
|
|
99
|
+
***
|
|
100
|
+
|
|
101
|
+
### start() {#start}
|
|
102
|
+
|
|
103
|
+
> **start**(): `Promise`\<`void`\>
|
|
104
|
+
|
|
105
|
+
Register all AIG metrics with the telemetry component.
|
|
106
|
+
|
|
107
|
+
#### Returns
|
|
108
|
+
|
|
109
|
+
`Promise`\<`void`\>
|
|
110
|
+
|
|
111
|
+
A promise that resolves when all metrics have been registered.
|
|
112
|
+
|
|
113
|
+
#### Implementation of
|
|
114
|
+
|
|
115
|
+
`IAuditableItemGraphComponent.start`
|
|
116
|
+
|
|
117
|
+
***
|
|
118
|
+
|
|
119
|
+
### create() {#create}
|
|
120
|
+
|
|
121
|
+
> **create**(`vertex`): `Promise`\<`string`\>
|
|
122
|
+
|
|
123
|
+
Create a new graph vertex.
|
|
124
|
+
|
|
125
|
+
#### Parameters
|
|
126
|
+
|
|
127
|
+
##### vertex
|
|
128
|
+
|
|
129
|
+
`Omit`\<`IAuditableItemGraphVertex`, `"id"`\>
|
|
130
|
+
|
|
131
|
+
The vertex to create.
|
|
132
|
+
|
|
133
|
+
#### Returns
|
|
134
|
+
|
|
135
|
+
`Promise`\<`string`\>
|
|
136
|
+
|
|
137
|
+
The id of the new graph item.
|
|
138
|
+
|
|
139
|
+
#### Implementation of
|
|
140
|
+
|
|
141
|
+
`IAuditableItemGraphComponent.create`
|
|
142
|
+
|
|
143
|
+
***
|
|
144
|
+
|
|
145
|
+
### update() {#update}
|
|
146
|
+
|
|
147
|
+
> **update**(`vertex`): `Promise`\<`void`\>
|
|
148
|
+
|
|
149
|
+
Update a graph vertex (PUT - full replacement of vertex state).
|
|
150
|
+
Concurrent updates for the same vertex are serialized via `Mutex` on the vertex id.
|
|
151
|
+
|
|
152
|
+
#### Parameters
|
|
153
|
+
|
|
154
|
+
##### vertex
|
|
155
|
+
|
|
156
|
+
`IAuditableItemGraphVertex`
|
|
157
|
+
|
|
158
|
+
The vertex to update.
|
|
159
|
+
|
|
160
|
+
#### Returns
|
|
161
|
+
|
|
162
|
+
`Promise`\<`void`\>
|
|
163
|
+
|
|
164
|
+
A promise that resolves when the vertex has been updated.
|
|
165
|
+
|
|
166
|
+
#### Throws
|
|
167
|
+
|
|
168
|
+
GeneralError If a bypass vertex is being switched back to audited.
|
|
169
|
+
|
|
170
|
+
#### Implementation of
|
|
171
|
+
|
|
172
|
+
`IAuditableItemGraphComponent.update`
|
|
173
|
+
|
|
174
|
+
***
|
|
175
|
+
|
|
176
|
+
### updatePartial() {#updatepartial}
|
|
177
|
+
|
|
178
|
+
> **updatePartial**(`partial`): `Promise`\<`void`\>
|
|
179
|
+
|
|
180
|
+
Partially update a graph vertex (PATCH - explicit list patches; only defined properties applied).
|
|
181
|
+
Serialized with `update` via `Mutex` on the same vertex id within this instance.
|
|
182
|
+
|
|
183
|
+
#### Parameters
|
|
184
|
+
|
|
185
|
+
##### partial
|
|
186
|
+
|
|
187
|
+
`IAuditableItemGraphPartialVertex`
|
|
188
|
+
|
|
189
|
+
The partial vertex update.
|
|
190
|
+
|
|
191
|
+
#### Returns
|
|
192
|
+
|
|
193
|
+
`Promise`\<`void`\>
|
|
194
|
+
|
|
195
|
+
A promise that resolves when the partial update has been applied.
|
|
196
|
+
|
|
197
|
+
#### Throws
|
|
198
|
+
|
|
199
|
+
GeneralError If a bypass vertex is being switched back to audited.
|
|
200
|
+
|
|
201
|
+
#### Implementation of
|
|
202
|
+
|
|
203
|
+
`IAuditableItemGraphComponent.updatePartial`
|
|
204
|
+
|
|
205
|
+
***
|
|
206
|
+
|
|
207
|
+
### get() {#get}
|
|
208
|
+
|
|
209
|
+
> **get**(`id`, `options?`): `Promise`\<`IAuditableItemGraphVertex`\>
|
|
210
|
+
|
|
211
|
+
Get a graph vertex.
|
|
212
|
+
|
|
213
|
+
#### Parameters
|
|
214
|
+
|
|
215
|
+
##### id
|
|
216
|
+
|
|
217
|
+
`string`
|
|
218
|
+
|
|
219
|
+
The id of the vertex to get.
|
|
220
|
+
|
|
221
|
+
##### options?
|
|
222
|
+
|
|
223
|
+
Additional options for the get operation.
|
|
224
|
+
|
|
225
|
+
###### includeDeleted?
|
|
226
|
+
|
|
227
|
+
`boolean`
|
|
228
|
+
|
|
229
|
+
Whether to include deleted/updated aliases, resource, edges, defaults to false.
|
|
230
|
+
|
|
231
|
+
###### verifySignatureDepth?
|
|
232
|
+
|
|
233
|
+
`VerifyDepth`
|
|
234
|
+
|
|
235
|
+
How many signatures to verify, defaults to "none".
|
|
236
|
+
|
|
237
|
+
#### Returns
|
|
238
|
+
|
|
239
|
+
`Promise`\<`IAuditableItemGraphVertex`\>
|
|
240
|
+
|
|
241
|
+
The vertex if found.
|
|
242
|
+
|
|
243
|
+
#### Throws
|
|
244
|
+
|
|
245
|
+
NotFoundError if the vertex is not found.
|
|
246
|
+
|
|
247
|
+
#### Implementation of
|
|
248
|
+
|
|
249
|
+
`IAuditableItemGraphComponent.get`
|
|
250
|
+
|
|
251
|
+
***
|
|
252
|
+
|
|
253
|
+
### getChangesets() {#getchangesets}
|
|
254
|
+
|
|
255
|
+
> **getChangesets**(`id`, `cursor?`, `limit?`, `options?`): `Promise`\<\{ `changesets`: `IAuditableItemGraphChangesetList`; `cursor?`: `string`; \}\>
|
|
256
|
+
|
|
257
|
+
Get a graph vertex changeset list.
|
|
258
|
+
|
|
259
|
+
#### Parameters
|
|
260
|
+
|
|
261
|
+
##### id
|
|
262
|
+
|
|
263
|
+
`string`
|
|
264
|
+
|
|
265
|
+
The id of the vertex to get.
|
|
266
|
+
|
|
267
|
+
##### cursor?
|
|
268
|
+
|
|
269
|
+
`string`
|
|
270
|
+
|
|
271
|
+
The optional cursor to get next chunk.
|
|
272
|
+
|
|
273
|
+
##### limit?
|
|
274
|
+
|
|
275
|
+
`number`
|
|
276
|
+
|
|
277
|
+
Limit the number of entities to return.
|
|
278
|
+
|
|
279
|
+
##### options?
|
|
280
|
+
|
|
281
|
+
Additional options for the get operation.
|
|
282
|
+
|
|
283
|
+
###### verifySignatureDepth?
|
|
284
|
+
|
|
285
|
+
`VerifyDepth`
|
|
286
|
+
|
|
287
|
+
How many signatures to verify, defaults to "none".
|
|
288
|
+
|
|
289
|
+
#### Returns
|
|
290
|
+
|
|
291
|
+
`Promise`\<\{ `changesets`: `IAuditableItemGraphChangesetList`; `cursor?`: `string`; \}\>
|
|
292
|
+
|
|
293
|
+
The vertex if found.
|
|
294
|
+
|
|
295
|
+
#### Throws
|
|
296
|
+
|
|
297
|
+
NotFoundError if the vertex is not found.
|
|
298
|
+
|
|
299
|
+
#### Implementation of
|
|
300
|
+
|
|
301
|
+
`IAuditableItemGraphComponent.getChangesets`
|
|
302
|
+
|
|
303
|
+
***
|
|
304
|
+
|
|
305
|
+
### getChangeset() {#getchangeset}
|
|
306
|
+
|
|
307
|
+
> **getChangeset**(`id`, `options?`): `Promise`\<`IAuditableItemGraphChangeset`\>
|
|
308
|
+
|
|
309
|
+
Get a graph vertex changeset.
|
|
310
|
+
|
|
311
|
+
#### Parameters
|
|
312
|
+
|
|
313
|
+
##### id
|
|
314
|
+
|
|
315
|
+
`string`
|
|
316
|
+
|
|
317
|
+
The id of the vertex to get.
|
|
318
|
+
|
|
319
|
+
##### options?
|
|
320
|
+
|
|
321
|
+
Additional options for the get operation.
|
|
322
|
+
|
|
323
|
+
###### verifySignatureDepth?
|
|
324
|
+
|
|
325
|
+
`VerifyDepth`
|
|
326
|
+
|
|
327
|
+
How many signatures to verify, defaults to "none".
|
|
328
|
+
|
|
329
|
+
#### Returns
|
|
330
|
+
|
|
331
|
+
`Promise`\<`IAuditableItemGraphChangeset`\>
|
|
332
|
+
|
|
333
|
+
The vertex if found.
|
|
334
|
+
|
|
335
|
+
#### Throws
|
|
336
|
+
|
|
337
|
+
NotFoundError if the vertex is not found.
|
|
338
|
+
|
|
339
|
+
#### Implementation of
|
|
340
|
+
|
|
341
|
+
`IAuditableItemGraphComponent.getChangeset`
|
|
342
|
+
|
|
343
|
+
***
|
|
344
|
+
|
|
345
|
+
### getVersion() {#getversion}
|
|
346
|
+
|
|
347
|
+
> **getVersion**(`id`, `version`): `Promise`\<`IAuditableItemGraphVertex`\>
|
|
348
|
+
|
|
349
|
+
Get a graph vertex at a specific version.
|
|
350
|
+
|
|
351
|
+
#### Parameters
|
|
352
|
+
|
|
353
|
+
##### id
|
|
354
|
+
|
|
355
|
+
`string`
|
|
356
|
+
|
|
357
|
+
The id of the vertex.
|
|
358
|
+
|
|
359
|
+
##### version
|
|
360
|
+
|
|
361
|
+
`number`
|
|
362
|
+
|
|
363
|
+
The version number to retrieve.
|
|
364
|
+
|
|
365
|
+
#### Returns
|
|
366
|
+
|
|
367
|
+
`Promise`\<`IAuditableItemGraphVertex`\>
|
|
368
|
+
|
|
369
|
+
The vertex reconstructed at that version.
|
|
370
|
+
|
|
371
|
+
#### Throws
|
|
372
|
+
|
|
373
|
+
NotFoundError if the vertex or version is not found, a bypass vertex never has versions.
|
|
374
|
+
|
|
375
|
+
#### Implementation of
|
|
376
|
+
|
|
377
|
+
`IAuditableItemGraphComponent.getVersion`
|
|
378
|
+
|
|
379
|
+
***
|
|
380
|
+
|
|
381
|
+
### getVersions() {#getversions}
|
|
382
|
+
|
|
383
|
+
> **getVersions**(`id`, `options?`): `Promise`\<`IAuditableItemGraphVertexVersionList`\>
|
|
384
|
+
|
|
385
|
+
Get all versions of a graph vertex.
|
|
386
|
+
|
|
387
|
+
#### Parameters
|
|
388
|
+
|
|
389
|
+
##### id
|
|
390
|
+
|
|
391
|
+
`string`
|
|
392
|
+
|
|
393
|
+
The id of the vertex.
|
|
394
|
+
|
|
395
|
+
##### options?
|
|
396
|
+
|
|
397
|
+
Additional options for the operation.
|
|
398
|
+
|
|
399
|
+
###### after?
|
|
400
|
+
|
|
401
|
+
`string`
|
|
402
|
+
|
|
403
|
+
Only return versions created after this ISO 8601 timestamp (exclusive).
|
|
404
|
+
|
|
405
|
+
###### before?
|
|
406
|
+
|
|
407
|
+
`string`
|
|
408
|
+
|
|
409
|
+
Only return versions created before this ISO 8601 timestamp (exclusive).
|
|
410
|
+
|
|
411
|
+
#### Returns
|
|
412
|
+
|
|
413
|
+
`Promise`\<`IAuditableItemGraphVertexVersionList`\>
|
|
414
|
+
|
|
415
|
+
The list of vertex versions, a bypass vertex returns a single baseline entry for its
|
|
416
|
+
current state when that falls within the requested range.
|
|
417
|
+
|
|
418
|
+
#### Throws
|
|
419
|
+
|
|
420
|
+
NotFoundError if the vertex is not found.
|
|
421
|
+
|
|
422
|
+
#### Implementation of
|
|
423
|
+
|
|
424
|
+
`IAuditableItemGraphComponent.getVersions`
|
|
425
|
+
|
|
426
|
+
***
|
|
427
|
+
|
|
428
|
+
### removeProof() {#removeproof}
|
|
429
|
+
|
|
430
|
+
> **removeProof**(`id`): `Promise`\<`void`\>
|
|
431
|
+
|
|
432
|
+
Remove the proof for an item.
|
|
433
|
+
|
|
434
|
+
#### Parameters
|
|
435
|
+
|
|
436
|
+
##### id
|
|
437
|
+
|
|
438
|
+
`string`
|
|
439
|
+
|
|
440
|
+
The id of the vertex to remove the proof from.
|
|
441
|
+
|
|
442
|
+
#### Returns
|
|
443
|
+
|
|
444
|
+
`Promise`\<`void`\>
|
|
445
|
+
|
|
446
|
+
A promise that resolves when the proof has been removed from all changesets.
|
|
447
|
+
|
|
448
|
+
#### Throws
|
|
449
|
+
|
|
450
|
+
NotFoundError if the vertex is not found.
|
|
451
|
+
|
|
452
|
+
#### Implementation of
|
|
453
|
+
|
|
454
|
+
`IAuditableItemGraphComponent.removeProof`
|
|
455
|
+
|
|
456
|
+
***
|
|
457
|
+
|
|
458
|
+
### query() {#query}
|
|
459
|
+
|
|
460
|
+
> **query**(`options?`, `conditions?`, `orderBy?`, `orderByDirection?`, `properties?`, `cursor?`, `limit?`): `Promise`\<\{ `entries`: `IAuditableItemGraphVertexList`; `cursor?`: `string`; \}\>
|
|
461
|
+
|
|
462
|
+
Query the graph for vertices.
|
|
463
|
+
|
|
464
|
+
#### Parameters
|
|
465
|
+
|
|
466
|
+
##### options?
|
|
467
|
+
|
|
468
|
+
The query options.
|
|
469
|
+
|
|
470
|
+
###### id?
|
|
471
|
+
|
|
472
|
+
`string`
|
|
473
|
+
|
|
474
|
+
The optional id to look for.
|
|
475
|
+
|
|
476
|
+
###### idMode?
|
|
477
|
+
|
|
478
|
+
`"id"` \| `"alias"` \| `"both"`
|
|
479
|
+
|
|
480
|
+
Look in id, alias or both, defaults to both.
|
|
481
|
+
|
|
482
|
+
###### idExact?
|
|
483
|
+
|
|
484
|
+
`boolean`
|
|
485
|
+
|
|
486
|
+
Find only exact matches, default to false meaning partial matching.
|
|
487
|
+
|
|
488
|
+
###### resourceTypes?
|
|
489
|
+
|
|
490
|
+
`string`[]
|
|
491
|
+
|
|
492
|
+
Include vertices with specific resource types.
|
|
493
|
+
|
|
494
|
+
##### conditions?
|
|
495
|
+
|
|
496
|
+
`EntityCondition`\<`IAuditableItemGraphVertex`\>
|
|
497
|
+
|
|
498
|
+
Conditions to use in the query.
|
|
499
|
+
|
|
500
|
+
##### orderBy?
|
|
501
|
+
|
|
502
|
+
`"dateCreated"` \| `"dateModified"`
|
|
503
|
+
|
|
504
|
+
The order for the results, defaults to created.
|
|
505
|
+
|
|
506
|
+
##### orderByDirection?
|
|
507
|
+
|
|
508
|
+
`SortDirection`
|
|
509
|
+
|
|
510
|
+
The direction for the order, defaults to desc.
|
|
511
|
+
|
|
512
|
+
##### properties?
|
|
513
|
+
|
|
514
|
+
keyof `IAuditableItemGraphVertex`[]
|
|
515
|
+
|
|
516
|
+
The properties to return, if not provided defaults to id, created, aliases and object.
|
|
517
|
+
|
|
518
|
+
##### cursor?
|
|
519
|
+
|
|
520
|
+
`string`
|
|
521
|
+
|
|
522
|
+
The cursor to request the next chunk of entities.
|
|
523
|
+
|
|
524
|
+
##### limit?
|
|
525
|
+
|
|
526
|
+
`number`
|
|
527
|
+
|
|
528
|
+
The maximum number of entities to return, a page can contain fewer so follow
|
|
529
|
+
the cursor until it is absent to read them all.
|
|
530
|
+
|
|
531
|
+
#### Returns
|
|
532
|
+
|
|
533
|
+
`Promise`\<\{ `entries`: `IAuditableItemGraphVertexList`; `cursor?`: `string`; \}\>
|
|
534
|
+
|
|
535
|
+
The entities, which can be partial if a limited keys list was provided.
|
|
536
|
+
|
|
537
|
+
#### Implementation of
|
|
538
|
+
|
|
539
|
+
`IAuditableItemGraphComponent.query`
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
# Class: AuditableItemGraphVertex
|
|
2
|
+
|
|
3
|
+
Class describing the auditable item graph vertex.
|
|
4
|
+
|
|
5
|
+
## Constructors
|
|
6
|
+
|
|
7
|
+
### Constructor
|
|
8
|
+
|
|
9
|
+
> **new AuditableItemGraphVertex**(): `AuditableItemGraphVertex`
|
|
10
|
+
|
|
11
|
+
#### Returns
|
|
12
|
+
|
|
13
|
+
`AuditableItemGraphVertex`
|
|
14
|
+
|
|
15
|
+
## Properties
|
|
16
|
+
|
|
17
|
+
### id {#id}
|
|
18
|
+
|
|
19
|
+
> **id**: `string`
|
|
20
|
+
|
|
21
|
+
The id of the vertex.
|
|
22
|
+
|
|
23
|
+
***
|
|
24
|
+
|
|
25
|
+
### organizationIdentity {#organizationidentity}
|
|
26
|
+
|
|
27
|
+
> **organizationIdentity**: `string`
|
|
28
|
+
|
|
29
|
+
The identity of the organization which controls the vertex.
|
|
30
|
+
|
|
31
|
+
***
|
|
32
|
+
|
|
33
|
+
### dateCreated {#datecreated}
|
|
34
|
+
|
|
35
|
+
> **dateCreated**: `string`
|
|
36
|
+
|
|
37
|
+
The date/time of when the vertex was created.
|
|
38
|
+
|
|
39
|
+
***
|
|
40
|
+
|
|
41
|
+
### dateModified? {#datemodified}
|
|
42
|
+
|
|
43
|
+
> `optional` **dateModified?**: `string`
|
|
44
|
+
|
|
45
|
+
The date/time of when the vertex was last modified.
|
|
46
|
+
|
|
47
|
+
***
|
|
48
|
+
|
|
49
|
+
### auditMode? {#auditmode}
|
|
50
|
+
|
|
51
|
+
> `optional` **auditMode?**: `AuditableItemGraphAuditMode`
|
|
52
|
+
|
|
53
|
+
How the mutations of the vertex are recorded, when absent the vertex behaves as audited.
|
|
54
|
+
|
|
55
|
+
***
|
|
56
|
+
|
|
57
|
+
### annotationObject? {#annotationobject}
|
|
58
|
+
|
|
59
|
+
> `optional` **annotationObject?**: `IJsonLdNodeObject`
|
|
60
|
+
|
|
61
|
+
Object to associate with the vertex as JSON-LD.
|
|
62
|
+
|
|
63
|
+
***
|
|
64
|
+
|
|
65
|
+
### aliases? {#aliases}
|
|
66
|
+
|
|
67
|
+
> `optional` **aliases?**: [`AuditableItemGraphAlias`](AuditableItemGraphAlias.md)[]
|
|
68
|
+
|
|
69
|
+
Alternative aliases that can be used to identify the vertex.
|
|
70
|
+
|
|
71
|
+
***
|
|
72
|
+
|
|
73
|
+
### resources? {#resources}
|
|
74
|
+
|
|
75
|
+
> `optional` **resources?**: [`AuditableItemGraphResource`](AuditableItemGraphResource.md)[]
|
|
76
|
+
|
|
77
|
+
The resources attached to the vertex.
|
|
78
|
+
|
|
79
|
+
***
|
|
80
|
+
|
|
81
|
+
### edges? {#edges}
|
|
82
|
+
|
|
83
|
+
> `optional` **edges?**: [`AuditableItemGraphEdge`](AuditableItemGraphEdge.md)[]
|
|
84
|
+
|
|
85
|
+
Edges connected to the vertex.
|
|
86
|
+
|
|
87
|
+
***
|
|
88
|
+
|
|
89
|
+
### version? {#version}
|
|
90
|
+
|
|
91
|
+
> `optional` **version?**: `number`
|
|
92
|
+
|
|
93
|
+
The current version of the vertex, incremented on each changeset.
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
# Class: AuditableItemGraphVertexIndex
|
|
2
|
+
|
|
3
|
+
Class describing the auditable item graph vertex index.
|
|
4
|
+
|
|
5
|
+
The composite index is built on a fixed length hash of the value rather than the value itself,
|
|
6
|
+
so its key stays within the size limit some databases place on an index key however long the
|
|
7
|
+
value is.
|
|
8
|
+
|
|
9
|
+
## Constructors
|
|
10
|
+
|
|
11
|
+
### Constructor
|
|
12
|
+
|
|
13
|
+
> **new AuditableItemGraphVertexIndex**(): `AuditableItemGraphVertexIndex`
|
|
14
|
+
|
|
15
|
+
#### Returns
|
|
16
|
+
|
|
17
|
+
`AuditableItemGraphVertexIndex`
|
|
18
|
+
|
|
19
|
+
## Properties
|
|
20
|
+
|
|
21
|
+
### id {#id}
|
|
22
|
+
|
|
23
|
+
> **id**: `string`
|
|
24
|
+
|
|
25
|
+
The id of the index.
|
|
26
|
+
|
|
27
|
+
***
|
|
28
|
+
|
|
29
|
+
### vertexId {#vertexid}
|
|
30
|
+
|
|
31
|
+
> **vertexId**: `string`
|
|
32
|
+
|
|
33
|
+
The id of the vertex this index refers to.
|
|
34
|
+
|
|
35
|
+
***
|
|
36
|
+
|
|
37
|
+
### type {#type}
|
|
38
|
+
|
|
39
|
+
> **type**: `string`
|
|
40
|
+
|
|
41
|
+
Index type.
|
|
42
|
+
|
|
43
|
+
***
|
|
44
|
+
|
|
45
|
+
### value {#value}
|
|
46
|
+
|
|
47
|
+
> **value**: `string`
|
|
48
|
+
|
|
49
|
+
Index value, case folded so lookups do not depend on the column collation.
|
|
50
|
+
|
|
51
|
+
***
|
|
52
|
+
|
|
53
|
+
### valueHash {#valuehash}
|
|
54
|
+
|
|
55
|
+
> **valueHash**: `string`
|
|
56
|
+
|
|
57
|
+
The hash of the value, used for exact lookups.
|
|
58
|
+
|
|
59
|
+
***
|
|
60
|
+
|
|
61
|
+
### dateCreated {#datecreated}
|
|
62
|
+
|
|
63
|
+
> **dateCreated**: `string`
|
|
64
|
+
|
|
65
|
+
The date/time of when the vertex was created, copied so the index can order and page its
|
|
66
|
+
own matches without reading the vertex.
|
|
67
|
+
|
|
68
|
+
***
|
|
69
|
+
|
|
70
|
+
### dateModified? {#datemodified}
|
|
71
|
+
|
|
72
|
+
> `optional` **dateModified?**: `string`
|
|
73
|
+
|
|
74
|
+
The date/time of when the vertex was last modified, copied so a query ordered by the
|
|
75
|
+
modified date can also be paged from the index.
|