@gpuai/sdk 0.3.15 → 0.3.17
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/apis/MarketApi.d.ts +13 -0
- package/dist/apis/MarketApi.js +15 -1
- package/dist/esm/apis/MarketApi.d.ts +13 -0
- package/dist/esm/apis/MarketApi.js +14 -0
- package/dist/esm/models/MarketHistoryResponse.d.ts +14 -0
- package/dist/esm/models/MarketHistoryResponse.js +8 -0
- package/dist/esm/models/WatchRule.d.ts +2 -1
- package/dist/esm/models/WatchRuleCreate.d.ts +1 -0
- package/dist/models/MarketHistoryResponse.d.ts +14 -0
- package/dist/models/MarketHistoryResponse.js +8 -0
- package/dist/models/WatchRule.d.ts +2 -1
- package/dist/models/WatchRuleCreate.d.ts +1 -0
- package/docs/MarketApi.md +6 -3
- package/docs/MarketHistoryResponse.md +4 -0
- package/docs/WatchApi.md +2 -2
- package/package.json +1 -1
- package/src/apis/MarketApi.ts +17 -0
- package/src/models/MarketHistoryResponse.ts +20 -0
- package/src/models/WatchRule.ts +2 -1
- package/src/models/WatchRuleCreate.ts +1 -0
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# @gpuai/sdk@0.3.
|
|
1
|
+
# @gpuai/sdk@0.3.17
|
|
2
2
|
|
|
3
3
|
A TypeScript SDK client for the api.gpu.ai API.
|
|
4
4
|
|
|
@@ -235,7 +235,7 @@ and is automatically generated by the
|
|
|
235
235
|
[OpenAPI Generator](https://openapi-generator.tech) project:
|
|
236
236
|
|
|
237
237
|
- API version: `1.0.0`
|
|
238
|
-
- Package version: `0.3.
|
|
238
|
+
- Package version: `0.3.17`
|
|
239
239
|
- Generator version: `7.24.0`
|
|
240
240
|
- Build package: `org.openapitools.codegen.languages.TypeScriptFetchClientCodegen`
|
|
241
241
|
|
package/dist/apis/MarketApi.d.ts
CHANGED
|
@@ -15,6 +15,7 @@ export interface GetMarketHistoryRequest {
|
|
|
15
15
|
gpuModel: string;
|
|
16
16
|
region?: string;
|
|
17
17
|
capacityClass?: GetMarketHistoryCapacityClassEnum;
|
|
18
|
+
clusterSize?: GetMarketHistoryClusterSizeEnum;
|
|
18
19
|
bucket?: GetMarketHistoryBucketEnum;
|
|
19
20
|
from?: Date;
|
|
20
21
|
to?: Date;
|
|
@@ -46,6 +47,18 @@ export declare const GetMarketHistoryCapacityClassEnum: {
|
|
|
46
47
|
readonly Community: "community";
|
|
47
48
|
};
|
|
48
49
|
export type GetMarketHistoryCapacityClassEnum = typeof GetMarketHistoryCapacityClassEnum[keyof typeof GetMarketHistoryCapacityClassEnum];
|
|
50
|
+
/**
|
|
51
|
+
* @export
|
|
52
|
+
*/
|
|
53
|
+
export declare const GetMarketHistoryClusterSizeEnum: {
|
|
54
|
+
readonly NUMBER_1: 1;
|
|
55
|
+
readonly NUMBER_2: 2;
|
|
56
|
+
readonly NUMBER_4: 4;
|
|
57
|
+
readonly NUMBER_8: 8;
|
|
58
|
+
readonly NUMBER_10: 10;
|
|
59
|
+
readonly NUMBER_16: 16;
|
|
60
|
+
};
|
|
61
|
+
export type GetMarketHistoryClusterSizeEnum = typeof GetMarketHistoryClusterSizeEnum[keyof typeof GetMarketHistoryClusterSizeEnum];
|
|
49
62
|
/**
|
|
50
63
|
* @export
|
|
51
64
|
*/
|
package/dist/apis/MarketApi.js
CHANGED
|
@@ -22,7 +22,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
22
22
|
});
|
|
23
23
|
};
|
|
24
24
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
-
exports.GetMarketHistoryBucketEnum = exports.GetMarketHistoryCapacityClassEnum = exports.MarketApi = void 0;
|
|
25
|
+
exports.GetMarketHistoryBucketEnum = exports.GetMarketHistoryClusterSizeEnum = exports.GetMarketHistoryCapacityClassEnum = exports.MarketApi = void 0;
|
|
26
26
|
const runtime = require("../runtime");
|
|
27
27
|
const MarketHistoryResponse_1 = require("../models/MarketHistoryResponse");
|
|
28
28
|
/**
|
|
@@ -47,6 +47,9 @@ class MarketApi extends runtime.BaseAPI {
|
|
|
47
47
|
if (requestParameters['capacityClass'] != null) {
|
|
48
48
|
queryParameters['capacity_class'] = requestParameters['capacityClass'];
|
|
49
49
|
}
|
|
50
|
+
if (requestParameters['clusterSize'] != null) {
|
|
51
|
+
queryParameters['cluster_size'] = requestParameters['clusterSize'];
|
|
52
|
+
}
|
|
50
53
|
if (requestParameters['bucket'] != null) {
|
|
51
54
|
queryParameters['bucket'] = requestParameters['bucket'];
|
|
52
55
|
}
|
|
@@ -103,6 +106,17 @@ exports.GetMarketHistoryCapacityClassEnum = {
|
|
|
103
106
|
Secure: 'secure',
|
|
104
107
|
Community: 'community'
|
|
105
108
|
};
|
|
109
|
+
/**
|
|
110
|
+
* @export
|
|
111
|
+
*/
|
|
112
|
+
exports.GetMarketHistoryClusterSizeEnum = {
|
|
113
|
+
NUMBER_1: 1,
|
|
114
|
+
NUMBER_2: 2,
|
|
115
|
+
NUMBER_4: 4,
|
|
116
|
+
NUMBER_8: 8,
|
|
117
|
+
NUMBER_10: 10,
|
|
118
|
+
NUMBER_16: 16
|
|
119
|
+
};
|
|
106
120
|
/**
|
|
107
121
|
* @export
|
|
108
122
|
*/
|
|
@@ -15,6 +15,7 @@ export interface GetMarketHistoryRequest {
|
|
|
15
15
|
gpuModel: string;
|
|
16
16
|
region?: string;
|
|
17
17
|
capacityClass?: GetMarketHistoryCapacityClassEnum;
|
|
18
|
+
clusterSize?: GetMarketHistoryClusterSizeEnum;
|
|
18
19
|
bucket?: GetMarketHistoryBucketEnum;
|
|
19
20
|
from?: Date;
|
|
20
21
|
to?: Date;
|
|
@@ -46,6 +47,18 @@ export declare const GetMarketHistoryCapacityClassEnum: {
|
|
|
46
47
|
readonly Community: "community";
|
|
47
48
|
};
|
|
48
49
|
export type GetMarketHistoryCapacityClassEnum = typeof GetMarketHistoryCapacityClassEnum[keyof typeof GetMarketHistoryCapacityClassEnum];
|
|
50
|
+
/**
|
|
51
|
+
* @export
|
|
52
|
+
*/
|
|
53
|
+
export declare const GetMarketHistoryClusterSizeEnum: {
|
|
54
|
+
readonly NUMBER_1: 1;
|
|
55
|
+
readonly NUMBER_2: 2;
|
|
56
|
+
readonly NUMBER_4: 4;
|
|
57
|
+
readonly NUMBER_8: 8;
|
|
58
|
+
readonly NUMBER_10: 10;
|
|
59
|
+
readonly NUMBER_16: 16;
|
|
60
|
+
};
|
|
61
|
+
export type GetMarketHistoryClusterSizeEnum = typeof GetMarketHistoryClusterSizeEnum[keyof typeof GetMarketHistoryClusterSizeEnum];
|
|
49
62
|
/**
|
|
50
63
|
* @export
|
|
51
64
|
*/
|
|
@@ -44,6 +44,9 @@ export class MarketApi extends runtime.BaseAPI {
|
|
|
44
44
|
if (requestParameters['capacityClass'] != null) {
|
|
45
45
|
queryParameters['capacity_class'] = requestParameters['capacityClass'];
|
|
46
46
|
}
|
|
47
|
+
if (requestParameters['clusterSize'] != null) {
|
|
48
|
+
queryParameters['cluster_size'] = requestParameters['clusterSize'];
|
|
49
|
+
}
|
|
47
50
|
if (requestParameters['bucket'] != null) {
|
|
48
51
|
queryParameters['bucket'] = requestParameters['bucket'];
|
|
49
52
|
}
|
|
@@ -99,6 +102,17 @@ export const GetMarketHistoryCapacityClassEnum = {
|
|
|
99
102
|
Secure: 'secure',
|
|
100
103
|
Community: 'community'
|
|
101
104
|
};
|
|
105
|
+
/**
|
|
106
|
+
* @export
|
|
107
|
+
*/
|
|
108
|
+
export const GetMarketHistoryClusterSizeEnum = {
|
|
109
|
+
NUMBER_1: 1,
|
|
110
|
+
NUMBER_2: 2,
|
|
111
|
+
NUMBER_4: 4,
|
|
112
|
+
NUMBER_8: 8,
|
|
113
|
+
NUMBER_10: 10,
|
|
114
|
+
NUMBER_16: 16
|
|
115
|
+
};
|
|
102
116
|
/**
|
|
103
117
|
* @export
|
|
104
118
|
*/
|
|
@@ -37,6 +37,20 @@ export interface MarketHistoryResponse {
|
|
|
37
37
|
* @memberof MarketHistoryResponse
|
|
38
38
|
*/
|
|
39
39
|
capacityClass: string;
|
|
40
|
+
/**
|
|
41
|
+
* Echoes the request. 0 means the series is MERGED across every node shape, the same thing an omitted parameter meant on the way in.
|
|
42
|
+
* @type {number}
|
|
43
|
+
* @memberof MarketHistoryResponse
|
|
44
|
+
*/
|
|
45
|
+
clusterSize: number;
|
|
46
|
+
/**
|
|
47
|
+
* The node shapes that actually have rows in this window, for this gpu_model / region / capacity_class — what a size picker may honestly offer.
|
|
48
|
+
*
|
|
49
|
+
* This is what we SAMPLED, not what we may ever sell: offering a shape a model was never listed at draws an empty chart a caller reads as a stockout. An empty array means we looked and found none. It is unaffected by the cluster_size parameter, so a picker's options never depend on which option is currently selected.
|
|
50
|
+
* @type {Array<number>}
|
|
51
|
+
* @memberof MarketHistoryResponse
|
|
52
|
+
*/
|
|
53
|
+
availableClusterSizes: Array<number>;
|
|
40
54
|
/**
|
|
41
55
|
* Resolution the server actually answered at. Echoed because the wide views downsample at query time, so a client must never assume 900.
|
|
42
56
|
* @type {number}
|
|
@@ -22,6 +22,10 @@ export function instanceOfMarketHistoryResponse(value) {
|
|
|
22
22
|
return false;
|
|
23
23
|
if ((!('capacityClass' in value) && !('capacity_class' in value)) || (value['capacityClass'] === undefined && value['capacity_class'] === undefined))
|
|
24
24
|
return false;
|
|
25
|
+
if ((!('clusterSize' in value) && !('cluster_size' in value)) || (value['clusterSize'] === undefined && value['cluster_size'] === undefined))
|
|
26
|
+
return false;
|
|
27
|
+
if ((!('availableClusterSizes' in value) && !('available_cluster_sizes' in value)) || (value['availableClusterSizes'] === undefined && value['available_cluster_sizes'] === undefined))
|
|
28
|
+
return false;
|
|
25
29
|
if ((!('bucketSeconds' in value) && !('bucket_seconds' in value)) || (value['bucketSeconds'] === undefined && value['bucket_seconds'] === undefined))
|
|
26
30
|
return false;
|
|
27
31
|
if (!('points' in value) || value['points'] === undefined)
|
|
@@ -39,6 +43,8 @@ export function MarketHistoryResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
39
43
|
'gpuModel': json['gpu_model'],
|
|
40
44
|
'region': json['region'],
|
|
41
45
|
'capacityClass': json['capacity_class'],
|
|
46
|
+
'clusterSize': json['cluster_size'],
|
|
47
|
+
'availableClusterSizes': json['available_cluster_sizes'],
|
|
42
48
|
'bucketSeconds': json['bucket_seconds'],
|
|
43
49
|
'points': (json['points'].map(MarketHistoryPointFromJSON)),
|
|
44
50
|
};
|
|
@@ -54,6 +60,8 @@ export function MarketHistoryResponseToJSONTyped(value, ignoreDiscriminator = fa
|
|
|
54
60
|
'gpu_model': value['gpuModel'],
|
|
55
61
|
'region': value['region'],
|
|
56
62
|
'capacity_class': value['capacityClass'],
|
|
63
|
+
'cluster_size': value['clusterSize'],
|
|
64
|
+
'available_cluster_sizes': value['availableClusterSizes'],
|
|
57
65
|
'bucket_seconds': value['bucketSeconds'],
|
|
58
66
|
'points': (value['points'].map(MarketHistoryPointToJSON)),
|
|
59
67
|
};
|
|
@@ -23,7 +23,8 @@ export interface WatchRule {
|
|
|
23
23
|
*/
|
|
24
24
|
id: string;
|
|
25
25
|
/**
|
|
26
|
-
* The GPU model the rule watches, e.g. "H100".
|
|
26
|
+
* The canonical GPU model id the rule watches, e.g. "h100_sxm" — a MODEL, not a generation. Alerts match the live catalog exactly, so a rule for a model we do not list could never fire and is refused rather than stored. Case and punctuation are forgiving ("H100-SXM" resolves to "h100_sxm"), and the canonical id is what is stored and returned. GET /v1/gpu-types lists the models currently on offer; a model with no stock right now is still watchable, which is the point of watching it.
|
|
27
|
+
*
|
|
27
28
|
* @type {string}
|
|
28
29
|
* @memberof WatchRule
|
|
29
30
|
*/
|
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
*/
|
|
17
17
|
export interface WatchRuleCreate {
|
|
18
18
|
/**
|
|
19
|
+
* The canonical GPU model id the rule watches, e.g. "h100_sxm" — a MODEL, not a generation. Alerts match the live catalog exactly, so a rule for a model we do not list could never fire and is refused rather than stored. Case and punctuation are forgiving ("H100-SXM" resolves to "h100_sxm"), and the canonical id is what is stored and returned. GET /v1/gpu-types lists the models currently on offer; a model with no stock right now is still watchable, which is the point of watching it.
|
|
19
20
|
*
|
|
20
21
|
* @type {string}
|
|
21
22
|
* @memberof WatchRuleCreate
|
|
@@ -37,6 +37,20 @@ export interface MarketHistoryResponse {
|
|
|
37
37
|
* @memberof MarketHistoryResponse
|
|
38
38
|
*/
|
|
39
39
|
capacityClass: string;
|
|
40
|
+
/**
|
|
41
|
+
* Echoes the request. 0 means the series is MERGED across every node shape, the same thing an omitted parameter meant on the way in.
|
|
42
|
+
* @type {number}
|
|
43
|
+
* @memberof MarketHistoryResponse
|
|
44
|
+
*/
|
|
45
|
+
clusterSize: number;
|
|
46
|
+
/**
|
|
47
|
+
* The node shapes that actually have rows in this window, for this gpu_model / region / capacity_class — what a size picker may honestly offer.
|
|
48
|
+
*
|
|
49
|
+
* This is what we SAMPLED, not what we may ever sell: offering a shape a model was never listed at draws an empty chart a caller reads as a stockout. An empty array means we looked and found none. It is unaffected by the cluster_size parameter, so a picker's options never depend on which option is currently selected.
|
|
50
|
+
* @type {Array<number>}
|
|
51
|
+
* @memberof MarketHistoryResponse
|
|
52
|
+
*/
|
|
53
|
+
availableClusterSizes: Array<number>;
|
|
40
54
|
/**
|
|
41
55
|
* Resolution the server actually answered at. Echoed because the wide views downsample at query time, so a client must never assume 900.
|
|
42
56
|
* @type {number}
|
|
@@ -29,6 +29,10 @@ function instanceOfMarketHistoryResponse(value) {
|
|
|
29
29
|
return false;
|
|
30
30
|
if ((!('capacityClass' in value) && !('capacity_class' in value)) || (value['capacityClass'] === undefined && value['capacity_class'] === undefined))
|
|
31
31
|
return false;
|
|
32
|
+
if ((!('clusterSize' in value) && !('cluster_size' in value)) || (value['clusterSize'] === undefined && value['cluster_size'] === undefined))
|
|
33
|
+
return false;
|
|
34
|
+
if ((!('availableClusterSizes' in value) && !('available_cluster_sizes' in value)) || (value['availableClusterSizes'] === undefined && value['available_cluster_sizes'] === undefined))
|
|
35
|
+
return false;
|
|
32
36
|
if ((!('bucketSeconds' in value) && !('bucket_seconds' in value)) || (value['bucketSeconds'] === undefined && value['bucket_seconds'] === undefined))
|
|
33
37
|
return false;
|
|
34
38
|
if (!('points' in value) || value['points'] === undefined)
|
|
@@ -46,6 +50,8 @@ function MarketHistoryResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
46
50
|
'gpuModel': json['gpu_model'],
|
|
47
51
|
'region': json['region'],
|
|
48
52
|
'capacityClass': json['capacity_class'],
|
|
53
|
+
'clusterSize': json['cluster_size'],
|
|
54
|
+
'availableClusterSizes': json['available_cluster_sizes'],
|
|
49
55
|
'bucketSeconds': json['bucket_seconds'],
|
|
50
56
|
'points': (json['points'].map(MarketHistoryPoint_1.MarketHistoryPointFromJSON)),
|
|
51
57
|
};
|
|
@@ -61,6 +67,8 @@ function MarketHistoryResponseToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
61
67
|
'gpu_model': value['gpuModel'],
|
|
62
68
|
'region': value['region'],
|
|
63
69
|
'capacity_class': value['capacityClass'],
|
|
70
|
+
'cluster_size': value['clusterSize'],
|
|
71
|
+
'available_cluster_sizes': value['availableClusterSizes'],
|
|
64
72
|
'bucket_seconds': value['bucketSeconds'],
|
|
65
73
|
'points': (value['points'].map(MarketHistoryPoint_1.MarketHistoryPointToJSON)),
|
|
66
74
|
};
|
|
@@ -23,7 +23,8 @@ export interface WatchRule {
|
|
|
23
23
|
*/
|
|
24
24
|
id: string;
|
|
25
25
|
/**
|
|
26
|
-
* The GPU model the rule watches, e.g. "H100".
|
|
26
|
+
* The canonical GPU model id the rule watches, e.g. "h100_sxm" — a MODEL, not a generation. Alerts match the live catalog exactly, so a rule for a model we do not list could never fire and is refused rather than stored. Case and punctuation are forgiving ("H100-SXM" resolves to "h100_sxm"), and the canonical id is what is stored and returned. GET /v1/gpu-types lists the models currently on offer; a model with no stock right now is still watchable, which is the point of watching it.
|
|
27
|
+
*
|
|
27
28
|
* @type {string}
|
|
28
29
|
* @memberof WatchRule
|
|
29
30
|
*/
|
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
*/
|
|
17
17
|
export interface WatchRuleCreate {
|
|
18
18
|
/**
|
|
19
|
+
* The canonical GPU model id the rule watches, e.g. "h100_sxm" — a MODEL, not a generation. Alerts match the live catalog exactly, so a rule for a model we do not list could never fire and is refused rather than stored. Case and punctuation are forgiving ("H100-SXM" resolves to "h100_sxm"), and the canonical id is what is stored and returned. GET /v1/gpu-types lists the models currently on offer; a model with no stock right now is still watchable, which is the point of watching it.
|
|
19
20
|
*
|
|
20
21
|
* @type {string}
|
|
21
22
|
* @memberof WatchRuleCreate
|
package/docs/MarketApi.md
CHANGED
|
@@ -10,7 +10,7 @@ All URIs are relative to *https://api.gpu.ai/v1*
|
|
|
10
10
|
|
|
11
11
|
## getMarketHistory
|
|
12
12
|
|
|
13
|
-
> MarketHistoryResponse getMarketHistory(gpuModel, region, capacityClass, bucket, from, to)
|
|
13
|
+
> MarketHistoryResponse getMarketHistory(gpuModel, region, capacityClass, clusterSize, bucket, from, to)
|
|
14
14
|
|
|
15
15
|
Get a GPU\'s price and availability over time
|
|
16
16
|
|
|
@@ -34,12 +34,14 @@ async function example() {
|
|
|
34
34
|
const api = new MarketApi(config);
|
|
35
35
|
|
|
36
36
|
const body = {
|
|
37
|
-
// string | GPU model to chart, e.g. \"
|
|
37
|
+
// string | GPU model id to chart, e.g. \"h100_sxm\". Required — it is the leading column of the lookup index.
|
|
38
38
|
gpuModel: gpuModel_example,
|
|
39
39
|
// string | Canonical region to narrow the series to. Omit to MERGE every region rather than to filter on the empty string. (optional)
|
|
40
40
|
region: region_example,
|
|
41
41
|
// 'secure' | 'community' | Capacity class to narrow the series to. Omit to merge both. (optional)
|
|
42
42
|
capacityClass: capacityClass_example,
|
|
43
|
+
// 1 | 2 | 4 | 8 | 10 | 16 | Node shape to narrow the series to — 8 means 8-GPU nodes. Omit to MERGE every shape, which is the default and the only view that rows recorded before the per-size split can honestly appear in. A 1-GPU box and an 8-GPU node are different products at different per-GPU rates, so this is a real dimension of the series and not a display filter. Only shapes we actually sell are accepted: an arbitrary integer would return an empty series indistinguishable from a genuine gap, and this surface exists so \"no data\" and \"nothing to have data about\" are never the same answer. Use available_cluster_sizes from the response to populate a picker — it reports what this GPU was actually listed as in this window, which is narrower than what we may ever sell. (optional)
|
|
44
|
+
clusterSize: 56,
|
|
43
45
|
// '15m' | '1d' | Resolution. Only these two values are accepted: the series cannot be returned finer than it was stored. (optional)
|
|
44
46
|
bucket: bucket_example,
|
|
45
47
|
// Date | Start of the window (RFC3339). Defaults to 7 days before `to`. (optional)
|
|
@@ -65,9 +67,10 @@ example().catch(console.error);
|
|
|
65
67
|
|
|
66
68
|
| Name | Type | Description | Notes |
|
|
67
69
|
|------------- | ------------- | ------------- | -------------|
|
|
68
|
-
| **gpuModel** | `string` | GPU model to chart, e.g. \"
|
|
70
|
+
| **gpuModel** | `string` | GPU model id to chart, e.g. \"h100_sxm\". Required — it is the leading column of the lookup index. | [Defaults to `undefined`] |
|
|
69
71
|
| **region** | `string` | Canonical region to narrow the series to. Omit to MERGE every region rather than to filter on the empty string. | [Optional] [Defaults to `undefined`] |
|
|
70
72
|
| **capacityClass** | `secure`, `community` | Capacity class to narrow the series to. Omit to merge both. | [Optional] [Defaults to `undefined`] [Enum: secure, community] |
|
|
73
|
+
| **clusterSize** | `1`, `2`, `4`, `8`, `10`, `16` | Node shape to narrow the series to — 8 means 8-GPU nodes. Omit to MERGE every shape, which is the default and the only view that rows recorded before the per-size split can honestly appear in. A 1-GPU box and an 8-GPU node are different products at different per-GPU rates, so this is a real dimension of the series and not a display filter. Only shapes we actually sell are accepted: an arbitrary integer would return an empty series indistinguishable from a genuine gap, and this surface exists so \"no data\" and \"nothing to have data about\" are never the same answer. Use available_cluster_sizes from the response to populate a picker — it reports what this GPU was actually listed as in this window, which is narrower than what we may ever sell. | [Optional] [Defaults to `undefined`] [Enum: 1, 2, 4, 8, 10, 16] |
|
|
71
74
|
| **bucket** | `15m`, `1d` | Resolution. Only these two values are accepted: the series cannot be returned finer than it was stored. | [Optional] [Defaults to `'15m'`] [Enum: 15m, 1d] |
|
|
72
75
|
| **from** | `Date` | Start of the window (RFC3339). Defaults to 7 days before `to`. | [Optional] [Defaults to `undefined`] |
|
|
73
76
|
| **to** | `Date` | End of the window (RFC3339). Defaults to now; a future value is clamped to now, since no bucket can exist for a time that has not happened. | [Optional] [Defaults to `undefined`] |
|
|
@@ -10,6 +10,8 @@ Name | Type
|
|
|
10
10
|
`gpuModel` | string
|
|
11
11
|
`region` | string
|
|
12
12
|
`capacityClass` | string
|
|
13
|
+
`clusterSize` | number
|
|
14
|
+
`availableClusterSizes` | Array<number>
|
|
13
15
|
`bucketSeconds` | number
|
|
14
16
|
`points` | [Array<MarketHistoryPoint>](MarketHistoryPoint.md)
|
|
15
17
|
|
|
@@ -23,6 +25,8 @@ const example = {
|
|
|
23
25
|
"gpuModel": null,
|
|
24
26
|
"region": null,
|
|
25
27
|
"capacityClass": null,
|
|
28
|
+
"clusterSize": null,
|
|
29
|
+
"availableClusterSizes": null,
|
|
26
30
|
"bucketSeconds": null,
|
|
27
31
|
"points": null,
|
|
28
32
|
} satisfies MarketHistoryResponse
|
package/docs/WatchApi.md
CHANGED
|
@@ -82,7 +82,7 @@ example().catch(console.error);
|
|
|
82
82
|
| Status code | Description | Response headers |
|
|
83
83
|
|-------------|-------------|------------------|
|
|
84
84
|
| **201** | Created | - |
|
|
85
|
-
| **422** | Validation failed — an unknown condition kind, a non-canonical region, a missing threshold on a threshold condition, an override id that is not an endpoint registered by this organization, a field naming a catalog listing or a delivery address, or the enabled-rule limit already reached. | - |
|
|
85
|
+
| **422** | Validation failed — a gpu_model that is not a GPU model we list (the detail names the closest ids when there are any), an unknown condition kind, a non-canonical region, a missing threshold on a threshold condition, an override id that is not an endpoint registered by this organization, a field naming a catalog listing or a delivery address, or the enabled-rule limit already reached. | - |
|
|
86
86
|
| **429** | Rate limit exceeded (RFC 7807). Retry-After header indicates seconds to wait. | * Retry-After - Seconds the client should wait before retrying. <br> |
|
|
87
87
|
| **0** | Error response (RFC 7807) | - |
|
|
88
88
|
|
|
@@ -381,7 +381,7 @@ example().catch(console.error);
|
|
|
381
381
|
| Status code | Description | Response headers |
|
|
382
382
|
|-------------|-------------|------------------|
|
|
383
383
|
| **200** | OK | - |
|
|
384
|
-
| **422** | Validation failed against the MERGED rule — for example switching to a threshold condition on a rule that has no stored threshold. | - |
|
|
384
|
+
| **422** | Validation failed against the MERGED rule — for example switching to a threshold condition on a rule that has no stored threshold, or re-targeting the rule at a gpu_model we do not list. A gpu_model already stored is only re-checked when the key is SENT, so a rule can always be parked or deleted whatever it holds. | - |
|
|
385
385
|
| **429** | Rate limit exceeded (RFC 7807). Retry-After header indicates seconds to wait. | * Retry-After - Seconds the client should wait before retrying. <br> |
|
|
386
386
|
| **0** | Error response (RFC 7807) | - |
|
|
387
387
|
|
package/package.json
CHANGED
package/src/apis/MarketApi.ts
CHANGED
|
@@ -28,6 +28,7 @@ export interface GetMarketHistoryRequest {
|
|
|
28
28
|
gpuModel: string;
|
|
29
29
|
region?: string;
|
|
30
30
|
capacityClass?: GetMarketHistoryCapacityClassEnum;
|
|
31
|
+
clusterSize?: GetMarketHistoryClusterSizeEnum;
|
|
31
32
|
bucket?: GetMarketHistoryBucketEnum;
|
|
32
33
|
from?: Date;
|
|
33
34
|
to?: Date;
|
|
@@ -63,6 +64,10 @@ export class MarketApi extends runtime.BaseAPI {
|
|
|
63
64
|
queryParameters['capacity_class'] = requestParameters['capacityClass'];
|
|
64
65
|
}
|
|
65
66
|
|
|
67
|
+
if (requestParameters['clusterSize'] != null) {
|
|
68
|
+
queryParameters['cluster_size'] = requestParameters['clusterSize'];
|
|
69
|
+
}
|
|
70
|
+
|
|
66
71
|
if (requestParameters['bucket'] != null) {
|
|
67
72
|
queryParameters['bucket'] = requestParameters['bucket'];
|
|
68
73
|
}
|
|
@@ -126,6 +131,18 @@ export const GetMarketHistoryCapacityClassEnum = {
|
|
|
126
131
|
Community: 'community'
|
|
127
132
|
} as const;
|
|
128
133
|
export type GetMarketHistoryCapacityClassEnum = typeof GetMarketHistoryCapacityClassEnum[keyof typeof GetMarketHistoryCapacityClassEnum];
|
|
134
|
+
/**
|
|
135
|
+
* @export
|
|
136
|
+
*/
|
|
137
|
+
export const GetMarketHistoryClusterSizeEnum = {
|
|
138
|
+
NUMBER_1: 1,
|
|
139
|
+
NUMBER_2: 2,
|
|
140
|
+
NUMBER_4: 4,
|
|
141
|
+
NUMBER_8: 8,
|
|
142
|
+
NUMBER_10: 10,
|
|
143
|
+
NUMBER_16: 16
|
|
144
|
+
} as const;
|
|
145
|
+
export type GetMarketHistoryClusterSizeEnum = typeof GetMarketHistoryClusterSizeEnum[keyof typeof GetMarketHistoryClusterSizeEnum];
|
|
129
146
|
/**
|
|
130
147
|
* @export
|
|
131
148
|
*/
|
|
@@ -48,6 +48,20 @@ export interface MarketHistoryResponse {
|
|
|
48
48
|
* @memberof MarketHistoryResponse
|
|
49
49
|
*/
|
|
50
50
|
capacityClass: string;
|
|
51
|
+
/**
|
|
52
|
+
* Echoes the request. 0 means the series is MERGED across every node shape, the same thing an omitted parameter meant on the way in.
|
|
53
|
+
* @type {number}
|
|
54
|
+
* @memberof MarketHistoryResponse
|
|
55
|
+
*/
|
|
56
|
+
clusterSize: number;
|
|
57
|
+
/**
|
|
58
|
+
* The node shapes that actually have rows in this window, for this gpu_model / region / capacity_class — what a size picker may honestly offer.
|
|
59
|
+
*
|
|
60
|
+
* This is what we SAMPLED, not what we may ever sell: offering a shape a model was never listed at draws an empty chart a caller reads as a stockout. An empty array means we looked and found none. It is unaffected by the cluster_size parameter, so a picker's options never depend on which option is currently selected.
|
|
61
|
+
* @type {Array<number>}
|
|
62
|
+
* @memberof MarketHistoryResponse
|
|
63
|
+
*/
|
|
64
|
+
availableClusterSizes: Array<number>;
|
|
51
65
|
/**
|
|
52
66
|
* Resolution the server actually answered at. Echoed because the wide views downsample at query time, so a client must never assume 900.
|
|
53
67
|
* @type {number}
|
|
@@ -69,6 +83,8 @@ export function instanceOfMarketHistoryResponse(value: object): value is MarketH
|
|
|
69
83
|
if ((!('gpuModel' in (value as Record<string, any>)) && !('gpu_model' in (value as Record<string, any>))) || ((value as Record<string, any>)['gpuModel'] === undefined && (value as Record<string, any>)['gpu_model'] === undefined)) return false;
|
|
70
84
|
if (!('region' in value) || value['region'] === undefined) return false;
|
|
71
85
|
if ((!('capacityClass' in (value as Record<string, any>)) && !('capacity_class' in (value as Record<string, any>))) || ((value as Record<string, any>)['capacityClass'] === undefined && (value as Record<string, any>)['capacity_class'] === undefined)) return false;
|
|
86
|
+
if ((!('clusterSize' in (value as Record<string, any>)) && !('cluster_size' in (value as Record<string, any>))) || ((value as Record<string, any>)['clusterSize'] === undefined && (value as Record<string, any>)['cluster_size'] === undefined)) return false;
|
|
87
|
+
if ((!('availableClusterSizes' in (value as Record<string, any>)) && !('available_cluster_sizes' in (value as Record<string, any>))) || ((value as Record<string, any>)['availableClusterSizes'] === undefined && (value as Record<string, any>)['available_cluster_sizes'] === undefined)) return false;
|
|
72
88
|
if ((!('bucketSeconds' in (value as Record<string, any>)) && !('bucket_seconds' in (value as Record<string, any>))) || ((value as Record<string, any>)['bucketSeconds'] === undefined && (value as Record<string, any>)['bucket_seconds'] === undefined)) return false;
|
|
73
89
|
if (!('points' in value) || value['points'] === undefined) return false;
|
|
74
90
|
return true;
|
|
@@ -87,6 +103,8 @@ export function MarketHistoryResponseFromJSONTyped(json: any, ignoreDiscriminato
|
|
|
87
103
|
'gpuModel': json['gpu_model'],
|
|
88
104
|
'region': json['region'],
|
|
89
105
|
'capacityClass': json['capacity_class'],
|
|
106
|
+
'clusterSize': json['cluster_size'],
|
|
107
|
+
'availableClusterSizes': json['available_cluster_sizes'],
|
|
90
108
|
'bucketSeconds': json['bucket_seconds'],
|
|
91
109
|
'points': ((json['points'] as Array<any>).map(MarketHistoryPointFromJSON)),
|
|
92
110
|
};
|
|
@@ -106,6 +124,8 @@ export function MarketHistoryResponseToJSONTyped(value?: MarketHistoryResponse |
|
|
|
106
124
|
'gpu_model': value['gpuModel'],
|
|
107
125
|
'region': value['region'],
|
|
108
126
|
'capacity_class': value['capacityClass'],
|
|
127
|
+
'cluster_size': value['clusterSize'],
|
|
128
|
+
'available_cluster_sizes': value['availableClusterSizes'],
|
|
109
129
|
'bucket_seconds': value['bucketSeconds'],
|
|
110
130
|
'points': ((value['points'] as Array<any>).map(MarketHistoryPointToJSON)),
|
|
111
131
|
};
|
package/src/models/WatchRule.ts
CHANGED
|
@@ -27,7 +27,8 @@ export interface WatchRule {
|
|
|
27
27
|
*/
|
|
28
28
|
id: string;
|
|
29
29
|
/**
|
|
30
|
-
* The GPU model the rule watches, e.g. "H100".
|
|
30
|
+
* The canonical GPU model id the rule watches, e.g. "h100_sxm" — a MODEL, not a generation. Alerts match the live catalog exactly, so a rule for a model we do not list could never fire and is refused rather than stored. Case and punctuation are forgiving ("H100-SXM" resolves to "h100_sxm"), and the canonical id is what is stored and returned. GET /v1/gpu-types lists the models currently on offer; a model with no stock right now is still watchable, which is the point of watching it.
|
|
31
|
+
*
|
|
31
32
|
* @type {string}
|
|
32
33
|
* @memberof WatchRule
|
|
33
34
|
*/
|
|
@@ -20,6 +20,7 @@ import { mapValues } from '../runtime';
|
|
|
20
20
|
*/
|
|
21
21
|
export interface WatchRuleCreate {
|
|
22
22
|
/**
|
|
23
|
+
* The canonical GPU model id the rule watches, e.g. "h100_sxm" — a MODEL, not a generation. Alerts match the live catalog exactly, so a rule for a model we do not list could never fire and is refused rather than stored. Case and punctuation are forgiving ("H100-SXM" resolves to "h100_sxm"), and the canonical id is what is stored and returned. GET /v1/gpu-types lists the models currently on offer; a model with no stock right now is still watchable, which is the point of watching it.
|
|
23
24
|
*
|
|
24
25
|
* @type {string}
|
|
25
26
|
* @memberof WatchRuleCreate
|