@siglume/api-sdk 0.7.6 → 0.9.0
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/README.md +34 -3
- package/dist/bin/siglume.cjs +423 -36
- package/dist/bin/siglume.cjs.map +1 -1
- package/dist/bin/siglume.js +423 -36
- package/dist/bin/siglume.js.map +1 -1
- package/dist/cli/index.cjs +423 -36
- package/dist/cli/index.cjs.map +1 -1
- package/dist/cli/index.d.cts +11 -0
- package/dist/cli/index.d.ts +11 -0
- package/dist/cli/index.js +423 -36
- package/dist/cli/index.js.map +1 -1
- package/dist/index.cjs +35 -16
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +13 -0
- package/dist/index.d.ts +13 -0
- package/dist/index.js +35 -16
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1663,6 +1663,9 @@ function parseListing(data) {
|
|
|
1663
1663
|
short_description: stringOrNull2(data.short_description),
|
|
1664
1664
|
docs_url: stringOrNull2(data.docs_url),
|
|
1665
1665
|
support_contact: stringOrNull2(data.support_contact),
|
|
1666
|
+
seller_display_name: stringOrNull2(data.seller_display_name),
|
|
1667
|
+
seller_homepage_url: stringOrNull2(data.seller_homepage_url),
|
|
1668
|
+
seller_social_url: stringOrNull2(data.seller_social_url),
|
|
1666
1669
|
review_status: stringOrNull2(data.review_status),
|
|
1667
1670
|
review_note: stringOrNull2(data.review_note),
|
|
1668
1671
|
submission_blockers: Array.isArray(data.submission_blockers) ? data.submission_blockers.filter((item) => typeof item === "string") : [],
|
|
@@ -2879,6 +2882,13 @@ var init_client = __esm({
|
|
|
2879
2882
|
if (options.runtime_validation) {
|
|
2880
2883
|
payload.runtime_validation = coerceMapping(options.runtime_validation, "runtime_validation");
|
|
2881
2884
|
}
|
|
2885
|
+
if (options.oauth_credentials) {
|
|
2886
|
+
payload.oauth_credentials = Array.isArray(options.oauth_credentials) ? {
|
|
2887
|
+
items: options.oauth_credentials.map(
|
|
2888
|
+
(item, index) => coerceMapping(item, `oauth_credentials[${index}]`)
|
|
2889
|
+
)
|
|
2890
|
+
} : coerceMapping(options.oauth_credentials, "oauth_credentials");
|
|
2891
|
+
}
|
|
2882
2892
|
if (options.metadata) {
|
|
2883
2893
|
payload.metadata = coerceMapping(options.metadata, "metadata");
|
|
2884
2894
|
}
|
|
@@ -2897,6 +2907,8 @@ var init_client = __esm({
|
|
|
2897
2907
|
"docs_url",
|
|
2898
2908
|
"documentation_url",
|
|
2899
2909
|
"support_contact",
|
|
2910
|
+
"seller_homepage_url",
|
|
2911
|
+
"seller_social_url",
|
|
2900
2912
|
"jurisdiction",
|
|
2901
2913
|
"price_model",
|
|
2902
2914
|
"price_value_minor",
|
|
@@ -2912,10 +2924,14 @@ var init_client = __esm({
|
|
|
2912
2924
|
}
|
|
2913
2925
|
const docsUrl = String(manifestPayload.docs_url ?? manifestPayload.documentation_url ?? "").trim();
|
|
2914
2926
|
const supportContact = String(manifestPayload.support_contact ?? "").trim();
|
|
2915
|
-
|
|
2927
|
+
const sellerHomepageUrl = String(manifestPayload.seller_homepage_url ?? "").trim();
|
|
2928
|
+
const sellerSocialUrl = String(manifestPayload.seller_social_url ?? "").trim();
|
|
2929
|
+
if (docsUrl || supportContact || sellerHomepageUrl || sellerSocialUrl) {
|
|
2916
2930
|
const publisherIdentity = {
|
|
2917
2931
|
documentation_url: docsUrl || null,
|
|
2918
|
-
support_contact: supportContact || null
|
|
2932
|
+
support_contact: supportContact || null,
|
|
2933
|
+
seller_homepage_url: sellerHomepageUrl || null,
|
|
2934
|
+
seller_social_url: sellerSocialUrl || null
|
|
2919
2935
|
};
|
|
2920
2936
|
payload.publisher_identity = publisherIdentity;
|
|
2921
2937
|
payload.legal = { publisher_identity: publisherIdentity };
|
|
@@ -2929,36 +2945,39 @@ var init_client = __esm({
|
|
|
2929
2945
|
return {
|
|
2930
2946
|
listing_id,
|
|
2931
2947
|
status: String(data.status ?? "draft"),
|
|
2948
|
+
registration_mode: stringOrNull2(data.registration_mode),
|
|
2949
|
+
listing_status: stringOrNull2(data.listing_status),
|
|
2932
2950
|
auto_manifest: toRecord2(data.auto_manifest),
|
|
2933
2951
|
confidence: toRecord2(data.confidence),
|
|
2934
2952
|
validation_report: toRecord2(data.validation_report),
|
|
2953
|
+
oauth_status: toRecord2(data.oauth_status),
|
|
2935
2954
|
review_url: stringOrNull2(data.review_url),
|
|
2936
2955
|
trace_id: meta.trace_id,
|
|
2937
2956
|
request_id: meta.request_id
|
|
2938
2957
|
};
|
|
2939
2958
|
}
|
|
2940
2959
|
async confirm_registration(listing_id, options = {}) {
|
|
2941
|
-
const
|
|
2942
|
-
const manifestPayload = options.manifest ? coerceMapping(options.manifest, "manifest") : pending?.manifest ?? {};
|
|
2943
|
-
const toolManualPayload = options.tool_manual ? coerceMapping(options.tool_manual, "tool_manual") : pending?.tool_manual ?? {};
|
|
2944
|
-
const overrides = {};
|
|
2945
|
-
for (const fieldName of ["name", "job_to_be_done"]) {
|
|
2946
|
-
if (manifestPayload[fieldName]) {
|
|
2947
|
-
overrides[fieldName] = manifestPayload[fieldName];
|
|
2948
|
-
}
|
|
2949
|
-
}
|
|
2950
|
-
if (Object.keys(toolManualPayload).length > 0) {
|
|
2951
|
-
overrides.tool_manual = toolManualPayload;
|
|
2952
|
-
}
|
|
2960
|
+
const { version_bump: versionBump } = options;
|
|
2953
2961
|
const payload = { approved: true };
|
|
2954
|
-
if (
|
|
2955
|
-
|
|
2962
|
+
if (versionBump !== void 0) {
|
|
2963
|
+
const allowed = ["patch", "minor", "major"];
|
|
2964
|
+
if (!allowed.includes(versionBump)) {
|
|
2965
|
+
throw new Error(
|
|
2966
|
+
`version_bump must be one of ${JSON.stringify(allowed)}, got ${JSON.stringify(versionBump)}`
|
|
2967
|
+
);
|
|
2968
|
+
}
|
|
2969
|
+
payload.version_bump = versionBump;
|
|
2956
2970
|
}
|
|
2957
2971
|
const [data, meta] = await this.request("POST", `/market/capabilities/${listing_id}/confirm-auto-register`, { json_body: payload });
|
|
2958
2972
|
this.pendingConfirmations.delete(listing_id);
|
|
2973
|
+
const checklist = isRecord2(data.checklist) ? Object.fromEntries(
|
|
2974
|
+
Object.entries(data.checklist).map(([key, value]) => [key, Boolean(value)])
|
|
2975
|
+
) : {};
|
|
2959
2976
|
return {
|
|
2960
2977
|
listing_id: String(data.listing_id ?? listing_id),
|
|
2961
2978
|
status: String(data.status ?? ""),
|
|
2979
|
+
message: stringOrNull2(data.message),
|
|
2980
|
+
checklist,
|
|
2962
2981
|
release: toRecord2(data.release),
|
|
2963
2982
|
quality: parseRegistrationQuality(toRecord2(data.quality)),
|
|
2964
2983
|
trace_id: meta.trace_id,
|