@learncard/types 5.5.0 → 5.5.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/did.d.ts +900 -0
- package/dist/did.d.ts.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/lcn.d.ts +1155 -295
- package/dist/lcn.d.ts.map +1 -1
- package/dist/types.cjs.development.js +114 -71
- package/dist/types.cjs.development.js.map +3 -3
- package/dist/types.cjs.production.min.js +1 -1
- package/dist/types.cjs.production.min.js.map +4 -4
- package/dist/types.esm.js +341 -295
- package/dist/types.esm.js.map +4 -4
- package/package.json +1 -1
package/dist/types.esm.js
CHANGED
@@ -120,9 +120,77 @@ var VPValidator = UnsignedVPValidator.extend({
|
|
120
120
|
proof: ProofValidator.or(ProofValidator.array())
|
121
121
|
});
|
122
122
|
|
123
|
-
// src/
|
123
|
+
// src/did.ts
|
124
|
+
import { z as z3 } from "zod";
|
125
|
+
|
126
|
+
// src/crypto.ts
|
124
127
|
import { z as z2 } from "zod";
|
125
|
-
var
|
128
|
+
var JWKValidator = z2.object({
|
129
|
+
kty: z2.string(),
|
130
|
+
crv: z2.string(),
|
131
|
+
x: z2.string(),
|
132
|
+
y: z2.string().optional(),
|
133
|
+
n: z2.string().optional(),
|
134
|
+
d: z2.string()
|
135
|
+
});
|
136
|
+
var JWERecipientHeaderValidator = z2.object({
|
137
|
+
alg: z2.string(),
|
138
|
+
iv: z2.string(),
|
139
|
+
tag: z2.string(),
|
140
|
+
epk: JWKValidator.partial().optional(),
|
141
|
+
kid: z2.string().optional(),
|
142
|
+
apv: z2.string().optional(),
|
143
|
+
apu: z2.string().optional()
|
144
|
+
});
|
145
|
+
var JWERecipientValidator = z2.object({
|
146
|
+
header: JWERecipientHeaderValidator,
|
147
|
+
encrypted_key: z2.string()
|
148
|
+
});
|
149
|
+
var JWEValidator = z2.object({
|
150
|
+
protected: z2.string(),
|
151
|
+
iv: z2.string(),
|
152
|
+
ciphertext: z2.string(),
|
153
|
+
tag: z2.string(),
|
154
|
+
aad: z2.string().optional(),
|
155
|
+
recipients: JWERecipientValidator.array().optional()
|
156
|
+
});
|
157
|
+
|
158
|
+
// src/did.ts
|
159
|
+
var VerificationMethodValidator = z3.string().or(
|
160
|
+
z3.object({
|
161
|
+
"@context": ContextValidator.optional(),
|
162
|
+
id: z3.string(),
|
163
|
+
type: z3.string(),
|
164
|
+
controller: z3.string(),
|
165
|
+
publicKeyJwk: JWKValidator.optional(),
|
166
|
+
publicKeyBase58: z3.string().optional(),
|
167
|
+
blockChainAccountId: z3.string().optional()
|
168
|
+
}).catchall(z3.any())
|
169
|
+
);
|
170
|
+
var ServiceValidator = z3.object({
|
171
|
+
id: z3.string(),
|
172
|
+
type: z3.string().or(z3.string().array().nonempty()),
|
173
|
+
serviceEndpoint: z3.any().or(z3.any().array().nonempty())
|
174
|
+
}).catchall(z3.any());
|
175
|
+
var DidDocumentValidator = z3.object({
|
176
|
+
"@context": ContextValidator,
|
177
|
+
id: z3.string(),
|
178
|
+
alsoKnownAs: z3.string().optional(),
|
179
|
+
controller: z3.string().or(z3.string().array().nonempty()).optional(),
|
180
|
+
verificationMethod: VerificationMethodValidator.array().optional(),
|
181
|
+
authentication: VerificationMethodValidator.array().optional(),
|
182
|
+
assertionMethod: VerificationMethodValidator.array().optional(),
|
183
|
+
keyAgreement: VerificationMethodValidator.array().optional(),
|
184
|
+
capabilityInvocation: VerificationMethodValidator.array().optional(),
|
185
|
+
capabilityDelegation: VerificationMethodValidator.array().optional(),
|
186
|
+
publicKey: VerificationMethodValidator.array().optional(),
|
187
|
+
service: ServiceValidator.array().optional(),
|
188
|
+
proof: ProofValidator.or(ProofValidator.array()).optional()
|
189
|
+
}).catchall(z3.any());
|
190
|
+
|
191
|
+
// src/obv3.ts
|
192
|
+
import { z as z4 } from "zod";
|
193
|
+
var AlignmentTargetTypeValidator = z4.enum([
|
126
194
|
"ceasn:Competency",
|
127
195
|
"ceterms:Credential",
|
128
196
|
"CFItem",
|
@@ -130,17 +198,17 @@ var AlignmentTargetTypeValidator = z2.enum([
|
|
130
198
|
"CFRubricCriterion",
|
131
199
|
"CFRubricCriterionLevel",
|
132
200
|
"CTDL"
|
133
|
-
]).or(
|
134
|
-
var AlignmentValidator =
|
135
|
-
type:
|
136
|
-
targetCode:
|
137
|
-
targetDescription:
|
138
|
-
targetName:
|
139
|
-
targetFramework:
|
201
|
+
]).or(z4.string());
|
202
|
+
var AlignmentValidator = z4.object({
|
203
|
+
type: z4.string().array().nonempty(),
|
204
|
+
targetCode: z4.string().optional(),
|
205
|
+
targetDescription: z4.string().optional(),
|
206
|
+
targetName: z4.string(),
|
207
|
+
targetFramework: z4.string().optional(),
|
140
208
|
targetType: AlignmentTargetTypeValidator.optional(),
|
141
|
-
targetUrl:
|
209
|
+
targetUrl: z4.string()
|
142
210
|
});
|
143
|
-
var KnownAchievementTypeValidator =
|
211
|
+
var KnownAchievementTypeValidator = z4.enum([
|
144
212
|
"Achievement",
|
145
213
|
"ApprenticeshipCertificate",
|
146
214
|
"Assessment",
|
@@ -173,23 +241,23 @@ var KnownAchievementTypeValidator = z2.enum([
|
|
173
241
|
"ResearchDoctorate",
|
174
242
|
"SecondarySchoolDiploma"
|
175
243
|
]);
|
176
|
-
var AchievementTypeValidator = KnownAchievementTypeValidator.or(
|
177
|
-
var CriteriaValidator =
|
178
|
-
var EndorsementSubjectValidator =
|
179
|
-
id:
|
180
|
-
type:
|
181
|
-
endorsementComment:
|
244
|
+
var AchievementTypeValidator = KnownAchievementTypeValidator.or(z4.string());
|
245
|
+
var CriteriaValidator = z4.object({ id: z4.string().optional(), narrative: z4.string().optional() }).catchall(z4.any());
|
246
|
+
var EndorsementSubjectValidator = z4.object({
|
247
|
+
id: z4.string(),
|
248
|
+
type: z4.string().array().nonempty(),
|
249
|
+
endorsementComment: z4.string().optional()
|
182
250
|
});
|
183
251
|
var EndorsementCredentialValidator = UnsignedVCValidator.extend({
|
184
252
|
credentialSubject: EndorsementSubjectValidator,
|
185
253
|
proof: ProofValidator.or(ProofValidator.array()).optional()
|
186
254
|
});
|
187
|
-
var RelatedValidator =
|
188
|
-
id:
|
189
|
-
"@language":
|
190
|
-
version:
|
255
|
+
var RelatedValidator = z4.object({
|
256
|
+
id: z4.string(),
|
257
|
+
"@language": z4.string().optional(),
|
258
|
+
version: z4.string().optional()
|
191
259
|
});
|
192
|
-
var ResultTypeValidator =
|
260
|
+
var ResultTypeValidator = z4.enum([
|
193
261
|
"GradePointAverage",
|
194
262
|
"LetterGrade",
|
195
263
|
"Percent",
|
@@ -202,59 +270,59 @@ var ResultTypeValidator = z2.enum([
|
|
202
270
|
"RubricScore",
|
203
271
|
"ScaledScore",
|
204
272
|
"Status"
|
205
|
-
]).or(
|
206
|
-
var RubricCriterionValidator =
|
207
|
-
id:
|
208
|
-
type:
|
273
|
+
]).or(z4.string());
|
274
|
+
var RubricCriterionValidator = z4.object({
|
275
|
+
id: z4.string(),
|
276
|
+
type: z4.string().array().nonempty(),
|
209
277
|
alignment: AlignmentValidator.array().optional(),
|
210
|
-
description:
|
211
|
-
level:
|
212
|
-
name:
|
213
|
-
points:
|
214
|
-
}).catchall(
|
215
|
-
var ResultDescriptionValidator =
|
216
|
-
id:
|
217
|
-
type:
|
278
|
+
description: z4.string().optional(),
|
279
|
+
level: z4.string().optional(),
|
280
|
+
name: z4.string(),
|
281
|
+
points: z4.string().optional()
|
282
|
+
}).catchall(z4.any());
|
283
|
+
var ResultDescriptionValidator = z4.object({
|
284
|
+
id: z4.string(),
|
285
|
+
type: z4.string().array().nonempty(),
|
218
286
|
alignment: AlignmentValidator.array().optional(),
|
219
|
-
allowedValue:
|
220
|
-
name:
|
221
|
-
requiredLevel:
|
222
|
-
requiredValue:
|
287
|
+
allowedValue: z4.string().array().optional(),
|
288
|
+
name: z4.string(),
|
289
|
+
requiredLevel: z4.string().optional(),
|
290
|
+
requiredValue: z4.string().optional(),
|
223
291
|
resultType: ResultTypeValidator,
|
224
292
|
rubricCriterionLevel: RubricCriterionValidator.array().optional(),
|
225
|
-
valueMax:
|
226
|
-
valueMin:
|
227
|
-
}).catchall(
|
228
|
-
var AchievementValidator =
|
229
|
-
id:
|
230
|
-
type:
|
293
|
+
valueMax: z4.string().optional(),
|
294
|
+
valueMin: z4.string().optional()
|
295
|
+
}).catchall(z4.any());
|
296
|
+
var AchievementValidator = z4.object({
|
297
|
+
id: z4.string().optional(),
|
298
|
+
type: z4.string().array().nonempty(),
|
231
299
|
alignment: AlignmentValidator.array().optional(),
|
232
300
|
achievementType: AchievementTypeValidator.optional(),
|
233
301
|
creator: ProfileValidator.optional(),
|
234
|
-
creditsAvailable:
|
302
|
+
creditsAvailable: z4.number().optional(),
|
235
303
|
criteria: CriteriaValidator,
|
236
|
-
description:
|
304
|
+
description: z4.string(),
|
237
305
|
endorsement: EndorsementCredentialValidator.array().optional(),
|
238
|
-
fieldOfStudy:
|
239
|
-
humanCode:
|
306
|
+
fieldOfStudy: z4.string().optional(),
|
307
|
+
humanCode: z4.string().optional(),
|
240
308
|
image: ImageValidator.optional(),
|
241
|
-
"@language":
|
242
|
-
name:
|
309
|
+
"@language": z4.string().optional(),
|
310
|
+
name: z4.string(),
|
243
311
|
otherIdentifier: IdentifierEntryValidator.array().optional(),
|
244
312
|
related: RelatedValidator.array().optional(),
|
245
313
|
resultDescription: ResultDescriptionValidator.array().optional(),
|
246
|
-
specialization:
|
247
|
-
tag:
|
248
|
-
version:
|
249
|
-
}).catchall(
|
250
|
-
var IdentityObjectValidator =
|
251
|
-
type:
|
252
|
-
hashed:
|
253
|
-
identityHash:
|
254
|
-
identityType:
|
255
|
-
salt:
|
256
|
-
});
|
257
|
-
var ResultStatusTypeValidator =
|
314
|
+
specialization: z4.string().optional(),
|
315
|
+
tag: z4.string().array().optional(),
|
316
|
+
version: z4.string().optional()
|
317
|
+
}).catchall(z4.any());
|
318
|
+
var IdentityObjectValidator = z4.object({
|
319
|
+
type: z4.string(),
|
320
|
+
hashed: z4.boolean(),
|
321
|
+
identityHash: z4.string(),
|
322
|
+
identityType: z4.string(),
|
323
|
+
salt: z4.string().optional()
|
324
|
+
});
|
325
|
+
var ResultStatusTypeValidator = z4.enum([
|
258
326
|
"Completed",
|
259
327
|
"Enrolled",
|
260
328
|
"Failed",
|
@@ -262,42 +330,42 @@ var ResultStatusTypeValidator = z2.enum([
|
|
262
330
|
"OnHold",
|
263
331
|
"Withdrew"
|
264
332
|
]);
|
265
|
-
var ResultValidator =
|
266
|
-
type:
|
267
|
-
achievedLevel:
|
333
|
+
var ResultValidator = z4.object({
|
334
|
+
type: z4.string().array().nonempty(),
|
335
|
+
achievedLevel: z4.string().optional(),
|
268
336
|
alignment: AlignmentValidator.array().optional(),
|
269
|
-
resultDescription:
|
337
|
+
resultDescription: z4.string().optional(),
|
270
338
|
status: ResultStatusTypeValidator.optional(),
|
271
|
-
value:
|
272
|
-
}).catchall(
|
273
|
-
var AchievementSubjectValidator =
|
274
|
-
id:
|
275
|
-
type:
|
276
|
-
activityEndDate:
|
277
|
-
activityStartDate:
|
278
|
-
creditsEarned:
|
339
|
+
value: z4.string().optional()
|
340
|
+
}).catchall(z4.any());
|
341
|
+
var AchievementSubjectValidator = z4.object({
|
342
|
+
id: z4.string().optional(),
|
343
|
+
type: z4.string().array().nonempty(),
|
344
|
+
activityEndDate: z4.string().optional(),
|
345
|
+
activityStartDate: z4.string().optional(),
|
346
|
+
creditsEarned: z4.number().optional(),
|
279
347
|
achievement: AchievementValidator.optional(),
|
280
348
|
identifier: IdentityObjectValidator.array().optional(),
|
281
349
|
image: ImageValidator.optional(),
|
282
|
-
licenseNumber:
|
283
|
-
narrative:
|
350
|
+
licenseNumber: z4.string().optional(),
|
351
|
+
narrative: z4.string().optional(),
|
284
352
|
result: ResultValidator.array().optional(),
|
285
|
-
role:
|
353
|
+
role: z4.string().optional(),
|
286
354
|
source: ProfileValidator.optional(),
|
287
|
-
term:
|
288
|
-
}).catchall(
|
289
|
-
var EvidenceValidator =
|
290
|
-
id:
|
291
|
-
type:
|
292
|
-
narrative:
|
293
|
-
name:
|
294
|
-
description:
|
295
|
-
genre:
|
296
|
-
audience:
|
297
|
-
}).catchall(
|
355
|
+
term: z4.string().optional()
|
356
|
+
}).catchall(z4.any());
|
357
|
+
var EvidenceValidator = z4.object({
|
358
|
+
id: z4.string().optional(),
|
359
|
+
type: z4.string().array().nonempty(),
|
360
|
+
narrative: z4.string().optional(),
|
361
|
+
name: z4.string().optional(),
|
362
|
+
description: z4.string().optional(),
|
363
|
+
genre: z4.string().optional(),
|
364
|
+
audience: z4.string().optional()
|
365
|
+
}).catchall(z4.any());
|
298
366
|
var UnsignedAchievementCredentialValidator = UnsignedVCValidator.extend({
|
299
|
-
name:
|
300
|
-
description:
|
367
|
+
name: z4.string().optional(),
|
368
|
+
description: z4.string().optional(),
|
301
369
|
image: ImageValidator.optional(),
|
302
370
|
credentialSubject: AchievementSubjectValidator.or(AchievementSubjectValidator.array()),
|
303
371
|
endorsement: UnsignedVCValidator.array().optional(),
|
@@ -308,307 +376,280 @@ var AchievementCredentialValidator = UnsignedAchievementCredentialValidator.exte
|
|
308
376
|
});
|
309
377
|
|
310
378
|
// src/learncard.ts
|
311
|
-
import { z as
|
312
|
-
var VerificationCheckValidator =
|
313
|
-
checks:
|
314
|
-
warnings:
|
315
|
-
errors:
|
379
|
+
import { z as z5 } from "zod";
|
380
|
+
var VerificationCheckValidator = z5.object({
|
381
|
+
checks: z5.string().array(),
|
382
|
+
warnings: z5.string().array(),
|
383
|
+
errors: z5.string().array()
|
316
384
|
});
|
317
|
-
var VerificationStatusValidator =
|
385
|
+
var VerificationStatusValidator = z5.enum(["Success", "Failed", "Error"]);
|
318
386
|
var VerificationStatusEnum = VerificationStatusValidator.enum;
|
319
|
-
var VerificationItemValidator =
|
320
|
-
check:
|
387
|
+
var VerificationItemValidator = z5.object({
|
388
|
+
check: z5.string(),
|
321
389
|
status: VerificationStatusValidator,
|
322
|
-
message:
|
323
|
-
details:
|
390
|
+
message: z5.string().optional(),
|
391
|
+
details: z5.string().optional()
|
324
392
|
});
|
325
|
-
var CredentialInfoValidator =
|
326
|
-
title:
|
327
|
-
createdAt:
|
393
|
+
var CredentialInfoValidator = z5.object({
|
394
|
+
title: z5.string().optional(),
|
395
|
+
createdAt: z5.string().optional(),
|
328
396
|
issuer: ProfileValidator.optional(),
|
329
397
|
issuee: ProfileValidator.optional(),
|
330
398
|
credentialSubject: CredentialSubjectValidator.optional()
|
331
399
|
});
|
332
|
-
var CredentialRecordValidator =
|
400
|
+
var CredentialRecordValidator = z5.object({ id: z5.string(), uri: z5.string() }).catchall(z5.any());
|
333
401
|
|
334
402
|
// src/learncloud.ts
|
335
|
-
import { z as
|
403
|
+
import { z as z7 } from "zod";
|
336
404
|
|
337
405
|
// src/mongo.ts
|
338
|
-
import { z as
|
339
|
-
var PaginationOptionsValidator =
|
340
|
-
limit:
|
341
|
-
cursor:
|
342
|
-
sort:
|
343
|
-
});
|
344
|
-
var PaginationResponseValidator = z4.object({
|
345
|
-
cursor: z4.string().optional(),
|
346
|
-
hasMore: z4.boolean()
|
347
|
-
});
|
348
|
-
|
349
|
-
// src/crypto.ts
|
350
|
-
import { z as z5 } from "zod";
|
351
|
-
var JWKValidator = z5.object({
|
352
|
-
kty: z5.string(),
|
353
|
-
crv: z5.string(),
|
354
|
-
x: z5.string(),
|
355
|
-
y: z5.string().optional(),
|
356
|
-
n: z5.string().optional(),
|
357
|
-
d: z5.string()
|
358
|
-
});
|
359
|
-
var JWERecipientHeaderValidator = z5.object({
|
360
|
-
alg: z5.string(),
|
361
|
-
iv: z5.string(),
|
362
|
-
tag: z5.string(),
|
363
|
-
epk: JWKValidator.partial().optional(),
|
364
|
-
kid: z5.string().optional(),
|
365
|
-
apv: z5.string().optional(),
|
366
|
-
apu: z5.string().optional()
|
406
|
+
import { z as z6 } from "zod";
|
407
|
+
var PaginationOptionsValidator = z6.object({
|
408
|
+
limit: z6.number(),
|
409
|
+
cursor: z6.string().optional(),
|
410
|
+
sort: z6.string().optional()
|
367
411
|
});
|
368
|
-
var
|
369
|
-
|
370
|
-
|
371
|
-
});
|
372
|
-
var JWEValidator = z5.object({
|
373
|
-
protected: z5.string(),
|
374
|
-
iv: z5.string(),
|
375
|
-
ciphertext: z5.string(),
|
376
|
-
tag: z5.string(),
|
377
|
-
aad: z5.string().optional(),
|
378
|
-
recipients: JWERecipientValidator.array().optional()
|
412
|
+
var PaginationResponseValidator = z6.object({
|
413
|
+
cursor: z6.string().optional(),
|
414
|
+
hasMore: z6.boolean()
|
379
415
|
});
|
380
416
|
|
381
417
|
// src/learncloud.ts
|
382
|
-
var EncryptedRecordValidator =
|
418
|
+
var EncryptedRecordValidator = z7.object({ encryptedRecord: JWEValidator, fields: z7.string().array() }).catchall(z7.any());
|
383
419
|
var PaginatedEncryptedRecordsValidator = PaginationResponseValidator.extend({
|
384
420
|
records: EncryptedRecordValidator.array()
|
385
421
|
});
|
386
422
|
var EncryptedCredentialRecordValidator = EncryptedRecordValidator.extend({
|
387
|
-
id:
|
423
|
+
id: z7.string()
|
388
424
|
});
|
389
425
|
var PaginatedEncryptedCredentialRecordsValidator = PaginationResponseValidator.extend({
|
390
426
|
records: EncryptedCredentialRecordValidator.array()
|
391
427
|
});
|
392
428
|
|
393
429
|
// src/lcn.ts
|
394
|
-
import { z as
|
395
|
-
var LCNProfileValidator =
|
396
|
-
profileId:
|
397
|
-
displayName:
|
398
|
-
|
399
|
-
|
400
|
-
|
401
|
-
|
402
|
-
|
403
|
-
|
430
|
+
import { z as z8 } from "zod";
|
431
|
+
var LCNProfileValidator = z8.object({
|
432
|
+
profileId: z8.string().min(3).max(40),
|
433
|
+
displayName: z8.string().default(""),
|
434
|
+
shortBio: z8.string().default(""),
|
435
|
+
bio: z8.string().default(""),
|
436
|
+
did: z8.string(),
|
437
|
+
email: z8.string().optional(),
|
438
|
+
image: z8.string().optional(),
|
439
|
+
heroImage: z8.string().optional(),
|
440
|
+
websiteLink: z8.string().optional(),
|
441
|
+
isServiceProfile: z8.boolean().default(false).optional(),
|
442
|
+
type: z8.string().optional(),
|
443
|
+
notificationsWebhook: z8.string().url().startsWith("https://").optional()
|
404
444
|
});
|
405
445
|
var PaginatedLCNProfilesValidator = PaginationResponseValidator.extend({
|
406
446
|
records: LCNProfileValidator.array()
|
407
447
|
});
|
408
|
-
var LCNProfileConnectionStatusEnum =
|
448
|
+
var LCNProfileConnectionStatusEnum = z8.enum([
|
409
449
|
"CONNECTED",
|
410
450
|
"PENDING_REQUEST_SENT",
|
411
451
|
"PENDING_REQUEST_RECEIVED",
|
412
452
|
"NOT_CONNECTED"
|
413
453
|
]);
|
414
|
-
var SentCredentialInfoValidator =
|
415
|
-
uri:
|
416
|
-
to:
|
417
|
-
from:
|
418
|
-
sent:
|
419
|
-
received:
|
420
|
-
});
|
421
|
-
var LCNBoostStatus =
|
422
|
-
var BoostValidator =
|
423
|
-
uri:
|
424
|
-
name:
|
425
|
-
type:
|
426
|
-
category:
|
454
|
+
var SentCredentialInfoValidator = z8.object({
|
455
|
+
uri: z8.string(),
|
456
|
+
to: z8.string(),
|
457
|
+
from: z8.string(),
|
458
|
+
sent: z8.string().datetime(),
|
459
|
+
received: z8.string().datetime().optional()
|
460
|
+
});
|
461
|
+
var LCNBoostStatus = z8.enum(["DRAFT", "LIVE"]);
|
462
|
+
var BoostValidator = z8.object({
|
463
|
+
uri: z8.string(),
|
464
|
+
name: z8.string().optional(),
|
465
|
+
type: z8.string().optional(),
|
466
|
+
category: z8.string().optional(),
|
427
467
|
status: LCNBoostStatus.optional(),
|
428
|
-
autoConnectRecipients:
|
468
|
+
autoConnectRecipients: z8.boolean().optional()
|
429
469
|
});
|
430
|
-
var BoostRecipientValidator =
|
470
|
+
var BoostRecipientValidator = z8.object({
|
431
471
|
to: LCNProfileValidator,
|
432
|
-
from:
|
433
|
-
received:
|
434
|
-
});
|
435
|
-
var LCNNotificationTypeEnumValidator = z7.enum([
|
436
|
-
"CONNECTION_REQUEST",
|
437
|
-
"CONNECTION_ACCEPTED",
|
438
|
-
"CREDENTIAL_RECEIVED",
|
439
|
-
"CREDENTIAL_ACCEPTED",
|
440
|
-
"BOOST_RECEIVED",
|
441
|
-
"BOOST_ACCEPTED",
|
442
|
-
"PRESENTATION_REQUEST",
|
443
|
-
"PRESENTATION_RECEIVED"
|
444
|
-
]);
|
445
|
-
var LCNNotificationMessageValidator = z7.object({
|
446
|
-
title: z7.string().optional(),
|
447
|
-
body: z7.string().optional()
|
448
|
-
});
|
449
|
-
var LCNNotificationDataValidator = z7.object({
|
450
|
-
vcUris: z7.array(z7.string()).optional(),
|
451
|
-
vpUris: z7.array(z7.string()).optional()
|
452
|
-
});
|
453
|
-
var LCNNotificationValidator = z7.object({
|
454
|
-
type: LCNNotificationTypeEnumValidator,
|
455
|
-
to: LCNProfileValidator.partial().and(z7.object({ did: z7.string() })),
|
456
|
-
from: LCNProfileValidator.partial().and(z7.object({ did: z7.string() })),
|
457
|
-
message: LCNNotificationMessageValidator.optional(),
|
458
|
-
data: LCNNotificationDataValidator.optional(),
|
459
|
-
sent: z7.string().datetime().optional()
|
472
|
+
from: z8.string(),
|
473
|
+
received: z8.string().optional()
|
460
474
|
});
|
461
|
-
var LCNBoostClaimLinkSigningAuthorityValidator =
|
462
|
-
endpoint:
|
463
|
-
name:
|
464
|
-
did:
|
475
|
+
var LCNBoostClaimLinkSigningAuthorityValidator = z8.object({
|
476
|
+
endpoint: z8.string(),
|
477
|
+
name: z8.string(),
|
478
|
+
did: z8.string().optional()
|
465
479
|
});
|
466
|
-
var LCNBoostClaimLinkOptionsValidator =
|
467
|
-
ttlSeconds:
|
468
|
-
totalUses:
|
480
|
+
var LCNBoostClaimLinkOptionsValidator = z8.object({
|
481
|
+
ttlSeconds: z8.number().optional(),
|
482
|
+
totalUses: z8.number().optional()
|
469
483
|
});
|
470
|
-
var LCNSigningAuthorityValidator =
|
471
|
-
endpoint:
|
484
|
+
var LCNSigningAuthorityValidator = z8.object({
|
485
|
+
endpoint: z8.string()
|
472
486
|
});
|
473
|
-
var LCNSigningAuthorityForUserValidator =
|
487
|
+
var LCNSigningAuthorityForUserValidator = z8.object({
|
474
488
|
signingAuthority: LCNSigningAuthorityValidator,
|
475
|
-
relationship:
|
476
|
-
name:
|
489
|
+
relationship: z8.object({
|
490
|
+
name: z8.string().max(15).regex(/^[a-z0-9-]+$/, {
|
477
491
|
message: "The input string must contain only lowercase letters, numbers, and hyphens."
|
478
492
|
}),
|
479
|
-
did:
|
493
|
+
did: z8.string()
|
480
494
|
})
|
481
495
|
});
|
482
|
-
var ConsentFlowTermsStatusValidator =
|
483
|
-
var ConsentFlowContractValidator =
|
484
|
-
read:
|
485
|
-
anonymize:
|
486
|
-
credentials:
|
487
|
-
personal:
|
496
|
+
var ConsentFlowTermsStatusValidator = z8.enum(["live", "stale", "withdrawn"]);
|
497
|
+
var ConsentFlowContractValidator = z8.object({
|
498
|
+
read: z8.object({
|
499
|
+
anonymize: z8.boolean().optional(),
|
500
|
+
credentials: z8.object({ categories: z8.record(z8.object({ required: z8.boolean() })).default({}) }).default({}),
|
501
|
+
personal: z8.record(z8.object({ required: z8.boolean() })).default({})
|
488
502
|
}).default({}),
|
489
|
-
write:
|
490
|
-
credentials:
|
491
|
-
personal:
|
503
|
+
write: z8.object({
|
504
|
+
credentials: z8.object({ categories: z8.record(z8.object({ required: z8.boolean() })).default({}) }).default({}),
|
505
|
+
personal: z8.record(z8.object({ required: z8.boolean() })).default({})
|
492
506
|
}).default({})
|
493
507
|
});
|
494
|
-
var ConsentFlowContractDetailsValidator =
|
508
|
+
var ConsentFlowContractDetailsValidator = z8.object({
|
495
509
|
contract: ConsentFlowContractValidator,
|
496
510
|
owner: LCNProfileValidator,
|
497
|
-
name:
|
498
|
-
subtitle:
|
499
|
-
description:
|
500
|
-
reasonForAccessing:
|
501
|
-
image:
|
502
|
-
uri:
|
503
|
-
createdAt:
|
504
|
-
updatedAt:
|
505
|
-
expiresAt:
|
511
|
+
name: z8.string(),
|
512
|
+
subtitle: z8.string().optional(),
|
513
|
+
description: z8.string().optional(),
|
514
|
+
reasonForAccessing: z8.string().optional(),
|
515
|
+
image: z8.string().optional(),
|
516
|
+
uri: z8.string(),
|
517
|
+
createdAt: z8.string(),
|
518
|
+
updatedAt: z8.string(),
|
519
|
+
expiresAt: z8.string().optional()
|
506
520
|
});
|
507
521
|
var PaginatedConsentFlowContractsValidator = PaginationResponseValidator.extend({
|
508
522
|
records: ConsentFlowContractDetailsValidator.omit({ owner: true }).array()
|
509
523
|
});
|
510
|
-
var ConsentFlowContractDataValidator =
|
511
|
-
credentials:
|
512
|
-
personal:
|
513
|
-
date:
|
524
|
+
var ConsentFlowContractDataValidator = z8.object({
|
525
|
+
credentials: z8.object({ categories: z8.record(z8.string().array()).default({}) }),
|
526
|
+
personal: z8.record(z8.string()).default({}),
|
527
|
+
date: z8.string()
|
514
528
|
});
|
515
529
|
var PaginatedConsentFlowDataValidator = PaginationResponseValidator.extend({
|
516
530
|
records: ConsentFlowContractDataValidator.array()
|
517
531
|
});
|
518
|
-
var
|
519
|
-
|
520
|
-
|
521
|
-
|
522
|
-
|
523
|
-
|
524
|
-
|
525
|
-
|
526
|
-
|
527
|
-
|
528
|
-
|
529
|
-
|
530
|
-
).default({})
|
532
|
+
var ConsentFlowTermValidator = z8.object({
|
533
|
+
sharing: z8.boolean().optional(),
|
534
|
+
shared: z8.string().array().optional(),
|
535
|
+
shareAll: z8.boolean().optional(),
|
536
|
+
shareUntil: z8.string().optional()
|
537
|
+
});
|
538
|
+
var ConsentFlowTermsValidator = z8.object({
|
539
|
+
read: z8.object({
|
540
|
+
anonymize: z8.boolean().optional(),
|
541
|
+
credentials: z8.object({
|
542
|
+
shareAll: z8.boolean().optional(),
|
543
|
+
sharing: z8.boolean().optional(),
|
544
|
+
categories: z8.record(ConsentFlowTermValidator).default({})
|
531
545
|
}).default({}),
|
532
|
-
personal:
|
546
|
+
personal: z8.record(z8.string()).default({})
|
533
547
|
}).default({}),
|
534
|
-
write:
|
535
|
-
credentials:
|
536
|
-
personal:
|
548
|
+
write: z8.object({
|
549
|
+
credentials: z8.object({ categories: z8.record(z8.boolean()).default({}) }).default({}),
|
550
|
+
personal: z8.record(z8.boolean()).default({})
|
537
551
|
}).default({})
|
538
552
|
});
|
539
553
|
var PaginatedConsentFlowTermsValidator = PaginationResponseValidator.extend({
|
540
|
-
records:
|
541
|
-
expiresAt:
|
542
|
-
oneTime:
|
554
|
+
records: z8.object({
|
555
|
+
expiresAt: z8.string().optional(),
|
556
|
+
oneTime: z8.boolean().optional(),
|
543
557
|
terms: ConsentFlowTermsValidator,
|
544
558
|
contract: ConsentFlowContractDetailsValidator,
|
545
|
-
uri:
|
559
|
+
uri: z8.string(),
|
546
560
|
consenter: LCNProfileValidator,
|
547
561
|
status: ConsentFlowTermsStatusValidator
|
548
562
|
}).array()
|
549
563
|
});
|
550
|
-
var ConsentFlowContractQueryValidator =
|
551
|
-
read:
|
552
|
-
anonymize:
|
553
|
-
credentials:
|
554
|
-
categories:
|
564
|
+
var ConsentFlowContractQueryValidator = z8.object({
|
565
|
+
read: z8.object({
|
566
|
+
anonymize: z8.boolean().optional(),
|
567
|
+
credentials: z8.object({
|
568
|
+
categories: z8.record(z8.object({ required: z8.boolean().optional() })).optional()
|
555
569
|
}).optional(),
|
556
|
-
personal:
|
570
|
+
personal: z8.record(z8.object({ required: z8.boolean().optional() })).optional()
|
557
571
|
}).optional(),
|
558
|
-
write:
|
559
|
-
credentials:
|
560
|
-
categories:
|
572
|
+
write: z8.object({
|
573
|
+
credentials: z8.object({
|
574
|
+
categories: z8.record(z8.object({ required: z8.boolean().optional() })).optional()
|
561
575
|
}).optional(),
|
562
|
-
personal:
|
576
|
+
personal: z8.record(z8.object({ required: z8.boolean().optional() })).optional()
|
563
577
|
}).optional()
|
564
578
|
});
|
565
|
-
var
|
566
|
-
|
567
|
-
|
568
|
-
|
569
|
-
|
570
|
-
|
571
|
-
|
572
|
-
|
573
|
-
|
574
|
-
|
575
|
-
|
576
|
-
|
577
|
-
).optional()
|
579
|
+
var ConsentFlowDataQueryValidator = z8.object({
|
580
|
+
anonymize: z8.boolean().optional(),
|
581
|
+
credentials: z8.object({ categories: z8.record(z8.boolean()).optional() }).optional(),
|
582
|
+
personal: z8.record(z8.boolean()).optional()
|
583
|
+
});
|
584
|
+
var ConsentFlowTermsQueryValidator = z8.object({
|
585
|
+
read: z8.object({
|
586
|
+
anonymize: z8.boolean().optional(),
|
587
|
+
credentials: z8.object({
|
588
|
+
shareAll: z8.boolean().optional(),
|
589
|
+
sharing: z8.boolean().optional(),
|
590
|
+
categories: z8.record(ConsentFlowTermValidator.optional()).optional()
|
578
591
|
}).optional(),
|
579
|
-
personal:
|
592
|
+
personal: z8.record(z8.string()).optional()
|
580
593
|
}).optional(),
|
581
|
-
write:
|
582
|
-
credentials:
|
583
|
-
personal:
|
594
|
+
write: z8.object({
|
595
|
+
credentials: z8.object({ categories: z8.record(z8.boolean()).optional() }).optional(),
|
596
|
+
personal: z8.record(z8.boolean()).optional()
|
584
597
|
}).optional()
|
585
598
|
});
|
586
|
-
var ConsentFlowTransactionActionValidator =
|
599
|
+
var ConsentFlowTransactionActionValidator = z8.enum([
|
587
600
|
"consent",
|
588
601
|
"update",
|
589
602
|
"sync",
|
590
603
|
"withdraw"
|
591
604
|
]);
|
592
|
-
var ConsentFlowTransactionsQueryValidator =
|
605
|
+
var ConsentFlowTransactionsQueryValidator = z8.object({
|
593
606
|
terms: ConsentFlowTermsQueryValidator.optional(),
|
594
607
|
action: ConsentFlowTransactionActionValidator.or(
|
595
608
|
ConsentFlowTransactionActionValidator.array()
|
596
609
|
).optional(),
|
597
|
-
date:
|
598
|
-
expiresAt:
|
599
|
-
oneTime:
|
610
|
+
date: z8.object({ $gt: z8.string() }).or(z8.object({ $lt: z8.string() })).or(z8.object({ $eq: z8.string() })).optional(),
|
611
|
+
expiresAt: z8.object({ $gt: z8.string() }).or(z8.object({ $lt: z8.string() })).or(z8.object({ $eq: z8.string() })).optional(),
|
612
|
+
oneTime: z8.boolean().optional()
|
600
613
|
});
|
601
|
-
var ConsentFlowTransactionValidator =
|
602
|
-
expiresAt:
|
603
|
-
oneTime:
|
614
|
+
var ConsentFlowTransactionValidator = z8.object({
|
615
|
+
expiresAt: z8.string().optional(),
|
616
|
+
oneTime: z8.boolean().optional(),
|
604
617
|
terms: ConsentFlowTermsValidator.optional(),
|
605
|
-
id:
|
618
|
+
id: z8.string(),
|
606
619
|
action: ConsentFlowTransactionActionValidator,
|
607
|
-
date:
|
620
|
+
date: z8.string()
|
608
621
|
});
|
609
622
|
var PaginatedConsentFlowTransactionsValidator = PaginationResponseValidator.extend({
|
610
623
|
records: ConsentFlowTransactionValidator.array()
|
611
624
|
});
|
625
|
+
var LCNNotificationTypeEnumValidator = z8.enum([
|
626
|
+
"CONNECTION_REQUEST",
|
627
|
+
"CONNECTION_ACCEPTED",
|
628
|
+
"CREDENTIAL_RECEIVED",
|
629
|
+
"CREDENTIAL_ACCEPTED",
|
630
|
+
"BOOST_RECEIVED",
|
631
|
+
"BOOST_ACCEPTED",
|
632
|
+
"PRESENTATION_REQUEST",
|
633
|
+
"PRESENTATION_RECEIVED",
|
634
|
+
"CONSENT_FLOW_TRANSACTION"
|
635
|
+
]);
|
636
|
+
var LCNNotificationMessageValidator = z8.object({
|
637
|
+
title: z8.string().optional(),
|
638
|
+
body: z8.string().optional()
|
639
|
+
});
|
640
|
+
var LCNNotificationDataValidator = z8.object({
|
641
|
+
vcUris: z8.array(z8.string()).optional(),
|
642
|
+
vpUris: z8.array(z8.string()).optional(),
|
643
|
+
transaction: ConsentFlowTransactionValidator.optional()
|
644
|
+
});
|
645
|
+
var LCNNotificationValidator = z8.object({
|
646
|
+
type: LCNNotificationTypeEnumValidator,
|
647
|
+
to: LCNProfileValidator.partial().and(z8.object({ did: z8.string() })),
|
648
|
+
from: LCNProfileValidator.partial().and(z8.object({ did: z8.string() })),
|
649
|
+
message: LCNNotificationMessageValidator.optional(),
|
650
|
+
data: LCNNotificationDataValidator.optional(),
|
651
|
+
sent: z8.string().datetime().optional()
|
652
|
+
});
|
612
653
|
export {
|
613
654
|
AchievementCredentialValidator,
|
614
655
|
AchievementCriteriaValidator,
|
@@ -624,6 +665,8 @@ export {
|
|
624
665
|
ConsentFlowContractDetailsValidator,
|
625
666
|
ConsentFlowContractQueryValidator,
|
626
667
|
ConsentFlowContractValidator,
|
668
|
+
ConsentFlowDataQueryValidator,
|
669
|
+
ConsentFlowTermValidator,
|
627
670
|
ConsentFlowTermsQueryValidator,
|
628
671
|
ConsentFlowTermsStatusValidator,
|
629
672
|
ConsentFlowTermsValidator,
|
@@ -637,6 +680,7 @@ export {
|
|
637
680
|
CredentialStatusValidator,
|
638
681
|
CredentialSubjectValidator,
|
639
682
|
CriteriaValidator,
|
683
|
+
DidDocumentValidator,
|
640
684
|
EncryptedCredentialRecordValidator,
|
641
685
|
EncryptedRecordValidator,
|
642
686
|
EndorsementCredentialValidator,
|
@@ -682,6 +726,7 @@ export {
|
|
682
726
|
ResultValidator,
|
683
727
|
RubricCriterionValidator,
|
684
728
|
SentCredentialInfoValidator,
|
729
|
+
ServiceValidator,
|
685
730
|
UnsignedAchievementCredentialValidator,
|
686
731
|
UnsignedVCValidator,
|
687
732
|
UnsignedVPValidator,
|
@@ -689,6 +734,7 @@ export {
|
|
689
734
|
VPValidator,
|
690
735
|
VerificationCheckValidator,
|
691
736
|
VerificationItemValidator,
|
737
|
+
VerificationMethodValidator,
|
692
738
|
VerificationStatusEnum,
|
693
739
|
VerificationStatusValidator
|
694
740
|
};
|