@twin.org/attestation-models 0.9.3-next.1 → 0.10.1-next.1
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/es/compiled/validators.js +300 -0
- package/dist/es/compiled/validators.js.map +1 -0
- package/dist/es/dataTypes/attestationDataTypes.js +8 -2
- package/dist/es/dataTypes/attestationDataTypes.js.map +1 -1
- package/dist/es/index.js +1 -0
- package/dist/es/index.js.map +1 -1
- package/dist/types/compiled/validators.d.ts +9 -0
- package/dist/types/index.d.ts +1 -0
- package/docs/changelog.md +46 -0
- package/docs/reference/index.md +2 -0
- package/docs/reference/variables/CompiledAttestationInformation.md +5 -0
- package/docs/reference/variables/CompiledAttestationJwtProof.md +5 -0
- package/package.json +1 -1
|
@@ -0,0 +1,300 @@
|
|
|
1
|
+
import * as external0 from "@twin.org/data-json-ld";
|
|
2
|
+
const MESSAGES = ["must NOT have fewer than 3 items", "must be equal to constant", "must be array", "must be string", "must be boolean", "must be object", "must NOT have fewer than 1 items", "must match a schema in anyOf"];
|
|
3
|
+
function createError(instancePath, schemaPath, keyword, params, message) {
|
|
4
|
+
return { instancePath, schemaPath, keyword, params, ["message"]: typeof message === "number" ? MESSAGES[message] : message };
|
|
5
|
+
}
|
|
6
|
+
function pushError(errors, error) {
|
|
7
|
+
if (errors === null) {
|
|
8
|
+
return [error];
|
|
9
|
+
}
|
|
10
|
+
errors.push(error);
|
|
11
|
+
return errors;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Compiled validator for the AttestationInformation schema.
|
|
15
|
+
*/
|
|
16
|
+
export const CompiledAttestationInformation = validate52;
|
|
17
|
+
const keyword0 = external0["CompiledJsonLdContextDefinitionElement"];
|
|
18
|
+
const keyword1 = external0["CompiledJsonLdNodeObject"];
|
|
19
|
+
function validate52(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) {
|
|
20
|
+
/*# sourceURL="https://schema.twindev.org/attestation/AttestationInformation" */ ;
|
|
21
|
+
let vErrors = null;
|
|
22
|
+
let errors = 0;
|
|
23
|
+
const evaluated0 = validate52.evaluated;
|
|
24
|
+
if (evaluated0.dynamicProps) {
|
|
25
|
+
evaluated0.props = undefined;
|
|
26
|
+
}
|
|
27
|
+
if (evaluated0.dynamicItems) {
|
|
28
|
+
evaluated0.items = undefined;
|
|
29
|
+
}
|
|
30
|
+
if (data && typeof data == "object" && !Array.isArray(data)) {
|
|
31
|
+
if (data["@context"] === undefined) {
|
|
32
|
+
const err0 = createError(instancePath, "#/required", "required", { missingProperty: "@context" }, "must have required property '" + "@context" + "'");
|
|
33
|
+
vErrors = pushError(vErrors, err0);
|
|
34
|
+
errors++;
|
|
35
|
+
}
|
|
36
|
+
if (data.type === undefined) {
|
|
37
|
+
const err1 = createError(instancePath, "#/required", "required", { missingProperty: "type" }, "must have required property '" + "type" + "'");
|
|
38
|
+
vErrors = pushError(vErrors, err1);
|
|
39
|
+
errors++;
|
|
40
|
+
}
|
|
41
|
+
if (data.id === undefined) {
|
|
42
|
+
const err2 = createError(instancePath, "#/required", "required", { missingProperty: "id" }, "must have required property '" + "id" + "'");
|
|
43
|
+
vErrors = pushError(vErrors, err2);
|
|
44
|
+
errors++;
|
|
45
|
+
}
|
|
46
|
+
if (data.dateCreated === undefined) {
|
|
47
|
+
const err3 = createError(instancePath, "#/required", "required", { missingProperty: "dateCreated" }, "must have required property '" + "dateCreated" + "'");
|
|
48
|
+
vErrors = pushError(vErrors, err3);
|
|
49
|
+
errors++;
|
|
50
|
+
}
|
|
51
|
+
if (data.ownerIdentity === undefined) {
|
|
52
|
+
const err4 = createError(instancePath, "#/required", "required", { missingProperty: "ownerIdentity" }, "must have required property '" + "ownerIdentity" + "'");
|
|
53
|
+
vErrors = pushError(vErrors, err4);
|
|
54
|
+
errors++;
|
|
55
|
+
}
|
|
56
|
+
if (data.attestationObject === undefined) {
|
|
57
|
+
const err5 = createError(instancePath, "#/required", "required", { missingProperty: "attestationObject" }, "must have required property '" + "attestationObject" + "'");
|
|
58
|
+
vErrors = pushError(vErrors, err5);
|
|
59
|
+
errors++;
|
|
60
|
+
}
|
|
61
|
+
if (data["@context"] !== undefined) {
|
|
62
|
+
let data0 = data["@context"];
|
|
63
|
+
if (Array.isArray(data0)) {
|
|
64
|
+
if (data0.length < 3) {
|
|
65
|
+
const err6 = createError(instancePath + "/@context", "#/properties/%40context/minItems", "minItems", { limit: 3 }, 0);
|
|
66
|
+
vErrors = pushError(vErrors, err6);
|
|
67
|
+
errors++;
|
|
68
|
+
}
|
|
69
|
+
const len0 = data0.length;
|
|
70
|
+
if (len0 > 0) {
|
|
71
|
+
if ("https://schema.org" !== data0[0]) {
|
|
72
|
+
const err7 = createError(instancePath + "/@context/0", "#/properties/%40context/prefixItems/0/const", "const", { allowedValue: "https://schema.org" }, 1);
|
|
73
|
+
vErrors = pushError(vErrors, err7);
|
|
74
|
+
errors++;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
if (len0 > 1) {
|
|
78
|
+
if ("https://schema.twindev.org/attestation/" !== data0[1]) {
|
|
79
|
+
const err8 = createError(instancePath + "/@context/1", "#/properties/%40context/prefixItems/1/const", "const", { allowedValue: "https://schema.twindev.org/attestation/" }, 1);
|
|
80
|
+
vErrors = pushError(vErrors, err8);
|
|
81
|
+
errors++;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
if (len0 > 2) {
|
|
85
|
+
if ("https://schema.twindev.org/common/" !== data0[2]) {
|
|
86
|
+
const err9 = createError(instancePath + "/@context/2", "#/properties/%40context/prefixItems/2/const", "const", { allowedValue: "https://schema.twindev.org/common/" }, 1);
|
|
87
|
+
vErrors = pushError(vErrors, err9);
|
|
88
|
+
errors++;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
const len1 = data0.length;
|
|
92
|
+
var valid2 = len1 <= 3;
|
|
93
|
+
if (!valid2) {
|
|
94
|
+
for (let i0 = 3; i0 < len1; i0++) {
|
|
95
|
+
const _errs6 = errors;
|
|
96
|
+
if (!(keyword0(data0[i0], { instancePath: instancePath + "/@context/" + i0, parentData: data0, parentDataProperty: i0, rootData, dynamicAnchors }))) {
|
|
97
|
+
vErrors = vErrors === null ? keyword0.errors : vErrors.concat(keyword0.errors);
|
|
98
|
+
errors = vErrors.length;
|
|
99
|
+
}
|
|
100
|
+
var valid2 = _errs6 === errors;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
else {
|
|
105
|
+
const err10 = createError(instancePath + "/@context", "#/properties/%40context/type", "type", { type: "array" }, 2);
|
|
106
|
+
vErrors = pushError(vErrors, err10);
|
|
107
|
+
errors++;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
if (data.type !== undefined) {
|
|
111
|
+
if ("Information" !== data.type) {
|
|
112
|
+
const err11 = createError(instancePath + "/type", "#/properties/type/const", "const", { allowedValue: "Information" }, 1);
|
|
113
|
+
vErrors = pushError(vErrors, err11);
|
|
114
|
+
errors++;
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
if (data.id !== undefined) {
|
|
118
|
+
if (typeof data.id !== "string") {
|
|
119
|
+
const err12 = createError(instancePath + "/id", "#/properties/id/type", "type", { type: "string" }, 3);
|
|
120
|
+
vErrors = pushError(vErrors, err12);
|
|
121
|
+
errors++;
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
if (data.dateCreated !== undefined) {
|
|
125
|
+
if (typeof data.dateCreated !== "string") {
|
|
126
|
+
const err13 = createError(instancePath + "/dateCreated", "#/properties/dateCreated/type", "type", { type: "string" }, 3);
|
|
127
|
+
vErrors = pushError(vErrors, err13);
|
|
128
|
+
errors++;
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
if (data.dateTransferred !== undefined) {
|
|
132
|
+
if (typeof data.dateTransferred !== "string") {
|
|
133
|
+
const err14 = createError(instancePath + "/dateTransferred", "#/properties/dateTransferred/type", "type", { type: "string" }, 3);
|
|
134
|
+
vErrors = pushError(vErrors, err14);
|
|
135
|
+
errors++;
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
if (data.ownerIdentity !== undefined) {
|
|
139
|
+
if (typeof data.ownerIdentity !== "string") {
|
|
140
|
+
const err15 = createError(instancePath + "/ownerIdentity", "#/properties/ownerIdentity/type", "type", { type: "string" }, 3);
|
|
141
|
+
vErrors = pushError(vErrors, err15);
|
|
142
|
+
errors++;
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
if (data.attestationObject !== undefined) {
|
|
146
|
+
if (!(keyword1(data.attestationObject, { instancePath: instancePath + "/attestationObject", parentData: data, parentDataProperty: "attestationObject", rootData, dynamicAnchors }))) {
|
|
147
|
+
vErrors = vErrors === null ? keyword1.errors : vErrors.concat(keyword1.errors);
|
|
148
|
+
errors = vErrors.length;
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
if (data.proof !== undefined) {
|
|
152
|
+
if (!(keyword1(data.proof, { instancePath: instancePath + "/proof", parentData: data, parentDataProperty: "proof", rootData, dynamicAnchors }))) {
|
|
153
|
+
vErrors = vErrors === null ? keyword1.errors : vErrors.concat(keyword1.errors);
|
|
154
|
+
errors = vErrors.length;
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
if (data.verified !== undefined) {
|
|
158
|
+
if (typeof data.verified !== "boolean") {
|
|
159
|
+
const err16 = createError(instancePath + "/verified", "#/properties/verified/type", "type", { type: "boolean" }, 4);
|
|
160
|
+
vErrors = pushError(vErrors, err16);
|
|
161
|
+
errors++;
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
if (data.verificationFailure !== undefined) {
|
|
165
|
+
if (typeof data.verificationFailure !== "string") {
|
|
166
|
+
const err17 = createError(instancePath + "/verificationFailure", "#/properties/verificationFailure/type", "type", { type: "string" }, 3);
|
|
167
|
+
vErrors = pushError(vErrors, err17);
|
|
168
|
+
errors++;
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
else {
|
|
173
|
+
const err18 = createError(instancePath, "#/type", "type", { type: "object" }, 5);
|
|
174
|
+
vErrors = pushError(vErrors, err18);
|
|
175
|
+
errors++;
|
|
176
|
+
}
|
|
177
|
+
validate52.errors = vErrors;
|
|
178
|
+
return errors === 0;
|
|
179
|
+
}
|
|
180
|
+
validate52.evaluated = { "props": { "@context": true, "type": true, "id": true, "dateCreated": true, "dateTransferred": true, "ownerIdentity": true, "attestationObject": true, "proof": true, "verified": true, "verificationFailure": true }, "dynamicProps": false, "dynamicItems": false };
|
|
181
|
+
/**
|
|
182
|
+
* Compiled validator for the AttestationJwtProof schema.
|
|
183
|
+
*/
|
|
184
|
+
export const CompiledAttestationJwtProof = validate53;
|
|
185
|
+
function validate53(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) {
|
|
186
|
+
/*# sourceURL="https://schema.twindev.org/attestation/AttestationJwtProof" */ ;
|
|
187
|
+
let vErrors = null;
|
|
188
|
+
let errors = 0;
|
|
189
|
+
const evaluated0 = validate53.evaluated;
|
|
190
|
+
if (evaluated0.dynamicProps) {
|
|
191
|
+
evaluated0.props = undefined;
|
|
192
|
+
}
|
|
193
|
+
if (evaluated0.dynamicItems) {
|
|
194
|
+
evaluated0.items = undefined;
|
|
195
|
+
}
|
|
196
|
+
if (data && typeof data == "object" && !Array.isArray(data)) {
|
|
197
|
+
if (data["@context"] === undefined) {
|
|
198
|
+
const err0 = createError(instancePath, "#/required", "required", { missingProperty: "@context" }, "must have required property '" + "@context" + "'");
|
|
199
|
+
vErrors = pushError(vErrors, err0);
|
|
200
|
+
errors++;
|
|
201
|
+
}
|
|
202
|
+
if (data.type === undefined) {
|
|
203
|
+
const err1 = createError(instancePath, "#/required", "required", { missingProperty: "type" }, "must have required property '" + "type" + "'");
|
|
204
|
+
vErrors = pushError(vErrors, err1);
|
|
205
|
+
errors++;
|
|
206
|
+
}
|
|
207
|
+
if (data.value === undefined) {
|
|
208
|
+
const err2 = createError(instancePath, "#/required", "required", { missingProperty: "value" }, "must have required property '" + "value" + "'");
|
|
209
|
+
vErrors = pushError(vErrors, err2);
|
|
210
|
+
errors++;
|
|
211
|
+
}
|
|
212
|
+
if (data["@context"] !== undefined) {
|
|
213
|
+
let data0 = data["@context"];
|
|
214
|
+
const _errs2 = errors;
|
|
215
|
+
let valid1 = false;
|
|
216
|
+
const _errs3 = errors;
|
|
217
|
+
if ("https://schema.twindev.org/attestation/" !== data0) {
|
|
218
|
+
const err3 = createError(instancePath + "/@context", "#/properties/%40context/anyOf/0/const", "const", { allowedValue: "https://schema.twindev.org/attestation/" }, 1);
|
|
219
|
+
vErrors = pushError(vErrors, err3);
|
|
220
|
+
errors++;
|
|
221
|
+
}
|
|
222
|
+
var _valid0 = _errs3 === errors;
|
|
223
|
+
valid1 = valid1 || _valid0;
|
|
224
|
+
const _errs4 = errors;
|
|
225
|
+
if (Array.isArray(data0)) {
|
|
226
|
+
if (data0.length < 1) {
|
|
227
|
+
const err4 = createError(instancePath + "/@context", "#/properties/%40context/anyOf/1/minItems", "minItems", { limit: 1 }, 6);
|
|
228
|
+
vErrors = pushError(vErrors, err4);
|
|
229
|
+
errors++;
|
|
230
|
+
}
|
|
231
|
+
const len0 = data0.length;
|
|
232
|
+
if (len0 > 0) {
|
|
233
|
+
if ("https://schema.twindev.org/attestation/" !== data0[0]) {
|
|
234
|
+
const err5 = createError(instancePath + "/@context/0", "#/properties/%40context/anyOf/1/prefixItems/0/const", "const", { allowedValue: "https://schema.twindev.org/attestation/" }, 1);
|
|
235
|
+
vErrors = pushError(vErrors, err5);
|
|
236
|
+
errors++;
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
const len1 = data0.length;
|
|
240
|
+
var valid3 = len1 <= 1;
|
|
241
|
+
if (!valid3) {
|
|
242
|
+
for (let i0 = 1; i0 < len1; i0++) {
|
|
243
|
+
const _errs7 = errors;
|
|
244
|
+
if (!(keyword0(data0[i0], { instancePath: instancePath + "/@context/" + i0, parentData: data0, parentDataProperty: i0, rootData, dynamicAnchors }))) {
|
|
245
|
+
vErrors = vErrors === null ? keyword0.errors : vErrors.concat(keyword0.errors);
|
|
246
|
+
errors = vErrors.length;
|
|
247
|
+
}
|
|
248
|
+
var valid3 = _errs7 === errors;
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
else {
|
|
253
|
+
const err6 = createError(instancePath + "/@context", "#/properties/%40context/anyOf/1/type", "type", { type: "array" }, 2);
|
|
254
|
+
vErrors = pushError(vErrors, err6);
|
|
255
|
+
errors++;
|
|
256
|
+
}
|
|
257
|
+
var _valid0 = _errs4 === errors;
|
|
258
|
+
valid1 = valid1 || _valid0;
|
|
259
|
+
if (!valid1) {
|
|
260
|
+
const err7 = createError(instancePath + "/@context", "#/properties/%40context/anyOf", "anyOf", {}, 7);
|
|
261
|
+
vErrors = pushError(vErrors, err7);
|
|
262
|
+
errors++;
|
|
263
|
+
}
|
|
264
|
+
else {
|
|
265
|
+
errors = _errs2;
|
|
266
|
+
if (vErrors !== null) {
|
|
267
|
+
if (_errs2) {
|
|
268
|
+
vErrors.length = _errs2;
|
|
269
|
+
}
|
|
270
|
+
else {
|
|
271
|
+
vErrors = null;
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
if (data.type !== undefined) {
|
|
277
|
+
if ("JwtProof" !== data.type) {
|
|
278
|
+
const err8 = createError(instancePath + "/type", "#/properties/type/const", "const", { allowedValue: "JwtProof" }, 1);
|
|
279
|
+
vErrors = pushError(vErrors, err8);
|
|
280
|
+
errors++;
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
if (data.value !== undefined) {
|
|
284
|
+
if (typeof data.value !== "string") {
|
|
285
|
+
const err9 = createError(instancePath + "/value", "#/properties/value/type", "type", { type: "string" }, 3);
|
|
286
|
+
vErrors = pushError(vErrors, err9);
|
|
287
|
+
errors++;
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
else {
|
|
292
|
+
const err10 = createError(instancePath, "#/type", "type", { type: "object" }, 5);
|
|
293
|
+
vErrors = pushError(vErrors, err10);
|
|
294
|
+
errors++;
|
|
295
|
+
}
|
|
296
|
+
validate53.errors = vErrors;
|
|
297
|
+
return errors === 0;
|
|
298
|
+
}
|
|
299
|
+
validate53.evaluated = { "props": { "@context": true, "type": true, "value": true }, "dynamicProps": false, "dynamicItems": false };
|
|
300
|
+
//# sourceMappingURL=validators.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validators.js","sourceRoot":"","sources":["../../../src/compiled/validators.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,SAAS,MAAM,wBAAwB,CAAC;AACpD,MAAM,QAAQ,GAAG,CAAC,kCAAkC,EAAC,2BAA2B,EAAC,eAAe,EAAC,gBAAgB,EAAC,iBAAiB,EAAC,gBAAgB,EAAC,kCAAkC,EAAC,8BAA8B,CAAC,CAAC;AACxN,SAAS,WAAW,CAAC,YAAY,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO;IACvE,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC,SAAS,CAAC,EAAE,OAAO,OAAO,KAAK,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC;AAC7H,CAAC;AACD,SAAS,SAAS,CAAC,MAAM,EAAE,KAAK;IAChC,IAAI,MAAM,KAAK,IAAI,EAAE,CAAC;QACtB,OAAO,CAAC,KAAK,CAAC,CAAC;IACf,CAAC;IACD,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACnB,OAAO,MAAM,CAAC;AACd,CAAC;AACD;;GAEG;AACH,MAAM,CAAC,MAAM,8BAA8B,GAAuB,UAAU,CAAC;AAC7E,MAAM,QAAQ,GAAG,SAAS,CAAC,wCAAwC,CAAC,CAAC;AACrE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EAAC,MAAM,EAAC,EAAC,IAAI,EAAE,QAAQ,EAAC,EAAC,CAAC,CAAC,CAAC;QAC3E,OAAO,GAAG,SAAS,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;QACpC,MAAM,EAAE,CAAC;IACT,CAAC;IACD,UAAU,CAAC,MAAM,GAAG,OAAO,CAAC;IAC5B,OAAO,MAAM,KAAK,CAAC,CAAC;AACpB,CAAC;AACD,UAAU,CAAC,SAAS,GAAG,EAAC,OAAO,EAAC,EAAC,UAAU,EAAC,IAAI,EAAC,MAAM,EAAC,IAAI,EAAC,OAAO,EAAC,IAAI,EAAC,EAAC,cAAc,EAAC,KAAK,EAAC,cAAc,EAAC,KAAK,EAAC,CAAC","sourcesContent":["// Copyright 2026 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n// This file is generated by ts-to-schema, do not edit it directly.\n// @ts-nocheck\n/* cspell:disable */\nimport type { ICompiledValidator } from \"@twin.org/data-core\";\nimport * as external0 from \"@twin.org/data-json-ld\";\nconst MESSAGES = [\"must NOT have fewer than 3 items\",\"must be equal to constant\",\"must be array\",\"must be string\",\"must be boolean\",\"must be object\",\"must NOT have fewer than 1 items\",\"must match a schema in anyOf\"];\nfunction createError(instancePath, schemaPath, keyword, params, message) {\nreturn { instancePath, schemaPath, keyword, params, [\"message\"]: typeof message === \"number\" ? MESSAGES[message] : message };\n}\nfunction pushError(errors, error) {\nif (errors === null) {\nreturn [error];\n}\nerrors.push(error);\nreturn errors;\n}\n/**\n * Compiled validator for the AttestationInformation schema.\n */\nexport const CompiledAttestationInformation: ICompiledValidator = validate52;\nconst keyword0 = external0[\"CompiledJsonLdContextDefinitionElement\"];\nconst keyword1 = external0[\"CompiledJsonLdNodeObject\"];\n\nfunction validate52(data, {instancePath=\"\", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){\n/*# sourceURL=\"https://schema.twindev.org/attestation/AttestationInformation\" */;\nlet vErrors = null;\nlet errors = 0;\nconst evaluated0 = validate52.evaluated;\nif(evaluated0.dynamicProps){\nevaluated0.props = undefined;\n}\nif(evaluated0.dynamicItems){\nevaluated0.items = undefined;\n}\nif(data && typeof data == \"object\" && !Array.isArray(data)){\nif(data[\"@context\"] === undefined){\nconst err0 = createError(instancePath,\"#/required\",\"required\",{missingProperty: \"@context\"},\"must have required property '\"+\"@context\"+\"'\");\nvErrors = pushError(vErrors, err0);\nerrors++;\n}\nif(data.type === undefined){\nconst err1 = createError(instancePath,\"#/required\",\"required\",{missingProperty: \"type\"},\"must have required property '\"+\"type\"+\"'\");\nvErrors = pushError(vErrors, err1);\nerrors++;\n}\nif(data.id === undefined){\nconst err2 = createError(instancePath,\"#/required\",\"required\",{missingProperty: \"id\"},\"must have required property '\"+\"id\"+\"'\");\nvErrors = pushError(vErrors, err2);\nerrors++;\n}\nif(data.dateCreated === undefined){\nconst err3 = createError(instancePath,\"#/required\",\"required\",{missingProperty: \"dateCreated\"},\"must have required property '\"+\"dateCreated\"+\"'\");\nvErrors = pushError(vErrors, err3);\nerrors++;\n}\nif(data.ownerIdentity === undefined){\nconst err4 = createError(instancePath,\"#/required\",\"required\",{missingProperty: \"ownerIdentity\"},\"must have required property '\"+\"ownerIdentity\"+\"'\");\nvErrors = pushError(vErrors, err4);\nerrors++;\n}\nif(data.attestationObject === undefined){\nconst err5 = createError(instancePath,\"#/required\",\"required\",{missingProperty: \"attestationObject\"},\"must have required property '\"+\"attestationObject\"+\"'\");\nvErrors = pushError(vErrors, err5);\nerrors++;\n}\nif(data[\"@context\"] !== undefined){\nlet data0 = data[\"@context\"];\nif(Array.isArray(data0)){\nif(data0.length < 3){\nconst err6 = createError(instancePath+\"/@context\",\"#/properties/%40context/minItems\",\"minItems\",{limit: 3},0);\nvErrors = pushError(vErrors, err6);\nerrors++;\n}\nconst len0 = data0.length;\nif(len0 > 0){\nif(\"https://schema.org\" !== data0[0]){\nconst err7 = createError(instancePath+\"/@context/0\",\"#/properties/%40context/prefixItems/0/const\",\"const\",{allowedValue: \"https://schema.org\"},1);\nvErrors = pushError(vErrors, err7);\nerrors++;\n}\n}\nif(len0 > 1){\nif(\"https://schema.twindev.org/attestation/\" !== data0[1]){\nconst err8 = createError(instancePath+\"/@context/1\",\"#/properties/%40context/prefixItems/1/const\",\"const\",{allowedValue: \"https://schema.twindev.org/attestation/\"},1);\nvErrors = pushError(vErrors, err8);\nerrors++;\n}\n}\nif(len0 > 2){\nif(\"https://schema.twindev.org/common/\" !== data0[2]){\nconst err9 = createError(instancePath+\"/@context/2\",\"#/properties/%40context/prefixItems/2/const\",\"const\",{allowedValue: \"https://schema.twindev.org/common/\"},1);\nvErrors = pushError(vErrors, err9);\nerrors++;\n}\n}\nconst len1 = data0.length;\nvar valid2 = len1 <= 3;\nif(!valid2){\nfor(let i0=3; i0<len1; i0++){\nconst _errs6 = errors;\nif(!(keyword0(data0[i0], {instancePath:instancePath+\"/@context/\" + i0,parentData:data0,parentDataProperty:i0,rootData,dynamicAnchors}))){\nvErrors = vErrors === null ? keyword0.errors : vErrors.concat(keyword0.errors);\nerrors = vErrors.length;\n}\nvar valid2 = _errs6 === errors;\n}\n}\n}\nelse {\nconst err10 = createError(instancePath+\"/@context\",\"#/properties/%40context/type\",\"type\",{type: \"array\"},2);\nvErrors = pushError(vErrors, err10);\nerrors++;\n}\n}\nif(data.type !== undefined){\nif(\"Information\" !== data.type){\nconst err11 = createError(instancePath+\"/type\",\"#/properties/type/const\",\"const\",{allowedValue: \"Information\"},1);\nvErrors = pushError(vErrors, err11);\nerrors++;\n}\n}\nif(data.id !== undefined){\nif(typeof data.id !== \"string\"){\nconst err12 = createError(instancePath+\"/id\",\"#/properties/id/type\",\"type\",{type: \"string\"},3);\nvErrors = pushError(vErrors, err12);\nerrors++;\n}\n}\nif(data.dateCreated !== undefined){\nif(typeof data.dateCreated !== \"string\"){\nconst err13 = createError(instancePath+\"/dateCreated\",\"#/properties/dateCreated/type\",\"type\",{type: \"string\"},3);\nvErrors = pushError(vErrors, err13);\nerrors++;\n}\n}\nif(data.dateTransferred !== undefined){\nif(typeof data.dateTransferred !== \"string\"){\nconst err14 = createError(instancePath+\"/dateTransferred\",\"#/properties/dateTransferred/type\",\"type\",{type: \"string\"},3);\nvErrors = pushError(vErrors, err14);\nerrors++;\n}\n}\nif(data.ownerIdentity !== undefined){\nif(typeof data.ownerIdentity !== \"string\"){\nconst err15 = createError(instancePath+\"/ownerIdentity\",\"#/properties/ownerIdentity/type\",\"type\",{type: \"string\"},3);\nvErrors = pushError(vErrors, err15);\nerrors++;\n}\n}\nif(data.attestationObject !== undefined){\nif(!(keyword1(data.attestationObject, {instancePath:instancePath+\"/attestationObject\",parentData:data,parentDataProperty:\"attestationObject\",rootData,dynamicAnchors}))){\nvErrors = vErrors === null ? keyword1.errors : vErrors.concat(keyword1.errors);\nerrors = vErrors.length;\n}\n}\nif(data.proof !== undefined){\nif(!(keyword1(data.proof, {instancePath:instancePath+\"/proof\",parentData:data,parentDataProperty:\"proof\",rootData,dynamicAnchors}))){\nvErrors = vErrors === null ? keyword1.errors : vErrors.concat(keyword1.errors);\nerrors = vErrors.length;\n}\n}\nif(data.verified !== undefined){\nif(typeof data.verified !== \"boolean\"){\nconst err16 = createError(instancePath+\"/verified\",\"#/properties/verified/type\",\"type\",{type: \"boolean\"},4);\nvErrors = pushError(vErrors, err16);\nerrors++;\n}\n}\nif(data.verificationFailure !== undefined){\nif(typeof data.verificationFailure !== \"string\"){\nconst err17 = createError(instancePath+\"/verificationFailure\",\"#/properties/verificationFailure/type\",\"type\",{type: \"string\"},3);\nvErrors = pushError(vErrors, err17);\nerrors++;\n}\n}\n}\nelse {\nconst err18 = createError(instancePath,\"#/type\",\"type\",{type: \"object\"},5);\nvErrors = pushError(vErrors, err18);\nerrors++;\n}\nvalidate52.errors = vErrors;\nreturn errors === 0;\n}\nvalidate52.evaluated = {\"props\":{\"@context\":true,\"type\":true,\"id\":true,\"dateCreated\":true,\"dateTransferred\":true,\"ownerIdentity\":true,\"attestationObject\":true,\"proof\":true,\"verified\":true,\"verificationFailure\":true},\"dynamicProps\":false,\"dynamicItems\":false};\n\n/**\n * Compiled validator for the AttestationJwtProof schema.\n */\nexport const CompiledAttestationJwtProof: ICompiledValidator = validate53;\n\nfunction validate53(data, {instancePath=\"\", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){\n/*# sourceURL=\"https://schema.twindev.org/attestation/AttestationJwtProof\" */;\nlet vErrors = null;\nlet errors = 0;\nconst evaluated0 = validate53.evaluated;\nif(evaluated0.dynamicProps){\nevaluated0.props = undefined;\n}\nif(evaluated0.dynamicItems){\nevaluated0.items = undefined;\n}\nif(data && typeof data == \"object\" && !Array.isArray(data)){\nif(data[\"@context\"] === undefined){\nconst err0 = createError(instancePath,\"#/required\",\"required\",{missingProperty: \"@context\"},\"must have required property '\"+\"@context\"+\"'\");\nvErrors = pushError(vErrors, err0);\nerrors++;\n}\nif(data.type === undefined){\nconst err1 = createError(instancePath,\"#/required\",\"required\",{missingProperty: \"type\"},\"must have required property '\"+\"type\"+\"'\");\nvErrors = pushError(vErrors, err1);\nerrors++;\n}\nif(data.value === undefined){\nconst err2 = createError(instancePath,\"#/required\",\"required\",{missingProperty: \"value\"},\"must have required property '\"+\"value\"+\"'\");\nvErrors = pushError(vErrors, err2);\nerrors++;\n}\nif(data[\"@context\"] !== undefined){\nlet data0 = data[\"@context\"];\nconst _errs2 = errors;\nlet valid1 = false;\nconst _errs3 = errors;\nif(\"https://schema.twindev.org/attestation/\" !== data0){\nconst err3 = createError(instancePath+\"/@context\",\"#/properties/%40context/anyOf/0/const\",\"const\",{allowedValue: \"https://schema.twindev.org/attestation/\"},1);\nvErrors = pushError(vErrors, err3);\nerrors++;\n}\nvar _valid0 = _errs3 === errors;\nvalid1 = valid1 || _valid0;\nconst _errs4 = errors;\nif(Array.isArray(data0)){\nif(data0.length < 1){\nconst err4 = createError(instancePath+\"/@context\",\"#/properties/%40context/anyOf/1/minItems\",\"minItems\",{limit: 1},6);\nvErrors = pushError(vErrors, err4);\nerrors++;\n}\nconst len0 = data0.length;\nif(len0 > 0){\nif(\"https://schema.twindev.org/attestation/\" !== data0[0]){\nconst err5 = createError(instancePath+\"/@context/0\",\"#/properties/%40context/anyOf/1/prefixItems/0/const\",\"const\",{allowedValue: \"https://schema.twindev.org/attestation/\"},1);\nvErrors = pushError(vErrors, err5);\nerrors++;\n}\n}\nconst len1 = data0.length;\nvar valid3 = len1 <= 1;\nif(!valid3){\nfor(let i0=1; i0<len1; i0++){\nconst _errs7 = errors;\nif(!(keyword0(data0[i0], {instancePath:instancePath+\"/@context/\" + i0,parentData:data0,parentDataProperty:i0,rootData,dynamicAnchors}))){\nvErrors = vErrors === null ? keyword0.errors : vErrors.concat(keyword0.errors);\nerrors = vErrors.length;\n}\nvar valid3 = _errs7 === errors;\n}\n}\n}\nelse {\nconst err6 = createError(instancePath+\"/@context\",\"#/properties/%40context/anyOf/1/type\",\"type\",{type: \"array\"},2);\nvErrors = pushError(vErrors, err6);\nerrors++;\n}\nvar _valid0 = _errs4 === errors;\nvalid1 = valid1 || _valid0;\nif(!valid1){\nconst err7 = createError(instancePath+\"/@context\",\"#/properties/%40context/anyOf\",\"anyOf\",{},7);\nvErrors = pushError(vErrors, err7);\nerrors++;\n}\nelse {\nerrors = _errs2;\nif(vErrors !== null){\nif(_errs2){\nvErrors.length = _errs2;\n}\nelse {\nvErrors = null;\n}\n}\n}\n}\nif(data.type !== undefined){\nif(\"JwtProof\" !== data.type){\nconst err8 = createError(instancePath+\"/type\",\"#/properties/type/const\",\"const\",{allowedValue: \"JwtProof\"},1);\nvErrors = pushError(vErrors, err8);\nerrors++;\n}\n}\nif(data.value !== undefined){\nif(typeof data.value !== \"string\"){\nconst err9 = createError(instancePath+\"/value\",\"#/properties/value/type\",\"type\",{type: \"string\"},3);\nvErrors = pushError(vErrors, err9);\nerrors++;\n}\n}\n}\nelse {\nconst err10 = createError(instancePath,\"#/type\",\"type\",{type: \"object\"},5);\nvErrors = pushError(vErrors, err10);\nerrors++;\n}\nvalidate53.errors = vErrors;\nreturn errors === 0;\n}\nvalidate53.evaluated = {\"props\":{\"@context\":true,\"type\":true,\"value\":true},\"dynamicProps\":false,\"dynamicItems\":false};\n\n"]}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
// Copyright 2024 IOTA Stiftung.
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0.
|
|
3
3
|
import { DataTypeHandlerFactory } from "@twin.org/data-core";
|
|
4
|
+
import { JsonLdDataTypes } from "@twin.org/data-json-ld";
|
|
5
|
+
import * as CompiledValidators from "../compiled/validators.js";
|
|
4
6
|
import { AttestationContexts } from "../models/attestationContexts.js";
|
|
5
7
|
import { AttestationTypes } from "../models/attestationTypes.js";
|
|
6
8
|
import AttestationInformationSchema from "../schemas/AttestationInformation.json" with { type: "json" };
|
|
@@ -13,17 +15,21 @@ export class AttestationDataTypes {
|
|
|
13
15
|
* Register all the data types.
|
|
14
16
|
*/
|
|
15
17
|
static registerTypes() {
|
|
18
|
+
// Register the types referenced by the schemas, which are only registered once.
|
|
19
|
+
JsonLdDataTypes.registerTypes();
|
|
16
20
|
DataTypeHandlerFactory.register(`${AttestationContexts.Namespace}${AttestationTypes.Information}`, () => ({
|
|
17
21
|
namespace: AttestationContexts.Namespace,
|
|
18
22
|
type: AttestationTypes.Information,
|
|
19
23
|
defaultValue: {},
|
|
20
|
-
jsonSchema: async () => AttestationInformationSchema
|
|
24
|
+
jsonSchema: async () => AttestationInformationSchema,
|
|
25
|
+
compiledValidator: async () => CompiledValidators.CompiledAttestationInformation
|
|
21
26
|
}));
|
|
22
27
|
DataTypeHandlerFactory.register(`${AttestationContexts.Namespace}${AttestationTypes.JwtProof}`, () => ({
|
|
23
28
|
namespace: AttestationContexts.Namespace,
|
|
24
29
|
type: AttestationTypes.JwtProof,
|
|
25
30
|
defaultValue: {},
|
|
26
|
-
jsonSchema: async () => AttestationJwtProofSchema
|
|
31
|
+
jsonSchema: async () => AttestationJwtProofSchema,
|
|
32
|
+
compiledValidator: async () => CompiledValidators.CompiledAttestationJwtProof
|
|
27
33
|
}));
|
|
28
34
|
}
|
|
29
35
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"attestationDataTypes.js","sourceRoot":"","sources":["../../../src/dataTypes/attestationDataTypes.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,OAAO,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAC7D,OAAO,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AACvE,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,4BAA4B,MAAM,wCAAwC,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AACxG,OAAO,yBAAyB,MAAM,qCAAqC,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AAElG;;GAEG;AACH,MAAM,OAAO,oBAAoB;IAChC;;OAEG;IACI,MAAM,CAAC,aAAa;QAC1B,sBAAsB,CAAC,QAAQ,CAC9B,GAAG,mBAAmB,CAAC,SAAS,GAAG,gBAAgB,CAAC,WAAW,EAAE,EACjE,GAAG,EAAE,CAAC,CAAC;YACN,SAAS,EAAE,mBAAmB,CAAC,SAAS;YACxC,IAAI,EAAE,gBAAgB,CAAC,WAAW;YAClC,YAAY,EAAE,EAAE;YAChB,UAAU,EAAE,KAAK,IAAI,EAAE,CAAC,4BAA4B;
|
|
1
|
+
{"version":3,"file":"attestationDataTypes.js","sourceRoot":"","sources":["../../../src/dataTypes/attestationDataTypes.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,OAAO,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAC7D,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,KAAK,kBAAkB,MAAM,2BAA2B,CAAC;AAChE,OAAO,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AACvE,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,4BAA4B,MAAM,wCAAwC,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AACxG,OAAO,yBAAyB,MAAM,qCAAqC,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AAElG;;GAEG;AACH,MAAM,OAAO,oBAAoB;IAChC;;OAEG;IACI,MAAM,CAAC,aAAa;QAC1B,gFAAgF;QAChF,eAAe,CAAC,aAAa,EAAE,CAAC;QAEhC,sBAAsB,CAAC,QAAQ,CAC9B,GAAG,mBAAmB,CAAC,SAAS,GAAG,gBAAgB,CAAC,WAAW,EAAE,EACjE,GAAG,EAAE,CAAC,CAAC;YACN,SAAS,EAAE,mBAAmB,CAAC,SAAS;YACxC,IAAI,EAAE,gBAAgB,CAAC,WAAW;YAClC,YAAY,EAAE,EAAE;YAChB,UAAU,EAAE,KAAK,IAAI,EAAE,CAAC,4BAA4B;YACpD,iBAAiB,EAAE,KAAK,IAAI,EAAE,CAAC,kBAAkB,CAAC,8BAA8B;SAChF,CAAC,CACF,CAAC;QACF,sBAAsB,CAAC,QAAQ,CAC9B,GAAG,mBAAmB,CAAC,SAAS,GAAG,gBAAgB,CAAC,QAAQ,EAAE,EAC9D,GAAG,EAAE,CAAC,CAAC;YACN,SAAS,EAAE,mBAAmB,CAAC,SAAS;YACxC,IAAI,EAAE,gBAAgB,CAAC,QAAQ;YAC/B,YAAY,EAAE,EAAE;YAChB,UAAU,EAAE,KAAK,IAAI,EAAE,CAAC,yBAAyB;YACjD,iBAAiB,EAAE,KAAK,IAAI,EAAE,CAAC,kBAAkB,CAAC,2BAA2B;SAC7E,CAAC,CACF,CAAC;IACH,CAAC;CACD","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport { DataTypeHandlerFactory } from \"@twin.org/data-core\";\nimport { JsonLdDataTypes } from \"@twin.org/data-json-ld\";\nimport * as CompiledValidators from \"../compiled/validators.js\";\nimport { AttestationContexts } from \"../models/attestationContexts.js\";\nimport { AttestationTypes } from \"../models/attestationTypes.js\";\nimport AttestationInformationSchema from \"../schemas/AttestationInformation.json\" with { type: \"json\" };\nimport AttestationJwtProofSchema from \"../schemas/AttestationJwtProof.json\" with { type: \"json\" };\n\n/**\n * Handle all the data types for attestation.\n */\nexport class AttestationDataTypes {\n\t/**\n\t * Register all the data types.\n\t */\n\tpublic static registerTypes(): void {\n\t\t// Register the types referenced by the schemas, which are only registered once.\n\t\tJsonLdDataTypes.registerTypes();\n\n\t\tDataTypeHandlerFactory.register(\n\t\t\t`${AttestationContexts.Namespace}${AttestationTypes.Information}`,\n\t\t\t() => ({\n\t\t\t\tnamespace: AttestationContexts.Namespace,\n\t\t\t\ttype: AttestationTypes.Information,\n\t\t\t\tdefaultValue: {},\n\t\t\t\tjsonSchema: async () => AttestationInformationSchema,\n\t\t\t\tcompiledValidator: async () => CompiledValidators.CompiledAttestationInformation\n\t\t\t})\n\t\t);\n\t\tDataTypeHandlerFactory.register(\n\t\t\t`${AttestationContexts.Namespace}${AttestationTypes.JwtProof}`,\n\t\t\t() => ({\n\t\t\t\tnamespace: AttestationContexts.Namespace,\n\t\t\t\ttype: AttestationTypes.JwtProof,\n\t\t\t\tdefaultValue: {},\n\t\t\t\tjsonSchema: async () => AttestationJwtProofSchema,\n\t\t\t\tcompiledValidator: async () => CompiledValidators.CompiledAttestationJwtProof\n\t\t\t})\n\t\t);\n\t}\n}\n"]}
|
package/dist/es/index.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
// Copyright 2024 IOTA Stiftung.
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0.
|
|
3
|
+
export * from "./compiled/validators.js";
|
|
3
4
|
export * from "./dataTypes/attestationDataTypes.js";
|
|
4
5
|
export * from "./factories/attestationConnectorFactory.js";
|
|
5
6
|
export * from "./models/api/IAttestationCreateRequest.js";
|
package/dist/es/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,cAAc,qCAAqC,CAAC;AACpD,cAAc,4CAA4C,CAAC;AAC3D,cAAc,2CAA2C,CAAC;AAC1D,cAAc,4CAA4C,CAAC;AAC3D,cAAc,wCAAwC,CAAC;AACvD,cAAc,yCAAyC,CAAC;AACxD,cAAc,6CAA6C,CAAC;AAC5D,cAAc,iCAAiC,CAAC;AAChD,cAAc,kCAAkC,CAAC;AACjD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,mCAAmC,CAAC;AAClD,cAAc,mCAAmC,CAAC;AAClD,cAAc,qCAAqC,CAAC;AACpD,cAAc,kCAAkC,CAAC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nexport * from \"./dataTypes/attestationDataTypes.js\";\nexport * from \"./factories/attestationConnectorFactory.js\";\nexport * from \"./models/api/IAttestationCreateRequest.js\";\nexport * from \"./models/api/IAttestationDestroyRequest.js\";\nexport * from \"./models/api/IAttestationGetRequest.js\";\nexport * from \"./models/api/IAttestationGetResponse.js\";\nexport * from \"./models/api/IAttestationTransferRequest.js\";\nexport * from \"./models/attestationContexts.js\";\nexport * from \"./models/attestationMetricIds.js\";\nexport * from \"./models/attestationMetrics.js\";\nexport * from \"./models/attestationTypes.js\";\nexport * from \"./models/IAttestationComponent.js\";\nexport * from \"./models/IAttestationConnector.js\";\nexport * from \"./models/IAttestationInformation.js\";\nexport * from \"./models/IAttestationJwtProof.js\";\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,cAAc,0BAA0B,CAAC;AACzC,cAAc,qCAAqC,CAAC;AACpD,cAAc,4CAA4C,CAAC;AAC3D,cAAc,2CAA2C,CAAC;AAC1D,cAAc,4CAA4C,CAAC;AAC3D,cAAc,wCAAwC,CAAC;AACvD,cAAc,yCAAyC,CAAC;AACxD,cAAc,6CAA6C,CAAC;AAC5D,cAAc,iCAAiC,CAAC;AAChD,cAAc,kCAAkC,CAAC;AACjD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,mCAAmC,CAAC;AAClD,cAAc,mCAAmC,CAAC;AAClD,cAAc,qCAAqC,CAAC;AACpD,cAAc,kCAAkC,CAAC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nexport * from \"./compiled/validators.js\";\nexport * from \"./dataTypes/attestationDataTypes.js\";\nexport * from \"./factories/attestationConnectorFactory.js\";\nexport * from \"./models/api/IAttestationCreateRequest.js\";\nexport * from \"./models/api/IAttestationDestroyRequest.js\";\nexport * from \"./models/api/IAttestationGetRequest.js\";\nexport * from \"./models/api/IAttestationGetResponse.js\";\nexport * from \"./models/api/IAttestationTransferRequest.js\";\nexport * from \"./models/attestationContexts.js\";\nexport * from \"./models/attestationMetricIds.js\";\nexport * from \"./models/attestationMetrics.js\";\nexport * from \"./models/attestationTypes.js\";\nexport * from \"./models/IAttestationComponent.js\";\nexport * from \"./models/IAttestationConnector.js\";\nexport * from \"./models/IAttestationInformation.js\";\nexport * from \"./models/IAttestationJwtProof.js\";\n"]}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { ICompiledValidator } from "@twin.org/data-core";
|
|
2
|
+
/**
|
|
3
|
+
* Compiled validator for the AttestationInformation schema.
|
|
4
|
+
*/
|
|
5
|
+
export declare const CompiledAttestationInformation: ICompiledValidator;
|
|
6
|
+
/**
|
|
7
|
+
* Compiled validator for the AttestationJwtProof schema.
|
|
8
|
+
*/
|
|
9
|
+
export declare const CompiledAttestationJwtProof: ICompiledValidator;
|
package/dist/types/index.d.ts
CHANGED
package/docs/changelog.md
CHANGED
|
@@ -1,5 +1,51 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.10.1-next.1](https://github.com/iotaledger/twin-attestation/compare/attestation-models-v0.10.1-next.0...attestation-models-v0.10.1-next.1) (2026-09-26)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* add context id features ([#21](https://github.com/iotaledger/twin-attestation/issues/21)) ([640deab](https://github.com/iotaledger/twin-attestation/commit/640deabfc00340e619283f94570c5e1ec45e83af))
|
|
9
|
+
* add event-driven telemetry metrics ([#66](https://github.com/iotaledger/twin-attestation/issues/66)) ([1b0c778](https://github.com/iotaledger/twin-attestation/commit/1b0c778eaa8bd6dca1fdc24ed5d3b4e6ade4ea33))
|
|
10
|
+
* add ts-to-jsonld-context tool ([df7edd0](https://github.com/iotaledger/twin-attestation/commit/df7edd0d32cabc2b0f9f6dc7b216f569f739324d))
|
|
11
|
+
* add validate-locales ([a1f9e13](https://github.com/iotaledger/twin-attestation/commit/a1f9e13875a661f612ce16dd9896e7df20c6a7ff))
|
|
12
|
+
* compiled schemas ([1296eeb](https://github.com/iotaledger/twin-attestation/commit/1296eeb494431cf7c791f92d41d56feabb4f731e))
|
|
13
|
+
* context updates ([#25](https://github.com/iotaledger/twin-attestation/issues/25)) ([1ea71b2](https://github.com/iotaledger/twin-attestation/commit/1ea71b28d874daef4d0bca594fb5dbf5f2a47571))
|
|
14
|
+
* eslint migration to flat config ([7c768ff](https://github.com/iotaledger/twin-attestation/commit/7c768ffae02456d60fd62ba8b4b488c307ceff32))
|
|
15
|
+
* health provider ([#69](https://github.com/iotaledger/twin-attestation/issues/69)) ([bc45c73](https://github.com/iotaledger/twin-attestation/commit/bc45c73d2c7552e79e9176d5d202f0dd41da78d6))
|
|
16
|
+
* release to production ([aa69a08](https://github.com/iotaledger/twin-attestation/commit/aa69a08fbd3897c8d72b0d32ec730f104ad31b33))
|
|
17
|
+
* release to production ([89ca987](https://github.com/iotaledger/twin-attestation/commit/89ca987963d9090abcfc1b62bc997e2c521944ec))
|
|
18
|
+
* remove holder identity ([#38](https://github.com/iotaledger/twin-attestation/issues/38)) ([4862d7f](https://github.com/iotaledger/twin-attestation/commit/4862d7f22345b82bcb90f27adc0d64ed75484813))
|
|
19
|
+
* remove inline service tracing in favour of the tracing facade ([#80](https://github.com/iotaledger/twin-attestation/issues/80)) ([766ccda](https://github.com/iotaledger/twin-attestation/commit/766ccdab08d96096617e627662621ffbe954b7a2))
|
|
20
|
+
* remove unused schemas causing conflict ([#27](https://github.com/iotaledger/twin-attestation/issues/27)) ([9723bc3](https://github.com/iotaledger/twin-attestation/commit/9723bc3757f87ce8a943f5f091a92d258f867892))
|
|
21
|
+
* tracing ([#72](https://github.com/iotaledger/twin-attestation/issues/72)) ([e3eaad4](https://github.com/iotaledger/twin-attestation/commit/e3eaad437f5c388f915ef95389b28ff34684b019))
|
|
22
|
+
* typescript 6 update ([9484667](https://github.com/iotaledger/twin-attestation/commit/948466713dc980e4b2d89e72ebb927b3fe530280))
|
|
23
|
+
* update contexts and namespaces ([#23](https://github.com/iotaledger/twin-attestation/issues/23)) ([7e7ffb4](https://github.com/iotaledger/twin-attestation/commit/7e7ffb4056bfe296dd3cedcaa7a9bfb91fd830d7))
|
|
24
|
+
* update data type registration with fully qualified names ([5982245](https://github.com/iotaledger/twin-attestation/commit/59822454a027a9c6dfa72ffa9aabb9622b925929))
|
|
25
|
+
* update dependencies ([1d96d2e](https://github.com/iotaledger/twin-attestation/commit/1d96d2ee6e81a30396980f6f5e16e9658710d32d))
|
|
26
|
+
* update framework core ([02326d4](https://github.com/iotaledger/twin-attestation/commit/02326d41238862c13587c19bb3d04c1cb3b606d8))
|
|
27
|
+
* update schemas ([c163f36](https://github.com/iotaledger/twin-attestation/commit/c163f3623d54a0e87a97cf5eab25327b9aeac0fe))
|
|
28
|
+
* update ts-to-schema generation ([0f23298](https://github.com/iotaledger/twin-attestation/commit/0f23298f6e8accb19c0faaf74220cce02155b48a))
|
|
29
|
+
* use shared store mechanism ([#5](https://github.com/iotaledger/twin-attestation/issues/5)) ([3768cf7](https://github.com/iotaledger/twin-attestation/commit/3768cf7214d30a5429b7b08190539b517d7fafa0))
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
### Bug Fixes
|
|
33
|
+
|
|
34
|
+
* correct context ordering ([c7cded2](https://github.com/iotaledger/twin-attestation/commit/c7cded248662b8b78ff41b19749bc182ff5105c0))
|
|
35
|
+
* remove unused schema ([1529b0a](https://github.com/iotaledger/twin-attestation/commit/1529b0a4dfcb1d70b59e8976a1ebcf05a1a90dc9))
|
|
36
|
+
|
|
37
|
+
## [0.10.0](https://github.com/iotaledger/twin-attestation/compare/attestation-models-v0.10.0...attestation-models-v0.10.0) (2026-09-16)
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
### Features
|
|
41
|
+
|
|
42
|
+
* release to production ([aa69a08](https://github.com/iotaledger/twin-attestation/commit/aa69a08fbd3897c8d72b0d32ec730f104ad31b33))
|
|
43
|
+
* release to production ([89ca987](https://github.com/iotaledger/twin-attestation/commit/89ca987963d9090abcfc1b62bc997e2c521944ec))
|
|
44
|
+
* release to production ([#48](https://github.com/iotaledger/twin-attestation/issues/48)) ([7dacf79](https://github.com/iotaledger/twin-attestation/commit/7dacf796d2e7c987a7cd1cd907b4cfc72ce8f4f1))
|
|
45
|
+
* release to production ([#59](https://github.com/iotaledger/twin-attestation/issues/59)) ([e6e0ae3](https://github.com/iotaledger/twin-attestation/commit/e6e0ae37f98d44e22797ee13476aee96867dd0eb))
|
|
46
|
+
* release to production ([#77](https://github.com/iotaledger/twin-attestation/issues/77)) ([3446641](https://github.com/iotaledger/twin-attestation/commit/3446641b174b1f20e1ba660bb8bb6cf02d85c955))
|
|
47
|
+
* release to production [skip ci] ([#84](https://github.com/iotaledger/twin-attestation/issues/84)) ([31722d1](https://github.com/iotaledger/twin-attestation/commit/31722d1310994f0232936bf2cb3c73cdf9f53c95))
|
|
48
|
+
|
|
3
49
|
## [0.9.3-next.1](https://github.com/iotaledger/twin-attestation/compare/attestation-models-v0.9.3-next.0...attestation-models-v0.9.3-next.1) (2026-09-09)
|
|
4
50
|
|
|
5
51
|
|
package/docs/reference/index.md
CHANGED
|
@@ -24,6 +24,8 @@
|
|
|
24
24
|
|
|
25
25
|
## Variables
|
|
26
26
|
|
|
27
|
+
- [CompiledAttestationInformation](variables/CompiledAttestationInformation.md)
|
|
28
|
+
- [CompiledAttestationJwtProof](variables/CompiledAttestationJwtProof.md)
|
|
27
29
|
- [AttestationConnectorFactory](variables/AttestationConnectorFactory.md)
|
|
28
30
|
- [AttestationContexts](variables/AttestationContexts.md)
|
|
29
31
|
- [AttestationMetricIds](variables/AttestationMetricIds.md)
|