@twin.org/auditable-item-graph-models 0.0.1-next.3 → 0.0.1-next.31

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 (57) hide show
  1. package/dist/cjs/index.cjs +375 -253
  2. package/dist/esm/index.mjs +374 -253
  3. package/dist/types/index.d.ts +5 -3
  4. package/dist/types/models/IAuditableItemGraphAlias.d.ts +21 -3
  5. package/dist/types/models/IAuditableItemGraphAuditedElement.d.ts +7 -7
  6. package/dist/types/models/IAuditableItemGraphChangeset.d.ts +26 -10
  7. package/dist/types/models/IAuditableItemGraphComponent.d.ts +55 -59
  8. package/dist/types/models/IAuditableItemGraphEdge.d.ts +21 -3
  9. package/dist/types/models/IAuditableItemGraphPatchOperation.d.ts +28 -2
  10. package/dist/types/models/IAuditableItemGraphResource.d.ts +16 -2
  11. package/dist/types/models/IAuditableItemGraphVertex.d.ts +28 -2
  12. package/dist/types/models/IAuditableItemGraphVertexList.d.ts +25 -0
  13. package/dist/types/models/api/IAuditableItemGraphCreateRequest.d.ts +9 -9
  14. package/dist/types/models/api/IAuditableItemGraphGetRequest.d.ts +2 -2
  15. package/dist/types/models/api/IAuditableItemGraphGetResponse.d.ts +2 -13
  16. package/dist/types/models/api/IAuditableItemGraphListRequest.d.ts +10 -5
  17. package/dist/types/models/api/IAuditableItemGraphListResponse.d.ts +2 -12
  18. package/dist/types/models/api/IAuditableItemGraphUpdateRequest.d.ts +9 -9
  19. package/dist/types/models/auditableItemGraphContexts.d.ts +17 -0
  20. package/dist/types/models/auditableItemGraphTopics.d.ts +17 -0
  21. package/dist/types/models/auditableItemGraphTypes.d.ts +8 -24
  22. package/dist/types/models/eventBus/IAuditableItemGraphEventBusVertexCreated.d.ts +9 -0
  23. package/dist/types/models/eventBus/IAuditableItemGraphEventBusVertexUpdated.d.ts +14 -0
  24. package/docs/changelog.md +1 -1
  25. package/docs/reference/index.md +7 -5
  26. package/docs/reference/interfaces/IAuditableItemGraphAlias.md +34 -22
  27. package/docs/reference/interfaces/IAuditableItemGraphAuditedElement.md +11 -11
  28. package/docs/reference/interfaces/IAuditableItemGraphChangeset.md +33 -17
  29. package/docs/reference/interfaces/IAuditableItemGraphComponent.md +104 -54
  30. package/docs/reference/interfaces/IAuditableItemGraphCreateRequest.md +5 -5
  31. package/docs/reference/interfaces/IAuditableItemGraphEdge.md +38 -26
  32. package/docs/reference/interfaces/IAuditableItemGraphEventBusVertexCreated.md +11 -0
  33. package/docs/reference/interfaces/IAuditableItemGraphEventBusVertexUpdated.md +19 -0
  34. package/docs/reference/interfaces/IAuditableItemGraphGetRequest.md +2 -2
  35. package/docs/reference/interfaces/IAuditableItemGraphGetResponse.md +4 -4
  36. package/docs/reference/interfaces/IAuditableItemGraphListRequest.md +11 -5
  37. package/docs/reference/interfaces/IAuditableItemGraphListResponse.md +3 -3
  38. package/docs/reference/interfaces/IAuditableItemGraphPatchOperation.md +46 -2
  39. package/docs/reference/interfaces/IAuditableItemGraphResource.md +32 -20
  40. package/docs/reference/interfaces/IAuditableItemGraphUpdateRequest.md +5 -5
  41. package/docs/reference/interfaces/IAuditableItemGraphVertex.md +50 -18
  42. package/docs/reference/interfaces/IAuditableItemGraphVertexList.md +35 -0
  43. package/docs/reference/type-aliases/AuditableItemGraphContexts.md +5 -0
  44. package/docs/reference/type-aliases/AuditableItemGraphTopics.md +5 -0
  45. package/docs/reference/variables/AuditableItemGraphContexts.md +19 -0
  46. package/docs/reference/variables/AuditableItemGraphTopics.md +19 -0
  47. package/docs/reference/variables/AuditableItemGraphTypes.md +9 -33
  48. package/package.json +5 -34
  49. package/dist/types/models/IAuditableItemGraphCredential.d.ts +0 -25
  50. package/dist/types/models/IAuditableItemGraphMetadataElement.d.ts +0 -10
  51. package/dist/types/models/IAuditableItemGraphVerification.d.ts +0 -15
  52. package/dist/types/models/auditableItemGraphVerificationState.d.ts +0 -37
  53. package/docs/reference/interfaces/IAuditableItemGraphCredential.md +0 -43
  54. package/docs/reference/interfaces/IAuditableItemGraphVerification.md +0 -23
  55. package/docs/reference/type-aliases/AuditableItemGraphVerificationState.md +0 -5
  56. package/docs/reference/type-aliases/JsonReturnType.md +0 -13
  57. package/docs/reference/variables/AuditableItemGraphVerificationState.md +0 -49
@@ -9,225 +9,276 @@ var dataCore = require('@twin.org/data-core');
9
9
  */
10
10
  // eslint-disable-next-line @typescript-eslint/naming-convention
11
11
  const AuditableItemGraphTypes = {
12
- /**
13
- * The context uri for the auditable item graph types.
14
- */
15
- ContextUri: "https://schema.twindev.org/aig/",
16
- /**
17
- * The context root for the auditable item graph types.
18
- */
19
- ContextJsonld: "https://schema.twindev.org/aig/types.jsonld",
20
12
  /**
21
13
  * Represents auditable item graph vertex.
22
14
  */
23
- Vertex: "https://schema.twindev.org/aig/AuditableItemGraphVertex",
15
+ Vertex: "AuditableItemGraphVertex",
24
16
  /**
25
17
  * Represents auditable item graph alias.
26
18
  */
27
- Alias: "https://schema.twindev.org/aig/AuditableItemGraphAlias",
19
+ Alias: "AuditableItemGraphAlias",
28
20
  /**
29
21
  * Represents auditable item graph resource.
30
22
  */
31
- Resource: "https://schema.twindev.org/aig/AuditableItemGraphResource",
23
+ Resource: "AuditableItemGraphResource",
32
24
  /**
33
25
  * Represents auditable item graph edge.
34
26
  */
35
- Edge: "https://schema.twindev.org/aig/AuditableItemGraphEdge",
27
+ Edge: "AuditableItemGraphEdge",
36
28
  /**
37
29
  * Represents auditable item graph changeset.
38
30
  */
39
- Changeset: "https://schema.twindev.org/aig/AuditableItemGraphChangeset",
31
+ Changeset: "AuditableItemGraphChangeset",
40
32
  /**
41
33
  * Represents patch operation.
42
34
  */
43
- PatchOperation: "https://schema.twindev.org/aig/AuditableItemGraphPatchOperation",
44
- /**
45
- * Represents the immutable credential payload.
46
- */
47
- Credential: "https://schema.twindev.org/aig/AuditableItemGraphPatchCredential",
35
+ PatchOperation: "AuditableItemGraphPatchOperation",
48
36
  /**
49
- * Represents auditable item stream verification.
37
+ * Represents auditable item stream vertex list.
50
38
  */
51
- Verification: "https://schema.twindev.org/aig/AuditableItemGraphVerification",
52
- /**
53
- * Represents auditable item stream verification state.
54
- */
55
- VerificationState: "https://schema.twindev.org/aig/AuditableItemGraphVerificationState"
39
+ VertexList: "AuditableItemGraphVertexList"
56
40
  };
57
41
 
58
- var type$8 = "object";
59
- var properties$7 = {
60
- metadata: {
61
- $ref: "https://schema.twindev.org/json-ld/JsonLdNodeObject",
62
- description: "The metadata to associate with the element as JSON-LD."
63
- },
42
+ var type$6 = "object";
43
+ var properties$6 = {
64
44
  id: {
65
45
  type: "string",
66
46
  description: "The id of the element."
67
47
  },
68
- created: {
69
- type: "number",
70
- description: "The timestamp of when the element was created."
48
+ dateCreated: {
49
+ type: "string",
50
+ description: "The date/time of when the element was created."
71
51
  },
72
- updated: {
73
- type: "number",
74
- description: "The timestamp of when the element was updated."
52
+ dateModified: {
53
+ type: "string",
54
+ description: "The date/time of when the element was modified."
55
+ },
56
+ dateDeleted: {
57
+ type: "string",
58
+ description: "The date/time of when the element was deleted, as we never actually remove items."
59
+ },
60
+ "@context": {
61
+ anyOf: [
62
+ {
63
+ type: "string",
64
+ "const": "https://schema.twindev.org/aig/"
65
+ },
66
+ {
67
+ type: "array",
68
+ minItems: 1,
69
+ items: [
70
+ {
71
+ type: "string",
72
+ "const": "https://schema.twindev.org/aig/"
73
+ }
74
+ ],
75
+ additionalItems: {
76
+ $ref: "https://schema.twindev.org/json-ld/JsonLdContextDefinitionElement"
77
+ }
78
+ }
79
+ ],
80
+ description: "JSON-LD Context."
75
81
  },
76
- deleted: {
77
- type: "number",
78
- description: "The timestamp of when the element was deleted, as we never actually remove items."
82
+ type: {
83
+ type: "string",
84
+ "const": "AuditableItemGraphAlias",
85
+ description: "JSON-LD Type."
86
+ },
87
+ annotationObject: {
88
+ $ref: "https://schema.twindev.org/json-ld/JsonLdNodeObject",
89
+ description: "The JSON-LD annotation object for the alias."
79
90
  },
80
- format: {
91
+ aliasFormat: {
81
92
  type: "string",
82
93
  description: "The format of the id in the alias."
83
94
  }
84
95
  };
85
- var additionalProperties$7 = false;
86
96
  var required$6 = [
87
- "created",
88
- "id"
97
+ "@context",
98
+ "id",
99
+ "type"
89
100
  ];
90
- var description$7 = "Interface describing an alias for a vertex.";
101
+ var additionalProperties$6 = false;
102
+ var description$6 = "Interface describing an alias for a vertex.";
91
103
  var AuditableItemGraphAliasSchema = {
92
- type: type$8,
93
- properties: properties$7,
94
- additionalProperties: additionalProperties$7,
104
+ type: type$6,
105
+ properties: properties$6,
95
106
  required: required$6,
96
- description: description$7
107
+ additionalProperties: additionalProperties$6,
108
+ description: description$6
97
109
  };
98
110
 
99
- var type$7 = "object";
100
- var properties$6 = {
101
- created: {
102
- type: "number",
103
- description: "The timestamp of when the changeset was created."
104
- },
105
- userIdentity: {
106
- type: "string",
107
- description: "The user identity that created the changes."
108
- },
109
- patches: {
111
+ var type$5 = "object";
112
+ var properties$5 = {
113
+ "@context": {
110
114
  type: "array",
111
- items: {
112
- $ref: "https://schema.twindev.org/aig/AuditableItemGraphPatchOperation"
115
+ minItems: 2,
116
+ items: [
117
+ {
118
+ type: "string",
119
+ "const": "https://schema.twindev.org/aig/"
120
+ },
121
+ {
122
+ type: "string",
123
+ "const": "https://schema.twindev.org/common/"
124
+ }
125
+ ],
126
+ additionalItems: {
127
+ $ref: "https://schema.twindev.org/json-ld/JsonLdContextDefinitionElement"
113
128
  },
114
- description: "The patches in the changeset."
129
+ description: "JSON-LD Context."
115
130
  },
116
- hash: {
131
+ type: {
117
132
  type: "string",
118
- description: "The hash for the changeset."
133
+ "const": "AuditableItemGraphChangeset",
134
+ description: "JSON-LD Type."
119
135
  },
120
- signature: {
136
+ id: {
121
137
  type: "string",
122
- description: "The signature for the changeset."
138
+ description: "The id of the changeset."
123
139
  },
124
- immutableStorageId: {
140
+ dateCreated: {
125
141
  type: "string",
126
- description: "The immutable storage id containing the signature for the changeset."
127
- }
128
- };
129
- var required$5 = [
130
- "created",
131
- "userIdentity",
132
- "patches",
133
- "hash",
134
- "signature"
135
- ];
136
- var additionalProperties$6 = false;
137
- var description$6 = "Interface describing a set of updates to the vertex.";
138
- var AuditableItemGraphChangesetSchema = {
139
- type: type$7,
140
- properties: properties$6,
141
- required: required$5,
142
- additionalProperties: additionalProperties$6,
143
- description: description$6
144
- };
145
-
146
- var type$6 = "object";
147
- var properties$5 = {
148
- created: {
149
- type: "number",
150
- description: "The timestamp of when the changeset was created."
142
+ description: "The date/time of when the changeset was created."
151
143
  },
152
144
  userIdentity: {
153
145
  type: "string",
154
146
  description: "The user identity that created the changes."
155
147
  },
156
- signature: {
157
- type: "string",
158
- description: "The signature for the changeset."
148
+ patches: {
149
+ type: "array",
150
+ items: {
151
+ $ref: "https://schema.twindev.org/aig/AuditableItemGraphPatchOperation"
152
+ },
153
+ description: "The patches in the changeset."
159
154
  },
160
- hash: {
155
+ proofId: {
161
156
  type: "string",
162
- description: "The signature for the changeset."
157
+ description: "The immutable proof id which contains the signature for this changeset."
163
158
  },
164
- integrity: {
165
- type: "string",
166
- description: "The integrity data for this changeset, encrypted."
159
+ verification: {
160
+ $ref: "https://schema.twindev.org/immutable-proof/ImmutableProofVerification",
161
+ description: "The verification for the changeset."
167
162
  }
168
163
  };
169
- var required$4 = [
170
- "created",
164
+ var required$5 = [
165
+ "@context",
166
+ "type",
167
+ "id",
168
+ "dateCreated",
171
169
  "userIdentity",
172
- "signature",
173
- "hash"
170
+ "patches"
174
171
  ];
175
172
  var additionalProperties$5 = false;
176
- var description$5 = "The data stored immutably for the graph in a verifiable credential.";
177
- var AuditableItemGraphCredentialSchema = {
178
- type: type$6,
173
+ var description$5 = "Interface describing a set of updates to the vertex.";
174
+ var AuditableItemGraphChangesetSchema = {
175
+ type: type$5,
179
176
  properties: properties$5,
180
- required: required$4,
177
+ required: required$5,
181
178
  additionalProperties: additionalProperties$5,
182
179
  description: description$5
183
180
  };
184
181
 
185
- var type$5 = "object";
182
+ var type$4 = "object";
186
183
  var properties$4 = {
187
- metadata: {
188
- $ref: "https://schema.twindev.org/json-ld/JsonLdNodeObject",
189
- description: "The metadata to associate with the element as JSON-LD."
190
- },
191
184
  id: {
192
185
  type: "string",
193
186
  description: "The id of the element."
194
187
  },
195
- created: {
196
- type: "number",
197
- description: "The timestamp of when the element was created."
188
+ dateCreated: {
189
+ type: "string",
190
+ description: "The date/time of when the element was created."
198
191
  },
199
- updated: {
200
- type: "number",
201
- description: "The timestamp of when the element was updated."
192
+ dateModified: {
193
+ type: "string",
194
+ description: "The date/time of when the element was modified."
202
195
  },
203
- deleted: {
204
- type: "number",
205
- description: "The timestamp of when the element was deleted, as we never actually remove items."
196
+ dateDeleted: {
197
+ type: "string",
198
+ description: "The date/time of when the element was deleted, as we never actually remove items."
199
+ },
200
+ "@context": {
201
+ anyOf: [
202
+ {
203
+ type: "string",
204
+ "const": "https://schema.twindev.org/aig/"
205
+ },
206
+ {
207
+ type: "array",
208
+ minItems: 1,
209
+ items: [
210
+ {
211
+ type: "string",
212
+ "const": "https://schema.twindev.org/aig/"
213
+ }
214
+ ],
215
+ additionalItems: {
216
+ $ref: "https://schema.twindev.org/json-ld/JsonLdContextDefinitionElement"
217
+ }
218
+ }
219
+ ],
220
+ description: "JSON-LD Context."
206
221
  },
207
- relationship: {
222
+ type: {
223
+ type: "string",
224
+ "const": "AuditableItemGraphEdge",
225
+ description: "JSON-LD Type."
226
+ },
227
+ annotationObject: {
228
+ $ref: "https://schema.twindev.org/json-ld/JsonLdNodeObject",
229
+ description: "The JSON-LD annotation object for the edge."
230
+ },
231
+ edgeRelationship: {
208
232
  type: "string",
209
233
  description: "The relationship between the two vertices."
210
234
  }
211
235
  };
212
- var required$3 = [
213
- "created",
236
+ var required$4 = [
237
+ "@context",
214
238
  "id",
215
- "relationship"
239
+ "type",
240
+ "edgeRelationship"
216
241
  ];
217
242
  var additionalProperties$4 = false;
218
243
  var description$4 = "Interface describing an edge between two vertices in an auditable item graph.";
219
244
  var AuditableItemGraphEdgeSchema = {
220
- type: type$5,
245
+ type: type$4,
221
246
  properties: properties$4,
222
- required: required$3,
247
+ required: required$4,
223
248
  additionalProperties: additionalProperties$4,
224
249
  description: description$4
225
250
  };
226
251
 
227
- var type$4 = "object";
228
- var additionalProperties$3 = false;
252
+ var type$3 = "object";
229
253
  var properties$3 = {
230
- op: {
254
+ "@context": {
255
+ anyOf: [
256
+ {
257
+ type: "string",
258
+ "const": "https://schema.twindev.org/aig/"
259
+ },
260
+ {
261
+ type: "array",
262
+ minItems: 1,
263
+ items: [
264
+ {
265
+ type: "string",
266
+ "const": "https://schema.twindev.org/aig/"
267
+ }
268
+ ],
269
+ additionalItems: {
270
+ $ref: "https://schema.twindev.org/json-ld/JsonLdContextDefinitionElement"
271
+ }
272
+ }
273
+ ],
274
+ description: "JSON-LD Context."
275
+ },
276
+ type: {
277
+ type: "string",
278
+ "const": "AuditableItemGraphPatchOperation",
279
+ description: "JSON-LD Type."
280
+ },
281
+ patchOperation: {
231
282
  type: "string",
232
283
  "enum": [
233
284
  "add",
@@ -239,116 +290,147 @@ var properties$3 = {
239
290
  ],
240
291
  description: "The operation that was performed on the item."
241
292
  },
242
- path: {
293
+ patchPath: {
243
294
  type: "string",
244
295
  description: "The path to the object that was changed."
245
296
  },
246
- from: {
297
+ patchFrom: {
247
298
  type: "string",
248
299
  description: "The path the value was copied or moved from."
249
300
  },
250
- value: {
301
+ patchValue: {
251
302
  description: "The value to add."
252
303
  }
253
304
  };
254
- var required$2 = [
255
- "op",
256
- "path"
305
+ var required$3 = [
306
+ "@context",
307
+ "type",
308
+ "patchOperation",
309
+ "patchPath"
257
310
  ];
311
+ var additionalProperties$3 = false;
258
312
  var description$3 = "The patch operation for JSON diffs.";
259
313
  var AuditableItemGraphPatchOperationSchema = {
260
- type: type$4,
261
- additionalProperties: additionalProperties$3,
314
+ type: type$3,
262
315
  properties: properties$3,
263
- required: required$2,
316
+ required: required$3,
317
+ additionalProperties: additionalProperties$3,
264
318
  description: description$3
265
319
  };
266
320
 
267
- var type$3 = "object";
268
- var additionalProperties$2 = false;
321
+ var type$2 = "object";
269
322
  var properties$2 = {
270
- metadata: {
271
- $ref: "https://schema.twindev.org/json-ld/JsonLdNodeObject",
272
- description: "The metadata to associate with the element as JSON-LD."
273
- },
274
323
  id: {
275
324
  type: "string",
276
325
  description: "The id of the element."
277
326
  },
278
- created: {
279
- type: "number",
280
- description: "The timestamp of when the element was created."
327
+ dateCreated: {
328
+ type: "string",
329
+ description: "The date/time of when the element was created."
330
+ },
331
+ dateModified: {
332
+ type: "string",
333
+ description: "The date/time of when the element was modified."
281
334
  },
282
- updated: {
283
- type: "number",
284
- description: "The timestamp of when the element was updated."
335
+ dateDeleted: {
336
+ type: "string",
337
+ description: "The date/time of when the element was deleted, as we never actually remove items."
338
+ },
339
+ "@context": {
340
+ anyOf: [
341
+ {
342
+ type: "string",
343
+ "const": "https://schema.twindev.org/aig/"
344
+ },
345
+ {
346
+ type: "array",
347
+ minItems: 1,
348
+ items: [
349
+ {
350
+ type: "string",
351
+ "const": "https://schema.twindev.org/aig/"
352
+ }
353
+ ],
354
+ additionalItems: {
355
+ $ref: "https://schema.twindev.org/json-ld/JsonLdContextDefinitionElement"
356
+ }
357
+ }
358
+ ],
359
+ description: "JSON-LD Context."
285
360
  },
286
- deleted: {
287
- type: "number",
288
- description: "The timestamp of when the element was deleted, as we never actually remove items."
361
+ type: {
362
+ type: "string",
363
+ "const": "AuditableItemGraphResource",
364
+ description: "JSON-LD Type."
365
+ },
366
+ resourceObject: {
367
+ $ref: "https://schema.twindev.org/json-ld/JsonLdNodeObject",
368
+ description: "The JSON-LD object for the resource."
289
369
  }
290
370
  };
291
- var required$1 = [
292
- "created",
293
- "id"
371
+ var required$2 = [
372
+ "@context",
373
+ "type"
294
374
  ];
375
+ var additionalProperties$2 = false;
295
376
  var description$2 = "Interface describing an auditable item graph vertex resource.";
296
377
  var AuditableItemGraphResourceSchema = {
297
- type: type$3,
298
- additionalProperties: additionalProperties$2,
378
+ type: type$2,
299
379
  properties: properties$2,
300
- required: required$1,
380
+ required: required$2,
381
+ additionalProperties: additionalProperties$2,
301
382
  description: description$2
302
383
  };
303
384
 
304
- var type$2 = "object";
385
+ var type$1 = "object";
305
386
  var properties$1 = {
306
- epoch: {
307
- type: "number",
308
- description: "The epoch of the verification."
387
+ id: {
388
+ type: "string",
389
+ description: "The id of the element."
390
+ },
391
+ dateCreated: {
392
+ type: "string",
393
+ description: "The date/time of when the element was created."
394
+ },
395
+ dateModified: {
396
+ type: "string",
397
+ description: "The date/time of when the element was modified."
398
+ },
399
+ dateDeleted: {
400
+ type: "string",
401
+ description: "The date/time of when the element was deleted, as we never actually remove items."
402
+ },
403
+ "@context": {
404
+ type: "array",
405
+ minItems: 2,
406
+ items: [
407
+ {
408
+ type: "string",
409
+ "const": "https://schema.twindev.org/aig/"
410
+ },
411
+ {
412
+ type: "string",
413
+ "const": "https://schema.twindev.org/common/"
414
+ }
415
+ ],
416
+ additionalItems: {
417
+ $ref: "https://schema.twindev.org/json-ld/JsonLdContextDefinitionElement"
418
+ },
419
+ description: "JSON-LD Context."
420
+ },
421
+ type: {
422
+ type: "string",
423
+ "const": "AuditableItemGraphVertex",
424
+ description: "JSON-LD Type."
309
425
  },
310
- state: {
311
- $ref: "https://schema.twindev.org/aig/AuditableItemGraphVerificationState",
312
- description: "The state of the verification."
313
- }
314
- };
315
- var required = [
316
- "epoch",
317
- "state"
318
- ];
319
- var additionalProperties$1 = {
320
- };
321
- var description$1 = "Interface describing an auditable item graph verification.";
322
- var AuditableItemGraphVerificationSchema = {
323
- type: type$2,
324
- properties: properties$1,
325
- required: required,
326
- additionalProperties: additionalProperties$1,
327
- description: description$1
328
- };
329
-
330
- var type$1 = "string";
331
- var description = "The state of the verification.";
332
- var AuditableItemGraphVerificationStateSchema = {
333
- type: type$1,
334
- "enum": [
335
- "ok",
336
- "hashMismatch",
337
- "signatureNotVerified",
338
- "credentialRevoked",
339
- "immutableHashMismatch",
340
- "immutableSignatureMismatch",
341
- "integrityDataMismatch"
342
- ],
343
- description: description
344
- };
345
-
346
- var type = "object";
347
- var properties = {
348
426
  nodeIdentity: {
349
427
  type: "string",
350
428
  description: "The identity of the node which controls the vertex."
351
429
  },
430
+ annotationObject: {
431
+ $ref: "https://schema.twindev.org/json-ld/JsonLdNodeObject",
432
+ description: "The JSON-LD annotation object for the vertex."
433
+ },
352
434
  aliases: {
353
435
  type: "array",
354
436
  items: {
@@ -377,28 +459,80 @@ var properties = {
377
459
  },
378
460
  description: "Changesets for the vertex."
379
461
  },
380
- id: {
381
- type: "string",
382
- description: "The id of the element."
462
+ verified: {
463
+ type: "boolean",
464
+ description: "Is the vertex verified, will only be populated when verification is requested."
465
+ }
466
+ };
467
+ var required$1 = [
468
+ "@context",
469
+ "id",
470
+ "type"
471
+ ];
472
+ var additionalProperties$1 = false;
473
+ var description$1 = "Interface describing an auditable item graph vertex.";
474
+ var AuditableItemGraphVertexSchema = {
475
+ type: type$1,
476
+ properties: properties$1,
477
+ required: required$1,
478
+ additionalProperties: additionalProperties$1,
479
+ description: description$1
480
+ };
481
+
482
+ var type = "object";
483
+ var properties = {
484
+ "@context": {
485
+ anyOf: [
486
+ {
487
+ type: "string",
488
+ "const": "https://schema.twindev.org/aig/"
489
+ },
490
+ {
491
+ type: "array",
492
+ minItems: 1,
493
+ items: [
494
+ {
495
+ type: "string",
496
+ "const": "https://schema.twindev.org/aig/"
497
+ }
498
+ ],
499
+ additionalItems: {
500
+ $ref: "https://schema.twindev.org/json-ld/JsonLdContextDefinitionElement"
501
+ }
502
+ }
503
+ ],
504
+ description: "JSON-LD Context."
383
505
  },
384
- created: {
385
- type: "number",
386
- description: "The timestamp of when the element was created."
506
+ type: {
507
+ type: "string",
508
+ "const": "AuditableItemGraphVertexList",
509
+ description: "JSON-LD Type."
387
510
  },
388
- updated: {
389
- type: "number",
390
- description: "The timestamp of when the element was updated."
511
+ vertices: {
512
+ type: "array",
513
+ items: {
514
+ $ref: "https://schema.twindev.org/aig/AuditableItemGraphVertex"
515
+ },
516
+ description: "The list of vertices."
391
517
  },
392
- metadata: {
393
- $ref: "https://schema.twindev.org/json-ld/JsonLdNodeObject",
394
- description: "The metadata to associate with the element as JSON-LD."
518
+ cursor: {
519
+ type: "string",
520
+ description: "The cursor to get the next chunk of vertices."
395
521
  }
396
522
  };
523
+ var required = [
524
+ "@context",
525
+ "type",
526
+ "vertices"
527
+ ];
397
528
  var additionalProperties = false;
398
- var AuditableItemGraphVertexSchema = {
529
+ var description = "Interface describing an auditable item graph vertex list.";
530
+ var AuditableItemGraphVertexListSchema = {
399
531
  type: type,
400
532
  properties: properties,
401
- additionalProperties: additionalProperties
533
+ required: required,
534
+ additionalProperties: additionalProperties,
535
+ description: description
402
536
  };
403
537
 
404
538
  // Copyright 2024 IOTA Stiftung.
@@ -441,20 +575,10 @@ class AuditableItemGraphDataTypes {
441
575
  defaultValue: {},
442
576
  jsonSchema: async () => AuditableItemGraphPatchOperationSchema
443
577
  }));
444
- dataCore.DataTypeHandlerFactory.register(AuditableItemGraphTypes.Credential, () => ({
445
- type: AuditableItemGraphTypes.Credential,
446
- defaultValue: {},
447
- jsonSchema: async () => AuditableItemGraphCredentialSchema
448
- }));
449
- dataCore.DataTypeHandlerFactory.register(AuditableItemGraphTypes.Verification, () => ({
450
- type: AuditableItemGraphTypes.Verification,
578
+ dataCore.DataTypeHandlerFactory.register(AuditableItemGraphTypes.VertexList, () => ({
579
+ type: AuditableItemGraphTypes.VertexList,
451
580
  defaultValue: {},
452
- jsonSchema: async () => AuditableItemGraphVerificationSchema
453
- }));
454
- dataCore.DataTypeHandlerFactory.register(AuditableItemGraphTypes.VerificationState, () => ({
455
- type: AuditableItemGraphTypes.VerificationState,
456
- defaultValue: {},
457
- jsonSchema: async () => AuditableItemGraphVerificationStateSchema
581
+ jsonSchema: async () => AuditableItemGraphVertexListSchema
458
582
  }));
459
583
  }
460
584
  }
@@ -462,38 +586,35 @@ class AuditableItemGraphDataTypes {
462
586
  // Copyright 2024 IOTA Stiftung.
463
587
  // SPDX-License-Identifier: Apache-2.0.
464
588
  /**
465
- * The state of the verification.
589
+ * The contexts of auditable item graph data.
466
590
  */
467
591
  // eslint-disable-next-line @typescript-eslint/naming-convention
468
- const AuditableItemGraphVerificationState = {
469
- /**
470
- * OK.
471
- */
472
- Ok: "ok",
473
- /**
474
- * The stored hash does not matched the calculated one.
475
- */
476
- HashMismatch: "hashMismatch",
592
+ const AuditableItemGraphContexts = {
477
593
  /**
478
- * The signature verification failed.
479
- */
480
- SignatureNotVerified: "signatureNotVerified",
481
- /**
482
- * The credential in the immutable storage was revoked.
594
+ * The context root for the auditable item graph types.
483
595
  */
484
- CredentialRevoked: "credentialRevoked",
596
+ ContextRoot: "https://schema.twindev.org/aig/",
485
597
  /**
486
- * Immutable hash mismatch.
598
+ * The context root for the common types.
487
599
  */
488
- ImmutableHashMismatch: "immutableHashMismatch",
600
+ ContextRootCommon: "https://schema.twindev.org/common/"
601
+ };
602
+
603
+ // Copyright 2024 IOTA Stiftung.
604
+ // SPDX-License-Identifier: Apache-2.0.
605
+ /**
606
+ * The topics for auditable item graph event bus notifications.
607
+ */
608
+ // eslint-disable-next-line @typescript-eslint/naming-convention
609
+ const AuditableItemGraphTopics = {
489
610
  /**
490
- * Immutable signature mismatch.
611
+ * A vertex was created.
491
612
  */
492
- ImmutableSignatureMismatch: "immutableSignatureMismatch",
613
+ VertexCreated: "auditable-item-graph:vertex-created",
493
614
  /**
494
- * Integrity data mismatch.
615
+ * A vertex was updated.
495
616
  */
496
- IntegrityDataMismatch: "integrityDataMismatch"
617
+ VertexUpdated: "auditable-item-graph:vertex-updated"
497
618
  };
498
619
 
499
620
  // Copyright 2024 IOTA Stiftung.
@@ -517,7 +638,8 @@ const VerifyDepth = {
517
638
  All: "all"
518
639
  };
519
640
 
641
+ exports.AuditableItemGraphContexts = AuditableItemGraphContexts;
520
642
  exports.AuditableItemGraphDataTypes = AuditableItemGraphDataTypes;
643
+ exports.AuditableItemGraphTopics = AuditableItemGraphTopics;
521
644
  exports.AuditableItemGraphTypes = AuditableItemGraphTypes;
522
- exports.AuditableItemGraphVerificationState = AuditableItemGraphVerificationState;
523
645
  exports.VerifyDepth = VerifyDepth;