@learncard/network-brain-client 2.4.6 → 2.4.7

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/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # @learncard/network-brain-client
2
2
 
3
+ ## 2.4.7
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [[`5fbc434308423d97db4fc8cf63898ed8f8980959`](https://github.com/learningeconomy/LearnCard/commit/5fbc434308423d97db4fc8cf63898ed8f8980959)]:
8
+ - @learncard/network-brain-service@3.6.8
9
+
3
10
  ## 2.4.6
4
11
 
5
12
  ### Patch Changes
@@ -105,6 +105,7 @@ var require_helpers_cjs_development = __commonJS({
105
105
  ClaimHookQueryValidator: () => ClaimHookQueryValidator,
106
106
  ClaimHookTypeValidator: () => ClaimHookTypeValidator,
107
107
  ClaimHookValidator: () => ClaimHookValidator,
108
+ ClaimInboxCredentialValidator: () => ClaimInboxCredentialValidator,
108
109
  ClaimTokenValidator: () => ClaimTokenValidator,
109
110
  ConsentFlowContractDataForDidValidator: () => ConsentFlowContractDataForDidValidator,
110
111
  ConsentFlowContractDataValidator: () => ConsentFlowContractDataValidator,
@@ -127,6 +128,8 @@ var require_helpers_cjs_development = __commonJS({
127
128
  ContactMethodVerificationValidator: () => ContactMethodVerificationValidator,
128
129
  ContextValidator: () => ContextValidator,
129
130
  ContractCredentialValidator: () => ContractCredentialValidator,
131
+ CreateContactMethodSessionResponseValidator: () => CreateContactMethodSessionResponseValidator,
132
+ CreateContactMethodSessionValidator: () => CreateContactMethodSessionValidator,
130
133
  CredentialInfoValidator: () => CredentialInfoValidator,
131
134
  CredentialRecordValidator: () => CredentialRecordValidator,
132
135
  CredentialSchemaValidator: () => CredentialSchemaValidator,
@@ -160,8 +163,13 @@ var require_helpers_cjs_development = __commonJS({
160
163
  LCNBoostClaimLinkOptionsValidator: () => LCNBoostClaimLinkOptionsValidator,
161
164
  LCNBoostClaimLinkSigningAuthorityValidator: () => LCNBoostClaimLinkSigningAuthorityValidator,
162
165
  LCNBoostStatus: () => LCNBoostStatus,
166
+ LCNDomainOrOriginValidator: () => LCNDomainOrOriginValidator,
163
167
  LCNInboxContactMethodValidator: () => LCNInboxContactMethodValidator,
164
168
  LCNInboxStatusEnumValidator: () => LCNInboxStatusEnumValidator,
169
+ LCNIntegrationCreateValidator: () => LCNIntegrationCreateValidator,
170
+ LCNIntegrationQueryValidator: () => LCNIntegrationQueryValidator,
171
+ LCNIntegrationUpdateValidator: () => LCNIntegrationUpdateValidator,
172
+ LCNIntegrationValidator: () => LCNIntegrationValidator,
165
173
  LCNNotificationDataValidator: () => LCNNotificationDataValidator,
166
174
  LCNNotificationInboxValidator: () => LCNNotificationInboxValidator,
167
175
  LCNNotificationMessageValidator: () => LCNNotificationMessageValidator,
@@ -188,6 +196,7 @@ var require_helpers_cjs_development = __commonJS({
188
196
  PaginatedEncryptedCredentialRecordsValidator: () => PaginatedEncryptedCredentialRecordsValidator,
189
197
  PaginatedEncryptedRecordsValidator: () => PaginatedEncryptedRecordsValidator,
190
198
  PaginatedInboxCredentialsValidator: () => PaginatedInboxCredentialsValidator,
199
+ PaginatedLCNIntegrationsValidator: () => PaginatedLCNIntegrationsValidator,
191
200
  PaginatedLCNProfileManagersValidator: () => PaginatedLCNProfileManagersValidator,
192
201
  PaginatedLCNProfilesAndManagersValidator: () => PaginatedLCNProfilesAndManagersValidator,
193
202
  PaginatedLCNProfilesValidator: () => PaginatedLCNProfilesValidator,
@@ -5096,7 +5105,13 @@ var require_helpers_cjs_development = __commonJS({
5096
5105
  type: z.string(),
5097
5106
  value: z.string()
5098
5107
  });
5099
- var LCNInboxStatusEnumValidator = z.enum(["PENDING", "DELIVERED", "CLAIMED", "EXPIRED"]);
5108
+ var LCNInboxStatusEnumValidator = z.enum([
5109
+ "PENDING",
5110
+ "ISSUED",
5111
+ "EXPIRED",
5112
+ "DELIVERED",
5113
+ "CLAIMED"
5114
+ ]);
5100
5115
  var LCNNotificationInboxValidator = z.object({
5101
5116
  issuanceId: z.string(),
5102
5117
  status: LCNInboxStatusEnumValidator,
@@ -5194,11 +5209,19 @@ var require_helpers_cjs_development = __commonJS({
5194
5209
  var SetPrimaryContactMethodValidator = z.object({
5195
5210
  contactMethodId: z.string()
5196
5211
  });
5212
+ var CreateContactMethodSessionValidator = z.object({
5213
+ contactMethod: ContactMethodVerificationRequestValidator,
5214
+ otpChallenge: z.string()
5215
+ });
5216
+ var CreateContactMethodSessionResponseValidator = z.object({
5217
+ sessionJwt: z.string()
5218
+ });
5197
5219
  var InboxCredentialValidator = z.object({
5198
5220
  id: z.string(),
5199
5221
  credential: z.string(),
5200
5222
  isSigned: z.boolean(),
5201
5223
  currentStatus: LCNInboxStatusEnumValidator,
5224
+ isAccepted: z.boolean().optional(),
5202
5225
  expiresAt: z.string(),
5203
5226
  createdAt: z.string(),
5204
5227
  issuerDid: z.string(),
@@ -5217,6 +5240,7 @@ var require_helpers_cjs_development = __commonJS({
5217
5240
  currentStatus: LCNInboxStatusEnumValidator,
5218
5241
  id: z.string(),
5219
5242
  isSigned: z.boolean(),
5243
+ isAccepted: z.boolean().optional(),
5220
5244
  issuerDid: z.string()
5221
5245
  }).partial();
5222
5246
  var IssueInboxSigningAuthorityValidator = z.object({
@@ -5258,6 +5282,51 @@ var require_helpers_cjs_development = __commonJS({
5258
5282
  claimUrl: z.string().url().optional(),
5259
5283
  recipientDid: z.string().optional()
5260
5284
  });
5285
+ var ClaimInboxCredentialValidator = z.object({
5286
+ credential: VCValidator.passthrough().or(VPValidator.passthrough()).or(UnsignedVCValidator.passthrough()).describe("The credential to issue."),
5287
+ configuration: z.object({
5288
+ publishableKey: z.string(),
5289
+ signingAuthorityName: z.string().optional()
5290
+ }).optional()
5291
+ });
5292
+ var LCNDomainOrOriginValidator = z.union([
5293
+ z.string().regex(
5294
+ /^(?:(?:[a-zA-Z0-9-]{1,63}\.)+[a-zA-Z]{2,63}|localhost|\d{1,3}(?:\.\d{1,3}){3})(?::\d{1,5})?$/,
5295
+ {
5296
+ message: "Must be a valid domain (incl. subdomains), localhost, or IPv4, optionally with port"
5297
+ }
5298
+ ),
5299
+ z.string().regex(
5300
+ /^https?:\/\/(?:(?:[a-zA-Z0-9-]{1,63}\.)+[a-zA-Z]{2,63}|localhost|\d{1,3}(?:\.\d{1,3}){3})(?::\d{1,5})?$/,
5301
+ { message: "Must be a valid http(s) origin" }
5302
+ )
5303
+ ]);
5304
+ var LCNIntegrationValidator = z.object({
5305
+ id: z.string(),
5306
+ name: z.string(),
5307
+ description: z.string().optional(),
5308
+ publishableKey: z.string(),
5309
+ whitelistedDomains: z.array(LCNDomainOrOriginValidator).default([])
5310
+ });
5311
+ var LCNIntegrationCreateValidator = z.object({
5312
+ name: z.string(),
5313
+ description: z.string().optional(),
5314
+ whitelistedDomains: z.array(LCNDomainOrOriginValidator).default([])
5315
+ });
5316
+ var LCNIntegrationUpdateValidator = z.object({
5317
+ name: z.string().optional(),
5318
+ description: z.string().optional(),
5319
+ whitelistedDomains: z.array(LCNDomainOrOriginValidator).optional(),
5320
+ rotatePublishableKey: z.boolean().optional()
5321
+ });
5322
+ var LCNIntegrationQueryValidator = z.object({
5323
+ id: StringQuery,
5324
+ name: StringQuery,
5325
+ description: StringQuery
5326
+ }).partial();
5327
+ var PaginatedLCNIntegrationsValidator = PaginationResponseValidator.extend({
5328
+ records: LCNIntegrationValidator.array()
5329
+ });
5261
5330
  var ClaimTokenValidator = z.object({
5262
5331
  token: z.string(),
5263
5332
  contactMethodId: z.string(),