@deeprelay/sdk 0.1.2 → 0.2.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.
Files changed (46) hide show
  1. package/.openapi-generator/FILES +0 -8
  2. package/README.md +3 -6
  3. package/dist/apis/BillingApi.d.ts +14 -0
  4. package/dist/apis/BillingApi.js +43 -0
  5. package/dist/apis/index.d.ts +0 -1
  6. package/dist/apis/index.js +0 -1
  7. package/dist/esm/apis/BillingApi.d.ts +14 -0
  8. package/dist/esm/apis/BillingApi.js +43 -0
  9. package/dist/esm/apis/index.d.ts +0 -1
  10. package/dist/esm/apis/index.js +0 -1
  11. package/dist/esm/models/index.d.ts +0 -3
  12. package/dist/esm/models/index.js +0 -3
  13. package/dist/esm/runtime.js +1 -1
  14. package/dist/models/index.d.ts +0 -3
  15. package/dist/models/index.js +0 -3
  16. package/dist/runtime.js +1 -1
  17. package/docs/BillingApi.md +68 -0
  18. package/package.json +1 -1
  19. package/src/apis/BillingApi.ts +46 -0
  20. package/src/apis/index.ts +0 -1
  21. package/src/models/index.ts +0 -3
  22. package/src/runtime.ts +1 -1
  23. package/dist/apis/OperationsApi.d.ts +0 -33
  24. package/dist/apis/OperationsApi.js +0 -79
  25. package/dist/esm/apis/OperationsApi.d.ts +0 -33
  26. package/dist/esm/apis/OperationsApi.js +0 -75
  27. package/dist/esm/models/Operation.d.ts +0 -107
  28. package/dist/esm/models/Operation.js +0 -86
  29. package/dist/esm/models/OperationError.d.ts +0 -38
  30. package/dist/esm/models/OperationError.js +0 -43
  31. package/dist/esm/models/OperationResult.d.ts +0 -44
  32. package/dist/esm/models/OperationResult.js +0 -45
  33. package/dist/models/Operation.d.ts +0 -107
  34. package/dist/models/Operation.js +0 -94
  35. package/dist/models/OperationError.d.ts +0 -38
  36. package/dist/models/OperationError.js +0 -50
  37. package/dist/models/OperationResult.d.ts +0 -44
  38. package/dist/models/OperationResult.js +0 -52
  39. package/docs/Operation.md +0 -52
  40. package/docs/OperationError.md +0 -36
  41. package/docs/OperationResult.md +0 -39
  42. package/docs/OperationsApi.md +0 -80
  43. package/src/apis/OperationsApi.ts +0 -89
  44. package/src/models/Operation.ts +0 -179
  45. package/src/models/OperationError.ts +0 -73
  46. package/src/models/OperationResult.ts +0 -81
@@ -31,10 +31,6 @@ docs/ModelPricing.md
31
31
  docs/ModelRate.md
32
32
  docs/OpenAIErrorEnvelope.md
33
33
  docs/OpenAIErrorEnvelopeError.md
34
- docs/Operation.md
35
- docs/OperationError.md
36
- docs/OperationResult.md
37
- docs/OperationsApi.md
38
34
  docs/PeakWindow.md
39
35
  docs/Problem.md
40
36
  docs/RefereeStatus.md
@@ -65,7 +61,6 @@ package.json
65
61
  src/apis/BillingApi.ts
66
62
  src/apis/InferenceApi.ts
67
63
  src/apis/MetaApi.ts
68
- src/apis/OperationsApi.ts
69
64
  src/apis/UsageApi.ts
70
65
  src/apis/WebhooksApi.ts
71
66
  src/apis/index.ts
@@ -97,9 +92,6 @@ src/models/ModelPricing.ts
97
92
  src/models/ModelRate.ts
98
93
  src/models/OpenAIErrorEnvelope.ts
99
94
  src/models/OpenAIErrorEnvelopeError.ts
100
- src/models/Operation.ts
101
- src/models/OperationError.ts
102
- src/models/OperationResult.ts
103
95
  src/models/PeakWindow.ts
104
96
  src/models/Problem.ts
105
97
  src/models/RefereeStatus.ts
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # @deeprelay/sdk@0.1.2
1
+ # @deeprelay/sdk@0.2.0
2
2
 
3
3
  A TypeScript SDK client for the api.deeprelay.ai API.
4
4
 
@@ -57,6 +57,7 @@ All URIs are relative to *https://api.deeprelay.ai/v1*
57
57
  *BillingApi* | [**createCryptoDeposit**](docs/BillingApi.md#createcryptodepositoperation) | **POST** /billing/deposits/crypto | Create a stablecoin deposit
58
58
  *BillingApi* | [**createSubscriptionCheckout**](docs/BillingApi.md#createsubscriptioncheckout) | **POST** /billing/subscription/checkout | Start a subscription checkout session
59
59
  *BillingApi* | [**createSubscriptionPortal**](docs/BillingApi.md#createsubscriptionportal) | **POST** /billing/subscription/portal | Open the billing portal to cancel or manage the subscription
60
+ *BillingApi* | [**deleteSpendingLimit**](docs/BillingApi.md#deletespendinglimit) | **DELETE** /billing/spending-limit | Clear the org spending limit
60
61
  *BillingApi* | [**getBalance**](docs/BillingApi.md#getbalance) | **GET** /billing/balance | Get the org credit balance
61
62
  *BillingApi* | [**getDeposit**](docs/BillingApi.md#getdeposit) | **GET** /billing/deposits/{id} | Get one stablecoin deposit
62
63
  *BillingApi* | [**getReferral**](docs/BillingApi.md#getreferral) | **GET** /referrals | Get the org referral code, invite link, terms and stats
@@ -77,7 +78,6 @@ All URIs are relative to *https://api.deeprelay.ai/v1*
77
78
  *InferenceApi* | [**listVideos**](docs/InferenceApi.md#listvideos) | **GET** /videos | List video generation jobs
78
79
  *MetaApi* | [**getHealth**](docs/MetaApi.md#gethealth) | **GET** /health | Liveness probe
79
80
  *MetaApi* | [**getOpenApiSpec**](docs/MetaApi.md#getopenapispec) | **GET** /openapi.json | OpenAPI 3.1 specification
80
- *OperationsApi* | [**getOperation**](docs/OperationsApi.md#getoperation) | **GET** /operations/{id} | Get an async operation status
81
81
  *UsageApi* | [**listUsage**](docs/UsageApi.md#listusage) | **GET** /usage | Time-bucketed usage
82
82
  *WebhooksApi* | [**createWebhookEndpoint**](docs/WebhooksApi.md#createwebhookendpointoperation) | **POST** /webhook-endpoints | Create a webhook endpoint
83
83
  *WebhooksApi* | [**deleteWebhookEndpoint**](docs/WebhooksApi.md#deletewebhookendpoint) | **DELETE** /webhook-endpoints/{id} | Delete a webhook endpoint
@@ -114,9 +114,6 @@ All URIs are relative to *https://api.deeprelay.ai/v1*
114
114
  - [ModelRate](docs/ModelRate.md)
115
115
  - [OpenAIErrorEnvelope](docs/OpenAIErrorEnvelope.md)
116
116
  - [OpenAIErrorEnvelopeError](docs/OpenAIErrorEnvelopeError.md)
117
- - [Operation](docs/Operation.md)
118
- - [OperationError](docs/OperationError.md)
119
- - [OperationResult](docs/OperationResult.md)
120
117
  - [PeakWindow](docs/PeakWindow.md)
121
118
  - [Problem](docs/Problem.md)
122
119
  - [RefereeStatus](docs/RefereeStatus.md)
@@ -159,7 +156,7 @@ and is automatically generated by the
159
156
  [OpenAPI Generator](https://openapi-generator.tech) project:
160
157
 
161
158
  - API version: `1.0.0`
162
- - Package version: `0.1.2`
159
+ - Package version: `0.2.0`
163
160
  - Generator version: `7.24.0`
164
161
  - Build package: `org.openapitools.codegen.languages.TypeScriptFetchClientCodegen`
165
162
 
@@ -83,6 +83,20 @@ export declare class BillingApi extends runtime.BaseAPI {
83
83
  * Open the billing portal to cancel or manage the subscription
84
84
  */
85
85
  createSubscriptionPortal(requestParameters?: CreateSubscriptionPortalRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SubscriptionPortalSession>;
86
+ /**
87
+ * Creates request options for deleteSpendingLimit without sending the request
88
+ */
89
+ deleteSpendingLimitRequestOpts(): Promise<runtime.RequestOpts>;
90
+ /**
91
+ * Removes the organization\'s monthly spending limit and daily spend cap entirely. Requires the `billing:write` scope AND org-admin privileges (a non-admin member gets 403). Returns 404 when no limit is configured. This is the only way to remove a limit through the API, because `PUT` floors `monthly_limit_dollars` at 1.00 and so cannot express \"no limit\".
92
+ * Clear the org spending limit
93
+ */
94
+ deleteSpendingLimitRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
95
+ /**
96
+ * Removes the organization\'s monthly spending limit and daily spend cap entirely. Requires the `billing:write` scope AND org-admin privileges (a non-admin member gets 403). Returns 404 when no limit is configured. This is the only way to remove a limit through the API, because `PUT` floors `monthly_limit_dollars` at 1.00 and so cannot express \"no limit\".
97
+ * Clear the org spending limit
98
+ */
99
+ deleteSpendingLimit(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
86
100
  /**
87
101
  * Creates request options for getBalance without sending the request
88
102
  */
@@ -181,6 +181,49 @@ class BillingApi extends runtime.BaseAPI {
181
181
  return yield response.value();
182
182
  });
183
183
  }
184
+ /**
185
+ * Creates request options for deleteSpendingLimit without sending the request
186
+ */
187
+ deleteSpendingLimitRequestOpts() {
188
+ return __awaiter(this, void 0, void 0, function* () {
189
+ const queryParameters = {};
190
+ const headerParameters = {};
191
+ if (this.configuration && this.configuration.accessToken) {
192
+ const token = this.configuration.accessToken;
193
+ const tokenString = yield token("bearerAuth", []);
194
+ if (tokenString) {
195
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
196
+ }
197
+ }
198
+ let urlPath = `/billing/spending-limit`;
199
+ return {
200
+ path: urlPath,
201
+ method: 'DELETE',
202
+ headers: headerParameters,
203
+ query: queryParameters,
204
+ };
205
+ });
206
+ }
207
+ /**
208
+ * Removes the organization\'s monthly spending limit and daily spend cap entirely. Requires the `billing:write` scope AND org-admin privileges (a non-admin member gets 403). Returns 404 when no limit is configured. This is the only way to remove a limit through the API, because `PUT` floors `monthly_limit_dollars` at 1.00 and so cannot express \"no limit\".
209
+ * Clear the org spending limit
210
+ */
211
+ deleteSpendingLimitRaw(initOverrides) {
212
+ return __awaiter(this, void 0, void 0, function* () {
213
+ const requestOptions = yield this.deleteSpendingLimitRequestOpts();
214
+ const response = yield this.request(requestOptions, initOverrides);
215
+ return new runtime.VoidApiResponse(response);
216
+ });
217
+ }
218
+ /**
219
+ * Removes the organization\'s monthly spending limit and daily spend cap entirely. Requires the `billing:write` scope AND org-admin privileges (a non-admin member gets 403). Returns 404 when no limit is configured. This is the only way to remove a limit through the API, because `PUT` floors `monthly_limit_dollars` at 1.00 and so cannot express \"no limit\".
220
+ * Clear the org spending limit
221
+ */
222
+ deleteSpendingLimit(initOverrides) {
223
+ return __awaiter(this, void 0, void 0, function* () {
224
+ yield this.deleteSpendingLimitRaw(initOverrides);
225
+ });
226
+ }
184
227
  /**
185
228
  * Creates request options for getBalance without sending the request
186
229
  */
@@ -1,6 +1,5 @@
1
1
  export * from './BillingApi';
2
2
  export * from './InferenceApi';
3
3
  export * from './MetaApi';
4
- export * from './OperationsApi';
5
4
  export * from './UsageApi';
6
5
  export * from './WebhooksApi';
@@ -19,6 +19,5 @@ Object.defineProperty(exports, "__esModule", { value: true });
19
19
  __exportStar(require("./BillingApi"), exports);
20
20
  __exportStar(require("./InferenceApi"), exports);
21
21
  __exportStar(require("./MetaApi"), exports);
22
- __exportStar(require("./OperationsApi"), exports);
23
22
  __exportStar(require("./UsageApi"), exports);
24
23
  __exportStar(require("./WebhooksApi"), exports);
@@ -83,6 +83,20 @@ export declare class BillingApi extends runtime.BaseAPI {
83
83
  * Open the billing portal to cancel or manage the subscription
84
84
  */
85
85
  createSubscriptionPortal(requestParameters?: CreateSubscriptionPortalRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SubscriptionPortalSession>;
86
+ /**
87
+ * Creates request options for deleteSpendingLimit without sending the request
88
+ */
89
+ deleteSpendingLimitRequestOpts(): Promise<runtime.RequestOpts>;
90
+ /**
91
+ * Removes the organization\'s monthly spending limit and daily spend cap entirely. Requires the `billing:write` scope AND org-admin privileges (a non-admin member gets 403). Returns 404 when no limit is configured. This is the only way to remove a limit through the API, because `PUT` floors `monthly_limit_dollars` at 1.00 and so cannot express \"no limit\".
92
+ * Clear the org spending limit
93
+ */
94
+ deleteSpendingLimitRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
95
+ /**
96
+ * Removes the organization\'s monthly spending limit and daily spend cap entirely. Requires the `billing:write` scope AND org-admin privileges (a non-admin member gets 403). Returns 404 when no limit is configured. This is the only way to remove a limit through the API, because `PUT` floors `monthly_limit_dollars` at 1.00 and so cannot express \"no limit\".
97
+ * Clear the org spending limit
98
+ */
99
+ deleteSpendingLimit(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
86
100
  /**
87
101
  * Creates request options for getBalance without sending the request
88
102
  */
@@ -178,6 +178,49 @@ export class BillingApi extends runtime.BaseAPI {
178
178
  return yield response.value();
179
179
  });
180
180
  }
181
+ /**
182
+ * Creates request options for deleteSpendingLimit without sending the request
183
+ */
184
+ deleteSpendingLimitRequestOpts() {
185
+ return __awaiter(this, void 0, void 0, function* () {
186
+ const queryParameters = {};
187
+ const headerParameters = {};
188
+ if (this.configuration && this.configuration.accessToken) {
189
+ const token = this.configuration.accessToken;
190
+ const tokenString = yield token("bearerAuth", []);
191
+ if (tokenString) {
192
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
193
+ }
194
+ }
195
+ let urlPath = `/billing/spending-limit`;
196
+ return {
197
+ path: urlPath,
198
+ method: 'DELETE',
199
+ headers: headerParameters,
200
+ query: queryParameters,
201
+ };
202
+ });
203
+ }
204
+ /**
205
+ * Removes the organization\'s monthly spending limit and daily spend cap entirely. Requires the `billing:write` scope AND org-admin privileges (a non-admin member gets 403). Returns 404 when no limit is configured. This is the only way to remove a limit through the API, because `PUT` floors `monthly_limit_dollars` at 1.00 and so cannot express \"no limit\".
206
+ * Clear the org spending limit
207
+ */
208
+ deleteSpendingLimitRaw(initOverrides) {
209
+ return __awaiter(this, void 0, void 0, function* () {
210
+ const requestOptions = yield this.deleteSpendingLimitRequestOpts();
211
+ const response = yield this.request(requestOptions, initOverrides);
212
+ return new runtime.VoidApiResponse(response);
213
+ });
214
+ }
215
+ /**
216
+ * Removes the organization\'s monthly spending limit and daily spend cap entirely. Requires the `billing:write` scope AND org-admin privileges (a non-admin member gets 403). Returns 404 when no limit is configured. This is the only way to remove a limit through the API, because `PUT` floors `monthly_limit_dollars` at 1.00 and so cannot express \"no limit\".
217
+ * Clear the org spending limit
218
+ */
219
+ deleteSpendingLimit(initOverrides) {
220
+ return __awaiter(this, void 0, void 0, function* () {
221
+ yield this.deleteSpendingLimitRaw(initOverrides);
222
+ });
223
+ }
181
224
  /**
182
225
  * Creates request options for getBalance without sending the request
183
226
  */
@@ -1,6 +1,5 @@
1
1
  export * from './BillingApi';
2
2
  export * from './InferenceApi';
3
3
  export * from './MetaApi';
4
- export * from './OperationsApi';
5
4
  export * from './UsageApi';
6
5
  export * from './WebhooksApi';
@@ -3,6 +3,5 @@
3
3
  export * from './BillingApi';
4
4
  export * from './InferenceApi';
5
5
  export * from './MetaApi';
6
- export * from './OperationsApi';
7
6
  export * from './UsageApi';
8
7
  export * from './WebhooksApi';
@@ -25,9 +25,6 @@ export * from './ModelPricing';
25
25
  export * from './ModelRate';
26
26
  export * from './OpenAIErrorEnvelope';
27
27
  export * from './OpenAIErrorEnvelopeError';
28
- export * from './Operation';
29
- export * from './OperationError';
30
- export * from './OperationResult';
31
28
  export * from './PeakWindow';
32
29
  export * from './Problem';
33
30
  export * from './RefereeStatus';
@@ -27,9 +27,6 @@ export * from './ModelPricing';
27
27
  export * from './ModelRate';
28
28
  export * from './OpenAIErrorEnvelope';
29
29
  export * from './OpenAIErrorEnvelopeError';
30
- export * from './Operation';
31
- export * from './OperationError';
32
- export * from './OperationResult';
33
30
  export * from './PeakWindow';
34
31
  export * from './Problem';
35
32
  export * from './RefereeStatus';
@@ -61,7 +61,7 @@ export class Configuration {
61
61
  return undefined;
62
62
  }
63
63
  get headers() {
64
- return Object.assign({ 'User-Agent': 'deeprelay-sdk-ts/0.1.2' }, this.configuration.headers);
64
+ return Object.assign({ 'User-Agent': 'deeprelay-sdk-ts/0.2.0' }, this.configuration.headers);
65
65
  }
66
66
  get credentials() {
67
67
  return this.configuration.credentials;
@@ -25,9 +25,6 @@ export * from './ModelPricing';
25
25
  export * from './ModelRate';
26
26
  export * from './OpenAIErrorEnvelope';
27
27
  export * from './OpenAIErrorEnvelopeError';
28
- export * from './Operation';
29
- export * from './OperationError';
30
- export * from './OperationResult';
31
28
  export * from './PeakWindow';
32
29
  export * from './Problem';
33
30
  export * from './RefereeStatus';
@@ -43,9 +43,6 @@ __exportStar(require("./ModelPricing"), exports);
43
43
  __exportStar(require("./ModelRate"), exports);
44
44
  __exportStar(require("./OpenAIErrorEnvelope"), exports);
45
45
  __exportStar(require("./OpenAIErrorEnvelopeError"), exports);
46
- __exportStar(require("./Operation"), exports);
47
- __exportStar(require("./OperationError"), exports);
48
- __exportStar(require("./OperationResult"), exports);
49
46
  __exportStar(require("./PeakWindow"), exports);
50
47
  __exportStar(require("./Problem"), exports);
51
48
  __exportStar(require("./RefereeStatus"), exports);
package/dist/runtime.js CHANGED
@@ -69,7 +69,7 @@ class Configuration {
69
69
  return undefined;
70
70
  }
71
71
  get headers() {
72
- return Object.assign({ 'User-Agent': 'deeprelay-sdk-ts/0.1.2' }, this.configuration.headers);
72
+ return Object.assign({ 'User-Agent': 'deeprelay-sdk-ts/0.2.0' }, this.configuration.headers);
73
73
  }
74
74
  get credentials() {
75
75
  return this.configuration.credentials;
@@ -7,6 +7,7 @@ All URIs are relative to *https://api.deeprelay.ai/v1*
7
7
  | [**createCryptoDeposit**](BillingApi.md#createcryptodepositoperation) | **POST** /billing/deposits/crypto | Create a stablecoin deposit |
8
8
  | [**createSubscriptionCheckout**](BillingApi.md#createsubscriptioncheckout) | **POST** /billing/subscription/checkout | Start a subscription checkout session |
9
9
  | [**createSubscriptionPortal**](BillingApi.md#createsubscriptionportal) | **POST** /billing/subscription/portal | Open the billing portal to cancel or manage the subscription |
10
+ | [**deleteSpendingLimit**](BillingApi.md#deletespendinglimit) | **DELETE** /billing/spending-limit | Clear the org spending limit |
10
11
  | [**getBalance**](BillingApi.md#getbalance) | **GET** /billing/balance | Get the org credit balance |
11
12
  | [**getDeposit**](BillingApi.md#getdeposit) | **GET** /billing/deposits/{id} | Get one stablecoin deposit |
12
13
  | [**getReferral**](BillingApi.md#getreferral) | **GET** /referrals | Get the org referral code, invite link, terms and stats |
@@ -246,6 +247,73 @@ example().catch(console.error);
246
247
  [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
247
248
 
248
249
 
250
+ ## deleteSpendingLimit
251
+
252
+ > deleteSpendingLimit()
253
+
254
+ Clear the org spending limit
255
+
256
+ Removes the organization\&#39;s monthly spending limit and daily spend cap entirely. Requires the &#x60;billing:write&#x60; scope AND org-admin privileges (a non-admin member gets 403). Returns 404 when no limit is configured. This is the only way to remove a limit through the API, because &#x60;PUT&#x60; floors &#x60;monthly_limit_dollars&#x60; at 1.00 and so cannot express \&quot;no limit\&quot;.
257
+
258
+ ### Example
259
+
260
+ ```ts
261
+ import {
262
+ Configuration,
263
+ BillingApi,
264
+ } from '@deeprelay/sdk';
265
+ import type { DeleteSpendingLimitRequest } from '@deeprelay/sdk';
266
+
267
+ async function example() {
268
+ console.log("🚀 Testing @deeprelay/sdk SDK...");
269
+ const config = new Configuration({
270
+ // Configure HTTP bearer authorization: bearerAuth
271
+ accessToken: "YOUR BEARER TOKEN",
272
+ });
273
+ const api = new BillingApi(config);
274
+
275
+ try {
276
+ const data = await api.deleteSpendingLimit();
277
+ console.log(data);
278
+ } catch (error) {
279
+ console.error(error);
280
+ }
281
+ }
282
+
283
+ // Run the test
284
+ example().catch(console.error);
285
+ ```
286
+
287
+ ### Parameters
288
+
289
+ This endpoint does not need any parameter.
290
+
291
+ ### Return type
292
+
293
+ `void` (Empty response body)
294
+
295
+ ### Authorization
296
+
297
+ [bearerAuth](../README.md#bearerAuth)
298
+
299
+ ### HTTP request headers
300
+
301
+ - **Content-Type**: Not defined
302
+ - **Accept**: `application/problem+json`
303
+
304
+
305
+ ### HTTP response details
306
+ | Status code | Description | Response headers |
307
+ |-------------|-------------|------------------|
308
+ | **204** | No Content | - |
309
+ | **403** | Error response (RFC 7807) | - |
310
+ | **404** | Error response (RFC 7807) | - |
311
+ | **429** | Rate limit exceeded (RFC 7807). Retry-After header indicates seconds to wait. | * Retry-After - Seconds the client should wait before retrying. <br> |
312
+ | **0** | Error response (RFC 7807) | - |
313
+
314
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
315
+
316
+
249
317
  ## getBalance
250
318
 
251
319
  > Balance getBalance()
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@deeprelay/sdk",
3
- "version": "0.1.2",
3
+ "version": "0.2.0",
4
4
  "description": "TypeScript SDK for the deeprelay Public Developer API",
5
5
  "author": "deeprelay Support <support@deeprelay.ai>",
6
6
  "repository": {
@@ -261,6 +261,52 @@ export class BillingApi extends runtime.BaseAPI {
261
261
  return await response.value();
262
262
  }
263
263
 
264
+ /**
265
+ * Creates request options for deleteSpendingLimit without sending the request
266
+ */
267
+ async deleteSpendingLimitRequestOpts(): Promise<runtime.RequestOpts> {
268
+ const queryParameters: any = {};
269
+
270
+ const headerParameters: runtime.HTTPHeaders = {};
271
+
272
+ if (this.configuration && this.configuration.accessToken) {
273
+ const token = this.configuration.accessToken;
274
+ const tokenString = await token("bearerAuth", []);
275
+
276
+ if (tokenString) {
277
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
278
+ }
279
+ }
280
+
281
+ let urlPath = `/billing/spending-limit`;
282
+
283
+ return {
284
+ path: urlPath,
285
+ method: 'DELETE',
286
+ headers: headerParameters,
287
+ query: queryParameters,
288
+ };
289
+ }
290
+
291
+ /**
292
+ * Removes the organization\'s monthly spending limit and daily spend cap entirely. Requires the `billing:write` scope AND org-admin privileges (a non-admin member gets 403). Returns 404 when no limit is configured. This is the only way to remove a limit through the API, because `PUT` floors `monthly_limit_dollars` at 1.00 and so cannot express \"no limit\".
293
+ * Clear the org spending limit
294
+ */
295
+ async deleteSpendingLimitRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
296
+ const requestOptions = await this.deleteSpendingLimitRequestOpts();
297
+ const response = await this.request(requestOptions, initOverrides);
298
+
299
+ return new runtime.VoidApiResponse(response);
300
+ }
301
+
302
+ /**
303
+ * Removes the organization\'s monthly spending limit and daily spend cap entirely. Requires the `billing:write` scope AND org-admin privileges (a non-admin member gets 403). Returns 404 when no limit is configured. This is the only way to remove a limit through the API, because `PUT` floors `monthly_limit_dollars` at 1.00 and so cannot express \"no limit\".
304
+ * Clear the org spending limit
305
+ */
306
+ async deleteSpendingLimit(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
307
+ await this.deleteSpendingLimitRaw(initOverrides);
308
+ }
309
+
264
310
  /**
265
311
  * Creates request options for getBalance without sending the request
266
312
  */
package/src/apis/index.ts CHANGED
@@ -3,6 +3,5 @@
3
3
  export * from './BillingApi';
4
4
  export * from './InferenceApi';
5
5
  export * from './MetaApi';
6
- export * from './OperationsApi';
7
6
  export * from './UsageApi';
8
7
  export * from './WebhooksApi';
@@ -27,9 +27,6 @@ export * from './ModelPricing';
27
27
  export * from './ModelRate';
28
28
  export * from './OpenAIErrorEnvelope';
29
29
  export * from './OpenAIErrorEnvelopeError';
30
- export * from './Operation';
31
- export * from './OperationError';
32
- export * from './OperationResult';
33
30
  export * from './PeakWindow';
34
31
  export * from './Problem';
35
32
  export * from './RefereeStatus';
package/src/runtime.ts CHANGED
@@ -75,7 +75,7 @@ export class Configuration {
75
75
  }
76
76
 
77
77
  get headers(): HTTPHeaders | undefined {
78
- return { 'User-Agent': 'deeprelay-sdk-ts/0.1.2', ...this.configuration.headers };
78
+ return { 'User-Agent': 'deeprelay-sdk-ts/0.2.0', ...this.configuration.headers };
79
79
  }
80
80
 
81
81
  get credentials(): RequestCredentials | undefined {
@@ -1,33 +0,0 @@
1
- /**
2
- * deeprelay Public Developer API
3
- * Programmatic API for deeprelay. Authenticate with API keys minted from the dashboard. See https://deeprelay.ai/docs for details.
4
- *
5
- * The version of the OpenAPI document: 1.0.0
6
- * Contact: support@deeprelay.ai
7
- *
8
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
- * https://openapi-generator.tech
10
- * Do not edit the class manually.
11
- */
12
- import * as runtime from '../runtime';
13
- import { type Operation } from '../models/Operation';
14
- export interface GetOperationRequest {
15
- id: string;
16
- }
17
- /**
18
- *
19
- */
20
- export declare class OperationsApi extends runtime.BaseAPI {
21
- /**
22
- * Creates request options for getOperation without sending the request
23
- */
24
- getOperationRequestOpts(requestParameters: GetOperationRequest): Promise<runtime.RequestOpts>;
25
- /**
26
- * Get an async operation status
27
- */
28
- getOperationRaw(requestParameters: GetOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Operation>>;
29
- /**
30
- * Get an async operation status
31
- */
32
- getOperation(requestParameters: GetOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Operation>;
33
- }
@@ -1,79 +0,0 @@
1
- "use strict";
2
- /* tslint:disable */
3
- /* eslint-disable */
4
- /**
5
- * deeprelay Public Developer API
6
- * Programmatic API for deeprelay. Authenticate with API keys minted from the dashboard. See https://deeprelay.ai/docs for details.
7
- *
8
- * The version of the OpenAPI document: 1.0.0
9
- * Contact: support@deeprelay.ai
10
- *
11
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
- * https://openapi-generator.tech
13
- * Do not edit the class manually.
14
- */
15
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
16
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
17
- return new (P || (P = Promise))(function (resolve, reject) {
18
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
19
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
20
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
21
- step((generator = generator.apply(thisArg, _arguments || [])).next());
22
- });
23
- };
24
- Object.defineProperty(exports, "__esModule", { value: true });
25
- exports.OperationsApi = void 0;
26
- const runtime = require("../runtime");
27
- const Operation_1 = require("../models/Operation");
28
- /**
29
- *
30
- */
31
- class OperationsApi extends runtime.BaseAPI {
32
- /**
33
- * Creates request options for getOperation without sending the request
34
- */
35
- getOperationRequestOpts(requestParameters) {
36
- return __awaiter(this, void 0, void 0, function* () {
37
- if (requestParameters['id'] == null) {
38
- throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling getOperation().');
39
- }
40
- const queryParameters = {};
41
- const headerParameters = {};
42
- if (this.configuration && this.configuration.accessToken) {
43
- const token = this.configuration.accessToken;
44
- const tokenString = yield token("bearerAuth", []);
45
- if (tokenString) {
46
- headerParameters["Authorization"] = `Bearer ${tokenString}`;
47
- }
48
- }
49
- let urlPath = `/operations/{id}`;
50
- urlPath = urlPath.replace('{id}', encodeURIComponent(String(requestParameters['id'])));
51
- return {
52
- path: urlPath,
53
- method: 'GET',
54
- headers: headerParameters,
55
- query: queryParameters,
56
- };
57
- });
58
- }
59
- /**
60
- * Get an async operation status
61
- */
62
- getOperationRaw(requestParameters, initOverrides) {
63
- return __awaiter(this, void 0, void 0, function* () {
64
- const requestOptions = yield this.getOperationRequestOpts(requestParameters);
65
- const response = yield this.request(requestOptions, initOverrides);
66
- return new runtime.JSONApiResponse(response, (jsonValue) => (0, Operation_1.OperationFromJSON)(jsonValue));
67
- });
68
- }
69
- /**
70
- * Get an async operation status
71
- */
72
- getOperation(requestParameters, initOverrides) {
73
- return __awaiter(this, void 0, void 0, function* () {
74
- const response = yield this.getOperationRaw(requestParameters, initOverrides);
75
- return yield response.value();
76
- });
77
- }
78
- }
79
- exports.OperationsApi = OperationsApi;
@@ -1,33 +0,0 @@
1
- /**
2
- * deeprelay Public Developer API
3
- * Programmatic API for deeprelay. Authenticate with API keys minted from the dashboard. See https://deeprelay.ai/docs for details.
4
- *
5
- * The version of the OpenAPI document: 1.0.0
6
- * Contact: support@deeprelay.ai
7
- *
8
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
- * https://openapi-generator.tech
10
- * Do not edit the class manually.
11
- */
12
- import * as runtime from '../runtime';
13
- import { type Operation } from '../models/Operation';
14
- export interface GetOperationRequest {
15
- id: string;
16
- }
17
- /**
18
- *
19
- */
20
- export declare class OperationsApi extends runtime.BaseAPI {
21
- /**
22
- * Creates request options for getOperation without sending the request
23
- */
24
- getOperationRequestOpts(requestParameters: GetOperationRequest): Promise<runtime.RequestOpts>;
25
- /**
26
- * Get an async operation status
27
- */
28
- getOperationRaw(requestParameters: GetOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Operation>>;
29
- /**
30
- * Get an async operation status
31
- */
32
- getOperation(requestParameters: GetOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Operation>;
33
- }