@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.
@@ -1,4 +1,4 @@
1
- import { c as components } from '../api-Bitsm1tl.cjs';
1
+ import { c as components } from '../api-7TVb2cnl.cjs';
2
2
 
3
3
  /**
4
4
  * Billing client for customer self-service operations.
@@ -1,4 +1,4 @@
1
- import { c as components } from '../api-Bitsm1tl.js';
1
+ import { c as components } from '../api-7TVb2cnl.js';
2
2
 
3
3
  /**
4
4
  * Billing client for customer self-service operations.
@@ -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.30.0",
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.36.0",
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 src/billing/index.ts --format esm,cjs --dts --external playwright",
310
- dev: "tsup src/index.ts src/node.ts src/billing/index.ts --format esm,cjs --dts --watch",
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.25.76"
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.10.1",
338
- playwright: "^1.57.0",
339
- tsup: "^8.5.1",
340
- typescript: "^5.9.3",
341
- vitest: "^2.1.9"
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: "3.0.0",
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: "1.35.0",
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,