@learncard/network-brain-client 2.5.56 → 2.5.58
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/brain-client.cjs.development.cjs +6733 -5618
- package/dist/brain-client.cjs.development.cjs.map +2 -2
- package/dist/brain-client.cjs.production.min.cjs +46 -46
- package/dist/brain-client.cjs.production.min.cjs.map +3 -3
- package/dist/brain-client.esm.js +914 -180
- package/dist/brain-client.esm.js.map +3 -3
- package/package.json +4 -4
package/dist/brain-client.esm.js
CHANGED
|
@@ -15954,12 +15954,15 @@ var require_types_cjs_development = __commonJS({
|
|
|
15954
15954
|
var __toCommonJS = /* @__PURE__ */ __name2((mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod), "__toCommonJS");
|
|
15955
15955
|
var index_exports = {};
|
|
15956
15956
|
__export22(index_exports, {
|
|
15957
|
+
ACT_AS_HEADER: /* @__PURE__ */ __name2(() => ACT_AS_HEADER, "ACT_AS_HEADER"),
|
|
15957
15958
|
AUTH_GRANT_AUDIENCE_DOMAIN_PREFIX: /* @__PURE__ */ __name2(() => AUTH_GRANT_AUDIENCE_DOMAIN_PREFIX, "AUTH_GRANT_AUDIENCE_DOMAIN_PREFIX"),
|
|
15958
15959
|
AchievementCredentialValidator: /* @__PURE__ */ __name2(() => AchievementCredentialValidator, "AchievementCredentialValidator"),
|
|
15959
15960
|
AchievementCriteriaValidator: /* @__PURE__ */ __name2(() => AchievementCriteriaValidator, "AchievementCriteriaValidator"),
|
|
15960
15961
|
AchievementSubjectValidator: /* @__PURE__ */ __name2(() => AchievementSubjectValidator, "AchievementSubjectValidator"),
|
|
15961
15962
|
AchievementTypeValidator: /* @__PURE__ */ __name2(() => AchievementTypeValidator, "AchievementTypeValidator"),
|
|
15962
15963
|
AchievementValidator: /* @__PURE__ */ __name2(() => AchievementValidator, "AchievementValidator"),
|
|
15964
|
+
AcknowledgeViewInputValidator: /* @__PURE__ */ __name2(() => AcknowledgeViewInputValidator, "AcknowledgeViewInputValidator"),
|
|
15965
|
+
AcknowledgeViewOutputValidator: /* @__PURE__ */ __name2(() => AcknowledgeViewOutputValidator, "AcknowledgeViewOutputValidator"),
|
|
15963
15966
|
AddTagInputValidator: /* @__PURE__ */ __name2(() => AddTagInputValidator, "AddTagInputValidator"),
|
|
15964
15967
|
AddressValidator: /* @__PURE__ */ __name2(() => AddressValidator, "AddressValidator"),
|
|
15965
15968
|
AgeRatingValidator: /* @__PURE__ */ __name2(() => AgeRatingValidator, "AgeRatingValidator"),
|
|
@@ -16037,6 +16040,7 @@ var require_types_cjs_development = __commonJS({
|
|
|
16037
16040
|
CreateContactMethodSessionValidator: /* @__PURE__ */ __name2(() => CreateContactMethodSessionValidator, "CreateContactMethodSessionValidator"),
|
|
16038
16041
|
CreateManagedFrameworkBatchInputValidator: /* @__PURE__ */ __name2(() => CreateManagedFrameworkBatchInputValidator, "CreateManagedFrameworkBatchInputValidator"),
|
|
16039
16042
|
CreateManagedFrameworkInputValidator: /* @__PURE__ */ __name2(() => CreateManagedFrameworkInputValidator, "CreateManagedFrameworkInputValidator"),
|
|
16043
|
+
CreateShareLinkInputValidator: /* @__PURE__ */ __name2(() => CreateShareLinkInputValidator, "CreateShareLinkInputValidator"),
|
|
16040
16044
|
CreateSkillInputValidator: /* @__PURE__ */ __name2(() => CreateSkillInputValidator, "CreateSkillInputValidator"),
|
|
16041
16045
|
CreateSkillsBatchInputValidator: /* @__PURE__ */ __name2(() => CreateSkillsBatchInputValidator, "CreateSkillsBatchInputValidator"),
|
|
16042
16046
|
CredentialActivityEventTypeValidator: /* @__PURE__ */ __name2(() => CredentialActivityEventTypeValidator, "CredentialActivityEventTypeValidator"),
|
|
@@ -16068,10 +16072,14 @@ var require_types_cjs_development = __commonJS({
|
|
|
16068
16072
|
DeleteSkillInputValidator: /* @__PURE__ */ __name2(() => DeleteSkillInputValidator, "DeleteSkillInputValidator"),
|
|
16069
16073
|
DidDocumentValidator: /* @__PURE__ */ __name2(() => DidDocumentValidator, "DidDocumentValidator"),
|
|
16070
16074
|
EMPTY_IN_APP_MESSAGES_FLAG: /* @__PURE__ */ __name2(() => EMPTY_IN_APP_MESSAGES_FLAG, "EMPTY_IN_APP_MESSAGES_FLAG"),
|
|
16075
|
+
ESCROW_PIN_LOCKED_MESSAGE: /* @__PURE__ */ __name2(() => ESCROW_PIN_LOCKED_MESSAGE, "ESCROW_PIN_LOCKED_MESSAGE"),
|
|
16076
|
+
ESCROW_PIN_MISMATCH_PATTERN: /* @__PURE__ */ __name2(() => ESCROW_PIN_MISMATCH_PATTERN, "ESCROW_PIN_MISMATCH_PATTERN"),
|
|
16077
|
+
ESCROW_PIN_UNAVAILABLE_MESSAGE: /* @__PURE__ */ __name2(() => ESCROW_PIN_UNAVAILABLE_MESSAGE, "ESCROW_PIN_UNAVAILABLE_MESSAGE"),
|
|
16071
16078
|
EncryptedCredentialRecordValidator: /* @__PURE__ */ __name2(() => EncryptedCredentialRecordValidator, "EncryptedCredentialRecordValidator"),
|
|
16072
16079
|
EncryptedRecordValidator: /* @__PURE__ */ __name2(() => EncryptedRecordValidator, "EncryptedRecordValidator"),
|
|
16073
16080
|
EndorsementCredentialValidator: /* @__PURE__ */ __name2(() => EndorsementCredentialValidator, "EndorsementCredentialValidator"),
|
|
16074
16081
|
EndorsementSubjectValidator: /* @__PURE__ */ __name2(() => EndorsementSubjectValidator, "EndorsementSubjectValidator"),
|
|
16082
|
+
EscrowPinStatusValidator: /* @__PURE__ */ __name2(() => EscrowPinStatusValidator, "EscrowPinStatusValidator"),
|
|
16075
16083
|
EvidenceValidator: /* @__PURE__ */ __name2(() => EvidenceValidator, "EvidenceValidator"),
|
|
16076
16084
|
FlatAuthGrantValidator: /* @__PURE__ */ __name2(() => FlatAuthGrantValidator, "FlatAuthGrantValidator"),
|
|
16077
16085
|
FrameworkWithSkillsValidator: /* @__PURE__ */ __name2(() => FrameworkWithSkillsValidator, "FrameworkWithSkillsValidator"),
|
|
@@ -16093,10 +16101,18 @@ var require_types_cjs_development = __commonJS({
|
|
|
16093
16101
|
IdentifierTypeValidator: /* @__PURE__ */ __name2(() => IdentifierTypeValidator, "IdentifierTypeValidator"),
|
|
16094
16102
|
IdentityObjectValidator: /* @__PURE__ */ __name2(() => IdentityObjectValidator, "IdentityObjectValidator"),
|
|
16095
16103
|
ImageValidator: /* @__PURE__ */ __name2(() => ImageValidator, "ImageValidator"),
|
|
16104
|
+
InboxBatchErrorReasonValidator: /* @__PURE__ */ __name2(() => InboxBatchErrorReasonValidator, "InboxBatchErrorReasonValidator"),
|
|
16105
|
+
InboxBatchReceiptValidator: /* @__PURE__ */ __name2(() => InboxBatchReceiptValidator, "InboxBatchReceiptValidator"),
|
|
16106
|
+
InboxBatchStatusValidator: /* @__PURE__ */ __name2(() => InboxBatchStatusValidator, "InboxBatchStatusValidator"),
|
|
16096
16107
|
InboxCredentialQueryValidator: /* @__PURE__ */ __name2(() => InboxCredentialQueryValidator, "InboxCredentialQueryValidator"),
|
|
16108
|
+
InboxCredentialRefreshReceiptValidator: /* @__PURE__ */ __name2(() => InboxCredentialRefreshReceiptValidator, "InboxCredentialRefreshReceiptValidator"),
|
|
16097
16109
|
InboxCredentialValidator: /* @__PURE__ */ __name2(() => InboxCredentialValidator, "InboxCredentialValidator"),
|
|
16098
16110
|
IncrementCounterEventValidator: /* @__PURE__ */ __name2(() => IncrementCounterEventValidator, "IncrementCounterEventValidator"),
|
|
16099
16111
|
InstalledAppValidator: /* @__PURE__ */ __name2(() => InstalledAppValidator, "InstalledAppValidator"),
|
|
16112
|
+
IssueInboxCredentialBatchItemResultValidator: /* @__PURE__ */ __name2(() => IssueInboxCredentialBatchItemResultValidator, "IssueInboxCredentialBatchItemResultValidator"),
|
|
16113
|
+
IssueInboxCredentialBatchItemValidator: /* @__PURE__ */ __name2(() => IssueInboxCredentialBatchItemValidator, "IssueInboxCredentialBatchItemValidator"),
|
|
16114
|
+
IssueInboxCredentialBatchResponseValidator: /* @__PURE__ */ __name2(() => IssueInboxCredentialBatchResponseValidator, "IssueInboxCredentialBatchResponseValidator"),
|
|
16115
|
+
IssueInboxCredentialBatchValidator: /* @__PURE__ */ __name2(() => IssueInboxCredentialBatchValidator, "IssueInboxCredentialBatchValidator"),
|
|
16100
16116
|
IssueInboxCredentialResponseValidator: /* @__PURE__ */ __name2(() => IssueInboxCredentialResponseValidator, "IssueInboxCredentialResponseValidator"),
|
|
16101
16117
|
IssueInboxCredentialValidator: /* @__PURE__ */ __name2(() => IssueInboxCredentialValidator, "IssueInboxCredentialValidator"),
|
|
16102
16118
|
IssueInboxSigningAuthorityValidator: /* @__PURE__ */ __name2(() => IssueInboxSigningAuthorityValidator, "IssueInboxSigningAuthorityValidator"),
|
|
@@ -16145,7 +16161,16 @@ var require_types_cjs_development = __commonJS({
|
|
|
16145
16161
|
LaunchTypeValidator: /* @__PURE__ */ __name2(() => LaunchTypeValidator, "LaunchTypeValidator"),
|
|
16146
16162
|
LearnCardRefreshAuthorizationValidator: /* @__PURE__ */ __name2(() => LearnCardRefreshAuthorizationValidator, "LearnCardRefreshAuthorizationValidator"),
|
|
16147
16163
|
LinkProviderFrameworkInputValidator: /* @__PURE__ */ __name2(() => LinkProviderFrameworkInputValidator, "LinkProviderFrameworkInputValidator"),
|
|
16148
|
-
|
|
16164
|
+
ListShareLinksInputValidator: /* @__PURE__ */ __name2(() => ListShareLinksInputValidator, "ListShareLinksInputValidator"),
|
|
16165
|
+
MAX_ENDORSEMENTS: /* @__PURE__ */ __name2(() => MAX_ENDORSEMENTS, "MAX_ENDORSEMENTS"),
|
|
16166
|
+
MAX_SELECTED_CREDENTIALS: /* @__PURE__ */ __name2(() => MAX_SELECTED_CREDENTIALS, "MAX_SELECTED_CREDENTIALS"),
|
|
16167
|
+
MAX_SHARE_CIPHERTEXT_BYTES: /* @__PURE__ */ __name2(() => MAX_SHARE_CIPHERTEXT_BYTES, "MAX_SHARE_CIPHERTEXT_BYTES"),
|
|
16168
|
+
MAX_SHARE_LINK_REQUEST_BYTES: /* @__PURE__ */ __name2(() => MAX_SHARE_LINK_REQUEST_BYTES, "MAX_SHARE_LINK_REQUEST_BYTES"),
|
|
16169
|
+
MAX_SHARE_RECOVERY_JWE_BYTES: /* @__PURE__ */ __name2(() => MAX_SHARE_RECOVERY_JWE_BYTES, "MAX_SHARE_RECOVERY_JWE_BYTES"),
|
|
16170
|
+
MAX_SHARE_SOURCE_URI_CHARS: /* @__PURE__ */ __name2(() => MAX_SHARE_SOURCE_URI_CHARS, "MAX_SHARE_SOURCE_URI_CHARS"),
|
|
16171
|
+
MAX_VP_MEMBERS: /* @__PURE__ */ __name2(() => MAX_VP_MEMBERS, "MAX_VP_MEMBERS"),
|
|
16172
|
+
ManagedCredentialRefreshReceiptValidator: /* @__PURE__ */ __name2(() => ManagedCredentialRefreshReceiptValidator, "ManagedCredentialRefreshReceiptValidator"),
|
|
16173
|
+
ManagedCredentialRefreshServiceValidator: /* @__PURE__ */ __name2(() => ManagedCredentialRefreshServiceValidator2, "ManagedCredentialRefreshServiceValidator"),
|
|
16149
16174
|
PaginatedAppStoreListingsValidator: /* @__PURE__ */ __name2(() => PaginatedAppStoreListingsValidator, "PaginatedAppStoreListingsValidator"),
|
|
16150
16175
|
PaginatedBoostRecipientsValidator: /* @__PURE__ */ __name2(() => PaginatedBoostRecipientsValidator, "PaginatedBoostRecipientsValidator"),
|
|
16151
16176
|
PaginatedBoostRecipientsWithChildrenValidator: /* @__PURE__ */ __name2(() => PaginatedBoostRecipientsWithChildrenValidator, "PaginatedBoostRecipientsWithChildrenValidator"),
|
|
@@ -16166,11 +16191,14 @@ var require_types_cjs_development = __commonJS({
|
|
|
16166
16191
|
PaginatedLCNProfileManagersValidator: /* @__PURE__ */ __name2(() => PaginatedLCNProfileManagersValidator, "PaginatedLCNProfileManagersValidator"),
|
|
16167
16192
|
PaginatedLCNProfilesAndManagersValidator: /* @__PURE__ */ __name2(() => PaginatedLCNProfilesAndManagersValidator, "PaginatedLCNProfilesAndManagersValidator"),
|
|
16168
16193
|
PaginatedLCNProfilesValidator: /* @__PURE__ */ __name2(() => PaginatedLCNProfilesValidator, "PaginatedLCNProfilesValidator"),
|
|
16194
|
+
PaginatedShareLinksValidator: /* @__PURE__ */ __name2(() => PaginatedShareLinksValidator, "PaginatedShareLinksValidator"),
|
|
16169
16195
|
PaginatedSkillFrameworksValidator: /* @__PURE__ */ __name2(() => PaginatedSkillFrameworksValidator, "PaginatedSkillFrameworksValidator"),
|
|
16170
16196
|
PaginatedSkillTreeValidator: /* @__PURE__ */ __name2(() => PaginatedSkillTreeValidator, "PaginatedSkillTreeValidator"),
|
|
16171
16197
|
PaginatedVisibleLCNProfilesValidator: /* @__PURE__ */ __name2(() => PaginatedVisibleLCNProfilesValidator, "PaginatedVisibleLCNProfilesValidator"),
|
|
16172
16198
|
PaginationOptionsValidator: /* @__PURE__ */ __name2(() => PaginationOptionsValidator, "PaginationOptionsValidator"),
|
|
16173
16199
|
PaginationResponseValidator: /* @__PURE__ */ __name2(() => PaginationResponseValidator, "PaginationResponseValidator"),
|
|
16200
|
+
PrepareRefreshableSendInputValidator: /* @__PURE__ */ __name2(() => PrepareRefreshableSendInputValidator, "PrepareRefreshableSendInputValidator"),
|
|
16201
|
+
PrepareRefreshableSendResultValidator: /* @__PURE__ */ __name2(() => PrepareRefreshableSendResultValidator, "PrepareRefreshableSendResultValidator"),
|
|
16174
16202
|
ProfileValidator: /* @__PURE__ */ __name2(() => ProfileValidator, "ProfileValidator"),
|
|
16175
16203
|
ProfileVisibilityEnum: /* @__PURE__ */ __name2(() => ProfileVisibilityEnum, "ProfileVisibilityEnum"),
|
|
16176
16204
|
PromotionLevelValidator: /* @__PURE__ */ __name2(() => PromotionLevelValidator, "PromotionLevelValidator"),
|
|
@@ -16188,14 +16216,24 @@ var require_types_cjs_development = __commonJS({
|
|
|
16188
16216
|
ReplaceSkillFrameworkSkillsInputValidator: /* @__PURE__ */ __name2(() => ReplaceSkillFrameworkSkillsInputValidator, "ReplaceSkillFrameworkSkillsInputValidator"),
|
|
16189
16217
|
ReplaceSkillFrameworkSkillsResultValidator: /* @__PURE__ */ __name2(() => ReplaceSkillFrameworkSkillsResultValidator, "ReplaceSkillFrameworkSkillsResultValidator"),
|
|
16190
16218
|
RequestLearnerContextEventValidator: /* @__PURE__ */ __name2(() => RequestLearnerContextEventValidator, "RequestLearnerContextEventValidator"),
|
|
16219
|
+
ResolveShareLinkInputValidator: /* @__PURE__ */ __name2(() => ResolveShareLinkInputValidator, "ResolveShareLinkInputValidator"),
|
|
16191
16220
|
ResultDescriptionValidator: /* @__PURE__ */ __name2(() => ResultDescriptionValidator, "ResultDescriptionValidator"),
|
|
16192
16221
|
ResultStatusTypeValidator: /* @__PURE__ */ __name2(() => ResultStatusTypeValidator, "ResultStatusTypeValidator"),
|
|
16193
16222
|
ResultTypeValidator: /* @__PURE__ */ __name2(() => ResultTypeValidator, "ResultTypeValidator"),
|
|
16194
16223
|
ResultValidator: /* @__PURE__ */ __name2(() => ResultValidator, "ResultValidator"),
|
|
16195
16224
|
RubricCriterionValidator: /* @__PURE__ */ __name2(() => RubricCriterionValidator, "RubricCriterionValidator"),
|
|
16225
|
+
SHARE_AAD_PREFIX: /* @__PURE__ */ __name2(() => SHARE_AAD_PREFIX, "SHARE_AAD_PREFIX"),
|
|
16226
|
+
SHARE_CONTENT_KEY_BYTES: /* @__PURE__ */ __name2(() => SHARE_CONTENT_KEY_BYTES, "SHARE_CONTENT_KEY_BYTES"),
|
|
16227
|
+
SHARE_IV_BYTES: /* @__PURE__ */ __name2(() => SHARE_IV_BYTES, "SHARE_IV_BYTES"),
|
|
16228
|
+
SHARE_LINK_ID_BYTES: /* @__PURE__ */ __name2(() => SHARE_LINK_ID_BYTES, "SHARE_LINK_ID_BYTES"),
|
|
16229
|
+
SHARE_LINK_PROTOCOL: /* @__PURE__ */ __name2(() => SHARE_LINK_PROTOCOL, "SHARE_LINK_PROTOCOL"),
|
|
16230
|
+
SHARE_RECOVERY_PROTOCOL: /* @__PURE__ */ __name2(() => SHARE_RECOVERY_PROTOCOL, "SHARE_RECOVERY_PROTOCOL"),
|
|
16231
|
+
SHARE_TAG_BYTES: /* @__PURE__ */ __name2(() => SHARE_TAG_BYTES, "SHARE_TAG_BYTES"),
|
|
16232
|
+
SHARE_VIEW_RECEIPT_TTL_SECONDS: /* @__PURE__ */ __name2(() => SHARE_VIEW_RECEIPT_TTL_SECONDS, "SHARE_VIEW_RECEIPT_TTL_SECONDS"),
|
|
16196
16233
|
SendAiSessionCredentialEventValidator: /* @__PURE__ */ __name2(() => SendAiSessionCredentialEventValidator, "SendAiSessionCredentialEventValidator"),
|
|
16197
16234
|
SendBoostInputValidator: /* @__PURE__ */ __name2(() => SendBoostInputValidator, "SendBoostInputValidator"),
|
|
16198
16235
|
SendBoostResponseValidator: /* @__PURE__ */ __name2(() => SendBoostResponseValidator, "SendBoostResponseValidator"),
|
|
16236
|
+
SendBoostTemplateValidator: /* @__PURE__ */ __name2(() => SendBoostTemplateValidator, "SendBoostTemplateValidator"),
|
|
16199
16237
|
SendBrandingOptionsValidator: /* @__PURE__ */ __name2(() => SendBrandingOptionsValidator, "SendBrandingOptionsValidator"),
|
|
16200
16238
|
SendCredentialEventValidator: /* @__PURE__ */ __name2(() => SendCredentialEventValidator, "SendCredentialEventValidator"),
|
|
16201
16239
|
SendInboxResponseValidator: /* @__PURE__ */ __name2(() => SendInboxResponseValidator, "SendInboxResponseValidator"),
|
|
@@ -16206,6 +16244,32 @@ var require_types_cjs_development = __commonJS({
|
|
|
16206
16244
|
SentCredentialInfoValidator: /* @__PURE__ */ __name2(() => SentCredentialInfoValidator, "SentCredentialInfoValidator"),
|
|
16207
16245
|
ServiceValidator: /* @__PURE__ */ __name2(() => ServiceValidator, "ServiceValidator"),
|
|
16208
16246
|
SetPrimaryContactMethodValidator: /* @__PURE__ */ __name2(() => SetPrimaryContactMethodValidator, "SetPrimaryContactMethodValidator"),
|
|
16247
|
+
ShareCiphertextValidator: /* @__PURE__ */ __name2(() => ShareCiphertextValidator, "ShareCiphertextValidator"),
|
|
16248
|
+
ShareContentKeyValidator: /* @__PURE__ */ __name2(() => ShareContentKeyValidator, "ShareContentKeyValidator"),
|
|
16249
|
+
ShareContentStateValidator: /* @__PURE__ */ __name2(() => ShareContentStateValidator, "ShareContentStateValidator"),
|
|
16250
|
+
ShareEndorsementEntryValidator: /* @__PURE__ */ __name2(() => ShareEndorsementEntryValidator, "ShareEndorsementEntryValidator"),
|
|
16251
|
+
ShareEnvelopeValidator: /* @__PURE__ */ __name2(() => ShareEnvelopeValidator, "ShareEnvelopeValidator"),
|
|
16252
|
+
ShareIvValidator: /* @__PURE__ */ __name2(() => ShareIvValidator, "ShareIvValidator"),
|
|
16253
|
+
ShareLinkIdInputValidator: /* @__PURE__ */ __name2(() => ShareLinkIdInputValidator, "ShareLinkIdInputValidator"),
|
|
16254
|
+
ShareLinkIdValidator: /* @__PURE__ */ __name2(() => ShareLinkIdValidator, "ShareLinkIdValidator"),
|
|
16255
|
+
ShareLinkOperationKeyInputValidator: /* @__PURE__ */ __name2(() => ShareLinkOperationKeyInputValidator, "ShareLinkOperationKeyInputValidator"),
|
|
16256
|
+
ShareLinkOwnerCommitOutputValidator: /* @__PURE__ */ __name2(() => ShareLinkOwnerCommitOutputValidator, "ShareLinkOwnerCommitOutputValidator"),
|
|
16257
|
+
ShareLinkOwnerContentOutputValidator: /* @__PURE__ */ __name2(() => ShareLinkOwnerContentOutputValidator, "ShareLinkOwnerContentOutputValidator"),
|
|
16258
|
+
ShareLinkOwnerRecoveryOutputValidator: /* @__PURE__ */ __name2(() => ShareLinkOwnerRecoveryOutputValidator, "ShareLinkOwnerRecoveryOutputValidator"),
|
|
16259
|
+
ShareLinkOwnerStatusOutputValidator: /* @__PURE__ */ __name2(() => ShareLinkOwnerStatusOutputValidator, "ShareLinkOwnerStatusOutputValidator"),
|
|
16260
|
+
ShareLinkPublicContentViewValidator: /* @__PURE__ */ __name2(() => ShareLinkPublicContentViewValidator, "ShareLinkPublicContentViewValidator"),
|
|
16261
|
+
ShareLinkPublicStateValidator: /* @__PURE__ */ __name2(() => ShareLinkPublicStateValidator, "ShareLinkPublicStateValidator"),
|
|
16262
|
+
ShareLinkStatusValidator: /* @__PURE__ */ __name2(() => ShareLinkStatusValidator, "ShareLinkStatusValidator"),
|
|
16263
|
+
ShareLinkValidator: /* @__PURE__ */ __name2(() => ShareLinkValidator, "ShareLinkValidator"),
|
|
16264
|
+
ShareManifestPresentationValidator: /* @__PURE__ */ __name2(() => ShareManifestPresentationValidator, "ShareManifestPresentationValidator"),
|
|
16265
|
+
ShareOwnerRecoveryValidator: /* @__PURE__ */ __name2(() => ShareOwnerRecoveryValidator, "ShareOwnerRecoveryValidator"),
|
|
16266
|
+
SharePayloadValidator: /* @__PURE__ */ __name2(() => SharePayloadValidator, "SharePayloadValidator"),
|
|
16267
|
+
SharePayloadValidatorShape: /* @__PURE__ */ __name2(() => SharePayloadValidatorShape, "SharePayloadValidatorShape"),
|
|
16268
|
+
ShareRecoveryEndorsementValidator: /* @__PURE__ */ __name2(() => ShareRecoveryEndorsementValidator, "ShareRecoveryEndorsementValidator"),
|
|
16269
|
+
ShareRecoveryPlaintextValidator: /* @__PURE__ */ __name2(() => ShareRecoveryPlaintextValidator, "ShareRecoveryPlaintextValidator"),
|
|
16270
|
+
ShareRecoverySelectionValidator: /* @__PURE__ */ __name2(() => ShareRecoverySelectionValidator, "ShareRecoverySelectionValidator"),
|
|
16271
|
+
ShareSelectionEntryValidator: /* @__PURE__ */ __name2(() => ShareSelectionEntryValidator, "ShareSelectionEntryValidator"),
|
|
16272
|
+
ShareSharerValidator: /* @__PURE__ */ __name2(() => ShareSharerValidator, "ShareSharerValidator"),
|
|
16209
16273
|
SkillDeletionStrategyValidator: /* @__PURE__ */ __name2(() => SkillDeletionStrategyValidator, "SkillDeletionStrategyValidator"),
|
|
16210
16274
|
SkillFrameworkAdminInputValidator: /* @__PURE__ */ __name2(() => SkillFrameworkAdminInputValidator, "SkillFrameworkAdminInputValidator"),
|
|
16211
16275
|
SkillFrameworkAdminsValidator: /* @__PURE__ */ __name2(() => SkillFrameworkAdminsValidator, "SkillFrameworkAdminsValidator"),
|
|
@@ -16237,6 +16301,7 @@ var require_types_cjs_development = __commonJS({
|
|
|
16237
16301
|
UnsignedVCValidator: /* @__PURE__ */ __name2(() => UnsignedVCValidator, "UnsignedVCValidator"),
|
|
16238
16302
|
UnsignedVPValidator: /* @__PURE__ */ __name2(() => UnsignedVPValidator, "UnsignedVPValidator"),
|
|
16239
16303
|
UpdateFrameworkInputValidator: /* @__PURE__ */ __name2(() => UpdateFrameworkInputValidator, "UpdateFrameworkInputValidator"),
|
|
16304
|
+
UpdateShareLinkInputValidator: /* @__PURE__ */ __name2(() => UpdateShareLinkInputValidator, "UpdateShareLinkInputValidator"),
|
|
16240
16305
|
UpdateSkillInputValidator: /* @__PURE__ */ __name2(() => UpdateSkillInputValidator, "UpdateSkillInputValidator"),
|
|
16241
16306
|
VC2EvidenceValidator: /* @__PURE__ */ __name2(() => VC2EvidenceValidator, "VC2EvidenceValidator"),
|
|
16242
16307
|
VCValidator: /* @__PURE__ */ __name2(() => VCValidator, "VCValidator"),
|
|
@@ -16248,7 +16313,12 @@ var require_types_cjs_development = __commonJS({
|
|
|
16248
16313
|
VerificationStatusValidator: /* @__PURE__ */ __name2(() => VerificationStatusValidator, "VerificationStatusValidator"),
|
|
16249
16314
|
appStoreActionValidator: /* @__PURE__ */ __name2(() => appStoreActionValidator, "appStoreActionValidator"),
|
|
16250
16315
|
capgoUpdateActionValidator: /* @__PURE__ */ __name2(() => capgoUpdateActionValidator, "capgoUpdateActionValidator"),
|
|
16316
|
+
classifyShareManifest: /* @__PURE__ */ __name2(() => classifyShareManifest, "classifyShareManifest"),
|
|
16317
|
+
decodeBase64Url: /* @__PURE__ */ __name2(() => decodeBase64Url, "decodeBase64Url"),
|
|
16318
|
+
decodedBase64UrlByteLength: /* @__PURE__ */ __name2(() => decodedBase64UrlByteLength, "decodedBase64UrlByteLength"),
|
|
16251
16319
|
dismissActionValidator: /* @__PURE__ */ __name2(() => dismissActionValidator, "dismissActionValidator"),
|
|
16320
|
+
encodeBase64Url: /* @__PURE__ */ __name2(() => encodeBase64Url, "encodeBase64Url"),
|
|
16321
|
+
escrowPinMismatchMessage: /* @__PURE__ */ __name2(() => escrowPinMismatchMessage, "escrowPinMismatchMessage"),
|
|
16252
16322
|
externalLinkActionValidator: /* @__PURE__ */ __name2(() => externalLinkActionValidator, "externalLinkActionValidator"),
|
|
16253
16323
|
inAppMessageActionStyleValidator: /* @__PURE__ */ __name2(() => inAppMessageActionStyleValidator, "inAppMessageActionStyleValidator"),
|
|
16254
16324
|
inAppMessageActionTargetValidator: /* @__PURE__ */ __name2(() => inAppMessageActionTargetValidator, "inAppMessageActionTargetValidator"),
|
|
@@ -16263,10 +16333,12 @@ var require_types_cjs_development = __commonJS({
|
|
|
16263
16333
|
inAppMessageVersionSourceValidator: /* @__PURE__ */ __name2(() => inAppMessageVersionSourceValidator, "inAppMessageVersionSourceValidator"),
|
|
16264
16334
|
inAppMessagesFlagValidator: /* @__PURE__ */ __name2(() => inAppMessagesFlagValidator, "inAppMessagesFlagValidator"),
|
|
16265
16335
|
internalLinkActionValidator: /* @__PURE__ */ __name2(() => internalLinkActionValidator, "internalLinkActionValidator"),
|
|
16336
|
+
isCanonicalBase64Url: /* @__PURE__ */ __name2(() => isCanonicalBase64Url, "isCanonicalBase64Url"),
|
|
16266
16337
|
isStoredCredentialEnvelope: /* @__PURE__ */ __name2(() => isStoredCredentialEnvelope2, "isStoredCredentialEnvelope"),
|
|
16267
16338
|
parseInAppMessagesFlag: /* @__PURE__ */ __name2(() => parseInAppMessagesFlag, "parseInAppMessagesFlag"),
|
|
16268
16339
|
platformPredicateValidator: /* @__PURE__ */ __name2(() => platformPredicateValidator, "platformPredicateValidator"),
|
|
16269
16340
|
rolePredicateValidator: /* @__PURE__ */ __name2(() => rolePredicateValidator, "rolePredicateValidator"),
|
|
16341
|
+
utf8ByteLength: /* @__PURE__ */ __name2(() => utf8ByteLength, "utf8ByteLength"),
|
|
16270
16342
|
versionPredicateValidator: /* @__PURE__ */ __name2(() => versionPredicateValidator, "versionPredicateValidator")
|
|
16271
16343
|
});
|
|
16272
16344
|
module.exports = __toCommonJS(index_exports);
|
|
@@ -16938,7 +17010,7 @@ var require_types_cjs_development = __commonJS({
|
|
|
16938
17010
|
getSizableOrigin: /* @__PURE__ */ __name2(() => getSizableOrigin2, "getSizableOrigin"),
|
|
16939
17011
|
hexToUint8Array: /* @__PURE__ */ __name2(() => hexToUint8Array2, "hexToUint8Array"),
|
|
16940
17012
|
isObject: /* @__PURE__ */ __name2(() => isObject3, "isObject"),
|
|
16941
|
-
isPlainObject: /* @__PURE__ */ __name2(() =>
|
|
17013
|
+
isPlainObject: /* @__PURE__ */ __name2(() => isPlainObject22, "isPlainObject"),
|
|
16942
17014
|
issue: /* @__PURE__ */ __name2(() => issue2, "issue"),
|
|
16943
17015
|
joinValues: /* @__PURE__ */ __name2(() => joinValues2, "joinValues"),
|
|
16944
17016
|
jsonStringifyReplacer: /* @__PURE__ */ __name2(() => jsonStringifyReplacer2, "jsonStringifyReplacer"),
|
|
@@ -17187,7 +17259,7 @@ var require_types_cjs_development = __commonJS({
|
|
|
17187
17259
|
return false;
|
|
17188
17260
|
}
|
|
17189
17261
|
});
|
|
17190
|
-
function
|
|
17262
|
+
function isPlainObject22(o) {
|
|
17191
17263
|
if (isObject3(o) === false)
|
|
17192
17264
|
return false;
|
|
17193
17265
|
const ctor = o.constructor;
|
|
@@ -17203,11 +17275,11 @@ var require_types_cjs_development = __commonJS({
|
|
|
17203
17275
|
}
|
|
17204
17276
|
return true;
|
|
17205
17277
|
}
|
|
17206
|
-
__name(
|
|
17207
|
-
__name2(
|
|
17208
|
-
__name22(
|
|
17278
|
+
__name(isPlainObject22, "isPlainObject2");
|
|
17279
|
+
__name2(isPlainObject22, "isPlainObject");
|
|
17280
|
+
__name22(isPlainObject22, "isPlainObject");
|
|
17209
17281
|
function shallowClone2(o) {
|
|
17210
|
-
if (
|
|
17282
|
+
if (isPlainObject22(o))
|
|
17211
17283
|
return { ...o };
|
|
17212
17284
|
if (Array.isArray(o))
|
|
17213
17285
|
return [...o];
|
|
@@ -17441,7 +17513,7 @@ var require_types_cjs_development = __commonJS({
|
|
|
17441
17513
|
__name2(omit2, "omit");
|
|
17442
17514
|
__name22(omit2, "omit");
|
|
17443
17515
|
function extend2(schema, shape) {
|
|
17444
|
-
if (!
|
|
17516
|
+
if (!isPlainObject22(shape)) {
|
|
17445
17517
|
throw new Error("Invalid input to extend: expected a plain object");
|
|
17446
17518
|
}
|
|
17447
17519
|
const checks = schema._zod.def.checks;
|
|
@@ -17467,7 +17539,7 @@ var require_types_cjs_development = __commonJS({
|
|
|
17467
17539
|
__name2(extend2, "extend");
|
|
17468
17540
|
__name22(extend2, "extend");
|
|
17469
17541
|
function safeExtend2(schema, shape) {
|
|
17470
|
-
if (!
|
|
17542
|
+
if (!isPlainObject22(shape)) {
|
|
17471
17543
|
throw new Error("Invalid input to safeExtend: expected a plain object");
|
|
17472
17544
|
}
|
|
17473
17545
|
const def = mergeDefs2(schema._zod.def, {
|
|
@@ -19941,7 +20013,7 @@ var require_types_cjs_development = __commonJS({
|
|
|
19941
20013
|
if (a instanceof Date && b instanceof Date && +a === +b) {
|
|
19942
20014
|
return { valid: true, data: a };
|
|
19943
20015
|
}
|
|
19944
|
-
if (
|
|
20016
|
+
if (isPlainObject22(a) && isPlainObject22(b)) {
|
|
19945
20017
|
const bKeys = Object.keys(b);
|
|
19946
20018
|
const sharedKeys = Object.keys(a).filter((key) => bKeys.indexOf(key) !== -1);
|
|
19947
20019
|
const newObj = { ...a, ...b };
|
|
@@ -20142,7 +20214,7 @@ var require_types_cjs_development = __commonJS({
|
|
|
20142
20214
|
$ZodType2.init(inst, def);
|
|
20143
20215
|
inst._zod.parse = (payload, ctx) => {
|
|
20144
20216
|
const input = payload.value;
|
|
20145
|
-
if (!
|
|
20217
|
+
if (!isPlainObject22(input)) {
|
|
20146
20218
|
payload.issues.push({
|
|
20147
20219
|
expected: "record",
|
|
20148
20220
|
code: "invalid_type",
|
|
@@ -32572,6 +32644,204 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
32572
32644
|
$or: BaseStringQuery.array()
|
|
32573
32645
|
})
|
|
32574
32646
|
]);
|
|
32647
|
+
var LearnCardRefreshAuthorizationValidator = external_exports2.object({ type: external_exports2.literal("LearnCardDIDAuth") }).catchall(external_exports2.any());
|
|
32648
|
+
var ManagedCredentialRefreshServiceValidator2 = external_exports2.object({
|
|
32649
|
+
id: external_exports2.string().min(1),
|
|
32650
|
+
type: external_exports2.literal("LearnCardCredentialRefresh2026"),
|
|
32651
|
+
authorization: LearnCardRefreshAuthorizationValidator.optional()
|
|
32652
|
+
}).catchall(external_exports2.any());
|
|
32653
|
+
var StandardCredentialRefreshServiceValidator = external_exports2.object({
|
|
32654
|
+
id: external_exports2.string().min(1),
|
|
32655
|
+
type: external_exports2.literal("1EdTechCredentialRefresh")
|
|
32656
|
+
}).catchall(external_exports2.any());
|
|
32657
|
+
var SupportedCredentialRefreshServiceValidator2 = external_exports2.union([
|
|
32658
|
+
ManagedCredentialRefreshServiceValidator2,
|
|
32659
|
+
StandardCredentialRefreshServiceValidator
|
|
32660
|
+
]);
|
|
32661
|
+
var AllocateCredentialRefreshInputValidator = external_exports2.object({
|
|
32662
|
+
holder: external_exports2.object({
|
|
32663
|
+
profileId: external_exports2.string().optional(),
|
|
32664
|
+
did: external_exports2.string().min(1)
|
|
32665
|
+
}),
|
|
32666
|
+
credentialId: external_exports2.string().min(1)
|
|
32667
|
+
});
|
|
32668
|
+
var AllocateCredentialRefreshResultValidator = external_exports2.object({
|
|
32669
|
+
refreshId: external_exports2.string().min(1),
|
|
32670
|
+
refreshService: ManagedCredentialRefreshServiceValidator2.extend({
|
|
32671
|
+
authorization: LearnCardRefreshAuthorizationValidator
|
|
32672
|
+
})
|
|
32673
|
+
});
|
|
32674
|
+
var ManagedCredentialRefreshReceiptValidator = external_exports2.object({
|
|
32675
|
+
refreshId: external_exports2.string().min(1),
|
|
32676
|
+
refreshService: ManagedCredentialRefreshServiceValidator2,
|
|
32677
|
+
credentialId: external_exports2.string().min(1),
|
|
32678
|
+
issuerDid: external_exports2.string().min(1),
|
|
32679
|
+
holderDid: external_exports2.string().min(1),
|
|
32680
|
+
credentialStatus: CredentialStatusValidator.or(
|
|
32681
|
+
CredentialStatusValidator.array()
|
|
32682
|
+
).optional()
|
|
32683
|
+
}).strip();
|
|
32684
|
+
var InboxCredentialRefreshReceiptValidator = ManagedCredentialRefreshReceiptValidator.omit(
|
|
32685
|
+
{ holderDid: true }
|
|
32686
|
+
).extend({ holderDid: external_exports2.string().min(1).optional() });
|
|
32687
|
+
var CredentialRefreshSigningModeValidator = external_exports2.enum(["issuer-signed", "signing-authority"]);
|
|
32688
|
+
var PublishCredentialRefreshBaseFields = {
|
|
32689
|
+
refreshId: external_exports2.string().min(1),
|
|
32690
|
+
notifyHolder: external_exports2.boolean().optional(),
|
|
32691
|
+
updateSummary: external_exports2.string().optional(),
|
|
32692
|
+
idempotencyKey: external_exports2.string().optional()
|
|
32693
|
+
};
|
|
32694
|
+
var PublishIssuerSignedRefreshValidator = external_exports2.object({
|
|
32695
|
+
...PublishCredentialRefreshBaseFields,
|
|
32696
|
+
mode: external_exports2.literal("issuer-signed"),
|
|
32697
|
+
signedCredential: VCValidator
|
|
32698
|
+
});
|
|
32699
|
+
var PublishSigningAuthorityRefreshValidator = external_exports2.object({
|
|
32700
|
+
...PublishCredentialRefreshBaseFields,
|
|
32701
|
+
mode: external_exports2.literal("signing-authority"),
|
|
32702
|
+
credential: UnsignedVCValidator,
|
|
32703
|
+
signingAuthority: external_exports2.object({
|
|
32704
|
+
type: external_exports2.string().min(1)
|
|
32705
|
+
}).catchall(external_exports2.any())
|
|
32706
|
+
});
|
|
32707
|
+
var PublishCredentialRefreshInputValidator = external_exports2.object({
|
|
32708
|
+
...PublishCredentialRefreshBaseFields,
|
|
32709
|
+
mode: CredentialRefreshSigningModeValidator,
|
|
32710
|
+
signedCredential: VCValidator.optional(),
|
|
32711
|
+
credential: UnsignedVCValidator.optional(),
|
|
32712
|
+
signingAuthority: external_exports2.object({
|
|
32713
|
+
type: external_exports2.string().min(1)
|
|
32714
|
+
}).catchall(external_exports2.any()).optional()
|
|
32715
|
+
}).superRefine((input, ctx) => {
|
|
32716
|
+
if (input.mode === "issuer-signed" && !input.signedCredential) {
|
|
32717
|
+
ctx.addIssue({
|
|
32718
|
+
code: "custom",
|
|
32719
|
+
path: ["signedCredential"],
|
|
32720
|
+
message: "signedCredential is required for issuer-signed publication"
|
|
32721
|
+
});
|
|
32722
|
+
}
|
|
32723
|
+
if (input.mode === "issuer-signed" && (input.credential !== void 0 || input.signingAuthority !== void 0)) {
|
|
32724
|
+
ctx.addIssue({
|
|
32725
|
+
code: "custom",
|
|
32726
|
+
path: ["mode"],
|
|
32727
|
+
message: "issuer-signed publication cannot include signing-authority fields"
|
|
32728
|
+
});
|
|
32729
|
+
}
|
|
32730
|
+
if (input.mode === "signing-authority") {
|
|
32731
|
+
if (input.signedCredential !== void 0) {
|
|
32732
|
+
ctx.addIssue({
|
|
32733
|
+
code: "custom",
|
|
32734
|
+
path: ["signedCredential"],
|
|
32735
|
+
message: "signing-authority publication cannot include signedCredential"
|
|
32736
|
+
});
|
|
32737
|
+
}
|
|
32738
|
+
if (!input.credential) {
|
|
32739
|
+
ctx.addIssue({
|
|
32740
|
+
code: "custom",
|
|
32741
|
+
path: ["credential"],
|
|
32742
|
+
message: "credential is required for signing-authority publication"
|
|
32743
|
+
});
|
|
32744
|
+
}
|
|
32745
|
+
if (!input.signingAuthority) {
|
|
32746
|
+
ctx.addIssue({
|
|
32747
|
+
code: "custom",
|
|
32748
|
+
path: ["signingAuthority"],
|
|
32749
|
+
message: "signingAuthority is required for signing-authority publication"
|
|
32750
|
+
});
|
|
32751
|
+
}
|
|
32752
|
+
}
|
|
32753
|
+
});
|
|
32754
|
+
var PublishCredentialRefreshNotificationValidator = external_exports2.enum([
|
|
32755
|
+
"queued",
|
|
32756
|
+
"suppressed",
|
|
32757
|
+
"not-applicable",
|
|
32758
|
+
/** Publication succeeded, but the post-commit notification enqueue must be retried. */
|
|
32759
|
+
"delivery-failed"
|
|
32760
|
+
]);
|
|
32761
|
+
var PublishCredentialRefreshResultValidator = external_exports2.object({
|
|
32762
|
+
refreshId: external_exports2.string().min(1),
|
|
32763
|
+
version: external_exports2.number().int().positive(),
|
|
32764
|
+
publishedAt: external_exports2.string().min(1),
|
|
32765
|
+
notification: PublishCredentialRefreshNotificationValidator
|
|
32766
|
+
});
|
|
32767
|
+
var CredentialRefreshVersionMetadataValidator = external_exports2.object({
|
|
32768
|
+
version: external_exports2.number().int().positive(),
|
|
32769
|
+
publishedAt: external_exports2.string().min(1),
|
|
32770
|
+
effectiveAt: external_exports2.string().optional(),
|
|
32771
|
+
etag: external_exports2.string().optional(),
|
|
32772
|
+
signingMode: CredentialRefreshSigningModeValidator.optional(),
|
|
32773
|
+
updateSummary: external_exports2.string().optional()
|
|
32774
|
+
});
|
|
32775
|
+
var GetCredentialRefreshHistoryInputValidator = external_exports2.object({
|
|
32776
|
+
refreshId: external_exports2.string().min(1),
|
|
32777
|
+
cursor: external_exports2.string().optional(),
|
|
32778
|
+
limit: external_exports2.number().int().positive().optional()
|
|
32779
|
+
});
|
|
32780
|
+
var GetCredentialRefreshHistoryResultValidator = external_exports2.object({
|
|
32781
|
+
records: CredentialRefreshVersionMetadataValidator.array(),
|
|
32782
|
+
hasMore: external_exports2.boolean(),
|
|
32783
|
+
cursor: external_exports2.string().optional()
|
|
32784
|
+
});
|
|
32785
|
+
var CredentialRefreshChallengeValidator = external_exports2.object({
|
|
32786
|
+
challenge: external_exports2.string().min(1),
|
|
32787
|
+
expiresAt: external_exports2.string().min(1),
|
|
32788
|
+
domain: external_exports2.string().optional(),
|
|
32789
|
+
scheme: external_exports2.literal("LearnCardDIDAuth").optional()
|
|
32790
|
+
});
|
|
32791
|
+
var PublicCredentialRefreshEnvelopeValidator = external_exports2.object({
|
|
32792
|
+
format: external_exports2.literal("vc"),
|
|
32793
|
+
credential: VCValidator,
|
|
32794
|
+
etag: external_exports2.string().optional()
|
|
32795
|
+
});
|
|
32796
|
+
var JweCredentialRefreshEnvelopeValidator = external_exports2.object({
|
|
32797
|
+
format: external_exports2.literal("jwe"),
|
|
32798
|
+
jwe: JWEValidator2,
|
|
32799
|
+
etag: external_exports2.string().optional(),
|
|
32800
|
+
/** Present on LearnCard-managed endpoints; optional for interoperable JWE services. */
|
|
32801
|
+
version: external_exports2.number().int().positive().optional()
|
|
32802
|
+
});
|
|
32803
|
+
var CredentialRefreshResponseEnvelopeValidator = external_exports2.discriminatedUnion("format", [
|
|
32804
|
+
PublicCredentialRefreshEnvelopeValidator,
|
|
32805
|
+
JweCredentialRefreshEnvelopeValidator
|
|
32806
|
+
]);
|
|
32807
|
+
var CredentialRefreshFailureCodeValidator = external_exports2.enum([
|
|
32808
|
+
"UNAVAILABLE",
|
|
32809
|
+
"TIMEOUT",
|
|
32810
|
+
"UNSUPPORTED_SERVICE",
|
|
32811
|
+
"UNAUTHORIZED",
|
|
32812
|
+
"MALFORMED_RESPONSE",
|
|
32813
|
+
"INVALID_PROOF",
|
|
32814
|
+
"ISSUER_MISMATCH",
|
|
32815
|
+
"ID_MISMATCH",
|
|
32816
|
+
"ROLLBACK",
|
|
32817
|
+
"REVOKED",
|
|
32818
|
+
"UNSAFE_ENDPOINT"
|
|
32819
|
+
]);
|
|
32820
|
+
var CredentialRefreshUpdatedResultValidator = external_exports2.object({
|
|
32821
|
+
status: external_exports2.literal("updated"),
|
|
32822
|
+
credential: VCValidator,
|
|
32823
|
+
etag: external_exports2.string().optional(),
|
|
32824
|
+
managedVersion: external_exports2.number().int().positive().optional()
|
|
32825
|
+
});
|
|
32826
|
+
var CredentialRefreshUnchangedResultValidator = external_exports2.object({
|
|
32827
|
+
status: external_exports2.literal("unchanged"),
|
|
32828
|
+
checkedAt: external_exports2.string().min(1),
|
|
32829
|
+
etag: external_exports2.string().optional()
|
|
32830
|
+
});
|
|
32831
|
+
var CredentialRefreshUnsupportedResultValidator = external_exports2.object({
|
|
32832
|
+
status: external_exports2.literal("unsupported")
|
|
32833
|
+
});
|
|
32834
|
+
var CredentialRefreshFailedResultValidator = external_exports2.object({
|
|
32835
|
+
status: external_exports2.literal("failed"),
|
|
32836
|
+
code: CredentialRefreshFailureCodeValidator,
|
|
32837
|
+
retryable: external_exports2.boolean()
|
|
32838
|
+
});
|
|
32839
|
+
var CredentialRefreshResultValidator = external_exports2.discriminatedUnion("status", [
|
|
32840
|
+
CredentialRefreshUpdatedResultValidator,
|
|
32841
|
+
CredentialRefreshUnchangedResultValidator,
|
|
32842
|
+
CredentialRefreshUnsupportedResultValidator,
|
|
32843
|
+
CredentialRefreshFailedResultValidator
|
|
32844
|
+
]);
|
|
32575
32845
|
var LCNProfileDisplayValidator = external_exports2.object({
|
|
32576
32846
|
backgroundColor: external_exports2.string().optional(),
|
|
32577
32847
|
backgroundImage: external_exports2.string().optional(),
|
|
@@ -32907,7 +33177,13 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
32907
33177
|
"Options for email/phone recipients (Universal Inbox)"
|
|
32908
33178
|
),
|
|
32909
33179
|
templateData: external_exports2.record(external_exports2.string(), external_exports2.unknown()).optional(),
|
|
32910
|
-
integrationId: external_exports2.string().optional().describe("Integration ID for activity tracking")
|
|
33180
|
+
integrationId: external_exports2.string().optional().describe("Integration ID for activity tracking"),
|
|
33181
|
+
refresh: external_exports2.boolean().optional().describe(
|
|
33182
|
+
"Request managed credential refresh for this send. Profile/DID recipients use immediate issuance; email/phone recipients use deferred Universal Inbox signing and bind the holder at claim."
|
|
33183
|
+
),
|
|
33184
|
+
idempotencyKey: external_exports2.string().min(1).max(200).optional().describe(
|
|
33185
|
+
"Caller-chosen key that makes a managed refresh send (refresh: true) safe to retry as a whole: retries with the same key reuse the same boost, refresh allocation and result. Reusing a key for a different request is rejected. With signedCredential, requires prior tRPC prepareRefreshableSend; direct REST callers omit the key and retry the exact signed credential and templateUri."
|
|
33186
|
+
)
|
|
32911
33187
|
}).refine((data) => data.templateUri || data.template || data.signedCredential, {
|
|
32912
33188
|
message: "Either templateUri, template, or signedCredential must be provided.",
|
|
32913
33189
|
path: ["templateUri"]
|
|
@@ -32922,8 +33198,12 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
32922
33198
|
message: "guardianEmail must differ from recipient (self-approval not allowed)",
|
|
32923
33199
|
path: ["options", "guardianEmail"]
|
|
32924
33200
|
}
|
|
32925
|
-
)
|
|
33201
|
+
).refine((data) => !data.idempotencyKey || data.refresh === true, {
|
|
33202
|
+
message: "idempotencyKey is only supported with refresh: true.",
|
|
33203
|
+
path: ["idempotencyKey"]
|
|
33204
|
+
});
|
|
32926
33205
|
var SendInboxResponseValidator = external_exports2.object({
|
|
33206
|
+
refresh: InboxCredentialRefreshReceiptValidator.optional(),
|
|
32927
33207
|
issuanceId: external_exports2.string(),
|
|
32928
33208
|
status: external_exports2.enum(["PENDING", "ISSUED", "EXPIRED", "DELIVERED", "CLAIMED"]),
|
|
32929
33209
|
claimUrl: external_exports2.string().url().optional().describe("Present when suppressDelivery=true"),
|
|
@@ -32938,8 +33218,34 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
32938
33218
|
activityId: external_exports2.string().describe("Links to the activity lifecycle for this issuance"),
|
|
32939
33219
|
inbox: SendInboxResponseValidator.optional().describe(
|
|
32940
33220
|
"Present when sent via email/phone (Universal Inbox)"
|
|
33221
|
+
),
|
|
33222
|
+
refresh: ManagedCredentialRefreshReceiptValidator.optional().describe(
|
|
33223
|
+
"Present when managed refresh was requested: issuance metadata the issuer keeps to publish future updates"
|
|
32941
33224
|
)
|
|
32942
33225
|
});
|
|
33226
|
+
var PrepareRefreshableSendInputValidator = external_exports2.object({
|
|
33227
|
+
recipient: external_exports2.string(),
|
|
33228
|
+
templateUri: external_exports2.string().optional(),
|
|
33229
|
+
template: SendBoostTemplateValidator.optional(),
|
|
33230
|
+
contractUri: external_exports2.string().optional(),
|
|
33231
|
+
templateData: external_exports2.record(external_exports2.string(), external_exports2.unknown()).optional(),
|
|
33232
|
+
integrationId: external_exports2.string().optional(),
|
|
33233
|
+
/** Credential ID to allocate for; generated server-side when omitted. */
|
|
33234
|
+
credentialId: external_exports2.string().min(1).optional(),
|
|
33235
|
+
idempotencyKey: external_exports2.string().min(1).max(200).optional()
|
|
33236
|
+
}).refine((data) => Boolean(data.templateUri) !== Boolean(data.template), {
|
|
33237
|
+
message: "Provide exactly one of templateUri or template."
|
|
33238
|
+
});
|
|
33239
|
+
var PrepareRefreshableSendResultValidator = external_exports2.object({
|
|
33240
|
+
boostUri: external_exports2.string(),
|
|
33241
|
+
credentialId: external_exports2.string(),
|
|
33242
|
+
refreshId: external_exports2.string(),
|
|
33243
|
+
refreshService: ManagedCredentialRefreshServiceValidator2,
|
|
33244
|
+
/** The DID to use as credentialSubject.id (recipient DID, or the profile's did:web). */
|
|
33245
|
+
holderDid: external_exports2.string(),
|
|
33246
|
+
/** Present when this idempotencyKey already completed: return it without signing. */
|
|
33247
|
+
completed: SendBoostResponseValidator.optional()
|
|
33248
|
+
});
|
|
32943
33249
|
var SendInputValidator = external_exports2.discriminatedUnion("type", [SendBoostInputValidator]);
|
|
32944
33250
|
var SendResponseValidator = external_exports2.discriminatedUnion("type", [SendBoostResponseValidator]);
|
|
32945
33251
|
var ConsentFlowTermsStatusValidator = external_exports2.enum(["live", "stale", "withdrawn"]);
|
|
@@ -33258,6 +33564,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
33258
33564
|
webhookUrl: external_exports2.string().optional()
|
|
33259
33565
|
});
|
|
33260
33566
|
var AUTH_GRANT_AUDIENCE_DOMAIN_PREFIX = "auth-grant:";
|
|
33567
|
+
var ACT_AS_HEADER = "X-LearnCard-Act-As";
|
|
33261
33568
|
var AuthGrantValidator = external_exports2.object({
|
|
33262
33569
|
id: external_exports2.string(),
|
|
33263
33570
|
name: external_exports2.string(),
|
|
@@ -33270,6 +33577,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
33270
33577
|
}, "error")
|
|
33271
33578
|
}),
|
|
33272
33579
|
scope: external_exports2.string(),
|
|
33580
|
+
actAs: external_exports2.string().optional(),
|
|
33273
33581
|
createdAt: external_exports2.iso.datetime({ error: "createdAt must be a valid ISO 8601 datetime string" }),
|
|
33274
33582
|
expiresAt: external_exports2.iso.datetime({ error: "expiresAt must be a valid ISO 8601 datetime string" }).nullish().optional()
|
|
33275
33583
|
});
|
|
@@ -33341,6 +33649,8 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
33341
33649
|
sessionJwt: external_exports2.string()
|
|
33342
33650
|
});
|
|
33343
33651
|
var InboxCredentialValidator = external_exports2.object({
|
|
33652
|
+
refresh: InboxCredentialRefreshReceiptValidator.optional(),
|
|
33653
|
+
refreshId: external_exports2.string().optional(),
|
|
33344
33654
|
id: external_exports2.string(),
|
|
33345
33655
|
credential: external_exports2.string().optional(),
|
|
33346
33656
|
isSigned: external_exports2.boolean(),
|
|
@@ -33395,12 +33705,19 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
33395
33705
|
templateUri: external_exports2.string().optional().describe(
|
|
33396
33706
|
"URI of a boost template to use for issuance. The boost credential will be resolved and used. Mutually exclusive with credential field."
|
|
33397
33707
|
),
|
|
33708
|
+
refresh: external_exports2.boolean().optional().describe(
|
|
33709
|
+
"Allocate managed refresh before signing. Requires unsigned content and a registered signing authority; binds the holder on claim."
|
|
33710
|
+
),
|
|
33711
|
+
idempotencyKey: external_exports2.string().min(1).max(200).optional(),
|
|
33398
33712
|
// === OPTIONAL FEATURES ===
|
|
33399
33713
|
// Add major, distinct features at the top level.
|
|
33400
33714
|
//consentRequest: ConsentRequestValidator.optional(),
|
|
33401
33715
|
// === PROCESS CONFIGURATION (Optional) ===
|
|
33402
33716
|
// HOW should this issuance be handled?
|
|
33403
33717
|
configuration: external_exports2.object({
|
|
33718
|
+
guardianEmail: external_exports2.string().email().optional().describe(
|
|
33719
|
+
"Require approval from this guardian before the recipient can claim. Must differ from the recipient email."
|
|
33720
|
+
),
|
|
33404
33721
|
signingAuthority: IssueInboxSigningAuthorityValidator.optional().describe(
|
|
33405
33722
|
"The signing authority to use for the credential. If not provided, the users default signing authority will be used if the credential is not signed."
|
|
33406
33723
|
),
|
|
@@ -33454,17 +33771,130 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
33454
33771
|
}).optional().describe(
|
|
33455
33772
|
"Configuration for the credential issuance. If not provided, the default configuration will be used."
|
|
33456
33773
|
)
|
|
33774
|
+
}).refine((data) => !data.idempotencyKey || data.refresh === true, {
|
|
33775
|
+
message: "idempotencyKey requires refresh: true."
|
|
33457
33776
|
}).refine((data) => data.credential || data.templateUri, {
|
|
33458
33777
|
message: "Either credential or templateUri must be provided.",
|
|
33459
33778
|
path: ["credential"]
|
|
33460
|
-
})
|
|
33779
|
+
}).refine(
|
|
33780
|
+
(data) => !data.configuration?.guardianEmail || data.recipient.type !== "email" || data.configuration.guardianEmail.toLowerCase() !== data.recipient.value.toLowerCase(),
|
|
33781
|
+
{
|
|
33782
|
+
message: "guardianEmail must differ from recipient (self-approval not allowed)",
|
|
33783
|
+
path: ["configuration", "guardianEmail"]
|
|
33784
|
+
}
|
|
33785
|
+
);
|
|
33461
33786
|
var IssueInboxCredentialResponseValidator = external_exports2.object({
|
|
33787
|
+
refresh: InboxCredentialRefreshReceiptValidator.optional(),
|
|
33462
33788
|
issuanceId: external_exports2.string(),
|
|
33463
33789
|
status: LCNInboxStatusEnumValidator,
|
|
33464
33790
|
recipient: ContactMethodQueryValidator,
|
|
33465
33791
|
claimUrl: external_exports2.string().url().optional(),
|
|
33466
33792
|
recipientDid: external_exports2.string().optional()
|
|
33467
33793
|
});
|
|
33794
|
+
var InboxBatchConfigurationValidator = IssueInboxCredentialValidator.shape.configuration.unwrap().extend({
|
|
33795
|
+
refresh: IssueInboxCredentialValidator.shape.refresh.describe(
|
|
33796
|
+
"Enable managed refresh by default. An item configuration.refresh overrides this value, including false."
|
|
33797
|
+
),
|
|
33798
|
+
delivery: IssueInboxCredentialValidator.shape.configuration.unwrap().shape.delivery.unwrap().extend({ suppress: external_exports2.boolean().optional() }).optional()
|
|
33799
|
+
});
|
|
33800
|
+
var InboxBatchItemConfigurationValidator = InboxBatchConfigurationValidator.extend({
|
|
33801
|
+
guardianEmail: InboxBatchConfigurationValidator.shape.guardianEmail.nullable().describe(
|
|
33802
|
+
"Require guardian approval, or set null to clear a batch-level guardianEmail for this item."
|
|
33803
|
+
)
|
|
33804
|
+
});
|
|
33805
|
+
var IssueInboxCredentialBatchItemValidator = external_exports2.object({
|
|
33806
|
+
...IssueInboxCredentialValidator.shape,
|
|
33807
|
+
configuration: InboxBatchItemConfigurationValidator.optional(),
|
|
33808
|
+
idempotencyKey: external_exports2.string().max(256).optional()
|
|
33809
|
+
}).refine((data) => data.credential || data.templateUri, {
|
|
33810
|
+
message: "Either credential or templateUri must be provided.",
|
|
33811
|
+
path: ["credential"]
|
|
33812
|
+
}).describe(
|
|
33813
|
+
"One issuance: provide credential or templateUri. Invalid input is rejected at submission with its item index."
|
|
33814
|
+
);
|
|
33815
|
+
var IssueInboxCredentialBatchValidator = external_exports2.object({
|
|
33816
|
+
requestId: external_exports2.string().min(1).max(256).optional(),
|
|
33817
|
+
items: external_exports2.array(IssueInboxCredentialBatchItemValidator).min(1).max(100),
|
|
33818
|
+
configuration: InboxBatchConfigurationValidator.optional()
|
|
33819
|
+
}).superRefine((batch, ctx) => {
|
|
33820
|
+
batch.items.forEach((item, index) => {
|
|
33821
|
+
const itemGuardian = item.configuration?.guardianEmail;
|
|
33822
|
+
const guardian = itemGuardian === null ? void 0 : itemGuardian ?? batch.configuration?.guardianEmail;
|
|
33823
|
+
if (guardian && item.recipient.type === "email" && guardian.toLowerCase() === item.recipient.value.toLowerCase()) {
|
|
33824
|
+
ctx.addIssue({
|
|
33825
|
+
code: "custom",
|
|
33826
|
+
path: ["items", index, "configuration", "guardianEmail"],
|
|
33827
|
+
message: "guardianEmail must differ from recipient (self-approval not allowed)"
|
|
33828
|
+
});
|
|
33829
|
+
}
|
|
33830
|
+
});
|
|
33831
|
+
});
|
|
33832
|
+
var InboxBatchErrorReasonValidator = external_exports2.enum([
|
|
33833
|
+
"DUPLICATE_KEY",
|
|
33834
|
+
"IDEMPOTENCY_MISMATCH",
|
|
33835
|
+
"IN_PROGRESS",
|
|
33836
|
+
"UNCONFIRMED"
|
|
33837
|
+
]);
|
|
33838
|
+
var IssueInboxCredentialBatchItemResultValidator = external_exports2.discriminatedUnion("success", [
|
|
33839
|
+
IssueInboxCredentialResponseValidator.extend({
|
|
33840
|
+
success: external_exports2.literal(true),
|
|
33841
|
+
index: external_exports2.number().int().nonnegative(),
|
|
33842
|
+
deduplicated: external_exports2.boolean().optional(),
|
|
33843
|
+
guardianStatus: GuardianStatusValidator.optional(),
|
|
33844
|
+
idempotencyKey: external_exports2.string().optional()
|
|
33845
|
+
}),
|
|
33846
|
+
external_exports2.object({
|
|
33847
|
+
success: external_exports2.literal(false),
|
|
33848
|
+
index: external_exports2.number().int().nonnegative(),
|
|
33849
|
+
idempotencyKey: external_exports2.string().optional(),
|
|
33850
|
+
recipient: ContactMethodQueryValidator.optional(),
|
|
33851
|
+
error: external_exports2.object({
|
|
33852
|
+
code: external_exports2.string(),
|
|
33853
|
+
message: external_exports2.string(),
|
|
33854
|
+
reason: InboxBatchErrorReasonValidator.optional()
|
|
33855
|
+
}),
|
|
33856
|
+
issuanceId: external_exports2.string().optional().describe(
|
|
33857
|
+
"Present when issuance completed but replay storage could not be confirmed. Reconcile this issuance; do not issue again with a new key."
|
|
33858
|
+
),
|
|
33859
|
+
claimUrl: external_exports2.string().url().optional().describe(
|
|
33860
|
+
"Claim URL of the completed issuance, if available, when replay storage could not be confirmed."
|
|
33861
|
+
)
|
|
33862
|
+
})
|
|
33863
|
+
]);
|
|
33864
|
+
var IssueInboxCredentialBatchResponseValidator = external_exports2.object({
|
|
33865
|
+
results: external_exports2.array(IssueInboxCredentialBatchItemResultValidator),
|
|
33866
|
+
summary: external_exports2.object({
|
|
33867
|
+
total: external_exports2.number(),
|
|
33868
|
+
succeeded: external_exports2.number(),
|
|
33869
|
+
failed: external_exports2.number(),
|
|
33870
|
+
deduplicated: external_exports2.number()
|
|
33871
|
+
})
|
|
33872
|
+
});
|
|
33873
|
+
var InboxBatchReceiptValidator = external_exports2.object({
|
|
33874
|
+
batchId: external_exports2.string(),
|
|
33875
|
+
status: external_exports2.enum(["QUEUED", "PROCESSING", "COMPLETED", "NEEDS_RECONCILIATION"]),
|
|
33876
|
+
createdAt: external_exports2.string()
|
|
33877
|
+
});
|
|
33878
|
+
var InboxBatchStatusValidator = external_exports2.object({
|
|
33879
|
+
batchId: external_exports2.string(),
|
|
33880
|
+
createdAt: external_exports2.string(),
|
|
33881
|
+
done: external_exports2.boolean().describe(
|
|
33882
|
+
"True when no queued or processing items remain, including unconfirmed outcomes."
|
|
33883
|
+
),
|
|
33884
|
+
status: external_exports2.enum(["QUEUED", "PROCESSING", "COMPLETED", "NEEDS_RECONCILIATION"]),
|
|
33885
|
+
items: external_exports2.array(
|
|
33886
|
+
external_exports2.object({
|
|
33887
|
+
index: external_exports2.number().int().nonnegative(),
|
|
33888
|
+
state: external_exports2.enum(["QUEUED", "PROCESSING", "COMPLETED", "NEEDS_RECONCILIATION"]),
|
|
33889
|
+
result: IssueInboxCredentialBatchItemResultValidator.optional()
|
|
33890
|
+
})
|
|
33891
|
+
),
|
|
33892
|
+
summary: IssueInboxCredentialBatchResponseValidator.shape.summary.extend({
|
|
33893
|
+
completed: external_exports2.number(),
|
|
33894
|
+
pending: external_exports2.number(),
|
|
33895
|
+
unconfirmed: external_exports2.number()
|
|
33896
|
+
})
|
|
33897
|
+
});
|
|
33468
33898
|
var CredentialNameRefValidator = external_exports2.object({ name: external_exports2.string() }).passthrough();
|
|
33469
33899
|
var ClaimInboxCredentialValidator = external_exports2.object({
|
|
33470
33900
|
credential: VCValidator.or(VPValidator).or(UnsignedVCValidator).or(CredentialNameRefValidator).describe("The credential to issue, or a { name } reference to resolve a boost template."),
|
|
@@ -33950,6 +34380,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
33950
34380
|
eventType: CredentialActivityEventTypeValidator,
|
|
33951
34381
|
timestamp: external_exports2.string(),
|
|
33952
34382
|
actorProfileId: external_exports2.string().optional(),
|
|
34383
|
+
onBehalfOf: external_exports2.string().optional(),
|
|
33953
34384
|
recipientType: CredentialActivityRecipientTypeValidator,
|
|
33954
34385
|
recipientIdentifier: external_exports2.string(),
|
|
33955
34386
|
boostUri: external_exports2.string().optional(),
|
|
@@ -33999,6 +34430,16 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
33999
34430
|
__name22(this, "AuthSessionError");
|
|
34000
34431
|
}
|
|
34001
34432
|
};
|
|
34433
|
+
var ESCROW_PIN_LOCKED_MESSAGE = "Too many incorrect PIN attempts. You can still recover by waiting.";
|
|
34434
|
+
var ESCROW_PIN_UNAVAILABLE_MESSAGE = "PIN recovery is not available for this account.";
|
|
34435
|
+
var ESCROW_PIN_MISMATCH_PATTERN = /^Incorrect PIN\. (\d+) attempts left\.$/;
|
|
34436
|
+
var escrowPinMismatchMessage = /* @__PURE__ */ __name22((attemptsRemaining) => `Incorrect PIN. ${attemptsRemaining} attempts left.`, "escrowPinMismatchMessage");
|
|
34437
|
+
var EscrowPinStatusValidator = external_exports2.object({
|
|
34438
|
+
state: external_exports2.enum(["none", "enabled", "locked", "stale"]),
|
|
34439
|
+
enabled: external_exports2.boolean(),
|
|
34440
|
+
attemptsRemaining: external_exports2.number().int().nonnegative(),
|
|
34441
|
+
salt: external_exports2.string().optional()
|
|
34442
|
+
});
|
|
34002
34443
|
var BITSTRING_STATUS_PURPOSES = ["revocation", "suspension"];
|
|
34003
34444
|
var DEFAULT_BITSTRING_STATUS_LIST_SIZE = 131072;
|
|
34004
34445
|
var BitstringStatusPurposeValidator = external_exports2.enum(BITSTRING_STATUS_PURPOSES);
|
|
@@ -34113,191 +34554,458 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
34113
34554
|
const result = inAppMessagesFlagValidator.safeParse(raw);
|
|
34114
34555
|
return result.success ? result.data : EMPTY_IN_APP_MESSAGES_FLAG;
|
|
34115
34556
|
}, "parseInAppMessagesFlag");
|
|
34116
|
-
var
|
|
34117
|
-
var
|
|
34118
|
-
|
|
34119
|
-
|
|
34120
|
-
|
|
34121
|
-
|
|
34122
|
-
var
|
|
34123
|
-
|
|
34124
|
-
|
|
34125
|
-
|
|
34126
|
-
var
|
|
34127
|
-
|
|
34128
|
-
|
|
34129
|
-
|
|
34130
|
-
var
|
|
34131
|
-
|
|
34132
|
-
|
|
34133
|
-
|
|
34134
|
-
|
|
34135
|
-
|
|
34136
|
-
|
|
34137
|
-
|
|
34138
|
-
|
|
34139
|
-
|
|
34140
|
-
|
|
34141
|
-
|
|
34142
|
-
|
|
34143
|
-
|
|
34144
|
-
|
|
34145
|
-
|
|
34146
|
-
|
|
34147
|
-
|
|
34148
|
-
|
|
34149
|
-
|
|
34150
|
-
|
|
34151
|
-
|
|
34152
|
-
|
|
34153
|
-
|
|
34154
|
-
|
|
34155
|
-
|
|
34156
|
-
|
|
34157
|
-
|
|
34158
|
-
|
|
34159
|
-
|
|
34160
|
-
|
|
34161
|
-
|
|
34162
|
-
|
|
34163
|
-
|
|
34164
|
-
|
|
34165
|
-
|
|
34166
|
-
|
|
34167
|
-
|
|
34168
|
-
|
|
34169
|
-
|
|
34170
|
-
}
|
|
34171
|
-
|
|
34172
|
-
|
|
34173
|
-
|
|
34174
|
-
|
|
34175
|
-
|
|
34176
|
-
|
|
34177
|
-
|
|
34557
|
+
var SHARE_LINK_ID_BYTES = 16;
|
|
34558
|
+
var SHARE_CONTENT_KEY_BYTES = 32;
|
|
34559
|
+
var SHARE_IV_BYTES = 12;
|
|
34560
|
+
var SHARE_TAG_BYTES = 16;
|
|
34561
|
+
var MAX_SHARE_CIPHERTEXT_BYTES = 512 * 1024;
|
|
34562
|
+
var MAX_SHARE_RECOVERY_JWE_BYTES = 64 * 1024;
|
|
34563
|
+
var MAX_SELECTED_CREDENTIALS = 50;
|
|
34564
|
+
var MAX_ENDORSEMENTS = 200;
|
|
34565
|
+
var MAX_VP_MEMBERS = MAX_SELECTED_CREDENTIALS + MAX_ENDORSEMENTS;
|
|
34566
|
+
var MAX_SHARE_SOURCE_URI_CHARS = 2048;
|
|
34567
|
+
var MAX_SHARE_LINK_REQUEST_BYTES = 1024 * 1024;
|
|
34568
|
+
var SHARE_LINK_PROTOCOL = "lc-share/v1";
|
|
34569
|
+
var SHARE_RECOVERY_PROTOCOL = "lc-share-recovery/v1";
|
|
34570
|
+
var SHARE_AAD_PREFIX = "lc-share:v1";
|
|
34571
|
+
var BASE64URL_ALPHABET = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_";
|
|
34572
|
+
var BASE64URL_LOOKUP = (() => {
|
|
34573
|
+
const table = new Int16Array(128).fill(-1);
|
|
34574
|
+
for (let index = 0; index < BASE64URL_ALPHABET.length; index += 1) {
|
|
34575
|
+
table[BASE64URL_ALPHABET.charCodeAt(index)] = index;
|
|
34576
|
+
}
|
|
34577
|
+
return table;
|
|
34578
|
+
})();
|
|
34579
|
+
var encodeBase64Url = /* @__PURE__ */ __name22((bytes) => {
|
|
34580
|
+
let output = "";
|
|
34581
|
+
for (let index = 0; index < bytes.length; index += 3) {
|
|
34582
|
+
const first = bytes[index];
|
|
34583
|
+
const second = bytes[index + 1];
|
|
34584
|
+
const third = bytes[index + 2];
|
|
34585
|
+
output += BASE64URL_ALPHABET[first >> 2];
|
|
34586
|
+
output += BASE64URL_ALPHABET[(first & 3) << 4 | (second ?? 0) >> 4];
|
|
34587
|
+
if (second === void 0) break;
|
|
34588
|
+
output += BASE64URL_ALPHABET[(second & 15) << 2 | (third ?? 0) >> 6];
|
|
34589
|
+
if (third === void 0) break;
|
|
34590
|
+
output += BASE64URL_ALPHABET[third & 63];
|
|
34591
|
+
}
|
|
34592
|
+
return output;
|
|
34593
|
+
}, "encodeBase64Url");
|
|
34594
|
+
var decodeBase64Url = /* @__PURE__ */ __name22((value) => {
|
|
34595
|
+
if (typeof value !== "string") return null;
|
|
34596
|
+
const output = new Uint8Array(Math.floor(value.length * 6 / 8));
|
|
34597
|
+
let bits = 0;
|
|
34598
|
+
let bitCount = 0;
|
|
34599
|
+
let outputIndex = 0;
|
|
34600
|
+
for (let index = 0; index < value.length; index += 1) {
|
|
34601
|
+
const code = value.charCodeAt(index);
|
|
34602
|
+
const digit = code < 128 ? BASE64URL_LOOKUP[code] : -1;
|
|
34603
|
+
if (digit < 0) return null;
|
|
34604
|
+
bits = bits << 6 | digit;
|
|
34605
|
+
bitCount += 6;
|
|
34606
|
+
if (bitCount >= 8) {
|
|
34607
|
+
bitCount -= 8;
|
|
34608
|
+
output[outputIndex] = bits >> bitCount & 255;
|
|
34609
|
+
outputIndex += 1;
|
|
34610
|
+
}
|
|
34611
|
+
}
|
|
34612
|
+
return output;
|
|
34613
|
+
}, "decodeBase64Url");
|
|
34614
|
+
var isCanonicalBase64Url = /* @__PURE__ */ __name22((value, expectedBytes) => {
|
|
34615
|
+
if (typeof value !== "string") return false;
|
|
34616
|
+
if (expectedBytes !== void 0 && value.length !== Math.ceil(expectedBytes * 4 / 3))
|
|
34617
|
+
return false;
|
|
34618
|
+
const decoded = decodeBase64Url(value);
|
|
34619
|
+
if (decoded === null) return false;
|
|
34620
|
+
if (expectedBytes !== void 0 && decoded.length !== expectedBytes) return false;
|
|
34621
|
+
return encodeBase64Url(decoded) === value;
|
|
34622
|
+
}, "isCanonicalBase64Url");
|
|
34623
|
+
var decodedBase64UrlByteLength = /* @__PURE__ */ __name22((value) => decodeBase64Url(value)?.length ?? null, "decodedBase64UrlByteLength");
|
|
34624
|
+
var utf8ByteLength = /* @__PURE__ */ __name22((value) => new TextEncoder().encode(value).length, "utf8ByteLength");
|
|
34625
|
+
var canonicalBase64Url = /* @__PURE__ */ __name22((bytes) => external_exports2.string().refine((value) => isCanonicalBase64Url(value, bytes), {
|
|
34626
|
+
message: `must be canonical base64url for exactly ${bytes} bytes`
|
|
34627
|
+
}), "canonicalBase64Url");
|
|
34628
|
+
var ShareLinkIdValidator = canonicalBase64Url(SHARE_LINK_ID_BYTES);
|
|
34629
|
+
var ShareContentKeyValidator = canonicalBase64Url(SHARE_CONTENT_KEY_BYTES);
|
|
34630
|
+
var ShareIvValidator = canonicalBase64Url(SHARE_IV_BYTES);
|
|
34631
|
+
var ShareCiphertextValidator = external_exports2.string().refine(
|
|
34632
|
+
(value) => {
|
|
34633
|
+
if (value.length > Math.ceil(MAX_SHARE_CIPHERTEXT_BYTES * 4 / 3)) return false;
|
|
34634
|
+
const decoded = decodeBase64Url(value);
|
|
34635
|
+
if (decoded === null) return false;
|
|
34636
|
+
if (encodeBase64Url(decoded) !== value) return false;
|
|
34637
|
+
return decoded.length >= SHARE_TAG_BYTES && decoded.length <= MAX_SHARE_CIPHERTEXT_BYTES;
|
|
34638
|
+
},
|
|
34639
|
+
{
|
|
34640
|
+
message: `must be canonical base64url decoding to ${SHARE_TAG_BYTES}..${MAX_SHARE_CIPHERTEXT_BYTES} bytes`
|
|
34178
34641
|
}
|
|
34179
|
-
|
|
34642
|
+
);
|
|
34643
|
+
var ShareEnvelopeValidator = external_exports2.object({
|
|
34644
|
+
v: external_exports2.literal(1),
|
|
34645
|
+
alg: external_exports2.literal("A256GCM"),
|
|
34646
|
+
iv: ShareIvValidator,
|
|
34647
|
+
ct: ShareCiphertextValidator
|
|
34648
|
+
}).strict();
|
|
34649
|
+
var safeVersion = external_exports2.number().int().min(1).max(2 ** 31 - 1);
|
|
34650
|
+
var safeCredentialIndex = external_exports2.number().int().min(0).max(MAX_VP_MEMBERS - 1);
|
|
34651
|
+
var ShareSelectionEntryValidator = external_exports2.object({ credentialIndex: safeCredentialIndex }).strict();
|
|
34652
|
+
var ShareEndorsementEntryValidator = external_exports2.object({ credentialIndex: safeCredentialIndex, targetCredentialIndex: safeCredentialIndex }).strict();
|
|
34653
|
+
var ShareSharerValidator = external_exports2.object({
|
|
34654
|
+
profileId: external_exports2.string().min(1).max(128),
|
|
34655
|
+
displayName: external_exports2.string().min(1).max(120),
|
|
34656
|
+
avatar: external_exports2.string().max(2048).optional()
|
|
34657
|
+
}).strict();
|
|
34658
|
+
var presentationShape = VPValidator.extend({
|
|
34659
|
+
verifiableCredential: VCValidator.array().min(1).max(MAX_VP_MEMBERS)
|
|
34660
|
+
});
|
|
34661
|
+
var hasBoundedPresentation = /* @__PURE__ */ __name22((value) => {
|
|
34662
|
+
let credentialCount = 0;
|
|
34663
|
+
const ancestors = /* @__PURE__ */ new Set();
|
|
34664
|
+
const visit = /* @__PURE__ */ __name22((node, depth) => {
|
|
34665
|
+
if (node === null || typeof node !== "object") return true;
|
|
34666
|
+
if (depth > 32 || ancestors.has(node)) return false;
|
|
34667
|
+
ancestors.add(node);
|
|
34668
|
+
try {
|
|
34669
|
+
for (const [key, child] of Object.entries(node)) {
|
|
34670
|
+
if (key === "verifiableCredential") {
|
|
34671
|
+
credentialCount += Array.isArray(child) ? child.length : 1;
|
|
34672
|
+
if (credentialCount > MAX_VP_MEMBERS) return false;
|
|
34673
|
+
}
|
|
34674
|
+
if (!visit(child, depth + 1)) return false;
|
|
34675
|
+
}
|
|
34676
|
+
return true;
|
|
34677
|
+
} finally {
|
|
34678
|
+
ancestors.delete(node);
|
|
34679
|
+
}
|
|
34680
|
+
}, "visit");
|
|
34681
|
+
return visit(value, 0);
|
|
34682
|
+
}, "hasBoundedPresentation");
|
|
34683
|
+
var ShareManifestPresentationValidator = external_exports2.custom(
|
|
34684
|
+
(value) => hasBoundedPresentation(value) && presentationShape.safeParse(value).success,
|
|
34685
|
+
{ message: "invalid share presentation" }
|
|
34686
|
+
);
|
|
34687
|
+
var SharePayloadValidatorShape = external_exports2.object({
|
|
34688
|
+
protocol: external_exports2.literal(SHARE_LINK_PROTOCOL),
|
|
34689
|
+
shareId: ShareLinkIdValidator,
|
|
34690
|
+
contentVersion: safeVersion,
|
|
34691
|
+
createdAt: external_exports2.iso.datetime(),
|
|
34692
|
+
sharer: ShareSharerValidator,
|
|
34693
|
+
presentation: ShareManifestPresentationValidator,
|
|
34694
|
+
selection: ShareSelectionEntryValidator.array().min(1).max(MAX_SELECTED_CREDENTIALS),
|
|
34695
|
+
endorsements: ShareEndorsementEntryValidator.array().max(MAX_ENDORSEMENTS).default([])
|
|
34696
|
+
}).strict();
|
|
34697
|
+
var classificationFailure = /* @__PURE__ */ __name22((code, message, path = []) => ({ ok: false, code, message, path }), "classificationFailure");
|
|
34698
|
+
var readSignedClaimId = /* @__PURE__ */ __name22((member) => {
|
|
34699
|
+
if (member === null || typeof member !== "object") return void 0;
|
|
34700
|
+
const record22 = member;
|
|
34701
|
+
const claim = record22.credentialSubject ?? record22.endorsement;
|
|
34702
|
+
if (claim === null || typeof claim !== "object") return void 0;
|
|
34703
|
+
const claimRecord = claim;
|
|
34704
|
+
const nested = claimRecord.endorsement;
|
|
34705
|
+
const nestedId = nested !== null && typeof nested === "object" ? nested.id : void 0;
|
|
34706
|
+
return claimRecord.id ?? nestedId;
|
|
34707
|
+
}, "readSignedClaimId");
|
|
34708
|
+
var classifyShareManifest = /* @__PURE__ */ __name22((payload) => {
|
|
34709
|
+
const members = payload.presentation?.verifiableCredential;
|
|
34710
|
+
if (!Array.isArray(members) || members.length === 0) {
|
|
34711
|
+
return classificationFailure("NO_PRESENTATION_MEMBERS", "presentation has no credentials");
|
|
34712
|
+
}
|
|
34713
|
+
if (members.length > MAX_VP_MEMBERS) {
|
|
34714
|
+
return classificationFailure(
|
|
34715
|
+
"TOO_MANY_VP_MEMBERS",
|
|
34716
|
+
`presentation has ${members.length} members, over the ${MAX_VP_MEMBERS} bound`
|
|
34717
|
+
);
|
|
34718
|
+
}
|
|
34719
|
+
const selection = payload.selection;
|
|
34720
|
+
const endorsements = payload.endorsements ?? [];
|
|
34721
|
+
if (!Array.isArray(selection) || selection.length < 1 || selection.length > MAX_SELECTED_CREDENTIALS) {
|
|
34722
|
+
return classificationFailure("BAD_SELECTION", "selection must contain 1..50 entries");
|
|
34723
|
+
}
|
|
34724
|
+
if (!Array.isArray(endorsements) || endorsements.length > MAX_ENDORSEMENTS) {
|
|
34725
|
+
return classificationFailure(
|
|
34726
|
+
"BAD_ENDORSEMENTS",
|
|
34727
|
+
"endorsements must contain at most 200 entries"
|
|
34728
|
+
);
|
|
34729
|
+
}
|
|
34730
|
+
const selectedIndices = [];
|
|
34731
|
+
const selected = /* @__PURE__ */ new Set();
|
|
34732
|
+
for (let index = 0; index < selection.length; index += 1) {
|
|
34733
|
+
const entry = selection[index];
|
|
34734
|
+
const credentialIndex = entry?.credentialIndex;
|
|
34735
|
+
if (!Number.isSafeInteger(credentialIndex) || credentialIndex < 0 || credentialIndex >= members.length) {
|
|
34736
|
+
return classificationFailure(
|
|
34737
|
+
"SELECTION_INDEX_OUT_OF_BOUNDS",
|
|
34738
|
+
`selection[${index}].credentialIndex is out of bounds`,
|
|
34739
|
+
["selection", index, "credentialIndex"]
|
|
34740
|
+
);
|
|
34741
|
+
}
|
|
34742
|
+
if (selected.has(credentialIndex)) {
|
|
34743
|
+
return classificationFailure(
|
|
34744
|
+
"SELECTION_INDEX_DUPLICATE",
|
|
34745
|
+
`selection[${index}].credentialIndex is duplicated`,
|
|
34746
|
+
["selection", index, "credentialIndex"]
|
|
34747
|
+
);
|
|
34748
|
+
}
|
|
34749
|
+
selected.add(credentialIndex);
|
|
34750
|
+
selectedIndices.push(credentialIndex);
|
|
34751
|
+
}
|
|
34752
|
+
const classified = new Set(selected);
|
|
34753
|
+
const endorsementIndices = [];
|
|
34754
|
+
for (let index = 0; index < endorsements.length; index += 1) {
|
|
34755
|
+
const entry = endorsements[index];
|
|
34756
|
+
const credentialIndex = entry?.credentialIndex;
|
|
34757
|
+
const targetIndex = entry?.targetCredentialIndex;
|
|
34758
|
+
if (!Number.isSafeInteger(credentialIndex) || credentialIndex < 0 || credentialIndex >= members.length) {
|
|
34759
|
+
return classificationFailure(
|
|
34760
|
+
"ENDORSEMENT_INDEX_OUT_OF_BOUNDS",
|
|
34761
|
+
`endorsements[${index}].credentialIndex is out of bounds`,
|
|
34762
|
+
["endorsements", index, "credentialIndex"]
|
|
34763
|
+
);
|
|
34764
|
+
}
|
|
34765
|
+
if (classified.has(credentialIndex)) {
|
|
34766
|
+
return classificationFailure(
|
|
34767
|
+
"VP_MEMBER_CLASSIFIED_TWICE",
|
|
34768
|
+
`endorsements[${index}].credentialIndex was already classified`,
|
|
34769
|
+
["endorsements", index, "credentialIndex"]
|
|
34770
|
+
);
|
|
34771
|
+
}
|
|
34772
|
+
if (!selected.has(targetIndex)) {
|
|
34773
|
+
return classificationFailure(
|
|
34774
|
+
"ENDORSEMENT_TARGET_NOT_SELECTED",
|
|
34775
|
+
`endorsements[${index}].targetCredentialIndex must reference a selected credential`,
|
|
34776
|
+
["endorsements", index, "targetCredentialIndex"]
|
|
34777
|
+
);
|
|
34778
|
+
}
|
|
34779
|
+
const referenced = readSignedClaimId(members[credentialIndex]);
|
|
34780
|
+
const target = members[targetIndex];
|
|
34781
|
+
const targetId = target !== null && typeof target === "object" ? target.id : void 0;
|
|
34782
|
+
if (typeof referenced !== "string" || typeof targetId !== "string" || referenced !== targetId) {
|
|
34783
|
+
return classificationFailure(
|
|
34784
|
+
"ENDORSEMENT_TARGET_UNBOUND",
|
|
34785
|
+
`endorsements[${index}] claim does not reference the target credential id`,
|
|
34786
|
+
["endorsements", index]
|
|
34787
|
+
);
|
|
34788
|
+
}
|
|
34789
|
+
classified.add(credentialIndex);
|
|
34790
|
+
endorsementIndices.push(credentialIndex);
|
|
34791
|
+
}
|
|
34792
|
+
if (classified.size !== members.length) {
|
|
34793
|
+
return classificationFailure(
|
|
34794
|
+
"UNCLASSIFIED_VP_MEMBER",
|
|
34795
|
+
"every presentation member must be classified exactly once",
|
|
34796
|
+
["presentation", "verifiableCredential"]
|
|
34797
|
+
);
|
|
34798
|
+
}
|
|
34799
|
+
return {
|
|
34800
|
+
ok: true,
|
|
34801
|
+
classification: { selectedIndices, endorsementIndices, memberCount: members.length }
|
|
34802
|
+
};
|
|
34803
|
+
}, "classifyShareManifest");
|
|
34804
|
+
var SharePayloadValidator = SharePayloadValidatorShape.superRefine((payload, ctx) => {
|
|
34805
|
+
const result = classifyShareManifest(payload);
|
|
34806
|
+
if (!result.ok) {
|
|
34180
34807
|
ctx.addIssue({
|
|
34181
34808
|
code: "custom",
|
|
34182
|
-
|
|
34183
|
-
|
|
34809
|
+
message: result.message,
|
|
34810
|
+
path: result.path,
|
|
34811
|
+
params: { shareLinkCode: result.code }
|
|
34184
34812
|
});
|
|
34185
34813
|
}
|
|
34186
|
-
|
|
34187
|
-
|
|
34188
|
-
|
|
34189
|
-
|
|
34190
|
-
|
|
34191
|
-
|
|
34192
|
-
|
|
34193
|
-
|
|
34194
|
-
|
|
34814
|
+
});
|
|
34815
|
+
var ShareRecoverySelectionValidator = external_exports2.object({
|
|
34816
|
+
ref: external_exports2.string().min(1).max(MAX_SHARE_SOURCE_URI_CHARS),
|
|
34817
|
+
order: external_exports2.number().int().min(0).max(MAX_SELECTED_CREDENTIALS - 1)
|
|
34818
|
+
}).strict();
|
|
34819
|
+
var ShareRecoveryEndorsementValidator = external_exports2.object({ targetRef: external_exports2.string().min(1).max(MAX_SHARE_SOURCE_URI_CHARS) }).strict();
|
|
34820
|
+
var ShareRecoveryPlaintextValidator = external_exports2.object({
|
|
34821
|
+
protocol: external_exports2.literal(SHARE_RECOVERY_PROTOCOL),
|
|
34822
|
+
shareId: ShareLinkIdValidator,
|
|
34823
|
+
ownerProfileId: external_exports2.string().min(1).max(128),
|
|
34824
|
+
createdAt: external_exports2.iso.datetime(),
|
|
34825
|
+
latest: external_exports2.object({ contentVersion: safeVersion, key: ShareContentKeyValidator }).strict(),
|
|
34826
|
+
selection: ShareRecoverySelectionValidator.array().min(1).max(MAX_SELECTED_CREDENTIALS),
|
|
34827
|
+
endorsements: ShareRecoveryEndorsementValidator.array().max(MAX_ENDORSEMENTS).default([])
|
|
34828
|
+
}).strict().superRefine((recovery, ctx) => {
|
|
34829
|
+
const orders = /* @__PURE__ */ new Set();
|
|
34830
|
+
recovery.selection.forEach((entry, index) => {
|
|
34831
|
+
if (entry.order >= recovery.selection.length) {
|
|
34195
34832
|
ctx.addIssue({
|
|
34196
34833
|
code: "custom",
|
|
34197
|
-
|
|
34198
|
-
|
|
34834
|
+
message: "order must be within the selection bounds",
|
|
34835
|
+
path: ["selection", index, "order"]
|
|
34199
34836
|
});
|
|
34200
34837
|
}
|
|
34201
|
-
if (
|
|
34838
|
+
if (orders.has(entry.order)) {
|
|
34202
34839
|
ctx.addIssue({
|
|
34203
34840
|
code: "custom",
|
|
34204
|
-
|
|
34205
|
-
|
|
34841
|
+
message: "order must be unique within the selection",
|
|
34842
|
+
path: ["selection", index, "order"]
|
|
34206
34843
|
});
|
|
34207
34844
|
}
|
|
34845
|
+
orders.add(entry.order);
|
|
34846
|
+
});
|
|
34847
|
+
});
|
|
34848
|
+
var ShareOwnerRecoveryValidator = JWEValidator2.refine(
|
|
34849
|
+
(value) => utf8ByteLength(JSON.stringify(value)) <= MAX_SHARE_RECOVERY_JWE_BYTES,
|
|
34850
|
+
{ message: `serialized recovery JWE must be at most ${MAX_SHARE_RECOVERY_JWE_BYTES} bytes` }
|
|
34851
|
+
);
|
|
34852
|
+
var ShareLinkStatusValidator = external_exports2.enum(["pending", "active", "stopped"]);
|
|
34853
|
+
var ShareContentStateValidator = external_exports2.enum(["staging", "finalized", "content_missing"]);
|
|
34854
|
+
var ShareLinkValidator = external_exports2.object({
|
|
34855
|
+
id: ShareLinkIdValidator,
|
|
34856
|
+
title: external_exports2.string().min(1).max(120),
|
|
34857
|
+
note: external_exports2.string().max(500).optional(),
|
|
34858
|
+
selectedCount: external_exports2.number().int().min(1).max(MAX_SELECTED_CREDENTIALS),
|
|
34859
|
+
version: safeVersion,
|
|
34860
|
+
contentVersion: safeVersion,
|
|
34861
|
+
status: ShareLinkStatusValidator,
|
|
34862
|
+
contentState: ShareContentStateValidator,
|
|
34863
|
+
createdAt: external_exports2.iso.datetime(),
|
|
34864
|
+
updatedAt: external_exports2.iso.datetime(),
|
|
34865
|
+
expiresAt: external_exports2.iso.datetime().nullable(),
|
|
34866
|
+
stoppedAt: external_exports2.iso.datetime().nullable(),
|
|
34867
|
+
lastViewedAt: external_exports2.iso.datetime().nullable(),
|
|
34868
|
+
viewCount: external_exports2.number().int().min(0).optional(),
|
|
34869
|
+
passcodeProtected: external_exports2.boolean(),
|
|
34870
|
+
notifyOnView: external_exports2.boolean(),
|
|
34871
|
+
minorPolicy: external_exports2.object({
|
|
34872
|
+
isMinor: external_exports2.boolean().nullable(),
|
|
34873
|
+
policyResolved: external_exports2.boolean(),
|
|
34874
|
+
defaultExpiryDays: external_exports2.union([external_exports2.literal(30), external_exports2.literal(365)]),
|
|
34875
|
+
viewCountingEnabled: external_exports2.boolean()
|
|
34876
|
+
}),
|
|
34877
|
+
/**
|
|
34878
|
+
* Guarded application/API URL for the content. Optional because owner APIs in
|
|
34879
|
+
* D1 have no public resolve/content endpoint yet; it must never be a
|
|
34880
|
+
* LearnCloud object URL or carry a fabricated decryption key.
|
|
34881
|
+
*/
|
|
34882
|
+
contentUrl: external_exports2.string().optional()
|
|
34883
|
+
});
|
|
34884
|
+
var clientRequestId = external_exports2.string().uuid();
|
|
34885
|
+
var CreateShareLinkInputValidator = external_exports2.object({
|
|
34886
|
+
id: ShareLinkIdValidator,
|
|
34887
|
+
clientRequestId,
|
|
34888
|
+
title: external_exports2.string().min(1).max(120),
|
|
34889
|
+
note: external_exports2.string().max(500).optional(),
|
|
34890
|
+
expiresAt: external_exports2.iso.datetime().nullable().optional(),
|
|
34891
|
+
passcode: external_exports2.string().min(8).max(64).optional(),
|
|
34892
|
+
notifyOnView: external_exports2.boolean().default(false),
|
|
34893
|
+
selectedCount: external_exports2.number().int().min(1).max(MAX_SELECTED_CREDENTIALS),
|
|
34894
|
+
contentVersion: external_exports2.literal(1),
|
|
34895
|
+
envelope: ShareEnvelopeValidator,
|
|
34896
|
+
ownerEncryptedRecovery: ShareOwnerRecoveryValidator
|
|
34897
|
+
}).strict();
|
|
34898
|
+
var UpdateShareLinkInputValidator = external_exports2.object({
|
|
34899
|
+
id: ShareLinkIdValidator,
|
|
34900
|
+
expectedVersion: safeVersion,
|
|
34901
|
+
clientRequestId,
|
|
34902
|
+
title: external_exports2.string().min(1).max(120).optional(),
|
|
34903
|
+
note: external_exports2.string().max(500).nullable().optional(),
|
|
34904
|
+
expiresAt: external_exports2.iso.datetime().nullable().optional(),
|
|
34905
|
+
/** Omitted preserves the current passcode, null removes it, and a string replaces it. */
|
|
34906
|
+
passcode: external_exports2.string().min(8).max(64).nullable().optional(),
|
|
34907
|
+
notifyOnView: external_exports2.boolean().optional(),
|
|
34908
|
+
contentVersion: safeVersion.optional(),
|
|
34909
|
+
selectedCount: external_exports2.number().int().min(1).max(MAX_SELECTED_CREDENTIALS).optional(),
|
|
34910
|
+
envelope: ShareEnvelopeValidator.optional(),
|
|
34911
|
+
ownerEncryptedRecovery: ShareOwnerRecoveryValidator.optional()
|
|
34912
|
+
}).strict().superRefine((value, ctx) => {
|
|
34913
|
+
const provided = [
|
|
34914
|
+
value.contentVersion,
|
|
34915
|
+
value.selectedCount,
|
|
34916
|
+
value.envelope,
|
|
34917
|
+
value.ownerEncryptedRecovery
|
|
34918
|
+
].filter((field) => field !== void 0).length;
|
|
34919
|
+
if (provided !== 0 && provided !== 4) {
|
|
34920
|
+
ctx.addIssue({
|
|
34921
|
+
code: "custom",
|
|
34922
|
+
message: "content replacement requires contentVersion, selectedCount, envelope and ownerEncryptedRecovery together"
|
|
34923
|
+
});
|
|
34208
34924
|
}
|
|
34209
34925
|
});
|
|
34210
|
-
var
|
|
34211
|
-
|
|
34212
|
-
|
|
34213
|
-
"
|
|
34214
|
-
|
|
34215
|
-
|
|
34926
|
+
var ShareLinkIdInputValidator = external_exports2.object({ id: ShareLinkIdValidator }).strict();
|
|
34927
|
+
var ShareLinkOperationKeyInputValidator = external_exports2.object({ id: ShareLinkIdValidator, operationId: external_exports2.string().uuid() }).strict();
|
|
34928
|
+
var ShareLinkOwnerCommitOutputValidator = external_exports2.discriminatedUnion("status", [
|
|
34929
|
+
external_exports2.object({ status: external_exports2.literal("completed"), share: ShareLinkValidator }).strict(),
|
|
34930
|
+
external_exports2.object({
|
|
34931
|
+
status: external_exports2.literal("pending"),
|
|
34932
|
+
id: ShareLinkIdValidator,
|
|
34933
|
+
operationId: external_exports2.string().uuid()
|
|
34934
|
+
}).strict()
|
|
34216
34935
|
]);
|
|
34217
|
-
var
|
|
34218
|
-
|
|
34219
|
-
|
|
34220
|
-
|
|
34221
|
-
|
|
34222
|
-
|
|
34223
|
-
|
|
34224
|
-
|
|
34225
|
-
publishedAt: external_exports2.string().min(1),
|
|
34226
|
-
effectiveAt: external_exports2.string().optional(),
|
|
34227
|
-
etag: external_exports2.string().optional(),
|
|
34228
|
-
signingMode: CredentialRefreshSigningModeValidator.optional(),
|
|
34229
|
-
updateSummary: external_exports2.string().optional()
|
|
34230
|
-
});
|
|
34231
|
-
var GetCredentialRefreshHistoryInputValidator = external_exports2.object({
|
|
34232
|
-
refreshId: external_exports2.string().min(1),
|
|
34233
|
-
cursor: external_exports2.string().optional(),
|
|
34234
|
-
limit: external_exports2.number().int().positive().optional()
|
|
34235
|
-
});
|
|
34236
|
-
var GetCredentialRefreshHistoryResultValidator = external_exports2.object({
|
|
34237
|
-
records: CredentialRefreshVersionMetadataValidator.array(),
|
|
34238
|
-
hasMore: external_exports2.boolean(),
|
|
34239
|
-
cursor: external_exports2.string().optional()
|
|
34240
|
-
});
|
|
34241
|
-
var CredentialRefreshChallengeValidator = external_exports2.object({
|
|
34242
|
-
challenge: external_exports2.string().min(1),
|
|
34243
|
-
expiresAt: external_exports2.string().min(1),
|
|
34244
|
-
domain: external_exports2.string().optional(),
|
|
34245
|
-
scheme: external_exports2.literal("LearnCardDIDAuth").optional()
|
|
34246
|
-
});
|
|
34247
|
-
var PublicCredentialRefreshEnvelopeValidator = external_exports2.object({
|
|
34248
|
-
format: external_exports2.literal("vc"),
|
|
34249
|
-
credential: VCValidator,
|
|
34250
|
-
etag: external_exports2.string().optional()
|
|
34251
|
-
});
|
|
34252
|
-
var JweCredentialRefreshEnvelopeValidator = external_exports2.object({
|
|
34253
|
-
format: external_exports2.literal("jwe"),
|
|
34254
|
-
jwe: JWEValidator2,
|
|
34255
|
-
etag: external_exports2.string().optional(),
|
|
34256
|
-
/** Present on LearnCard-managed endpoints; optional for interoperable JWE services. */
|
|
34257
|
-
version: external_exports2.number().int().positive().optional()
|
|
34258
|
-
});
|
|
34259
|
-
var CredentialRefreshResponseEnvelopeValidator = external_exports2.discriminatedUnion("format", [
|
|
34260
|
-
PublicCredentialRefreshEnvelopeValidator,
|
|
34261
|
-
JweCredentialRefreshEnvelopeValidator
|
|
34936
|
+
var ShareLinkOwnerStatusOutputValidator = external_exports2.discriminatedUnion("status", [
|
|
34937
|
+
external_exports2.object({ status: external_exports2.literal("found"), share: ShareLinkValidator }).strict(),
|
|
34938
|
+
external_exports2.object({
|
|
34939
|
+
status: external_exports2.literal("pending"),
|
|
34940
|
+
id: ShareLinkIdValidator,
|
|
34941
|
+
operationId: external_exports2.string().uuid()
|
|
34942
|
+
}).strict(),
|
|
34943
|
+
external_exports2.object({ status: external_exports2.literal("not_found"), id: ShareLinkIdValidator }).strict()
|
|
34262
34944
|
]);
|
|
34263
|
-
var
|
|
34264
|
-
|
|
34265
|
-
|
|
34266
|
-
|
|
34267
|
-
|
|
34268
|
-
|
|
34269
|
-
|
|
34270
|
-
|
|
34271
|
-
|
|
34272
|
-
|
|
34273
|
-
|
|
34274
|
-
|
|
34945
|
+
var ShareLinkOwnerRecoveryOutputValidator = external_exports2.object({ recovery: ShareOwnerRecoveryValidator }).strict();
|
|
34946
|
+
var ShareLinkOwnerContentOutputValidator = external_exports2.object({
|
|
34947
|
+
id: ShareLinkIdValidator,
|
|
34948
|
+
contentVersion: safeVersion,
|
|
34949
|
+
envelope: ShareEnvelopeValidator
|
|
34950
|
+
}).strict();
|
|
34951
|
+
var ResolveShareLinkInputValidator = external_exports2.object({
|
|
34952
|
+
id: ShareLinkIdValidator,
|
|
34953
|
+
/** Sent only in a POST body; it must never be placed in a share URL. */
|
|
34954
|
+
passcode: external_exports2.string().min(4).max(64).optional()
|
|
34955
|
+
}).strict();
|
|
34956
|
+
var ShareLinkPublicStateValidator = external_exports2.discriminatedUnion("state", [
|
|
34957
|
+
external_exports2.object({
|
|
34958
|
+
state: external_exports2.literal("passcode_required"),
|
|
34959
|
+
id: ShareLinkIdValidator
|
|
34960
|
+
}).strict(),
|
|
34961
|
+
external_exports2.object({ state: external_exports2.literal("try_later"), id: ShareLinkIdValidator }).strict(),
|
|
34962
|
+
external_exports2.object({
|
|
34963
|
+
state: external_exports2.literal("active"),
|
|
34964
|
+
id: ShareLinkIdValidator,
|
|
34965
|
+
title: external_exports2.string().max(120),
|
|
34966
|
+
note: external_exports2.string().max(500).optional(),
|
|
34967
|
+
selectedCount: external_exports2.number().int().min(1).max(MAX_SELECTED_CREDENTIALS),
|
|
34968
|
+
contentVersion: safeVersion,
|
|
34969
|
+
contentUrl: external_exports2.string(),
|
|
34970
|
+
sharer: external_exports2.object({
|
|
34971
|
+
displayName: external_exports2.string().max(120),
|
|
34972
|
+
avatar: external_exports2.string().max(2048).optional()
|
|
34973
|
+
}),
|
|
34974
|
+
createdAt: external_exports2.iso.datetime(),
|
|
34975
|
+
updatedAt: external_exports2.iso.datetime(),
|
|
34976
|
+
expiresAt: external_exports2.iso.datetime().nullable()
|
|
34977
|
+
}).strict(),
|
|
34978
|
+
external_exports2.object({
|
|
34979
|
+
state: external_exports2.literal("expired"),
|
|
34980
|
+
id: ShareLinkIdValidator,
|
|
34981
|
+
expiresAt: external_exports2.iso.datetime()
|
|
34982
|
+
}).strict(),
|
|
34983
|
+
external_exports2.object({
|
|
34984
|
+
state: external_exports2.literal("stopped"),
|
|
34985
|
+
id: ShareLinkIdValidator,
|
|
34986
|
+
stoppedAt: external_exports2.iso.datetime()
|
|
34987
|
+
}).strict(),
|
|
34988
|
+
external_exports2.object({ state: external_exports2.literal("not_found"), id: ShareLinkIdValidator }).strict()
|
|
34275
34989
|
]);
|
|
34276
|
-
var
|
|
34277
|
-
|
|
34278
|
-
|
|
34279
|
-
|
|
34280
|
-
|
|
34281
|
-
|
|
34282
|
-
var CredentialRefreshUnchangedResultValidator = external_exports2.object({
|
|
34283
|
-
status: external_exports2.literal("unchanged"),
|
|
34284
|
-
checkedAt: external_exports2.string().min(1),
|
|
34285
|
-
etag: external_exports2.string().optional()
|
|
34286
|
-
});
|
|
34287
|
-
var CredentialRefreshUnsupportedResultValidator = external_exports2.object({
|
|
34288
|
-
status: external_exports2.literal("unsupported")
|
|
34289
|
-
});
|
|
34290
|
-
var CredentialRefreshFailedResultValidator = external_exports2.object({
|
|
34291
|
-
status: external_exports2.literal("failed"),
|
|
34292
|
-
code: CredentialRefreshFailureCodeValidator,
|
|
34293
|
-
retryable: external_exports2.boolean()
|
|
34990
|
+
var ListShareLinksInputValidator = external_exports2.object({
|
|
34991
|
+
limit: external_exports2.number().int().min(1).max(50).default(25),
|
|
34992
|
+
cursor: external_exports2.string().max(512).optional()
|
|
34993
|
+
}).strict();
|
|
34994
|
+
var PaginatedShareLinksValidator = PaginationResponseValidator.extend({
|
|
34995
|
+
records: ShareLinkValidator.array()
|
|
34294
34996
|
});
|
|
34295
|
-
var
|
|
34296
|
-
|
|
34297
|
-
|
|
34298
|
-
|
|
34299
|
-
|
|
34300
|
-
|
|
34997
|
+
var AcknowledgeViewInputValidator = external_exports2.object({
|
|
34998
|
+
receipt: external_exports2.string().min(22).max(128).regex(/^[A-Za-z0-9_-]+$/)
|
|
34999
|
+
}).strict();
|
|
35000
|
+
var AcknowledgeViewOutputValidator = external_exports2.object({ ok: external_exports2.literal(true) }).strict();
|
|
35001
|
+
var SHARE_VIEW_RECEIPT_TTL_SECONDS = 10 * 60;
|
|
35002
|
+
var ShareLinkPublicContentViewValidator = external_exports2.object({
|
|
35003
|
+
id: ShareLinkIdValidator,
|
|
35004
|
+
contentVersion: safeVersion,
|
|
35005
|
+
envelope: ShareEnvelopeValidator,
|
|
35006
|
+
contentUrl: external_exports2.string(),
|
|
35007
|
+
receipt: external_exports2.string().min(22).max(128).regex(/^[A-Za-z0-9_-]+$/)
|
|
35008
|
+
}).strict();
|
|
34301
35009
|
}
|
|
34302
35010
|
});
|
|
34303
35011
|
var require_dist = __commonJS({
|
|
@@ -34593,6 +35301,18 @@ var ImageWithLoadingStateValdator = external_exports.object({
|
|
|
34593
35301
|
});
|
|
34594
35302
|
var import_types2 = __toESM(require_dist());
|
|
34595
35303
|
var import_types22 = __toESM(require_dist());
|
|
35304
|
+
var MANAGED_REFRESH_TYPE_TERM = "LearnCardCredentialRefresh2026";
|
|
35305
|
+
var MANAGED_REFRESH_DID_AUTH_TERM = "LearnCardDIDAuth";
|
|
35306
|
+
var MANAGED_REFRESH_TYPE_IRI = "https://learncard.com/refresh#LearnCardCredentialRefresh2026";
|
|
35307
|
+
var MANAGED_REFRESH_AUTHORIZATION_IRI = "https://purl.imsglobal.org/spec/ob/v3p0#authorization";
|
|
35308
|
+
var MANAGED_REFRESH_DID_AUTH_IRI = "https://docs.learncard.com/definitions#LearnCardDIDAuth";
|
|
35309
|
+
var MANAGED_REFRESH_SERVICE_CONTEXT = {
|
|
35310
|
+
[MANAGED_REFRESH_TYPE_TERM]: MANAGED_REFRESH_TYPE_IRI,
|
|
35311
|
+
authorization: {
|
|
35312
|
+
"@id": MANAGED_REFRESH_AUTHORIZATION_IRI,
|
|
35313
|
+
"@context": { [MANAGED_REFRESH_DID_AUTH_TERM]: MANAGED_REFRESH_DID_AUTH_IRI }
|
|
35314
|
+
}
|
|
35315
|
+
};
|
|
34596
35316
|
var EnvironmentConfigurationError = class extends Error {
|
|
34597
35317
|
static {
|
|
34598
35318
|
__name(this, "EnvironmentConfigurationError");
|
|
@@ -34624,6 +35344,20 @@ var optionalEnvironmentPort = external_exports.preprocess(
|
|
|
34624
35344
|
(value) => value === "" || value === void 0 ? void 0 : value,
|
|
34625
35345
|
environmentPort.optional()
|
|
34626
35346
|
);
|
|
35347
|
+
var DEFAULT_MAX_CANONICAL_BYTES = 2 * 1024 * 1024;
|
|
35348
|
+
var ShareContentCanonicalizationError = class extends Error {
|
|
35349
|
+
static {
|
|
35350
|
+
__name(this, "ShareContentCanonicalizationError");
|
|
35351
|
+
}
|
|
35352
|
+
constructor(message) {
|
|
35353
|
+
super(message);
|
|
35354
|
+
this.code = "UNSUPPORTED_REQUEST_VALUE";
|
|
35355
|
+
this.name = "ShareContentCanonicalizationError";
|
|
35356
|
+
}
|
|
35357
|
+
static {
|
|
35358
|
+
__name2(this, "ShareContentCanonicalizationError");
|
|
35359
|
+
}
|
|
35360
|
+
};
|
|
34627
35361
|
var RegExpTransformer = {
|
|
34628
35362
|
serialize(object2) {
|
|
34629
35363
|
return JSON.stringify(object2, (_key, value) => {
|