@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.
- package/.openapi-generator/FILES +26 -0
- package/README.md +32 -9
- package/dist/apis/AutolaunchApi.d.ts +109 -0
- package/dist/apis/AutolaunchApi.js +286 -0
- package/dist/apis/MarketApi.d.ts +56 -0
- package/dist/apis/MarketApi.js +112 -0
- package/dist/apis/WatchApi.d.ts +109 -0
- package/dist/apis/WatchApi.js +286 -0
- package/dist/apis/index.d.ts +3 -0
- package/dist/apis/index.js +3 -0
- package/dist/esm/apis/AutolaunchApi.d.ts +109 -0
- package/dist/esm/apis/AutolaunchApi.js +282 -0
- package/dist/esm/apis/MarketApi.d.ts +56 -0
- package/dist/esm/apis/MarketApi.js +108 -0
- package/dist/esm/apis/WatchApi.d.ts +109 -0
- package/dist/esm/apis/WatchApi.js +282 -0
- package/dist/esm/apis/index.d.ts +3 -0
- package/dist/esm/apis/index.js +3 -0
- package/dist/esm/models/AutolaunchRule.d.ts +181 -0
- package/dist/esm/models/AutolaunchRule.js +142 -0
- package/dist/esm/models/AutolaunchRuleCreate.d.ts +105 -0
- package/dist/esm/models/AutolaunchRuleCreate.js +84 -0
- package/dist/esm/models/AutolaunchRuleDisarm.d.ts +34 -0
- package/dist/esm/models/AutolaunchRuleDisarm.js +43 -0
- package/dist/esm/models/AutolaunchRulePage.d.ts +39 -0
- package/dist/esm/models/AutolaunchRulePage.js +48 -0
- package/dist/esm/models/MarketHistoryPoint.d.ts +59 -0
- package/dist/esm/models/MarketHistoryPoint.js +55 -0
- package/dist/esm/models/MarketHistoryResponse.d.ts +60 -0
- package/dist/esm/models/MarketHistoryResponse.js +60 -0
- package/dist/esm/models/Problem.d.ts +1 -0
- package/dist/esm/models/Problem.js +1 -0
- package/dist/esm/models/WatchRule.d.ts +141 -0
- package/dist/esm/models/WatchRule.js +117 -0
- package/dist/esm/models/WatchRuleCreate.d.ts +87 -0
- package/dist/esm/models/WatchRuleCreate.js +72 -0
- package/dist/esm/models/WatchRulePage.d.ts +39 -0
- package/dist/esm/models/WatchRulePage.js +48 -0
- package/dist/esm/models/WatchRuleUpdate.d.ts +86 -0
- package/dist/esm/models/WatchRuleUpdate.js +68 -0
- package/dist/esm/models/index.d.ts +10 -0
- package/dist/esm/models/index.js +10 -0
- package/dist/models/AutolaunchRule.d.ts +181 -0
- package/dist/models/AutolaunchRule.js +150 -0
- package/dist/models/AutolaunchRuleCreate.d.ts +105 -0
- package/dist/models/AutolaunchRuleCreate.js +92 -0
- package/dist/models/AutolaunchRuleDisarm.d.ts +34 -0
- package/dist/models/AutolaunchRuleDisarm.js +50 -0
- package/dist/models/AutolaunchRulePage.d.ts +39 -0
- package/dist/models/AutolaunchRulePage.js +55 -0
- package/dist/models/MarketHistoryPoint.d.ts +59 -0
- package/dist/models/MarketHistoryPoint.js +62 -0
- package/dist/models/MarketHistoryResponse.d.ts +60 -0
- package/dist/models/MarketHistoryResponse.js +67 -0
- package/dist/models/Problem.d.ts +1 -0
- package/dist/models/Problem.js +1 -0
- package/dist/models/WatchRule.d.ts +141 -0
- package/dist/models/WatchRule.js +125 -0
- package/dist/models/WatchRuleCreate.d.ts +87 -0
- package/dist/models/WatchRuleCreate.js +80 -0
- package/dist/models/WatchRulePage.d.ts +39 -0
- package/dist/models/WatchRulePage.js +55 -0
- package/dist/models/WatchRuleUpdate.d.ts +86 -0
- package/dist/models/WatchRuleUpdate.js +76 -0
- package/dist/models/index.d.ts +10 -0
- package/dist/models/index.js +10 -0
- package/docs/AutolaunchApi.md +390 -0
- package/docs/AutolaunchRule.md +69 -0
- package/docs/AutolaunchRuleCreate.md +50 -0
- package/docs/AutolaunchRuleDisarm.md +35 -0
- package/docs/AutolaunchRulePage.md +36 -0
- package/docs/MarketApi.md +98 -0
- package/docs/MarketHistoryPoint.md +43 -0
- package/docs/MarketHistoryResponse.md +43 -0
- package/docs/WatchApi.md +389 -0
- package/docs/WatchRule.md +61 -0
- package/docs/WatchRuleCreate.md +46 -0
- package/docs/WatchRulePage.md +36 -0
- package/docs/WatchRuleUpdate.md +47 -0
- package/package.json +1 -1
- package/src/apis/AutolaunchApi.ts +360 -0
- package/src/apis/MarketApi.ts +136 -0
- package/src/apis/WatchApi.ts +360 -0
- package/src/apis/index.ts +3 -0
- package/src/models/AutolaunchRule.ts +270 -0
- package/src/models/AutolaunchRuleCreate.ts +162 -0
- package/src/models/AutolaunchRuleDisarm.ts +68 -0
- package/src/models/AutolaunchRulePage.ts +83 -0
- package/src/models/MarketHistoryPoint.ts +103 -0
- package/src/models/MarketHistoryResponse.ts +113 -0
- package/src/models/Problem.ts +1 -0
- package/src/models/WatchRule.ts +219 -0
- package/src/models/WatchRuleCreate.ts +138 -0
- package/src/models/WatchRulePage.ts +83 -0
- package/src/models/WatchRuleUpdate.ts +135 -0
- package/src/models/index.ts +10 -0
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* GPU.ai Public Developer API
|
|
5
|
+
* Programmatic API for GPU.ai. Authenticate with API keys minted from the dashboard. See https://gpu.ai/docs for details.
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0.0
|
|
8
|
+
* Contact: support@gpu.ai
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
/**
|
|
17
|
+
* 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.
|
|
18
|
+
*
|
|
19
|
+
* @export
|
|
20
|
+
* @interface WatchRule
|
|
21
|
+
*/
|
|
22
|
+
export interface WatchRule {
|
|
23
|
+
/**
|
|
24
|
+
*
|
|
25
|
+
* @type {string}
|
|
26
|
+
* @memberof WatchRule
|
|
27
|
+
*/
|
|
28
|
+
id: string;
|
|
29
|
+
/**
|
|
30
|
+
* The GPU model the rule watches, e.g. "H100".
|
|
31
|
+
* @type {string}
|
|
32
|
+
* @memberof WatchRule
|
|
33
|
+
*/
|
|
34
|
+
gpuModel: string;
|
|
35
|
+
/**
|
|
36
|
+
* Canonical region the rule is narrowed to, or null for every region.
|
|
37
|
+
* @type {string}
|
|
38
|
+
* @memberof WatchRule
|
|
39
|
+
*/
|
|
40
|
+
region: string | null;
|
|
41
|
+
/**
|
|
42
|
+
* Capacity class the rule is narrowed to, or null for both.
|
|
43
|
+
* @type {WatchRuleCapacityClassEnum}
|
|
44
|
+
* @memberof WatchRule
|
|
45
|
+
*/
|
|
46
|
+
capacityClass: WatchRuleCapacityClassEnum | null;
|
|
47
|
+
/**
|
|
48
|
+
*
|
|
49
|
+
* @type {WatchRuleConditionKindEnum}
|
|
50
|
+
* @memberof WatchRule
|
|
51
|
+
*/
|
|
52
|
+
conditionKind: WatchRuleConditionKindEnum;
|
|
53
|
+
/**
|
|
54
|
+
* Per-GPU hourly price for price_under, or a unit count for count_at_least. Null for in_stock, which takes no threshold.
|
|
55
|
+
*
|
|
56
|
+
* @type {number}
|
|
57
|
+
* @memberof WatchRule
|
|
58
|
+
*/
|
|
59
|
+
threshold: number | null;
|
|
60
|
+
/**
|
|
61
|
+
* armed = the condition is currently false and the next transition to true will alert. fired = it has alerted and has not yet re-armed.
|
|
62
|
+
*
|
|
63
|
+
* @type {WatchRuleStateEnum}
|
|
64
|
+
* @memberof WatchRule
|
|
65
|
+
*/
|
|
66
|
+
state: WatchRuleStateEnum;
|
|
67
|
+
/**
|
|
68
|
+
*
|
|
69
|
+
* @type {Date}
|
|
70
|
+
* @memberof WatchRule
|
|
71
|
+
*/
|
|
72
|
+
lastFiredAt: Date | null;
|
|
73
|
+
/**
|
|
74
|
+
* While set, the rule will not re-fire even if the condition re-crosses — the quiet window that stops a boundary-hugging signal alerting on every crossing.
|
|
75
|
+
*
|
|
76
|
+
* @type {Date}
|
|
77
|
+
* @memberof WatchRule
|
|
78
|
+
*/
|
|
79
|
+
quietUntil: Date | null;
|
|
80
|
+
/**
|
|
81
|
+
* Id of a webhook endpoint registered by this organization, or null to deliver to every registered endpoint. Never a URL.
|
|
82
|
+
*
|
|
83
|
+
* @type {string}
|
|
84
|
+
* @memberof WatchRule
|
|
85
|
+
*/
|
|
86
|
+
webhookEndpointOverrideId: string | null;
|
|
87
|
+
/**
|
|
88
|
+
*
|
|
89
|
+
* @type {boolean}
|
|
90
|
+
* @memberof WatchRule
|
|
91
|
+
*/
|
|
92
|
+
enabled: boolean;
|
|
93
|
+
/**
|
|
94
|
+
* Why an automatically disabled rule was disabled — for example its creator no longer belongs to the organization.
|
|
95
|
+
*
|
|
96
|
+
* @type {string}
|
|
97
|
+
* @memberof WatchRule
|
|
98
|
+
*/
|
|
99
|
+
deactivatedReason: string | null;
|
|
100
|
+
/**
|
|
101
|
+
*
|
|
102
|
+
* @type {Date}
|
|
103
|
+
* @memberof WatchRule
|
|
104
|
+
*/
|
|
105
|
+
createdAt: Date;
|
|
106
|
+
/**
|
|
107
|
+
*
|
|
108
|
+
* @type {Date}
|
|
109
|
+
* @memberof WatchRule
|
|
110
|
+
*/
|
|
111
|
+
updatedAt: Date;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* @export
|
|
117
|
+
*/
|
|
118
|
+
export const WatchRuleCapacityClassEnum = {
|
|
119
|
+
Secure: 'secure',
|
|
120
|
+
Community: 'community'
|
|
121
|
+
} as const;
|
|
122
|
+
export type WatchRuleCapacityClassEnum = typeof WatchRuleCapacityClassEnum[keyof typeof WatchRuleCapacityClassEnum];
|
|
123
|
+
|
|
124
|
+
/**
|
|
125
|
+
* @export
|
|
126
|
+
*/
|
|
127
|
+
export const WatchRuleConditionKindEnum = {
|
|
128
|
+
PriceUnder: 'price_under',
|
|
129
|
+
InStock: 'in_stock',
|
|
130
|
+
CountAtLeast: 'count_at_least'
|
|
131
|
+
} as const;
|
|
132
|
+
export type WatchRuleConditionKindEnum = typeof WatchRuleConditionKindEnum[keyof typeof WatchRuleConditionKindEnum];
|
|
133
|
+
|
|
134
|
+
/**
|
|
135
|
+
* @export
|
|
136
|
+
*/
|
|
137
|
+
export const WatchRuleStateEnum = {
|
|
138
|
+
Armed: 'armed',
|
|
139
|
+
Fired: 'fired'
|
|
140
|
+
} as const;
|
|
141
|
+
export type WatchRuleStateEnum = typeof WatchRuleStateEnum[keyof typeof WatchRuleStateEnum];
|
|
142
|
+
|
|
143
|
+
|
|
144
|
+
/**
|
|
145
|
+
* Check if a given object implements the WatchRule interface.
|
|
146
|
+
*/
|
|
147
|
+
export function instanceOfWatchRule(value: object): value is WatchRule {
|
|
148
|
+
if (!('id' in value) || value['id'] === undefined) return false;
|
|
149
|
+
if ((!('gpuModel' in (value as Record<string, any>)) && !('gpu_model' in (value as Record<string, any>))) || ((value as Record<string, any>)['gpuModel'] === undefined && (value as Record<string, any>)['gpu_model'] === undefined)) return false;
|
|
150
|
+
if (!('region' in value) || value['region'] === undefined) return false;
|
|
151
|
+
if ((!('capacityClass' in (value as Record<string, any>)) && !('capacity_class' in (value as Record<string, any>))) || ((value as Record<string, any>)['capacityClass'] === undefined && (value as Record<string, any>)['capacity_class'] === undefined)) return false;
|
|
152
|
+
if ((!('conditionKind' in (value as Record<string, any>)) && !('condition_kind' in (value as Record<string, any>))) || ((value as Record<string, any>)['conditionKind'] === undefined && (value as Record<string, any>)['condition_kind'] === undefined)) return false;
|
|
153
|
+
if (!('threshold' in value) || value['threshold'] === undefined) return false;
|
|
154
|
+
if (!('state' in value) || value['state'] === undefined) return false;
|
|
155
|
+
if ((!('lastFiredAt' in (value as Record<string, any>)) && !('last_fired_at' in (value as Record<string, any>))) || ((value as Record<string, any>)['lastFiredAt'] === undefined && (value as Record<string, any>)['last_fired_at'] === undefined)) return false;
|
|
156
|
+
if ((!('quietUntil' in (value as Record<string, any>)) && !('quiet_until' in (value as Record<string, any>))) || ((value as Record<string, any>)['quietUntil'] === undefined && (value as Record<string, any>)['quiet_until'] === undefined)) return false;
|
|
157
|
+
if ((!('webhookEndpointOverrideId' in (value as Record<string, any>)) && !('webhook_endpoint_override_id' in (value as Record<string, any>))) || ((value as Record<string, any>)['webhookEndpointOverrideId'] === undefined && (value as Record<string, any>)['webhook_endpoint_override_id'] === undefined)) return false;
|
|
158
|
+
if (!('enabled' in value) || value['enabled'] === undefined) return false;
|
|
159
|
+
if ((!('deactivatedReason' in (value as Record<string, any>)) && !('deactivated_reason' in (value as Record<string, any>))) || ((value as Record<string, any>)['deactivatedReason'] === undefined && (value as Record<string, any>)['deactivated_reason'] === undefined)) return false;
|
|
160
|
+
if ((!('createdAt' in (value as Record<string, any>)) && !('created_at' in (value as Record<string, any>))) || ((value as Record<string, any>)['createdAt'] === undefined && (value as Record<string, any>)['created_at'] === undefined)) return false;
|
|
161
|
+
if ((!('updatedAt' in (value as Record<string, any>)) && !('updated_at' in (value as Record<string, any>))) || ((value as Record<string, any>)['updatedAt'] === undefined && (value as Record<string, any>)['updated_at'] === undefined)) return false;
|
|
162
|
+
return true;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
export function WatchRuleFromJSON(json: any): WatchRule {
|
|
166
|
+
return WatchRuleFromJSONTyped(json, false);
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
export function WatchRuleFromJSONTyped(json: any, ignoreDiscriminator: boolean): WatchRule {
|
|
170
|
+
if (json == null) {
|
|
171
|
+
return json;
|
|
172
|
+
}
|
|
173
|
+
return {
|
|
174
|
+
|
|
175
|
+
'id': json['id'],
|
|
176
|
+
'gpuModel': json['gpu_model'],
|
|
177
|
+
'region': json['region'],
|
|
178
|
+
'capacityClass': json['capacity_class'],
|
|
179
|
+
'conditionKind': json['condition_kind'],
|
|
180
|
+
'threshold': json['threshold'],
|
|
181
|
+
'state': json['state'],
|
|
182
|
+
'lastFiredAt': (json['last_fired_at'] == null ? null : new Date(json['last_fired_at'])),
|
|
183
|
+
'quietUntil': (json['quiet_until'] == null ? null : new Date(json['quiet_until'])),
|
|
184
|
+
'webhookEndpointOverrideId': json['webhook_endpoint_override_id'],
|
|
185
|
+
'enabled': json['enabled'],
|
|
186
|
+
'deactivatedReason': json['deactivated_reason'],
|
|
187
|
+
'createdAt': (new Date(json['created_at'])),
|
|
188
|
+
'updatedAt': (new Date(json['updated_at'])),
|
|
189
|
+
};
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
export function WatchRuleToJSON(json: any): WatchRule {
|
|
193
|
+
return WatchRuleToJSONTyped(json, false);
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
export function WatchRuleToJSONTyped(value?: WatchRule | null, ignoreDiscriminator: boolean = false): any {
|
|
197
|
+
if (value == null) {
|
|
198
|
+
return value;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
return {
|
|
202
|
+
|
|
203
|
+
'id': value['id'],
|
|
204
|
+
'gpu_model': value['gpuModel'],
|
|
205
|
+
'region': value['region'],
|
|
206
|
+
'capacity_class': value['capacityClass'],
|
|
207
|
+
'condition_kind': value['conditionKind'],
|
|
208
|
+
'threshold': value['threshold'],
|
|
209
|
+
'state': value['state'],
|
|
210
|
+
'last_fired_at': value['lastFiredAt'] == null ? value['lastFiredAt'] : value['lastFiredAt'].toISOString(),
|
|
211
|
+
'quiet_until': value['quietUntil'] == null ? value['quietUntil'] : value['quietUntil'].toISOString(),
|
|
212
|
+
'webhook_endpoint_override_id': value['webhookEndpointOverrideId'],
|
|
213
|
+
'enabled': value['enabled'],
|
|
214
|
+
'deactivated_reason': value['deactivatedReason'],
|
|
215
|
+
'created_at': value['createdAt'].toISOString(),
|
|
216
|
+
'updated_at': value['updatedAt'].toISOString(),
|
|
217
|
+
};
|
|
218
|
+
}
|
|
219
|
+
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* GPU.ai Public Developer API
|
|
5
|
+
* Programmatic API for GPU.ai. Authenticate with API keys minted from the dashboard. See https://gpu.ai/docs for details.
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0.0
|
|
8
|
+
* Contact: support@gpu.ai
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
* @export
|
|
19
|
+
* @interface WatchRuleCreate
|
|
20
|
+
*/
|
|
21
|
+
export interface WatchRuleCreate {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof WatchRuleCreate
|
|
26
|
+
*/
|
|
27
|
+
gpuModel: string;
|
|
28
|
+
/**
|
|
29
|
+
* Omit or send null to watch every region.
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof WatchRuleCreate
|
|
32
|
+
*/
|
|
33
|
+
region?: string | null;
|
|
34
|
+
/**
|
|
35
|
+
* Omit or send null to watch both capacity classes.
|
|
36
|
+
* @type {WatchRuleCreateCapacityClassEnum}
|
|
37
|
+
* @memberof WatchRuleCreate
|
|
38
|
+
*/
|
|
39
|
+
capacityClass?: WatchRuleCreateCapacityClassEnum | null;
|
|
40
|
+
/**
|
|
41
|
+
*
|
|
42
|
+
* @type {WatchRuleCreateConditionKindEnum}
|
|
43
|
+
* @memberof WatchRuleCreate
|
|
44
|
+
*/
|
|
45
|
+
conditionKind: WatchRuleCreateConditionKindEnum;
|
|
46
|
+
/**
|
|
47
|
+
* Required and greater than zero for price_under and count_at_least. Ignored for in_stock, which is stored with no threshold.
|
|
48
|
+
*
|
|
49
|
+
* @type {number}
|
|
50
|
+
* @memberof WatchRuleCreate
|
|
51
|
+
*/
|
|
52
|
+
threshold?: number | null;
|
|
53
|
+
/**
|
|
54
|
+
* Id of an endpoint already registered via /webhook-endpoints. A URL here is rejected: the resource holds references, never addresses.
|
|
55
|
+
*
|
|
56
|
+
* @type {string}
|
|
57
|
+
* @memberof WatchRuleCreate
|
|
58
|
+
*/
|
|
59
|
+
webhookEndpointOverrideId?: string | null;
|
|
60
|
+
/**
|
|
61
|
+
* Defaults to true. Create with false to park a rule.
|
|
62
|
+
* @type {boolean}
|
|
63
|
+
* @memberof WatchRuleCreate
|
|
64
|
+
*/
|
|
65
|
+
enabled?: boolean;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* @export
|
|
71
|
+
*/
|
|
72
|
+
export const WatchRuleCreateCapacityClassEnum = {
|
|
73
|
+
Secure: 'secure',
|
|
74
|
+
Community: 'community'
|
|
75
|
+
} as const;
|
|
76
|
+
export type WatchRuleCreateCapacityClassEnum = typeof WatchRuleCreateCapacityClassEnum[keyof typeof WatchRuleCreateCapacityClassEnum];
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* @export
|
|
80
|
+
*/
|
|
81
|
+
export const WatchRuleCreateConditionKindEnum = {
|
|
82
|
+
PriceUnder: 'price_under',
|
|
83
|
+
InStock: 'in_stock',
|
|
84
|
+
CountAtLeast: 'count_at_least'
|
|
85
|
+
} as const;
|
|
86
|
+
export type WatchRuleCreateConditionKindEnum = typeof WatchRuleCreateConditionKindEnum[keyof typeof WatchRuleCreateConditionKindEnum];
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* Check if a given object implements the WatchRuleCreate interface.
|
|
91
|
+
*/
|
|
92
|
+
export function instanceOfWatchRuleCreate(value: object): value is WatchRuleCreate {
|
|
93
|
+
if ((!('gpuModel' in (value as Record<string, any>)) && !('gpu_model' in (value as Record<string, any>))) || ((value as Record<string, any>)['gpuModel'] === undefined && (value as Record<string, any>)['gpu_model'] === undefined)) return false;
|
|
94
|
+
if ((!('conditionKind' in (value as Record<string, any>)) && !('condition_kind' in (value as Record<string, any>))) || ((value as Record<string, any>)['conditionKind'] === undefined && (value as Record<string, any>)['condition_kind'] === undefined)) return false;
|
|
95
|
+
return true;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
export function WatchRuleCreateFromJSON(json: any): WatchRuleCreate {
|
|
99
|
+
return WatchRuleCreateFromJSONTyped(json, false);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
export function WatchRuleCreateFromJSONTyped(json: any, ignoreDiscriminator: boolean): WatchRuleCreate {
|
|
103
|
+
if (json == null) {
|
|
104
|
+
return json;
|
|
105
|
+
}
|
|
106
|
+
return {
|
|
107
|
+
|
|
108
|
+
'gpuModel': json['gpu_model'],
|
|
109
|
+
'region': json['region'] === undefined ? undefined : json['region'] === null ? null : json['region'],
|
|
110
|
+
'capacityClass': json['capacity_class'] === undefined ? undefined : json['capacity_class'] === null ? null : json['capacity_class'],
|
|
111
|
+
'conditionKind': json['condition_kind'],
|
|
112
|
+
'threshold': json['threshold'] === undefined ? undefined : json['threshold'] === null ? null : json['threshold'],
|
|
113
|
+
'webhookEndpointOverrideId': json['webhook_endpoint_override_id'] === undefined ? undefined : json['webhook_endpoint_override_id'] === null ? null : json['webhook_endpoint_override_id'],
|
|
114
|
+
'enabled': json['enabled'] == null ? undefined : json['enabled'],
|
|
115
|
+
};
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
export function WatchRuleCreateToJSON(json: any): WatchRuleCreate {
|
|
119
|
+
return WatchRuleCreateToJSONTyped(json, false);
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
export function WatchRuleCreateToJSONTyped(value?: WatchRuleCreate | null, ignoreDiscriminator: boolean = false): any {
|
|
123
|
+
if (value == null) {
|
|
124
|
+
return value;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
return {
|
|
128
|
+
|
|
129
|
+
'gpu_model': value['gpuModel'],
|
|
130
|
+
'region': value['region'],
|
|
131
|
+
'capacity_class': value['capacityClass'],
|
|
132
|
+
'condition_kind': value['conditionKind'],
|
|
133
|
+
'threshold': value['threshold'],
|
|
134
|
+
'webhook_endpoint_override_id': value['webhookEndpointOverrideId'],
|
|
135
|
+
'enabled': value['enabled'],
|
|
136
|
+
};
|
|
137
|
+
}
|
|
138
|
+
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* GPU.ai Public Developer API
|
|
5
|
+
* Programmatic API for GPU.ai. Authenticate with API keys minted from the dashboard. See https://gpu.ai/docs for details.
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0.0
|
|
8
|
+
* Contact: support@gpu.ai
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
import type { WatchRule } from './WatchRule';
|
|
17
|
+
import {
|
|
18
|
+
WatchRuleFromJSON,
|
|
19
|
+
WatchRuleFromJSONTyped,
|
|
20
|
+
WatchRuleToJSON,
|
|
21
|
+
WatchRuleToJSONTyped,
|
|
22
|
+
} from './WatchRule';
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @export
|
|
27
|
+
* @interface WatchRulePage
|
|
28
|
+
*/
|
|
29
|
+
export interface WatchRulePage {
|
|
30
|
+
/**
|
|
31
|
+
*
|
|
32
|
+
* @type {Array<WatchRule>}
|
|
33
|
+
* @memberof WatchRulePage
|
|
34
|
+
*/
|
|
35
|
+
data: Array<WatchRule>;
|
|
36
|
+
/**
|
|
37
|
+
*
|
|
38
|
+
* @type {string}
|
|
39
|
+
* @memberof WatchRulePage
|
|
40
|
+
*/
|
|
41
|
+
nextCursor: string | null;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Check if a given object implements the WatchRulePage interface.
|
|
46
|
+
*/
|
|
47
|
+
export function instanceOfWatchRulePage(value: object): value is WatchRulePage {
|
|
48
|
+
if (!('data' in value) || value['data'] === undefined) return false;
|
|
49
|
+
if ((!('nextCursor' in (value as Record<string, any>)) && !('next_cursor' in (value as Record<string, any>))) || ((value as Record<string, any>)['nextCursor'] === undefined && (value as Record<string, any>)['next_cursor'] === undefined)) return false;
|
|
50
|
+
return true;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export function WatchRulePageFromJSON(json: any): WatchRulePage {
|
|
54
|
+
return WatchRulePageFromJSONTyped(json, false);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export function WatchRulePageFromJSONTyped(json: any, ignoreDiscriminator: boolean): WatchRulePage {
|
|
58
|
+
if (json == null) {
|
|
59
|
+
return json;
|
|
60
|
+
}
|
|
61
|
+
return {
|
|
62
|
+
|
|
63
|
+
'data': ((json['data'] as Array<any>).map(WatchRuleFromJSON)),
|
|
64
|
+
'nextCursor': json['next_cursor'],
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export function WatchRulePageToJSON(json: any): WatchRulePage {
|
|
69
|
+
return WatchRulePageToJSONTyped(json, false);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export function WatchRulePageToJSONTyped(value?: WatchRulePage | null, ignoreDiscriminator: boolean = false): any {
|
|
73
|
+
if (value == null) {
|
|
74
|
+
return value;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
return {
|
|
78
|
+
|
|
79
|
+
'data': ((value['data'] as Array<any>).map(WatchRuleToJSON)),
|
|
80
|
+
'next_cursor': value['nextCursor'],
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* GPU.ai Public Developer API
|
|
5
|
+
* Programmatic API for GPU.ai. Authenticate with API keys minted from the dashboard. See https://gpu.ai/docs for details.
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0.0
|
|
8
|
+
* Contact: support@gpu.ai
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
/**
|
|
17
|
+
* 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.
|
|
18
|
+
*
|
|
19
|
+
* @export
|
|
20
|
+
* @interface WatchRuleUpdate
|
|
21
|
+
*/
|
|
22
|
+
export interface WatchRuleUpdate {
|
|
23
|
+
/**
|
|
24
|
+
*
|
|
25
|
+
* @type {string}
|
|
26
|
+
* @memberof WatchRuleUpdate
|
|
27
|
+
*/
|
|
28
|
+
gpuModel?: string;
|
|
29
|
+
/**
|
|
30
|
+
*
|
|
31
|
+
* @type {string}
|
|
32
|
+
* @memberof WatchRuleUpdate
|
|
33
|
+
*/
|
|
34
|
+
region?: string | null;
|
|
35
|
+
/**
|
|
36
|
+
*
|
|
37
|
+
* @type {WatchRuleUpdateCapacityClassEnum}
|
|
38
|
+
* @memberof WatchRuleUpdate
|
|
39
|
+
*/
|
|
40
|
+
capacityClass?: WatchRuleUpdateCapacityClassEnum | null;
|
|
41
|
+
/**
|
|
42
|
+
*
|
|
43
|
+
* @type {WatchRuleUpdateConditionKindEnum}
|
|
44
|
+
* @memberof WatchRuleUpdate
|
|
45
|
+
*/
|
|
46
|
+
conditionKind?: WatchRuleUpdateConditionKindEnum;
|
|
47
|
+
/**
|
|
48
|
+
*
|
|
49
|
+
* @type {number}
|
|
50
|
+
* @memberof WatchRuleUpdate
|
|
51
|
+
*/
|
|
52
|
+
threshold?: number | null;
|
|
53
|
+
/**
|
|
54
|
+
*
|
|
55
|
+
* @type {string}
|
|
56
|
+
* @memberof WatchRuleUpdate
|
|
57
|
+
*/
|
|
58
|
+
webhookEndpointOverrideId?: string | null;
|
|
59
|
+
/**
|
|
60
|
+
*
|
|
61
|
+
* @type {boolean}
|
|
62
|
+
* @memberof WatchRuleUpdate
|
|
63
|
+
*/
|
|
64
|
+
enabled?: boolean;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* @export
|
|
70
|
+
*/
|
|
71
|
+
export const WatchRuleUpdateCapacityClassEnum = {
|
|
72
|
+
Secure: 'secure',
|
|
73
|
+
Community: 'community'
|
|
74
|
+
} as const;
|
|
75
|
+
export type WatchRuleUpdateCapacityClassEnum = typeof WatchRuleUpdateCapacityClassEnum[keyof typeof WatchRuleUpdateCapacityClassEnum];
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* @export
|
|
79
|
+
*/
|
|
80
|
+
export const WatchRuleUpdateConditionKindEnum = {
|
|
81
|
+
PriceUnder: 'price_under',
|
|
82
|
+
InStock: 'in_stock',
|
|
83
|
+
CountAtLeast: 'count_at_least'
|
|
84
|
+
} as const;
|
|
85
|
+
export type WatchRuleUpdateConditionKindEnum = typeof WatchRuleUpdateConditionKindEnum[keyof typeof WatchRuleUpdateConditionKindEnum];
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* Check if a given object implements the WatchRuleUpdate interface.
|
|
90
|
+
*/
|
|
91
|
+
export function instanceOfWatchRuleUpdate(value: object): value is WatchRuleUpdate {
|
|
92
|
+
return true;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
export function WatchRuleUpdateFromJSON(json: any): WatchRuleUpdate {
|
|
96
|
+
return WatchRuleUpdateFromJSONTyped(json, false);
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
export function WatchRuleUpdateFromJSONTyped(json: any, ignoreDiscriminator: boolean): WatchRuleUpdate {
|
|
100
|
+
if (json == null) {
|
|
101
|
+
return json;
|
|
102
|
+
}
|
|
103
|
+
return {
|
|
104
|
+
|
|
105
|
+
'gpuModel': json['gpu_model'] == null ? undefined : json['gpu_model'],
|
|
106
|
+
'region': json['region'] === undefined ? undefined : json['region'] === null ? null : json['region'],
|
|
107
|
+
'capacityClass': json['capacity_class'] === undefined ? undefined : json['capacity_class'] === null ? null : json['capacity_class'],
|
|
108
|
+
'conditionKind': json['condition_kind'] == null ? undefined : json['condition_kind'],
|
|
109
|
+
'threshold': json['threshold'] === undefined ? undefined : json['threshold'] === null ? null : json['threshold'],
|
|
110
|
+
'webhookEndpointOverrideId': json['webhook_endpoint_override_id'] === undefined ? undefined : json['webhook_endpoint_override_id'] === null ? null : json['webhook_endpoint_override_id'],
|
|
111
|
+
'enabled': json['enabled'] == null ? undefined : json['enabled'],
|
|
112
|
+
};
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
export function WatchRuleUpdateToJSON(json: any): WatchRuleUpdate {
|
|
116
|
+
return WatchRuleUpdateToJSONTyped(json, false);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
export function WatchRuleUpdateToJSONTyped(value?: WatchRuleUpdate | null, ignoreDiscriminator: boolean = false): any {
|
|
120
|
+
if (value == null) {
|
|
121
|
+
return value;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
return {
|
|
125
|
+
|
|
126
|
+
'gpu_model': value['gpuModel'],
|
|
127
|
+
'region': value['region'],
|
|
128
|
+
'capacity_class': value['capacityClass'],
|
|
129
|
+
'condition_kind': value['conditionKind'],
|
|
130
|
+
'threshold': value['threshold'],
|
|
131
|
+
'webhook_endpoint_override_id': value['webhookEndpointOverrideId'],
|
|
132
|
+
'enabled': value['enabled'],
|
|
133
|
+
};
|
|
134
|
+
}
|
|
135
|
+
|
package/src/models/index.ts
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
|
+
export * from './AutolaunchRule';
|
|
4
|
+
export * from './AutolaunchRuleCreate';
|
|
5
|
+
export * from './AutolaunchRuleDisarm';
|
|
6
|
+
export * from './AutolaunchRulePage';
|
|
3
7
|
export * from './ChatChoice';
|
|
4
8
|
export * from './ChatCompletionRequest';
|
|
5
9
|
export * from './ChatCompletionResponse';
|
|
@@ -47,6 +51,8 @@ export * from './InstancePage';
|
|
|
47
51
|
export * from './ListCommunityMachines200Response';
|
|
48
52
|
export * from './ListDeposits200Response';
|
|
49
53
|
export * from './ListRegistryCredentials200Response';
|
|
54
|
+
export * from './MarketHistoryPoint';
|
|
55
|
+
export * from './MarketHistoryResponse';
|
|
50
56
|
export * from './Model';
|
|
51
57
|
export * from './ModelList';
|
|
52
58
|
export * from './ModelParametersInner';
|
|
@@ -79,5 +85,9 @@ export * from './VMImage';
|
|
|
79
85
|
export * from './VideoCreateRequest';
|
|
80
86
|
export * from './VideoJob';
|
|
81
87
|
export * from './VideoList';
|
|
88
|
+
export * from './WatchRule';
|
|
89
|
+
export * from './WatchRuleCreate';
|
|
90
|
+
export * from './WatchRulePage';
|
|
91
|
+
export * from './WatchRuleUpdate';
|
|
82
92
|
export * from './WebhookEndpoint';
|
|
83
93
|
export * from './WebhookEndpointPage';
|