@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.
Files changed (96) hide show
  1. package/.openapi-generator/FILES +26 -0
  2. package/README.md +32 -9
  3. package/dist/apis/AutolaunchApi.d.ts +109 -0
  4. package/dist/apis/AutolaunchApi.js +286 -0
  5. package/dist/apis/MarketApi.d.ts +56 -0
  6. package/dist/apis/MarketApi.js +112 -0
  7. package/dist/apis/WatchApi.d.ts +109 -0
  8. package/dist/apis/WatchApi.js +286 -0
  9. package/dist/apis/index.d.ts +3 -0
  10. package/dist/apis/index.js +3 -0
  11. package/dist/esm/apis/AutolaunchApi.d.ts +109 -0
  12. package/dist/esm/apis/AutolaunchApi.js +282 -0
  13. package/dist/esm/apis/MarketApi.d.ts +56 -0
  14. package/dist/esm/apis/MarketApi.js +108 -0
  15. package/dist/esm/apis/WatchApi.d.ts +109 -0
  16. package/dist/esm/apis/WatchApi.js +282 -0
  17. package/dist/esm/apis/index.d.ts +3 -0
  18. package/dist/esm/apis/index.js +3 -0
  19. package/dist/esm/models/AutolaunchRule.d.ts +181 -0
  20. package/dist/esm/models/AutolaunchRule.js +142 -0
  21. package/dist/esm/models/AutolaunchRuleCreate.d.ts +105 -0
  22. package/dist/esm/models/AutolaunchRuleCreate.js +84 -0
  23. package/dist/esm/models/AutolaunchRuleDisarm.d.ts +34 -0
  24. package/dist/esm/models/AutolaunchRuleDisarm.js +43 -0
  25. package/dist/esm/models/AutolaunchRulePage.d.ts +39 -0
  26. package/dist/esm/models/AutolaunchRulePage.js +48 -0
  27. package/dist/esm/models/MarketHistoryPoint.d.ts +59 -0
  28. package/dist/esm/models/MarketHistoryPoint.js +55 -0
  29. package/dist/esm/models/MarketHistoryResponse.d.ts +60 -0
  30. package/dist/esm/models/MarketHistoryResponse.js +60 -0
  31. package/dist/esm/models/Problem.d.ts +1 -0
  32. package/dist/esm/models/Problem.js +1 -0
  33. package/dist/esm/models/WatchRule.d.ts +141 -0
  34. package/dist/esm/models/WatchRule.js +117 -0
  35. package/dist/esm/models/WatchRuleCreate.d.ts +87 -0
  36. package/dist/esm/models/WatchRuleCreate.js +72 -0
  37. package/dist/esm/models/WatchRulePage.d.ts +39 -0
  38. package/dist/esm/models/WatchRulePage.js +48 -0
  39. package/dist/esm/models/WatchRuleUpdate.d.ts +86 -0
  40. package/dist/esm/models/WatchRuleUpdate.js +68 -0
  41. package/dist/esm/models/index.d.ts +10 -0
  42. package/dist/esm/models/index.js +10 -0
  43. package/dist/models/AutolaunchRule.d.ts +181 -0
  44. package/dist/models/AutolaunchRule.js +150 -0
  45. package/dist/models/AutolaunchRuleCreate.d.ts +105 -0
  46. package/dist/models/AutolaunchRuleCreate.js +92 -0
  47. package/dist/models/AutolaunchRuleDisarm.d.ts +34 -0
  48. package/dist/models/AutolaunchRuleDisarm.js +50 -0
  49. package/dist/models/AutolaunchRulePage.d.ts +39 -0
  50. package/dist/models/AutolaunchRulePage.js +55 -0
  51. package/dist/models/MarketHistoryPoint.d.ts +59 -0
  52. package/dist/models/MarketHistoryPoint.js +62 -0
  53. package/dist/models/MarketHistoryResponse.d.ts +60 -0
  54. package/dist/models/MarketHistoryResponse.js +67 -0
  55. package/dist/models/Problem.d.ts +1 -0
  56. package/dist/models/Problem.js +1 -0
  57. package/dist/models/WatchRule.d.ts +141 -0
  58. package/dist/models/WatchRule.js +125 -0
  59. package/dist/models/WatchRuleCreate.d.ts +87 -0
  60. package/dist/models/WatchRuleCreate.js +80 -0
  61. package/dist/models/WatchRulePage.d.ts +39 -0
  62. package/dist/models/WatchRulePage.js +55 -0
  63. package/dist/models/WatchRuleUpdate.d.ts +86 -0
  64. package/dist/models/WatchRuleUpdate.js +76 -0
  65. package/dist/models/index.d.ts +10 -0
  66. package/dist/models/index.js +10 -0
  67. package/docs/AutolaunchApi.md +390 -0
  68. package/docs/AutolaunchRule.md +69 -0
  69. package/docs/AutolaunchRuleCreate.md +50 -0
  70. package/docs/AutolaunchRuleDisarm.md +35 -0
  71. package/docs/AutolaunchRulePage.md +36 -0
  72. package/docs/MarketApi.md +98 -0
  73. package/docs/MarketHistoryPoint.md +43 -0
  74. package/docs/MarketHistoryResponse.md +43 -0
  75. package/docs/WatchApi.md +389 -0
  76. package/docs/WatchRule.md +61 -0
  77. package/docs/WatchRuleCreate.md +46 -0
  78. package/docs/WatchRulePage.md +36 -0
  79. package/docs/WatchRuleUpdate.md +47 -0
  80. package/package.json +1 -1
  81. package/src/apis/AutolaunchApi.ts +360 -0
  82. package/src/apis/MarketApi.ts +136 -0
  83. package/src/apis/WatchApi.ts +360 -0
  84. package/src/apis/index.ts +3 -0
  85. package/src/models/AutolaunchRule.ts +270 -0
  86. package/src/models/AutolaunchRuleCreate.ts +162 -0
  87. package/src/models/AutolaunchRuleDisarm.ts +68 -0
  88. package/src/models/AutolaunchRulePage.ts +83 -0
  89. package/src/models/MarketHistoryPoint.ts +103 -0
  90. package/src/models/MarketHistoryResponse.ts +113 -0
  91. package/src/models/Problem.ts +1 -0
  92. package/src/models/WatchRule.ts +219 -0
  93. package/src/models/WatchRuleCreate.ts +138 -0
  94. package/src/models/WatchRulePage.ts +83 -0
  95. package/src/models/WatchRuleUpdate.ts +135 -0
  96. package/src/models/index.ts +10 -0
@@ -0,0 +1,142 @@
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 AutolaunchRuleCapacityClassEnum = {
18
+ Secure: 'secure',
19
+ Community: 'community'
20
+ };
21
+ /**
22
+ * @export
23
+ */
24
+ export const AutolaunchRuleConditionKindEnum = {
25
+ PriceUnder: 'price_under',
26
+ InStock: 'in_stock',
27
+ CountAtLeast: 'count_at_least'
28
+ };
29
+ /**
30
+ * @export
31
+ */
32
+ export const AutolaunchRuleStateEnum = {
33
+ Armed: 'armed',
34
+ Launching: 'launching',
35
+ Fired: 'fired',
36
+ Expired: 'expired'
37
+ };
38
+ /**
39
+ * @export
40
+ */
41
+ export const AutolaunchRuleCreatedBySurfaceEnum = {
42
+ ApiKey: 'api_key',
43
+ Dashboard: 'dashboard'
44
+ };
45
+ /**
46
+ * Check if a given object implements the AutolaunchRule interface.
47
+ */
48
+ export function instanceOfAutolaunchRule(value) {
49
+ if (!('id' in value) || value['id'] === undefined)
50
+ return false;
51
+ if ((!('gpuModel' in value) && !('gpu_model' in value)) || (value['gpuModel'] === undefined && value['gpu_model'] === undefined))
52
+ return false;
53
+ if (!('region' in value) || value['region'] === undefined)
54
+ return false;
55
+ if ((!('capacityClass' in value) && !('capacity_class' in value)) || (value['capacityClass'] === undefined && value['capacity_class'] === undefined))
56
+ return false;
57
+ if ((!('conditionKind' in value) && !('condition_kind' in value)) || (value['conditionKind'] === undefined && value['condition_kind'] === undefined))
58
+ return false;
59
+ if (!('threshold' in value) || value['threshold'] === undefined)
60
+ return false;
61
+ if ((!('maxPricePerHour' in value) && !('max_price_per_hour' in value)) || (value['maxPricePerHour'] === undefined && value['max_price_per_hour'] === undefined))
62
+ return false;
63
+ if ((!('maxRuntimeHours' in value) && !('max_runtime_hours' in value)) || (value['maxRuntimeHours'] === undefined && value['max_runtime_hours'] === undefined))
64
+ return false;
65
+ if ((!('maxTotalUsd' in value) && !('max_total_usd' in value)) || (value['maxTotalUsd'] === undefined && value['max_total_usd'] === undefined))
66
+ return false;
67
+ if (!('spec' in value) || value['spec'] === undefined)
68
+ return false;
69
+ if (!('state' in value) || value['state'] === undefined)
70
+ return false;
71
+ if ((!('attemptsThisEdge' in value) && !('attempts_this_edge' in value)) || (value['attemptsThisEdge'] === undefined && value['attempts_this_edge'] === undefined))
72
+ return false;
73
+ if ((!('lastFailureReason' in value) && !('last_failure_reason' in value)) || (value['lastFailureReason'] === undefined && value['last_failure_reason'] === undefined))
74
+ return false;
75
+ if ((!('launchedInstanceId' in value) && !('launched_instance_id' in value)) || (value['launchedInstanceId'] === undefined && value['launched_instance_id'] === undefined))
76
+ return false;
77
+ if ((!('createdBySurface' in value) && !('created_by_surface' in value)) || (value['createdBySurface'] === undefined && value['created_by_surface'] === undefined))
78
+ return false;
79
+ if (!('enabled' in value) || value['enabled'] === undefined)
80
+ return false;
81
+ if ((!('createdAt' in value) && !('created_at' in value)) || (value['createdAt'] === undefined && value['created_at'] === undefined))
82
+ return false;
83
+ if ((!('updatedAt' in value) && !('updated_at' in value)) || (value['updatedAt'] === undefined && value['updated_at'] === undefined))
84
+ return false;
85
+ return true;
86
+ }
87
+ export function AutolaunchRuleFromJSON(json) {
88
+ return AutolaunchRuleFromJSONTyped(json, false);
89
+ }
90
+ export function AutolaunchRuleFromJSONTyped(json, ignoreDiscriminator) {
91
+ if (json == null) {
92
+ return json;
93
+ }
94
+ return {
95
+ 'id': json['id'],
96
+ 'gpuModel': json['gpu_model'],
97
+ 'region': json['region'],
98
+ 'capacityClass': json['capacity_class'],
99
+ 'conditionKind': json['condition_kind'],
100
+ 'threshold': json['threshold'],
101
+ 'maxPricePerHour': json['max_price_per_hour'],
102
+ 'maxRuntimeHours': json['max_runtime_hours'],
103
+ 'maxTotalUsd': json['max_total_usd'],
104
+ 'spec': json['spec'],
105
+ 'state': json['state'],
106
+ 'attemptsThisEdge': json['attempts_this_edge'],
107
+ 'lastFailureReason': json['last_failure_reason'],
108
+ 'launchedInstanceId': json['launched_instance_id'],
109
+ 'createdBySurface': json['created_by_surface'],
110
+ 'enabled': json['enabled'],
111
+ 'createdAt': (new Date(json['created_at'])),
112
+ 'updatedAt': (new Date(json['updated_at'])),
113
+ };
114
+ }
115
+ export function AutolaunchRuleToJSON(json) {
116
+ return AutolaunchRuleToJSONTyped(json, false);
117
+ }
118
+ export function AutolaunchRuleToJSONTyped(value, ignoreDiscriminator = false) {
119
+ if (value == null) {
120
+ return value;
121
+ }
122
+ return {
123
+ 'id': value['id'],
124
+ 'gpu_model': value['gpuModel'],
125
+ 'region': value['region'],
126
+ 'capacity_class': value['capacityClass'],
127
+ 'condition_kind': value['conditionKind'],
128
+ 'threshold': value['threshold'],
129
+ 'max_price_per_hour': value['maxPricePerHour'],
130
+ 'max_runtime_hours': value['maxRuntimeHours'],
131
+ 'max_total_usd': value['maxTotalUsd'],
132
+ 'spec': value['spec'],
133
+ 'state': value['state'],
134
+ 'attempts_this_edge': value['attemptsThisEdge'],
135
+ 'last_failure_reason': value['lastFailureReason'],
136
+ 'launched_instance_id': value['launchedInstanceId'],
137
+ 'created_by_surface': value['createdBySurface'],
138
+ 'enabled': value['enabled'],
139
+ 'created_at': value['createdAt'].toISOString(),
140
+ 'updated_at': value['updatedAt'].toISOString(),
141
+ };
142
+ }
@@ -0,0 +1,105 @@
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 AutolaunchRuleCreate
16
+ */
17
+ export interface AutolaunchRuleCreate {
18
+ /**
19
+ *
20
+ * @type {string}
21
+ * @memberof AutolaunchRuleCreate
22
+ */
23
+ gpuModel: string;
24
+ /**
25
+ * Omit or send null to consider every region.
26
+ * @type {string}
27
+ * @memberof AutolaunchRuleCreate
28
+ */
29
+ region?: string | null;
30
+ /**
31
+ * Omit or send null to consider both capacity classes.
32
+ * @type {AutolaunchRuleCreateCapacityClassEnum}
33
+ * @memberof AutolaunchRuleCreate
34
+ */
35
+ capacityClass?: AutolaunchRuleCreateCapacityClassEnum | null;
36
+ /**
37
+ *
38
+ * @type {AutolaunchRuleCreateConditionKindEnum}
39
+ * @memberof AutolaunchRuleCreate
40
+ */
41
+ conditionKind: AutolaunchRuleCreateConditionKindEnum;
42
+ /**
43
+ * The TRIGGER, in dollars PER GPU-HOUR for price_under or a unit count for count_at_least. Required and greater than zero for both. Ignored for in_stock. Not the spend cap. Values above the maximum are refused with a 422 naming the bound — it is the largest value the column stores.
44
+ *
45
+ * @type {number}
46
+ * @memberof AutolaunchRuleCreate
47
+ */
48
+ threshold?: number | null;
49
+ /**
50
+ * The CEILING, in dollars per hour for the WHOLE INSTANCE. Required even for in_stock rules: "buy it when it comes back" with no ceiling is an unbounded authorization, and this resource has no such shape. Values above the maximum are refused with a 422 naming the bound.
51
+ *
52
+ * @type {number}
53
+ * @memberof AutolaunchRuleCreate
54
+ */
55
+ maxPricePerHour: number;
56
+ /**
57
+ *
58
+ * @type {number}
59
+ * @memberof AutolaunchRuleCreate
60
+ */
61
+ maxRuntimeHours: number;
62
+ /**
63
+ * The full create-instance body this rule freezes and replays — the same shape POST /v1/instances accepts. It is modelled as an open object rather than a $ref because the instance-create body is an inline requestBody schema rather than a named component; promoting it would rewrite the instances operation and every generated client's signature for it, in a change that only needs to STORE one.
64
+ *
65
+ * Two fields behave differently here than on a live create: `offering_id` is REJECTED (a pinned offering produces a rule that can never fire, because offering identity churns between catalog polls), and `auto_terminate_hours` is OVERWRITTEN from the rule's `max_runtime_hours` so a nested field cannot widen the runtime bound the customer approved.
66
+ *
67
+ * @type {{ [key: string]: any; }}
68
+ * @memberof AutolaunchRuleCreate
69
+ */
70
+ spec: {
71
+ [key: string]: any;
72
+ };
73
+ /**
74
+ * REQUIRED. Echo of the worst-case total, max_price_per_hour × max_runtime_hours, accepted within one cent. This is the consent gate: a caller that never computed this number cannot have shown it to the person approving the rule, and a caller that displayed a different number disagrees with what is about to be stored. Either way the request is refused so the caller can re-render the real figure.
75
+ *
76
+ * @type {number}
77
+ * @memberof AutolaunchRuleCreate
78
+ */
79
+ acknowledgedMaxTotalUsd: number;
80
+ }
81
+ /**
82
+ * @export
83
+ */
84
+ export declare const AutolaunchRuleCreateCapacityClassEnum: {
85
+ readonly Secure: "secure";
86
+ readonly Community: "community";
87
+ };
88
+ export type AutolaunchRuleCreateCapacityClassEnum = typeof AutolaunchRuleCreateCapacityClassEnum[keyof typeof AutolaunchRuleCreateCapacityClassEnum];
89
+ /**
90
+ * @export
91
+ */
92
+ export declare const AutolaunchRuleCreateConditionKindEnum: {
93
+ readonly PriceUnder: "price_under";
94
+ readonly InStock: "in_stock";
95
+ readonly CountAtLeast: "count_at_least";
96
+ };
97
+ export type AutolaunchRuleCreateConditionKindEnum = typeof AutolaunchRuleCreateConditionKindEnum[keyof typeof AutolaunchRuleCreateConditionKindEnum];
98
+ /**
99
+ * Check if a given object implements the AutolaunchRuleCreate interface.
100
+ */
101
+ export declare function instanceOfAutolaunchRuleCreate(value: object): value is AutolaunchRuleCreate;
102
+ export declare function AutolaunchRuleCreateFromJSON(json: any): AutolaunchRuleCreate;
103
+ export declare function AutolaunchRuleCreateFromJSONTyped(json: any, ignoreDiscriminator: boolean): AutolaunchRuleCreate;
104
+ export declare function AutolaunchRuleCreateToJSON(json: any): AutolaunchRuleCreate;
105
+ export declare function AutolaunchRuleCreateToJSONTyped(value?: AutolaunchRuleCreate | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,84 @@
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 AutolaunchRuleCreateCapacityClassEnum = {
18
+ Secure: 'secure',
19
+ Community: 'community'
20
+ };
21
+ /**
22
+ * @export
23
+ */
24
+ export const AutolaunchRuleCreateConditionKindEnum = {
25
+ PriceUnder: 'price_under',
26
+ InStock: 'in_stock',
27
+ CountAtLeast: 'count_at_least'
28
+ };
29
+ /**
30
+ * Check if a given object implements the AutolaunchRuleCreate interface.
31
+ */
32
+ export function instanceOfAutolaunchRuleCreate(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
+ if ((!('maxPricePerHour' in value) && !('max_price_per_hour' in value)) || (value['maxPricePerHour'] === undefined && value['max_price_per_hour'] === undefined))
38
+ return false;
39
+ if ((!('maxRuntimeHours' in value) && !('max_runtime_hours' in value)) || (value['maxRuntimeHours'] === undefined && value['max_runtime_hours'] === undefined))
40
+ return false;
41
+ if (!('spec' in value) || value['spec'] === undefined)
42
+ return false;
43
+ if ((!('acknowledgedMaxTotalUsd' in value) && !('acknowledged_max_total_usd' in value)) || (value['acknowledgedMaxTotalUsd'] === undefined && value['acknowledged_max_total_usd'] === undefined))
44
+ return false;
45
+ return true;
46
+ }
47
+ export function AutolaunchRuleCreateFromJSON(json) {
48
+ return AutolaunchRuleCreateFromJSONTyped(json, false);
49
+ }
50
+ export function AutolaunchRuleCreateFromJSONTyped(json, ignoreDiscriminator) {
51
+ if (json == null) {
52
+ return json;
53
+ }
54
+ return {
55
+ 'gpuModel': json['gpu_model'],
56
+ 'region': json['region'] === undefined ? undefined : json['region'] === null ? null : json['region'],
57
+ 'capacityClass': json['capacity_class'] === undefined ? undefined : json['capacity_class'] === null ? null : json['capacity_class'],
58
+ 'conditionKind': json['condition_kind'],
59
+ 'threshold': json['threshold'] === undefined ? undefined : json['threshold'] === null ? null : json['threshold'],
60
+ 'maxPricePerHour': json['max_price_per_hour'],
61
+ 'maxRuntimeHours': json['max_runtime_hours'],
62
+ 'spec': json['spec'],
63
+ 'acknowledgedMaxTotalUsd': json['acknowledged_max_total_usd'],
64
+ };
65
+ }
66
+ export function AutolaunchRuleCreateToJSON(json) {
67
+ return AutolaunchRuleCreateToJSONTyped(json, false);
68
+ }
69
+ export function AutolaunchRuleCreateToJSONTyped(value, ignoreDiscriminator = false) {
70
+ if (value == null) {
71
+ return value;
72
+ }
73
+ return {
74
+ 'gpu_model': value['gpuModel'],
75
+ 'region': value['region'],
76
+ 'capacity_class': value['capacityClass'],
77
+ 'condition_kind': value['conditionKind'],
78
+ 'threshold': value['threshold'],
79
+ 'max_price_per_hour': value['maxPricePerHour'],
80
+ 'max_runtime_hours': value['maxRuntimeHours'],
81
+ 'spec': value['spec'],
82
+ 'acknowledged_max_total_usd': value['acknowledgedMaxTotalUsd'],
83
+ };
84
+ }
@@ -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,43 @@
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
+ * Check if a given object implements the AutolaunchRuleDisarm interface.
16
+ */
17
+ export function instanceOfAutolaunchRuleDisarm(value) {
18
+ if (!('enabled' in value) || value['enabled'] === undefined)
19
+ return false;
20
+ return true;
21
+ }
22
+ export function AutolaunchRuleDisarmFromJSON(json) {
23
+ return AutolaunchRuleDisarmFromJSONTyped(json, false);
24
+ }
25
+ export function AutolaunchRuleDisarmFromJSONTyped(json, ignoreDiscriminator) {
26
+ if (json == null) {
27
+ return json;
28
+ }
29
+ return {
30
+ 'enabled': json['enabled'],
31
+ };
32
+ }
33
+ export function AutolaunchRuleDisarmToJSON(json) {
34
+ return AutolaunchRuleDisarmToJSONTyped(json, false);
35
+ }
36
+ export function AutolaunchRuleDisarmToJSONTyped(value, ignoreDiscriminator = false) {
37
+ if (value == null) {
38
+ return value;
39
+ }
40
+ return {
41
+ 'enabled': value['enabled'],
42
+ };
43
+ }
@@ -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,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 { AutolaunchRuleFromJSON, AutolaunchRuleToJSON, } from './AutolaunchRule';
15
+ /**
16
+ * Check if a given object implements the AutolaunchRulePage interface.
17
+ */
18
+ export function instanceOfAutolaunchRulePage(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 AutolaunchRulePageFromJSON(json) {
26
+ return AutolaunchRulePageFromJSONTyped(json, false);
27
+ }
28
+ export function AutolaunchRulePageFromJSONTyped(json, ignoreDiscriminator) {
29
+ if (json == null) {
30
+ return json;
31
+ }
32
+ return {
33
+ 'data': (json['data'].map(AutolaunchRuleFromJSON)),
34
+ 'nextCursor': json['next_cursor'],
35
+ };
36
+ }
37
+ export function AutolaunchRulePageToJSON(json) {
38
+ return AutolaunchRulePageToJSONTyped(json, false);
39
+ }
40
+ export function AutolaunchRulePageToJSONTyped(value, ignoreDiscriminator = false) {
41
+ if (value == null) {
42
+ return value;
43
+ }
44
+ return {
45
+ 'data': (value['data'].map(AutolaunchRuleToJSON)),
46
+ 'next_cursor': value['nextCursor'],
47
+ };
48
+ }
@@ -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,55 @@
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
+ * Check if a given object implements the MarketHistoryPoint interface.
16
+ */
17
+ export function instanceOfMarketHistoryPoint(value) {
18
+ if ((!('bucketTs' in value) && !('bucket_ts' in value)) || (value['bucketTs'] === undefined && value['bucket_ts'] === undefined))
19
+ return false;
20
+ if ((!('pricePerGpuHour' in value) && !('price_per_gpu_hour' in value)) || (value['pricePerGpuHour'] === undefined && value['price_per_gpu_hour'] === undefined))
21
+ return false;
22
+ if ((!('availableCount' in value) && !('available_count' in value)) || (value['availableCount'] === undefined && value['available_count'] === undefined))
23
+ return false;
24
+ return true;
25
+ }
26
+ export function MarketHistoryPointFromJSON(json) {
27
+ return MarketHistoryPointFromJSONTyped(json, false);
28
+ }
29
+ export function MarketHistoryPointFromJSONTyped(json, ignoreDiscriminator) {
30
+ if (json == null) {
31
+ return json;
32
+ }
33
+ return {
34
+ 'bucketTs': (new Date(json['bucket_ts'])),
35
+ 'pricePerGpuHour': json['price_per_gpu_hour'],
36
+ 'availableCount': json['available_count'],
37
+ 'nodePricePerHour': json['node_price_per_hour'] == null ? undefined : json['node_price_per_hour'],
38
+ 'gpuCount': json['gpu_count'] == null ? undefined : json['gpu_count'],
39
+ };
40
+ }
41
+ export function MarketHistoryPointToJSON(json) {
42
+ return MarketHistoryPointToJSONTyped(json, false);
43
+ }
44
+ export function MarketHistoryPointToJSONTyped(value, ignoreDiscriminator = false) {
45
+ if (value == null) {
46
+ return value;
47
+ }
48
+ return {
49
+ 'bucket_ts': value['bucketTs'].toISOString(),
50
+ 'price_per_gpu_hour': value['pricePerGpuHour'],
51
+ 'available_count': value['availableCount'],
52
+ 'node_price_per_hour': value['nodePricePerHour'],
53
+ 'gpu_count': value['gpuCount'],
54
+ };
55
+ }
@@ -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;