@learncard/types 5.5.0 → 5.5.2
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 +1382 -346
- package/dist/lcn.d.ts.map +1 -1
- package/dist/types.cjs.development.js +122 -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 +348 -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,307 +376,286 @@ 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("http").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
|
431
|
-
|
432
|
-
from: z7.string(),
|
433
|
-
received: z7.string().optional()
|
470
|
+
var PaginatedBoostsValidator = PaginationResponseValidator.extend({
|
471
|
+
records: BoostValidator.array()
|
434
472
|
});
|
435
|
-
var
|
436
|
-
|
437
|
-
|
438
|
-
|
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()
|
473
|
+
var BoostRecipientValidator = z8.object({
|
474
|
+
to: LCNProfileValidator,
|
475
|
+
from: z8.string(),
|
476
|
+
received: z8.string().optional()
|
452
477
|
});
|
453
|
-
var
|
454
|
-
|
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()
|
478
|
+
var PaginatedBoostRecipientsValidator = PaginationResponseValidator.extend({
|
479
|
+
records: BoostRecipientValidator.array()
|
460
480
|
});
|
461
|
-
var LCNBoostClaimLinkSigningAuthorityValidator =
|
462
|
-
endpoint:
|
463
|
-
name:
|
464
|
-
did:
|
481
|
+
var LCNBoostClaimLinkSigningAuthorityValidator = z8.object({
|
482
|
+
endpoint: z8.string(),
|
483
|
+
name: z8.string(),
|
484
|
+
did: z8.string().optional()
|
465
485
|
});
|
466
|
-
var LCNBoostClaimLinkOptionsValidator =
|
467
|
-
ttlSeconds:
|
468
|
-
totalUses:
|
486
|
+
var LCNBoostClaimLinkOptionsValidator = z8.object({
|
487
|
+
ttlSeconds: z8.number().optional(),
|
488
|
+
totalUses: z8.number().optional()
|
469
489
|
});
|
470
|
-
var LCNSigningAuthorityValidator =
|
471
|
-
endpoint:
|
490
|
+
var LCNSigningAuthorityValidator = z8.object({
|
491
|
+
endpoint: z8.string()
|
472
492
|
});
|
473
|
-
var LCNSigningAuthorityForUserValidator =
|
493
|
+
var LCNSigningAuthorityForUserValidator = z8.object({
|
474
494
|
signingAuthority: LCNSigningAuthorityValidator,
|
475
|
-
relationship:
|
476
|
-
name:
|
495
|
+
relationship: z8.object({
|
496
|
+
name: z8.string().max(15).regex(/^[a-z0-9-]+$/, {
|
477
497
|
message: "The input string must contain only lowercase letters, numbers, and hyphens."
|
478
498
|
}),
|
479
|
-
did:
|
499
|
+
did: z8.string()
|
480
500
|
})
|
481
501
|
});
|
482
|
-
var ConsentFlowTermsStatusValidator =
|
483
|
-
var ConsentFlowContractValidator =
|
484
|
-
read:
|
485
|
-
anonymize:
|
486
|
-
credentials:
|
487
|
-
personal:
|
502
|
+
var ConsentFlowTermsStatusValidator = z8.enum(["live", "stale", "withdrawn"]);
|
503
|
+
var ConsentFlowContractValidator = z8.object({
|
504
|
+
read: z8.object({
|
505
|
+
anonymize: z8.boolean().optional(),
|
506
|
+
credentials: z8.object({ categories: z8.record(z8.object({ required: z8.boolean() })).default({}) }).default({}),
|
507
|
+
personal: z8.record(z8.object({ required: z8.boolean() })).default({})
|
488
508
|
}).default({}),
|
489
|
-
write:
|
490
|
-
credentials:
|
491
|
-
personal:
|
509
|
+
write: z8.object({
|
510
|
+
credentials: z8.object({ categories: z8.record(z8.object({ required: z8.boolean() })).default({}) }).default({}),
|
511
|
+
personal: z8.record(z8.object({ required: z8.boolean() })).default({})
|
492
512
|
}).default({})
|
493
513
|
});
|
494
|
-
var ConsentFlowContractDetailsValidator =
|
514
|
+
var ConsentFlowContractDetailsValidator = z8.object({
|
495
515
|
contract: ConsentFlowContractValidator,
|
496
516
|
owner: LCNProfileValidator,
|
497
|
-
name:
|
498
|
-
subtitle:
|
499
|
-
description:
|
500
|
-
reasonForAccessing:
|
501
|
-
image:
|
502
|
-
uri:
|
503
|
-
createdAt:
|
504
|
-
updatedAt:
|
505
|
-
expiresAt:
|
517
|
+
name: z8.string(),
|
518
|
+
subtitle: z8.string().optional(),
|
519
|
+
description: z8.string().optional(),
|
520
|
+
reasonForAccessing: z8.string().optional(),
|
521
|
+
image: z8.string().optional(),
|
522
|
+
uri: z8.string(),
|
523
|
+
createdAt: z8.string(),
|
524
|
+
updatedAt: z8.string(),
|
525
|
+
expiresAt: z8.string().optional()
|
506
526
|
});
|
507
527
|
var PaginatedConsentFlowContractsValidator = PaginationResponseValidator.extend({
|
508
528
|
records: ConsentFlowContractDetailsValidator.omit({ owner: true }).array()
|
509
529
|
});
|
510
|
-
var ConsentFlowContractDataValidator =
|
511
|
-
credentials:
|
512
|
-
personal:
|
513
|
-
date:
|
530
|
+
var ConsentFlowContractDataValidator = z8.object({
|
531
|
+
credentials: z8.object({ categories: z8.record(z8.string().array()).default({}) }),
|
532
|
+
personal: z8.record(z8.string()).default({}),
|
533
|
+
date: z8.string()
|
514
534
|
});
|
515
535
|
var PaginatedConsentFlowDataValidator = PaginationResponseValidator.extend({
|
516
536
|
records: ConsentFlowContractDataValidator.array()
|
517
537
|
});
|
518
|
-
var
|
519
|
-
|
520
|
-
|
521
|
-
|
522
|
-
|
523
|
-
|
524
|
-
|
525
|
-
|
526
|
-
|
527
|
-
|
528
|
-
|
529
|
-
|
530
|
-
).default({})
|
538
|
+
var ConsentFlowTermValidator = z8.object({
|
539
|
+
sharing: z8.boolean().optional(),
|
540
|
+
shared: z8.string().array().optional(),
|
541
|
+
shareAll: z8.boolean().optional(),
|
542
|
+
shareUntil: z8.string().optional()
|
543
|
+
});
|
544
|
+
var ConsentFlowTermsValidator = z8.object({
|
545
|
+
read: z8.object({
|
546
|
+
anonymize: z8.boolean().optional(),
|
547
|
+
credentials: z8.object({
|
548
|
+
shareAll: z8.boolean().optional(),
|
549
|
+
sharing: z8.boolean().optional(),
|
550
|
+
categories: z8.record(ConsentFlowTermValidator).default({})
|
531
551
|
}).default({}),
|
532
|
-
personal:
|
552
|
+
personal: z8.record(z8.string()).default({})
|
533
553
|
}).default({}),
|
534
|
-
write:
|
535
|
-
credentials:
|
536
|
-
personal:
|
554
|
+
write: z8.object({
|
555
|
+
credentials: z8.object({ categories: z8.record(z8.boolean()).default({}) }).default({}),
|
556
|
+
personal: z8.record(z8.boolean()).default({})
|
537
557
|
}).default({})
|
538
558
|
});
|
539
559
|
var PaginatedConsentFlowTermsValidator = PaginationResponseValidator.extend({
|
540
|
-
records:
|
541
|
-
expiresAt:
|
542
|
-
oneTime:
|
560
|
+
records: z8.object({
|
561
|
+
expiresAt: z8.string().optional(),
|
562
|
+
oneTime: z8.boolean().optional(),
|
543
563
|
terms: ConsentFlowTermsValidator,
|
544
564
|
contract: ConsentFlowContractDetailsValidator,
|
545
|
-
uri:
|
565
|
+
uri: z8.string(),
|
546
566
|
consenter: LCNProfileValidator,
|
547
567
|
status: ConsentFlowTermsStatusValidator
|
548
568
|
}).array()
|
549
569
|
});
|
550
|
-
var ConsentFlowContractQueryValidator =
|
551
|
-
read:
|
552
|
-
anonymize:
|
553
|
-
credentials:
|
554
|
-
categories:
|
570
|
+
var ConsentFlowContractQueryValidator = z8.object({
|
571
|
+
read: z8.object({
|
572
|
+
anonymize: z8.boolean().optional(),
|
573
|
+
credentials: z8.object({
|
574
|
+
categories: z8.record(z8.object({ required: z8.boolean().optional() })).optional()
|
555
575
|
}).optional(),
|
556
|
-
personal:
|
576
|
+
personal: z8.record(z8.object({ required: z8.boolean().optional() })).optional()
|
557
577
|
}).optional(),
|
558
|
-
write:
|
559
|
-
credentials:
|
560
|
-
categories:
|
578
|
+
write: z8.object({
|
579
|
+
credentials: z8.object({
|
580
|
+
categories: z8.record(z8.object({ required: z8.boolean().optional() })).optional()
|
561
581
|
}).optional(),
|
562
|
-
personal:
|
582
|
+
personal: z8.record(z8.object({ required: z8.boolean().optional() })).optional()
|
563
583
|
}).optional()
|
564
584
|
});
|
565
|
-
var
|
566
|
-
|
567
|
-
|
568
|
-
|
569
|
-
|
570
|
-
|
571
|
-
|
572
|
-
|
573
|
-
|
574
|
-
|
575
|
-
|
576
|
-
|
577
|
-
).optional()
|
585
|
+
var ConsentFlowDataQueryValidator = z8.object({
|
586
|
+
anonymize: z8.boolean().optional(),
|
587
|
+
credentials: z8.object({ categories: z8.record(z8.boolean()).optional() }).optional(),
|
588
|
+
personal: z8.record(z8.boolean()).optional()
|
589
|
+
});
|
590
|
+
var ConsentFlowTermsQueryValidator = z8.object({
|
591
|
+
read: z8.object({
|
592
|
+
anonymize: z8.boolean().optional(),
|
593
|
+
credentials: z8.object({
|
594
|
+
shareAll: z8.boolean().optional(),
|
595
|
+
sharing: z8.boolean().optional(),
|
596
|
+
categories: z8.record(ConsentFlowTermValidator.optional()).optional()
|
578
597
|
}).optional(),
|
579
|
-
personal:
|
598
|
+
personal: z8.record(z8.string()).optional()
|
580
599
|
}).optional(),
|
581
|
-
write:
|
582
|
-
credentials:
|
583
|
-
personal:
|
600
|
+
write: z8.object({
|
601
|
+
credentials: z8.object({ categories: z8.record(z8.boolean()).optional() }).optional(),
|
602
|
+
personal: z8.record(z8.boolean()).optional()
|
584
603
|
}).optional()
|
585
604
|
});
|
586
|
-
var ConsentFlowTransactionActionValidator =
|
605
|
+
var ConsentFlowTransactionActionValidator = z8.enum([
|
587
606
|
"consent",
|
588
607
|
"update",
|
589
608
|
"sync",
|
590
609
|
"withdraw"
|
591
610
|
]);
|
592
|
-
var ConsentFlowTransactionsQueryValidator =
|
611
|
+
var ConsentFlowTransactionsQueryValidator = z8.object({
|
593
612
|
terms: ConsentFlowTermsQueryValidator.optional(),
|
594
613
|
action: ConsentFlowTransactionActionValidator.or(
|
595
614
|
ConsentFlowTransactionActionValidator.array()
|
596
615
|
).optional(),
|
597
|
-
date:
|
598
|
-
expiresAt:
|
599
|
-
oneTime:
|
616
|
+
date: z8.object({ $gt: z8.string() }).or(z8.object({ $lt: z8.string() })).or(z8.object({ $eq: z8.string() })).optional(),
|
617
|
+
expiresAt: z8.object({ $gt: z8.string() }).or(z8.object({ $lt: z8.string() })).or(z8.object({ $eq: z8.string() })).optional(),
|
618
|
+
oneTime: z8.boolean().optional()
|
600
619
|
});
|
601
|
-
var ConsentFlowTransactionValidator =
|
602
|
-
expiresAt:
|
603
|
-
oneTime:
|
620
|
+
var ConsentFlowTransactionValidator = z8.object({
|
621
|
+
expiresAt: z8.string().optional(),
|
622
|
+
oneTime: z8.boolean().optional(),
|
604
623
|
terms: ConsentFlowTermsValidator.optional(),
|
605
|
-
id:
|
624
|
+
id: z8.string(),
|
606
625
|
action: ConsentFlowTransactionActionValidator,
|
607
|
-
date:
|
626
|
+
date: z8.string()
|
608
627
|
});
|
609
628
|
var PaginatedConsentFlowTransactionsValidator = PaginationResponseValidator.extend({
|
610
629
|
records: ConsentFlowTransactionValidator.array()
|
611
630
|
});
|
631
|
+
var LCNNotificationTypeEnumValidator = z8.enum([
|
632
|
+
"CONNECTION_REQUEST",
|
633
|
+
"CONNECTION_ACCEPTED",
|
634
|
+
"CREDENTIAL_RECEIVED",
|
635
|
+
"CREDENTIAL_ACCEPTED",
|
636
|
+
"BOOST_RECEIVED",
|
637
|
+
"BOOST_ACCEPTED",
|
638
|
+
"PRESENTATION_REQUEST",
|
639
|
+
"PRESENTATION_RECEIVED",
|
640
|
+
"CONSENT_FLOW_TRANSACTION"
|
641
|
+
]);
|
642
|
+
var LCNNotificationMessageValidator = z8.object({
|
643
|
+
title: z8.string().optional(),
|
644
|
+
body: z8.string().optional()
|
645
|
+
});
|
646
|
+
var LCNNotificationDataValidator = z8.object({
|
647
|
+
vcUris: z8.array(z8.string()).optional(),
|
648
|
+
vpUris: z8.array(z8.string()).optional(),
|
649
|
+
transaction: ConsentFlowTransactionValidator.optional()
|
650
|
+
});
|
651
|
+
var LCNNotificationValidator = z8.object({
|
652
|
+
type: LCNNotificationTypeEnumValidator,
|
653
|
+
to: LCNProfileValidator.partial().and(z8.object({ did: z8.string() })),
|
654
|
+
from: LCNProfileValidator.partial().and(z8.object({ did: z8.string() })),
|
655
|
+
message: LCNNotificationMessageValidator.optional(),
|
656
|
+
data: LCNNotificationDataValidator.optional(),
|
657
|
+
sent: z8.string().datetime().optional()
|
658
|
+
});
|
612
659
|
export {
|
613
660
|
AchievementCredentialValidator,
|
614
661
|
AchievementCriteriaValidator,
|
@@ -624,6 +671,8 @@ export {
|
|
624
671
|
ConsentFlowContractDetailsValidator,
|
625
672
|
ConsentFlowContractQueryValidator,
|
626
673
|
ConsentFlowContractValidator,
|
674
|
+
ConsentFlowDataQueryValidator,
|
675
|
+
ConsentFlowTermValidator,
|
627
676
|
ConsentFlowTermsQueryValidator,
|
628
677
|
ConsentFlowTermsStatusValidator,
|
629
678
|
ConsentFlowTermsValidator,
|
@@ -637,6 +686,7 @@ export {
|
|
637
686
|
CredentialStatusValidator,
|
638
687
|
CredentialSubjectValidator,
|
639
688
|
CriteriaValidator,
|
689
|
+
DidDocumentValidator,
|
640
690
|
EncryptedCredentialRecordValidator,
|
641
691
|
EncryptedRecordValidator,
|
642
692
|
EndorsementCredentialValidator,
|
@@ -663,6 +713,8 @@ export {
|
|
663
713
|
LCNProfileValidator,
|
664
714
|
LCNSigningAuthorityForUserValidator,
|
665
715
|
LCNSigningAuthorityValidator,
|
716
|
+
PaginatedBoostRecipientsValidator,
|
717
|
+
PaginatedBoostsValidator,
|
666
718
|
PaginatedConsentFlowContractsValidator,
|
667
719
|
PaginatedConsentFlowDataValidator,
|
668
720
|
PaginatedConsentFlowTermsValidator,
|
@@ -682,6 +734,7 @@ export {
|
|
682
734
|
ResultValidator,
|
683
735
|
RubricCriterionValidator,
|
684
736
|
SentCredentialInfoValidator,
|
737
|
+
ServiceValidator,
|
685
738
|
UnsignedAchievementCredentialValidator,
|
686
739
|
UnsignedVCValidator,
|
687
740
|
UnsignedVPValidator,
|
@@ -689,6 +742,7 @@ export {
|
|
689
742
|
VPValidator,
|
690
743
|
VerificationCheckValidator,
|
691
744
|
VerificationItemValidator,
|
745
|
+
VerificationMethodValidator,
|
692
746
|
VerificationStatusEnum,
|
693
747
|
VerificationStatusValidator
|
694
748
|
};
|