@learncard/learn-card-plugin 1.1.63 → 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.
@@ -4438,7 +4438,14 @@ var RegExpValidator = z.instanceof(RegExp).or(
4438
4438
  }
4439
4439
  })
4440
4440
  );
4441
- var StringQuery = z.string().or(z.object({ $in: z.string().array() })).or(z.object({ $regex: RegExpValidator }));
4441
+ var BaseStringQuery = z.string().or(z.object({ $in: z.string().array() })).or(z.object({ $regex: RegExpValidator }));
4442
+ var StringQuery = z.union([
4443
+ BaseStringQuery,
4444
+ z.object({
4445
+ $or: BaseStringQuery.array()
4446
+ })
4447
+ ]);
4448
+ extendZodWithOpenApi(z);
4442
4449
  var LCNProfileDisplayValidator = z.object({
4443
4450
  backgroundColor: z.string().optional(),
4444
4451
  backgroundImage: z.string().optional(),
@@ -4596,7 +4603,7 @@ var BoostValidator = z.object({
4596
4603
  claimPermissions: BoostPermissionsValidator.optional(),
4597
4604
  allowAnyoneToCreateChildren: z.boolean().optional()
4598
4605
  });
4599
- var BoostQueryValidator = z.object({
4606
+ var BaseBoostQueryValidator = z.object({
4600
4607
  uri: StringQuery,
4601
4608
  name: StringQuery,
4602
4609
  type: StringQuery,
@@ -4605,6 +4612,12 @@ var BoostQueryValidator = z.object({
4605
4612
  status: LCNBoostStatus.or(z.object({ $in: LCNBoostStatus.array() })),
4606
4613
  autoConnectRecipients: z.boolean()
4607
4614
  }).partial();
4615
+ var BoostQueryValidator = z.union([
4616
+ z.object({
4617
+ $or: BaseBoostQueryValidator.array()
4618
+ }),
4619
+ BaseBoostQueryValidator
4620
+ ]);
4608
4621
  var PaginatedBoostsValidator = PaginationResponseValidator.extend({
4609
4622
  records: BoostValidator.array()
4610
4623
  });
@@ -4660,11 +4673,25 @@ var ConsentFlowTermsStatusValidator = z.enum(["live", "stale", "withdrawn"]);
4660
4673
  var ConsentFlowContractValidator = z.object({
4661
4674
  read: z.object({
4662
4675
  anonymize: z.boolean().optional(),
4663
- credentials: z.object({ categories: z.record(z.object({ required: z.boolean(), defaultEnabled: z.boolean().optional() })).default({}) }).default({}),
4676
+ credentials: z.object({
4677
+ categories: z.record(
4678
+ z.object({
4679
+ required: z.boolean(),
4680
+ defaultEnabled: z.boolean().optional()
4681
+ })
4682
+ ).default({})
4683
+ }).default({}),
4664
4684
  personal: z.record(z.object({ required: z.boolean(), defaultEnabled: z.boolean().optional() })).default({})
4665
4685
  }).default({}),
4666
4686
  write: z.object({
4667
- credentials: z.object({ categories: z.record(z.object({ required: z.boolean(), defaultEnabled: z.boolean().optional() })).default({}) }).default({}),
4687
+ credentials: z.object({
4688
+ categories: z.record(
4689
+ z.object({
4690
+ required: z.boolean(),
4691
+ defaultEnabled: z.boolean().optional()
4692
+ })
4693
+ ).default({})
4694
+ }).default({}),
4668
4695
  personal: z.record(z.object({ required: z.boolean(), defaultEnabled: z.boolean().optional() })).default({})
4669
4696
  }).default({})
4670
4697
  });
@@ -4807,6 +4834,17 @@ var ConsentFlowTransactionValidator = z.object({
4807
4834
  var PaginatedConsentFlowTransactionsValidator = PaginationResponseValidator.extend({
4808
4835
  records: ConsentFlowTransactionValidator.array()
4809
4836
  });
4837
+ var BaseSkillFrameworkQueryValidator = z.object({
4838
+ id: StringQuery,
4839
+ name: StringQuery,
4840
+ description: StringQuery,
4841
+ sourceURI: StringQuery,
4842
+ status: StringQuery
4843
+ }).partial();
4844
+ var SkillFrameworkQueryValidator = z.union([
4845
+ z.object({ $or: BaseSkillFrameworkQueryValidator.array() }),
4846
+ BaseSkillFrameworkQueryValidator
4847
+ ]);
4810
4848
  var ContractCredentialValidator = z.object({
4811
4849
  credentialUri: z.string(),
4812
4850
  termsUri: z.string(),
@@ -4985,31 +5023,55 @@ var IssueInboxSigningAuthorityValidator = z.object({
4985
5023
  });
4986
5024
  var IssueInboxCredentialValidator = z.object({
4987
5025
  recipient: ContactMethodQueryValidator.describe("The recipient of the credential"),
4988
- 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."),
5026
+ credential: VCValidator.passthrough().or(VPValidator.passthrough()).or(UnsignedVCValidator.passthrough()).describe(
5027
+ "The credential to issue. If not signed, the users default signing authority will be used, or the specified signing authority in the configuration."
5028
+ ),
4989
5029
  configuration: z.object({
4990
- 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."),
5030
+ signingAuthority: IssueInboxSigningAuthorityValidator.optional().describe(
5031
+ "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."
5032
+ ),
4991
5033
  webhookUrl: z.string().url().optional().describe("The webhook URL to receive credential issuance events."),
4992
5034
  expiresInDays: z.number().min(1).max(365).optional().describe("The number of days the credential will be valid for."),
4993
5035
  delivery: z.object({
4994
- 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."),
5036
+ suppress: z.boolean().optional().default(false).describe(
5037
+ "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."
5038
+ ),
4995
5039
  template: z.object({
4996
- 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."),
5040
+ id: z.enum(["universal-inbox-claim"]).optional().describe(
5041
+ "The template ID to use for the credential delivery. If not provided, the default template will be used."
5042
+ ),
4997
5043
  model: z.object({
4998
5044
  issuer: z.object({
4999
- name: z.string().optional().describe('The name of the organization (e.g., "State University").'),
5045
+ name: z.string().optional().describe(
5046
+ 'The name of the organization (e.g., "State University").'
5047
+ ),
5000
5048
  logoUrl: z.string().url().optional().describe("The URL of the organization's logo.")
5001
5049
  }).optional(),
5002
5050
  credential: z.object({
5003
- name: z.string().optional().describe('The name of the credential (e.g., "Bachelor of Science").'),
5004
- type: z.string().optional().describe('The type of the credential (e.g., "degree", "certificate").')
5051
+ name: z.string().optional().describe(
5052
+ 'The name of the credential (e.g., "Bachelor of Science").'
5053
+ ),
5054
+ type: z.string().optional().describe(
5055
+ 'The type of the credential (e.g., "degree", "certificate").'
5056
+ )
5005
5057
  }).optional(),
5006
5058
  recipient: z.object({
5007
- name: z.string().optional().describe('The name of the recipient (e.g., "John Doe").')
5059
+ name: z.string().optional().describe(
5060
+ 'The name of the recipient (e.g., "John Doe").'
5061
+ )
5008
5062
  }).optional()
5009
- }).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.")
5010
- }).optional().describe("The template to use for the credential delivery. If not provided, the default template will be used.")
5011
- }).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.")
5012
- }).optional().describe("Configuration for the credential issuance. If not provided, the default configuration will be used.")
5063
+ }).describe(
5064
+ "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."
5065
+ )
5066
+ }).optional().describe(
5067
+ "The template to use for the credential delivery. If not provided, the default template will be used."
5068
+ )
5069
+ }).optional().describe(
5070
+ "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."
5071
+ )
5072
+ }).optional().describe(
5073
+ "Configuration for the credential issuance. If not provided, the default configuration will be used."
5074
+ )
5013
5075
  });
5014
5076
  var IssueInboxCredentialResponseValidator = z.object({
5015
5077
  issuanceId: z.string(),
@@ -5071,6 +5133,191 @@ var ClaimTokenValidator = z.object({
5071
5133
  expiresAt: z.string(),
5072
5134
  used: z.boolean()
5073
5135
  });
5136
+ var TagValidator = z.object({
5137
+ id: z.string(),
5138
+ name: z.string().min(1),
5139
+ slug: z.string().min(1),
5140
+ createdAt: z.string().optional(),
5141
+ updatedAt: z.string().optional()
5142
+ });
5143
+ var SkillStatusEnum = z.enum(["active", "archived"]);
5144
+ var SkillValidator = z.object({
5145
+ id: z.string(),
5146
+ statement: z.string(),
5147
+ description: z.string().optional(),
5148
+ code: z.string().optional(),
5149
+ icon: z.string().optional(),
5150
+ type: z.string().default("skill"),
5151
+ status: SkillStatusEnum.default("active"),
5152
+ frameworkId: z.string().optional(),
5153
+ createdAt: z.string().optional(),
5154
+ updatedAt: z.string().optional()
5155
+ });
5156
+ var BaseSkillQueryValidator = z.object({
5157
+ id: StringQuery,
5158
+ statement: StringQuery,
5159
+ description: StringQuery,
5160
+ code: StringQuery,
5161
+ type: StringQuery,
5162
+ status: SkillStatusEnum.or(z.object({ $in: SkillStatusEnum.array() }))
5163
+ }).partial();
5164
+ var SkillQueryValidator = z.union([
5165
+ z.object({
5166
+ $or: BaseSkillQueryValidator.array()
5167
+ }),
5168
+ BaseSkillQueryValidator
5169
+ ]);
5170
+ var SkillFrameworkStatusEnum = z.enum(["active", "archived"]);
5171
+ var SkillFrameworkValidator = z.object({
5172
+ id: z.string(),
5173
+ name: z.string(),
5174
+ description: z.string().optional(),
5175
+ image: z.string().optional(),
5176
+ sourceURI: z.string().url().optional(),
5177
+ status: SkillFrameworkStatusEnum.default("active"),
5178
+ createdAt: z.string().optional(),
5179
+ updatedAt: z.string().optional()
5180
+ });
5181
+ var PaginatedSkillFrameworksValidator = PaginationResponseValidator.extend({
5182
+ records: SkillFrameworkValidator.array()
5183
+ });
5184
+ var SkillTreeNodeValidator = SkillValidator.extend({
5185
+ children: z.array(z.lazy(() => SkillTreeNodeValidator)),
5186
+ hasChildren: z.boolean(),
5187
+ childrenCursor: z.string().nullable().optional()
5188
+ }).openapi({ ref: "SkillTreeNode" });
5189
+ var PaginatedSkillTreeValidator = z.object({
5190
+ hasMore: z.boolean(),
5191
+ cursor: z.string().nullable(),
5192
+ records: z.array(SkillTreeNodeValidator)
5193
+ });
5194
+ var SkillTreeNodeInputValidator = z.lazy(
5195
+ () => z.object({
5196
+ id: z.string().optional(),
5197
+ statement: z.string(),
5198
+ description: z.string().optional(),
5199
+ code: z.string().optional(),
5200
+ icon: z.string().optional(),
5201
+ type: z.string().optional(),
5202
+ status: SkillStatusEnum.optional(),
5203
+ children: z.array(SkillTreeNodeInputValidator).optional()
5204
+ })
5205
+ ).openapi({ ref: "SkillTreeNodeInput" });
5206
+ var LinkProviderFrameworkInputValidator = z.object({
5207
+ frameworkId: z.string()
5208
+ });
5209
+ var CreateManagedFrameworkInputValidator = z.object({
5210
+ id: z.string().optional(),
5211
+ name: z.string().min(1),
5212
+ description: z.string().optional(),
5213
+ image: z.string().optional(),
5214
+ sourceURI: z.string().url().optional(),
5215
+ status: SkillFrameworkStatusEnum.optional(),
5216
+ skills: z.array(SkillTreeNodeInputValidator).optional(),
5217
+ boostUris: z.array(z.string()).optional()
5218
+ });
5219
+ var UpdateFrameworkInputValidator = z.object({
5220
+ id: z.string(),
5221
+ name: z.string().min(1).optional(),
5222
+ description: z.string().optional(),
5223
+ image: z.string().optional(),
5224
+ sourceURI: z.string().url().optional(),
5225
+ status: SkillFrameworkStatusEnum.optional()
5226
+ }).refine(
5227
+ (data) => data.name !== void 0 || data.description !== void 0 || data.image !== void 0 || data.sourceURI !== void 0 || data.status !== void 0,
5228
+ {
5229
+ message: "At least one field must be provided to update",
5230
+ path: ["name"]
5231
+ }
5232
+ );
5233
+ var DeleteFrameworkInputValidator = z.object({ id: z.string() });
5234
+ var CreateManagedFrameworkBatchInputValidator = z.object({
5235
+ frameworks: z.array(
5236
+ CreateManagedFrameworkInputValidator.extend({
5237
+ skills: z.array(SkillTreeNodeInputValidator).optional()
5238
+ })
5239
+ ).min(1)
5240
+ });
5241
+ var SkillFrameworkAdminInputValidator = z.object({
5242
+ frameworkId: z.string(),
5243
+ profileId: z.string()
5244
+ });
5245
+ var SkillFrameworkIdInputValidator = z.object({ frameworkId: z.string() });
5246
+ var SkillFrameworkAdminsValidator = LCNProfileValidator.array();
5247
+ var SyncFrameworkInputValidator = z.object({ id: z.string() });
5248
+ var AddTagInputValidator = z.object({
5249
+ slug: z.string().min(1),
5250
+ name: z.string().min(1)
5251
+ });
5252
+ var CreateSkillInputValidator = z.object({
5253
+ frameworkId: z.string(),
5254
+ skill: SkillTreeNodeInputValidator,
5255
+ parentId: z.string().nullable().optional()
5256
+ });
5257
+ var UpdateSkillInputValidator = z.object({
5258
+ frameworkId: z.string(),
5259
+ id: z.string(),
5260
+ statement: z.string().optional(),
5261
+ description: z.string().optional(),
5262
+ code: z.string().optional(),
5263
+ icon: z.string().optional(),
5264
+ type: z.string().optional(),
5265
+ status: SkillStatusEnum.optional()
5266
+ }).refine(
5267
+ (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,
5268
+ {
5269
+ message: "At least one field must be provided to update a skill",
5270
+ path: ["statement"]
5271
+ }
5272
+ );
5273
+ var SkillDeletionStrategyValidator = z.enum(["recursive", "reparent"]);
5274
+ var DeleteSkillInputValidator = z.object({
5275
+ frameworkId: z.string(),
5276
+ id: z.string(),
5277
+ strategy: SkillDeletionStrategyValidator.optional().default("reparent")
5278
+ });
5279
+ var CreateSkillsBatchInputValidator = z.object({
5280
+ frameworkId: z.string(),
5281
+ skills: z.array(SkillTreeNodeInputValidator).min(1),
5282
+ parentId: z.string().nullable().optional()
5283
+ });
5284
+ var ReplaceSkillFrameworkSkillsInputValidator = z.object({
5285
+ frameworkId: z.string(),
5286
+ skills: z.array(SkillTreeNodeInputValidator).min(0)
5287
+ });
5288
+ var ReplaceSkillFrameworkSkillsResultValidator = z.object({
5289
+ created: z.number().int().min(0),
5290
+ updated: z.number().int().min(0),
5291
+ deleted: z.number().int().min(0),
5292
+ unchanged: z.number().int().min(0),
5293
+ total: z.number().int().min(0)
5294
+ });
5295
+ var CountSkillsInputValidator = z.object({
5296
+ frameworkId: z.string(),
5297
+ skillId: z.string().optional(),
5298
+ recursive: z.boolean().optional().default(false),
5299
+ onlyCountCompetencies: z.boolean().optional().default(false)
5300
+ });
5301
+ var CountSkillsResultValidator = z.object({
5302
+ count: z.number().int().min(0)
5303
+ });
5304
+ var GetFullSkillTreeInputValidator = z.object({
5305
+ frameworkId: z.string()
5306
+ });
5307
+ var GetFullSkillTreeResultValidator = z.object({
5308
+ skills: z.array(SkillTreeNodeValidator)
5309
+ });
5310
+ var GetSkillPathInputValidator = z.object({
5311
+ frameworkId: z.string(),
5312
+ skillId: z.string()
5313
+ });
5314
+ var GetSkillPathResultValidator = z.object({
5315
+ path: z.array(SkillValidator)
5316
+ });
5317
+ var FrameworkWithSkillsValidator = z.object({
5318
+ framework: SkillFrameworkValidator,
5319
+ skills: PaginatedSkillTreeValidator
5320
+ });
5074
5321
 
5075
5322
  // ../../../node_modules/.pnpm/@babel+runtime@7.27.0/node_modules/@babel/runtime/helpers/esm/typeof.js
5076
5323
  function _typeof(o) {