@boatdev/sdk 1.9.2 → 1.9.3

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 +28 -0
  2. package/dist/apis/BoatApi.d.ts +192 -4
  3. package/dist/apis/BoatApi.js +452 -5
  4. package/dist/esm/apis/BoatApi.d.ts +192 -4
  5. package/dist/esm/apis/BoatApi.js +451 -4
  6. package/dist/esm/models/CommandAttachFrame.d.ts +121 -0
  7. package/dist/esm/models/CommandAttachFrame.js +83 -0
  8. package/dist/esm/models/CommandInfoResponse.d.ts +52 -0
  9. package/dist/esm/models/CommandInfoResponse.js +58 -0
  10. package/dist/esm/models/CommandListResponse.d.ts +58 -0
  11. package/dist/esm/models/CommandListResponse.js +62 -0
  12. package/dist/esm/models/CommandLogsResponse.d.ts +109 -0
  13. package/dist/esm/models/CommandLogsResponse.js +99 -0
  14. package/dist/esm/models/CommandRecord.d.ts +132 -0
  15. package/dist/esm/models/CommandRecord.js +105 -0
  16. package/dist/esm/models/CommandResponse.d.ts +6 -0
  17. package/dist/esm/models/CommandResponse.js +2 -0
  18. package/dist/esm/models/CommandStartedResponse.d.ts +6 -0
  19. package/dist/esm/models/CommandStartedResponse.js +2 -0
  20. package/dist/esm/models/CommandStatusResponse.d.ts +32 -2
  21. package/dist/esm/models/CommandStatusResponse.js +10 -0
  22. package/dist/esm/models/CommandStopResponse.d.ts +70 -0
  23. package/dist/esm/models/CommandStopResponse.js +70 -0
  24. package/dist/esm/models/CommandStreamFrame.d.ts +6 -0
  25. package/dist/esm/models/CommandStreamFrame.js +2 -0
  26. package/dist/esm/models/CreateSandboxRequest.d.ts +6 -0
  27. package/dist/esm/models/CreateSandboxRequest.js +2 -0
  28. package/dist/esm/models/DataRetentionPolicyResponse.d.ts +12 -0
  29. package/dist/esm/models/DataRetentionPolicyResponse.js +4 -0
  30. package/dist/esm/models/DataRetentionUpdateRequest.d.ts +7 -1
  31. package/dist/esm/models/DataRetentionUpdateRequest.js +2 -0
  32. package/dist/esm/models/ForkRequest.d.ts +6 -0
  33. package/dist/esm/models/ForkRequest.js +2 -0
  34. package/dist/esm/models/ProcessListResponse.d.ts +70 -0
  35. package/dist/esm/models/ProcessListResponse.js +70 -0
  36. package/dist/esm/models/Sandbox.d.ts +6 -0
  37. package/dist/esm/models/Sandbox.js +2 -0
  38. package/dist/esm/models/SandboxProcess.d.ts +74 -0
  39. package/dist/esm/models/SandboxProcess.js +59 -0
  40. package/dist/esm/models/TelemetryConfig.d.ts +57 -0
  41. package/dist/esm/models/TelemetryConfig.js +60 -0
  42. package/dist/esm/models/TelemetryConfigLastError.d.ts +44 -0
  43. package/dist/esm/models/TelemetryConfigLastError.js +51 -0
  44. package/dist/esm/models/TelemetryResponse.d.ts +45 -0
  45. package/dist/esm/models/TelemetryResponse.js +52 -0
  46. package/dist/esm/models/TelemetrySetRequest.d.ts +40 -0
  47. package/dist/esm/models/TelemetrySetRequest.js +45 -0
  48. package/dist/esm/models/TelemetrySetResponse.d.ts +52 -0
  49. package/dist/esm/models/TelemetrySetResponse.js +57 -0
  50. package/dist/esm/models/TelemetryTestResult.d.ts +44 -0
  51. package/dist/esm/models/TelemetryTestResult.js +51 -0
  52. package/dist/esm/models/index.d.ts +14 -0
  53. package/dist/esm/models/index.js +14 -0
  54. package/dist/models/CommandAttachFrame.d.ts +121 -0
  55. package/dist/models/CommandAttachFrame.js +91 -0
  56. package/dist/models/CommandInfoResponse.d.ts +52 -0
  57. package/dist/models/CommandInfoResponse.js +66 -0
  58. package/dist/models/CommandListResponse.d.ts +58 -0
  59. package/dist/models/CommandListResponse.js +70 -0
  60. package/dist/models/CommandLogsResponse.d.ts +109 -0
  61. package/dist/models/CommandLogsResponse.js +107 -0
  62. package/dist/models/CommandRecord.d.ts +132 -0
  63. package/dist/models/CommandRecord.js +113 -0
  64. package/dist/models/CommandResponse.d.ts +6 -0
  65. package/dist/models/CommandResponse.js +2 -0
  66. package/dist/models/CommandStartedResponse.d.ts +6 -0
  67. package/dist/models/CommandStartedResponse.js +2 -0
  68. package/dist/models/CommandStatusResponse.d.ts +32 -2
  69. package/dist/models/CommandStatusResponse.js +10 -0
  70. package/dist/models/CommandStopResponse.d.ts +70 -0
  71. package/dist/models/CommandStopResponse.js +78 -0
  72. package/dist/models/CommandStreamFrame.d.ts +6 -0
  73. package/dist/models/CommandStreamFrame.js +2 -0
  74. package/dist/models/CreateSandboxRequest.d.ts +6 -0
  75. package/dist/models/CreateSandboxRequest.js +2 -0
  76. package/dist/models/DataRetentionPolicyResponse.d.ts +12 -0
  77. package/dist/models/DataRetentionPolicyResponse.js +4 -0
  78. package/dist/models/DataRetentionUpdateRequest.d.ts +7 -1
  79. package/dist/models/DataRetentionUpdateRequest.js +2 -0
  80. package/dist/models/ForkRequest.d.ts +6 -0
  81. package/dist/models/ForkRequest.js +2 -0
  82. package/dist/models/ProcessListResponse.d.ts +70 -0
  83. package/dist/models/ProcessListResponse.js +78 -0
  84. package/dist/models/Sandbox.d.ts +6 -0
  85. package/dist/models/Sandbox.js +2 -0
  86. package/dist/models/SandboxProcess.d.ts +74 -0
  87. package/dist/models/SandboxProcess.js +66 -0
  88. package/dist/models/TelemetryConfig.d.ts +57 -0
  89. package/dist/models/TelemetryConfig.js +67 -0
  90. package/dist/models/TelemetryConfigLastError.d.ts +44 -0
  91. package/dist/models/TelemetryConfigLastError.js +58 -0
  92. package/dist/models/TelemetryResponse.d.ts +45 -0
  93. package/dist/models/TelemetryResponse.js +59 -0
  94. package/dist/models/TelemetrySetRequest.d.ts +40 -0
  95. package/dist/models/TelemetrySetRequest.js +52 -0
  96. package/dist/models/TelemetrySetResponse.d.ts +52 -0
  97. package/dist/models/TelemetrySetResponse.js +64 -0
  98. package/dist/models/TelemetryTestResult.d.ts +44 -0
  99. package/dist/models/TelemetryTestResult.js +58 -0
  100. package/dist/models/index.d.ts +14 -0
  101. package/dist/models/index.js +14 -0
  102. package/docs/BoatApi.md +715 -11
  103. package/docs/Command200Response.md +2 -0
  104. package/docs/CommandAttachFrame.md +53 -0
  105. package/docs/CommandInfoResponse.md +36 -0
  106. package/docs/CommandListResponse.md +38 -0
  107. package/docs/CommandLogsResponse.md +50 -0
  108. package/docs/CommandRecord.md +59 -0
  109. package/docs/CommandResponse.md +2 -0
  110. package/docs/CommandStartedResponse.md +2 -0
  111. package/docs/CommandStatusResponse.md +10 -0
  112. package/docs/CommandStopResponse.md +42 -0
  113. package/docs/CommandStreamFrame.md +2 -0
  114. package/docs/CreateSandboxRequest.md +2 -0
  115. package/docs/DataRetentionPolicyResponse.md +4 -0
  116. package/docs/DataRetentionUpdateRequest.md +3 -1
  117. package/docs/ForkRequest.md +2 -0
  118. package/docs/ProcessListResponse.md +42 -0
  119. package/docs/Sandbox.md +2 -0
  120. package/docs/SandboxProcess.md +46 -0
  121. package/docs/TelemetryConfig.md +40 -0
  122. package/docs/TelemetryConfigLastError.md +37 -0
  123. package/docs/TelemetryResponse.md +36 -0
  124. package/docs/TelemetrySetRequest.md +34 -0
  125. package/docs/TelemetrySetResponse.md +38 -0
  126. package/docs/TelemetryTestResult.md +36 -0
  127. package/package.json +1 -1
  128. package/src/apis/BoatApi.ts +671 -4
  129. package/src/models/CommandAttachFrame.ts +179 -0
  130. package/src/models/CommandInfoResponse.ts +102 -0
  131. package/src/models/CommandListResponse.ts +111 -0
  132. package/src/models/CommandLogsResponse.ts +175 -0
  133. package/src/models/CommandRecord.ts +204 -0
  134. package/src/models/CommandResponse.ts +8 -0
  135. package/src/models/CommandStartedResponse.ts +8 -0
  136. package/src/models/CommandStatusResponse.ts +42 -2
  137. package/src/models/CommandStopResponse.ts +129 -0
  138. package/src/models/CommandStreamFrame.ts +8 -0
  139. package/src/models/CreateSandboxRequest.ts +8 -0
  140. package/src/models/DataRetentionPolicyResponse.ts +16 -0
  141. package/src/models/DataRetentionUpdateRequest.ts +9 -1
  142. package/src/models/ForkRequest.ts +8 -0
  143. package/src/models/ProcessListResponse.ts +129 -0
  144. package/src/models/Sandbox.ts +8 -0
  145. package/src/models/SandboxProcess.ts +123 -0
  146. package/src/models/TelemetryConfig.ts +110 -0
  147. package/src/models/TelemetryConfigLastError.ts +84 -0
  148. package/src/models/TelemetryResponse.ts +92 -0
  149. package/src/models/TelemetrySetRequest.ts +74 -0
  150. package/src/models/TelemetrySetResponse.ts +108 -0
  151. package/src/models/TelemetryTestResult.ts +84 -0
  152. package/src/models/index.ts +14 -0
@@ -0,0 +1,179 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Boat Public API v1
5
+ * Public JSON API for creating, operating, prompting, observing, and exposing sandboxes from backend services, CI jobs, hosted workers, and Boat automation products. The v1 reference intentionally documents the developer integration surface only. Dashboard billing actions are not part of v1.
6
+ *
7
+ * The version of the OpenAPI document: 1.0.0
8
+ *
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
+ import { mapValues } from '../runtime';
16
+ /**
17
+ * One line of `GET /sandboxes/{sandboxId}/commands/{processId}/stream` (application/x-ndjson).
18
+ * - `attached`: first line. `processId`, `stdoutOffset`, `stderrOffset` (where the output starts).
19
+ * - `stdout` / `stderr`: a chunk. `data`, and `nextOffset` for that stream.
20
+ * - `heartbeat`: sent after 15 s with no other line.
21
+ * - `exit`: last line when the command ended and all its output was sent. `status`, `exitCode`, `signal`, `stdoutOffset`, `stderrOffset`.
22
+ * - `reconnect`: last line after 10 minutes. Open the stream again with its `stdoutOffset` and `stderrOffset`. Nothing is lost or repeated.
23
+ * - `error`: last line on a failure. `error`, `message`, `stdoutOffset`, `stderrOffset`.
24
+ *
25
+ * @export
26
+ * @interface CommandAttachFrame
27
+ */
28
+ export interface CommandAttachFrame {
29
+ /**
30
+ *
31
+ * @type {CommandAttachFrameTypeEnum}
32
+ * @memberof CommandAttachFrame
33
+ */
34
+ type: CommandAttachFrameTypeEnum;
35
+ /**
36
+ *
37
+ * @type {number}
38
+ * @memberof CommandAttachFrame
39
+ */
40
+ processId?: number;
41
+ /**
42
+ *
43
+ * @type {string}
44
+ * @memberof CommandAttachFrame
45
+ */
46
+ data?: string;
47
+ /**
48
+ *
49
+ * @type {number}
50
+ * @memberof CommandAttachFrame
51
+ */
52
+ nextOffset?: number;
53
+ /**
54
+ *
55
+ * @type {number}
56
+ * @memberof CommandAttachFrame
57
+ */
58
+ stdoutOffset?: number;
59
+ /**
60
+ *
61
+ * @type {number}
62
+ * @memberof CommandAttachFrame
63
+ */
64
+ stderrOffset?: number;
65
+ /**
66
+ *
67
+ * @type {CommandAttachFrameStatusEnum}
68
+ * @memberof CommandAttachFrame
69
+ */
70
+ status?: CommandAttachFrameStatusEnum;
71
+ /**
72
+ *
73
+ * @type {number}
74
+ * @memberof CommandAttachFrame
75
+ */
76
+ exitCode?: number | null;
77
+ /**
78
+ *
79
+ * @type {string}
80
+ * @memberof CommandAttachFrame
81
+ */
82
+ signal?: string | null;
83
+ /**
84
+ *
85
+ * @type {string}
86
+ * @memberof CommandAttachFrame
87
+ */
88
+ error?: string;
89
+ /**
90
+ *
91
+ * @type {string}
92
+ * @memberof CommandAttachFrame
93
+ */
94
+ message?: string;
95
+ }
96
+
97
+
98
+ /**
99
+ * @export
100
+ */
101
+ export const CommandAttachFrameTypeEnum = {
102
+ Attached: 'attached',
103
+ Stdout: 'stdout',
104
+ Stderr: 'stderr',
105
+ Heartbeat: 'heartbeat',
106
+ Exit: 'exit',
107
+ Reconnect: 'reconnect',
108
+ Error: 'error'
109
+ } as const;
110
+ export type CommandAttachFrameTypeEnum = typeof CommandAttachFrameTypeEnum[keyof typeof CommandAttachFrameTypeEnum];
111
+
112
+ /**
113
+ * @export
114
+ */
115
+ export const CommandAttachFrameStatusEnum = {
116
+ Running: 'running',
117
+ Exited: 'exited',
118
+ Lost: 'lost'
119
+ } as const;
120
+ export type CommandAttachFrameStatusEnum = typeof CommandAttachFrameStatusEnum[keyof typeof CommandAttachFrameStatusEnum];
121
+
122
+
123
+ /**
124
+ * Check if a given object implements the CommandAttachFrame interface.
125
+ */
126
+ export function instanceOfCommandAttachFrame(value: object): value is CommandAttachFrame {
127
+ if (!('type' in value) || value['type'] === undefined) return false;
128
+ return true;
129
+ }
130
+
131
+ export function CommandAttachFrameFromJSON(json: any): CommandAttachFrame {
132
+ return CommandAttachFrameFromJSONTyped(json, false);
133
+ }
134
+
135
+ export function CommandAttachFrameFromJSONTyped(json: any, ignoreDiscriminator: boolean): CommandAttachFrame {
136
+ if (json == null) {
137
+ return json;
138
+ }
139
+ return {
140
+
141
+ 'type': json['type'],
142
+ 'processId': json['processId'] == null ? undefined : json['processId'],
143
+ 'data': json['data'] == null ? undefined : json['data'],
144
+ 'nextOffset': json['nextOffset'] == null ? undefined : json['nextOffset'],
145
+ 'stdoutOffset': json['stdoutOffset'] == null ? undefined : json['stdoutOffset'],
146
+ 'stderrOffset': json['stderrOffset'] == null ? undefined : json['stderrOffset'],
147
+ 'status': json['status'] == null ? undefined : json['status'],
148
+ 'exitCode': json['exitCode'] == null ? undefined : json['exitCode'],
149
+ 'signal': json['signal'] == null ? undefined : json['signal'],
150
+ 'error': json['error'] == null ? undefined : json['error'],
151
+ 'message': json['message'] == null ? undefined : json['message'],
152
+ };
153
+ }
154
+
155
+ export function CommandAttachFrameToJSON(json: any): CommandAttachFrame {
156
+ return CommandAttachFrameToJSONTyped(json, false);
157
+ }
158
+
159
+ export function CommandAttachFrameToJSONTyped(value?: CommandAttachFrame | null, ignoreDiscriminator: boolean = false): any {
160
+ if (value == null) {
161
+ return value;
162
+ }
163
+
164
+ return {
165
+
166
+ 'type': value['type'],
167
+ 'processId': value['processId'],
168
+ 'data': value['data'],
169
+ 'nextOffset': value['nextOffset'],
170
+ 'stdoutOffset': value['stdoutOffset'],
171
+ 'stderrOffset': value['stderrOffset'],
172
+ 'status': value['status'],
173
+ 'exitCode': value['exitCode'],
174
+ 'signal': value['signal'],
175
+ 'error': value['error'],
176
+ 'message': value['message'],
177
+ };
178
+ }
179
+
@@ -0,0 +1,102 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Boat Public API v1
5
+ * Public JSON API for creating, operating, prompting, observing, and exposing sandboxes from backend services, CI jobs, hosted workers, and Boat automation products. The v1 reference intentionally documents the developer integration surface only. Dashboard billing actions are not part of v1.
6
+ *
7
+ * The version of the OpenAPI document: 1.0.0
8
+ *
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
+ import { mapValues } from '../runtime';
16
+ import type { CommandRecord } from './CommandRecord';
17
+ import {
18
+ CommandRecordFromJSON,
19
+ CommandRecordFromJSONTyped,
20
+ CommandRecordToJSON,
21
+ CommandRecordToJSONTyped,
22
+ } from './CommandRecord';
23
+
24
+ /**
25
+ *
26
+ * @export
27
+ * @interface CommandInfoResponse
28
+ */
29
+ export interface CommandInfoResponse {
30
+ /**
31
+ *
32
+ * @type {boolean}
33
+ * @memberof CommandInfoResponse
34
+ */
35
+ ok: boolean;
36
+ /**
37
+ *
38
+ * @type {CommandInfoResponseTypeEnum}
39
+ * @memberof CommandInfoResponse
40
+ */
41
+ type: CommandInfoResponseTypeEnum;
42
+ /**
43
+ *
44
+ * @type {CommandRecord}
45
+ * @memberof CommandInfoResponse
46
+ */
47
+ command: CommandRecord;
48
+ }
49
+
50
+
51
+ /**
52
+ * @export
53
+ */
54
+ export const CommandInfoResponseTypeEnum = {
55
+ CommandInfo: 'command.info'
56
+ } as const;
57
+ export type CommandInfoResponseTypeEnum = typeof CommandInfoResponseTypeEnum[keyof typeof CommandInfoResponseTypeEnum];
58
+
59
+
60
+ /**
61
+ * Check if a given object implements the CommandInfoResponse interface.
62
+ */
63
+ export function instanceOfCommandInfoResponse(value: object): value is CommandInfoResponse {
64
+ if (!('ok' in value) || value['ok'] === undefined) return false;
65
+ if (!('type' in value) || value['type'] === undefined) return false;
66
+ if (!('command' in value) || value['command'] === undefined) return false;
67
+ return true;
68
+ }
69
+
70
+ export function CommandInfoResponseFromJSON(json: any): CommandInfoResponse {
71
+ return CommandInfoResponseFromJSONTyped(json, false);
72
+ }
73
+
74
+ export function CommandInfoResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): CommandInfoResponse {
75
+ if (json == null) {
76
+ return json;
77
+ }
78
+ return {
79
+
80
+ 'ok': json['ok'],
81
+ 'type': json['type'],
82
+ 'command': CommandRecordFromJSON(json['command']),
83
+ };
84
+ }
85
+
86
+ export function CommandInfoResponseToJSON(json: any): CommandInfoResponse {
87
+ return CommandInfoResponseToJSONTyped(json, false);
88
+ }
89
+
90
+ export function CommandInfoResponseToJSONTyped(value?: CommandInfoResponse | null, ignoreDiscriminator: boolean = false): any {
91
+ if (value == null) {
92
+ return value;
93
+ }
94
+
95
+ return {
96
+
97
+ 'ok': value['ok'],
98
+ 'type': value['type'],
99
+ 'command': CommandRecordToJSON(value['command']),
100
+ };
101
+ }
102
+
@@ -0,0 +1,111 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Boat Public API v1
5
+ * Public JSON API for creating, operating, prompting, observing, and exposing sandboxes from backend services, CI jobs, hosted workers, and Boat automation products. The v1 reference intentionally documents the developer integration surface only. Dashboard billing actions are not part of v1.
6
+ *
7
+ * The version of the OpenAPI document: 1.0.0
8
+ *
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
+ import { mapValues } from '../runtime';
16
+ import type { CommandRecord } from './CommandRecord';
17
+ import {
18
+ CommandRecordFromJSON,
19
+ CommandRecordFromJSONTyped,
20
+ CommandRecordToJSON,
21
+ CommandRecordToJSONTyped,
22
+ } from './CommandRecord';
23
+
24
+ /**
25
+ *
26
+ * @export
27
+ * @interface CommandListResponse
28
+ */
29
+ export interface CommandListResponse {
30
+ /**
31
+ *
32
+ * @type {boolean}
33
+ * @memberof CommandListResponse
34
+ */
35
+ ok: boolean;
36
+ /**
37
+ *
38
+ * @type {CommandListResponseTypeEnum}
39
+ * @memberof CommandListResponse
40
+ */
41
+ type: CommandListResponseTypeEnum;
42
+ /**
43
+ * Newest first.
44
+ * @type {Array<CommandRecord>}
45
+ * @memberof CommandListResponse
46
+ */
47
+ commands: Array<CommandRecord>;
48
+ /**
49
+ * Pass as `cursor` to get the next page. Null on the last page.
50
+ * @type {string}
51
+ * @memberof CommandListResponse
52
+ */
53
+ nextCursor: string | null;
54
+ }
55
+
56
+
57
+ /**
58
+ * @export
59
+ */
60
+ export const CommandListResponseTypeEnum = {
61
+ CommandList: 'command.list'
62
+ } as const;
63
+ export type CommandListResponseTypeEnum = typeof CommandListResponseTypeEnum[keyof typeof CommandListResponseTypeEnum];
64
+
65
+
66
+ /**
67
+ * Check if a given object implements the CommandListResponse interface.
68
+ */
69
+ export function instanceOfCommandListResponse(value: object): value is CommandListResponse {
70
+ if (!('ok' in value) || value['ok'] === undefined) return false;
71
+ if (!('type' in value) || value['type'] === undefined) return false;
72
+ if (!('commands' in value) || value['commands'] === undefined) return false;
73
+ if (!('nextCursor' in value) || value['nextCursor'] === undefined) return false;
74
+ return true;
75
+ }
76
+
77
+ export function CommandListResponseFromJSON(json: any): CommandListResponse {
78
+ return CommandListResponseFromJSONTyped(json, false);
79
+ }
80
+
81
+ export function CommandListResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): CommandListResponse {
82
+ if (json == null) {
83
+ return json;
84
+ }
85
+ return {
86
+
87
+ 'ok': json['ok'],
88
+ 'type': json['type'],
89
+ 'commands': ((json['commands'] as Array<any>).map(CommandRecordFromJSON)),
90
+ 'nextCursor': json['nextCursor'],
91
+ };
92
+ }
93
+
94
+ export function CommandListResponseToJSON(json: any): CommandListResponse {
95
+ return CommandListResponseToJSONTyped(json, false);
96
+ }
97
+
98
+ export function CommandListResponseToJSONTyped(value?: CommandListResponse | null, ignoreDiscriminator: boolean = false): any {
99
+ if (value == null) {
100
+ return value;
101
+ }
102
+
103
+ return {
104
+
105
+ 'ok': value['ok'],
106
+ 'type': value['type'],
107
+ 'commands': ((value['commands'] as Array<any>).map(CommandRecordToJSON)),
108
+ 'nextCursor': value['nextCursor'],
109
+ };
110
+ }
111
+
@@ -0,0 +1,175 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Boat Public API v1
5
+ * Public JSON API for creating, operating, prompting, observing, and exposing sandboxes from backend services, CI jobs, hosted workers, and Boat automation products. The v1 reference intentionally documents the developer integration surface only. Dashboard billing actions are not part of v1.
6
+ *
7
+ * The version of the OpenAPI document: 1.0.0
8
+ *
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
+ import { mapValues } from '../runtime';
16
+ /**
17
+ *
18
+ * @export
19
+ * @interface CommandLogsResponse
20
+ */
21
+ export interface CommandLogsResponse {
22
+ /**
23
+ *
24
+ * @type {boolean}
25
+ * @memberof CommandLogsResponse
26
+ */
27
+ ok: boolean;
28
+ /**
29
+ *
30
+ * @type {CommandLogsResponseTypeEnum}
31
+ * @memberof CommandLogsResponse
32
+ */
33
+ type: CommandLogsResponseTypeEnum;
34
+ /**
35
+ *
36
+ * @type {string}
37
+ * @memberof CommandLogsResponse
38
+ */
39
+ commandId: string;
40
+ /**
41
+ *
42
+ * @type {CommandLogsResponseStreamEnum}
43
+ * @memberof CommandLogsResponse
44
+ */
45
+ stream: CommandLogsResponseStreamEnum;
46
+ /**
47
+ * Byte position of the first byte in `data`. Greater than the requested offset only when output was not kept (see outputTruncated).
48
+ * @type {number}
49
+ * @memberof CommandLogsResponse
50
+ */
51
+ offset: number;
52
+ /**
53
+ * Pass as `offset` to read on.
54
+ * @type {number}
55
+ * @memberof CommandLogsResponse
56
+ */
57
+ nextOffset: number;
58
+ /**
59
+ * Bytes the stream has so far.
60
+ * @type {number}
61
+ * @memberof CommandLogsResponse
62
+ */
63
+ size: number;
64
+ /**
65
+ *
66
+ * @type {CommandLogsResponseEncodingEnum}
67
+ * @memberof CommandLogsResponse
68
+ */
69
+ encoding: CommandLogsResponseEncodingEnum;
70
+ /**
71
+ *
72
+ * @type {string}
73
+ * @memberof CommandLogsResponse
74
+ */
75
+ data: string;
76
+ /**
77
+ * True when the command ended and this read reached the end of the stream.
78
+ * @type {boolean}
79
+ * @memberof CommandLogsResponse
80
+ */
81
+ done: boolean;
82
+ }
83
+
84
+
85
+ /**
86
+ * @export
87
+ */
88
+ export const CommandLogsResponseTypeEnum = {
89
+ CommandLogs: 'command.logs'
90
+ } as const;
91
+ export type CommandLogsResponseTypeEnum = typeof CommandLogsResponseTypeEnum[keyof typeof CommandLogsResponseTypeEnum];
92
+
93
+ /**
94
+ * @export
95
+ */
96
+ export const CommandLogsResponseStreamEnum = {
97
+ Stdout: 'stdout',
98
+ Stderr: 'stderr'
99
+ } as const;
100
+ export type CommandLogsResponseStreamEnum = typeof CommandLogsResponseStreamEnum[keyof typeof CommandLogsResponseStreamEnum];
101
+
102
+ /**
103
+ * @export
104
+ */
105
+ export const CommandLogsResponseEncodingEnum = {
106
+ Utf8: 'utf8',
107
+ Base64: 'base64'
108
+ } as const;
109
+ export type CommandLogsResponseEncodingEnum = typeof CommandLogsResponseEncodingEnum[keyof typeof CommandLogsResponseEncodingEnum];
110
+
111
+
112
+ /**
113
+ * Check if a given object implements the CommandLogsResponse interface.
114
+ */
115
+ export function instanceOfCommandLogsResponse(value: object): value is CommandLogsResponse {
116
+ if (!('ok' in value) || value['ok'] === undefined) return false;
117
+ if (!('type' in value) || value['type'] === undefined) return false;
118
+ if (!('commandId' in value) || value['commandId'] === undefined) return false;
119
+ if (!('stream' in value) || value['stream'] === undefined) return false;
120
+ if (!('offset' in value) || value['offset'] === undefined) return false;
121
+ if (!('nextOffset' in value) || value['nextOffset'] === undefined) return false;
122
+ if (!('size' in value) || value['size'] === undefined) return false;
123
+ if (!('encoding' in value) || value['encoding'] === undefined) return false;
124
+ if (!('data' in value) || value['data'] === undefined) return false;
125
+ if (!('done' in value) || value['done'] === undefined) return false;
126
+ return true;
127
+ }
128
+
129
+ export function CommandLogsResponseFromJSON(json: any): CommandLogsResponse {
130
+ return CommandLogsResponseFromJSONTyped(json, false);
131
+ }
132
+
133
+ export function CommandLogsResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): CommandLogsResponse {
134
+ if (json == null) {
135
+ return json;
136
+ }
137
+ return {
138
+
139
+ 'ok': json['ok'],
140
+ 'type': json['type'],
141
+ 'commandId': json['commandId'],
142
+ 'stream': json['stream'],
143
+ 'offset': json['offset'],
144
+ 'nextOffset': json['nextOffset'],
145
+ 'size': json['size'],
146
+ 'encoding': json['encoding'],
147
+ 'data': json['data'],
148
+ 'done': json['done'],
149
+ };
150
+ }
151
+
152
+ export function CommandLogsResponseToJSON(json: any): CommandLogsResponse {
153
+ return CommandLogsResponseToJSONTyped(json, false);
154
+ }
155
+
156
+ export function CommandLogsResponseToJSONTyped(value?: CommandLogsResponse | null, ignoreDiscriminator: boolean = false): any {
157
+ if (value == null) {
158
+ return value;
159
+ }
160
+
161
+ return {
162
+
163
+ 'ok': value['ok'],
164
+ 'type': value['type'],
165
+ 'commandId': value['commandId'],
166
+ 'stream': value['stream'],
167
+ 'offset': value['offset'],
168
+ 'nextOffset': value['nextOffset'],
169
+ 'size': value['size'],
170
+ 'encoding': value['encoding'],
171
+ 'data': value['data'],
172
+ 'done': value['done'],
173
+ };
174
+ }
175
+