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