@learncard/learn-card-plugin 1.1.63 → 1.1.65

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.
@@ -4462,7 +4462,14 @@ var RegExpValidator = z.instanceof(RegExp).or(
4462
4462
  }
4463
4463
  })
4464
4464
  );
4465
- var StringQuery = z.string().or(z.object({ $in: z.string().array() })).or(z.object({ $regex: RegExpValidator }));
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(),
@@ -4547,7 +4554,8 @@ var SentCredentialInfoValidator = z.object({
4547
4554
  to: z.string(),
4548
4555
  from: z.string(),
4549
4556
  sent: z.string().datetime(),
4550
- received: z.string().datetime().optional()
4557
+ received: z.string().datetime().optional(),
4558
+ metadata: z.record(z.unknown()).optional()
4551
4559
  });
4552
4560
  var BoostPermissionsValidator = z.object({
4553
4561
  role: z.string(),
@@ -4620,7 +4628,7 @@ var BoostValidator = z.object({
4620
4628
  claimPermissions: BoostPermissionsValidator.optional(),
4621
4629
  allowAnyoneToCreateChildren: z.boolean().optional()
4622
4630
  });
4623
- var BoostQueryValidator = z.object({
4631
+ var BaseBoostQueryValidator = z.object({
4624
4632
  uri: StringQuery,
4625
4633
  name: StringQuery,
4626
4634
  type: StringQuery,
@@ -4629,6 +4637,12 @@ var BoostQueryValidator = z.object({
4629
4637
  status: LCNBoostStatus.or(z.object({ $in: LCNBoostStatus.array() })),
4630
4638
  autoConnectRecipients: z.boolean()
4631
4639
  }).partial();
4640
+ var BoostQueryValidator = z.union([
4641
+ z.object({
4642
+ $or: BaseBoostQueryValidator.array()
4643
+ }),
4644
+ BaseBoostQueryValidator
4645
+ ]);
4632
4646
  var PaginatedBoostsValidator = PaginationResponseValidator.extend({
4633
4647
  records: BoostValidator.array()
4634
4648
  });
@@ -4684,11 +4698,25 @@ var ConsentFlowTermsStatusValidator = z.enum(["live", "stale", "withdrawn"]);
4684
4698
  var ConsentFlowContractValidator = z.object({
4685
4699
  read: z.object({
4686
4700
  anonymize: z.boolean().optional(),
4687
- credentials: z.object({ categories: z.record(z.object({ required: z.boolean(), defaultEnabled: z.boolean().optional() })).default({}) }).default({}),
4701
+ credentials: z.object({
4702
+ categories: z.record(
4703
+ z.object({
4704
+ required: z.boolean(),
4705
+ defaultEnabled: z.boolean().optional()
4706
+ })
4707
+ ).default({})
4708
+ }).default({}),
4688
4709
  personal: z.record(z.object({ required: z.boolean(), defaultEnabled: z.boolean().optional() })).default({})
4689
4710
  }).default({}),
4690
4711
  write: z.object({
4691
- credentials: z.object({ categories: z.record(z.object({ required: z.boolean(), defaultEnabled: z.boolean().optional() })).default({}) }).default({}),
4712
+ credentials: z.object({
4713
+ categories: z.record(
4714
+ z.object({
4715
+ required: z.boolean(),
4716
+ defaultEnabled: z.boolean().optional()
4717
+ })
4718
+ ).default({})
4719
+ }).default({}),
4692
4720
  personal: z.record(z.object({ required: z.boolean(), defaultEnabled: z.boolean().optional() })).default({})
4693
4721
  }).default({})
4694
4722
  });
@@ -4831,6 +4859,17 @@ var ConsentFlowTransactionValidator = z.object({
4831
4859
  var PaginatedConsentFlowTransactionsValidator = PaginationResponseValidator.extend({
4832
4860
  records: ConsentFlowTransactionValidator.array()
4833
4861
  });
4862
+ var BaseSkillFrameworkQueryValidator = z.object({
4863
+ id: StringQuery,
4864
+ name: StringQuery,
4865
+ description: StringQuery,
4866
+ sourceURI: StringQuery,
4867
+ status: StringQuery
4868
+ }).partial();
4869
+ var SkillFrameworkQueryValidator = z.union([
4870
+ z.object({ $or: BaseSkillFrameworkQueryValidator.array() }),
4871
+ BaseSkillFrameworkQueryValidator
4872
+ ]);
4834
4873
  var ContractCredentialValidator = z.object({
4835
4874
  credentialUri: z.string(),
4836
4875
  termsUri: z.string(),
@@ -4885,8 +4924,9 @@ var LCNNotificationDataValidator = z.object({
4885
4924
  vcUris: z.array(z.string()).optional(),
4886
4925
  vpUris: z.array(z.string()).optional(),
4887
4926
  transaction: ConsentFlowTransactionValidator.optional(),
4888
- inbox: LCNNotificationInboxValidator.optional()
4889
- });
4927
+ inbox: LCNNotificationInboxValidator.optional(),
4928
+ metadata: z.record(z.unknown()).optional()
4929
+ }).passthrough();
4890
4930
  var LCNNotificationValidator = z.object({
4891
4931
  type: LCNNotificationTypeEnumValidator,
4892
4932
  to: LCNProfileValidator.partial().and(z.object({ did: z.string() })),
@@ -5009,31 +5049,55 @@ var IssueInboxSigningAuthorityValidator = z.object({
5009
5049
  });
5010
5050
  var IssueInboxCredentialValidator = z.object({
5011
5051
  recipient: ContactMethodQueryValidator.describe("The recipient of the credential"),
5012
- 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."),
5052
+ credential: VCValidator.passthrough().or(VPValidator.passthrough()).or(UnsignedVCValidator.passthrough()).describe(
5053
+ "The credential to issue. If not signed, the users default signing authority will be used, or the specified signing authority in the configuration."
5054
+ ),
5013
5055
  configuration: z.object({
5014
- 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."),
5056
+ signingAuthority: IssueInboxSigningAuthorityValidator.optional().describe(
5057
+ "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."
5058
+ ),
5015
5059
  webhookUrl: z.string().url().optional().describe("The webhook URL to receive credential issuance events."),
5016
5060
  expiresInDays: z.number().min(1).max(365).optional().describe("The number of days the credential will be valid for."),
5017
5061
  delivery: z.object({
5018
- 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."),
5062
+ suppress: z.boolean().optional().default(false).describe(
5063
+ "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."
5064
+ ),
5019
5065
  template: z.object({
5020
- 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."),
5066
+ id: z.enum(["universal-inbox-claim"]).optional().describe(
5067
+ "The template ID to use for the credential delivery. If not provided, the default template will be used."
5068
+ ),
5021
5069
  model: z.object({
5022
5070
  issuer: z.object({
5023
- name: z.string().optional().describe('The name of the organization (e.g., "State University").'),
5071
+ name: z.string().optional().describe(
5072
+ 'The name of the organization (e.g., "State University").'
5073
+ ),
5024
5074
  logoUrl: z.string().url().optional().describe("The URL of the organization's logo.")
5025
5075
  }).optional(),
5026
5076
  credential: z.object({
5027
- name: z.string().optional().describe('The name of the credential (e.g., "Bachelor of Science").'),
5028
- type: z.string().optional().describe('The type of the credential (e.g., "degree", "certificate").')
5077
+ name: z.string().optional().describe(
5078
+ 'The name of the credential (e.g., "Bachelor of Science").'
5079
+ ),
5080
+ type: z.string().optional().describe(
5081
+ 'The type of the credential (e.g., "degree", "certificate").'
5082
+ )
5029
5083
  }).optional(),
5030
5084
  recipient: z.object({
5031
- name: z.string().optional().describe('The name of the recipient (e.g., "John Doe").')
5085
+ name: z.string().optional().describe(
5086
+ 'The name of the recipient (e.g., "John Doe").'
5087
+ )
5032
5088
  }).optional()
5033
- }).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.")
5034
- }).optional().describe("The template to use for the credential delivery. If not provided, the default template will be used.")
5035
- }).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.")
5036
- }).optional().describe("Configuration for the credential issuance. If not provided, the default configuration will be used.")
5089
+ }).describe(
5090
+ "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."
5091
+ )
5092
+ }).optional().describe(
5093
+ "The template to use for the credential delivery. If not provided, the default template will be used."
5094
+ )
5095
+ }).optional().describe(
5096
+ "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."
5097
+ )
5098
+ }).optional().describe(
5099
+ "Configuration for the credential issuance. If not provided, the default configuration will be used."
5100
+ )
5037
5101
  });
5038
5102
  var IssueInboxCredentialResponseValidator = z.object({
5039
5103
  issuanceId: z.string(),
@@ -5095,6 +5159,191 @@ var ClaimTokenValidator = z.object({
5095
5159
  expiresAt: z.string(),
5096
5160
  used: z.boolean()
5097
5161
  });
5162
+ var TagValidator = z.object({
5163
+ id: z.string(),
5164
+ name: z.string().min(1),
5165
+ slug: z.string().min(1),
5166
+ createdAt: z.string().optional(),
5167
+ updatedAt: z.string().optional()
5168
+ });
5169
+ var SkillStatusEnum = z.enum(["active", "archived"]);
5170
+ var SkillValidator = z.object({
5171
+ id: z.string(),
5172
+ statement: z.string(),
5173
+ description: z.string().optional(),
5174
+ code: z.string().optional(),
5175
+ icon: z.string().optional(),
5176
+ type: z.string().default("skill"),
5177
+ status: SkillStatusEnum.default("active"),
5178
+ frameworkId: z.string().optional(),
5179
+ createdAt: z.string().optional(),
5180
+ updatedAt: z.string().optional()
5181
+ });
5182
+ var BaseSkillQueryValidator = z.object({
5183
+ id: StringQuery,
5184
+ statement: StringQuery,
5185
+ description: StringQuery,
5186
+ code: StringQuery,
5187
+ type: StringQuery,
5188
+ status: SkillStatusEnum.or(z.object({ $in: SkillStatusEnum.array() }))
5189
+ }).partial();
5190
+ var SkillQueryValidator = z.union([
5191
+ z.object({
5192
+ $or: BaseSkillQueryValidator.array()
5193
+ }),
5194
+ BaseSkillQueryValidator
5195
+ ]);
5196
+ var SkillFrameworkStatusEnum = z.enum(["active", "archived"]);
5197
+ var SkillFrameworkValidator = z.object({
5198
+ id: z.string(),
5199
+ name: z.string(),
5200
+ description: z.string().optional(),
5201
+ image: z.string().optional(),
5202
+ sourceURI: z.string().url().optional(),
5203
+ status: SkillFrameworkStatusEnum.default("active"),
5204
+ createdAt: z.string().optional(),
5205
+ updatedAt: z.string().optional()
5206
+ });
5207
+ var PaginatedSkillFrameworksValidator = PaginationResponseValidator.extend({
5208
+ records: SkillFrameworkValidator.array()
5209
+ });
5210
+ var SkillTreeNodeValidator = SkillValidator.extend({
5211
+ children: z.array(z.lazy(() => SkillTreeNodeValidator)),
5212
+ hasChildren: z.boolean(),
5213
+ childrenCursor: z.string().nullable().optional()
5214
+ }).openapi({ ref: "SkillTreeNode" });
5215
+ var PaginatedSkillTreeValidator = z.object({
5216
+ hasMore: z.boolean(),
5217
+ cursor: z.string().nullable(),
5218
+ records: z.array(SkillTreeNodeValidator)
5219
+ });
5220
+ var SkillTreeNodeInputValidator = z.lazy(
5221
+ () => z.object({
5222
+ id: z.string().optional(),
5223
+ statement: z.string(),
5224
+ description: z.string().optional(),
5225
+ code: z.string().optional(),
5226
+ icon: z.string().optional(),
5227
+ type: z.string().optional(),
5228
+ status: SkillStatusEnum.optional(),
5229
+ children: z.array(SkillTreeNodeInputValidator).optional()
5230
+ })
5231
+ ).openapi({ ref: "SkillTreeNodeInput" });
5232
+ var LinkProviderFrameworkInputValidator = z.object({
5233
+ frameworkId: z.string()
5234
+ });
5235
+ var CreateManagedFrameworkInputValidator = z.object({
5236
+ id: z.string().optional(),
5237
+ name: z.string().min(1),
5238
+ description: z.string().optional(),
5239
+ image: z.string().optional(),
5240
+ sourceURI: z.string().url().optional(),
5241
+ status: SkillFrameworkStatusEnum.optional(),
5242
+ skills: z.array(SkillTreeNodeInputValidator).optional(),
5243
+ boostUris: z.array(z.string()).optional()
5244
+ });
5245
+ var UpdateFrameworkInputValidator = z.object({
5246
+ id: z.string(),
5247
+ name: z.string().min(1).optional(),
5248
+ description: z.string().optional(),
5249
+ image: z.string().optional(),
5250
+ sourceURI: z.string().url().optional(),
5251
+ status: SkillFrameworkStatusEnum.optional()
5252
+ }).refine(
5253
+ (data) => data.name !== void 0 || data.description !== void 0 || data.image !== void 0 || data.sourceURI !== void 0 || data.status !== void 0,
5254
+ {
5255
+ message: "At least one field must be provided to update",
5256
+ path: ["name"]
5257
+ }
5258
+ );
5259
+ var DeleteFrameworkInputValidator = z.object({ id: z.string() });
5260
+ var CreateManagedFrameworkBatchInputValidator = z.object({
5261
+ frameworks: z.array(
5262
+ CreateManagedFrameworkInputValidator.extend({
5263
+ skills: z.array(SkillTreeNodeInputValidator).optional()
5264
+ })
5265
+ ).min(1)
5266
+ });
5267
+ var SkillFrameworkAdminInputValidator = z.object({
5268
+ frameworkId: z.string(),
5269
+ profileId: z.string()
5270
+ });
5271
+ var SkillFrameworkIdInputValidator = z.object({ frameworkId: z.string() });
5272
+ var SkillFrameworkAdminsValidator = LCNProfileValidator.array();
5273
+ var SyncFrameworkInputValidator = z.object({ id: z.string() });
5274
+ var AddTagInputValidator = z.object({
5275
+ slug: z.string().min(1),
5276
+ name: z.string().min(1)
5277
+ });
5278
+ var CreateSkillInputValidator = z.object({
5279
+ frameworkId: z.string(),
5280
+ skill: SkillTreeNodeInputValidator,
5281
+ parentId: z.string().nullable().optional()
5282
+ });
5283
+ var UpdateSkillInputValidator = z.object({
5284
+ frameworkId: z.string(),
5285
+ id: z.string(),
5286
+ statement: z.string().optional(),
5287
+ description: z.string().optional(),
5288
+ code: z.string().optional(),
5289
+ icon: z.string().optional(),
5290
+ type: z.string().optional(),
5291
+ status: SkillStatusEnum.optional()
5292
+ }).refine(
5293
+ (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,
5294
+ {
5295
+ message: "At least one field must be provided to update a skill",
5296
+ path: ["statement"]
5297
+ }
5298
+ );
5299
+ var SkillDeletionStrategyValidator = z.enum(["recursive", "reparent"]);
5300
+ var DeleteSkillInputValidator = z.object({
5301
+ frameworkId: z.string(),
5302
+ id: z.string(),
5303
+ strategy: SkillDeletionStrategyValidator.optional().default("reparent")
5304
+ });
5305
+ var CreateSkillsBatchInputValidator = z.object({
5306
+ frameworkId: z.string(),
5307
+ skills: z.array(SkillTreeNodeInputValidator).min(1),
5308
+ parentId: z.string().nullable().optional()
5309
+ });
5310
+ var ReplaceSkillFrameworkSkillsInputValidator = z.object({
5311
+ frameworkId: z.string(),
5312
+ skills: z.array(SkillTreeNodeInputValidator).min(0)
5313
+ });
5314
+ var ReplaceSkillFrameworkSkillsResultValidator = z.object({
5315
+ created: z.number().int().min(0),
5316
+ updated: z.number().int().min(0),
5317
+ deleted: z.number().int().min(0),
5318
+ unchanged: z.number().int().min(0),
5319
+ total: z.number().int().min(0)
5320
+ });
5321
+ var CountSkillsInputValidator = z.object({
5322
+ frameworkId: z.string(),
5323
+ skillId: z.string().optional(),
5324
+ recursive: z.boolean().optional().default(false),
5325
+ onlyCountCompetencies: z.boolean().optional().default(false)
5326
+ });
5327
+ var CountSkillsResultValidator = z.object({
5328
+ count: z.number().int().min(0)
5329
+ });
5330
+ var GetFullSkillTreeInputValidator = z.object({
5331
+ frameworkId: z.string()
5332
+ });
5333
+ var GetFullSkillTreeResultValidator = z.object({
5334
+ skills: z.array(SkillTreeNodeValidator)
5335
+ });
5336
+ var GetSkillPathInputValidator = z.object({
5337
+ frameworkId: z.string(),
5338
+ skillId: z.string()
5339
+ });
5340
+ var GetSkillPathResultValidator = z.object({
5341
+ path: z.array(SkillValidator)
5342
+ });
5343
+ var FrameworkWithSkillsValidator = z.object({
5344
+ framework: SkillFrameworkValidator,
5345
+ skills: PaginatedSkillTreeValidator
5346
+ });
5098
5347
 
5099
5348
  // ../../../node_modules/.pnpm/@babel+runtime@7.27.0/node_modules/@babel/runtime/helpers/esm/typeof.js
5100
5349
  function _typeof(o) {