@learncard/helpers 1.1.29 → 1.1.30

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(),
@@ -4799,7 +4841,7 @@ var require_types_cjs_development = __commonJS({
4799
4841
  claimPermissions: BoostPermissionsValidator.optional(),
4800
4842
  allowAnyoneToCreateChildren: z.boolean().optional()
4801
4843
  });
4802
- var BoostQueryValidator = z.object({
4844
+ var BaseBoostQueryValidator = z.object({
4803
4845
  uri: StringQuery,
4804
4846
  name: StringQuery,
4805
4847
  type: StringQuery,
@@ -4808,6 +4850,12 @@ var require_types_cjs_development = __commonJS({
4808
4850
  status: LCNBoostStatus.or(z.object({ $in: LCNBoostStatus.array() })),
4809
4851
  autoConnectRecipients: z.boolean()
4810
4852
  }).partial();
4853
+ var BoostQueryValidator = z.union([
4854
+ z.object({
4855
+ $or: BaseBoostQueryValidator.array()
4856
+ }),
4857
+ BaseBoostQueryValidator
4858
+ ]);
4811
4859
  var PaginatedBoostsValidator = PaginationResponseValidator.extend({
4812
4860
  records: BoostValidator.array()
4813
4861
  });
@@ -4863,11 +4911,25 @@ var require_types_cjs_development = __commonJS({
4863
4911
  var ConsentFlowContractValidator = z.object({
4864
4912
  read: z.object({
4865
4913
  anonymize: z.boolean().optional(),
4866
- credentials: z.object({ categories: z.record(z.object({ required: z.boolean(), defaultEnabled: z.boolean().optional() })).default({}) }).default({}),
4914
+ credentials: z.object({
4915
+ categories: z.record(
4916
+ z.object({
4917
+ required: z.boolean(),
4918
+ defaultEnabled: z.boolean().optional()
4919
+ })
4920
+ ).default({})
4921
+ }).default({}),
4867
4922
  personal: z.record(z.object({ required: z.boolean(), defaultEnabled: z.boolean().optional() })).default({})
4868
4923
  }).default({}),
4869
4924
  write: z.object({
4870
- credentials: z.object({ categories: z.record(z.object({ required: z.boolean(), defaultEnabled: z.boolean().optional() })).default({}) }).default({}),
4925
+ credentials: z.object({
4926
+ categories: z.record(
4927
+ z.object({
4928
+ required: z.boolean(),
4929
+ defaultEnabled: z.boolean().optional()
4930
+ })
4931
+ ).default({})
4932
+ }).default({}),
4871
4933
  personal: z.record(z.object({ required: z.boolean(), defaultEnabled: z.boolean().optional() })).default({})
4872
4934
  }).default({})
4873
4935
  });
@@ -5010,6 +5072,17 @@ var require_types_cjs_development = __commonJS({
5010
5072
  var PaginatedConsentFlowTransactionsValidator = PaginationResponseValidator.extend({
5011
5073
  records: ConsentFlowTransactionValidator.array()
5012
5074
  });
5075
+ var BaseSkillFrameworkQueryValidator = z.object({
5076
+ id: StringQuery,
5077
+ name: StringQuery,
5078
+ description: StringQuery,
5079
+ sourceURI: StringQuery,
5080
+ status: StringQuery
5081
+ }).partial();
5082
+ var SkillFrameworkQueryValidator = z.union([
5083
+ z.object({ $or: BaseSkillFrameworkQueryValidator.array() }),
5084
+ BaseSkillFrameworkQueryValidator
5085
+ ]);
5013
5086
  var ContractCredentialValidator = z.object({
5014
5087
  credentialUri: z.string(),
5015
5088
  termsUri: z.string(),
@@ -5188,31 +5261,55 @@ var require_types_cjs_development = __commonJS({
5188
5261
  });
5189
5262
  var IssueInboxCredentialValidator = z.object({
5190
5263
  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."),
5264
+ credential: VCValidator.passthrough().or(VPValidator.passthrough()).or(UnsignedVCValidator.passthrough()).describe(
5265
+ "The credential to issue. If not signed, the users default signing authority will be used, or the specified signing authority in the configuration."
5266
+ ),
5192
5267
  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."),
5268
+ signingAuthority: IssueInboxSigningAuthorityValidator.optional().describe(
5269
+ "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
+ ),
5194
5271
  webhookUrl: z.string().url().optional().describe("The webhook URL to receive credential issuance events."),
5195
5272
  expiresInDays: z.number().min(1).max(365).optional().describe("The number of days the credential will be valid for."),
5196
5273
  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."),
5274
+ suppress: z.boolean().optional().default(false).describe(
5275
+ "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
+ ),
5198
5277
  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."),
5278
+ id: z.enum(["universal-inbox-claim"]).optional().describe(
5279
+ "The template ID to use for the credential delivery. If not provided, the default template will be used."
5280
+ ),
5200
5281
  model: z.object({
5201
5282
  issuer: z.object({
5202
- name: z.string().optional().describe('The name of the organization (e.g., "State University").'),
5283
+ name: z.string().optional().describe(
5284
+ 'The name of the organization (e.g., "State University").'
5285
+ ),
5203
5286
  logoUrl: z.string().url().optional().describe("The URL of the organization's logo.")
5204
5287
  }).optional(),
5205
5288
  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").')
5289
+ name: z.string().optional().describe(
5290
+ 'The name of the credential (e.g., "Bachelor of Science").'
5291
+ ),
5292
+ type: z.string().optional().describe(
5293
+ 'The type of the credential (e.g., "degree", "certificate").'
5294
+ )
5208
5295
  }).optional(),
5209
5296
  recipient: z.object({
5210
- name: z.string().optional().describe('The name of the recipient (e.g., "John Doe").')
5297
+ name: z.string().optional().describe(
5298
+ 'The name of the recipient (e.g., "John Doe").'
5299
+ )
5211
5300
  }).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.")
5301
+ }).describe(
5302
+ "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."
5303
+ )
5304
+ }).optional().describe(
5305
+ "The template to use for the credential delivery. If not provided, the default template will be used."
5306
+ )
5307
+ }).optional().describe(
5308
+ "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."
5309
+ )
5310
+ }).optional().describe(
5311
+ "Configuration for the credential issuance. If not provided, the default configuration will be used."
5312
+ )
5216
5313
  });
5217
5314
  var IssueInboxCredentialResponseValidator = z.object({
5218
5315
  issuanceId: z.string(),
@@ -5274,6 +5371,191 @@ var require_types_cjs_development = __commonJS({
5274
5371
  expiresAt: z.string(),
5275
5372
  used: z.boolean()
5276
5373
  });
5374
+ var TagValidator = z.object({
5375
+ id: z.string(),
5376
+ name: z.string().min(1),
5377
+ slug: z.string().min(1),
5378
+ createdAt: z.string().optional(),
5379
+ updatedAt: z.string().optional()
5380
+ });
5381
+ var SkillStatusEnum = z.enum(["active", "archived"]);
5382
+ var SkillValidator = z.object({
5383
+ id: z.string(),
5384
+ statement: z.string(),
5385
+ description: z.string().optional(),
5386
+ code: z.string().optional(),
5387
+ icon: z.string().optional(),
5388
+ type: z.string().default("skill"),
5389
+ status: SkillStatusEnum.default("active"),
5390
+ frameworkId: z.string().optional(),
5391
+ createdAt: z.string().optional(),
5392
+ updatedAt: z.string().optional()
5393
+ });
5394
+ var BaseSkillQueryValidator = z.object({
5395
+ id: StringQuery,
5396
+ statement: StringQuery,
5397
+ description: StringQuery,
5398
+ code: StringQuery,
5399
+ type: StringQuery,
5400
+ status: SkillStatusEnum.or(z.object({ $in: SkillStatusEnum.array() }))
5401
+ }).partial();
5402
+ var SkillQueryValidator = z.union([
5403
+ z.object({
5404
+ $or: BaseSkillQueryValidator.array()
5405
+ }),
5406
+ BaseSkillQueryValidator
5407
+ ]);
5408
+ var SkillFrameworkStatusEnum = z.enum(["active", "archived"]);
5409
+ var SkillFrameworkValidator = z.object({
5410
+ id: z.string(),
5411
+ name: z.string(),
5412
+ description: z.string().optional(),
5413
+ image: z.string().optional(),
5414
+ sourceURI: z.string().url().optional(),
5415
+ status: SkillFrameworkStatusEnum.default("active"),
5416
+ createdAt: z.string().optional(),
5417
+ updatedAt: z.string().optional()
5418
+ });
5419
+ var PaginatedSkillFrameworksValidator = PaginationResponseValidator.extend({
5420
+ records: SkillFrameworkValidator.array()
5421
+ });
5422
+ var SkillTreeNodeValidator = SkillValidator.extend({
5423
+ children: z.array(z.lazy(() => SkillTreeNodeValidator)),
5424
+ hasChildren: z.boolean(),
5425
+ childrenCursor: z.string().nullable().optional()
5426
+ }).openapi({ ref: "SkillTreeNode" });
5427
+ var PaginatedSkillTreeValidator = z.object({
5428
+ hasMore: z.boolean(),
5429
+ cursor: z.string().nullable(),
5430
+ records: z.array(SkillTreeNodeValidator)
5431
+ });
5432
+ var SkillTreeNodeInputValidator = z.lazy(
5433
+ () => z.object({
5434
+ id: z.string().optional(),
5435
+ statement: z.string(),
5436
+ description: z.string().optional(),
5437
+ code: z.string().optional(),
5438
+ icon: z.string().optional(),
5439
+ type: z.string().optional(),
5440
+ status: SkillStatusEnum.optional(),
5441
+ children: z.array(SkillTreeNodeInputValidator).optional()
5442
+ })
5443
+ ).openapi({ ref: "SkillTreeNodeInput" });
5444
+ var LinkProviderFrameworkInputValidator = z.object({
5445
+ frameworkId: z.string()
5446
+ });
5447
+ var CreateManagedFrameworkInputValidator = z.object({
5448
+ id: z.string().optional(),
5449
+ name: z.string().min(1),
5450
+ description: z.string().optional(),
5451
+ image: z.string().optional(),
5452
+ sourceURI: z.string().url().optional(),
5453
+ status: SkillFrameworkStatusEnum.optional(),
5454
+ skills: z.array(SkillTreeNodeInputValidator).optional(),
5455
+ boostUris: z.array(z.string()).optional()
5456
+ });
5457
+ var UpdateFrameworkInputValidator = z.object({
5458
+ id: z.string(),
5459
+ name: z.string().min(1).optional(),
5460
+ description: z.string().optional(),
5461
+ image: z.string().optional(),
5462
+ sourceURI: z.string().url().optional(),
5463
+ status: SkillFrameworkStatusEnum.optional()
5464
+ }).refine(
5465
+ (data) => data.name !== void 0 || data.description !== void 0 || data.image !== void 0 || data.sourceURI !== void 0 || data.status !== void 0,
5466
+ {
5467
+ message: "At least one field must be provided to update",
5468
+ path: ["name"]
5469
+ }
5470
+ );
5471
+ var DeleteFrameworkInputValidator = z.object({ id: z.string() });
5472
+ var CreateManagedFrameworkBatchInputValidator = z.object({
5473
+ frameworks: z.array(
5474
+ CreateManagedFrameworkInputValidator.extend({
5475
+ skills: z.array(SkillTreeNodeInputValidator).optional()
5476
+ })
5477
+ ).min(1)
5478
+ });
5479
+ var SkillFrameworkAdminInputValidator = z.object({
5480
+ frameworkId: z.string(),
5481
+ profileId: z.string()
5482
+ });
5483
+ var SkillFrameworkIdInputValidator = z.object({ frameworkId: z.string() });
5484
+ var SkillFrameworkAdminsValidator = LCNProfileValidator.array();
5485
+ var SyncFrameworkInputValidator = z.object({ id: z.string() });
5486
+ var AddTagInputValidator = z.object({
5487
+ slug: z.string().min(1),
5488
+ name: z.string().min(1)
5489
+ });
5490
+ var CreateSkillInputValidator = z.object({
5491
+ frameworkId: z.string(),
5492
+ skill: SkillTreeNodeInputValidator,
5493
+ parentId: z.string().nullable().optional()
5494
+ });
5495
+ var UpdateSkillInputValidator = z.object({
5496
+ frameworkId: z.string(),
5497
+ id: z.string(),
5498
+ statement: z.string().optional(),
5499
+ description: z.string().optional(),
5500
+ code: z.string().optional(),
5501
+ icon: z.string().optional(),
5502
+ type: z.string().optional(),
5503
+ status: SkillStatusEnum.optional()
5504
+ }).refine(
5505
+ (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,
5506
+ {
5507
+ message: "At least one field must be provided to update a skill",
5508
+ path: ["statement"]
5509
+ }
5510
+ );
5511
+ var SkillDeletionStrategyValidator = z.enum(["recursive", "reparent"]);
5512
+ var DeleteSkillInputValidator = z.object({
5513
+ frameworkId: z.string(),
5514
+ id: z.string(),
5515
+ strategy: SkillDeletionStrategyValidator.optional().default("reparent")
5516
+ });
5517
+ var CreateSkillsBatchInputValidator = z.object({
5518
+ frameworkId: z.string(),
5519
+ skills: z.array(SkillTreeNodeInputValidator).min(1),
5520
+ parentId: z.string().nullable().optional()
5521
+ });
5522
+ var ReplaceSkillFrameworkSkillsInputValidator = z.object({
5523
+ frameworkId: z.string(),
5524
+ skills: z.array(SkillTreeNodeInputValidator).min(0)
5525
+ });
5526
+ var ReplaceSkillFrameworkSkillsResultValidator = z.object({
5527
+ created: z.number().int().min(0),
5528
+ updated: z.number().int().min(0),
5529
+ deleted: z.number().int().min(0),
5530
+ unchanged: z.number().int().min(0),
5531
+ total: z.number().int().min(0)
5532
+ });
5533
+ var CountSkillsInputValidator = z.object({
5534
+ frameworkId: z.string(),
5535
+ skillId: z.string().optional(),
5536
+ recursive: z.boolean().optional().default(false),
5537
+ onlyCountCompetencies: z.boolean().optional().default(false)
5538
+ });
5539
+ var CountSkillsResultValidator = z.object({
5540
+ count: z.number().int().min(0)
5541
+ });
5542
+ var GetFullSkillTreeInputValidator = z.object({
5543
+ frameworkId: z.string()
5544
+ });
5545
+ var GetFullSkillTreeResultValidator = z.object({
5546
+ skills: z.array(SkillTreeNodeValidator)
5547
+ });
5548
+ var GetSkillPathInputValidator = z.object({
5549
+ frameworkId: z.string(),
5550
+ skillId: z.string()
5551
+ });
5552
+ var GetSkillPathResultValidator = z.object({
5553
+ path: z.array(SkillValidator)
5554
+ });
5555
+ var FrameworkWithSkillsValidator = z.object({
5556
+ framework: SkillFrameworkValidator,
5557
+ skills: PaginatedSkillTreeValidator
5558
+ });
5277
5559
  }
5278
5560
  });
5279
5561
 
@@ -5328,9 +5610,17 @@ var isVC2Format = /* @__PURE__ */ __name((credential) => {
5328
5610
  }
5329
5611
  return credential["@context"].includes("https://www.w3.org/ns/credentials/v2");
5330
5612
  }, "isVC2Format");
5613
+ var unwrapBoostCredential = /* @__PURE__ */ __name((vc) => {
5614
+ if (vc?.type?.includes("CertifiedBoostCredential") && vc?.boostCredential) {
5615
+ return vc.boostCredential;
5616
+ } else {
5617
+ return vc;
5618
+ }
5619
+ }, "unwrapBoostCredential");
5331
5620
  export {
5332
5621
  RegExpTransformer,
5333
5622
  isEncrypted,
5334
5623
  isHex,
5335
- isVC2Format
5624
+ isVC2Format,
5625
+ unwrapBoostCredential
5336
5626
  };