@learncard/ceramic-plugin 1.0.52 → 1.0.54

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