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