@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
|
@@ -8151,6 +8151,7 @@ var require_types_cjs_development = __commonJS2({
|
|
|
8151
8151
|
ClaimHookQueryValidator: () => ClaimHookQueryValidator2,
|
|
8152
8152
|
ClaimHookTypeValidator: () => ClaimHookTypeValidator2,
|
|
8153
8153
|
ClaimHookValidator: () => ClaimHookValidator2,
|
|
8154
|
+
ClaimTokenValidator: () => ClaimTokenValidator2,
|
|
8154
8155
|
ConsentFlowContractDataForDidValidator: () => ConsentFlowContractDataForDidValidator2,
|
|
8155
8156
|
ConsentFlowContractDataValidator: () => ConsentFlowContractDataValidator2,
|
|
8156
8157
|
ConsentFlowContractDetailsValidator: () => ConsentFlowContractDetailsValidator2,
|
|
@@ -8165,6 +8166,11 @@ var require_types_cjs_development = __commonJS2({
|
|
|
8165
8166
|
ConsentFlowTransactionActionValidator: () => ConsentFlowTransactionActionValidator2,
|
|
8166
8167
|
ConsentFlowTransactionValidator: () => ConsentFlowTransactionValidator2,
|
|
8167
8168
|
ConsentFlowTransactionsQueryValidator: () => ConsentFlowTransactionsQueryValidator2,
|
|
8169
|
+
ContactMethodCreateValidator: () => ContactMethodCreateValidator2,
|
|
8170
|
+
ContactMethodQueryValidator: () => ContactMethodQueryValidator2,
|
|
8171
|
+
ContactMethodValidator: () => ContactMethodValidator2,
|
|
8172
|
+
ContactMethodVerificationRequestValidator: () => ContactMethodVerificationRequestValidator2,
|
|
8173
|
+
ContactMethodVerificationValidator: () => ContactMethodVerificationValidator2,
|
|
8168
8174
|
ContextValidator: () => ContextValidator2,
|
|
8169
8175
|
ContractCredentialValidator: () => ContractCredentialValidator2,
|
|
8170
8176
|
CredentialInfoValidator: () => CredentialInfoValidator2,
|
|
@@ -8186,6 +8192,11 @@ var require_types_cjs_development = __commonJS2({
|
|
|
8186
8192
|
IdentifierTypeValidator: () => IdentifierTypeValidator2,
|
|
8187
8193
|
IdentityObjectValidator: () => IdentityObjectValidator2,
|
|
8188
8194
|
ImageValidator: () => ImageValidator2,
|
|
8195
|
+
InboxCredentialQueryValidator: () => InboxCredentialQueryValidator2,
|
|
8196
|
+
InboxCredentialValidator: () => InboxCredentialValidator2,
|
|
8197
|
+
IssueInboxCredentialResponseValidator: () => IssueInboxCredentialResponseValidator2,
|
|
8198
|
+
IssueInboxCredentialValidator: () => IssueInboxCredentialValidator2,
|
|
8199
|
+
IssueInboxSigningAuthorityValidator: () => IssueInboxSigningAuthorityValidator2,
|
|
8189
8200
|
JWERecipientHeaderValidator: () => JWERecipientHeaderValidator2,
|
|
8190
8201
|
JWERecipientValidator: () => JWERecipientValidator2,
|
|
8191
8202
|
JWEValidator: () => JWEValidator2,
|
|
@@ -8195,7 +8206,10 @@ var require_types_cjs_development = __commonJS2({
|
|
|
8195
8206
|
LCNBoostClaimLinkOptionsValidator: () => LCNBoostClaimLinkOptionsValidator2,
|
|
8196
8207
|
LCNBoostClaimLinkSigningAuthorityValidator: () => LCNBoostClaimLinkSigningAuthorityValidator2,
|
|
8197
8208
|
LCNBoostStatus: () => LCNBoostStatus2,
|
|
8209
|
+
LCNInboxContactMethodValidator: () => LCNInboxContactMethodValidator2,
|
|
8210
|
+
LCNInboxStatusEnumValidator: () => LCNInboxStatusEnumValidator2,
|
|
8198
8211
|
LCNNotificationDataValidator: () => LCNNotificationDataValidator2,
|
|
8212
|
+
LCNNotificationInboxValidator: () => LCNNotificationInboxValidator2,
|
|
8199
8213
|
LCNNotificationMessageValidator: () => LCNNotificationMessageValidator2,
|
|
8200
8214
|
LCNNotificationTypeEnumValidator: () => LCNNotificationTypeEnumValidator2,
|
|
8201
8215
|
LCNNotificationValidator: () => LCNNotificationValidator2,
|
|
@@ -8218,6 +8232,7 @@ var require_types_cjs_development = __commonJS2({
|
|
|
8218
8232
|
PaginatedContractCredentialsValidator: () => PaginatedContractCredentialsValidator2,
|
|
8219
8233
|
PaginatedEncryptedCredentialRecordsValidator: () => PaginatedEncryptedCredentialRecordsValidator2,
|
|
8220
8234
|
PaginatedEncryptedRecordsValidator: () => PaginatedEncryptedRecordsValidator2,
|
|
8235
|
+
PaginatedInboxCredentialsValidator: () => PaginatedInboxCredentialsValidator2,
|
|
8221
8236
|
PaginatedLCNProfileManagersValidator: () => PaginatedLCNProfileManagersValidator2,
|
|
8222
8237
|
PaginatedLCNProfilesAndManagersValidator: () => PaginatedLCNProfilesAndManagersValidator2,
|
|
8223
8238
|
PaginatedLCNProfilesValidator: () => PaginatedLCNProfilesValidator2,
|
|
@@ -8235,6 +8250,7 @@ var require_types_cjs_development = __commonJS2({
|
|
|
8235
8250
|
RubricCriterionValidator: () => RubricCriterionValidator2,
|
|
8236
8251
|
SentCredentialInfoValidator: () => SentCredentialInfoValidator2,
|
|
8237
8252
|
ServiceValidator: () => ServiceValidator2,
|
|
8253
|
+
SetPrimaryContactMethodValidator: () => SetPrimaryContactMethodValidator2,
|
|
8238
8254
|
StringQuery: () => StringQuery2,
|
|
8239
8255
|
TermsOfUseValidator: () => TermsOfUseValidator2,
|
|
8240
8256
|
UnsignedAchievementCredentialValidator: () => UnsignedAchievementCredentialValidator2,
|
|
@@ -12742,7 +12758,7 @@ var require_types_cjs_development = __commonJS2({
|
|
|
12742
12758
|
bio: z2.string().default("").describe("Longer bio for the profile."),
|
|
12743
12759
|
did: z2.string().describe("Decentralized Identifier for the profile. (auto-assigned)"),
|
|
12744
12760
|
isPrivate: z2.boolean().optional().describe("Whether the profile is private or not and shows up in search results."),
|
|
12745
|
-
email: z2.string().optional().describe("Contact email address for the profile."),
|
|
12761
|
+
email: z2.string().optional().describe("Contact email address for the profile. (deprecated)"),
|
|
12746
12762
|
image: z2.string().optional().describe("Profile image URL for the profile."),
|
|
12747
12763
|
heroImage: z2.string().optional().describe("Hero image URL for the profile."),
|
|
12748
12764
|
websiteLink: z2.string().optional().describe("Website link for the profile."),
|
|
@@ -12911,7 +12927,8 @@ var require_types_cjs_development = __commonJS2({
|
|
|
12911
12927
|
name: z2.string().max(15).regex(/^[a-z0-9-]+$/, {
|
|
12912
12928
|
message: "The input string must contain only lowercase letters, numbers, and hyphens."
|
|
12913
12929
|
}),
|
|
12914
|
-
did: z2.string()
|
|
12930
|
+
did: z2.string(),
|
|
12931
|
+
isPrimary: z2.boolean().optional()
|
|
12915
12932
|
})
|
|
12916
12933
|
});
|
|
12917
12934
|
var AutoBoostConfigValidator2 = z2.object({
|
|
@@ -13092,16 +13109,33 @@ var require_types_cjs_development = __commonJS2({
|
|
|
13092
13109
|
"BOOST_ACCEPTED",
|
|
13093
13110
|
"PRESENTATION_REQUEST",
|
|
13094
13111
|
"PRESENTATION_RECEIVED",
|
|
13095
|
-
"CONSENT_FLOW_TRANSACTION"
|
|
13112
|
+
"CONSENT_FLOW_TRANSACTION",
|
|
13113
|
+
"ISSUANCE_CLAIMED",
|
|
13114
|
+
"ISSUANCE_DELIVERED"
|
|
13096
13115
|
]);
|
|
13097
13116
|
var LCNNotificationMessageValidator2 = z2.object({
|
|
13098
13117
|
title: z2.string().optional(),
|
|
13099
13118
|
body: z2.string().optional()
|
|
13100
13119
|
});
|
|
13120
|
+
var LCNInboxContactMethodValidator2 = z2.object({
|
|
13121
|
+
type: z2.string(),
|
|
13122
|
+
value: z2.string()
|
|
13123
|
+
});
|
|
13124
|
+
var LCNInboxStatusEnumValidator2 = z2.enum(["PENDING", "DELIVERED", "CLAIMED", "EXPIRED"]);
|
|
13125
|
+
var LCNNotificationInboxValidator2 = z2.object({
|
|
13126
|
+
issuanceId: z2.string(),
|
|
13127
|
+
status: LCNInboxStatusEnumValidator2,
|
|
13128
|
+
recipient: z2.object({
|
|
13129
|
+
contactMethod: LCNInboxContactMethodValidator2.optional(),
|
|
13130
|
+
learnCardId: z2.string().optional()
|
|
13131
|
+
}),
|
|
13132
|
+
timestamp: z2.string().datetime().optional()
|
|
13133
|
+
});
|
|
13101
13134
|
var LCNNotificationDataValidator2 = z2.object({
|
|
13102
13135
|
vcUris: z2.array(z2.string()).optional(),
|
|
13103
13136
|
vpUris: z2.array(z2.string()).optional(),
|
|
13104
|
-
transaction: ConsentFlowTransactionValidator2.optional()
|
|
13137
|
+
transaction: ConsentFlowTransactionValidator2.optional(),
|
|
13138
|
+
inbox: LCNNotificationInboxValidator2.optional()
|
|
13105
13139
|
});
|
|
13106
13140
|
var LCNNotificationValidator2 = z2.object({
|
|
13107
13141
|
type: LCNNotificationTypeEnumValidator2,
|
|
@@ -13109,7 +13143,8 @@ var require_types_cjs_development = __commonJS2({
|
|
|
13109
13143
|
from: LCNProfileValidator2.partial().and(z2.object({ did: z2.string() })),
|
|
13110
13144
|
message: LCNNotificationMessageValidator2.optional(),
|
|
13111
13145
|
data: LCNNotificationDataValidator2.optional(),
|
|
13112
|
-
sent: z2.string().datetime().optional()
|
|
13146
|
+
sent: z2.string().datetime().optional(),
|
|
13147
|
+
webhookUrl: z2.string().optional()
|
|
13113
13148
|
});
|
|
13114
13149
|
var AUTH_GRANT_AUDIENCE_DOMAIN_PREFIX2 = "auth-grant:";
|
|
13115
13150
|
var AuthGrantValidator2 = z2.object({
|
|
@@ -13133,6 +13168,126 @@ var require_types_cjs_development = __commonJS2({
|
|
|
13133
13168
|
description: StringQuery2,
|
|
13134
13169
|
status: AuthGrantStatusValidator2
|
|
13135
13170
|
}).partial();
|
|
13171
|
+
var contactMethodBase2 = z2.object({
|
|
13172
|
+
id: z2.string(),
|
|
13173
|
+
isVerified: z2.boolean(),
|
|
13174
|
+
verifiedAt: z2.string().optional(),
|
|
13175
|
+
isPrimary: z2.boolean(),
|
|
13176
|
+
createdAt: z2.string()
|
|
13177
|
+
});
|
|
13178
|
+
var ContactMethodValidator2 = z2.discriminatedUnion("type", [
|
|
13179
|
+
z2.object({
|
|
13180
|
+
type: z2.literal("email"),
|
|
13181
|
+
value: z2.string().email()
|
|
13182
|
+
}).merge(contactMethodBase2),
|
|
13183
|
+
z2.object({
|
|
13184
|
+
type: z2.literal("phone"),
|
|
13185
|
+
value: z2.string()
|
|
13186
|
+
}).merge(contactMethodBase2)
|
|
13187
|
+
]);
|
|
13188
|
+
var createContactMethodBase2 = z2.object({
|
|
13189
|
+
isVerified: z2.boolean().optional(),
|
|
13190
|
+
isPrimary: z2.boolean().optional()
|
|
13191
|
+
});
|
|
13192
|
+
var ContactMethodCreateValidator2 = z2.discriminatedUnion("type", [
|
|
13193
|
+
z2.object({
|
|
13194
|
+
type: z2.literal("email"),
|
|
13195
|
+
value: z2.string().email()
|
|
13196
|
+
}).merge(createContactMethodBase2),
|
|
13197
|
+
z2.object({
|
|
13198
|
+
type: z2.literal("phone"),
|
|
13199
|
+
value: z2.string()
|
|
13200
|
+
}).merge(createContactMethodBase2)
|
|
13201
|
+
]);
|
|
13202
|
+
var ContactMethodQueryValidator2 = z2.discriminatedUnion("type", [
|
|
13203
|
+
z2.object({
|
|
13204
|
+
type: z2.literal("email"),
|
|
13205
|
+
value: z2.string().email()
|
|
13206
|
+
}),
|
|
13207
|
+
z2.object({
|
|
13208
|
+
type: z2.literal("phone"),
|
|
13209
|
+
value: z2.string()
|
|
13210
|
+
})
|
|
13211
|
+
]);
|
|
13212
|
+
var ContactMethodVerificationRequestValidator2 = z2.object({
|
|
13213
|
+
value: z2.string(),
|
|
13214
|
+
type: z2.enum(["email", "phone"])
|
|
13215
|
+
});
|
|
13216
|
+
var ContactMethodVerificationValidator2 = z2.object({
|
|
13217
|
+
token: z2.string()
|
|
13218
|
+
});
|
|
13219
|
+
var SetPrimaryContactMethodValidator2 = z2.object({
|
|
13220
|
+
contactMethodId: z2.string()
|
|
13221
|
+
});
|
|
13222
|
+
var InboxCredentialValidator2 = z2.object({
|
|
13223
|
+
id: z2.string(),
|
|
13224
|
+
credential: z2.string(),
|
|
13225
|
+
isSigned: z2.boolean(),
|
|
13226
|
+
currentStatus: LCNInboxStatusEnumValidator2,
|
|
13227
|
+
expiresAt: z2.string(),
|
|
13228
|
+
createdAt: z2.string(),
|
|
13229
|
+
issuerDid: z2.string(),
|
|
13230
|
+
webhookUrl: z2.string().optional(),
|
|
13231
|
+
"signingAuthority.endpoint": z2.string().optional(),
|
|
13232
|
+
"signingAuthority.name": z2.string().optional()
|
|
13233
|
+
});
|
|
13234
|
+
var PaginatedInboxCredentialsValidator2 = z2.object({
|
|
13235
|
+
hasMore: z2.boolean(),
|
|
13236
|
+
records: z2.array(InboxCredentialValidator2),
|
|
13237
|
+
cursor: z2.string().optional()
|
|
13238
|
+
});
|
|
13239
|
+
var InboxCredentialQueryValidator2 = z2.object({
|
|
13240
|
+
currentStatus: LCNInboxStatusEnumValidator2,
|
|
13241
|
+
id: z2.string(),
|
|
13242
|
+
isSigned: z2.boolean(),
|
|
13243
|
+
issuerDid: z2.string()
|
|
13244
|
+
}).partial();
|
|
13245
|
+
var IssueInboxSigningAuthorityValidator2 = z2.object({
|
|
13246
|
+
endpoint: z2.string().url(),
|
|
13247
|
+
name: z2.string()
|
|
13248
|
+
});
|
|
13249
|
+
var IssueInboxCredentialValidator2 = z2.object({
|
|
13250
|
+
recipient: ContactMethodQueryValidator2.describe("The recipient of the credential"),
|
|
13251
|
+
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."),
|
|
13252
|
+
configuration: z2.object({
|
|
13253
|
+
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."),
|
|
13254
|
+
webhookUrl: z2.string().url().optional().describe("The webhook URL to receive credential issuance events."),
|
|
13255
|
+
expiresInDays: z2.number().min(1).max(365).optional().describe("The number of days the credential will be valid for."),
|
|
13256
|
+
delivery: z2.object({
|
|
13257
|
+
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."),
|
|
13258
|
+
template: z2.object({
|
|
13259
|
+
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."),
|
|
13260
|
+
model: z2.object({
|
|
13261
|
+
issuer: z2.object({
|
|
13262
|
+
name: z2.string().optional().describe('The name of the organization (e.g., "State University").'),
|
|
13263
|
+
logoUrl: z2.string().url().optional().describe("The URL of the organization's logo.")
|
|
13264
|
+
}).optional(),
|
|
13265
|
+
credential: z2.object({
|
|
13266
|
+
name: z2.string().optional().describe('The name of the credential (e.g., "Bachelor of Science").'),
|
|
13267
|
+
type: z2.string().optional().describe('The type of the credential (e.g., "degree", "certificate").')
|
|
13268
|
+
}).optional(),
|
|
13269
|
+
recipient: z2.object({
|
|
13270
|
+
name: z2.string().optional().describe('The name of the recipient (e.g., "John Doe").')
|
|
13271
|
+
}).optional()
|
|
13272
|
+
}).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.")
|
|
13273
|
+
}).optional().describe("The template to use for the credential delivery. If not provided, the default template will be used.")
|
|
13274
|
+
}).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.")
|
|
13275
|
+
}).optional().describe("Configuration for the credential issuance. If not provided, the default configuration will be used.")
|
|
13276
|
+
});
|
|
13277
|
+
var IssueInboxCredentialResponseValidator2 = z2.object({
|
|
13278
|
+
issuanceId: z2.string(),
|
|
13279
|
+
status: LCNInboxStatusEnumValidator2,
|
|
13280
|
+
recipient: ContactMethodQueryValidator2,
|
|
13281
|
+
claimUrl: z2.string().url().optional(),
|
|
13282
|
+
recipientDid: z2.string().optional()
|
|
13283
|
+
});
|
|
13284
|
+
var ClaimTokenValidator2 = z2.object({
|
|
13285
|
+
token: z2.string(),
|
|
13286
|
+
contactMethodId: z2.string(),
|
|
13287
|
+
createdAt: z2.string(),
|
|
13288
|
+
expiresAt: z2.string(),
|
|
13289
|
+
used: z2.boolean()
|
|
13290
|
+
});
|
|
13136
13291
|
}
|
|
13137
13292
|
});
|
|
13138
13293
|
var require_dist = __commonJS2({
|
|
@@ -17607,7 +17762,7 @@ var LCNProfileValidator = z.object({
|
|
|
17607
17762
|
bio: z.string().default("").describe("Longer bio for the profile."),
|
|
17608
17763
|
did: z.string().describe("Decentralized Identifier for the profile. (auto-assigned)"),
|
|
17609
17764
|
isPrivate: z.boolean().optional().describe("Whether the profile is private or not and shows up in search results."),
|
|
17610
|
-
email: z.string().optional().describe("Contact email address for the profile."),
|
|
17765
|
+
email: z.string().optional().describe("Contact email address for the profile. (deprecated)"),
|
|
17611
17766
|
image: z.string().optional().describe("Profile image URL for the profile."),
|
|
17612
17767
|
heroImage: z.string().optional().describe("Hero image URL for the profile."),
|
|
17613
17768
|
websiteLink: z.string().optional().describe("Website link for the profile."),
|
|
@@ -17776,7 +17931,8 @@ var LCNSigningAuthorityForUserValidator = z.object({
|
|
|
17776
17931
|
name: z.string().max(15).regex(/^[a-z0-9-]+$/, {
|
|
17777
17932
|
message: "The input string must contain only lowercase letters, numbers, and hyphens."
|
|
17778
17933
|
}),
|
|
17779
|
-
did: z.string()
|
|
17934
|
+
did: z.string(),
|
|
17935
|
+
isPrimary: z.boolean().optional()
|
|
17780
17936
|
})
|
|
17781
17937
|
});
|
|
17782
17938
|
var AutoBoostConfigValidator = z.object({
|
|
@@ -17957,16 +18113,33 @@ var LCNNotificationTypeEnumValidator = z.enum([
|
|
|
17957
18113
|
"BOOST_ACCEPTED",
|
|
17958
18114
|
"PRESENTATION_REQUEST",
|
|
17959
18115
|
"PRESENTATION_RECEIVED",
|
|
17960
|
-
"CONSENT_FLOW_TRANSACTION"
|
|
18116
|
+
"CONSENT_FLOW_TRANSACTION",
|
|
18117
|
+
"ISSUANCE_CLAIMED",
|
|
18118
|
+
"ISSUANCE_DELIVERED"
|
|
17961
18119
|
]);
|
|
17962
18120
|
var LCNNotificationMessageValidator = z.object({
|
|
17963
18121
|
title: z.string().optional(),
|
|
17964
18122
|
body: z.string().optional()
|
|
17965
18123
|
});
|
|
18124
|
+
var LCNInboxContactMethodValidator = z.object({
|
|
18125
|
+
type: z.string(),
|
|
18126
|
+
value: z.string()
|
|
18127
|
+
});
|
|
18128
|
+
var LCNInboxStatusEnumValidator = z.enum(["PENDING", "DELIVERED", "CLAIMED", "EXPIRED"]);
|
|
18129
|
+
var LCNNotificationInboxValidator = z.object({
|
|
18130
|
+
issuanceId: z.string(),
|
|
18131
|
+
status: LCNInboxStatusEnumValidator,
|
|
18132
|
+
recipient: z.object({
|
|
18133
|
+
contactMethod: LCNInboxContactMethodValidator.optional(),
|
|
18134
|
+
learnCardId: z.string().optional()
|
|
18135
|
+
}),
|
|
18136
|
+
timestamp: z.string().datetime().optional()
|
|
18137
|
+
});
|
|
17966
18138
|
var LCNNotificationDataValidator = z.object({
|
|
17967
18139
|
vcUris: z.array(z.string()).optional(),
|
|
17968
18140
|
vpUris: z.array(z.string()).optional(),
|
|
17969
|
-
transaction: ConsentFlowTransactionValidator.optional()
|
|
18141
|
+
transaction: ConsentFlowTransactionValidator.optional(),
|
|
18142
|
+
inbox: LCNNotificationInboxValidator.optional()
|
|
17970
18143
|
});
|
|
17971
18144
|
var LCNNotificationValidator = z.object({
|
|
17972
18145
|
type: LCNNotificationTypeEnumValidator,
|
|
@@ -17974,7 +18147,8 @@ var LCNNotificationValidator = z.object({
|
|
|
17974
18147
|
from: LCNProfileValidator.partial().and(z.object({ did: z.string() })),
|
|
17975
18148
|
message: LCNNotificationMessageValidator.optional(),
|
|
17976
18149
|
data: LCNNotificationDataValidator.optional(),
|
|
17977
|
-
sent: z.string().datetime().optional()
|
|
18150
|
+
sent: z.string().datetime().optional(),
|
|
18151
|
+
webhookUrl: z.string().optional()
|
|
17978
18152
|
});
|
|
17979
18153
|
var AUTH_GRANT_AUDIENCE_DOMAIN_PREFIX = "auth-grant:";
|
|
17980
18154
|
var AuthGrantValidator = z.object({
|
|
@@ -17998,6 +18172,126 @@ var AuthGrantQueryValidator = z.object({
|
|
|
17998
18172
|
description: StringQuery,
|
|
17999
18173
|
status: AuthGrantStatusValidator
|
|
18000
18174
|
}).partial();
|
|
18175
|
+
var contactMethodBase = z.object({
|
|
18176
|
+
id: z.string(),
|
|
18177
|
+
isVerified: z.boolean(),
|
|
18178
|
+
verifiedAt: z.string().optional(),
|
|
18179
|
+
isPrimary: z.boolean(),
|
|
18180
|
+
createdAt: z.string()
|
|
18181
|
+
});
|
|
18182
|
+
var ContactMethodValidator = z.discriminatedUnion("type", [
|
|
18183
|
+
z.object({
|
|
18184
|
+
type: z.literal("email"),
|
|
18185
|
+
value: z.string().email()
|
|
18186
|
+
}).merge(contactMethodBase),
|
|
18187
|
+
z.object({
|
|
18188
|
+
type: z.literal("phone"),
|
|
18189
|
+
value: z.string()
|
|
18190
|
+
}).merge(contactMethodBase)
|
|
18191
|
+
]);
|
|
18192
|
+
var createContactMethodBase = z.object({
|
|
18193
|
+
isVerified: z.boolean().optional(),
|
|
18194
|
+
isPrimary: z.boolean().optional()
|
|
18195
|
+
});
|
|
18196
|
+
var ContactMethodCreateValidator = z.discriminatedUnion("type", [
|
|
18197
|
+
z.object({
|
|
18198
|
+
type: z.literal("email"),
|
|
18199
|
+
value: z.string().email()
|
|
18200
|
+
}).merge(createContactMethodBase),
|
|
18201
|
+
z.object({
|
|
18202
|
+
type: z.literal("phone"),
|
|
18203
|
+
value: z.string()
|
|
18204
|
+
}).merge(createContactMethodBase)
|
|
18205
|
+
]);
|
|
18206
|
+
var ContactMethodQueryValidator = z.discriminatedUnion("type", [
|
|
18207
|
+
z.object({
|
|
18208
|
+
type: z.literal("email"),
|
|
18209
|
+
value: z.string().email()
|
|
18210
|
+
}),
|
|
18211
|
+
z.object({
|
|
18212
|
+
type: z.literal("phone"),
|
|
18213
|
+
value: z.string()
|
|
18214
|
+
})
|
|
18215
|
+
]);
|
|
18216
|
+
var ContactMethodVerificationRequestValidator = z.object({
|
|
18217
|
+
value: z.string(),
|
|
18218
|
+
type: z.enum(["email", "phone"])
|
|
18219
|
+
});
|
|
18220
|
+
var ContactMethodVerificationValidator = z.object({
|
|
18221
|
+
token: z.string()
|
|
18222
|
+
});
|
|
18223
|
+
var SetPrimaryContactMethodValidator = z.object({
|
|
18224
|
+
contactMethodId: z.string()
|
|
18225
|
+
});
|
|
18226
|
+
var InboxCredentialValidator = z.object({
|
|
18227
|
+
id: z.string(),
|
|
18228
|
+
credential: z.string(),
|
|
18229
|
+
isSigned: z.boolean(),
|
|
18230
|
+
currentStatus: LCNInboxStatusEnumValidator,
|
|
18231
|
+
expiresAt: z.string(),
|
|
18232
|
+
createdAt: z.string(),
|
|
18233
|
+
issuerDid: z.string(),
|
|
18234
|
+
webhookUrl: z.string().optional(),
|
|
18235
|
+
"signingAuthority.endpoint": z.string().optional(),
|
|
18236
|
+
"signingAuthority.name": z.string().optional()
|
|
18237
|
+
});
|
|
18238
|
+
var PaginatedInboxCredentialsValidator = z.object({
|
|
18239
|
+
hasMore: z.boolean(),
|
|
18240
|
+
records: z.array(InboxCredentialValidator),
|
|
18241
|
+
cursor: z.string().optional()
|
|
18242
|
+
});
|
|
18243
|
+
var InboxCredentialQueryValidator = z.object({
|
|
18244
|
+
currentStatus: LCNInboxStatusEnumValidator,
|
|
18245
|
+
id: z.string(),
|
|
18246
|
+
isSigned: z.boolean(),
|
|
18247
|
+
issuerDid: z.string()
|
|
18248
|
+
}).partial();
|
|
18249
|
+
var IssueInboxSigningAuthorityValidator = z.object({
|
|
18250
|
+
endpoint: z.string().url(),
|
|
18251
|
+
name: z.string()
|
|
18252
|
+
});
|
|
18253
|
+
var IssueInboxCredentialValidator = z.object({
|
|
18254
|
+
recipient: ContactMethodQueryValidator.describe("The recipient of the credential"),
|
|
18255
|
+
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."),
|
|
18256
|
+
configuration: z.object({
|
|
18257
|
+
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."),
|
|
18258
|
+
webhookUrl: z.string().url().optional().describe("The webhook URL to receive credential issuance events."),
|
|
18259
|
+
expiresInDays: z.number().min(1).max(365).optional().describe("The number of days the credential will be valid for."),
|
|
18260
|
+
delivery: z.object({
|
|
18261
|
+
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."),
|
|
18262
|
+
template: z.object({
|
|
18263
|
+
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."),
|
|
18264
|
+
model: z.object({
|
|
18265
|
+
issuer: z.object({
|
|
18266
|
+
name: z.string().optional().describe('The name of the organization (e.g., "State University").'),
|
|
18267
|
+
logoUrl: z.string().url().optional().describe("The URL of the organization's logo.")
|
|
18268
|
+
}).optional(),
|
|
18269
|
+
credential: z.object({
|
|
18270
|
+
name: z.string().optional().describe('The name of the credential (e.g., "Bachelor of Science").'),
|
|
18271
|
+
type: z.string().optional().describe('The type of the credential (e.g., "degree", "certificate").')
|
|
18272
|
+
}).optional(),
|
|
18273
|
+
recipient: z.object({
|
|
18274
|
+
name: z.string().optional().describe('The name of the recipient (e.g., "John Doe").')
|
|
18275
|
+
}).optional()
|
|
18276
|
+
}).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.")
|
|
18277
|
+
}).optional().describe("The template to use for the credential delivery. If not provided, the default template will be used.")
|
|
18278
|
+
}).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.")
|
|
18279
|
+
}).optional().describe("Configuration for the credential issuance. If not provided, the default configuration will be used.")
|
|
18280
|
+
});
|
|
18281
|
+
var IssueInboxCredentialResponseValidator = z.object({
|
|
18282
|
+
issuanceId: z.string(),
|
|
18283
|
+
status: LCNInboxStatusEnumValidator,
|
|
18284
|
+
recipient: ContactMethodQueryValidator,
|
|
18285
|
+
claimUrl: z.string().url().optional(),
|
|
18286
|
+
recipientDid: z.string().optional()
|
|
18287
|
+
});
|
|
18288
|
+
var ClaimTokenValidator = z.object({
|
|
18289
|
+
token: z.string(),
|
|
18290
|
+
contactMethodId: z.string(),
|
|
18291
|
+
createdAt: z.string(),
|
|
18292
|
+
expiresAt: z.string(),
|
|
18293
|
+
used: z.boolean()
|
|
18294
|
+
});
|
|
18001
18295
|
|
|
18002
18296
|
// src/helpers.ts
|
|
18003
18297
|
var import_json_stringify_deterministic = __toESM(require_lib());
|