@twin.org/auditable-item-graph-models 0.0.1-next.8 → 0.0.1-next.9
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 +55 -269
- package/dist/esm/index.mjs +56 -269
- package/dist/types/index.d.ts +0 -3
- package/dist/types/models/IAuditableItemGraphChangeset.d.ts +8 -12
- package/dist/types/models/auditableItemGraphTypes.d.ts +0 -12
- package/docs/changelog.md +1 -1
- package/docs/reference/index.md +0 -4
- package/docs/reference/interfaces/IAuditableItemGraphChangeset.md +12 -20
- package/docs/reference/variables/AuditableItemGraphTypes.md +0 -18
- package/package.json +2 -1
- package/dist/types/models/IAuditableItemGraphCredential.d.ts +0 -34
- package/dist/types/models/IAuditableItemGraphVerification.d.ts +0 -29
- package/dist/types/models/auditableItemGraphVerificationState.d.ts +0 -37
- package/docs/reference/interfaces/IAuditableItemGraphCredential.md +0 -59
- package/docs/reference/interfaces/IAuditableItemGraphVerification.md +0 -47
- package/docs/reference/type-aliases/AuditableItemGraphVerificationState.md +0 -5
- package/docs/reference/variables/AuditableItemGraphVerificationState.md +0 -49
package/dist/cjs/index.cjs
CHANGED
|
@@ -37,26 +37,14 @@ const AuditableItemGraphTypes = {
|
|
|
37
37
|
* Represents patch operation.
|
|
38
38
|
*/
|
|
39
39
|
PatchOperation: "AuditableItemGraphPatchOperation",
|
|
40
|
-
/**
|
|
41
|
-
* Represents the immutable credential payload.
|
|
42
|
-
*/
|
|
43
|
-
Credential: "AuditableItemGraphPatchCredential",
|
|
44
|
-
/**
|
|
45
|
-
* Represents auditable item stream verification.
|
|
46
|
-
*/
|
|
47
|
-
Verification: "AuditableItemGraphVerification",
|
|
48
|
-
/**
|
|
49
|
-
* Represents auditable item stream verification state.
|
|
50
|
-
*/
|
|
51
|
-
VerificationState: "AuditableItemGraphVerificationState",
|
|
52
40
|
/**
|
|
53
41
|
* Represents auditable item stream vertex list.
|
|
54
42
|
*/
|
|
55
43
|
VertexList: "AuditableItemGraphVertexList"
|
|
56
44
|
};
|
|
57
45
|
|
|
58
|
-
var type$
|
|
59
|
-
var properties$
|
|
46
|
+
var type$6 = "object";
|
|
47
|
+
var properties$6 = {
|
|
60
48
|
id: {
|
|
61
49
|
type: "string",
|
|
62
50
|
description: "The id of the element."
|
|
@@ -109,24 +97,24 @@ var properties$8 = {
|
|
|
109
97
|
description: "The format of the id in the alias."
|
|
110
98
|
}
|
|
111
99
|
};
|
|
112
|
-
var required$
|
|
100
|
+
var required$6 = [
|
|
113
101
|
"@context",
|
|
114
102
|
"dateCreated",
|
|
115
103
|
"id",
|
|
116
104
|
"type"
|
|
117
105
|
];
|
|
118
|
-
var additionalProperties$
|
|
119
|
-
var description$
|
|
106
|
+
var additionalProperties$6 = false;
|
|
107
|
+
var description$6 = "Interface describing an alias for a vertex.";
|
|
120
108
|
var AuditableItemGraphAliasSchema = {
|
|
121
|
-
type: type$
|
|
122
|
-
properties: properties$
|
|
123
|
-
required: required$
|
|
124
|
-
additionalProperties: additionalProperties$
|
|
125
|
-
description: description$
|
|
109
|
+
type: type$6,
|
|
110
|
+
properties: properties$6,
|
|
111
|
+
required: required$6,
|
|
112
|
+
additionalProperties: additionalProperties$6,
|
|
113
|
+
description: description$6
|
|
126
114
|
};
|
|
127
115
|
|
|
128
|
-
var type$
|
|
129
|
-
var properties$
|
|
116
|
+
var type$5 = "object";
|
|
117
|
+
var properties$5 = {
|
|
130
118
|
"@context": {
|
|
131
119
|
anyOf: [
|
|
132
120
|
{
|
|
@@ -154,6 +142,10 @@ var properties$7 = {
|
|
|
154
142
|
"const": "AuditableItemGraphChangeset",
|
|
155
143
|
description: "JSON-LD Type."
|
|
156
144
|
},
|
|
145
|
+
id: {
|
|
146
|
+
type: "string",
|
|
147
|
+
description: "The id of the changeset."
|
|
148
|
+
},
|
|
157
149
|
dateCreated: {
|
|
158
150
|
type: "string",
|
|
159
151
|
description: "The date/time of when the changeset was created."
|
|
@@ -169,112 +161,35 @@ var properties$7 = {
|
|
|
169
161
|
},
|
|
170
162
|
description: "The patches in the changeset."
|
|
171
163
|
},
|
|
172
|
-
|
|
164
|
+
proofId: {
|
|
173
165
|
type: "string",
|
|
174
|
-
description: "The
|
|
175
|
-
},
|
|
176
|
-
signature: {
|
|
177
|
-
type: "string",
|
|
178
|
-
description: "The signature for the changeset."
|
|
179
|
-
},
|
|
180
|
-
immutableStorageId: {
|
|
181
|
-
type: "string",
|
|
182
|
-
description: "The immutable storage id containing the signature for the changeset."
|
|
166
|
+
description: "The immutable proof id which contains the signature for this changeset."
|
|
183
167
|
},
|
|
184
168
|
verification: {
|
|
185
|
-
$ref: "https://schema.twindev.org/
|
|
169
|
+
$ref: "https://schema.twindev.org/immutable-proof/ImmutableProofVerification",
|
|
186
170
|
description: "The verification for the changeset."
|
|
187
171
|
}
|
|
188
172
|
};
|
|
189
|
-
var required$
|
|
173
|
+
var required$5 = [
|
|
190
174
|
"@context",
|
|
191
175
|
"type",
|
|
176
|
+
"id",
|
|
192
177
|
"dateCreated",
|
|
193
178
|
"userIdentity",
|
|
194
|
-
"patches"
|
|
195
|
-
"hash",
|
|
196
|
-
"signature"
|
|
179
|
+
"patches"
|
|
197
180
|
];
|
|
198
|
-
var additionalProperties$
|
|
199
|
-
var description$
|
|
181
|
+
var additionalProperties$5 = false;
|
|
182
|
+
var description$5 = "Interface describing a set of updates to the vertex.";
|
|
200
183
|
var AuditableItemGraphChangesetSchema = {
|
|
201
|
-
type: type$
|
|
202
|
-
properties: properties$
|
|
203
|
-
required: required$
|
|
204
|
-
additionalProperties: additionalProperties$
|
|
205
|
-
description: description$
|
|
206
|
-
};
|
|
207
|
-
|
|
208
|
-
var type$7 = "object";
|
|
209
|
-
var properties$6 = {
|
|
210
|
-
"@context": {
|
|
211
|
-
anyOf: [
|
|
212
|
-
{
|
|
213
|
-
type: "string",
|
|
214
|
-
"const": "https://schema.twindev.org/aig/"
|
|
215
|
-
},
|
|
216
|
-
{
|
|
217
|
-
type: "array",
|
|
218
|
-
minItems: 1,
|
|
219
|
-
items: [
|
|
220
|
-
{
|
|
221
|
-
type: "string",
|
|
222
|
-
"const": "https://schema.twindev.org/aig/"
|
|
223
|
-
}
|
|
224
|
-
],
|
|
225
|
-
additionalItems: {
|
|
226
|
-
type: "string"
|
|
227
|
-
}
|
|
228
|
-
}
|
|
229
|
-
],
|
|
230
|
-
description: "JSON-LD Context."
|
|
231
|
-
},
|
|
232
|
-
type: {
|
|
233
|
-
type: "string",
|
|
234
|
-
"const": "AuditableItemGraphPatchCredential",
|
|
235
|
-
description: "JSON-LD Type."
|
|
236
|
-
},
|
|
237
|
-
dateCreated: {
|
|
238
|
-
type: "string",
|
|
239
|
-
description: "The date/time of when the changeset was created."
|
|
240
|
-
},
|
|
241
|
-
userIdentity: {
|
|
242
|
-
type: "string",
|
|
243
|
-
description: "The user identity that created the changes."
|
|
244
|
-
},
|
|
245
|
-
signature: {
|
|
246
|
-
type: "string",
|
|
247
|
-
description: "The signature for the changeset."
|
|
248
|
-
},
|
|
249
|
-
hash: {
|
|
250
|
-
type: "string",
|
|
251
|
-
description: "The signature for the changeset."
|
|
252
|
-
},
|
|
253
|
-
integrity: {
|
|
254
|
-
type: "string",
|
|
255
|
-
description: "The integrity data for this changeset, encrypted."
|
|
256
|
-
}
|
|
257
|
-
};
|
|
258
|
-
var required$6 = [
|
|
259
|
-
"@context",
|
|
260
|
-
"type",
|
|
261
|
-
"dateCreated",
|
|
262
|
-
"userIdentity",
|
|
263
|
-
"signature",
|
|
264
|
-
"hash"
|
|
265
|
-
];
|
|
266
|
-
var additionalProperties$6 = false;
|
|
267
|
-
var description$7 = "The data stored immutably for the graph in a verifiable credential.";
|
|
268
|
-
var AuditableItemGraphCredentialSchema = {
|
|
269
|
-
type: type$7,
|
|
270
|
-
properties: properties$6,
|
|
271
|
-
required: required$6,
|
|
272
|
-
additionalProperties: additionalProperties$6,
|
|
273
|
-
description: description$7
|
|
184
|
+
type: type$5,
|
|
185
|
+
properties: properties$5,
|
|
186
|
+
required: required$5,
|
|
187
|
+
additionalProperties: additionalProperties$5,
|
|
188
|
+
description: description$5
|
|
274
189
|
};
|
|
275
190
|
|
|
276
|
-
var type$
|
|
277
|
-
var properties$
|
|
191
|
+
var type$4 = "object";
|
|
192
|
+
var properties$4 = {
|
|
278
193
|
id: {
|
|
279
194
|
type: "string",
|
|
280
195
|
description: "The id of the element."
|
|
@@ -327,25 +242,25 @@ var properties$5 = {
|
|
|
327
242
|
description: "The relationship between the two vertices."
|
|
328
243
|
}
|
|
329
244
|
};
|
|
330
|
-
var required$
|
|
245
|
+
var required$4 = [
|
|
331
246
|
"@context",
|
|
332
247
|
"dateCreated",
|
|
333
248
|
"edgeRelationship",
|
|
334
249
|
"id",
|
|
335
250
|
"type"
|
|
336
251
|
];
|
|
337
|
-
var additionalProperties$
|
|
338
|
-
var description$
|
|
252
|
+
var additionalProperties$4 = false;
|
|
253
|
+
var description$4 = "Interface describing an edge between two vertices in an auditable item graph.";
|
|
339
254
|
var AuditableItemGraphEdgeSchema = {
|
|
340
|
-
type: type$
|
|
341
|
-
properties: properties$
|
|
342
|
-
required: required$
|
|
343
|
-
additionalProperties: additionalProperties$
|
|
344
|
-
description: description$
|
|
255
|
+
type: type$4,
|
|
256
|
+
properties: properties$4,
|
|
257
|
+
required: required$4,
|
|
258
|
+
additionalProperties: additionalProperties$4,
|
|
259
|
+
description: description$4
|
|
345
260
|
};
|
|
346
261
|
|
|
347
|
-
var type$
|
|
348
|
-
var properties$
|
|
262
|
+
var type$3 = "object";
|
|
263
|
+
var properties$3 = {
|
|
349
264
|
"@context": {
|
|
350
265
|
anyOf: [
|
|
351
266
|
{
|
|
@@ -397,24 +312,24 @@ var properties$4 = {
|
|
|
397
312
|
description: "The value to add."
|
|
398
313
|
}
|
|
399
314
|
};
|
|
400
|
-
var required$
|
|
315
|
+
var required$3 = [
|
|
401
316
|
"@context",
|
|
402
317
|
"type",
|
|
403
318
|
"patchOperation",
|
|
404
319
|
"patchPath"
|
|
405
320
|
];
|
|
406
|
-
var additionalProperties$
|
|
407
|
-
var description$
|
|
321
|
+
var additionalProperties$3 = false;
|
|
322
|
+
var description$3 = "The patch operation for JSON diffs.";
|
|
408
323
|
var AuditableItemGraphPatchOperationSchema = {
|
|
409
|
-
type: type$
|
|
410
|
-
properties: properties$
|
|
411
|
-
required: required$
|
|
412
|
-
additionalProperties: additionalProperties$
|
|
413
|
-
description: description$
|
|
324
|
+
type: type$3,
|
|
325
|
+
properties: properties$3,
|
|
326
|
+
required: required$3,
|
|
327
|
+
additionalProperties: additionalProperties$3,
|
|
328
|
+
description: description$3
|
|
414
329
|
};
|
|
415
330
|
|
|
416
|
-
var type$
|
|
417
|
-
var properties$
|
|
331
|
+
var type$2 = "object";
|
|
332
|
+
var properties$2 = {
|
|
418
333
|
id: {
|
|
419
334
|
type: "string",
|
|
420
335
|
description: "The id of the element."
|
|
@@ -463,95 +378,19 @@ var properties$3 = {
|
|
|
463
378
|
description: "The JSON-LD object for the resource."
|
|
464
379
|
}
|
|
465
380
|
};
|
|
466
|
-
var required$
|
|
381
|
+
var required$2 = [
|
|
467
382
|
"@context",
|
|
468
383
|
"dateCreated",
|
|
469
384
|
"id",
|
|
470
385
|
"type"
|
|
471
386
|
];
|
|
472
|
-
var additionalProperties$3 = false;
|
|
473
|
-
var description$4 = "Interface describing an auditable item graph vertex resource.";
|
|
474
|
-
var AuditableItemGraphResourceSchema = {
|
|
475
|
-
type: type$4,
|
|
476
|
-
properties: properties$3,
|
|
477
|
-
required: required$3,
|
|
478
|
-
additionalProperties: additionalProperties$3,
|
|
479
|
-
description: description$4
|
|
480
|
-
};
|
|
481
|
-
|
|
482
|
-
var type$3 = "object";
|
|
483
|
-
var properties$2 = {
|
|
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
|
-
type: "string"
|
|
501
|
-
}
|
|
502
|
-
}
|
|
503
|
-
],
|
|
504
|
-
description: "JSON-LD Context."
|
|
505
|
-
},
|
|
506
|
-
type: {
|
|
507
|
-
type: "string",
|
|
508
|
-
"const": "AuditableItemGraphVerification",
|
|
509
|
-
description: "JSON-LD Type."
|
|
510
|
-
},
|
|
511
|
-
dateCreated: {
|
|
512
|
-
type: "string",
|
|
513
|
-
description: "The date/time of the verification."
|
|
514
|
-
},
|
|
515
|
-
state: {
|
|
516
|
-
$ref: "https://schema.twindev.org/aig/AuditableItemGraphVerificationState",
|
|
517
|
-
description: "The state of the verification."
|
|
518
|
-
},
|
|
519
|
-
stateProperties: {
|
|
520
|
-
type: "object",
|
|
521
|
-
additionalProperties: {
|
|
522
|
-
},
|
|
523
|
-
description: "The state properties."
|
|
524
|
-
}
|
|
525
|
-
};
|
|
526
|
-
var required$2 = [
|
|
527
|
-
"@context",
|
|
528
|
-
"type",
|
|
529
|
-
"dateCreated",
|
|
530
|
-
"state"
|
|
531
|
-
];
|
|
532
387
|
var additionalProperties$2 = false;
|
|
533
|
-
var description$
|
|
534
|
-
var
|
|
535
|
-
type: type$
|
|
388
|
+
var description$2 = "Interface describing an auditable item graph vertex resource.";
|
|
389
|
+
var AuditableItemGraphResourceSchema = {
|
|
390
|
+
type: type$2,
|
|
536
391
|
properties: properties$2,
|
|
537
392
|
required: required$2,
|
|
538
393
|
additionalProperties: additionalProperties$2,
|
|
539
|
-
description: description$3
|
|
540
|
-
};
|
|
541
|
-
|
|
542
|
-
var type$2 = "string";
|
|
543
|
-
var description$2 = "The state of the verification.";
|
|
544
|
-
var AuditableItemGraphVerificationStateSchema = {
|
|
545
|
-
type: type$2,
|
|
546
|
-
"enum": [
|
|
547
|
-
"ok",
|
|
548
|
-
"hashMismatch",
|
|
549
|
-
"signatureNotVerified",
|
|
550
|
-
"credentialRevoked",
|
|
551
|
-
"immutableHashMismatch",
|
|
552
|
-
"immutableSignatureMismatch",
|
|
553
|
-
"integrityDataMismatch"
|
|
554
|
-
],
|
|
555
394
|
description: description$2
|
|
556
395
|
};
|
|
557
396
|
|
|
@@ -753,66 +592,14 @@ class AuditableItemGraphDataTypes {
|
|
|
753
592
|
defaultValue: {},
|
|
754
593
|
jsonSchema: async () => AuditableItemGraphPatchOperationSchema
|
|
755
594
|
}));
|
|
756
|
-
dataCore.DataTypeHandlerFactory.register(AuditableItemGraphTypes.Credential, () => ({
|
|
757
|
-
type: AuditableItemGraphTypes.Credential,
|
|
758
|
-
defaultValue: {},
|
|
759
|
-
jsonSchema: async () => AuditableItemGraphCredentialSchema
|
|
760
|
-
}));
|
|
761
|
-
dataCore.DataTypeHandlerFactory.register(AuditableItemGraphTypes.Verification, () => ({
|
|
762
|
-
type: AuditableItemGraphTypes.Verification,
|
|
763
|
-
defaultValue: {},
|
|
764
|
-
jsonSchema: async () => AuditableItemGraphVerificationSchema
|
|
765
|
-
}));
|
|
766
595
|
dataCore.DataTypeHandlerFactory.register(AuditableItemGraphTypes.VertexList, () => ({
|
|
767
596
|
type: AuditableItemGraphTypes.VertexList,
|
|
768
597
|
defaultValue: {},
|
|
769
598
|
jsonSchema: async () => AuditableItemGraphVertexListSchema
|
|
770
599
|
}));
|
|
771
|
-
dataCore.DataTypeHandlerFactory.register(AuditableItemGraphTypes.VerificationState, () => ({
|
|
772
|
-
type: AuditableItemGraphTypes.VerificationState,
|
|
773
|
-
defaultValue: {},
|
|
774
|
-
jsonSchema: async () => AuditableItemGraphVerificationStateSchema
|
|
775
|
-
}));
|
|
776
600
|
}
|
|
777
601
|
}
|
|
778
602
|
|
|
779
|
-
// Copyright 2024 IOTA Stiftung.
|
|
780
|
-
// SPDX-License-Identifier: Apache-2.0.
|
|
781
|
-
/**
|
|
782
|
-
* The state of the verification.
|
|
783
|
-
*/
|
|
784
|
-
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
785
|
-
const AuditableItemGraphVerificationState = {
|
|
786
|
-
/**
|
|
787
|
-
* OK.
|
|
788
|
-
*/
|
|
789
|
-
Ok: "ok",
|
|
790
|
-
/**
|
|
791
|
-
* The stored hash does not matched the calculated one.
|
|
792
|
-
*/
|
|
793
|
-
HashMismatch: "hashMismatch",
|
|
794
|
-
/**
|
|
795
|
-
* The signature verification failed.
|
|
796
|
-
*/
|
|
797
|
-
SignatureNotVerified: "signatureNotVerified",
|
|
798
|
-
/**
|
|
799
|
-
* The credential in the immutable storage was revoked.
|
|
800
|
-
*/
|
|
801
|
-
CredentialRevoked: "credentialRevoked",
|
|
802
|
-
/**
|
|
803
|
-
* Immutable hash mismatch.
|
|
804
|
-
*/
|
|
805
|
-
ImmutableHashMismatch: "immutableHashMismatch",
|
|
806
|
-
/**
|
|
807
|
-
* Immutable signature mismatch.
|
|
808
|
-
*/
|
|
809
|
-
ImmutableSignatureMismatch: "immutableSignatureMismatch",
|
|
810
|
-
/**
|
|
811
|
-
* Integrity data mismatch.
|
|
812
|
-
*/
|
|
813
|
-
IntegrityDataMismatch: "integrityDataMismatch"
|
|
814
|
-
};
|
|
815
|
-
|
|
816
603
|
// Copyright 2024 IOTA Stiftung.
|
|
817
604
|
// SPDX-License-Identifier: Apache-2.0.
|
|
818
605
|
/**
|
|
@@ -836,5 +623,4 @@ const VerifyDepth = {
|
|
|
836
623
|
|
|
837
624
|
exports.AuditableItemGraphDataTypes = AuditableItemGraphDataTypes;
|
|
838
625
|
exports.AuditableItemGraphTypes = AuditableItemGraphTypes;
|
|
839
|
-
exports.AuditableItemGraphVerificationState = AuditableItemGraphVerificationState;
|
|
840
626
|
exports.VerifyDepth = VerifyDepth;
|
package/dist/esm/index.mjs
CHANGED
|
@@ -35,26 +35,14 @@ const AuditableItemGraphTypes = {
|
|
|
35
35
|
* Represents patch operation.
|
|
36
36
|
*/
|
|
37
37
|
PatchOperation: "AuditableItemGraphPatchOperation",
|
|
38
|
-
/**
|
|
39
|
-
* Represents the immutable credential payload.
|
|
40
|
-
*/
|
|
41
|
-
Credential: "AuditableItemGraphPatchCredential",
|
|
42
|
-
/**
|
|
43
|
-
* Represents auditable item stream verification.
|
|
44
|
-
*/
|
|
45
|
-
Verification: "AuditableItemGraphVerification",
|
|
46
|
-
/**
|
|
47
|
-
* Represents auditable item stream verification state.
|
|
48
|
-
*/
|
|
49
|
-
VerificationState: "AuditableItemGraphVerificationState",
|
|
50
38
|
/**
|
|
51
39
|
* Represents auditable item stream vertex list.
|
|
52
40
|
*/
|
|
53
41
|
VertexList: "AuditableItemGraphVertexList"
|
|
54
42
|
};
|
|
55
43
|
|
|
56
|
-
var type$
|
|
57
|
-
var properties$
|
|
44
|
+
var type$6 = "object";
|
|
45
|
+
var properties$6 = {
|
|
58
46
|
id: {
|
|
59
47
|
type: "string",
|
|
60
48
|
description: "The id of the element."
|
|
@@ -107,24 +95,24 @@ var properties$8 = {
|
|
|
107
95
|
description: "The format of the id in the alias."
|
|
108
96
|
}
|
|
109
97
|
};
|
|
110
|
-
var required$
|
|
98
|
+
var required$6 = [
|
|
111
99
|
"@context",
|
|
112
100
|
"dateCreated",
|
|
113
101
|
"id",
|
|
114
102
|
"type"
|
|
115
103
|
];
|
|
116
|
-
var additionalProperties$
|
|
117
|
-
var description$
|
|
104
|
+
var additionalProperties$6 = false;
|
|
105
|
+
var description$6 = "Interface describing an alias for a vertex.";
|
|
118
106
|
var AuditableItemGraphAliasSchema = {
|
|
119
|
-
type: type$
|
|
120
|
-
properties: properties$
|
|
121
|
-
required: required$
|
|
122
|
-
additionalProperties: additionalProperties$
|
|
123
|
-
description: description$
|
|
107
|
+
type: type$6,
|
|
108
|
+
properties: properties$6,
|
|
109
|
+
required: required$6,
|
|
110
|
+
additionalProperties: additionalProperties$6,
|
|
111
|
+
description: description$6
|
|
124
112
|
};
|
|
125
113
|
|
|
126
|
-
var type$
|
|
127
|
-
var properties$
|
|
114
|
+
var type$5 = "object";
|
|
115
|
+
var properties$5 = {
|
|
128
116
|
"@context": {
|
|
129
117
|
anyOf: [
|
|
130
118
|
{
|
|
@@ -152,6 +140,10 @@ var properties$7 = {
|
|
|
152
140
|
"const": "AuditableItemGraphChangeset",
|
|
153
141
|
description: "JSON-LD Type."
|
|
154
142
|
},
|
|
143
|
+
id: {
|
|
144
|
+
type: "string",
|
|
145
|
+
description: "The id of the changeset."
|
|
146
|
+
},
|
|
155
147
|
dateCreated: {
|
|
156
148
|
type: "string",
|
|
157
149
|
description: "The date/time of when the changeset was created."
|
|
@@ -167,112 +159,35 @@ var properties$7 = {
|
|
|
167
159
|
},
|
|
168
160
|
description: "The patches in the changeset."
|
|
169
161
|
},
|
|
170
|
-
|
|
162
|
+
proofId: {
|
|
171
163
|
type: "string",
|
|
172
|
-
description: "The
|
|
173
|
-
},
|
|
174
|
-
signature: {
|
|
175
|
-
type: "string",
|
|
176
|
-
description: "The signature for the changeset."
|
|
177
|
-
},
|
|
178
|
-
immutableStorageId: {
|
|
179
|
-
type: "string",
|
|
180
|
-
description: "The immutable storage id containing the signature for the changeset."
|
|
164
|
+
description: "The immutable proof id which contains the signature for this changeset."
|
|
181
165
|
},
|
|
182
166
|
verification: {
|
|
183
|
-
$ref: "https://schema.twindev.org/
|
|
167
|
+
$ref: "https://schema.twindev.org/immutable-proof/ImmutableProofVerification",
|
|
184
168
|
description: "The verification for the changeset."
|
|
185
169
|
}
|
|
186
170
|
};
|
|
187
|
-
var required$
|
|
171
|
+
var required$5 = [
|
|
188
172
|
"@context",
|
|
189
173
|
"type",
|
|
174
|
+
"id",
|
|
190
175
|
"dateCreated",
|
|
191
176
|
"userIdentity",
|
|
192
|
-
"patches"
|
|
193
|
-
"hash",
|
|
194
|
-
"signature"
|
|
177
|
+
"patches"
|
|
195
178
|
];
|
|
196
|
-
var additionalProperties$
|
|
197
|
-
var description$
|
|
179
|
+
var additionalProperties$5 = false;
|
|
180
|
+
var description$5 = "Interface describing a set of updates to the vertex.";
|
|
198
181
|
var AuditableItemGraphChangesetSchema = {
|
|
199
|
-
type: type$
|
|
200
|
-
properties: properties$
|
|
201
|
-
required: required$
|
|
202
|
-
additionalProperties: additionalProperties$
|
|
203
|
-
description: description$
|
|
204
|
-
};
|
|
205
|
-
|
|
206
|
-
var type$7 = "object";
|
|
207
|
-
var properties$6 = {
|
|
208
|
-
"@context": {
|
|
209
|
-
anyOf: [
|
|
210
|
-
{
|
|
211
|
-
type: "string",
|
|
212
|
-
"const": "https://schema.twindev.org/aig/"
|
|
213
|
-
},
|
|
214
|
-
{
|
|
215
|
-
type: "array",
|
|
216
|
-
minItems: 1,
|
|
217
|
-
items: [
|
|
218
|
-
{
|
|
219
|
-
type: "string",
|
|
220
|
-
"const": "https://schema.twindev.org/aig/"
|
|
221
|
-
}
|
|
222
|
-
],
|
|
223
|
-
additionalItems: {
|
|
224
|
-
type: "string"
|
|
225
|
-
}
|
|
226
|
-
}
|
|
227
|
-
],
|
|
228
|
-
description: "JSON-LD Context."
|
|
229
|
-
},
|
|
230
|
-
type: {
|
|
231
|
-
type: "string",
|
|
232
|
-
"const": "AuditableItemGraphPatchCredential",
|
|
233
|
-
description: "JSON-LD Type."
|
|
234
|
-
},
|
|
235
|
-
dateCreated: {
|
|
236
|
-
type: "string",
|
|
237
|
-
description: "The date/time of when the changeset was created."
|
|
238
|
-
},
|
|
239
|
-
userIdentity: {
|
|
240
|
-
type: "string",
|
|
241
|
-
description: "The user identity that created the changes."
|
|
242
|
-
},
|
|
243
|
-
signature: {
|
|
244
|
-
type: "string",
|
|
245
|
-
description: "The signature for the changeset."
|
|
246
|
-
},
|
|
247
|
-
hash: {
|
|
248
|
-
type: "string",
|
|
249
|
-
description: "The signature for the changeset."
|
|
250
|
-
},
|
|
251
|
-
integrity: {
|
|
252
|
-
type: "string",
|
|
253
|
-
description: "The integrity data for this changeset, encrypted."
|
|
254
|
-
}
|
|
255
|
-
};
|
|
256
|
-
var required$6 = [
|
|
257
|
-
"@context",
|
|
258
|
-
"type",
|
|
259
|
-
"dateCreated",
|
|
260
|
-
"userIdentity",
|
|
261
|
-
"signature",
|
|
262
|
-
"hash"
|
|
263
|
-
];
|
|
264
|
-
var additionalProperties$6 = false;
|
|
265
|
-
var description$7 = "The data stored immutably for the graph in a verifiable credential.";
|
|
266
|
-
var AuditableItemGraphCredentialSchema = {
|
|
267
|
-
type: type$7,
|
|
268
|
-
properties: properties$6,
|
|
269
|
-
required: required$6,
|
|
270
|
-
additionalProperties: additionalProperties$6,
|
|
271
|
-
description: description$7
|
|
182
|
+
type: type$5,
|
|
183
|
+
properties: properties$5,
|
|
184
|
+
required: required$5,
|
|
185
|
+
additionalProperties: additionalProperties$5,
|
|
186
|
+
description: description$5
|
|
272
187
|
};
|
|
273
188
|
|
|
274
|
-
var type$
|
|
275
|
-
var properties$
|
|
189
|
+
var type$4 = "object";
|
|
190
|
+
var properties$4 = {
|
|
276
191
|
id: {
|
|
277
192
|
type: "string",
|
|
278
193
|
description: "The id of the element."
|
|
@@ -325,25 +240,25 @@ var properties$5 = {
|
|
|
325
240
|
description: "The relationship between the two vertices."
|
|
326
241
|
}
|
|
327
242
|
};
|
|
328
|
-
var required$
|
|
243
|
+
var required$4 = [
|
|
329
244
|
"@context",
|
|
330
245
|
"dateCreated",
|
|
331
246
|
"edgeRelationship",
|
|
332
247
|
"id",
|
|
333
248
|
"type"
|
|
334
249
|
];
|
|
335
|
-
var additionalProperties$
|
|
336
|
-
var description$
|
|
250
|
+
var additionalProperties$4 = false;
|
|
251
|
+
var description$4 = "Interface describing an edge between two vertices in an auditable item graph.";
|
|
337
252
|
var AuditableItemGraphEdgeSchema = {
|
|
338
|
-
type: type$
|
|
339
|
-
properties: properties$
|
|
340
|
-
required: required$
|
|
341
|
-
additionalProperties: additionalProperties$
|
|
342
|
-
description: description$
|
|
253
|
+
type: type$4,
|
|
254
|
+
properties: properties$4,
|
|
255
|
+
required: required$4,
|
|
256
|
+
additionalProperties: additionalProperties$4,
|
|
257
|
+
description: description$4
|
|
343
258
|
};
|
|
344
259
|
|
|
345
|
-
var type$
|
|
346
|
-
var properties$
|
|
260
|
+
var type$3 = "object";
|
|
261
|
+
var properties$3 = {
|
|
347
262
|
"@context": {
|
|
348
263
|
anyOf: [
|
|
349
264
|
{
|
|
@@ -395,24 +310,24 @@ var properties$4 = {
|
|
|
395
310
|
description: "The value to add."
|
|
396
311
|
}
|
|
397
312
|
};
|
|
398
|
-
var required$
|
|
313
|
+
var required$3 = [
|
|
399
314
|
"@context",
|
|
400
315
|
"type",
|
|
401
316
|
"patchOperation",
|
|
402
317
|
"patchPath"
|
|
403
318
|
];
|
|
404
|
-
var additionalProperties$
|
|
405
|
-
var description$
|
|
319
|
+
var additionalProperties$3 = false;
|
|
320
|
+
var description$3 = "The patch operation for JSON diffs.";
|
|
406
321
|
var AuditableItemGraphPatchOperationSchema = {
|
|
407
|
-
type: type$
|
|
408
|
-
properties: properties$
|
|
409
|
-
required: required$
|
|
410
|
-
additionalProperties: additionalProperties$
|
|
411
|
-
description: description$
|
|
322
|
+
type: type$3,
|
|
323
|
+
properties: properties$3,
|
|
324
|
+
required: required$3,
|
|
325
|
+
additionalProperties: additionalProperties$3,
|
|
326
|
+
description: description$3
|
|
412
327
|
};
|
|
413
328
|
|
|
414
|
-
var type$
|
|
415
|
-
var properties$
|
|
329
|
+
var type$2 = "object";
|
|
330
|
+
var properties$2 = {
|
|
416
331
|
id: {
|
|
417
332
|
type: "string",
|
|
418
333
|
description: "The id of the element."
|
|
@@ -461,95 +376,19 @@ var properties$3 = {
|
|
|
461
376
|
description: "The JSON-LD object for the resource."
|
|
462
377
|
}
|
|
463
378
|
};
|
|
464
|
-
var required$
|
|
379
|
+
var required$2 = [
|
|
465
380
|
"@context",
|
|
466
381
|
"dateCreated",
|
|
467
382
|
"id",
|
|
468
383
|
"type"
|
|
469
384
|
];
|
|
470
|
-
var additionalProperties$3 = false;
|
|
471
|
-
var description$4 = "Interface describing an auditable item graph vertex resource.";
|
|
472
|
-
var AuditableItemGraphResourceSchema = {
|
|
473
|
-
type: type$4,
|
|
474
|
-
properties: properties$3,
|
|
475
|
-
required: required$3,
|
|
476
|
-
additionalProperties: additionalProperties$3,
|
|
477
|
-
description: description$4
|
|
478
|
-
};
|
|
479
|
-
|
|
480
|
-
var type$3 = "object";
|
|
481
|
-
var properties$2 = {
|
|
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
|
-
type: "string"
|
|
499
|
-
}
|
|
500
|
-
}
|
|
501
|
-
],
|
|
502
|
-
description: "JSON-LD Context."
|
|
503
|
-
},
|
|
504
|
-
type: {
|
|
505
|
-
type: "string",
|
|
506
|
-
"const": "AuditableItemGraphVerification",
|
|
507
|
-
description: "JSON-LD Type."
|
|
508
|
-
},
|
|
509
|
-
dateCreated: {
|
|
510
|
-
type: "string",
|
|
511
|
-
description: "The date/time of the verification."
|
|
512
|
-
},
|
|
513
|
-
state: {
|
|
514
|
-
$ref: "https://schema.twindev.org/aig/AuditableItemGraphVerificationState",
|
|
515
|
-
description: "The state of the verification."
|
|
516
|
-
},
|
|
517
|
-
stateProperties: {
|
|
518
|
-
type: "object",
|
|
519
|
-
additionalProperties: {
|
|
520
|
-
},
|
|
521
|
-
description: "The state properties."
|
|
522
|
-
}
|
|
523
|
-
};
|
|
524
|
-
var required$2 = [
|
|
525
|
-
"@context",
|
|
526
|
-
"type",
|
|
527
|
-
"dateCreated",
|
|
528
|
-
"state"
|
|
529
|
-
];
|
|
530
385
|
var additionalProperties$2 = false;
|
|
531
|
-
var description$
|
|
532
|
-
var
|
|
533
|
-
type: type$
|
|
386
|
+
var description$2 = "Interface describing an auditable item graph vertex resource.";
|
|
387
|
+
var AuditableItemGraphResourceSchema = {
|
|
388
|
+
type: type$2,
|
|
534
389
|
properties: properties$2,
|
|
535
390
|
required: required$2,
|
|
536
391
|
additionalProperties: additionalProperties$2,
|
|
537
|
-
description: description$3
|
|
538
|
-
};
|
|
539
|
-
|
|
540
|
-
var type$2 = "string";
|
|
541
|
-
var description$2 = "The state of the verification.";
|
|
542
|
-
var AuditableItemGraphVerificationStateSchema = {
|
|
543
|
-
type: type$2,
|
|
544
|
-
"enum": [
|
|
545
|
-
"ok",
|
|
546
|
-
"hashMismatch",
|
|
547
|
-
"signatureNotVerified",
|
|
548
|
-
"credentialRevoked",
|
|
549
|
-
"immutableHashMismatch",
|
|
550
|
-
"immutableSignatureMismatch",
|
|
551
|
-
"integrityDataMismatch"
|
|
552
|
-
],
|
|
553
392
|
description: description$2
|
|
554
393
|
};
|
|
555
394
|
|
|
@@ -751,66 +590,14 @@ class AuditableItemGraphDataTypes {
|
|
|
751
590
|
defaultValue: {},
|
|
752
591
|
jsonSchema: async () => AuditableItemGraphPatchOperationSchema
|
|
753
592
|
}));
|
|
754
|
-
DataTypeHandlerFactory.register(AuditableItemGraphTypes.Credential, () => ({
|
|
755
|
-
type: AuditableItemGraphTypes.Credential,
|
|
756
|
-
defaultValue: {},
|
|
757
|
-
jsonSchema: async () => AuditableItemGraphCredentialSchema
|
|
758
|
-
}));
|
|
759
|
-
DataTypeHandlerFactory.register(AuditableItemGraphTypes.Verification, () => ({
|
|
760
|
-
type: AuditableItemGraphTypes.Verification,
|
|
761
|
-
defaultValue: {},
|
|
762
|
-
jsonSchema: async () => AuditableItemGraphVerificationSchema
|
|
763
|
-
}));
|
|
764
593
|
DataTypeHandlerFactory.register(AuditableItemGraphTypes.VertexList, () => ({
|
|
765
594
|
type: AuditableItemGraphTypes.VertexList,
|
|
766
595
|
defaultValue: {},
|
|
767
596
|
jsonSchema: async () => AuditableItemGraphVertexListSchema
|
|
768
597
|
}));
|
|
769
|
-
DataTypeHandlerFactory.register(AuditableItemGraphTypes.VerificationState, () => ({
|
|
770
|
-
type: AuditableItemGraphTypes.VerificationState,
|
|
771
|
-
defaultValue: {},
|
|
772
|
-
jsonSchema: async () => AuditableItemGraphVerificationStateSchema
|
|
773
|
-
}));
|
|
774
598
|
}
|
|
775
599
|
}
|
|
776
600
|
|
|
777
|
-
// Copyright 2024 IOTA Stiftung.
|
|
778
|
-
// SPDX-License-Identifier: Apache-2.0.
|
|
779
|
-
/**
|
|
780
|
-
* The state of the verification.
|
|
781
|
-
*/
|
|
782
|
-
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
783
|
-
const AuditableItemGraphVerificationState = {
|
|
784
|
-
/**
|
|
785
|
-
* OK.
|
|
786
|
-
*/
|
|
787
|
-
Ok: "ok",
|
|
788
|
-
/**
|
|
789
|
-
* The stored hash does not matched the calculated one.
|
|
790
|
-
*/
|
|
791
|
-
HashMismatch: "hashMismatch",
|
|
792
|
-
/**
|
|
793
|
-
* The signature verification failed.
|
|
794
|
-
*/
|
|
795
|
-
SignatureNotVerified: "signatureNotVerified",
|
|
796
|
-
/**
|
|
797
|
-
* The credential in the immutable storage was revoked.
|
|
798
|
-
*/
|
|
799
|
-
CredentialRevoked: "credentialRevoked",
|
|
800
|
-
/**
|
|
801
|
-
* Immutable hash mismatch.
|
|
802
|
-
*/
|
|
803
|
-
ImmutableHashMismatch: "immutableHashMismatch",
|
|
804
|
-
/**
|
|
805
|
-
* Immutable signature mismatch.
|
|
806
|
-
*/
|
|
807
|
-
ImmutableSignatureMismatch: "immutableSignatureMismatch",
|
|
808
|
-
/**
|
|
809
|
-
* Integrity data mismatch.
|
|
810
|
-
*/
|
|
811
|
-
IntegrityDataMismatch: "integrityDataMismatch"
|
|
812
|
-
};
|
|
813
|
-
|
|
814
601
|
// Copyright 2024 IOTA Stiftung.
|
|
815
602
|
// SPDX-License-Identifier: Apache-2.0.
|
|
816
603
|
/**
|
|
@@ -832,4 +619,4 @@ const VerifyDepth = {
|
|
|
832
619
|
All: "all"
|
|
833
620
|
};
|
|
834
621
|
|
|
835
|
-
export { AuditableItemGraphDataTypes, AuditableItemGraphTypes,
|
|
622
|
+
export { AuditableItemGraphDataTypes, AuditableItemGraphTypes, VerifyDepth };
|
package/dist/types/index.d.ts
CHANGED
|
@@ -6,16 +6,13 @@ export * from "./models/api/IAuditableItemGraphListRequest";
|
|
|
6
6
|
export * from "./models/api/IAuditableItemGraphListResponse";
|
|
7
7
|
export * from "./models/api/IAuditableItemGraphUpdateRequest";
|
|
8
8
|
export * from "./models/auditableItemGraphTypes";
|
|
9
|
-
export * from "./models/auditableItemGraphVerificationState";
|
|
10
9
|
export * from "./models/IAuditableItemGraphAlias";
|
|
11
10
|
export * from "./models/IAuditableItemGraphAuditedElement";
|
|
12
11
|
export * from "./models/IAuditableItemGraphChangeset";
|
|
13
12
|
export * from "./models/IAuditableItemGraphComponent";
|
|
14
|
-
export * from "./models/IAuditableItemGraphCredential";
|
|
15
13
|
export * from "./models/IAuditableItemGraphEdge";
|
|
16
14
|
export * from "./models/IAuditableItemGraphPatchOperation";
|
|
17
15
|
export * from "./models/IAuditableItemGraphResource";
|
|
18
|
-
export * from "./models/IAuditableItemGraphVerification";
|
|
19
16
|
export * from "./models/IAuditableItemGraphVertex";
|
|
20
17
|
export * from "./models/IAuditableItemGraphVertexList";
|
|
21
18
|
export * from "./models/verifyDepth";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import type { IImmutableProofVerification } from "@twin.org/immutable-proof-models";
|
|
1
2
|
import type { AuditableItemGraphTypes } from "./auditableItemGraphTypes";
|
|
2
3
|
import type { IAuditableItemGraphPatchOperation } from "./IAuditableItemGraphPatchOperation";
|
|
3
|
-
import type { IAuditableItemGraphVerification } from "./IAuditableItemGraphVerification";
|
|
4
4
|
/**
|
|
5
5
|
* Interface describing a set of updates to the vertex.
|
|
6
6
|
*/
|
|
@@ -13,6 +13,10 @@ export interface IAuditableItemGraphChangeset {
|
|
|
13
13
|
* JSON-LD Type.
|
|
14
14
|
*/
|
|
15
15
|
type: typeof AuditableItemGraphTypes.Changeset;
|
|
16
|
+
/**
|
|
17
|
+
* The id of the changeset.
|
|
18
|
+
*/
|
|
19
|
+
id: string;
|
|
16
20
|
/**
|
|
17
21
|
* The date/time of when the changeset was created.
|
|
18
22
|
*/
|
|
@@ -26,19 +30,11 @@ export interface IAuditableItemGraphChangeset {
|
|
|
26
30
|
*/
|
|
27
31
|
patches: IAuditableItemGraphPatchOperation[];
|
|
28
32
|
/**
|
|
29
|
-
* The
|
|
30
|
-
*/
|
|
31
|
-
hash: string;
|
|
32
|
-
/**
|
|
33
|
-
* The signature for the changeset.
|
|
34
|
-
*/
|
|
35
|
-
signature: string;
|
|
36
|
-
/**
|
|
37
|
-
* The immutable storage id containing the signature for the changeset.
|
|
33
|
+
* The immutable proof id which contains the signature for this changeset.
|
|
38
34
|
*/
|
|
39
|
-
|
|
35
|
+
proofId?: string;
|
|
40
36
|
/**
|
|
41
37
|
* The verification for the changeset.
|
|
42
38
|
*/
|
|
43
|
-
verification?:
|
|
39
|
+
verification?: IImmutableProofVerification;
|
|
44
40
|
}
|
|
@@ -30,18 +30,6 @@ export declare const AuditableItemGraphTypes: {
|
|
|
30
30
|
* Represents patch operation.
|
|
31
31
|
*/
|
|
32
32
|
readonly PatchOperation: "AuditableItemGraphPatchOperation";
|
|
33
|
-
/**
|
|
34
|
-
* Represents the immutable credential payload.
|
|
35
|
-
*/
|
|
36
|
-
readonly Credential: "AuditableItemGraphPatchCredential";
|
|
37
|
-
/**
|
|
38
|
-
* Represents auditable item stream verification.
|
|
39
|
-
*/
|
|
40
|
-
readonly Verification: "AuditableItemGraphVerification";
|
|
41
|
-
/**
|
|
42
|
-
* Represents auditable item stream verification state.
|
|
43
|
-
*/
|
|
44
|
-
readonly VerificationState: "AuditableItemGraphVerificationState";
|
|
45
33
|
/**
|
|
46
34
|
* Represents auditable item stream vertex list.
|
|
47
35
|
*/
|
package/docs/changelog.md
CHANGED
package/docs/reference/index.md
CHANGED
|
@@ -10,11 +10,9 @@
|
|
|
10
10
|
- [IAuditableItemGraphAuditedElement](interfaces/IAuditableItemGraphAuditedElement.md)
|
|
11
11
|
- [IAuditableItemGraphChangeset](interfaces/IAuditableItemGraphChangeset.md)
|
|
12
12
|
- [IAuditableItemGraphComponent](interfaces/IAuditableItemGraphComponent.md)
|
|
13
|
-
- [IAuditableItemGraphCredential](interfaces/IAuditableItemGraphCredential.md)
|
|
14
13
|
- [IAuditableItemGraphEdge](interfaces/IAuditableItemGraphEdge.md)
|
|
15
14
|
- [IAuditableItemGraphPatchOperation](interfaces/IAuditableItemGraphPatchOperation.md)
|
|
16
15
|
- [IAuditableItemGraphResource](interfaces/IAuditableItemGraphResource.md)
|
|
17
|
-
- [IAuditableItemGraphVerification](interfaces/IAuditableItemGraphVerification.md)
|
|
18
16
|
- [IAuditableItemGraphVertex](interfaces/IAuditableItemGraphVertex.md)
|
|
19
17
|
- [IAuditableItemGraphVertexList](interfaces/IAuditableItemGraphVertexList.md)
|
|
20
18
|
- [IAuditableItemGraphCreateRequest](interfaces/IAuditableItemGraphCreateRequest.md)
|
|
@@ -27,11 +25,9 @@
|
|
|
27
25
|
## Type Aliases
|
|
28
26
|
|
|
29
27
|
- [AuditableItemGraphTypes](type-aliases/AuditableItemGraphTypes.md)
|
|
30
|
-
- [AuditableItemGraphVerificationState](type-aliases/AuditableItemGraphVerificationState.md)
|
|
31
28
|
- [VerifyDepth](type-aliases/VerifyDepth.md)
|
|
32
29
|
|
|
33
30
|
## Variables
|
|
34
31
|
|
|
35
32
|
- [AuditableItemGraphTypes](variables/AuditableItemGraphTypes.md)
|
|
36
|
-
- [AuditableItemGraphVerificationState](variables/AuditableItemGraphVerificationState.md)
|
|
37
33
|
- [VerifyDepth](variables/VerifyDepth.md)
|
|
@@ -20,6 +20,14 @@ JSON-LD Type.
|
|
|
20
20
|
|
|
21
21
|
***
|
|
22
22
|
|
|
23
|
+
### id
|
|
24
|
+
|
|
25
|
+
> **id**: `string`
|
|
26
|
+
|
|
27
|
+
The id of the changeset.
|
|
28
|
+
|
|
29
|
+
***
|
|
30
|
+
|
|
23
31
|
### dateCreated
|
|
24
32
|
|
|
25
33
|
> **dateCreated**: `string`
|
|
@@ -44,32 +52,16 @@ The patches in the changeset.
|
|
|
44
52
|
|
|
45
53
|
***
|
|
46
54
|
|
|
47
|
-
###
|
|
48
|
-
|
|
49
|
-
> **hash**: `string`
|
|
50
|
-
|
|
51
|
-
The hash for the changeset.
|
|
52
|
-
|
|
53
|
-
***
|
|
54
|
-
|
|
55
|
-
### signature
|
|
56
|
-
|
|
57
|
-
> **signature**: `string`
|
|
58
|
-
|
|
59
|
-
The signature for the changeset.
|
|
60
|
-
|
|
61
|
-
***
|
|
62
|
-
|
|
63
|
-
### immutableStorageId?
|
|
55
|
+
### proofId?
|
|
64
56
|
|
|
65
|
-
> `optional` **
|
|
57
|
+
> `optional` **proofId**: `string`
|
|
66
58
|
|
|
67
|
-
The immutable
|
|
59
|
+
The immutable proof id which contains the signature for this changeset.
|
|
68
60
|
|
|
69
61
|
***
|
|
70
62
|
|
|
71
63
|
### verification?
|
|
72
64
|
|
|
73
|
-
> `optional` **verification**:
|
|
65
|
+
> `optional` **verification**: `IImmutableProofVerification`
|
|
74
66
|
|
|
75
67
|
The verification for the changeset.
|
|
@@ -48,24 +48,6 @@ Represents auditable item graph changeset.
|
|
|
48
48
|
|
|
49
49
|
Represents patch operation.
|
|
50
50
|
|
|
51
|
-
### Credential
|
|
52
|
-
|
|
53
|
-
> `readonly` **Credential**: `"AuditableItemGraphPatchCredential"` = `"AuditableItemGraphPatchCredential"`
|
|
54
|
-
|
|
55
|
-
Represents the immutable credential payload.
|
|
56
|
-
|
|
57
|
-
### Verification
|
|
58
|
-
|
|
59
|
-
> `readonly` **Verification**: `"AuditableItemGraphVerification"` = `"AuditableItemGraphVerification"`
|
|
60
|
-
|
|
61
|
-
Represents auditable item stream verification.
|
|
62
|
-
|
|
63
|
-
### VerificationState
|
|
64
|
-
|
|
65
|
-
> `readonly` **VerificationState**: `"AuditableItemGraphVerificationState"` = `"AuditableItemGraphVerificationState"`
|
|
66
|
-
|
|
67
|
-
Represents auditable item stream verification state.
|
|
68
|
-
|
|
69
51
|
### VertexList
|
|
70
52
|
|
|
71
53
|
> `readonly` **VertexList**: `"AuditableItemGraphVertexList"` = `"AuditableItemGraphVertexList"`
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@twin.org/auditable-item-graph-models",
|
|
3
|
-
"version": "0.0.1-next.
|
|
3
|
+
"version": "0.0.1-next.9",
|
|
4
4
|
"description": "Models which define the structure of the auditable item graph connectors and services",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
"@twin.org/data-core": "next",
|
|
19
19
|
"@twin.org/data-json-ld": "next",
|
|
20
20
|
"@twin.org/entity": "next",
|
|
21
|
+
"@twin.org/immutable-proof-models": "next",
|
|
21
22
|
"@twin.org/nameof": "next",
|
|
22
23
|
"@twin.org/web": "next"
|
|
23
24
|
},
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import type { AuditableItemGraphTypes } from "./auditableItemGraphTypes";
|
|
2
|
-
/**
|
|
3
|
-
* The data stored immutably for the graph in a verifiable credential.
|
|
4
|
-
*/
|
|
5
|
-
export interface IAuditableItemGraphCredential {
|
|
6
|
-
/**
|
|
7
|
-
* JSON-LD Context.
|
|
8
|
-
*/
|
|
9
|
-
"@context": typeof AuditableItemGraphTypes.ContextRoot | [typeof AuditableItemGraphTypes.ContextRoot, ...string[]];
|
|
10
|
-
/**
|
|
11
|
-
* JSON-LD Type.
|
|
12
|
-
*/
|
|
13
|
-
type: typeof AuditableItemGraphTypes.Credential;
|
|
14
|
-
/**
|
|
15
|
-
* The date/time of when the changeset was created.
|
|
16
|
-
*/
|
|
17
|
-
dateCreated: string;
|
|
18
|
-
/**
|
|
19
|
-
* The user identity that created the changes.
|
|
20
|
-
*/
|
|
21
|
-
userIdentity: string;
|
|
22
|
-
/**
|
|
23
|
-
* The signature for the changeset.
|
|
24
|
-
*/
|
|
25
|
-
signature: string;
|
|
26
|
-
/**
|
|
27
|
-
* The signature for the changeset.
|
|
28
|
-
*/
|
|
29
|
-
hash: string;
|
|
30
|
-
/**
|
|
31
|
-
* The integrity data for this changeset, encrypted.
|
|
32
|
-
*/
|
|
33
|
-
integrity?: string;
|
|
34
|
-
}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import type { AuditableItemGraphTypes } from "./auditableItemGraphTypes";
|
|
2
|
-
import type { AuditableItemGraphVerificationState } from "./auditableItemGraphVerificationState";
|
|
3
|
-
/**
|
|
4
|
-
* Interface describing an auditable item graph verification.
|
|
5
|
-
*/
|
|
6
|
-
export interface IAuditableItemGraphVerification {
|
|
7
|
-
/**
|
|
8
|
-
* JSON-LD Context.
|
|
9
|
-
*/
|
|
10
|
-
"@context": typeof AuditableItemGraphTypes.ContextRoot | [typeof AuditableItemGraphTypes.ContextRoot, ...string[]];
|
|
11
|
-
/**
|
|
12
|
-
* JSON-LD Type.
|
|
13
|
-
*/
|
|
14
|
-
type: typeof AuditableItemGraphTypes.Verification;
|
|
15
|
-
/**
|
|
16
|
-
* The date/time of the verification.
|
|
17
|
-
*/
|
|
18
|
-
dateCreated: string;
|
|
19
|
-
/**
|
|
20
|
-
* The state of the verification.
|
|
21
|
-
*/
|
|
22
|
-
state: AuditableItemGraphVerificationState;
|
|
23
|
-
/**
|
|
24
|
-
* The state properties.
|
|
25
|
-
*/
|
|
26
|
-
stateProperties?: {
|
|
27
|
-
[id: string]: unknown;
|
|
28
|
-
};
|
|
29
|
-
}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The state of the verification.
|
|
3
|
-
*/
|
|
4
|
-
export declare const AuditableItemGraphVerificationState: {
|
|
5
|
-
/**
|
|
6
|
-
* OK.
|
|
7
|
-
*/
|
|
8
|
-
readonly Ok: "ok";
|
|
9
|
-
/**
|
|
10
|
-
* The stored hash does not matched the calculated one.
|
|
11
|
-
*/
|
|
12
|
-
readonly HashMismatch: "hashMismatch";
|
|
13
|
-
/**
|
|
14
|
-
* The signature verification failed.
|
|
15
|
-
*/
|
|
16
|
-
readonly SignatureNotVerified: "signatureNotVerified";
|
|
17
|
-
/**
|
|
18
|
-
* The credential in the immutable storage was revoked.
|
|
19
|
-
*/
|
|
20
|
-
readonly CredentialRevoked: "credentialRevoked";
|
|
21
|
-
/**
|
|
22
|
-
* Immutable hash mismatch.
|
|
23
|
-
*/
|
|
24
|
-
readonly ImmutableHashMismatch: "immutableHashMismatch";
|
|
25
|
-
/**
|
|
26
|
-
* Immutable signature mismatch.
|
|
27
|
-
*/
|
|
28
|
-
readonly ImmutableSignatureMismatch: "immutableSignatureMismatch";
|
|
29
|
-
/**
|
|
30
|
-
* Integrity data mismatch.
|
|
31
|
-
*/
|
|
32
|
-
readonly IntegrityDataMismatch: "integrityDataMismatch";
|
|
33
|
-
};
|
|
34
|
-
/**
|
|
35
|
-
* The state of the verification.
|
|
36
|
-
*/
|
|
37
|
-
export type AuditableItemGraphVerificationState = (typeof AuditableItemGraphVerificationState)[keyof typeof AuditableItemGraphVerificationState];
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
# Interface: IAuditableItemGraphCredential
|
|
2
|
-
|
|
3
|
-
The data stored immutably for the graph in a verifiable credential.
|
|
4
|
-
|
|
5
|
-
## Properties
|
|
6
|
-
|
|
7
|
-
### @context
|
|
8
|
-
|
|
9
|
-
> **@context**: `"https://schema.twindev.org/aig/"` \| [`"https://schema.twindev.org/aig/"`, `...string[]`]
|
|
10
|
-
|
|
11
|
-
JSON-LD Context.
|
|
12
|
-
|
|
13
|
-
***
|
|
14
|
-
|
|
15
|
-
### type
|
|
16
|
-
|
|
17
|
-
> **type**: `"AuditableItemGraphPatchCredential"`
|
|
18
|
-
|
|
19
|
-
JSON-LD Type.
|
|
20
|
-
|
|
21
|
-
***
|
|
22
|
-
|
|
23
|
-
### dateCreated
|
|
24
|
-
|
|
25
|
-
> **dateCreated**: `string`
|
|
26
|
-
|
|
27
|
-
The date/time of when the changeset was created.
|
|
28
|
-
|
|
29
|
-
***
|
|
30
|
-
|
|
31
|
-
### userIdentity
|
|
32
|
-
|
|
33
|
-
> **userIdentity**: `string`
|
|
34
|
-
|
|
35
|
-
The user identity that created the changes.
|
|
36
|
-
|
|
37
|
-
***
|
|
38
|
-
|
|
39
|
-
### signature
|
|
40
|
-
|
|
41
|
-
> **signature**: `string`
|
|
42
|
-
|
|
43
|
-
The signature for the changeset.
|
|
44
|
-
|
|
45
|
-
***
|
|
46
|
-
|
|
47
|
-
### hash
|
|
48
|
-
|
|
49
|
-
> **hash**: `string`
|
|
50
|
-
|
|
51
|
-
The signature for the changeset.
|
|
52
|
-
|
|
53
|
-
***
|
|
54
|
-
|
|
55
|
-
### integrity?
|
|
56
|
-
|
|
57
|
-
> `optional` **integrity**: `string`
|
|
58
|
-
|
|
59
|
-
The integrity data for this changeset, encrypted.
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
# Interface: IAuditableItemGraphVerification
|
|
2
|
-
|
|
3
|
-
Interface describing an auditable item graph verification.
|
|
4
|
-
|
|
5
|
-
## Properties
|
|
6
|
-
|
|
7
|
-
### @context
|
|
8
|
-
|
|
9
|
-
> **@context**: `"https://schema.twindev.org/aig/"` \| [`"https://schema.twindev.org/aig/"`, `...string[]`]
|
|
10
|
-
|
|
11
|
-
JSON-LD Context.
|
|
12
|
-
|
|
13
|
-
***
|
|
14
|
-
|
|
15
|
-
### type
|
|
16
|
-
|
|
17
|
-
> **type**: `"AuditableItemGraphVerification"`
|
|
18
|
-
|
|
19
|
-
JSON-LD Type.
|
|
20
|
-
|
|
21
|
-
***
|
|
22
|
-
|
|
23
|
-
### dateCreated
|
|
24
|
-
|
|
25
|
-
> **dateCreated**: `string`
|
|
26
|
-
|
|
27
|
-
The date/time of the verification.
|
|
28
|
-
|
|
29
|
-
***
|
|
30
|
-
|
|
31
|
-
### state
|
|
32
|
-
|
|
33
|
-
> **state**: [`AuditableItemGraphVerificationState`](../type-aliases/AuditableItemGraphVerificationState.md)
|
|
34
|
-
|
|
35
|
-
The state of the verification.
|
|
36
|
-
|
|
37
|
-
***
|
|
38
|
-
|
|
39
|
-
### stateProperties?
|
|
40
|
-
|
|
41
|
-
> `optional` **stateProperties**: `object`
|
|
42
|
-
|
|
43
|
-
The state properties.
|
|
44
|
-
|
|
45
|
-
#### Index Signature
|
|
46
|
-
|
|
47
|
-
\[`id`: `string`\]: `unknown`
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
# Type Alias: AuditableItemGraphVerificationState
|
|
2
|
-
|
|
3
|
-
> **AuditableItemGraphVerificationState**: *typeof* [`AuditableItemGraphVerificationState`](../variables/AuditableItemGraphVerificationState.md)\[keyof *typeof* [`AuditableItemGraphVerificationState`](../variables/AuditableItemGraphVerificationState.md)\]
|
|
4
|
-
|
|
5
|
-
The state of the verification.
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
# Variable: AuditableItemGraphVerificationState
|
|
2
|
-
|
|
3
|
-
> `const` **AuditableItemGraphVerificationState**: `object`
|
|
4
|
-
|
|
5
|
-
The state of the verification.
|
|
6
|
-
|
|
7
|
-
## Type declaration
|
|
8
|
-
|
|
9
|
-
### Ok
|
|
10
|
-
|
|
11
|
-
> `readonly` **Ok**: `"ok"` = `"ok"`
|
|
12
|
-
|
|
13
|
-
OK.
|
|
14
|
-
|
|
15
|
-
### HashMismatch
|
|
16
|
-
|
|
17
|
-
> `readonly` **HashMismatch**: `"hashMismatch"` = `"hashMismatch"`
|
|
18
|
-
|
|
19
|
-
The stored hash does not matched the calculated one.
|
|
20
|
-
|
|
21
|
-
### SignatureNotVerified
|
|
22
|
-
|
|
23
|
-
> `readonly` **SignatureNotVerified**: `"signatureNotVerified"` = `"signatureNotVerified"`
|
|
24
|
-
|
|
25
|
-
The signature verification failed.
|
|
26
|
-
|
|
27
|
-
### CredentialRevoked
|
|
28
|
-
|
|
29
|
-
> `readonly` **CredentialRevoked**: `"credentialRevoked"` = `"credentialRevoked"`
|
|
30
|
-
|
|
31
|
-
The credential in the immutable storage was revoked.
|
|
32
|
-
|
|
33
|
-
### ImmutableHashMismatch
|
|
34
|
-
|
|
35
|
-
> `readonly` **ImmutableHashMismatch**: `"immutableHashMismatch"` = `"immutableHashMismatch"`
|
|
36
|
-
|
|
37
|
-
Immutable hash mismatch.
|
|
38
|
-
|
|
39
|
-
### ImmutableSignatureMismatch
|
|
40
|
-
|
|
41
|
-
> `readonly` **ImmutableSignatureMismatch**: `"immutableSignatureMismatch"` = `"immutableSignatureMismatch"`
|
|
42
|
-
|
|
43
|
-
Immutable signature mismatch.
|
|
44
|
-
|
|
45
|
-
### IntegrityDataMismatch
|
|
46
|
-
|
|
47
|
-
> `readonly` **IntegrityDataMismatch**: `"integrityDataMismatch"` = `"integrityDataMismatch"`
|
|
48
|
-
|
|
49
|
-
Integrity data mismatch.
|