@gpuai/sdk 0.3.17 → 0.4.0

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 (152) hide show
  1. package/.openapi-generator/FILES +40 -0
  2. package/README.md +36 -2
  3. package/dist/apis/BillingApi.d.ts +70 -0
  4. package/dist/apis/BillingApi.js +197 -0
  5. package/dist/apis/FunctionsApi.d.ts +228 -0
  6. package/dist/apis/FunctionsApi.js +627 -0
  7. package/dist/apis/index.d.ts +1 -0
  8. package/dist/apis/index.js +1 -0
  9. package/dist/esm/apis/BillingApi.d.ts +70 -0
  10. package/dist/esm/apis/BillingApi.js +197 -0
  11. package/dist/esm/apis/FunctionsApi.d.ts +228 -0
  12. package/dist/esm/apis/FunctionsApi.js +623 -0
  13. package/dist/esm/apis/index.d.ts +1 -0
  14. package/dist/esm/apis/index.js +1 -0
  15. package/dist/esm/models/AutolaunchRule.d.ts +4 -2
  16. package/dist/esm/models/BillingDetails.d.ts +98 -0
  17. package/dist/esm/models/BillingDetails.js +85 -0
  18. package/dist/esm/models/CreateFunctionRequest.d.ts +32 -0
  19. package/dist/esm/models/CreateFunctionRequest.js +43 -0
  20. package/dist/esm/models/CreateFunctionRunRequest.d.ts +38 -0
  21. package/dist/esm/models/CreateFunctionRunRequest.js +45 -0
  22. package/dist/esm/models/CreateFunctionVersionRequest.d.ts +110 -0
  23. package/dist/esm/models/CreateFunctionVersionRequest.js +79 -0
  24. package/dist/esm/models/Function.d.ts +163 -0
  25. package/dist/esm/models/Function.js +109 -0
  26. package/dist/esm/models/FunctionList.d.ts +33 -0
  27. package/dist/esm/models/FunctionList.js +44 -0
  28. package/dist/esm/models/FunctionReplicaCounts.d.ts +44 -0
  29. package/dist/esm/models/FunctionReplicaCounts.js +51 -0
  30. package/dist/esm/models/FunctionRun.d.ts +130 -0
  31. package/dist/esm/models/FunctionRun.js +94 -0
  32. package/dist/esm/models/FunctionRunError.d.ts +44 -0
  33. package/dist/esm/models/FunctionRunError.js +49 -0
  34. package/dist/esm/models/FunctionRunList.d.ts +39 -0
  35. package/dist/esm/models/FunctionRunList.js +48 -0
  36. package/dist/esm/models/FunctionRunLogChunk.d.ts +59 -0
  37. package/dist/esm/models/FunctionRunLogChunk.js +63 -0
  38. package/dist/esm/models/FunctionRunLogs.d.ts +45 -0
  39. package/dist/esm/models/FunctionRunLogs.js +52 -0
  40. package/dist/esm/models/FunctionUpload.d.ts +51 -0
  41. package/dist/esm/models/FunctionUpload.js +59 -0
  42. package/dist/esm/models/FunctionVersion.d.ts +137 -0
  43. package/dist/esm/models/FunctionVersion.js +109 -0
  44. package/dist/esm/models/Invoice.d.ts +68 -0
  45. package/dist/esm/models/Invoice.js +67 -0
  46. package/dist/esm/models/InvoiceList.d.ts +45 -0
  47. package/dist/esm/models/InvoiceList.js +50 -0
  48. package/dist/esm/models/ModelPricing.d.ts +46 -0
  49. package/dist/esm/models/ModelPricing.js +21 -0
  50. package/dist/esm/models/ModelRate.d.ts +62 -0
  51. package/dist/esm/models/ModelRate.js +51 -0
  52. package/dist/esm/models/PeakWindow.d.ts +38 -0
  53. package/dist/esm/models/PeakWindow.js +47 -0
  54. package/dist/esm/models/UpdateBillingDetailsRequest.d.ts +80 -0
  55. package/dist/esm/models/UpdateBillingDetailsRequest.js +57 -0
  56. package/dist/esm/models/index.d.ts +19 -0
  57. package/dist/esm/models/index.js +19 -0
  58. package/dist/esm/runtime.js +1 -1
  59. package/dist/models/AutolaunchRule.d.ts +4 -2
  60. package/dist/models/BillingDetails.d.ts +98 -0
  61. package/dist/models/BillingDetails.js +92 -0
  62. package/dist/models/CreateFunctionRequest.d.ts +32 -0
  63. package/dist/models/CreateFunctionRequest.js +50 -0
  64. package/dist/models/CreateFunctionRunRequest.d.ts +38 -0
  65. package/dist/models/CreateFunctionRunRequest.js +52 -0
  66. package/dist/models/CreateFunctionVersionRequest.d.ts +110 -0
  67. package/dist/models/CreateFunctionVersionRequest.js +86 -0
  68. package/dist/models/Function.d.ts +163 -0
  69. package/dist/models/Function.js +117 -0
  70. package/dist/models/FunctionList.d.ts +33 -0
  71. package/dist/models/FunctionList.js +51 -0
  72. package/dist/models/FunctionReplicaCounts.d.ts +44 -0
  73. package/dist/models/FunctionReplicaCounts.js +58 -0
  74. package/dist/models/FunctionRun.d.ts +130 -0
  75. package/dist/models/FunctionRun.js +102 -0
  76. package/dist/models/FunctionRunError.d.ts +44 -0
  77. package/dist/models/FunctionRunError.js +56 -0
  78. package/dist/models/FunctionRunList.d.ts +39 -0
  79. package/dist/models/FunctionRunList.js +55 -0
  80. package/dist/models/FunctionRunLogChunk.d.ts +59 -0
  81. package/dist/models/FunctionRunLogChunk.js +71 -0
  82. package/dist/models/FunctionRunLogs.d.ts +45 -0
  83. package/dist/models/FunctionRunLogs.js +59 -0
  84. package/dist/models/FunctionUpload.d.ts +51 -0
  85. package/dist/models/FunctionUpload.js +67 -0
  86. package/dist/models/FunctionVersion.d.ts +137 -0
  87. package/dist/models/FunctionVersion.js +117 -0
  88. package/dist/models/Invoice.d.ts +68 -0
  89. package/dist/models/Invoice.js +74 -0
  90. package/dist/models/InvoiceList.d.ts +45 -0
  91. package/dist/models/InvoiceList.js +57 -0
  92. package/dist/models/ModelPricing.d.ts +46 -0
  93. package/dist/models/ModelPricing.js +22 -0
  94. package/dist/models/ModelRate.d.ts +62 -0
  95. package/dist/models/ModelRate.js +58 -0
  96. package/dist/models/PeakWindow.d.ts +38 -0
  97. package/dist/models/PeakWindow.js +54 -0
  98. package/dist/models/UpdateBillingDetailsRequest.d.ts +80 -0
  99. package/dist/models/UpdateBillingDetailsRequest.js +64 -0
  100. package/dist/models/index.d.ts +19 -0
  101. package/dist/models/index.js +19 -0
  102. package/dist/runtime.js +1 -1
  103. package/docs/AutolaunchApi.md +1 -1
  104. package/docs/BillingApi.md +299 -0
  105. package/docs/BillingDetails.md +56 -0
  106. package/docs/CreateFunctionRequest.md +34 -0
  107. package/docs/CreateFunctionRunRequest.md +36 -0
  108. package/docs/CreateFunctionVersionRequest.md +60 -0
  109. package/docs/Function.md +75 -0
  110. package/docs/FunctionList.md +34 -0
  111. package/docs/FunctionReplicaCounts.md +39 -0
  112. package/docs/FunctionRun.md +63 -0
  113. package/docs/FunctionRunError.md +38 -0
  114. package/docs/FunctionRunList.md +36 -0
  115. package/docs/FunctionRunLogChunk.md +40 -0
  116. package/docs/FunctionRunLogs.md +38 -0
  117. package/docs/FunctionUpload.md +38 -0
  118. package/docs/FunctionVersion.md +66 -0
  119. package/docs/FunctionsApi.md +880 -0
  120. package/docs/Invoice.md +46 -0
  121. package/docs/InvoiceList.md +38 -0
  122. package/docs/ModelPricing.md +12 -0
  123. package/docs/ModelRate.md +45 -0
  124. package/docs/PeakWindow.md +37 -0
  125. package/docs/UpdateBillingDetailsRequest.md +50 -0
  126. package/package.json +1 -1
  127. package/src/apis/BillingApi.ts +247 -0
  128. package/src/apis/FunctionsApi.ts +828 -0
  129. package/src/apis/index.ts +1 -0
  130. package/src/models/AutolaunchRule.ts +4 -2
  131. package/src/models/BillingDetails.ts +164 -0
  132. package/src/models/CreateFunctionRequest.ts +66 -0
  133. package/src/models/CreateFunctionRunRequest.ts +74 -0
  134. package/src/models/CreateFunctionVersionRequest.ts +175 -0
  135. package/src/models/Function.ts +255 -0
  136. package/src/models/FunctionList.ts +74 -0
  137. package/src/models/FunctionReplicaCounts.ts +84 -0
  138. package/src/models/FunctionRun.ts +207 -0
  139. package/src/models/FunctionRunError.ts +83 -0
  140. package/src/models/FunctionRunList.ts +83 -0
  141. package/src/models/FunctionRunLogChunk.ts +105 -0
  142. package/src/models/FunctionRunLogs.ts +92 -0
  143. package/src/models/FunctionUpload.ts +96 -0
  144. package/src/models/FunctionVersion.ts +226 -0
  145. package/src/models/Invoice.ts +120 -0
  146. package/src/models/InvoiceList.ts +91 -0
  147. package/src/models/ModelPricing.ts +74 -0
  148. package/src/models/ModelRate.ts +105 -0
  149. package/src/models/PeakWindow.ts +75 -0
  150. package/src/models/UpdateBillingDetailsRequest.ts +129 -0
  151. package/src/models/index.ts +19 -0
  152. package/src/runtime.ts +1 -1
@@ -0,0 +1,44 @@
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 FunctionRunError
16
+ */
17
+ export interface FunctionRunError {
18
+ /**
19
+ * The class name of the exception the function raised, or the platform's reason: Timeout, Cancelled, LaunchError, MachineLost, DependencyError and so on.
20
+ * @type {string}
21
+ * @memberof FunctionRunError
22
+ */
23
+ type: string;
24
+ /**
25
+ *
26
+ * @type {string}
27
+ * @memberof FunctionRunError
28
+ */
29
+ message: string;
30
+ /**
31
+ * The remote traceback, when the function raised.
32
+ * @type {string}
33
+ * @memberof FunctionRunError
34
+ */
35
+ traceback?: string;
36
+ }
37
+ /**
38
+ * Check if a given object implements the FunctionRunError interface.
39
+ */
40
+ export declare function instanceOfFunctionRunError(value: object): value is FunctionRunError;
41
+ export declare function FunctionRunErrorFromJSON(json: any): FunctionRunError;
42
+ export declare function FunctionRunErrorFromJSONTyped(json: any, ignoreDiscriminator: boolean): FunctionRunError;
43
+ export declare function FunctionRunErrorToJSON(json: any): FunctionRunError;
44
+ export declare function FunctionRunErrorToJSONTyped(value?: FunctionRunError | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,49 @@
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 FunctionRunError interface.
16
+ */
17
+ export function instanceOfFunctionRunError(value) {
18
+ if (!('type' in value) || value['type'] === undefined)
19
+ return false;
20
+ if (!('message' in value) || value['message'] === undefined)
21
+ return false;
22
+ return true;
23
+ }
24
+ export function FunctionRunErrorFromJSON(json) {
25
+ return FunctionRunErrorFromJSONTyped(json, false);
26
+ }
27
+ export function FunctionRunErrorFromJSONTyped(json, ignoreDiscriminator) {
28
+ if (json == null) {
29
+ return json;
30
+ }
31
+ return {
32
+ 'type': json['type'],
33
+ 'message': json['message'],
34
+ 'traceback': json['traceback'] == null ? undefined : json['traceback'],
35
+ };
36
+ }
37
+ export function FunctionRunErrorToJSON(json) {
38
+ return FunctionRunErrorToJSONTyped(json, false);
39
+ }
40
+ export function FunctionRunErrorToJSONTyped(value, ignoreDiscriminator = false) {
41
+ if (value == null) {
42
+ return value;
43
+ }
44
+ return {
45
+ 'type': value['type'],
46
+ 'message': value['message'],
47
+ 'traceback': value['traceback'],
48
+ };
49
+ }
@@ -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 { FunctionRun } from './FunctionRun';
13
+ /**
14
+ *
15
+ * @export
16
+ * @interface FunctionRunList
17
+ */
18
+ export interface FunctionRunList {
19
+ /**
20
+ *
21
+ * @type {Array<FunctionRun>}
22
+ * @memberof FunctionRunList
23
+ */
24
+ data: Array<FunctionRun>;
25
+ /**
26
+ *
27
+ * @type {string}
28
+ * @memberof FunctionRunList
29
+ */
30
+ nextCursor: string | null;
31
+ }
32
+ /**
33
+ * Check if a given object implements the FunctionRunList interface.
34
+ */
35
+ export declare function instanceOfFunctionRunList(value: object): value is FunctionRunList;
36
+ export declare function FunctionRunListFromJSON(json: any): FunctionRunList;
37
+ export declare function FunctionRunListFromJSONTyped(json: any, ignoreDiscriminator: boolean): FunctionRunList;
38
+ export declare function FunctionRunListToJSON(json: any): FunctionRunList;
39
+ export declare function FunctionRunListToJSONTyped(value?: FunctionRunList | 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 { FunctionRunFromJSON, FunctionRunToJSON, } from './FunctionRun';
15
+ /**
16
+ * Check if a given object implements the FunctionRunList interface.
17
+ */
18
+ export function instanceOfFunctionRunList(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 FunctionRunListFromJSON(json) {
26
+ return FunctionRunListFromJSONTyped(json, false);
27
+ }
28
+ export function FunctionRunListFromJSONTyped(json, ignoreDiscriminator) {
29
+ if (json == null) {
30
+ return json;
31
+ }
32
+ return {
33
+ 'data': (json['data'].map(FunctionRunFromJSON)),
34
+ 'nextCursor': json['next_cursor'],
35
+ };
36
+ }
37
+ export function FunctionRunListToJSON(json) {
38
+ return FunctionRunListToJSONTyped(json, false);
39
+ }
40
+ export function FunctionRunListToJSONTyped(value, ignoreDiscriminator = false) {
41
+ if (value == null) {
42
+ return value;
43
+ }
44
+ return {
45
+ 'data': (value['data'].map(FunctionRunToJSON)),
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
+ *
14
+ * @export
15
+ * @interface FunctionRunLogChunk
16
+ */
17
+ export interface FunctionRunLogChunk {
18
+ /**
19
+ *
20
+ * @type {number}
21
+ * @memberof FunctionRunLogChunk
22
+ */
23
+ cursor: number;
24
+ /**
25
+ * system carries messages from the platform, such as dependency installation.
26
+ * @type {FunctionRunLogChunkStreamEnum}
27
+ * @memberof FunctionRunLogChunk
28
+ */
29
+ stream: FunctionRunLogChunkStreamEnum;
30
+ /**
31
+ *
32
+ * @type {string}
33
+ * @memberof FunctionRunLogChunk
34
+ */
35
+ data: string;
36
+ /**
37
+ *
38
+ * @type {Date}
39
+ * @memberof FunctionRunLogChunk
40
+ */
41
+ createdAt: Date;
42
+ }
43
+ /**
44
+ * @export
45
+ */
46
+ export declare const FunctionRunLogChunkStreamEnum: {
47
+ readonly Stdout: "stdout";
48
+ readonly Stderr: "stderr";
49
+ readonly System: "system";
50
+ };
51
+ export type FunctionRunLogChunkStreamEnum = typeof FunctionRunLogChunkStreamEnum[keyof typeof FunctionRunLogChunkStreamEnum];
52
+ /**
53
+ * Check if a given object implements the FunctionRunLogChunk interface.
54
+ */
55
+ export declare function instanceOfFunctionRunLogChunk(value: object): value is FunctionRunLogChunk;
56
+ export declare function FunctionRunLogChunkFromJSON(json: any): FunctionRunLogChunk;
57
+ export declare function FunctionRunLogChunkFromJSONTyped(json: any, ignoreDiscriminator: boolean): FunctionRunLogChunk;
58
+ export declare function FunctionRunLogChunkToJSON(json: any): FunctionRunLogChunk;
59
+ export declare function FunctionRunLogChunkToJSONTyped(value?: FunctionRunLogChunk | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,63 @@
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 FunctionRunLogChunkStreamEnum = {
18
+ Stdout: 'stdout',
19
+ Stderr: 'stderr',
20
+ System: 'system'
21
+ };
22
+ /**
23
+ * Check if a given object implements the FunctionRunLogChunk interface.
24
+ */
25
+ export function instanceOfFunctionRunLogChunk(value) {
26
+ if (!('cursor' in value) || value['cursor'] === undefined)
27
+ return false;
28
+ if (!('stream' in value) || value['stream'] === undefined)
29
+ return false;
30
+ if (!('data' in value) || value['data'] === undefined)
31
+ return false;
32
+ if ((!('createdAt' in value) && !('created_at' in value)) || (value['createdAt'] === undefined && value['created_at'] === undefined))
33
+ return false;
34
+ return true;
35
+ }
36
+ export function FunctionRunLogChunkFromJSON(json) {
37
+ return FunctionRunLogChunkFromJSONTyped(json, false);
38
+ }
39
+ export function FunctionRunLogChunkFromJSONTyped(json, ignoreDiscriminator) {
40
+ if (json == null) {
41
+ return json;
42
+ }
43
+ return {
44
+ 'cursor': json['cursor'],
45
+ 'stream': json['stream'],
46
+ 'data': json['data'],
47
+ 'createdAt': (new Date(json['created_at'])),
48
+ };
49
+ }
50
+ export function FunctionRunLogChunkToJSON(json) {
51
+ return FunctionRunLogChunkToJSONTyped(json, false);
52
+ }
53
+ export function FunctionRunLogChunkToJSONTyped(value, ignoreDiscriminator = false) {
54
+ if (value == null) {
55
+ return value;
56
+ }
57
+ return {
58
+ 'cursor': value['cursor'],
59
+ 'stream': value['stream'],
60
+ 'data': value['data'],
61
+ 'created_at': value['createdAt'].toISOString(),
62
+ };
63
+ }
@@ -0,0 +1,45 @@
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 { FunctionRunLogChunk } from './FunctionRunLogChunk';
13
+ /**
14
+ *
15
+ * @export
16
+ * @interface FunctionRunLogs
17
+ */
18
+ export interface FunctionRunLogs {
19
+ /**
20
+ *
21
+ * @type {Array<FunctionRunLogChunk>}
22
+ * @memberof FunctionRunLogs
23
+ */
24
+ data: Array<FunctionRunLogChunk>;
25
+ /**
26
+ * Pass as `after` on the next read.
27
+ * @type {number}
28
+ * @memberof FunctionRunLogs
29
+ */
30
+ nextCursor: number;
31
+ /**
32
+ * The run's status at read time. Once it is final and data is empty, there is no more output.
33
+ * @type {string}
34
+ * @memberof FunctionRunLogs
35
+ */
36
+ runStatus: string;
37
+ }
38
+ /**
39
+ * Check if a given object implements the FunctionRunLogs interface.
40
+ */
41
+ export declare function instanceOfFunctionRunLogs(value: object): value is FunctionRunLogs;
42
+ export declare function FunctionRunLogsFromJSON(json: any): FunctionRunLogs;
43
+ export declare function FunctionRunLogsFromJSONTyped(json: any, ignoreDiscriminator: boolean): FunctionRunLogs;
44
+ export declare function FunctionRunLogsToJSON(json: any): FunctionRunLogs;
45
+ export declare function FunctionRunLogsToJSONTyped(value?: FunctionRunLogs | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,52 @@
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 { FunctionRunLogChunkFromJSON, FunctionRunLogChunkToJSON, } from './FunctionRunLogChunk';
15
+ /**
16
+ * Check if a given object implements the FunctionRunLogs interface.
17
+ */
18
+ export function instanceOfFunctionRunLogs(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
+ if ((!('runStatus' in value) && !('run_status' in value)) || (value['runStatus'] === undefined && value['run_status'] === undefined))
24
+ return false;
25
+ return true;
26
+ }
27
+ export function FunctionRunLogsFromJSON(json) {
28
+ return FunctionRunLogsFromJSONTyped(json, false);
29
+ }
30
+ export function FunctionRunLogsFromJSONTyped(json, ignoreDiscriminator) {
31
+ if (json == null) {
32
+ return json;
33
+ }
34
+ return {
35
+ 'data': (json['data'].map(FunctionRunLogChunkFromJSON)),
36
+ 'nextCursor': json['next_cursor'],
37
+ 'runStatus': json['run_status'],
38
+ };
39
+ }
40
+ export function FunctionRunLogsToJSON(json) {
41
+ return FunctionRunLogsToJSONTyped(json, false);
42
+ }
43
+ export function FunctionRunLogsToJSONTyped(value, ignoreDiscriminator = false) {
44
+ if (value == null) {
45
+ return value;
46
+ }
47
+ return {
48
+ 'data': (value['data'].map(FunctionRunLogChunkToJSON)),
49
+ 'next_cursor': value['nextCursor'],
50
+ 'run_status': value['runStatus'],
51
+ };
52
+ }
@@ -0,0 +1,51 @@
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 FunctionUpload
16
+ */
17
+ export interface FunctionUpload {
18
+ /**
19
+ * Where to send the pickled function.
20
+ * @type {string}
21
+ * @memberof FunctionUpload
22
+ */
23
+ url: string;
24
+ /**
25
+ *
26
+ * @type {FunctionUploadMethodEnum}
27
+ * @memberof FunctionUpload
28
+ */
29
+ method: FunctionUploadMethodEnum;
30
+ /**
31
+ *
32
+ * @type {Date}
33
+ * @memberof FunctionUpload
34
+ */
35
+ expiresAt: Date;
36
+ }
37
+ /**
38
+ * @export
39
+ */
40
+ export declare const FunctionUploadMethodEnum: {
41
+ readonly Put: "PUT";
42
+ };
43
+ export type FunctionUploadMethodEnum = typeof FunctionUploadMethodEnum[keyof typeof FunctionUploadMethodEnum];
44
+ /**
45
+ * Check if a given object implements the FunctionUpload interface.
46
+ */
47
+ export declare function instanceOfFunctionUpload(value: object): value is FunctionUpload;
48
+ export declare function FunctionUploadFromJSON(json: any): FunctionUpload;
49
+ export declare function FunctionUploadFromJSONTyped(json: any, ignoreDiscriminator: boolean): FunctionUpload;
50
+ export declare function FunctionUploadToJSON(json: any): FunctionUpload;
51
+ export declare function FunctionUploadToJSONTyped(value?: FunctionUpload | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,59 @@
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 FunctionUploadMethodEnum = {
18
+ Put: 'PUT'
19
+ };
20
+ /**
21
+ * Check if a given object implements the FunctionUpload interface.
22
+ */
23
+ export function instanceOfFunctionUpload(value) {
24
+ if (!('url' in value) || value['url'] === undefined)
25
+ return false;
26
+ if (!('method' in value) || value['method'] === undefined)
27
+ return false;
28
+ if (value['method'] !== 'PUT')
29
+ return false;
30
+ if ((!('expiresAt' in value) && !('expires_at' in value)) || (value['expiresAt'] === undefined && value['expires_at'] === undefined))
31
+ return false;
32
+ return true;
33
+ }
34
+ export function FunctionUploadFromJSON(json) {
35
+ return FunctionUploadFromJSONTyped(json, false);
36
+ }
37
+ export function FunctionUploadFromJSONTyped(json, ignoreDiscriminator) {
38
+ if (json == null) {
39
+ return json;
40
+ }
41
+ return {
42
+ 'url': json['url'],
43
+ 'method': json['method'],
44
+ 'expiresAt': (new Date(json['expires_at'])),
45
+ };
46
+ }
47
+ export function FunctionUploadToJSON(json) {
48
+ return FunctionUploadToJSONTyped(json, false);
49
+ }
50
+ export function FunctionUploadToJSONTyped(value, ignoreDiscriminator = false) {
51
+ if (value == null) {
52
+ return value;
53
+ }
54
+ return {
55
+ 'url': value['url'],
56
+ 'method': value['method'],
57
+ 'expires_at': value['expiresAt'].toISOString(),
58
+ };
59
+ }
@@ -0,0 +1,137 @@
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 { FunctionUpload } from './FunctionUpload';
13
+ /**
14
+ *
15
+ * @export
16
+ * @interface FunctionVersion
17
+ */
18
+ export interface FunctionVersion {
19
+ /**
20
+ *
21
+ * @type {string}
22
+ * @memberof FunctionVersion
23
+ */
24
+ id: string;
25
+ /**
26
+ *
27
+ * @type {string}
28
+ * @memberof FunctionVersion
29
+ */
30
+ functionId: string;
31
+ /**
32
+ *
33
+ * @type {FunctionVersionStatusEnum}
34
+ * @memberof FunctionVersion
35
+ */
36
+ status: FunctionVersionStatusEnum;
37
+ /**
38
+ *
39
+ * @type {string}
40
+ * @memberof FunctionVersion
41
+ */
42
+ contentHash: string;
43
+ /**
44
+ * Present while the bundle still has to be uploaded.
45
+ * @type {FunctionUpload}
46
+ * @memberof FunctionVersion
47
+ */
48
+ upload?: FunctionUpload | null;
49
+ /**
50
+ *
51
+ * @type {string}
52
+ * @memberof FunctionVersion
53
+ */
54
+ pythonVersion: string;
55
+ /**
56
+ *
57
+ * @type {string}
58
+ * @memberof FunctionVersion
59
+ */
60
+ cloudpickleVersion: string;
61
+ /**
62
+ *
63
+ * @type {Array<string>}
64
+ * @memberof FunctionVersion
65
+ */
66
+ pip: Array<string>;
67
+ /**
68
+ *
69
+ * @type {string}
70
+ * @memberof FunctionVersion
71
+ */
72
+ gpu?: string | null;
73
+ /**
74
+ *
75
+ * @type {number}
76
+ * @memberof FunctionVersion
77
+ */
78
+ gpuCount: number;
79
+ /**
80
+ *
81
+ * @type {number}
82
+ * @memberof FunctionVersion
83
+ */
84
+ minVramGb: number;
85
+ /**
86
+ *
87
+ * @type {Array<string>}
88
+ * @memberof FunctionVersion
89
+ */
90
+ regions: Array<string>;
91
+ /**
92
+ *
93
+ * @type {number}
94
+ * @memberof FunctionVersion
95
+ */
96
+ maxPricePerHour?: number | null;
97
+ /**
98
+ *
99
+ * @type {number}
100
+ * @memberof FunctionVersion
101
+ */
102
+ timeout: number;
103
+ /**
104
+ *
105
+ * @type {number}
106
+ * @memberof FunctionVersion
107
+ */
108
+ idleTimeout: number;
109
+ /**
110
+ *
111
+ * @type {number}
112
+ * @memberof FunctionVersion
113
+ */
114
+ maxConcurrency: number;
115
+ /**
116
+ *
117
+ * @type {Date}
118
+ * @memberof FunctionVersion
119
+ */
120
+ createdAt: Date;
121
+ }
122
+ /**
123
+ * @export
124
+ */
125
+ export declare const FunctionVersionStatusEnum: {
126
+ readonly PendingUpload: "pending_upload";
127
+ readonly Ready: "ready";
128
+ };
129
+ export type FunctionVersionStatusEnum = typeof FunctionVersionStatusEnum[keyof typeof FunctionVersionStatusEnum];
130
+ /**
131
+ * Check if a given object implements the FunctionVersion interface.
132
+ */
133
+ export declare function instanceOfFunctionVersion(value: object): value is FunctionVersion;
134
+ export declare function FunctionVersionFromJSON(json: any): FunctionVersion;
135
+ export declare function FunctionVersionFromJSONTyped(json: any, ignoreDiscriminator: boolean): FunctionVersion;
136
+ export declare function FunctionVersionToJSON(json: any): FunctionVersion;
137
+ export declare function FunctionVersionToJSONTyped(value?: FunctionVersion | null, ignoreDiscriminator?: boolean): any;