@gpuai/sdk 0.3.13 → 0.3.14

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 (96) hide show
  1. package/.openapi-generator/FILES +26 -0
  2. package/README.md +32 -9
  3. package/dist/apis/AutolaunchApi.d.ts +109 -0
  4. package/dist/apis/AutolaunchApi.js +286 -0
  5. package/dist/apis/MarketApi.d.ts +56 -0
  6. package/dist/apis/MarketApi.js +112 -0
  7. package/dist/apis/WatchApi.d.ts +109 -0
  8. package/dist/apis/WatchApi.js +286 -0
  9. package/dist/apis/index.d.ts +3 -0
  10. package/dist/apis/index.js +3 -0
  11. package/dist/esm/apis/AutolaunchApi.d.ts +109 -0
  12. package/dist/esm/apis/AutolaunchApi.js +282 -0
  13. package/dist/esm/apis/MarketApi.d.ts +56 -0
  14. package/dist/esm/apis/MarketApi.js +108 -0
  15. package/dist/esm/apis/WatchApi.d.ts +109 -0
  16. package/dist/esm/apis/WatchApi.js +282 -0
  17. package/dist/esm/apis/index.d.ts +3 -0
  18. package/dist/esm/apis/index.js +3 -0
  19. package/dist/esm/models/AutolaunchRule.d.ts +181 -0
  20. package/dist/esm/models/AutolaunchRule.js +142 -0
  21. package/dist/esm/models/AutolaunchRuleCreate.d.ts +105 -0
  22. package/dist/esm/models/AutolaunchRuleCreate.js +84 -0
  23. package/dist/esm/models/AutolaunchRuleDisarm.d.ts +34 -0
  24. package/dist/esm/models/AutolaunchRuleDisarm.js +43 -0
  25. package/dist/esm/models/AutolaunchRulePage.d.ts +39 -0
  26. package/dist/esm/models/AutolaunchRulePage.js +48 -0
  27. package/dist/esm/models/MarketHistoryPoint.d.ts +59 -0
  28. package/dist/esm/models/MarketHistoryPoint.js +55 -0
  29. package/dist/esm/models/MarketHistoryResponse.d.ts +60 -0
  30. package/dist/esm/models/MarketHistoryResponse.js +60 -0
  31. package/dist/esm/models/Problem.d.ts +1 -0
  32. package/dist/esm/models/Problem.js +1 -0
  33. package/dist/esm/models/WatchRule.d.ts +141 -0
  34. package/dist/esm/models/WatchRule.js +117 -0
  35. package/dist/esm/models/WatchRuleCreate.d.ts +87 -0
  36. package/dist/esm/models/WatchRuleCreate.js +72 -0
  37. package/dist/esm/models/WatchRulePage.d.ts +39 -0
  38. package/dist/esm/models/WatchRulePage.js +48 -0
  39. package/dist/esm/models/WatchRuleUpdate.d.ts +86 -0
  40. package/dist/esm/models/WatchRuleUpdate.js +68 -0
  41. package/dist/esm/models/index.d.ts +10 -0
  42. package/dist/esm/models/index.js +10 -0
  43. package/dist/models/AutolaunchRule.d.ts +181 -0
  44. package/dist/models/AutolaunchRule.js +150 -0
  45. package/dist/models/AutolaunchRuleCreate.d.ts +105 -0
  46. package/dist/models/AutolaunchRuleCreate.js +92 -0
  47. package/dist/models/AutolaunchRuleDisarm.d.ts +34 -0
  48. package/dist/models/AutolaunchRuleDisarm.js +50 -0
  49. package/dist/models/AutolaunchRulePage.d.ts +39 -0
  50. package/dist/models/AutolaunchRulePage.js +55 -0
  51. package/dist/models/MarketHistoryPoint.d.ts +59 -0
  52. package/dist/models/MarketHistoryPoint.js +62 -0
  53. package/dist/models/MarketHistoryResponse.d.ts +60 -0
  54. package/dist/models/MarketHistoryResponse.js +67 -0
  55. package/dist/models/Problem.d.ts +1 -0
  56. package/dist/models/Problem.js +1 -0
  57. package/dist/models/WatchRule.d.ts +141 -0
  58. package/dist/models/WatchRule.js +125 -0
  59. package/dist/models/WatchRuleCreate.d.ts +87 -0
  60. package/dist/models/WatchRuleCreate.js +80 -0
  61. package/dist/models/WatchRulePage.d.ts +39 -0
  62. package/dist/models/WatchRulePage.js +55 -0
  63. package/dist/models/WatchRuleUpdate.d.ts +86 -0
  64. package/dist/models/WatchRuleUpdate.js +76 -0
  65. package/dist/models/index.d.ts +10 -0
  66. package/dist/models/index.js +10 -0
  67. package/docs/AutolaunchApi.md +390 -0
  68. package/docs/AutolaunchRule.md +69 -0
  69. package/docs/AutolaunchRuleCreate.md +50 -0
  70. package/docs/AutolaunchRuleDisarm.md +35 -0
  71. package/docs/AutolaunchRulePage.md +36 -0
  72. package/docs/MarketApi.md +98 -0
  73. package/docs/MarketHistoryPoint.md +43 -0
  74. package/docs/MarketHistoryResponse.md +43 -0
  75. package/docs/WatchApi.md +389 -0
  76. package/docs/WatchRule.md +61 -0
  77. package/docs/WatchRuleCreate.md +46 -0
  78. package/docs/WatchRulePage.md +36 -0
  79. package/docs/WatchRuleUpdate.md +47 -0
  80. package/package.json +1 -1
  81. package/src/apis/AutolaunchApi.ts +360 -0
  82. package/src/apis/MarketApi.ts +136 -0
  83. package/src/apis/WatchApi.ts +360 -0
  84. package/src/apis/index.ts +3 -0
  85. package/src/models/AutolaunchRule.ts +270 -0
  86. package/src/models/AutolaunchRuleCreate.ts +162 -0
  87. package/src/models/AutolaunchRuleDisarm.ts +68 -0
  88. package/src/models/AutolaunchRulePage.ts +83 -0
  89. package/src/models/MarketHistoryPoint.ts +103 -0
  90. package/src/models/MarketHistoryResponse.ts +113 -0
  91. package/src/models/Problem.ts +1 -0
  92. package/src/models/WatchRule.ts +219 -0
  93. package/src/models/WatchRuleCreate.ts +138 -0
  94. package/src/models/WatchRulePage.ts +83 -0
  95. package/src/models/WatchRuleUpdate.ts +135 -0
  96. package/src/models/index.ts +10 -0
@@ -0,0 +1,43 @@
1
+
2
+ # MarketHistoryPoint
3
+
4
+ One bucket of a price/stock series. The nullability of `price_per_gpu_hour` and `available_count` is the contract, not a convenience: a real 0 is a bucket we sampled and found sold out, and null is a bucket we never successfully sampled. A client that coerces null to 0 will report GPU.ai\'s own polling outages as supplier stockouts, and must not interpolate across a null.
5
+
6
+ ## Properties
7
+
8
+ Name | Type
9
+ ------------ | -------------
10
+ `bucketTs` | Date
11
+ `pricePerGpuHour` | number
12
+ `availableCount` | number
13
+ `nodePricePerHour` | number
14
+ `gpuCount` | number
15
+
16
+ ## Example
17
+
18
+ ```typescript
19
+ import type { MarketHistoryPoint } from '@gpuai/sdk'
20
+
21
+ // TODO: Update the object below with actual values
22
+ const example = {
23
+ "bucketTs": null,
24
+ "pricePerGpuHour": null,
25
+ "availableCount": null,
26
+ "nodePricePerHour": null,
27
+ "gpuCount": null,
28
+ } satisfies MarketHistoryPoint
29
+
30
+ console.log(example)
31
+
32
+ // Convert the instance to a JSON string
33
+ const exampleJSON: string = JSON.stringify(example)
34
+ console.log(exampleJSON)
35
+
36
+ // Parse the JSON string back to an object
37
+ const exampleParsed = JSON.parse(exampleJSON) as MarketHistoryPoint
38
+ console.log(exampleParsed)
39
+ ```
40
+
41
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
42
+
43
+
@@ -0,0 +1,43 @@
1
+
2
+ # MarketHistoryResponse
3
+
4
+ A price/stock series for one (gpu_model, region, capacity_class) key. Points cover the FULL bucket grid across the requested window, including the buckets we did not sample — a gap therefore has visible width rather than disappearing between two adjacent points.
5
+
6
+ ## Properties
7
+
8
+ Name | Type
9
+ ------------ | -------------
10
+ `gpuModel` | string
11
+ `region` | string
12
+ `capacityClass` | string
13
+ `bucketSeconds` | number
14
+ `points` | [Array<MarketHistoryPoint>](MarketHistoryPoint.md)
15
+
16
+ ## Example
17
+
18
+ ```typescript
19
+ import type { MarketHistoryResponse } from '@gpuai/sdk'
20
+
21
+ // TODO: Update the object below with actual values
22
+ const example = {
23
+ "gpuModel": null,
24
+ "region": null,
25
+ "capacityClass": null,
26
+ "bucketSeconds": null,
27
+ "points": null,
28
+ } satisfies MarketHistoryResponse
29
+
30
+ console.log(example)
31
+
32
+ // Convert the instance to a JSON string
33
+ const exampleJSON: string = JSON.stringify(example)
34
+ console.log(exampleJSON)
35
+
36
+ // Parse the JSON string back to an object
37
+ const exampleParsed = JSON.parse(exampleJSON) as MarketHistoryResponse
38
+ console.log(exampleParsed)
39
+ ```
40
+
41
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
42
+
43
+
@@ -0,0 +1,389 @@
1
+ # WatchApi
2
+
3
+ All URIs are relative to *https://api.gpu.ai/v1*
4
+
5
+ | Method | HTTP request | Description |
6
+ |------------- | ------------- | -------------|
7
+ | [**createWatchRule**](WatchApi.md#createwatchrule) | **POST** /watch-rules | Create a watch rule |
8
+ | [**deleteWatchRule**](WatchApi.md#deletewatchrule) | **DELETE** /watch-rules/{id} | Delete a watch rule |
9
+ | [**getWatchRule**](WatchApi.md#getwatchrule) | **GET** /watch-rules/{id} | Get a watch rule |
10
+ | [**listWatchRules**](WatchApi.md#listwatchrules) | **GET** /watch-rules | List watch rules |
11
+ | [**updateWatchRule**](WatchApi.md#updatewatchrule) | **PATCH** /watch-rules/{id} | Update a watch rule |
12
+
13
+
14
+
15
+ ## createWatchRule
16
+
17
+ > WatchRule createWatchRule(watchRuleCreate, idempotencyKey)
18
+
19
+ Create a watch rule
20
+
21
+ Creates a rule that notifies you when the market moves on a GPU model. Requires the `watch:write` scope (or `full_access`). A watch rule ONLY notifies. It cannot launch capacity and cannot spend money: there is no field on this resource that provisions anything. Automatic launching is a separate resource with its own spend-consent gate. Targeting is dimensional — a GPU model plus optional canonical region and capacity class. It is deliberately NOT possible to pin a rule to a specific catalog listing: listing identity is unstable, so a pinned rule can silently match nothing and never fire. Delivery is to the organization\'s registered webhook endpoints, plus an email to the rule\'s creator. `webhook_endpoint_override_id` routes one rule to one specific endpoint and is the id of an endpoint already registered via `/webhook-endpoints` — the resource accepts no URL of any kind. Organizations are limited to 50 ENABLED rules; the 422 names the limit.
22
+
23
+ ### Example
24
+
25
+ ```ts
26
+ import {
27
+ Configuration,
28
+ WatchApi,
29
+ } from '@gpuai/sdk';
30
+ import type { CreateWatchRuleRequest } from '@gpuai/sdk';
31
+
32
+ async function example() {
33
+ console.log("🚀 Testing @gpuai/sdk SDK...");
34
+ const config = new Configuration({
35
+ // Configure HTTP bearer authorization: bearerAuth
36
+ accessToken: "YOUR BEARER TOKEN",
37
+ });
38
+ const api = new WatchApi(config);
39
+
40
+ const body = {
41
+ // WatchRuleCreate
42
+ watchRuleCreate: ...,
43
+ // string (optional)
44
+ idempotencyKey: idempotencyKey_example,
45
+ } satisfies CreateWatchRuleRequest;
46
+
47
+ try {
48
+ const data = await api.createWatchRule(body);
49
+ console.log(data);
50
+ } catch (error) {
51
+ console.error(error);
52
+ }
53
+ }
54
+
55
+ // Run the test
56
+ example().catch(console.error);
57
+ ```
58
+
59
+ ### Parameters
60
+
61
+
62
+ | Name | Type | Description | Notes |
63
+ |------------- | ------------- | ------------- | -------------|
64
+ | **watchRuleCreate** | [WatchRuleCreate](WatchRuleCreate.md) | | |
65
+ | **idempotencyKey** | `string` | | [Optional] [Defaults to `undefined`] |
66
+
67
+ ### Return type
68
+
69
+ [**WatchRule**](WatchRule.md)
70
+
71
+ ### Authorization
72
+
73
+ [bearerAuth](../README.md#bearerAuth)
74
+
75
+ ### HTTP request headers
76
+
77
+ - **Content-Type**: `application/json`
78
+ - **Accept**: `application/json`, `application/problem+json`
79
+
80
+
81
+ ### HTTP response details
82
+ | Status code | Description | Response headers |
83
+ |-------------|-------------|------------------|
84
+ | **201** | Created | - |
85
+ | **422** | Validation failed — an unknown condition kind, a non-canonical region, a missing threshold on a threshold condition, an override id that is not an endpoint registered by this organization, a field naming a catalog listing or a delivery address, or the enabled-rule limit already reached. | - |
86
+ | **429** | Rate limit exceeded (RFC 7807). Retry-After header indicates seconds to wait. | * Retry-After - Seconds the client should wait before retrying. <br> |
87
+ | **0** | Error response (RFC 7807) | - |
88
+
89
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
90
+
91
+
92
+ ## deleteWatchRule
93
+
94
+ > deleteWatchRule(id)
95
+
96
+ Delete a watch rule
97
+
98
+ Deletes a watch rule. Requires the &#x60;watch:write&#x60; scope (or &#x60;full_access&#x60;). Deleting an already-deleted rule returns 404.
99
+
100
+ ### Example
101
+
102
+ ```ts
103
+ import {
104
+ Configuration,
105
+ WatchApi,
106
+ } from '@gpuai/sdk';
107
+ import type { DeleteWatchRuleRequest } from '@gpuai/sdk';
108
+
109
+ async function example() {
110
+ console.log("🚀 Testing @gpuai/sdk SDK...");
111
+ const config = new Configuration({
112
+ // Configure HTTP bearer authorization: bearerAuth
113
+ accessToken: "YOUR BEARER TOKEN",
114
+ });
115
+ const api = new WatchApi(config);
116
+
117
+ const body = {
118
+ // string
119
+ id: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
120
+ } satisfies DeleteWatchRuleRequest;
121
+
122
+ try {
123
+ const data = await api.deleteWatchRule(body);
124
+ console.log(data);
125
+ } catch (error) {
126
+ console.error(error);
127
+ }
128
+ }
129
+
130
+ // Run the test
131
+ example().catch(console.error);
132
+ ```
133
+
134
+ ### Parameters
135
+
136
+
137
+ | Name | Type | Description | Notes |
138
+ |------------- | ------------- | ------------- | -------------|
139
+ | **id** | `string` | | [Defaults to `undefined`] |
140
+
141
+ ### Return type
142
+
143
+ `void` (Empty response body)
144
+
145
+ ### Authorization
146
+
147
+ [bearerAuth](../README.md#bearerAuth)
148
+
149
+ ### HTTP request headers
150
+
151
+ - **Content-Type**: Not defined
152
+ - **Accept**: `application/problem+json`
153
+
154
+
155
+ ### HTTP response details
156
+ | Status code | Description | Response headers |
157
+ |-------------|-------------|------------------|
158
+ | **204** | Deleted | - |
159
+ | **429** | Rate limit exceeded (RFC 7807). Retry-After header indicates seconds to wait. | * Retry-After - Seconds the client should wait before retrying. <br> |
160
+ | **0** | Error response (RFC 7807) | - |
161
+
162
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
163
+
164
+
165
+ ## getWatchRule
166
+
167
+ > WatchRule getWatchRule(id)
168
+
169
+ Get a watch rule
170
+
171
+ Fetches one watch rule. Requires the &#x60;watch:read&#x60; scope (or &#x60;full_access&#x60;). A rule belonging to another organization returns 404 — the same answer as an id that does not exist.
172
+
173
+ ### Example
174
+
175
+ ```ts
176
+ import {
177
+ Configuration,
178
+ WatchApi,
179
+ } from '@gpuai/sdk';
180
+ import type { GetWatchRuleRequest } from '@gpuai/sdk';
181
+
182
+ async function example() {
183
+ console.log("🚀 Testing @gpuai/sdk SDK...");
184
+ const config = new Configuration({
185
+ // Configure HTTP bearer authorization: bearerAuth
186
+ accessToken: "YOUR BEARER TOKEN",
187
+ });
188
+ const api = new WatchApi(config);
189
+
190
+ const body = {
191
+ // string
192
+ id: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
193
+ } satisfies GetWatchRuleRequest;
194
+
195
+ try {
196
+ const data = await api.getWatchRule(body);
197
+ console.log(data);
198
+ } catch (error) {
199
+ console.error(error);
200
+ }
201
+ }
202
+
203
+ // Run the test
204
+ example().catch(console.error);
205
+ ```
206
+
207
+ ### Parameters
208
+
209
+
210
+ | Name | Type | Description | Notes |
211
+ |------------- | ------------- | ------------- | -------------|
212
+ | **id** | `string` | | [Defaults to `undefined`] |
213
+
214
+ ### Return type
215
+
216
+ [**WatchRule**](WatchRule.md)
217
+
218
+ ### Authorization
219
+
220
+ [bearerAuth](../README.md#bearerAuth)
221
+
222
+ ### HTTP request headers
223
+
224
+ - **Content-Type**: Not defined
225
+ - **Accept**: `application/json`, `application/problem+json`
226
+
227
+
228
+ ### HTTP response details
229
+ | Status code | Description | Response headers |
230
+ |-------------|-------------|------------------|
231
+ | **200** | OK | - |
232
+ | **429** | Rate limit exceeded (RFC 7807). Retry-After header indicates seconds to wait. | * Retry-After - Seconds the client should wait before retrying. <br> |
233
+ | **0** | Error response (RFC 7807) | - |
234
+
235
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
236
+
237
+
238
+ ## listWatchRules
239
+
240
+ > WatchRulePage listWatchRules(cursor, limit)
241
+
242
+ List watch rules
243
+
244
+ Lists this organization\&#39;s watch rules. Requires the &#x60;watch:read&#x60; scope (or &#x60;full_access&#x60;). Rules belonging to other organizations are never returned.
245
+
246
+ ### Example
247
+
248
+ ```ts
249
+ import {
250
+ Configuration,
251
+ WatchApi,
252
+ } from '@gpuai/sdk';
253
+ import type { ListWatchRulesRequest } from '@gpuai/sdk';
254
+
255
+ async function example() {
256
+ console.log("🚀 Testing @gpuai/sdk SDK...");
257
+ const config = new Configuration({
258
+ // Configure HTTP bearer authorization: bearerAuth
259
+ accessToken: "YOUR BEARER TOKEN",
260
+ });
261
+ const api = new WatchApi(config);
262
+
263
+ const body = {
264
+ // string (optional)
265
+ cursor: cursor_example,
266
+ // number (optional)
267
+ limit: 56,
268
+ } satisfies ListWatchRulesRequest;
269
+
270
+ try {
271
+ const data = await api.listWatchRules(body);
272
+ console.log(data);
273
+ } catch (error) {
274
+ console.error(error);
275
+ }
276
+ }
277
+
278
+ // Run the test
279
+ example().catch(console.error);
280
+ ```
281
+
282
+ ### Parameters
283
+
284
+
285
+ | Name | Type | Description | Notes |
286
+ |------------- | ------------- | ------------- | -------------|
287
+ | **cursor** | `string` | | [Optional] [Defaults to `undefined`] |
288
+ | **limit** | `number` | | [Optional] [Defaults to `50`] |
289
+
290
+ ### Return type
291
+
292
+ [**WatchRulePage**](WatchRulePage.md)
293
+
294
+ ### Authorization
295
+
296
+ [bearerAuth](../README.md#bearerAuth)
297
+
298
+ ### HTTP request headers
299
+
300
+ - **Content-Type**: Not defined
301
+ - **Accept**: `application/json`, `application/problem+json`
302
+
303
+
304
+ ### HTTP response details
305
+ | Status code | Description | Response headers |
306
+ |-------------|-------------|------------------|
307
+ | **200** | OK | - |
308
+ | **429** | Rate limit exceeded (RFC 7807). Retry-After header indicates seconds to wait. | * Retry-After - Seconds the client should wait before retrying. <br> |
309
+ | **0** | Error response (RFC 7807) | - |
310
+
311
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
312
+
313
+
314
+ ## updateWatchRule
315
+
316
+ > WatchRule updateWatchRule(id, watchRuleUpdate)
317
+
318
+ Update a watch rule
319
+
320
+ Partially updates a watch rule. Requires the &#x60;watch:write&#x60; scope (or &#x60;full_access&#x60;). An ABSENT key keeps the stored value; an explicit &#x60;null&#x60; on &#x60;region&#x60;, &#x60;capacity_class&#x60; or &#x60;webhook_endpoint_override_id&#x60; CLEARS it back to \&quot;any\&quot; / \&quot;organization default\&quot;. The two are distinguished by which keys the body carries, so send only the keys you mean to change. Editing a rule RE-ARMS it: the fired latch describes the condition that was replaced, so carrying it across an edit would suppress the first alert on the new one.
321
+
322
+ ### Example
323
+
324
+ ```ts
325
+ import {
326
+ Configuration,
327
+ WatchApi,
328
+ } from '@gpuai/sdk';
329
+ import type { UpdateWatchRuleRequest } from '@gpuai/sdk';
330
+
331
+ async function example() {
332
+ console.log("🚀 Testing @gpuai/sdk SDK...");
333
+ const config = new Configuration({
334
+ // Configure HTTP bearer authorization: bearerAuth
335
+ accessToken: "YOUR BEARER TOKEN",
336
+ });
337
+ const api = new WatchApi(config);
338
+
339
+ const body = {
340
+ // string
341
+ id: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
342
+ // WatchRuleUpdate
343
+ watchRuleUpdate: ...,
344
+ } satisfies UpdateWatchRuleRequest;
345
+
346
+ try {
347
+ const data = await api.updateWatchRule(body);
348
+ console.log(data);
349
+ } catch (error) {
350
+ console.error(error);
351
+ }
352
+ }
353
+
354
+ // Run the test
355
+ example().catch(console.error);
356
+ ```
357
+
358
+ ### Parameters
359
+
360
+
361
+ | Name | Type | Description | Notes |
362
+ |------------- | ------------- | ------------- | -------------|
363
+ | **id** | `string` | | [Defaults to `undefined`] |
364
+ | **watchRuleUpdate** | [WatchRuleUpdate](WatchRuleUpdate.md) | | |
365
+
366
+ ### Return type
367
+
368
+ [**WatchRule**](WatchRule.md)
369
+
370
+ ### Authorization
371
+
372
+ [bearerAuth](../README.md#bearerAuth)
373
+
374
+ ### HTTP request headers
375
+
376
+ - **Content-Type**: `application/json`
377
+ - **Accept**: `application/json`, `application/problem+json`
378
+
379
+
380
+ ### HTTP response details
381
+ | Status code | Description | Response headers |
382
+ |-------------|-------------|------------------|
383
+ | **200** | OK | - |
384
+ | **422** | Validation failed against the MERGED rule — for example switching to a threshold condition on a rule that has no stored threshold. | - |
385
+ | **429** | Rate limit exceeded (RFC 7807). Retry-After header indicates seconds to wait. | * Retry-After - Seconds the client should wait before retrying. <br> |
386
+ | **0** | Error response (RFC 7807) | - |
387
+
388
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
389
+
@@ -0,0 +1,61 @@
1
+
2
+ # WatchRule
3
+
4
+ A rule that notifies when the market moves on a GPU model. It carries no upstream supplier identity of any kind, and no delivery address — those are properties of the resource, not of a particular response.
5
+
6
+ ## Properties
7
+
8
+ Name | Type
9
+ ------------ | -------------
10
+ `id` | string
11
+ `gpuModel` | string
12
+ `region` | string
13
+ `capacityClass` | string
14
+ `conditionKind` | string
15
+ `threshold` | number
16
+ `state` | string
17
+ `lastFiredAt` | Date
18
+ `quietUntil` | Date
19
+ `webhookEndpointOverrideId` | string
20
+ `enabled` | boolean
21
+ `deactivatedReason` | string
22
+ `createdAt` | Date
23
+ `updatedAt` | Date
24
+
25
+ ## Example
26
+
27
+ ```typescript
28
+ import type { WatchRule } from '@gpuai/sdk'
29
+
30
+ // TODO: Update the object below with actual values
31
+ const example = {
32
+ "id": null,
33
+ "gpuModel": null,
34
+ "region": null,
35
+ "capacityClass": null,
36
+ "conditionKind": null,
37
+ "threshold": null,
38
+ "state": null,
39
+ "lastFiredAt": null,
40
+ "quietUntil": null,
41
+ "webhookEndpointOverrideId": null,
42
+ "enabled": null,
43
+ "deactivatedReason": null,
44
+ "createdAt": null,
45
+ "updatedAt": null,
46
+ } satisfies WatchRule
47
+
48
+ console.log(example)
49
+
50
+ // Convert the instance to a JSON string
51
+ const exampleJSON: string = JSON.stringify(example)
52
+ console.log(exampleJSON)
53
+
54
+ // Parse the JSON string back to an object
55
+ const exampleParsed = JSON.parse(exampleJSON) as WatchRule
56
+ console.log(exampleParsed)
57
+ ```
58
+
59
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
60
+
61
+
@@ -0,0 +1,46 @@
1
+
2
+ # WatchRuleCreate
3
+
4
+
5
+ ## Properties
6
+
7
+ Name | Type
8
+ ------------ | -------------
9
+ `gpuModel` | string
10
+ `region` | string
11
+ `capacityClass` | string
12
+ `conditionKind` | string
13
+ `threshold` | number
14
+ `webhookEndpointOverrideId` | string
15
+ `enabled` | boolean
16
+
17
+ ## Example
18
+
19
+ ```typescript
20
+ import type { WatchRuleCreate } from '@gpuai/sdk'
21
+
22
+ // TODO: Update the object below with actual values
23
+ const example = {
24
+ "gpuModel": null,
25
+ "region": null,
26
+ "capacityClass": null,
27
+ "conditionKind": null,
28
+ "threshold": null,
29
+ "webhookEndpointOverrideId": null,
30
+ "enabled": null,
31
+ } satisfies WatchRuleCreate
32
+
33
+ console.log(example)
34
+
35
+ // Convert the instance to a JSON string
36
+ const exampleJSON: string = JSON.stringify(example)
37
+ console.log(exampleJSON)
38
+
39
+ // Parse the JSON string back to an object
40
+ const exampleParsed = JSON.parse(exampleJSON) as WatchRuleCreate
41
+ console.log(exampleParsed)
42
+ ```
43
+
44
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
45
+
46
+
@@ -0,0 +1,36 @@
1
+
2
+ # WatchRulePage
3
+
4
+
5
+ ## Properties
6
+
7
+ Name | Type
8
+ ------------ | -------------
9
+ `data` | [Array&lt;WatchRule&gt;](WatchRule.md)
10
+ `nextCursor` | string
11
+
12
+ ## Example
13
+
14
+ ```typescript
15
+ import type { WatchRulePage } from '@gpuai/sdk'
16
+
17
+ // TODO: Update the object below with actual values
18
+ const example = {
19
+ "data": null,
20
+ "nextCursor": null,
21
+ } satisfies WatchRulePage
22
+
23
+ console.log(example)
24
+
25
+ // Convert the instance to a JSON string
26
+ const exampleJSON: string = JSON.stringify(example)
27
+ console.log(exampleJSON)
28
+
29
+ // Parse the JSON string back to an object
30
+ const exampleParsed = JSON.parse(exampleJSON) as WatchRulePage
31
+ console.log(exampleParsed)
32
+ ```
33
+
34
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
35
+
36
+
@@ -0,0 +1,47 @@
1
+
2
+ # WatchRuleUpdate
3
+
4
+ Partial update. An absent key keeps the stored value; an explicit null on region, capacity_class or webhook_endpoint_override_id clears it. The merged rule is re-validated as a whole.
5
+
6
+ ## Properties
7
+
8
+ Name | Type
9
+ ------------ | -------------
10
+ `gpuModel` | string
11
+ `region` | string
12
+ `capacityClass` | string
13
+ `conditionKind` | string
14
+ `threshold` | number
15
+ `webhookEndpointOverrideId` | string
16
+ `enabled` | boolean
17
+
18
+ ## Example
19
+
20
+ ```typescript
21
+ import type { WatchRuleUpdate } from '@gpuai/sdk'
22
+
23
+ // TODO: Update the object below with actual values
24
+ const example = {
25
+ "gpuModel": null,
26
+ "region": null,
27
+ "capacityClass": null,
28
+ "conditionKind": null,
29
+ "threshold": null,
30
+ "webhookEndpointOverrideId": null,
31
+ "enabled": null,
32
+ } satisfies WatchRuleUpdate
33
+
34
+ console.log(example)
35
+
36
+ // Convert the instance to a JSON string
37
+ const exampleJSON: string = JSON.stringify(example)
38
+ console.log(exampleJSON)
39
+
40
+ // Parse the JSON string back to an object
41
+ const exampleParsed = JSON.parse(exampleJSON) as WatchRuleUpdate
42
+ console.log(exampleParsed)
43
+ ```
44
+
45
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
46
+
47
+
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gpuai/sdk",
3
- "version": "0.3.13",
3
+ "version": "0.3.14",
4
4
  "description": "TypeScript SDK for the GPU.ai Public Developer API",
5
5
  "author": "GPU.ai Support <support@gpu.ai>",
6
6
  "repository": {