@getsupervisor/agents-studio-sdk 1.41.0-patch.3 → 1.41.0-patch.4
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 +14 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +10 -4
- package/dist/index.d.ts +10 -4
- package/dist/index.js +11 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -51,7 +51,9 @@ __export(index_exports, {
|
|
|
51
51
|
createToolsApi: () => createToolsApi,
|
|
52
52
|
createVoicesApi: () => createVoicesApi,
|
|
53
53
|
createWebhooksApi: () => createWebhooksApi,
|
|
54
|
-
createWorkspacesApi: () => createWorkspacesApi
|
|
54
|
+
createWorkspacesApi: () => createWorkspacesApi,
|
|
55
|
+
isApiErrorBody: () => isApiErrorBody,
|
|
56
|
+
isApiHttpError: () => isApiHttpError
|
|
55
57
|
});
|
|
56
58
|
module.exports = __toCommonJS(index_exports);
|
|
57
59
|
|
|
@@ -66,6 +68,14 @@ var HttpError = class extends Error {
|
|
|
66
68
|
this.name = "HttpError";
|
|
67
69
|
}
|
|
68
70
|
};
|
|
71
|
+
function isApiErrorBody(body) {
|
|
72
|
+
if (!body || typeof body !== "object") return false;
|
|
73
|
+
const candidate = body;
|
|
74
|
+
return typeof candidate.code === "string" && typeof candidate.message === "string";
|
|
75
|
+
}
|
|
76
|
+
function isApiHttpError(err) {
|
|
77
|
+
return err instanceof HttpError && isApiErrorBody(err.body);
|
|
78
|
+
}
|
|
69
79
|
var TimeoutError = class extends Error {
|
|
70
80
|
constructor(ms, url) {
|
|
71
81
|
super(`Timeout after ${ms}ms`);
|
|
@@ -2233,6 +2243,8 @@ function createClient(initialCfg) {
|
|
|
2233
2243
|
createToolsApi,
|
|
2234
2244
|
createVoicesApi,
|
|
2235
2245
|
createWebhooksApi,
|
|
2236
|
-
createWorkspacesApi
|
|
2246
|
+
createWorkspacesApi,
|
|
2247
|
+
isApiErrorBody,
|
|
2248
|
+
isApiHttpError
|
|
2237
2249
|
});
|
|
2238
2250
|
//# sourceMappingURL=index.cjs.map
|