@learncard/vc-api-plugin 1.0.51 → 1.0.53
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/vc-api-plugin.cjs.development.js +324 -17
- package/dist/vc-api-plugin.cjs.development.js.map +2 -2
- package/dist/vc-api-plugin.cjs.production.min.js +1 -1
- package/dist/vc-api-plugin.cjs.production.min.js.map +3 -3
- package/dist/vc-api-plugin.esm.js +324 -17
- package/dist/vc-api-plugin.esm.js.map +2 -2
- package/package.json +3 -3
|
@@ -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(),
|
|
@@ -4865,7 +4903,13 @@ var LCNInboxContactMethodValidator = z.object({
|
|
|
4865
4903
|
type: z.string(),
|
|
4866
4904
|
value: z.string()
|
|
4867
4905
|
});
|
|
4868
|
-
var LCNInboxStatusEnumValidator = z.enum([
|
|
4906
|
+
var LCNInboxStatusEnumValidator = z.enum([
|
|
4907
|
+
"PENDING",
|
|
4908
|
+
"ISSUED",
|
|
4909
|
+
"EXPIRED",
|
|
4910
|
+
"DELIVERED",
|
|
4911
|
+
"CLAIMED"
|
|
4912
|
+
]);
|
|
4869
4913
|
var LCNNotificationInboxValidator = z.object({
|
|
4870
4914
|
issuanceId: z.string(),
|
|
4871
4915
|
status: LCNInboxStatusEnumValidator,
|
|
@@ -4963,11 +5007,19 @@ var ContactMethodVerificationValidator = z.object({
|
|
|
4963
5007
|
var SetPrimaryContactMethodValidator = z.object({
|
|
4964
5008
|
contactMethodId: z.string()
|
|
4965
5009
|
});
|
|
5010
|
+
var CreateContactMethodSessionValidator = z.object({
|
|
5011
|
+
contactMethod: ContactMethodVerificationRequestValidator,
|
|
5012
|
+
otpChallenge: z.string()
|
|
5013
|
+
});
|
|
5014
|
+
var CreateContactMethodSessionResponseValidator = z.object({
|
|
5015
|
+
sessionJwt: z.string()
|
|
5016
|
+
});
|
|
4966
5017
|
var InboxCredentialValidator = z.object({
|
|
4967
5018
|
id: z.string(),
|
|
4968
5019
|
credential: z.string(),
|
|
4969
5020
|
isSigned: z.boolean(),
|
|
4970
5021
|
currentStatus: LCNInboxStatusEnumValidator,
|
|
5022
|
+
isAccepted: z.boolean().optional(),
|
|
4971
5023
|
expiresAt: z.string(),
|
|
4972
5024
|
createdAt: z.string(),
|
|
4973
5025
|
issuerDid: z.string(),
|
|
@@ -4986,6 +5038,7 @@ var InboxCredentialQueryValidator = z.object({
|
|
|
4986
5038
|
currentStatus: LCNInboxStatusEnumValidator,
|
|
4987
5039
|
id: z.string(),
|
|
4988
5040
|
isSigned: z.boolean(),
|
|
5041
|
+
isAccepted: z.boolean().optional(),
|
|
4989
5042
|
issuerDid: z.string()
|
|
4990
5043
|
}).partial();
|
|
4991
5044
|
var IssueInboxSigningAuthorityValidator = z.object({
|
|
@@ -4994,31 +5047,55 @@ var IssueInboxSigningAuthorityValidator = z.object({
|
|
|
4994
5047
|
});
|
|
4995
5048
|
var IssueInboxCredentialValidator = z.object({
|
|
4996
5049
|
recipient: ContactMethodQueryValidator.describe("The recipient of the credential"),
|
|
4997
|
-
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
|
+
),
|
|
4998
5053
|
configuration: z.object({
|
|
4999
|
-
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
|
+
),
|
|
5000
5057
|
webhookUrl: z.string().url().optional().describe("The webhook URL to receive credential issuance events."),
|
|
5001
5058
|
expiresInDays: z.number().min(1).max(365).optional().describe("The number of days the credential will be valid for."),
|
|
5002
5059
|
delivery: z.object({
|
|
5003
|
-
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
|
+
),
|
|
5004
5063
|
template: z.object({
|
|
5005
|
-
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
|
+
),
|
|
5006
5067
|
model: z.object({
|
|
5007
5068
|
issuer: z.object({
|
|
5008
|
-
name: z.string().optional().describe(
|
|
5069
|
+
name: z.string().optional().describe(
|
|
5070
|
+
'The name of the organization (e.g., "State University").'
|
|
5071
|
+
),
|
|
5009
5072
|
logoUrl: z.string().url().optional().describe("The URL of the organization's logo.")
|
|
5010
5073
|
}).optional(),
|
|
5011
5074
|
credential: z.object({
|
|
5012
|
-
name: z.string().optional().describe(
|
|
5013
|
-
|
|
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
|
+
)
|
|
5014
5081
|
}).optional(),
|
|
5015
5082
|
recipient: z.object({
|
|
5016
|
-
name: z.string().optional().describe(
|
|
5083
|
+
name: z.string().optional().describe(
|
|
5084
|
+
'The name of the recipient (e.g., "John Doe").'
|
|
5085
|
+
)
|
|
5017
5086
|
}).optional()
|
|
5018
|
-
}).describe(
|
|
5019
|
-
|
|
5020
|
-
|
|
5021
|
-
|
|
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
|
+
)
|
|
5022
5099
|
});
|
|
5023
5100
|
var IssueInboxCredentialResponseValidator = z.object({
|
|
5024
5101
|
issuanceId: z.string(),
|
|
@@ -5027,6 +5104,51 @@ var IssueInboxCredentialResponseValidator = z.object({
|
|
|
5027
5104
|
claimUrl: z.string().url().optional(),
|
|
5028
5105
|
recipientDid: z.string().optional()
|
|
5029
5106
|
});
|
|
5107
|
+
var ClaimInboxCredentialValidator = z.object({
|
|
5108
|
+
credential: VCValidator.passthrough().or(VPValidator.passthrough()).or(UnsignedVCValidator.passthrough()).describe("The credential to issue."),
|
|
5109
|
+
configuration: z.object({
|
|
5110
|
+
publishableKey: z.string(),
|
|
5111
|
+
signingAuthorityName: z.string().optional()
|
|
5112
|
+
}).optional()
|
|
5113
|
+
});
|
|
5114
|
+
var LCNDomainOrOriginValidator = z.union([
|
|
5115
|
+
z.string().regex(
|
|
5116
|
+
/^(?:(?:[a-zA-Z0-9-]{1,63}\.)+[a-zA-Z]{2,63}|localhost|\d{1,3}(?:\.\d{1,3}){3})(?::\d{1,5})?$/,
|
|
5117
|
+
{
|
|
5118
|
+
message: "Must be a valid domain (incl. subdomains), localhost, or IPv4, optionally with port"
|
|
5119
|
+
}
|
|
5120
|
+
),
|
|
5121
|
+
z.string().regex(
|
|
5122
|
+
/^https?:\/\/(?:(?:[a-zA-Z0-9-]{1,63}\.)+[a-zA-Z]{2,63}|localhost|\d{1,3}(?:\.\d{1,3}){3})(?::\d{1,5})?$/,
|
|
5123
|
+
{ message: "Must be a valid http(s) origin" }
|
|
5124
|
+
)
|
|
5125
|
+
]);
|
|
5126
|
+
var LCNIntegrationValidator = z.object({
|
|
5127
|
+
id: z.string(),
|
|
5128
|
+
name: z.string(),
|
|
5129
|
+
description: z.string().optional(),
|
|
5130
|
+
publishableKey: z.string(),
|
|
5131
|
+
whitelistedDomains: z.array(LCNDomainOrOriginValidator).default([])
|
|
5132
|
+
});
|
|
5133
|
+
var LCNIntegrationCreateValidator = z.object({
|
|
5134
|
+
name: z.string(),
|
|
5135
|
+
description: z.string().optional(),
|
|
5136
|
+
whitelistedDomains: z.array(LCNDomainOrOriginValidator).default([])
|
|
5137
|
+
});
|
|
5138
|
+
var LCNIntegrationUpdateValidator = z.object({
|
|
5139
|
+
name: z.string().optional(),
|
|
5140
|
+
description: z.string().optional(),
|
|
5141
|
+
whitelistedDomains: z.array(LCNDomainOrOriginValidator).optional(),
|
|
5142
|
+
rotatePublishableKey: z.boolean().optional()
|
|
5143
|
+
});
|
|
5144
|
+
var LCNIntegrationQueryValidator = z.object({
|
|
5145
|
+
id: StringQuery,
|
|
5146
|
+
name: StringQuery,
|
|
5147
|
+
description: StringQuery
|
|
5148
|
+
}).partial();
|
|
5149
|
+
var PaginatedLCNIntegrationsValidator = PaginationResponseValidator.extend({
|
|
5150
|
+
records: LCNIntegrationValidator.array()
|
|
5151
|
+
});
|
|
5030
5152
|
var ClaimTokenValidator = z.object({
|
|
5031
5153
|
token: z.string(),
|
|
5032
5154
|
contactMethodId: z.string(),
|
|
@@ -5035,6 +5157,191 @@ var ClaimTokenValidator = z.object({
|
|
|
5035
5157
|
expiresAt: z.string(),
|
|
5036
5158
|
used: z.boolean()
|
|
5037
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
|
+
});
|
|
5038
5345
|
|
|
5039
5346
|
// src/helpers.ts
|
|
5040
5347
|
var post = /* @__PURE__ */ __name(async (url, data) => fetch(url, {
|