@learncard/helpers 1.6.0 → 1.6.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/helpers.cjs.development.cjs +5983 -4805
- package/dist/helpers.cjs.development.cjs.map +3 -3
- package/dist/helpers.cjs.production.min.cjs +53 -53
- package/dist/helpers.cjs.production.min.cjs.map +4 -4
- package/dist/helpers.esm.js +978 -11
- package/dist/helpers.esm.js.map +3 -3
- package/dist/index.d.cts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/share-content-canonical.d.ts +13 -0
- package/dist/share-content-canonical.d.ts.map +1 -0
- package/package.json +2 -2
- package/src/index.ts +2 -0
- package/src/share-content-canonical.ts +128 -0
package/dist/helpers.esm.js
CHANGED
|
@@ -6,7 +6,11 @@ var __getProtoOf = Object.getPrototypeOf;
|
|
|
6
6
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
7
|
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
8
8
|
var __commonJS = (cb, mod) => function __require() {
|
|
9
|
-
|
|
9
|
+
try {
|
|
10
|
+
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
11
|
+
} catch (e) {
|
|
12
|
+
throw mod = 0, e;
|
|
13
|
+
}
|
|
10
14
|
};
|
|
11
15
|
var __export = (target, all) => {
|
|
12
16
|
for (var name in all)
|
|
@@ -60,6 +64,8 @@ var require_types_cjs_development = __commonJS({
|
|
|
60
64
|
AchievementSubjectValidator: /* @__PURE__ */ __name(() => AchievementSubjectValidator, "AchievementSubjectValidator"),
|
|
61
65
|
AchievementTypeValidator: /* @__PURE__ */ __name(() => AchievementTypeValidator, "AchievementTypeValidator"),
|
|
62
66
|
AchievementValidator: /* @__PURE__ */ __name(() => AchievementValidator, "AchievementValidator"),
|
|
67
|
+
AcknowledgeViewInputValidator: /* @__PURE__ */ __name(() => AcknowledgeViewInputValidator, "AcknowledgeViewInputValidator"),
|
|
68
|
+
AcknowledgeViewOutputValidator: /* @__PURE__ */ __name(() => AcknowledgeViewOutputValidator, "AcknowledgeViewOutputValidator"),
|
|
63
69
|
AddTagInputValidator: /* @__PURE__ */ __name(() => AddTagInputValidator, "AddTagInputValidator"),
|
|
64
70
|
AddressValidator: /* @__PURE__ */ __name(() => AddressValidator, "AddressValidator"),
|
|
65
71
|
AgeRatingValidator: /* @__PURE__ */ __name(() => AgeRatingValidator, "AgeRatingValidator"),
|
|
@@ -75,6 +81,12 @@ var require_types_cjs_development = __commonJS({
|
|
|
75
81
|
AppEventResponseValidator: /* @__PURE__ */ __name(() => AppEventResponseValidator, "AppEventResponseValidator"),
|
|
76
82
|
AppEventValidator: /* @__PURE__ */ __name(() => AppEventValidator, "AppEventValidator"),
|
|
77
83
|
AppListingStatusValidator: /* @__PURE__ */ __name(() => AppListingStatusValidator, "AppListingStatusValidator"),
|
|
84
|
+
AppManifestDiffValidator: /* @__PURE__ */ __name(() => AppManifestDiffValidator, "AppManifestDiffValidator"),
|
|
85
|
+
AppManifestTemplateChangeValidator: /* @__PURE__ */ __name(() => AppManifestTemplateChangeValidator, "AppManifestTemplateChangeValidator"),
|
|
86
|
+
AppManifestTemplateRefValidator: /* @__PURE__ */ __name(() => AppManifestTemplateRefValidator, "AppManifestTemplateRefValidator"),
|
|
87
|
+
AppManifestValidator: /* @__PURE__ */ __name(() => AppManifestValidator, "AppManifestValidator"),
|
|
88
|
+
AppManifestVersionStatusValidator: /* @__PURE__ */ __name(() => AppManifestVersionStatusValidator, "AppManifestVersionStatusValidator"),
|
|
89
|
+
AppManifestVersionValidator: /* @__PURE__ */ __name(() => AppManifestVersionValidator, "AppManifestVersionValidator"),
|
|
78
90
|
AppStoreListingCreateValidator: /* @__PURE__ */ __name(() => AppStoreListingCreateValidator, "AppStoreListingCreateValidator"),
|
|
79
91
|
AppStoreListingSubmitterValidator: /* @__PURE__ */ __name(() => AppStoreListingSubmitterValidator, "AppStoreListingSubmitterValidator"),
|
|
80
92
|
AppStoreListingUpdateValidator: /* @__PURE__ */ __name(() => AppStoreListingUpdateValidator, "AppStoreListingUpdateValidator"),
|
|
@@ -96,6 +108,8 @@ var require_types_cjs_development = __commonJS({
|
|
|
96
108
|
BoostRecipientValidator: /* @__PURE__ */ __name(() => BoostRecipientValidator, "BoostRecipientValidator"),
|
|
97
109
|
BoostRecipientWithChildrenValidator: /* @__PURE__ */ __name(() => BoostRecipientWithChildrenValidator, "BoostRecipientWithChildrenValidator"),
|
|
98
110
|
BoostValidator: /* @__PURE__ */ __name(() => BoostValidator, "BoostValidator"),
|
|
111
|
+
CapturedConsentRecordValidator: /* @__PURE__ */ __name(() => CapturedConsentRecordValidator, "CapturedConsentRecordValidator"),
|
|
112
|
+
CapturedTemplateRecordValidator: /* @__PURE__ */ __name(() => CapturedTemplateRecordValidator, "CapturedTemplateRecordValidator"),
|
|
99
113
|
CheckCredentialEventValidator: /* @__PURE__ */ __name(() => CheckCredentialEventValidator, "CheckCredentialEventValidator"),
|
|
100
114
|
CheckIssuanceStatusEventValidator: /* @__PURE__ */ __name(() => CheckIssuanceStatusEventValidator, "CheckIssuanceStatusEventValidator"),
|
|
101
115
|
ClaimHookQueryValidator: /* @__PURE__ */ __name(() => ClaimHookQueryValidator, "ClaimHookQueryValidator"),
|
|
@@ -117,6 +131,7 @@ var require_types_cjs_development = __commonJS({
|
|
|
117
131
|
ConsentFlowDataForDidQueryValidator: /* @__PURE__ */ __name(() => ConsentFlowDataForDidQueryValidator, "ConsentFlowDataForDidQueryValidator"),
|
|
118
132
|
ConsentFlowDataQueryValidator: /* @__PURE__ */ __name(() => ConsentFlowDataQueryValidator, "ConsentFlowDataQueryValidator"),
|
|
119
133
|
ConsentFlowGuardianApprovalValidator: /* @__PURE__ */ __name(() => ConsentFlowGuardianApprovalValidator, "ConsentFlowGuardianApprovalValidator"),
|
|
134
|
+
ConsentFlowReferralValidator: /* @__PURE__ */ __name(() => ConsentFlowReferralValidator, "ConsentFlowReferralValidator"),
|
|
120
135
|
ConsentFlowTermValidator: /* @__PURE__ */ __name(() => ConsentFlowTermValidator, "ConsentFlowTermValidator"),
|
|
121
136
|
ConsentFlowTermsQueryValidator: /* @__PURE__ */ __name(() => ConsentFlowTermsQueryValidator, "ConsentFlowTermsQueryValidator"),
|
|
122
137
|
ConsentFlowTermsStatusValidator: /* @__PURE__ */ __name(() => ConsentFlowTermsStatusValidator, "ConsentFlowTermsStatusValidator"),
|
|
@@ -124,6 +139,10 @@ var require_types_cjs_development = __commonJS({
|
|
|
124
139
|
ConsentFlowTransactionActionValidator: /* @__PURE__ */ __name(() => ConsentFlowTransactionActionValidator, "ConsentFlowTransactionActionValidator"),
|
|
125
140
|
ConsentFlowTransactionValidator: /* @__PURE__ */ __name(() => ConsentFlowTransactionValidator, "ConsentFlowTransactionValidator"),
|
|
126
141
|
ConsentFlowTransactionsQueryValidator: /* @__PURE__ */ __name(() => ConsentFlowTransactionsQueryValidator, "ConsentFlowTransactionsQueryValidator"),
|
|
142
|
+
ConsentFlowWebhookMetadataValidator: /* @__PURE__ */ __name(() => ConsentFlowWebhookMetadataValidator, "ConsentFlowWebhookMetadataValidator"),
|
|
143
|
+
ConsentRequestPersonalFieldValidator: /* @__PURE__ */ __name(() => ConsentRequestPersonalFieldValidator, "ConsentRequestPersonalFieldValidator"),
|
|
144
|
+
ConsentRequestValidator: /* @__PURE__ */ __name(() => ConsentRequestValidator, "ConsentRequestValidator"),
|
|
145
|
+
ConsentRequestWalletCategoryValidator: /* @__PURE__ */ __name(() => ConsentRequestWalletCategoryValidator, "ConsentRequestWalletCategoryValidator"),
|
|
127
146
|
ContactMethodCreateValidator: /* @__PURE__ */ __name(() => ContactMethodCreateValidator, "ContactMethodCreateValidator"),
|
|
128
147
|
ContactMethodQueryValidator: /* @__PURE__ */ __name(() => ContactMethodQueryValidator, "ContactMethodQueryValidator"),
|
|
129
148
|
ContactMethodValidator: /* @__PURE__ */ __name(() => ContactMethodValidator, "ContactMethodValidator"),
|
|
@@ -131,12 +150,14 @@ var require_types_cjs_development = __commonJS({
|
|
|
131
150
|
ContactMethodVerificationValidator: /* @__PURE__ */ __name(() => ContactMethodVerificationValidator, "ContactMethodVerificationValidator"),
|
|
132
151
|
ContextValidator: /* @__PURE__ */ __name(() => ContextValidator, "ContextValidator"),
|
|
133
152
|
ContractCredentialValidator: /* @__PURE__ */ __name(() => ContractCredentialValidator, "ContractCredentialValidator"),
|
|
153
|
+
ContractRequestFieldsValidator: /* @__PURE__ */ __name(() => ContractRequestFieldsValidator, "ContractRequestFieldsValidator"),
|
|
134
154
|
CountSkillsInputValidator: /* @__PURE__ */ __name(() => CountSkillsInputValidator, "CountSkillsInputValidator"),
|
|
135
155
|
CountSkillsResultValidator: /* @__PURE__ */ __name(() => CountSkillsResultValidator, "CountSkillsResultValidator"),
|
|
136
156
|
CreateContactMethodSessionResponseValidator: /* @__PURE__ */ __name(() => CreateContactMethodSessionResponseValidator, "CreateContactMethodSessionResponseValidator"),
|
|
137
157
|
CreateContactMethodSessionValidator: /* @__PURE__ */ __name(() => CreateContactMethodSessionValidator, "CreateContactMethodSessionValidator"),
|
|
138
158
|
CreateManagedFrameworkBatchInputValidator: /* @__PURE__ */ __name(() => CreateManagedFrameworkBatchInputValidator, "CreateManagedFrameworkBatchInputValidator"),
|
|
139
159
|
CreateManagedFrameworkInputValidator: /* @__PURE__ */ __name(() => CreateManagedFrameworkInputValidator, "CreateManagedFrameworkInputValidator"),
|
|
160
|
+
CreateShareLinkInputValidator: /* @__PURE__ */ __name(() => CreateShareLinkInputValidator, "CreateShareLinkInputValidator"),
|
|
140
161
|
CreateSkillInputValidator: /* @__PURE__ */ __name(() => CreateSkillInputValidator, "CreateSkillInputValidator"),
|
|
141
162
|
CreateSkillsBatchInputValidator: /* @__PURE__ */ __name(() => CreateSkillsBatchInputValidator, "CreateSkillsBatchInputValidator"),
|
|
142
163
|
CredentialActivityEventTypeValidator: /* @__PURE__ */ __name(() => CredentialActivityEventTypeValidator, "CredentialActivityEventTypeValidator"),
|
|
@@ -165,13 +186,19 @@ var require_types_cjs_development = __commonJS({
|
|
|
165
186
|
CriteriaValidator: /* @__PURE__ */ __name(() => CriteriaValidator, "CriteriaValidator"),
|
|
166
187
|
DEFAULT_BITSTRING_STATUS_LIST_SIZE: /* @__PURE__ */ __name(() => DEFAULT_BITSTRING_STATUS_LIST_SIZE, "DEFAULT_BITSTRING_STATUS_LIST_SIZE"),
|
|
167
188
|
DeleteFrameworkInputValidator: /* @__PURE__ */ __name(() => DeleteFrameworkInputValidator, "DeleteFrameworkInputValidator"),
|
|
189
|
+
DeleteShareLinkAttachmentChunksInputValidator: /* @__PURE__ */ __name(() => DeleteShareLinkAttachmentChunksInputValidator, "DeleteShareLinkAttachmentChunksInputValidator"),
|
|
190
|
+
DeleteShareLinkAttachmentChunksOutputValidator: /* @__PURE__ */ __name(() => DeleteShareLinkAttachmentChunksOutputValidator, "DeleteShareLinkAttachmentChunksOutputValidator"),
|
|
168
191
|
DeleteSkillInputValidator: /* @__PURE__ */ __name(() => DeleteSkillInputValidator, "DeleteSkillInputValidator"),
|
|
169
192
|
DidDocumentValidator: /* @__PURE__ */ __name(() => DidDocumentValidator, "DidDocumentValidator"),
|
|
170
193
|
EMPTY_IN_APP_MESSAGES_FLAG: /* @__PURE__ */ __name(() => EMPTY_IN_APP_MESSAGES_FLAG, "EMPTY_IN_APP_MESSAGES_FLAG"),
|
|
194
|
+
ESCROW_PIN_LOCKED_MESSAGE: /* @__PURE__ */ __name(() => ESCROW_PIN_LOCKED_MESSAGE, "ESCROW_PIN_LOCKED_MESSAGE"),
|
|
195
|
+
ESCROW_PIN_MISMATCH_PATTERN: /* @__PURE__ */ __name(() => ESCROW_PIN_MISMATCH_PATTERN, "ESCROW_PIN_MISMATCH_PATTERN"),
|
|
196
|
+
ESCROW_PIN_UNAVAILABLE_MESSAGE: /* @__PURE__ */ __name(() => ESCROW_PIN_UNAVAILABLE_MESSAGE, "ESCROW_PIN_UNAVAILABLE_MESSAGE"),
|
|
171
197
|
EncryptedCredentialRecordValidator: /* @__PURE__ */ __name(() => EncryptedCredentialRecordValidator, "EncryptedCredentialRecordValidator"),
|
|
172
198
|
EncryptedRecordValidator: /* @__PURE__ */ __name(() => EncryptedRecordValidator, "EncryptedRecordValidator"),
|
|
173
199
|
EndorsementCredentialValidator: /* @__PURE__ */ __name(() => EndorsementCredentialValidator, "EndorsementCredentialValidator"),
|
|
174
200
|
EndorsementSubjectValidator: /* @__PURE__ */ __name(() => EndorsementSubjectValidator, "EndorsementSubjectValidator"),
|
|
201
|
+
EscrowPinStatusValidator: /* @__PURE__ */ __name(() => EscrowPinStatusValidator, "EscrowPinStatusValidator"),
|
|
175
202
|
EvidenceValidator: /* @__PURE__ */ __name(() => EvidenceValidator, "EvidenceValidator"),
|
|
176
203
|
FlatAuthGrantValidator: /* @__PURE__ */ __name(() => FlatAuthGrantValidator, "FlatAuthGrantValidator"),
|
|
177
204
|
FrameworkWithSkillsValidator: /* @__PURE__ */ __name(() => FrameworkWithSkillsValidator, "FrameworkWithSkillsValidator"),
|
|
@@ -183,6 +210,7 @@ var require_types_cjs_development = __commonJS({
|
|
|
183
210
|
GetCredentialRefreshHistoryResultValidator: /* @__PURE__ */ __name(() => GetCredentialRefreshHistoryResultValidator, "GetCredentialRefreshHistoryResultValidator"),
|
|
184
211
|
GetFullSkillTreeInputValidator: /* @__PURE__ */ __name(() => GetFullSkillTreeInputValidator, "GetFullSkillTreeInputValidator"),
|
|
185
212
|
GetFullSkillTreeResultValidator: /* @__PURE__ */ __name(() => GetFullSkillTreeResultValidator, "GetFullSkillTreeResultValidator"),
|
|
213
|
+
GetShareLinkAttachmentChunkInputValidator: /* @__PURE__ */ __name(() => GetShareLinkAttachmentChunkInputValidator, "GetShareLinkAttachmentChunkInputValidator"),
|
|
186
214
|
GetSkillPathInputValidator: /* @__PURE__ */ __name(() => GetSkillPathInputValidator, "GetSkillPathInputValidator"),
|
|
187
215
|
GetSkillPathResultValidator: /* @__PURE__ */ __name(() => GetSkillPathResultValidator, "GetSkillPathResultValidator"),
|
|
188
216
|
GetTemplateRecipientsEventValidator: /* @__PURE__ */ __name(() => GetTemplateRecipientsEventValidator, "GetTemplateRecipientsEventValidator"),
|
|
@@ -200,6 +228,12 @@ var require_types_cjs_development = __commonJS({
|
|
|
200
228
|
InboxCredentialRefreshReceiptValidator: /* @__PURE__ */ __name(() => InboxCredentialRefreshReceiptValidator, "InboxCredentialRefreshReceiptValidator"),
|
|
201
229
|
InboxCredentialValidator: /* @__PURE__ */ __name(() => InboxCredentialValidator, "InboxCredentialValidator"),
|
|
202
230
|
IncrementCounterEventValidator: /* @__PURE__ */ __name(() => IncrementCounterEventValidator, "IncrementCounterEventValidator"),
|
|
231
|
+
InlineAlignmentValidator: /* @__PURE__ */ __name(() => InlineAlignmentValidator, "InlineAlignmentValidator"),
|
|
232
|
+
InlineCredentialTemplateValidator: /* @__PURE__ */ __name(() => InlineCredentialTemplateValidator, "InlineCredentialTemplateValidator"),
|
|
233
|
+
InlineEvidenceValidator: /* @__PURE__ */ __name(() => InlineEvidenceValidator, "InlineEvidenceValidator"),
|
|
234
|
+
InlineSendCredentialEventValidator: /* @__PURE__ */ __name(() => InlineSendCredentialEventValidator, "InlineSendCredentialEventValidator"),
|
|
235
|
+
InlineWalletCategoryValidator: /* @__PURE__ */ __name(() => InlineWalletCategoryValidator, "InlineWalletCategoryValidator"),
|
|
236
|
+
InlineWalletSkillTagValidator: /* @__PURE__ */ __name(() => InlineWalletSkillTagValidator, "InlineWalletSkillTagValidator"),
|
|
203
237
|
InstalledAppValidator: /* @__PURE__ */ __name(() => InstalledAppValidator, "InstalledAppValidator"),
|
|
204
238
|
IssueInboxCredentialBatchItemResultValidator: /* @__PURE__ */ __name(() => IssueInboxCredentialBatchItemResultValidator, "IssueInboxCredentialBatchItemResultValidator"),
|
|
205
239
|
IssueInboxCredentialBatchItemValidator: /* @__PURE__ */ __name(() => IssueInboxCredentialBatchItemValidator, "IssueInboxCredentialBatchItemValidator"),
|
|
@@ -252,9 +286,19 @@ var require_types_cjs_development = __commonJS({
|
|
|
252
286
|
LCNVisibleProfileValidator: /* @__PURE__ */ __name(() => LCNVisibleProfileValidator, "LCNVisibleProfileValidator"),
|
|
253
287
|
LaunchTypeValidator: /* @__PURE__ */ __name(() => LaunchTypeValidator, "LaunchTypeValidator"),
|
|
254
288
|
LearnCardRefreshAuthorizationValidator: /* @__PURE__ */ __name(() => LearnCardRefreshAuthorizationValidator, "LearnCardRefreshAuthorizationValidator"),
|
|
289
|
+
LegacySendCredentialEventValidator: /* @__PURE__ */ __name(() => LegacySendCredentialEventValidator, "LegacySendCredentialEventValidator"),
|
|
255
290
|
LinkProviderFrameworkInputValidator: /* @__PURE__ */ __name(() => LinkProviderFrameworkInputValidator, "LinkProviderFrameworkInputValidator"),
|
|
291
|
+
ListShareLinksInputValidator: /* @__PURE__ */ __name(() => ListShareLinksInputValidator, "ListShareLinksInputValidator"),
|
|
292
|
+
MAX_ENDORSEMENTS: /* @__PURE__ */ __name(() => MAX_ENDORSEMENTS, "MAX_ENDORSEMENTS"),
|
|
293
|
+
MAX_SELECTED_CREDENTIALS: /* @__PURE__ */ __name(() => MAX_SELECTED_CREDENTIALS, "MAX_SELECTED_CREDENTIALS"),
|
|
294
|
+
MAX_SHARE_CIPHERTEXT_BYTES: /* @__PURE__ */ __name(() => MAX_SHARE_CIPHERTEXT_BYTES, "MAX_SHARE_CIPHERTEXT_BYTES"),
|
|
295
|
+
MAX_SHARE_LINK_REQUEST_BYTES: /* @__PURE__ */ __name(() => MAX_SHARE_LINK_REQUEST_BYTES, "MAX_SHARE_LINK_REQUEST_BYTES"),
|
|
296
|
+
MAX_SHARE_RECOVERY_JWE_BYTES: /* @__PURE__ */ __name(() => MAX_SHARE_RECOVERY_JWE_BYTES, "MAX_SHARE_RECOVERY_JWE_BYTES"),
|
|
297
|
+
MAX_SHARE_SOURCE_URI_CHARS: /* @__PURE__ */ __name(() => MAX_SHARE_SOURCE_URI_CHARS, "MAX_SHARE_SOURCE_URI_CHARS"),
|
|
298
|
+
MAX_VP_MEMBERS: /* @__PURE__ */ __name(() => MAX_VP_MEMBERS, "MAX_VP_MEMBERS"),
|
|
256
299
|
ManagedCredentialRefreshReceiptValidator: /* @__PURE__ */ __name(() => ManagedCredentialRefreshReceiptValidator, "ManagedCredentialRefreshReceiptValidator"),
|
|
257
300
|
ManagedCredentialRefreshServiceValidator: /* @__PURE__ */ __name(() => ManagedCredentialRefreshServiceValidator2, "ManagedCredentialRefreshServiceValidator"),
|
|
301
|
+
NormalizedConsentScopesValidator: /* @__PURE__ */ __name(() => NormalizedConsentScopesValidator, "NormalizedConsentScopesValidator"),
|
|
258
302
|
PaginatedAppStoreListingsValidator: /* @__PURE__ */ __name(() => PaginatedAppStoreListingsValidator, "PaginatedAppStoreListingsValidator"),
|
|
259
303
|
PaginatedBoostRecipientsValidator: /* @__PURE__ */ __name(() => PaginatedBoostRecipientsValidator, "PaginatedBoostRecipientsValidator"),
|
|
260
304
|
PaginatedBoostRecipientsWithChildrenValidator: /* @__PURE__ */ __name(() => PaginatedBoostRecipientsWithChildrenValidator, "PaginatedBoostRecipientsWithChildrenValidator"),
|
|
@@ -275,11 +319,14 @@ var require_types_cjs_development = __commonJS({
|
|
|
275
319
|
PaginatedLCNProfileManagersValidator: /* @__PURE__ */ __name(() => PaginatedLCNProfileManagersValidator, "PaginatedLCNProfileManagersValidator"),
|
|
276
320
|
PaginatedLCNProfilesAndManagersValidator: /* @__PURE__ */ __name(() => PaginatedLCNProfilesAndManagersValidator, "PaginatedLCNProfilesAndManagersValidator"),
|
|
277
321
|
PaginatedLCNProfilesValidator: /* @__PURE__ */ __name(() => PaginatedLCNProfilesValidator, "PaginatedLCNProfilesValidator"),
|
|
322
|
+
PaginatedShareLinksValidator: /* @__PURE__ */ __name(() => PaginatedShareLinksValidator, "PaginatedShareLinksValidator"),
|
|
278
323
|
PaginatedSkillFrameworksValidator: /* @__PURE__ */ __name(() => PaginatedSkillFrameworksValidator, "PaginatedSkillFrameworksValidator"),
|
|
279
324
|
PaginatedSkillTreeValidator: /* @__PURE__ */ __name(() => PaginatedSkillTreeValidator, "PaginatedSkillTreeValidator"),
|
|
280
325
|
PaginatedVisibleLCNProfilesValidator: /* @__PURE__ */ __name(() => PaginatedVisibleLCNProfilesValidator, "PaginatedVisibleLCNProfilesValidator"),
|
|
281
326
|
PaginationOptionsValidator: /* @__PURE__ */ __name(() => PaginationOptionsValidator, "PaginationOptionsValidator"),
|
|
282
327
|
PaginationResponseValidator: /* @__PURE__ */ __name(() => PaginationResponseValidator, "PaginationResponseValidator"),
|
|
328
|
+
PendingListingUpdateStatusValidator: /* @__PURE__ */ __name(() => PendingListingUpdateStatusValidator, "PendingListingUpdateStatusValidator"),
|
|
329
|
+
PendingListingUpdateValidator: /* @__PURE__ */ __name(() => PendingListingUpdateValidator, "PendingListingUpdateValidator"),
|
|
283
330
|
PrepareRefreshableSendInputValidator: /* @__PURE__ */ __name(() => PrepareRefreshableSendInputValidator, "PrepareRefreshableSendInputValidator"),
|
|
284
331
|
PrepareRefreshableSendResultValidator: /* @__PURE__ */ __name(() => PrepareRefreshableSendResultValidator, "PrepareRefreshableSendResultValidator"),
|
|
285
332
|
ProfileValidator: /* @__PURE__ */ __name(() => ProfileValidator, "ProfileValidator"),
|
|
@@ -292,6 +339,9 @@ var require_types_cjs_development = __commonJS({
|
|
|
292
339
|
PublishCredentialRefreshResultValidator: /* @__PURE__ */ __name(() => PublishCredentialRefreshResultValidator, "PublishCredentialRefreshResultValidator"),
|
|
293
340
|
PublishIssuerSignedRefreshValidator: /* @__PURE__ */ __name(() => PublishIssuerSignedRefreshValidator, "PublishIssuerSignedRefreshValidator"),
|
|
294
341
|
PublishSigningAuthorityRefreshValidator: /* @__PURE__ */ __name(() => PublishSigningAuthorityRefreshValidator, "PublishSigningAuthorityRefreshValidator"),
|
|
342
|
+
PutShareLinkAttachmentChunkInputValidator: /* @__PURE__ */ __name(() => PutShareLinkAttachmentChunkInputValidator, "PutShareLinkAttachmentChunkInputValidator"),
|
|
343
|
+
PutShareLinkAttachmentChunkOutputValidator: /* @__PURE__ */ __name(() => PutShareLinkAttachmentChunkOutputValidator, "PutShareLinkAttachmentChunkOutputValidator"),
|
|
344
|
+
RawInlineCredentialTemplateValidator: /* @__PURE__ */ __name(() => RawInlineCredentialTemplateValidator, "RawInlineCredentialTemplateValidator"),
|
|
295
345
|
RefreshServiceValidator: /* @__PURE__ */ __name(() => RefreshServiceValidator, "RefreshServiceValidator"),
|
|
296
346
|
RegExpValidator: /* @__PURE__ */ __name(() => RegExpValidator, "RegExpValidator"),
|
|
297
347
|
RelatedValidator: /* @__PURE__ */ __name(() => RelatedValidator, "RelatedValidator"),
|
|
@@ -299,16 +349,26 @@ var require_types_cjs_development = __commonJS({
|
|
|
299
349
|
ReplaceSkillFrameworkSkillsInputValidator: /* @__PURE__ */ __name(() => ReplaceSkillFrameworkSkillsInputValidator, "ReplaceSkillFrameworkSkillsInputValidator"),
|
|
300
350
|
ReplaceSkillFrameworkSkillsResultValidator: /* @__PURE__ */ __name(() => ReplaceSkillFrameworkSkillsResultValidator, "ReplaceSkillFrameworkSkillsResultValidator"),
|
|
301
351
|
RequestLearnerContextEventValidator: /* @__PURE__ */ __name(() => RequestLearnerContextEventValidator, "RequestLearnerContextEventValidator"),
|
|
352
|
+
ResolveShareLinkInputValidator: /* @__PURE__ */ __name(() => ResolveShareLinkInputValidator, "ResolveShareLinkInputValidator"),
|
|
302
353
|
ResultDescriptionValidator: /* @__PURE__ */ __name(() => ResultDescriptionValidator, "ResultDescriptionValidator"),
|
|
303
354
|
ResultStatusTypeValidator: /* @__PURE__ */ __name(() => ResultStatusTypeValidator, "ResultStatusTypeValidator"),
|
|
304
355
|
ResultTypeValidator: /* @__PURE__ */ __name(() => ResultTypeValidator, "ResultTypeValidator"),
|
|
305
356
|
ResultValidator: /* @__PURE__ */ __name(() => ResultValidator, "ResultValidator"),
|
|
306
357
|
RubricCriterionValidator: /* @__PURE__ */ __name(() => RubricCriterionValidator, "RubricCriterionValidator"),
|
|
358
|
+
SHARE_AAD_PREFIX: /* @__PURE__ */ __name(() => SHARE_AAD_PREFIX, "SHARE_AAD_PREFIX"),
|
|
359
|
+
SHARE_CONTENT_KEY_BYTES: /* @__PURE__ */ __name(() => SHARE_CONTENT_KEY_BYTES, "SHARE_CONTENT_KEY_BYTES"),
|
|
360
|
+
SHARE_IV_BYTES: /* @__PURE__ */ __name(() => SHARE_IV_BYTES, "SHARE_IV_BYTES"),
|
|
361
|
+
SHARE_LINK_ID_BYTES: /* @__PURE__ */ __name(() => SHARE_LINK_ID_BYTES, "SHARE_LINK_ID_BYTES"),
|
|
362
|
+
SHARE_LINK_PROTOCOL: /* @__PURE__ */ __name(() => SHARE_LINK_PROTOCOL, "SHARE_LINK_PROTOCOL"),
|
|
363
|
+
SHARE_RECOVERY_PROTOCOL: /* @__PURE__ */ __name(() => SHARE_RECOVERY_PROTOCOL, "SHARE_RECOVERY_PROTOCOL"),
|
|
364
|
+
SHARE_TAG_BYTES: /* @__PURE__ */ __name(() => SHARE_TAG_BYTES, "SHARE_TAG_BYTES"),
|
|
365
|
+
SHARE_VIEW_RECEIPT_TTL_SECONDS: /* @__PURE__ */ __name(() => SHARE_VIEW_RECEIPT_TTL_SECONDS, "SHARE_VIEW_RECEIPT_TTL_SECONDS"),
|
|
307
366
|
SendAiSessionCredentialEventValidator: /* @__PURE__ */ __name(() => SendAiSessionCredentialEventValidator, "SendAiSessionCredentialEventValidator"),
|
|
308
367
|
SendBoostInputValidator: /* @__PURE__ */ __name(() => SendBoostInputValidator, "SendBoostInputValidator"),
|
|
309
368
|
SendBoostResponseValidator: /* @__PURE__ */ __name(() => SendBoostResponseValidator, "SendBoostResponseValidator"),
|
|
310
369
|
SendBoostTemplateValidator: /* @__PURE__ */ __name(() => SendBoostTemplateValidator, "SendBoostTemplateValidator"),
|
|
311
370
|
SendBrandingOptionsValidator: /* @__PURE__ */ __name(() => SendBrandingOptionsValidator, "SendBrandingOptionsValidator"),
|
|
371
|
+
SendContractRequestValidator: /* @__PURE__ */ __name(() => SendContractRequestValidator, "SendContractRequestValidator"),
|
|
312
372
|
SendCredentialEventValidator: /* @__PURE__ */ __name(() => SendCredentialEventValidator, "SendCredentialEventValidator"),
|
|
313
373
|
SendInboxResponseValidator: /* @__PURE__ */ __name(() => SendInboxResponseValidator, "SendInboxResponseValidator"),
|
|
314
374
|
SendInputValidator: /* @__PURE__ */ __name(() => SendInputValidator, "SendInputValidator"),
|
|
@@ -318,6 +378,36 @@ var require_types_cjs_development = __commonJS({
|
|
|
318
378
|
SentCredentialInfoValidator: /* @__PURE__ */ __name(() => SentCredentialInfoValidator, "SentCredentialInfoValidator"),
|
|
319
379
|
ServiceValidator: /* @__PURE__ */ __name(() => ServiceValidator, "ServiceValidator"),
|
|
320
380
|
SetPrimaryContactMethodValidator: /* @__PURE__ */ __name(() => SetPrimaryContactMethodValidator, "SetPrimaryContactMethodValidator"),
|
|
381
|
+
ShareCiphertextValidator: /* @__PURE__ */ __name(() => ShareCiphertextValidator, "ShareCiphertextValidator"),
|
|
382
|
+
ShareContentKeyValidator: /* @__PURE__ */ __name(() => ShareContentKeyValidator, "ShareContentKeyValidator"),
|
|
383
|
+
ShareContentStateValidator: /* @__PURE__ */ __name(() => ShareContentStateValidator, "ShareContentStateValidator"),
|
|
384
|
+
ShareEndorsementEntryValidator: /* @__PURE__ */ __name(() => ShareEndorsementEntryValidator, "ShareEndorsementEntryValidator"),
|
|
385
|
+
ShareEnvelopeValidator: /* @__PURE__ */ __name(() => ShareEnvelopeValidator, "ShareEnvelopeValidator"),
|
|
386
|
+
ShareIvValidator: /* @__PURE__ */ __name(() => ShareIvValidator, "ShareIvValidator"),
|
|
387
|
+
ShareLinkAttachmentChunkEnvelopeValidator: /* @__PURE__ */ __name(() => ShareLinkAttachmentChunkEnvelopeValidator, "ShareLinkAttachmentChunkEnvelopeValidator"),
|
|
388
|
+
ShareLinkAttachmentChunkOutputValidator: /* @__PURE__ */ __name(() => ShareLinkAttachmentChunkOutputValidator, "ShareLinkAttachmentChunkOutputValidator"),
|
|
389
|
+
ShareLinkAttachmentValidator: /* @__PURE__ */ __name(() => ShareLinkAttachmentValidator, "ShareLinkAttachmentValidator"),
|
|
390
|
+
ShareLinkIdInputValidator: /* @__PURE__ */ __name(() => ShareLinkIdInputValidator, "ShareLinkIdInputValidator"),
|
|
391
|
+
ShareLinkIdValidator: /* @__PURE__ */ __name(() => ShareLinkIdValidator, "ShareLinkIdValidator"),
|
|
392
|
+
ShareLinkOperationKeyInputValidator: /* @__PURE__ */ __name(() => ShareLinkOperationKeyInputValidator, "ShareLinkOperationKeyInputValidator"),
|
|
393
|
+
ShareLinkOwnerCommitOutputValidator: /* @__PURE__ */ __name(() => ShareLinkOwnerCommitOutputValidator, "ShareLinkOwnerCommitOutputValidator"),
|
|
394
|
+
ShareLinkOwnerContentOutputValidator: /* @__PURE__ */ __name(() => ShareLinkOwnerContentOutputValidator, "ShareLinkOwnerContentOutputValidator"),
|
|
395
|
+
ShareLinkOwnerRecoveryOutputValidator: /* @__PURE__ */ __name(() => ShareLinkOwnerRecoveryOutputValidator, "ShareLinkOwnerRecoveryOutputValidator"),
|
|
396
|
+
ShareLinkOwnerStatusOutputValidator: /* @__PURE__ */ __name(() => ShareLinkOwnerStatusOutputValidator, "ShareLinkOwnerStatusOutputValidator"),
|
|
397
|
+
ShareLinkPublicContentViewValidator: /* @__PURE__ */ __name(() => ShareLinkPublicContentViewValidator, "ShareLinkPublicContentViewValidator"),
|
|
398
|
+
ShareLinkPublicStateValidator: /* @__PURE__ */ __name(() => ShareLinkPublicStateValidator, "ShareLinkPublicStateValidator"),
|
|
399
|
+
ShareLinkStatusValidator: /* @__PURE__ */ __name(() => ShareLinkStatusValidator, "ShareLinkStatusValidator"),
|
|
400
|
+
ShareLinkValidator: /* @__PURE__ */ __name(() => ShareLinkValidator, "ShareLinkValidator"),
|
|
401
|
+
ShareManifestPresentationValidator: /* @__PURE__ */ __name(() => ShareManifestPresentationValidator, "ShareManifestPresentationValidator"),
|
|
402
|
+
ShareOwnerRecoveryValidator: /* @__PURE__ */ __name(() => ShareOwnerRecoveryValidator, "ShareOwnerRecoveryValidator"),
|
|
403
|
+
SharePayloadValidator: /* @__PURE__ */ __name(() => SharePayloadValidator, "SharePayloadValidator"),
|
|
404
|
+
SharePayloadValidatorShape: /* @__PURE__ */ __name(() => SharePayloadValidatorShape, "SharePayloadValidatorShape"),
|
|
405
|
+
ShareRecoveryEndorsementValidator: /* @__PURE__ */ __name(() => ShareRecoveryEndorsementValidator, "ShareRecoveryEndorsementValidator"),
|
|
406
|
+
ShareRecoveryPlaintextValidator: /* @__PURE__ */ __name(() => ShareRecoveryPlaintextValidator, "ShareRecoveryPlaintextValidator"),
|
|
407
|
+
ShareRecoverySelectionValidator: /* @__PURE__ */ __name(() => ShareRecoverySelectionValidator, "ShareRecoverySelectionValidator"),
|
|
408
|
+
ShareSelectionEntryValidator: /* @__PURE__ */ __name(() => ShareSelectionEntryValidator, "ShareSelectionEntryValidator"),
|
|
409
|
+
ShareSharerValidator: /* @__PURE__ */ __name(() => ShareSharerValidator, "ShareSharerValidator"),
|
|
410
|
+
SimpleInlineCredentialTemplateValidator: /* @__PURE__ */ __name(() => SimpleInlineCredentialTemplateValidator, "SimpleInlineCredentialTemplateValidator"),
|
|
321
411
|
SkillDeletionStrategyValidator: /* @__PURE__ */ __name(() => SkillDeletionStrategyValidator, "SkillDeletionStrategyValidator"),
|
|
322
412
|
SkillFrameworkAdminInputValidator: /* @__PURE__ */ __name(() => SkillFrameworkAdminInputValidator, "SkillFrameworkAdminInputValidator"),
|
|
323
413
|
SkillFrameworkAdminsValidator: /* @__PURE__ */ __name(() => SkillFrameworkAdminsValidator, "SkillFrameworkAdminsValidator"),
|
|
@@ -348,8 +438,12 @@ var require_types_cjs_development = __commonJS({
|
|
|
348
438
|
UnsignedClrCredentialValidator: /* @__PURE__ */ __name(() => UnsignedClrCredentialValidator, "UnsignedClrCredentialValidator"),
|
|
349
439
|
UnsignedVCValidator: /* @__PURE__ */ __name(() => UnsignedVCValidator, "UnsignedVCValidator"),
|
|
350
440
|
UnsignedVPValidator: /* @__PURE__ */ __name(() => UnsignedVPValidator, "UnsignedVPValidator"),
|
|
441
|
+
UnsupportedSignInOperationError: /* @__PURE__ */ __name(() => UnsupportedSignInOperationError, "UnsupportedSignInOperationError"),
|
|
351
442
|
UpdateFrameworkInputValidator: /* @__PURE__ */ __name(() => UpdateFrameworkInputValidator, "UpdateFrameworkInputValidator"),
|
|
443
|
+
UpdateShareLinkInputValidator: /* @__PURE__ */ __name(() => UpdateShareLinkInputValidator, "UpdateShareLinkInputValidator"),
|
|
352
444
|
UpdateSkillInputValidator: /* @__PURE__ */ __name(() => UpdateSkillInputValidator, "UpdateSkillInputValidator"),
|
|
445
|
+
UpsertConsentContractEventValidator: /* @__PURE__ */ __name(() => UpsertConsentContractEventValidator, "UpsertConsentContractEventValidator"),
|
|
446
|
+
UpsertConsentContractResponseValidator: /* @__PURE__ */ __name(() => UpsertConsentContractResponseValidator, "UpsertConsentContractResponseValidator"),
|
|
353
447
|
VC2EvidenceValidator: /* @__PURE__ */ __name(() => VC2EvidenceValidator, "VC2EvidenceValidator"),
|
|
354
448
|
VCValidator: /* @__PURE__ */ __name(() => VCValidator, "VCValidator"),
|
|
355
449
|
VPValidator: /* @__PURE__ */ __name(() => VPValidator, "VPValidator"),
|
|
@@ -360,7 +454,12 @@ var require_types_cjs_development = __commonJS({
|
|
|
360
454
|
VerificationStatusValidator: /* @__PURE__ */ __name(() => VerificationStatusValidator, "VerificationStatusValidator"),
|
|
361
455
|
appStoreActionValidator: /* @__PURE__ */ __name(() => appStoreActionValidator, "appStoreActionValidator"),
|
|
362
456
|
capgoUpdateActionValidator: /* @__PURE__ */ __name(() => capgoUpdateActionValidator, "capgoUpdateActionValidator"),
|
|
457
|
+
classifyShareManifest: /* @__PURE__ */ __name(() => classifyShareManifest, "classifyShareManifest"),
|
|
458
|
+
decodeBase64Url: /* @__PURE__ */ __name(() => decodeBase64Url, "decodeBase64Url"),
|
|
459
|
+
decodedBase64UrlByteLength: /* @__PURE__ */ __name(() => decodedBase64UrlByteLength, "decodedBase64UrlByteLength"),
|
|
363
460
|
dismissActionValidator: /* @__PURE__ */ __name(() => dismissActionValidator, "dismissActionValidator"),
|
|
461
|
+
encodeBase64Url: /* @__PURE__ */ __name(() => encodeBase64Url, "encodeBase64Url"),
|
|
462
|
+
escrowPinMismatchMessage: /* @__PURE__ */ __name(() => escrowPinMismatchMessage, "escrowPinMismatchMessage"),
|
|
364
463
|
externalLinkActionValidator: /* @__PURE__ */ __name(() => externalLinkActionValidator, "externalLinkActionValidator"),
|
|
365
464
|
inAppMessageActionStyleValidator: /* @__PURE__ */ __name(() => inAppMessageActionStyleValidator, "inAppMessageActionStyleValidator"),
|
|
366
465
|
inAppMessageActionTargetValidator: /* @__PURE__ */ __name(() => inAppMessageActionTargetValidator, "inAppMessageActionTargetValidator"),
|
|
@@ -375,10 +474,12 @@ var require_types_cjs_development = __commonJS({
|
|
|
375
474
|
inAppMessageVersionSourceValidator: /* @__PURE__ */ __name(() => inAppMessageVersionSourceValidator, "inAppMessageVersionSourceValidator"),
|
|
376
475
|
inAppMessagesFlagValidator: /* @__PURE__ */ __name(() => inAppMessagesFlagValidator, "inAppMessagesFlagValidator"),
|
|
377
476
|
internalLinkActionValidator: /* @__PURE__ */ __name(() => internalLinkActionValidator, "internalLinkActionValidator"),
|
|
477
|
+
isCanonicalBase64Url: /* @__PURE__ */ __name(() => isCanonicalBase64Url, "isCanonicalBase64Url"),
|
|
378
478
|
isStoredCredentialEnvelope: /* @__PURE__ */ __name(() => isStoredCredentialEnvelope2, "isStoredCredentialEnvelope"),
|
|
379
479
|
parseInAppMessagesFlag: /* @__PURE__ */ __name(() => parseInAppMessagesFlag, "parseInAppMessagesFlag"),
|
|
380
480
|
platformPredicateValidator: /* @__PURE__ */ __name(() => platformPredicateValidator, "platformPredicateValidator"),
|
|
381
481
|
rolePredicateValidator: /* @__PURE__ */ __name(() => rolePredicateValidator, "rolePredicateValidator"),
|
|
482
|
+
utf8ByteLength: /* @__PURE__ */ __name(() => utf8ByteLength, "utf8ByteLength"),
|
|
382
483
|
versionPredicateValidator: /* @__PURE__ */ __name(() => versionPredicateValidator, "versionPredicateValidator")
|
|
383
484
|
});
|
|
384
485
|
module.exports = __toCommonJS(index_exports);
|
|
@@ -16063,7 +16164,8 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
16063
16164
|
"replacedBy"
|
|
16064
16165
|
]).or(external_exports.string());
|
|
16065
16166
|
var AssociationValidator = external_exports.object({
|
|
16066
|
-
|
|
16167
|
+
// Accept compacted scalars while retaining the existing permissive array contract.
|
|
16168
|
+
type: external_exports.string().min(1).or(external_exports.string().array().nonempty()),
|
|
16067
16169
|
associationType: AssociationTypeValidator,
|
|
16068
16170
|
sourceId: external_exports.string().optional(),
|
|
16069
16171
|
targetId: external_exports.string()
|
|
@@ -16886,11 +16988,48 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
16886
16988
|
updatedAt: external_exports.string(),
|
|
16887
16989
|
expiresAt: external_exports.string().optional(),
|
|
16888
16990
|
autoBoosts: external_exports.string().array().optional(),
|
|
16889
|
-
writers: external_exports.array(LCNProfileValidator).optional()
|
|
16991
|
+
writers: external_exports.array(LCNProfileValidator).optional(),
|
|
16992
|
+
recipients: external_exports.array(LCNPublicProfileValidator.extend({ did: external_exports.string() })).optional(),
|
|
16993
|
+
audienceVersion: external_exports.number().int().nonnegative().optional()
|
|
16890
16994
|
});
|
|
16891
|
-
var ConsentFlowContractRequestStatusValidator = external_exports.enum(["pending", "accepted", "denied"]).nullable();
|
|
16995
|
+
var ConsentFlowContractRequestStatusValidator = external_exports.enum(["pending", "accepted", "denied", "cancelled"]).nullable();
|
|
16892
16996
|
var ConsentFlowContractRequestReadStatusValidator = external_exports.enum(["unseen", "seen"]).nullable();
|
|
16893
|
-
var
|
|
16997
|
+
var ConsentFlowReferralValidator = external_exports.object({
|
|
16998
|
+
requestId: external_exports.string(),
|
|
16999
|
+
requestedBy: external_exports.string(),
|
|
17000
|
+
externalReferenceId: external_exports.string().max(256).optional()
|
|
17001
|
+
});
|
|
17002
|
+
var ContractRequestFieldsValidator = ConsentFlowReferralValidator.partial().extend({
|
|
17003
|
+
requestedAt: external_exports.string().optional(),
|
|
17004
|
+
message: external_exports.string().max(500).optional()
|
|
17005
|
+
});
|
|
17006
|
+
var SendContractRequestValidator = external_exports.object({
|
|
17007
|
+
contractUri: external_exports.string(),
|
|
17008
|
+
targetProfileId: external_exports.string(),
|
|
17009
|
+
externalReferenceId: external_exports.string().trim().min(1).max(256).optional(),
|
|
17010
|
+
message: external_exports.string().trim().max(500).optional()
|
|
17011
|
+
});
|
|
17012
|
+
var ConsentFlowWebhookMetadataValidator = external_exports.object({
|
|
17013
|
+
eventId: external_exports.string(),
|
|
17014
|
+
deliveryKey: external_exports.string(),
|
|
17015
|
+
event: external_exports.enum([
|
|
17016
|
+
"request_sent",
|
|
17017
|
+
"request_accepted",
|
|
17018
|
+
"request_denied",
|
|
17019
|
+
"request_cancelled",
|
|
17020
|
+
"consent_created",
|
|
17021
|
+
"consent_updated",
|
|
17022
|
+
"consent_withdrawn",
|
|
17023
|
+
"credentials_synced"
|
|
17024
|
+
]),
|
|
17025
|
+
contractUri: external_exports.string(),
|
|
17026
|
+
termsUri: external_exports.string().optional(),
|
|
17027
|
+
requestId: external_exports.string().optional(),
|
|
17028
|
+
requestedBy: external_exports.string().optional(),
|
|
17029
|
+
externalReferenceId: external_exports.string().optional(),
|
|
17030
|
+
recipientRole: external_exports.enum(["owner", "recipient", "requester", "target"])
|
|
17031
|
+
});
|
|
17032
|
+
var ConsentFlowContractRequestForProfileValidator = ContractRequestFieldsValidator.extend({
|
|
16894
17033
|
profile: LCNProfileValidator,
|
|
16895
17034
|
status: ConsentFlowContractRequestStatusValidator,
|
|
16896
17035
|
readStatus: ConsentFlowContractRequestReadStatusValidator.optional()
|
|
@@ -16936,6 +17075,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
16936
17075
|
expiresAt: external_exports.string().optional(),
|
|
16937
17076
|
oneTime: external_exports.boolean().optional(),
|
|
16938
17077
|
terms: ConsentFlowTermsValidator,
|
|
17078
|
+
referral: ConsentFlowReferralValidator.optional(),
|
|
16939
17079
|
contract: ConsentFlowContractDetailsValidator,
|
|
16940
17080
|
uri: external_exports.string(),
|
|
16941
17081
|
consenter: LCNProfileValidator,
|
|
@@ -17031,6 +17171,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
17031
17171
|
oneTime: external_exports.boolean().optional(),
|
|
17032
17172
|
terms: ConsentFlowTermsValidator.optional(),
|
|
17033
17173
|
guardianApproval: ConsentFlowGuardianApprovalValidator.optional(),
|
|
17174
|
+
referral: ConsentFlowReferralValidator.optional(),
|
|
17034
17175
|
id: external_exports.string(),
|
|
17035
17176
|
action: ConsentFlowTransactionActionValidator,
|
|
17036
17177
|
date: external_exports.string(),
|
|
@@ -17041,6 +17182,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
17041
17182
|
status: ConsentFlowTermsStatusValidator,
|
|
17042
17183
|
contract: ConsentFlowContractDetailsValidator,
|
|
17043
17184
|
terms: ConsentFlowTermsValidator,
|
|
17185
|
+
referral: ConsentFlowReferralValidator.optional(),
|
|
17044
17186
|
transactions: ConsentFlowTransactionValidator.array()
|
|
17045
17187
|
});
|
|
17046
17188
|
var HolderExportMetadataValidator = external_exports.object({
|
|
@@ -17777,7 +17919,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
17777
17919
|
displayName: external_exports.string(),
|
|
17778
17920
|
email: external_exports.string().optional()
|
|
17779
17921
|
});
|
|
17780
|
-
var
|
|
17922
|
+
var AppStoreListingFieldsValidator = external_exports.object({
|
|
17781
17923
|
listing_id: external_exports.string(),
|
|
17782
17924
|
slug: external_exports.string().optional(),
|
|
17783
17925
|
display_name: external_exports.string(),
|
|
@@ -17803,15 +17945,33 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
17803
17945
|
submitter: AppStoreListingSubmitterValidator.optional(),
|
|
17804
17946
|
contact_email: external_exports.string().email().optional()
|
|
17805
17947
|
});
|
|
17948
|
+
var PendingListingUpdateStatusValidator = external_exports.enum(["DRAFT", "PENDING_REVIEW"]);
|
|
17949
|
+
var PendingListingUpdateValidator = external_exports.object({
|
|
17950
|
+
status: PendingListingUpdateStatusValidator,
|
|
17951
|
+
submitted_at: external_exports.string().optional(),
|
|
17952
|
+
changes: AppStoreListingFieldsValidator.omit({
|
|
17953
|
+
listing_id: true,
|
|
17954
|
+
app_listing_status: true,
|
|
17955
|
+
promotion_level: true,
|
|
17956
|
+
submitted_at: true,
|
|
17957
|
+
submitter: true
|
|
17958
|
+
}).partial(),
|
|
17959
|
+
manifest_version: external_exports.number().int().min(1).optional()
|
|
17960
|
+
});
|
|
17961
|
+
var AppStoreListingValidator = AppStoreListingFieldsValidator.extend({
|
|
17962
|
+
pending_update: PendingListingUpdateValidator.optional()
|
|
17963
|
+
});
|
|
17806
17964
|
var AppStoreListingCreateValidator = AppStoreListingValidator.omit({
|
|
17807
17965
|
listing_id: true,
|
|
17808
17966
|
app_listing_status: true,
|
|
17809
|
-
promotion_level: true
|
|
17967
|
+
promotion_level: true,
|
|
17968
|
+
pending_update: true
|
|
17810
17969
|
});
|
|
17811
17970
|
var AppStoreListingUpdateValidator = AppStoreListingValidator.partial().omit({
|
|
17812
17971
|
listing_id: true,
|
|
17813
17972
|
app_listing_status: true,
|
|
17814
|
-
promotion_level: true
|
|
17973
|
+
promotion_level: true,
|
|
17974
|
+
pending_update: true
|
|
17815
17975
|
});
|
|
17816
17976
|
var InstalledAppValidator = AppStoreListingValidator.extend({
|
|
17817
17977
|
installed_at: external_exports.string()
|
|
@@ -17826,12 +17986,87 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
17826
17986
|
templateAlias: external_exports.string().min(1).max(50).regex(/^[a-z0-9-]+$/),
|
|
17827
17987
|
boostUri: external_exports.string()
|
|
17828
17988
|
});
|
|
17829
|
-
var
|
|
17989
|
+
var InlineWalletCategoryValidator = external_exports.enum([
|
|
17990
|
+
"Achievement",
|
|
17991
|
+
"Skill",
|
|
17992
|
+
"ID",
|
|
17993
|
+
"Learning History",
|
|
17994
|
+
"Work History",
|
|
17995
|
+
"Social Badges",
|
|
17996
|
+
"Membership",
|
|
17997
|
+
"Accomplishment",
|
|
17998
|
+
"Experiences",
|
|
17999
|
+
"Accommodation",
|
|
18000
|
+
"Family"
|
|
18001
|
+
]);
|
|
18002
|
+
var InlineAlignmentValidator = external_exports.object({
|
|
18003
|
+
name: external_exports.string(),
|
|
18004
|
+
url: external_exports.string(),
|
|
18005
|
+
framework: external_exports.string().optional(),
|
|
18006
|
+
code: external_exports.string().optional()
|
|
18007
|
+
}).passthrough();
|
|
18008
|
+
var InlineEvidenceValidator = external_exports.object({
|
|
18009
|
+
id: external_exports.string().optional(),
|
|
18010
|
+
name: external_exports.string().optional(),
|
|
18011
|
+
narrative: external_exports.string().optional()
|
|
18012
|
+
}).passthrough();
|
|
18013
|
+
var InlineWalletSkillTagValidator = external_exports.object({
|
|
18014
|
+
frameworkId: external_exports.string(),
|
|
18015
|
+
id: external_exports.string(),
|
|
18016
|
+
proficiencyLevel: external_exports.string().optional()
|
|
18017
|
+
}).passthrough();
|
|
18018
|
+
var SimpleInlineCredentialTemplateValidator = external_exports.object({
|
|
18019
|
+
rawCredential: external_exports.undefined().optional(),
|
|
18020
|
+
name: external_exports.string(),
|
|
18021
|
+
description: external_exports.string().optional(),
|
|
18022
|
+
image: external_exports.string().optional(),
|
|
18023
|
+
issuerName: external_exports.string().optional(),
|
|
18024
|
+
achievementType: external_exports.string().optional(),
|
|
18025
|
+
category: InlineWalletCategoryValidator.optional(),
|
|
18026
|
+
criteria: external_exports.object({
|
|
18027
|
+
narrative: external_exports.string().optional(),
|
|
18028
|
+
url: external_exports.string().optional()
|
|
18029
|
+
}).passthrough().optional(),
|
|
18030
|
+
alignments: external_exports.array(InlineAlignmentValidator).optional(),
|
|
18031
|
+
tags: external_exports.array(external_exports.string()).optional(),
|
|
18032
|
+
activity: external_exports.object({
|
|
18033
|
+
startDate: external_exports.string().optional(),
|
|
18034
|
+
endDate: external_exports.string().optional()
|
|
18035
|
+
}).passthrough().optional(),
|
|
18036
|
+
credits: external_exports.object({
|
|
18037
|
+
earned: external_exports.union([external_exports.number(), external_exports.string()]).optional(),
|
|
18038
|
+
available: external_exports.union([external_exports.number(), external_exports.string()]).optional()
|
|
18039
|
+
}).passthrough().optional(),
|
|
18040
|
+
validUntil: external_exports.string().optional(),
|
|
18041
|
+
evidence: external_exports.array(InlineEvidenceValidator).optional(),
|
|
18042
|
+
walletSkills: external_exports.array(InlineWalletSkillTagValidator).optional()
|
|
18043
|
+
}).passthrough();
|
|
18044
|
+
var RawInlineCredentialTemplateValidator = external_exports.object({
|
|
18045
|
+
rawCredential: external_exports.record(external_exports.string(), external_exports.unknown()),
|
|
18046
|
+
category: InlineWalletCategoryValidator.optional(),
|
|
18047
|
+
walletSkills: external_exports.array(InlineWalletSkillTagValidator).optional()
|
|
18048
|
+
}).passthrough();
|
|
18049
|
+
var InlineCredentialTemplateValidator = external_exports.union([
|
|
18050
|
+
RawInlineCredentialTemplateValidator,
|
|
18051
|
+
SimpleInlineCredentialTemplateValidator
|
|
18052
|
+
]);
|
|
18053
|
+
var LegacySendCredentialEventValidator = external_exports.object({
|
|
17830
18054
|
type: external_exports.literal("send-credential"),
|
|
17831
18055
|
templateAlias: external_exports.string(),
|
|
17832
18056
|
templateData: external_exports.record(external_exports.string(), external_exports.unknown()).optional(),
|
|
17833
18057
|
preventDuplicateClaim: external_exports.boolean().optional()
|
|
17834
18058
|
});
|
|
18059
|
+
var InlineSendCredentialEventValidator = external_exports.object({
|
|
18060
|
+
type: external_exports.literal("send-credential"),
|
|
18061
|
+
alias: external_exports.string(),
|
|
18062
|
+
template: InlineCredentialTemplateValidator,
|
|
18063
|
+
templateData: external_exports.record(external_exports.string(), external_exports.unknown()).optional(),
|
|
18064
|
+
preventDuplicateClaim: external_exports.boolean().optional()
|
|
18065
|
+
});
|
|
18066
|
+
var SendCredentialEventValidator = external_exports.union([
|
|
18067
|
+
LegacySendCredentialEventValidator,
|
|
18068
|
+
InlineSendCredentialEventValidator
|
|
18069
|
+
]);
|
|
17835
18070
|
var CheckCredentialEventValidator = external_exports.object({
|
|
17836
18071
|
type: external_exports.literal("check-credential"),
|
|
17837
18072
|
templateAlias: external_exports.string().optional(),
|
|
@@ -17926,7 +18161,119 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
17926
18161
|
type: external_exports.literal("get-counters"),
|
|
17927
18162
|
keys: external_exports.array(counterKeyValidator).min(1).max(50).optional()
|
|
17928
18163
|
});
|
|
17929
|
-
var
|
|
18164
|
+
var ConsentRequestWalletCategoryValidator = external_exports.enum([
|
|
18165
|
+
"Achievement",
|
|
18166
|
+
"Skill",
|
|
18167
|
+
"ID",
|
|
18168
|
+
"Learning History",
|
|
18169
|
+
"Work History",
|
|
18170
|
+
"Social Badges",
|
|
18171
|
+
"Membership",
|
|
18172
|
+
"Accomplishment",
|
|
18173
|
+
"Experiences",
|
|
18174
|
+
"Accommodation",
|
|
18175
|
+
"Family"
|
|
18176
|
+
]);
|
|
18177
|
+
var ConsentRequestPersonalFieldValidator = external_exports.enum([
|
|
18178
|
+
"name",
|
|
18179
|
+
"email",
|
|
18180
|
+
"phone",
|
|
18181
|
+
"birthDate",
|
|
18182
|
+
"country",
|
|
18183
|
+
"avatar"
|
|
18184
|
+
]);
|
|
18185
|
+
var ConsentRequestValidator = external_exports.object({
|
|
18186
|
+
read: external_exports.object({
|
|
18187
|
+
credentialCategories: external_exports.array(ConsentRequestWalletCategoryValidator).optional(),
|
|
18188
|
+
personalFields: external_exports.array(ConsentRequestPersonalFieldValidator).optional()
|
|
18189
|
+
}).optional(),
|
|
18190
|
+
write: external_exports.object({
|
|
18191
|
+
credentialCategories: external_exports.array(ConsentRequestWalletCategoryValidator).optional()
|
|
18192
|
+
}).optional(),
|
|
18193
|
+
reason: external_exports.string().optional()
|
|
18194
|
+
});
|
|
18195
|
+
var NormalizedConsentScopesValidator = external_exports.object({
|
|
18196
|
+
read: external_exports.object({
|
|
18197
|
+
credentialCategories: external_exports.array(ConsentRequestWalletCategoryValidator).default([]),
|
|
18198
|
+
personalFields: external_exports.array(ConsentRequestPersonalFieldValidator).default([])
|
|
18199
|
+
}),
|
|
18200
|
+
write: external_exports.object({
|
|
18201
|
+
credentialCategories: external_exports.array(ConsentRequestWalletCategoryValidator).default([])
|
|
18202
|
+
})
|
|
18203
|
+
});
|
|
18204
|
+
var CapturedTemplateRecordValidator = external_exports.object({
|
|
18205
|
+
alias: external_exports.string(),
|
|
18206
|
+
template: InlineCredentialTemplateValidator,
|
|
18207
|
+
version: external_exports.number().int().min(1),
|
|
18208
|
+
lastUsedAt: external_exports.string()
|
|
18209
|
+
}).passthrough();
|
|
18210
|
+
var CapturedConsentRecordValidator = external_exports.object({
|
|
18211
|
+
scopes: NormalizedConsentScopesValidator,
|
|
18212
|
+
reason: external_exports.string().optional(),
|
|
18213
|
+
lastUsedAt: external_exports.string()
|
|
18214
|
+
}).passthrough();
|
|
18215
|
+
var AppManifestValidator = external_exports.object({
|
|
18216
|
+
manifestVersion: external_exports.literal(1),
|
|
18217
|
+
appUrl: external_exports.string(),
|
|
18218
|
+
appKey: external_exports.string().max(200).optional(),
|
|
18219
|
+
suggestedName: external_exports.string().optional(),
|
|
18220
|
+
suggestedIconUrl: external_exports.string().optional(),
|
|
18221
|
+
permissions: external_exports.array(external_exports.string()).default([]),
|
|
18222
|
+
templates: external_exports.array(CapturedTemplateRecordValidator).default([]),
|
|
18223
|
+
consentRequests: external_exports.array(CapturedConsentRecordValidator).default([]),
|
|
18224
|
+
usedConsentContract: external_exports.boolean().optional(),
|
|
18225
|
+
featuresLaunched: external_exports.array(external_exports.string()).default([]),
|
|
18226
|
+
counterKeys: external_exports.array(external_exports.string()).default([]),
|
|
18227
|
+
usedLearnerContext: external_exports.boolean(),
|
|
18228
|
+
usedNotifications: external_exports.boolean(),
|
|
18229
|
+
firstCapturedAt: external_exports.string(),
|
|
18230
|
+
lastUpdatedAt: external_exports.string()
|
|
18231
|
+
}).passthrough();
|
|
18232
|
+
var AppManifestVersionStatusValidator = external_exports.enum(["draft", "active", "superseded"]);
|
|
18233
|
+
var AppManifestVersionValidator = external_exports.object({
|
|
18234
|
+
id: external_exports.string(),
|
|
18235
|
+
version: external_exports.number().int().min(1),
|
|
18236
|
+
manifestHash: external_exports.string(),
|
|
18237
|
+
manifest: AppManifestValidator,
|
|
18238
|
+
status: AppManifestVersionStatusValidator,
|
|
18239
|
+
createdAt: external_exports.string(),
|
|
18240
|
+
activatedAt: external_exports.string().optional()
|
|
18241
|
+
});
|
|
18242
|
+
var AppManifestStringDiffValidator = external_exports.object({
|
|
18243
|
+
added: external_exports.array(external_exports.string()),
|
|
18244
|
+
removed: external_exports.array(external_exports.string()),
|
|
18245
|
+
changed: external_exports.array(external_exports.string())
|
|
18246
|
+
});
|
|
18247
|
+
var AppManifestTemplateRefValidator = external_exports.object({
|
|
18248
|
+
alias: external_exports.string(),
|
|
18249
|
+
version: external_exports.number().int().min(1)
|
|
18250
|
+
});
|
|
18251
|
+
var AppManifestTemplateChangeValidator = external_exports.object({
|
|
18252
|
+
alias: external_exports.string(),
|
|
18253
|
+
fromVersion: external_exports.number().int().min(1),
|
|
18254
|
+
toVersion: external_exports.number().int().min(1)
|
|
18255
|
+
});
|
|
18256
|
+
var AppManifestDiffValidator = external_exports.object({
|
|
18257
|
+
permissions: AppManifestStringDiffValidator,
|
|
18258
|
+
templates: external_exports.object({
|
|
18259
|
+
added: external_exports.array(AppManifestTemplateRefValidator),
|
|
18260
|
+
removed: external_exports.array(AppManifestTemplateRefValidator),
|
|
18261
|
+
changed: external_exports.array(AppManifestTemplateChangeValidator)
|
|
18262
|
+
}),
|
|
18263
|
+
consentScopes: AppManifestStringDiffValidator,
|
|
18264
|
+
featurePaths: AppManifestStringDiffValidator,
|
|
18265
|
+
counterKeys: AppManifestStringDiffValidator,
|
|
18266
|
+
requiresReview: external_exports.boolean()
|
|
18267
|
+
});
|
|
18268
|
+
var UpsertConsentContractEventValidator = external_exports.object({
|
|
18269
|
+
type: external_exports.literal("upsert-consent-contract"),
|
|
18270
|
+
scopes: ConsentRequestValidator
|
|
18271
|
+
});
|
|
18272
|
+
var UpsertConsentContractResponseValidator = external_exports.object({
|
|
18273
|
+
contractUri: external_exports.string(),
|
|
18274
|
+
created: external_exports.boolean()
|
|
18275
|
+
});
|
|
18276
|
+
var AppEventValidator = external_exports.union([
|
|
17930
18277
|
SendCredentialEventValidator,
|
|
17931
18278
|
CheckCredentialEventValidator,
|
|
17932
18279
|
CheckIssuanceStatusEventValidator,
|
|
@@ -17936,7 +18283,8 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
17936
18283
|
SendNotificationEventValidator,
|
|
17937
18284
|
IncrementCounterEventValidator,
|
|
17938
18285
|
GetCounterEventValidator,
|
|
17939
|
-
GetCountersEventValidator
|
|
18286
|
+
GetCountersEventValidator,
|
|
18287
|
+
UpsertConsentContractEventValidator
|
|
17940
18288
|
]);
|
|
17941
18289
|
var AppEventInputValidator = external_exports.object({
|
|
17942
18290
|
listingId: external_exports.string(),
|
|
@@ -18015,6 +18363,30 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
18015
18363
|
__name2(this, "AuthSessionError");
|
|
18016
18364
|
}
|
|
18017
18365
|
};
|
|
18366
|
+
var UnsupportedSignInOperationError = class extends Error {
|
|
18367
|
+
static {
|
|
18368
|
+
__name(this, "UnsupportedSignInOperationError");
|
|
18369
|
+
}
|
|
18370
|
+
constructor(operation, providerType) {
|
|
18371
|
+
super(`${operation} is not supported by ${providerType}`);
|
|
18372
|
+
this.operation = operation;
|
|
18373
|
+
this.providerType = providerType;
|
|
18374
|
+
this.name = "UnsupportedSignInOperationError";
|
|
18375
|
+
}
|
|
18376
|
+
static {
|
|
18377
|
+
__name2(this, "UnsupportedSignInOperationError");
|
|
18378
|
+
}
|
|
18379
|
+
};
|
|
18380
|
+
var ESCROW_PIN_LOCKED_MESSAGE = "Too many incorrect PIN attempts. You can still recover by waiting.";
|
|
18381
|
+
var ESCROW_PIN_UNAVAILABLE_MESSAGE = "PIN recovery is not available for this account.";
|
|
18382
|
+
var ESCROW_PIN_MISMATCH_PATTERN = /^Incorrect PIN\. (\d+) attempts left\.$/;
|
|
18383
|
+
var escrowPinMismatchMessage = /* @__PURE__ */ __name2((attemptsRemaining) => `Incorrect PIN. ${attemptsRemaining} attempts left.`, "escrowPinMismatchMessage");
|
|
18384
|
+
var EscrowPinStatusValidator = external_exports.object({
|
|
18385
|
+
state: external_exports.enum(["none", "enabled", "locked", "stale"]),
|
|
18386
|
+
enabled: external_exports.boolean(),
|
|
18387
|
+
attemptsRemaining: external_exports.number().int().nonnegative(),
|
|
18388
|
+
salt: external_exports.string().optional()
|
|
18389
|
+
});
|
|
18018
18390
|
var BITSTRING_STATUS_PURPOSES = ["revocation", "suspension"];
|
|
18019
18391
|
var DEFAULT_BITSTRING_STATUS_LIST_SIZE = 131072;
|
|
18020
18392
|
var BitstringStatusPurposeValidator = external_exports.enum(BITSTRING_STATUS_PURPOSES);
|
|
@@ -18129,6 +18501,502 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
18129
18501
|
const result = inAppMessagesFlagValidator.safeParse(raw);
|
|
18130
18502
|
return result.success ? result.data : EMPTY_IN_APP_MESSAGES_FLAG;
|
|
18131
18503
|
}, "parseInAppMessagesFlag");
|
|
18504
|
+
var SHARE_LINK_ID_BYTES = 16;
|
|
18505
|
+
var SHARE_CONTENT_KEY_BYTES = 32;
|
|
18506
|
+
var SHARE_IV_BYTES = 12;
|
|
18507
|
+
var SHARE_TAG_BYTES = 16;
|
|
18508
|
+
var MAX_SHARE_CIPHERTEXT_BYTES = 512 * 1024;
|
|
18509
|
+
var MAX_SHARE_RECOVERY_JWE_BYTES = 64 * 1024;
|
|
18510
|
+
var MAX_SELECTED_CREDENTIALS = 50;
|
|
18511
|
+
var MAX_ENDORSEMENTS = 200;
|
|
18512
|
+
var MAX_VP_MEMBERS = MAX_SELECTED_CREDENTIALS + MAX_ENDORSEMENTS;
|
|
18513
|
+
var MAX_SHARE_SOURCE_URI_CHARS = 2048;
|
|
18514
|
+
var MAX_SHARE_LINK_REQUEST_BYTES = 1024 * 1024;
|
|
18515
|
+
var SHARE_LINK_PROTOCOL = "lc-share/v1";
|
|
18516
|
+
var SHARE_RECOVERY_PROTOCOL = "lc-share-recovery/v1";
|
|
18517
|
+
var SHARE_AAD_PREFIX = "lc-share:v1";
|
|
18518
|
+
var BASE64URL_ALPHABET = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_";
|
|
18519
|
+
var BASE64URL_LOOKUP = (() => {
|
|
18520
|
+
const table = new Int16Array(128).fill(-1);
|
|
18521
|
+
for (let index = 0; index < BASE64URL_ALPHABET.length; index += 1) {
|
|
18522
|
+
table[BASE64URL_ALPHABET.charCodeAt(index)] = index;
|
|
18523
|
+
}
|
|
18524
|
+
return table;
|
|
18525
|
+
})();
|
|
18526
|
+
var encodeBase64Url = /* @__PURE__ */ __name2((bytes) => {
|
|
18527
|
+
let output = "";
|
|
18528
|
+
for (let index = 0; index < bytes.length; index += 3) {
|
|
18529
|
+
const first = bytes[index];
|
|
18530
|
+
const second = bytes[index + 1];
|
|
18531
|
+
const third = bytes[index + 2];
|
|
18532
|
+
output += BASE64URL_ALPHABET[first >> 2];
|
|
18533
|
+
output += BASE64URL_ALPHABET[(first & 3) << 4 | (second ?? 0) >> 4];
|
|
18534
|
+
if (second === void 0) break;
|
|
18535
|
+
output += BASE64URL_ALPHABET[(second & 15) << 2 | (third ?? 0) >> 6];
|
|
18536
|
+
if (third === void 0) break;
|
|
18537
|
+
output += BASE64URL_ALPHABET[third & 63];
|
|
18538
|
+
}
|
|
18539
|
+
return output;
|
|
18540
|
+
}, "encodeBase64Url");
|
|
18541
|
+
var decodeBase64Url = /* @__PURE__ */ __name2((value) => {
|
|
18542
|
+
if (typeof value !== "string") return null;
|
|
18543
|
+
const output = new Uint8Array(Math.floor(value.length * 6 / 8));
|
|
18544
|
+
let bits = 0;
|
|
18545
|
+
let bitCount = 0;
|
|
18546
|
+
let outputIndex = 0;
|
|
18547
|
+
for (let index = 0; index < value.length; index += 1) {
|
|
18548
|
+
const code = value.charCodeAt(index);
|
|
18549
|
+
const digit = code < 128 ? BASE64URL_LOOKUP[code] : -1;
|
|
18550
|
+
if (digit < 0) return null;
|
|
18551
|
+
bits = bits << 6 | digit;
|
|
18552
|
+
bitCount += 6;
|
|
18553
|
+
if (bitCount >= 8) {
|
|
18554
|
+
bitCount -= 8;
|
|
18555
|
+
output[outputIndex] = bits >> bitCount & 255;
|
|
18556
|
+
outputIndex += 1;
|
|
18557
|
+
}
|
|
18558
|
+
}
|
|
18559
|
+
return output;
|
|
18560
|
+
}, "decodeBase64Url");
|
|
18561
|
+
var isCanonicalBase64Url = /* @__PURE__ */ __name2((value, expectedBytes) => {
|
|
18562
|
+
if (typeof value !== "string") return false;
|
|
18563
|
+
if (expectedBytes !== void 0 && value.length !== Math.ceil(expectedBytes * 4 / 3))
|
|
18564
|
+
return false;
|
|
18565
|
+
const decoded = decodeBase64Url(value);
|
|
18566
|
+
if (decoded === null) return false;
|
|
18567
|
+
if (expectedBytes !== void 0 && decoded.length !== expectedBytes) return false;
|
|
18568
|
+
return encodeBase64Url(decoded) === value;
|
|
18569
|
+
}, "isCanonicalBase64Url");
|
|
18570
|
+
var decodedBase64UrlByteLength = /* @__PURE__ */ __name2((value) => decodeBase64Url(value)?.length ?? null, "decodedBase64UrlByteLength");
|
|
18571
|
+
var utf8ByteLength = /* @__PURE__ */ __name2((value) => new TextEncoder().encode(value).length, "utf8ByteLength");
|
|
18572
|
+
var canonicalBase64Url = /* @__PURE__ */ __name2((bytes) => external_exports.string().refine((value) => isCanonicalBase64Url(value, bytes), {
|
|
18573
|
+
message: `must be canonical base64url for exactly ${bytes} bytes`
|
|
18574
|
+
}), "canonicalBase64Url");
|
|
18575
|
+
var ShareLinkIdValidator = canonicalBase64Url(SHARE_LINK_ID_BYTES);
|
|
18576
|
+
var ShareContentKeyValidator = canonicalBase64Url(SHARE_CONTENT_KEY_BYTES);
|
|
18577
|
+
var ShareIvValidator = canonicalBase64Url(SHARE_IV_BYTES);
|
|
18578
|
+
var ShareCiphertextValidator = external_exports.string().refine(
|
|
18579
|
+
(value) => {
|
|
18580
|
+
if (value.length > Math.ceil(MAX_SHARE_CIPHERTEXT_BYTES * 4 / 3)) return false;
|
|
18581
|
+
const decoded = decodeBase64Url(value);
|
|
18582
|
+
if (decoded === null) return false;
|
|
18583
|
+
if (encodeBase64Url(decoded) !== value) return false;
|
|
18584
|
+
return decoded.length >= SHARE_TAG_BYTES && decoded.length <= MAX_SHARE_CIPHERTEXT_BYTES;
|
|
18585
|
+
},
|
|
18586
|
+
{
|
|
18587
|
+
message: `must be canonical base64url decoding to ${SHARE_TAG_BYTES}..${MAX_SHARE_CIPHERTEXT_BYTES} bytes`
|
|
18588
|
+
}
|
|
18589
|
+
);
|
|
18590
|
+
var ShareEnvelopeValidator = external_exports.object({
|
|
18591
|
+
v: external_exports.literal(1),
|
|
18592
|
+
alg: external_exports.literal("A256GCM"),
|
|
18593
|
+
iv: ShareIvValidator,
|
|
18594
|
+
ct: ShareCiphertextValidator
|
|
18595
|
+
}).strict();
|
|
18596
|
+
var safeVersion = external_exports.number().int().min(1).max(2 ** 31 - 1);
|
|
18597
|
+
var safeCredentialIndex = external_exports.number().int().min(0).max(MAX_VP_MEMBERS - 1);
|
|
18598
|
+
var ShareSelectionEntryValidator = external_exports.object({ credentialIndex: safeCredentialIndex }).strict();
|
|
18599
|
+
var ShareEndorsementEntryValidator = external_exports.object({ credentialIndex: safeCredentialIndex, targetCredentialIndex: safeCredentialIndex }).strict();
|
|
18600
|
+
var ShareSharerValidator = external_exports.object({
|
|
18601
|
+
profileId: external_exports.string().min(1).max(128),
|
|
18602
|
+
displayName: external_exports.string().min(1).max(120),
|
|
18603
|
+
avatar: external_exports.string().max(2048).optional()
|
|
18604
|
+
}).strict();
|
|
18605
|
+
var presentationShape = VPValidator.extend({
|
|
18606
|
+
verifiableCredential: VCValidator.array().min(1).max(MAX_VP_MEMBERS)
|
|
18607
|
+
});
|
|
18608
|
+
var hasBoundedPresentation = /* @__PURE__ */ __name2((value) => {
|
|
18609
|
+
let credentialCount = 0;
|
|
18610
|
+
const ancestors = /* @__PURE__ */ new Set();
|
|
18611
|
+
const visit = /* @__PURE__ */ __name2((node, depth) => {
|
|
18612
|
+
if (node === null || typeof node !== "object") return true;
|
|
18613
|
+
if (depth > 32 || ancestors.has(node)) return false;
|
|
18614
|
+
ancestors.add(node);
|
|
18615
|
+
try {
|
|
18616
|
+
for (const [key, child] of Object.entries(node)) {
|
|
18617
|
+
if (key === "verifiableCredential") {
|
|
18618
|
+
credentialCount += Array.isArray(child) ? child.length : 1;
|
|
18619
|
+
if (credentialCount > MAX_VP_MEMBERS) return false;
|
|
18620
|
+
}
|
|
18621
|
+
if (!visit(child, depth + 1)) return false;
|
|
18622
|
+
}
|
|
18623
|
+
return true;
|
|
18624
|
+
} finally {
|
|
18625
|
+
ancestors.delete(node);
|
|
18626
|
+
}
|
|
18627
|
+
}, "visit");
|
|
18628
|
+
return visit(value, 0);
|
|
18629
|
+
}, "hasBoundedPresentation");
|
|
18630
|
+
var ShareManifestPresentationValidator = external_exports.custom(
|
|
18631
|
+
(value) => hasBoundedPresentation(value) && presentationShape.safeParse(value).success,
|
|
18632
|
+
{ message: "invalid share presentation" }
|
|
18633
|
+
);
|
|
18634
|
+
var SharePayloadValidatorShape = external_exports.object({
|
|
18635
|
+
protocol: external_exports.literal(SHARE_LINK_PROTOCOL),
|
|
18636
|
+
shareId: ShareLinkIdValidator,
|
|
18637
|
+
contentVersion: safeVersion,
|
|
18638
|
+
createdAt: external_exports.iso.datetime(),
|
|
18639
|
+
sharer: ShareSharerValidator,
|
|
18640
|
+
presentation: ShareManifestPresentationValidator,
|
|
18641
|
+
selection: ShareSelectionEntryValidator.array().min(1).max(MAX_SELECTED_CREDENTIALS),
|
|
18642
|
+
endorsements: ShareEndorsementEntryValidator.array().max(MAX_ENDORSEMENTS).default([])
|
|
18643
|
+
}).strict();
|
|
18644
|
+
var classificationFailure = /* @__PURE__ */ __name2((code, message, path = []) => ({ ok: false, code, message, path }), "classificationFailure");
|
|
18645
|
+
var readSignedClaimId = /* @__PURE__ */ __name2((member) => {
|
|
18646
|
+
if (member === null || typeof member !== "object") return void 0;
|
|
18647
|
+
const record2 = member;
|
|
18648
|
+
const claim = record2.credentialSubject ?? record2.endorsement;
|
|
18649
|
+
if (claim === null || typeof claim !== "object") return void 0;
|
|
18650
|
+
const claimRecord = claim;
|
|
18651
|
+
const nested = claimRecord.endorsement;
|
|
18652
|
+
const nestedId = nested !== null && typeof nested === "object" ? nested.id : void 0;
|
|
18653
|
+
return claimRecord.id ?? nestedId;
|
|
18654
|
+
}, "readSignedClaimId");
|
|
18655
|
+
var classifyShareManifest = /* @__PURE__ */ __name2((payload) => {
|
|
18656
|
+
const members = payload.presentation?.verifiableCredential;
|
|
18657
|
+
if (!Array.isArray(members) || members.length === 0) {
|
|
18658
|
+
return classificationFailure("NO_PRESENTATION_MEMBERS", "presentation has no credentials");
|
|
18659
|
+
}
|
|
18660
|
+
if (members.length > MAX_VP_MEMBERS) {
|
|
18661
|
+
return classificationFailure(
|
|
18662
|
+
"TOO_MANY_VP_MEMBERS",
|
|
18663
|
+
`presentation has ${members.length} members, over the ${MAX_VP_MEMBERS} bound`
|
|
18664
|
+
);
|
|
18665
|
+
}
|
|
18666
|
+
const selection = payload.selection;
|
|
18667
|
+
const endorsements = payload.endorsements ?? [];
|
|
18668
|
+
if (!Array.isArray(selection) || selection.length < 1 || selection.length > MAX_SELECTED_CREDENTIALS) {
|
|
18669
|
+
return classificationFailure("BAD_SELECTION", "selection must contain 1..50 entries");
|
|
18670
|
+
}
|
|
18671
|
+
if (!Array.isArray(endorsements) || endorsements.length > MAX_ENDORSEMENTS) {
|
|
18672
|
+
return classificationFailure(
|
|
18673
|
+
"BAD_ENDORSEMENTS",
|
|
18674
|
+
"endorsements must contain at most 200 entries"
|
|
18675
|
+
);
|
|
18676
|
+
}
|
|
18677
|
+
const selectedIndices = [];
|
|
18678
|
+
const selected = /* @__PURE__ */ new Set();
|
|
18679
|
+
for (let index = 0; index < selection.length; index += 1) {
|
|
18680
|
+
const entry = selection[index];
|
|
18681
|
+
const credentialIndex = entry?.credentialIndex;
|
|
18682
|
+
if (!Number.isSafeInteger(credentialIndex) || credentialIndex < 0 || credentialIndex >= members.length) {
|
|
18683
|
+
return classificationFailure(
|
|
18684
|
+
"SELECTION_INDEX_OUT_OF_BOUNDS",
|
|
18685
|
+
`selection[${index}].credentialIndex is out of bounds`,
|
|
18686
|
+
["selection", index, "credentialIndex"]
|
|
18687
|
+
);
|
|
18688
|
+
}
|
|
18689
|
+
if (selected.has(credentialIndex)) {
|
|
18690
|
+
return classificationFailure(
|
|
18691
|
+
"SELECTION_INDEX_DUPLICATE",
|
|
18692
|
+
`selection[${index}].credentialIndex is duplicated`,
|
|
18693
|
+
["selection", index, "credentialIndex"]
|
|
18694
|
+
);
|
|
18695
|
+
}
|
|
18696
|
+
selected.add(credentialIndex);
|
|
18697
|
+
selectedIndices.push(credentialIndex);
|
|
18698
|
+
}
|
|
18699
|
+
const classified = new Set(selected);
|
|
18700
|
+
const endorsementIndices = [];
|
|
18701
|
+
for (let index = 0; index < endorsements.length; index += 1) {
|
|
18702
|
+
const entry = endorsements[index];
|
|
18703
|
+
const credentialIndex = entry?.credentialIndex;
|
|
18704
|
+
const targetIndex = entry?.targetCredentialIndex;
|
|
18705
|
+
if (!Number.isSafeInteger(credentialIndex) || credentialIndex < 0 || credentialIndex >= members.length) {
|
|
18706
|
+
return classificationFailure(
|
|
18707
|
+
"ENDORSEMENT_INDEX_OUT_OF_BOUNDS",
|
|
18708
|
+
`endorsements[${index}].credentialIndex is out of bounds`,
|
|
18709
|
+
["endorsements", index, "credentialIndex"]
|
|
18710
|
+
);
|
|
18711
|
+
}
|
|
18712
|
+
if (classified.has(credentialIndex)) {
|
|
18713
|
+
return classificationFailure(
|
|
18714
|
+
"VP_MEMBER_CLASSIFIED_TWICE",
|
|
18715
|
+
`endorsements[${index}].credentialIndex was already classified`,
|
|
18716
|
+
["endorsements", index, "credentialIndex"]
|
|
18717
|
+
);
|
|
18718
|
+
}
|
|
18719
|
+
if (!selected.has(targetIndex)) {
|
|
18720
|
+
return classificationFailure(
|
|
18721
|
+
"ENDORSEMENT_TARGET_NOT_SELECTED",
|
|
18722
|
+
`endorsements[${index}].targetCredentialIndex must reference a selected credential`,
|
|
18723
|
+
["endorsements", index, "targetCredentialIndex"]
|
|
18724
|
+
);
|
|
18725
|
+
}
|
|
18726
|
+
const referenced = readSignedClaimId(members[credentialIndex]);
|
|
18727
|
+
const target = members[targetIndex];
|
|
18728
|
+
const targetId = target !== null && typeof target === "object" ? target.id : void 0;
|
|
18729
|
+
if (typeof referenced !== "string" || typeof targetId !== "string" || referenced !== targetId) {
|
|
18730
|
+
return classificationFailure(
|
|
18731
|
+
"ENDORSEMENT_TARGET_UNBOUND",
|
|
18732
|
+
`endorsements[${index}] claim does not reference the target credential id`,
|
|
18733
|
+
["endorsements", index]
|
|
18734
|
+
);
|
|
18735
|
+
}
|
|
18736
|
+
classified.add(credentialIndex);
|
|
18737
|
+
endorsementIndices.push(credentialIndex);
|
|
18738
|
+
}
|
|
18739
|
+
if (classified.size !== members.length) {
|
|
18740
|
+
return classificationFailure(
|
|
18741
|
+
"UNCLASSIFIED_VP_MEMBER",
|
|
18742
|
+
"every presentation member must be classified exactly once",
|
|
18743
|
+
["presentation", "verifiableCredential"]
|
|
18744
|
+
);
|
|
18745
|
+
}
|
|
18746
|
+
return {
|
|
18747
|
+
ok: true,
|
|
18748
|
+
classification: { selectedIndices, endorsementIndices, memberCount: members.length }
|
|
18749
|
+
};
|
|
18750
|
+
}, "classifyShareManifest");
|
|
18751
|
+
var SharePayloadValidator = SharePayloadValidatorShape.superRefine((payload, ctx) => {
|
|
18752
|
+
const result = classifyShareManifest(payload);
|
|
18753
|
+
if (!result.ok) {
|
|
18754
|
+
ctx.addIssue({
|
|
18755
|
+
code: "custom",
|
|
18756
|
+
message: result.message,
|
|
18757
|
+
path: result.path,
|
|
18758
|
+
params: { shareLinkCode: result.code }
|
|
18759
|
+
});
|
|
18760
|
+
}
|
|
18761
|
+
});
|
|
18762
|
+
var ShareRecoverySelectionValidator = external_exports.object({
|
|
18763
|
+
ref: external_exports.string().min(1).max(MAX_SHARE_SOURCE_URI_CHARS),
|
|
18764
|
+
order: external_exports.number().int().min(0).max(MAX_SELECTED_CREDENTIALS - 1)
|
|
18765
|
+
}).strict();
|
|
18766
|
+
var ShareRecoveryEndorsementValidator = external_exports.object({ targetRef: external_exports.string().min(1).max(MAX_SHARE_SOURCE_URI_CHARS) }).strict();
|
|
18767
|
+
var ShareRecoveryPlaintextValidator = external_exports.object({
|
|
18768
|
+
protocol: external_exports.literal(SHARE_RECOVERY_PROTOCOL),
|
|
18769
|
+
shareId: ShareLinkIdValidator,
|
|
18770
|
+
ownerProfileId: external_exports.string().min(1).max(128),
|
|
18771
|
+
createdAt: external_exports.iso.datetime(),
|
|
18772
|
+
latest: external_exports.object({ contentVersion: safeVersion, key: ShareContentKeyValidator }).strict(),
|
|
18773
|
+
selection: ShareRecoverySelectionValidator.array().min(1).max(MAX_SELECTED_CREDENTIALS),
|
|
18774
|
+
endorsements: ShareRecoveryEndorsementValidator.array().max(MAX_ENDORSEMENTS).default([])
|
|
18775
|
+
}).strict().superRefine((recovery, ctx) => {
|
|
18776
|
+
const orders = /* @__PURE__ */ new Set();
|
|
18777
|
+
recovery.selection.forEach((entry, index) => {
|
|
18778
|
+
if (entry.order >= recovery.selection.length) {
|
|
18779
|
+
ctx.addIssue({
|
|
18780
|
+
code: "custom",
|
|
18781
|
+
message: "order must be within the selection bounds",
|
|
18782
|
+
path: ["selection", index, "order"]
|
|
18783
|
+
});
|
|
18784
|
+
}
|
|
18785
|
+
if (orders.has(entry.order)) {
|
|
18786
|
+
ctx.addIssue({
|
|
18787
|
+
code: "custom",
|
|
18788
|
+
message: "order must be unique within the selection",
|
|
18789
|
+
path: ["selection", index, "order"]
|
|
18790
|
+
});
|
|
18791
|
+
}
|
|
18792
|
+
orders.add(entry.order);
|
|
18793
|
+
});
|
|
18794
|
+
});
|
|
18795
|
+
var ShareOwnerRecoveryValidator = JWEValidator2.refine(
|
|
18796
|
+
(value) => utf8ByteLength(JSON.stringify(value)) <= MAX_SHARE_RECOVERY_JWE_BYTES,
|
|
18797
|
+
{ message: `serialized recovery JWE must be at most ${MAX_SHARE_RECOVERY_JWE_BYTES} bytes` }
|
|
18798
|
+
);
|
|
18799
|
+
var ShareLinkStatusValidator = external_exports.enum(["pending", "active", "stopped"]);
|
|
18800
|
+
var ShareContentStateValidator = external_exports.enum(["staging", "finalized", "content_missing"]);
|
|
18801
|
+
var ShareLinkValidator = external_exports.object({
|
|
18802
|
+
id: ShareLinkIdValidator,
|
|
18803
|
+
title: external_exports.string().min(1).max(120),
|
|
18804
|
+
note: external_exports.string().max(500).optional(),
|
|
18805
|
+
selectedCount: external_exports.number().int().min(1).max(MAX_SELECTED_CREDENTIALS),
|
|
18806
|
+
version: safeVersion,
|
|
18807
|
+
contentVersion: safeVersion,
|
|
18808
|
+
status: ShareLinkStatusValidator,
|
|
18809
|
+
attachmentId: external_exports.string().uuid().nullable().optional(),
|
|
18810
|
+
attachmentChunkCount: external_exports.number().int().min(1).max(16).nullable().optional(),
|
|
18811
|
+
contentState: ShareContentStateValidator,
|
|
18812
|
+
createdAt: external_exports.iso.datetime(),
|
|
18813
|
+
updatedAt: external_exports.iso.datetime(),
|
|
18814
|
+
expiresAt: external_exports.iso.datetime().nullable(),
|
|
18815
|
+
stoppedAt: external_exports.iso.datetime().nullable(),
|
|
18816
|
+
lastViewedAt: external_exports.iso.datetime().nullable(),
|
|
18817
|
+
viewCount: external_exports.number().int().min(0).optional(),
|
|
18818
|
+
passcodeProtected: external_exports.boolean(),
|
|
18819
|
+
notifyOnView: external_exports.boolean(),
|
|
18820
|
+
minorPolicy: external_exports.object({
|
|
18821
|
+
isMinor: external_exports.boolean().nullable(),
|
|
18822
|
+
policyResolved: external_exports.boolean(),
|
|
18823
|
+
defaultExpiryDays: external_exports.union([external_exports.literal(30), external_exports.literal(365)]),
|
|
18824
|
+
viewCountingEnabled: external_exports.boolean()
|
|
18825
|
+
}),
|
|
18826
|
+
/**
|
|
18827
|
+
* Guarded application/API URL for the content. Optional because owner APIs in
|
|
18828
|
+
* D1 have no public resolve/content endpoint yet; it must never be a
|
|
18829
|
+
* LearnCloud object URL or carry a fabricated decryption key.
|
|
18830
|
+
*/
|
|
18831
|
+
contentUrl: external_exports.string().optional()
|
|
18832
|
+
});
|
|
18833
|
+
var clientRequestId = external_exports.string().uuid();
|
|
18834
|
+
var ShareLinkAttachmentValidator = external_exports.object({
|
|
18835
|
+
id: external_exports.string().uuid(),
|
|
18836
|
+
chunkCount: external_exports.number().int().min(1).max(16)
|
|
18837
|
+
}).strict();
|
|
18838
|
+
var attachmentChunkKey = {
|
|
18839
|
+
id: ShareLinkIdValidator,
|
|
18840
|
+
contentVersion: safeVersion,
|
|
18841
|
+
attachmentId: external_exports.string().uuid(),
|
|
18842
|
+
chunkIndex: external_exports.number().int().min(0).max(15)
|
|
18843
|
+
};
|
|
18844
|
+
var ShareLinkAttachmentChunkEnvelopeValidator = ShareEnvelopeValidator.refine(
|
|
18845
|
+
(value) => (decodedBase64UrlByteLength(value.ct) ?? Infinity) <= 256 * 1024 + SHARE_TAG_BYTES
|
|
18846
|
+
);
|
|
18847
|
+
var PutShareLinkAttachmentChunkInputValidator = external_exports.object({
|
|
18848
|
+
...attachmentChunkKey,
|
|
18849
|
+
chunkCount: external_exports.number().int().min(1).max(16),
|
|
18850
|
+
envelope: ShareLinkAttachmentChunkEnvelopeValidator,
|
|
18851
|
+
ownerEncryptedRecovery: ShareOwnerRecoveryValidator
|
|
18852
|
+
}).strict().refine((value) => value.chunkIndex < value.chunkCount);
|
|
18853
|
+
var GetShareLinkAttachmentChunkInputValidator = external_exports.object({
|
|
18854
|
+
...attachmentChunkKey,
|
|
18855
|
+
passcode: external_exports.string().min(4).max(64).optional(),
|
|
18856
|
+
accessToken: external_exports.string().min(1).max(2048).optional()
|
|
18857
|
+
}).strict();
|
|
18858
|
+
var ShareLinkAttachmentChunkOutputValidator = external_exports.object({
|
|
18859
|
+
...attachmentChunkKey,
|
|
18860
|
+
envelope: ShareLinkAttachmentChunkEnvelopeValidator,
|
|
18861
|
+
accessToken: external_exports.string().min(1).max(2048).optional()
|
|
18862
|
+
}).strict();
|
|
18863
|
+
var DeleteShareLinkAttachmentChunksInputValidator = external_exports.object({
|
|
18864
|
+
id: ShareLinkIdValidator,
|
|
18865
|
+
contentVersion: safeVersion,
|
|
18866
|
+
attachmentId: external_exports.string().uuid(),
|
|
18867
|
+
chunkCount: external_exports.number().int().min(1).max(16)
|
|
18868
|
+
}).strict();
|
|
18869
|
+
var PutShareLinkAttachmentChunkOutputValidator = external_exports.object({ ok: external_exports.literal(true) }).strict();
|
|
18870
|
+
var DeleteShareLinkAttachmentChunksOutputValidator = external_exports.object({ ok: external_exports.boolean() }).strict();
|
|
18871
|
+
var CreateShareLinkInputValidator = external_exports.object({
|
|
18872
|
+
id: ShareLinkIdValidator,
|
|
18873
|
+
clientRequestId,
|
|
18874
|
+
title: external_exports.string().min(1).max(120),
|
|
18875
|
+
note: external_exports.string().max(500).optional(),
|
|
18876
|
+
expiresAt: external_exports.iso.datetime().nullable().optional(),
|
|
18877
|
+
passcode: external_exports.string().min(8).max(64).optional(),
|
|
18878
|
+
notifyOnView: external_exports.boolean().default(false),
|
|
18879
|
+
selectedCount: external_exports.number().int().min(1).max(MAX_SELECTED_CREDENTIALS),
|
|
18880
|
+
contentVersion: external_exports.literal(1),
|
|
18881
|
+
envelope: ShareEnvelopeValidator,
|
|
18882
|
+
ownerEncryptedRecovery: ShareOwnerRecoveryValidator,
|
|
18883
|
+
attachment: ShareLinkAttachmentValidator.optional()
|
|
18884
|
+
}).strict();
|
|
18885
|
+
var UpdateShareLinkInputValidator = external_exports.object({
|
|
18886
|
+
id: ShareLinkIdValidator,
|
|
18887
|
+
expectedVersion: safeVersion,
|
|
18888
|
+
clientRequestId,
|
|
18889
|
+
title: external_exports.string().min(1).max(120).optional(),
|
|
18890
|
+
note: external_exports.string().max(500).nullable().optional(),
|
|
18891
|
+
expiresAt: external_exports.iso.datetime().nullable().optional(),
|
|
18892
|
+
/** Omitted preserves the current passcode, null removes it, and a string replaces it. */
|
|
18893
|
+
passcode: external_exports.string().min(8).max(64).nullable().optional(),
|
|
18894
|
+
notifyOnView: external_exports.boolean().optional(),
|
|
18895
|
+
contentVersion: safeVersion.optional(),
|
|
18896
|
+
selectedCount: external_exports.number().int().min(1).max(MAX_SELECTED_CREDENTIALS).optional(),
|
|
18897
|
+
envelope: ShareEnvelopeValidator.optional(),
|
|
18898
|
+
ownerEncryptedRecovery: ShareOwnerRecoveryValidator.optional(),
|
|
18899
|
+
attachment: ShareLinkAttachmentValidator.optional()
|
|
18900
|
+
}).strict().superRefine((value, ctx) => {
|
|
18901
|
+
const provided = [
|
|
18902
|
+
value.contentVersion,
|
|
18903
|
+
value.selectedCount,
|
|
18904
|
+
value.envelope,
|
|
18905
|
+
value.ownerEncryptedRecovery
|
|
18906
|
+
].filter((field) => field !== void 0).length;
|
|
18907
|
+
if (provided !== 0 && provided !== 4) {
|
|
18908
|
+
ctx.addIssue({
|
|
18909
|
+
code: "custom",
|
|
18910
|
+
message: "content replacement requires contentVersion, selectedCount, envelope and ownerEncryptedRecovery together"
|
|
18911
|
+
});
|
|
18912
|
+
}
|
|
18913
|
+
if (value.attachment !== void 0 && provided !== 4) {
|
|
18914
|
+
ctx.addIssue({ code: "custom", message: "attachment requires a content replacement" });
|
|
18915
|
+
}
|
|
18916
|
+
});
|
|
18917
|
+
var ShareLinkIdInputValidator = external_exports.object({ id: ShareLinkIdValidator }).strict();
|
|
18918
|
+
var ShareLinkOperationKeyInputValidator = external_exports.object({ id: ShareLinkIdValidator, operationId: external_exports.string().uuid() }).strict();
|
|
18919
|
+
var ShareLinkOwnerCommitOutputValidator = external_exports.discriminatedUnion("status", [
|
|
18920
|
+
external_exports.object({ status: external_exports.literal("completed"), share: ShareLinkValidator }).strict(),
|
|
18921
|
+
external_exports.object({
|
|
18922
|
+
status: external_exports.literal("pending"),
|
|
18923
|
+
id: ShareLinkIdValidator,
|
|
18924
|
+
operationId: external_exports.string().uuid()
|
|
18925
|
+
}).strict()
|
|
18926
|
+
]);
|
|
18927
|
+
var ShareLinkOwnerStatusOutputValidator = external_exports.discriminatedUnion("status", [
|
|
18928
|
+
external_exports.object({ status: external_exports.literal("found"), share: ShareLinkValidator }).strict(),
|
|
18929
|
+
external_exports.object({
|
|
18930
|
+
status: external_exports.literal("pending"),
|
|
18931
|
+
id: ShareLinkIdValidator,
|
|
18932
|
+
operationId: external_exports.string().uuid()
|
|
18933
|
+
}).strict(),
|
|
18934
|
+
external_exports.object({ status: external_exports.literal("not_found"), id: ShareLinkIdValidator }).strict()
|
|
18935
|
+
]);
|
|
18936
|
+
var ShareLinkOwnerRecoveryOutputValidator = external_exports.object({ recovery: ShareOwnerRecoveryValidator }).strict();
|
|
18937
|
+
var ShareLinkOwnerContentOutputValidator = external_exports.object({
|
|
18938
|
+
id: ShareLinkIdValidator,
|
|
18939
|
+
contentVersion: safeVersion,
|
|
18940
|
+
envelope: ShareEnvelopeValidator
|
|
18941
|
+
}).strict();
|
|
18942
|
+
var ResolveShareLinkInputValidator = external_exports.object({
|
|
18943
|
+
id: ShareLinkIdValidator,
|
|
18944
|
+
/** Sent only in a POST body; it must never be placed in a share URL. */
|
|
18945
|
+
passcode: external_exports.string().min(4).max(64).optional()
|
|
18946
|
+
}).strict();
|
|
18947
|
+
var ShareLinkPublicStateValidator = external_exports.discriminatedUnion("state", [
|
|
18948
|
+
external_exports.object({
|
|
18949
|
+
state: external_exports.literal("passcode_required"),
|
|
18950
|
+
id: ShareLinkIdValidator
|
|
18951
|
+
}).strict(),
|
|
18952
|
+
external_exports.object({ state: external_exports.literal("try_later"), id: ShareLinkIdValidator }).strict(),
|
|
18953
|
+
external_exports.object({
|
|
18954
|
+
state: external_exports.literal("active"),
|
|
18955
|
+
id: ShareLinkIdValidator,
|
|
18956
|
+
title: external_exports.string().max(120),
|
|
18957
|
+
note: external_exports.string().max(500).optional(),
|
|
18958
|
+
selectedCount: external_exports.number().int().min(1).max(MAX_SELECTED_CREDENTIALS),
|
|
18959
|
+
contentVersion: safeVersion,
|
|
18960
|
+
contentUrl: external_exports.string(),
|
|
18961
|
+
sharer: external_exports.object({
|
|
18962
|
+
displayName: external_exports.string().max(120),
|
|
18963
|
+
avatar: external_exports.string().max(2048).optional()
|
|
18964
|
+
}),
|
|
18965
|
+
createdAt: external_exports.iso.datetime(),
|
|
18966
|
+
updatedAt: external_exports.iso.datetime(),
|
|
18967
|
+
expiresAt: external_exports.iso.datetime().nullable()
|
|
18968
|
+
}).strict(),
|
|
18969
|
+
external_exports.object({
|
|
18970
|
+
state: external_exports.literal("expired"),
|
|
18971
|
+
id: ShareLinkIdValidator,
|
|
18972
|
+
expiresAt: external_exports.iso.datetime()
|
|
18973
|
+
}).strict(),
|
|
18974
|
+
external_exports.object({
|
|
18975
|
+
state: external_exports.literal("stopped"),
|
|
18976
|
+
id: ShareLinkIdValidator,
|
|
18977
|
+
stoppedAt: external_exports.iso.datetime()
|
|
18978
|
+
}).strict(),
|
|
18979
|
+
external_exports.object({ state: external_exports.literal("not_found"), id: ShareLinkIdValidator }).strict()
|
|
18980
|
+
]);
|
|
18981
|
+
var ListShareLinksInputValidator = external_exports.object({
|
|
18982
|
+
limit: external_exports.number().int().min(1).max(50).default(25),
|
|
18983
|
+
cursor: external_exports.string().max(512).optional()
|
|
18984
|
+
}).strict();
|
|
18985
|
+
var PaginatedShareLinksValidator = PaginationResponseValidator.extend({
|
|
18986
|
+
records: ShareLinkValidator.array()
|
|
18987
|
+
});
|
|
18988
|
+
var AcknowledgeViewInputValidator = external_exports.object({
|
|
18989
|
+
receipt: external_exports.string().min(22).max(128).regex(/^[A-Za-z0-9_-]+$/)
|
|
18990
|
+
}).strict();
|
|
18991
|
+
var AcknowledgeViewOutputValidator = external_exports.object({ ok: external_exports.literal(true) }).strict();
|
|
18992
|
+
var SHARE_VIEW_RECEIPT_TTL_SECONDS = 10 * 60;
|
|
18993
|
+
var ShareLinkPublicContentViewValidator = external_exports.object({
|
|
18994
|
+
id: ShareLinkIdValidator,
|
|
18995
|
+
contentVersion: safeVersion,
|
|
18996
|
+
envelope: ShareEnvelopeValidator,
|
|
18997
|
+
contentUrl: external_exports.string(),
|
|
18998
|
+
receipt: external_exports.string().min(22).max(128).regex(/^[A-Za-z0-9_-]+$/)
|
|
18999
|
+
}).strict();
|
|
18132
19000
|
}
|
|
18133
19001
|
});
|
|
18134
19002
|
|
|
@@ -19226,6 +20094,101 @@ var parseEnvironment = /* @__PURE__ */ __name((schema, raw, context) => {
|
|
|
19226
20094
|
);
|
|
19227
20095
|
}, "parseEnvironment");
|
|
19228
20096
|
|
|
20097
|
+
// src/share-content-canonical.ts
|
|
20098
|
+
var DEFAULT_MAX_CANONICAL_BYTES = 2 * 1024 * 1024;
|
|
20099
|
+
var DEFAULT_MAX_CANONICAL_DEPTH = 32;
|
|
20100
|
+
var LONE_SURROGATE_RE = /[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?<![\uD800-\uDBFF])[\uDC00-\uDFFF]/;
|
|
20101
|
+
var ShareContentCanonicalizationError = class extends Error {
|
|
20102
|
+
constructor(message) {
|
|
20103
|
+
super(message);
|
|
20104
|
+
this.code = "UNSUPPORTED_REQUEST_VALUE";
|
|
20105
|
+
this.name = "ShareContentCanonicalizationError";
|
|
20106
|
+
}
|
|
20107
|
+
static {
|
|
20108
|
+
__name(this, "ShareContentCanonicalizationError");
|
|
20109
|
+
}
|
|
20110
|
+
};
|
|
20111
|
+
var serializeCanonical = /* @__PURE__ */ __name((value, seen, depth, maxDepth) => {
|
|
20112
|
+
if (value === null) return "null";
|
|
20113
|
+
switch (typeof value) {
|
|
20114
|
+
case "boolean":
|
|
20115
|
+
return value ? "true" : "false";
|
|
20116
|
+
case "string": {
|
|
20117
|
+
if (LONE_SURROGATE_RE.test(value)) {
|
|
20118
|
+
throw new ShareContentCanonicalizationError(
|
|
20119
|
+
"string contains an unpaired surrogate"
|
|
20120
|
+
);
|
|
20121
|
+
}
|
|
20122
|
+
return JSON.stringify(value);
|
|
20123
|
+
}
|
|
20124
|
+
case "number": {
|
|
20125
|
+
if (!Number.isSafeInteger(value) || Object.is(value, -0)) {
|
|
20126
|
+
throw new ShareContentCanonicalizationError(
|
|
20127
|
+
"numbers must be safe integers without a negative-zero sign"
|
|
20128
|
+
);
|
|
20129
|
+
}
|
|
20130
|
+
return String(value);
|
|
20131
|
+
}
|
|
20132
|
+
case "object": {
|
|
20133
|
+
if (depth >= maxDepth) {
|
|
20134
|
+
throw new ShareContentCanonicalizationError(
|
|
20135
|
+
"value exceeds the maximum nesting depth"
|
|
20136
|
+
);
|
|
20137
|
+
}
|
|
20138
|
+
if (seen.has(value)) {
|
|
20139
|
+
throw new ShareContentCanonicalizationError("cyclic value is not supported");
|
|
20140
|
+
}
|
|
20141
|
+
seen.add(value);
|
|
20142
|
+
try {
|
|
20143
|
+
if (Array.isArray(value)) {
|
|
20144
|
+
const items = [];
|
|
20145
|
+
for (let index = 0; index < value.length; index += 1) {
|
|
20146
|
+
if (!(index in value)) {
|
|
20147
|
+
throw new ShareContentCanonicalizationError(
|
|
20148
|
+
"sparse arrays are not supported"
|
|
20149
|
+
);
|
|
20150
|
+
}
|
|
20151
|
+
items.push(serializeCanonical(value[index], seen, depth + 1, maxDepth));
|
|
20152
|
+
}
|
|
20153
|
+
return `[${items.join(",")}]`;
|
|
20154
|
+
}
|
|
20155
|
+
const prototype = Object.getPrototypeOf(value);
|
|
20156
|
+
if (prototype !== Object.prototype && prototype !== null) {
|
|
20157
|
+
throw new ShareContentCanonicalizationError("only plain objects are supported");
|
|
20158
|
+
}
|
|
20159
|
+
const record = value;
|
|
20160
|
+
const entries = Object.keys(record).sort().map((key) => {
|
|
20161
|
+
if (LONE_SURROGATE_RE.test(key)) {
|
|
20162
|
+
throw new ShareContentCanonicalizationError(
|
|
20163
|
+
"object key contains an unpaired surrogate"
|
|
20164
|
+
);
|
|
20165
|
+
}
|
|
20166
|
+
return `${JSON.stringify(key)}:${serializeCanonical(
|
|
20167
|
+
record[key],
|
|
20168
|
+
seen,
|
|
20169
|
+
depth + 1,
|
|
20170
|
+
maxDepth
|
|
20171
|
+
)}`;
|
|
20172
|
+
});
|
|
20173
|
+
return `{${entries.join(",")}}`;
|
|
20174
|
+
} finally {
|
|
20175
|
+
seen.delete(value);
|
|
20176
|
+
}
|
|
20177
|
+
}
|
|
20178
|
+
default:
|
|
20179
|
+
throw new ShareContentCanonicalizationError(`unsupported value type: ${typeof value}`);
|
|
20180
|
+
}
|
|
20181
|
+
}, "serializeCanonical");
|
|
20182
|
+
var canonicalizeShareContentRequestBody = /* @__PURE__ */ __name((body, options = {}) => {
|
|
20183
|
+
const maxBytes = options.maxBytes ?? DEFAULT_MAX_CANONICAL_BYTES;
|
|
20184
|
+
const maxDepth = options.maxDepth ?? DEFAULT_MAX_CANONICAL_DEPTH;
|
|
20185
|
+
const serialized = serializeCanonical(body, /* @__PURE__ */ new Set(), 0, maxDepth);
|
|
20186
|
+
if (new TextEncoder().encode(serialized).byteLength > maxBytes) {
|
|
20187
|
+
throw new ShareContentCanonicalizationError("canonical request exceeds the maximum size");
|
|
20188
|
+
}
|
|
20189
|
+
return serialized;
|
|
20190
|
+
}, "canonicalizeShareContentRequestBody");
|
|
20191
|
+
|
|
19229
20192
|
// src/index.ts
|
|
19230
20193
|
var isHex = /* @__PURE__ */ __name((str) => /^[0-9a-f]+$/i.test(str), "isHex");
|
|
19231
20194
|
var isEncrypted = /* @__PURE__ */ __name((item) => {
|
|
@@ -19275,6 +20238,8 @@ var isAppDidWeb = /* @__PURE__ */ __name((did) => {
|
|
|
19275
20238
|
}, "isAppDidWeb");
|
|
19276
20239
|
export {
|
|
19277
20240
|
AGE_RATING_TO_MIN_AGE,
|
|
20241
|
+
DEFAULT_MAX_CANONICAL_BYTES,
|
|
20242
|
+
DEFAULT_MAX_CANONICAL_DEPTH,
|
|
19278
20243
|
DEFAULT_RESOLUTIONS,
|
|
19279
20244
|
EnvironmentConfigurationError,
|
|
19280
20245
|
ImageResizingValidator,
|
|
@@ -19285,9 +20250,11 @@ export {
|
|
|
19285
20250
|
MANAGED_REFRESH_SERVICE_CONTEXT,
|
|
19286
20251
|
MANAGED_REFRESH_TYPE_IRI,
|
|
19287
20252
|
RegExpTransformer,
|
|
20253
|
+
ShareContentCanonicalizationError,
|
|
19288
20254
|
calculateAgeFromDob,
|
|
19289
20255
|
canonicalizeCredentialContent,
|
|
19290
20256
|
canonicalizeCredentialJson,
|
|
20257
|
+
canonicalizeShareContentRequestBody,
|
|
19291
20258
|
capitalizeFirstLetter,
|
|
19292
20259
|
changeQuality4 as changeQuality,
|
|
19293
20260
|
checkAppInstallEligibility,
|