@gpuai/sdk 0.3.12 → 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 (132) hide show
  1. package/.openapi-generator/FILES +36 -0
  2. package/README.md +38 -9
  3. package/dist/apis/AutolaunchApi.d.ts +109 -0
  4. package/dist/apis/AutolaunchApi.js +286 -0
  5. package/dist/apis/InferenceApi.d.ts +19 -0
  6. package/dist/apis/InferenceApi.js +51 -0
  7. package/dist/apis/MarketApi.d.ts +56 -0
  8. package/dist/apis/MarketApi.js +112 -0
  9. package/dist/apis/WatchApi.d.ts +109 -0
  10. package/dist/apis/WatchApi.js +286 -0
  11. package/dist/apis/index.d.ts +3 -0
  12. package/dist/apis/index.js +3 -0
  13. package/dist/esm/apis/AutolaunchApi.d.ts +109 -0
  14. package/dist/esm/apis/AutolaunchApi.js +282 -0
  15. package/dist/esm/apis/InferenceApi.d.ts +19 -0
  16. package/dist/esm/apis/InferenceApi.js +51 -0
  17. package/dist/esm/apis/MarketApi.d.ts +56 -0
  18. package/dist/esm/apis/MarketApi.js +108 -0
  19. package/dist/esm/apis/WatchApi.d.ts +109 -0
  20. package/dist/esm/apis/WatchApi.js +282 -0
  21. package/dist/esm/apis/index.d.ts +3 -0
  22. package/dist/esm/apis/index.js +3 -0
  23. package/dist/esm/models/AutolaunchRule.d.ts +181 -0
  24. package/dist/esm/models/AutolaunchRule.js +142 -0
  25. package/dist/esm/models/AutolaunchRuleCreate.d.ts +105 -0
  26. package/dist/esm/models/AutolaunchRuleCreate.js +84 -0
  27. package/dist/esm/models/AutolaunchRuleDisarm.d.ts +34 -0
  28. package/dist/esm/models/AutolaunchRuleDisarm.js +43 -0
  29. package/dist/esm/models/AutolaunchRulePage.d.ts +39 -0
  30. package/dist/esm/models/AutolaunchRulePage.js +48 -0
  31. package/dist/esm/models/Embedding.d.ts +51 -0
  32. package/dist/esm/models/Embedding.js +59 -0
  33. package/dist/esm/models/EmbeddingsRequest.d.ts +64 -0
  34. package/dist/esm/models/EmbeddingsRequest.js +60 -0
  35. package/dist/esm/models/EmbeddingsRequestInput.d.ts +21 -0
  36. package/dist/esm/models/EmbeddingsRequestInput.js +47 -0
  37. package/dist/esm/models/EmbeddingsResponse.d.ts +59 -0
  38. package/dist/esm/models/EmbeddingsResponse.js +65 -0
  39. package/dist/esm/models/EmbeddingsUsage.d.ts +38 -0
  40. package/dist/esm/models/EmbeddingsUsage.js +47 -0
  41. package/dist/esm/models/MarketHistoryPoint.d.ts +59 -0
  42. package/dist/esm/models/MarketHistoryPoint.js +55 -0
  43. package/dist/esm/models/MarketHistoryResponse.d.ts +60 -0
  44. package/dist/esm/models/MarketHistoryResponse.js +60 -0
  45. package/dist/esm/models/Problem.d.ts +1 -0
  46. package/dist/esm/models/Problem.js +1 -0
  47. package/dist/esm/models/WatchRule.d.ts +141 -0
  48. package/dist/esm/models/WatchRule.js +117 -0
  49. package/dist/esm/models/WatchRuleCreate.d.ts +87 -0
  50. package/dist/esm/models/WatchRuleCreate.js +72 -0
  51. package/dist/esm/models/WatchRulePage.d.ts +39 -0
  52. package/dist/esm/models/WatchRulePage.js +48 -0
  53. package/dist/esm/models/WatchRuleUpdate.d.ts +86 -0
  54. package/dist/esm/models/WatchRuleUpdate.js +68 -0
  55. package/dist/esm/models/index.d.ts +15 -0
  56. package/dist/esm/models/index.js +15 -0
  57. package/dist/models/AutolaunchRule.d.ts +181 -0
  58. package/dist/models/AutolaunchRule.js +150 -0
  59. package/dist/models/AutolaunchRuleCreate.d.ts +105 -0
  60. package/dist/models/AutolaunchRuleCreate.js +92 -0
  61. package/dist/models/AutolaunchRuleDisarm.d.ts +34 -0
  62. package/dist/models/AutolaunchRuleDisarm.js +50 -0
  63. package/dist/models/AutolaunchRulePage.d.ts +39 -0
  64. package/dist/models/AutolaunchRulePage.js +55 -0
  65. package/dist/models/Embedding.d.ts +51 -0
  66. package/dist/models/Embedding.js +67 -0
  67. package/dist/models/EmbeddingsRequest.d.ts +64 -0
  68. package/dist/models/EmbeddingsRequest.js +68 -0
  69. package/dist/models/EmbeddingsRequestInput.d.ts +21 -0
  70. package/dist/models/EmbeddingsRequestInput.js +53 -0
  71. package/dist/models/EmbeddingsResponse.d.ts +59 -0
  72. package/dist/models/EmbeddingsResponse.js +73 -0
  73. package/dist/models/EmbeddingsUsage.d.ts +38 -0
  74. package/dist/models/EmbeddingsUsage.js +54 -0
  75. package/dist/models/MarketHistoryPoint.d.ts +59 -0
  76. package/dist/models/MarketHistoryPoint.js +62 -0
  77. package/dist/models/MarketHistoryResponse.d.ts +60 -0
  78. package/dist/models/MarketHistoryResponse.js +67 -0
  79. package/dist/models/Problem.d.ts +1 -0
  80. package/dist/models/Problem.js +1 -0
  81. package/dist/models/WatchRule.d.ts +141 -0
  82. package/dist/models/WatchRule.js +125 -0
  83. package/dist/models/WatchRuleCreate.d.ts +87 -0
  84. package/dist/models/WatchRuleCreate.js +80 -0
  85. package/dist/models/WatchRulePage.d.ts +39 -0
  86. package/dist/models/WatchRulePage.js +55 -0
  87. package/dist/models/WatchRuleUpdate.d.ts +86 -0
  88. package/dist/models/WatchRuleUpdate.js +76 -0
  89. package/dist/models/index.d.ts +15 -0
  90. package/dist/models/index.js +15 -0
  91. package/docs/AutolaunchApi.md +390 -0
  92. package/docs/AutolaunchRule.md +69 -0
  93. package/docs/AutolaunchRuleCreate.md +50 -0
  94. package/docs/AutolaunchRuleDisarm.md +35 -0
  95. package/docs/AutolaunchRulePage.md +36 -0
  96. package/docs/Embedding.md +38 -0
  97. package/docs/EmbeddingsRequest.md +42 -0
  98. package/docs/EmbeddingsRequestInput.md +33 -0
  99. package/docs/EmbeddingsResponse.md +40 -0
  100. package/docs/EmbeddingsUsage.md +37 -0
  101. package/docs/InferenceApi.md +83 -0
  102. package/docs/MarketApi.md +98 -0
  103. package/docs/MarketHistoryPoint.md +43 -0
  104. package/docs/MarketHistoryResponse.md +43 -0
  105. package/docs/WatchApi.md +389 -0
  106. package/docs/WatchRule.md +61 -0
  107. package/docs/WatchRuleCreate.md +46 -0
  108. package/docs/WatchRulePage.md +36 -0
  109. package/docs/WatchRuleUpdate.md +47 -0
  110. package/package.json +1 -1
  111. package/src/apis/AutolaunchApi.ts +360 -0
  112. package/src/apis/InferenceApi.ts +71 -0
  113. package/src/apis/MarketApi.ts +136 -0
  114. package/src/apis/WatchApi.ts +360 -0
  115. package/src/apis/index.ts +3 -0
  116. package/src/models/AutolaunchRule.ts +270 -0
  117. package/src/models/AutolaunchRuleCreate.ts +162 -0
  118. package/src/models/AutolaunchRuleDisarm.ts +68 -0
  119. package/src/models/AutolaunchRulePage.ts +83 -0
  120. package/src/models/Embedding.ts +96 -0
  121. package/src/models/EmbeddingsRequest.ts +117 -0
  122. package/src/models/EmbeddingsRequestInput.ts +59 -0
  123. package/src/models/EmbeddingsResponse.ts +120 -0
  124. package/src/models/EmbeddingsUsage.ts +75 -0
  125. package/src/models/MarketHistoryPoint.ts +103 -0
  126. package/src/models/MarketHistoryResponse.ts +113 -0
  127. package/src/models/Problem.ts +1 -0
  128. package/src/models/WatchRule.ts +219 -0
  129. package/src/models/WatchRuleCreate.ts +138 -0
  130. package/src/models/WatchRulePage.ts +83 -0
  131. package/src/models/WatchRuleUpdate.ts +135 -0
  132. package/src/models/index.ts +15 -0
@@ -0,0 +1,141 @@
1
+ /**
2
+ * GPU.ai Public Developer API
3
+ * Programmatic API for GPU.ai. Authenticate with API keys minted from the dashboard. See https://gpu.ai/docs for details.
4
+ *
5
+ * The version of the OpenAPI document: 1.0.0
6
+ * Contact: support@gpu.ai
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ /**
13
+ * A rule that notifies when the market moves on a GPU model. It carries no upstream supplier identity of any kind, and no delivery address — those are properties of the resource, not of a particular response.
14
+ *
15
+ * @export
16
+ * @interface WatchRule
17
+ */
18
+ export interface WatchRule {
19
+ /**
20
+ *
21
+ * @type {string}
22
+ * @memberof WatchRule
23
+ */
24
+ id: string;
25
+ /**
26
+ * The GPU model the rule watches, e.g. "H100".
27
+ * @type {string}
28
+ * @memberof WatchRule
29
+ */
30
+ gpuModel: string;
31
+ /**
32
+ * Canonical region the rule is narrowed to, or null for every region.
33
+ * @type {string}
34
+ * @memberof WatchRule
35
+ */
36
+ region: string | null;
37
+ /**
38
+ * Capacity class the rule is narrowed to, or null for both.
39
+ * @type {WatchRuleCapacityClassEnum}
40
+ * @memberof WatchRule
41
+ */
42
+ capacityClass: WatchRuleCapacityClassEnum | null;
43
+ /**
44
+ *
45
+ * @type {WatchRuleConditionKindEnum}
46
+ * @memberof WatchRule
47
+ */
48
+ conditionKind: WatchRuleConditionKindEnum;
49
+ /**
50
+ * Per-GPU hourly price for price_under, or a unit count for count_at_least. Null for in_stock, which takes no threshold.
51
+ *
52
+ * @type {number}
53
+ * @memberof WatchRule
54
+ */
55
+ threshold: number | null;
56
+ /**
57
+ * armed = the condition is currently false and the next transition to true will alert. fired = it has alerted and has not yet re-armed.
58
+ *
59
+ * @type {WatchRuleStateEnum}
60
+ * @memberof WatchRule
61
+ */
62
+ state: WatchRuleStateEnum;
63
+ /**
64
+ *
65
+ * @type {Date}
66
+ * @memberof WatchRule
67
+ */
68
+ lastFiredAt: Date | null;
69
+ /**
70
+ * While set, the rule will not re-fire even if the condition re-crosses — the quiet window that stops a boundary-hugging signal alerting on every crossing.
71
+ *
72
+ * @type {Date}
73
+ * @memberof WatchRule
74
+ */
75
+ quietUntil: Date | null;
76
+ /**
77
+ * Id of a webhook endpoint registered by this organization, or null to deliver to every registered endpoint. Never a URL.
78
+ *
79
+ * @type {string}
80
+ * @memberof WatchRule
81
+ */
82
+ webhookEndpointOverrideId: string | null;
83
+ /**
84
+ *
85
+ * @type {boolean}
86
+ * @memberof WatchRule
87
+ */
88
+ enabled: boolean;
89
+ /**
90
+ * Why an automatically disabled rule was disabled — for example its creator no longer belongs to the organization.
91
+ *
92
+ * @type {string}
93
+ * @memberof WatchRule
94
+ */
95
+ deactivatedReason: string | null;
96
+ /**
97
+ *
98
+ * @type {Date}
99
+ * @memberof WatchRule
100
+ */
101
+ createdAt: Date;
102
+ /**
103
+ *
104
+ * @type {Date}
105
+ * @memberof WatchRule
106
+ */
107
+ updatedAt: Date;
108
+ }
109
+ /**
110
+ * @export
111
+ */
112
+ export declare const WatchRuleCapacityClassEnum: {
113
+ readonly Secure: "secure";
114
+ readonly Community: "community";
115
+ };
116
+ export type WatchRuleCapacityClassEnum = typeof WatchRuleCapacityClassEnum[keyof typeof WatchRuleCapacityClassEnum];
117
+ /**
118
+ * @export
119
+ */
120
+ export declare const WatchRuleConditionKindEnum: {
121
+ readonly PriceUnder: "price_under";
122
+ readonly InStock: "in_stock";
123
+ readonly CountAtLeast: "count_at_least";
124
+ };
125
+ export type WatchRuleConditionKindEnum = typeof WatchRuleConditionKindEnum[keyof typeof WatchRuleConditionKindEnum];
126
+ /**
127
+ * @export
128
+ */
129
+ export declare const WatchRuleStateEnum: {
130
+ readonly Armed: "armed";
131
+ readonly Fired: "fired";
132
+ };
133
+ export type WatchRuleStateEnum = typeof WatchRuleStateEnum[keyof typeof WatchRuleStateEnum];
134
+ /**
135
+ * Check if a given object implements the WatchRule interface.
136
+ */
137
+ export declare function instanceOfWatchRule(value: object): value is WatchRule;
138
+ export declare function WatchRuleFromJSON(json: any): WatchRule;
139
+ export declare function WatchRuleFromJSONTyped(json: any, ignoreDiscriminator: boolean): WatchRule;
140
+ export declare function WatchRuleToJSON(json: any): WatchRule;
141
+ export declare function WatchRuleToJSONTyped(value?: WatchRule | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,117 @@
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 WatchRuleCapacityClassEnum = {
18
+ Secure: 'secure',
19
+ Community: 'community'
20
+ };
21
+ /**
22
+ * @export
23
+ */
24
+ export const WatchRuleConditionKindEnum = {
25
+ PriceUnder: 'price_under',
26
+ InStock: 'in_stock',
27
+ CountAtLeast: 'count_at_least'
28
+ };
29
+ /**
30
+ * @export
31
+ */
32
+ export const WatchRuleStateEnum = {
33
+ Armed: 'armed',
34
+ Fired: 'fired'
35
+ };
36
+ /**
37
+ * Check if a given object implements the WatchRule interface.
38
+ */
39
+ export function instanceOfWatchRule(value) {
40
+ if (!('id' in value) || value['id'] === undefined)
41
+ return false;
42
+ if ((!('gpuModel' in value) && !('gpu_model' in value)) || (value['gpuModel'] === undefined && value['gpu_model'] === undefined))
43
+ return false;
44
+ if (!('region' in value) || value['region'] === undefined)
45
+ return false;
46
+ if ((!('capacityClass' in value) && !('capacity_class' in value)) || (value['capacityClass'] === undefined && value['capacity_class'] === undefined))
47
+ return false;
48
+ if ((!('conditionKind' in value) && !('condition_kind' in value)) || (value['conditionKind'] === undefined && value['condition_kind'] === undefined))
49
+ return false;
50
+ if (!('threshold' in value) || value['threshold'] === undefined)
51
+ return false;
52
+ if (!('state' in value) || value['state'] === undefined)
53
+ return false;
54
+ if ((!('lastFiredAt' in value) && !('last_fired_at' in value)) || (value['lastFiredAt'] === undefined && value['last_fired_at'] === undefined))
55
+ return false;
56
+ if ((!('quietUntil' in value) && !('quiet_until' in value)) || (value['quietUntil'] === undefined && value['quiet_until'] === undefined))
57
+ return false;
58
+ if ((!('webhookEndpointOverrideId' in value) && !('webhook_endpoint_override_id' in value)) || (value['webhookEndpointOverrideId'] === undefined && value['webhook_endpoint_override_id'] === undefined))
59
+ return false;
60
+ if (!('enabled' in value) || value['enabled'] === undefined)
61
+ return false;
62
+ if ((!('deactivatedReason' in value) && !('deactivated_reason' in value)) || (value['deactivatedReason'] === undefined && value['deactivated_reason'] === undefined))
63
+ return false;
64
+ if ((!('createdAt' in value) && !('created_at' in value)) || (value['createdAt'] === undefined && value['created_at'] === undefined))
65
+ return false;
66
+ if ((!('updatedAt' in value) && !('updated_at' in value)) || (value['updatedAt'] === undefined && value['updated_at'] === undefined))
67
+ return false;
68
+ return true;
69
+ }
70
+ export function WatchRuleFromJSON(json) {
71
+ return WatchRuleFromJSONTyped(json, false);
72
+ }
73
+ export function WatchRuleFromJSONTyped(json, ignoreDiscriminator) {
74
+ if (json == null) {
75
+ return json;
76
+ }
77
+ return {
78
+ 'id': json['id'],
79
+ 'gpuModel': json['gpu_model'],
80
+ 'region': json['region'],
81
+ 'capacityClass': json['capacity_class'],
82
+ 'conditionKind': json['condition_kind'],
83
+ 'threshold': json['threshold'],
84
+ 'state': json['state'],
85
+ 'lastFiredAt': (json['last_fired_at'] == null ? null : new Date(json['last_fired_at'])),
86
+ 'quietUntil': (json['quiet_until'] == null ? null : new Date(json['quiet_until'])),
87
+ 'webhookEndpointOverrideId': json['webhook_endpoint_override_id'],
88
+ 'enabled': json['enabled'],
89
+ 'deactivatedReason': json['deactivated_reason'],
90
+ 'createdAt': (new Date(json['created_at'])),
91
+ 'updatedAt': (new Date(json['updated_at'])),
92
+ };
93
+ }
94
+ export function WatchRuleToJSON(json) {
95
+ return WatchRuleToJSONTyped(json, false);
96
+ }
97
+ export function WatchRuleToJSONTyped(value, ignoreDiscriminator = false) {
98
+ if (value == null) {
99
+ return value;
100
+ }
101
+ return {
102
+ 'id': value['id'],
103
+ 'gpu_model': value['gpuModel'],
104
+ 'region': value['region'],
105
+ 'capacity_class': value['capacityClass'],
106
+ 'condition_kind': value['conditionKind'],
107
+ 'threshold': value['threshold'],
108
+ 'state': value['state'],
109
+ 'last_fired_at': value['lastFiredAt'] == null ? value['lastFiredAt'] : value['lastFiredAt'].toISOString(),
110
+ 'quiet_until': value['quietUntil'] == null ? value['quietUntil'] : value['quietUntil'].toISOString(),
111
+ 'webhook_endpoint_override_id': value['webhookEndpointOverrideId'],
112
+ 'enabled': value['enabled'],
113
+ 'deactivated_reason': value['deactivatedReason'],
114
+ 'created_at': value['createdAt'].toISOString(),
115
+ 'updated_at': value['updatedAt'].toISOString(),
116
+ };
117
+ }
@@ -0,0 +1,87 @@
1
+ /**
2
+ * GPU.ai Public Developer API
3
+ * Programmatic API for GPU.ai. Authenticate with API keys minted from the dashboard. See https://gpu.ai/docs for details.
4
+ *
5
+ * The version of the OpenAPI document: 1.0.0
6
+ * Contact: support@gpu.ai
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ /**
13
+ *
14
+ * @export
15
+ * @interface WatchRuleCreate
16
+ */
17
+ export interface WatchRuleCreate {
18
+ /**
19
+ *
20
+ * @type {string}
21
+ * @memberof WatchRuleCreate
22
+ */
23
+ gpuModel: string;
24
+ /**
25
+ * Omit or send null to watch every region.
26
+ * @type {string}
27
+ * @memberof WatchRuleCreate
28
+ */
29
+ region?: string | null;
30
+ /**
31
+ * Omit or send null to watch both capacity classes.
32
+ * @type {WatchRuleCreateCapacityClassEnum}
33
+ * @memberof WatchRuleCreate
34
+ */
35
+ capacityClass?: WatchRuleCreateCapacityClassEnum | null;
36
+ /**
37
+ *
38
+ * @type {WatchRuleCreateConditionKindEnum}
39
+ * @memberof WatchRuleCreate
40
+ */
41
+ conditionKind: WatchRuleCreateConditionKindEnum;
42
+ /**
43
+ * Required and greater than zero for price_under and count_at_least. Ignored for in_stock, which is stored with no threshold.
44
+ *
45
+ * @type {number}
46
+ * @memberof WatchRuleCreate
47
+ */
48
+ threshold?: number | null;
49
+ /**
50
+ * Id of an endpoint already registered via /webhook-endpoints. A URL here is rejected: the resource holds references, never addresses.
51
+ *
52
+ * @type {string}
53
+ * @memberof WatchRuleCreate
54
+ */
55
+ webhookEndpointOverrideId?: string | null;
56
+ /**
57
+ * Defaults to true. Create with false to park a rule.
58
+ * @type {boolean}
59
+ * @memberof WatchRuleCreate
60
+ */
61
+ enabled?: boolean;
62
+ }
63
+ /**
64
+ * @export
65
+ */
66
+ export declare const WatchRuleCreateCapacityClassEnum: {
67
+ readonly Secure: "secure";
68
+ readonly Community: "community";
69
+ };
70
+ export type WatchRuleCreateCapacityClassEnum = typeof WatchRuleCreateCapacityClassEnum[keyof typeof WatchRuleCreateCapacityClassEnum];
71
+ /**
72
+ * @export
73
+ */
74
+ export declare const WatchRuleCreateConditionKindEnum: {
75
+ readonly PriceUnder: "price_under";
76
+ readonly InStock: "in_stock";
77
+ readonly CountAtLeast: "count_at_least";
78
+ };
79
+ export type WatchRuleCreateConditionKindEnum = typeof WatchRuleCreateConditionKindEnum[keyof typeof WatchRuleCreateConditionKindEnum];
80
+ /**
81
+ * Check if a given object implements the WatchRuleCreate interface.
82
+ */
83
+ export declare function instanceOfWatchRuleCreate(value: object): value is WatchRuleCreate;
84
+ export declare function WatchRuleCreateFromJSON(json: any): WatchRuleCreate;
85
+ export declare function WatchRuleCreateFromJSONTyped(json: any, ignoreDiscriminator: boolean): WatchRuleCreate;
86
+ export declare function WatchRuleCreateToJSON(json: any): WatchRuleCreate;
87
+ export declare function WatchRuleCreateToJSONTyped(value?: WatchRuleCreate | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,72 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * GPU.ai Public Developer API
5
+ * Programmatic API for GPU.ai. Authenticate with API keys minted from the dashboard. See https://gpu.ai/docs for details.
6
+ *
7
+ * The version of the OpenAPI document: 1.0.0
8
+ * Contact: support@gpu.ai
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+ /**
15
+ * @export
16
+ */
17
+ export const WatchRuleCreateCapacityClassEnum = {
18
+ Secure: 'secure',
19
+ Community: 'community'
20
+ };
21
+ /**
22
+ * @export
23
+ */
24
+ export const WatchRuleCreateConditionKindEnum = {
25
+ PriceUnder: 'price_under',
26
+ InStock: 'in_stock',
27
+ CountAtLeast: 'count_at_least'
28
+ };
29
+ /**
30
+ * Check if a given object implements the WatchRuleCreate interface.
31
+ */
32
+ export function instanceOfWatchRuleCreate(value) {
33
+ if ((!('gpuModel' in value) && !('gpu_model' in value)) || (value['gpuModel'] === undefined && value['gpu_model'] === undefined))
34
+ return false;
35
+ if ((!('conditionKind' in value) && !('condition_kind' in value)) || (value['conditionKind'] === undefined && value['condition_kind'] === undefined))
36
+ return false;
37
+ return true;
38
+ }
39
+ export function WatchRuleCreateFromJSON(json) {
40
+ return WatchRuleCreateFromJSONTyped(json, false);
41
+ }
42
+ export function WatchRuleCreateFromJSONTyped(json, ignoreDiscriminator) {
43
+ if (json == null) {
44
+ return json;
45
+ }
46
+ return {
47
+ 'gpuModel': json['gpu_model'],
48
+ 'region': json['region'] === undefined ? undefined : json['region'] === null ? null : json['region'],
49
+ 'capacityClass': json['capacity_class'] === undefined ? undefined : json['capacity_class'] === null ? null : json['capacity_class'],
50
+ 'conditionKind': json['condition_kind'],
51
+ 'threshold': json['threshold'] === undefined ? undefined : json['threshold'] === null ? null : json['threshold'],
52
+ 'webhookEndpointOverrideId': json['webhook_endpoint_override_id'] === undefined ? undefined : json['webhook_endpoint_override_id'] === null ? null : json['webhook_endpoint_override_id'],
53
+ 'enabled': json['enabled'] == null ? undefined : json['enabled'],
54
+ };
55
+ }
56
+ export function WatchRuleCreateToJSON(json) {
57
+ return WatchRuleCreateToJSONTyped(json, false);
58
+ }
59
+ export function WatchRuleCreateToJSONTyped(value, ignoreDiscriminator = false) {
60
+ if (value == null) {
61
+ return value;
62
+ }
63
+ return {
64
+ 'gpu_model': value['gpuModel'],
65
+ 'region': value['region'],
66
+ 'capacity_class': value['capacityClass'],
67
+ 'condition_kind': value['conditionKind'],
68
+ 'threshold': value['threshold'],
69
+ 'webhook_endpoint_override_id': value['webhookEndpointOverrideId'],
70
+ 'enabled': value['enabled'],
71
+ };
72
+ }
@@ -0,0 +1,39 @@
1
+ /**
2
+ * GPU.ai Public Developer API
3
+ * Programmatic API for GPU.ai. Authenticate with API keys minted from the dashboard. See https://gpu.ai/docs for details.
4
+ *
5
+ * The version of the OpenAPI document: 1.0.0
6
+ * Contact: support@gpu.ai
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import type { WatchRule } from './WatchRule';
13
+ /**
14
+ *
15
+ * @export
16
+ * @interface WatchRulePage
17
+ */
18
+ export interface WatchRulePage {
19
+ /**
20
+ *
21
+ * @type {Array<WatchRule>}
22
+ * @memberof WatchRulePage
23
+ */
24
+ data: Array<WatchRule>;
25
+ /**
26
+ *
27
+ * @type {string}
28
+ * @memberof WatchRulePage
29
+ */
30
+ nextCursor: string | null;
31
+ }
32
+ /**
33
+ * Check if a given object implements the WatchRulePage interface.
34
+ */
35
+ export declare function instanceOfWatchRulePage(value: object): value is WatchRulePage;
36
+ export declare function WatchRulePageFromJSON(json: any): WatchRulePage;
37
+ export declare function WatchRulePageFromJSONTyped(json: any, ignoreDiscriminator: boolean): WatchRulePage;
38
+ export declare function WatchRulePageToJSON(json: any): WatchRulePage;
39
+ export declare function WatchRulePageToJSONTyped(value?: WatchRulePage | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,48 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * GPU.ai Public Developer API
5
+ * Programmatic API for GPU.ai. Authenticate with API keys minted from the dashboard. See https://gpu.ai/docs for details.
6
+ *
7
+ * The version of the OpenAPI document: 1.0.0
8
+ * Contact: support@gpu.ai
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+ import { WatchRuleFromJSON, WatchRuleToJSON, } from './WatchRule';
15
+ /**
16
+ * Check if a given object implements the WatchRulePage interface.
17
+ */
18
+ export function instanceOfWatchRulePage(value) {
19
+ if (!('data' in value) || value['data'] === undefined)
20
+ return false;
21
+ if ((!('nextCursor' in value) && !('next_cursor' in value)) || (value['nextCursor'] === undefined && value['next_cursor'] === undefined))
22
+ return false;
23
+ return true;
24
+ }
25
+ export function WatchRulePageFromJSON(json) {
26
+ return WatchRulePageFromJSONTyped(json, false);
27
+ }
28
+ export function WatchRulePageFromJSONTyped(json, ignoreDiscriminator) {
29
+ if (json == null) {
30
+ return json;
31
+ }
32
+ return {
33
+ 'data': (json['data'].map(WatchRuleFromJSON)),
34
+ 'nextCursor': json['next_cursor'],
35
+ };
36
+ }
37
+ export function WatchRulePageToJSON(json) {
38
+ return WatchRulePageToJSONTyped(json, false);
39
+ }
40
+ export function WatchRulePageToJSONTyped(value, ignoreDiscriminator = false) {
41
+ if (value == null) {
42
+ return value;
43
+ }
44
+ return {
45
+ 'data': (value['data'].map(WatchRuleToJSON)),
46
+ 'next_cursor': value['nextCursor'],
47
+ };
48
+ }
@@ -0,0 +1,86 @@
1
+ /**
2
+ * GPU.ai Public Developer API
3
+ * Programmatic API for GPU.ai. Authenticate with API keys minted from the dashboard. See https://gpu.ai/docs for details.
4
+ *
5
+ * The version of the OpenAPI document: 1.0.0
6
+ * Contact: support@gpu.ai
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ /**
13
+ * Partial update. An absent key keeps the stored value; an explicit null on region, capacity_class or webhook_endpoint_override_id clears it. The merged rule is re-validated as a whole.
14
+ *
15
+ * @export
16
+ * @interface WatchRuleUpdate
17
+ */
18
+ export interface WatchRuleUpdate {
19
+ /**
20
+ *
21
+ * @type {string}
22
+ * @memberof WatchRuleUpdate
23
+ */
24
+ gpuModel?: string;
25
+ /**
26
+ *
27
+ * @type {string}
28
+ * @memberof WatchRuleUpdate
29
+ */
30
+ region?: string | null;
31
+ /**
32
+ *
33
+ * @type {WatchRuleUpdateCapacityClassEnum}
34
+ * @memberof WatchRuleUpdate
35
+ */
36
+ capacityClass?: WatchRuleUpdateCapacityClassEnum | null;
37
+ /**
38
+ *
39
+ * @type {WatchRuleUpdateConditionKindEnum}
40
+ * @memberof WatchRuleUpdate
41
+ */
42
+ conditionKind?: WatchRuleUpdateConditionKindEnum;
43
+ /**
44
+ *
45
+ * @type {number}
46
+ * @memberof WatchRuleUpdate
47
+ */
48
+ threshold?: number | null;
49
+ /**
50
+ *
51
+ * @type {string}
52
+ * @memberof WatchRuleUpdate
53
+ */
54
+ webhookEndpointOverrideId?: string | null;
55
+ /**
56
+ *
57
+ * @type {boolean}
58
+ * @memberof WatchRuleUpdate
59
+ */
60
+ enabled?: boolean;
61
+ }
62
+ /**
63
+ * @export
64
+ */
65
+ export declare const WatchRuleUpdateCapacityClassEnum: {
66
+ readonly Secure: "secure";
67
+ readonly Community: "community";
68
+ };
69
+ export type WatchRuleUpdateCapacityClassEnum = typeof WatchRuleUpdateCapacityClassEnum[keyof typeof WatchRuleUpdateCapacityClassEnum];
70
+ /**
71
+ * @export
72
+ */
73
+ export declare const WatchRuleUpdateConditionKindEnum: {
74
+ readonly PriceUnder: "price_under";
75
+ readonly InStock: "in_stock";
76
+ readonly CountAtLeast: "count_at_least";
77
+ };
78
+ export type WatchRuleUpdateConditionKindEnum = typeof WatchRuleUpdateConditionKindEnum[keyof typeof WatchRuleUpdateConditionKindEnum];
79
+ /**
80
+ * Check if a given object implements the WatchRuleUpdate interface.
81
+ */
82
+ export declare function instanceOfWatchRuleUpdate(value: object): value is WatchRuleUpdate;
83
+ export declare function WatchRuleUpdateFromJSON(json: any): WatchRuleUpdate;
84
+ export declare function WatchRuleUpdateFromJSONTyped(json: any, ignoreDiscriminator: boolean): WatchRuleUpdate;
85
+ export declare function WatchRuleUpdateToJSON(json: any): WatchRuleUpdate;
86
+ export declare function WatchRuleUpdateToJSONTyped(value?: WatchRuleUpdate | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,68 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * GPU.ai Public Developer API
5
+ * Programmatic API for GPU.ai. Authenticate with API keys minted from the dashboard. See https://gpu.ai/docs for details.
6
+ *
7
+ * The version of the OpenAPI document: 1.0.0
8
+ * Contact: support@gpu.ai
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+ /**
15
+ * @export
16
+ */
17
+ export const WatchRuleUpdateCapacityClassEnum = {
18
+ Secure: 'secure',
19
+ Community: 'community'
20
+ };
21
+ /**
22
+ * @export
23
+ */
24
+ export const WatchRuleUpdateConditionKindEnum = {
25
+ PriceUnder: 'price_under',
26
+ InStock: 'in_stock',
27
+ CountAtLeast: 'count_at_least'
28
+ };
29
+ /**
30
+ * Check if a given object implements the WatchRuleUpdate interface.
31
+ */
32
+ export function instanceOfWatchRuleUpdate(value) {
33
+ return true;
34
+ }
35
+ export function WatchRuleUpdateFromJSON(json) {
36
+ return WatchRuleUpdateFromJSONTyped(json, false);
37
+ }
38
+ export function WatchRuleUpdateFromJSONTyped(json, ignoreDiscriminator) {
39
+ if (json == null) {
40
+ return json;
41
+ }
42
+ return {
43
+ 'gpuModel': json['gpu_model'] == null ? undefined : json['gpu_model'],
44
+ 'region': json['region'] === undefined ? undefined : json['region'] === null ? null : json['region'],
45
+ 'capacityClass': json['capacity_class'] === undefined ? undefined : json['capacity_class'] === null ? null : json['capacity_class'],
46
+ 'conditionKind': json['condition_kind'] == null ? undefined : json['condition_kind'],
47
+ 'threshold': json['threshold'] === undefined ? undefined : json['threshold'] === null ? null : json['threshold'],
48
+ 'webhookEndpointOverrideId': json['webhook_endpoint_override_id'] === undefined ? undefined : json['webhook_endpoint_override_id'] === null ? null : json['webhook_endpoint_override_id'],
49
+ 'enabled': json['enabled'] == null ? undefined : json['enabled'],
50
+ };
51
+ }
52
+ export function WatchRuleUpdateToJSON(json) {
53
+ return WatchRuleUpdateToJSONTyped(json, false);
54
+ }
55
+ export function WatchRuleUpdateToJSONTyped(value, ignoreDiscriminator = false) {
56
+ if (value == null) {
57
+ return value;
58
+ }
59
+ return {
60
+ 'gpu_model': value['gpuModel'],
61
+ 'region': value['region'],
62
+ 'capacity_class': value['capacityClass'],
63
+ 'condition_kind': value['conditionKind'],
64
+ 'threshold': value['threshold'],
65
+ 'webhook_endpoint_override_id': value['webhookEndpointOverrideId'],
66
+ 'enabled': value['enabled'],
67
+ };
68
+ }