@learncard/ceramic-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.
@@ -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(),
@@ -54762,7 +54800,13 @@ var LCNInboxContactMethodValidator = z.object({
54762
54800
  type: z.string(),
54763
54801
  value: z.string()
54764
54802
  });
54765
- var LCNInboxStatusEnumValidator = z.enum(["PENDING", "DELIVERED", "CLAIMED", "EXPIRED"]);
54803
+ var LCNInboxStatusEnumValidator = z.enum([
54804
+ "PENDING",
54805
+ "ISSUED",
54806
+ "EXPIRED",
54807
+ "DELIVERED",
54808
+ "CLAIMED"
54809
+ ]);
54766
54810
  var LCNNotificationInboxValidator = z.object({
54767
54811
  issuanceId: z.string(),
54768
54812
  status: LCNInboxStatusEnumValidator,
@@ -54860,11 +54904,19 @@ var ContactMethodVerificationValidator = z.object({
54860
54904
  var SetPrimaryContactMethodValidator = z.object({
54861
54905
  contactMethodId: z.string()
54862
54906
  });
54907
+ var CreateContactMethodSessionValidator = z.object({
54908
+ contactMethod: ContactMethodVerificationRequestValidator,
54909
+ otpChallenge: z.string()
54910
+ });
54911
+ var CreateContactMethodSessionResponseValidator = z.object({
54912
+ sessionJwt: z.string()
54913
+ });
54863
54914
  var InboxCredentialValidator = z.object({
54864
54915
  id: z.string(),
54865
54916
  credential: z.string(),
54866
54917
  isSigned: z.boolean(),
54867
54918
  currentStatus: LCNInboxStatusEnumValidator,
54919
+ isAccepted: z.boolean().optional(),
54868
54920
  expiresAt: z.string(),
54869
54921
  createdAt: z.string(),
54870
54922
  issuerDid: z.string(),
@@ -54883,6 +54935,7 @@ var InboxCredentialQueryValidator = z.object({
54883
54935
  currentStatus: LCNInboxStatusEnumValidator,
54884
54936
  id: z.string(),
54885
54937
  isSigned: z.boolean(),
54938
+ isAccepted: z.boolean().optional(),
54886
54939
  issuerDid: z.string()
54887
54940
  }).partial();
54888
54941
  var IssueInboxSigningAuthorityValidator = z.object({
@@ -54891,31 +54944,55 @@ var IssueInboxSigningAuthorityValidator = z.object({
54891
54944
  });
54892
54945
  var IssueInboxCredentialValidator = z.object({
54893
54946
  recipient: ContactMethodQueryValidator.describe("The recipient of the credential"),
54894
- 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
+ ),
54895
54950
  configuration: z.object({
54896
- 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
+ ),
54897
54954
  webhookUrl: z.string().url().optional().describe("The webhook URL to receive credential issuance events."),
54898
54955
  expiresInDays: z.number().min(1).max(365).optional().describe("The number of days the credential will be valid for."),
54899
54956
  delivery: z.object({
54900
- 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
+ ),
54901
54960
  template: z.object({
54902
- 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
+ ),
54903
54964
  model: z.object({
54904
54965
  issuer: z.object({
54905
- 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
+ ),
54906
54969
  logoUrl: z.string().url().optional().describe("The URL of the organization's logo.")
54907
54970
  }).optional(),
54908
54971
  credential: z.object({
54909
- name: z.string().optional().describe('The name of the credential (e.g., "Bachelor of Science").'),
54910
- 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
+ )
54911
54978
  }).optional(),
54912
54979
  recipient: z.object({
54913
- 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
+ )
54914
54983
  }).optional()
54915
- }).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.")
54916
- }).optional().describe("The template to use for the credential delivery. If not provided, the default template will be used.")
54917
- }).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.")
54918
- }).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
+ )
54919
54996
  });
54920
54997
  var IssueInboxCredentialResponseValidator = z.object({
54921
54998
  issuanceId: z.string(),
@@ -54924,6 +55001,51 @@ var IssueInboxCredentialResponseValidator = z.object({
54924
55001
  claimUrl: z.string().url().optional(),
54925
55002
  recipientDid: z.string().optional()
54926
55003
  });
55004
+ var ClaimInboxCredentialValidator = z.object({
55005
+ credential: VCValidator.passthrough().or(VPValidator.passthrough()).or(UnsignedVCValidator.passthrough()).describe("The credential to issue."),
55006
+ configuration: z.object({
55007
+ publishableKey: z.string(),
55008
+ signingAuthorityName: z.string().optional()
55009
+ }).optional()
55010
+ });
55011
+ var LCNDomainOrOriginValidator = z.union([
55012
+ z.string().regex(
55013
+ /^(?:(?:[a-zA-Z0-9-]{1,63}\.)+[a-zA-Z]{2,63}|localhost|\d{1,3}(?:\.\d{1,3}){3})(?::\d{1,5})?$/,
55014
+ {
55015
+ message: "Must be a valid domain (incl. subdomains), localhost, or IPv4, optionally with port"
55016
+ }
55017
+ ),
55018
+ z.string().regex(
55019
+ /^https?:\/\/(?:(?:[a-zA-Z0-9-]{1,63}\.)+[a-zA-Z]{2,63}|localhost|\d{1,3}(?:\.\d{1,3}){3})(?::\d{1,5})?$/,
55020
+ { message: "Must be a valid http(s) origin" }
55021
+ )
55022
+ ]);
55023
+ var LCNIntegrationValidator = z.object({
55024
+ id: z.string(),
55025
+ name: z.string(),
55026
+ description: z.string().optional(),
55027
+ publishableKey: z.string(),
55028
+ whitelistedDomains: z.array(LCNDomainOrOriginValidator).default([])
55029
+ });
55030
+ var LCNIntegrationCreateValidator = z.object({
55031
+ name: z.string(),
55032
+ description: z.string().optional(),
55033
+ whitelistedDomains: z.array(LCNDomainOrOriginValidator).default([])
55034
+ });
55035
+ var LCNIntegrationUpdateValidator = z.object({
55036
+ name: z.string().optional(),
55037
+ description: z.string().optional(),
55038
+ whitelistedDomains: z.array(LCNDomainOrOriginValidator).optional(),
55039
+ rotatePublishableKey: z.boolean().optional()
55040
+ });
55041
+ var LCNIntegrationQueryValidator = z.object({
55042
+ id: StringQuery,
55043
+ name: StringQuery,
55044
+ description: StringQuery
55045
+ }).partial();
55046
+ var PaginatedLCNIntegrationsValidator = PaginationResponseValidator.extend({
55047
+ records: LCNIntegrationValidator.array()
55048
+ });
54927
55049
  var ClaimTokenValidator = z.object({
54928
55050
  token: z.string(),
54929
55051
  contactMethodId: z.string(),
@@ -54932,6 +55054,191 @@ var ClaimTokenValidator = z.object({
54932
55054
  expiresAt: z.string(),
54933
55055
  used: z.boolean()
54934
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
+ });
54935
55242
 
54936
55243
  // src/helpers.ts
54937
55244
  var streamIdToCeramicURI = /* @__PURE__ */ __name((id) => `lc:ceramic:${id}`, "streamIdToCeramicURI");