@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.
- package/dist/ceramic-plugin.cjs.development.js +263 -16
- package/dist/ceramic-plugin.cjs.development.js.map +2 -2
- package/dist/ceramic-plugin.cjs.production.min.js +108 -108
- package/dist/ceramic-plugin.cjs.production.min.js.map +3 -3
- package/dist/ceramic-plugin.esm.js +263 -16
- package/dist/ceramic-plugin.esm.js.map +2 -2
- package/package.json +4 -4
|
@@ -54363,7 +54363,14 @@ var RegExpValidator = z.instanceof(RegExp).or(
|
|
|
54363
54363
|
}
|
|
54364
54364
|
})
|
|
54365
54365
|
);
|
|
54366
|
-
var
|
|
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
|
|
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({
|
|
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({
|
|
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(),
|
|
@@ -54910,31 +54948,55 @@ var IssueInboxSigningAuthorityValidator = z.object({
|
|
|
54910
54948
|
});
|
|
54911
54949
|
var IssueInboxCredentialValidator = z.object({
|
|
54912
54950
|
recipient: ContactMethodQueryValidator.describe("The recipient of the credential"),
|
|
54913
|
-
credential: VCValidator.passthrough().or(VPValidator.passthrough()).or(UnsignedVCValidator.passthrough()).describe(
|
|
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
|
+
),
|
|
54914
54954
|
configuration: z.object({
|
|
54915
|
-
signingAuthority: IssueInboxSigningAuthorityValidator.optional().describe(
|
|
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
|
+
),
|
|
54916
54958
|
webhookUrl: z.string().url().optional().describe("The webhook URL to receive credential issuance events."),
|
|
54917
54959
|
expiresInDays: z.number().min(1).max(365).optional().describe("The number of days the credential will be valid for."),
|
|
54918
54960
|
delivery: z.object({
|
|
54919
|
-
suppress: z.boolean().optional().default(false).describe(
|
|
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
|
+
),
|
|
54920
54964
|
template: z.object({
|
|
54921
|
-
id: z.enum(["universal-inbox-claim"]).optional().describe(
|
|
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
|
+
),
|
|
54922
54968
|
model: z.object({
|
|
54923
54969
|
issuer: z.object({
|
|
54924
|
-
name: z.string().optional().describe(
|
|
54970
|
+
name: z.string().optional().describe(
|
|
54971
|
+
'The name of the organization (e.g., "State University").'
|
|
54972
|
+
),
|
|
54925
54973
|
logoUrl: z.string().url().optional().describe("The URL of the organization's logo.")
|
|
54926
54974
|
}).optional(),
|
|
54927
54975
|
credential: z.object({
|
|
54928
|
-
name: z.string().optional().describe(
|
|
54929
|
-
|
|
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
|
+
)
|
|
54930
54982
|
}).optional(),
|
|
54931
54983
|
recipient: z.object({
|
|
54932
|
-
name: z.string().optional().describe(
|
|
54984
|
+
name: z.string().optional().describe(
|
|
54985
|
+
'The name of the recipient (e.g., "John Doe").'
|
|
54986
|
+
)
|
|
54933
54987
|
}).optional()
|
|
54934
|
-
}).describe(
|
|
54935
|
-
|
|
54936
|
-
|
|
54937
|
-
|
|
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
|
+
)
|
|
54938
55000
|
});
|
|
54939
55001
|
var IssueInboxCredentialResponseValidator = z.object({
|
|
54940
55002
|
issuanceId: z.string(),
|
|
@@ -54996,6 +55058,191 @@ var ClaimTokenValidator = z.object({
|
|
|
54996
55058
|
expiresAt: z.string(),
|
|
54997
55059
|
used: z.boolean()
|
|
54998
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
|
+
});
|
|
54999
55246
|
|
|
55000
55247
|
// src/helpers.ts
|
|
55001
55248
|
var streamIdToCeramicURI = /* @__PURE__ */ __name((id) => `lc:ceramic:${id}`, "streamIdToCeramicURI");
|