@learncard/learn-card-plugin 1.1.62 → 1.1.64
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-card-plugin.cjs.development.js +266 -22
- package/dist/learn-card-plugin.cjs.development.js.map +2 -2
- package/dist/learn-card-plugin.cjs.production.min.js +1 -1
- package/dist/learn-card-plugin.cjs.production.min.js.map +3 -3
- package/dist/learn-card-plugin.esm.js +266 -22
- package/dist/learn-card-plugin.esm.js.map +2 -2
- package/dist/verify.d.ts.map +1 -1
- package/package.json +4 -4
|
@@ -4462,7 +4462,14 @@ var RegExpValidator = z.instanceof(RegExp).or(
|
|
|
4462
4462
|
}
|
|
4463
4463
|
})
|
|
4464
4464
|
);
|
|
4465
|
-
var
|
|
4465
|
+
var BaseStringQuery = z.string().or(z.object({ $in: z.string().array() })).or(z.object({ $regex: RegExpValidator }));
|
|
4466
|
+
var StringQuery = z.union([
|
|
4467
|
+
BaseStringQuery,
|
|
4468
|
+
z.object({
|
|
4469
|
+
$or: BaseStringQuery.array()
|
|
4470
|
+
})
|
|
4471
|
+
]);
|
|
4472
|
+
extendZodWithOpenApi(z);
|
|
4466
4473
|
var LCNProfileDisplayValidator = z.object({
|
|
4467
4474
|
backgroundColor: z.string().optional(),
|
|
4468
4475
|
backgroundImage: z.string().optional(),
|
|
@@ -4620,7 +4627,7 @@ var BoostValidator = z.object({
|
|
|
4620
4627
|
claimPermissions: BoostPermissionsValidator.optional(),
|
|
4621
4628
|
allowAnyoneToCreateChildren: z.boolean().optional()
|
|
4622
4629
|
});
|
|
4623
|
-
var
|
|
4630
|
+
var BaseBoostQueryValidator = z.object({
|
|
4624
4631
|
uri: StringQuery,
|
|
4625
4632
|
name: StringQuery,
|
|
4626
4633
|
type: StringQuery,
|
|
@@ -4629,6 +4636,12 @@ var BoostQueryValidator = z.object({
|
|
|
4629
4636
|
status: LCNBoostStatus.or(z.object({ $in: LCNBoostStatus.array() })),
|
|
4630
4637
|
autoConnectRecipients: z.boolean()
|
|
4631
4638
|
}).partial();
|
|
4639
|
+
var BoostQueryValidator = z.union([
|
|
4640
|
+
z.object({
|
|
4641
|
+
$or: BaseBoostQueryValidator.array()
|
|
4642
|
+
}),
|
|
4643
|
+
BaseBoostQueryValidator
|
|
4644
|
+
]);
|
|
4632
4645
|
var PaginatedBoostsValidator = PaginationResponseValidator.extend({
|
|
4633
4646
|
records: BoostValidator.array()
|
|
4634
4647
|
});
|
|
@@ -4684,11 +4697,25 @@ var ConsentFlowTermsStatusValidator = z.enum(["live", "stale", "withdrawn"]);
|
|
|
4684
4697
|
var ConsentFlowContractValidator = z.object({
|
|
4685
4698
|
read: z.object({
|
|
4686
4699
|
anonymize: z.boolean().optional(),
|
|
4687
|
-
credentials: z.object({
|
|
4700
|
+
credentials: z.object({
|
|
4701
|
+
categories: z.record(
|
|
4702
|
+
z.object({
|
|
4703
|
+
required: z.boolean(),
|
|
4704
|
+
defaultEnabled: z.boolean().optional()
|
|
4705
|
+
})
|
|
4706
|
+
).default({})
|
|
4707
|
+
}).default({}),
|
|
4688
4708
|
personal: z.record(z.object({ required: z.boolean(), defaultEnabled: z.boolean().optional() })).default({})
|
|
4689
4709
|
}).default({}),
|
|
4690
4710
|
write: z.object({
|
|
4691
|
-
credentials: z.object({
|
|
4711
|
+
credentials: z.object({
|
|
4712
|
+
categories: z.record(
|
|
4713
|
+
z.object({
|
|
4714
|
+
required: z.boolean(),
|
|
4715
|
+
defaultEnabled: z.boolean().optional()
|
|
4716
|
+
})
|
|
4717
|
+
).default({})
|
|
4718
|
+
}).default({}),
|
|
4692
4719
|
personal: z.record(z.object({ required: z.boolean(), defaultEnabled: z.boolean().optional() })).default({})
|
|
4693
4720
|
}).default({})
|
|
4694
4721
|
});
|
|
@@ -4831,6 +4858,17 @@ var ConsentFlowTransactionValidator = z.object({
|
|
|
4831
4858
|
var PaginatedConsentFlowTransactionsValidator = PaginationResponseValidator.extend({
|
|
4832
4859
|
records: ConsentFlowTransactionValidator.array()
|
|
4833
4860
|
});
|
|
4861
|
+
var BaseSkillFrameworkQueryValidator = z.object({
|
|
4862
|
+
id: StringQuery,
|
|
4863
|
+
name: StringQuery,
|
|
4864
|
+
description: StringQuery,
|
|
4865
|
+
sourceURI: StringQuery,
|
|
4866
|
+
status: StringQuery
|
|
4867
|
+
}).partial();
|
|
4868
|
+
var SkillFrameworkQueryValidator = z.union([
|
|
4869
|
+
z.object({ $or: BaseSkillFrameworkQueryValidator.array() }),
|
|
4870
|
+
BaseSkillFrameworkQueryValidator
|
|
4871
|
+
]);
|
|
4834
4872
|
var ContractCredentialValidator = z.object({
|
|
4835
4873
|
credentialUri: z.string(),
|
|
4836
4874
|
termsUri: z.string(),
|
|
@@ -5009,31 +5047,55 @@ var IssueInboxSigningAuthorityValidator = z.object({
|
|
|
5009
5047
|
});
|
|
5010
5048
|
var IssueInboxCredentialValidator = z.object({
|
|
5011
5049
|
recipient: ContactMethodQueryValidator.describe("The recipient of the credential"),
|
|
5012
|
-
credential: VCValidator.passthrough().or(VPValidator.passthrough()).or(UnsignedVCValidator.passthrough()).describe(
|
|
5050
|
+
credential: VCValidator.passthrough().or(VPValidator.passthrough()).or(UnsignedVCValidator.passthrough()).describe(
|
|
5051
|
+
"The credential to issue. If not signed, the users default signing authority will be used, or the specified signing authority in the configuration."
|
|
5052
|
+
),
|
|
5013
5053
|
configuration: z.object({
|
|
5014
|
-
signingAuthority: IssueInboxSigningAuthorityValidator.optional().describe(
|
|
5054
|
+
signingAuthority: IssueInboxSigningAuthorityValidator.optional().describe(
|
|
5055
|
+
"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."
|
|
5056
|
+
),
|
|
5015
5057
|
webhookUrl: z.string().url().optional().describe("The webhook URL to receive credential issuance events."),
|
|
5016
5058
|
expiresInDays: z.number().min(1).max(365).optional().describe("The number of days the credential will be valid for."),
|
|
5017
5059
|
delivery: z.object({
|
|
5018
|
-
suppress: z.boolean().optional().default(false).describe(
|
|
5060
|
+
suppress: z.boolean().optional().default(false).describe(
|
|
5061
|
+
"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."
|
|
5062
|
+
),
|
|
5019
5063
|
template: z.object({
|
|
5020
|
-
id: z.enum(["universal-inbox-claim"]).optional().describe(
|
|
5064
|
+
id: z.enum(["universal-inbox-claim"]).optional().describe(
|
|
5065
|
+
"The template ID to use for the credential delivery. If not provided, the default template will be used."
|
|
5066
|
+
),
|
|
5021
5067
|
model: z.object({
|
|
5022
5068
|
issuer: z.object({
|
|
5023
|
-
name: z.string().optional().describe(
|
|
5069
|
+
name: z.string().optional().describe(
|
|
5070
|
+
'The name of the organization (e.g., "State University").'
|
|
5071
|
+
),
|
|
5024
5072
|
logoUrl: z.string().url().optional().describe("The URL of the organization's logo.")
|
|
5025
5073
|
}).optional(),
|
|
5026
5074
|
credential: z.object({
|
|
5027
|
-
name: z.string().optional().describe(
|
|
5028
|
-
|
|
5075
|
+
name: z.string().optional().describe(
|
|
5076
|
+
'The name of the credential (e.g., "Bachelor of Science").'
|
|
5077
|
+
),
|
|
5078
|
+
type: z.string().optional().describe(
|
|
5079
|
+
'The type of the credential (e.g., "degree", "certificate").'
|
|
5080
|
+
)
|
|
5029
5081
|
}).optional(),
|
|
5030
5082
|
recipient: z.object({
|
|
5031
|
-
name: z.string().optional().describe(
|
|
5083
|
+
name: z.string().optional().describe(
|
|
5084
|
+
'The name of the recipient (e.g., "John Doe").'
|
|
5085
|
+
)
|
|
5032
5086
|
}).optional()
|
|
5033
|
-
}).describe(
|
|
5034
|
-
|
|
5035
|
-
|
|
5036
|
-
|
|
5087
|
+
}).describe(
|
|
5088
|
+
"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."
|
|
5089
|
+
)
|
|
5090
|
+
}).optional().describe(
|
|
5091
|
+
"The template to use for the credential delivery. If not provided, the default template will be used."
|
|
5092
|
+
)
|
|
5093
|
+
}).optional().describe(
|
|
5094
|
+
"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."
|
|
5095
|
+
)
|
|
5096
|
+
}).optional().describe(
|
|
5097
|
+
"Configuration for the credential issuance. If not provided, the default configuration will be used."
|
|
5098
|
+
)
|
|
5037
5099
|
});
|
|
5038
5100
|
var IssueInboxCredentialResponseValidator = z.object({
|
|
5039
5101
|
issuanceId: z.string(),
|
|
@@ -5095,6 +5157,191 @@ var ClaimTokenValidator = z.object({
|
|
|
5095
5157
|
expiresAt: z.string(),
|
|
5096
5158
|
used: z.boolean()
|
|
5097
5159
|
});
|
|
5160
|
+
var TagValidator = z.object({
|
|
5161
|
+
id: z.string(),
|
|
5162
|
+
name: z.string().min(1),
|
|
5163
|
+
slug: z.string().min(1),
|
|
5164
|
+
createdAt: z.string().optional(),
|
|
5165
|
+
updatedAt: z.string().optional()
|
|
5166
|
+
});
|
|
5167
|
+
var SkillStatusEnum = z.enum(["active", "archived"]);
|
|
5168
|
+
var SkillValidator = z.object({
|
|
5169
|
+
id: z.string(),
|
|
5170
|
+
statement: z.string(),
|
|
5171
|
+
description: z.string().optional(),
|
|
5172
|
+
code: z.string().optional(),
|
|
5173
|
+
icon: z.string().optional(),
|
|
5174
|
+
type: z.string().default("skill"),
|
|
5175
|
+
status: SkillStatusEnum.default("active"),
|
|
5176
|
+
frameworkId: z.string().optional(),
|
|
5177
|
+
createdAt: z.string().optional(),
|
|
5178
|
+
updatedAt: z.string().optional()
|
|
5179
|
+
});
|
|
5180
|
+
var BaseSkillQueryValidator = z.object({
|
|
5181
|
+
id: StringQuery,
|
|
5182
|
+
statement: StringQuery,
|
|
5183
|
+
description: StringQuery,
|
|
5184
|
+
code: StringQuery,
|
|
5185
|
+
type: StringQuery,
|
|
5186
|
+
status: SkillStatusEnum.or(z.object({ $in: SkillStatusEnum.array() }))
|
|
5187
|
+
}).partial();
|
|
5188
|
+
var SkillQueryValidator = z.union([
|
|
5189
|
+
z.object({
|
|
5190
|
+
$or: BaseSkillQueryValidator.array()
|
|
5191
|
+
}),
|
|
5192
|
+
BaseSkillQueryValidator
|
|
5193
|
+
]);
|
|
5194
|
+
var SkillFrameworkStatusEnum = z.enum(["active", "archived"]);
|
|
5195
|
+
var SkillFrameworkValidator = z.object({
|
|
5196
|
+
id: z.string(),
|
|
5197
|
+
name: z.string(),
|
|
5198
|
+
description: z.string().optional(),
|
|
5199
|
+
image: z.string().optional(),
|
|
5200
|
+
sourceURI: z.string().url().optional(),
|
|
5201
|
+
status: SkillFrameworkStatusEnum.default("active"),
|
|
5202
|
+
createdAt: z.string().optional(),
|
|
5203
|
+
updatedAt: z.string().optional()
|
|
5204
|
+
});
|
|
5205
|
+
var PaginatedSkillFrameworksValidator = PaginationResponseValidator.extend({
|
|
5206
|
+
records: SkillFrameworkValidator.array()
|
|
5207
|
+
});
|
|
5208
|
+
var SkillTreeNodeValidator = SkillValidator.extend({
|
|
5209
|
+
children: z.array(z.lazy(() => SkillTreeNodeValidator)),
|
|
5210
|
+
hasChildren: z.boolean(),
|
|
5211
|
+
childrenCursor: z.string().nullable().optional()
|
|
5212
|
+
}).openapi({ ref: "SkillTreeNode" });
|
|
5213
|
+
var PaginatedSkillTreeValidator = z.object({
|
|
5214
|
+
hasMore: z.boolean(),
|
|
5215
|
+
cursor: z.string().nullable(),
|
|
5216
|
+
records: z.array(SkillTreeNodeValidator)
|
|
5217
|
+
});
|
|
5218
|
+
var SkillTreeNodeInputValidator = z.lazy(
|
|
5219
|
+
() => z.object({
|
|
5220
|
+
id: z.string().optional(),
|
|
5221
|
+
statement: z.string(),
|
|
5222
|
+
description: z.string().optional(),
|
|
5223
|
+
code: z.string().optional(),
|
|
5224
|
+
icon: z.string().optional(),
|
|
5225
|
+
type: z.string().optional(),
|
|
5226
|
+
status: SkillStatusEnum.optional(),
|
|
5227
|
+
children: z.array(SkillTreeNodeInputValidator).optional()
|
|
5228
|
+
})
|
|
5229
|
+
).openapi({ ref: "SkillTreeNodeInput" });
|
|
5230
|
+
var LinkProviderFrameworkInputValidator = z.object({
|
|
5231
|
+
frameworkId: z.string()
|
|
5232
|
+
});
|
|
5233
|
+
var CreateManagedFrameworkInputValidator = z.object({
|
|
5234
|
+
id: z.string().optional(),
|
|
5235
|
+
name: z.string().min(1),
|
|
5236
|
+
description: z.string().optional(),
|
|
5237
|
+
image: z.string().optional(),
|
|
5238
|
+
sourceURI: z.string().url().optional(),
|
|
5239
|
+
status: SkillFrameworkStatusEnum.optional(),
|
|
5240
|
+
skills: z.array(SkillTreeNodeInputValidator).optional(),
|
|
5241
|
+
boostUris: z.array(z.string()).optional()
|
|
5242
|
+
});
|
|
5243
|
+
var UpdateFrameworkInputValidator = z.object({
|
|
5244
|
+
id: z.string(),
|
|
5245
|
+
name: z.string().min(1).optional(),
|
|
5246
|
+
description: z.string().optional(),
|
|
5247
|
+
image: z.string().optional(),
|
|
5248
|
+
sourceURI: z.string().url().optional(),
|
|
5249
|
+
status: SkillFrameworkStatusEnum.optional()
|
|
5250
|
+
}).refine(
|
|
5251
|
+
(data) => data.name !== void 0 || data.description !== void 0 || data.image !== void 0 || data.sourceURI !== void 0 || data.status !== void 0,
|
|
5252
|
+
{
|
|
5253
|
+
message: "At least one field must be provided to update",
|
|
5254
|
+
path: ["name"]
|
|
5255
|
+
}
|
|
5256
|
+
);
|
|
5257
|
+
var DeleteFrameworkInputValidator = z.object({ id: z.string() });
|
|
5258
|
+
var CreateManagedFrameworkBatchInputValidator = z.object({
|
|
5259
|
+
frameworks: z.array(
|
|
5260
|
+
CreateManagedFrameworkInputValidator.extend({
|
|
5261
|
+
skills: z.array(SkillTreeNodeInputValidator).optional()
|
|
5262
|
+
})
|
|
5263
|
+
).min(1)
|
|
5264
|
+
});
|
|
5265
|
+
var SkillFrameworkAdminInputValidator = z.object({
|
|
5266
|
+
frameworkId: z.string(),
|
|
5267
|
+
profileId: z.string()
|
|
5268
|
+
});
|
|
5269
|
+
var SkillFrameworkIdInputValidator = z.object({ frameworkId: z.string() });
|
|
5270
|
+
var SkillFrameworkAdminsValidator = LCNProfileValidator.array();
|
|
5271
|
+
var SyncFrameworkInputValidator = z.object({ id: z.string() });
|
|
5272
|
+
var AddTagInputValidator = z.object({
|
|
5273
|
+
slug: z.string().min(1),
|
|
5274
|
+
name: z.string().min(1)
|
|
5275
|
+
});
|
|
5276
|
+
var CreateSkillInputValidator = z.object({
|
|
5277
|
+
frameworkId: z.string(),
|
|
5278
|
+
skill: SkillTreeNodeInputValidator,
|
|
5279
|
+
parentId: z.string().nullable().optional()
|
|
5280
|
+
});
|
|
5281
|
+
var UpdateSkillInputValidator = z.object({
|
|
5282
|
+
frameworkId: z.string(),
|
|
5283
|
+
id: z.string(),
|
|
5284
|
+
statement: z.string().optional(),
|
|
5285
|
+
description: z.string().optional(),
|
|
5286
|
+
code: z.string().optional(),
|
|
5287
|
+
icon: z.string().optional(),
|
|
5288
|
+
type: z.string().optional(),
|
|
5289
|
+
status: SkillStatusEnum.optional()
|
|
5290
|
+
}).refine(
|
|
5291
|
+
(data) => data.statement !== void 0 || data.description !== void 0 || data.code !== void 0 || data.icon !== void 0 || data.type !== void 0 || data.status !== void 0,
|
|
5292
|
+
{
|
|
5293
|
+
message: "At least one field must be provided to update a skill",
|
|
5294
|
+
path: ["statement"]
|
|
5295
|
+
}
|
|
5296
|
+
);
|
|
5297
|
+
var SkillDeletionStrategyValidator = z.enum(["recursive", "reparent"]);
|
|
5298
|
+
var DeleteSkillInputValidator = z.object({
|
|
5299
|
+
frameworkId: z.string(),
|
|
5300
|
+
id: z.string(),
|
|
5301
|
+
strategy: SkillDeletionStrategyValidator.optional().default("reparent")
|
|
5302
|
+
});
|
|
5303
|
+
var CreateSkillsBatchInputValidator = z.object({
|
|
5304
|
+
frameworkId: z.string(),
|
|
5305
|
+
skills: z.array(SkillTreeNodeInputValidator).min(1),
|
|
5306
|
+
parentId: z.string().nullable().optional()
|
|
5307
|
+
});
|
|
5308
|
+
var ReplaceSkillFrameworkSkillsInputValidator = z.object({
|
|
5309
|
+
frameworkId: z.string(),
|
|
5310
|
+
skills: z.array(SkillTreeNodeInputValidator).min(0)
|
|
5311
|
+
});
|
|
5312
|
+
var ReplaceSkillFrameworkSkillsResultValidator = z.object({
|
|
5313
|
+
created: z.number().int().min(0),
|
|
5314
|
+
updated: z.number().int().min(0),
|
|
5315
|
+
deleted: z.number().int().min(0),
|
|
5316
|
+
unchanged: z.number().int().min(0),
|
|
5317
|
+
total: z.number().int().min(0)
|
|
5318
|
+
});
|
|
5319
|
+
var CountSkillsInputValidator = z.object({
|
|
5320
|
+
frameworkId: z.string(),
|
|
5321
|
+
skillId: z.string().optional(),
|
|
5322
|
+
recursive: z.boolean().optional().default(false),
|
|
5323
|
+
onlyCountCompetencies: z.boolean().optional().default(false)
|
|
5324
|
+
});
|
|
5325
|
+
var CountSkillsResultValidator = z.object({
|
|
5326
|
+
count: z.number().int().min(0)
|
|
5327
|
+
});
|
|
5328
|
+
var GetFullSkillTreeInputValidator = z.object({
|
|
5329
|
+
frameworkId: z.string()
|
|
5330
|
+
});
|
|
5331
|
+
var GetFullSkillTreeResultValidator = z.object({
|
|
5332
|
+
skills: z.array(SkillTreeNodeValidator)
|
|
5333
|
+
});
|
|
5334
|
+
var GetSkillPathInputValidator = z.object({
|
|
5335
|
+
frameworkId: z.string(),
|
|
5336
|
+
skillId: z.string()
|
|
5337
|
+
});
|
|
5338
|
+
var GetSkillPathResultValidator = z.object({
|
|
5339
|
+
path: z.array(SkillValidator)
|
|
5340
|
+
});
|
|
5341
|
+
var FrameworkWithSkillsValidator = z.object({
|
|
5342
|
+
framework: SkillFrameworkValidator,
|
|
5343
|
+
skills: PaginatedSkillTreeValidator
|
|
5344
|
+
});
|
|
5098
5345
|
|
|
5099
5346
|
// ../../../node_modules/.pnpm/@babel+runtime@7.27.0/node_modules/@babel/runtime/helpers/esm/typeof.js
|
|
5100
5347
|
function _typeof(o) {
|
|
@@ -6677,10 +6924,7 @@ var transformErrorCheck = /* @__PURE__ */ __name((error, _credential) => {
|
|
|
6677
6924
|
}, "transformErrorCheck");
|
|
6678
6925
|
var transformErrorMessage = /* @__PURE__ */ __name((error, credential) => {
|
|
6679
6926
|
if (error.startsWith("expiration")) {
|
|
6680
|
-
return credential.expirationDate ? `
|
|
6681
|
-
new Date(credential.expirationDate),
|
|
6682
|
-
"dd MMM yyyy"
|
|
6683
|
-
).toUpperCase()}` : "Invalid \u2022 Expired";
|
|
6927
|
+
return credential.expirationDate ? `Expired ${format(new Date(credential.expirationDate), "dd MMM yyyy").toUpperCase()}` : "Expired";
|
|
6684
6928
|
}
|
|
6685
6929
|
return error;
|
|
6686
6930
|
}, "transformErrorMessage");
|
|
@@ -6693,10 +6937,10 @@ var transformWarningCheck = /* @__PURE__ */ __name((warning, _credential) => {
|
|
|
6693
6937
|
var transformCheckMessage = /* @__PURE__ */ __name((check, credential) => {
|
|
6694
6938
|
return {
|
|
6695
6939
|
proof: "Valid",
|
|
6696
|
-
expiration: credential.expirationDate ? `
|
|
6940
|
+
expiration: credential.expirationDate ? `Expires ${format(
|
|
6697
6941
|
new Date(credential.expirationDate),
|
|
6698
6942
|
"dd MMM yyyy"
|
|
6699
|
-
).toUpperCase()}` : "
|
|
6943
|
+
).toUpperCase()}` : "Does Not Expire"
|
|
6700
6944
|
}[check] || check;
|
|
6701
6945
|
}, "transformCheckMessage");
|
|
6702
6946
|
var verifyCredential = /* @__PURE__ */ __name((learnCard) => {
|