@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.
@@ -54363,7 +54363,14 @@ var RegExpValidator = z.instanceof(RegExp).or(
54363
54363
  }
54364
54364
  })
54365
54365
  );
54366
- var StringQuery = z.string().or(z.object({ $in: z.string().array() })).or(z.object({ $regex: RegExpValidator }));
54366
+ var BaseStringQuery = z.string().or(z.object({ $in: z.string().array() })).or(z.object({ $regex: RegExpValidator }));
54367
+ var StringQuery = z.union([
54368
+ BaseStringQuery,
54369
+ z.object({
54370
+ $or: BaseStringQuery.array()
54371
+ })
54372
+ ]);
54373
+ extendZodWithOpenApi(z);
54367
54374
  var LCNProfileDisplayValidator = z.object({
54368
54375
  backgroundColor: z.string().optional(),
54369
54376
  backgroundImage: z.string().optional(),
@@ -54521,7 +54528,7 @@ var BoostValidator = z.object({
54521
54528
  claimPermissions: BoostPermissionsValidator.optional(),
54522
54529
  allowAnyoneToCreateChildren: z.boolean().optional()
54523
54530
  });
54524
- var BoostQueryValidator = z.object({
54531
+ var BaseBoostQueryValidator = z.object({
54525
54532
  uri: StringQuery,
54526
54533
  name: StringQuery,
54527
54534
  type: StringQuery,
@@ -54530,6 +54537,12 @@ var BoostQueryValidator = z.object({
54530
54537
  status: LCNBoostStatus.or(z.object({ $in: LCNBoostStatus.array() })),
54531
54538
  autoConnectRecipients: z.boolean()
54532
54539
  }).partial();
54540
+ var BoostQueryValidator = z.union([
54541
+ z.object({
54542
+ $or: BaseBoostQueryValidator.array()
54543
+ }),
54544
+ BaseBoostQueryValidator
54545
+ ]);
54533
54546
  var PaginatedBoostsValidator = PaginationResponseValidator.extend({
54534
54547
  records: BoostValidator.array()
54535
54548
  });
@@ -54585,11 +54598,25 @@ var ConsentFlowTermsStatusValidator = z.enum(["live", "stale", "withdrawn"]);
54585
54598
  var ConsentFlowContractValidator = z.object({
54586
54599
  read: z.object({
54587
54600
  anonymize: z.boolean().optional(),
54588
- credentials: z.object({ categories: z.record(z.object({ required: z.boolean(), defaultEnabled: z.boolean().optional() })).default({}) }).default({}),
54601
+ credentials: z.object({
54602
+ categories: z.record(
54603
+ z.object({
54604
+ required: z.boolean(),
54605
+ defaultEnabled: z.boolean().optional()
54606
+ })
54607
+ ).default({})
54608
+ }).default({}),
54589
54609
  personal: z.record(z.object({ required: z.boolean(), defaultEnabled: z.boolean().optional() })).default({})
54590
54610
  }).default({}),
54591
54611
  write: z.object({
54592
- credentials: z.object({ categories: z.record(z.object({ required: z.boolean(), defaultEnabled: z.boolean().optional() })).default({}) }).default({}),
54612
+ credentials: z.object({
54613
+ categories: z.record(
54614
+ z.object({
54615
+ required: z.boolean(),
54616
+ defaultEnabled: z.boolean().optional()
54617
+ })
54618
+ ).default({})
54619
+ }).default({}),
54593
54620
  personal: z.record(z.object({ required: z.boolean(), defaultEnabled: z.boolean().optional() })).default({})
54594
54621
  }).default({})
54595
54622
  });
@@ -54732,6 +54759,17 @@ var ConsentFlowTransactionValidator = z.object({
54732
54759
  var PaginatedConsentFlowTransactionsValidator = PaginationResponseValidator.extend({
54733
54760
  records: ConsentFlowTransactionValidator.array()
54734
54761
  });
54762
+ var BaseSkillFrameworkQueryValidator = z.object({
54763
+ id: StringQuery,
54764
+ name: StringQuery,
54765
+ description: StringQuery,
54766
+ sourceURI: StringQuery,
54767
+ status: StringQuery
54768
+ }).partial();
54769
+ var SkillFrameworkQueryValidator = z.union([
54770
+ z.object({ $or: BaseSkillFrameworkQueryValidator.array() }),
54771
+ BaseSkillFrameworkQueryValidator
54772
+ ]);
54735
54773
  var ContractCredentialValidator = z.object({
54736
54774
  credentialUri: z.string(),
54737
54775
  termsUri: z.string(),
@@ -54766,7 +54804,13 @@ var LCNInboxContactMethodValidator = z.object({
54766
54804
  type: z.string(),
54767
54805
  value: z.string()
54768
54806
  });
54769
- var LCNInboxStatusEnumValidator = z.enum(["PENDING", "DELIVERED", "CLAIMED", "EXPIRED"]);
54807
+ var LCNInboxStatusEnumValidator = z.enum([
54808
+ "PENDING",
54809
+ "ISSUED",
54810
+ "EXPIRED",
54811
+ "DELIVERED",
54812
+ "CLAIMED"
54813
+ ]);
54770
54814
  var LCNNotificationInboxValidator = z.object({
54771
54815
  issuanceId: z.string(),
54772
54816
  status: LCNInboxStatusEnumValidator,
@@ -54864,11 +54908,19 @@ var ContactMethodVerificationValidator = z.object({
54864
54908
  var SetPrimaryContactMethodValidator = z.object({
54865
54909
  contactMethodId: z.string()
54866
54910
  });
54911
+ var CreateContactMethodSessionValidator = z.object({
54912
+ contactMethod: ContactMethodVerificationRequestValidator,
54913
+ otpChallenge: z.string()
54914
+ });
54915
+ var CreateContactMethodSessionResponseValidator = z.object({
54916
+ sessionJwt: z.string()
54917
+ });
54867
54918
  var InboxCredentialValidator = z.object({
54868
54919
  id: z.string(),
54869
54920
  credential: z.string(),
54870
54921
  isSigned: z.boolean(),
54871
54922
  currentStatus: LCNInboxStatusEnumValidator,
54923
+ isAccepted: z.boolean().optional(),
54872
54924
  expiresAt: z.string(),
54873
54925
  createdAt: z.string(),
54874
54926
  issuerDid: z.string(),
@@ -54887,6 +54939,7 @@ var InboxCredentialQueryValidator = z.object({
54887
54939
  currentStatus: LCNInboxStatusEnumValidator,
54888
54940
  id: z.string(),
54889
54941
  isSigned: z.boolean(),
54942
+ isAccepted: z.boolean().optional(),
54890
54943
  issuerDid: z.string()
54891
54944
  }).partial();
54892
54945
  var IssueInboxSigningAuthorityValidator = z.object({
@@ -54895,31 +54948,55 @@ var IssueInboxSigningAuthorityValidator = z.object({
54895
54948
  });
54896
54949
  var IssueInboxCredentialValidator = z.object({
54897
54950
  recipient: ContactMethodQueryValidator.describe("The recipient of the credential"),
54898
- 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."),
54951
+ credential: VCValidator.passthrough().or(VPValidator.passthrough()).or(UnsignedVCValidator.passthrough()).describe(
54952
+ "The credential to issue. If not signed, the users default signing authority will be used, or the specified signing authority in the configuration."
54953
+ ),
54899
54954
  configuration: z.object({
54900
- 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."),
54955
+ signingAuthority: IssueInboxSigningAuthorityValidator.optional().describe(
54956
+ "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."
54957
+ ),
54901
54958
  webhookUrl: z.string().url().optional().describe("The webhook URL to receive credential issuance events."),
54902
54959
  expiresInDays: z.number().min(1).max(365).optional().describe("The number of days the credential will be valid for."),
54903
54960
  delivery: z.object({
54904
- 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."),
54961
+ suppress: z.boolean().optional().default(false).describe(
54962
+ "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."
54963
+ ),
54905
54964
  template: z.object({
54906
- 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."),
54965
+ id: z.enum(["universal-inbox-claim"]).optional().describe(
54966
+ "The template ID to use for the credential delivery. If not provided, the default template will be used."
54967
+ ),
54907
54968
  model: z.object({
54908
54969
  issuer: z.object({
54909
- name: z.string().optional().describe('The name of the organization (e.g., "State University").'),
54970
+ name: z.string().optional().describe(
54971
+ 'The name of the organization (e.g., "State University").'
54972
+ ),
54910
54973
  logoUrl: z.string().url().optional().describe("The URL of the organization's logo.")
54911
54974
  }).optional(),
54912
54975
  credential: z.object({
54913
- name: z.string().optional().describe('The name of the credential (e.g., "Bachelor of Science").'),
54914
- type: z.string().optional().describe('The type of the credential (e.g., "degree", "certificate").')
54976
+ name: z.string().optional().describe(
54977
+ 'The name of the credential (e.g., "Bachelor of Science").'
54978
+ ),
54979
+ type: z.string().optional().describe(
54980
+ 'The type of the credential (e.g., "degree", "certificate").'
54981
+ )
54915
54982
  }).optional(),
54916
54983
  recipient: z.object({
54917
- name: z.string().optional().describe('The name of the recipient (e.g., "John Doe").')
54984
+ name: z.string().optional().describe(
54985
+ 'The name of the recipient (e.g., "John Doe").'
54986
+ )
54918
54987
  }).optional()
54919
- }).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.")
54920
- }).optional().describe("The template to use for the credential delivery. If not provided, the default template will be used.")
54921
- }).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.")
54922
- }).optional().describe("Configuration for the credential issuance. If not provided, the default configuration will be used.")
54988
+ }).describe(
54989
+ "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."
54990
+ )
54991
+ }).optional().describe(
54992
+ "The template to use for the credential delivery. If not provided, the default template will be used."
54993
+ )
54994
+ }).optional().describe(
54995
+ "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."
54996
+ )
54997
+ }).optional().describe(
54998
+ "Configuration for the credential issuance. If not provided, the default configuration will be used."
54999
+ )
54923
55000
  });
54924
55001
  var IssueInboxCredentialResponseValidator = z.object({
54925
55002
  issuanceId: z.string(),
@@ -54928,6 +55005,51 @@ var IssueInboxCredentialResponseValidator = z.object({
54928
55005
  claimUrl: z.string().url().optional(),
54929
55006
  recipientDid: z.string().optional()
54930
55007
  });
55008
+ var ClaimInboxCredentialValidator = z.object({
55009
+ credential: VCValidator.passthrough().or(VPValidator.passthrough()).or(UnsignedVCValidator.passthrough()).describe("The credential to issue."),
55010
+ configuration: z.object({
55011
+ publishableKey: z.string(),
55012
+ signingAuthorityName: z.string().optional()
55013
+ }).optional()
55014
+ });
55015
+ var LCNDomainOrOriginValidator = z.union([
55016
+ z.string().regex(
55017
+ /^(?:(?:[a-zA-Z0-9-]{1,63}\.)+[a-zA-Z]{2,63}|localhost|\d{1,3}(?:\.\d{1,3}){3})(?::\d{1,5})?$/,
55018
+ {
55019
+ message: "Must be a valid domain (incl. subdomains), localhost, or IPv4, optionally with port"
55020
+ }
55021
+ ),
55022
+ z.string().regex(
55023
+ /^https?:\/\/(?:(?:[a-zA-Z0-9-]{1,63}\.)+[a-zA-Z]{2,63}|localhost|\d{1,3}(?:\.\d{1,3}){3})(?::\d{1,5})?$/,
55024
+ { message: "Must be a valid http(s) origin" }
55025
+ )
55026
+ ]);
55027
+ var LCNIntegrationValidator = z.object({
55028
+ id: z.string(),
55029
+ name: z.string(),
55030
+ description: z.string().optional(),
55031
+ publishableKey: z.string(),
55032
+ whitelistedDomains: z.array(LCNDomainOrOriginValidator).default([])
55033
+ });
55034
+ var LCNIntegrationCreateValidator = z.object({
55035
+ name: z.string(),
55036
+ description: z.string().optional(),
55037
+ whitelistedDomains: z.array(LCNDomainOrOriginValidator).default([])
55038
+ });
55039
+ var LCNIntegrationUpdateValidator = z.object({
55040
+ name: z.string().optional(),
55041
+ description: z.string().optional(),
55042
+ whitelistedDomains: z.array(LCNDomainOrOriginValidator).optional(),
55043
+ rotatePublishableKey: z.boolean().optional()
55044
+ });
55045
+ var LCNIntegrationQueryValidator = z.object({
55046
+ id: StringQuery,
55047
+ name: StringQuery,
55048
+ description: StringQuery
55049
+ }).partial();
55050
+ var PaginatedLCNIntegrationsValidator = PaginationResponseValidator.extend({
55051
+ records: LCNIntegrationValidator.array()
55052
+ });
54931
55053
  var ClaimTokenValidator = z.object({
54932
55054
  token: z.string(),
54933
55055
  contactMethodId: z.string(),
@@ -54936,6 +55058,191 @@ var ClaimTokenValidator = z.object({
54936
55058
  expiresAt: z.string(),
54937
55059
  used: z.boolean()
54938
55060
  });
55061
+ var TagValidator = z.object({
55062
+ id: z.string(),
55063
+ name: z.string().min(1),
55064
+ slug: z.string().min(1),
55065
+ createdAt: z.string().optional(),
55066
+ updatedAt: z.string().optional()
55067
+ });
55068
+ var SkillStatusEnum = z.enum(["active", "archived"]);
55069
+ var SkillValidator = z.object({
55070
+ id: z.string(),
55071
+ statement: z.string(),
55072
+ description: z.string().optional(),
55073
+ code: z.string().optional(),
55074
+ icon: z.string().optional(),
55075
+ type: z.string().default("skill"),
55076
+ status: SkillStatusEnum.default("active"),
55077
+ frameworkId: z.string().optional(),
55078
+ createdAt: z.string().optional(),
55079
+ updatedAt: z.string().optional()
55080
+ });
55081
+ var BaseSkillQueryValidator = z.object({
55082
+ id: StringQuery,
55083
+ statement: StringQuery,
55084
+ description: StringQuery,
55085
+ code: StringQuery,
55086
+ type: StringQuery,
55087
+ status: SkillStatusEnum.or(z.object({ $in: SkillStatusEnum.array() }))
55088
+ }).partial();
55089
+ var SkillQueryValidator = z.union([
55090
+ z.object({
55091
+ $or: BaseSkillQueryValidator.array()
55092
+ }),
55093
+ BaseSkillQueryValidator
55094
+ ]);
55095
+ var SkillFrameworkStatusEnum = z.enum(["active", "archived"]);
55096
+ var SkillFrameworkValidator = z.object({
55097
+ id: z.string(),
55098
+ name: z.string(),
55099
+ description: z.string().optional(),
55100
+ image: z.string().optional(),
55101
+ sourceURI: z.string().url().optional(),
55102
+ status: SkillFrameworkStatusEnum.default("active"),
55103
+ createdAt: z.string().optional(),
55104
+ updatedAt: z.string().optional()
55105
+ });
55106
+ var PaginatedSkillFrameworksValidator = PaginationResponseValidator.extend({
55107
+ records: SkillFrameworkValidator.array()
55108
+ });
55109
+ var SkillTreeNodeValidator = SkillValidator.extend({
55110
+ children: z.array(z.lazy(() => SkillTreeNodeValidator)),
55111
+ hasChildren: z.boolean(),
55112
+ childrenCursor: z.string().nullable().optional()
55113
+ }).openapi({ ref: "SkillTreeNode" });
55114
+ var PaginatedSkillTreeValidator = z.object({
55115
+ hasMore: z.boolean(),
55116
+ cursor: z.string().nullable(),
55117
+ records: z.array(SkillTreeNodeValidator)
55118
+ });
55119
+ var SkillTreeNodeInputValidator = z.lazy(
55120
+ () => z.object({
55121
+ id: z.string().optional(),
55122
+ statement: z.string(),
55123
+ description: z.string().optional(),
55124
+ code: z.string().optional(),
55125
+ icon: z.string().optional(),
55126
+ type: z.string().optional(),
55127
+ status: SkillStatusEnum.optional(),
55128
+ children: z.array(SkillTreeNodeInputValidator).optional()
55129
+ })
55130
+ ).openapi({ ref: "SkillTreeNodeInput" });
55131
+ var LinkProviderFrameworkInputValidator = z.object({
55132
+ frameworkId: z.string()
55133
+ });
55134
+ var CreateManagedFrameworkInputValidator = z.object({
55135
+ id: z.string().optional(),
55136
+ name: z.string().min(1),
55137
+ description: z.string().optional(),
55138
+ image: z.string().optional(),
55139
+ sourceURI: z.string().url().optional(),
55140
+ status: SkillFrameworkStatusEnum.optional(),
55141
+ skills: z.array(SkillTreeNodeInputValidator).optional(),
55142
+ boostUris: z.array(z.string()).optional()
55143
+ });
55144
+ var UpdateFrameworkInputValidator = z.object({
55145
+ id: z.string(),
55146
+ name: z.string().min(1).optional(),
55147
+ description: z.string().optional(),
55148
+ image: z.string().optional(),
55149
+ sourceURI: z.string().url().optional(),
55150
+ status: SkillFrameworkStatusEnum.optional()
55151
+ }).refine(
55152
+ (data) => data.name !== void 0 || data.description !== void 0 || data.image !== void 0 || data.sourceURI !== void 0 || data.status !== void 0,
55153
+ {
55154
+ message: "At least one field must be provided to update",
55155
+ path: ["name"]
55156
+ }
55157
+ );
55158
+ var DeleteFrameworkInputValidator = z.object({ id: z.string() });
55159
+ var CreateManagedFrameworkBatchInputValidator = z.object({
55160
+ frameworks: z.array(
55161
+ CreateManagedFrameworkInputValidator.extend({
55162
+ skills: z.array(SkillTreeNodeInputValidator).optional()
55163
+ })
55164
+ ).min(1)
55165
+ });
55166
+ var SkillFrameworkAdminInputValidator = z.object({
55167
+ frameworkId: z.string(),
55168
+ profileId: z.string()
55169
+ });
55170
+ var SkillFrameworkIdInputValidator = z.object({ frameworkId: z.string() });
55171
+ var SkillFrameworkAdminsValidator = LCNProfileValidator.array();
55172
+ var SyncFrameworkInputValidator = z.object({ id: z.string() });
55173
+ var AddTagInputValidator = z.object({
55174
+ slug: z.string().min(1),
55175
+ name: z.string().min(1)
55176
+ });
55177
+ var CreateSkillInputValidator = z.object({
55178
+ frameworkId: z.string(),
55179
+ skill: SkillTreeNodeInputValidator,
55180
+ parentId: z.string().nullable().optional()
55181
+ });
55182
+ var UpdateSkillInputValidator = z.object({
55183
+ frameworkId: z.string(),
55184
+ id: z.string(),
55185
+ statement: z.string().optional(),
55186
+ description: z.string().optional(),
55187
+ code: z.string().optional(),
55188
+ icon: z.string().optional(),
55189
+ type: z.string().optional(),
55190
+ status: SkillStatusEnum.optional()
55191
+ }).refine(
55192
+ (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,
55193
+ {
55194
+ message: "At least one field must be provided to update a skill",
55195
+ path: ["statement"]
55196
+ }
55197
+ );
55198
+ var SkillDeletionStrategyValidator = z.enum(["recursive", "reparent"]);
55199
+ var DeleteSkillInputValidator = z.object({
55200
+ frameworkId: z.string(),
55201
+ id: z.string(),
55202
+ strategy: SkillDeletionStrategyValidator.optional().default("reparent")
55203
+ });
55204
+ var CreateSkillsBatchInputValidator = z.object({
55205
+ frameworkId: z.string(),
55206
+ skills: z.array(SkillTreeNodeInputValidator).min(1),
55207
+ parentId: z.string().nullable().optional()
55208
+ });
55209
+ var ReplaceSkillFrameworkSkillsInputValidator = z.object({
55210
+ frameworkId: z.string(),
55211
+ skills: z.array(SkillTreeNodeInputValidator).min(0)
55212
+ });
55213
+ var ReplaceSkillFrameworkSkillsResultValidator = z.object({
55214
+ created: z.number().int().min(0),
55215
+ updated: z.number().int().min(0),
55216
+ deleted: z.number().int().min(0),
55217
+ unchanged: z.number().int().min(0),
55218
+ total: z.number().int().min(0)
55219
+ });
55220
+ var CountSkillsInputValidator = z.object({
55221
+ frameworkId: z.string(),
55222
+ skillId: z.string().optional(),
55223
+ recursive: z.boolean().optional().default(false),
55224
+ onlyCountCompetencies: z.boolean().optional().default(false)
55225
+ });
55226
+ var CountSkillsResultValidator = z.object({
55227
+ count: z.number().int().min(0)
55228
+ });
55229
+ var GetFullSkillTreeInputValidator = z.object({
55230
+ frameworkId: z.string()
55231
+ });
55232
+ var GetFullSkillTreeResultValidator = z.object({
55233
+ skills: z.array(SkillTreeNodeValidator)
55234
+ });
55235
+ var GetSkillPathInputValidator = z.object({
55236
+ frameworkId: z.string(),
55237
+ skillId: z.string()
55238
+ });
55239
+ var GetSkillPathResultValidator = z.object({
55240
+ path: z.array(SkillValidator)
55241
+ });
55242
+ var FrameworkWithSkillsValidator = z.object({
55243
+ framework: SkillFrameworkValidator,
55244
+ skills: PaginatedSkillTreeValidator
55245
+ });
54939
55246
 
54940
55247
  // src/helpers.ts
54941
55248
  var streamIdToCeramicURI = /* @__PURE__ */ __name((id) => `lc:ceramic:${id}`, "streamIdToCeramicURI");