@learncard/network-brain-client 2.3.5 → 2.3.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.
@@ -99,6 +99,7 @@ var require_helpers_cjs_development = __commonJS({
99
99
  ClaimHookQueryValidator: () => ClaimHookQueryValidator,
100
100
  ClaimHookTypeValidator: () => ClaimHookTypeValidator,
101
101
  ClaimHookValidator: () => ClaimHookValidator,
102
+ ClaimTokenValidator: () => ClaimTokenValidator,
102
103
  ConsentFlowContractDataForDidValidator: () => ConsentFlowContractDataForDidValidator,
103
104
  ConsentFlowContractDataValidator: () => ConsentFlowContractDataValidator,
104
105
  ConsentFlowContractDetailsValidator: () => ConsentFlowContractDetailsValidator,
@@ -113,6 +114,11 @@ var require_helpers_cjs_development = __commonJS({
113
114
  ConsentFlowTransactionActionValidator: () => ConsentFlowTransactionActionValidator,
114
115
  ConsentFlowTransactionValidator: () => ConsentFlowTransactionValidator,
115
116
  ConsentFlowTransactionsQueryValidator: () => ConsentFlowTransactionsQueryValidator,
117
+ ContactMethodCreateValidator: () => ContactMethodCreateValidator,
118
+ ContactMethodQueryValidator: () => ContactMethodQueryValidator,
119
+ ContactMethodValidator: () => ContactMethodValidator,
120
+ ContactMethodVerificationRequestValidator: () => ContactMethodVerificationRequestValidator,
121
+ ContactMethodVerificationValidator: () => ContactMethodVerificationValidator,
116
122
  ContextValidator: () => ContextValidator,
117
123
  ContractCredentialValidator: () => ContractCredentialValidator,
118
124
  CredentialInfoValidator: () => CredentialInfoValidator,
@@ -134,6 +140,11 @@ var require_helpers_cjs_development = __commonJS({
134
140
  IdentifierTypeValidator: () => IdentifierTypeValidator,
135
141
  IdentityObjectValidator: () => IdentityObjectValidator,
136
142
  ImageValidator: () => ImageValidator,
143
+ InboxCredentialQueryValidator: () => InboxCredentialQueryValidator,
144
+ InboxCredentialValidator: () => InboxCredentialValidator,
145
+ IssueInboxCredentialResponseValidator: () => IssueInboxCredentialResponseValidator,
146
+ IssueInboxCredentialValidator: () => IssueInboxCredentialValidator,
147
+ IssueInboxSigningAuthorityValidator: () => IssueInboxSigningAuthorityValidator,
137
148
  JWERecipientHeaderValidator: () => JWERecipientHeaderValidator,
138
149
  JWERecipientValidator: () => JWERecipientValidator,
139
150
  JWEValidator: () => JWEValidator2,
@@ -143,7 +154,10 @@ var require_helpers_cjs_development = __commonJS({
143
154
  LCNBoostClaimLinkOptionsValidator: () => LCNBoostClaimLinkOptionsValidator,
144
155
  LCNBoostClaimLinkSigningAuthorityValidator: () => LCNBoostClaimLinkSigningAuthorityValidator,
145
156
  LCNBoostStatus: () => LCNBoostStatus,
157
+ LCNInboxContactMethodValidator: () => LCNInboxContactMethodValidator,
158
+ LCNInboxStatusEnumValidator: () => LCNInboxStatusEnumValidator,
146
159
  LCNNotificationDataValidator: () => LCNNotificationDataValidator,
160
+ LCNNotificationInboxValidator: () => LCNNotificationInboxValidator,
147
161
  LCNNotificationMessageValidator: () => LCNNotificationMessageValidator,
148
162
  LCNNotificationTypeEnumValidator: () => LCNNotificationTypeEnumValidator,
149
163
  LCNNotificationValidator: () => LCNNotificationValidator,
@@ -166,6 +180,7 @@ var require_helpers_cjs_development = __commonJS({
166
180
  PaginatedContractCredentialsValidator: () => PaginatedContractCredentialsValidator,
167
181
  PaginatedEncryptedCredentialRecordsValidator: () => PaginatedEncryptedCredentialRecordsValidator,
168
182
  PaginatedEncryptedRecordsValidator: () => PaginatedEncryptedRecordsValidator,
183
+ PaginatedInboxCredentialsValidator: () => PaginatedInboxCredentialsValidator,
169
184
  PaginatedLCNProfileManagersValidator: () => PaginatedLCNProfileManagersValidator,
170
185
  PaginatedLCNProfilesAndManagersValidator: () => PaginatedLCNProfilesAndManagersValidator,
171
186
  PaginatedLCNProfilesValidator: () => PaginatedLCNProfilesValidator,
@@ -183,6 +198,7 @@ var require_helpers_cjs_development = __commonJS({
183
198
  RubricCriterionValidator: () => RubricCriterionValidator,
184
199
  SentCredentialInfoValidator: () => SentCredentialInfoValidator,
185
200
  ServiceValidator: () => ServiceValidator,
201
+ SetPrimaryContactMethodValidator: () => SetPrimaryContactMethodValidator,
186
202
  StringQuery: () => StringQuery,
187
203
  TermsOfUseValidator: () => TermsOfUseValidator,
188
204
  UnsignedAchievementCredentialValidator: () => UnsignedAchievementCredentialValidator,
@@ -4690,7 +4706,7 @@ var require_helpers_cjs_development = __commonJS({
4690
4706
  bio: z.string().default("").describe("Longer bio for the profile."),
4691
4707
  did: z.string().describe("Decentralized Identifier for the profile. (auto-assigned)"),
4692
4708
  isPrivate: z.boolean().optional().describe("Whether the profile is private or not and shows up in search results."),
4693
- email: z.string().optional().describe("Contact email address for the profile."),
4709
+ email: z.string().optional().describe("Contact email address for the profile. (deprecated)"),
4694
4710
  image: z.string().optional().describe("Profile image URL for the profile."),
4695
4711
  heroImage: z.string().optional().describe("Hero image URL for the profile."),
4696
4712
  websiteLink: z.string().optional().describe("Website link for the profile."),
@@ -4859,7 +4875,8 @@ var require_helpers_cjs_development = __commonJS({
4859
4875
  name: z.string().max(15).regex(/^[a-z0-9-]+$/, {
4860
4876
  message: "The input string must contain only lowercase letters, numbers, and hyphens."
4861
4877
  }),
4862
- did: z.string()
4878
+ did: z.string(),
4879
+ isPrimary: z.boolean().optional()
4863
4880
  })
4864
4881
  });
4865
4882
  var AutoBoostConfigValidator = z.object({
@@ -5040,16 +5057,33 @@ var require_helpers_cjs_development = __commonJS({
5040
5057
  "BOOST_ACCEPTED",
5041
5058
  "PRESENTATION_REQUEST",
5042
5059
  "PRESENTATION_RECEIVED",
5043
- "CONSENT_FLOW_TRANSACTION"
5060
+ "CONSENT_FLOW_TRANSACTION",
5061
+ "ISSUANCE_CLAIMED",
5062
+ "ISSUANCE_DELIVERED"
5044
5063
  ]);
5045
5064
  var LCNNotificationMessageValidator = z.object({
5046
5065
  title: z.string().optional(),
5047
5066
  body: z.string().optional()
5048
5067
  });
5068
+ var LCNInboxContactMethodValidator = z.object({
5069
+ type: z.string(),
5070
+ value: z.string()
5071
+ });
5072
+ var LCNInboxStatusEnumValidator = z.enum(["PENDING", "DELIVERED", "CLAIMED", "EXPIRED"]);
5073
+ var LCNNotificationInboxValidator = z.object({
5074
+ issuanceId: z.string(),
5075
+ status: LCNInboxStatusEnumValidator,
5076
+ recipient: z.object({
5077
+ contactMethod: LCNInboxContactMethodValidator.optional(),
5078
+ learnCardId: z.string().optional()
5079
+ }),
5080
+ timestamp: z.string().datetime().optional()
5081
+ });
5049
5082
  var LCNNotificationDataValidator = z.object({
5050
5083
  vcUris: z.array(z.string()).optional(),
5051
5084
  vpUris: z.array(z.string()).optional(),
5052
- transaction: ConsentFlowTransactionValidator.optional()
5085
+ transaction: ConsentFlowTransactionValidator.optional(),
5086
+ inbox: LCNNotificationInboxValidator.optional()
5053
5087
  });
5054
5088
  var LCNNotificationValidator = z.object({
5055
5089
  type: LCNNotificationTypeEnumValidator,
@@ -5057,7 +5091,8 @@ var require_helpers_cjs_development = __commonJS({
5057
5091
  from: LCNProfileValidator.partial().and(z.object({ did: z.string() })),
5058
5092
  message: LCNNotificationMessageValidator.optional(),
5059
5093
  data: LCNNotificationDataValidator.optional(),
5060
- sent: z.string().datetime().optional()
5094
+ sent: z.string().datetime().optional(),
5095
+ webhookUrl: z.string().optional()
5061
5096
  });
5062
5097
  var AUTH_GRANT_AUDIENCE_DOMAIN_PREFIX = "auth-grant:";
5063
5098
  var AuthGrantValidator = z.object({
@@ -5081,6 +5116,126 @@ var require_helpers_cjs_development = __commonJS({
5081
5116
  description: StringQuery,
5082
5117
  status: AuthGrantStatusValidator
5083
5118
  }).partial();
5119
+ var contactMethodBase = z.object({
5120
+ id: z.string(),
5121
+ isVerified: z.boolean(),
5122
+ verifiedAt: z.string().optional(),
5123
+ isPrimary: z.boolean(),
5124
+ createdAt: z.string()
5125
+ });
5126
+ var ContactMethodValidator = z.discriminatedUnion("type", [
5127
+ z.object({
5128
+ type: z.literal("email"),
5129
+ value: z.string().email()
5130
+ }).merge(contactMethodBase),
5131
+ z.object({
5132
+ type: z.literal("phone"),
5133
+ value: z.string()
5134
+ }).merge(contactMethodBase)
5135
+ ]);
5136
+ var createContactMethodBase = z.object({
5137
+ isVerified: z.boolean().optional(),
5138
+ isPrimary: z.boolean().optional()
5139
+ });
5140
+ var ContactMethodCreateValidator = z.discriminatedUnion("type", [
5141
+ z.object({
5142
+ type: z.literal("email"),
5143
+ value: z.string().email()
5144
+ }).merge(createContactMethodBase),
5145
+ z.object({
5146
+ type: z.literal("phone"),
5147
+ value: z.string()
5148
+ }).merge(createContactMethodBase)
5149
+ ]);
5150
+ var ContactMethodQueryValidator = z.discriminatedUnion("type", [
5151
+ z.object({
5152
+ type: z.literal("email"),
5153
+ value: z.string().email()
5154
+ }),
5155
+ z.object({
5156
+ type: z.literal("phone"),
5157
+ value: z.string()
5158
+ })
5159
+ ]);
5160
+ var ContactMethodVerificationRequestValidator = z.object({
5161
+ value: z.string(),
5162
+ type: z.enum(["email", "phone"])
5163
+ });
5164
+ var ContactMethodVerificationValidator = z.object({
5165
+ token: z.string()
5166
+ });
5167
+ var SetPrimaryContactMethodValidator = z.object({
5168
+ contactMethodId: z.string()
5169
+ });
5170
+ var InboxCredentialValidator = z.object({
5171
+ id: z.string(),
5172
+ credential: z.string(),
5173
+ isSigned: z.boolean(),
5174
+ currentStatus: LCNInboxStatusEnumValidator,
5175
+ expiresAt: z.string(),
5176
+ createdAt: z.string(),
5177
+ issuerDid: z.string(),
5178
+ webhookUrl: z.string().optional(),
5179
+ "signingAuthority.endpoint": z.string().optional(),
5180
+ "signingAuthority.name": z.string().optional()
5181
+ });
5182
+ var PaginatedInboxCredentialsValidator = z.object({
5183
+ hasMore: z.boolean(),
5184
+ records: z.array(InboxCredentialValidator),
5185
+ cursor: z.string().optional()
5186
+ });
5187
+ var InboxCredentialQueryValidator = z.object({
5188
+ currentStatus: LCNInboxStatusEnumValidator,
5189
+ id: z.string(),
5190
+ isSigned: z.boolean(),
5191
+ issuerDid: z.string()
5192
+ }).partial();
5193
+ var IssueInboxSigningAuthorityValidator = z.object({
5194
+ endpoint: z.string().url(),
5195
+ name: z.string()
5196
+ });
5197
+ var IssueInboxCredentialValidator = z.object({
5198
+ recipient: ContactMethodQueryValidator.describe("The recipient of the credential"),
5199
+ credential: VCValidator.passthrough().or(VPValidator.passthrough()).or(UnsignedVCValidator.passthrough()).describe("The credential to issue. If not signed, the users default signing authority will be used, or the specified signing authority in the configuration."),
5200
+ configuration: z.object({
5201
+ signingAuthority: IssueInboxSigningAuthorityValidator.optional().describe("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."),
5202
+ webhookUrl: z.string().url().optional().describe("The webhook URL to receive credential issuance events."),
5203
+ expiresInDays: z.number().min(1).max(365).optional().describe("The number of days the credential will be valid for."),
5204
+ delivery: z.object({
5205
+ suppress: z.boolean().optional().default(false).describe("Whether to suppress delivery of the credential to the recipient. If true, the email/sms will not be sent to the recipient. Useful if you would like to manually send claim link to your users."),
5206
+ template: z.object({
5207
+ id: z.enum(["universal-inbox-claim"]).optional().describe("The template ID to use for the credential delivery. If not provided, the default template will be used."),
5208
+ model: z.object({
5209
+ issuer: z.object({
5210
+ name: z.string().optional().describe('The name of the organization (e.g., "State University").'),
5211
+ logoUrl: z.string().url().optional().describe("The URL of the organization's logo.")
5212
+ }).optional(),
5213
+ credential: z.object({
5214
+ name: z.string().optional().describe('The name of the credential (e.g., "Bachelor of Science").'),
5215
+ type: z.string().optional().describe('The type of the credential (e.g., "degree", "certificate").')
5216
+ }).optional(),
5217
+ recipient: z.object({
5218
+ name: z.string().optional().describe('The name of the recipient (e.g., "John Doe").')
5219
+ }).optional()
5220
+ }).describe("The template model to use for the credential delivery. Injects via template variables into email/sms templates. If not provided, the default template will be used.")
5221
+ }).optional().describe("The template to use for the credential delivery. If not provided, the default template will be used.")
5222
+ }).optional().describe("Configuration for the credential delivery i.e. email or SMS. When credentials are sent to a user who has a verified email or phone associated with their account, delivery is skipped, and the credential will be sent using in-app notifications. If not provided, the default configuration will be used.")
5223
+ }).optional().describe("Configuration for the credential issuance. If not provided, the default configuration will be used.")
5224
+ });
5225
+ var IssueInboxCredentialResponseValidator = z.object({
5226
+ issuanceId: z.string(),
5227
+ status: LCNInboxStatusEnumValidator,
5228
+ recipient: ContactMethodQueryValidator,
5229
+ claimUrl: z.string().url().optional(),
5230
+ recipientDid: z.string().optional()
5231
+ });
5232
+ var ClaimTokenValidator = z.object({
5233
+ token: z.string(),
5234
+ contactMethodId: z.string(),
5235
+ createdAt: z.string(),
5236
+ expiresAt: z.string(),
5237
+ used: z.boolean()
5238
+ });
5084
5239
  }
5085
5240
  });
5086
5241
  var require_dist2 = __commonJS2({