@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,34 @@
|
|
|
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
|
+
* The entire PATCH surface. `enabled` must be present and must be false. Any other key is refused rather than accepted-and-ignored, because a PATCH carrying a new ceiling that returned 200 would leave the caller believing the cap had moved.
|
|
14
|
+
*
|
|
15
|
+
* @export
|
|
16
|
+
* @interface AutolaunchRuleDisarm
|
|
17
|
+
*/
|
|
18
|
+
export interface AutolaunchRuleDisarm {
|
|
19
|
+
/**
|
|
20
|
+
* Must be false. Sending true is refused: a fired rule consumed its one shot, so "resume" would silently be an authorization nobody gave, and arming again is a create.
|
|
21
|
+
*
|
|
22
|
+
* @type {boolean}
|
|
23
|
+
* @memberof AutolaunchRuleDisarm
|
|
24
|
+
*/
|
|
25
|
+
enabled: boolean;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Check if a given object implements the AutolaunchRuleDisarm interface.
|
|
29
|
+
*/
|
|
30
|
+
export declare function instanceOfAutolaunchRuleDisarm(value: object): value is AutolaunchRuleDisarm;
|
|
31
|
+
export declare function AutolaunchRuleDisarmFromJSON(json: any): AutolaunchRuleDisarm;
|
|
32
|
+
export declare function AutolaunchRuleDisarmFromJSONTyped(json: any, ignoreDiscriminator: boolean): AutolaunchRuleDisarm;
|
|
33
|
+
export declare function AutolaunchRuleDisarmToJSON(json: any): AutolaunchRuleDisarm;
|
|
34
|
+
export declare function AutolaunchRuleDisarmToJSONTyped(value?: AutolaunchRuleDisarm | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* GPU.ai Public Developer API
|
|
6
|
+
* Programmatic API for GPU.ai. Authenticate with API keys minted from the dashboard. See https://gpu.ai/docs for details.
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 1.0.0
|
|
9
|
+
* Contact: support@gpu.ai
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.instanceOfAutolaunchRuleDisarm = instanceOfAutolaunchRuleDisarm;
|
|
17
|
+
exports.AutolaunchRuleDisarmFromJSON = AutolaunchRuleDisarmFromJSON;
|
|
18
|
+
exports.AutolaunchRuleDisarmFromJSONTyped = AutolaunchRuleDisarmFromJSONTyped;
|
|
19
|
+
exports.AutolaunchRuleDisarmToJSON = AutolaunchRuleDisarmToJSON;
|
|
20
|
+
exports.AutolaunchRuleDisarmToJSONTyped = AutolaunchRuleDisarmToJSONTyped;
|
|
21
|
+
/**
|
|
22
|
+
* Check if a given object implements the AutolaunchRuleDisarm interface.
|
|
23
|
+
*/
|
|
24
|
+
function instanceOfAutolaunchRuleDisarm(value) {
|
|
25
|
+
if (!('enabled' in value) || value['enabled'] === undefined)
|
|
26
|
+
return false;
|
|
27
|
+
return true;
|
|
28
|
+
}
|
|
29
|
+
function AutolaunchRuleDisarmFromJSON(json) {
|
|
30
|
+
return AutolaunchRuleDisarmFromJSONTyped(json, false);
|
|
31
|
+
}
|
|
32
|
+
function AutolaunchRuleDisarmFromJSONTyped(json, ignoreDiscriminator) {
|
|
33
|
+
if (json == null) {
|
|
34
|
+
return json;
|
|
35
|
+
}
|
|
36
|
+
return {
|
|
37
|
+
'enabled': json['enabled'],
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
function AutolaunchRuleDisarmToJSON(json) {
|
|
41
|
+
return AutolaunchRuleDisarmToJSONTyped(json, false);
|
|
42
|
+
}
|
|
43
|
+
function AutolaunchRuleDisarmToJSONTyped(value, ignoreDiscriminator = false) {
|
|
44
|
+
if (value == null) {
|
|
45
|
+
return value;
|
|
46
|
+
}
|
|
47
|
+
return {
|
|
48
|
+
'enabled': value['enabled'],
|
|
49
|
+
};
|
|
50
|
+
}
|
|
@@ -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 { AutolaunchRule } from './AutolaunchRule';
|
|
13
|
+
/**
|
|
14
|
+
*
|
|
15
|
+
* @export
|
|
16
|
+
* @interface AutolaunchRulePage
|
|
17
|
+
*/
|
|
18
|
+
export interface AutolaunchRulePage {
|
|
19
|
+
/**
|
|
20
|
+
*
|
|
21
|
+
* @type {Array<AutolaunchRule>}
|
|
22
|
+
* @memberof AutolaunchRulePage
|
|
23
|
+
*/
|
|
24
|
+
data: Array<AutolaunchRule>;
|
|
25
|
+
/**
|
|
26
|
+
*
|
|
27
|
+
* @type {string}
|
|
28
|
+
* @memberof AutolaunchRulePage
|
|
29
|
+
*/
|
|
30
|
+
nextCursor: string | null;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Check if a given object implements the AutolaunchRulePage interface.
|
|
34
|
+
*/
|
|
35
|
+
export declare function instanceOfAutolaunchRulePage(value: object): value is AutolaunchRulePage;
|
|
36
|
+
export declare function AutolaunchRulePageFromJSON(json: any): AutolaunchRulePage;
|
|
37
|
+
export declare function AutolaunchRulePageFromJSONTyped(json: any, ignoreDiscriminator: boolean): AutolaunchRulePage;
|
|
38
|
+
export declare function AutolaunchRulePageToJSON(json: any): AutolaunchRulePage;
|
|
39
|
+
export declare function AutolaunchRulePageToJSONTyped(value?: AutolaunchRulePage | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* GPU.ai Public Developer API
|
|
6
|
+
* Programmatic API for GPU.ai. Authenticate with API keys minted from the dashboard. See https://gpu.ai/docs for details.
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 1.0.0
|
|
9
|
+
* Contact: support@gpu.ai
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.instanceOfAutolaunchRulePage = instanceOfAutolaunchRulePage;
|
|
17
|
+
exports.AutolaunchRulePageFromJSON = AutolaunchRulePageFromJSON;
|
|
18
|
+
exports.AutolaunchRulePageFromJSONTyped = AutolaunchRulePageFromJSONTyped;
|
|
19
|
+
exports.AutolaunchRulePageToJSON = AutolaunchRulePageToJSON;
|
|
20
|
+
exports.AutolaunchRulePageToJSONTyped = AutolaunchRulePageToJSONTyped;
|
|
21
|
+
const AutolaunchRule_1 = require("./AutolaunchRule");
|
|
22
|
+
/**
|
|
23
|
+
* Check if a given object implements the AutolaunchRulePage interface.
|
|
24
|
+
*/
|
|
25
|
+
function instanceOfAutolaunchRulePage(value) {
|
|
26
|
+
if (!('data' in value) || value['data'] === undefined)
|
|
27
|
+
return false;
|
|
28
|
+
if ((!('nextCursor' in value) && !('next_cursor' in value)) || (value['nextCursor'] === undefined && value['next_cursor'] === undefined))
|
|
29
|
+
return false;
|
|
30
|
+
return true;
|
|
31
|
+
}
|
|
32
|
+
function AutolaunchRulePageFromJSON(json) {
|
|
33
|
+
return AutolaunchRulePageFromJSONTyped(json, false);
|
|
34
|
+
}
|
|
35
|
+
function AutolaunchRulePageFromJSONTyped(json, ignoreDiscriminator) {
|
|
36
|
+
if (json == null) {
|
|
37
|
+
return json;
|
|
38
|
+
}
|
|
39
|
+
return {
|
|
40
|
+
'data': (json['data'].map(AutolaunchRule_1.AutolaunchRuleFromJSON)),
|
|
41
|
+
'nextCursor': json['next_cursor'],
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
function AutolaunchRulePageToJSON(json) {
|
|
45
|
+
return AutolaunchRulePageToJSONTyped(json, false);
|
|
46
|
+
}
|
|
47
|
+
function AutolaunchRulePageToJSONTyped(value, ignoreDiscriminator = false) {
|
|
48
|
+
if (value == null) {
|
|
49
|
+
return value;
|
|
50
|
+
}
|
|
51
|
+
return {
|
|
52
|
+
'data': (value['data'].map(AutolaunchRule_1.AutolaunchRuleToJSON)),
|
|
53
|
+
'next_cursor': value['nextCursor'],
|
|
54
|
+
};
|
|
55
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
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
|
+
* One bucket of a price/stock series.
|
|
14
|
+
*
|
|
15
|
+
* The nullability of `price_per_gpu_hour` and `available_count` is the contract, not a convenience: a real 0 is a bucket we sampled and found sold out, and null is a bucket we never successfully sampled. A client that coerces null to 0 will report GPU.ai's own polling outages as supplier stockouts, and must not interpolate across a null.
|
|
16
|
+
*
|
|
17
|
+
* @export
|
|
18
|
+
* @interface MarketHistoryPoint
|
|
19
|
+
*/
|
|
20
|
+
export interface MarketHistoryPoint {
|
|
21
|
+
/**
|
|
22
|
+
* Start of the bucket, UTC, aligned to the bucket width.
|
|
23
|
+
* @type {Date}
|
|
24
|
+
* @memberof MarketHistoryPoint
|
|
25
|
+
*/
|
|
26
|
+
bucketTs: Date;
|
|
27
|
+
/**
|
|
28
|
+
* GPU.ai's floor per-GPU hourly rate for this bucket, or null if we did not sample this bucket. Null is NOT zero.
|
|
29
|
+
* @type {number}
|
|
30
|
+
* @memberof MarketHistoryPoint
|
|
31
|
+
*/
|
|
32
|
+
pricePerGpuHour: number | null;
|
|
33
|
+
/**
|
|
34
|
+
* Obtainable units across every matching offer in this bucket. 0 means we sampled and the market was sold out; null means we did not sample this bucket.
|
|
35
|
+
* @type {number}
|
|
36
|
+
* @memberof MarketHistoryPoint
|
|
37
|
+
*/
|
|
38
|
+
availableCount: number | null;
|
|
39
|
+
/**
|
|
40
|
+
* Whole-node hourly price the per-GPU rate was divided out of. Present only when the bucket's floor came from a multi-GPU node; absent for single-GPU capacity.
|
|
41
|
+
* @type {number}
|
|
42
|
+
* @memberof MarketHistoryPoint
|
|
43
|
+
*/
|
|
44
|
+
nodePricePerHour?: number;
|
|
45
|
+
/**
|
|
46
|
+
* GPUs in that node. Present only alongside `node_price_per_hour`, and it is what lets a renderer qualify a derived rate as "(from an 8-GPU node)" rather than implying single-GPU rentability.
|
|
47
|
+
* @type {number}
|
|
48
|
+
* @memberof MarketHistoryPoint
|
|
49
|
+
*/
|
|
50
|
+
gpuCount?: number;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Check if a given object implements the MarketHistoryPoint interface.
|
|
54
|
+
*/
|
|
55
|
+
export declare function instanceOfMarketHistoryPoint(value: object): value is MarketHistoryPoint;
|
|
56
|
+
export declare function MarketHistoryPointFromJSON(json: any): MarketHistoryPoint;
|
|
57
|
+
export declare function MarketHistoryPointFromJSONTyped(json: any, ignoreDiscriminator: boolean): MarketHistoryPoint;
|
|
58
|
+
export declare function MarketHistoryPointToJSON(json: any): MarketHistoryPoint;
|
|
59
|
+
export declare function MarketHistoryPointToJSONTyped(value?: MarketHistoryPoint | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* GPU.ai Public Developer API
|
|
6
|
+
* Programmatic API for GPU.ai. Authenticate with API keys minted from the dashboard. See https://gpu.ai/docs for details.
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 1.0.0
|
|
9
|
+
* Contact: support@gpu.ai
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.instanceOfMarketHistoryPoint = instanceOfMarketHistoryPoint;
|
|
17
|
+
exports.MarketHistoryPointFromJSON = MarketHistoryPointFromJSON;
|
|
18
|
+
exports.MarketHistoryPointFromJSONTyped = MarketHistoryPointFromJSONTyped;
|
|
19
|
+
exports.MarketHistoryPointToJSON = MarketHistoryPointToJSON;
|
|
20
|
+
exports.MarketHistoryPointToJSONTyped = MarketHistoryPointToJSONTyped;
|
|
21
|
+
/**
|
|
22
|
+
* Check if a given object implements the MarketHistoryPoint interface.
|
|
23
|
+
*/
|
|
24
|
+
function instanceOfMarketHistoryPoint(value) {
|
|
25
|
+
if ((!('bucketTs' in value) && !('bucket_ts' in value)) || (value['bucketTs'] === undefined && value['bucket_ts'] === undefined))
|
|
26
|
+
return false;
|
|
27
|
+
if ((!('pricePerGpuHour' in value) && !('price_per_gpu_hour' in value)) || (value['pricePerGpuHour'] === undefined && value['price_per_gpu_hour'] === undefined))
|
|
28
|
+
return false;
|
|
29
|
+
if ((!('availableCount' in value) && !('available_count' in value)) || (value['availableCount'] === undefined && value['available_count'] === undefined))
|
|
30
|
+
return false;
|
|
31
|
+
return true;
|
|
32
|
+
}
|
|
33
|
+
function MarketHistoryPointFromJSON(json) {
|
|
34
|
+
return MarketHistoryPointFromJSONTyped(json, false);
|
|
35
|
+
}
|
|
36
|
+
function MarketHistoryPointFromJSONTyped(json, ignoreDiscriminator) {
|
|
37
|
+
if (json == null) {
|
|
38
|
+
return json;
|
|
39
|
+
}
|
|
40
|
+
return {
|
|
41
|
+
'bucketTs': (new Date(json['bucket_ts'])),
|
|
42
|
+
'pricePerGpuHour': json['price_per_gpu_hour'],
|
|
43
|
+
'availableCount': json['available_count'],
|
|
44
|
+
'nodePricePerHour': json['node_price_per_hour'] == null ? undefined : json['node_price_per_hour'],
|
|
45
|
+
'gpuCount': json['gpu_count'] == null ? undefined : json['gpu_count'],
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
function MarketHistoryPointToJSON(json) {
|
|
49
|
+
return MarketHistoryPointToJSONTyped(json, false);
|
|
50
|
+
}
|
|
51
|
+
function MarketHistoryPointToJSONTyped(value, ignoreDiscriminator = false) {
|
|
52
|
+
if (value == null) {
|
|
53
|
+
return value;
|
|
54
|
+
}
|
|
55
|
+
return {
|
|
56
|
+
'bucket_ts': value['bucketTs'].toISOString(),
|
|
57
|
+
'price_per_gpu_hour': value['pricePerGpuHour'],
|
|
58
|
+
'available_count': value['availableCount'],
|
|
59
|
+
'node_price_per_hour': value['nodePricePerHour'],
|
|
60
|
+
'gpu_count': value['gpuCount'],
|
|
61
|
+
};
|
|
62
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
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 { MarketHistoryPoint } from './MarketHistoryPoint';
|
|
13
|
+
/**
|
|
14
|
+
* A price/stock series for one (gpu_model, region, capacity_class) key.
|
|
15
|
+
*
|
|
16
|
+
* Points cover the FULL bucket grid across the requested window, including the buckets we did not sample — a gap therefore has visible width rather than disappearing between two adjacent points.
|
|
17
|
+
*
|
|
18
|
+
* @export
|
|
19
|
+
* @interface MarketHistoryResponse
|
|
20
|
+
*/
|
|
21
|
+
export interface MarketHistoryResponse {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof MarketHistoryResponse
|
|
26
|
+
*/
|
|
27
|
+
gpuModel: string;
|
|
28
|
+
/**
|
|
29
|
+
* Echoes the request. Empty means the series is MERGED across every region, the same thing it meant on the way in.
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof MarketHistoryResponse
|
|
32
|
+
*/
|
|
33
|
+
region: string;
|
|
34
|
+
/**
|
|
35
|
+
* Echoes the request. Empty means the series is merged across both classes.
|
|
36
|
+
* @type {string}
|
|
37
|
+
* @memberof MarketHistoryResponse
|
|
38
|
+
*/
|
|
39
|
+
capacityClass: string;
|
|
40
|
+
/**
|
|
41
|
+
* Resolution the server actually answered at. Echoed because the wide views downsample at query time, so a client must never assume 900.
|
|
42
|
+
* @type {number}
|
|
43
|
+
* @memberof MarketHistoryResponse
|
|
44
|
+
*/
|
|
45
|
+
bucketSeconds: number;
|
|
46
|
+
/**
|
|
47
|
+
*
|
|
48
|
+
* @type {Array<MarketHistoryPoint>}
|
|
49
|
+
* @memberof MarketHistoryResponse
|
|
50
|
+
*/
|
|
51
|
+
points: Array<MarketHistoryPoint>;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Check if a given object implements the MarketHistoryResponse interface.
|
|
55
|
+
*/
|
|
56
|
+
export declare function instanceOfMarketHistoryResponse(value: object): value is MarketHistoryResponse;
|
|
57
|
+
export declare function MarketHistoryResponseFromJSON(json: any): MarketHistoryResponse;
|
|
58
|
+
export declare function MarketHistoryResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): MarketHistoryResponse;
|
|
59
|
+
export declare function MarketHistoryResponseToJSON(json: any): MarketHistoryResponse;
|
|
60
|
+
export declare function MarketHistoryResponseToJSONTyped(value?: MarketHistoryResponse | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* GPU.ai Public Developer API
|
|
6
|
+
* Programmatic API for GPU.ai. Authenticate with API keys minted from the dashboard. See https://gpu.ai/docs for details.
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 1.0.0
|
|
9
|
+
* Contact: support@gpu.ai
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.instanceOfMarketHistoryResponse = instanceOfMarketHistoryResponse;
|
|
17
|
+
exports.MarketHistoryResponseFromJSON = MarketHistoryResponseFromJSON;
|
|
18
|
+
exports.MarketHistoryResponseFromJSONTyped = MarketHistoryResponseFromJSONTyped;
|
|
19
|
+
exports.MarketHistoryResponseToJSON = MarketHistoryResponseToJSON;
|
|
20
|
+
exports.MarketHistoryResponseToJSONTyped = MarketHistoryResponseToJSONTyped;
|
|
21
|
+
const MarketHistoryPoint_1 = require("./MarketHistoryPoint");
|
|
22
|
+
/**
|
|
23
|
+
* Check if a given object implements the MarketHistoryResponse interface.
|
|
24
|
+
*/
|
|
25
|
+
function instanceOfMarketHistoryResponse(value) {
|
|
26
|
+
if ((!('gpuModel' in value) && !('gpu_model' in value)) || (value['gpuModel'] === undefined && value['gpu_model'] === undefined))
|
|
27
|
+
return false;
|
|
28
|
+
if (!('region' in value) || value['region'] === undefined)
|
|
29
|
+
return false;
|
|
30
|
+
if ((!('capacityClass' in value) && !('capacity_class' in value)) || (value['capacityClass'] === undefined && value['capacity_class'] === undefined))
|
|
31
|
+
return false;
|
|
32
|
+
if ((!('bucketSeconds' in value) && !('bucket_seconds' in value)) || (value['bucketSeconds'] === undefined && value['bucket_seconds'] === undefined))
|
|
33
|
+
return false;
|
|
34
|
+
if (!('points' in value) || value['points'] === undefined)
|
|
35
|
+
return false;
|
|
36
|
+
return true;
|
|
37
|
+
}
|
|
38
|
+
function MarketHistoryResponseFromJSON(json) {
|
|
39
|
+
return MarketHistoryResponseFromJSONTyped(json, false);
|
|
40
|
+
}
|
|
41
|
+
function MarketHistoryResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
42
|
+
if (json == null) {
|
|
43
|
+
return json;
|
|
44
|
+
}
|
|
45
|
+
return {
|
|
46
|
+
'gpuModel': json['gpu_model'],
|
|
47
|
+
'region': json['region'],
|
|
48
|
+
'capacityClass': json['capacity_class'],
|
|
49
|
+
'bucketSeconds': json['bucket_seconds'],
|
|
50
|
+
'points': (json['points'].map(MarketHistoryPoint_1.MarketHistoryPointFromJSON)),
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
function MarketHistoryResponseToJSON(json) {
|
|
54
|
+
return MarketHistoryResponseToJSONTyped(json, false);
|
|
55
|
+
}
|
|
56
|
+
function MarketHistoryResponseToJSONTyped(value, ignoreDiscriminator = false) {
|
|
57
|
+
if (value == null) {
|
|
58
|
+
return value;
|
|
59
|
+
}
|
|
60
|
+
return {
|
|
61
|
+
'gpu_model': value['gpuModel'],
|
|
62
|
+
'region': value['region'],
|
|
63
|
+
'capacity_class': value['capacityClass'],
|
|
64
|
+
'bucket_seconds': value['bucketSeconds'],
|
|
65
|
+
'points': (value['points'].map(MarketHistoryPoint_1.MarketHistoryPointToJSON)),
|
|
66
|
+
};
|
|
67
|
+
}
|
package/dist/models/Problem.d.ts
CHANGED
|
@@ -72,6 +72,7 @@ export declare const ProblemCodeEnum: {
|
|
|
72
72
|
readonly InsufficientBalance: "insufficient_balance";
|
|
73
73
|
readonly QuotaExceeded: "quota_exceeded";
|
|
74
74
|
readonly RateLimited: "rate_limited";
|
|
75
|
+
readonly CreatorCheckUnavailable: "creator_check_unavailable";
|
|
75
76
|
readonly InternalError: "internal_error";
|
|
76
77
|
readonly OperationFailed: "operation_failed";
|
|
77
78
|
};
|
package/dist/models/Problem.js
CHANGED
|
@@ -39,6 +39,7 @@ exports.ProblemCodeEnum = {
|
|
|
39
39
|
InsufficientBalance: 'insufficient_balance',
|
|
40
40
|
QuotaExceeded: 'quota_exceeded',
|
|
41
41
|
RateLimited: 'rate_limited',
|
|
42
|
+
CreatorCheckUnavailable: 'creator_check_unavailable',
|
|
42
43
|
InternalError: 'internal_error',
|
|
43
44
|
OperationFailed: 'operation_failed'
|
|
44
45
|
};
|
|
@@ -0,0 +1,141 @@
|
|
|
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 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.
|
|
14
|
+
*
|
|
15
|
+
* @export
|
|
16
|
+
* @interface WatchRule
|
|
17
|
+
*/
|
|
18
|
+
export interface WatchRule {
|
|
19
|
+
/**
|
|
20
|
+
*
|
|
21
|
+
* @type {string}
|
|
22
|
+
* @memberof WatchRule
|
|
23
|
+
*/
|
|
24
|
+
id: string;
|
|
25
|
+
/**
|
|
26
|
+
* The GPU model the rule watches, e.g. "H100".
|
|
27
|
+
* @type {string}
|
|
28
|
+
* @memberof WatchRule
|
|
29
|
+
*/
|
|
30
|
+
gpuModel: string;
|
|
31
|
+
/**
|
|
32
|
+
* Canonical region the rule is narrowed to, or null for every region.
|
|
33
|
+
* @type {string}
|
|
34
|
+
* @memberof WatchRule
|
|
35
|
+
*/
|
|
36
|
+
region: string | null;
|
|
37
|
+
/**
|
|
38
|
+
* Capacity class the rule is narrowed to, or null for both.
|
|
39
|
+
* @type {WatchRuleCapacityClassEnum}
|
|
40
|
+
* @memberof WatchRule
|
|
41
|
+
*/
|
|
42
|
+
capacityClass: WatchRuleCapacityClassEnum | null;
|
|
43
|
+
/**
|
|
44
|
+
*
|
|
45
|
+
* @type {WatchRuleConditionKindEnum}
|
|
46
|
+
* @memberof WatchRule
|
|
47
|
+
*/
|
|
48
|
+
conditionKind: WatchRuleConditionKindEnum;
|
|
49
|
+
/**
|
|
50
|
+
* Per-GPU hourly price for price_under, or a unit count for count_at_least. Null for in_stock, which takes no threshold.
|
|
51
|
+
*
|
|
52
|
+
* @type {number}
|
|
53
|
+
* @memberof WatchRule
|
|
54
|
+
*/
|
|
55
|
+
threshold: number | null;
|
|
56
|
+
/**
|
|
57
|
+
* armed = the condition is currently false and the next transition to true will alert. fired = it has alerted and has not yet re-armed.
|
|
58
|
+
*
|
|
59
|
+
* @type {WatchRuleStateEnum}
|
|
60
|
+
* @memberof WatchRule
|
|
61
|
+
*/
|
|
62
|
+
state: WatchRuleStateEnum;
|
|
63
|
+
/**
|
|
64
|
+
*
|
|
65
|
+
* @type {Date}
|
|
66
|
+
* @memberof WatchRule
|
|
67
|
+
*/
|
|
68
|
+
lastFiredAt: Date | null;
|
|
69
|
+
/**
|
|
70
|
+
* 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.
|
|
71
|
+
*
|
|
72
|
+
* @type {Date}
|
|
73
|
+
* @memberof WatchRule
|
|
74
|
+
*/
|
|
75
|
+
quietUntil: Date | null;
|
|
76
|
+
/**
|
|
77
|
+
* Id of a webhook endpoint registered by this organization, or null to deliver to every registered endpoint. Never a URL.
|
|
78
|
+
*
|
|
79
|
+
* @type {string}
|
|
80
|
+
* @memberof WatchRule
|
|
81
|
+
*/
|
|
82
|
+
webhookEndpointOverrideId: string | null;
|
|
83
|
+
/**
|
|
84
|
+
*
|
|
85
|
+
* @type {boolean}
|
|
86
|
+
* @memberof WatchRule
|
|
87
|
+
*/
|
|
88
|
+
enabled: boolean;
|
|
89
|
+
/**
|
|
90
|
+
* Why an automatically disabled rule was disabled — for example its creator no longer belongs to the organization.
|
|
91
|
+
*
|
|
92
|
+
* @type {string}
|
|
93
|
+
* @memberof WatchRule
|
|
94
|
+
*/
|
|
95
|
+
deactivatedReason: string | null;
|
|
96
|
+
/**
|
|
97
|
+
*
|
|
98
|
+
* @type {Date}
|
|
99
|
+
* @memberof WatchRule
|
|
100
|
+
*/
|
|
101
|
+
createdAt: Date;
|
|
102
|
+
/**
|
|
103
|
+
*
|
|
104
|
+
* @type {Date}
|
|
105
|
+
* @memberof WatchRule
|
|
106
|
+
*/
|
|
107
|
+
updatedAt: Date;
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* @export
|
|
111
|
+
*/
|
|
112
|
+
export declare const WatchRuleCapacityClassEnum: {
|
|
113
|
+
readonly Secure: "secure";
|
|
114
|
+
readonly Community: "community";
|
|
115
|
+
};
|
|
116
|
+
export type WatchRuleCapacityClassEnum = typeof WatchRuleCapacityClassEnum[keyof typeof WatchRuleCapacityClassEnum];
|
|
117
|
+
/**
|
|
118
|
+
* @export
|
|
119
|
+
*/
|
|
120
|
+
export declare const WatchRuleConditionKindEnum: {
|
|
121
|
+
readonly PriceUnder: "price_under";
|
|
122
|
+
readonly InStock: "in_stock";
|
|
123
|
+
readonly CountAtLeast: "count_at_least";
|
|
124
|
+
};
|
|
125
|
+
export type WatchRuleConditionKindEnum = typeof WatchRuleConditionKindEnum[keyof typeof WatchRuleConditionKindEnum];
|
|
126
|
+
/**
|
|
127
|
+
* @export
|
|
128
|
+
*/
|
|
129
|
+
export declare const WatchRuleStateEnum: {
|
|
130
|
+
readonly Armed: "armed";
|
|
131
|
+
readonly Fired: "fired";
|
|
132
|
+
};
|
|
133
|
+
export type WatchRuleStateEnum = typeof WatchRuleStateEnum[keyof typeof WatchRuleStateEnum];
|
|
134
|
+
/**
|
|
135
|
+
* Check if a given object implements the WatchRule interface.
|
|
136
|
+
*/
|
|
137
|
+
export declare function instanceOfWatchRule(value: object): value is WatchRule;
|
|
138
|
+
export declare function WatchRuleFromJSON(json: any): WatchRule;
|
|
139
|
+
export declare function WatchRuleFromJSONTyped(json: any, ignoreDiscriminator: boolean): WatchRule;
|
|
140
|
+
export declare function WatchRuleToJSON(json: any): WatchRule;
|
|
141
|
+
export declare function WatchRuleToJSONTyped(value?: WatchRule | null, ignoreDiscriminator?: boolean): any;
|