@hol-org/rb-client 0.1.157 → 0.1.158
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/index.cjs +233 -0
- package/dist/index.d.cts +2821 -394
- package/dist/index.d.ts +2821 -394
- package/dist/index.js +233 -0
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1138,8 +1138,13 @@ var moltbookOwnerRegistrationUpdateResponseSchema = import_zod2.z.object({
|
|
|
1138
1138
|
var skillRegistryFileRoleSchema = import_zod2.z.union([
|
|
1139
1139
|
import_zod2.z.literal("skill-md"),
|
|
1140
1140
|
import_zod2.z.literal("skill-json"),
|
|
1141
|
+
import_zod2.z.literal("skill-icon"),
|
|
1141
1142
|
import_zod2.z.literal("file")
|
|
1142
1143
|
]);
|
|
1144
|
+
var trustScoreBreakdownSchema = import_zod2.z.record(import_zod2.z.number()).refine(
|
|
1145
|
+
(record) => typeof record.total === "number" && Number.isFinite(record.total),
|
|
1146
|
+
{ message: "trustScores.total is required" }
|
|
1147
|
+
);
|
|
1143
1148
|
var skillRegistryFileDescriptorSchema = import_zod2.z.object({
|
|
1144
1149
|
name: import_zod2.z.string(),
|
|
1145
1150
|
mimeType: import_zod2.z.string(),
|
|
@@ -1156,9 +1161,20 @@ var skillRegistryPublishSummarySchema = import_zod2.z.object({
|
|
|
1156
1161
|
description: import_zod2.z.string().optional(),
|
|
1157
1162
|
createdAt: import_zod2.z.string(),
|
|
1158
1163
|
directoryTopicId: import_zod2.z.string(),
|
|
1164
|
+
skillUid: import_zod2.z.number().int().optional(),
|
|
1159
1165
|
directorySequenceNumber: import_zod2.z.number().int().optional(),
|
|
1166
|
+
versionRegistryTopicId: import_zod2.z.string().optional(),
|
|
1160
1167
|
packageTopicId: import_zod2.z.string(),
|
|
1168
|
+
manifestHrl: import_zod2.z.string().optional(),
|
|
1161
1169
|
skillJsonHrl: import_zod2.z.string(),
|
|
1170
|
+
iconHcs1: import_zod2.z.string().optional(),
|
|
1171
|
+
tags: import_zod2.z.array(import_zod2.z.string()).optional(),
|
|
1172
|
+
category: import_zod2.z.string().optional(),
|
|
1173
|
+
featured: import_zod2.z.boolean().optional(),
|
|
1174
|
+
verified: import_zod2.z.boolean().optional(),
|
|
1175
|
+
upvotes: import_zod2.z.number().int().optional(),
|
|
1176
|
+
trustScore: import_zod2.z.number().optional(),
|
|
1177
|
+
trustScores: trustScoreBreakdownSchema.optional(),
|
|
1162
1178
|
files: import_zod2.z.array(skillRegistryFileDescriptorSchema).optional()
|
|
1163
1179
|
}).passthrough();
|
|
1164
1180
|
var skillRegistryListResponseSchema = import_zod2.z.object({
|
|
@@ -1204,9 +1220,15 @@ var skillRegistryJobStatusResponseSchema = import_zod2.z.object({
|
|
|
1204
1220
|
name: import_zod2.z.string(),
|
|
1205
1221
|
version: import_zod2.z.string(),
|
|
1206
1222
|
directoryTopicId: import_zod2.z.string(),
|
|
1223
|
+
skillUid: import_zod2.z.number().int().nullable().optional(),
|
|
1207
1224
|
directorySequenceNumber: import_zod2.z.number().int().nullable().optional(),
|
|
1225
|
+
versionRegistryTopicId: import_zod2.z.string().nullable().optional(),
|
|
1208
1226
|
packageTopicId: import_zod2.z.string().nullable().optional(),
|
|
1227
|
+
manifestHrl: import_zod2.z.string().nullable().optional(),
|
|
1209
1228
|
skillJsonHrl: import_zod2.z.string().nullable().optional(),
|
|
1229
|
+
iconHcs1: import_zod2.z.string().nullable().optional(),
|
|
1230
|
+
tags: import_zod2.z.array(import_zod2.z.string()).nullable().optional(),
|
|
1231
|
+
category: import_zod2.z.string().nullable().optional(),
|
|
1210
1232
|
files: import_zod2.z.array(skillRegistryFileDescriptorSchema).nullable().optional(),
|
|
1211
1233
|
quoteCredits: import_zod2.z.number().nullable().optional(),
|
|
1212
1234
|
quoteUsdCents: import_zod2.z.number().nullable().optional(),
|
|
@@ -1217,6 +1239,31 @@ var skillRegistryJobStatusResponseSchema = import_zod2.z.object({
|
|
|
1217
1239
|
createdAt: import_zod2.z.string(),
|
|
1218
1240
|
updatedAt: import_zod2.z.string()
|
|
1219
1241
|
}).passthrough();
|
|
1242
|
+
var skillRegistryVersionItemSchema = import_zod2.z.object({
|
|
1243
|
+
jobId: import_zod2.z.string(),
|
|
1244
|
+
version: import_zod2.z.string(),
|
|
1245
|
+
createdAt: import_zod2.z.string(),
|
|
1246
|
+
verified: import_zod2.z.boolean().optional()
|
|
1247
|
+
}).passthrough();
|
|
1248
|
+
var skillRegistryVersionsResponseSchema = import_zod2.z.object({
|
|
1249
|
+
name: import_zod2.z.string(),
|
|
1250
|
+
items: import_zod2.z.array(skillRegistryVersionItemSchema)
|
|
1251
|
+
}).passthrough();
|
|
1252
|
+
var skillRegistryMineItemSchema = import_zod2.z.object({
|
|
1253
|
+
name: import_zod2.z.string(),
|
|
1254
|
+
latestVersion: import_zod2.z.string(),
|
|
1255
|
+
latestCreatedAt: import_zod2.z.string(),
|
|
1256
|
+
verified: import_zod2.z.boolean().optional(),
|
|
1257
|
+
iconHcs1: import_zod2.z.string().optional(),
|
|
1258
|
+
versions: import_zod2.z.array(import_zod2.z.string())
|
|
1259
|
+
}).passthrough();
|
|
1260
|
+
var skillRegistryMineResponseSchema = import_zod2.z.object({
|
|
1261
|
+
items: import_zod2.z.array(skillRegistryMineItemSchema)
|
|
1262
|
+
}).passthrough();
|
|
1263
|
+
var skillRegistryMyListResponseSchema = import_zod2.z.object({
|
|
1264
|
+
owned: skillRegistryMineResponseSchema,
|
|
1265
|
+
upvoted: skillRegistryListResponseSchema
|
|
1266
|
+
}).passthrough();
|
|
1220
1267
|
var skillRegistryConfigResponseSchema = import_zod2.z.object({
|
|
1221
1268
|
enabled: import_zod2.z.boolean(),
|
|
1222
1269
|
directoryTopicId: import_zod2.z.string().nullable().optional(),
|
|
@@ -1230,6 +1277,49 @@ var skillRegistryOwnershipResponseSchema = import_zod2.z.object({
|
|
|
1230
1277
|
exists: import_zod2.z.boolean(),
|
|
1231
1278
|
isOwner: import_zod2.z.boolean()
|
|
1232
1279
|
}).passthrough();
|
|
1280
|
+
var skillRegistryVoteStatusResponseSchema = import_zod2.z.object({
|
|
1281
|
+
name: import_zod2.z.string(),
|
|
1282
|
+
upvotes: import_zod2.z.number().int(),
|
|
1283
|
+
hasUpvoted: import_zod2.z.boolean()
|
|
1284
|
+
}).passthrough();
|
|
1285
|
+
var skillVerificationTierSchema = import_zod2.z.enum(["basic", "express"]);
|
|
1286
|
+
var skillVerificationStatusSchema = import_zod2.z.enum([
|
|
1287
|
+
"pending",
|
|
1288
|
+
"approved",
|
|
1289
|
+
"rejected"
|
|
1290
|
+
]);
|
|
1291
|
+
var skillVerificationRequestSchema = import_zod2.z.object({
|
|
1292
|
+
id: import_zod2.z.string(),
|
|
1293
|
+
network: import_zod2.z.union([import_zod2.z.literal("mainnet"), import_zod2.z.literal("testnet")]),
|
|
1294
|
+
name: import_zod2.z.string(),
|
|
1295
|
+
version: import_zod2.z.string().optional(),
|
|
1296
|
+
tier: skillVerificationTierSchema,
|
|
1297
|
+
status: skillVerificationStatusSchema,
|
|
1298
|
+
usdCents: import_zod2.z.number(),
|
|
1299
|
+
creditsCharged: import_zod2.z.number(),
|
|
1300
|
+
creditAccountId: import_zod2.z.string().optional(),
|
|
1301
|
+
requestedBy: import_zod2.z.object({
|
|
1302
|
+
userId: import_zod2.z.string().optional(),
|
|
1303
|
+
accountId: import_zod2.z.string().optional(),
|
|
1304
|
+
email: import_zod2.z.string().optional()
|
|
1305
|
+
}).optional(),
|
|
1306
|
+
approvedBy: import_zod2.z.object({
|
|
1307
|
+
userId: import_zod2.z.string().optional(),
|
|
1308
|
+
email: import_zod2.z.string().optional()
|
|
1309
|
+
}).optional(),
|
|
1310
|
+
approvedAt: import_zod2.z.string().optional(),
|
|
1311
|
+
createdAt: import_zod2.z.string(),
|
|
1312
|
+
updatedAt: import_zod2.z.string()
|
|
1313
|
+
}).passthrough();
|
|
1314
|
+
var skillVerificationRequestCreateResponseSchema = import_zod2.z.object({
|
|
1315
|
+
request: skillVerificationRequestSchema
|
|
1316
|
+
}).passthrough();
|
|
1317
|
+
var skillVerificationStatusResponseSchema = import_zod2.z.object({
|
|
1318
|
+
name: import_zod2.z.string(),
|
|
1319
|
+
verified: import_zod2.z.boolean(),
|
|
1320
|
+
previouslyVerified: import_zod2.z.boolean(),
|
|
1321
|
+
pendingRequest: skillVerificationRequestSchema.nullable().optional()
|
|
1322
|
+
}).passthrough();
|
|
1233
1323
|
|
|
1234
1324
|
// ../../src/utils/is-browser.ts
|
|
1235
1325
|
var isBrowser = typeof window !== "undefined" && typeof window.document !== "undefined";
|
|
@@ -3525,6 +3615,59 @@ async function listSkills(client, params = {}) {
|
|
|
3525
3615
|
"skill registry list response"
|
|
3526
3616
|
);
|
|
3527
3617
|
}
|
|
3618
|
+
async function listSkillVersions(client, params) {
|
|
3619
|
+
const normalizedName = params.name.trim();
|
|
3620
|
+
if (!normalizedName) {
|
|
3621
|
+
throw new Error("name is required");
|
|
3622
|
+
}
|
|
3623
|
+
const query = new URLSearchParams();
|
|
3624
|
+
query.set("name", normalizedName);
|
|
3625
|
+
const raw = await client.requestJson(
|
|
3626
|
+
`/skills/versions?${query.toString()}`,
|
|
3627
|
+
{ method: "GET" }
|
|
3628
|
+
);
|
|
3629
|
+
return client.parseWithSchema(
|
|
3630
|
+
raw,
|
|
3631
|
+
skillRegistryVersionsResponseSchema,
|
|
3632
|
+
"skill registry versions response"
|
|
3633
|
+
);
|
|
3634
|
+
}
|
|
3635
|
+
async function listMySkills(client, params = {}) {
|
|
3636
|
+
const query = new URLSearchParams();
|
|
3637
|
+
if (typeof params.limit === "number" && Number.isFinite(params.limit)) {
|
|
3638
|
+
query.set("limit", String(Math.trunc(params.limit)));
|
|
3639
|
+
}
|
|
3640
|
+
const suffix = query.size > 0 ? `?${query.toString()}` : "";
|
|
3641
|
+
const raw = await client.requestJson(`/skills/mine${suffix}`, {
|
|
3642
|
+
method: "GET"
|
|
3643
|
+
});
|
|
3644
|
+
return client.parseWithSchema(
|
|
3645
|
+
raw,
|
|
3646
|
+
skillRegistryMineResponseSchema,
|
|
3647
|
+
"skill registry mine response"
|
|
3648
|
+
);
|
|
3649
|
+
}
|
|
3650
|
+
async function getMySkillsList(client, params = {}) {
|
|
3651
|
+
const query = new URLSearchParams();
|
|
3652
|
+
if (typeof params.limit === "number" && Number.isFinite(params.limit)) {
|
|
3653
|
+
query.set("limit", String(Math.trunc(params.limit)));
|
|
3654
|
+
}
|
|
3655
|
+
if (params.cursor) {
|
|
3656
|
+
query.set("cursor", params.cursor);
|
|
3657
|
+
}
|
|
3658
|
+
if (params.accountId) {
|
|
3659
|
+
query.set("accountId", params.accountId);
|
|
3660
|
+
}
|
|
3661
|
+
const suffix = query.size > 0 ? `?${query.toString()}` : "";
|
|
3662
|
+
const raw = await client.requestJson(`/skills/my-list${suffix}`, {
|
|
3663
|
+
method: "GET"
|
|
3664
|
+
});
|
|
3665
|
+
return client.parseWithSchema(
|
|
3666
|
+
raw,
|
|
3667
|
+
skillRegistryMyListResponseSchema,
|
|
3668
|
+
"skill registry my list response"
|
|
3669
|
+
);
|
|
3670
|
+
}
|
|
3528
3671
|
async function quoteSkillPublish(client, payload) {
|
|
3529
3672
|
const raw = await client.requestJson("/skills/quote", {
|
|
3530
3673
|
method: "POST",
|
|
@@ -3591,6 +3734,75 @@ async function getSkillOwnership(client, params) {
|
|
|
3591
3734
|
"skill registry ownership response"
|
|
3592
3735
|
);
|
|
3593
3736
|
}
|
|
3737
|
+
async function getSkillVoteStatus(client, params) {
|
|
3738
|
+
const normalizedName = params.name.trim();
|
|
3739
|
+
if (!normalizedName) {
|
|
3740
|
+
throw new Error("name is required");
|
|
3741
|
+
}
|
|
3742
|
+
const query = new URLSearchParams();
|
|
3743
|
+
query.set("name", normalizedName);
|
|
3744
|
+
const raw = await client.requestJson(
|
|
3745
|
+
`/skills/vote?${query.toString()}`,
|
|
3746
|
+
{ method: "GET" }
|
|
3747
|
+
);
|
|
3748
|
+
return client.parseWithSchema(
|
|
3749
|
+
raw,
|
|
3750
|
+
skillRegistryVoteStatusResponseSchema,
|
|
3751
|
+
"skill registry vote status response"
|
|
3752
|
+
);
|
|
3753
|
+
}
|
|
3754
|
+
async function setSkillVote(client, payload) {
|
|
3755
|
+
const normalizedName = payload.name.trim();
|
|
3756
|
+
if (!normalizedName) {
|
|
3757
|
+
throw new Error("name is required");
|
|
3758
|
+
}
|
|
3759
|
+
const raw = await client.requestJson("/skills/vote", {
|
|
3760
|
+
method: "POST",
|
|
3761
|
+
body: { name: normalizedName, upvoted: payload.upvoted },
|
|
3762
|
+
headers: { "content-type": "application/json" }
|
|
3763
|
+
});
|
|
3764
|
+
return client.parseWithSchema(
|
|
3765
|
+
raw,
|
|
3766
|
+
skillRegistryVoteStatusResponseSchema,
|
|
3767
|
+
"skill registry vote status response"
|
|
3768
|
+
);
|
|
3769
|
+
}
|
|
3770
|
+
async function requestSkillVerification(client, payload) {
|
|
3771
|
+
const normalizedName = payload.name.trim();
|
|
3772
|
+
if (!normalizedName) {
|
|
3773
|
+
throw new Error("name is required");
|
|
3774
|
+
}
|
|
3775
|
+
const raw = await client.requestJson(
|
|
3776
|
+
"/skills/verification/request",
|
|
3777
|
+
{
|
|
3778
|
+
method: "POST",
|
|
3779
|
+
body: { name: normalizedName, tier: payload.tier },
|
|
3780
|
+
headers: { "content-type": "application/json" }
|
|
3781
|
+
}
|
|
3782
|
+
);
|
|
3783
|
+
return client.parseWithSchema(
|
|
3784
|
+
raw,
|
|
3785
|
+
skillVerificationRequestCreateResponseSchema,
|
|
3786
|
+
"skill verification request create response"
|
|
3787
|
+
);
|
|
3788
|
+
}
|
|
3789
|
+
async function getSkillVerificationStatus(client, params) {
|
|
3790
|
+
const normalizedName = params.name.trim();
|
|
3791
|
+
if (!normalizedName) {
|
|
3792
|
+
throw new Error("name is required");
|
|
3793
|
+
}
|
|
3794
|
+
const query = new URLSearchParams();
|
|
3795
|
+
query.set("name", normalizedName);
|
|
3796
|
+
const raw = await client.requestJson(
|
|
3797
|
+
`/skills/verification/status?${query.toString()}`,
|
|
3798
|
+
{ method: "GET" }
|
|
3799
|
+
);
|
|
3800
|
+
return client.parseWithSchema(
|
|
3801
|
+
raw,
|
|
3802
|
+
skillVerificationStatusResponseSchema,
|
|
3803
|
+
"skill verification status response"
|
|
3804
|
+
);
|
|
3805
|
+
}
|
|
3594
3806
|
|
|
3595
3807
|
// ../../src/services/registry-broker/client/base-client.ts
|
|
3596
3808
|
var import_buffer4 = require("buffer");
|
|
@@ -3934,6 +4146,15 @@ var RegistryBrokerClient = class _RegistryBrokerClient {
|
|
|
3934
4146
|
async listSkills(options) {
|
|
3935
4147
|
return listSkills(this, options);
|
|
3936
4148
|
}
|
|
4149
|
+
async listSkillVersions(params) {
|
|
4150
|
+
return listSkillVersions(this, params);
|
|
4151
|
+
}
|
|
4152
|
+
async listMySkills(params) {
|
|
4153
|
+
return listMySkills(this, params);
|
|
4154
|
+
}
|
|
4155
|
+
async getMySkillsList(params) {
|
|
4156
|
+
return getMySkillsList(this, params);
|
|
4157
|
+
}
|
|
3937
4158
|
async quoteSkillPublish(payload) {
|
|
3938
4159
|
return quoteSkillPublish(this, payload);
|
|
3939
4160
|
}
|
|
@@ -3946,6 +4167,18 @@ var RegistryBrokerClient = class _RegistryBrokerClient {
|
|
|
3946
4167
|
async getSkillOwnership(params) {
|
|
3947
4168
|
return getSkillOwnership(this, params);
|
|
3948
4169
|
}
|
|
4170
|
+
async getSkillVoteStatus(params) {
|
|
4171
|
+
return getSkillVoteStatus(this, params);
|
|
4172
|
+
}
|
|
4173
|
+
async setSkillVote(payload) {
|
|
4174
|
+
return setSkillVote(this, payload);
|
|
4175
|
+
}
|
|
4176
|
+
async requestSkillVerification(payload) {
|
|
4177
|
+
return requestSkillVerification(this, payload);
|
|
4178
|
+
}
|
|
4179
|
+
async getSkillVerificationStatus(params) {
|
|
4180
|
+
return getSkillVerificationStatus(this, params);
|
|
4181
|
+
}
|
|
3949
4182
|
async adaptersDetailed() {
|
|
3950
4183
|
return adaptersDetailed(this);
|
|
3951
4184
|
}
|