@gpuai/sdk 0.3.13 → 0.3.15
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 +28 -0
- package/README.md +34 -9
- package/dist/apis/AutolaunchApi.d.ts +109 -0
- package/dist/apis/AutolaunchApi.js +286 -0
- package/dist/apis/BillingApi.d.ts +15 -0
- package/dist/apis/BillingApi.js +45 -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/BillingApi.d.ts +15 -0
- package/dist/esm/apis/BillingApi.js +45 -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/Balance.d.ts +65 -0
- package/dist/esm/models/Balance.js +63 -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 +11 -0
- package/dist/esm/models/index.js +11 -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/Balance.d.ts +65 -0
- package/dist/models/Balance.js +70 -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 +11 -0
- package/dist/models/index.js +11 -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/Balance.md +45 -0
- package/docs/BillingApi.md +66 -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/BillingApi.ts +52 -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/Balance.ts +114 -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 +11 -0
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GPU.ai Public Developer API
|
|
3
|
+
* Programmatic API for GPU.ai. Authenticate with API keys minted from the dashboard. See https://gpu.ai/docs for details.
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1.0.0
|
|
6
|
+
* Contact: support@gpu.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
|
+
/**
|
|
13
|
+
*
|
|
14
|
+
* @export
|
|
15
|
+
* @interface WatchRuleCreate
|
|
16
|
+
*/
|
|
17
|
+
export interface WatchRuleCreate {
|
|
18
|
+
/**
|
|
19
|
+
*
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof WatchRuleCreate
|
|
22
|
+
*/
|
|
23
|
+
gpuModel: string;
|
|
24
|
+
/**
|
|
25
|
+
* Omit or send null to watch every region.
|
|
26
|
+
* @type {string}
|
|
27
|
+
* @memberof WatchRuleCreate
|
|
28
|
+
*/
|
|
29
|
+
region?: string | null;
|
|
30
|
+
/**
|
|
31
|
+
* Omit or send null to watch both capacity classes.
|
|
32
|
+
* @type {WatchRuleCreateCapacityClassEnum}
|
|
33
|
+
* @memberof WatchRuleCreate
|
|
34
|
+
*/
|
|
35
|
+
capacityClass?: WatchRuleCreateCapacityClassEnum | null;
|
|
36
|
+
/**
|
|
37
|
+
*
|
|
38
|
+
* @type {WatchRuleCreateConditionKindEnum}
|
|
39
|
+
* @memberof WatchRuleCreate
|
|
40
|
+
*/
|
|
41
|
+
conditionKind: WatchRuleCreateConditionKindEnum;
|
|
42
|
+
/**
|
|
43
|
+
* Required and greater than zero for price_under and count_at_least. Ignored for in_stock, which is stored with no threshold.
|
|
44
|
+
*
|
|
45
|
+
* @type {number}
|
|
46
|
+
* @memberof WatchRuleCreate
|
|
47
|
+
*/
|
|
48
|
+
threshold?: number | null;
|
|
49
|
+
/**
|
|
50
|
+
* Id of an endpoint already registered via /webhook-endpoints. A URL here is rejected: the resource holds references, never addresses.
|
|
51
|
+
*
|
|
52
|
+
* @type {string}
|
|
53
|
+
* @memberof WatchRuleCreate
|
|
54
|
+
*/
|
|
55
|
+
webhookEndpointOverrideId?: string | null;
|
|
56
|
+
/**
|
|
57
|
+
* Defaults to true. Create with false to park a rule.
|
|
58
|
+
* @type {boolean}
|
|
59
|
+
* @memberof WatchRuleCreate
|
|
60
|
+
*/
|
|
61
|
+
enabled?: boolean;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* @export
|
|
65
|
+
*/
|
|
66
|
+
export declare const WatchRuleCreateCapacityClassEnum: {
|
|
67
|
+
readonly Secure: "secure";
|
|
68
|
+
readonly Community: "community";
|
|
69
|
+
};
|
|
70
|
+
export type WatchRuleCreateCapacityClassEnum = typeof WatchRuleCreateCapacityClassEnum[keyof typeof WatchRuleCreateCapacityClassEnum];
|
|
71
|
+
/**
|
|
72
|
+
* @export
|
|
73
|
+
*/
|
|
74
|
+
export declare const WatchRuleCreateConditionKindEnum: {
|
|
75
|
+
readonly PriceUnder: "price_under";
|
|
76
|
+
readonly InStock: "in_stock";
|
|
77
|
+
readonly CountAtLeast: "count_at_least";
|
|
78
|
+
};
|
|
79
|
+
export type WatchRuleCreateConditionKindEnum = typeof WatchRuleCreateConditionKindEnum[keyof typeof WatchRuleCreateConditionKindEnum];
|
|
80
|
+
/**
|
|
81
|
+
* Check if a given object implements the WatchRuleCreate interface.
|
|
82
|
+
*/
|
|
83
|
+
export declare function instanceOfWatchRuleCreate(value: object): value is WatchRuleCreate;
|
|
84
|
+
export declare function WatchRuleCreateFromJSON(json: any): WatchRuleCreate;
|
|
85
|
+
export declare function WatchRuleCreateFromJSONTyped(json: any, ignoreDiscriminator: boolean): WatchRuleCreate;
|
|
86
|
+
export declare function WatchRuleCreateToJSON(json: any): WatchRuleCreate;
|
|
87
|
+
export declare function WatchRuleCreateToJSONTyped(value?: WatchRuleCreate | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,72 @@
|
|
|
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
|
+
* @export
|
|
16
|
+
*/
|
|
17
|
+
export const WatchRuleCreateCapacityClassEnum = {
|
|
18
|
+
Secure: 'secure',
|
|
19
|
+
Community: 'community'
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* @export
|
|
23
|
+
*/
|
|
24
|
+
export const WatchRuleCreateConditionKindEnum = {
|
|
25
|
+
PriceUnder: 'price_under',
|
|
26
|
+
InStock: 'in_stock',
|
|
27
|
+
CountAtLeast: 'count_at_least'
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* Check if a given object implements the WatchRuleCreate interface.
|
|
31
|
+
*/
|
|
32
|
+
export function instanceOfWatchRuleCreate(value) {
|
|
33
|
+
if ((!('gpuModel' in value) && !('gpu_model' in value)) || (value['gpuModel'] === undefined && value['gpu_model'] === undefined))
|
|
34
|
+
return false;
|
|
35
|
+
if ((!('conditionKind' in value) && !('condition_kind' in value)) || (value['conditionKind'] === undefined && value['condition_kind'] === undefined))
|
|
36
|
+
return false;
|
|
37
|
+
return true;
|
|
38
|
+
}
|
|
39
|
+
export function WatchRuleCreateFromJSON(json) {
|
|
40
|
+
return WatchRuleCreateFromJSONTyped(json, false);
|
|
41
|
+
}
|
|
42
|
+
export function WatchRuleCreateFromJSONTyped(json, ignoreDiscriminator) {
|
|
43
|
+
if (json == null) {
|
|
44
|
+
return json;
|
|
45
|
+
}
|
|
46
|
+
return {
|
|
47
|
+
'gpuModel': json['gpu_model'],
|
|
48
|
+
'region': json['region'] === undefined ? undefined : json['region'] === null ? null : json['region'],
|
|
49
|
+
'capacityClass': json['capacity_class'] === undefined ? undefined : json['capacity_class'] === null ? null : json['capacity_class'],
|
|
50
|
+
'conditionKind': json['condition_kind'],
|
|
51
|
+
'threshold': json['threshold'] === undefined ? undefined : json['threshold'] === null ? null : json['threshold'],
|
|
52
|
+
'webhookEndpointOverrideId': json['webhook_endpoint_override_id'] === undefined ? undefined : json['webhook_endpoint_override_id'] === null ? null : json['webhook_endpoint_override_id'],
|
|
53
|
+
'enabled': json['enabled'] == null ? undefined : json['enabled'],
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
export function WatchRuleCreateToJSON(json) {
|
|
57
|
+
return WatchRuleCreateToJSONTyped(json, false);
|
|
58
|
+
}
|
|
59
|
+
export function WatchRuleCreateToJSONTyped(value, ignoreDiscriminator = false) {
|
|
60
|
+
if (value == null) {
|
|
61
|
+
return value;
|
|
62
|
+
}
|
|
63
|
+
return {
|
|
64
|
+
'gpu_model': value['gpuModel'],
|
|
65
|
+
'region': value['region'],
|
|
66
|
+
'capacity_class': value['capacityClass'],
|
|
67
|
+
'condition_kind': value['conditionKind'],
|
|
68
|
+
'threshold': value['threshold'],
|
|
69
|
+
'webhook_endpoint_override_id': value['webhookEndpointOverrideId'],
|
|
70
|
+
'enabled': value['enabled'],
|
|
71
|
+
};
|
|
72
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GPU.ai Public Developer API
|
|
3
|
+
* Programmatic API for GPU.ai. Authenticate with API keys minted from the dashboard. See https://gpu.ai/docs for details.
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1.0.0
|
|
6
|
+
* Contact: support@gpu.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 type { WatchRule } from './WatchRule';
|
|
13
|
+
/**
|
|
14
|
+
*
|
|
15
|
+
* @export
|
|
16
|
+
* @interface WatchRulePage
|
|
17
|
+
*/
|
|
18
|
+
export interface WatchRulePage {
|
|
19
|
+
/**
|
|
20
|
+
*
|
|
21
|
+
* @type {Array<WatchRule>}
|
|
22
|
+
* @memberof WatchRulePage
|
|
23
|
+
*/
|
|
24
|
+
data: Array<WatchRule>;
|
|
25
|
+
/**
|
|
26
|
+
*
|
|
27
|
+
* @type {string}
|
|
28
|
+
* @memberof WatchRulePage
|
|
29
|
+
*/
|
|
30
|
+
nextCursor: string | null;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Check if a given object implements the WatchRulePage interface.
|
|
34
|
+
*/
|
|
35
|
+
export declare function instanceOfWatchRulePage(value: object): value is WatchRulePage;
|
|
36
|
+
export declare function WatchRulePageFromJSON(json: any): WatchRulePage;
|
|
37
|
+
export declare function WatchRulePageFromJSONTyped(json: any, ignoreDiscriminator: boolean): WatchRulePage;
|
|
38
|
+
export declare function WatchRulePageToJSON(json: any): WatchRulePage;
|
|
39
|
+
export declare function WatchRulePageToJSONTyped(value?: WatchRulePage | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,48 @@
|
|
|
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
|
+
import { WatchRuleFromJSON, WatchRuleToJSON, } from './WatchRule';
|
|
15
|
+
/**
|
|
16
|
+
* Check if a given object implements the WatchRulePage interface.
|
|
17
|
+
*/
|
|
18
|
+
export function instanceOfWatchRulePage(value) {
|
|
19
|
+
if (!('data' in value) || value['data'] === undefined)
|
|
20
|
+
return false;
|
|
21
|
+
if ((!('nextCursor' in value) && !('next_cursor' in value)) || (value['nextCursor'] === undefined && value['next_cursor'] === undefined))
|
|
22
|
+
return false;
|
|
23
|
+
return true;
|
|
24
|
+
}
|
|
25
|
+
export function WatchRulePageFromJSON(json) {
|
|
26
|
+
return WatchRulePageFromJSONTyped(json, false);
|
|
27
|
+
}
|
|
28
|
+
export function WatchRulePageFromJSONTyped(json, ignoreDiscriminator) {
|
|
29
|
+
if (json == null) {
|
|
30
|
+
return json;
|
|
31
|
+
}
|
|
32
|
+
return {
|
|
33
|
+
'data': (json['data'].map(WatchRuleFromJSON)),
|
|
34
|
+
'nextCursor': json['next_cursor'],
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
export function WatchRulePageToJSON(json) {
|
|
38
|
+
return WatchRulePageToJSONTyped(json, false);
|
|
39
|
+
}
|
|
40
|
+
export function WatchRulePageToJSONTyped(value, ignoreDiscriminator = false) {
|
|
41
|
+
if (value == null) {
|
|
42
|
+
return value;
|
|
43
|
+
}
|
|
44
|
+
return {
|
|
45
|
+
'data': (value['data'].map(WatchRuleToJSON)),
|
|
46
|
+
'next_cursor': value['nextCursor'],
|
|
47
|
+
};
|
|
48
|
+
}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GPU.ai Public Developer API
|
|
3
|
+
* Programmatic API for GPU.ai. Authenticate with API keys minted from the dashboard. See https://gpu.ai/docs for details.
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1.0.0
|
|
6
|
+
* Contact: support@gpu.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
|
+
/**
|
|
13
|
+
* 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.
|
|
14
|
+
*
|
|
15
|
+
* @export
|
|
16
|
+
* @interface WatchRuleUpdate
|
|
17
|
+
*/
|
|
18
|
+
export interface WatchRuleUpdate {
|
|
19
|
+
/**
|
|
20
|
+
*
|
|
21
|
+
* @type {string}
|
|
22
|
+
* @memberof WatchRuleUpdate
|
|
23
|
+
*/
|
|
24
|
+
gpuModel?: string;
|
|
25
|
+
/**
|
|
26
|
+
*
|
|
27
|
+
* @type {string}
|
|
28
|
+
* @memberof WatchRuleUpdate
|
|
29
|
+
*/
|
|
30
|
+
region?: string | null;
|
|
31
|
+
/**
|
|
32
|
+
*
|
|
33
|
+
* @type {WatchRuleUpdateCapacityClassEnum}
|
|
34
|
+
* @memberof WatchRuleUpdate
|
|
35
|
+
*/
|
|
36
|
+
capacityClass?: WatchRuleUpdateCapacityClassEnum | null;
|
|
37
|
+
/**
|
|
38
|
+
*
|
|
39
|
+
* @type {WatchRuleUpdateConditionKindEnum}
|
|
40
|
+
* @memberof WatchRuleUpdate
|
|
41
|
+
*/
|
|
42
|
+
conditionKind?: WatchRuleUpdateConditionKindEnum;
|
|
43
|
+
/**
|
|
44
|
+
*
|
|
45
|
+
* @type {number}
|
|
46
|
+
* @memberof WatchRuleUpdate
|
|
47
|
+
*/
|
|
48
|
+
threshold?: number | null;
|
|
49
|
+
/**
|
|
50
|
+
*
|
|
51
|
+
* @type {string}
|
|
52
|
+
* @memberof WatchRuleUpdate
|
|
53
|
+
*/
|
|
54
|
+
webhookEndpointOverrideId?: string | null;
|
|
55
|
+
/**
|
|
56
|
+
*
|
|
57
|
+
* @type {boolean}
|
|
58
|
+
* @memberof WatchRuleUpdate
|
|
59
|
+
*/
|
|
60
|
+
enabled?: boolean;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* @export
|
|
64
|
+
*/
|
|
65
|
+
export declare const WatchRuleUpdateCapacityClassEnum: {
|
|
66
|
+
readonly Secure: "secure";
|
|
67
|
+
readonly Community: "community";
|
|
68
|
+
};
|
|
69
|
+
export type WatchRuleUpdateCapacityClassEnum = typeof WatchRuleUpdateCapacityClassEnum[keyof typeof WatchRuleUpdateCapacityClassEnum];
|
|
70
|
+
/**
|
|
71
|
+
* @export
|
|
72
|
+
*/
|
|
73
|
+
export declare const WatchRuleUpdateConditionKindEnum: {
|
|
74
|
+
readonly PriceUnder: "price_under";
|
|
75
|
+
readonly InStock: "in_stock";
|
|
76
|
+
readonly CountAtLeast: "count_at_least";
|
|
77
|
+
};
|
|
78
|
+
export type WatchRuleUpdateConditionKindEnum = typeof WatchRuleUpdateConditionKindEnum[keyof typeof WatchRuleUpdateConditionKindEnum];
|
|
79
|
+
/**
|
|
80
|
+
* Check if a given object implements the WatchRuleUpdate interface.
|
|
81
|
+
*/
|
|
82
|
+
export declare function instanceOfWatchRuleUpdate(value: object): value is WatchRuleUpdate;
|
|
83
|
+
export declare function WatchRuleUpdateFromJSON(json: any): WatchRuleUpdate;
|
|
84
|
+
export declare function WatchRuleUpdateFromJSONTyped(json: any, ignoreDiscriminator: boolean): WatchRuleUpdate;
|
|
85
|
+
export declare function WatchRuleUpdateToJSON(json: any): WatchRuleUpdate;
|
|
86
|
+
export declare function WatchRuleUpdateToJSONTyped(value?: WatchRuleUpdate | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,68 @@
|
|
|
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
|
+
* @export
|
|
16
|
+
*/
|
|
17
|
+
export const WatchRuleUpdateCapacityClassEnum = {
|
|
18
|
+
Secure: 'secure',
|
|
19
|
+
Community: 'community'
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* @export
|
|
23
|
+
*/
|
|
24
|
+
export const WatchRuleUpdateConditionKindEnum = {
|
|
25
|
+
PriceUnder: 'price_under',
|
|
26
|
+
InStock: 'in_stock',
|
|
27
|
+
CountAtLeast: 'count_at_least'
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* Check if a given object implements the WatchRuleUpdate interface.
|
|
31
|
+
*/
|
|
32
|
+
export function instanceOfWatchRuleUpdate(value) {
|
|
33
|
+
return true;
|
|
34
|
+
}
|
|
35
|
+
export function WatchRuleUpdateFromJSON(json) {
|
|
36
|
+
return WatchRuleUpdateFromJSONTyped(json, false);
|
|
37
|
+
}
|
|
38
|
+
export function WatchRuleUpdateFromJSONTyped(json, ignoreDiscriminator) {
|
|
39
|
+
if (json == null) {
|
|
40
|
+
return json;
|
|
41
|
+
}
|
|
42
|
+
return {
|
|
43
|
+
'gpuModel': json['gpu_model'] == null ? undefined : json['gpu_model'],
|
|
44
|
+
'region': json['region'] === undefined ? undefined : json['region'] === null ? null : json['region'],
|
|
45
|
+
'capacityClass': json['capacity_class'] === undefined ? undefined : json['capacity_class'] === null ? null : json['capacity_class'],
|
|
46
|
+
'conditionKind': json['condition_kind'] == null ? undefined : json['condition_kind'],
|
|
47
|
+
'threshold': json['threshold'] === undefined ? undefined : json['threshold'] === null ? null : json['threshold'],
|
|
48
|
+
'webhookEndpointOverrideId': json['webhook_endpoint_override_id'] === undefined ? undefined : json['webhook_endpoint_override_id'] === null ? null : json['webhook_endpoint_override_id'],
|
|
49
|
+
'enabled': json['enabled'] == null ? undefined : json['enabled'],
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
export function WatchRuleUpdateToJSON(json) {
|
|
53
|
+
return WatchRuleUpdateToJSONTyped(json, false);
|
|
54
|
+
}
|
|
55
|
+
export function WatchRuleUpdateToJSONTyped(value, ignoreDiscriminator = false) {
|
|
56
|
+
if (value == null) {
|
|
57
|
+
return value;
|
|
58
|
+
}
|
|
59
|
+
return {
|
|
60
|
+
'gpu_model': value['gpuModel'],
|
|
61
|
+
'region': value['region'],
|
|
62
|
+
'capacity_class': value['capacityClass'],
|
|
63
|
+
'condition_kind': value['conditionKind'],
|
|
64
|
+
'threshold': value['threshold'],
|
|
65
|
+
'webhook_endpoint_override_id': value['webhookEndpointOverrideId'],
|
|
66
|
+
'enabled': value['enabled'],
|
|
67
|
+
};
|
|
68
|
+
}
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
export * from './AutolaunchRule';
|
|
2
|
+
export * from './AutolaunchRuleCreate';
|
|
3
|
+
export * from './AutolaunchRuleDisarm';
|
|
4
|
+
export * from './AutolaunchRulePage';
|
|
5
|
+
export * from './Balance';
|
|
1
6
|
export * from './ChatChoice';
|
|
2
7
|
export * from './ChatCompletionRequest';
|
|
3
8
|
export * from './ChatCompletionResponse';
|
|
@@ -45,6 +50,8 @@ export * from './InstancePage';
|
|
|
45
50
|
export * from './ListCommunityMachines200Response';
|
|
46
51
|
export * from './ListDeposits200Response';
|
|
47
52
|
export * from './ListRegistryCredentials200Response';
|
|
53
|
+
export * from './MarketHistoryPoint';
|
|
54
|
+
export * from './MarketHistoryResponse';
|
|
48
55
|
export * from './Model';
|
|
49
56
|
export * from './ModelList';
|
|
50
57
|
export * from './ModelParametersInner';
|
|
@@ -77,5 +84,9 @@ export * from './VMImage';
|
|
|
77
84
|
export * from './VideoCreateRequest';
|
|
78
85
|
export * from './VideoJob';
|
|
79
86
|
export * from './VideoList';
|
|
87
|
+
export * from './WatchRule';
|
|
88
|
+
export * from './WatchRuleCreate';
|
|
89
|
+
export * from './WatchRulePage';
|
|
90
|
+
export * from './WatchRuleUpdate';
|
|
80
91
|
export * from './WebhookEndpoint';
|
|
81
92
|
export * from './WebhookEndpointPage';
|
package/dist/esm/models/index.js
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
|
+
export * from './AutolaunchRule';
|
|
4
|
+
export * from './AutolaunchRuleCreate';
|
|
5
|
+
export * from './AutolaunchRuleDisarm';
|
|
6
|
+
export * from './AutolaunchRulePage';
|
|
7
|
+
export * from './Balance';
|
|
3
8
|
export * from './ChatChoice';
|
|
4
9
|
export * from './ChatCompletionRequest';
|
|
5
10
|
export * from './ChatCompletionResponse';
|
|
@@ -47,6 +52,8 @@ export * from './InstancePage';
|
|
|
47
52
|
export * from './ListCommunityMachines200Response';
|
|
48
53
|
export * from './ListDeposits200Response';
|
|
49
54
|
export * from './ListRegistryCredentials200Response';
|
|
55
|
+
export * from './MarketHistoryPoint';
|
|
56
|
+
export * from './MarketHistoryResponse';
|
|
50
57
|
export * from './Model';
|
|
51
58
|
export * from './ModelList';
|
|
52
59
|
export * from './ModelParametersInner';
|
|
@@ -79,5 +86,9 @@ export * from './VMImage';
|
|
|
79
86
|
export * from './VideoCreateRequest';
|
|
80
87
|
export * from './VideoJob';
|
|
81
88
|
export * from './VideoList';
|
|
89
|
+
export * from './WatchRule';
|
|
90
|
+
export * from './WatchRuleCreate';
|
|
91
|
+
export * from './WatchRulePage';
|
|
92
|
+
export * from './WatchRuleUpdate';
|
|
82
93
|
export * from './WebhookEndpoint';
|
|
83
94
|
export * from './WebhookEndpointPage';
|
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GPU.ai Public Developer API
|
|
3
|
+
* Programmatic API for GPU.ai. Authenticate with API keys minted from the dashboard. See https://gpu.ai/docs for details.
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1.0.0
|
|
6
|
+
* Contact: support@gpu.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
|
+
/**
|
|
13
|
+
* A standing, pre-approved purchase order. It carries no upstream supplier identity, no org id, and no identifier of the API key that consented — the consenting principal is recorded in storage for the fire-time re-check, and a credential identifier has no business in a rule listing.
|
|
14
|
+
*
|
|
15
|
+
* @export
|
|
16
|
+
* @interface AutolaunchRule
|
|
17
|
+
*/
|
|
18
|
+
export interface AutolaunchRule {
|
|
19
|
+
/**
|
|
20
|
+
*
|
|
21
|
+
* @type {string}
|
|
22
|
+
* @memberof AutolaunchRule
|
|
23
|
+
*/
|
|
24
|
+
id: string;
|
|
25
|
+
/**
|
|
26
|
+
* The GPU model the rule watches and launches, e.g. "H100".
|
|
27
|
+
* @type {string}
|
|
28
|
+
* @memberof AutolaunchRule
|
|
29
|
+
*/
|
|
30
|
+
gpuModel: string;
|
|
31
|
+
/**
|
|
32
|
+
* Canonical region the rule is narrowed to, or null for every region.
|
|
33
|
+
* @type {string}
|
|
34
|
+
* @memberof AutolaunchRule
|
|
35
|
+
*/
|
|
36
|
+
region: string | null;
|
|
37
|
+
/**
|
|
38
|
+
* Capacity class the rule is narrowed to, or null for both.
|
|
39
|
+
* @type {AutolaunchRuleCapacityClassEnum}
|
|
40
|
+
* @memberof AutolaunchRule
|
|
41
|
+
*/
|
|
42
|
+
capacityClass: AutolaunchRuleCapacityClassEnum | null;
|
|
43
|
+
/**
|
|
44
|
+
*
|
|
45
|
+
* @type {AutolaunchRuleConditionKindEnum}
|
|
46
|
+
* @memberof AutolaunchRule
|
|
47
|
+
*/
|
|
48
|
+
conditionKind: AutolaunchRuleConditionKindEnum;
|
|
49
|
+
/**
|
|
50
|
+
* The TRIGGER. Dollars PER GPU-HOUR for price_under, or a unit count for count_at_least. Null for in_stock. This is NOT the spend cap — see max_price_per_hour, which is in a different unit.
|
|
51
|
+
*
|
|
52
|
+
* @type {number}
|
|
53
|
+
* @memberof AutolaunchRule
|
|
54
|
+
*/
|
|
55
|
+
threshold: number | null;
|
|
56
|
+
/**
|
|
57
|
+
* The CEILING, and the consent. Dollars per hour for the WHOLE INSTANCE, not per GPU. The launch is abandoned — never repriced — if the live price exceeds it.
|
|
58
|
+
*
|
|
59
|
+
* @type {number}
|
|
60
|
+
* @memberof AutolaunchRule
|
|
61
|
+
*/
|
|
62
|
+
maxPricePerHour: number;
|
|
63
|
+
/**
|
|
64
|
+
* How long an auto-launched instance may run before the platform terminates it, enforced through the instance's own auto_terminate_hours.
|
|
65
|
+
*
|
|
66
|
+
* @type {number}
|
|
67
|
+
* @memberof AutolaunchRule
|
|
68
|
+
*/
|
|
69
|
+
maxRuntimeHours: number;
|
|
70
|
+
/**
|
|
71
|
+
* The worst-case total the customer approved: max_price_per_hour × max_runtime_hours, computed by the server and echoed on every read so a client never has to derive the number it is displaying.
|
|
72
|
+
*
|
|
73
|
+
* @type {number}
|
|
74
|
+
* @memberof AutolaunchRule
|
|
75
|
+
*/
|
|
76
|
+
maxTotalUsd: number;
|
|
77
|
+
/**
|
|
78
|
+
* The frozen launch spec, as READ. Every value under `env` is returned as the literal `[REDACTED]` — the key names are kept so you can see what the launch will set, but the values are not readable back on any surface, by any scope. Reading a rule needs only `autolaunch:read`, which every full_access, standard and read_only key holds, so a rule listing must not be a credential listing.
|
|
79
|
+
* This changes nothing about what the rule DOES: the stored spec keeps the real values and replays them at fire time. If you need to change a token, delete the rule and create a new one.
|
|
80
|
+
*
|
|
81
|
+
* @type {{ [key: string]: any; }}
|
|
82
|
+
* @memberof AutolaunchRule
|
|
83
|
+
*/
|
|
84
|
+
spec: {
|
|
85
|
+
[key: string]: any;
|
|
86
|
+
};
|
|
87
|
+
/**
|
|
88
|
+
* armed = waiting for the condition. launching = an attempt is in flight. fired = a successful launch consumed the rule's one shot. expired = the per-edge attempt budget ran out. A lost capacity race costs nothing and does NOT consume the shot.
|
|
89
|
+
*
|
|
90
|
+
* @type {AutolaunchRuleStateEnum}
|
|
91
|
+
* @memberof AutolaunchRule
|
|
92
|
+
*/
|
|
93
|
+
state: AutolaunchRuleStateEnum;
|
|
94
|
+
/**
|
|
95
|
+
* Launch attempts made since the current condition edge began.
|
|
96
|
+
* @type {number}
|
|
97
|
+
* @memberof AutolaunchRule
|
|
98
|
+
*/
|
|
99
|
+
attemptsThisEdge: number;
|
|
100
|
+
/**
|
|
101
|
+
* Why the last attempt did not buy anything: over_ceiling, capacity_race, stale_reference, key_revoked, authority_revoked or validation_failed, optionally with a colon-separated detail. Match the leading token. It never carries API key material.
|
|
102
|
+
*
|
|
103
|
+
* @type {string}
|
|
104
|
+
* @memberof AutolaunchRule
|
|
105
|
+
*/
|
|
106
|
+
lastFailureReason: string | null;
|
|
107
|
+
/**
|
|
108
|
+
* The instance this rule launched, once it has fired.
|
|
109
|
+
* @type {string}
|
|
110
|
+
* @memberof AutolaunchRule
|
|
111
|
+
*/
|
|
112
|
+
launchedInstanceId: string | null;
|
|
113
|
+
/**
|
|
114
|
+
* Which entrance consented. A dashboard rule has no API key behind it, which is why its fire-time revocation failure is `authority_revoked` (the approving admin was demoted) rather than `key_revoked`.
|
|
115
|
+
*
|
|
116
|
+
* @type {AutolaunchRuleCreatedBySurfaceEnum}
|
|
117
|
+
* @memberof AutolaunchRule
|
|
118
|
+
*/
|
|
119
|
+
createdBySurface: AutolaunchRuleCreatedBySurfaceEnum;
|
|
120
|
+
/**
|
|
121
|
+
* False once disarmed or cancelled. A disarmed rule cannot be re-armed.
|
|
122
|
+
* @type {boolean}
|
|
123
|
+
* @memberof AutolaunchRule
|
|
124
|
+
*/
|
|
125
|
+
enabled: boolean;
|
|
126
|
+
/**
|
|
127
|
+
*
|
|
128
|
+
* @type {Date}
|
|
129
|
+
* @memberof AutolaunchRule
|
|
130
|
+
*/
|
|
131
|
+
createdAt: Date;
|
|
132
|
+
/**
|
|
133
|
+
*
|
|
134
|
+
* @type {Date}
|
|
135
|
+
* @memberof AutolaunchRule
|
|
136
|
+
*/
|
|
137
|
+
updatedAt: Date;
|
|
138
|
+
}
|
|
139
|
+
/**
|
|
140
|
+
* @export
|
|
141
|
+
*/
|
|
142
|
+
export declare const AutolaunchRuleCapacityClassEnum: {
|
|
143
|
+
readonly Secure: "secure";
|
|
144
|
+
readonly Community: "community";
|
|
145
|
+
};
|
|
146
|
+
export type AutolaunchRuleCapacityClassEnum = typeof AutolaunchRuleCapacityClassEnum[keyof typeof AutolaunchRuleCapacityClassEnum];
|
|
147
|
+
/**
|
|
148
|
+
* @export
|
|
149
|
+
*/
|
|
150
|
+
export declare const AutolaunchRuleConditionKindEnum: {
|
|
151
|
+
readonly PriceUnder: "price_under";
|
|
152
|
+
readonly InStock: "in_stock";
|
|
153
|
+
readonly CountAtLeast: "count_at_least";
|
|
154
|
+
};
|
|
155
|
+
export type AutolaunchRuleConditionKindEnum = typeof AutolaunchRuleConditionKindEnum[keyof typeof AutolaunchRuleConditionKindEnum];
|
|
156
|
+
/**
|
|
157
|
+
* @export
|
|
158
|
+
*/
|
|
159
|
+
export declare const AutolaunchRuleStateEnum: {
|
|
160
|
+
readonly Armed: "armed";
|
|
161
|
+
readonly Launching: "launching";
|
|
162
|
+
readonly Fired: "fired";
|
|
163
|
+
readonly Expired: "expired";
|
|
164
|
+
};
|
|
165
|
+
export type AutolaunchRuleStateEnum = typeof AutolaunchRuleStateEnum[keyof typeof AutolaunchRuleStateEnum];
|
|
166
|
+
/**
|
|
167
|
+
* @export
|
|
168
|
+
*/
|
|
169
|
+
export declare const AutolaunchRuleCreatedBySurfaceEnum: {
|
|
170
|
+
readonly ApiKey: "api_key";
|
|
171
|
+
readonly Dashboard: "dashboard";
|
|
172
|
+
};
|
|
173
|
+
export type AutolaunchRuleCreatedBySurfaceEnum = typeof AutolaunchRuleCreatedBySurfaceEnum[keyof typeof AutolaunchRuleCreatedBySurfaceEnum];
|
|
174
|
+
/**
|
|
175
|
+
* Check if a given object implements the AutolaunchRule interface.
|
|
176
|
+
*/
|
|
177
|
+
export declare function instanceOfAutolaunchRule(value: object): value is AutolaunchRule;
|
|
178
|
+
export declare function AutolaunchRuleFromJSON(json: any): AutolaunchRule;
|
|
179
|
+
export declare function AutolaunchRuleFromJSONTyped(json: any, ignoreDiscriminator: boolean): AutolaunchRule;
|
|
180
|
+
export declare function AutolaunchRuleToJSON(json: any): AutolaunchRule;
|
|
181
|
+
export declare function AutolaunchRuleToJSONTyped(value?: AutolaunchRule | null, ignoreDiscriminator?: boolean): any;
|