@learncard/network-brain-client 2.5.54 → 2.5.56

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.
@@ -15965,6 +15965,8 @@ var require_types_cjs_development = __commonJS({
15965
15965
  AgeRatingValidator: /* @__PURE__ */ __name2(() => AgeRatingValidator, "AgeRatingValidator"),
15966
15966
  AlignmentTargetTypeValidator: /* @__PURE__ */ __name2(() => AlignmentTargetTypeValidator, "AlignmentTargetTypeValidator"),
15967
15967
  AlignmentValidator: /* @__PURE__ */ __name2(() => AlignmentValidator, "AlignmentValidator"),
15968
+ AllocateCredentialRefreshInputValidator: /* @__PURE__ */ __name2(() => AllocateCredentialRefreshInputValidator, "AllocateCredentialRefreshInputValidator"),
15969
+ AllocateCredentialRefreshResultValidator: /* @__PURE__ */ __name2(() => AllocateCredentialRefreshResultValidator, "AllocateCredentialRefreshResultValidator"),
15968
15970
  AllocateCredentialStatusInputValidator: /* @__PURE__ */ __name2(() => AllocateCredentialStatusInputValidator, "AllocateCredentialStatusInputValidator"),
15969
15971
  AllocatedBitstringStatusListEntryValidator: /* @__PURE__ */ __name2(() => AllocatedBitstringStatusListEntryValidator, "AllocatedBitstringStatusListEntryValidator"),
15970
15972
  AllowConnectionRequestsEnum: /* @__PURE__ */ __name2(() => AllowConnectionRequestsEnum, "AllowConnectionRequestsEnum"),
@@ -16014,6 +16016,7 @@ var require_types_cjs_development = __commonJS({
16014
16016
  ConsentFlowContractValidator: /* @__PURE__ */ __name2(() => ConsentFlowContractValidator, "ConsentFlowContractValidator"),
16015
16017
  ConsentFlowDataForDidQueryValidator: /* @__PURE__ */ __name2(() => ConsentFlowDataForDidQueryValidator, "ConsentFlowDataForDidQueryValidator"),
16016
16018
  ConsentFlowDataQueryValidator: /* @__PURE__ */ __name2(() => ConsentFlowDataQueryValidator, "ConsentFlowDataQueryValidator"),
16019
+ ConsentFlowGuardianApprovalValidator: /* @__PURE__ */ __name2(() => ConsentFlowGuardianApprovalValidator, "ConsentFlowGuardianApprovalValidator"),
16017
16020
  ConsentFlowTermValidator: /* @__PURE__ */ __name2(() => ConsentFlowTermValidator, "ConsentFlowTermValidator"),
16018
16021
  ConsentFlowTermsQueryValidator: /* @__PURE__ */ __name2(() => ConsentFlowTermsQueryValidator, "ConsentFlowTermsQueryValidator"),
16019
16022
  ConsentFlowTermsStatusValidator: /* @__PURE__ */ __name2(() => ConsentFlowTermsStatusValidator, "ConsentFlowTermsStatusValidator"),
@@ -16046,6 +16049,16 @@ var require_types_cjs_development = __commonJS({
16046
16049
  CredentialInfoValidator: /* @__PURE__ */ __name2(() => CredentialInfoValidator, "CredentialInfoValidator"),
16047
16050
  CredentialNameRefValidator: /* @__PURE__ */ __name2(() => CredentialNameRefValidator, "CredentialNameRefValidator"),
16048
16051
  CredentialRecordValidator: /* @__PURE__ */ __name2(() => CredentialRecordValidator, "CredentialRecordValidator"),
16052
+ CredentialRefreshChallengeValidator: /* @__PURE__ */ __name2(() => CredentialRefreshChallengeValidator, "CredentialRefreshChallengeValidator"),
16053
+ CredentialRefreshFailedResultValidator: /* @__PURE__ */ __name2(() => CredentialRefreshFailedResultValidator, "CredentialRefreshFailedResultValidator"),
16054
+ CredentialRefreshFailureCodeValidator: /* @__PURE__ */ __name2(() => CredentialRefreshFailureCodeValidator, "CredentialRefreshFailureCodeValidator"),
16055
+ CredentialRefreshResponseEnvelopeValidator: /* @__PURE__ */ __name2(() => CredentialRefreshResponseEnvelopeValidator, "CredentialRefreshResponseEnvelopeValidator"),
16056
+ CredentialRefreshResultValidator: /* @__PURE__ */ __name2(() => CredentialRefreshResultValidator, "CredentialRefreshResultValidator"),
16057
+ CredentialRefreshSigningModeValidator: /* @__PURE__ */ __name2(() => CredentialRefreshSigningModeValidator, "CredentialRefreshSigningModeValidator"),
16058
+ CredentialRefreshUnchangedResultValidator: /* @__PURE__ */ __name2(() => CredentialRefreshUnchangedResultValidator, "CredentialRefreshUnchangedResultValidator"),
16059
+ CredentialRefreshUnsupportedResultValidator: /* @__PURE__ */ __name2(() => CredentialRefreshUnsupportedResultValidator, "CredentialRefreshUnsupportedResultValidator"),
16060
+ CredentialRefreshUpdatedResultValidator: /* @__PURE__ */ __name2(() => CredentialRefreshUpdatedResultValidator, "CredentialRefreshUpdatedResultValidator"),
16061
+ CredentialRefreshVersionMetadataValidator: /* @__PURE__ */ __name2(() => CredentialRefreshVersionMetadataValidator, "CredentialRefreshVersionMetadataValidator"),
16049
16062
  CredentialSchemaValidator: /* @__PURE__ */ __name2(() => CredentialSchemaValidator, "CredentialSchemaValidator"),
16050
16063
  CredentialStatusValidator: /* @__PURE__ */ __name2(() => CredentialStatusValidator, "CredentialStatusValidator"),
16051
16064
  CredentialSubjectValidator: /* @__PURE__ */ __name2(() => CredentialSubjectValidator, "CredentialSubjectValidator"),
@@ -16066,6 +16079,8 @@ var require_types_cjs_development = __commonJS({
16066
16079
  GeoCoordinatesValidator: /* @__PURE__ */ __name2(() => GeoCoordinatesValidator, "GeoCoordinatesValidator"),
16067
16080
  GetCounterEventValidator: /* @__PURE__ */ __name2(() => GetCounterEventValidator, "GetCounterEventValidator"),
16068
16081
  GetCountersEventValidator: /* @__PURE__ */ __name2(() => GetCountersEventValidator, "GetCountersEventValidator"),
16082
+ GetCredentialRefreshHistoryInputValidator: /* @__PURE__ */ __name2(() => GetCredentialRefreshHistoryInputValidator, "GetCredentialRefreshHistoryInputValidator"),
16083
+ GetCredentialRefreshHistoryResultValidator: /* @__PURE__ */ __name2(() => GetCredentialRefreshHistoryResultValidator, "GetCredentialRefreshHistoryResultValidator"),
16069
16084
  GetFullSkillTreeInputValidator: /* @__PURE__ */ __name2(() => GetFullSkillTreeInputValidator, "GetFullSkillTreeInputValidator"),
16070
16085
  GetFullSkillTreeResultValidator: /* @__PURE__ */ __name2(() => GetFullSkillTreeResultValidator, "GetFullSkillTreeResultValidator"),
16071
16086
  GetSkillPathInputValidator: /* @__PURE__ */ __name2(() => GetSkillPathInputValidator, "GetSkillPathInputValidator"),
@@ -16090,6 +16105,7 @@ var require_types_cjs_development = __commonJS({
16090
16105
  JWEValidator: /* @__PURE__ */ __name2(() => JWEValidator2, "JWEValidator"),
16091
16106
  JWKValidator: /* @__PURE__ */ __name2(() => JWKValidator, "JWKValidator"),
16092
16107
  JWKWithPrivateKeyValidator: /* @__PURE__ */ __name2(() => JWKWithPrivateKeyValidator, "JWKWithPrivateKeyValidator"),
16108
+ JweCredentialRefreshEnvelopeValidator: /* @__PURE__ */ __name2(() => JweCredentialRefreshEnvelopeValidator, "JweCredentialRefreshEnvelopeValidator"),
16093
16109
  KnownAchievementTypeValidator: /* @__PURE__ */ __name2(() => KnownAchievementTypeValidator, "KnownAchievementTypeValidator"),
16094
16110
  LCNAuthedProfileValidator: /* @__PURE__ */ __name2(() => LCNAuthedProfileValidator, "LCNAuthedProfileValidator"),
16095
16111
  LCNBoostClaimLinkOptionsValidator: /* @__PURE__ */ __name2(() => LCNBoostClaimLinkOptionsValidator, "LCNBoostClaimLinkOptionsValidator"),
@@ -16127,7 +16143,9 @@ var require_types_cjs_development = __commonJS({
16127
16143
  LCNSigningAuthorityValidator: /* @__PURE__ */ __name2(() => LCNSigningAuthorityValidator, "LCNSigningAuthorityValidator"),
16128
16144
  LCNVisibleProfileValidator: /* @__PURE__ */ __name2(() => LCNVisibleProfileValidator, "LCNVisibleProfileValidator"),
16129
16145
  LaunchTypeValidator: /* @__PURE__ */ __name2(() => LaunchTypeValidator, "LaunchTypeValidator"),
16146
+ LearnCardRefreshAuthorizationValidator: /* @__PURE__ */ __name2(() => LearnCardRefreshAuthorizationValidator, "LearnCardRefreshAuthorizationValidator"),
16130
16147
  LinkProviderFrameworkInputValidator: /* @__PURE__ */ __name2(() => LinkProviderFrameworkInputValidator, "LinkProviderFrameworkInputValidator"),
16148
+ ManagedCredentialRefreshServiceValidator: /* @__PURE__ */ __name2(() => ManagedCredentialRefreshServiceValidator, "ManagedCredentialRefreshServiceValidator"),
16131
16149
  PaginatedAppStoreListingsValidator: /* @__PURE__ */ __name2(() => PaginatedAppStoreListingsValidator, "PaginatedAppStoreListingsValidator"),
16132
16150
  PaginatedBoostRecipientsValidator: /* @__PURE__ */ __name2(() => PaginatedBoostRecipientsValidator, "PaginatedBoostRecipientsValidator"),
16133
16151
  PaginatedBoostRecipientsWithChildrenValidator: /* @__PURE__ */ __name2(() => PaginatedBoostRecipientsWithChildrenValidator, "PaginatedBoostRecipientsWithChildrenValidator"),
@@ -16157,6 +16175,12 @@ var require_types_cjs_development = __commonJS({
16157
16175
  ProfileVisibilityEnum: /* @__PURE__ */ __name2(() => ProfileVisibilityEnum, "ProfileVisibilityEnum"),
16158
16176
  PromotionLevelValidator: /* @__PURE__ */ __name2(() => PromotionLevelValidator, "PromotionLevelValidator"),
16159
16177
  ProofValidator: /* @__PURE__ */ __name2(() => ProofValidator, "ProofValidator"),
16178
+ PublicCredentialRefreshEnvelopeValidator: /* @__PURE__ */ __name2(() => PublicCredentialRefreshEnvelopeValidator, "PublicCredentialRefreshEnvelopeValidator"),
16179
+ PublishCredentialRefreshInputValidator: /* @__PURE__ */ __name2(() => PublishCredentialRefreshInputValidator, "PublishCredentialRefreshInputValidator"),
16180
+ PublishCredentialRefreshNotificationValidator: /* @__PURE__ */ __name2(() => PublishCredentialRefreshNotificationValidator, "PublishCredentialRefreshNotificationValidator"),
16181
+ PublishCredentialRefreshResultValidator: /* @__PURE__ */ __name2(() => PublishCredentialRefreshResultValidator, "PublishCredentialRefreshResultValidator"),
16182
+ PublishIssuerSignedRefreshValidator: /* @__PURE__ */ __name2(() => PublishIssuerSignedRefreshValidator, "PublishIssuerSignedRefreshValidator"),
16183
+ PublishSigningAuthorityRefreshValidator: /* @__PURE__ */ __name2(() => PublishSigningAuthorityRefreshValidator, "PublishSigningAuthorityRefreshValidator"),
16160
16184
  RefreshServiceValidator: /* @__PURE__ */ __name2(() => RefreshServiceValidator, "RefreshServiceValidator"),
16161
16185
  RegExpValidator: /* @__PURE__ */ __name2(() => RegExpValidator, "RegExpValidator"),
16162
16186
  RelatedValidator: /* @__PURE__ */ __name2(() => RelatedValidator, "RelatedValidator"),
@@ -16197,11 +16221,13 @@ var require_types_cjs_development = __commonJS({
16197
16221
  SkillTreeNodeInputValidator: /* @__PURE__ */ __name2(() => SkillTreeNodeInputValidator, "SkillTreeNodeInputValidator"),
16198
16222
  SkillTreeNodeValidator: /* @__PURE__ */ __name2(() => SkillTreeNodeValidator, "SkillTreeNodeValidator"),
16199
16223
  SkillValidator: /* @__PURE__ */ __name2(() => SkillValidator, "SkillValidator"),
16224
+ StandardCredentialRefreshServiceValidator: /* @__PURE__ */ __name2(() => StandardCredentialRefreshServiceValidator, "StandardCredentialRefreshServiceValidator"),
16200
16225
  StatusCheckEntryValidator: /* @__PURE__ */ __name2(() => StatusCheckEntryValidator, "StatusCheckEntryValidator"),
16201
16226
  StoredCredentialEnvelopeValidator: /* @__PURE__ */ __name2(() => StoredCredentialEnvelopeValidator, "StoredCredentialEnvelopeValidator"),
16202
16227
  StringQuery: /* @__PURE__ */ __name2(() => StringQuery, "StringQuery"),
16203
16228
  SummaryCredentialDataValidator: /* @__PURE__ */ __name2(() => SummaryCredentialDataValidator, "SummaryCredentialDataValidator"),
16204
16229
  SummaryCredentialKeywordValidator: /* @__PURE__ */ __name2(() => SummaryCredentialKeywordValidator, "SummaryCredentialKeywordValidator"),
16230
+ SupportedCredentialRefreshServiceValidator: /* @__PURE__ */ __name2(() => SupportedCredentialRefreshServiceValidator2, "SupportedCredentialRefreshServiceValidator"),
16205
16231
  SyncFrameworkInputValidator: /* @__PURE__ */ __name2(() => SyncFrameworkInputValidator, "SyncFrameworkInputValidator"),
16206
16232
  TagValidator: /* @__PURE__ */ __name2(() => TagValidator, "TagValidator"),
16207
16233
  TemplateRenderMethodValidator: /* @__PURE__ */ __name2(() => TemplateRenderMethodValidator, "TemplateRenderMethodValidator"),
@@ -32089,14 +32115,22 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
32089
32115
  }).catchall(external_exports2.any());
32090
32116
  var ProofValidator = external_exports2.object({
32091
32117
  type: external_exports2.string(),
32092
- created: external_exports2.string(),
32118
+ created: external_exports2.string().optional(),
32093
32119
  challenge: external_exports2.string().optional(),
32094
32120
  domain: external_exports2.string().optional(),
32095
32121
  nonce: external_exports2.string().optional(),
32096
32122
  proofPurpose: external_exports2.string(),
32097
32123
  verificationMethod: external_exports2.string(),
32098
32124
  jws: external_exports2.string().optional()
32099
- }).catchall(external_exports2.any());
32125
+ }).catchall(external_exports2.any()).superRefine((proof, ctx) => {
32126
+ if (proof.created === void 0 && (proof.type !== "DataIntegrityProof" || proof.cryptosuite !== "ecdsa-rdfc-2019")) {
32127
+ ctx.addIssue({
32128
+ code: "custom",
32129
+ path: ["created"],
32130
+ message: "created is required for this proof suite"
32131
+ });
32132
+ }
32133
+ });
32100
32134
  var VCValidator = UnsignedVCValidator.extend({
32101
32135
  proof: ProofValidator.or(ProofValidator.array())
32102
32136
  });
@@ -32857,7 +32891,10 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
32857
32891
  webhookUrl: external_exports2.string().url().optional().describe("Webhook URL to receive claim notifications"),
32858
32892
  suppressDelivery: external_exports2.boolean().optional().describe("If true, returns claimUrl without sending email/SMS"),
32859
32893
  branding: SendBrandingOptionsValidator.optional().describe("Branding for email/SMS delivery"),
32860
- guardianEmail: external_exports2.string().email().optional().describe("Guardian email that must approve before student can claim")
32894
+ guardianEmail: external_exports2.string().email().optional().describe("Guardian email that must approve before student can claim"),
32895
+ expiresInDays: external_exports2.number().int().min(1).max(720).optional().describe(
32896
+ "How many days the credential stays claimable in the Universal Inbox (default 30). Does not change the credential validity period."
32897
+ )
32861
32898
  });
32862
32899
  var SendBoostInputValidator = external_exports2.object({
32863
32900
  type: external_exports2.literal("boost"),
@@ -32978,15 +33015,6 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
32978
33015
  var PaginatedConsentFlowDataValidator = PaginationResponseValidator.extend({
32979
33016
  records: ConsentFlowContractDataValidator.array()
32980
33017
  });
32981
- var ConsentFlowContractDataForDidValidator = external_exports2.object({
32982
- credentials: external_exports2.object({ category: external_exports2.string(), uri: external_exports2.string() }).array(),
32983
- personal: external_exports2.record(external_exports2.string(), external_exports2.string()).default({}),
32984
- date: external_exports2.string(),
32985
- contractUri: external_exports2.string()
32986
- });
32987
- var PaginatedConsentFlowDataForDidValidator = PaginationResponseValidator.extend({
32988
- records: ConsentFlowContractDataForDidValidator.array()
32989
- });
32990
33018
  var ConsentFlowTermValidator = external_exports2.object({
32991
33019
  sharing: external_exports2.boolean().optional(),
32992
33020
  shared: external_exports2.string().array().optional(),
@@ -33020,6 +33048,34 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
33020
33048
  status: ConsentFlowTermsStatusValidator
33021
33049
  }).array()
33022
33050
  });
33051
+ var ConsentFlowGuardianApprovalValidator = external_exports2.object({
33052
+ guardianProfileId: external_exports2.string(),
33053
+ guardianDid: external_exports2.string(),
33054
+ approvedAt: external_exports2.string().datetime(),
33055
+ contractUpdatedAt: external_exports2.string()
33056
+ });
33057
+ var ConsentFlowContractDataForDidValidator = external_exports2.object({
33058
+ credentials: external_exports2.object({ category: external_exports2.string(), uri: external_exports2.string() }).array(),
33059
+ personal: external_exports2.record(external_exports2.string(), external_exports2.string()).default({}),
33060
+ date: external_exports2.string(),
33061
+ createdAt: external_exports2.string().optional(),
33062
+ contractUpdatedAt: external_exports2.string(),
33063
+ contractExpiresAt: external_exports2.string().optional(),
33064
+ reasonForAccessing: external_exports2.string().optional(),
33065
+ guardian: external_exports2.object({
33066
+ required: external_exports2.boolean(),
33067
+ approved: external_exports2.boolean(),
33068
+ approval: ConsentFlowGuardianApprovalValidator.optional()
33069
+ }),
33070
+ contractUri: external_exports2.string(),
33071
+ termsUri: external_exports2.string(),
33072
+ status: ConsentFlowTermsStatusValidator,
33073
+ expiresAt: external_exports2.string().optional(),
33074
+ terms: ConsentFlowTermsValidator
33075
+ });
33076
+ var PaginatedConsentFlowDataForDidValidator = PaginationResponseValidator.extend({
33077
+ records: ConsentFlowContractDataForDidValidator.array()
33078
+ });
33023
33079
  var ConsentFlowContractQueryValidator = external_exports2.object({
33024
33080
  read: external_exports2.object({
33025
33081
  anonymize: external_exports2.boolean().optional(),
@@ -33080,6 +33136,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
33080
33136
  expiresAt: external_exports2.string().optional(),
33081
33137
  oneTime: external_exports2.boolean().optional(),
33082
33138
  terms: ConsentFlowTermsValidator.optional(),
33139
+ guardianApproval: ConsentFlowGuardianApprovalValidator.optional(),
33083
33140
  id: external_exports2.string(),
33084
33141
  action: ConsentFlowTransactionActionValidator,
33085
33142
  date: external_exports2.string(),
@@ -33152,7 +33209,8 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
33152
33209
  "APP_NOTIFICATION",
33153
33210
  "CREDENTIAL_REVOKED",
33154
33211
  "CREDENTIAL_SUSPENDED",
33155
- "CREDENTIAL_UNSUSPENDED"
33212
+ "CREDENTIAL_UNSUSPENDED",
33213
+ "CREDENTIAL_REFRESHED"
33156
33214
  ]);
33157
33215
  var LCNNotificationMessageValidator = external_exports2.object({
33158
33216
  title: external_exports2.string().optional(),
@@ -33284,12 +33342,16 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
33284
33342
  });
33285
33343
  var InboxCredentialValidator = external_exports2.object({
33286
33344
  id: external_exports2.string(),
33287
- credential: external_exports2.string(),
33345
+ credential: external_exports2.string().optional(),
33288
33346
  isSigned: external_exports2.boolean(),
33289
33347
  currentStatus: LCNInboxStatusEnumValidator,
33290
33348
  isAccepted: external_exports2.boolean().optional(),
33291
33349
  expiresAt: external_exports2.string(),
33292
33350
  createdAt: external_exports2.string(),
33351
+ finalizedAt: external_exports2.string().optional(),
33352
+ expiredAt: external_exports2.string().optional(),
33353
+ credentialName: external_exports2.string().optional(),
33354
+ achievementType: external_exports2.string().optional(),
33293
33355
  issuerDid: external_exports2.string(),
33294
33356
  webhookUrl: external_exports2.string().optional(),
33295
33357
  boostUri: external_exports2.string().optional(),
@@ -33343,7 +33405,9 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
33343
33405
  "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."
33344
33406
  ),
33345
33407
  webhookUrl: external_exports2.string().url().optional().describe("The webhook URL to receive credential issuance events."),
33346
- expiresInDays: external_exports2.number().min(1).max(365).optional().describe("The number of days the credential will be valid for."),
33408
+ expiresInDays: external_exports2.number().int().min(1).max(720).optional().describe(
33409
+ "How many days the encrypted inbox payload remains claimable. This does not change the credential validity period."
33410
+ ),
33347
33411
  templateData: external_exports2.record(external_exports2.string(), external_exports2.unknown()).optional().describe(
33348
33412
  "Template data to render into the boost credential template using Mustache syntax. Only used when boostUri is provided."
33349
33413
  ),
@@ -33406,6 +33470,9 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
33406
33470
  credential: VCValidator.or(VPValidator).or(UnsignedVCValidator).or(CredentialNameRefValidator).describe("The credential to issue, or a { name } reference to resolve a boost template."),
33407
33471
  configuration: external_exports2.object({
33408
33472
  publishableKey: external_exports2.string(),
33473
+ expiresInDays: external_exports2.number().int().min(1).max(720).optional().describe(
33474
+ "Inbox claim window in days. Defaults to 720; use a shorter window for sensitive records."
33475
+ ),
33409
33476
  signingAuthorityName: external_exports2.string().optional(),
33410
33477
  listingId: external_exports2.string().optional(),
33411
33478
  listingSlug: external_exports2.string().optional()
@@ -34046,6 +34113,191 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
34046
34113
  const result = inAppMessagesFlagValidator.safeParse(raw);
34047
34114
  return result.success ? result.data : EMPTY_IN_APP_MESSAGES_FLAG;
34048
34115
  }, "parseInAppMessagesFlag");
34116
+ var LearnCardRefreshAuthorizationValidator = external_exports2.object({ type: external_exports2.literal("LearnCardDIDAuth") }).catchall(external_exports2.any());
34117
+ var ManagedCredentialRefreshServiceValidator = external_exports2.object({
34118
+ id: external_exports2.string().min(1),
34119
+ type: external_exports2.literal("LearnCardCredentialRefresh2026"),
34120
+ authorization: LearnCardRefreshAuthorizationValidator.optional()
34121
+ }).catchall(external_exports2.any());
34122
+ var StandardCredentialRefreshServiceValidator = external_exports2.object({
34123
+ id: external_exports2.string().min(1),
34124
+ type: external_exports2.literal("1EdTechCredentialRefresh")
34125
+ }).catchall(external_exports2.any());
34126
+ var SupportedCredentialRefreshServiceValidator2 = external_exports2.union([
34127
+ ManagedCredentialRefreshServiceValidator,
34128
+ StandardCredentialRefreshServiceValidator
34129
+ ]);
34130
+ var AllocateCredentialRefreshInputValidator = external_exports2.object({
34131
+ holder: external_exports2.object({
34132
+ profileId: external_exports2.string().optional(),
34133
+ did: external_exports2.string().min(1)
34134
+ }),
34135
+ credentialId: external_exports2.string().min(1)
34136
+ });
34137
+ var AllocateCredentialRefreshResultValidator = external_exports2.object({
34138
+ refreshId: external_exports2.string().min(1),
34139
+ refreshService: ManagedCredentialRefreshServiceValidator.extend({
34140
+ authorization: LearnCardRefreshAuthorizationValidator
34141
+ })
34142
+ });
34143
+ var CredentialRefreshSigningModeValidator = external_exports2.enum(["issuer-signed", "signing-authority"]);
34144
+ var PublishCredentialRefreshBaseFields = {
34145
+ refreshId: external_exports2.string().min(1),
34146
+ notifyHolder: external_exports2.boolean().optional(),
34147
+ updateSummary: external_exports2.string().optional(),
34148
+ idempotencyKey: external_exports2.string().optional()
34149
+ };
34150
+ var PublishIssuerSignedRefreshValidator = external_exports2.object({
34151
+ ...PublishCredentialRefreshBaseFields,
34152
+ mode: external_exports2.literal("issuer-signed"),
34153
+ signedCredential: VCValidator
34154
+ });
34155
+ var PublishSigningAuthorityRefreshValidator = external_exports2.object({
34156
+ ...PublishCredentialRefreshBaseFields,
34157
+ mode: external_exports2.literal("signing-authority"),
34158
+ credential: UnsignedVCValidator,
34159
+ signingAuthority: external_exports2.object({
34160
+ type: external_exports2.string().min(1)
34161
+ }).catchall(external_exports2.any())
34162
+ });
34163
+ var PublishCredentialRefreshInputValidator = external_exports2.object({
34164
+ ...PublishCredentialRefreshBaseFields,
34165
+ mode: CredentialRefreshSigningModeValidator,
34166
+ signedCredential: VCValidator.optional(),
34167
+ credential: UnsignedVCValidator.optional(),
34168
+ signingAuthority: external_exports2.object({
34169
+ type: external_exports2.string().min(1)
34170
+ }).catchall(external_exports2.any()).optional()
34171
+ }).superRefine((input, ctx) => {
34172
+ if (input.mode === "issuer-signed" && !input.signedCredential) {
34173
+ ctx.addIssue({
34174
+ code: "custom",
34175
+ path: ["signedCredential"],
34176
+ message: "signedCredential is required for issuer-signed publication"
34177
+ });
34178
+ }
34179
+ if (input.mode === "issuer-signed" && (input.credential !== void 0 || input.signingAuthority !== void 0)) {
34180
+ ctx.addIssue({
34181
+ code: "custom",
34182
+ path: ["mode"],
34183
+ message: "issuer-signed publication cannot include signing-authority fields"
34184
+ });
34185
+ }
34186
+ if (input.mode === "signing-authority") {
34187
+ if (input.signedCredential !== void 0) {
34188
+ ctx.addIssue({
34189
+ code: "custom",
34190
+ path: ["signedCredential"],
34191
+ message: "signing-authority publication cannot include signedCredential"
34192
+ });
34193
+ }
34194
+ if (!input.credential) {
34195
+ ctx.addIssue({
34196
+ code: "custom",
34197
+ path: ["credential"],
34198
+ message: "credential is required for signing-authority publication"
34199
+ });
34200
+ }
34201
+ if (!input.signingAuthority) {
34202
+ ctx.addIssue({
34203
+ code: "custom",
34204
+ path: ["signingAuthority"],
34205
+ message: "signingAuthority is required for signing-authority publication"
34206
+ });
34207
+ }
34208
+ }
34209
+ });
34210
+ var PublishCredentialRefreshNotificationValidator = external_exports2.enum([
34211
+ "queued",
34212
+ "suppressed",
34213
+ "not-applicable",
34214
+ /** Publication succeeded, but the post-commit notification enqueue must be retried. */
34215
+ "delivery-failed"
34216
+ ]);
34217
+ var PublishCredentialRefreshResultValidator = external_exports2.object({
34218
+ refreshId: external_exports2.string().min(1),
34219
+ version: external_exports2.number().int().positive(),
34220
+ publishedAt: external_exports2.string().min(1),
34221
+ notification: PublishCredentialRefreshNotificationValidator
34222
+ });
34223
+ var CredentialRefreshVersionMetadataValidator = external_exports2.object({
34224
+ version: external_exports2.number().int().positive(),
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
34262
+ ]);
34263
+ var CredentialRefreshFailureCodeValidator = external_exports2.enum([
34264
+ "UNAVAILABLE",
34265
+ "TIMEOUT",
34266
+ "UNSUPPORTED_SERVICE",
34267
+ "UNAUTHORIZED",
34268
+ "MALFORMED_RESPONSE",
34269
+ "INVALID_PROOF",
34270
+ "ISSUER_MISMATCH",
34271
+ "ID_MISMATCH",
34272
+ "ROLLBACK",
34273
+ "REVOKED",
34274
+ "UNSAFE_ENDPOINT"
34275
+ ]);
34276
+ var CredentialRefreshUpdatedResultValidator = external_exports2.object({
34277
+ status: external_exports2.literal("updated"),
34278
+ credential: VCValidator,
34279
+ etag: external_exports2.string().optional(),
34280
+ managedVersion: external_exports2.number().int().positive().optional()
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()
34294
+ });
34295
+ var CredentialRefreshResultValidator = external_exports2.discriminatedUnion("status", [
34296
+ CredentialRefreshUpdatedResultValidator,
34297
+ CredentialRefreshUnchangedResultValidator,
34298
+ CredentialRefreshUnsupportedResultValidator,
34299
+ CredentialRefreshFailedResultValidator
34300
+ ]);
34049
34301
  }
34050
34302
  });
34051
34303
  var require_dist = __commonJS({
@@ -34058,7 +34310,7 @@ var require_dist = __commonJS({
34058
34310
  }
34059
34311
  }
34060
34312
  });
34061
- var import_types2 = __toESM(require_dist());
34313
+ var import_types3 = __toESM(require_dist());
34062
34314
  var filestack_helpers_exports = {};
34063
34315
  __export2(filestack_helpers_exports, {
34064
34316
  changeQuality: /* @__PURE__ */ __name(() => changeQuality, "changeQuality"),
@@ -34339,7 +34591,8 @@ var ImageWithLoadingStateValdator = external_exports.object({
34339
34591
  image: external_exports.string(),
34340
34592
  loading: external_exports.union([ImageResizingValidator, ImageUploadingValidator]).optional()
34341
34593
  });
34342
- var import_types3 = __toESM(require_dist());
34594
+ var import_types2 = __toESM(require_dist());
34595
+ var import_types22 = __toESM(require_dist());
34343
34596
  var EnvironmentConfigurationError = class extends Error {
34344
34597
  static {
34345
34598
  __name(this, "EnvironmentConfigurationError");
@@ -35794,21 +36047,24 @@ var callbackLink = /* @__PURE__ */ __name((callback) => {
35794
36047
  attempts += 1;
35795
36048
  request?.unsubscribe();
35796
36049
  request = next(op).subscribe({
35797
- error: /* @__PURE__ */ __name(async (error51) => {
36050
+ error: /* @__PURE__ */ __name((error51) => {
36051
+ if (isDone) return;
35798
36052
  if (attempts > 5 || error51.data?.httpStatus !== 401) {
35799
- return observer.error(error51);
35800
- }
35801
- try {
35802
- await callback();
35803
- } catch {
35804
- if (!isDone) observer.error(error51);
36053
+ observer.error(error51);
35805
36054
  return;
35806
36055
  }
35807
- if (!isDone) attempt();
36056
+ void callback().then(
36057
+ () => {
36058
+ if (!isDone) attempt();
36059
+ },
36060
+ () => {
36061
+ if (!isDone) observer.error(error51);
36062
+ }
36063
+ );
35808
36064
  }, "error"),
35809
36065
  next: /* @__PURE__ */ __name((result) => observer.next(result), "next"),
35810
36066
  complete: /* @__PURE__ */ __name(() => {
35811
- if (isDone) observer.complete();
36067
+ if (!isDone) observer.complete();
35812
36068
  }, "complete")
35813
36069
  });
35814
36070
  }, "attempt");
@@ -35859,7 +36115,6 @@ var getClient = /* @__PURE__ */ __name(async (url2, didAuthFunction, guardianApp
35859
36115
  await refillChallenges();
35860
36116
  }
35861
36117
  }, "takeChallenge");
35862
- void refillChallenges().catch(() => void 0);
35863
36118
  const trpc = createTRPCClient({
35864
36119
  links: [
35865
36120
  callbackLink(async () => {
@@ -35911,9 +36166,23 @@ var getApiTokenClient = /* @__PURE__ */ __name(async (url2, apiToken, guardianAp
35911
36166
  });
35912
36167
  return trpc;
35913
36168
  }, "getApiTokenClient");
36169
+ var getAnonymousClient = /* @__PURE__ */ __name((url2) => createTRPCClient({
36170
+ links: [
36171
+ httpBatchLink({
36172
+ methodOverride: "POST",
36173
+ url: url2,
36174
+ maxURLLength: 3072,
36175
+ transformer: {
36176
+ input: RegExpTransformer,
36177
+ output: { serialize: /* @__PURE__ */ __name((o) => o, "serialize"), deserialize: /* @__PURE__ */ __name((o) => o, "deserialize") }
36178
+ }
36179
+ })
36180
+ ]
36181
+ }), "getAnonymousClient");
35914
36182
  var index_default = getClient;
35915
36183
  export {
35916
36184
  index_default as default,
36185
+ getAnonymousClient,
35917
36186
  getApiTokenClient,
35918
36187
  getClient
35919
36188
  };