@learncard/types 5.21.0 → 5.23.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/__tests__/unsupportedSignInOperation.test.d.ts +2 -0
- package/dist/__tests__/unsupportedSignInOperation.test.d.ts.map +1 -0
- package/dist/auth.d.ts +233 -5
- package/dist/auth.d.ts.map +1 -1
- package/dist/clr.d.ts +2 -2
- package/dist/clr.d.ts.map +1 -1
- package/dist/clr.test.d.ts +2 -0
- package/dist/clr.test.d.ts.map +1 -0
- package/dist/inAppMessages.d.ts +10 -10
- package/dist/index.d.cts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/lcn.d.ts +1638 -15
- package/dist/lcn.d.ts.map +1 -1
- package/dist/share-links.d.ts +1950 -0
- package/dist/share-links.d.ts.map +1 -0
- package/dist/types.cjs.development.cjs +873 -10
- package/dist/types.cjs.development.cjs.map +4 -4
- package/dist/types.cjs.production.min.cjs +33 -33
- package/dist/types.cjs.production.min.cjs.map +4 -4
- package/dist/types.esm.js +941 -76
- package/dist/types.esm.js.map +4 -4
- package/package.json +2 -1
- package/src/__tests__/unsupportedSignInOperation.test.ts +13 -0
- package/src/auth.ts +248 -4
- package/src/clr.test.ts +163 -0
- package/src/clr.ts +2 -1
- package/src/index.ts +1 -0
- package/src/lcn.ts +342 -5
- package/src/share-links.ts +931 -0
|
@@ -28,6 +28,8 @@ __export(index_exports, {
|
|
|
28
28
|
AchievementSubjectValidator: () => AchievementSubjectValidator,
|
|
29
29
|
AchievementTypeValidator: () => AchievementTypeValidator,
|
|
30
30
|
AchievementValidator: () => AchievementValidator,
|
|
31
|
+
AcknowledgeViewInputValidator: () => AcknowledgeViewInputValidator,
|
|
32
|
+
AcknowledgeViewOutputValidator: () => AcknowledgeViewOutputValidator,
|
|
31
33
|
AddTagInputValidator: () => AddTagInputValidator,
|
|
32
34
|
AddressValidator: () => AddressValidator,
|
|
33
35
|
AgeRatingValidator: () => AgeRatingValidator,
|
|
@@ -43,6 +45,12 @@ __export(index_exports, {
|
|
|
43
45
|
AppEventResponseValidator: () => AppEventResponseValidator,
|
|
44
46
|
AppEventValidator: () => AppEventValidator,
|
|
45
47
|
AppListingStatusValidator: () => AppListingStatusValidator,
|
|
48
|
+
AppManifestDiffValidator: () => AppManifestDiffValidator,
|
|
49
|
+
AppManifestTemplateChangeValidator: () => AppManifestTemplateChangeValidator,
|
|
50
|
+
AppManifestTemplateRefValidator: () => AppManifestTemplateRefValidator,
|
|
51
|
+
AppManifestValidator: () => AppManifestValidator,
|
|
52
|
+
AppManifestVersionStatusValidator: () => AppManifestVersionStatusValidator,
|
|
53
|
+
AppManifestVersionValidator: () => AppManifestVersionValidator,
|
|
46
54
|
AppStoreListingCreateValidator: () => AppStoreListingCreateValidator,
|
|
47
55
|
AppStoreListingSubmitterValidator: () => AppStoreListingSubmitterValidator,
|
|
48
56
|
AppStoreListingUpdateValidator: () => AppStoreListingUpdateValidator,
|
|
@@ -64,6 +72,8 @@ __export(index_exports, {
|
|
|
64
72
|
BoostRecipientValidator: () => BoostRecipientValidator,
|
|
65
73
|
BoostRecipientWithChildrenValidator: () => BoostRecipientWithChildrenValidator,
|
|
66
74
|
BoostValidator: () => BoostValidator,
|
|
75
|
+
CapturedConsentRecordValidator: () => CapturedConsentRecordValidator,
|
|
76
|
+
CapturedTemplateRecordValidator: () => CapturedTemplateRecordValidator,
|
|
67
77
|
CheckCredentialEventValidator: () => CheckCredentialEventValidator,
|
|
68
78
|
CheckIssuanceStatusEventValidator: () => CheckIssuanceStatusEventValidator,
|
|
69
79
|
ClaimHookQueryValidator: () => ClaimHookQueryValidator,
|
|
@@ -85,6 +95,7 @@ __export(index_exports, {
|
|
|
85
95
|
ConsentFlowDataForDidQueryValidator: () => ConsentFlowDataForDidQueryValidator,
|
|
86
96
|
ConsentFlowDataQueryValidator: () => ConsentFlowDataQueryValidator,
|
|
87
97
|
ConsentFlowGuardianApprovalValidator: () => ConsentFlowGuardianApprovalValidator,
|
|
98
|
+
ConsentFlowReferralValidator: () => ConsentFlowReferralValidator,
|
|
88
99
|
ConsentFlowTermValidator: () => ConsentFlowTermValidator,
|
|
89
100
|
ConsentFlowTermsQueryValidator: () => ConsentFlowTermsQueryValidator,
|
|
90
101
|
ConsentFlowTermsStatusValidator: () => ConsentFlowTermsStatusValidator,
|
|
@@ -92,6 +103,10 @@ __export(index_exports, {
|
|
|
92
103
|
ConsentFlowTransactionActionValidator: () => ConsentFlowTransactionActionValidator,
|
|
93
104
|
ConsentFlowTransactionValidator: () => ConsentFlowTransactionValidator,
|
|
94
105
|
ConsentFlowTransactionsQueryValidator: () => ConsentFlowTransactionsQueryValidator,
|
|
106
|
+
ConsentFlowWebhookMetadataValidator: () => ConsentFlowWebhookMetadataValidator,
|
|
107
|
+
ConsentRequestPersonalFieldValidator: () => ConsentRequestPersonalFieldValidator,
|
|
108
|
+
ConsentRequestValidator: () => ConsentRequestValidator,
|
|
109
|
+
ConsentRequestWalletCategoryValidator: () => ConsentRequestWalletCategoryValidator,
|
|
95
110
|
ContactMethodCreateValidator: () => ContactMethodCreateValidator,
|
|
96
111
|
ContactMethodQueryValidator: () => ContactMethodQueryValidator,
|
|
97
112
|
ContactMethodValidator: () => ContactMethodValidator,
|
|
@@ -99,12 +114,14 @@ __export(index_exports, {
|
|
|
99
114
|
ContactMethodVerificationValidator: () => ContactMethodVerificationValidator,
|
|
100
115
|
ContextValidator: () => ContextValidator,
|
|
101
116
|
ContractCredentialValidator: () => ContractCredentialValidator,
|
|
117
|
+
ContractRequestFieldsValidator: () => ContractRequestFieldsValidator,
|
|
102
118
|
CountSkillsInputValidator: () => CountSkillsInputValidator,
|
|
103
119
|
CountSkillsResultValidator: () => CountSkillsResultValidator,
|
|
104
120
|
CreateContactMethodSessionResponseValidator: () => CreateContactMethodSessionResponseValidator,
|
|
105
121
|
CreateContactMethodSessionValidator: () => CreateContactMethodSessionValidator,
|
|
106
122
|
CreateManagedFrameworkBatchInputValidator: () => CreateManagedFrameworkBatchInputValidator,
|
|
107
123
|
CreateManagedFrameworkInputValidator: () => CreateManagedFrameworkInputValidator,
|
|
124
|
+
CreateShareLinkInputValidator: () => CreateShareLinkInputValidator,
|
|
108
125
|
CreateSkillInputValidator: () => CreateSkillInputValidator,
|
|
109
126
|
CreateSkillsBatchInputValidator: () => CreateSkillsBatchInputValidator,
|
|
110
127
|
CredentialActivityEventTypeValidator: () => CredentialActivityEventTypeValidator,
|
|
@@ -133,13 +150,19 @@ __export(index_exports, {
|
|
|
133
150
|
CriteriaValidator: () => CriteriaValidator,
|
|
134
151
|
DEFAULT_BITSTRING_STATUS_LIST_SIZE: () => DEFAULT_BITSTRING_STATUS_LIST_SIZE,
|
|
135
152
|
DeleteFrameworkInputValidator: () => DeleteFrameworkInputValidator,
|
|
153
|
+
DeleteShareLinkAttachmentChunksInputValidator: () => DeleteShareLinkAttachmentChunksInputValidator,
|
|
154
|
+
DeleteShareLinkAttachmentChunksOutputValidator: () => DeleteShareLinkAttachmentChunksOutputValidator,
|
|
136
155
|
DeleteSkillInputValidator: () => DeleteSkillInputValidator,
|
|
137
156
|
DidDocumentValidator: () => DidDocumentValidator,
|
|
138
157
|
EMPTY_IN_APP_MESSAGES_FLAG: () => EMPTY_IN_APP_MESSAGES_FLAG,
|
|
158
|
+
ESCROW_PIN_LOCKED_MESSAGE: () => ESCROW_PIN_LOCKED_MESSAGE,
|
|
159
|
+
ESCROW_PIN_MISMATCH_PATTERN: () => ESCROW_PIN_MISMATCH_PATTERN,
|
|
160
|
+
ESCROW_PIN_UNAVAILABLE_MESSAGE: () => ESCROW_PIN_UNAVAILABLE_MESSAGE,
|
|
139
161
|
EncryptedCredentialRecordValidator: () => EncryptedCredentialRecordValidator,
|
|
140
162
|
EncryptedRecordValidator: () => EncryptedRecordValidator,
|
|
141
163
|
EndorsementCredentialValidator: () => EndorsementCredentialValidator,
|
|
142
164
|
EndorsementSubjectValidator: () => EndorsementSubjectValidator,
|
|
165
|
+
EscrowPinStatusValidator: () => EscrowPinStatusValidator,
|
|
143
166
|
EvidenceValidator: () => EvidenceValidator,
|
|
144
167
|
FlatAuthGrantValidator: () => FlatAuthGrantValidator,
|
|
145
168
|
FrameworkWithSkillsValidator: () => FrameworkWithSkillsValidator,
|
|
@@ -151,6 +174,7 @@ __export(index_exports, {
|
|
|
151
174
|
GetCredentialRefreshHistoryResultValidator: () => GetCredentialRefreshHistoryResultValidator,
|
|
152
175
|
GetFullSkillTreeInputValidator: () => GetFullSkillTreeInputValidator,
|
|
153
176
|
GetFullSkillTreeResultValidator: () => GetFullSkillTreeResultValidator,
|
|
177
|
+
GetShareLinkAttachmentChunkInputValidator: () => GetShareLinkAttachmentChunkInputValidator,
|
|
154
178
|
GetSkillPathInputValidator: () => GetSkillPathInputValidator,
|
|
155
179
|
GetSkillPathResultValidator: () => GetSkillPathResultValidator,
|
|
156
180
|
GetTemplateRecipientsEventValidator: () => GetTemplateRecipientsEventValidator,
|
|
@@ -168,6 +192,12 @@ __export(index_exports, {
|
|
|
168
192
|
InboxCredentialRefreshReceiptValidator: () => InboxCredentialRefreshReceiptValidator,
|
|
169
193
|
InboxCredentialValidator: () => InboxCredentialValidator,
|
|
170
194
|
IncrementCounterEventValidator: () => IncrementCounterEventValidator,
|
|
195
|
+
InlineAlignmentValidator: () => InlineAlignmentValidator,
|
|
196
|
+
InlineCredentialTemplateValidator: () => InlineCredentialTemplateValidator,
|
|
197
|
+
InlineEvidenceValidator: () => InlineEvidenceValidator,
|
|
198
|
+
InlineSendCredentialEventValidator: () => InlineSendCredentialEventValidator,
|
|
199
|
+
InlineWalletCategoryValidator: () => InlineWalletCategoryValidator,
|
|
200
|
+
InlineWalletSkillTagValidator: () => InlineWalletSkillTagValidator,
|
|
171
201
|
InstalledAppValidator: () => InstalledAppValidator,
|
|
172
202
|
IssueInboxCredentialBatchItemResultValidator: () => IssueInboxCredentialBatchItemResultValidator,
|
|
173
203
|
IssueInboxCredentialBatchItemValidator: () => IssueInboxCredentialBatchItemValidator,
|
|
@@ -220,9 +250,19 @@ __export(index_exports, {
|
|
|
220
250
|
LCNVisibleProfileValidator: () => LCNVisibleProfileValidator,
|
|
221
251
|
LaunchTypeValidator: () => LaunchTypeValidator,
|
|
222
252
|
LearnCardRefreshAuthorizationValidator: () => LearnCardRefreshAuthorizationValidator,
|
|
253
|
+
LegacySendCredentialEventValidator: () => LegacySendCredentialEventValidator,
|
|
223
254
|
LinkProviderFrameworkInputValidator: () => LinkProviderFrameworkInputValidator,
|
|
255
|
+
ListShareLinksInputValidator: () => ListShareLinksInputValidator,
|
|
256
|
+
MAX_ENDORSEMENTS: () => MAX_ENDORSEMENTS,
|
|
257
|
+
MAX_SELECTED_CREDENTIALS: () => MAX_SELECTED_CREDENTIALS,
|
|
258
|
+
MAX_SHARE_CIPHERTEXT_BYTES: () => MAX_SHARE_CIPHERTEXT_BYTES,
|
|
259
|
+
MAX_SHARE_LINK_REQUEST_BYTES: () => MAX_SHARE_LINK_REQUEST_BYTES,
|
|
260
|
+
MAX_SHARE_RECOVERY_JWE_BYTES: () => MAX_SHARE_RECOVERY_JWE_BYTES,
|
|
261
|
+
MAX_SHARE_SOURCE_URI_CHARS: () => MAX_SHARE_SOURCE_URI_CHARS,
|
|
262
|
+
MAX_VP_MEMBERS: () => MAX_VP_MEMBERS,
|
|
224
263
|
ManagedCredentialRefreshReceiptValidator: () => ManagedCredentialRefreshReceiptValidator,
|
|
225
264
|
ManagedCredentialRefreshServiceValidator: () => ManagedCredentialRefreshServiceValidator,
|
|
265
|
+
NormalizedConsentScopesValidator: () => NormalizedConsentScopesValidator,
|
|
226
266
|
PaginatedAppStoreListingsValidator: () => PaginatedAppStoreListingsValidator,
|
|
227
267
|
PaginatedBoostRecipientsValidator: () => PaginatedBoostRecipientsValidator,
|
|
228
268
|
PaginatedBoostRecipientsWithChildrenValidator: () => PaginatedBoostRecipientsWithChildrenValidator,
|
|
@@ -243,11 +283,14 @@ __export(index_exports, {
|
|
|
243
283
|
PaginatedLCNProfileManagersValidator: () => PaginatedLCNProfileManagersValidator,
|
|
244
284
|
PaginatedLCNProfilesAndManagersValidator: () => PaginatedLCNProfilesAndManagersValidator,
|
|
245
285
|
PaginatedLCNProfilesValidator: () => PaginatedLCNProfilesValidator,
|
|
286
|
+
PaginatedShareLinksValidator: () => PaginatedShareLinksValidator,
|
|
246
287
|
PaginatedSkillFrameworksValidator: () => PaginatedSkillFrameworksValidator,
|
|
247
288
|
PaginatedSkillTreeValidator: () => PaginatedSkillTreeValidator,
|
|
248
289
|
PaginatedVisibleLCNProfilesValidator: () => PaginatedVisibleLCNProfilesValidator,
|
|
249
290
|
PaginationOptionsValidator: () => PaginationOptionsValidator,
|
|
250
291
|
PaginationResponseValidator: () => PaginationResponseValidator,
|
|
292
|
+
PendingListingUpdateStatusValidator: () => PendingListingUpdateStatusValidator,
|
|
293
|
+
PendingListingUpdateValidator: () => PendingListingUpdateValidator,
|
|
251
294
|
PrepareRefreshableSendInputValidator: () => PrepareRefreshableSendInputValidator,
|
|
252
295
|
PrepareRefreshableSendResultValidator: () => PrepareRefreshableSendResultValidator,
|
|
253
296
|
ProfileValidator: () => ProfileValidator,
|
|
@@ -260,6 +303,9 @@ __export(index_exports, {
|
|
|
260
303
|
PublishCredentialRefreshResultValidator: () => PublishCredentialRefreshResultValidator,
|
|
261
304
|
PublishIssuerSignedRefreshValidator: () => PublishIssuerSignedRefreshValidator,
|
|
262
305
|
PublishSigningAuthorityRefreshValidator: () => PublishSigningAuthorityRefreshValidator,
|
|
306
|
+
PutShareLinkAttachmentChunkInputValidator: () => PutShareLinkAttachmentChunkInputValidator,
|
|
307
|
+
PutShareLinkAttachmentChunkOutputValidator: () => PutShareLinkAttachmentChunkOutputValidator,
|
|
308
|
+
RawInlineCredentialTemplateValidator: () => RawInlineCredentialTemplateValidator,
|
|
263
309
|
RefreshServiceValidator: () => RefreshServiceValidator,
|
|
264
310
|
RegExpValidator: () => RegExpValidator,
|
|
265
311
|
RelatedValidator: () => RelatedValidator,
|
|
@@ -267,16 +313,26 @@ __export(index_exports, {
|
|
|
267
313
|
ReplaceSkillFrameworkSkillsInputValidator: () => ReplaceSkillFrameworkSkillsInputValidator,
|
|
268
314
|
ReplaceSkillFrameworkSkillsResultValidator: () => ReplaceSkillFrameworkSkillsResultValidator,
|
|
269
315
|
RequestLearnerContextEventValidator: () => RequestLearnerContextEventValidator,
|
|
316
|
+
ResolveShareLinkInputValidator: () => ResolveShareLinkInputValidator,
|
|
270
317
|
ResultDescriptionValidator: () => ResultDescriptionValidator,
|
|
271
318
|
ResultStatusTypeValidator: () => ResultStatusTypeValidator,
|
|
272
319
|
ResultTypeValidator: () => ResultTypeValidator,
|
|
273
320
|
ResultValidator: () => ResultValidator,
|
|
274
321
|
RubricCriterionValidator: () => RubricCriterionValidator,
|
|
322
|
+
SHARE_AAD_PREFIX: () => SHARE_AAD_PREFIX,
|
|
323
|
+
SHARE_CONTENT_KEY_BYTES: () => SHARE_CONTENT_KEY_BYTES,
|
|
324
|
+
SHARE_IV_BYTES: () => SHARE_IV_BYTES,
|
|
325
|
+
SHARE_LINK_ID_BYTES: () => SHARE_LINK_ID_BYTES,
|
|
326
|
+
SHARE_LINK_PROTOCOL: () => SHARE_LINK_PROTOCOL,
|
|
327
|
+
SHARE_RECOVERY_PROTOCOL: () => SHARE_RECOVERY_PROTOCOL,
|
|
328
|
+
SHARE_TAG_BYTES: () => SHARE_TAG_BYTES,
|
|
329
|
+
SHARE_VIEW_RECEIPT_TTL_SECONDS: () => SHARE_VIEW_RECEIPT_TTL_SECONDS,
|
|
275
330
|
SendAiSessionCredentialEventValidator: () => SendAiSessionCredentialEventValidator,
|
|
276
331
|
SendBoostInputValidator: () => SendBoostInputValidator,
|
|
277
332
|
SendBoostResponseValidator: () => SendBoostResponseValidator,
|
|
278
333
|
SendBoostTemplateValidator: () => SendBoostTemplateValidator,
|
|
279
334
|
SendBrandingOptionsValidator: () => SendBrandingOptionsValidator,
|
|
335
|
+
SendContractRequestValidator: () => SendContractRequestValidator,
|
|
280
336
|
SendCredentialEventValidator: () => SendCredentialEventValidator,
|
|
281
337
|
SendInboxResponseValidator: () => SendInboxResponseValidator,
|
|
282
338
|
SendInputValidator: () => SendInputValidator,
|
|
@@ -286,6 +342,36 @@ __export(index_exports, {
|
|
|
286
342
|
SentCredentialInfoValidator: () => SentCredentialInfoValidator,
|
|
287
343
|
ServiceValidator: () => ServiceValidator,
|
|
288
344
|
SetPrimaryContactMethodValidator: () => SetPrimaryContactMethodValidator,
|
|
345
|
+
ShareCiphertextValidator: () => ShareCiphertextValidator,
|
|
346
|
+
ShareContentKeyValidator: () => ShareContentKeyValidator,
|
|
347
|
+
ShareContentStateValidator: () => ShareContentStateValidator,
|
|
348
|
+
ShareEndorsementEntryValidator: () => ShareEndorsementEntryValidator,
|
|
349
|
+
ShareEnvelopeValidator: () => ShareEnvelopeValidator,
|
|
350
|
+
ShareIvValidator: () => ShareIvValidator,
|
|
351
|
+
ShareLinkAttachmentChunkEnvelopeValidator: () => ShareLinkAttachmentChunkEnvelopeValidator,
|
|
352
|
+
ShareLinkAttachmentChunkOutputValidator: () => ShareLinkAttachmentChunkOutputValidator,
|
|
353
|
+
ShareLinkAttachmentValidator: () => ShareLinkAttachmentValidator,
|
|
354
|
+
ShareLinkIdInputValidator: () => ShareLinkIdInputValidator,
|
|
355
|
+
ShareLinkIdValidator: () => ShareLinkIdValidator,
|
|
356
|
+
ShareLinkOperationKeyInputValidator: () => ShareLinkOperationKeyInputValidator,
|
|
357
|
+
ShareLinkOwnerCommitOutputValidator: () => ShareLinkOwnerCommitOutputValidator,
|
|
358
|
+
ShareLinkOwnerContentOutputValidator: () => ShareLinkOwnerContentOutputValidator,
|
|
359
|
+
ShareLinkOwnerRecoveryOutputValidator: () => ShareLinkOwnerRecoveryOutputValidator,
|
|
360
|
+
ShareLinkOwnerStatusOutputValidator: () => ShareLinkOwnerStatusOutputValidator,
|
|
361
|
+
ShareLinkPublicContentViewValidator: () => ShareLinkPublicContentViewValidator,
|
|
362
|
+
ShareLinkPublicStateValidator: () => ShareLinkPublicStateValidator,
|
|
363
|
+
ShareLinkStatusValidator: () => ShareLinkStatusValidator,
|
|
364
|
+
ShareLinkValidator: () => ShareLinkValidator,
|
|
365
|
+
ShareManifestPresentationValidator: () => ShareManifestPresentationValidator,
|
|
366
|
+
ShareOwnerRecoveryValidator: () => ShareOwnerRecoveryValidator,
|
|
367
|
+
SharePayloadValidator: () => SharePayloadValidator,
|
|
368
|
+
SharePayloadValidatorShape: () => SharePayloadValidatorShape,
|
|
369
|
+
ShareRecoveryEndorsementValidator: () => ShareRecoveryEndorsementValidator,
|
|
370
|
+
ShareRecoveryPlaintextValidator: () => ShareRecoveryPlaintextValidator,
|
|
371
|
+
ShareRecoverySelectionValidator: () => ShareRecoverySelectionValidator,
|
|
372
|
+
ShareSelectionEntryValidator: () => ShareSelectionEntryValidator,
|
|
373
|
+
ShareSharerValidator: () => ShareSharerValidator,
|
|
374
|
+
SimpleInlineCredentialTemplateValidator: () => SimpleInlineCredentialTemplateValidator,
|
|
289
375
|
SkillDeletionStrategyValidator: () => SkillDeletionStrategyValidator,
|
|
290
376
|
SkillFrameworkAdminInputValidator: () => SkillFrameworkAdminInputValidator,
|
|
291
377
|
SkillFrameworkAdminsValidator: () => SkillFrameworkAdminsValidator,
|
|
@@ -316,8 +402,12 @@ __export(index_exports, {
|
|
|
316
402
|
UnsignedClrCredentialValidator: () => UnsignedClrCredentialValidator,
|
|
317
403
|
UnsignedVCValidator: () => UnsignedVCValidator,
|
|
318
404
|
UnsignedVPValidator: () => UnsignedVPValidator,
|
|
405
|
+
UnsupportedSignInOperationError: () => UnsupportedSignInOperationError,
|
|
319
406
|
UpdateFrameworkInputValidator: () => UpdateFrameworkInputValidator,
|
|
407
|
+
UpdateShareLinkInputValidator: () => UpdateShareLinkInputValidator,
|
|
320
408
|
UpdateSkillInputValidator: () => UpdateSkillInputValidator,
|
|
409
|
+
UpsertConsentContractEventValidator: () => UpsertConsentContractEventValidator,
|
|
410
|
+
UpsertConsentContractResponseValidator: () => UpsertConsentContractResponseValidator,
|
|
321
411
|
VC2EvidenceValidator: () => VC2EvidenceValidator,
|
|
322
412
|
VCValidator: () => VCValidator,
|
|
323
413
|
VPValidator: () => VPValidator,
|
|
@@ -328,7 +418,12 @@ __export(index_exports, {
|
|
|
328
418
|
VerificationStatusValidator: () => VerificationStatusValidator,
|
|
329
419
|
appStoreActionValidator: () => appStoreActionValidator,
|
|
330
420
|
capgoUpdateActionValidator: () => capgoUpdateActionValidator,
|
|
421
|
+
classifyShareManifest: () => classifyShareManifest,
|
|
422
|
+
decodeBase64Url: () => decodeBase64Url,
|
|
423
|
+
decodedBase64UrlByteLength: () => decodedBase64UrlByteLength,
|
|
331
424
|
dismissActionValidator: () => dismissActionValidator,
|
|
425
|
+
encodeBase64Url: () => encodeBase64Url,
|
|
426
|
+
escrowPinMismatchMessage: () => escrowPinMismatchMessage,
|
|
332
427
|
externalLinkActionValidator: () => externalLinkActionValidator,
|
|
333
428
|
inAppMessageActionStyleValidator: () => inAppMessageActionStyleValidator,
|
|
334
429
|
inAppMessageActionTargetValidator: () => inAppMessageActionTargetValidator,
|
|
@@ -343,10 +438,12 @@ __export(index_exports, {
|
|
|
343
438
|
inAppMessageVersionSourceValidator: () => inAppMessageVersionSourceValidator,
|
|
344
439
|
inAppMessagesFlagValidator: () => inAppMessagesFlagValidator,
|
|
345
440
|
internalLinkActionValidator: () => internalLinkActionValidator,
|
|
441
|
+
isCanonicalBase64Url: () => isCanonicalBase64Url,
|
|
346
442
|
isStoredCredentialEnvelope: () => isStoredCredentialEnvelope,
|
|
347
443
|
parseInAppMessagesFlag: () => parseInAppMessagesFlag,
|
|
348
444
|
platformPredicateValidator: () => platformPredicateValidator,
|
|
349
445
|
rolePredicateValidator: () => rolePredicateValidator,
|
|
446
|
+
utf8ByteLength: () => utf8ByteLength,
|
|
350
447
|
versionPredicateValidator: () => versionPredicateValidator
|
|
351
448
|
});
|
|
352
449
|
module.exports = __toCommonJS(index_exports);
|
|
@@ -15749,7 +15846,8 @@ var AssociationTypeValidator = external_exports.enum([
|
|
|
15749
15846
|
"replacedBy"
|
|
15750
15847
|
]).or(external_exports.string());
|
|
15751
15848
|
var AssociationValidator = external_exports.object({
|
|
15752
|
-
|
|
15849
|
+
// Accept compacted scalars while retaining the existing permissive array contract.
|
|
15850
|
+
type: external_exports.string().min(1).or(external_exports.string().array().nonempty()),
|
|
15753
15851
|
associationType: AssociationTypeValidator,
|
|
15754
15852
|
sourceId: external_exports.string().optional(),
|
|
15755
15853
|
targetId: external_exports.string()
|
|
@@ -16586,11 +16684,48 @@ var ConsentFlowContractDetailsValidator = external_exports.object({
|
|
|
16586
16684
|
updatedAt: external_exports.string(),
|
|
16587
16685
|
expiresAt: external_exports.string().optional(),
|
|
16588
16686
|
autoBoosts: external_exports.string().array().optional(),
|
|
16589
|
-
writers: external_exports.array(LCNProfileValidator).optional()
|
|
16687
|
+
writers: external_exports.array(LCNProfileValidator).optional(),
|
|
16688
|
+
recipients: external_exports.array(LCNPublicProfileValidator.extend({ did: external_exports.string() })).optional(),
|
|
16689
|
+
audienceVersion: external_exports.number().int().nonnegative().optional()
|
|
16590
16690
|
});
|
|
16591
|
-
var ConsentFlowContractRequestStatusValidator = external_exports.enum(["pending", "accepted", "denied"]).nullable();
|
|
16691
|
+
var ConsentFlowContractRequestStatusValidator = external_exports.enum(["pending", "accepted", "denied", "cancelled"]).nullable();
|
|
16592
16692
|
var ConsentFlowContractRequestReadStatusValidator = external_exports.enum(["unseen", "seen"]).nullable();
|
|
16593
|
-
var
|
|
16693
|
+
var ConsentFlowReferralValidator = external_exports.object({
|
|
16694
|
+
requestId: external_exports.string(),
|
|
16695
|
+
requestedBy: external_exports.string(),
|
|
16696
|
+
externalReferenceId: external_exports.string().max(256).optional()
|
|
16697
|
+
});
|
|
16698
|
+
var ContractRequestFieldsValidator = ConsentFlowReferralValidator.partial().extend({
|
|
16699
|
+
requestedAt: external_exports.string().optional(),
|
|
16700
|
+
message: external_exports.string().max(500).optional()
|
|
16701
|
+
});
|
|
16702
|
+
var SendContractRequestValidator = external_exports.object({
|
|
16703
|
+
contractUri: external_exports.string(),
|
|
16704
|
+
targetProfileId: external_exports.string(),
|
|
16705
|
+
externalReferenceId: external_exports.string().trim().min(1).max(256).optional(),
|
|
16706
|
+
message: external_exports.string().trim().max(500).optional()
|
|
16707
|
+
});
|
|
16708
|
+
var ConsentFlowWebhookMetadataValidator = external_exports.object({
|
|
16709
|
+
eventId: external_exports.string(),
|
|
16710
|
+
deliveryKey: external_exports.string(),
|
|
16711
|
+
event: external_exports.enum([
|
|
16712
|
+
"request_sent",
|
|
16713
|
+
"request_accepted",
|
|
16714
|
+
"request_denied",
|
|
16715
|
+
"request_cancelled",
|
|
16716
|
+
"consent_created",
|
|
16717
|
+
"consent_updated",
|
|
16718
|
+
"consent_withdrawn",
|
|
16719
|
+
"credentials_synced"
|
|
16720
|
+
]),
|
|
16721
|
+
contractUri: external_exports.string(),
|
|
16722
|
+
termsUri: external_exports.string().optional(),
|
|
16723
|
+
requestId: external_exports.string().optional(),
|
|
16724
|
+
requestedBy: external_exports.string().optional(),
|
|
16725
|
+
externalReferenceId: external_exports.string().optional(),
|
|
16726
|
+
recipientRole: external_exports.enum(["owner", "recipient", "requester", "target"])
|
|
16727
|
+
});
|
|
16728
|
+
var ConsentFlowContractRequestForProfileValidator = ContractRequestFieldsValidator.extend({
|
|
16594
16729
|
profile: LCNProfileValidator,
|
|
16595
16730
|
status: ConsentFlowContractRequestStatusValidator,
|
|
16596
16731
|
readStatus: ConsentFlowContractRequestReadStatusValidator.optional()
|
|
@@ -16636,6 +16771,7 @@ var PaginatedConsentFlowTermsValidator = PaginationResponseValidator.extend({
|
|
|
16636
16771
|
expiresAt: external_exports.string().optional(),
|
|
16637
16772
|
oneTime: external_exports.boolean().optional(),
|
|
16638
16773
|
terms: ConsentFlowTermsValidator,
|
|
16774
|
+
referral: ConsentFlowReferralValidator.optional(),
|
|
16639
16775
|
contract: ConsentFlowContractDetailsValidator,
|
|
16640
16776
|
uri: external_exports.string(),
|
|
16641
16777
|
consenter: LCNProfileValidator,
|
|
@@ -16731,6 +16867,7 @@ var ConsentFlowTransactionValidator = external_exports.object({
|
|
|
16731
16867
|
oneTime: external_exports.boolean().optional(),
|
|
16732
16868
|
terms: ConsentFlowTermsValidator.optional(),
|
|
16733
16869
|
guardianApproval: ConsentFlowGuardianApprovalValidator.optional(),
|
|
16870
|
+
referral: ConsentFlowReferralValidator.optional(),
|
|
16734
16871
|
id: external_exports.string(),
|
|
16735
16872
|
action: ConsentFlowTransactionActionValidator,
|
|
16736
16873
|
date: external_exports.string(),
|
|
@@ -16741,6 +16878,7 @@ var HolderExportConsentRecordValidator = external_exports.object({
|
|
|
16741
16878
|
status: ConsentFlowTermsStatusValidator,
|
|
16742
16879
|
contract: ConsentFlowContractDetailsValidator,
|
|
16743
16880
|
terms: ConsentFlowTermsValidator,
|
|
16881
|
+
referral: ConsentFlowReferralValidator.optional(),
|
|
16744
16882
|
transactions: ConsentFlowTransactionValidator.array()
|
|
16745
16883
|
});
|
|
16746
16884
|
var HolderExportMetadataValidator = external_exports.object({
|
|
@@ -17477,7 +17615,7 @@ var AppStoreListingSubmitterValidator = external_exports.object({
|
|
|
17477
17615
|
displayName: external_exports.string(),
|
|
17478
17616
|
email: external_exports.string().optional()
|
|
17479
17617
|
});
|
|
17480
|
-
var
|
|
17618
|
+
var AppStoreListingFieldsValidator = external_exports.object({
|
|
17481
17619
|
listing_id: external_exports.string(),
|
|
17482
17620
|
slug: external_exports.string().optional(),
|
|
17483
17621
|
display_name: external_exports.string(),
|
|
@@ -17503,15 +17641,33 @@ var AppStoreListingValidator = external_exports.object({
|
|
|
17503
17641
|
submitter: AppStoreListingSubmitterValidator.optional(),
|
|
17504
17642
|
contact_email: external_exports.string().email().optional()
|
|
17505
17643
|
});
|
|
17644
|
+
var PendingListingUpdateStatusValidator = external_exports.enum(["DRAFT", "PENDING_REVIEW"]);
|
|
17645
|
+
var PendingListingUpdateValidator = external_exports.object({
|
|
17646
|
+
status: PendingListingUpdateStatusValidator,
|
|
17647
|
+
submitted_at: external_exports.string().optional(),
|
|
17648
|
+
changes: AppStoreListingFieldsValidator.omit({
|
|
17649
|
+
listing_id: true,
|
|
17650
|
+
app_listing_status: true,
|
|
17651
|
+
promotion_level: true,
|
|
17652
|
+
submitted_at: true,
|
|
17653
|
+
submitter: true
|
|
17654
|
+
}).partial(),
|
|
17655
|
+
manifest_version: external_exports.number().int().min(1).optional()
|
|
17656
|
+
});
|
|
17657
|
+
var AppStoreListingValidator = AppStoreListingFieldsValidator.extend({
|
|
17658
|
+
pending_update: PendingListingUpdateValidator.optional()
|
|
17659
|
+
});
|
|
17506
17660
|
var AppStoreListingCreateValidator = AppStoreListingValidator.omit({
|
|
17507
17661
|
listing_id: true,
|
|
17508
17662
|
app_listing_status: true,
|
|
17509
|
-
promotion_level: true
|
|
17663
|
+
promotion_level: true,
|
|
17664
|
+
pending_update: true
|
|
17510
17665
|
});
|
|
17511
17666
|
var AppStoreListingUpdateValidator = AppStoreListingValidator.partial().omit({
|
|
17512
17667
|
listing_id: true,
|
|
17513
17668
|
app_listing_status: true,
|
|
17514
|
-
promotion_level: true
|
|
17669
|
+
promotion_level: true,
|
|
17670
|
+
pending_update: true
|
|
17515
17671
|
});
|
|
17516
17672
|
var InstalledAppValidator = AppStoreListingValidator.extend({
|
|
17517
17673
|
installed_at: external_exports.string()
|
|
@@ -17526,12 +17682,87 @@ var AppBoostValidator = external_exports.object({
|
|
|
17526
17682
|
templateAlias: external_exports.string().min(1).max(50).regex(/^[a-z0-9-]+$/),
|
|
17527
17683
|
boostUri: external_exports.string()
|
|
17528
17684
|
});
|
|
17529
|
-
var
|
|
17685
|
+
var InlineWalletCategoryValidator = external_exports.enum([
|
|
17686
|
+
"Achievement",
|
|
17687
|
+
"Skill",
|
|
17688
|
+
"ID",
|
|
17689
|
+
"Learning History",
|
|
17690
|
+
"Work History",
|
|
17691
|
+
"Social Badges",
|
|
17692
|
+
"Membership",
|
|
17693
|
+
"Accomplishment",
|
|
17694
|
+
"Experiences",
|
|
17695
|
+
"Accommodation",
|
|
17696
|
+
"Family"
|
|
17697
|
+
]);
|
|
17698
|
+
var InlineAlignmentValidator = external_exports.object({
|
|
17699
|
+
name: external_exports.string(),
|
|
17700
|
+
url: external_exports.string(),
|
|
17701
|
+
framework: external_exports.string().optional(),
|
|
17702
|
+
code: external_exports.string().optional()
|
|
17703
|
+
}).passthrough();
|
|
17704
|
+
var InlineEvidenceValidator = external_exports.object({
|
|
17705
|
+
id: external_exports.string().optional(),
|
|
17706
|
+
name: external_exports.string().optional(),
|
|
17707
|
+
narrative: external_exports.string().optional()
|
|
17708
|
+
}).passthrough();
|
|
17709
|
+
var InlineWalletSkillTagValidator = external_exports.object({
|
|
17710
|
+
frameworkId: external_exports.string(),
|
|
17711
|
+
id: external_exports.string(),
|
|
17712
|
+
proficiencyLevel: external_exports.string().optional()
|
|
17713
|
+
}).passthrough();
|
|
17714
|
+
var SimpleInlineCredentialTemplateValidator = external_exports.object({
|
|
17715
|
+
rawCredential: external_exports.undefined().optional(),
|
|
17716
|
+
name: external_exports.string(),
|
|
17717
|
+
description: external_exports.string().optional(),
|
|
17718
|
+
image: external_exports.string().optional(),
|
|
17719
|
+
issuerName: external_exports.string().optional(),
|
|
17720
|
+
achievementType: external_exports.string().optional(),
|
|
17721
|
+
category: InlineWalletCategoryValidator.optional(),
|
|
17722
|
+
criteria: external_exports.object({
|
|
17723
|
+
narrative: external_exports.string().optional(),
|
|
17724
|
+
url: external_exports.string().optional()
|
|
17725
|
+
}).passthrough().optional(),
|
|
17726
|
+
alignments: external_exports.array(InlineAlignmentValidator).optional(),
|
|
17727
|
+
tags: external_exports.array(external_exports.string()).optional(),
|
|
17728
|
+
activity: external_exports.object({
|
|
17729
|
+
startDate: external_exports.string().optional(),
|
|
17730
|
+
endDate: external_exports.string().optional()
|
|
17731
|
+
}).passthrough().optional(),
|
|
17732
|
+
credits: external_exports.object({
|
|
17733
|
+
earned: external_exports.union([external_exports.number(), external_exports.string()]).optional(),
|
|
17734
|
+
available: external_exports.union([external_exports.number(), external_exports.string()]).optional()
|
|
17735
|
+
}).passthrough().optional(),
|
|
17736
|
+
validUntil: external_exports.string().optional(),
|
|
17737
|
+
evidence: external_exports.array(InlineEvidenceValidator).optional(),
|
|
17738
|
+
walletSkills: external_exports.array(InlineWalletSkillTagValidator).optional()
|
|
17739
|
+
}).passthrough();
|
|
17740
|
+
var RawInlineCredentialTemplateValidator = external_exports.object({
|
|
17741
|
+
rawCredential: external_exports.record(external_exports.string(), external_exports.unknown()),
|
|
17742
|
+
category: InlineWalletCategoryValidator.optional(),
|
|
17743
|
+
walletSkills: external_exports.array(InlineWalletSkillTagValidator).optional()
|
|
17744
|
+
}).passthrough();
|
|
17745
|
+
var InlineCredentialTemplateValidator = external_exports.union([
|
|
17746
|
+
RawInlineCredentialTemplateValidator,
|
|
17747
|
+
SimpleInlineCredentialTemplateValidator
|
|
17748
|
+
]);
|
|
17749
|
+
var LegacySendCredentialEventValidator = external_exports.object({
|
|
17530
17750
|
type: external_exports.literal("send-credential"),
|
|
17531
17751
|
templateAlias: external_exports.string(),
|
|
17532
17752
|
templateData: external_exports.record(external_exports.string(), external_exports.unknown()).optional(),
|
|
17533
17753
|
preventDuplicateClaim: external_exports.boolean().optional()
|
|
17534
17754
|
});
|
|
17755
|
+
var InlineSendCredentialEventValidator = external_exports.object({
|
|
17756
|
+
type: external_exports.literal("send-credential"),
|
|
17757
|
+
alias: external_exports.string(),
|
|
17758
|
+
template: InlineCredentialTemplateValidator,
|
|
17759
|
+
templateData: external_exports.record(external_exports.string(), external_exports.unknown()).optional(),
|
|
17760
|
+
preventDuplicateClaim: external_exports.boolean().optional()
|
|
17761
|
+
});
|
|
17762
|
+
var SendCredentialEventValidator = external_exports.union([
|
|
17763
|
+
LegacySendCredentialEventValidator,
|
|
17764
|
+
InlineSendCredentialEventValidator
|
|
17765
|
+
]);
|
|
17535
17766
|
var CheckCredentialEventValidator = external_exports.object({
|
|
17536
17767
|
type: external_exports.literal("check-credential"),
|
|
17537
17768
|
templateAlias: external_exports.string().optional(),
|
|
@@ -17626,7 +17857,119 @@ var GetCountersEventValidator = external_exports.object({
|
|
|
17626
17857
|
type: external_exports.literal("get-counters"),
|
|
17627
17858
|
keys: external_exports.array(counterKeyValidator).min(1).max(50).optional()
|
|
17628
17859
|
});
|
|
17629
|
-
var
|
|
17860
|
+
var ConsentRequestWalletCategoryValidator = external_exports.enum([
|
|
17861
|
+
"Achievement",
|
|
17862
|
+
"Skill",
|
|
17863
|
+
"ID",
|
|
17864
|
+
"Learning History",
|
|
17865
|
+
"Work History",
|
|
17866
|
+
"Social Badges",
|
|
17867
|
+
"Membership",
|
|
17868
|
+
"Accomplishment",
|
|
17869
|
+
"Experiences",
|
|
17870
|
+
"Accommodation",
|
|
17871
|
+
"Family"
|
|
17872
|
+
]);
|
|
17873
|
+
var ConsentRequestPersonalFieldValidator = external_exports.enum([
|
|
17874
|
+
"name",
|
|
17875
|
+
"email",
|
|
17876
|
+
"phone",
|
|
17877
|
+
"birthDate",
|
|
17878
|
+
"country",
|
|
17879
|
+
"avatar"
|
|
17880
|
+
]);
|
|
17881
|
+
var ConsentRequestValidator = external_exports.object({
|
|
17882
|
+
read: external_exports.object({
|
|
17883
|
+
credentialCategories: external_exports.array(ConsentRequestWalletCategoryValidator).optional(),
|
|
17884
|
+
personalFields: external_exports.array(ConsentRequestPersonalFieldValidator).optional()
|
|
17885
|
+
}).optional(),
|
|
17886
|
+
write: external_exports.object({
|
|
17887
|
+
credentialCategories: external_exports.array(ConsentRequestWalletCategoryValidator).optional()
|
|
17888
|
+
}).optional(),
|
|
17889
|
+
reason: external_exports.string().optional()
|
|
17890
|
+
});
|
|
17891
|
+
var NormalizedConsentScopesValidator = external_exports.object({
|
|
17892
|
+
read: external_exports.object({
|
|
17893
|
+
credentialCategories: external_exports.array(ConsentRequestWalletCategoryValidator).default([]),
|
|
17894
|
+
personalFields: external_exports.array(ConsentRequestPersonalFieldValidator).default([])
|
|
17895
|
+
}),
|
|
17896
|
+
write: external_exports.object({
|
|
17897
|
+
credentialCategories: external_exports.array(ConsentRequestWalletCategoryValidator).default([])
|
|
17898
|
+
})
|
|
17899
|
+
});
|
|
17900
|
+
var CapturedTemplateRecordValidator = external_exports.object({
|
|
17901
|
+
alias: external_exports.string(),
|
|
17902
|
+
template: InlineCredentialTemplateValidator,
|
|
17903
|
+
version: external_exports.number().int().min(1),
|
|
17904
|
+
lastUsedAt: external_exports.string()
|
|
17905
|
+
}).passthrough();
|
|
17906
|
+
var CapturedConsentRecordValidator = external_exports.object({
|
|
17907
|
+
scopes: NormalizedConsentScopesValidator,
|
|
17908
|
+
reason: external_exports.string().optional(),
|
|
17909
|
+
lastUsedAt: external_exports.string()
|
|
17910
|
+
}).passthrough();
|
|
17911
|
+
var AppManifestValidator = external_exports.object({
|
|
17912
|
+
manifestVersion: external_exports.literal(1),
|
|
17913
|
+
appUrl: external_exports.string(),
|
|
17914
|
+
appKey: external_exports.string().max(200).optional(),
|
|
17915
|
+
suggestedName: external_exports.string().optional(),
|
|
17916
|
+
suggestedIconUrl: external_exports.string().optional(),
|
|
17917
|
+
permissions: external_exports.array(external_exports.string()).default([]),
|
|
17918
|
+
templates: external_exports.array(CapturedTemplateRecordValidator).default([]),
|
|
17919
|
+
consentRequests: external_exports.array(CapturedConsentRecordValidator).default([]),
|
|
17920
|
+
usedConsentContract: external_exports.boolean().optional(),
|
|
17921
|
+
featuresLaunched: external_exports.array(external_exports.string()).default([]),
|
|
17922
|
+
counterKeys: external_exports.array(external_exports.string()).default([]),
|
|
17923
|
+
usedLearnerContext: external_exports.boolean(),
|
|
17924
|
+
usedNotifications: external_exports.boolean(),
|
|
17925
|
+
firstCapturedAt: external_exports.string(),
|
|
17926
|
+
lastUpdatedAt: external_exports.string()
|
|
17927
|
+
}).passthrough();
|
|
17928
|
+
var AppManifestVersionStatusValidator = external_exports.enum(["draft", "active", "superseded"]);
|
|
17929
|
+
var AppManifestVersionValidator = external_exports.object({
|
|
17930
|
+
id: external_exports.string(),
|
|
17931
|
+
version: external_exports.number().int().min(1),
|
|
17932
|
+
manifestHash: external_exports.string(),
|
|
17933
|
+
manifest: AppManifestValidator,
|
|
17934
|
+
status: AppManifestVersionStatusValidator,
|
|
17935
|
+
createdAt: external_exports.string(),
|
|
17936
|
+
activatedAt: external_exports.string().optional()
|
|
17937
|
+
});
|
|
17938
|
+
var AppManifestStringDiffValidator = external_exports.object({
|
|
17939
|
+
added: external_exports.array(external_exports.string()),
|
|
17940
|
+
removed: external_exports.array(external_exports.string()),
|
|
17941
|
+
changed: external_exports.array(external_exports.string())
|
|
17942
|
+
});
|
|
17943
|
+
var AppManifestTemplateRefValidator = external_exports.object({
|
|
17944
|
+
alias: external_exports.string(),
|
|
17945
|
+
version: external_exports.number().int().min(1)
|
|
17946
|
+
});
|
|
17947
|
+
var AppManifestTemplateChangeValidator = external_exports.object({
|
|
17948
|
+
alias: external_exports.string(),
|
|
17949
|
+
fromVersion: external_exports.number().int().min(1),
|
|
17950
|
+
toVersion: external_exports.number().int().min(1)
|
|
17951
|
+
});
|
|
17952
|
+
var AppManifestDiffValidator = external_exports.object({
|
|
17953
|
+
permissions: AppManifestStringDiffValidator,
|
|
17954
|
+
templates: external_exports.object({
|
|
17955
|
+
added: external_exports.array(AppManifestTemplateRefValidator),
|
|
17956
|
+
removed: external_exports.array(AppManifestTemplateRefValidator),
|
|
17957
|
+
changed: external_exports.array(AppManifestTemplateChangeValidator)
|
|
17958
|
+
}),
|
|
17959
|
+
consentScopes: AppManifestStringDiffValidator,
|
|
17960
|
+
featurePaths: AppManifestStringDiffValidator,
|
|
17961
|
+
counterKeys: AppManifestStringDiffValidator,
|
|
17962
|
+
requiresReview: external_exports.boolean()
|
|
17963
|
+
});
|
|
17964
|
+
var UpsertConsentContractEventValidator = external_exports.object({
|
|
17965
|
+
type: external_exports.literal("upsert-consent-contract"),
|
|
17966
|
+
scopes: ConsentRequestValidator
|
|
17967
|
+
});
|
|
17968
|
+
var UpsertConsentContractResponseValidator = external_exports.object({
|
|
17969
|
+
contractUri: external_exports.string(),
|
|
17970
|
+
created: external_exports.boolean()
|
|
17971
|
+
});
|
|
17972
|
+
var AppEventValidator = external_exports.union([
|
|
17630
17973
|
SendCredentialEventValidator,
|
|
17631
17974
|
CheckCredentialEventValidator,
|
|
17632
17975
|
CheckIssuanceStatusEventValidator,
|
|
@@ -17636,7 +17979,8 @@ var AppEventValidator = external_exports.discriminatedUnion("type", [
|
|
|
17636
17979
|
SendNotificationEventValidator,
|
|
17637
17980
|
IncrementCounterEventValidator,
|
|
17638
17981
|
GetCounterEventValidator,
|
|
17639
|
-
GetCountersEventValidator
|
|
17982
|
+
GetCountersEventValidator,
|
|
17983
|
+
UpsertConsentContractEventValidator
|
|
17640
17984
|
]);
|
|
17641
17985
|
var AppEventInputValidator = external_exports.object({
|
|
17642
17986
|
listingId: external_exports.string(),
|
|
@@ -17714,6 +18058,27 @@ var AuthSessionError = class extends Error {
|
|
|
17714
18058
|
__name(this, "AuthSessionError");
|
|
17715
18059
|
}
|
|
17716
18060
|
};
|
|
18061
|
+
var UnsupportedSignInOperationError = class extends Error {
|
|
18062
|
+
constructor(operation, providerType) {
|
|
18063
|
+
super(`${operation} is not supported by ${providerType}`);
|
|
18064
|
+
this.operation = operation;
|
|
18065
|
+
this.providerType = providerType;
|
|
18066
|
+
this.name = "UnsupportedSignInOperationError";
|
|
18067
|
+
}
|
|
18068
|
+
static {
|
|
18069
|
+
__name(this, "UnsupportedSignInOperationError");
|
|
18070
|
+
}
|
|
18071
|
+
};
|
|
18072
|
+
var ESCROW_PIN_LOCKED_MESSAGE = "Too many incorrect PIN attempts. You can still recover by waiting.";
|
|
18073
|
+
var ESCROW_PIN_UNAVAILABLE_MESSAGE = "PIN recovery is not available for this account.";
|
|
18074
|
+
var ESCROW_PIN_MISMATCH_PATTERN = /^Incorrect PIN\. (\d+) attempts left\.$/;
|
|
18075
|
+
var escrowPinMismatchMessage = /* @__PURE__ */ __name((attemptsRemaining) => `Incorrect PIN. ${attemptsRemaining} attempts left.`, "escrowPinMismatchMessage");
|
|
18076
|
+
var EscrowPinStatusValidator = external_exports.object({
|
|
18077
|
+
state: external_exports.enum(["none", "enabled", "locked", "stale"]),
|
|
18078
|
+
enabled: external_exports.boolean(),
|
|
18079
|
+
attemptsRemaining: external_exports.number().int().nonnegative(),
|
|
18080
|
+
salt: external_exports.string().optional()
|
|
18081
|
+
});
|
|
17717
18082
|
|
|
17718
18083
|
// src/bitstring-status-list.ts
|
|
17719
18084
|
var BITSTRING_STATUS_PURPOSES = ["revocation", "suspension"];
|
|
@@ -17832,3 +18197,501 @@ var parseInAppMessagesFlag = /* @__PURE__ */ __name((raw) => {
|
|
|
17832
18197
|
const result = inAppMessagesFlagValidator.safeParse(raw);
|
|
17833
18198
|
return result.success ? result.data : EMPTY_IN_APP_MESSAGES_FLAG;
|
|
17834
18199
|
}, "parseInAppMessagesFlag");
|
|
18200
|
+
|
|
18201
|
+
// src/share-links.ts
|
|
18202
|
+
var SHARE_LINK_ID_BYTES = 16;
|
|
18203
|
+
var SHARE_CONTENT_KEY_BYTES = 32;
|
|
18204
|
+
var SHARE_IV_BYTES = 12;
|
|
18205
|
+
var SHARE_TAG_BYTES = 16;
|
|
18206
|
+
var MAX_SHARE_CIPHERTEXT_BYTES = 512 * 1024;
|
|
18207
|
+
var MAX_SHARE_RECOVERY_JWE_BYTES = 64 * 1024;
|
|
18208
|
+
var MAX_SELECTED_CREDENTIALS = 50;
|
|
18209
|
+
var MAX_ENDORSEMENTS = 200;
|
|
18210
|
+
var MAX_VP_MEMBERS = MAX_SELECTED_CREDENTIALS + MAX_ENDORSEMENTS;
|
|
18211
|
+
var MAX_SHARE_SOURCE_URI_CHARS = 2048;
|
|
18212
|
+
var MAX_SHARE_LINK_REQUEST_BYTES = 1024 * 1024;
|
|
18213
|
+
var SHARE_LINK_PROTOCOL = "lc-share/v1";
|
|
18214
|
+
var SHARE_RECOVERY_PROTOCOL = "lc-share-recovery/v1";
|
|
18215
|
+
var SHARE_AAD_PREFIX = "lc-share:v1";
|
|
18216
|
+
var BASE64URL_ALPHABET = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_";
|
|
18217
|
+
var BASE64URL_LOOKUP = (() => {
|
|
18218
|
+
const table = new Int16Array(128).fill(-1);
|
|
18219
|
+
for (let index = 0; index < BASE64URL_ALPHABET.length; index += 1) {
|
|
18220
|
+
table[BASE64URL_ALPHABET.charCodeAt(index)] = index;
|
|
18221
|
+
}
|
|
18222
|
+
return table;
|
|
18223
|
+
})();
|
|
18224
|
+
var encodeBase64Url = /* @__PURE__ */ __name((bytes) => {
|
|
18225
|
+
let output = "";
|
|
18226
|
+
for (let index = 0; index < bytes.length; index += 3) {
|
|
18227
|
+
const first = bytes[index];
|
|
18228
|
+
const second = bytes[index + 1];
|
|
18229
|
+
const third = bytes[index + 2];
|
|
18230
|
+
output += BASE64URL_ALPHABET[first >> 2];
|
|
18231
|
+
output += BASE64URL_ALPHABET[(first & 3) << 4 | (second ?? 0) >> 4];
|
|
18232
|
+
if (second === void 0) break;
|
|
18233
|
+
output += BASE64URL_ALPHABET[(second & 15) << 2 | (third ?? 0) >> 6];
|
|
18234
|
+
if (third === void 0) break;
|
|
18235
|
+
output += BASE64URL_ALPHABET[third & 63];
|
|
18236
|
+
}
|
|
18237
|
+
return output;
|
|
18238
|
+
}, "encodeBase64Url");
|
|
18239
|
+
var decodeBase64Url = /* @__PURE__ */ __name((value) => {
|
|
18240
|
+
if (typeof value !== "string") return null;
|
|
18241
|
+
const output = new Uint8Array(Math.floor(value.length * 6 / 8));
|
|
18242
|
+
let bits = 0;
|
|
18243
|
+
let bitCount = 0;
|
|
18244
|
+
let outputIndex = 0;
|
|
18245
|
+
for (let index = 0; index < value.length; index += 1) {
|
|
18246
|
+
const code = value.charCodeAt(index);
|
|
18247
|
+
const digit = code < 128 ? BASE64URL_LOOKUP[code] : -1;
|
|
18248
|
+
if (digit < 0) return null;
|
|
18249
|
+
bits = bits << 6 | digit;
|
|
18250
|
+
bitCount += 6;
|
|
18251
|
+
if (bitCount >= 8) {
|
|
18252
|
+
bitCount -= 8;
|
|
18253
|
+
output[outputIndex] = bits >> bitCount & 255;
|
|
18254
|
+
outputIndex += 1;
|
|
18255
|
+
}
|
|
18256
|
+
}
|
|
18257
|
+
return output;
|
|
18258
|
+
}, "decodeBase64Url");
|
|
18259
|
+
var isCanonicalBase64Url = /* @__PURE__ */ __name((value, expectedBytes) => {
|
|
18260
|
+
if (typeof value !== "string") return false;
|
|
18261
|
+
if (expectedBytes !== void 0 && value.length !== Math.ceil(expectedBytes * 4 / 3))
|
|
18262
|
+
return false;
|
|
18263
|
+
const decoded = decodeBase64Url(value);
|
|
18264
|
+
if (decoded === null) return false;
|
|
18265
|
+
if (expectedBytes !== void 0 && decoded.length !== expectedBytes) return false;
|
|
18266
|
+
return encodeBase64Url(decoded) === value;
|
|
18267
|
+
}, "isCanonicalBase64Url");
|
|
18268
|
+
var decodedBase64UrlByteLength = /* @__PURE__ */ __name((value) => decodeBase64Url(value)?.length ?? null, "decodedBase64UrlByteLength");
|
|
18269
|
+
var utf8ByteLength = /* @__PURE__ */ __name((value) => new TextEncoder().encode(value).length, "utf8ByteLength");
|
|
18270
|
+
var canonicalBase64Url = /* @__PURE__ */ __name((bytes) => external_exports.string().refine((value) => isCanonicalBase64Url(value, bytes), {
|
|
18271
|
+
message: `must be canonical base64url for exactly ${bytes} bytes`
|
|
18272
|
+
}), "canonicalBase64Url");
|
|
18273
|
+
var ShareLinkIdValidator = canonicalBase64Url(SHARE_LINK_ID_BYTES);
|
|
18274
|
+
var ShareContentKeyValidator = canonicalBase64Url(SHARE_CONTENT_KEY_BYTES);
|
|
18275
|
+
var ShareIvValidator = canonicalBase64Url(SHARE_IV_BYTES);
|
|
18276
|
+
var ShareCiphertextValidator = external_exports.string().refine(
|
|
18277
|
+
(value) => {
|
|
18278
|
+
if (value.length > Math.ceil(MAX_SHARE_CIPHERTEXT_BYTES * 4 / 3)) return false;
|
|
18279
|
+
const decoded = decodeBase64Url(value);
|
|
18280
|
+
if (decoded === null) return false;
|
|
18281
|
+
if (encodeBase64Url(decoded) !== value) return false;
|
|
18282
|
+
return decoded.length >= SHARE_TAG_BYTES && decoded.length <= MAX_SHARE_CIPHERTEXT_BYTES;
|
|
18283
|
+
},
|
|
18284
|
+
{
|
|
18285
|
+
message: `must be canonical base64url decoding to ${SHARE_TAG_BYTES}..${MAX_SHARE_CIPHERTEXT_BYTES} bytes`
|
|
18286
|
+
}
|
|
18287
|
+
);
|
|
18288
|
+
var ShareEnvelopeValidator = external_exports.object({
|
|
18289
|
+
v: external_exports.literal(1),
|
|
18290
|
+
alg: external_exports.literal("A256GCM"),
|
|
18291
|
+
iv: ShareIvValidator,
|
|
18292
|
+
ct: ShareCiphertextValidator
|
|
18293
|
+
}).strict();
|
|
18294
|
+
var safeVersion = external_exports.number().int().min(1).max(2 ** 31 - 1);
|
|
18295
|
+
var safeCredentialIndex = external_exports.number().int().min(0).max(MAX_VP_MEMBERS - 1);
|
|
18296
|
+
var ShareSelectionEntryValidator = external_exports.object({ credentialIndex: safeCredentialIndex }).strict();
|
|
18297
|
+
var ShareEndorsementEntryValidator = external_exports.object({ credentialIndex: safeCredentialIndex, targetCredentialIndex: safeCredentialIndex }).strict();
|
|
18298
|
+
var ShareSharerValidator = external_exports.object({
|
|
18299
|
+
profileId: external_exports.string().min(1).max(128),
|
|
18300
|
+
displayName: external_exports.string().min(1).max(120),
|
|
18301
|
+
avatar: external_exports.string().max(2048).optional()
|
|
18302
|
+
}).strict();
|
|
18303
|
+
var presentationShape = VPValidator.extend({
|
|
18304
|
+
verifiableCredential: VCValidator.array().min(1).max(MAX_VP_MEMBERS)
|
|
18305
|
+
});
|
|
18306
|
+
var hasBoundedPresentation = /* @__PURE__ */ __name((value) => {
|
|
18307
|
+
let credentialCount = 0;
|
|
18308
|
+
const ancestors = /* @__PURE__ */ new Set();
|
|
18309
|
+
const visit = /* @__PURE__ */ __name((node, depth) => {
|
|
18310
|
+
if (node === null || typeof node !== "object") return true;
|
|
18311
|
+
if (depth > 32 || ancestors.has(node)) return false;
|
|
18312
|
+
ancestors.add(node);
|
|
18313
|
+
try {
|
|
18314
|
+
for (const [key, child] of Object.entries(node)) {
|
|
18315
|
+
if (key === "verifiableCredential") {
|
|
18316
|
+
credentialCount += Array.isArray(child) ? child.length : 1;
|
|
18317
|
+
if (credentialCount > MAX_VP_MEMBERS) return false;
|
|
18318
|
+
}
|
|
18319
|
+
if (!visit(child, depth + 1)) return false;
|
|
18320
|
+
}
|
|
18321
|
+
return true;
|
|
18322
|
+
} finally {
|
|
18323
|
+
ancestors.delete(node);
|
|
18324
|
+
}
|
|
18325
|
+
}, "visit");
|
|
18326
|
+
return visit(value, 0);
|
|
18327
|
+
}, "hasBoundedPresentation");
|
|
18328
|
+
var ShareManifestPresentationValidator = external_exports.custom(
|
|
18329
|
+
(value) => hasBoundedPresentation(value) && presentationShape.safeParse(value).success,
|
|
18330
|
+
{ message: "invalid share presentation" }
|
|
18331
|
+
);
|
|
18332
|
+
var SharePayloadValidatorShape = external_exports.object({
|
|
18333
|
+
protocol: external_exports.literal(SHARE_LINK_PROTOCOL),
|
|
18334
|
+
shareId: ShareLinkIdValidator,
|
|
18335
|
+
contentVersion: safeVersion,
|
|
18336
|
+
createdAt: external_exports.iso.datetime(),
|
|
18337
|
+
sharer: ShareSharerValidator,
|
|
18338
|
+
presentation: ShareManifestPresentationValidator,
|
|
18339
|
+
selection: ShareSelectionEntryValidator.array().min(1).max(MAX_SELECTED_CREDENTIALS),
|
|
18340
|
+
endorsements: ShareEndorsementEntryValidator.array().max(MAX_ENDORSEMENTS).default([])
|
|
18341
|
+
}).strict();
|
|
18342
|
+
var classificationFailure = /* @__PURE__ */ __name((code, message, path = []) => ({ ok: false, code, message, path }), "classificationFailure");
|
|
18343
|
+
var readSignedClaimId = /* @__PURE__ */ __name((member) => {
|
|
18344
|
+
if (member === null || typeof member !== "object") return void 0;
|
|
18345
|
+
const record2 = member;
|
|
18346
|
+
const claim = record2.credentialSubject ?? record2.endorsement;
|
|
18347
|
+
if (claim === null || typeof claim !== "object") return void 0;
|
|
18348
|
+
const claimRecord = claim;
|
|
18349
|
+
const nested = claimRecord.endorsement;
|
|
18350
|
+
const nestedId = nested !== null && typeof nested === "object" ? nested.id : void 0;
|
|
18351
|
+
return claimRecord.id ?? nestedId;
|
|
18352
|
+
}, "readSignedClaimId");
|
|
18353
|
+
var classifyShareManifest = /* @__PURE__ */ __name((payload) => {
|
|
18354
|
+
const members = payload.presentation?.verifiableCredential;
|
|
18355
|
+
if (!Array.isArray(members) || members.length === 0) {
|
|
18356
|
+
return classificationFailure("NO_PRESENTATION_MEMBERS", "presentation has no credentials");
|
|
18357
|
+
}
|
|
18358
|
+
if (members.length > MAX_VP_MEMBERS) {
|
|
18359
|
+
return classificationFailure(
|
|
18360
|
+
"TOO_MANY_VP_MEMBERS",
|
|
18361
|
+
`presentation has ${members.length} members, over the ${MAX_VP_MEMBERS} bound`
|
|
18362
|
+
);
|
|
18363
|
+
}
|
|
18364
|
+
const selection = payload.selection;
|
|
18365
|
+
const endorsements = payload.endorsements ?? [];
|
|
18366
|
+
if (!Array.isArray(selection) || selection.length < 1 || selection.length > MAX_SELECTED_CREDENTIALS) {
|
|
18367
|
+
return classificationFailure("BAD_SELECTION", "selection must contain 1..50 entries");
|
|
18368
|
+
}
|
|
18369
|
+
if (!Array.isArray(endorsements) || endorsements.length > MAX_ENDORSEMENTS) {
|
|
18370
|
+
return classificationFailure(
|
|
18371
|
+
"BAD_ENDORSEMENTS",
|
|
18372
|
+
"endorsements must contain at most 200 entries"
|
|
18373
|
+
);
|
|
18374
|
+
}
|
|
18375
|
+
const selectedIndices = [];
|
|
18376
|
+
const selected = /* @__PURE__ */ new Set();
|
|
18377
|
+
for (let index = 0; index < selection.length; index += 1) {
|
|
18378
|
+
const entry = selection[index];
|
|
18379
|
+
const credentialIndex = entry?.credentialIndex;
|
|
18380
|
+
if (!Number.isSafeInteger(credentialIndex) || credentialIndex < 0 || credentialIndex >= members.length) {
|
|
18381
|
+
return classificationFailure(
|
|
18382
|
+
"SELECTION_INDEX_OUT_OF_BOUNDS",
|
|
18383
|
+
`selection[${index}].credentialIndex is out of bounds`,
|
|
18384
|
+
["selection", index, "credentialIndex"]
|
|
18385
|
+
);
|
|
18386
|
+
}
|
|
18387
|
+
if (selected.has(credentialIndex)) {
|
|
18388
|
+
return classificationFailure(
|
|
18389
|
+
"SELECTION_INDEX_DUPLICATE",
|
|
18390
|
+
`selection[${index}].credentialIndex is duplicated`,
|
|
18391
|
+
["selection", index, "credentialIndex"]
|
|
18392
|
+
);
|
|
18393
|
+
}
|
|
18394
|
+
selected.add(credentialIndex);
|
|
18395
|
+
selectedIndices.push(credentialIndex);
|
|
18396
|
+
}
|
|
18397
|
+
const classified = new Set(selected);
|
|
18398
|
+
const endorsementIndices = [];
|
|
18399
|
+
for (let index = 0; index < endorsements.length; index += 1) {
|
|
18400
|
+
const entry = endorsements[index];
|
|
18401
|
+
const credentialIndex = entry?.credentialIndex;
|
|
18402
|
+
const targetIndex = entry?.targetCredentialIndex;
|
|
18403
|
+
if (!Number.isSafeInteger(credentialIndex) || credentialIndex < 0 || credentialIndex >= members.length) {
|
|
18404
|
+
return classificationFailure(
|
|
18405
|
+
"ENDORSEMENT_INDEX_OUT_OF_BOUNDS",
|
|
18406
|
+
`endorsements[${index}].credentialIndex is out of bounds`,
|
|
18407
|
+
["endorsements", index, "credentialIndex"]
|
|
18408
|
+
);
|
|
18409
|
+
}
|
|
18410
|
+
if (classified.has(credentialIndex)) {
|
|
18411
|
+
return classificationFailure(
|
|
18412
|
+
"VP_MEMBER_CLASSIFIED_TWICE",
|
|
18413
|
+
`endorsements[${index}].credentialIndex was already classified`,
|
|
18414
|
+
["endorsements", index, "credentialIndex"]
|
|
18415
|
+
);
|
|
18416
|
+
}
|
|
18417
|
+
if (!selected.has(targetIndex)) {
|
|
18418
|
+
return classificationFailure(
|
|
18419
|
+
"ENDORSEMENT_TARGET_NOT_SELECTED",
|
|
18420
|
+
`endorsements[${index}].targetCredentialIndex must reference a selected credential`,
|
|
18421
|
+
["endorsements", index, "targetCredentialIndex"]
|
|
18422
|
+
);
|
|
18423
|
+
}
|
|
18424
|
+
const referenced = readSignedClaimId(members[credentialIndex]);
|
|
18425
|
+
const target = members[targetIndex];
|
|
18426
|
+
const targetId = target !== null && typeof target === "object" ? target.id : void 0;
|
|
18427
|
+
if (typeof referenced !== "string" || typeof targetId !== "string" || referenced !== targetId) {
|
|
18428
|
+
return classificationFailure(
|
|
18429
|
+
"ENDORSEMENT_TARGET_UNBOUND",
|
|
18430
|
+
`endorsements[${index}] claim does not reference the target credential id`,
|
|
18431
|
+
["endorsements", index]
|
|
18432
|
+
);
|
|
18433
|
+
}
|
|
18434
|
+
classified.add(credentialIndex);
|
|
18435
|
+
endorsementIndices.push(credentialIndex);
|
|
18436
|
+
}
|
|
18437
|
+
if (classified.size !== members.length) {
|
|
18438
|
+
return classificationFailure(
|
|
18439
|
+
"UNCLASSIFIED_VP_MEMBER",
|
|
18440
|
+
"every presentation member must be classified exactly once",
|
|
18441
|
+
["presentation", "verifiableCredential"]
|
|
18442
|
+
);
|
|
18443
|
+
}
|
|
18444
|
+
return {
|
|
18445
|
+
ok: true,
|
|
18446
|
+
classification: { selectedIndices, endorsementIndices, memberCount: members.length }
|
|
18447
|
+
};
|
|
18448
|
+
}, "classifyShareManifest");
|
|
18449
|
+
var SharePayloadValidator = SharePayloadValidatorShape.superRefine((payload, ctx) => {
|
|
18450
|
+
const result = classifyShareManifest(payload);
|
|
18451
|
+
if (!result.ok) {
|
|
18452
|
+
ctx.addIssue({
|
|
18453
|
+
code: "custom",
|
|
18454
|
+
message: result.message,
|
|
18455
|
+
path: result.path,
|
|
18456
|
+
params: { shareLinkCode: result.code }
|
|
18457
|
+
});
|
|
18458
|
+
}
|
|
18459
|
+
});
|
|
18460
|
+
var ShareRecoverySelectionValidator = external_exports.object({
|
|
18461
|
+
ref: external_exports.string().min(1).max(MAX_SHARE_SOURCE_URI_CHARS),
|
|
18462
|
+
order: external_exports.number().int().min(0).max(MAX_SELECTED_CREDENTIALS - 1)
|
|
18463
|
+
}).strict();
|
|
18464
|
+
var ShareRecoveryEndorsementValidator = external_exports.object({ targetRef: external_exports.string().min(1).max(MAX_SHARE_SOURCE_URI_CHARS) }).strict();
|
|
18465
|
+
var ShareRecoveryPlaintextValidator = external_exports.object({
|
|
18466
|
+
protocol: external_exports.literal(SHARE_RECOVERY_PROTOCOL),
|
|
18467
|
+
shareId: ShareLinkIdValidator,
|
|
18468
|
+
ownerProfileId: external_exports.string().min(1).max(128),
|
|
18469
|
+
createdAt: external_exports.iso.datetime(),
|
|
18470
|
+
latest: external_exports.object({ contentVersion: safeVersion, key: ShareContentKeyValidator }).strict(),
|
|
18471
|
+
selection: ShareRecoverySelectionValidator.array().min(1).max(MAX_SELECTED_CREDENTIALS),
|
|
18472
|
+
endorsements: ShareRecoveryEndorsementValidator.array().max(MAX_ENDORSEMENTS).default([])
|
|
18473
|
+
}).strict().superRefine((recovery, ctx) => {
|
|
18474
|
+
const orders = /* @__PURE__ */ new Set();
|
|
18475
|
+
recovery.selection.forEach((entry, index) => {
|
|
18476
|
+
if (entry.order >= recovery.selection.length) {
|
|
18477
|
+
ctx.addIssue({
|
|
18478
|
+
code: "custom",
|
|
18479
|
+
message: "order must be within the selection bounds",
|
|
18480
|
+
path: ["selection", index, "order"]
|
|
18481
|
+
});
|
|
18482
|
+
}
|
|
18483
|
+
if (orders.has(entry.order)) {
|
|
18484
|
+
ctx.addIssue({
|
|
18485
|
+
code: "custom",
|
|
18486
|
+
message: "order must be unique within the selection",
|
|
18487
|
+
path: ["selection", index, "order"]
|
|
18488
|
+
});
|
|
18489
|
+
}
|
|
18490
|
+
orders.add(entry.order);
|
|
18491
|
+
});
|
|
18492
|
+
});
|
|
18493
|
+
var ShareOwnerRecoveryValidator = JWEValidator.refine(
|
|
18494
|
+
(value) => utf8ByteLength(JSON.stringify(value)) <= MAX_SHARE_RECOVERY_JWE_BYTES,
|
|
18495
|
+
{ message: `serialized recovery JWE must be at most ${MAX_SHARE_RECOVERY_JWE_BYTES} bytes` }
|
|
18496
|
+
);
|
|
18497
|
+
var ShareLinkStatusValidator = external_exports.enum(["pending", "active", "stopped"]);
|
|
18498
|
+
var ShareContentStateValidator = external_exports.enum(["staging", "finalized", "content_missing"]);
|
|
18499
|
+
var ShareLinkValidator = external_exports.object({
|
|
18500
|
+
id: ShareLinkIdValidator,
|
|
18501
|
+
title: external_exports.string().min(1).max(120),
|
|
18502
|
+
note: external_exports.string().max(500).optional(),
|
|
18503
|
+
selectedCount: external_exports.number().int().min(1).max(MAX_SELECTED_CREDENTIALS),
|
|
18504
|
+
version: safeVersion,
|
|
18505
|
+
contentVersion: safeVersion,
|
|
18506
|
+
status: ShareLinkStatusValidator,
|
|
18507
|
+
attachmentId: external_exports.string().uuid().nullable().optional(),
|
|
18508
|
+
attachmentChunkCount: external_exports.number().int().min(1).max(16).nullable().optional(),
|
|
18509
|
+
contentState: ShareContentStateValidator,
|
|
18510
|
+
createdAt: external_exports.iso.datetime(),
|
|
18511
|
+
updatedAt: external_exports.iso.datetime(),
|
|
18512
|
+
expiresAt: external_exports.iso.datetime().nullable(),
|
|
18513
|
+
stoppedAt: external_exports.iso.datetime().nullable(),
|
|
18514
|
+
lastViewedAt: external_exports.iso.datetime().nullable(),
|
|
18515
|
+
viewCount: external_exports.number().int().min(0).optional(),
|
|
18516
|
+
passcodeProtected: external_exports.boolean(),
|
|
18517
|
+
notifyOnView: external_exports.boolean(),
|
|
18518
|
+
minorPolicy: external_exports.object({
|
|
18519
|
+
isMinor: external_exports.boolean().nullable(),
|
|
18520
|
+
policyResolved: external_exports.boolean(),
|
|
18521
|
+
defaultExpiryDays: external_exports.union([external_exports.literal(30), external_exports.literal(365)]),
|
|
18522
|
+
viewCountingEnabled: external_exports.boolean()
|
|
18523
|
+
}),
|
|
18524
|
+
/**
|
|
18525
|
+
* Guarded application/API URL for the content. Optional because owner APIs in
|
|
18526
|
+
* D1 have no public resolve/content endpoint yet; it must never be a
|
|
18527
|
+
* LearnCloud object URL or carry a fabricated decryption key.
|
|
18528
|
+
*/
|
|
18529
|
+
contentUrl: external_exports.string().optional()
|
|
18530
|
+
});
|
|
18531
|
+
var clientRequestId = external_exports.string().uuid();
|
|
18532
|
+
var ShareLinkAttachmentValidator = external_exports.object({
|
|
18533
|
+
id: external_exports.string().uuid(),
|
|
18534
|
+
chunkCount: external_exports.number().int().min(1).max(16)
|
|
18535
|
+
}).strict();
|
|
18536
|
+
var attachmentChunkKey = {
|
|
18537
|
+
id: ShareLinkIdValidator,
|
|
18538
|
+
contentVersion: safeVersion,
|
|
18539
|
+
attachmentId: external_exports.string().uuid(),
|
|
18540
|
+
chunkIndex: external_exports.number().int().min(0).max(15)
|
|
18541
|
+
};
|
|
18542
|
+
var ShareLinkAttachmentChunkEnvelopeValidator = ShareEnvelopeValidator.refine(
|
|
18543
|
+
(value) => (decodedBase64UrlByteLength(value.ct) ?? Infinity) <= 256 * 1024 + SHARE_TAG_BYTES
|
|
18544
|
+
);
|
|
18545
|
+
var PutShareLinkAttachmentChunkInputValidator = external_exports.object({
|
|
18546
|
+
...attachmentChunkKey,
|
|
18547
|
+
chunkCount: external_exports.number().int().min(1).max(16),
|
|
18548
|
+
envelope: ShareLinkAttachmentChunkEnvelopeValidator,
|
|
18549
|
+
ownerEncryptedRecovery: ShareOwnerRecoveryValidator
|
|
18550
|
+
}).strict().refine((value) => value.chunkIndex < value.chunkCount);
|
|
18551
|
+
var GetShareLinkAttachmentChunkInputValidator = external_exports.object({
|
|
18552
|
+
...attachmentChunkKey,
|
|
18553
|
+
passcode: external_exports.string().min(4).max(64).optional(),
|
|
18554
|
+
accessToken: external_exports.string().min(1).max(2048).optional()
|
|
18555
|
+
}).strict();
|
|
18556
|
+
var ShareLinkAttachmentChunkOutputValidator = external_exports.object({
|
|
18557
|
+
...attachmentChunkKey,
|
|
18558
|
+
envelope: ShareLinkAttachmentChunkEnvelopeValidator,
|
|
18559
|
+
accessToken: external_exports.string().min(1).max(2048).optional()
|
|
18560
|
+
}).strict();
|
|
18561
|
+
var DeleteShareLinkAttachmentChunksInputValidator = external_exports.object({
|
|
18562
|
+
id: ShareLinkIdValidator,
|
|
18563
|
+
contentVersion: safeVersion,
|
|
18564
|
+
attachmentId: external_exports.string().uuid(),
|
|
18565
|
+
chunkCount: external_exports.number().int().min(1).max(16)
|
|
18566
|
+
}).strict();
|
|
18567
|
+
var PutShareLinkAttachmentChunkOutputValidator = external_exports.object({ ok: external_exports.literal(true) }).strict();
|
|
18568
|
+
var DeleteShareLinkAttachmentChunksOutputValidator = external_exports.object({ ok: external_exports.boolean() }).strict();
|
|
18569
|
+
var CreateShareLinkInputValidator = external_exports.object({
|
|
18570
|
+
id: ShareLinkIdValidator,
|
|
18571
|
+
clientRequestId,
|
|
18572
|
+
title: external_exports.string().min(1).max(120),
|
|
18573
|
+
note: external_exports.string().max(500).optional(),
|
|
18574
|
+
expiresAt: external_exports.iso.datetime().nullable().optional(),
|
|
18575
|
+
passcode: external_exports.string().min(8).max(64).optional(),
|
|
18576
|
+
notifyOnView: external_exports.boolean().default(false),
|
|
18577
|
+
selectedCount: external_exports.number().int().min(1).max(MAX_SELECTED_CREDENTIALS),
|
|
18578
|
+
contentVersion: external_exports.literal(1),
|
|
18579
|
+
envelope: ShareEnvelopeValidator,
|
|
18580
|
+
ownerEncryptedRecovery: ShareOwnerRecoveryValidator,
|
|
18581
|
+
attachment: ShareLinkAttachmentValidator.optional()
|
|
18582
|
+
}).strict();
|
|
18583
|
+
var UpdateShareLinkInputValidator = external_exports.object({
|
|
18584
|
+
id: ShareLinkIdValidator,
|
|
18585
|
+
expectedVersion: safeVersion,
|
|
18586
|
+
clientRequestId,
|
|
18587
|
+
title: external_exports.string().min(1).max(120).optional(),
|
|
18588
|
+
note: external_exports.string().max(500).nullable().optional(),
|
|
18589
|
+
expiresAt: external_exports.iso.datetime().nullable().optional(),
|
|
18590
|
+
/** Omitted preserves the current passcode, null removes it, and a string replaces it. */
|
|
18591
|
+
passcode: external_exports.string().min(8).max(64).nullable().optional(),
|
|
18592
|
+
notifyOnView: external_exports.boolean().optional(),
|
|
18593
|
+
contentVersion: safeVersion.optional(),
|
|
18594
|
+
selectedCount: external_exports.number().int().min(1).max(MAX_SELECTED_CREDENTIALS).optional(),
|
|
18595
|
+
envelope: ShareEnvelopeValidator.optional(),
|
|
18596
|
+
ownerEncryptedRecovery: ShareOwnerRecoveryValidator.optional(),
|
|
18597
|
+
attachment: ShareLinkAttachmentValidator.optional()
|
|
18598
|
+
}).strict().superRefine((value, ctx) => {
|
|
18599
|
+
const provided = [
|
|
18600
|
+
value.contentVersion,
|
|
18601
|
+
value.selectedCount,
|
|
18602
|
+
value.envelope,
|
|
18603
|
+
value.ownerEncryptedRecovery
|
|
18604
|
+
].filter((field) => field !== void 0).length;
|
|
18605
|
+
if (provided !== 0 && provided !== 4) {
|
|
18606
|
+
ctx.addIssue({
|
|
18607
|
+
code: "custom",
|
|
18608
|
+
message: "content replacement requires contentVersion, selectedCount, envelope and ownerEncryptedRecovery together"
|
|
18609
|
+
});
|
|
18610
|
+
}
|
|
18611
|
+
if (value.attachment !== void 0 && provided !== 4) {
|
|
18612
|
+
ctx.addIssue({ code: "custom", message: "attachment requires a content replacement" });
|
|
18613
|
+
}
|
|
18614
|
+
});
|
|
18615
|
+
var ShareLinkIdInputValidator = external_exports.object({ id: ShareLinkIdValidator }).strict();
|
|
18616
|
+
var ShareLinkOperationKeyInputValidator = external_exports.object({ id: ShareLinkIdValidator, operationId: external_exports.string().uuid() }).strict();
|
|
18617
|
+
var ShareLinkOwnerCommitOutputValidator = external_exports.discriminatedUnion("status", [
|
|
18618
|
+
external_exports.object({ status: external_exports.literal("completed"), share: ShareLinkValidator }).strict(),
|
|
18619
|
+
external_exports.object({
|
|
18620
|
+
status: external_exports.literal("pending"),
|
|
18621
|
+
id: ShareLinkIdValidator,
|
|
18622
|
+
operationId: external_exports.string().uuid()
|
|
18623
|
+
}).strict()
|
|
18624
|
+
]);
|
|
18625
|
+
var ShareLinkOwnerStatusOutputValidator = external_exports.discriminatedUnion("status", [
|
|
18626
|
+
external_exports.object({ status: external_exports.literal("found"), share: ShareLinkValidator }).strict(),
|
|
18627
|
+
external_exports.object({
|
|
18628
|
+
status: external_exports.literal("pending"),
|
|
18629
|
+
id: ShareLinkIdValidator,
|
|
18630
|
+
operationId: external_exports.string().uuid()
|
|
18631
|
+
}).strict(),
|
|
18632
|
+
external_exports.object({ status: external_exports.literal("not_found"), id: ShareLinkIdValidator }).strict()
|
|
18633
|
+
]);
|
|
18634
|
+
var ShareLinkOwnerRecoveryOutputValidator = external_exports.object({ recovery: ShareOwnerRecoveryValidator }).strict();
|
|
18635
|
+
var ShareLinkOwnerContentOutputValidator = external_exports.object({
|
|
18636
|
+
id: ShareLinkIdValidator,
|
|
18637
|
+
contentVersion: safeVersion,
|
|
18638
|
+
envelope: ShareEnvelopeValidator
|
|
18639
|
+
}).strict();
|
|
18640
|
+
var ResolveShareLinkInputValidator = external_exports.object({
|
|
18641
|
+
id: ShareLinkIdValidator,
|
|
18642
|
+
/** Sent only in a POST body; it must never be placed in a share URL. */
|
|
18643
|
+
passcode: external_exports.string().min(4).max(64).optional()
|
|
18644
|
+
}).strict();
|
|
18645
|
+
var ShareLinkPublicStateValidator = external_exports.discriminatedUnion("state", [
|
|
18646
|
+
external_exports.object({
|
|
18647
|
+
state: external_exports.literal("passcode_required"),
|
|
18648
|
+
id: ShareLinkIdValidator
|
|
18649
|
+
}).strict(),
|
|
18650
|
+
external_exports.object({ state: external_exports.literal("try_later"), id: ShareLinkIdValidator }).strict(),
|
|
18651
|
+
external_exports.object({
|
|
18652
|
+
state: external_exports.literal("active"),
|
|
18653
|
+
id: ShareLinkIdValidator,
|
|
18654
|
+
title: external_exports.string().max(120),
|
|
18655
|
+
note: external_exports.string().max(500).optional(),
|
|
18656
|
+
selectedCount: external_exports.number().int().min(1).max(MAX_SELECTED_CREDENTIALS),
|
|
18657
|
+
contentVersion: safeVersion,
|
|
18658
|
+
contentUrl: external_exports.string(),
|
|
18659
|
+
sharer: external_exports.object({
|
|
18660
|
+
displayName: external_exports.string().max(120),
|
|
18661
|
+
avatar: external_exports.string().max(2048).optional()
|
|
18662
|
+
}),
|
|
18663
|
+
createdAt: external_exports.iso.datetime(),
|
|
18664
|
+
updatedAt: external_exports.iso.datetime(),
|
|
18665
|
+
expiresAt: external_exports.iso.datetime().nullable()
|
|
18666
|
+
}).strict(),
|
|
18667
|
+
external_exports.object({
|
|
18668
|
+
state: external_exports.literal("expired"),
|
|
18669
|
+
id: ShareLinkIdValidator,
|
|
18670
|
+
expiresAt: external_exports.iso.datetime()
|
|
18671
|
+
}).strict(),
|
|
18672
|
+
external_exports.object({
|
|
18673
|
+
state: external_exports.literal("stopped"),
|
|
18674
|
+
id: ShareLinkIdValidator,
|
|
18675
|
+
stoppedAt: external_exports.iso.datetime()
|
|
18676
|
+
}).strict(),
|
|
18677
|
+
external_exports.object({ state: external_exports.literal("not_found"), id: ShareLinkIdValidator }).strict()
|
|
18678
|
+
]);
|
|
18679
|
+
var ListShareLinksInputValidator = external_exports.object({
|
|
18680
|
+
limit: external_exports.number().int().min(1).max(50).default(25),
|
|
18681
|
+
cursor: external_exports.string().max(512).optional()
|
|
18682
|
+
}).strict();
|
|
18683
|
+
var PaginatedShareLinksValidator = PaginationResponseValidator.extend({
|
|
18684
|
+
records: ShareLinkValidator.array()
|
|
18685
|
+
});
|
|
18686
|
+
var AcknowledgeViewInputValidator = external_exports.object({
|
|
18687
|
+
receipt: external_exports.string().min(22).max(128).regex(/^[A-Za-z0-9_-]+$/)
|
|
18688
|
+
}).strict();
|
|
18689
|
+
var AcknowledgeViewOutputValidator = external_exports.object({ ok: external_exports.literal(true) }).strict();
|
|
18690
|
+
var SHARE_VIEW_RECEIPT_TTL_SECONDS = 10 * 60;
|
|
18691
|
+
var ShareLinkPublicContentViewValidator = external_exports.object({
|
|
18692
|
+
id: ShareLinkIdValidator,
|
|
18693
|
+
contentVersion: safeVersion,
|
|
18694
|
+
envelope: ShareEnvelopeValidator,
|
|
18695
|
+
contentUrl: external_exports.string(),
|
|
18696
|
+
receipt: external_exports.string().min(22).max(128).regex(/^[A-Za-z0-9_-]+$/)
|
|
18697
|
+
}).strict();
|