@twin.org/auditable-item-graph-models 0.0.1-next.7 → 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 +57 -274
- package/dist/esm/index.mjs +58 -274
- package/dist/types/index.d.ts +0 -3
- package/dist/types/models/IAuditableItemGraphChangeset.d.ts +9 -8
- package/dist/types/models/IAuditableItemGraphVertex.d.ts +0 -5
- 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 +14 -14
- package/docs/reference/interfaces/IAuditableItemGraphVertex.md +0 -8
- 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,108 +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
|
|
166
|
+
description: "The immutable proof id which contains the signature for this changeset."
|
|
175
167
|
},
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
description: "The
|
|
179
|
-
},
|
|
180
|
-
immutableStorageId: {
|
|
181
|
-
type: "string",
|
|
182
|
-
description: "The immutable storage id containing the signature for the changeset."
|
|
168
|
+
verification: {
|
|
169
|
+
$ref: "https://schema.twindev.org/immutable-proof/ImmutableProofVerification",
|
|
170
|
+
description: "The verification for the changeset."
|
|
183
171
|
}
|
|
184
172
|
};
|
|
185
|
-
var required$
|
|
173
|
+
var required$5 = [
|
|
186
174
|
"@context",
|
|
187
175
|
"type",
|
|
176
|
+
"id",
|
|
188
177
|
"dateCreated",
|
|
189
178
|
"userIdentity",
|
|
190
|
-
"patches"
|
|
191
|
-
"hash",
|
|
192
|
-
"signature"
|
|
179
|
+
"patches"
|
|
193
180
|
];
|
|
194
|
-
var additionalProperties$
|
|
195
|
-
var description$
|
|
181
|
+
var additionalProperties$5 = false;
|
|
182
|
+
var description$5 = "Interface describing a set of updates to the vertex.";
|
|
196
183
|
var AuditableItemGraphChangesetSchema = {
|
|
197
|
-
type: type$
|
|
198
|
-
properties: properties$
|
|
199
|
-
required: required$
|
|
200
|
-
additionalProperties: additionalProperties$
|
|
201
|
-
description: description$
|
|
202
|
-
};
|
|
203
|
-
|
|
204
|
-
var type$7 = "object";
|
|
205
|
-
var properties$6 = {
|
|
206
|
-
"@context": {
|
|
207
|
-
anyOf: [
|
|
208
|
-
{
|
|
209
|
-
type: "string",
|
|
210
|
-
"const": "https://schema.twindev.org/aig/"
|
|
211
|
-
},
|
|
212
|
-
{
|
|
213
|
-
type: "array",
|
|
214
|
-
minItems: 1,
|
|
215
|
-
items: [
|
|
216
|
-
{
|
|
217
|
-
type: "string",
|
|
218
|
-
"const": "https://schema.twindev.org/aig/"
|
|
219
|
-
}
|
|
220
|
-
],
|
|
221
|
-
additionalItems: {
|
|
222
|
-
type: "string"
|
|
223
|
-
}
|
|
224
|
-
}
|
|
225
|
-
],
|
|
226
|
-
description: "JSON-LD Context."
|
|
227
|
-
},
|
|
228
|
-
type: {
|
|
229
|
-
type: "string",
|
|
230
|
-
"const": "AuditableItemGraphPatchCredential",
|
|
231
|
-
description: "JSON-LD Type."
|
|
232
|
-
},
|
|
233
|
-
dateCreated: {
|
|
234
|
-
type: "string",
|
|
235
|
-
description: "The date/time of when the changeset was created."
|
|
236
|
-
},
|
|
237
|
-
userIdentity: {
|
|
238
|
-
type: "string",
|
|
239
|
-
description: "The user identity that created the changes."
|
|
240
|
-
},
|
|
241
|
-
signature: {
|
|
242
|
-
type: "string",
|
|
243
|
-
description: "The signature for the changeset."
|
|
244
|
-
},
|
|
245
|
-
hash: {
|
|
246
|
-
type: "string",
|
|
247
|
-
description: "The signature for the changeset."
|
|
248
|
-
},
|
|
249
|
-
integrity: {
|
|
250
|
-
type: "string",
|
|
251
|
-
description: "The integrity data for this changeset, encrypted."
|
|
252
|
-
}
|
|
253
|
-
};
|
|
254
|
-
var required$6 = [
|
|
255
|
-
"@context",
|
|
256
|
-
"type",
|
|
257
|
-
"dateCreated",
|
|
258
|
-
"userIdentity",
|
|
259
|
-
"signature",
|
|
260
|
-
"hash"
|
|
261
|
-
];
|
|
262
|
-
var additionalProperties$6 = false;
|
|
263
|
-
var description$7 = "The data stored immutably for the graph in a verifiable credential.";
|
|
264
|
-
var AuditableItemGraphCredentialSchema = {
|
|
265
|
-
type: type$7,
|
|
266
|
-
properties: properties$6,
|
|
267
|
-
required: required$6,
|
|
268
|
-
additionalProperties: additionalProperties$6,
|
|
269
|
-
description: description$7
|
|
184
|
+
type: type$5,
|
|
185
|
+
properties: properties$5,
|
|
186
|
+
required: required$5,
|
|
187
|
+
additionalProperties: additionalProperties$5,
|
|
188
|
+
description: description$5
|
|
270
189
|
};
|
|
271
190
|
|
|
272
|
-
var type$
|
|
273
|
-
var properties$
|
|
191
|
+
var type$4 = "object";
|
|
192
|
+
var properties$4 = {
|
|
274
193
|
id: {
|
|
275
194
|
type: "string",
|
|
276
195
|
description: "The id of the element."
|
|
@@ -323,25 +242,25 @@ var properties$5 = {
|
|
|
323
242
|
description: "The relationship between the two vertices."
|
|
324
243
|
}
|
|
325
244
|
};
|
|
326
|
-
var required$
|
|
245
|
+
var required$4 = [
|
|
327
246
|
"@context",
|
|
328
247
|
"dateCreated",
|
|
329
248
|
"edgeRelationship",
|
|
330
249
|
"id",
|
|
331
250
|
"type"
|
|
332
251
|
];
|
|
333
|
-
var additionalProperties$
|
|
334
|
-
var description$
|
|
252
|
+
var additionalProperties$4 = false;
|
|
253
|
+
var description$4 = "Interface describing an edge between two vertices in an auditable item graph.";
|
|
335
254
|
var AuditableItemGraphEdgeSchema = {
|
|
336
|
-
type: type$
|
|
337
|
-
properties: properties$
|
|
338
|
-
required: required$
|
|
339
|
-
additionalProperties: additionalProperties$
|
|
340
|
-
description: description$
|
|
255
|
+
type: type$4,
|
|
256
|
+
properties: properties$4,
|
|
257
|
+
required: required$4,
|
|
258
|
+
additionalProperties: additionalProperties$4,
|
|
259
|
+
description: description$4
|
|
341
260
|
};
|
|
342
261
|
|
|
343
|
-
var type$
|
|
344
|
-
var properties$
|
|
262
|
+
var type$3 = "object";
|
|
263
|
+
var properties$3 = {
|
|
345
264
|
"@context": {
|
|
346
265
|
anyOf: [
|
|
347
266
|
{
|
|
@@ -393,24 +312,24 @@ var properties$4 = {
|
|
|
393
312
|
description: "The value to add."
|
|
394
313
|
}
|
|
395
314
|
};
|
|
396
|
-
var required$
|
|
315
|
+
var required$3 = [
|
|
397
316
|
"@context",
|
|
398
317
|
"type",
|
|
399
318
|
"patchOperation",
|
|
400
319
|
"patchPath"
|
|
401
320
|
];
|
|
402
|
-
var additionalProperties$
|
|
403
|
-
var description$
|
|
321
|
+
var additionalProperties$3 = false;
|
|
322
|
+
var description$3 = "The patch operation for JSON diffs.";
|
|
404
323
|
var AuditableItemGraphPatchOperationSchema = {
|
|
405
|
-
type: type$
|
|
406
|
-
properties: properties$
|
|
407
|
-
required: required$
|
|
408
|
-
additionalProperties: additionalProperties$
|
|
409
|
-
description: description$
|
|
324
|
+
type: type$3,
|
|
325
|
+
properties: properties$3,
|
|
326
|
+
required: required$3,
|
|
327
|
+
additionalProperties: additionalProperties$3,
|
|
328
|
+
description: description$3
|
|
410
329
|
};
|
|
411
330
|
|
|
412
|
-
var type$
|
|
413
|
-
var properties$
|
|
331
|
+
var type$2 = "object";
|
|
332
|
+
var properties$2 = {
|
|
414
333
|
id: {
|
|
415
334
|
type: "string",
|
|
416
335
|
description: "The id of the element."
|
|
@@ -459,95 +378,19 @@ var properties$3 = {
|
|
|
459
378
|
description: "The JSON-LD object for the resource."
|
|
460
379
|
}
|
|
461
380
|
};
|
|
462
|
-
var required$
|
|
381
|
+
var required$2 = [
|
|
463
382
|
"@context",
|
|
464
383
|
"dateCreated",
|
|
465
384
|
"id",
|
|
466
385
|
"type"
|
|
467
386
|
];
|
|
468
|
-
var additionalProperties$3 = false;
|
|
469
|
-
var description$4 = "Interface describing an auditable item graph vertex resource.";
|
|
470
|
-
var AuditableItemGraphResourceSchema = {
|
|
471
|
-
type: type$4,
|
|
472
|
-
properties: properties$3,
|
|
473
|
-
required: required$3,
|
|
474
|
-
additionalProperties: additionalProperties$3,
|
|
475
|
-
description: description$4
|
|
476
|
-
};
|
|
477
|
-
|
|
478
|
-
var type$3 = "object";
|
|
479
|
-
var properties$2 = {
|
|
480
|
-
"@context": {
|
|
481
|
-
anyOf: [
|
|
482
|
-
{
|
|
483
|
-
type: "string",
|
|
484
|
-
"const": "https://schema.twindev.org/aig/"
|
|
485
|
-
},
|
|
486
|
-
{
|
|
487
|
-
type: "array",
|
|
488
|
-
minItems: 1,
|
|
489
|
-
items: [
|
|
490
|
-
{
|
|
491
|
-
type: "string",
|
|
492
|
-
"const": "https://schema.twindev.org/aig/"
|
|
493
|
-
}
|
|
494
|
-
],
|
|
495
|
-
additionalItems: {
|
|
496
|
-
type: "string"
|
|
497
|
-
}
|
|
498
|
-
}
|
|
499
|
-
],
|
|
500
|
-
description: "JSON-LD Context."
|
|
501
|
-
},
|
|
502
|
-
type: {
|
|
503
|
-
type: "string",
|
|
504
|
-
"const": "AuditableItemGraphVerification",
|
|
505
|
-
description: "JSON-LD Type."
|
|
506
|
-
},
|
|
507
|
-
dateCreated: {
|
|
508
|
-
type: "string",
|
|
509
|
-
description: "The date/time of the verification."
|
|
510
|
-
},
|
|
511
|
-
state: {
|
|
512
|
-
$ref: "https://schema.twindev.org/aig/AuditableItemGraphVerificationState",
|
|
513
|
-
description: "The state of the verification."
|
|
514
|
-
},
|
|
515
|
-
stateProperties: {
|
|
516
|
-
type: "object",
|
|
517
|
-
additionalProperties: {
|
|
518
|
-
},
|
|
519
|
-
description: "The state properties."
|
|
520
|
-
}
|
|
521
|
-
};
|
|
522
|
-
var required$2 = [
|
|
523
|
-
"@context",
|
|
524
|
-
"type",
|
|
525
|
-
"dateCreated",
|
|
526
|
-
"state"
|
|
527
|
-
];
|
|
528
387
|
var additionalProperties$2 = false;
|
|
529
|
-
var description$
|
|
530
|
-
var
|
|
531
|
-
type: type$
|
|
388
|
+
var description$2 = "Interface describing an auditable item graph vertex resource.";
|
|
389
|
+
var AuditableItemGraphResourceSchema = {
|
|
390
|
+
type: type$2,
|
|
532
391
|
properties: properties$2,
|
|
533
392
|
required: required$2,
|
|
534
393
|
additionalProperties: additionalProperties$2,
|
|
535
|
-
description: description$3
|
|
536
|
-
};
|
|
537
|
-
|
|
538
|
-
var type$2 = "string";
|
|
539
|
-
var description$2 = "The state of the verification.";
|
|
540
|
-
var AuditableItemGraphVerificationStateSchema = {
|
|
541
|
-
type: type$2,
|
|
542
|
-
"enum": [
|
|
543
|
-
"ok",
|
|
544
|
-
"hashMismatch",
|
|
545
|
-
"signatureNotVerified",
|
|
546
|
-
"credentialRevoked",
|
|
547
|
-
"immutableHashMismatch",
|
|
548
|
-
"immutableSignatureMismatch",
|
|
549
|
-
"integrityDataMismatch"
|
|
550
|
-
],
|
|
551
394
|
description: description$2
|
|
552
395
|
};
|
|
553
396
|
|
|
@@ -635,13 +478,6 @@ var properties$1 = {
|
|
|
635
478
|
verified: {
|
|
636
479
|
type: "boolean",
|
|
637
480
|
description: "Is the vertex verified, will only be populated when verification is requested."
|
|
638
|
-
},
|
|
639
|
-
changesetsVerification: {
|
|
640
|
-
type: "array",
|
|
641
|
-
items: {
|
|
642
|
-
$ref: "https://schema.twindev.org/aig/AuditableItemGraphVerification"
|
|
643
|
-
},
|
|
644
|
-
description: "The verification state of the changesets, will only be populated when changesets are requested."
|
|
645
481
|
}
|
|
646
482
|
};
|
|
647
483
|
var required$1 = [
|
|
@@ -756,66 +592,14 @@ class AuditableItemGraphDataTypes {
|
|
|
756
592
|
defaultValue: {},
|
|
757
593
|
jsonSchema: async () => AuditableItemGraphPatchOperationSchema
|
|
758
594
|
}));
|
|
759
|
-
dataCore.DataTypeHandlerFactory.register(AuditableItemGraphTypes.Credential, () => ({
|
|
760
|
-
type: AuditableItemGraphTypes.Credential,
|
|
761
|
-
defaultValue: {},
|
|
762
|
-
jsonSchema: async () => AuditableItemGraphCredentialSchema
|
|
763
|
-
}));
|
|
764
|
-
dataCore.DataTypeHandlerFactory.register(AuditableItemGraphTypes.Verification, () => ({
|
|
765
|
-
type: AuditableItemGraphTypes.Verification,
|
|
766
|
-
defaultValue: {},
|
|
767
|
-
jsonSchema: async () => AuditableItemGraphVerificationSchema
|
|
768
|
-
}));
|
|
769
595
|
dataCore.DataTypeHandlerFactory.register(AuditableItemGraphTypes.VertexList, () => ({
|
|
770
596
|
type: AuditableItemGraphTypes.VertexList,
|
|
771
597
|
defaultValue: {},
|
|
772
598
|
jsonSchema: async () => AuditableItemGraphVertexListSchema
|
|
773
599
|
}));
|
|
774
|
-
dataCore.DataTypeHandlerFactory.register(AuditableItemGraphTypes.VerificationState, () => ({
|
|
775
|
-
type: AuditableItemGraphTypes.VerificationState,
|
|
776
|
-
defaultValue: {},
|
|
777
|
-
jsonSchema: async () => AuditableItemGraphVerificationStateSchema
|
|
778
|
-
}));
|
|
779
600
|
}
|
|
780
601
|
}
|
|
781
602
|
|
|
782
|
-
// Copyright 2024 IOTA Stiftung.
|
|
783
|
-
// SPDX-License-Identifier: Apache-2.0.
|
|
784
|
-
/**
|
|
785
|
-
* The state of the verification.
|
|
786
|
-
*/
|
|
787
|
-
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
788
|
-
const AuditableItemGraphVerificationState = {
|
|
789
|
-
/**
|
|
790
|
-
* OK.
|
|
791
|
-
*/
|
|
792
|
-
Ok: "ok",
|
|
793
|
-
/**
|
|
794
|
-
* The stored hash does not matched the calculated one.
|
|
795
|
-
*/
|
|
796
|
-
HashMismatch: "hashMismatch",
|
|
797
|
-
/**
|
|
798
|
-
* The signature verification failed.
|
|
799
|
-
*/
|
|
800
|
-
SignatureNotVerified: "signatureNotVerified",
|
|
801
|
-
/**
|
|
802
|
-
* The credential in the immutable storage was revoked.
|
|
803
|
-
*/
|
|
804
|
-
CredentialRevoked: "credentialRevoked",
|
|
805
|
-
/**
|
|
806
|
-
* Immutable hash mismatch.
|
|
807
|
-
*/
|
|
808
|
-
ImmutableHashMismatch: "immutableHashMismatch",
|
|
809
|
-
/**
|
|
810
|
-
* Immutable signature mismatch.
|
|
811
|
-
*/
|
|
812
|
-
ImmutableSignatureMismatch: "immutableSignatureMismatch",
|
|
813
|
-
/**
|
|
814
|
-
* Integrity data mismatch.
|
|
815
|
-
*/
|
|
816
|
-
IntegrityDataMismatch: "integrityDataMismatch"
|
|
817
|
-
};
|
|
818
|
-
|
|
819
603
|
// Copyright 2024 IOTA Stiftung.
|
|
820
604
|
// SPDX-License-Identifier: Apache-2.0.
|
|
821
605
|
/**
|
|
@@ -839,5 +623,4 @@ const VerifyDepth = {
|
|
|
839
623
|
|
|
840
624
|
exports.AuditableItemGraphDataTypes = AuditableItemGraphDataTypes;
|
|
841
625
|
exports.AuditableItemGraphTypes = AuditableItemGraphTypes;
|
|
842
|
-
exports.AuditableItemGraphVerificationState = AuditableItemGraphVerificationState;
|
|
843
626
|
exports.VerifyDepth = VerifyDepth;
|