@learncard/learn-cloud-plugin 2.1.27 → 2.1.29
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/dist/learn-cloud-plugin.cjs.development.js +304 -10
- package/dist/learn-cloud-plugin.cjs.development.js.map +3 -3
- package/dist/learn-cloud-plugin.cjs.production.min.js +8 -8
- package/dist/learn-cloud-plugin.cjs.production.min.js.map +3 -3
- package/dist/learn-cloud-plugin.esm.js +304 -10
- package/dist/learn-cloud-plugin.esm.js.map +3 -3
- package/package.json +7 -7
|
@@ -8164,6 +8164,7 @@ var require_types_cjs_development = __commonJS2({
|
|
|
8164
8164
|
ClaimHookQueryValidator: () => ClaimHookQueryValidator2,
|
|
8165
8165
|
ClaimHookTypeValidator: () => ClaimHookTypeValidator2,
|
|
8166
8166
|
ClaimHookValidator: () => ClaimHookValidator2,
|
|
8167
|
+
ClaimTokenValidator: () => ClaimTokenValidator2,
|
|
8167
8168
|
ConsentFlowContractDataForDidValidator: () => ConsentFlowContractDataForDidValidator2,
|
|
8168
8169
|
ConsentFlowContractDataValidator: () => ConsentFlowContractDataValidator2,
|
|
8169
8170
|
ConsentFlowContractDetailsValidator: () => ConsentFlowContractDetailsValidator2,
|
|
@@ -8178,6 +8179,11 @@ var require_types_cjs_development = __commonJS2({
|
|
|
8178
8179
|
ConsentFlowTransactionActionValidator: () => ConsentFlowTransactionActionValidator2,
|
|
8179
8180
|
ConsentFlowTransactionValidator: () => ConsentFlowTransactionValidator2,
|
|
8180
8181
|
ConsentFlowTransactionsQueryValidator: () => ConsentFlowTransactionsQueryValidator2,
|
|
8182
|
+
ContactMethodCreateValidator: () => ContactMethodCreateValidator2,
|
|
8183
|
+
ContactMethodQueryValidator: () => ContactMethodQueryValidator2,
|
|
8184
|
+
ContactMethodValidator: () => ContactMethodValidator2,
|
|
8185
|
+
ContactMethodVerificationRequestValidator: () => ContactMethodVerificationRequestValidator2,
|
|
8186
|
+
ContactMethodVerificationValidator: () => ContactMethodVerificationValidator2,
|
|
8181
8187
|
ContextValidator: () => ContextValidator2,
|
|
8182
8188
|
ContractCredentialValidator: () => ContractCredentialValidator2,
|
|
8183
8189
|
CredentialInfoValidator: () => CredentialInfoValidator2,
|
|
@@ -8199,6 +8205,11 @@ var require_types_cjs_development = __commonJS2({
|
|
|
8199
8205
|
IdentifierTypeValidator: () => IdentifierTypeValidator2,
|
|
8200
8206
|
IdentityObjectValidator: () => IdentityObjectValidator2,
|
|
8201
8207
|
ImageValidator: () => ImageValidator2,
|
|
8208
|
+
InboxCredentialQueryValidator: () => InboxCredentialQueryValidator2,
|
|
8209
|
+
InboxCredentialValidator: () => InboxCredentialValidator2,
|
|
8210
|
+
IssueInboxCredentialResponseValidator: () => IssueInboxCredentialResponseValidator2,
|
|
8211
|
+
IssueInboxCredentialValidator: () => IssueInboxCredentialValidator2,
|
|
8212
|
+
IssueInboxSigningAuthorityValidator: () => IssueInboxSigningAuthorityValidator2,
|
|
8202
8213
|
JWERecipientHeaderValidator: () => JWERecipientHeaderValidator2,
|
|
8203
8214
|
JWERecipientValidator: () => JWERecipientValidator2,
|
|
8204
8215
|
JWEValidator: () => JWEValidator2,
|
|
@@ -8208,7 +8219,10 @@ var require_types_cjs_development = __commonJS2({
|
|
|
8208
8219
|
LCNBoostClaimLinkOptionsValidator: () => LCNBoostClaimLinkOptionsValidator2,
|
|
8209
8220
|
LCNBoostClaimLinkSigningAuthorityValidator: () => LCNBoostClaimLinkSigningAuthorityValidator2,
|
|
8210
8221
|
LCNBoostStatus: () => LCNBoostStatus2,
|
|
8222
|
+
LCNInboxContactMethodValidator: () => LCNInboxContactMethodValidator2,
|
|
8223
|
+
LCNInboxStatusEnumValidator: () => LCNInboxStatusEnumValidator2,
|
|
8211
8224
|
LCNNotificationDataValidator: () => LCNNotificationDataValidator2,
|
|
8225
|
+
LCNNotificationInboxValidator: () => LCNNotificationInboxValidator2,
|
|
8212
8226
|
LCNNotificationMessageValidator: () => LCNNotificationMessageValidator2,
|
|
8213
8227
|
LCNNotificationTypeEnumValidator: () => LCNNotificationTypeEnumValidator2,
|
|
8214
8228
|
LCNNotificationValidator: () => LCNNotificationValidator2,
|
|
@@ -8231,6 +8245,7 @@ var require_types_cjs_development = __commonJS2({
|
|
|
8231
8245
|
PaginatedContractCredentialsValidator: () => PaginatedContractCredentialsValidator2,
|
|
8232
8246
|
PaginatedEncryptedCredentialRecordsValidator: () => PaginatedEncryptedCredentialRecordsValidator2,
|
|
8233
8247
|
PaginatedEncryptedRecordsValidator: () => PaginatedEncryptedRecordsValidator2,
|
|
8248
|
+
PaginatedInboxCredentialsValidator: () => PaginatedInboxCredentialsValidator2,
|
|
8234
8249
|
PaginatedLCNProfileManagersValidator: () => PaginatedLCNProfileManagersValidator2,
|
|
8235
8250
|
PaginatedLCNProfilesAndManagersValidator: () => PaginatedLCNProfilesAndManagersValidator2,
|
|
8236
8251
|
PaginatedLCNProfilesValidator: () => PaginatedLCNProfilesValidator2,
|
|
@@ -8248,6 +8263,7 @@ var require_types_cjs_development = __commonJS2({
|
|
|
8248
8263
|
RubricCriterionValidator: () => RubricCriterionValidator2,
|
|
8249
8264
|
SentCredentialInfoValidator: () => SentCredentialInfoValidator2,
|
|
8250
8265
|
ServiceValidator: () => ServiceValidator2,
|
|
8266
|
+
SetPrimaryContactMethodValidator: () => SetPrimaryContactMethodValidator2,
|
|
8251
8267
|
StringQuery: () => StringQuery2,
|
|
8252
8268
|
TermsOfUseValidator: () => TermsOfUseValidator2,
|
|
8253
8269
|
UnsignedAchievementCredentialValidator: () => UnsignedAchievementCredentialValidator2,
|
|
@@ -12755,7 +12771,7 @@ var require_types_cjs_development = __commonJS2({
|
|
|
12755
12771
|
bio: z2.string().default("").describe("Longer bio for the profile."),
|
|
12756
12772
|
did: z2.string().describe("Decentralized Identifier for the profile. (auto-assigned)"),
|
|
12757
12773
|
isPrivate: z2.boolean().optional().describe("Whether the profile is private or not and shows up in search results."),
|
|
12758
|
-
email: z2.string().optional().describe("Contact email address for the profile."),
|
|
12774
|
+
email: z2.string().optional().describe("Contact email address for the profile. (deprecated)"),
|
|
12759
12775
|
image: z2.string().optional().describe("Profile image URL for the profile."),
|
|
12760
12776
|
heroImage: z2.string().optional().describe("Hero image URL for the profile."),
|
|
12761
12777
|
websiteLink: z2.string().optional().describe("Website link for the profile."),
|
|
@@ -12924,7 +12940,8 @@ var require_types_cjs_development = __commonJS2({
|
|
|
12924
12940
|
name: z2.string().max(15).regex(/^[a-z0-9-]+$/, {
|
|
12925
12941
|
message: "The input string must contain only lowercase letters, numbers, and hyphens."
|
|
12926
12942
|
}),
|
|
12927
|
-
did: z2.string()
|
|
12943
|
+
did: z2.string(),
|
|
12944
|
+
isPrimary: z2.boolean().optional()
|
|
12928
12945
|
})
|
|
12929
12946
|
});
|
|
12930
12947
|
var AutoBoostConfigValidator2 = z2.object({
|
|
@@ -13105,16 +13122,33 @@ var require_types_cjs_development = __commonJS2({
|
|
|
13105
13122
|
"BOOST_ACCEPTED",
|
|
13106
13123
|
"PRESENTATION_REQUEST",
|
|
13107
13124
|
"PRESENTATION_RECEIVED",
|
|
13108
|
-
"CONSENT_FLOW_TRANSACTION"
|
|
13125
|
+
"CONSENT_FLOW_TRANSACTION",
|
|
13126
|
+
"ISSUANCE_CLAIMED",
|
|
13127
|
+
"ISSUANCE_DELIVERED"
|
|
13109
13128
|
]);
|
|
13110
13129
|
var LCNNotificationMessageValidator2 = z2.object({
|
|
13111
13130
|
title: z2.string().optional(),
|
|
13112
13131
|
body: z2.string().optional()
|
|
13113
13132
|
});
|
|
13133
|
+
var LCNInboxContactMethodValidator2 = z2.object({
|
|
13134
|
+
type: z2.string(),
|
|
13135
|
+
value: z2.string()
|
|
13136
|
+
});
|
|
13137
|
+
var LCNInboxStatusEnumValidator2 = z2.enum(["PENDING", "DELIVERED", "CLAIMED", "EXPIRED"]);
|
|
13138
|
+
var LCNNotificationInboxValidator2 = z2.object({
|
|
13139
|
+
issuanceId: z2.string(),
|
|
13140
|
+
status: LCNInboxStatusEnumValidator2,
|
|
13141
|
+
recipient: z2.object({
|
|
13142
|
+
contactMethod: LCNInboxContactMethodValidator2.optional(),
|
|
13143
|
+
learnCardId: z2.string().optional()
|
|
13144
|
+
}),
|
|
13145
|
+
timestamp: z2.string().datetime().optional()
|
|
13146
|
+
});
|
|
13114
13147
|
var LCNNotificationDataValidator2 = z2.object({
|
|
13115
13148
|
vcUris: z2.array(z2.string()).optional(),
|
|
13116
13149
|
vpUris: z2.array(z2.string()).optional(),
|
|
13117
|
-
transaction: ConsentFlowTransactionValidator2.optional()
|
|
13150
|
+
transaction: ConsentFlowTransactionValidator2.optional(),
|
|
13151
|
+
inbox: LCNNotificationInboxValidator2.optional()
|
|
13118
13152
|
});
|
|
13119
13153
|
var LCNNotificationValidator2 = z2.object({
|
|
13120
13154
|
type: LCNNotificationTypeEnumValidator2,
|
|
@@ -13122,7 +13156,8 @@ var require_types_cjs_development = __commonJS2({
|
|
|
13122
13156
|
from: LCNProfileValidator2.partial().and(z2.object({ did: z2.string() })),
|
|
13123
13157
|
message: LCNNotificationMessageValidator2.optional(),
|
|
13124
13158
|
data: LCNNotificationDataValidator2.optional(),
|
|
13125
|
-
sent: z2.string().datetime().optional()
|
|
13159
|
+
sent: z2.string().datetime().optional(),
|
|
13160
|
+
webhookUrl: z2.string().optional()
|
|
13126
13161
|
});
|
|
13127
13162
|
var AUTH_GRANT_AUDIENCE_DOMAIN_PREFIX2 = "auth-grant:";
|
|
13128
13163
|
var AuthGrantValidator2 = z2.object({
|
|
@@ -13146,6 +13181,126 @@ var require_types_cjs_development = __commonJS2({
|
|
|
13146
13181
|
description: StringQuery2,
|
|
13147
13182
|
status: AuthGrantStatusValidator2
|
|
13148
13183
|
}).partial();
|
|
13184
|
+
var contactMethodBase2 = z2.object({
|
|
13185
|
+
id: z2.string(),
|
|
13186
|
+
isVerified: z2.boolean(),
|
|
13187
|
+
verifiedAt: z2.string().optional(),
|
|
13188
|
+
isPrimary: z2.boolean(),
|
|
13189
|
+
createdAt: z2.string()
|
|
13190
|
+
});
|
|
13191
|
+
var ContactMethodValidator2 = z2.discriminatedUnion("type", [
|
|
13192
|
+
z2.object({
|
|
13193
|
+
type: z2.literal("email"),
|
|
13194
|
+
value: z2.string().email()
|
|
13195
|
+
}).merge(contactMethodBase2),
|
|
13196
|
+
z2.object({
|
|
13197
|
+
type: z2.literal("phone"),
|
|
13198
|
+
value: z2.string()
|
|
13199
|
+
}).merge(contactMethodBase2)
|
|
13200
|
+
]);
|
|
13201
|
+
var createContactMethodBase2 = z2.object({
|
|
13202
|
+
isVerified: z2.boolean().optional(),
|
|
13203
|
+
isPrimary: z2.boolean().optional()
|
|
13204
|
+
});
|
|
13205
|
+
var ContactMethodCreateValidator2 = z2.discriminatedUnion("type", [
|
|
13206
|
+
z2.object({
|
|
13207
|
+
type: z2.literal("email"),
|
|
13208
|
+
value: z2.string().email()
|
|
13209
|
+
}).merge(createContactMethodBase2),
|
|
13210
|
+
z2.object({
|
|
13211
|
+
type: z2.literal("phone"),
|
|
13212
|
+
value: z2.string()
|
|
13213
|
+
}).merge(createContactMethodBase2)
|
|
13214
|
+
]);
|
|
13215
|
+
var ContactMethodQueryValidator2 = z2.discriminatedUnion("type", [
|
|
13216
|
+
z2.object({
|
|
13217
|
+
type: z2.literal("email"),
|
|
13218
|
+
value: z2.string().email()
|
|
13219
|
+
}),
|
|
13220
|
+
z2.object({
|
|
13221
|
+
type: z2.literal("phone"),
|
|
13222
|
+
value: z2.string()
|
|
13223
|
+
})
|
|
13224
|
+
]);
|
|
13225
|
+
var ContactMethodVerificationRequestValidator2 = z2.object({
|
|
13226
|
+
value: z2.string(),
|
|
13227
|
+
type: z2.enum(["email", "phone"])
|
|
13228
|
+
});
|
|
13229
|
+
var ContactMethodVerificationValidator2 = z2.object({
|
|
13230
|
+
token: z2.string()
|
|
13231
|
+
});
|
|
13232
|
+
var SetPrimaryContactMethodValidator2 = z2.object({
|
|
13233
|
+
contactMethodId: z2.string()
|
|
13234
|
+
});
|
|
13235
|
+
var InboxCredentialValidator2 = z2.object({
|
|
13236
|
+
id: z2.string(),
|
|
13237
|
+
credential: z2.string(),
|
|
13238
|
+
isSigned: z2.boolean(),
|
|
13239
|
+
currentStatus: LCNInboxStatusEnumValidator2,
|
|
13240
|
+
expiresAt: z2.string(),
|
|
13241
|
+
createdAt: z2.string(),
|
|
13242
|
+
issuerDid: z2.string(),
|
|
13243
|
+
webhookUrl: z2.string().optional(),
|
|
13244
|
+
"signingAuthority.endpoint": z2.string().optional(),
|
|
13245
|
+
"signingAuthority.name": z2.string().optional()
|
|
13246
|
+
});
|
|
13247
|
+
var PaginatedInboxCredentialsValidator2 = z2.object({
|
|
13248
|
+
hasMore: z2.boolean(),
|
|
13249
|
+
records: z2.array(InboxCredentialValidator2),
|
|
13250
|
+
cursor: z2.string().optional()
|
|
13251
|
+
});
|
|
13252
|
+
var InboxCredentialQueryValidator2 = z2.object({
|
|
13253
|
+
currentStatus: LCNInboxStatusEnumValidator2,
|
|
13254
|
+
id: z2.string(),
|
|
13255
|
+
isSigned: z2.boolean(),
|
|
13256
|
+
issuerDid: z2.string()
|
|
13257
|
+
}).partial();
|
|
13258
|
+
var IssueInboxSigningAuthorityValidator2 = z2.object({
|
|
13259
|
+
endpoint: z2.string().url(),
|
|
13260
|
+
name: z2.string()
|
|
13261
|
+
});
|
|
13262
|
+
var IssueInboxCredentialValidator2 = z2.object({
|
|
13263
|
+
recipient: ContactMethodQueryValidator2.describe("The recipient of the credential"),
|
|
13264
|
+
credential: VCValidator2.passthrough().or(VPValidator2.passthrough()).or(UnsignedVCValidator2.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."),
|
|
13265
|
+
configuration: z2.object({
|
|
13266
|
+
signingAuthority: IssueInboxSigningAuthorityValidator2.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."),
|
|
13267
|
+
webhookUrl: z2.string().url().optional().describe("The webhook URL to receive credential issuance events."),
|
|
13268
|
+
expiresInDays: z2.number().min(1).max(365).optional().describe("The number of days the credential will be valid for."),
|
|
13269
|
+
delivery: z2.object({
|
|
13270
|
+
suppress: z2.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."),
|
|
13271
|
+
template: z2.object({
|
|
13272
|
+
id: z2.enum(["universal-inbox-claim"]).optional().describe("The template ID to use for the credential delivery. If not provided, the default template will be used."),
|
|
13273
|
+
model: z2.object({
|
|
13274
|
+
issuer: z2.object({
|
|
13275
|
+
name: z2.string().optional().describe('The name of the organization (e.g., "State University").'),
|
|
13276
|
+
logoUrl: z2.string().url().optional().describe("The URL of the organization's logo.")
|
|
13277
|
+
}).optional(),
|
|
13278
|
+
credential: z2.object({
|
|
13279
|
+
name: z2.string().optional().describe('The name of the credential (e.g., "Bachelor of Science").'),
|
|
13280
|
+
type: z2.string().optional().describe('The type of the credential (e.g., "degree", "certificate").')
|
|
13281
|
+
}).optional(),
|
|
13282
|
+
recipient: z2.object({
|
|
13283
|
+
name: z2.string().optional().describe('The name of the recipient (e.g., "John Doe").')
|
|
13284
|
+
}).optional()
|
|
13285
|
+
}).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.")
|
|
13286
|
+
}).optional().describe("The template to use for the credential delivery. If not provided, the default template will be used.")
|
|
13287
|
+
}).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.")
|
|
13288
|
+
}).optional().describe("Configuration for the credential issuance. If not provided, the default configuration will be used.")
|
|
13289
|
+
});
|
|
13290
|
+
var IssueInboxCredentialResponseValidator2 = z2.object({
|
|
13291
|
+
issuanceId: z2.string(),
|
|
13292
|
+
status: LCNInboxStatusEnumValidator2,
|
|
13293
|
+
recipient: ContactMethodQueryValidator2,
|
|
13294
|
+
claimUrl: z2.string().url().optional(),
|
|
13295
|
+
recipientDid: z2.string().optional()
|
|
13296
|
+
});
|
|
13297
|
+
var ClaimTokenValidator2 = z2.object({
|
|
13298
|
+
token: z2.string(),
|
|
13299
|
+
contactMethodId: z2.string(),
|
|
13300
|
+
createdAt: z2.string(),
|
|
13301
|
+
expiresAt: z2.string(),
|
|
13302
|
+
used: z2.boolean()
|
|
13303
|
+
});
|
|
13149
13304
|
}
|
|
13150
13305
|
});
|
|
13151
13306
|
var require_dist = __commonJS2({
|
|
@@ -17620,7 +17775,7 @@ var LCNProfileValidator = z.object({
|
|
|
17620
17775
|
bio: z.string().default("").describe("Longer bio for the profile."),
|
|
17621
17776
|
did: z.string().describe("Decentralized Identifier for the profile. (auto-assigned)"),
|
|
17622
17777
|
isPrivate: z.boolean().optional().describe("Whether the profile is private or not and shows up in search results."),
|
|
17623
|
-
email: z.string().optional().describe("Contact email address for the profile."),
|
|
17778
|
+
email: z.string().optional().describe("Contact email address for the profile. (deprecated)"),
|
|
17624
17779
|
image: z.string().optional().describe("Profile image URL for the profile."),
|
|
17625
17780
|
heroImage: z.string().optional().describe("Hero image URL for the profile."),
|
|
17626
17781
|
websiteLink: z.string().optional().describe("Website link for the profile."),
|
|
@@ -17789,7 +17944,8 @@ var LCNSigningAuthorityForUserValidator = z.object({
|
|
|
17789
17944
|
name: z.string().max(15).regex(/^[a-z0-9-]+$/, {
|
|
17790
17945
|
message: "The input string must contain only lowercase letters, numbers, and hyphens."
|
|
17791
17946
|
}),
|
|
17792
|
-
did: z.string()
|
|
17947
|
+
did: z.string(),
|
|
17948
|
+
isPrimary: z.boolean().optional()
|
|
17793
17949
|
})
|
|
17794
17950
|
});
|
|
17795
17951
|
var AutoBoostConfigValidator = z.object({
|
|
@@ -17970,16 +18126,33 @@ var LCNNotificationTypeEnumValidator = z.enum([
|
|
|
17970
18126
|
"BOOST_ACCEPTED",
|
|
17971
18127
|
"PRESENTATION_REQUEST",
|
|
17972
18128
|
"PRESENTATION_RECEIVED",
|
|
17973
|
-
"CONSENT_FLOW_TRANSACTION"
|
|
18129
|
+
"CONSENT_FLOW_TRANSACTION",
|
|
18130
|
+
"ISSUANCE_CLAIMED",
|
|
18131
|
+
"ISSUANCE_DELIVERED"
|
|
17974
18132
|
]);
|
|
17975
18133
|
var LCNNotificationMessageValidator = z.object({
|
|
17976
18134
|
title: z.string().optional(),
|
|
17977
18135
|
body: z.string().optional()
|
|
17978
18136
|
});
|
|
18137
|
+
var LCNInboxContactMethodValidator = z.object({
|
|
18138
|
+
type: z.string(),
|
|
18139
|
+
value: z.string()
|
|
18140
|
+
});
|
|
18141
|
+
var LCNInboxStatusEnumValidator = z.enum(["PENDING", "DELIVERED", "CLAIMED", "EXPIRED"]);
|
|
18142
|
+
var LCNNotificationInboxValidator = z.object({
|
|
18143
|
+
issuanceId: z.string(),
|
|
18144
|
+
status: LCNInboxStatusEnumValidator,
|
|
18145
|
+
recipient: z.object({
|
|
18146
|
+
contactMethod: LCNInboxContactMethodValidator.optional(),
|
|
18147
|
+
learnCardId: z.string().optional()
|
|
18148
|
+
}),
|
|
18149
|
+
timestamp: z.string().datetime().optional()
|
|
18150
|
+
});
|
|
17979
18151
|
var LCNNotificationDataValidator = z.object({
|
|
17980
18152
|
vcUris: z.array(z.string()).optional(),
|
|
17981
18153
|
vpUris: z.array(z.string()).optional(),
|
|
17982
|
-
transaction: ConsentFlowTransactionValidator.optional()
|
|
18154
|
+
transaction: ConsentFlowTransactionValidator.optional(),
|
|
18155
|
+
inbox: LCNNotificationInboxValidator.optional()
|
|
17983
18156
|
});
|
|
17984
18157
|
var LCNNotificationValidator = z.object({
|
|
17985
18158
|
type: LCNNotificationTypeEnumValidator,
|
|
@@ -17987,7 +18160,8 @@ var LCNNotificationValidator = z.object({
|
|
|
17987
18160
|
from: LCNProfileValidator.partial().and(z.object({ did: z.string() })),
|
|
17988
18161
|
message: LCNNotificationMessageValidator.optional(),
|
|
17989
18162
|
data: LCNNotificationDataValidator.optional(),
|
|
17990
|
-
sent: z.string().datetime().optional()
|
|
18163
|
+
sent: z.string().datetime().optional(),
|
|
18164
|
+
webhookUrl: z.string().optional()
|
|
17991
18165
|
});
|
|
17992
18166
|
var AUTH_GRANT_AUDIENCE_DOMAIN_PREFIX = "auth-grant:";
|
|
17993
18167
|
var AuthGrantValidator = z.object({
|
|
@@ -18011,6 +18185,126 @@ var AuthGrantQueryValidator = z.object({
|
|
|
18011
18185
|
description: StringQuery,
|
|
18012
18186
|
status: AuthGrantStatusValidator
|
|
18013
18187
|
}).partial();
|
|
18188
|
+
var contactMethodBase = z.object({
|
|
18189
|
+
id: z.string(),
|
|
18190
|
+
isVerified: z.boolean(),
|
|
18191
|
+
verifiedAt: z.string().optional(),
|
|
18192
|
+
isPrimary: z.boolean(),
|
|
18193
|
+
createdAt: z.string()
|
|
18194
|
+
});
|
|
18195
|
+
var ContactMethodValidator = z.discriminatedUnion("type", [
|
|
18196
|
+
z.object({
|
|
18197
|
+
type: z.literal("email"),
|
|
18198
|
+
value: z.string().email()
|
|
18199
|
+
}).merge(contactMethodBase),
|
|
18200
|
+
z.object({
|
|
18201
|
+
type: z.literal("phone"),
|
|
18202
|
+
value: z.string()
|
|
18203
|
+
}).merge(contactMethodBase)
|
|
18204
|
+
]);
|
|
18205
|
+
var createContactMethodBase = z.object({
|
|
18206
|
+
isVerified: z.boolean().optional(),
|
|
18207
|
+
isPrimary: z.boolean().optional()
|
|
18208
|
+
});
|
|
18209
|
+
var ContactMethodCreateValidator = z.discriminatedUnion("type", [
|
|
18210
|
+
z.object({
|
|
18211
|
+
type: z.literal("email"),
|
|
18212
|
+
value: z.string().email()
|
|
18213
|
+
}).merge(createContactMethodBase),
|
|
18214
|
+
z.object({
|
|
18215
|
+
type: z.literal("phone"),
|
|
18216
|
+
value: z.string()
|
|
18217
|
+
}).merge(createContactMethodBase)
|
|
18218
|
+
]);
|
|
18219
|
+
var ContactMethodQueryValidator = z.discriminatedUnion("type", [
|
|
18220
|
+
z.object({
|
|
18221
|
+
type: z.literal("email"),
|
|
18222
|
+
value: z.string().email()
|
|
18223
|
+
}),
|
|
18224
|
+
z.object({
|
|
18225
|
+
type: z.literal("phone"),
|
|
18226
|
+
value: z.string()
|
|
18227
|
+
})
|
|
18228
|
+
]);
|
|
18229
|
+
var ContactMethodVerificationRequestValidator = z.object({
|
|
18230
|
+
value: z.string(),
|
|
18231
|
+
type: z.enum(["email", "phone"])
|
|
18232
|
+
});
|
|
18233
|
+
var ContactMethodVerificationValidator = z.object({
|
|
18234
|
+
token: z.string()
|
|
18235
|
+
});
|
|
18236
|
+
var SetPrimaryContactMethodValidator = z.object({
|
|
18237
|
+
contactMethodId: z.string()
|
|
18238
|
+
});
|
|
18239
|
+
var InboxCredentialValidator = z.object({
|
|
18240
|
+
id: z.string(),
|
|
18241
|
+
credential: z.string(),
|
|
18242
|
+
isSigned: z.boolean(),
|
|
18243
|
+
currentStatus: LCNInboxStatusEnumValidator,
|
|
18244
|
+
expiresAt: z.string(),
|
|
18245
|
+
createdAt: z.string(),
|
|
18246
|
+
issuerDid: z.string(),
|
|
18247
|
+
webhookUrl: z.string().optional(),
|
|
18248
|
+
"signingAuthority.endpoint": z.string().optional(),
|
|
18249
|
+
"signingAuthority.name": z.string().optional()
|
|
18250
|
+
});
|
|
18251
|
+
var PaginatedInboxCredentialsValidator = z.object({
|
|
18252
|
+
hasMore: z.boolean(),
|
|
18253
|
+
records: z.array(InboxCredentialValidator),
|
|
18254
|
+
cursor: z.string().optional()
|
|
18255
|
+
});
|
|
18256
|
+
var InboxCredentialQueryValidator = z.object({
|
|
18257
|
+
currentStatus: LCNInboxStatusEnumValidator,
|
|
18258
|
+
id: z.string(),
|
|
18259
|
+
isSigned: z.boolean(),
|
|
18260
|
+
issuerDid: z.string()
|
|
18261
|
+
}).partial();
|
|
18262
|
+
var IssueInboxSigningAuthorityValidator = z.object({
|
|
18263
|
+
endpoint: z.string().url(),
|
|
18264
|
+
name: z.string()
|
|
18265
|
+
});
|
|
18266
|
+
var IssueInboxCredentialValidator = z.object({
|
|
18267
|
+
recipient: ContactMethodQueryValidator.describe("The recipient of the credential"),
|
|
18268
|
+
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."),
|
|
18269
|
+
configuration: z.object({
|
|
18270
|
+
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."),
|
|
18271
|
+
webhookUrl: z.string().url().optional().describe("The webhook URL to receive credential issuance events."),
|
|
18272
|
+
expiresInDays: z.number().min(1).max(365).optional().describe("The number of days the credential will be valid for."),
|
|
18273
|
+
delivery: z.object({
|
|
18274
|
+
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."),
|
|
18275
|
+
template: z.object({
|
|
18276
|
+
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."),
|
|
18277
|
+
model: z.object({
|
|
18278
|
+
issuer: z.object({
|
|
18279
|
+
name: z.string().optional().describe('The name of the organization (e.g., "State University").'),
|
|
18280
|
+
logoUrl: z.string().url().optional().describe("The URL of the organization's logo.")
|
|
18281
|
+
}).optional(),
|
|
18282
|
+
credential: z.object({
|
|
18283
|
+
name: z.string().optional().describe('The name of the credential (e.g., "Bachelor of Science").'),
|
|
18284
|
+
type: z.string().optional().describe('The type of the credential (e.g., "degree", "certificate").')
|
|
18285
|
+
}).optional(),
|
|
18286
|
+
recipient: z.object({
|
|
18287
|
+
name: z.string().optional().describe('The name of the recipient (e.g., "John Doe").')
|
|
18288
|
+
}).optional()
|
|
18289
|
+
}).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.")
|
|
18290
|
+
}).optional().describe("The template to use for the credential delivery. If not provided, the default template will be used.")
|
|
18291
|
+
}).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.")
|
|
18292
|
+
}).optional().describe("Configuration for the credential issuance. If not provided, the default configuration will be used.")
|
|
18293
|
+
});
|
|
18294
|
+
var IssueInboxCredentialResponseValidator = z.object({
|
|
18295
|
+
issuanceId: z.string(),
|
|
18296
|
+
status: LCNInboxStatusEnumValidator,
|
|
18297
|
+
recipient: ContactMethodQueryValidator,
|
|
18298
|
+
claimUrl: z.string().url().optional(),
|
|
18299
|
+
recipientDid: z.string().optional()
|
|
18300
|
+
});
|
|
18301
|
+
var ClaimTokenValidator = z.object({
|
|
18302
|
+
token: z.string(),
|
|
18303
|
+
contactMethodId: z.string(),
|
|
18304
|
+
createdAt: z.string(),
|
|
18305
|
+
expiresAt: z.string(),
|
|
18306
|
+
used: z.boolean()
|
|
18307
|
+
});
|
|
18014
18308
|
|
|
18015
18309
|
// src/helpers.ts
|
|
18016
18310
|
var import_json_stringify_deterministic = __toESM(require_lib());
|