@learncard/helpers 1.1.29 → 1.1.31

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/helpers.d.ts CHANGED
@@ -4280,5 +4280,7 @@ export declare const RegExpTransformer: DataTransformer;
4280
4280
  * Determines if a credential uses VC 2.0 format by checking the @context array
4281
4281
  */
4282
4282
  export declare const isVC2Format: (credential: UnsignedVC | VC) => boolean;
4283
+ /** Unwraps a boost credential from a CertifiedBoostCredential, if it is one */
4284
+ export declare const unwrapBoostCredential: (vc?: VC | UnsignedVC) => any;
4283
4285
 
4284
4286
  export {};
@@ -51,6 +51,7 @@ var require_types_cjs_development = __commonJS({
51
51
  AchievementSubjectValidator: () => AchievementSubjectValidator,
52
52
  AchievementTypeValidator: () => AchievementTypeValidator,
53
53
  AchievementValidator: () => AchievementValidator,
54
+ AddTagInputValidator: () => AddTagInputValidator,
54
55
  AddressValidator: () => AddressValidator,
55
56
  AlignmentTargetTypeValidator: () => AlignmentTargetTypeValidator,
56
57
  AlignmentValidator: () => AlignmentValidator,
@@ -90,14 +91,22 @@ var require_types_cjs_development = __commonJS({
90
91
  ContactMethodVerificationValidator: () => ContactMethodVerificationValidator,
91
92
  ContextValidator: () => ContextValidator,
92
93
  ContractCredentialValidator: () => ContractCredentialValidator,
94
+ CountSkillsInputValidator: () => CountSkillsInputValidator,
95
+ CountSkillsResultValidator: () => CountSkillsResultValidator,
93
96
  CreateContactMethodSessionResponseValidator: () => CreateContactMethodSessionResponseValidator,
94
97
  CreateContactMethodSessionValidator: () => CreateContactMethodSessionValidator,
98
+ CreateManagedFrameworkBatchInputValidator: () => CreateManagedFrameworkBatchInputValidator,
99
+ CreateManagedFrameworkInputValidator: () => CreateManagedFrameworkInputValidator,
100
+ CreateSkillInputValidator: () => CreateSkillInputValidator,
101
+ CreateSkillsBatchInputValidator: () => CreateSkillsBatchInputValidator,
95
102
  CredentialInfoValidator: () => CredentialInfoValidator,
96
103
  CredentialRecordValidator: () => CredentialRecordValidator,
97
104
  CredentialSchemaValidator: () => CredentialSchemaValidator,
98
105
  CredentialStatusValidator: () => CredentialStatusValidator,
99
106
  CredentialSubjectValidator: () => CredentialSubjectValidator,
100
107
  CriteriaValidator: () => CriteriaValidator,
108
+ DeleteFrameworkInputValidator: () => DeleteFrameworkInputValidator,
109
+ DeleteSkillInputValidator: () => DeleteSkillInputValidator,
101
110
  DidDocumentValidator: () => DidDocumentValidator,
102
111
  EncryptedCredentialRecordValidator: () => EncryptedCredentialRecordValidator,
103
112
  EncryptedRecordValidator: () => EncryptedRecordValidator,
@@ -105,8 +114,13 @@ var require_types_cjs_development = __commonJS({
105
114
  EndorsementSubjectValidator: () => EndorsementSubjectValidator,
106
115
  EvidenceValidator: () => EvidenceValidator,
107
116
  FlatAuthGrantValidator: () => FlatAuthGrantValidator,
117
+ FrameworkWithSkillsValidator: () => FrameworkWithSkillsValidator,
108
118
  FullClaimHookValidator: () => FullClaimHookValidator,
109
119
  GeoCoordinatesValidator: () => GeoCoordinatesValidator,
120
+ GetFullSkillTreeInputValidator: () => GetFullSkillTreeInputValidator,
121
+ GetFullSkillTreeResultValidator: () => GetFullSkillTreeResultValidator,
122
+ GetSkillPathInputValidator: () => GetSkillPathInputValidator,
123
+ GetSkillPathResultValidator: () => GetSkillPathResultValidator,
110
124
  IdentifierEntryValidator: () => IdentifierEntryValidator,
111
125
  IdentifierTypeValidator: () => IdentifierTypeValidator,
112
126
  IdentityObjectValidator: () => IdentityObjectValidator,
@@ -145,6 +159,7 @@ var require_types_cjs_development = __commonJS({
145
159
  LCNProfileValidator: () => LCNProfileValidator,
146
160
  LCNSigningAuthorityForUserValidator: () => LCNSigningAuthorityForUserValidator,
147
161
  LCNSigningAuthorityValidator: () => LCNSigningAuthorityValidator,
162
+ LinkProviderFrameworkInputValidator: () => LinkProviderFrameworkInputValidator,
148
163
  PaginatedBoostRecipientsValidator: () => PaginatedBoostRecipientsValidator,
149
164
  PaginatedBoostRecipientsWithChildrenValidator: () => PaginatedBoostRecipientsWithChildrenValidator,
150
165
  PaginatedBoostsValidator: () => PaginatedBoostsValidator,
@@ -162,6 +177,8 @@ var require_types_cjs_development = __commonJS({
162
177
  PaginatedLCNProfileManagersValidator: () => PaginatedLCNProfileManagersValidator,
163
178
  PaginatedLCNProfilesAndManagersValidator: () => PaginatedLCNProfilesAndManagersValidator,
164
179
  PaginatedLCNProfilesValidator: () => PaginatedLCNProfilesValidator,
180
+ PaginatedSkillFrameworksValidator: () => PaginatedSkillFrameworksValidator,
181
+ PaginatedSkillTreeValidator: () => PaginatedSkillTreeValidator,
165
182
  PaginationOptionsValidator: () => PaginationOptionsValidator,
166
183
  PaginationResponseValidator: () => PaginationResponseValidator,
167
184
  ProfileValidator: () => ProfileValidator,
@@ -169,6 +186,8 @@ var require_types_cjs_development = __commonJS({
169
186
  RefreshServiceValidator: () => RefreshServiceValidator,
170
187
  RegExpValidator: () => RegExpValidator,
171
188
  RelatedValidator: () => RelatedValidator,
189
+ ReplaceSkillFrameworkSkillsInputValidator: () => ReplaceSkillFrameworkSkillsInputValidator,
190
+ ReplaceSkillFrameworkSkillsResultValidator: () => ReplaceSkillFrameworkSkillsResultValidator,
172
191
  ResultDescriptionValidator: () => ResultDescriptionValidator,
173
192
  ResultStatusTypeValidator: () => ResultStatusTypeValidator,
174
193
  ResultTypeValidator: () => ResultTypeValidator,
@@ -177,11 +196,27 @@ var require_types_cjs_development = __commonJS({
177
196
  SentCredentialInfoValidator: () => SentCredentialInfoValidator,
178
197
  ServiceValidator: () => ServiceValidator,
179
198
  SetPrimaryContactMethodValidator: () => SetPrimaryContactMethodValidator,
199
+ SkillDeletionStrategyValidator: () => SkillDeletionStrategyValidator,
200
+ SkillFrameworkAdminInputValidator: () => SkillFrameworkAdminInputValidator,
201
+ SkillFrameworkAdminsValidator: () => SkillFrameworkAdminsValidator,
202
+ SkillFrameworkIdInputValidator: () => SkillFrameworkIdInputValidator,
203
+ SkillFrameworkQueryValidator: () => SkillFrameworkQueryValidator,
204
+ SkillFrameworkStatusEnum: () => SkillFrameworkStatusEnum,
205
+ SkillFrameworkValidator: () => SkillFrameworkValidator,
206
+ SkillQueryValidator: () => SkillQueryValidator,
207
+ SkillStatusEnum: () => SkillStatusEnum,
208
+ SkillTreeNodeInputValidator: () => SkillTreeNodeInputValidator,
209
+ SkillTreeNodeValidator: () => SkillTreeNodeValidator,
210
+ SkillValidator: () => SkillValidator,
180
211
  StringQuery: () => StringQuery,
212
+ SyncFrameworkInputValidator: () => SyncFrameworkInputValidator,
213
+ TagValidator: () => TagValidator,
181
214
  TermsOfUseValidator: () => TermsOfUseValidator,
182
215
  UnsignedAchievementCredentialValidator: () => UnsignedAchievementCredentialValidator,
183
216
  UnsignedVCValidator: () => UnsignedVCValidator,
184
217
  UnsignedVPValidator: () => UnsignedVPValidator,
218
+ UpdateFrameworkInputValidator: () => UpdateFrameworkInputValidator,
219
+ UpdateSkillInputValidator: () => UpdateSkillInputValidator,
185
220
  VC2EvidenceValidator: () => VC2EvidenceValidator,
186
221
  VCValidator: () => VCValidator,
187
222
  VPValidator: () => VPValidator,
@@ -4641,7 +4676,14 @@ var require_types_cjs_development = __commonJS({
4641
4676
  }
4642
4677
  })
4643
4678
  );
4644
- var StringQuery = z.string().or(z.object({ $in: z.string().array() })).or(z.object({ $regex: RegExpValidator }));
4679
+ var BaseStringQuery = z.string().or(z.object({ $in: z.string().array() })).or(z.object({ $regex: RegExpValidator }));
4680
+ var StringQuery = z.union([
4681
+ BaseStringQuery,
4682
+ z.object({
4683
+ $or: BaseStringQuery.array()
4684
+ })
4685
+ ]);
4686
+ extendZodWithOpenApi(z);
4645
4687
  var LCNProfileDisplayValidator = z.object({
4646
4688
  backgroundColor: z.string().optional(),
4647
4689
  backgroundImage: z.string().optional(),
@@ -4726,7 +4768,8 @@ var require_types_cjs_development = __commonJS({
4726
4768
  to: z.string(),
4727
4769
  from: z.string(),
4728
4770
  sent: z.string().datetime(),
4729
- received: z.string().datetime().optional()
4771
+ received: z.string().datetime().optional(),
4772
+ metadata: z.record(z.unknown()).optional()
4730
4773
  });
4731
4774
  var BoostPermissionsValidator = z.object({
4732
4775
  role: z.string(),
@@ -4799,7 +4842,7 @@ var require_types_cjs_development = __commonJS({
4799
4842
  claimPermissions: BoostPermissionsValidator.optional(),
4800
4843
  allowAnyoneToCreateChildren: z.boolean().optional()
4801
4844
  });
4802
- var BoostQueryValidator = z.object({
4845
+ var BaseBoostQueryValidator = z.object({
4803
4846
  uri: StringQuery,
4804
4847
  name: StringQuery,
4805
4848
  type: StringQuery,
@@ -4808,6 +4851,12 @@ var require_types_cjs_development = __commonJS({
4808
4851
  status: LCNBoostStatus.or(z.object({ $in: LCNBoostStatus.array() })),
4809
4852
  autoConnectRecipients: z.boolean()
4810
4853
  }).partial();
4854
+ var BoostQueryValidator = z.union([
4855
+ z.object({
4856
+ $or: BaseBoostQueryValidator.array()
4857
+ }),
4858
+ BaseBoostQueryValidator
4859
+ ]);
4811
4860
  var PaginatedBoostsValidator = PaginationResponseValidator.extend({
4812
4861
  records: BoostValidator.array()
4813
4862
  });
@@ -4863,11 +4912,25 @@ var require_types_cjs_development = __commonJS({
4863
4912
  var ConsentFlowContractValidator = z.object({
4864
4913
  read: z.object({
4865
4914
  anonymize: z.boolean().optional(),
4866
- credentials: z.object({ categories: z.record(z.object({ required: z.boolean(), defaultEnabled: z.boolean().optional() })).default({}) }).default({}),
4915
+ credentials: z.object({
4916
+ categories: z.record(
4917
+ z.object({
4918
+ required: z.boolean(),
4919
+ defaultEnabled: z.boolean().optional()
4920
+ })
4921
+ ).default({})
4922
+ }).default({}),
4867
4923
  personal: z.record(z.object({ required: z.boolean(), defaultEnabled: z.boolean().optional() })).default({})
4868
4924
  }).default({}),
4869
4925
  write: z.object({
4870
- credentials: z.object({ categories: z.record(z.object({ required: z.boolean(), defaultEnabled: z.boolean().optional() })).default({}) }).default({}),
4926
+ credentials: z.object({
4927
+ categories: z.record(
4928
+ z.object({
4929
+ required: z.boolean(),
4930
+ defaultEnabled: z.boolean().optional()
4931
+ })
4932
+ ).default({})
4933
+ }).default({}),
4871
4934
  personal: z.record(z.object({ required: z.boolean(), defaultEnabled: z.boolean().optional() })).default({})
4872
4935
  }).default({})
4873
4936
  });
@@ -5010,6 +5073,17 @@ var require_types_cjs_development = __commonJS({
5010
5073
  var PaginatedConsentFlowTransactionsValidator = PaginationResponseValidator.extend({
5011
5074
  records: ConsentFlowTransactionValidator.array()
5012
5075
  });
5076
+ var BaseSkillFrameworkQueryValidator = z.object({
5077
+ id: StringQuery,
5078
+ name: StringQuery,
5079
+ description: StringQuery,
5080
+ sourceURI: StringQuery,
5081
+ status: StringQuery
5082
+ }).partial();
5083
+ var SkillFrameworkQueryValidator = z.union([
5084
+ z.object({ $or: BaseSkillFrameworkQueryValidator.array() }),
5085
+ BaseSkillFrameworkQueryValidator
5086
+ ]);
5013
5087
  var ContractCredentialValidator = z.object({
5014
5088
  credentialUri: z.string(),
5015
5089
  termsUri: z.string(),
@@ -5064,8 +5138,9 @@ var require_types_cjs_development = __commonJS({
5064
5138
  vcUris: z.array(z.string()).optional(),
5065
5139
  vpUris: z.array(z.string()).optional(),
5066
5140
  transaction: ConsentFlowTransactionValidator.optional(),
5067
- inbox: LCNNotificationInboxValidator.optional()
5068
- });
5141
+ inbox: LCNNotificationInboxValidator.optional(),
5142
+ metadata: z.record(z.unknown()).optional()
5143
+ }).passthrough();
5069
5144
  var LCNNotificationValidator = z.object({
5070
5145
  type: LCNNotificationTypeEnumValidator,
5071
5146
  to: LCNProfileValidator.partial().and(z.object({ did: z.string() })),
@@ -5188,31 +5263,55 @@ var require_types_cjs_development = __commonJS({
5188
5263
  });
5189
5264
  var IssueInboxCredentialValidator = z.object({
5190
5265
  recipient: ContactMethodQueryValidator.describe("The recipient of the credential"),
5191
- 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."),
5266
+ credential: VCValidator.passthrough().or(VPValidator.passthrough()).or(UnsignedVCValidator.passthrough()).describe(
5267
+ "The credential to issue. If not signed, the users default signing authority will be used, or the specified signing authority in the configuration."
5268
+ ),
5192
5269
  configuration: z.object({
5193
- 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."),
5270
+ signingAuthority: IssueInboxSigningAuthorityValidator.optional().describe(
5271
+ "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."
5272
+ ),
5194
5273
  webhookUrl: z.string().url().optional().describe("The webhook URL to receive credential issuance events."),
5195
5274
  expiresInDays: z.number().min(1).max(365).optional().describe("The number of days the credential will be valid for."),
5196
5275
  delivery: z.object({
5197
- 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."),
5276
+ suppress: z.boolean().optional().default(false).describe(
5277
+ "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."
5278
+ ),
5198
5279
  template: z.object({
5199
- 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."),
5280
+ id: z.enum(["universal-inbox-claim"]).optional().describe(
5281
+ "The template ID to use for the credential delivery. If not provided, the default template will be used."
5282
+ ),
5200
5283
  model: z.object({
5201
5284
  issuer: z.object({
5202
- name: z.string().optional().describe('The name of the organization (e.g., "State University").'),
5285
+ name: z.string().optional().describe(
5286
+ 'The name of the organization (e.g., "State University").'
5287
+ ),
5203
5288
  logoUrl: z.string().url().optional().describe("The URL of the organization's logo.")
5204
5289
  }).optional(),
5205
5290
  credential: z.object({
5206
- name: z.string().optional().describe('The name of the credential (e.g., "Bachelor of Science").'),
5207
- type: z.string().optional().describe('The type of the credential (e.g., "degree", "certificate").')
5291
+ name: z.string().optional().describe(
5292
+ 'The name of the credential (e.g., "Bachelor of Science").'
5293
+ ),
5294
+ type: z.string().optional().describe(
5295
+ 'The type of the credential (e.g., "degree", "certificate").'
5296
+ )
5208
5297
  }).optional(),
5209
5298
  recipient: z.object({
5210
- name: z.string().optional().describe('The name of the recipient (e.g., "John Doe").')
5299
+ name: z.string().optional().describe(
5300
+ 'The name of the recipient (e.g., "John Doe").'
5301
+ )
5211
5302
  }).optional()
5212
- }).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.")
5213
- }).optional().describe("The template to use for the credential delivery. If not provided, the default template will be used.")
5214
- }).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.")
5215
- }).optional().describe("Configuration for the credential issuance. If not provided, the default configuration will be used.")
5303
+ }).describe(
5304
+ "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."
5305
+ )
5306
+ }).optional().describe(
5307
+ "The template to use for the credential delivery. If not provided, the default template will be used."
5308
+ )
5309
+ }).optional().describe(
5310
+ "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."
5311
+ )
5312
+ }).optional().describe(
5313
+ "Configuration for the credential issuance. If not provided, the default configuration will be used."
5314
+ )
5216
5315
  });
5217
5316
  var IssueInboxCredentialResponseValidator = z.object({
5218
5317
  issuanceId: z.string(),
@@ -5274,6 +5373,191 @@ var require_types_cjs_development = __commonJS({
5274
5373
  expiresAt: z.string(),
5275
5374
  used: z.boolean()
5276
5375
  });
5376
+ var TagValidator = z.object({
5377
+ id: z.string(),
5378
+ name: z.string().min(1),
5379
+ slug: z.string().min(1),
5380
+ createdAt: z.string().optional(),
5381
+ updatedAt: z.string().optional()
5382
+ });
5383
+ var SkillStatusEnum = z.enum(["active", "archived"]);
5384
+ var SkillValidator = z.object({
5385
+ id: z.string(),
5386
+ statement: z.string(),
5387
+ description: z.string().optional(),
5388
+ code: z.string().optional(),
5389
+ icon: z.string().optional(),
5390
+ type: z.string().default("skill"),
5391
+ status: SkillStatusEnum.default("active"),
5392
+ frameworkId: z.string().optional(),
5393
+ createdAt: z.string().optional(),
5394
+ updatedAt: z.string().optional()
5395
+ });
5396
+ var BaseSkillQueryValidator = z.object({
5397
+ id: StringQuery,
5398
+ statement: StringQuery,
5399
+ description: StringQuery,
5400
+ code: StringQuery,
5401
+ type: StringQuery,
5402
+ status: SkillStatusEnum.or(z.object({ $in: SkillStatusEnum.array() }))
5403
+ }).partial();
5404
+ var SkillQueryValidator = z.union([
5405
+ z.object({
5406
+ $or: BaseSkillQueryValidator.array()
5407
+ }),
5408
+ BaseSkillQueryValidator
5409
+ ]);
5410
+ var SkillFrameworkStatusEnum = z.enum(["active", "archived"]);
5411
+ var SkillFrameworkValidator = z.object({
5412
+ id: z.string(),
5413
+ name: z.string(),
5414
+ description: z.string().optional(),
5415
+ image: z.string().optional(),
5416
+ sourceURI: z.string().url().optional(),
5417
+ status: SkillFrameworkStatusEnum.default("active"),
5418
+ createdAt: z.string().optional(),
5419
+ updatedAt: z.string().optional()
5420
+ });
5421
+ var PaginatedSkillFrameworksValidator = PaginationResponseValidator.extend({
5422
+ records: SkillFrameworkValidator.array()
5423
+ });
5424
+ var SkillTreeNodeValidator = SkillValidator.extend({
5425
+ children: z.array(z.lazy(() => SkillTreeNodeValidator)),
5426
+ hasChildren: z.boolean(),
5427
+ childrenCursor: z.string().nullable().optional()
5428
+ }).openapi({ ref: "SkillTreeNode" });
5429
+ var PaginatedSkillTreeValidator = z.object({
5430
+ hasMore: z.boolean(),
5431
+ cursor: z.string().nullable(),
5432
+ records: z.array(SkillTreeNodeValidator)
5433
+ });
5434
+ var SkillTreeNodeInputValidator = z.lazy(
5435
+ () => z.object({
5436
+ id: z.string().optional(),
5437
+ statement: z.string(),
5438
+ description: z.string().optional(),
5439
+ code: z.string().optional(),
5440
+ icon: z.string().optional(),
5441
+ type: z.string().optional(),
5442
+ status: SkillStatusEnum.optional(),
5443
+ children: z.array(SkillTreeNodeInputValidator).optional()
5444
+ })
5445
+ ).openapi({ ref: "SkillTreeNodeInput" });
5446
+ var LinkProviderFrameworkInputValidator = z.object({
5447
+ frameworkId: z.string()
5448
+ });
5449
+ var CreateManagedFrameworkInputValidator = z.object({
5450
+ id: z.string().optional(),
5451
+ name: z.string().min(1),
5452
+ description: z.string().optional(),
5453
+ image: z.string().optional(),
5454
+ sourceURI: z.string().url().optional(),
5455
+ status: SkillFrameworkStatusEnum.optional(),
5456
+ skills: z.array(SkillTreeNodeInputValidator).optional(),
5457
+ boostUris: z.array(z.string()).optional()
5458
+ });
5459
+ var UpdateFrameworkInputValidator = z.object({
5460
+ id: z.string(),
5461
+ name: z.string().min(1).optional(),
5462
+ description: z.string().optional(),
5463
+ image: z.string().optional(),
5464
+ sourceURI: z.string().url().optional(),
5465
+ status: SkillFrameworkStatusEnum.optional()
5466
+ }).refine(
5467
+ (data) => data.name !== void 0 || data.description !== void 0 || data.image !== void 0 || data.sourceURI !== void 0 || data.status !== void 0,
5468
+ {
5469
+ message: "At least one field must be provided to update",
5470
+ path: ["name"]
5471
+ }
5472
+ );
5473
+ var DeleteFrameworkInputValidator = z.object({ id: z.string() });
5474
+ var CreateManagedFrameworkBatchInputValidator = z.object({
5475
+ frameworks: z.array(
5476
+ CreateManagedFrameworkInputValidator.extend({
5477
+ skills: z.array(SkillTreeNodeInputValidator).optional()
5478
+ })
5479
+ ).min(1)
5480
+ });
5481
+ var SkillFrameworkAdminInputValidator = z.object({
5482
+ frameworkId: z.string(),
5483
+ profileId: z.string()
5484
+ });
5485
+ var SkillFrameworkIdInputValidator = z.object({ frameworkId: z.string() });
5486
+ var SkillFrameworkAdminsValidator = LCNProfileValidator.array();
5487
+ var SyncFrameworkInputValidator = z.object({ id: z.string() });
5488
+ var AddTagInputValidator = z.object({
5489
+ slug: z.string().min(1),
5490
+ name: z.string().min(1)
5491
+ });
5492
+ var CreateSkillInputValidator = z.object({
5493
+ frameworkId: z.string(),
5494
+ skill: SkillTreeNodeInputValidator,
5495
+ parentId: z.string().nullable().optional()
5496
+ });
5497
+ var UpdateSkillInputValidator = z.object({
5498
+ frameworkId: z.string(),
5499
+ id: z.string(),
5500
+ statement: z.string().optional(),
5501
+ description: z.string().optional(),
5502
+ code: z.string().optional(),
5503
+ icon: z.string().optional(),
5504
+ type: z.string().optional(),
5505
+ status: SkillStatusEnum.optional()
5506
+ }).refine(
5507
+ (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,
5508
+ {
5509
+ message: "At least one field must be provided to update a skill",
5510
+ path: ["statement"]
5511
+ }
5512
+ );
5513
+ var SkillDeletionStrategyValidator = z.enum(["recursive", "reparent"]);
5514
+ var DeleteSkillInputValidator = z.object({
5515
+ frameworkId: z.string(),
5516
+ id: z.string(),
5517
+ strategy: SkillDeletionStrategyValidator.optional().default("reparent")
5518
+ });
5519
+ var CreateSkillsBatchInputValidator = z.object({
5520
+ frameworkId: z.string(),
5521
+ skills: z.array(SkillTreeNodeInputValidator).min(1),
5522
+ parentId: z.string().nullable().optional()
5523
+ });
5524
+ var ReplaceSkillFrameworkSkillsInputValidator = z.object({
5525
+ frameworkId: z.string(),
5526
+ skills: z.array(SkillTreeNodeInputValidator).min(0)
5527
+ });
5528
+ var ReplaceSkillFrameworkSkillsResultValidator = z.object({
5529
+ created: z.number().int().min(0),
5530
+ updated: z.number().int().min(0),
5531
+ deleted: z.number().int().min(0),
5532
+ unchanged: z.number().int().min(0),
5533
+ total: z.number().int().min(0)
5534
+ });
5535
+ var CountSkillsInputValidator = z.object({
5536
+ frameworkId: z.string(),
5537
+ skillId: z.string().optional(),
5538
+ recursive: z.boolean().optional().default(false),
5539
+ onlyCountCompetencies: z.boolean().optional().default(false)
5540
+ });
5541
+ var CountSkillsResultValidator = z.object({
5542
+ count: z.number().int().min(0)
5543
+ });
5544
+ var GetFullSkillTreeInputValidator = z.object({
5545
+ frameworkId: z.string()
5546
+ });
5547
+ var GetFullSkillTreeResultValidator = z.object({
5548
+ skills: z.array(SkillTreeNodeValidator)
5549
+ });
5550
+ var GetSkillPathInputValidator = z.object({
5551
+ frameworkId: z.string(),
5552
+ skillId: z.string()
5553
+ });
5554
+ var GetSkillPathResultValidator = z.object({
5555
+ path: z.array(SkillValidator)
5556
+ });
5557
+ var FrameworkWithSkillsValidator = z.object({
5558
+ framework: SkillFrameworkValidator,
5559
+ skills: PaginatedSkillTreeValidator
5560
+ });
5277
5561
  }
5278
5562
  });
5279
5563
 
@@ -5328,9 +5612,17 @@ var isVC2Format = /* @__PURE__ */ __name((credential) => {
5328
5612
  }
5329
5613
  return credential["@context"].includes("https://www.w3.org/ns/credentials/v2");
5330
5614
  }, "isVC2Format");
5615
+ var unwrapBoostCredential = /* @__PURE__ */ __name((vc) => {
5616
+ if (vc?.type?.includes("CertifiedBoostCredential") && vc?.boostCredential) {
5617
+ return vc.boostCredential;
5618
+ } else {
5619
+ return vc;
5620
+ }
5621
+ }, "unwrapBoostCredential");
5331
5622
  export {
5332
5623
  RegExpTransformer,
5333
5624
  isEncrypted,
5334
5625
  isHex,
5335
- isVC2Format
5626
+ isVC2Format,
5627
+ unwrapBoostCredential
5336
5628
  };