@modelrelay/sdk 4.0.0 → 5.3.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 +19 -64
- package/dist/api-7TVb2cnl.d.cts +5319 -0
- package/dist/api-7TVb2cnl.d.ts +5319 -0
- package/dist/{api-CzFaWgs_.d.cts → api-B9x3HA3Z.d.cts} +10 -13
- package/dist/{api-CzFaWgs_.d.ts → api-B9x3HA3Z.d.ts} +10 -13
- package/dist/api-BRAJe_xm.d.cts +5315 -0
- package/dist/api-BRAJe_xm.d.ts +5315 -0
- package/dist/{api-jqOwvH6O.d.cts → api-HVh8Lusf.d.cts} +2650 -2111
- package/dist/{api-jqOwvH6O.d.ts → api-HVh8Lusf.d.ts} +2650 -2111
- package/dist/billing/index.d.cts +1 -1
- package/dist/billing/index.d.ts +1 -1
- package/dist/{chunk-EMQKOEF3.js → chunk-BL7GWXRZ.js} +1 -1
- package/dist/{chunk-ADQ74R7T.js → chunk-G5H7EY4F.js} +16 -14
- package/dist/{chunk-LW6SC7NQ.js → chunk-HLJAMT7F.js} +1 -1
- package/dist/{chunk-ZBQKY2W2.js → chunk-LZDGY24E.js} +2 -63
- package/dist/chunk-OJFVI3QJ.js +1133 -0
- package/dist/chunk-Z6R4G2TU.js +1133 -0
- package/dist/index.cjs +192 -504
- package/dist/index.d.cts +179 -623
- package/dist/index.d.ts +179 -623
- package/dist/index.js +185 -496
- package/dist/node.cjs +155 -2
- package/dist/node.d.cts +9 -0
- package/dist/node.d.ts +9 -0
- package/dist/node.js +155 -2
- package/dist/{tools-DAqAFZ8F.d.ts → tools-Db-F5rIL.d.cts} +6 -9
- package/dist/{tools-DAqAFZ8F.d.cts → tools-Db-F5rIL.d.ts} +6 -9
- package/package.json +1 -1
- package/dist/tools-Cnl2MgVa.d.cts +0 -1174
- package/dist/tools-Cnl2MgVa.d.ts +0 -1174
package/dist/billing/index.d.cts
CHANGED
package/dist/billing/index.d.ts
CHANGED
|
@@ -282,7 +282,7 @@ async function parseErrorResponse(response, retries) {
|
|
|
282
282
|
// package.json
|
|
283
283
|
var package_default = {
|
|
284
284
|
name: "@modelrelay/sdk",
|
|
285
|
-
version: "1.
|
|
285
|
+
version: "1.27.0",
|
|
286
286
|
description: "TypeScript SDK for the ModelRelay API",
|
|
287
287
|
type: "module",
|
|
288
288
|
main: "dist/index.cjs",
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __export = (target, all) => {
|
|
3
|
+
for (var name in all)
|
|
4
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
5
|
+
};
|
|
6
|
+
|
|
1
7
|
// src/errors.ts
|
|
2
8
|
var ErrorCodes = {
|
|
3
9
|
NOT_FOUND: "NOT_FOUND",
|
|
@@ -276,7 +282,7 @@ async function parseErrorResponse(response, retries) {
|
|
|
276
282
|
// package.json
|
|
277
283
|
var package_default = {
|
|
278
284
|
name: "@modelrelay/sdk",
|
|
279
|
-
version: "1.
|
|
285
|
+
version: "1.28.0",
|
|
280
286
|
description: "TypeScript SDK for the ModelRelay API",
|
|
281
287
|
type: "module",
|
|
282
288
|
main: "dist/index.cjs",
|
|
@@ -288,11 +294,6 @@ var package_default = {
|
|
|
288
294
|
import: "./dist/index.js",
|
|
289
295
|
require: "./dist/index.cjs"
|
|
290
296
|
},
|
|
291
|
-
"./billing": {
|
|
292
|
-
types: "./dist/billing/index.d.ts",
|
|
293
|
-
import: "./dist/billing/index.js",
|
|
294
|
-
require: "./dist/billing/index.cjs"
|
|
295
|
-
},
|
|
296
297
|
"./node": {
|
|
297
298
|
types: "./dist/node.d.ts",
|
|
298
299
|
import: "./dist/node.js",
|
|
@@ -306,8 +307,8 @@ var package_default = {
|
|
|
306
307
|
"dist"
|
|
307
308
|
],
|
|
308
309
|
scripts: {
|
|
309
|
-
build: "tsup src/index.ts src/node.ts
|
|
310
|
-
dev: "tsup src/index.ts src/node.ts
|
|
310
|
+
build: "tsup src/index.ts src/node.ts --format esm,cjs --dts --external playwright",
|
|
311
|
+
dev: "tsup src/index.ts src/node.ts --format esm,cjs --dts --watch",
|
|
311
312
|
lint: "tsc --noEmit --project tsconfig.lint.json",
|
|
312
313
|
test: "vitest run",
|
|
313
314
|
"generate:types": "openapi-typescript ../../api/openapi/api.json -o src/generated/api.ts"
|
|
@@ -322,7 +323,7 @@ var package_default = {
|
|
|
322
323
|
license: "Apache-2.0",
|
|
323
324
|
dependencies: {
|
|
324
325
|
"fast-json-patch": "^3.1.1",
|
|
325
|
-
zod: "^3.
|
|
326
|
+
zod: "^3.23.0"
|
|
326
327
|
},
|
|
327
328
|
peerDependencies: {
|
|
328
329
|
playwright: ">=1.40.0"
|
|
@@ -334,11 +335,11 @@ var package_default = {
|
|
|
334
335
|
},
|
|
335
336
|
devDependencies: {
|
|
336
337
|
"@types/node": "^25.0.3",
|
|
337
|
-
"openapi-typescript": "^7.
|
|
338
|
-
playwright: "^1.
|
|
339
|
-
tsup: "^8.
|
|
340
|
-
typescript: "^5.
|
|
341
|
-
vitest: "^2.1.
|
|
338
|
+
"openapi-typescript": "^7.4.4",
|
|
339
|
+
playwright: "^1.49.0",
|
|
340
|
+
tsup: "^8.2.4",
|
|
341
|
+
typescript: "^5.6.3",
|
|
342
|
+
vitest: "^2.1.4"
|
|
342
343
|
}
|
|
343
344
|
};
|
|
344
345
|
|
|
@@ -1121,6 +1122,7 @@ async function executeWithRetry(registry, toolCalls, options = {}) {
|
|
|
1121
1122
|
}
|
|
1122
1123
|
|
|
1123
1124
|
export {
|
|
1125
|
+
__export,
|
|
1124
1126
|
ErrorCodes,
|
|
1125
1127
|
ModelRelayError,
|
|
1126
1128
|
ConfigError,
|
|
@@ -220,7 +220,7 @@ async function parseErrorResponse(response, retries) {
|
|
|
220
220
|
// package.json
|
|
221
221
|
var package_default = {
|
|
222
222
|
name: "@modelrelay/sdk",
|
|
223
|
-
version: "
|
|
223
|
+
version: "4.0.1",
|
|
224
224
|
description: "TypeScript SDK for the ModelRelay API",
|
|
225
225
|
type: "module",
|
|
226
226
|
main: "dist/index.cjs",
|
|
@@ -10,15 +10,7 @@ var ErrorCodes = {
|
|
|
10
10
|
SERVICE_UNAVAILABLE: "SERVICE_UNAVAILABLE",
|
|
11
11
|
INVALID_INPUT: "INVALID_INPUT",
|
|
12
12
|
PAYMENT_REQUIRED: "PAYMENT_REQUIRED",
|
|
13
|
-
METHOD_NOT_ALLOWED: "METHOD_NOT_ALLOWED"
|
|
14
|
-
/** Identity provider + subject required for identity-based auth. */
|
|
15
|
-
IDENTITY_REQUIRED: "IDENTITY_REQUIRED",
|
|
16
|
-
/** Auto-provision disabled for the project. */
|
|
17
|
-
AUTO_PROVISION_DISABLED: "AUTO_PROVISION_DISABLED",
|
|
18
|
-
/** Auto-provision tier misconfigured for the project. */
|
|
19
|
-
AUTO_PROVISION_MISCONFIGURED: "AUTO_PROVISION_MISCONFIGURED",
|
|
20
|
-
/** Email required for auto-provisioning a new customer. */
|
|
21
|
-
EMAIL_REQUIRED: "EMAIL_REQUIRED"
|
|
13
|
+
METHOD_NOT_ALLOWED: "METHOD_NOT_ALLOWED"
|
|
22
14
|
};
|
|
23
15
|
var ModelRelayError = class extends Error {
|
|
24
16
|
constructor(message, opts) {
|
|
@@ -106,39 +98,6 @@ var APIError = class extends ModelRelayError {
|
|
|
106
98
|
isUnavailable() {
|
|
107
99
|
return this.code === ErrorCodes.SERVICE_UNAVAILABLE;
|
|
108
100
|
}
|
|
109
|
-
/**
|
|
110
|
-
* Returns true if the error indicates identity is missing/invalid for identity-based auth.
|
|
111
|
-
*/
|
|
112
|
-
isIdentityRequired() {
|
|
113
|
-
return this.code === ErrorCodes.IDENTITY_REQUIRED;
|
|
114
|
-
}
|
|
115
|
-
/**
|
|
116
|
-
* Returns true if auto-provisioning is disabled for the project.
|
|
117
|
-
* To resolve: configure customer auto-provisioning on the project (select a default tier).
|
|
118
|
-
*/
|
|
119
|
-
isAutoProvisionDisabled() {
|
|
120
|
-
return this.code === ErrorCodes.AUTO_PROVISION_DISABLED;
|
|
121
|
-
}
|
|
122
|
-
/**
|
|
123
|
-
* Returns true if email is required for auto-provisioning a new customer.
|
|
124
|
-
* To resolve: provide the 'email' field in your frontend token request.
|
|
125
|
-
*/
|
|
126
|
-
isEmailRequired() {
|
|
127
|
-
return this.code === ErrorCodes.EMAIL_REQUIRED;
|
|
128
|
-
}
|
|
129
|
-
/**
|
|
130
|
-
* Returns true if auto-provisioning is misconfigured for the project.
|
|
131
|
-
* To resolve: ensure the configured auto-provision tier exists and belongs to the project.
|
|
132
|
-
*/
|
|
133
|
-
isAutoProvisionMisconfigured() {
|
|
134
|
-
return this.code === ErrorCodes.AUTO_PROVISION_MISCONFIGURED;
|
|
135
|
-
}
|
|
136
|
-
/**
|
|
137
|
-
* Returns true if this is a customer provisioning error (identity not found + auto-provision disabled/misconfigured, or email required).
|
|
138
|
-
*/
|
|
139
|
-
isProvisioningError() {
|
|
140
|
-
return this.isAutoProvisionDisabled() || this.isAutoProvisionMisconfigured() || this.isEmailRequired();
|
|
141
|
-
}
|
|
142
101
|
};
|
|
143
102
|
var WorkflowValidationError = class extends ModelRelayError {
|
|
144
103
|
constructor(opts) {
|
|
@@ -175,21 +134,6 @@ var PathEscapeError = class extends ModelRelayError {
|
|
|
175
134
|
this.resolvedPath = opts.resolvedPath;
|
|
176
135
|
}
|
|
177
136
|
};
|
|
178
|
-
function isEmailRequired(err) {
|
|
179
|
-
return err instanceof APIError && err.isEmailRequired();
|
|
180
|
-
}
|
|
181
|
-
function isIdentityRequired(err) {
|
|
182
|
-
return err instanceof APIError && err.isIdentityRequired();
|
|
183
|
-
}
|
|
184
|
-
function isAutoProvisionDisabled(err) {
|
|
185
|
-
return err instanceof APIError && err.isAutoProvisionDisabled();
|
|
186
|
-
}
|
|
187
|
-
function isAutoProvisionMisconfigured(err) {
|
|
188
|
-
return err instanceof APIError && err.isAutoProvisionMisconfigured();
|
|
189
|
-
}
|
|
190
|
-
function isProvisioningError(err) {
|
|
191
|
-
return err instanceof APIError && err.isProvisioningError();
|
|
192
|
-
}
|
|
193
137
|
async function parseErrorResponse(response, retries) {
|
|
194
138
|
const requestId = response.headers.get("X-ModelRelay-Request-Id") || response.headers.get("X-Request-Id") || void 0;
|
|
195
139
|
const fallbackMessage = response.statusText || "Request failed";
|
|
@@ -276,7 +220,7 @@ async function parseErrorResponse(response, retries) {
|
|
|
276
220
|
// package.json
|
|
277
221
|
var package_default = {
|
|
278
222
|
name: "@modelrelay/sdk",
|
|
279
|
-
version: "
|
|
223
|
+
version: "5.3.0",
|
|
280
224
|
description: "TypeScript SDK for the ModelRelay API",
|
|
281
225
|
type: "module",
|
|
282
226
|
main: "dist/index.cjs",
|
|
@@ -1131,11 +1075,6 @@ export {
|
|
|
1131
1075
|
WorkflowValidationError,
|
|
1132
1076
|
ToolArgumentError,
|
|
1133
1077
|
PathEscapeError,
|
|
1134
|
-
isEmailRequired,
|
|
1135
|
-
isIdentityRequired,
|
|
1136
|
-
isAutoProvisionDisabled,
|
|
1137
|
-
isAutoProvisionMisconfigured,
|
|
1138
|
-
isProvisioningError,
|
|
1139
1078
|
parseErrorResponse,
|
|
1140
1079
|
SDK_VERSION,
|
|
1141
1080
|
DEFAULT_BASE_URL,
|