@learncard/network-brain-client 2.5.53 → 2.5.55

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"),
@@ -16046,6 +16048,16 @@ var require_types_cjs_development = __commonJS({
16046
16048
  CredentialInfoValidator: /* @__PURE__ */ __name2(() => CredentialInfoValidator, "CredentialInfoValidator"),
16047
16049
  CredentialNameRefValidator: /* @__PURE__ */ __name2(() => CredentialNameRefValidator, "CredentialNameRefValidator"),
16048
16050
  CredentialRecordValidator: /* @__PURE__ */ __name2(() => CredentialRecordValidator, "CredentialRecordValidator"),
16051
+ CredentialRefreshChallengeValidator: /* @__PURE__ */ __name2(() => CredentialRefreshChallengeValidator, "CredentialRefreshChallengeValidator"),
16052
+ CredentialRefreshFailedResultValidator: /* @__PURE__ */ __name2(() => CredentialRefreshFailedResultValidator, "CredentialRefreshFailedResultValidator"),
16053
+ CredentialRefreshFailureCodeValidator: /* @__PURE__ */ __name2(() => CredentialRefreshFailureCodeValidator, "CredentialRefreshFailureCodeValidator"),
16054
+ CredentialRefreshResponseEnvelopeValidator: /* @__PURE__ */ __name2(() => CredentialRefreshResponseEnvelopeValidator, "CredentialRefreshResponseEnvelopeValidator"),
16055
+ CredentialRefreshResultValidator: /* @__PURE__ */ __name2(() => CredentialRefreshResultValidator, "CredentialRefreshResultValidator"),
16056
+ CredentialRefreshSigningModeValidator: /* @__PURE__ */ __name2(() => CredentialRefreshSigningModeValidator, "CredentialRefreshSigningModeValidator"),
16057
+ CredentialRefreshUnchangedResultValidator: /* @__PURE__ */ __name2(() => CredentialRefreshUnchangedResultValidator, "CredentialRefreshUnchangedResultValidator"),
16058
+ CredentialRefreshUnsupportedResultValidator: /* @__PURE__ */ __name2(() => CredentialRefreshUnsupportedResultValidator, "CredentialRefreshUnsupportedResultValidator"),
16059
+ CredentialRefreshUpdatedResultValidator: /* @__PURE__ */ __name2(() => CredentialRefreshUpdatedResultValidator, "CredentialRefreshUpdatedResultValidator"),
16060
+ CredentialRefreshVersionMetadataValidator: /* @__PURE__ */ __name2(() => CredentialRefreshVersionMetadataValidator, "CredentialRefreshVersionMetadataValidator"),
16049
16061
  CredentialSchemaValidator: /* @__PURE__ */ __name2(() => CredentialSchemaValidator, "CredentialSchemaValidator"),
16050
16062
  CredentialStatusValidator: /* @__PURE__ */ __name2(() => CredentialStatusValidator, "CredentialStatusValidator"),
16051
16063
  CredentialSubjectValidator: /* @__PURE__ */ __name2(() => CredentialSubjectValidator, "CredentialSubjectValidator"),
@@ -16066,6 +16078,8 @@ var require_types_cjs_development = __commonJS({
16066
16078
  GeoCoordinatesValidator: /* @__PURE__ */ __name2(() => GeoCoordinatesValidator, "GeoCoordinatesValidator"),
16067
16079
  GetCounterEventValidator: /* @__PURE__ */ __name2(() => GetCounterEventValidator, "GetCounterEventValidator"),
16068
16080
  GetCountersEventValidator: /* @__PURE__ */ __name2(() => GetCountersEventValidator, "GetCountersEventValidator"),
16081
+ GetCredentialRefreshHistoryInputValidator: /* @__PURE__ */ __name2(() => GetCredentialRefreshHistoryInputValidator, "GetCredentialRefreshHistoryInputValidator"),
16082
+ GetCredentialRefreshHistoryResultValidator: /* @__PURE__ */ __name2(() => GetCredentialRefreshHistoryResultValidator, "GetCredentialRefreshHistoryResultValidator"),
16069
16083
  GetFullSkillTreeInputValidator: /* @__PURE__ */ __name2(() => GetFullSkillTreeInputValidator, "GetFullSkillTreeInputValidator"),
16070
16084
  GetFullSkillTreeResultValidator: /* @__PURE__ */ __name2(() => GetFullSkillTreeResultValidator, "GetFullSkillTreeResultValidator"),
16071
16085
  GetSkillPathInputValidator: /* @__PURE__ */ __name2(() => GetSkillPathInputValidator, "GetSkillPathInputValidator"),
@@ -16090,6 +16104,7 @@ var require_types_cjs_development = __commonJS({
16090
16104
  JWEValidator: /* @__PURE__ */ __name2(() => JWEValidator2, "JWEValidator"),
16091
16105
  JWKValidator: /* @__PURE__ */ __name2(() => JWKValidator, "JWKValidator"),
16092
16106
  JWKWithPrivateKeyValidator: /* @__PURE__ */ __name2(() => JWKWithPrivateKeyValidator, "JWKWithPrivateKeyValidator"),
16107
+ JweCredentialRefreshEnvelopeValidator: /* @__PURE__ */ __name2(() => JweCredentialRefreshEnvelopeValidator, "JweCredentialRefreshEnvelopeValidator"),
16093
16108
  KnownAchievementTypeValidator: /* @__PURE__ */ __name2(() => KnownAchievementTypeValidator, "KnownAchievementTypeValidator"),
16094
16109
  LCNAuthedProfileValidator: /* @__PURE__ */ __name2(() => LCNAuthedProfileValidator, "LCNAuthedProfileValidator"),
16095
16110
  LCNBoostClaimLinkOptionsValidator: /* @__PURE__ */ __name2(() => LCNBoostClaimLinkOptionsValidator, "LCNBoostClaimLinkOptionsValidator"),
@@ -16127,7 +16142,9 @@ var require_types_cjs_development = __commonJS({
16127
16142
  LCNSigningAuthorityValidator: /* @__PURE__ */ __name2(() => LCNSigningAuthorityValidator, "LCNSigningAuthorityValidator"),
16128
16143
  LCNVisibleProfileValidator: /* @__PURE__ */ __name2(() => LCNVisibleProfileValidator, "LCNVisibleProfileValidator"),
16129
16144
  LaunchTypeValidator: /* @__PURE__ */ __name2(() => LaunchTypeValidator, "LaunchTypeValidator"),
16145
+ LearnCardRefreshAuthorizationValidator: /* @__PURE__ */ __name2(() => LearnCardRefreshAuthorizationValidator, "LearnCardRefreshAuthorizationValidator"),
16130
16146
  LinkProviderFrameworkInputValidator: /* @__PURE__ */ __name2(() => LinkProviderFrameworkInputValidator, "LinkProviderFrameworkInputValidator"),
16147
+ ManagedCredentialRefreshServiceValidator: /* @__PURE__ */ __name2(() => ManagedCredentialRefreshServiceValidator, "ManagedCredentialRefreshServiceValidator"),
16131
16148
  PaginatedAppStoreListingsValidator: /* @__PURE__ */ __name2(() => PaginatedAppStoreListingsValidator, "PaginatedAppStoreListingsValidator"),
16132
16149
  PaginatedBoostRecipientsValidator: /* @__PURE__ */ __name2(() => PaginatedBoostRecipientsValidator, "PaginatedBoostRecipientsValidator"),
16133
16150
  PaginatedBoostRecipientsWithChildrenValidator: /* @__PURE__ */ __name2(() => PaginatedBoostRecipientsWithChildrenValidator, "PaginatedBoostRecipientsWithChildrenValidator"),
@@ -16157,6 +16174,12 @@ var require_types_cjs_development = __commonJS({
16157
16174
  ProfileVisibilityEnum: /* @__PURE__ */ __name2(() => ProfileVisibilityEnum, "ProfileVisibilityEnum"),
16158
16175
  PromotionLevelValidator: /* @__PURE__ */ __name2(() => PromotionLevelValidator, "PromotionLevelValidator"),
16159
16176
  ProofValidator: /* @__PURE__ */ __name2(() => ProofValidator, "ProofValidator"),
16177
+ PublicCredentialRefreshEnvelopeValidator: /* @__PURE__ */ __name2(() => PublicCredentialRefreshEnvelopeValidator, "PublicCredentialRefreshEnvelopeValidator"),
16178
+ PublishCredentialRefreshInputValidator: /* @__PURE__ */ __name2(() => PublishCredentialRefreshInputValidator, "PublishCredentialRefreshInputValidator"),
16179
+ PublishCredentialRefreshNotificationValidator: /* @__PURE__ */ __name2(() => PublishCredentialRefreshNotificationValidator, "PublishCredentialRefreshNotificationValidator"),
16180
+ PublishCredentialRefreshResultValidator: /* @__PURE__ */ __name2(() => PublishCredentialRefreshResultValidator, "PublishCredentialRefreshResultValidator"),
16181
+ PublishIssuerSignedRefreshValidator: /* @__PURE__ */ __name2(() => PublishIssuerSignedRefreshValidator, "PublishIssuerSignedRefreshValidator"),
16182
+ PublishSigningAuthorityRefreshValidator: /* @__PURE__ */ __name2(() => PublishSigningAuthorityRefreshValidator, "PublishSigningAuthorityRefreshValidator"),
16160
16183
  RefreshServiceValidator: /* @__PURE__ */ __name2(() => RefreshServiceValidator, "RefreshServiceValidator"),
16161
16184
  RegExpValidator: /* @__PURE__ */ __name2(() => RegExpValidator, "RegExpValidator"),
16162
16185
  RelatedValidator: /* @__PURE__ */ __name2(() => RelatedValidator, "RelatedValidator"),
@@ -16197,11 +16220,13 @@ var require_types_cjs_development = __commonJS({
16197
16220
  SkillTreeNodeInputValidator: /* @__PURE__ */ __name2(() => SkillTreeNodeInputValidator, "SkillTreeNodeInputValidator"),
16198
16221
  SkillTreeNodeValidator: /* @__PURE__ */ __name2(() => SkillTreeNodeValidator, "SkillTreeNodeValidator"),
16199
16222
  SkillValidator: /* @__PURE__ */ __name2(() => SkillValidator, "SkillValidator"),
16223
+ StandardCredentialRefreshServiceValidator: /* @__PURE__ */ __name2(() => StandardCredentialRefreshServiceValidator, "StandardCredentialRefreshServiceValidator"),
16200
16224
  StatusCheckEntryValidator: /* @__PURE__ */ __name2(() => StatusCheckEntryValidator, "StatusCheckEntryValidator"),
16201
16225
  StoredCredentialEnvelopeValidator: /* @__PURE__ */ __name2(() => StoredCredentialEnvelopeValidator, "StoredCredentialEnvelopeValidator"),
16202
16226
  StringQuery: /* @__PURE__ */ __name2(() => StringQuery, "StringQuery"),
16203
16227
  SummaryCredentialDataValidator: /* @__PURE__ */ __name2(() => SummaryCredentialDataValidator, "SummaryCredentialDataValidator"),
16204
16228
  SummaryCredentialKeywordValidator: /* @__PURE__ */ __name2(() => SummaryCredentialKeywordValidator, "SummaryCredentialKeywordValidator"),
16229
+ SupportedCredentialRefreshServiceValidator: /* @__PURE__ */ __name2(() => SupportedCredentialRefreshServiceValidator2, "SupportedCredentialRefreshServiceValidator"),
16205
16230
  SyncFrameworkInputValidator: /* @__PURE__ */ __name2(() => SyncFrameworkInputValidator, "SyncFrameworkInputValidator"),
16206
16231
  TagValidator: /* @__PURE__ */ __name2(() => TagValidator, "TagValidator"),
16207
16232
  TemplateRenderMethodValidator: /* @__PURE__ */ __name2(() => TemplateRenderMethodValidator, "TemplateRenderMethodValidator"),
@@ -32857,7 +32882,10 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
32857
32882
  webhookUrl: external_exports2.string().url().optional().describe("Webhook URL to receive claim notifications"),
32858
32883
  suppressDelivery: external_exports2.boolean().optional().describe("If true, returns claimUrl without sending email/SMS"),
32859
32884
  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")
32885
+ guardianEmail: external_exports2.string().email().optional().describe("Guardian email that must approve before student can claim"),
32886
+ expiresInDays: external_exports2.number().int().min(1).max(720).optional().describe(
32887
+ "How many days the credential stays claimable in the Universal Inbox (default 30). Does not change the credential validity period."
32888
+ )
32861
32889
  });
32862
32890
  var SendBoostInputValidator = external_exports2.object({
32863
32891
  type: external_exports2.literal("boost"),
@@ -33152,7 +33180,8 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
33152
33180
  "APP_NOTIFICATION",
33153
33181
  "CREDENTIAL_REVOKED",
33154
33182
  "CREDENTIAL_SUSPENDED",
33155
- "CREDENTIAL_UNSUSPENDED"
33183
+ "CREDENTIAL_UNSUSPENDED",
33184
+ "CREDENTIAL_REFRESHED"
33156
33185
  ]);
33157
33186
  var LCNNotificationMessageValidator = external_exports2.object({
33158
33187
  title: external_exports2.string().optional(),
@@ -33284,12 +33313,16 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
33284
33313
  });
33285
33314
  var InboxCredentialValidator = external_exports2.object({
33286
33315
  id: external_exports2.string(),
33287
- credential: external_exports2.string(),
33316
+ credential: external_exports2.string().optional(),
33288
33317
  isSigned: external_exports2.boolean(),
33289
33318
  currentStatus: LCNInboxStatusEnumValidator,
33290
33319
  isAccepted: external_exports2.boolean().optional(),
33291
33320
  expiresAt: external_exports2.string(),
33292
33321
  createdAt: external_exports2.string(),
33322
+ finalizedAt: external_exports2.string().optional(),
33323
+ expiredAt: external_exports2.string().optional(),
33324
+ credentialName: external_exports2.string().optional(),
33325
+ achievementType: external_exports2.string().optional(),
33293
33326
  issuerDid: external_exports2.string(),
33294
33327
  webhookUrl: external_exports2.string().optional(),
33295
33328
  boostUri: external_exports2.string().optional(),
@@ -33343,7 +33376,9 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
33343
33376
  "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
33377
  ),
33345
33378
  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."),
33379
+ expiresInDays: external_exports2.number().int().min(1).max(720).optional().describe(
33380
+ "How many days the encrypted inbox payload remains claimable. This does not change the credential validity period."
33381
+ ),
33347
33382
  templateData: external_exports2.record(external_exports2.string(), external_exports2.unknown()).optional().describe(
33348
33383
  "Template data to render into the boost credential template using Mustache syntax. Only used when boostUri is provided."
33349
33384
  ),
@@ -33406,6 +33441,9 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
33406
33441
  credential: VCValidator.or(VPValidator).or(UnsignedVCValidator).or(CredentialNameRefValidator).describe("The credential to issue, or a { name } reference to resolve a boost template."),
33407
33442
  configuration: external_exports2.object({
33408
33443
  publishableKey: external_exports2.string(),
33444
+ expiresInDays: external_exports2.number().int().min(1).max(720).optional().describe(
33445
+ "Inbox claim window in days. Defaults to 720; use a shorter window for sensitive records."
33446
+ ),
33409
33447
  signingAuthorityName: external_exports2.string().optional(),
33410
33448
  listingId: external_exports2.string().optional(),
33411
33449
  listingSlug: external_exports2.string().optional()
@@ -34046,6 +34084,191 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
34046
34084
  const result = inAppMessagesFlagValidator.safeParse(raw);
34047
34085
  return result.success ? result.data : EMPTY_IN_APP_MESSAGES_FLAG;
34048
34086
  }, "parseInAppMessagesFlag");
34087
+ var LearnCardRefreshAuthorizationValidator = external_exports2.object({ type: external_exports2.literal("LearnCardDIDAuth") }).catchall(external_exports2.any());
34088
+ var ManagedCredentialRefreshServiceValidator = external_exports2.object({
34089
+ id: external_exports2.string().min(1),
34090
+ type: external_exports2.literal("LearnCardCredentialRefresh2026"),
34091
+ authorization: LearnCardRefreshAuthorizationValidator.optional()
34092
+ }).catchall(external_exports2.any());
34093
+ var StandardCredentialRefreshServiceValidator = external_exports2.object({
34094
+ id: external_exports2.string().min(1),
34095
+ type: external_exports2.literal("1EdTechCredentialRefresh")
34096
+ }).catchall(external_exports2.any());
34097
+ var SupportedCredentialRefreshServiceValidator2 = external_exports2.union([
34098
+ ManagedCredentialRefreshServiceValidator,
34099
+ StandardCredentialRefreshServiceValidator
34100
+ ]);
34101
+ var AllocateCredentialRefreshInputValidator = external_exports2.object({
34102
+ holder: external_exports2.object({
34103
+ profileId: external_exports2.string().optional(),
34104
+ did: external_exports2.string().min(1)
34105
+ }),
34106
+ credentialId: external_exports2.string().min(1)
34107
+ });
34108
+ var AllocateCredentialRefreshResultValidator = external_exports2.object({
34109
+ refreshId: external_exports2.string().min(1),
34110
+ refreshService: ManagedCredentialRefreshServiceValidator.extend({
34111
+ authorization: LearnCardRefreshAuthorizationValidator
34112
+ })
34113
+ });
34114
+ var CredentialRefreshSigningModeValidator = external_exports2.enum(["issuer-signed", "signing-authority"]);
34115
+ var PublishCredentialRefreshBaseFields = {
34116
+ refreshId: external_exports2.string().min(1),
34117
+ notifyHolder: external_exports2.boolean().optional(),
34118
+ updateSummary: external_exports2.string().optional(),
34119
+ idempotencyKey: external_exports2.string().optional()
34120
+ };
34121
+ var PublishIssuerSignedRefreshValidator = external_exports2.object({
34122
+ ...PublishCredentialRefreshBaseFields,
34123
+ mode: external_exports2.literal("issuer-signed"),
34124
+ signedCredential: VCValidator
34125
+ });
34126
+ var PublishSigningAuthorityRefreshValidator = external_exports2.object({
34127
+ ...PublishCredentialRefreshBaseFields,
34128
+ mode: external_exports2.literal("signing-authority"),
34129
+ credential: UnsignedVCValidator,
34130
+ signingAuthority: external_exports2.object({
34131
+ type: external_exports2.string().min(1)
34132
+ }).catchall(external_exports2.any())
34133
+ });
34134
+ var PublishCredentialRefreshInputValidator = external_exports2.object({
34135
+ ...PublishCredentialRefreshBaseFields,
34136
+ mode: CredentialRefreshSigningModeValidator,
34137
+ signedCredential: VCValidator.optional(),
34138
+ credential: UnsignedVCValidator.optional(),
34139
+ signingAuthority: external_exports2.object({
34140
+ type: external_exports2.string().min(1)
34141
+ }).catchall(external_exports2.any()).optional()
34142
+ }).superRefine((input, ctx) => {
34143
+ if (input.mode === "issuer-signed" && !input.signedCredential) {
34144
+ ctx.addIssue({
34145
+ code: "custom",
34146
+ path: ["signedCredential"],
34147
+ message: "signedCredential is required for issuer-signed publication"
34148
+ });
34149
+ }
34150
+ if (input.mode === "issuer-signed" && (input.credential !== void 0 || input.signingAuthority !== void 0)) {
34151
+ ctx.addIssue({
34152
+ code: "custom",
34153
+ path: ["mode"],
34154
+ message: "issuer-signed publication cannot include signing-authority fields"
34155
+ });
34156
+ }
34157
+ if (input.mode === "signing-authority") {
34158
+ if (input.signedCredential !== void 0) {
34159
+ ctx.addIssue({
34160
+ code: "custom",
34161
+ path: ["signedCredential"],
34162
+ message: "signing-authority publication cannot include signedCredential"
34163
+ });
34164
+ }
34165
+ if (!input.credential) {
34166
+ ctx.addIssue({
34167
+ code: "custom",
34168
+ path: ["credential"],
34169
+ message: "credential is required for signing-authority publication"
34170
+ });
34171
+ }
34172
+ if (!input.signingAuthority) {
34173
+ ctx.addIssue({
34174
+ code: "custom",
34175
+ path: ["signingAuthority"],
34176
+ message: "signingAuthority is required for signing-authority publication"
34177
+ });
34178
+ }
34179
+ }
34180
+ });
34181
+ var PublishCredentialRefreshNotificationValidator = external_exports2.enum([
34182
+ "queued",
34183
+ "suppressed",
34184
+ "not-applicable",
34185
+ /** Publication succeeded, but the post-commit notification enqueue must be retried. */
34186
+ "delivery-failed"
34187
+ ]);
34188
+ var PublishCredentialRefreshResultValidator = external_exports2.object({
34189
+ refreshId: external_exports2.string().min(1),
34190
+ version: external_exports2.number().int().positive(),
34191
+ publishedAt: external_exports2.string().min(1),
34192
+ notification: PublishCredentialRefreshNotificationValidator
34193
+ });
34194
+ var CredentialRefreshVersionMetadataValidator = external_exports2.object({
34195
+ version: external_exports2.number().int().positive(),
34196
+ publishedAt: external_exports2.string().min(1),
34197
+ effectiveAt: external_exports2.string().optional(),
34198
+ etag: external_exports2.string().optional(),
34199
+ signingMode: CredentialRefreshSigningModeValidator.optional(),
34200
+ updateSummary: external_exports2.string().optional()
34201
+ });
34202
+ var GetCredentialRefreshHistoryInputValidator = external_exports2.object({
34203
+ refreshId: external_exports2.string().min(1),
34204
+ cursor: external_exports2.string().optional(),
34205
+ limit: external_exports2.number().int().positive().optional()
34206
+ });
34207
+ var GetCredentialRefreshHistoryResultValidator = external_exports2.object({
34208
+ records: CredentialRefreshVersionMetadataValidator.array(),
34209
+ hasMore: external_exports2.boolean(),
34210
+ cursor: external_exports2.string().optional()
34211
+ });
34212
+ var CredentialRefreshChallengeValidator = external_exports2.object({
34213
+ challenge: external_exports2.string().min(1),
34214
+ expiresAt: external_exports2.string().min(1),
34215
+ domain: external_exports2.string().optional(),
34216
+ scheme: external_exports2.literal("LearnCardDIDAuth").optional()
34217
+ });
34218
+ var PublicCredentialRefreshEnvelopeValidator = external_exports2.object({
34219
+ format: external_exports2.literal("vc"),
34220
+ credential: VCValidator,
34221
+ etag: external_exports2.string().optional()
34222
+ });
34223
+ var JweCredentialRefreshEnvelopeValidator = external_exports2.object({
34224
+ format: external_exports2.literal("jwe"),
34225
+ jwe: JWEValidator2,
34226
+ etag: external_exports2.string().optional(),
34227
+ /** Present on LearnCard-managed endpoints; optional for interoperable JWE services. */
34228
+ version: external_exports2.number().int().positive().optional()
34229
+ });
34230
+ var CredentialRefreshResponseEnvelopeValidator = external_exports2.discriminatedUnion("format", [
34231
+ PublicCredentialRefreshEnvelopeValidator,
34232
+ JweCredentialRefreshEnvelopeValidator
34233
+ ]);
34234
+ var CredentialRefreshFailureCodeValidator = external_exports2.enum([
34235
+ "UNAVAILABLE",
34236
+ "TIMEOUT",
34237
+ "UNSUPPORTED_SERVICE",
34238
+ "UNAUTHORIZED",
34239
+ "MALFORMED_RESPONSE",
34240
+ "INVALID_PROOF",
34241
+ "ISSUER_MISMATCH",
34242
+ "ID_MISMATCH",
34243
+ "ROLLBACK",
34244
+ "REVOKED",
34245
+ "UNSAFE_ENDPOINT"
34246
+ ]);
34247
+ var CredentialRefreshUpdatedResultValidator = external_exports2.object({
34248
+ status: external_exports2.literal("updated"),
34249
+ credential: VCValidator,
34250
+ etag: external_exports2.string().optional(),
34251
+ managedVersion: external_exports2.number().int().positive().optional()
34252
+ });
34253
+ var CredentialRefreshUnchangedResultValidator = external_exports2.object({
34254
+ status: external_exports2.literal("unchanged"),
34255
+ checkedAt: external_exports2.string().min(1),
34256
+ etag: external_exports2.string().optional()
34257
+ });
34258
+ var CredentialRefreshUnsupportedResultValidator = external_exports2.object({
34259
+ status: external_exports2.literal("unsupported")
34260
+ });
34261
+ var CredentialRefreshFailedResultValidator = external_exports2.object({
34262
+ status: external_exports2.literal("failed"),
34263
+ code: CredentialRefreshFailureCodeValidator,
34264
+ retryable: external_exports2.boolean()
34265
+ });
34266
+ var CredentialRefreshResultValidator = external_exports2.discriminatedUnion("status", [
34267
+ CredentialRefreshUpdatedResultValidator,
34268
+ CredentialRefreshUnchangedResultValidator,
34269
+ CredentialRefreshUnsupportedResultValidator,
34270
+ CredentialRefreshFailedResultValidator
34271
+ ]);
34049
34272
  }
34050
34273
  });
34051
34274
  var require_dist = __commonJS({
@@ -34058,7 +34281,7 @@ var require_dist = __commonJS({
34058
34281
  }
34059
34282
  }
34060
34283
  });
34061
- var import_types2 = __toESM(require_dist());
34284
+ var import_types3 = __toESM(require_dist());
34062
34285
  var filestack_helpers_exports = {};
34063
34286
  __export2(filestack_helpers_exports, {
34064
34287
  changeQuality: /* @__PURE__ */ __name(() => changeQuality, "changeQuality"),
@@ -34339,7 +34562,8 @@ var ImageWithLoadingStateValdator = external_exports.object({
34339
34562
  image: external_exports.string(),
34340
34563
  loading: external_exports.union([ImageResizingValidator, ImageUploadingValidator]).optional()
34341
34564
  });
34342
- var import_types3 = __toESM(require_dist());
34565
+ var import_types2 = __toESM(require_dist());
34566
+ var import_types22 = __toESM(require_dist());
34343
34567
  var EnvironmentConfigurationError = class extends Error {
34344
34568
  static {
34345
34569
  __name(this, "EnvironmentConfigurationError");
@@ -35794,16 +36018,24 @@ var callbackLink = /* @__PURE__ */ __name((callback) => {
35794
36018
  attempts += 1;
35795
36019
  request?.unsubscribe();
35796
36020
  request = next(op).subscribe({
35797
- error: /* @__PURE__ */ __name(async (error51) => {
36021
+ error: /* @__PURE__ */ __name((error51) => {
36022
+ if (isDone) return;
35798
36023
  if (attempts > 5 || error51.data?.httpStatus !== 401) {
35799
- return observer.error(error51);
36024
+ observer.error(error51);
36025
+ return;
35800
36026
  }
35801
- await callback();
35802
- attempt();
36027
+ void callback().then(
36028
+ () => {
36029
+ if (!isDone) attempt();
36030
+ },
36031
+ () => {
36032
+ if (!isDone) observer.error(error51);
36033
+ }
36034
+ );
35803
36035
  }, "error"),
35804
36036
  next: /* @__PURE__ */ __name((result) => observer.next(result), "next"),
35805
36037
  complete: /* @__PURE__ */ __name(() => {
35806
- if (isDone) observer.complete();
36038
+ if (!isDone) observer.complete();
35807
36039
  }, "complete")
35808
36040
  });
35809
36041
  }, "attempt");
@@ -35854,7 +36086,6 @@ var getClient = /* @__PURE__ */ __name(async (url2, didAuthFunction, guardianApp
35854
36086
  await refillChallenges();
35855
36087
  }
35856
36088
  }, "takeChallenge");
35857
- void refillChallenges().catch(() => void 0);
35858
36089
  const trpc = createTRPCClient({
35859
36090
  links: [
35860
36091
  callbackLink(async () => {
@@ -35906,9 +36137,23 @@ var getApiTokenClient = /* @__PURE__ */ __name(async (url2, apiToken, guardianAp
35906
36137
  });
35907
36138
  return trpc;
35908
36139
  }, "getApiTokenClient");
36140
+ var getAnonymousClient = /* @__PURE__ */ __name((url2) => createTRPCClient({
36141
+ links: [
36142
+ httpBatchLink({
36143
+ methodOverride: "POST",
36144
+ url: url2,
36145
+ maxURLLength: 3072,
36146
+ transformer: {
36147
+ input: RegExpTransformer,
36148
+ output: { serialize: /* @__PURE__ */ __name((o) => o, "serialize"), deserialize: /* @__PURE__ */ __name((o) => o, "deserialize") }
36149
+ }
36150
+ })
36151
+ ]
36152
+ }), "getAnonymousClient");
35909
36153
  var index_default = getClient;
35910
36154
  export {
35911
36155
  index_default as default,
36156
+ getAnonymousClient,
35912
36157
  getApiTokenClient,
35913
36158
  getClient
35914
36159
  };