@learncard/ceramic-plugin 1.0.52 → 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.
@@ -54359,7 +54359,14 @@ var RegExpValidator = z.instanceof(RegExp).or(
54359
54359
  }
54360
54360
  })
54361
54361
  );
54362
- var StringQuery = z.string().or(z.object({ $in: z.string().array() })).or(z.object({ $regex: RegExpValidator }));
54362
+ var BaseStringQuery = z.string().or(z.object({ $in: z.string().array() })).or(z.object({ $regex: RegExpValidator }));
54363
+ var StringQuery = z.union([
54364
+ BaseStringQuery,
54365
+ z.object({
54366
+ $or: BaseStringQuery.array()
54367
+ })
54368
+ ]);
54369
+ extendZodWithOpenApi(z);
54363
54370
  var LCNProfileDisplayValidator = z.object({
54364
54371
  backgroundColor: z.string().optional(),
54365
54372
  backgroundImage: z.string().optional(),
@@ -54517,7 +54524,7 @@ var BoostValidator = z.object({
54517
54524
  claimPermissions: BoostPermissionsValidator.optional(),
54518
54525
  allowAnyoneToCreateChildren: z.boolean().optional()
54519
54526
  });
54520
- var BoostQueryValidator = z.object({
54527
+ var BaseBoostQueryValidator = z.object({
54521
54528
  uri: StringQuery,
54522
54529
  name: StringQuery,
54523
54530
  type: StringQuery,
@@ -54526,6 +54533,12 @@ var BoostQueryValidator = z.object({
54526
54533
  status: LCNBoostStatus.or(z.object({ $in: LCNBoostStatus.array() })),
54527
54534
  autoConnectRecipients: z.boolean()
54528
54535
  }).partial();
54536
+ var BoostQueryValidator = z.union([
54537
+ z.object({
54538
+ $or: BaseBoostQueryValidator.array()
54539
+ }),
54540
+ BaseBoostQueryValidator
54541
+ ]);
54529
54542
  var PaginatedBoostsValidator = PaginationResponseValidator.extend({
54530
54543
  records: BoostValidator.array()
54531
54544
  });
@@ -54581,11 +54594,25 @@ var ConsentFlowTermsStatusValidator = z.enum(["live", "stale", "withdrawn"]);
54581
54594
  var ConsentFlowContractValidator = z.object({
54582
54595
  read: z.object({
54583
54596
  anonymize: z.boolean().optional(),
54584
- credentials: z.object({ categories: z.record(z.object({ required: z.boolean(), defaultEnabled: z.boolean().optional() })).default({}) }).default({}),
54597
+ credentials: z.object({
54598
+ categories: z.record(
54599
+ z.object({
54600
+ required: z.boolean(),
54601
+ defaultEnabled: z.boolean().optional()
54602
+ })
54603
+ ).default({})
54604
+ }).default({}),
54585
54605
  personal: z.record(z.object({ required: z.boolean(), defaultEnabled: z.boolean().optional() })).default({})
54586
54606
  }).default({}),
54587
54607
  write: z.object({
54588
- credentials: z.object({ categories: z.record(z.object({ required: z.boolean(), defaultEnabled: z.boolean().optional() })).default({}) }).default({}),
54608
+ credentials: z.object({
54609
+ categories: z.record(
54610
+ z.object({
54611
+ required: z.boolean(),
54612
+ defaultEnabled: z.boolean().optional()
54613
+ })
54614
+ ).default({})
54615
+ }).default({}),
54589
54616
  personal: z.record(z.object({ required: z.boolean(), defaultEnabled: z.boolean().optional() })).default({})
54590
54617
  }).default({})
54591
54618
  });
@@ -54728,6 +54755,17 @@ var ConsentFlowTransactionValidator = z.object({
54728
54755
  var PaginatedConsentFlowTransactionsValidator = PaginationResponseValidator.extend({
54729
54756
  records: ConsentFlowTransactionValidator.array()
54730
54757
  });
54758
+ var BaseSkillFrameworkQueryValidator = z.object({
54759
+ id: StringQuery,
54760
+ name: StringQuery,
54761
+ description: StringQuery,
54762
+ sourceURI: StringQuery,
54763
+ status: StringQuery
54764
+ }).partial();
54765
+ var SkillFrameworkQueryValidator = z.union([
54766
+ z.object({ $or: BaseSkillFrameworkQueryValidator.array() }),
54767
+ BaseSkillFrameworkQueryValidator
54768
+ ]);
54731
54769
  var ContractCredentialValidator = z.object({
54732
54770
  credentialUri: z.string(),
54733
54771
  termsUri: z.string(),
@@ -54906,31 +54944,55 @@ var IssueInboxSigningAuthorityValidator = z.object({
54906
54944
  });
54907
54945
  var IssueInboxCredentialValidator = z.object({
54908
54946
  recipient: ContactMethodQueryValidator.describe("The recipient of the credential"),
54909
- 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."),
54947
+ credential: VCValidator.passthrough().or(VPValidator.passthrough()).or(UnsignedVCValidator.passthrough()).describe(
54948
+ "The credential to issue. If not signed, the users default signing authority will be used, or the specified signing authority in the configuration."
54949
+ ),
54910
54950
  configuration: z.object({
54911
- 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."),
54951
+ signingAuthority: IssueInboxSigningAuthorityValidator.optional().describe(
54952
+ "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."
54953
+ ),
54912
54954
  webhookUrl: z.string().url().optional().describe("The webhook URL to receive credential issuance events."),
54913
54955
  expiresInDays: z.number().min(1).max(365).optional().describe("The number of days the credential will be valid for."),
54914
54956
  delivery: z.object({
54915
- 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."),
54957
+ suppress: z.boolean().optional().default(false).describe(
54958
+ "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."
54959
+ ),
54916
54960
  template: z.object({
54917
- 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."),
54961
+ id: z.enum(["universal-inbox-claim"]).optional().describe(
54962
+ "The template ID to use for the credential delivery. If not provided, the default template will be used."
54963
+ ),
54918
54964
  model: z.object({
54919
54965
  issuer: z.object({
54920
- name: z.string().optional().describe('The name of the organization (e.g., "State University").'),
54966
+ name: z.string().optional().describe(
54967
+ 'The name of the organization (e.g., "State University").'
54968
+ ),
54921
54969
  logoUrl: z.string().url().optional().describe("The URL of the organization's logo.")
54922
54970
  }).optional(),
54923
54971
  credential: z.object({
54924
- name: z.string().optional().describe('The name of the credential (e.g., "Bachelor of Science").'),
54925
- type: z.string().optional().describe('The type of the credential (e.g., "degree", "certificate").')
54972
+ name: z.string().optional().describe(
54973
+ 'The name of the credential (e.g., "Bachelor of Science").'
54974
+ ),
54975
+ type: z.string().optional().describe(
54976
+ 'The type of the credential (e.g., "degree", "certificate").'
54977
+ )
54926
54978
  }).optional(),
54927
54979
  recipient: z.object({
54928
- name: z.string().optional().describe('The name of the recipient (e.g., "John Doe").')
54980
+ name: z.string().optional().describe(
54981
+ 'The name of the recipient (e.g., "John Doe").'
54982
+ )
54929
54983
  }).optional()
54930
- }).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.")
54931
- }).optional().describe("The template to use for the credential delivery. If not provided, the default template will be used.")
54932
- }).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.")
54933
- }).optional().describe("Configuration for the credential issuance. If not provided, the default configuration will be used.")
54984
+ }).describe(
54985
+ "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."
54986
+ )
54987
+ }).optional().describe(
54988
+ "The template to use for the credential delivery. If not provided, the default template will be used."
54989
+ )
54990
+ }).optional().describe(
54991
+ "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."
54992
+ )
54993
+ }).optional().describe(
54994
+ "Configuration for the credential issuance. If not provided, the default configuration will be used."
54995
+ )
54934
54996
  });
54935
54997
  var IssueInboxCredentialResponseValidator = z.object({
54936
54998
  issuanceId: z.string(),
@@ -54992,6 +55054,191 @@ var ClaimTokenValidator = z.object({
54992
55054
  expiresAt: z.string(),
54993
55055
  used: z.boolean()
54994
55056
  });
55057
+ var TagValidator = z.object({
55058
+ id: z.string(),
55059
+ name: z.string().min(1),
55060
+ slug: z.string().min(1),
55061
+ createdAt: z.string().optional(),
55062
+ updatedAt: z.string().optional()
55063
+ });
55064
+ var SkillStatusEnum = z.enum(["active", "archived"]);
55065
+ var SkillValidator = z.object({
55066
+ id: z.string(),
55067
+ statement: z.string(),
55068
+ description: z.string().optional(),
55069
+ code: z.string().optional(),
55070
+ icon: z.string().optional(),
55071
+ type: z.string().default("skill"),
55072
+ status: SkillStatusEnum.default("active"),
55073
+ frameworkId: z.string().optional(),
55074
+ createdAt: z.string().optional(),
55075
+ updatedAt: z.string().optional()
55076
+ });
55077
+ var BaseSkillQueryValidator = z.object({
55078
+ id: StringQuery,
55079
+ statement: StringQuery,
55080
+ description: StringQuery,
55081
+ code: StringQuery,
55082
+ type: StringQuery,
55083
+ status: SkillStatusEnum.or(z.object({ $in: SkillStatusEnum.array() }))
55084
+ }).partial();
55085
+ var SkillQueryValidator = z.union([
55086
+ z.object({
55087
+ $or: BaseSkillQueryValidator.array()
55088
+ }),
55089
+ BaseSkillQueryValidator
55090
+ ]);
55091
+ var SkillFrameworkStatusEnum = z.enum(["active", "archived"]);
55092
+ var SkillFrameworkValidator = z.object({
55093
+ id: z.string(),
55094
+ name: z.string(),
55095
+ description: z.string().optional(),
55096
+ image: z.string().optional(),
55097
+ sourceURI: z.string().url().optional(),
55098
+ status: SkillFrameworkStatusEnum.default("active"),
55099
+ createdAt: z.string().optional(),
55100
+ updatedAt: z.string().optional()
55101
+ });
55102
+ var PaginatedSkillFrameworksValidator = PaginationResponseValidator.extend({
55103
+ records: SkillFrameworkValidator.array()
55104
+ });
55105
+ var SkillTreeNodeValidator = SkillValidator.extend({
55106
+ children: z.array(z.lazy(() => SkillTreeNodeValidator)),
55107
+ hasChildren: z.boolean(),
55108
+ childrenCursor: z.string().nullable().optional()
55109
+ }).openapi({ ref: "SkillTreeNode" });
55110
+ var PaginatedSkillTreeValidator = z.object({
55111
+ hasMore: z.boolean(),
55112
+ cursor: z.string().nullable(),
55113
+ records: z.array(SkillTreeNodeValidator)
55114
+ });
55115
+ var SkillTreeNodeInputValidator = z.lazy(
55116
+ () => z.object({
55117
+ id: z.string().optional(),
55118
+ statement: z.string(),
55119
+ description: z.string().optional(),
55120
+ code: z.string().optional(),
55121
+ icon: z.string().optional(),
55122
+ type: z.string().optional(),
55123
+ status: SkillStatusEnum.optional(),
55124
+ children: z.array(SkillTreeNodeInputValidator).optional()
55125
+ })
55126
+ ).openapi({ ref: "SkillTreeNodeInput" });
55127
+ var LinkProviderFrameworkInputValidator = z.object({
55128
+ frameworkId: z.string()
55129
+ });
55130
+ var CreateManagedFrameworkInputValidator = z.object({
55131
+ id: z.string().optional(),
55132
+ name: z.string().min(1),
55133
+ description: z.string().optional(),
55134
+ image: z.string().optional(),
55135
+ sourceURI: z.string().url().optional(),
55136
+ status: SkillFrameworkStatusEnum.optional(),
55137
+ skills: z.array(SkillTreeNodeInputValidator).optional(),
55138
+ boostUris: z.array(z.string()).optional()
55139
+ });
55140
+ var UpdateFrameworkInputValidator = z.object({
55141
+ id: z.string(),
55142
+ name: z.string().min(1).optional(),
55143
+ description: z.string().optional(),
55144
+ image: z.string().optional(),
55145
+ sourceURI: z.string().url().optional(),
55146
+ status: SkillFrameworkStatusEnum.optional()
55147
+ }).refine(
55148
+ (data) => data.name !== void 0 || data.description !== void 0 || data.image !== void 0 || data.sourceURI !== void 0 || data.status !== void 0,
55149
+ {
55150
+ message: "At least one field must be provided to update",
55151
+ path: ["name"]
55152
+ }
55153
+ );
55154
+ var DeleteFrameworkInputValidator = z.object({ id: z.string() });
55155
+ var CreateManagedFrameworkBatchInputValidator = z.object({
55156
+ frameworks: z.array(
55157
+ CreateManagedFrameworkInputValidator.extend({
55158
+ skills: z.array(SkillTreeNodeInputValidator).optional()
55159
+ })
55160
+ ).min(1)
55161
+ });
55162
+ var SkillFrameworkAdminInputValidator = z.object({
55163
+ frameworkId: z.string(),
55164
+ profileId: z.string()
55165
+ });
55166
+ var SkillFrameworkIdInputValidator = z.object({ frameworkId: z.string() });
55167
+ var SkillFrameworkAdminsValidator = LCNProfileValidator.array();
55168
+ var SyncFrameworkInputValidator = z.object({ id: z.string() });
55169
+ var AddTagInputValidator = z.object({
55170
+ slug: z.string().min(1),
55171
+ name: z.string().min(1)
55172
+ });
55173
+ var CreateSkillInputValidator = z.object({
55174
+ frameworkId: z.string(),
55175
+ skill: SkillTreeNodeInputValidator,
55176
+ parentId: z.string().nullable().optional()
55177
+ });
55178
+ var UpdateSkillInputValidator = z.object({
55179
+ frameworkId: z.string(),
55180
+ id: z.string(),
55181
+ statement: z.string().optional(),
55182
+ description: z.string().optional(),
55183
+ code: z.string().optional(),
55184
+ icon: z.string().optional(),
55185
+ type: z.string().optional(),
55186
+ status: SkillStatusEnum.optional()
55187
+ }).refine(
55188
+ (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,
55189
+ {
55190
+ message: "At least one field must be provided to update a skill",
55191
+ path: ["statement"]
55192
+ }
55193
+ );
55194
+ var SkillDeletionStrategyValidator = z.enum(["recursive", "reparent"]);
55195
+ var DeleteSkillInputValidator = z.object({
55196
+ frameworkId: z.string(),
55197
+ id: z.string(),
55198
+ strategy: SkillDeletionStrategyValidator.optional().default("reparent")
55199
+ });
55200
+ var CreateSkillsBatchInputValidator = z.object({
55201
+ frameworkId: z.string(),
55202
+ skills: z.array(SkillTreeNodeInputValidator).min(1),
55203
+ parentId: z.string().nullable().optional()
55204
+ });
55205
+ var ReplaceSkillFrameworkSkillsInputValidator = z.object({
55206
+ frameworkId: z.string(),
55207
+ skills: z.array(SkillTreeNodeInputValidator).min(0)
55208
+ });
55209
+ var ReplaceSkillFrameworkSkillsResultValidator = z.object({
55210
+ created: z.number().int().min(0),
55211
+ updated: z.number().int().min(0),
55212
+ deleted: z.number().int().min(0),
55213
+ unchanged: z.number().int().min(0),
55214
+ total: z.number().int().min(0)
55215
+ });
55216
+ var CountSkillsInputValidator = z.object({
55217
+ frameworkId: z.string(),
55218
+ skillId: z.string().optional(),
55219
+ recursive: z.boolean().optional().default(false),
55220
+ onlyCountCompetencies: z.boolean().optional().default(false)
55221
+ });
55222
+ var CountSkillsResultValidator = z.object({
55223
+ count: z.number().int().min(0)
55224
+ });
55225
+ var GetFullSkillTreeInputValidator = z.object({
55226
+ frameworkId: z.string()
55227
+ });
55228
+ var GetFullSkillTreeResultValidator = z.object({
55229
+ skills: z.array(SkillTreeNodeValidator)
55230
+ });
55231
+ var GetSkillPathInputValidator = z.object({
55232
+ frameworkId: z.string(),
55233
+ skillId: z.string()
55234
+ });
55235
+ var GetSkillPathResultValidator = z.object({
55236
+ path: z.array(SkillValidator)
55237
+ });
55238
+ var FrameworkWithSkillsValidator = z.object({
55239
+ framework: SkillFrameworkValidator,
55240
+ skills: PaginatedSkillTreeValidator
55241
+ });
54995
55242
 
54996
55243
  // src/helpers.ts
54997
55244
  var streamIdToCeramicURI = /* @__PURE__ */ __name((id) => `lc:ceramic:${id}`, "streamIdToCeramicURI");