@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,125 @@
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.WatchRuleStateEnum = exports.WatchRuleConditionKindEnum = exports.WatchRuleCapacityClassEnum = void 0;
17
+ exports.instanceOfWatchRule = instanceOfWatchRule;
18
+ exports.WatchRuleFromJSON = WatchRuleFromJSON;
19
+ exports.WatchRuleFromJSONTyped = WatchRuleFromJSONTyped;
20
+ exports.WatchRuleToJSON = WatchRuleToJSON;
21
+ exports.WatchRuleToJSONTyped = WatchRuleToJSONTyped;
22
+ /**
23
+ * @export
24
+ */
25
+ exports.WatchRuleCapacityClassEnum = {
26
+ Secure: 'secure',
27
+ Community: 'community'
28
+ };
29
+ /**
30
+ * @export
31
+ */
32
+ exports.WatchRuleConditionKindEnum = {
33
+ PriceUnder: 'price_under',
34
+ InStock: 'in_stock',
35
+ CountAtLeast: 'count_at_least'
36
+ };
37
+ /**
38
+ * @export
39
+ */
40
+ exports.WatchRuleStateEnum = {
41
+ Armed: 'armed',
42
+ Fired: 'fired'
43
+ };
44
+ /**
45
+ * Check if a given object implements the WatchRule interface.
46
+ */
47
+ function instanceOfWatchRule(value) {
48
+ if (!('id' in value) || value['id'] === undefined)
49
+ return false;
50
+ if ((!('gpuModel' in value) && !('gpu_model' in value)) || (value['gpuModel'] === undefined && value['gpu_model'] === undefined))
51
+ return false;
52
+ if (!('region' in value) || value['region'] === undefined)
53
+ return false;
54
+ if ((!('capacityClass' in value) && !('capacity_class' in value)) || (value['capacityClass'] === undefined && value['capacity_class'] === undefined))
55
+ return false;
56
+ if ((!('conditionKind' in value) && !('condition_kind' in value)) || (value['conditionKind'] === undefined && value['condition_kind'] === undefined))
57
+ return false;
58
+ if (!('threshold' in value) || value['threshold'] === undefined)
59
+ return false;
60
+ if (!('state' in value) || value['state'] === undefined)
61
+ return false;
62
+ if ((!('lastFiredAt' in value) && !('last_fired_at' in value)) || (value['lastFiredAt'] === undefined && value['last_fired_at'] === undefined))
63
+ return false;
64
+ if ((!('quietUntil' in value) && !('quiet_until' in value)) || (value['quietUntil'] === undefined && value['quiet_until'] === undefined))
65
+ return false;
66
+ if ((!('webhookEndpointOverrideId' in value) && !('webhook_endpoint_override_id' in value)) || (value['webhookEndpointOverrideId'] === undefined && value['webhook_endpoint_override_id'] === undefined))
67
+ return false;
68
+ if (!('enabled' in value) || value['enabled'] === undefined)
69
+ return false;
70
+ if ((!('deactivatedReason' in value) && !('deactivated_reason' in value)) || (value['deactivatedReason'] === undefined && value['deactivated_reason'] === undefined))
71
+ return false;
72
+ if ((!('createdAt' in value) && !('created_at' in value)) || (value['createdAt'] === undefined && value['created_at'] === undefined))
73
+ return false;
74
+ if ((!('updatedAt' in value) && !('updated_at' in value)) || (value['updatedAt'] === undefined && value['updated_at'] === undefined))
75
+ return false;
76
+ return true;
77
+ }
78
+ function WatchRuleFromJSON(json) {
79
+ return WatchRuleFromJSONTyped(json, false);
80
+ }
81
+ function WatchRuleFromJSONTyped(json, ignoreDiscriminator) {
82
+ if (json == null) {
83
+ return json;
84
+ }
85
+ return {
86
+ 'id': json['id'],
87
+ 'gpuModel': json['gpu_model'],
88
+ 'region': json['region'],
89
+ 'capacityClass': json['capacity_class'],
90
+ 'conditionKind': json['condition_kind'],
91
+ 'threshold': json['threshold'],
92
+ 'state': json['state'],
93
+ 'lastFiredAt': (json['last_fired_at'] == null ? null : new Date(json['last_fired_at'])),
94
+ 'quietUntil': (json['quiet_until'] == null ? null : new Date(json['quiet_until'])),
95
+ 'webhookEndpointOverrideId': json['webhook_endpoint_override_id'],
96
+ 'enabled': json['enabled'],
97
+ 'deactivatedReason': json['deactivated_reason'],
98
+ 'createdAt': (new Date(json['created_at'])),
99
+ 'updatedAt': (new Date(json['updated_at'])),
100
+ };
101
+ }
102
+ function WatchRuleToJSON(json) {
103
+ return WatchRuleToJSONTyped(json, false);
104
+ }
105
+ function WatchRuleToJSONTyped(value, ignoreDiscriminator = false) {
106
+ if (value == null) {
107
+ return value;
108
+ }
109
+ return {
110
+ 'id': value['id'],
111
+ 'gpu_model': value['gpuModel'],
112
+ 'region': value['region'],
113
+ 'capacity_class': value['capacityClass'],
114
+ 'condition_kind': value['conditionKind'],
115
+ 'threshold': value['threshold'],
116
+ 'state': value['state'],
117
+ 'last_fired_at': value['lastFiredAt'] == null ? value['lastFiredAt'] : value['lastFiredAt'].toISOString(),
118
+ 'quiet_until': value['quietUntil'] == null ? value['quietUntil'] : value['quietUntil'].toISOString(),
119
+ 'webhook_endpoint_override_id': value['webhookEndpointOverrideId'],
120
+ 'enabled': value['enabled'],
121
+ 'deactivated_reason': value['deactivatedReason'],
122
+ 'created_at': value['createdAt'].toISOString(),
123
+ 'updated_at': value['updatedAt'].toISOString(),
124
+ };
125
+ }
@@ -0,0 +1,87 @@
1
+ /**
2
+ * GPU.ai Public Developer API
3
+ * Programmatic API for GPU.ai. Authenticate with API keys minted from the dashboard. See https://gpu.ai/docs for details.
4
+ *
5
+ * The version of the OpenAPI document: 1.0.0
6
+ * Contact: support@gpu.ai
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ /**
13
+ *
14
+ * @export
15
+ * @interface WatchRuleCreate
16
+ */
17
+ export interface WatchRuleCreate {
18
+ /**
19
+ *
20
+ * @type {string}
21
+ * @memberof WatchRuleCreate
22
+ */
23
+ gpuModel: string;
24
+ /**
25
+ * Omit or send null to watch every region.
26
+ * @type {string}
27
+ * @memberof WatchRuleCreate
28
+ */
29
+ region?: string | null;
30
+ /**
31
+ * Omit or send null to watch both capacity classes.
32
+ * @type {WatchRuleCreateCapacityClassEnum}
33
+ * @memberof WatchRuleCreate
34
+ */
35
+ capacityClass?: WatchRuleCreateCapacityClassEnum | null;
36
+ /**
37
+ *
38
+ * @type {WatchRuleCreateConditionKindEnum}
39
+ * @memberof WatchRuleCreate
40
+ */
41
+ conditionKind: WatchRuleCreateConditionKindEnum;
42
+ /**
43
+ * Required and greater than zero for price_under and count_at_least. Ignored for in_stock, which is stored with no threshold.
44
+ *
45
+ * @type {number}
46
+ * @memberof WatchRuleCreate
47
+ */
48
+ threshold?: number | null;
49
+ /**
50
+ * Id of an endpoint already registered via /webhook-endpoints. A URL here is rejected: the resource holds references, never addresses.
51
+ *
52
+ * @type {string}
53
+ * @memberof WatchRuleCreate
54
+ */
55
+ webhookEndpointOverrideId?: string | null;
56
+ /**
57
+ * Defaults to true. Create with false to park a rule.
58
+ * @type {boolean}
59
+ * @memberof WatchRuleCreate
60
+ */
61
+ enabled?: boolean;
62
+ }
63
+ /**
64
+ * @export
65
+ */
66
+ export declare const WatchRuleCreateCapacityClassEnum: {
67
+ readonly Secure: "secure";
68
+ readonly Community: "community";
69
+ };
70
+ export type WatchRuleCreateCapacityClassEnum = typeof WatchRuleCreateCapacityClassEnum[keyof typeof WatchRuleCreateCapacityClassEnum];
71
+ /**
72
+ * @export
73
+ */
74
+ export declare const WatchRuleCreateConditionKindEnum: {
75
+ readonly PriceUnder: "price_under";
76
+ readonly InStock: "in_stock";
77
+ readonly CountAtLeast: "count_at_least";
78
+ };
79
+ export type WatchRuleCreateConditionKindEnum = typeof WatchRuleCreateConditionKindEnum[keyof typeof WatchRuleCreateConditionKindEnum];
80
+ /**
81
+ * Check if a given object implements the WatchRuleCreate interface.
82
+ */
83
+ export declare function instanceOfWatchRuleCreate(value: object): value is WatchRuleCreate;
84
+ export declare function WatchRuleCreateFromJSON(json: any): WatchRuleCreate;
85
+ export declare function WatchRuleCreateFromJSONTyped(json: any, ignoreDiscriminator: boolean): WatchRuleCreate;
86
+ export declare function WatchRuleCreateToJSON(json: any): WatchRuleCreate;
87
+ export declare function WatchRuleCreateToJSONTyped(value?: WatchRuleCreate | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,80 @@
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.WatchRuleCreateConditionKindEnum = exports.WatchRuleCreateCapacityClassEnum = void 0;
17
+ exports.instanceOfWatchRuleCreate = instanceOfWatchRuleCreate;
18
+ exports.WatchRuleCreateFromJSON = WatchRuleCreateFromJSON;
19
+ exports.WatchRuleCreateFromJSONTyped = WatchRuleCreateFromJSONTyped;
20
+ exports.WatchRuleCreateToJSON = WatchRuleCreateToJSON;
21
+ exports.WatchRuleCreateToJSONTyped = WatchRuleCreateToJSONTyped;
22
+ /**
23
+ * @export
24
+ */
25
+ exports.WatchRuleCreateCapacityClassEnum = {
26
+ Secure: 'secure',
27
+ Community: 'community'
28
+ };
29
+ /**
30
+ * @export
31
+ */
32
+ exports.WatchRuleCreateConditionKindEnum = {
33
+ PriceUnder: 'price_under',
34
+ InStock: 'in_stock',
35
+ CountAtLeast: 'count_at_least'
36
+ };
37
+ /**
38
+ * Check if a given object implements the WatchRuleCreate interface.
39
+ */
40
+ function instanceOfWatchRuleCreate(value) {
41
+ if ((!('gpuModel' in value) && !('gpu_model' in value)) || (value['gpuModel'] === undefined && value['gpu_model'] === undefined))
42
+ return false;
43
+ if ((!('conditionKind' in value) && !('condition_kind' in value)) || (value['conditionKind'] === undefined && value['condition_kind'] === undefined))
44
+ return false;
45
+ return true;
46
+ }
47
+ function WatchRuleCreateFromJSON(json) {
48
+ return WatchRuleCreateFromJSONTyped(json, false);
49
+ }
50
+ function WatchRuleCreateFromJSONTyped(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
+ 'webhookEndpointOverrideId': json['webhook_endpoint_override_id'] === undefined ? undefined : json['webhook_endpoint_override_id'] === null ? null : json['webhook_endpoint_override_id'],
61
+ 'enabled': json['enabled'] == null ? undefined : json['enabled'],
62
+ };
63
+ }
64
+ function WatchRuleCreateToJSON(json) {
65
+ return WatchRuleCreateToJSONTyped(json, false);
66
+ }
67
+ function WatchRuleCreateToJSONTyped(value, ignoreDiscriminator = false) {
68
+ if (value == null) {
69
+ return value;
70
+ }
71
+ return {
72
+ 'gpu_model': value['gpuModel'],
73
+ 'region': value['region'],
74
+ 'capacity_class': value['capacityClass'],
75
+ 'condition_kind': value['conditionKind'],
76
+ 'threshold': value['threshold'],
77
+ 'webhook_endpoint_override_id': value['webhookEndpointOverrideId'],
78
+ 'enabled': value['enabled'],
79
+ };
80
+ }
@@ -0,0 +1,39 @@
1
+ /**
2
+ * GPU.ai Public Developer API
3
+ * Programmatic API for GPU.ai. Authenticate with API keys minted from the dashboard. See https://gpu.ai/docs for details.
4
+ *
5
+ * The version of the OpenAPI document: 1.0.0
6
+ * Contact: support@gpu.ai
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import type { WatchRule } from './WatchRule';
13
+ /**
14
+ *
15
+ * @export
16
+ * @interface WatchRulePage
17
+ */
18
+ export interface WatchRulePage {
19
+ /**
20
+ *
21
+ * @type {Array<WatchRule>}
22
+ * @memberof WatchRulePage
23
+ */
24
+ data: Array<WatchRule>;
25
+ /**
26
+ *
27
+ * @type {string}
28
+ * @memberof WatchRulePage
29
+ */
30
+ nextCursor: string | null;
31
+ }
32
+ /**
33
+ * Check if a given object implements the WatchRulePage interface.
34
+ */
35
+ export declare function instanceOfWatchRulePage(value: object): value is WatchRulePage;
36
+ export declare function WatchRulePageFromJSON(json: any): WatchRulePage;
37
+ export declare function WatchRulePageFromJSONTyped(json: any, ignoreDiscriminator: boolean): WatchRulePage;
38
+ export declare function WatchRulePageToJSON(json: any): WatchRulePage;
39
+ export declare function WatchRulePageToJSONTyped(value?: WatchRulePage | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,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.instanceOfWatchRulePage = instanceOfWatchRulePage;
17
+ exports.WatchRulePageFromJSON = WatchRulePageFromJSON;
18
+ exports.WatchRulePageFromJSONTyped = WatchRulePageFromJSONTyped;
19
+ exports.WatchRulePageToJSON = WatchRulePageToJSON;
20
+ exports.WatchRulePageToJSONTyped = WatchRulePageToJSONTyped;
21
+ const WatchRule_1 = require("./WatchRule");
22
+ /**
23
+ * Check if a given object implements the WatchRulePage interface.
24
+ */
25
+ function instanceOfWatchRulePage(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 WatchRulePageFromJSON(json) {
33
+ return WatchRulePageFromJSONTyped(json, false);
34
+ }
35
+ function WatchRulePageFromJSONTyped(json, ignoreDiscriminator) {
36
+ if (json == null) {
37
+ return json;
38
+ }
39
+ return {
40
+ 'data': (json['data'].map(WatchRule_1.WatchRuleFromJSON)),
41
+ 'nextCursor': json['next_cursor'],
42
+ };
43
+ }
44
+ function WatchRulePageToJSON(json) {
45
+ return WatchRulePageToJSONTyped(json, false);
46
+ }
47
+ function WatchRulePageToJSONTyped(value, ignoreDiscriminator = false) {
48
+ if (value == null) {
49
+ return value;
50
+ }
51
+ return {
52
+ 'data': (value['data'].map(WatchRule_1.WatchRuleToJSON)),
53
+ 'next_cursor': value['nextCursor'],
54
+ };
55
+ }
@@ -0,0 +1,86 @@
1
+ /**
2
+ * GPU.ai Public Developer API
3
+ * Programmatic API for GPU.ai. Authenticate with API keys minted from the dashboard. See https://gpu.ai/docs for details.
4
+ *
5
+ * The version of the OpenAPI document: 1.0.0
6
+ * Contact: support@gpu.ai
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ /**
13
+ * Partial update. An absent key keeps the stored value; an explicit null on region, capacity_class or webhook_endpoint_override_id clears it. The merged rule is re-validated as a whole.
14
+ *
15
+ * @export
16
+ * @interface WatchRuleUpdate
17
+ */
18
+ export interface WatchRuleUpdate {
19
+ /**
20
+ *
21
+ * @type {string}
22
+ * @memberof WatchRuleUpdate
23
+ */
24
+ gpuModel?: string;
25
+ /**
26
+ *
27
+ * @type {string}
28
+ * @memberof WatchRuleUpdate
29
+ */
30
+ region?: string | null;
31
+ /**
32
+ *
33
+ * @type {WatchRuleUpdateCapacityClassEnum}
34
+ * @memberof WatchRuleUpdate
35
+ */
36
+ capacityClass?: WatchRuleUpdateCapacityClassEnum | null;
37
+ /**
38
+ *
39
+ * @type {WatchRuleUpdateConditionKindEnum}
40
+ * @memberof WatchRuleUpdate
41
+ */
42
+ conditionKind?: WatchRuleUpdateConditionKindEnum;
43
+ /**
44
+ *
45
+ * @type {number}
46
+ * @memberof WatchRuleUpdate
47
+ */
48
+ threshold?: number | null;
49
+ /**
50
+ *
51
+ * @type {string}
52
+ * @memberof WatchRuleUpdate
53
+ */
54
+ webhookEndpointOverrideId?: string | null;
55
+ /**
56
+ *
57
+ * @type {boolean}
58
+ * @memberof WatchRuleUpdate
59
+ */
60
+ enabled?: boolean;
61
+ }
62
+ /**
63
+ * @export
64
+ */
65
+ export declare const WatchRuleUpdateCapacityClassEnum: {
66
+ readonly Secure: "secure";
67
+ readonly Community: "community";
68
+ };
69
+ export type WatchRuleUpdateCapacityClassEnum = typeof WatchRuleUpdateCapacityClassEnum[keyof typeof WatchRuleUpdateCapacityClassEnum];
70
+ /**
71
+ * @export
72
+ */
73
+ export declare const WatchRuleUpdateConditionKindEnum: {
74
+ readonly PriceUnder: "price_under";
75
+ readonly InStock: "in_stock";
76
+ readonly CountAtLeast: "count_at_least";
77
+ };
78
+ export type WatchRuleUpdateConditionKindEnum = typeof WatchRuleUpdateConditionKindEnum[keyof typeof WatchRuleUpdateConditionKindEnum];
79
+ /**
80
+ * Check if a given object implements the WatchRuleUpdate interface.
81
+ */
82
+ export declare function instanceOfWatchRuleUpdate(value: object): value is WatchRuleUpdate;
83
+ export declare function WatchRuleUpdateFromJSON(json: any): WatchRuleUpdate;
84
+ export declare function WatchRuleUpdateFromJSONTyped(json: any, ignoreDiscriminator: boolean): WatchRuleUpdate;
85
+ export declare function WatchRuleUpdateToJSON(json: any): WatchRuleUpdate;
86
+ export declare function WatchRuleUpdateToJSONTyped(value?: WatchRuleUpdate | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,76 @@
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.WatchRuleUpdateConditionKindEnum = exports.WatchRuleUpdateCapacityClassEnum = void 0;
17
+ exports.instanceOfWatchRuleUpdate = instanceOfWatchRuleUpdate;
18
+ exports.WatchRuleUpdateFromJSON = WatchRuleUpdateFromJSON;
19
+ exports.WatchRuleUpdateFromJSONTyped = WatchRuleUpdateFromJSONTyped;
20
+ exports.WatchRuleUpdateToJSON = WatchRuleUpdateToJSON;
21
+ exports.WatchRuleUpdateToJSONTyped = WatchRuleUpdateToJSONTyped;
22
+ /**
23
+ * @export
24
+ */
25
+ exports.WatchRuleUpdateCapacityClassEnum = {
26
+ Secure: 'secure',
27
+ Community: 'community'
28
+ };
29
+ /**
30
+ * @export
31
+ */
32
+ exports.WatchRuleUpdateConditionKindEnum = {
33
+ PriceUnder: 'price_under',
34
+ InStock: 'in_stock',
35
+ CountAtLeast: 'count_at_least'
36
+ };
37
+ /**
38
+ * Check if a given object implements the WatchRuleUpdate interface.
39
+ */
40
+ function instanceOfWatchRuleUpdate(value) {
41
+ return true;
42
+ }
43
+ function WatchRuleUpdateFromJSON(json) {
44
+ return WatchRuleUpdateFromJSONTyped(json, false);
45
+ }
46
+ function WatchRuleUpdateFromJSONTyped(json, ignoreDiscriminator) {
47
+ if (json == null) {
48
+ return json;
49
+ }
50
+ return {
51
+ 'gpuModel': json['gpu_model'] == null ? undefined : json['gpu_model'],
52
+ 'region': json['region'] === undefined ? undefined : json['region'] === null ? null : json['region'],
53
+ 'capacityClass': json['capacity_class'] === undefined ? undefined : json['capacity_class'] === null ? null : json['capacity_class'],
54
+ 'conditionKind': json['condition_kind'] == null ? undefined : json['condition_kind'],
55
+ 'threshold': json['threshold'] === undefined ? undefined : json['threshold'] === null ? null : json['threshold'],
56
+ 'webhookEndpointOverrideId': json['webhook_endpoint_override_id'] === undefined ? undefined : json['webhook_endpoint_override_id'] === null ? null : json['webhook_endpoint_override_id'],
57
+ 'enabled': json['enabled'] == null ? undefined : json['enabled'],
58
+ };
59
+ }
60
+ function WatchRuleUpdateToJSON(json) {
61
+ return WatchRuleUpdateToJSONTyped(json, false);
62
+ }
63
+ function WatchRuleUpdateToJSONTyped(value, ignoreDiscriminator = false) {
64
+ if (value == null) {
65
+ return value;
66
+ }
67
+ return {
68
+ 'gpu_model': value['gpuModel'],
69
+ 'region': value['region'],
70
+ 'capacity_class': value['capacityClass'],
71
+ 'condition_kind': value['conditionKind'],
72
+ 'threshold': value['threshold'],
73
+ 'webhook_endpoint_override_id': value['webhookEndpointOverrideId'],
74
+ 'enabled': value['enabled'],
75
+ };
76
+ }
@@ -1,3 +1,7 @@
1
+ export * from './AutolaunchRule';
2
+ export * from './AutolaunchRuleCreate';
3
+ export * from './AutolaunchRuleDisarm';
4
+ export * from './AutolaunchRulePage';
1
5
  export * from './ChatChoice';
2
6
  export * from './ChatCompletionRequest';
3
7
  export * from './ChatCompletionResponse';
@@ -45,6 +49,8 @@ export * from './InstancePage';
45
49
  export * from './ListCommunityMachines200Response';
46
50
  export * from './ListDeposits200Response';
47
51
  export * from './ListRegistryCredentials200Response';
52
+ export * from './MarketHistoryPoint';
53
+ export * from './MarketHistoryResponse';
48
54
  export * from './Model';
49
55
  export * from './ModelList';
50
56
  export * from './ModelParametersInner';
@@ -77,5 +83,9 @@ export * from './VMImage';
77
83
  export * from './VideoCreateRequest';
78
84
  export * from './VideoJob';
79
85
  export * from './VideoList';
86
+ export * from './WatchRule';
87
+ export * from './WatchRuleCreate';
88
+ export * from './WatchRulePage';
89
+ export * from './WatchRuleUpdate';
80
90
  export * from './WebhookEndpoint';
81
91
  export * from './WebhookEndpointPage';
@@ -16,6 +16,10 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  /* tslint:disable */
18
18
  /* eslint-disable */
19
+ __exportStar(require("./AutolaunchRule"), exports);
20
+ __exportStar(require("./AutolaunchRuleCreate"), exports);
21
+ __exportStar(require("./AutolaunchRuleDisarm"), exports);
22
+ __exportStar(require("./AutolaunchRulePage"), exports);
19
23
  __exportStar(require("./ChatChoice"), exports);
20
24
  __exportStar(require("./ChatCompletionRequest"), exports);
21
25
  __exportStar(require("./ChatCompletionResponse"), exports);
@@ -63,6 +67,8 @@ __exportStar(require("./InstancePage"), exports);
63
67
  __exportStar(require("./ListCommunityMachines200Response"), exports);
64
68
  __exportStar(require("./ListDeposits200Response"), exports);
65
69
  __exportStar(require("./ListRegistryCredentials200Response"), exports);
70
+ __exportStar(require("./MarketHistoryPoint"), exports);
71
+ __exportStar(require("./MarketHistoryResponse"), exports);
66
72
  __exportStar(require("./Model"), exports);
67
73
  __exportStar(require("./ModelList"), exports);
68
74
  __exportStar(require("./ModelParametersInner"), exports);
@@ -95,5 +101,9 @@ __exportStar(require("./VMImage"), exports);
95
101
  __exportStar(require("./VideoCreateRequest"), exports);
96
102
  __exportStar(require("./VideoJob"), exports);
97
103
  __exportStar(require("./VideoList"), exports);
104
+ __exportStar(require("./WatchRule"), exports);
105
+ __exportStar(require("./WatchRuleCreate"), exports);
106
+ __exportStar(require("./WatchRulePage"), exports);
107
+ __exportStar(require("./WatchRuleUpdate"), exports);
98
108
  __exportStar(require("./WebhookEndpoint"), exports);
99
109
  __exportStar(require("./WebhookEndpointPage"), exports);