@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,130 @@
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 { FunctionRunError } from './FunctionRunError';
13
+ /**
14
+ * One call of a function.
15
+ * @export
16
+ * @interface FunctionRun
17
+ */
18
+ export interface FunctionRun {
19
+ /**
20
+ *
21
+ * @type {string}
22
+ * @memberof FunctionRun
23
+ */
24
+ id: string;
25
+ /**
26
+ *
27
+ * @type {string}
28
+ * @memberof FunctionRun
29
+ */
30
+ functionId: string;
31
+ /**
32
+ *
33
+ * @type {string}
34
+ * @memberof FunctionRun
35
+ */
36
+ versionId: string;
37
+ /**
38
+ * queued waits for a machine; setting_up means a machine took the call and is installing the function's Python and pip requirements; running means the function body is executing.
39
+ * @type {FunctionRunStatusEnum}
40
+ * @memberof FunctionRun
41
+ */
42
+ status: FunctionRunStatusEnum;
43
+ /**
44
+ *
45
+ * @type {boolean}
46
+ * @memberof FunctionRun
47
+ */
48
+ cancelRequested: boolean;
49
+ /**
50
+ * True when the call waited for a machine to start, false when a warm machine took it.
51
+ * @type {boolean}
52
+ * @memberof FunctionRun
53
+ */
54
+ coldStart?: boolean | null;
55
+ /**
56
+ * The machine that ran the call. It is an instance of the organization.
57
+ * @type {string}
58
+ * @memberof FunctionRun
59
+ */
60
+ instanceId?: string | null;
61
+ /**
62
+ *
63
+ * @type {Date}
64
+ * @memberof FunctionRun
65
+ */
66
+ createdAt: Date;
67
+ /**
68
+ *
69
+ * @type {Date}
70
+ * @memberof FunctionRun
71
+ */
72
+ startedAt?: Date | null;
73
+ /**
74
+ *
75
+ * @type {Date}
76
+ * @memberof FunctionRun
77
+ */
78
+ finishedAt?: Date | null;
79
+ /**
80
+ * How long the function body ran.
81
+ * @type {number}
82
+ * @memberof FunctionRun
83
+ */
84
+ durationMs?: number | null;
85
+ /**
86
+ * The time the call held its machine, at the machine's hourly price. Machine time between calls is billed too but belongs to no call.
87
+ * @type {number}
88
+ * @memberof FunctionRun
89
+ */
90
+ costUsd?: number | null;
91
+ /**
92
+ *
93
+ * @type {number}
94
+ * @memberof FunctionRun
95
+ */
96
+ pricePerHour?: number | null;
97
+ /**
98
+ *
99
+ * @type {FunctionRunError}
100
+ * @memberof FunctionRun
101
+ */
102
+ error?: FunctionRunError | null;
103
+ /**
104
+ * The pickled return value, base64-encoded. Present only on a succeeded run fetched with include_result=true.
105
+ * @type {string}
106
+ * @memberof FunctionRun
107
+ */
108
+ result?: string;
109
+ }
110
+ /**
111
+ * @export
112
+ */
113
+ export declare const FunctionRunStatusEnum: {
114
+ readonly Queued: "queued";
115
+ readonly SettingUp: "setting_up";
116
+ readonly Running: "running";
117
+ readonly Succeeded: "succeeded";
118
+ readonly Failed: "failed";
119
+ readonly TimedOut: "timed_out";
120
+ readonly Cancelled: "cancelled";
121
+ };
122
+ export type FunctionRunStatusEnum = typeof FunctionRunStatusEnum[keyof typeof FunctionRunStatusEnum];
123
+ /**
124
+ * Check if a given object implements the FunctionRun interface.
125
+ */
126
+ export declare function instanceOfFunctionRun(value: object): value is FunctionRun;
127
+ export declare function FunctionRunFromJSON(json: any): FunctionRun;
128
+ export declare function FunctionRunFromJSONTyped(json: any, ignoreDiscriminator: boolean): FunctionRun;
129
+ export declare function FunctionRunToJSON(json: any): FunctionRun;
130
+ export declare function FunctionRunToJSONTyped(value?: FunctionRun | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,102 @@
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.FunctionRunStatusEnum = void 0;
17
+ exports.instanceOfFunctionRun = instanceOfFunctionRun;
18
+ exports.FunctionRunFromJSON = FunctionRunFromJSON;
19
+ exports.FunctionRunFromJSONTyped = FunctionRunFromJSONTyped;
20
+ exports.FunctionRunToJSON = FunctionRunToJSON;
21
+ exports.FunctionRunToJSONTyped = FunctionRunToJSONTyped;
22
+ const FunctionRunError_1 = require("./FunctionRunError");
23
+ /**
24
+ * @export
25
+ */
26
+ exports.FunctionRunStatusEnum = {
27
+ Queued: 'queued',
28
+ SettingUp: 'setting_up',
29
+ Running: 'running',
30
+ Succeeded: 'succeeded',
31
+ Failed: 'failed',
32
+ TimedOut: 'timed_out',
33
+ Cancelled: 'cancelled'
34
+ };
35
+ /**
36
+ * Check if a given object implements the FunctionRun interface.
37
+ */
38
+ function instanceOfFunctionRun(value) {
39
+ if (!('id' in value) || value['id'] === undefined)
40
+ return false;
41
+ if ((!('functionId' in value) && !('function_id' in value)) || (value['functionId'] === undefined && value['function_id'] === undefined))
42
+ return false;
43
+ if ((!('versionId' in value) && !('version_id' in value)) || (value['versionId'] === undefined && value['version_id'] === undefined))
44
+ return false;
45
+ if (!('status' in value) || value['status'] === undefined)
46
+ return false;
47
+ if ((!('cancelRequested' in value) && !('cancel_requested' in value)) || (value['cancelRequested'] === undefined && value['cancel_requested'] === undefined))
48
+ return false;
49
+ if ((!('createdAt' in value) && !('created_at' in value)) || (value['createdAt'] === undefined && value['created_at'] === undefined))
50
+ return false;
51
+ return true;
52
+ }
53
+ function FunctionRunFromJSON(json) {
54
+ return FunctionRunFromJSONTyped(json, false);
55
+ }
56
+ function FunctionRunFromJSONTyped(json, ignoreDiscriminator) {
57
+ if (json == null) {
58
+ return json;
59
+ }
60
+ return {
61
+ 'id': json['id'],
62
+ 'functionId': json['function_id'],
63
+ 'versionId': json['version_id'],
64
+ 'status': json['status'],
65
+ 'cancelRequested': json['cancel_requested'],
66
+ 'coldStart': json['cold_start'] === undefined ? undefined : json['cold_start'] === null ? null : json['cold_start'],
67
+ 'instanceId': json['instance_id'] === undefined ? undefined : json['instance_id'] === null ? null : json['instance_id'],
68
+ 'createdAt': (new Date(json['created_at'])),
69
+ 'startedAt': json['started_at'] === undefined ? undefined : json['started_at'] === null ? null : (new Date(json['started_at'])),
70
+ 'finishedAt': json['finished_at'] === undefined ? undefined : json['finished_at'] === null ? null : (new Date(json['finished_at'])),
71
+ 'durationMs': json['duration_ms'] === undefined ? undefined : json['duration_ms'] === null ? null : json['duration_ms'],
72
+ 'costUsd': json['cost_usd'] === undefined ? undefined : json['cost_usd'] === null ? null : json['cost_usd'],
73
+ 'pricePerHour': json['price_per_hour'] === undefined ? undefined : json['price_per_hour'] === null ? null : json['price_per_hour'],
74
+ 'error': json['error'] === undefined ? undefined : json['error'] === null ? null : (0, FunctionRunError_1.FunctionRunErrorFromJSON)(json['error']),
75
+ 'result': json['result'] == null ? undefined : json['result'],
76
+ };
77
+ }
78
+ function FunctionRunToJSON(json) {
79
+ return FunctionRunToJSONTyped(json, false);
80
+ }
81
+ function FunctionRunToJSONTyped(value, ignoreDiscriminator = false) {
82
+ if (value == null) {
83
+ return value;
84
+ }
85
+ return {
86
+ 'id': value['id'],
87
+ 'function_id': value['functionId'],
88
+ 'version_id': value['versionId'],
89
+ 'status': value['status'],
90
+ 'cancel_requested': value['cancelRequested'],
91
+ 'cold_start': value['coldStart'],
92
+ 'instance_id': value['instanceId'],
93
+ 'created_at': value['createdAt'].toISOString(),
94
+ 'started_at': value['startedAt'] == null ? value['startedAt'] : value['startedAt'].toISOString(),
95
+ 'finished_at': value['finishedAt'] == null ? value['finishedAt'] : value['finishedAt'].toISOString(),
96
+ 'duration_ms': value['durationMs'],
97
+ 'cost_usd': value['costUsd'],
98
+ 'price_per_hour': value['pricePerHour'],
99
+ 'error': (0, FunctionRunError_1.FunctionRunErrorToJSON)(value['error']),
100
+ 'result': value['result'],
101
+ };
102
+ }
@@ -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,56 @@
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.instanceOfFunctionRunError = instanceOfFunctionRunError;
17
+ exports.FunctionRunErrorFromJSON = FunctionRunErrorFromJSON;
18
+ exports.FunctionRunErrorFromJSONTyped = FunctionRunErrorFromJSONTyped;
19
+ exports.FunctionRunErrorToJSON = FunctionRunErrorToJSON;
20
+ exports.FunctionRunErrorToJSONTyped = FunctionRunErrorToJSONTyped;
21
+ /**
22
+ * Check if a given object implements the FunctionRunError interface.
23
+ */
24
+ function instanceOfFunctionRunError(value) {
25
+ if (!('type' in value) || value['type'] === undefined)
26
+ return false;
27
+ if (!('message' in value) || value['message'] === undefined)
28
+ return false;
29
+ return true;
30
+ }
31
+ function FunctionRunErrorFromJSON(json) {
32
+ return FunctionRunErrorFromJSONTyped(json, false);
33
+ }
34
+ function FunctionRunErrorFromJSONTyped(json, ignoreDiscriminator) {
35
+ if (json == null) {
36
+ return json;
37
+ }
38
+ return {
39
+ 'type': json['type'],
40
+ 'message': json['message'],
41
+ 'traceback': json['traceback'] == null ? undefined : json['traceback'],
42
+ };
43
+ }
44
+ function FunctionRunErrorToJSON(json) {
45
+ return FunctionRunErrorToJSONTyped(json, false);
46
+ }
47
+ function FunctionRunErrorToJSONTyped(value, ignoreDiscriminator = false) {
48
+ if (value == null) {
49
+ return value;
50
+ }
51
+ return {
52
+ 'type': value['type'],
53
+ 'message': value['message'],
54
+ 'traceback': value['traceback'],
55
+ };
56
+ }
@@ -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,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.instanceOfFunctionRunList = instanceOfFunctionRunList;
17
+ exports.FunctionRunListFromJSON = FunctionRunListFromJSON;
18
+ exports.FunctionRunListFromJSONTyped = FunctionRunListFromJSONTyped;
19
+ exports.FunctionRunListToJSON = FunctionRunListToJSON;
20
+ exports.FunctionRunListToJSONTyped = FunctionRunListToJSONTyped;
21
+ const FunctionRun_1 = require("./FunctionRun");
22
+ /**
23
+ * Check if a given object implements the FunctionRunList interface.
24
+ */
25
+ function instanceOfFunctionRunList(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 FunctionRunListFromJSON(json) {
33
+ return FunctionRunListFromJSONTyped(json, false);
34
+ }
35
+ function FunctionRunListFromJSONTyped(json, ignoreDiscriminator) {
36
+ if (json == null) {
37
+ return json;
38
+ }
39
+ return {
40
+ 'data': (json['data'].map(FunctionRun_1.FunctionRunFromJSON)),
41
+ 'nextCursor': json['next_cursor'],
42
+ };
43
+ }
44
+ function FunctionRunListToJSON(json) {
45
+ return FunctionRunListToJSONTyped(json, false);
46
+ }
47
+ function FunctionRunListToJSONTyped(value, ignoreDiscriminator = false) {
48
+ if (value == null) {
49
+ return value;
50
+ }
51
+ return {
52
+ 'data': (value['data'].map(FunctionRun_1.FunctionRunToJSON)),
53
+ 'next_cursor': value['nextCursor'],
54
+ };
55
+ }
@@ -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,71 @@
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.FunctionRunLogChunkStreamEnum = void 0;
17
+ exports.instanceOfFunctionRunLogChunk = instanceOfFunctionRunLogChunk;
18
+ exports.FunctionRunLogChunkFromJSON = FunctionRunLogChunkFromJSON;
19
+ exports.FunctionRunLogChunkFromJSONTyped = FunctionRunLogChunkFromJSONTyped;
20
+ exports.FunctionRunLogChunkToJSON = FunctionRunLogChunkToJSON;
21
+ exports.FunctionRunLogChunkToJSONTyped = FunctionRunLogChunkToJSONTyped;
22
+ /**
23
+ * @export
24
+ */
25
+ exports.FunctionRunLogChunkStreamEnum = {
26
+ Stdout: 'stdout',
27
+ Stderr: 'stderr',
28
+ System: 'system'
29
+ };
30
+ /**
31
+ * Check if a given object implements the FunctionRunLogChunk interface.
32
+ */
33
+ function instanceOfFunctionRunLogChunk(value) {
34
+ if (!('cursor' in value) || value['cursor'] === undefined)
35
+ return false;
36
+ if (!('stream' in value) || value['stream'] === undefined)
37
+ return false;
38
+ if (!('data' in value) || value['data'] === undefined)
39
+ return false;
40
+ if ((!('createdAt' in value) && !('created_at' in value)) || (value['createdAt'] === undefined && value['created_at'] === undefined))
41
+ return false;
42
+ return true;
43
+ }
44
+ function FunctionRunLogChunkFromJSON(json) {
45
+ return FunctionRunLogChunkFromJSONTyped(json, false);
46
+ }
47
+ function FunctionRunLogChunkFromJSONTyped(json, ignoreDiscriminator) {
48
+ if (json == null) {
49
+ return json;
50
+ }
51
+ return {
52
+ 'cursor': json['cursor'],
53
+ 'stream': json['stream'],
54
+ 'data': json['data'],
55
+ 'createdAt': (new Date(json['created_at'])),
56
+ };
57
+ }
58
+ function FunctionRunLogChunkToJSON(json) {
59
+ return FunctionRunLogChunkToJSONTyped(json, false);
60
+ }
61
+ function FunctionRunLogChunkToJSONTyped(value, ignoreDiscriminator = false) {
62
+ if (value == null) {
63
+ return value;
64
+ }
65
+ return {
66
+ 'cursor': value['cursor'],
67
+ 'stream': value['stream'],
68
+ 'data': value['data'],
69
+ 'created_at': value['createdAt'].toISOString(),
70
+ };
71
+ }
@@ -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,59 @@
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.instanceOfFunctionRunLogs = instanceOfFunctionRunLogs;
17
+ exports.FunctionRunLogsFromJSON = FunctionRunLogsFromJSON;
18
+ exports.FunctionRunLogsFromJSONTyped = FunctionRunLogsFromJSONTyped;
19
+ exports.FunctionRunLogsToJSON = FunctionRunLogsToJSON;
20
+ exports.FunctionRunLogsToJSONTyped = FunctionRunLogsToJSONTyped;
21
+ const FunctionRunLogChunk_1 = require("./FunctionRunLogChunk");
22
+ /**
23
+ * Check if a given object implements the FunctionRunLogs interface.
24
+ */
25
+ function instanceOfFunctionRunLogs(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
+ if ((!('runStatus' in value) && !('run_status' in value)) || (value['runStatus'] === undefined && value['run_status'] === undefined))
31
+ return false;
32
+ return true;
33
+ }
34
+ function FunctionRunLogsFromJSON(json) {
35
+ return FunctionRunLogsFromJSONTyped(json, false);
36
+ }
37
+ function FunctionRunLogsFromJSONTyped(json, ignoreDiscriminator) {
38
+ if (json == null) {
39
+ return json;
40
+ }
41
+ return {
42
+ 'data': (json['data'].map(FunctionRunLogChunk_1.FunctionRunLogChunkFromJSON)),
43
+ 'nextCursor': json['next_cursor'],
44
+ 'runStatus': json['run_status'],
45
+ };
46
+ }
47
+ function FunctionRunLogsToJSON(json) {
48
+ return FunctionRunLogsToJSONTyped(json, false);
49
+ }
50
+ function FunctionRunLogsToJSONTyped(value, ignoreDiscriminator = false) {
51
+ if (value == null) {
52
+ return value;
53
+ }
54
+ return {
55
+ 'data': (value['data'].map(FunctionRunLogChunk_1.FunctionRunLogChunkToJSON)),
56
+ 'next_cursor': value['nextCursor'],
57
+ 'run_status': value['runStatus'],
58
+ };
59
+ }