@learncard/types 5.4.1 → 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/mongo.d.ts +3 -0
- package/dist/mongo.d.ts.map +1 -1
- package/dist/types.cjs.development.js +116 -72
- 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 -294
- 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,306 +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
|
-
|
343
|
-
var PaginationResponseValidator = z4.object({
|
344
|
-
cursor: z4.string().optional(),
|
345
|
-
hasMore: z4.boolean()
|
346
|
-
});
|
347
|
-
|
348
|
-
// src/crypto.ts
|
349
|
-
import { z as z5 } from "zod";
|
350
|
-
var JWKValidator = z5.object({
|
351
|
-
kty: z5.string(),
|
352
|
-
crv: z5.string(),
|
353
|
-
x: z5.string(),
|
354
|
-
y: z5.string().optional(),
|
355
|
-
n: z5.string().optional(),
|
356
|
-
d: z5.string()
|
357
|
-
});
|
358
|
-
var JWERecipientHeaderValidator = z5.object({
|
359
|
-
alg: z5.string(),
|
360
|
-
iv: z5.string(),
|
361
|
-
tag: z5.string(),
|
362
|
-
epk: JWKValidator.partial().optional(),
|
363
|
-
kid: z5.string().optional(),
|
364
|
-
apv: z5.string().optional(),
|
365
|
-
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()
|
366
411
|
});
|
367
|
-
var
|
368
|
-
|
369
|
-
|
370
|
-
});
|
371
|
-
var JWEValidator = z5.object({
|
372
|
-
protected: z5.string(),
|
373
|
-
iv: z5.string(),
|
374
|
-
ciphertext: z5.string(),
|
375
|
-
tag: z5.string(),
|
376
|
-
aad: z5.string().optional(),
|
377
|
-
recipients: JWERecipientValidator.array().optional()
|
412
|
+
var PaginationResponseValidator = z6.object({
|
413
|
+
cursor: z6.string().optional(),
|
414
|
+
hasMore: z6.boolean()
|
378
415
|
});
|
379
416
|
|
380
417
|
// src/learncloud.ts
|
381
|
-
var EncryptedRecordValidator =
|
418
|
+
var EncryptedRecordValidator = z7.object({ encryptedRecord: JWEValidator, fields: z7.string().array() }).catchall(z7.any());
|
382
419
|
var PaginatedEncryptedRecordsValidator = PaginationResponseValidator.extend({
|
383
420
|
records: EncryptedRecordValidator.array()
|
384
421
|
});
|
385
422
|
var EncryptedCredentialRecordValidator = EncryptedRecordValidator.extend({
|
386
|
-
id:
|
423
|
+
id: z7.string()
|
387
424
|
});
|
388
425
|
var PaginatedEncryptedCredentialRecordsValidator = PaginationResponseValidator.extend({
|
389
426
|
records: EncryptedCredentialRecordValidator.array()
|
390
427
|
});
|
391
428
|
|
392
429
|
// src/lcn.ts
|
393
|
-
import { z as
|
394
|
-
var LCNProfileValidator =
|
395
|
-
profileId:
|
396
|
-
displayName:
|
397
|
-
|
398
|
-
|
399
|
-
|
400
|
-
|
401
|
-
|
402
|
-
|
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()
|
403
444
|
});
|
404
445
|
var PaginatedLCNProfilesValidator = PaginationResponseValidator.extend({
|
405
446
|
records: LCNProfileValidator.array()
|
406
447
|
});
|
407
|
-
var LCNProfileConnectionStatusEnum =
|
448
|
+
var LCNProfileConnectionStatusEnum = z8.enum([
|
408
449
|
"CONNECTED",
|
409
450
|
"PENDING_REQUEST_SENT",
|
410
451
|
"PENDING_REQUEST_RECEIVED",
|
411
452
|
"NOT_CONNECTED"
|
412
453
|
]);
|
413
|
-
var SentCredentialInfoValidator =
|
414
|
-
uri:
|
415
|
-
to:
|
416
|
-
from:
|
417
|
-
sent:
|
418
|
-
received:
|
419
|
-
});
|
420
|
-
var LCNBoostStatus =
|
421
|
-
var BoostValidator =
|
422
|
-
uri:
|
423
|
-
name:
|
424
|
-
type:
|
425
|
-
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(),
|
426
467
|
status: LCNBoostStatus.optional(),
|
427
|
-
autoConnectRecipients:
|
468
|
+
autoConnectRecipients: z8.boolean().optional()
|
428
469
|
});
|
429
|
-
var BoostRecipientValidator =
|
470
|
+
var BoostRecipientValidator = z8.object({
|
430
471
|
to: LCNProfileValidator,
|
431
|
-
from:
|
432
|
-
received:
|
433
|
-
});
|
434
|
-
var LCNNotificationTypeEnumValidator = z7.enum([
|
435
|
-
"CONNECTION_REQUEST",
|
436
|
-
"CONNECTION_ACCEPTED",
|
437
|
-
"CREDENTIAL_RECEIVED",
|
438
|
-
"CREDENTIAL_ACCEPTED",
|
439
|
-
"BOOST_RECEIVED",
|
440
|
-
"BOOST_ACCEPTED",
|
441
|
-
"PRESENTATION_REQUEST",
|
442
|
-
"PRESENTATION_RECEIVED"
|
443
|
-
]);
|
444
|
-
var LCNNotificationMessageValidator = z7.object({
|
445
|
-
title: z7.string().optional(),
|
446
|
-
body: z7.string().optional()
|
447
|
-
});
|
448
|
-
var LCNNotificationDataValidator = z7.object({
|
449
|
-
vcUris: z7.array(z7.string()).optional(),
|
450
|
-
vpUris: z7.array(z7.string()).optional()
|
451
|
-
});
|
452
|
-
var LCNNotificationValidator = z7.object({
|
453
|
-
type: LCNNotificationTypeEnumValidator,
|
454
|
-
to: LCNProfileValidator.partial().and(z7.object({ did: z7.string() })),
|
455
|
-
from: LCNProfileValidator.partial().and(z7.object({ did: z7.string() })),
|
456
|
-
message: LCNNotificationMessageValidator.optional(),
|
457
|
-
data: LCNNotificationDataValidator.optional(),
|
458
|
-
sent: z7.string().datetime().optional()
|
472
|
+
from: z8.string(),
|
473
|
+
received: z8.string().optional()
|
459
474
|
});
|
460
|
-
var LCNBoostClaimLinkSigningAuthorityValidator =
|
461
|
-
endpoint:
|
462
|
-
name:
|
463
|
-
did:
|
475
|
+
var LCNBoostClaimLinkSigningAuthorityValidator = z8.object({
|
476
|
+
endpoint: z8.string(),
|
477
|
+
name: z8.string(),
|
478
|
+
did: z8.string().optional()
|
464
479
|
});
|
465
|
-
var LCNBoostClaimLinkOptionsValidator =
|
466
|
-
ttlSeconds:
|
467
|
-
totalUses:
|
480
|
+
var LCNBoostClaimLinkOptionsValidator = z8.object({
|
481
|
+
ttlSeconds: z8.number().optional(),
|
482
|
+
totalUses: z8.number().optional()
|
468
483
|
});
|
469
|
-
var LCNSigningAuthorityValidator =
|
470
|
-
endpoint:
|
484
|
+
var LCNSigningAuthorityValidator = z8.object({
|
485
|
+
endpoint: z8.string()
|
471
486
|
});
|
472
|
-
var LCNSigningAuthorityForUserValidator =
|
487
|
+
var LCNSigningAuthorityForUserValidator = z8.object({
|
473
488
|
signingAuthority: LCNSigningAuthorityValidator,
|
474
|
-
relationship:
|
475
|
-
name:
|
489
|
+
relationship: z8.object({
|
490
|
+
name: z8.string().max(15).regex(/^[a-z0-9-]+$/, {
|
476
491
|
message: "The input string must contain only lowercase letters, numbers, and hyphens."
|
477
492
|
}),
|
478
|
-
did:
|
493
|
+
did: z8.string()
|
479
494
|
})
|
480
495
|
});
|
481
|
-
var ConsentFlowTermsStatusValidator =
|
482
|
-
var ConsentFlowContractValidator =
|
483
|
-
read:
|
484
|
-
anonymize:
|
485
|
-
credentials:
|
486
|
-
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({})
|
487
502
|
}).default({}),
|
488
|
-
write:
|
489
|
-
credentials:
|
490
|
-
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({})
|
491
506
|
}).default({})
|
492
507
|
});
|
493
|
-
var ConsentFlowContractDetailsValidator =
|
508
|
+
var ConsentFlowContractDetailsValidator = z8.object({
|
494
509
|
contract: ConsentFlowContractValidator,
|
495
510
|
owner: LCNProfileValidator,
|
496
|
-
name:
|
497
|
-
subtitle:
|
498
|
-
description:
|
499
|
-
reasonForAccessing:
|
500
|
-
image:
|
501
|
-
uri:
|
502
|
-
createdAt:
|
503
|
-
updatedAt:
|
504
|
-
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()
|
505
520
|
});
|
506
521
|
var PaginatedConsentFlowContractsValidator = PaginationResponseValidator.extend({
|
507
522
|
records: ConsentFlowContractDetailsValidator.omit({ owner: true }).array()
|
508
523
|
});
|
509
|
-
var ConsentFlowContractDataValidator =
|
510
|
-
credentials:
|
511
|
-
personal:
|
512
|
-
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()
|
513
528
|
});
|
514
529
|
var PaginatedConsentFlowDataValidator = PaginationResponseValidator.extend({
|
515
530
|
records: ConsentFlowContractDataValidator.array()
|
516
531
|
});
|
517
|
-
var
|
518
|
-
|
519
|
-
|
520
|
-
|
521
|
-
|
522
|
-
|
523
|
-
|
524
|
-
|
525
|
-
|
526
|
-
|
527
|
-
|
528
|
-
|
529
|
-
).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({})
|
530
545
|
}).default({}),
|
531
|
-
personal:
|
546
|
+
personal: z8.record(z8.string()).default({})
|
532
547
|
}).default({}),
|
533
|
-
write:
|
534
|
-
credentials:
|
535
|
-
personal:
|
548
|
+
write: z8.object({
|
549
|
+
credentials: z8.object({ categories: z8.record(z8.boolean()).default({}) }).default({}),
|
550
|
+
personal: z8.record(z8.boolean()).default({})
|
536
551
|
}).default({})
|
537
552
|
});
|
538
553
|
var PaginatedConsentFlowTermsValidator = PaginationResponseValidator.extend({
|
539
|
-
records:
|
540
|
-
expiresAt:
|
541
|
-
oneTime:
|
554
|
+
records: z8.object({
|
555
|
+
expiresAt: z8.string().optional(),
|
556
|
+
oneTime: z8.boolean().optional(),
|
542
557
|
terms: ConsentFlowTermsValidator,
|
543
558
|
contract: ConsentFlowContractDetailsValidator,
|
544
|
-
uri:
|
559
|
+
uri: z8.string(),
|
545
560
|
consenter: LCNProfileValidator,
|
546
561
|
status: ConsentFlowTermsStatusValidator
|
547
562
|
}).array()
|
548
563
|
});
|
549
|
-
var ConsentFlowContractQueryValidator =
|
550
|
-
read:
|
551
|
-
anonymize:
|
552
|
-
credentials:
|
553
|
-
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()
|
554
569
|
}).optional(),
|
555
|
-
personal:
|
570
|
+
personal: z8.record(z8.object({ required: z8.boolean().optional() })).optional()
|
556
571
|
}).optional(),
|
557
|
-
write:
|
558
|
-
credentials:
|
559
|
-
categories:
|
572
|
+
write: z8.object({
|
573
|
+
credentials: z8.object({
|
574
|
+
categories: z8.record(z8.object({ required: z8.boolean().optional() })).optional()
|
560
575
|
}).optional(),
|
561
|
-
personal:
|
576
|
+
personal: z8.record(z8.object({ required: z8.boolean().optional() })).optional()
|
562
577
|
}).optional()
|
563
578
|
});
|
564
|
-
var
|
565
|
-
|
566
|
-
|
567
|
-
|
568
|
-
|
569
|
-
|
570
|
-
|
571
|
-
|
572
|
-
|
573
|
-
|
574
|
-
|
575
|
-
|
576
|
-
).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()
|
577
591
|
}).optional(),
|
578
|
-
personal:
|
592
|
+
personal: z8.record(z8.string()).optional()
|
579
593
|
}).optional(),
|
580
|
-
write:
|
581
|
-
credentials:
|
582
|
-
personal:
|
594
|
+
write: z8.object({
|
595
|
+
credentials: z8.object({ categories: z8.record(z8.boolean()).optional() }).optional(),
|
596
|
+
personal: z8.record(z8.boolean()).optional()
|
583
597
|
}).optional()
|
584
598
|
});
|
585
|
-
var ConsentFlowTransactionActionValidator =
|
599
|
+
var ConsentFlowTransactionActionValidator = z8.enum([
|
586
600
|
"consent",
|
587
601
|
"update",
|
588
602
|
"sync",
|
589
603
|
"withdraw"
|
590
604
|
]);
|
591
|
-
var ConsentFlowTransactionsQueryValidator =
|
605
|
+
var ConsentFlowTransactionsQueryValidator = z8.object({
|
592
606
|
terms: ConsentFlowTermsQueryValidator.optional(),
|
593
607
|
action: ConsentFlowTransactionActionValidator.or(
|
594
608
|
ConsentFlowTransactionActionValidator.array()
|
595
609
|
).optional(),
|
596
|
-
date:
|
597
|
-
expiresAt:
|
598
|
-
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()
|
599
613
|
});
|
600
|
-
var ConsentFlowTransactionValidator =
|
601
|
-
expiresAt:
|
602
|
-
oneTime:
|
614
|
+
var ConsentFlowTransactionValidator = z8.object({
|
615
|
+
expiresAt: z8.string().optional(),
|
616
|
+
oneTime: z8.boolean().optional(),
|
603
617
|
terms: ConsentFlowTermsValidator.optional(),
|
604
|
-
id:
|
618
|
+
id: z8.string(),
|
605
619
|
action: ConsentFlowTransactionActionValidator,
|
606
|
-
date:
|
620
|
+
date: z8.string()
|
607
621
|
});
|
608
622
|
var PaginatedConsentFlowTransactionsValidator = PaginationResponseValidator.extend({
|
609
623
|
records: ConsentFlowTransactionValidator.array()
|
610
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
|
+
});
|
611
653
|
export {
|
612
654
|
AchievementCredentialValidator,
|
613
655
|
AchievementCriteriaValidator,
|
@@ -623,6 +665,8 @@ export {
|
|
623
665
|
ConsentFlowContractDetailsValidator,
|
624
666
|
ConsentFlowContractQueryValidator,
|
625
667
|
ConsentFlowContractValidator,
|
668
|
+
ConsentFlowDataQueryValidator,
|
669
|
+
ConsentFlowTermValidator,
|
626
670
|
ConsentFlowTermsQueryValidator,
|
627
671
|
ConsentFlowTermsStatusValidator,
|
628
672
|
ConsentFlowTermsValidator,
|
@@ -636,6 +680,7 @@ export {
|
|
636
680
|
CredentialStatusValidator,
|
637
681
|
CredentialSubjectValidator,
|
638
682
|
CriteriaValidator,
|
683
|
+
DidDocumentValidator,
|
639
684
|
EncryptedCredentialRecordValidator,
|
640
685
|
EncryptedRecordValidator,
|
641
686
|
EndorsementCredentialValidator,
|
@@ -681,6 +726,7 @@ export {
|
|
681
726
|
ResultValidator,
|
682
727
|
RubricCriterionValidator,
|
683
728
|
SentCredentialInfoValidator,
|
729
|
+
ServiceValidator,
|
684
730
|
UnsignedAchievementCredentialValidator,
|
685
731
|
UnsignedVCValidator,
|
686
732
|
UnsignedVPValidator,
|
@@ -688,6 +734,7 @@ export {
|
|
688
734
|
VPValidator,
|
689
735
|
VerificationCheckValidator,
|
690
736
|
VerificationItemValidator,
|
737
|
+
VerificationMethodValidator,
|
691
738
|
VerificationStatusEnum,
|
692
739
|
VerificationStatusValidator
|
693
740
|
};
|