@gpuai/sdk 0.5.5 → 0.5.6

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 CHANGED
@@ -1,4 +1,4 @@
1
- # @gpuai/sdk@0.5.5
1
+ # @gpuai/sdk@0.5.6
2
2
 
3
3
  A TypeScript SDK client for the api.gpu.ai API.
4
4
 
@@ -338,7 +338,7 @@ and is automatically generated by the
338
338
  [OpenAPI Generator](https://openapi-generator.tech) project:
339
339
 
340
340
  - API version: `1.0.0`
341
- - Package version: `0.5.5`
341
+ - Package version: `0.5.6`
342
342
  - Generator version: `7.24.0`
343
343
  - Build package: `org.openapitools.codegen.languages.TypeScriptFetchClientCodegen`
344
344
 
@@ -77,6 +77,12 @@ export interface Operation {
77
77
  * @memberof Operation
78
78
  */
79
79
  warnings?: Array<string>;
80
+ /**
81
+ * Advisory pointer to Jobs (POST /jobs), present only on the synchronous 202 from POST /instances and only on some launches: when the request is a one-off batch run, or the organization launched many instances in the last 24 hours that each ran for less than 15 minutes. Same text as the GPUAI-Hint header. Never on GET /operations/{id} polls, and it never changes the launch.
82
+ * @type {string}
83
+ * @memberof Operation
84
+ */
85
+ hint?: string;
80
86
  }
81
87
  /**
82
88
  * @export
@@ -62,6 +62,7 @@ export function OperationFromJSONTyped(json, ignoreDiscriminator) {
62
62
  'updatedAt': json['updated_at'] == null ? undefined : (new Date(json['updated_at'])),
63
63
  'completedAt': json['completed_at'] == null ? undefined : (new Date(json['completed_at'])),
64
64
  'warnings': json['warnings'] == null ? undefined : json['warnings'],
65
+ 'hint': json['hint'] == null ? undefined : json['hint'],
65
66
  };
66
67
  }
67
68
  export function OperationToJSON(json) {
@@ -82,5 +83,6 @@ export function OperationToJSONTyped(value, ignoreDiscriminator = false) {
82
83
  'updated_at': value['updatedAt'] == null ? value['updatedAt'] : value['updatedAt'].toISOString(),
83
84
  'completed_at': value['completedAt'] == null ? value['completedAt'] : value['completedAt'].toISOString(),
84
85
  'warnings': value['warnings'],
86
+ 'hint': value['hint'],
85
87
  };
86
88
  }
@@ -61,7 +61,7 @@ export class Configuration {
61
61
  return undefined;
62
62
  }
63
63
  get headers() {
64
- return Object.assign({ 'User-Agent': 'gpuai-sdk-ts/0.5.5' }, this.configuration.headers);
64
+ return Object.assign({ 'User-Agent': 'gpuai-sdk-ts/0.5.6' }, this.configuration.headers);
65
65
  }
66
66
  get credentials() {
67
67
  return this.configuration.credentials;
@@ -77,6 +77,12 @@ export interface Operation {
77
77
  * @memberof Operation
78
78
  */
79
79
  warnings?: Array<string>;
80
+ /**
81
+ * Advisory pointer to Jobs (POST /jobs), present only on the synchronous 202 from POST /instances and only on some launches: when the request is a one-off batch run, or the organization launched many instances in the last 24 hours that each ran for less than 15 minutes. Same text as the GPUAI-Hint header. Never on GET /operations/{id} polls, and it never changes the launch.
82
+ * @type {string}
83
+ * @memberof Operation
84
+ */
85
+ hint?: string;
80
86
  }
81
87
  /**
82
88
  * @export
@@ -70,6 +70,7 @@ function OperationFromJSONTyped(json, ignoreDiscriminator) {
70
70
  'updatedAt': json['updated_at'] == null ? undefined : (new Date(json['updated_at'])),
71
71
  'completedAt': json['completed_at'] == null ? undefined : (new Date(json['completed_at'])),
72
72
  'warnings': json['warnings'] == null ? undefined : json['warnings'],
73
+ 'hint': json['hint'] == null ? undefined : json['hint'],
73
74
  };
74
75
  }
75
76
  function OperationToJSON(json) {
@@ -90,5 +91,6 @@ function OperationToJSONTyped(value, ignoreDiscriminator = false) {
90
91
  'updated_at': value['updatedAt'] == null ? value['updatedAt'] : value['updatedAt'].toISOString(),
91
92
  'completed_at': value['completedAt'] == null ? value['completedAt'] : value['completedAt'].toISOString(),
92
93
  'warnings': value['warnings'],
94
+ 'hint': value['hint'],
93
95
  };
94
96
  }
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': 'gpuai-sdk-ts/0.5.5' }, this.configuration.headers);
72
+ return Object.assign({ 'User-Agent': 'gpuai-sdk-ts/0.5.6' }, this.configuration.headers);
73
73
  }
74
74
  get credentials() {
75
75
  return this.configuration.credentials;
@@ -83,7 +83,7 @@ example().catch(console.error);
83
83
  ### HTTP response details
84
84
  | Status code | Description | Response headers |
85
85
  |-------------|-------------|------------------|
86
- | **202** | Accepted; long-running operation | * Operation-Id - Use GET /operations/{id} to poll <br> * GPUAI-Hint - Advisory only, and absent on most launches. Sent when the request is a one-off batch run (a custom image with a command and auto_terminate_hours) to point at Jobs (POST /jobs), which start a machine for the work and shut it down a few minutes after it ends. It never changes the launch. <br> * GPUAI-Balance-Warning - <br> |
86
+ | **202** | Accepted; long-running operation | * Operation-Id - Use GET /operations/{id} to poll <br> * GPUAI-Hint - Advisory only, and absent on most launches. Sent to point at Jobs (POST /jobs), which start a machine for the work and shut it down a few minutes after it ends, when the request is a one-off batch run (a custom image with a command and auto_terminate_hours) or the organization launched many instances in the last 24 hours that each ran for less than 15 minutes. The same text is in the response body\&#39;s hint field. It never changes the launch. <br> * GPUAI-Balance-Warning - <br> |
87
87
  | **429** | Rate limit exceeded (RFC 7807). Retry-After header indicates seconds to wait. | * Retry-After - Seconds the client should wait before retrying. <br> |
88
88
  | **0** | Error response (RFC 7807) | - |
89
89
 
package/docs/Operation.md CHANGED
@@ -16,6 +16,7 @@ Name | Type
16
16
  `updatedAt` | Date
17
17
  `completedAt` | Date
18
18
  `warnings` | Array&lt;string&gt;
19
+ `hint` | string
19
20
 
20
21
  ## Example
21
22
 
@@ -34,6 +35,7 @@ const example = {
34
35
  "updatedAt": null,
35
36
  "completedAt": null,
36
37
  "warnings": null,
38
+ "hint": null,
37
39
  } satisfies Operation
38
40
 
39
41
  console.log(example)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gpuai/sdk",
3
- "version": "0.5.5",
3
+ "version": "0.5.6",
4
4
  "description": "TypeScript SDK for the GPU.ai Public Developer API",
5
5
  "author": "GPU.ai Support <support@gpu.ai>",
6
6
  "repository": {
@@ -94,6 +94,12 @@ export interface Operation {
94
94
  * @memberof Operation
95
95
  */
96
96
  warnings?: Array<string>;
97
+ /**
98
+ * Advisory pointer to Jobs (POST /jobs), present only on the synchronous 202 from POST /instances and only on some launches: when the request is a one-off batch run, or the organization launched many instances in the last 24 hours that each ran for less than 15 minutes. Same text as the GPUAI-Hint header. Never on GET /operations/{id} polls, and it never changes the launch.
99
+ * @type {string}
100
+ * @memberof Operation
101
+ */
102
+ hint?: string;
97
103
  }
98
104
 
99
105
 
@@ -150,6 +156,7 @@ export function OperationFromJSONTyped(json: any, ignoreDiscriminator: boolean):
150
156
  'updatedAt': json['updated_at'] == null ? undefined : (new Date(json['updated_at'])),
151
157
  'completedAt': json['completed_at'] == null ? undefined : (new Date(json['completed_at'])),
152
158
  'warnings': json['warnings'] == null ? undefined : json['warnings'],
159
+ 'hint': json['hint'] == null ? undefined : json['hint'],
153
160
  };
154
161
  }
155
162
 
@@ -174,6 +181,7 @@ export function OperationToJSONTyped(value?: Operation | null, ignoreDiscriminat
174
181
  'updated_at': value['updatedAt'] == null ? value['updatedAt'] : value['updatedAt'].toISOString(),
175
182
  'completed_at': value['completedAt'] == null ? value['completedAt'] : value['completedAt'].toISOString(),
176
183
  'warnings': value['warnings'],
184
+ 'hint': value['hint'],
177
185
  };
178
186
  }
179
187
 
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': 'gpuai-sdk-ts/0.5.5', ...this.configuration.headers };
78
+ return { 'User-Agent': 'gpuai-sdk-ts/0.5.6', ...this.configuration.headers };
79
79
  }
80
80
 
81
81
  get credentials(): RequestCredentials | undefined {