@gpuai/sdk 0.3.7 → 0.3.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/dist/esm/models/CreateInstanceRequest.d.ts +6 -0
- package/dist/esm/models/CreateInstanceRequest.js +2 -0
- package/dist/esm/models/Instance.d.ts +13 -1
- package/dist/esm/models/Instance.js +4 -0
- package/dist/models/CreateInstanceRequest.d.ts +6 -0
- package/dist/models/CreateInstanceRequest.js +2 -0
- package/dist/models/Instance.d.ts +13 -1
- package/dist/models/Instance.js +4 -0
- package/docs/CreateInstanceRequest.md +2 -0
- package/docs/Instance.md +4 -0
- package/package.json +1 -1
- package/src/models/CreateInstanceRequest.ts +8 -0
- package/src/models/Instance.ts +17 -1
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# @gpuai/sdk@0.3.
|
|
1
|
+
# @gpuai/sdk@0.3.8
|
|
2
2
|
|
|
3
3
|
A TypeScript SDK client for the api.gpu.ai API.
|
|
4
4
|
|
|
@@ -203,7 +203,7 @@ and is automatically generated by the
|
|
|
203
203
|
[OpenAPI Generator](https://openapi-generator.tech) project:
|
|
204
204
|
|
|
205
205
|
- API version: `1.0.0`
|
|
206
|
-
- Package version: `0.3.
|
|
206
|
+
- Package version: `0.3.8`
|
|
207
207
|
- Generator version: `7.24.0`
|
|
208
208
|
- Build package: `org.openapitools.codegen.languages.TypeScriptFetchClientCodegen`
|
|
209
209
|
|
|
@@ -88,6 +88,12 @@ export interface CreateInstanceRequest {
|
|
|
88
88
|
* @memberof CreateInstanceRequest
|
|
89
89
|
*/
|
|
90
90
|
diskGb?: number;
|
|
91
|
+
/**
|
|
92
|
+
* Terminate this instance automatically after this many hours of runtime. Omit for no limit (the default). The countdown starts when the instance reaches `running`, not when you call this — provisioning is neither billed nor counted against the limit — and the resolved deadline is returned as `auto_terminate_at` on every read. Enforcement is server-side and survives your process: this is the safety net for an unattended run whose client dies without cleaning up. When it fires the instance is terminated exactly as a DELETE would terminate it (billing stops, the `instance.terminated` webhook fires) and `status_reason` records that the limit was reached. Bounds: at least 1, at most 720 (30 days) — outside them returns 422 `validation_failed`. An explicit `0` is rejected rather than read as "no limit"; omit the field for that.
|
|
93
|
+
* @type {number}
|
|
94
|
+
* @memberof CreateInstanceRequest
|
|
95
|
+
*/
|
|
96
|
+
autoTerminateHours?: number;
|
|
91
97
|
/**
|
|
92
98
|
* Environment variables. With `template_id`: per-deploy overrides — only keys the template marks user_overridable are accepted (others 422), and secret values are redacted from operation metadata. With `image`: plain container env vars — keys must be POSIX names and the platform's reserved namespace (`PUBLIC_KEY`, `GPUAI_*`) is refused (422).
|
|
93
99
|
* @type {{ [key: string]: string; }}
|
|
@@ -51,6 +51,7 @@ export function CreateInstanceRequestFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
51
51
|
'environment': json['environment'] == null ? undefined : json['environment'],
|
|
52
52
|
'offeringId': json['offering_id'] == null ? undefined : json['offering_id'],
|
|
53
53
|
'diskGb': json['disk_gb'] == null ? undefined : json['disk_gb'],
|
|
54
|
+
'autoTerminateHours': json['auto_terminate_hours'] == null ? undefined : json['auto_terminate_hours'],
|
|
54
55
|
'env': json['env'] == null ? undefined : json['env'],
|
|
55
56
|
'image': json['image'] == null ? undefined : json['image'],
|
|
56
57
|
'registryCredentialId': json['registry_credential_id'] == null ? undefined : json['registry_credential_id'],
|
|
@@ -79,6 +80,7 @@ export function CreateInstanceRequestToJSONTyped(value, ignoreDiscriminator = fa
|
|
|
79
80
|
'environment': value['environment'],
|
|
80
81
|
'offering_id': value['offeringId'],
|
|
81
82
|
'disk_gb': value['diskGb'],
|
|
83
|
+
'auto_terminate_hours': value['autoTerminateHours'],
|
|
82
84
|
'env': value['env'],
|
|
83
85
|
'image': value['image'],
|
|
84
86
|
'registry_credential_id': value['registryCredentialId'],
|
|
@@ -83,7 +83,19 @@ export interface Instance {
|
|
|
83
83
|
*/
|
|
84
84
|
image?: string;
|
|
85
85
|
/**
|
|
86
|
-
*
|
|
86
|
+
* The runtime limit this instance was launched with, in hours (the `auto_terminate_hours` you sent). Absent means the instance runs until something stops it. It stays present after the limit has fired, so a terminated instance still explains itself.
|
|
87
|
+
* @type {number}
|
|
88
|
+
* @memberof Instance
|
|
89
|
+
*/
|
|
90
|
+
autoTerminateHours?: number;
|
|
91
|
+
/**
|
|
92
|
+
* When the runtime limit expires and the platform terminates this instance. Computed when the instance became running (ready_at + auto_terminate_hours), so the countdown covers usable runtime, not the time spent provisioning. Absent when no limit was set, when the instance is not running yet, or once the platform has begun acting on an elapsed limit.
|
|
93
|
+
* @type {Date}
|
|
94
|
+
* @memberof Instance
|
|
95
|
+
*/
|
|
96
|
+
autoTerminateAt?: Date;
|
|
97
|
+
/**
|
|
98
|
+
* Why the instance stopped or failed, e.g. "provisioning stalled: the instance started but never became reachable", or — when a runtime limit fired — "Terminated: this instance reached the 8-hour runtime limit set at launch". Present only when the platform has something to explain.
|
|
87
99
|
* @type {string}
|
|
88
100
|
* @memberof Instance
|
|
89
101
|
*/
|
|
@@ -73,6 +73,8 @@ export function InstanceFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
73
73
|
'connection': json['connection'] == null ? undefined : InstanceConnectionFromJSON(json['connection']),
|
|
74
74
|
'diskGb': json['disk_gb'] == null ? undefined : json['disk_gb'],
|
|
75
75
|
'image': json['image'] == null ? undefined : json['image'],
|
|
76
|
+
'autoTerminateHours': json['auto_terminate_hours'] == null ? undefined : json['auto_terminate_hours'],
|
|
77
|
+
'autoTerminateAt': json['auto_terminate_at'] == null ? undefined : (new Date(json['auto_terminate_at'])),
|
|
76
78
|
'statusReason': json['status_reason'] == null ? undefined : json['status_reason'],
|
|
77
79
|
'createdAt': (new Date(json['created_at'])),
|
|
78
80
|
'readyAt': json['ready_at'] == null ? undefined : (new Date(json['ready_at'])),
|
|
@@ -100,6 +102,8 @@ export function InstanceToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
100
102
|
'connection': InstanceConnectionToJSON(value['connection']),
|
|
101
103
|
'disk_gb': value['diskGb'],
|
|
102
104
|
'image': value['image'],
|
|
105
|
+
'auto_terminate_hours': value['autoTerminateHours'],
|
|
106
|
+
'auto_terminate_at': value['autoTerminateAt'] == null ? value['autoTerminateAt'] : value['autoTerminateAt'].toISOString(),
|
|
103
107
|
'status_reason': value['statusReason'],
|
|
104
108
|
'created_at': value['createdAt'].toISOString(),
|
|
105
109
|
'ready_at': value['readyAt'] == null ? value['readyAt'] : value['readyAt'].toISOString(),
|
|
@@ -88,6 +88,12 @@ export interface CreateInstanceRequest {
|
|
|
88
88
|
* @memberof CreateInstanceRequest
|
|
89
89
|
*/
|
|
90
90
|
diskGb?: number;
|
|
91
|
+
/**
|
|
92
|
+
* Terminate this instance automatically after this many hours of runtime. Omit for no limit (the default). The countdown starts when the instance reaches `running`, not when you call this — provisioning is neither billed nor counted against the limit — and the resolved deadline is returned as `auto_terminate_at` on every read. Enforcement is server-side and survives your process: this is the safety net for an unattended run whose client dies without cleaning up. When it fires the instance is terminated exactly as a DELETE would terminate it (billing stops, the `instance.terminated` webhook fires) and `status_reason` records that the limit was reached. Bounds: at least 1, at most 720 (30 days) — outside them returns 422 `validation_failed`. An explicit `0` is rejected rather than read as "no limit"; omit the field for that.
|
|
93
|
+
* @type {number}
|
|
94
|
+
* @memberof CreateInstanceRequest
|
|
95
|
+
*/
|
|
96
|
+
autoTerminateHours?: number;
|
|
91
97
|
/**
|
|
92
98
|
* Environment variables. With `template_id`: per-deploy overrides — only keys the template marks user_overridable are accepted (others 422), and secret values are redacted from operation metadata. With `image`: plain container env vars — keys must be POSIX names and the platform's reserved namespace (`PUBLIC_KEY`, `GPUAI_*`) is refused (422).
|
|
93
99
|
* @type {{ [key: string]: string; }}
|
|
@@ -59,6 +59,7 @@ function CreateInstanceRequestFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
59
59
|
'environment': json['environment'] == null ? undefined : json['environment'],
|
|
60
60
|
'offeringId': json['offering_id'] == null ? undefined : json['offering_id'],
|
|
61
61
|
'diskGb': json['disk_gb'] == null ? undefined : json['disk_gb'],
|
|
62
|
+
'autoTerminateHours': json['auto_terminate_hours'] == null ? undefined : json['auto_terminate_hours'],
|
|
62
63
|
'env': json['env'] == null ? undefined : json['env'],
|
|
63
64
|
'image': json['image'] == null ? undefined : json['image'],
|
|
64
65
|
'registryCredentialId': json['registry_credential_id'] == null ? undefined : json['registry_credential_id'],
|
|
@@ -87,6 +88,7 @@ function CreateInstanceRequestToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
87
88
|
'environment': value['environment'],
|
|
88
89
|
'offering_id': value['offeringId'],
|
|
89
90
|
'disk_gb': value['diskGb'],
|
|
91
|
+
'auto_terminate_hours': value['autoTerminateHours'],
|
|
90
92
|
'env': value['env'],
|
|
91
93
|
'image': value['image'],
|
|
92
94
|
'registry_credential_id': value['registryCredentialId'],
|
|
@@ -83,7 +83,19 @@ export interface Instance {
|
|
|
83
83
|
*/
|
|
84
84
|
image?: string;
|
|
85
85
|
/**
|
|
86
|
-
*
|
|
86
|
+
* The runtime limit this instance was launched with, in hours (the `auto_terminate_hours` you sent). Absent means the instance runs until something stops it. It stays present after the limit has fired, so a terminated instance still explains itself.
|
|
87
|
+
* @type {number}
|
|
88
|
+
* @memberof Instance
|
|
89
|
+
*/
|
|
90
|
+
autoTerminateHours?: number;
|
|
91
|
+
/**
|
|
92
|
+
* When the runtime limit expires and the platform terminates this instance. Computed when the instance became running (ready_at + auto_terminate_hours), so the countdown covers usable runtime, not the time spent provisioning. Absent when no limit was set, when the instance is not running yet, or once the platform has begun acting on an elapsed limit.
|
|
93
|
+
* @type {Date}
|
|
94
|
+
* @memberof Instance
|
|
95
|
+
*/
|
|
96
|
+
autoTerminateAt?: Date;
|
|
97
|
+
/**
|
|
98
|
+
* Why the instance stopped or failed, e.g. "provisioning stalled: the instance started but never became reachable", or — when a runtime limit fired — "Terminated: this instance reached the 8-hour runtime limit set at launch". Present only when the platform has something to explain.
|
|
87
99
|
* @type {string}
|
|
88
100
|
* @memberof Instance
|
|
89
101
|
*/
|
package/dist/models/Instance.js
CHANGED
|
@@ -81,6 +81,8 @@ function InstanceFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
81
81
|
'connection': json['connection'] == null ? undefined : (0, InstanceConnection_1.InstanceConnectionFromJSON)(json['connection']),
|
|
82
82
|
'diskGb': json['disk_gb'] == null ? undefined : json['disk_gb'],
|
|
83
83
|
'image': json['image'] == null ? undefined : json['image'],
|
|
84
|
+
'autoTerminateHours': json['auto_terminate_hours'] == null ? undefined : json['auto_terminate_hours'],
|
|
85
|
+
'autoTerminateAt': json['auto_terminate_at'] == null ? undefined : (new Date(json['auto_terminate_at'])),
|
|
84
86
|
'statusReason': json['status_reason'] == null ? undefined : json['status_reason'],
|
|
85
87
|
'createdAt': (new Date(json['created_at'])),
|
|
86
88
|
'readyAt': json['ready_at'] == null ? undefined : (new Date(json['ready_at'])),
|
|
@@ -108,6 +110,8 @@ function InstanceToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
108
110
|
'connection': (0, InstanceConnection_1.InstanceConnectionToJSON)(value['connection']),
|
|
109
111
|
'disk_gb': value['diskGb'],
|
|
110
112
|
'image': value['image'],
|
|
113
|
+
'auto_terminate_hours': value['autoTerminateHours'],
|
|
114
|
+
'auto_terminate_at': value['autoTerminateAt'] == null ? value['autoTerminateAt'] : value['autoTerminateAt'].toISOString(),
|
|
111
115
|
'status_reason': value['statusReason'],
|
|
112
116
|
'created_at': value['createdAt'].toISOString(),
|
|
113
117
|
'ready_at': value['readyAt'] == null ? value['readyAt'] : value['readyAt'].toISOString(),
|
|
@@ -18,6 +18,7 @@ Name | Type
|
|
|
18
18
|
`environment` | string
|
|
19
19
|
`offeringId` | string
|
|
20
20
|
`diskGb` | number
|
|
21
|
+
`autoTerminateHours` | number
|
|
21
22
|
`env` | { [key: string]: string; }
|
|
22
23
|
`image` | string
|
|
23
24
|
`registryCredentialId` | string
|
|
@@ -44,6 +45,7 @@ const example = {
|
|
|
44
45
|
"environment": certified:pytorch@2.13,
|
|
45
46
|
"offeringId": null,
|
|
46
47
|
"diskGb": 200,
|
|
48
|
+
"autoTerminateHours": 8,
|
|
47
49
|
"env": null,
|
|
48
50
|
"image": ghcr.io/acme/trainer:v1,
|
|
49
51
|
"registryCredentialId": null,
|
package/docs/Instance.md
CHANGED
|
@@ -17,6 +17,8 @@ Name | Type
|
|
|
17
17
|
`connection` | [InstanceConnection](InstanceConnection.md)
|
|
18
18
|
`diskGb` | number
|
|
19
19
|
`image` | string
|
|
20
|
+
`autoTerminateHours` | number
|
|
21
|
+
`autoTerminateAt` | Date
|
|
20
22
|
`statusReason` | string
|
|
21
23
|
`createdAt` | Date
|
|
22
24
|
`readyAt` | Date
|
|
@@ -42,6 +44,8 @@ const example = {
|
|
|
42
44
|
"connection": null,
|
|
43
45
|
"diskGb": null,
|
|
44
46
|
"image": null,
|
|
47
|
+
"autoTerminateHours": 8,
|
|
48
|
+
"autoTerminateAt": null,
|
|
45
49
|
"statusReason": null,
|
|
46
50
|
"createdAt": null,
|
|
47
51
|
"readyAt": null,
|
package/package.json
CHANGED
|
@@ -99,6 +99,12 @@ export interface CreateInstanceRequest {
|
|
|
99
99
|
* @memberof CreateInstanceRequest
|
|
100
100
|
*/
|
|
101
101
|
diskGb?: number;
|
|
102
|
+
/**
|
|
103
|
+
* Terminate this instance automatically after this many hours of runtime. Omit for no limit (the default). The countdown starts when the instance reaches `running`, not when you call this — provisioning is neither billed nor counted against the limit — and the resolved deadline is returned as `auto_terminate_at` on every read. Enforcement is server-side and survives your process: this is the safety net for an unattended run whose client dies without cleaning up. When it fires the instance is terminated exactly as a DELETE would terminate it (billing stops, the `instance.terminated` webhook fires) and `status_reason` records that the limit was reached. Bounds: at least 1, at most 720 (30 days) — outside them returns 422 `validation_failed`. An explicit `0` is rejected rather than read as "no limit"; omit the field for that.
|
|
104
|
+
* @type {number}
|
|
105
|
+
* @memberof CreateInstanceRequest
|
|
106
|
+
*/
|
|
107
|
+
autoTerminateHours?: number;
|
|
102
108
|
/**
|
|
103
109
|
* Environment variables. With `template_id`: per-deploy overrides — only keys the template marks user_overridable are accepted (others 422), and secret values are redacted from operation metadata. With `image`: plain container env vars — keys must be POSIX names and the platform's reserved namespace (`PUBLIC_KEY`, `GPUAI_*`) is refused (422).
|
|
104
110
|
* @type {{ [key: string]: string; }}
|
|
@@ -180,6 +186,7 @@ export function CreateInstanceRequestFromJSONTyped(json: any, ignoreDiscriminato
|
|
|
180
186
|
'environment': json['environment'] == null ? undefined : json['environment'],
|
|
181
187
|
'offeringId': json['offering_id'] == null ? undefined : json['offering_id'],
|
|
182
188
|
'diskGb': json['disk_gb'] == null ? undefined : json['disk_gb'],
|
|
189
|
+
'autoTerminateHours': json['auto_terminate_hours'] == null ? undefined : json['auto_terminate_hours'],
|
|
183
190
|
'env': json['env'] == null ? undefined : json['env'],
|
|
184
191
|
'image': json['image'] == null ? undefined : json['image'],
|
|
185
192
|
'registryCredentialId': json['registry_credential_id'] == null ? undefined : json['registry_credential_id'],
|
|
@@ -212,6 +219,7 @@ export function CreateInstanceRequestToJSONTyped(value?: CreateInstanceRequest |
|
|
|
212
219
|
'environment': value['environment'],
|
|
213
220
|
'offering_id': value['offeringId'],
|
|
214
221
|
'disk_gb': value['diskGb'],
|
|
222
|
+
'auto_terminate_hours': value['autoTerminateHours'],
|
|
215
223
|
'env': value['env'],
|
|
216
224
|
'image': value['image'],
|
|
217
225
|
'registry_credential_id': value['registryCredentialId'],
|
package/src/models/Instance.ts
CHANGED
|
@@ -94,7 +94,19 @@ export interface Instance {
|
|
|
94
94
|
*/
|
|
95
95
|
image?: string;
|
|
96
96
|
/**
|
|
97
|
-
*
|
|
97
|
+
* The runtime limit this instance was launched with, in hours (the `auto_terminate_hours` you sent). Absent means the instance runs until something stops it. It stays present after the limit has fired, so a terminated instance still explains itself.
|
|
98
|
+
* @type {number}
|
|
99
|
+
* @memberof Instance
|
|
100
|
+
*/
|
|
101
|
+
autoTerminateHours?: number;
|
|
102
|
+
/**
|
|
103
|
+
* When the runtime limit expires and the platform terminates this instance. Computed when the instance became running (ready_at + auto_terminate_hours), so the countdown covers usable runtime, not the time spent provisioning. Absent when no limit was set, when the instance is not running yet, or once the platform has begun acting on an elapsed limit.
|
|
104
|
+
* @type {Date}
|
|
105
|
+
* @memberof Instance
|
|
106
|
+
*/
|
|
107
|
+
autoTerminateAt?: Date;
|
|
108
|
+
/**
|
|
109
|
+
* Why the instance stopped or failed, e.g. "provisioning stalled: the instance started but never became reachable", or — when a runtime limit fired — "Terminated: this instance reached the 8-hour runtime limit set at launch". Present only when the platform has something to explain.
|
|
98
110
|
* @type {string}
|
|
99
111
|
* @memberof Instance
|
|
100
112
|
*/
|
|
@@ -193,6 +205,8 @@ export function InstanceFromJSONTyped(json: any, ignoreDiscriminator: boolean):
|
|
|
193
205
|
'connection': json['connection'] == null ? undefined : InstanceConnectionFromJSON(json['connection']),
|
|
194
206
|
'diskGb': json['disk_gb'] == null ? undefined : json['disk_gb'],
|
|
195
207
|
'image': json['image'] == null ? undefined : json['image'],
|
|
208
|
+
'autoTerminateHours': json['auto_terminate_hours'] == null ? undefined : json['auto_terminate_hours'],
|
|
209
|
+
'autoTerminateAt': json['auto_terminate_at'] == null ? undefined : (new Date(json['auto_terminate_at'])),
|
|
196
210
|
'statusReason': json['status_reason'] == null ? undefined : json['status_reason'],
|
|
197
211
|
'createdAt': (new Date(json['created_at'])),
|
|
198
212
|
'readyAt': json['ready_at'] == null ? undefined : (new Date(json['ready_at'])),
|
|
@@ -224,6 +238,8 @@ export function InstanceToJSONTyped(value?: Instance | null, ignoreDiscriminator
|
|
|
224
238
|
'connection': InstanceConnectionToJSON(value['connection']),
|
|
225
239
|
'disk_gb': value['diskGb'],
|
|
226
240
|
'image': value['image'],
|
|
241
|
+
'auto_terminate_hours': value['autoTerminateHours'],
|
|
242
|
+
'auto_terminate_at': value['autoTerminateAt'] == null ? value['autoTerminateAt'] : value['autoTerminateAt'].toISOString(),
|
|
227
243
|
'status_reason': value['statusReason'],
|
|
228
244
|
'created_at': value['createdAt'].toISOString(),
|
|
229
245
|
'ready_at': value['readyAt'] == null ? value['readyAt'] : value['readyAt'].toISOString(),
|