@learncard/types 5.13.4 → 5.14.0
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/clr.d.ts +1027 -0
- package/dist/clr.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 +281 -5
- package/dist/lcn.d.ts.map +1 -1
- package/dist/types.cjs.development.js +167 -8
- package/dist/types.cjs.development.js.map +3 -3
- package/dist/types.cjs.production.min.js +6 -6
- package/dist/types.cjs.production.min.js.map +4 -4
- package/dist/types.esm.js +889 -729
- package/dist/types.esm.js.map +4 -4
- package/package.json +1 -1
|
@@ -42,6 +42,8 @@ __export(index_exports, {
|
|
|
42
42
|
AppStoreListingSubmitterValidator: () => AppStoreListingSubmitterValidator,
|
|
43
43
|
AppStoreListingUpdateValidator: () => AppStoreListingUpdateValidator,
|
|
44
44
|
AppStoreListingValidator: () => AppStoreListingValidator,
|
|
45
|
+
AssociationTypeValidator: () => AssociationTypeValidator,
|
|
46
|
+
AssociationValidator: () => AssociationValidator,
|
|
45
47
|
AuthGrantQueryValidator: () => AuthGrantQueryValidator,
|
|
46
48
|
AuthGrantStatusValidator: () => AuthGrantStatusValidator,
|
|
47
49
|
AuthGrantValidator: () => AuthGrantValidator,
|
|
@@ -60,6 +62,8 @@ __export(index_exports, {
|
|
|
60
62
|
ClaimHookValidator: () => ClaimHookValidator,
|
|
61
63
|
ClaimInboxCredentialValidator: () => ClaimInboxCredentialValidator,
|
|
62
64
|
ClaimTokenValidator: () => ClaimTokenValidator,
|
|
65
|
+
ClrCredentialValidator: () => ClrCredentialValidator,
|
|
66
|
+
ClrSubjectValidator: () => ClrSubjectValidator,
|
|
63
67
|
ConsentFlowContractDataForDidValidator: () => ConsentFlowContractDataForDidValidator,
|
|
64
68
|
ConsentFlowContractDataValidator: () => ConsentFlowContractDataValidator,
|
|
65
69
|
ConsentFlowContractDetailsValidator: () => ConsentFlowContractDetailsValidator,
|
|
@@ -118,17 +122,21 @@ __export(index_exports, {
|
|
|
118
122
|
FrameworkWithSkillsValidator: () => FrameworkWithSkillsValidator,
|
|
119
123
|
FullClaimHookValidator: () => FullClaimHookValidator,
|
|
120
124
|
GeoCoordinatesValidator: () => GeoCoordinatesValidator,
|
|
125
|
+
GetCounterEventValidator: () => GetCounterEventValidator,
|
|
126
|
+
GetCountersEventValidator: () => GetCountersEventValidator,
|
|
121
127
|
GetFullSkillTreeInputValidator: () => GetFullSkillTreeInputValidator,
|
|
122
128
|
GetFullSkillTreeResultValidator: () => GetFullSkillTreeResultValidator,
|
|
123
129
|
GetSkillPathInputValidator: () => GetSkillPathInputValidator,
|
|
124
130
|
GetSkillPathResultValidator: () => GetSkillPathResultValidator,
|
|
125
131
|
GetTemplateRecipientsEventValidator: () => GetTemplateRecipientsEventValidator,
|
|
132
|
+
GuardianStatusValidator: () => GuardianStatusValidator,
|
|
126
133
|
IdentifierEntryValidator: () => IdentifierEntryValidator,
|
|
127
134
|
IdentifierTypeValidator: () => IdentifierTypeValidator,
|
|
128
135
|
IdentityObjectValidator: () => IdentityObjectValidator,
|
|
129
136
|
ImageValidator: () => ImageValidator,
|
|
130
137
|
InboxCredentialQueryValidator: () => InboxCredentialQueryValidator,
|
|
131
138
|
InboxCredentialValidator: () => InboxCredentialValidator,
|
|
139
|
+
IncrementCounterEventValidator: () => IncrementCounterEventValidator,
|
|
132
140
|
InstalledAppValidator: () => InstalledAppValidator,
|
|
133
141
|
IssueInboxCredentialResponseValidator: () => IssueInboxCredentialResponseValidator,
|
|
134
142
|
IssueInboxCredentialValidator: () => IssueInboxCredentialValidator,
|
|
@@ -203,17 +211,20 @@ __export(index_exports, {
|
|
|
203
211
|
RelatedValidator: () => RelatedValidator,
|
|
204
212
|
ReplaceSkillFrameworkSkillsInputValidator: () => ReplaceSkillFrameworkSkillsInputValidator,
|
|
205
213
|
ReplaceSkillFrameworkSkillsResultValidator: () => ReplaceSkillFrameworkSkillsResultValidator,
|
|
214
|
+
RequestLearnerContextEventValidator: () => RequestLearnerContextEventValidator,
|
|
206
215
|
ResultDescriptionValidator: () => ResultDescriptionValidator,
|
|
207
216
|
ResultStatusTypeValidator: () => ResultStatusTypeValidator,
|
|
208
217
|
ResultTypeValidator: () => ResultTypeValidator,
|
|
209
218
|
ResultValidator: () => ResultValidator,
|
|
210
219
|
RubricCriterionValidator: () => RubricCriterionValidator,
|
|
220
|
+
SendAiSessionCredentialEventValidator: () => SendAiSessionCredentialEventValidator,
|
|
211
221
|
SendBoostInputValidator: () => SendBoostInputValidator,
|
|
212
222
|
SendBoostResponseValidator: () => SendBoostResponseValidator,
|
|
213
223
|
SendBrandingOptionsValidator: () => SendBrandingOptionsValidator,
|
|
214
224
|
SendCredentialEventValidator: () => SendCredentialEventValidator,
|
|
215
225
|
SendInboxResponseValidator: () => SendInboxResponseValidator,
|
|
216
226
|
SendInputValidator: () => SendInputValidator,
|
|
227
|
+
SendNotificationEventValidator: () => SendNotificationEventValidator,
|
|
217
228
|
SendOptionsValidator: () => SendOptionsValidator,
|
|
218
229
|
SendResponseValidator: () => SendResponseValidator,
|
|
219
230
|
SentCredentialInfoValidator: () => SentCredentialInfoValidator,
|
|
@@ -235,10 +246,13 @@ __export(index_exports, {
|
|
|
235
246
|
SkillTreeNodeValidator: () => SkillTreeNodeValidator,
|
|
236
247
|
SkillValidator: () => SkillValidator,
|
|
237
248
|
StringQuery: () => StringQuery,
|
|
249
|
+
SummaryCredentialDataValidator: () => SummaryCredentialDataValidator,
|
|
250
|
+
SummaryCredentialKeywordValidator: () => SummaryCredentialKeywordValidator,
|
|
238
251
|
SyncFrameworkInputValidator: () => SyncFrameworkInputValidator,
|
|
239
252
|
TagValidator: () => TagValidator,
|
|
240
253
|
TermsOfUseValidator: () => TermsOfUseValidator,
|
|
241
254
|
UnsignedAchievementCredentialValidator: () => UnsignedAchievementCredentialValidator,
|
|
255
|
+
UnsignedClrCredentialValidator: () => UnsignedClrCredentialValidator,
|
|
242
256
|
UnsignedVCValidator: () => UnsignedVCValidator,
|
|
243
257
|
UnsignedVPValidator: () => UnsignedVPValidator,
|
|
244
258
|
UpdateFrameworkInputValidator: () => UpdateFrameworkInputValidator,
|
|
@@ -13737,6 +13751,44 @@ var AchievementCredentialValidator = UnsignedAchievementCredentialValidator.exte
|
|
|
13737
13751
|
proof: ProofValidator.or(ProofValidator.array())
|
|
13738
13752
|
});
|
|
13739
13753
|
|
|
13754
|
+
// src/clr.ts
|
|
13755
|
+
var AssociationTypeValidator = external_exports.enum([
|
|
13756
|
+
"exactMatchOf",
|
|
13757
|
+
"extends",
|
|
13758
|
+
"isChildOf",
|
|
13759
|
+
"isParentOf",
|
|
13760
|
+
"isPartOf",
|
|
13761
|
+
"isPeerOf",
|
|
13762
|
+
"isRelatedTo",
|
|
13763
|
+
"precedes",
|
|
13764
|
+
"replacedBy"
|
|
13765
|
+
]).or(external_exports.string());
|
|
13766
|
+
var AssociationValidator = external_exports.object({
|
|
13767
|
+
type: external_exports.string().array().nonempty(),
|
|
13768
|
+
associationType: AssociationTypeValidator,
|
|
13769
|
+
sourceId: external_exports.string().optional(),
|
|
13770
|
+
targetId: external_exports.string()
|
|
13771
|
+
}).catchall(external_exports.any());
|
|
13772
|
+
var ClrSubjectValidator = external_exports.object({
|
|
13773
|
+
id: external_exports.string().optional(),
|
|
13774
|
+
type: external_exports.string().array().nonempty(),
|
|
13775
|
+
identifier: external_exports.any().array().optional(),
|
|
13776
|
+
achievement: AchievementValidator.array().optional(),
|
|
13777
|
+
association: AssociationValidator.array().optional(),
|
|
13778
|
+
verifiableCredential: external_exports.any().array().optional()
|
|
13779
|
+
}).catchall(external_exports.any());
|
|
13780
|
+
var UnsignedClrCredentialValidator = UnsignedVCValidator.extend({
|
|
13781
|
+
name: external_exports.string().optional(),
|
|
13782
|
+
description: external_exports.string().optional(),
|
|
13783
|
+
image: ImageValidator.optional(),
|
|
13784
|
+
credentialSubject: ClrSubjectValidator.or(ClrSubjectValidator.array()),
|
|
13785
|
+
endorsement: EndorsementCredentialValidator.array().optional(),
|
|
13786
|
+
partial: external_exports.boolean().optional()
|
|
13787
|
+
});
|
|
13788
|
+
var ClrCredentialValidator = UnsignedClrCredentialValidator.extend({
|
|
13789
|
+
proof: ProofValidator.or(ProofValidator.array())
|
|
13790
|
+
});
|
|
13791
|
+
|
|
13740
13792
|
// src/learncard.ts
|
|
13741
13793
|
var VerificationCheckValidator = external_exports.object({
|
|
13742
13794
|
checks: external_exports.string().array(),
|
|
@@ -14097,10 +14149,16 @@ var SendBrandingOptionsValidator = external_exports.object({
|
|
|
14097
14149
|
credentialName: external_exports.string().optional().describe("Display name for the credential"),
|
|
14098
14150
|
recipientName: external_exports.string().optional().describe("Name of the recipient for personalization")
|
|
14099
14151
|
});
|
|
14152
|
+
var GuardianStatusValidator = external_exports.enum([
|
|
14153
|
+
"AWAITING_GUARDIAN",
|
|
14154
|
+
"GUARDIAN_APPROVED",
|
|
14155
|
+
"GUARDIAN_REJECTED"
|
|
14156
|
+
]);
|
|
14100
14157
|
var SendOptionsValidator = external_exports.object({
|
|
14101
14158
|
webhookUrl: external_exports.string().url().optional().describe("Webhook URL to receive claim notifications"),
|
|
14102
14159
|
suppressDelivery: external_exports.boolean().optional().describe("If true, returns claimUrl without sending email/SMS"),
|
|
14103
|
-
branding: SendBrandingOptionsValidator.optional().describe("Branding for email/SMS delivery")
|
|
14160
|
+
branding: SendBrandingOptionsValidator.optional().describe("Branding for email/SMS delivery"),
|
|
14161
|
+
guardianEmail: external_exports.string().email().optional().describe("Guardian email that must approve before student can claim")
|
|
14104
14162
|
});
|
|
14105
14163
|
var SendBoostInputValidator = external_exports.object({
|
|
14106
14164
|
type: external_exports.literal("boost"),
|
|
@@ -14117,11 +14175,25 @@ var SendBoostInputValidator = external_exports.object({
|
|
|
14117
14175
|
}).refine((data) => data.templateUri || data.template || data.signedCredential, {
|
|
14118
14176
|
message: "Either templateUri, template, or signedCredential must be provided.",
|
|
14119
14177
|
path: ["templateUri"]
|
|
14120
|
-
})
|
|
14178
|
+
}).refine(
|
|
14179
|
+
(data) => {
|
|
14180
|
+
if (data.options?.guardianEmail) {
|
|
14181
|
+
return data.options.guardianEmail.toLowerCase() !== data.recipient.toLowerCase();
|
|
14182
|
+
}
|
|
14183
|
+
return true;
|
|
14184
|
+
},
|
|
14185
|
+
{
|
|
14186
|
+
message: "guardianEmail must differ from recipient (self-approval not allowed)",
|
|
14187
|
+
path: ["options", "guardianEmail"]
|
|
14188
|
+
}
|
|
14189
|
+
);
|
|
14121
14190
|
var SendInboxResponseValidator = external_exports.object({
|
|
14122
14191
|
issuanceId: external_exports.string(),
|
|
14123
14192
|
status: external_exports.enum(["PENDING", "ISSUED", "EXPIRED", "DELIVERED", "CLAIMED"]),
|
|
14124
|
-
claimUrl: external_exports.string().url().optional().describe("Present when suppressDelivery=true")
|
|
14193
|
+
claimUrl: external_exports.string().url().optional().describe("Present when suppressDelivery=true"),
|
|
14194
|
+
guardianStatus: GuardianStatusValidator.optional().describe(
|
|
14195
|
+
"Present when guardianEmail was specified"
|
|
14196
|
+
)
|
|
14125
14197
|
});
|
|
14126
14198
|
var SendBoostResponseValidator = external_exports.object({
|
|
14127
14199
|
type: external_exports.literal("boost"),
|
|
@@ -14358,7 +14430,11 @@ var LCNNotificationTypeEnumValidator = external_exports.enum([
|
|
|
14358
14430
|
"APP_LISTING_APPROVED",
|
|
14359
14431
|
"APP_LISTING_REJECTED",
|
|
14360
14432
|
"APP_LISTING_WITHDRAWN",
|
|
14361
|
-
"DEVICE_LINK_REQUEST"
|
|
14433
|
+
"DEVICE_LINK_REQUEST",
|
|
14434
|
+
"GUARDIAN_APPROVAL_PENDING",
|
|
14435
|
+
"GUARDIAN_APPROVED",
|
|
14436
|
+
"GUARDIAN_REJECTED",
|
|
14437
|
+
"APP_NOTIFICATION"
|
|
14362
14438
|
]);
|
|
14363
14439
|
var LCNNotificationMessageValidator = external_exports.object({
|
|
14364
14440
|
title: external_exports.string().optional(),
|
|
@@ -14396,7 +14472,10 @@ var LCNNotificationDataValidator = external_exports.object({
|
|
|
14396
14472
|
var LCNNotificationValidator = external_exports.object({
|
|
14397
14473
|
type: LCNNotificationTypeEnumValidator,
|
|
14398
14474
|
to: LCNProfileValidator.partial().and(external_exports.object({ did: external_exports.string() })),
|
|
14399
|
-
from:
|
|
14475
|
+
from: external_exports.union([
|
|
14476
|
+
external_exports.string(),
|
|
14477
|
+
LCNProfileValidator.partial().and(external_exports.object({ did: external_exports.string() }))
|
|
14478
|
+
]),
|
|
14400
14479
|
message: LCNNotificationMessageValidator.optional(),
|
|
14401
14480
|
data: LCNNotificationDataValidator.optional(),
|
|
14402
14481
|
sent: external_exports.iso.datetime().optional(),
|
|
@@ -14501,7 +14580,12 @@ var InboxCredentialValidator = external_exports.object({
|
|
|
14501
14580
|
signingAuthority: external_exports.object({
|
|
14502
14581
|
endpoint: external_exports.string().optional(),
|
|
14503
14582
|
name: external_exports.string().optional()
|
|
14504
|
-
}).optional()
|
|
14583
|
+
}).optional(),
|
|
14584
|
+
// Guardian gate fields (all optional — absent on pre-existing credentials)
|
|
14585
|
+
guardianEmail: external_exports.string().email().optional(),
|
|
14586
|
+
guardianStatus: GuardianStatusValidator.optional(),
|
|
14587
|
+
guardianApprovedAt: external_exports.string().optional(),
|
|
14588
|
+
guardianApprovedByDid: external_exports.string().optional()
|
|
14505
14589
|
});
|
|
14506
14590
|
var PaginatedInboxCredentialsValidator = external_exports.object({
|
|
14507
14591
|
hasMore: external_exports.boolean(),
|
|
@@ -14969,11 +15053,86 @@ var GetTemplateRecipientsEventValidator = external_exports.object({
|
|
|
14969
15053
|
}).refine((input) => Boolean(input.templateAlias) !== Boolean(input.boostUri), {
|
|
14970
15054
|
message: "Exactly one of templateAlias or boostUri is required"
|
|
14971
15055
|
});
|
|
15056
|
+
var RequestLearnerContextEventValidator = external_exports.object({
|
|
15057
|
+
type: external_exports.literal("request-learner-context"),
|
|
15058
|
+
includeCredentials: external_exports.boolean().optional().default(true),
|
|
15059
|
+
includePersonalData: external_exports.boolean().optional().default(false),
|
|
15060
|
+
format: external_exports.enum(["prompt", "structured"]).optional().default("prompt"),
|
|
15061
|
+
instructions: external_exports.string().optional(),
|
|
15062
|
+
detailLevel: external_exports.enum(["compact", "expanded"]).optional().default("compact")
|
|
15063
|
+
});
|
|
15064
|
+
var SummaryCredentialKeywordValidator = external_exports.object({
|
|
15065
|
+
occupations: external_exports.array(external_exports.string()).nullable(),
|
|
15066
|
+
careers: external_exports.array(external_exports.string()).nullable(),
|
|
15067
|
+
jobs: external_exports.array(external_exports.string()).nullable(),
|
|
15068
|
+
skills: external_exports.array(external_exports.string()).nullable(),
|
|
15069
|
+
fieldOfStudy: external_exports.string().nullable()
|
|
15070
|
+
});
|
|
15071
|
+
var SummaryCredentialDataValidator = external_exports.object({
|
|
15072
|
+
title: external_exports.string().describe("Short, concise title for the learning session or credential"),
|
|
15073
|
+
summary: external_exports.string().describe("Comprehensive summary of what happened during the session"),
|
|
15074
|
+
learned: external_exports.array(external_exports.string()).describe("Bullet points of key knowledge gained"),
|
|
15075
|
+
skills: external_exports.array(
|
|
15076
|
+
external_exports.object({
|
|
15077
|
+
title: external_exports.string().describe("Name of the skill category"),
|
|
15078
|
+
description: external_exports.string().describe("Detailed description of what this skill category involves")
|
|
15079
|
+
})
|
|
15080
|
+
).describe("Categorized skills learned during the session"),
|
|
15081
|
+
nextSteps: external_exports.array(
|
|
15082
|
+
external_exports.object({
|
|
15083
|
+
title: external_exports.string().describe("Title of the suggested next step"),
|
|
15084
|
+
description: external_exports.string().describe("Description explaining why this next step is recommended"),
|
|
15085
|
+
keywords: SummaryCredentialKeywordValidator.optional().describe(
|
|
15086
|
+
"Optional taxonomy keywords for occupations/careers/jobs/skills/fieldOfStudy. Omit if not relevant."
|
|
15087
|
+
)
|
|
15088
|
+
})
|
|
15089
|
+
).describe("Recommended follow-up activities or learning modules"),
|
|
15090
|
+
reflections: external_exports.array(
|
|
15091
|
+
external_exports.object({
|
|
15092
|
+
title: external_exports.string().describe("Title of the reflection"),
|
|
15093
|
+
description: external_exports.string().describe("Detailed description of what this reflection involves")
|
|
15094
|
+
})
|
|
15095
|
+
).describe("Reflections on the learning experience")
|
|
15096
|
+
});
|
|
15097
|
+
var SendAiSessionCredentialEventValidator = external_exports.object({
|
|
15098
|
+
type: external_exports.literal("send-ai-session-credential"),
|
|
15099
|
+
sessionTitle: external_exports.string(),
|
|
15100
|
+
summaryData: SummaryCredentialDataValidator,
|
|
15101
|
+
metadata: external_exports.record(external_exports.string(), external_exports.unknown()).optional()
|
|
15102
|
+
});
|
|
15103
|
+
var SendNotificationEventValidator = external_exports.object({
|
|
15104
|
+
type: external_exports.literal("send-notification"),
|
|
15105
|
+
title: external_exports.string().optional(),
|
|
15106
|
+
body: external_exports.string().optional(),
|
|
15107
|
+
actionPath: external_exports.string().optional(),
|
|
15108
|
+
category: external_exports.string().optional(),
|
|
15109
|
+
priority: external_exports.enum(["normal", "high"]).optional()
|
|
15110
|
+
});
|
|
15111
|
+
var counterKeyValidator = external_exports.string().min(1).max(64).regex(/^[a-zA-Z0-9_-]+$/, "Key must be alphanumeric with _ or -");
|
|
15112
|
+
var IncrementCounterEventValidator = external_exports.object({
|
|
15113
|
+
type: external_exports.literal("increment-counter"),
|
|
15114
|
+
key: counterKeyValidator,
|
|
15115
|
+
amount: external_exports.number().int().finite()
|
|
15116
|
+
});
|
|
15117
|
+
var GetCounterEventValidator = external_exports.object({
|
|
15118
|
+
type: external_exports.literal("get-counter"),
|
|
15119
|
+
key: counterKeyValidator
|
|
15120
|
+
});
|
|
15121
|
+
var GetCountersEventValidator = external_exports.object({
|
|
15122
|
+
type: external_exports.literal("get-counters"),
|
|
15123
|
+
keys: external_exports.array(counterKeyValidator).min(1).max(50).optional()
|
|
15124
|
+
});
|
|
14972
15125
|
var AppEventValidator = external_exports.discriminatedUnion("type", [
|
|
14973
15126
|
SendCredentialEventValidator,
|
|
14974
15127
|
CheckCredentialEventValidator,
|
|
14975
15128
|
CheckIssuanceStatusEventValidator,
|
|
14976
|
-
GetTemplateRecipientsEventValidator
|
|
15129
|
+
GetTemplateRecipientsEventValidator,
|
|
15130
|
+
RequestLearnerContextEventValidator,
|
|
15131
|
+
SendAiSessionCredentialEventValidator,
|
|
15132
|
+
SendNotificationEventValidator,
|
|
15133
|
+
IncrementCounterEventValidator,
|
|
15134
|
+
GetCounterEventValidator,
|
|
15135
|
+
GetCountersEventValidator
|
|
14977
15136
|
]);
|
|
14978
15137
|
var AppEventInputValidator = external_exports.object({
|
|
14979
15138
|
listingId: external_exports.string(),
|
|
@@ -15004,7 +15163,7 @@ var CredentialActivityValidator = external_exports.object({
|
|
|
15004
15163
|
activityId: external_exports.string(),
|
|
15005
15164
|
eventType: CredentialActivityEventTypeValidator,
|
|
15006
15165
|
timestamp: external_exports.string(),
|
|
15007
|
-
actorProfileId: external_exports.string(),
|
|
15166
|
+
actorProfileId: external_exports.string().optional(),
|
|
15008
15167
|
recipientType: CredentialActivityRecipientTypeValidator,
|
|
15009
15168
|
recipientIdentifier: external_exports.string(),
|
|
15010
15169
|
boostUri: external_exports.string().optional(),
|