@learncard/network-brain-client 2.3.5 → 2.3.6
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 +7 -0
- package/dist/brain-client.cjs.development.js +160 -5
- package/dist/brain-client.cjs.development.js.map +2 -2
- package/dist/brain-client.cjs.production.min.js +1 -1
- package/dist/brain-client.cjs.production.min.js.map +3 -3
- package/dist/brain-client.esm.js +160 -5
- package/dist/brain-client.esm.js.map +2 -2
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# @learncard/network-brain-client
|
|
2
2
|
|
|
3
|
+
## 2.3.6
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [[`e6f76c42d840389f791d2767de46b063bb392180`](https://github.com/learningeconomy/LearnCard/commit/e6f76c42d840389f791d2767de46b063bb392180)]:
|
|
8
|
+
- @learncard/network-brain-service@3.5.0
|
|
9
|
+
|
|
3
10
|
## 2.3.5
|
|
4
11
|
|
|
5
12
|
### Patch Changes
|
|
@@ -104,6 +104,7 @@ var require_helpers_cjs_development = __commonJS({
|
|
|
104
104
|
ClaimHookQueryValidator: () => ClaimHookQueryValidator,
|
|
105
105
|
ClaimHookTypeValidator: () => ClaimHookTypeValidator,
|
|
106
106
|
ClaimHookValidator: () => ClaimHookValidator,
|
|
107
|
+
ClaimTokenValidator: () => ClaimTokenValidator,
|
|
107
108
|
ConsentFlowContractDataForDidValidator: () => ConsentFlowContractDataForDidValidator,
|
|
108
109
|
ConsentFlowContractDataValidator: () => ConsentFlowContractDataValidator,
|
|
109
110
|
ConsentFlowContractDetailsValidator: () => ConsentFlowContractDetailsValidator,
|
|
@@ -118,6 +119,11 @@ var require_helpers_cjs_development = __commonJS({
|
|
|
118
119
|
ConsentFlowTransactionActionValidator: () => ConsentFlowTransactionActionValidator,
|
|
119
120
|
ConsentFlowTransactionValidator: () => ConsentFlowTransactionValidator,
|
|
120
121
|
ConsentFlowTransactionsQueryValidator: () => ConsentFlowTransactionsQueryValidator,
|
|
122
|
+
ContactMethodCreateValidator: () => ContactMethodCreateValidator,
|
|
123
|
+
ContactMethodQueryValidator: () => ContactMethodQueryValidator,
|
|
124
|
+
ContactMethodValidator: () => ContactMethodValidator,
|
|
125
|
+
ContactMethodVerificationRequestValidator: () => ContactMethodVerificationRequestValidator,
|
|
126
|
+
ContactMethodVerificationValidator: () => ContactMethodVerificationValidator,
|
|
121
127
|
ContextValidator: () => ContextValidator,
|
|
122
128
|
ContractCredentialValidator: () => ContractCredentialValidator,
|
|
123
129
|
CredentialInfoValidator: () => CredentialInfoValidator,
|
|
@@ -139,6 +145,11 @@ var require_helpers_cjs_development = __commonJS({
|
|
|
139
145
|
IdentifierTypeValidator: () => IdentifierTypeValidator,
|
|
140
146
|
IdentityObjectValidator: () => IdentityObjectValidator,
|
|
141
147
|
ImageValidator: () => ImageValidator,
|
|
148
|
+
InboxCredentialQueryValidator: () => InboxCredentialQueryValidator,
|
|
149
|
+
InboxCredentialValidator: () => InboxCredentialValidator,
|
|
150
|
+
IssueInboxCredentialResponseValidator: () => IssueInboxCredentialResponseValidator,
|
|
151
|
+
IssueInboxCredentialValidator: () => IssueInboxCredentialValidator,
|
|
152
|
+
IssueInboxSigningAuthorityValidator: () => IssueInboxSigningAuthorityValidator,
|
|
142
153
|
JWERecipientHeaderValidator: () => JWERecipientHeaderValidator,
|
|
143
154
|
JWERecipientValidator: () => JWERecipientValidator,
|
|
144
155
|
JWEValidator: () => JWEValidator2,
|
|
@@ -148,7 +159,10 @@ var require_helpers_cjs_development = __commonJS({
|
|
|
148
159
|
LCNBoostClaimLinkOptionsValidator: () => LCNBoostClaimLinkOptionsValidator,
|
|
149
160
|
LCNBoostClaimLinkSigningAuthorityValidator: () => LCNBoostClaimLinkSigningAuthorityValidator,
|
|
150
161
|
LCNBoostStatus: () => LCNBoostStatus,
|
|
162
|
+
LCNInboxContactMethodValidator: () => LCNInboxContactMethodValidator,
|
|
163
|
+
LCNInboxStatusEnumValidator: () => LCNInboxStatusEnumValidator,
|
|
151
164
|
LCNNotificationDataValidator: () => LCNNotificationDataValidator,
|
|
165
|
+
LCNNotificationInboxValidator: () => LCNNotificationInboxValidator,
|
|
152
166
|
LCNNotificationMessageValidator: () => LCNNotificationMessageValidator,
|
|
153
167
|
LCNNotificationTypeEnumValidator: () => LCNNotificationTypeEnumValidator,
|
|
154
168
|
LCNNotificationValidator: () => LCNNotificationValidator,
|
|
@@ -171,6 +185,7 @@ var require_helpers_cjs_development = __commonJS({
|
|
|
171
185
|
PaginatedContractCredentialsValidator: () => PaginatedContractCredentialsValidator,
|
|
172
186
|
PaginatedEncryptedCredentialRecordsValidator: () => PaginatedEncryptedCredentialRecordsValidator,
|
|
173
187
|
PaginatedEncryptedRecordsValidator: () => PaginatedEncryptedRecordsValidator,
|
|
188
|
+
PaginatedInboxCredentialsValidator: () => PaginatedInboxCredentialsValidator,
|
|
174
189
|
PaginatedLCNProfileManagersValidator: () => PaginatedLCNProfileManagersValidator,
|
|
175
190
|
PaginatedLCNProfilesAndManagersValidator: () => PaginatedLCNProfilesAndManagersValidator,
|
|
176
191
|
PaginatedLCNProfilesValidator: () => PaginatedLCNProfilesValidator,
|
|
@@ -188,6 +203,7 @@ var require_helpers_cjs_development = __commonJS({
|
|
|
188
203
|
RubricCriterionValidator: () => RubricCriterionValidator,
|
|
189
204
|
SentCredentialInfoValidator: () => SentCredentialInfoValidator,
|
|
190
205
|
ServiceValidator: () => ServiceValidator,
|
|
206
|
+
SetPrimaryContactMethodValidator: () => SetPrimaryContactMethodValidator,
|
|
191
207
|
StringQuery: () => StringQuery,
|
|
192
208
|
TermsOfUseValidator: () => TermsOfUseValidator,
|
|
193
209
|
UnsignedAchievementCredentialValidator: () => UnsignedAchievementCredentialValidator,
|
|
@@ -4695,7 +4711,7 @@ var require_helpers_cjs_development = __commonJS({
|
|
|
4695
4711
|
bio: z.string().default("").describe("Longer bio for the profile."),
|
|
4696
4712
|
did: z.string().describe("Decentralized Identifier for the profile. (auto-assigned)"),
|
|
4697
4713
|
isPrivate: z.boolean().optional().describe("Whether the profile is private or not and shows up in search results."),
|
|
4698
|
-
email: z.string().optional().describe("Contact email address for the profile."),
|
|
4714
|
+
email: z.string().optional().describe("Contact email address for the profile. (deprecated)"),
|
|
4699
4715
|
image: z.string().optional().describe("Profile image URL for the profile."),
|
|
4700
4716
|
heroImage: z.string().optional().describe("Hero image URL for the profile."),
|
|
4701
4717
|
websiteLink: z.string().optional().describe("Website link for the profile."),
|
|
@@ -4864,7 +4880,8 @@ var require_helpers_cjs_development = __commonJS({
|
|
|
4864
4880
|
name: z.string().max(15).regex(/^[a-z0-9-]+$/, {
|
|
4865
4881
|
message: "The input string must contain only lowercase letters, numbers, and hyphens."
|
|
4866
4882
|
}),
|
|
4867
|
-
did: z.string()
|
|
4883
|
+
did: z.string(),
|
|
4884
|
+
isPrimary: z.boolean().optional()
|
|
4868
4885
|
})
|
|
4869
4886
|
});
|
|
4870
4887
|
var AutoBoostConfigValidator = z.object({
|
|
@@ -5045,16 +5062,33 @@ var require_helpers_cjs_development = __commonJS({
|
|
|
5045
5062
|
"BOOST_ACCEPTED",
|
|
5046
5063
|
"PRESENTATION_REQUEST",
|
|
5047
5064
|
"PRESENTATION_RECEIVED",
|
|
5048
|
-
"CONSENT_FLOW_TRANSACTION"
|
|
5065
|
+
"CONSENT_FLOW_TRANSACTION",
|
|
5066
|
+
"ISSUANCE_CLAIMED",
|
|
5067
|
+
"ISSUANCE_DELIVERED"
|
|
5049
5068
|
]);
|
|
5050
5069
|
var LCNNotificationMessageValidator = z.object({
|
|
5051
5070
|
title: z.string().optional(),
|
|
5052
5071
|
body: z.string().optional()
|
|
5053
5072
|
});
|
|
5073
|
+
var LCNInboxContactMethodValidator = z.object({
|
|
5074
|
+
type: z.string(),
|
|
5075
|
+
value: z.string()
|
|
5076
|
+
});
|
|
5077
|
+
var LCNInboxStatusEnumValidator = z.enum(["PENDING", "DELIVERED", "CLAIMED", "EXPIRED"]);
|
|
5078
|
+
var LCNNotificationInboxValidator = z.object({
|
|
5079
|
+
issuanceId: z.string(),
|
|
5080
|
+
status: LCNInboxStatusEnumValidator,
|
|
5081
|
+
recipient: z.object({
|
|
5082
|
+
contactMethod: LCNInboxContactMethodValidator.optional(),
|
|
5083
|
+
learnCardId: z.string().optional()
|
|
5084
|
+
}),
|
|
5085
|
+
timestamp: z.string().datetime().optional()
|
|
5086
|
+
});
|
|
5054
5087
|
var LCNNotificationDataValidator = z.object({
|
|
5055
5088
|
vcUris: z.array(z.string()).optional(),
|
|
5056
5089
|
vpUris: z.array(z.string()).optional(),
|
|
5057
|
-
transaction: ConsentFlowTransactionValidator.optional()
|
|
5090
|
+
transaction: ConsentFlowTransactionValidator.optional(),
|
|
5091
|
+
inbox: LCNNotificationInboxValidator.optional()
|
|
5058
5092
|
});
|
|
5059
5093
|
var LCNNotificationValidator = z.object({
|
|
5060
5094
|
type: LCNNotificationTypeEnumValidator,
|
|
@@ -5062,7 +5096,8 @@ var require_helpers_cjs_development = __commonJS({
|
|
|
5062
5096
|
from: LCNProfileValidator.partial().and(z.object({ did: z.string() })),
|
|
5063
5097
|
message: LCNNotificationMessageValidator.optional(),
|
|
5064
5098
|
data: LCNNotificationDataValidator.optional(),
|
|
5065
|
-
sent: z.string().datetime().optional()
|
|
5099
|
+
sent: z.string().datetime().optional(),
|
|
5100
|
+
webhookUrl: z.string().optional()
|
|
5066
5101
|
});
|
|
5067
5102
|
var AUTH_GRANT_AUDIENCE_DOMAIN_PREFIX = "auth-grant:";
|
|
5068
5103
|
var AuthGrantValidator = z.object({
|
|
@@ -5086,6 +5121,126 @@ var require_helpers_cjs_development = __commonJS({
|
|
|
5086
5121
|
description: StringQuery,
|
|
5087
5122
|
status: AuthGrantStatusValidator
|
|
5088
5123
|
}).partial();
|
|
5124
|
+
var contactMethodBase = z.object({
|
|
5125
|
+
id: z.string(),
|
|
5126
|
+
isVerified: z.boolean(),
|
|
5127
|
+
verifiedAt: z.string().optional(),
|
|
5128
|
+
isPrimary: z.boolean(),
|
|
5129
|
+
createdAt: z.string()
|
|
5130
|
+
});
|
|
5131
|
+
var ContactMethodValidator = z.discriminatedUnion("type", [
|
|
5132
|
+
z.object({
|
|
5133
|
+
type: z.literal("email"),
|
|
5134
|
+
value: z.string().email()
|
|
5135
|
+
}).merge(contactMethodBase),
|
|
5136
|
+
z.object({
|
|
5137
|
+
type: z.literal("phone"),
|
|
5138
|
+
value: z.string()
|
|
5139
|
+
}).merge(contactMethodBase)
|
|
5140
|
+
]);
|
|
5141
|
+
var createContactMethodBase = z.object({
|
|
5142
|
+
isVerified: z.boolean().optional(),
|
|
5143
|
+
isPrimary: z.boolean().optional()
|
|
5144
|
+
});
|
|
5145
|
+
var ContactMethodCreateValidator = z.discriminatedUnion("type", [
|
|
5146
|
+
z.object({
|
|
5147
|
+
type: z.literal("email"),
|
|
5148
|
+
value: z.string().email()
|
|
5149
|
+
}).merge(createContactMethodBase),
|
|
5150
|
+
z.object({
|
|
5151
|
+
type: z.literal("phone"),
|
|
5152
|
+
value: z.string()
|
|
5153
|
+
}).merge(createContactMethodBase)
|
|
5154
|
+
]);
|
|
5155
|
+
var ContactMethodQueryValidator = z.discriminatedUnion("type", [
|
|
5156
|
+
z.object({
|
|
5157
|
+
type: z.literal("email"),
|
|
5158
|
+
value: z.string().email()
|
|
5159
|
+
}),
|
|
5160
|
+
z.object({
|
|
5161
|
+
type: z.literal("phone"),
|
|
5162
|
+
value: z.string()
|
|
5163
|
+
})
|
|
5164
|
+
]);
|
|
5165
|
+
var ContactMethodVerificationRequestValidator = z.object({
|
|
5166
|
+
value: z.string(),
|
|
5167
|
+
type: z.enum(["email", "phone"])
|
|
5168
|
+
});
|
|
5169
|
+
var ContactMethodVerificationValidator = z.object({
|
|
5170
|
+
token: z.string()
|
|
5171
|
+
});
|
|
5172
|
+
var SetPrimaryContactMethodValidator = z.object({
|
|
5173
|
+
contactMethodId: z.string()
|
|
5174
|
+
});
|
|
5175
|
+
var InboxCredentialValidator = z.object({
|
|
5176
|
+
id: z.string(),
|
|
5177
|
+
credential: z.string(),
|
|
5178
|
+
isSigned: z.boolean(),
|
|
5179
|
+
currentStatus: LCNInboxStatusEnumValidator,
|
|
5180
|
+
expiresAt: z.string(),
|
|
5181
|
+
createdAt: z.string(),
|
|
5182
|
+
issuerDid: z.string(),
|
|
5183
|
+
webhookUrl: z.string().optional(),
|
|
5184
|
+
"signingAuthority.endpoint": z.string().optional(),
|
|
5185
|
+
"signingAuthority.name": z.string().optional()
|
|
5186
|
+
});
|
|
5187
|
+
var PaginatedInboxCredentialsValidator = z.object({
|
|
5188
|
+
hasMore: z.boolean(),
|
|
5189
|
+
records: z.array(InboxCredentialValidator),
|
|
5190
|
+
cursor: z.string().optional()
|
|
5191
|
+
});
|
|
5192
|
+
var InboxCredentialQueryValidator = z.object({
|
|
5193
|
+
currentStatus: LCNInboxStatusEnumValidator,
|
|
5194
|
+
id: z.string(),
|
|
5195
|
+
isSigned: z.boolean(),
|
|
5196
|
+
issuerDid: z.string()
|
|
5197
|
+
}).partial();
|
|
5198
|
+
var IssueInboxSigningAuthorityValidator = z.object({
|
|
5199
|
+
endpoint: z.string().url(),
|
|
5200
|
+
name: z.string()
|
|
5201
|
+
});
|
|
5202
|
+
var IssueInboxCredentialValidator = z.object({
|
|
5203
|
+
recipient: ContactMethodQueryValidator.describe("The recipient of the credential"),
|
|
5204
|
+
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."),
|
|
5205
|
+
configuration: z.object({
|
|
5206
|
+
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."),
|
|
5207
|
+
webhookUrl: z.string().url().optional().describe("The webhook URL to receive credential issuance events."),
|
|
5208
|
+
expiresInDays: z.number().min(1).max(365).optional().describe("The number of days the credential will be valid for."),
|
|
5209
|
+
delivery: z.object({
|
|
5210
|
+
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."),
|
|
5211
|
+
template: z.object({
|
|
5212
|
+
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."),
|
|
5213
|
+
model: z.object({
|
|
5214
|
+
issuer: z.object({
|
|
5215
|
+
name: z.string().optional().describe('The name of the organization (e.g., "State University").'),
|
|
5216
|
+
logoUrl: z.string().url().optional().describe("The URL of the organization's logo.")
|
|
5217
|
+
}).optional(),
|
|
5218
|
+
credential: z.object({
|
|
5219
|
+
name: z.string().optional().describe('The name of the credential (e.g., "Bachelor of Science").'),
|
|
5220
|
+
type: z.string().optional().describe('The type of the credential (e.g., "degree", "certificate").')
|
|
5221
|
+
}).optional(),
|
|
5222
|
+
recipient: z.object({
|
|
5223
|
+
name: z.string().optional().describe('The name of the recipient (e.g., "John Doe").')
|
|
5224
|
+
}).optional()
|
|
5225
|
+
}).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.")
|
|
5226
|
+
}).optional().describe("The template to use for the credential delivery. If not provided, the default template will be used.")
|
|
5227
|
+
}).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.")
|
|
5228
|
+
}).optional().describe("Configuration for the credential issuance. If not provided, the default configuration will be used.")
|
|
5229
|
+
});
|
|
5230
|
+
var IssueInboxCredentialResponseValidator = z.object({
|
|
5231
|
+
issuanceId: z.string(),
|
|
5232
|
+
status: LCNInboxStatusEnumValidator,
|
|
5233
|
+
recipient: ContactMethodQueryValidator,
|
|
5234
|
+
claimUrl: z.string().url().optional(),
|
|
5235
|
+
recipientDid: z.string().optional()
|
|
5236
|
+
});
|
|
5237
|
+
var ClaimTokenValidator = z.object({
|
|
5238
|
+
token: z.string(),
|
|
5239
|
+
contactMethodId: z.string(),
|
|
5240
|
+
createdAt: z.string(),
|
|
5241
|
+
expiresAt: z.string(),
|
|
5242
|
+
used: z.boolean()
|
|
5243
|
+
});
|
|
5089
5244
|
}
|
|
5090
5245
|
});
|
|
5091
5246
|
var require_dist2 = __commonJS2({
|