sandbox0 0.10.4 → 0.10.6

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 (182) hide show
  1. package/README.md +134 -0
  2. package/dist/apispec/src/apis/FilesApi.d.ts +14 -10
  3. package/dist/apispec/src/apis/FilesApi.d.ts.map +1 -1
  4. package/dist/apispec/src/apis/FilesApi.js +14 -10
  5. package/dist/apispec/src/apis/SandboxRootfsApi.d.ts +96 -5
  6. package/dist/apispec/src/apis/SandboxRootfsApi.d.ts.map +1 -1
  7. package/dist/apispec/src/apis/SandboxRootfsApi.js +291 -5
  8. package/dist/apispec/src/apis/SandboxesApi.d.ts +345 -6
  9. package/dist/apispec/src/apis/SandboxesApi.d.ts.map +1 -1
  10. package/dist/apispec/src/apis/SandboxesApi.js +1017 -7
  11. package/dist/apispec/src/apis/SessionsApi.d.ts +51 -1
  12. package/dist/apispec/src/apis/SessionsApi.d.ts.map +1 -1
  13. package/dist/apispec/src/apis/SessionsApi.js +159 -1
  14. package/dist/apispec/src/models/CaptureSandboxRootFSSnapshotRequest.d.ts +51 -0
  15. package/dist/apispec/src/models/CaptureSandboxRootFSSnapshotRequest.d.ts.map +1 -0
  16. package/dist/apispec/src/models/CaptureSandboxRootFSSnapshotRequest.js +49 -0
  17. package/dist/apispec/src/models/ConditionalExecutionSessionRequest.d.ts +46 -0
  18. package/dist/apispec/src/models/ConditionalExecutionSessionRequest.d.ts.map +1 -0
  19. package/dist/apispec/src/models/ConditionalExecutionSessionRequest.js +52 -0
  20. package/dist/apispec/src/models/ForkSandboxConfig.d.ts +6 -0
  21. package/dist/apispec/src/models/ForkSandboxConfig.d.ts.map +1 -1
  22. package/dist/apispec/src/models/ForkSandboxConfig.js +2 -0
  23. package/dist/apispec/src/models/ForkSandboxRequest.d.ts +6 -0
  24. package/dist/apispec/src/models/ForkSandboxRequest.d.ts.map +1 -1
  25. package/dist/apispec/src/models/ForkSandboxRequest.js +2 -0
  26. package/dist/apispec/src/models/ManagedFileReadResponse.d.ts +64 -0
  27. package/dist/apispec/src/models/ManagedFileReadResponse.d.ts.map +1 -0
  28. package/dist/apispec/src/models/ManagedFileReadResponse.js +65 -0
  29. package/dist/apispec/src/models/ManagedFileWriteRequest.d.ts +39 -0
  30. package/dist/apispec/src/models/ManagedFileWriteRequest.d.ts.map +1 -0
  31. package/dist/apispec/src/models/ManagedFileWriteRequest.js +47 -0
  32. package/dist/apispec/src/models/ManagedFilesState.d.ts +58 -0
  33. package/dist/apispec/src/models/ManagedFilesState.d.ts.map +1 -0
  34. package/dist/apispec/src/models/ManagedFilesState.js +61 -0
  35. package/dist/apispec/src/models/PauseSandboxResponse.d.ts +12 -0
  36. package/dist/apispec/src/models/PauseSandboxResponse.d.ts.map +1 -1
  37. package/dist/apispec/src/models/PauseSandboxResponse.js +4 -0
  38. package/dist/apispec/src/models/QuotaDimension.d.ts +5 -1
  39. package/dist/apispec/src/models/QuotaDimension.d.ts.map +1 -1
  40. package/dist/apispec/src/models/QuotaDimension.js +5 -1
  41. package/dist/apispec/src/models/ResourceQuota.d.ts +1 -1
  42. package/dist/apispec/src/models/ResumeSandboxResponse.d.ts +25 -1
  43. package/dist/apispec/src/models/ResumeSandboxResponse.d.ts.map +1 -1
  44. package/dist/apispec/src/models/ResumeSandboxResponse.js +8 -0
  45. package/dist/apispec/src/models/SandboxExecutionStateRequest.d.ts +14 -2
  46. package/dist/apispec/src/models/SandboxExecutionStateRequest.d.ts.map +1 -1
  47. package/dist/apispec/src/models/SandboxExecutionStateRequest.js +4 -0
  48. package/dist/apispec/src/models/SandboxHealth.d.ts +99 -0
  49. package/dist/apispec/src/models/SandboxHealth.d.ts.map +1 -0
  50. package/dist/apispec/src/models/SandboxHealth.js +90 -0
  51. package/dist/apispec/src/models/SandboxHealthObservation.d.ts +111 -0
  52. package/dist/apispec/src/models/SandboxHealthObservation.d.ts.map +1 -0
  53. package/dist/apispec/src/models/SandboxHealthObservation.js +112 -0
  54. package/dist/apispec/src/models/SandboxMemoryOperation.d.ts +115 -0
  55. package/dist/apispec/src/models/SandboxMemoryOperation.d.ts.map +1 -0
  56. package/dist/apispec/src/models/SandboxMemoryOperation.js +100 -0
  57. package/dist/apispec/src/models/SandboxMemoryRestoration.d.ts +64 -0
  58. package/dist/apispec/src/models/SandboxMemoryRestoration.d.ts.map +1 -0
  59. package/dist/apispec/src/models/SandboxMemoryRestoration.js +64 -0
  60. package/dist/apispec/src/models/SandboxMemoryRestorationStep.d.ts +63 -0
  61. package/dist/apispec/src/models/SandboxMemoryRestorationStep.d.ts.map +1 -0
  62. package/dist/apispec/src/models/SandboxMemoryRestorationStep.js +63 -0
  63. package/dist/apispec/src/models/SandboxPauseRequest.d.ts +39 -0
  64. package/dist/apispec/src/models/SandboxPauseRequest.d.ts.map +1 -0
  65. package/dist/apispec/src/models/SandboxPauseRequest.js +43 -0
  66. package/dist/apispec/src/models/SandboxRestartFinalCapture.d.ts +79 -0
  67. package/dist/apispec/src/models/SandboxRestartFinalCapture.d.ts.map +1 -0
  68. package/dist/apispec/src/models/SandboxRestartFinalCapture.js +70 -0
  69. package/dist/apispec/src/models/SandboxRestartFinalCaptureAcknowledgement.d.ts +39 -0
  70. package/dist/apispec/src/models/SandboxRestartFinalCaptureAcknowledgement.d.ts.map +1 -0
  71. package/dist/apispec/src/models/SandboxRestartFinalCaptureAcknowledgement.js +47 -0
  72. package/dist/apispec/src/models/SandboxRestartFinalCaptureFile.d.ts +69 -0
  73. package/dist/apispec/src/models/SandboxRestartFinalCaptureFile.d.ts.map +1 -0
  74. package/dist/apispec/src/models/SandboxRestartFinalCaptureFile.js +67 -0
  75. package/dist/apispec/src/models/SandboxRestartOperation.d.ts +115 -0
  76. package/dist/apispec/src/models/SandboxRestartOperation.d.ts.map +1 -0
  77. package/dist/apispec/src/models/SandboxRestartOperation.js +95 -0
  78. package/dist/apispec/src/models/SandboxRestartRequest.d.ts +33 -0
  79. package/dist/apispec/src/models/SandboxRestartRequest.d.ts.map +1 -0
  80. package/dist/apispec/src/models/SandboxRestartRequest.js +43 -0
  81. package/dist/apispec/src/models/SandboxRestartRetryObservation.d.ts +83 -0
  82. package/dist/apispec/src/models/SandboxRestartRetryObservation.d.ts.map +1 -0
  83. package/dist/apispec/src/models/SandboxRestartRetryObservation.js +75 -0
  84. package/dist/apispec/src/models/SandboxRootFSForkLaunch.d.ts +123 -0
  85. package/dist/apispec/src/models/SandboxRootFSForkLaunch.d.ts.map +1 -0
  86. package/dist/apispec/src/models/SandboxRootFSForkLaunch.js +104 -0
  87. package/dist/apispec/src/models/SandboxRootFSForkLaunchRequest.d.ts +51 -0
  88. package/dist/apispec/src/models/SandboxRootFSForkLaunchRequest.d.ts.map +1 -0
  89. package/dist/apispec/src/models/SandboxRootFSForkLaunchRequest.js +55 -0
  90. package/dist/apispec/src/models/SandboxRootFSForkObservation.d.ts +129 -0
  91. package/dist/apispec/src/models/SandboxRootFSForkObservation.d.ts.map +1 -0
  92. package/dist/apispec/src/models/SandboxRootFSForkObservation.js +107 -0
  93. package/dist/apispec/src/models/SandboxRootFSIdentity.d.ts +138 -0
  94. package/dist/apispec/src/models/SandboxRootFSIdentity.d.ts.map +1 -0
  95. package/dist/apispec/src/models/SandboxRootFSIdentity.js +111 -0
  96. package/dist/apispec/src/models/SandboxRootFSSnapshot.d.ts +6 -0
  97. package/dist/apispec/src/models/SandboxRootFSSnapshot.d.ts.map +1 -1
  98. package/dist/apispec/src/models/SandboxRootFSSnapshot.js +2 -0
  99. package/dist/apispec/src/models/SandboxRuntimeHealth.d.ts +40 -0
  100. package/dist/apispec/src/models/SandboxRuntimeHealth.d.ts.map +1 -0
  101. package/dist/apispec/src/models/SandboxRuntimeHealth.js +48 -0
  102. package/dist/apispec/src/models/SandboxSnapshotRestoreOperation.d.ts +139 -0
  103. package/dist/apispec/src/models/SandboxSnapshotRestoreOperation.d.ts.map +1 -0
  104. package/dist/apispec/src/models/SandboxSnapshotRestoreOperation.js +109 -0
  105. package/dist/apispec/src/models/SandboxSnapshotRestoreRequest.d.ts +51 -0
  106. package/dist/apispec/src/models/SandboxSnapshotRestoreRequest.d.ts.map +1 -0
  107. package/dist/apispec/src/models/SandboxSnapshotRestoreRequest.js +55 -0
  108. package/dist/apispec/src/models/SandboxStorageHealth.d.ts +46 -0
  109. package/dist/apispec/src/models/SandboxStorageHealth.d.ts.map +1 -0
  110. package/dist/apispec/src/models/SandboxStorageHealth.js +52 -0
  111. package/dist/apispec/src/models/SuccessManagedFileReadResponse.d.ts +40 -0
  112. package/dist/apispec/src/models/SuccessManagedFileReadResponse.d.ts.map +1 -0
  113. package/dist/apispec/src/models/SuccessManagedFileReadResponse.js +48 -0
  114. package/dist/apispec/src/models/SuccessManagedFilesStateResponse.d.ts +40 -0
  115. package/dist/apispec/src/models/SuccessManagedFilesStateResponse.d.ts.map +1 -0
  116. package/dist/apispec/src/models/SuccessManagedFilesStateResponse.js +48 -0
  117. package/dist/apispec/src/models/SuccessSandboxHealthResponse.d.ts +40 -0
  118. package/dist/apispec/src/models/SuccessSandboxHealthResponse.d.ts.map +1 -0
  119. package/dist/apispec/src/models/SuccessSandboxHealthResponse.js +48 -0
  120. package/dist/apispec/src/models/SuccessSandboxMemoryOperationResponse.d.ts +40 -0
  121. package/dist/apispec/src/models/SuccessSandboxMemoryOperationResponse.d.ts.map +1 -0
  122. package/dist/apispec/src/models/SuccessSandboxMemoryOperationResponse.js +48 -0
  123. package/dist/apispec/src/models/SuccessSandboxMemoryRestorationResponse.d.ts +40 -0
  124. package/dist/apispec/src/models/SuccessSandboxMemoryRestorationResponse.d.ts.map +1 -0
  125. package/dist/apispec/src/models/SuccessSandboxMemoryRestorationResponse.js +48 -0
  126. package/dist/apispec/src/models/SuccessSandboxRestartFinalCaptureFileResponse.d.ts +40 -0
  127. package/dist/apispec/src/models/SuccessSandboxRestartFinalCaptureFileResponse.d.ts.map +1 -0
  128. package/dist/apispec/src/models/SuccessSandboxRestartFinalCaptureFileResponse.js +48 -0
  129. package/dist/apispec/src/models/SuccessSandboxRestartFinalCaptureResponse.d.ts +40 -0
  130. package/dist/apispec/src/models/SuccessSandboxRestartFinalCaptureResponse.d.ts.map +1 -0
  131. package/dist/apispec/src/models/SuccessSandboxRestartFinalCaptureResponse.js +48 -0
  132. package/dist/apispec/src/models/SuccessSandboxRestartOperationResponse.d.ts +40 -0
  133. package/dist/apispec/src/models/SuccessSandboxRestartOperationResponse.d.ts.map +1 -0
  134. package/dist/apispec/src/models/SuccessSandboxRestartOperationResponse.js +48 -0
  135. package/dist/apispec/src/models/SuccessSandboxRootFSForkLaunchResponse.d.ts +40 -0
  136. package/dist/apispec/src/models/SuccessSandboxRootFSForkLaunchResponse.d.ts.map +1 -0
  137. package/dist/apispec/src/models/SuccessSandboxRootFSForkLaunchResponse.js +48 -0
  138. package/dist/apispec/src/models/SuccessSandboxRootFSForkObservationResponse.d.ts +40 -0
  139. package/dist/apispec/src/models/SuccessSandboxRootFSForkObservationResponse.d.ts.map +1 -0
  140. package/dist/apispec/src/models/SuccessSandboxRootFSForkObservationResponse.js +48 -0
  141. package/dist/apispec/src/models/SuccessSandboxRootFSIdentityResponse.d.ts +40 -0
  142. package/dist/apispec/src/models/SuccessSandboxRootFSIdentityResponse.d.ts.map +1 -0
  143. package/dist/apispec/src/models/SuccessSandboxRootFSIdentityResponse.js +48 -0
  144. package/dist/apispec/src/models/SuccessSandboxSnapshotRestoreOperationResponse.d.ts +40 -0
  145. package/dist/apispec/src/models/SuccessSandboxSnapshotRestoreOperationResponse.d.ts.map +1 -0
  146. package/dist/apispec/src/models/SuccessSandboxSnapshotRestoreOperationResponse.js +48 -0
  147. package/dist/apispec/src/models/index.d.ts +37 -0
  148. package/dist/apispec/src/models/index.d.ts.map +1 -1
  149. package/dist/apispec/src/models/index.js +37 -0
  150. package/dist/fork_launch.d.ts +15 -0
  151. package/dist/fork_launch.d.ts.map +1 -0
  152. package/dist/fork_launch.js +38 -0
  153. package/dist/health.d.ts +4 -0
  154. package/dist/health.d.ts.map +1 -0
  155. package/dist/health.js +46 -0
  156. package/dist/index.d.ts +8 -0
  157. package/dist/index.d.ts.map +1 -1
  158. package/dist/index.js +1 -0
  159. package/dist/memory_operation.d.ts +12 -0
  160. package/dist/memory_operation.d.ts.map +1 -0
  161. package/dist/memory_operation.js +44 -0
  162. package/dist/memory_restoration.d.ts +5 -0
  163. package/dist/memory_restoration.d.ts.map +1 -0
  164. package/dist/memory_restoration.js +29 -0
  165. package/dist/models.d.ts +2 -0
  166. package/dist/models.d.ts.map +1 -1
  167. package/dist/resources/sandboxes.d.ts +73 -1
  168. package/dist/resources/sandboxes.d.ts.map +1 -1
  169. package/dist/resources/sandboxes.js +336 -3
  170. package/dist/restart_final_capture.d.ts +10 -0
  171. package/dist/restart_final_capture.d.ts.map +1 -0
  172. package/dist/restart_final_capture.js +52 -0
  173. package/dist/sandbox_managed_files.d.ts +34 -0
  174. package/dist/sandbox_managed_files.d.ts.map +1 -0
  175. package/dist/sandbox_managed_files.js +96 -0
  176. package/dist/sandbox_sessions.d.ts +5 -0
  177. package/dist/sandbox_sessions.d.ts.map +1 -1
  178. package/dist/sandbox_sessions.js +103 -1
  179. package/dist/ws_client.d.ts +8 -0
  180. package/dist/ws_client.d.ts.map +1 -1
  181. package/dist/ws_client.js +20 -2
  182. package/package.json +2 -2
@@ -12,11 +12,99 @@
12
12
  * Do not edit the class manually.
13
13
  */
14
14
  import * as runtime from '../runtime.js';
15
- import { ClaimRequestToJSON, SandboxExecutionStateRequestToJSON, SandboxNetworkPolicyToJSON, SandboxPreviewCreateRequestToJSON, SandboxPreviewRenewRequestToJSON, SandboxRefreshRequestToJSON, SandboxServicesUpdateRequestToJSON, SandboxUpdateRequestToJSON, SuccessClaimResponseFromJSON, SuccessMessageResponseFromJSON, SuccessPauseSandboxResponseFromJSON, SuccessRefreshResponseFromJSON, SuccessResumeSandboxResponseFromJSON, SuccessSandboxListResponseFromJSON, SuccessSandboxNetworkPolicyResponseFromJSON, SuccessSandboxPreviewResponseFromJSON, SuccessSandboxResponseFromJSON, SuccessSandboxServicesResponseFromJSON, SuccessSandboxStatusResponseFromJSON, } from '../models/index.js';
15
+ import { ClaimRequestToJSON, ManagedFileWriteRequestToJSON, SandboxExecutionStateRequestToJSON, SandboxNetworkPolicyToJSON, SandboxPauseRequestToJSON, SandboxPreviewCreateRequestToJSON, SandboxPreviewRenewRequestToJSON, SandboxRefreshRequestToJSON, SandboxRestartFinalCaptureAcknowledgementToJSON, SandboxRestartRequestToJSON, SandboxServicesUpdateRequestToJSON, SandboxSnapshotRestoreRequestToJSON, SandboxUpdateRequestToJSON, SuccessClaimResponseFromJSON, SuccessManagedFileReadResponseFromJSON, SuccessManagedFilesStateResponseFromJSON, SuccessMessageResponseFromJSON, SuccessPauseSandboxResponseFromJSON, SuccessRefreshResponseFromJSON, SuccessResumeSandboxResponseFromJSON, SuccessSandboxHealthResponseFromJSON, SuccessSandboxListResponseFromJSON, SuccessSandboxMemoryOperationResponseFromJSON, SuccessSandboxMemoryRestorationResponseFromJSON, SuccessSandboxNetworkPolicyResponseFromJSON, SuccessSandboxPreviewResponseFromJSON, SuccessSandboxResponseFromJSON, SuccessSandboxRestartFinalCaptureFileResponseFromJSON, SuccessSandboxRestartFinalCaptureResponseFromJSON, SuccessSandboxRestartOperationResponseFromJSON, SuccessSandboxServicesResponseFromJSON, SuccessSandboxSnapshotRestoreOperationResponseFromJSON, SuccessSandboxStatusResponseFromJSON, } from '../models/index.js';
16
16
  /**
17
17
  *
18
18
  */
19
19
  export class SandboxesApi extends runtime.BaseAPI {
20
+ /**
21
+ * Requires sandbox:write. Submit only after final credential or authenticated logout custody is durably committed by the owner. This permits irreversible cleanup of the old projection. Retry the same capture_id and receipt_id after a lost reply; another receipt conflicts. This schedules retirement, not immediate replacement success.
22
+ * Commit the owner receipt for final restart credentials
23
+ */
24
+ async acknowledgeSandboxRestartFinalCaptureRaw(requestParameters, initOverrides) {
25
+ if (requestParameters['id'] == null) {
26
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling acknowledgeSandboxRestartFinalCapture().');
27
+ }
28
+ if (requestParameters['operationId'] == null) {
29
+ throw new runtime.RequiredError('operationId', 'Required parameter "operationId" was null or undefined when calling acknowledgeSandboxRestartFinalCapture().');
30
+ }
31
+ if (requestParameters['sandboxRestartFinalCaptureAcknowledgement'] == null) {
32
+ throw new runtime.RequiredError('sandboxRestartFinalCaptureAcknowledgement', 'Required parameter "sandboxRestartFinalCaptureAcknowledgement" was null or undefined when calling acknowledgeSandboxRestartFinalCapture().');
33
+ }
34
+ const queryParameters = {};
35
+ const headerParameters = {};
36
+ headerParameters['Content-Type'] = 'application/json';
37
+ if (this.configuration && this.configuration.accessToken) {
38
+ const token = this.configuration.accessToken;
39
+ const tokenString = await token("bearerAuth", []);
40
+ if (tokenString) {
41
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
42
+ }
43
+ }
44
+ let urlPath = `/api/v1/sandboxes/{id}/restart-operations/{operation_id}/final-capture/acknowledgement`;
45
+ urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id'])));
46
+ urlPath = urlPath.replace(`{${"operation_id"}}`, encodeURIComponent(String(requestParameters['operationId'])));
47
+ const response = await this.request({
48
+ path: urlPath,
49
+ method: 'POST',
50
+ headers: headerParameters,
51
+ query: queryParameters,
52
+ body: SandboxRestartFinalCaptureAcknowledgementToJSON(requestParameters['sandboxRestartFinalCaptureAcknowledgement']),
53
+ }, initOverrides);
54
+ return new runtime.JSONApiResponse(response, (jsonValue) => SuccessSandboxRestartFinalCaptureResponseFromJSON(jsonValue));
55
+ }
56
+ /**
57
+ * Requires sandbox:write. Submit only after final credential or authenticated logout custody is durably committed by the owner. This permits irreversible cleanup of the old projection. Retry the same capture_id and receipt_id after a lost reply; another receipt conflicts. This schedules retirement, not immediate replacement success.
58
+ * Commit the owner receipt for final restart credentials
59
+ */
60
+ async acknowledgeSandboxRestartFinalCapture(requestParameters, initOverrides) {
61
+ const response = await this.acknowledgeSandboxRestartFinalCaptureRaw(requestParameters, initOverrides);
62
+ return await response.value();
63
+ }
64
+ /**
65
+ * Requires sandbox:write. Submit only after final credential or authenticated logout custody is durably committed by the owner. This permits irreversible cleanup of the old projection. Retry the same capture_id and receipt_id after a lost reply; another receipt conflicts. This schedules retirement, not immediate replacement success.
66
+ * Commit the owner receipt for final restart credentials
67
+ */
68
+ async acknowledgeSandboxSnapshotRestoreFinalCaptureRaw(requestParameters, initOverrides) {
69
+ if (requestParameters['id'] == null) {
70
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling acknowledgeSandboxSnapshotRestoreFinalCapture().');
71
+ }
72
+ if (requestParameters['operationId'] == null) {
73
+ throw new runtime.RequiredError('operationId', 'Required parameter "operationId" was null or undefined when calling acknowledgeSandboxSnapshotRestoreFinalCapture().');
74
+ }
75
+ if (requestParameters['sandboxRestartFinalCaptureAcknowledgement'] == null) {
76
+ throw new runtime.RequiredError('sandboxRestartFinalCaptureAcknowledgement', 'Required parameter "sandboxRestartFinalCaptureAcknowledgement" was null or undefined when calling acknowledgeSandboxSnapshotRestoreFinalCapture().');
77
+ }
78
+ const queryParameters = {};
79
+ const headerParameters = {};
80
+ headerParameters['Content-Type'] = 'application/json';
81
+ if (this.configuration && this.configuration.accessToken) {
82
+ const token = this.configuration.accessToken;
83
+ const tokenString = await token("bearerAuth", []);
84
+ if (tokenString) {
85
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
86
+ }
87
+ }
88
+ let urlPath = `/api/v1/sandboxes/{id}/snapshot-restore-operations/{operation_id}/final-capture/acknowledgement`;
89
+ urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id'])));
90
+ urlPath = urlPath.replace(`{${"operation_id"}}`, encodeURIComponent(String(requestParameters['operationId'])));
91
+ const response = await this.request({
92
+ path: urlPath,
93
+ method: 'POST',
94
+ headers: headerParameters,
95
+ query: queryParameters,
96
+ body: SandboxRestartFinalCaptureAcknowledgementToJSON(requestParameters['sandboxRestartFinalCaptureAcknowledgement']),
97
+ }, initOverrides);
98
+ return new runtime.JSONApiResponse(response, (jsonValue) => SuccessSandboxRestartFinalCaptureResponseFromJSON(jsonValue));
99
+ }
100
+ /**
101
+ * Requires sandbox:write. Submit only after final credential or authenticated logout custody is durably committed by the owner. This permits irreversible cleanup of the old projection. Retry the same capture_id and receipt_id after a lost reply; another receipt conflicts. This schedules retirement, not immediate replacement success.
102
+ * Commit the owner receipt for final restart credentials
103
+ */
104
+ async acknowledgeSandboxSnapshotRestoreFinalCapture(requestParameters, initOverrides) {
105
+ const response = await this.acknowledgeSandboxSnapshotRestoreFinalCaptureRaw(requestParameters, initOverrides);
106
+ return await response.value();
107
+ }
20
108
  /**
21
109
  * List all sandboxes for the authenticated team. In multi-cluster mode, this endpoint aggregates results from all enabled clusters.
22
110
  * List sandboxes
@@ -201,7 +289,7 @@ export class SandboxesApi extends runtime.BaseAPI {
201
289
  return await response.value();
202
290
  }
203
291
  /**
204
- * The default checkpoints only the writable RootFS. Set memory=true to also retain process execution state before releasing the runtime. A 202 response means checkpoint publication and cleanup are still pending.
292
+ * The default checkpoints only the writable RootFS. Set memory=true to also retain process execution state before releasing the runtime. A 202 response means checkpoint publication and cleanup are still pending. For conditional memory pause, send expected_runtime_generation and Idempotency-Key together with memory=true. Retries bind the same source generation and checkpoint operation; mismatched or aborted operations conflict.
205
293
  * Pause a sandbox
206
294
  */
207
295
  async apiV1SandboxesIdPausePostRaw(requestParameters, initOverrides) {
@@ -211,6 +299,9 @@ export class SandboxesApi extends runtime.BaseAPI {
211
299
  const queryParameters = {};
212
300
  const headerParameters = {};
213
301
  headerParameters['Content-Type'] = 'application/json';
302
+ if (requestParameters['idempotencyKey'] != null) {
303
+ headerParameters['Idempotency-Key'] = String(requestParameters['idempotencyKey']);
304
+ }
214
305
  if (this.configuration && this.configuration.accessToken) {
215
306
  const token = this.configuration.accessToken;
216
307
  const tokenString = await token("bearerAuth", []);
@@ -225,12 +316,12 @@ export class SandboxesApi extends runtime.BaseAPI {
225
316
  method: 'POST',
226
317
  headers: headerParameters,
227
318
  query: queryParameters,
228
- body: SandboxExecutionStateRequestToJSON(requestParameters['sandboxExecutionStateRequest']),
319
+ body: SandboxPauseRequestToJSON(requestParameters['sandboxPauseRequest']),
229
320
  }, initOverrides);
230
321
  return new runtime.JSONApiResponse(response, (jsonValue) => SuccessPauseSandboxResponseFromJSON(jsonValue));
231
322
  }
232
323
  /**
233
- * The default checkpoints only the writable RootFS. Set memory=true to also retain process execution state before releasing the runtime. A 202 response means checkpoint publication and cleanup are still pending.
324
+ * The default checkpoints only the writable RootFS. Set memory=true to also retain process execution state before releasing the runtime. A 202 response means checkpoint publication and cleanup are still pending. For conditional memory pause, send expected_runtime_generation and Idempotency-Key together with memory=true. Retries bind the same source generation and checkpoint operation; mismatched or aborted operations conflict.
234
325
  * Pause a sandbox
235
326
  */
236
327
  async apiV1SandboxesIdPausePost(requestParameters, initOverrides) {
@@ -430,7 +521,7 @@ export class SandboxesApi extends runtime.BaseAPI {
430
521
  return await response.value();
431
522
  }
432
523
  /**
433
- * The default starts a new process runtime from the committed RootFS. Set memory=true to prefer a retained execution image. Missing or incompatible memory falls back to the committed RootFS. A failed memory target is physically reclaimed before a filesystem-only replacement starts. A response with resumed=false means durable fallback is pending; poll sandbox status until running. A disconnected request may continue through background recovery.
524
+ * The default starts a new process runtime from the committed RootFS. Set memory=true to require a retained execution image. Missing, incompatible, or failed memory restoration returns an error and never authorizes a filesystem-only replacement. Accepted memory operations may continue through background recovery after a disconnected request. For conditional memory resume, send memory=true, expected_runtime_generation, checkpoint_id and Idempotency-Key together. Keep the same authenticated identity, key, checkpoint and source generation on retries. A successful conditional response proves this request committed its exact restore; unrelated running state or a later lifecycle conflicts. An aborted request cannot create a new restore attempt.
434
525
  * Resume a sandbox
435
526
  */
436
527
  async apiV1SandboxesIdResumePostRaw(requestParameters, initOverrides) {
@@ -440,6 +531,9 @@ export class SandboxesApi extends runtime.BaseAPI {
440
531
  const queryParameters = {};
441
532
  const headerParameters = {};
442
533
  headerParameters['Content-Type'] = 'application/json';
534
+ if (requestParameters['idempotencyKey'] != null) {
535
+ headerParameters['Idempotency-Key'] = String(requestParameters['idempotencyKey']);
536
+ }
443
537
  if (this.configuration && this.configuration.accessToken) {
444
538
  const token = this.configuration.accessToken;
445
539
  const tokenString = await token("bearerAuth", []);
@@ -459,7 +553,7 @@ export class SandboxesApi extends runtime.BaseAPI {
459
553
  return new runtime.JSONApiResponse(response, (jsonValue) => SuccessResumeSandboxResponseFromJSON(jsonValue));
460
554
  }
461
555
  /**
462
- * The default starts a new process runtime from the committed RootFS. Set memory=true to prefer a retained execution image. Missing or incompatible memory falls back to the committed RootFS. A failed memory target is physically reclaimed before a filesystem-only replacement starts. A response with resumed=false means durable fallback is pending; poll sandbox status until running. A disconnected request may continue through background recovery.
556
+ * The default starts a new process runtime from the committed RootFS. Set memory=true to require a retained execution image. Missing, incompatible, or failed memory restoration returns an error and never authorizes a filesystem-only replacement. Accepted memory operations may continue through background recovery after a disconnected request. For conditional memory resume, send memory=true, expected_runtime_generation, checkpoint_id and Idempotency-Key together. Keep the same authenticated identity, key, checkpoint and source generation on retries. A successful conditional response proves this request committed its exact restore; unrelated running state or a later lifecycle conflicts. An aborted request cannot create a new restore attempt.
463
557
  * Resume a sandbox
464
558
  */
465
559
  async apiV1SandboxesIdResumePost(requestParameters, initOverrides) {
@@ -608,4 +702,920 @@ export class SandboxesApi extends runtime.BaseAPI {
608
702
  const response = await this.apiV1SandboxesPostRaw(requestParameters, initOverrides);
609
703
  return await response.value();
610
704
  }
611
- }
705
+ /**
706
+ * Deletion consumes the expected sequence before I/O, including when the reply is lost. Inspect/read to reconcile ambiguous results before issuing a new mutation.
707
+ * Delete a managed runtime file conditionally
708
+ */
709
+ async deleteSandboxManagedFileRaw(requestParameters, initOverrides) {
710
+ if (requestParameters['id'] == null) {
711
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling deleteSandboxManagedFile().');
712
+ }
713
+ if (requestParameters['runtimeGeneration'] == null) {
714
+ throw new runtime.RequiredError('runtimeGeneration', 'Required parameter "runtimeGeneration" was null or undefined when calling deleteSandboxManagedFile().');
715
+ }
716
+ if (requestParameters['name'] == null) {
717
+ throw new runtime.RequiredError('name', 'Required parameter "name" was null or undefined when calling deleteSandboxManagedFile().');
718
+ }
719
+ if (requestParameters['expectedMutationSequence'] == null) {
720
+ throw new runtime.RequiredError('expectedMutationSequence', 'Required parameter "expectedMutationSequence" was null or undefined when calling deleteSandboxManagedFile().');
721
+ }
722
+ const queryParameters = {};
723
+ if (requestParameters['runtimeGeneration'] != null) {
724
+ queryParameters['runtime_generation'] = requestParameters['runtimeGeneration'];
725
+ }
726
+ if (requestParameters['expectedMutationSequence'] != null) {
727
+ queryParameters['expected_mutation_sequence'] = requestParameters['expectedMutationSequence'];
728
+ }
729
+ const headerParameters = {};
730
+ if (this.configuration && this.configuration.accessToken) {
731
+ const token = this.configuration.accessToken;
732
+ const tokenString = await token("bearerAuth", []);
733
+ if (tokenString) {
734
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
735
+ }
736
+ }
737
+ let urlPath = `/api/v1/sandboxes/{id}/managed-files/{name}`;
738
+ urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id'])));
739
+ urlPath = urlPath.replace(`{${"name"}}`, encodeURIComponent(String(requestParameters['name'])));
740
+ const response = await this.request({
741
+ path: urlPath,
742
+ method: 'DELETE',
743
+ headers: headerParameters,
744
+ query: queryParameters,
745
+ }, initOverrides);
746
+ return new runtime.JSONApiResponse(response, (jsonValue) => SuccessManagedFilesStateResponseFromJSON(jsonValue));
747
+ }
748
+ /**
749
+ * Deletion consumes the expected sequence before I/O, including when the reply is lost. Inspect/read to reconcile ambiguous results before issuing a new mutation.
750
+ * Delete a managed runtime file conditionally
751
+ */
752
+ async deleteSandboxManagedFile(requestParameters, initOverrides) {
753
+ const response = await this.deleteSandboxManagedFileRaw(requestParameters, initOverrides);
754
+ return await response.value();
755
+ }
756
+ /**
757
+ * Deletion consumes the expected sequence before I/O, including when the reply is lost. Inspect/read to reconcile ambiguous results before issuing a new mutation.
758
+ * Delete a namespaced managed runtime file conditionally
759
+ */
760
+ async deleteSandboxNamespacedManagedFileRaw(requestParameters, initOverrides) {
761
+ if (requestParameters['id'] == null) {
762
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling deleteSandboxNamespacedManagedFile().');
763
+ }
764
+ if (requestParameters['runtimeGeneration'] == null) {
765
+ throw new runtime.RequiredError('runtimeGeneration', 'Required parameter "runtimeGeneration" was null or undefined when calling deleteSandboxNamespacedManagedFile().');
766
+ }
767
+ if (requestParameters['name'] == null) {
768
+ throw new runtime.RequiredError('name', 'Required parameter "name" was null or undefined when calling deleteSandboxNamespacedManagedFile().');
769
+ }
770
+ if (requestParameters['namespace'] == null) {
771
+ throw new runtime.RequiredError('namespace', 'Required parameter "namespace" was null or undefined when calling deleteSandboxNamespacedManagedFile().');
772
+ }
773
+ if (requestParameters['expectedMutationSequence'] == null) {
774
+ throw new runtime.RequiredError('expectedMutationSequence', 'Required parameter "expectedMutationSequence" was null or undefined when calling deleteSandboxNamespacedManagedFile().');
775
+ }
776
+ const queryParameters = {};
777
+ if (requestParameters['runtimeGeneration'] != null) {
778
+ queryParameters['runtime_generation'] = requestParameters['runtimeGeneration'];
779
+ }
780
+ if (requestParameters['expectedMutationSequence'] != null) {
781
+ queryParameters['expected_mutation_sequence'] = requestParameters['expectedMutationSequence'];
782
+ }
783
+ const headerParameters = {};
784
+ if (this.configuration && this.configuration.accessToken) {
785
+ const token = this.configuration.accessToken;
786
+ const tokenString = await token("bearerAuth", []);
787
+ if (tokenString) {
788
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
789
+ }
790
+ }
791
+ let urlPath = `/api/v1/sandboxes/{id}/managed-file-namespaces/{namespace}/{name}`;
792
+ urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id'])));
793
+ urlPath = urlPath.replace(`{${"name"}}`, encodeURIComponent(String(requestParameters['name'])));
794
+ urlPath = urlPath.replace(`{${"namespace"}}`, encodeURIComponent(String(requestParameters['namespace'])));
795
+ const response = await this.request({
796
+ path: urlPath,
797
+ method: 'DELETE',
798
+ headers: headerParameters,
799
+ query: queryParameters,
800
+ }, initOverrides);
801
+ return new runtime.JSONApiResponse(response, (jsonValue) => SuccessManagedFilesStateResponseFromJSON(jsonValue));
802
+ }
803
+ /**
804
+ * Deletion consumes the expected sequence before I/O, including when the reply is lost. Inspect/read to reconcile ambiguous results before issuing a new mutation.
805
+ * Delete a namespaced managed runtime file conditionally
806
+ */
807
+ async deleteSandboxNamespacedManagedFile(requestParameters, initOverrides) {
808
+ const response = await this.deleteSandboxNamespacedManagedFileRaw(requestParameters, initOverrides);
809
+ return await response.value();
810
+ }
811
+ /**
812
+ * Read-only acknowledgement recovery. Requires sandbox:read. Does not execute in the guest or submit a new restart.
813
+ * Find a restart by its original request key
814
+ */
815
+ async findSandboxRestartOperationRaw(requestParameters, initOverrides) {
816
+ if (requestParameters['id'] == null) {
817
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling findSandboxRestartOperation().');
818
+ }
819
+ if (requestParameters['requestKey'] == null) {
820
+ throw new runtime.RequiredError('requestKey', 'Required parameter "requestKey" was null or undefined when calling findSandboxRestartOperation().');
821
+ }
822
+ const queryParameters = {};
823
+ if (requestParameters['requestKey'] != null) {
824
+ queryParameters['request_key'] = requestParameters['requestKey'];
825
+ }
826
+ const headerParameters = {};
827
+ if (this.configuration && this.configuration.accessToken) {
828
+ const token = this.configuration.accessToken;
829
+ const tokenString = await token("bearerAuth", []);
830
+ if (tokenString) {
831
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
832
+ }
833
+ }
834
+ let urlPath = `/api/v1/sandboxes/{id}/restart-operations`;
835
+ urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id'])));
836
+ const response = await this.request({
837
+ path: urlPath,
838
+ method: 'GET',
839
+ headers: headerParameters,
840
+ query: queryParameters,
841
+ }, initOverrides);
842
+ return new runtime.JSONApiResponse(response, (jsonValue) => SuccessSandboxRestartOperationResponseFromJSON(jsonValue));
843
+ }
844
+ /**
845
+ * Read-only acknowledgement recovery. Requires sandbox:read. Does not execute in the guest or submit a new restart.
846
+ * Find a restart by its original request key
847
+ */
848
+ async findSandboxRestartOperation(requestParameters, initOverrides) {
849
+ const response = await this.findSandboxRestartOperationRaw(requestParameters, initOverrides);
850
+ return await response.value();
851
+ }
852
+ /**
853
+ * Read-only acknowledgement recovery. Requires sandbox:read. Does not execute in the guest or submit a new snapshot restore.
854
+ * Find a snapshot restore by its original request key
855
+ */
856
+ async findSandboxSnapshotRestoreOperationRaw(requestParameters, initOverrides) {
857
+ if (requestParameters['id'] == null) {
858
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling findSandboxSnapshotRestoreOperation().');
859
+ }
860
+ if (requestParameters['requestKey'] == null) {
861
+ throw new runtime.RequiredError('requestKey', 'Required parameter "requestKey" was null or undefined when calling findSandboxSnapshotRestoreOperation().');
862
+ }
863
+ const queryParameters = {};
864
+ if (requestParameters['requestKey'] != null) {
865
+ queryParameters['request_key'] = requestParameters['requestKey'];
866
+ }
867
+ const headerParameters = {};
868
+ if (this.configuration && this.configuration.accessToken) {
869
+ const token = this.configuration.accessToken;
870
+ const tokenString = await token("bearerAuth", []);
871
+ if (tokenString) {
872
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
873
+ }
874
+ }
875
+ let urlPath = `/api/v1/sandboxes/{id}/snapshot-restore-operations`;
876
+ urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id'])));
877
+ const response = await this.request({
878
+ path: urlPath,
879
+ method: 'GET',
880
+ headers: headerParameters,
881
+ query: queryParameters,
882
+ }, initOverrides);
883
+ return new runtime.JSONApiResponse(response, (jsonValue) => SuccessSandboxSnapshotRestoreOperationResponseFromJSON(jsonValue));
884
+ }
885
+ /**
886
+ * Read-only acknowledgement recovery. Requires sandbox:read. Does not execute in the guest or submit a new snapshot restore.
887
+ * Find a snapshot restore by its original request key
888
+ */
889
+ async findSandboxSnapshotRestoreOperation(requestParameters, initOverrides) {
890
+ const response = await this.findSandboxSnapshotRestoreOperationRaw(requestParameters, initOverrides);
891
+ return await response.value();
892
+ }
893
+ /**
894
+ * Requires sandbox:read. Reads owner-scoped regional authority and bounded independent node and guest diagnostics without automatic resume, restart or credential preparation. Guest diagnostics may execute a fixed short shell command and allocate a temporary PTY; they create no platform session. No probe runs for a paused runtime or a pending lifecycle. Each observation has its own source and time. Guest results are advisory and cannot establish runtime or storage authority. Unknown means insufficient evidence, not success. A valid launch receipt is not current process liveness; RootFS identity and writer lease are not successful storage IO or a guarantee of uncommitted-write durability. Storage IO currently remains unknown. Authority is rechecked after probes so a changed generation or lifecycle cannot inherit a successful old-runtime observation.
895
+ * Observe independent runtime, execution, terminal and storage health
896
+ */
897
+ async getSandboxHealthRaw(requestParameters, initOverrides) {
898
+ if (requestParameters['id'] == null) {
899
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling getSandboxHealth().');
900
+ }
901
+ const queryParameters = {};
902
+ const headerParameters = {};
903
+ if (this.configuration && this.configuration.accessToken) {
904
+ const token = this.configuration.accessToken;
905
+ const tokenString = await token("bearerAuth", []);
906
+ if (tokenString) {
907
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
908
+ }
909
+ }
910
+ let urlPath = `/api/v1/sandboxes/{id}/health`;
911
+ urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id'])));
912
+ const response = await this.request({
913
+ path: urlPath,
914
+ method: 'GET',
915
+ headers: headerParameters,
916
+ query: queryParameters,
917
+ }, initOverrides);
918
+ return new runtime.JSONApiResponse(response, (jsonValue) => SuccessSandboxHealthResponseFromJSON(jsonValue));
919
+ }
920
+ /**
921
+ * Requires sandbox:read. Reads owner-scoped regional authority and bounded independent node and guest diagnostics without automatic resume, restart or credential preparation. Guest diagnostics may execute a fixed short shell command and allocate a temporary PTY; they create no platform session. No probe runs for a paused runtime or a pending lifecycle. Each observation has its own source and time. Guest results are advisory and cannot establish runtime or storage authority. Unknown means insufficient evidence, not success. A valid launch receipt is not current process liveness; RootFS identity and writer lease are not successful storage IO or a guarantee of uncommitted-write durability. Storage IO currently remains unknown. Authority is rechecked after probes so a changed generation or lifecycle cannot inherit a successful old-runtime observation.
922
+ * Observe independent runtime, execution, terminal and storage health
923
+ */
924
+ async getSandboxHealth(requestParameters, initOverrides) {
925
+ const response = await this.getSandboxHealthRaw(requestParameters, initOverrides);
926
+ return await response.value();
927
+ }
928
+ /**
929
+ * Requires sandbox:read. Returns external checkpoint/migration restore lineage for the exact current runtime generation after physical retirement commits. No guest execution or lifecycle mutation. This is not a session-health or credential-clean attestation. Missing, pending or incompatible authority is an error; never authorizes cold launch or key re-publication.
930
+ * Read committed same-sandbox memory restoration lineage
931
+ */
932
+ async getSandboxMemoryRestorationRaw(requestParameters, initOverrides) {
933
+ if (requestParameters['id'] == null) {
934
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling getSandboxMemoryRestoration().');
935
+ }
936
+ if (requestParameters['runtimeGeneration'] == null) {
937
+ throw new runtime.RequiredError('runtimeGeneration', 'Required parameter "runtimeGeneration" was null or undefined when calling getSandboxMemoryRestoration().');
938
+ }
939
+ const queryParameters = {};
940
+ if (requestParameters['runtimeGeneration'] != null) {
941
+ queryParameters['runtime_generation'] = requestParameters['runtimeGeneration'];
942
+ }
943
+ const headerParameters = {};
944
+ if (this.configuration && this.configuration.accessToken) {
945
+ const token = this.configuration.accessToken;
946
+ const tokenString = await token("bearerAuth", []);
947
+ if (tokenString) {
948
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
949
+ }
950
+ }
951
+ let urlPath = `/api/v1/sandboxes/{id}/memory-restoration`;
952
+ urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id'])));
953
+ const response = await this.request({
954
+ path: urlPath,
955
+ method: 'GET',
956
+ headers: headerParameters,
957
+ query: queryParameters,
958
+ }, initOverrides);
959
+ return new runtime.JSONApiResponse(response, (jsonValue) => SuccessSandboxMemoryRestorationResponseFromJSON(jsonValue));
960
+ }
961
+ /**
962
+ * Requires sandbox:read. Returns external checkpoint/migration restore lineage for the exact current runtime generation after physical retirement commits. No guest execution or lifecycle mutation. This is not a session-health or credential-clean attestation. Missing, pending or incompatible authority is an error; never authorizes cold launch or key re-publication.
963
+ * Read committed same-sandbox memory restoration lineage
964
+ */
965
+ async getSandboxMemoryRestoration(requestParameters, initOverrides) {
966
+ const response = await this.getSandboxMemoryRestorationRaw(requestParameters, initOverrides);
967
+ return await response.value();
968
+ }
969
+ /**
970
+ * Requires sandbox:read. Reads durable metadata independently of procd. Pending has no capture ID. Stopped identifies one immutable externally stopped source. Acknowledged means the owner receipt is durable; released permits ordinary retirement. This is not a completed restart or a credential-content digest.
971
+ * Get retained cold-restart credential custody
972
+ */
973
+ async getSandboxRestartFinalCaptureRaw(requestParameters, initOverrides) {
974
+ if (requestParameters['id'] == null) {
975
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling getSandboxRestartFinalCapture().');
976
+ }
977
+ if (requestParameters['operationId'] == null) {
978
+ throw new runtime.RequiredError('operationId', 'Required parameter "operationId" was null or undefined when calling getSandboxRestartFinalCapture().');
979
+ }
980
+ const queryParameters = {};
981
+ const headerParameters = {};
982
+ if (this.configuration && this.configuration.accessToken) {
983
+ const token = this.configuration.accessToken;
984
+ const tokenString = await token("bearerAuth", []);
985
+ if (tokenString) {
986
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
987
+ }
988
+ }
989
+ let urlPath = `/api/v1/sandboxes/{id}/restart-operations/{operation_id}/final-capture`;
990
+ urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id'])));
991
+ urlPath = urlPath.replace(`{${"operation_id"}}`, encodeURIComponent(String(requestParameters['operationId'])));
992
+ const response = await this.request({
993
+ path: urlPath,
994
+ method: 'GET',
995
+ headers: headerParameters,
996
+ query: queryParameters,
997
+ }, initOverrides);
998
+ return new runtime.JSONApiResponse(response, (jsonValue) => SuccessSandboxRestartFinalCaptureResponseFromJSON(jsonValue));
999
+ }
1000
+ /**
1001
+ * Requires sandbox:read. Reads durable metadata independently of procd. Pending has no capture ID. Stopped identifies one immutable externally stopped source. Acknowledged means the owner receipt is durable; released permits ordinary retirement. This is not a completed restart or a credential-content digest.
1002
+ * Get retained cold-restart credential custody
1003
+ */
1004
+ async getSandboxRestartFinalCapture(requestParameters, initOverrides) {
1005
+ const response = await this.getSandboxRestartFinalCaptureRaw(requestParameters, initOverrides);
1006
+ return await response.value();
1007
+ }
1008
+ /**
1009
+ * Requires sandbox:read. Available independently of procd. A succeeded operation reports its historical replacement generation; later lifecycle activity does not cause another restart or make this an application-health report.
1010
+ * Get durable restart state and bounded retry diagnostics
1011
+ */
1012
+ async getSandboxRestartOperationRaw(requestParameters, initOverrides) {
1013
+ if (requestParameters['id'] == null) {
1014
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling getSandboxRestartOperation().');
1015
+ }
1016
+ if (requestParameters['operationId'] == null) {
1017
+ throw new runtime.RequiredError('operationId', 'Required parameter "operationId" was null or undefined when calling getSandboxRestartOperation().');
1018
+ }
1019
+ const queryParameters = {};
1020
+ const headerParameters = {};
1021
+ if (this.configuration && this.configuration.accessToken) {
1022
+ const token = this.configuration.accessToken;
1023
+ const tokenString = await token("bearerAuth", []);
1024
+ if (tokenString) {
1025
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
1026
+ }
1027
+ }
1028
+ let urlPath = `/api/v1/sandboxes/{id}/restart-operations/{operation_id}`;
1029
+ urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id'])));
1030
+ urlPath = urlPath.replace(`{${"operation_id"}}`, encodeURIComponent(String(requestParameters['operationId'])));
1031
+ const response = await this.request({
1032
+ path: urlPath,
1033
+ method: 'GET',
1034
+ headers: headerParameters,
1035
+ query: queryParameters,
1036
+ }, initOverrides);
1037
+ return new runtime.JSONApiResponse(response, (jsonValue) => SuccessSandboxRestartOperationResponseFromJSON(jsonValue));
1038
+ }
1039
+ /**
1040
+ * Requires sandbox:read. Available independently of procd. A succeeded operation reports its historical replacement generation; later lifecycle activity does not cause another restart or make this an application-health report.
1041
+ * Get durable restart state and bounded retry diagnostics
1042
+ */
1043
+ async getSandboxRestartOperation(requestParameters, initOverrides) {
1044
+ const response = await this.getSandboxRestartOperationRaw(requestParameters, initOverrides);
1045
+ return await response.value();
1046
+ }
1047
+ /**
1048
+ * Requires sandbox:read. Reads durable metadata independently of procd. Pending has no capture ID. Stopped identifies one immutable externally stopped source. Acknowledged means the owner receipt is durable; released permits ordinary retirement. This is not a completed restart or a credential-content digest.
1049
+ * Get retained cold-restart credential custody
1050
+ */
1051
+ async getSandboxSnapshotRestoreFinalCaptureRaw(requestParameters, initOverrides) {
1052
+ if (requestParameters['id'] == null) {
1053
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling getSandboxSnapshotRestoreFinalCapture().');
1054
+ }
1055
+ if (requestParameters['operationId'] == null) {
1056
+ throw new runtime.RequiredError('operationId', 'Required parameter "operationId" was null or undefined when calling getSandboxSnapshotRestoreFinalCapture().');
1057
+ }
1058
+ const queryParameters = {};
1059
+ const headerParameters = {};
1060
+ if (this.configuration && this.configuration.accessToken) {
1061
+ const token = this.configuration.accessToken;
1062
+ const tokenString = await token("bearerAuth", []);
1063
+ if (tokenString) {
1064
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
1065
+ }
1066
+ }
1067
+ let urlPath = `/api/v1/sandboxes/{id}/snapshot-restore-operations/{operation_id}/final-capture`;
1068
+ urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id'])));
1069
+ urlPath = urlPath.replace(`{${"operation_id"}}`, encodeURIComponent(String(requestParameters['operationId'])));
1070
+ const response = await this.request({
1071
+ path: urlPath,
1072
+ method: 'GET',
1073
+ headers: headerParameters,
1074
+ query: queryParameters,
1075
+ }, initOverrides);
1076
+ return new runtime.JSONApiResponse(response, (jsonValue) => SuccessSandboxRestartFinalCaptureResponseFromJSON(jsonValue));
1077
+ }
1078
+ /**
1079
+ * Requires sandbox:read. Reads durable metadata independently of procd. Pending has no capture ID. Stopped identifies one immutable externally stopped source. Acknowledged means the owner receipt is durable; released permits ordinary retirement. This is not a completed restart or a credential-content digest.
1080
+ * Get retained cold-restart credential custody
1081
+ */
1082
+ async getSandboxSnapshotRestoreFinalCapture(requestParameters, initOverrides) {
1083
+ const response = await this.getSandboxSnapshotRestoreFinalCaptureRaw(requestParameters, initOverrides);
1084
+ return await response.value();
1085
+ }
1086
+ /**
1087
+ * Requires sandbox:read. Available independently of procd. A succeeded operation reports its historical replacement generation; later lifecycle activity does not cause another restart or make this an application-health report.
1088
+ * Get durable restart state and bounded retry diagnostics
1089
+ */
1090
+ async getSandboxSnapshotRestoreOperationRaw(requestParameters, initOverrides) {
1091
+ if (requestParameters['id'] == null) {
1092
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling getSandboxSnapshotRestoreOperation().');
1093
+ }
1094
+ if (requestParameters['operationId'] == null) {
1095
+ throw new runtime.RequiredError('operationId', 'Required parameter "operationId" was null or undefined when calling getSandboxSnapshotRestoreOperation().');
1096
+ }
1097
+ const queryParameters = {};
1098
+ const headerParameters = {};
1099
+ if (this.configuration && this.configuration.accessToken) {
1100
+ const token = this.configuration.accessToken;
1101
+ const tokenString = await token("bearerAuth", []);
1102
+ if (tokenString) {
1103
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
1104
+ }
1105
+ }
1106
+ let urlPath = `/api/v1/sandboxes/{id}/snapshot-restore-operations/{operation_id}`;
1107
+ urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id'])));
1108
+ urlPath = urlPath.replace(`{${"operation_id"}}`, encodeURIComponent(String(requestParameters['operationId'])));
1109
+ const response = await this.request({
1110
+ path: urlPath,
1111
+ method: 'GET',
1112
+ headers: headerParameters,
1113
+ query: queryParameters,
1114
+ }, initOverrides);
1115
+ return new runtime.JSONApiResponse(response, (jsonValue) => SuccessSandboxSnapshotRestoreOperationResponseFromJSON(jsonValue));
1116
+ }
1117
+ /**
1118
+ * Requires sandbox:read. Available independently of procd. A succeeded operation reports its historical replacement generation; later lifecycle activity does not cause another restart or make this an application-health report.
1119
+ * Get durable restart state and bounded retry diagnostics
1120
+ */
1121
+ async getSandboxSnapshotRestoreOperation(requestParameters, initOverrides) {
1122
+ const response = await this.getSandboxSnapshotRestoreOperationRaw(requestParameters, initOverrides);
1123
+ return await response.value();
1124
+ }
1125
+ /**
1126
+ * Uses node-owned storage outside persistent RootFS without executing in the guest. This describes only managed files and does not attest that historical or user-created RootFS files contain no credentials.
1127
+ * Inspect the current runtime-only managed file projection
1128
+ */
1129
+ async inspectSandboxManagedFilesRaw(requestParameters, initOverrides) {
1130
+ if (requestParameters['id'] == null) {
1131
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling inspectSandboxManagedFiles().');
1132
+ }
1133
+ if (requestParameters['runtimeGeneration'] == null) {
1134
+ throw new runtime.RequiredError('runtimeGeneration', 'Required parameter "runtimeGeneration" was null or undefined when calling inspectSandboxManagedFiles().');
1135
+ }
1136
+ const queryParameters = {};
1137
+ if (requestParameters['runtimeGeneration'] != null) {
1138
+ queryParameters['runtime_generation'] = requestParameters['runtimeGeneration'];
1139
+ }
1140
+ const headerParameters = {};
1141
+ if (this.configuration && this.configuration.accessToken) {
1142
+ const token = this.configuration.accessToken;
1143
+ const tokenString = await token("bearerAuth", []);
1144
+ if (tokenString) {
1145
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
1146
+ }
1147
+ }
1148
+ let urlPath = `/api/v1/sandboxes/{id}/managed-files`;
1149
+ urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id'])));
1150
+ const response = await this.request({
1151
+ path: urlPath,
1152
+ method: 'GET',
1153
+ headers: headerParameters,
1154
+ query: queryParameters,
1155
+ }, initOverrides);
1156
+ return new runtime.JSONApiResponse(response, (jsonValue) => SuccessManagedFilesStateResponseFromJSON(jsonValue));
1157
+ }
1158
+ /**
1159
+ * Uses node-owned storage outside persistent RootFS without executing in the guest. This describes only managed files and does not attest that historical or user-created RootFS files contain no credentials.
1160
+ * Inspect the current runtime-only managed file projection
1161
+ */
1162
+ async inspectSandboxManagedFiles(requestParameters, initOverrides) {
1163
+ const response = await this.inspectSandboxManagedFilesRaw(requestParameters, initOverrides);
1164
+ return await response.value();
1165
+ }
1166
+ /**
1167
+ * Requires sandbox:read and the original caller\'s Idempotency-Key. The authenticated team, user, sandbox and action derive the same request identity as conditional pause or resume. Performs no lifecycle mutation, guest access, quota admission or retry. A missing request returns 404 and never proves cancellation. Historical terminal results remain readable while their evidence is retained, including after later lifecycles; current only compares the owner snapshot and is not a lease or permission to mutate it. Source process health is not implied. A physically resolved failed restore consumes result_runtime_generation while retaining the checkpoint; it must never be retried as a new intent implicitly.
1168
+ * Read the exact conditional memory lifecycle result
1169
+ */
1170
+ async lookupSandboxMemoryOperationRaw(requestParameters, initOverrides) {
1171
+ if (requestParameters['id'] == null) {
1172
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling lookupSandboxMemoryOperation().');
1173
+ }
1174
+ if (requestParameters['idempotencyKey'] == null) {
1175
+ throw new runtime.RequiredError('idempotencyKey', 'Required parameter "idempotencyKey" was null or undefined when calling lookupSandboxMemoryOperation().');
1176
+ }
1177
+ if (requestParameters['action'] == null) {
1178
+ throw new runtime.RequiredError('action', 'Required parameter "action" was null or undefined when calling lookupSandboxMemoryOperation().');
1179
+ }
1180
+ if (requestParameters['expectedRuntimeGeneration'] == null) {
1181
+ throw new runtime.RequiredError('expectedRuntimeGeneration', 'Required parameter "expectedRuntimeGeneration" was null or undefined when calling lookupSandboxMemoryOperation().');
1182
+ }
1183
+ const queryParameters = {};
1184
+ if (requestParameters['action'] != null) {
1185
+ queryParameters['action'] = requestParameters['action'];
1186
+ }
1187
+ if (requestParameters['expectedRuntimeGeneration'] != null) {
1188
+ queryParameters['expected_runtime_generation'] = requestParameters['expectedRuntimeGeneration'];
1189
+ }
1190
+ if (requestParameters['checkpointId'] != null) {
1191
+ queryParameters['checkpoint_id'] = requestParameters['checkpointId'];
1192
+ }
1193
+ const headerParameters = {};
1194
+ if (requestParameters['idempotencyKey'] != null) {
1195
+ headerParameters['Idempotency-Key'] = String(requestParameters['idempotencyKey']);
1196
+ }
1197
+ if (this.configuration && this.configuration.accessToken) {
1198
+ const token = this.configuration.accessToken;
1199
+ const tokenString = await token("bearerAuth", []);
1200
+ if (tokenString) {
1201
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
1202
+ }
1203
+ }
1204
+ let urlPath = `/api/v1/sandboxes/{id}/memory-operations/lookup`;
1205
+ urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id'])));
1206
+ const response = await this.request({
1207
+ path: urlPath,
1208
+ method: 'GET',
1209
+ headers: headerParameters,
1210
+ query: queryParameters,
1211
+ }, initOverrides);
1212
+ return new runtime.JSONApiResponse(response, (jsonValue) => SuccessSandboxMemoryOperationResponseFromJSON(jsonValue));
1213
+ }
1214
+ /**
1215
+ * Requires sandbox:read and the original caller\'s Idempotency-Key. The authenticated team, user, sandbox and action derive the same request identity as conditional pause or resume. Performs no lifecycle mutation, guest access, quota admission or retry. A missing request returns 404 and never proves cancellation. Historical terminal results remain readable while their evidence is retained, including after later lifecycles; current only compares the owner snapshot and is not a lease or permission to mutate it. Source process health is not implied. A physically resolved failed restore consumes result_runtime_generation while retaining the checkpoint; it must never be retried as a new intent implicitly.
1216
+ * Read the exact conditional memory lifecycle result
1217
+ */
1218
+ async lookupSandboxMemoryOperation(requestParameters, initOverrides) {
1219
+ const response = await this.lookupSandboxMemoryOperationRaw(requestParameters, initOverrides);
1220
+ return await response.value();
1221
+ }
1222
+ /**
1223
+ * Read a managed runtime file
1224
+ */
1225
+ async readSandboxManagedFileRaw(requestParameters, initOverrides) {
1226
+ if (requestParameters['id'] == null) {
1227
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling readSandboxManagedFile().');
1228
+ }
1229
+ if (requestParameters['runtimeGeneration'] == null) {
1230
+ throw new runtime.RequiredError('runtimeGeneration', 'Required parameter "runtimeGeneration" was null or undefined when calling readSandboxManagedFile().');
1231
+ }
1232
+ if (requestParameters['name'] == null) {
1233
+ throw new runtime.RequiredError('name', 'Required parameter "name" was null or undefined when calling readSandboxManagedFile().');
1234
+ }
1235
+ const queryParameters = {};
1236
+ if (requestParameters['runtimeGeneration'] != null) {
1237
+ queryParameters['runtime_generation'] = requestParameters['runtimeGeneration'];
1238
+ }
1239
+ const headerParameters = {};
1240
+ if (this.configuration && this.configuration.accessToken) {
1241
+ const token = this.configuration.accessToken;
1242
+ const tokenString = await token("bearerAuth", []);
1243
+ if (tokenString) {
1244
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
1245
+ }
1246
+ }
1247
+ let urlPath = `/api/v1/sandboxes/{id}/managed-files/{name}`;
1248
+ urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id'])));
1249
+ urlPath = urlPath.replace(`{${"name"}}`, encodeURIComponent(String(requestParameters['name'])));
1250
+ const response = await this.request({
1251
+ path: urlPath,
1252
+ method: 'GET',
1253
+ headers: headerParameters,
1254
+ query: queryParameters,
1255
+ }, initOverrides);
1256
+ return new runtime.JSONApiResponse(response, (jsonValue) => SuccessManagedFileReadResponseFromJSON(jsonValue));
1257
+ }
1258
+ /**
1259
+ * Read a managed runtime file
1260
+ */
1261
+ async readSandboxManagedFile(requestParameters, initOverrides) {
1262
+ const response = await this.readSandboxManagedFileRaw(requestParameters, initOverrides);
1263
+ return await response.value();
1264
+ }
1265
+ /**
1266
+ * Read a namespaced managed runtime file
1267
+ */
1268
+ async readSandboxNamespacedManagedFileRaw(requestParameters, initOverrides) {
1269
+ if (requestParameters['id'] == null) {
1270
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling readSandboxNamespacedManagedFile().');
1271
+ }
1272
+ if (requestParameters['runtimeGeneration'] == null) {
1273
+ throw new runtime.RequiredError('runtimeGeneration', 'Required parameter "runtimeGeneration" was null or undefined when calling readSandboxNamespacedManagedFile().');
1274
+ }
1275
+ if (requestParameters['name'] == null) {
1276
+ throw new runtime.RequiredError('name', 'Required parameter "name" was null or undefined when calling readSandboxNamespacedManagedFile().');
1277
+ }
1278
+ if (requestParameters['namespace'] == null) {
1279
+ throw new runtime.RequiredError('namespace', 'Required parameter "namespace" was null or undefined when calling readSandboxNamespacedManagedFile().');
1280
+ }
1281
+ const queryParameters = {};
1282
+ if (requestParameters['runtimeGeneration'] != null) {
1283
+ queryParameters['runtime_generation'] = requestParameters['runtimeGeneration'];
1284
+ }
1285
+ const headerParameters = {};
1286
+ if (this.configuration && this.configuration.accessToken) {
1287
+ const token = this.configuration.accessToken;
1288
+ const tokenString = await token("bearerAuth", []);
1289
+ if (tokenString) {
1290
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
1291
+ }
1292
+ }
1293
+ let urlPath = `/api/v1/sandboxes/{id}/managed-file-namespaces/{namespace}/{name}`;
1294
+ urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id'])));
1295
+ urlPath = urlPath.replace(`{${"name"}}`, encodeURIComponent(String(requestParameters['name'])));
1296
+ urlPath = urlPath.replace(`{${"namespace"}}`, encodeURIComponent(String(requestParameters['namespace'])));
1297
+ const response = await this.request({
1298
+ path: urlPath,
1299
+ method: 'GET',
1300
+ headers: headerParameters,
1301
+ query: queryParameters,
1302
+ }, initOverrides);
1303
+ return new runtime.JSONApiResponse(response, (jsonValue) => SuccessManagedFileReadResponseFromJSON(jsonValue));
1304
+ }
1305
+ /**
1306
+ * Read a namespaced managed runtime file
1307
+ */
1308
+ async readSandboxNamespacedManagedFile(requestParameters, initOverrides) {
1309
+ const response = await this.readSandboxNamespacedManagedFileRaw(requestParameters, initOverrides);
1310
+ return await response.value();
1311
+ }
1312
+ /**
1313
+ * Requires sandbox:read and the exact capture_id from status. Never reads live or guest storage, creates files, or resumes execution. found=false attests an absent file only after retained backing and external absence are verified. Missing journals, mounts, authority and routes are errors, never logout. Read closes after acknowledgement. Responses must not be logged or cached.
1314
+ * Read a file from the exact stopped restart source
1315
+ */
1316
+ async readSandboxRestartFinalCaptureFileRaw(requestParameters, initOverrides) {
1317
+ if (requestParameters['id'] == null) {
1318
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling readSandboxRestartFinalCaptureFile().');
1319
+ }
1320
+ if (requestParameters['operationId'] == null) {
1321
+ throw new runtime.RequiredError('operationId', 'Required parameter "operationId" was null or undefined when calling readSandboxRestartFinalCaptureFile().');
1322
+ }
1323
+ if (requestParameters['namespace'] == null) {
1324
+ throw new runtime.RequiredError('namespace', 'Required parameter "namespace" was null or undefined when calling readSandboxRestartFinalCaptureFile().');
1325
+ }
1326
+ if (requestParameters['name'] == null) {
1327
+ throw new runtime.RequiredError('name', 'Required parameter "name" was null or undefined when calling readSandboxRestartFinalCaptureFile().');
1328
+ }
1329
+ if (requestParameters['captureId'] == null) {
1330
+ throw new runtime.RequiredError('captureId', 'Required parameter "captureId" was null or undefined when calling readSandboxRestartFinalCaptureFile().');
1331
+ }
1332
+ const queryParameters = {};
1333
+ if (requestParameters['captureId'] != null) {
1334
+ queryParameters['capture_id'] = requestParameters['captureId'];
1335
+ }
1336
+ const headerParameters = {};
1337
+ if (this.configuration && this.configuration.accessToken) {
1338
+ const token = this.configuration.accessToken;
1339
+ const tokenString = await token("bearerAuth", []);
1340
+ if (tokenString) {
1341
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
1342
+ }
1343
+ }
1344
+ let urlPath = `/api/v1/sandboxes/{id}/restart-operations/{operation_id}/final-capture/namespaces/{namespace}/{name}`;
1345
+ urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id'])));
1346
+ urlPath = urlPath.replace(`{${"operation_id"}}`, encodeURIComponent(String(requestParameters['operationId'])));
1347
+ urlPath = urlPath.replace(`{${"namespace"}}`, encodeURIComponent(String(requestParameters['namespace'])));
1348
+ urlPath = urlPath.replace(`{${"name"}}`, encodeURIComponent(String(requestParameters['name'])));
1349
+ const response = await this.request({
1350
+ path: urlPath,
1351
+ method: 'GET',
1352
+ headers: headerParameters,
1353
+ query: queryParameters,
1354
+ }, initOverrides);
1355
+ return new runtime.JSONApiResponse(response, (jsonValue) => SuccessSandboxRestartFinalCaptureFileResponseFromJSON(jsonValue));
1356
+ }
1357
+ /**
1358
+ * Requires sandbox:read and the exact capture_id from status. Never reads live or guest storage, creates files, or resumes execution. found=false attests an absent file only after retained backing and external absence are verified. Missing journals, mounts, authority and routes are errors, never logout. Read closes after acknowledgement. Responses must not be logged or cached.
1359
+ * Read a file from the exact stopped restart source
1360
+ */
1361
+ async readSandboxRestartFinalCaptureFile(requestParameters, initOverrides) {
1362
+ const response = await this.readSandboxRestartFinalCaptureFileRaw(requestParameters, initOverrides);
1363
+ return await response.value();
1364
+ }
1365
+ /**
1366
+ * Requires sandbox:read and the exact capture_id from status. Never reads live or guest storage, creates files, or resumes execution. found=false attests an absent file only after retained backing and external absence are verified. Missing journals, mounts, authority and routes are errors, never logout. Read closes after acknowledgement. Responses must not be logged or cached.
1367
+ * Read a file from the exact stopped restart source
1368
+ */
1369
+ async readSandboxSnapshotRestoreFinalCaptureFileRaw(requestParameters, initOverrides) {
1370
+ if (requestParameters['id'] == null) {
1371
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling readSandboxSnapshotRestoreFinalCaptureFile().');
1372
+ }
1373
+ if (requestParameters['operationId'] == null) {
1374
+ throw new runtime.RequiredError('operationId', 'Required parameter "operationId" was null or undefined when calling readSandboxSnapshotRestoreFinalCaptureFile().');
1375
+ }
1376
+ if (requestParameters['namespace'] == null) {
1377
+ throw new runtime.RequiredError('namespace', 'Required parameter "namespace" was null or undefined when calling readSandboxSnapshotRestoreFinalCaptureFile().');
1378
+ }
1379
+ if (requestParameters['name'] == null) {
1380
+ throw new runtime.RequiredError('name', 'Required parameter "name" was null or undefined when calling readSandboxSnapshotRestoreFinalCaptureFile().');
1381
+ }
1382
+ if (requestParameters['captureId'] == null) {
1383
+ throw new runtime.RequiredError('captureId', 'Required parameter "captureId" was null or undefined when calling readSandboxSnapshotRestoreFinalCaptureFile().');
1384
+ }
1385
+ const queryParameters = {};
1386
+ if (requestParameters['captureId'] != null) {
1387
+ queryParameters['capture_id'] = requestParameters['captureId'];
1388
+ }
1389
+ const headerParameters = {};
1390
+ if (this.configuration && this.configuration.accessToken) {
1391
+ const token = this.configuration.accessToken;
1392
+ const tokenString = await token("bearerAuth", []);
1393
+ if (tokenString) {
1394
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
1395
+ }
1396
+ }
1397
+ let urlPath = `/api/v1/sandboxes/{id}/snapshot-restore-operations/{operation_id}/final-capture/namespaces/{namespace}/{name}`;
1398
+ urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id'])));
1399
+ urlPath = urlPath.replace(`{${"operation_id"}}`, encodeURIComponent(String(requestParameters['operationId'])));
1400
+ urlPath = urlPath.replace(`{${"namespace"}}`, encodeURIComponent(String(requestParameters['namespace'])));
1401
+ urlPath = urlPath.replace(`{${"name"}}`, encodeURIComponent(String(requestParameters['name'])));
1402
+ const response = await this.request({
1403
+ path: urlPath,
1404
+ method: 'GET',
1405
+ headers: headerParameters,
1406
+ query: queryParameters,
1407
+ }, initOverrides);
1408
+ return new runtime.JSONApiResponse(response, (jsonValue) => SuccessSandboxRestartFinalCaptureFileResponseFromJSON(jsonValue));
1409
+ }
1410
+ /**
1411
+ * Requires sandbox:read and the exact capture_id from status. Never reads live or guest storage, creates files, or resumes execution. found=false attests an absent file only after retained backing and external absence are verified. Missing journals, mounts, authority and routes are errors, never logout. Read closes after acknowledgement. Responses must not be logged or cached.
1412
+ * Read a file from the exact stopped restart source
1413
+ */
1414
+ async readSandboxSnapshotRestoreFinalCaptureFile(requestParameters, initOverrides) {
1415
+ const response = await this.readSandboxSnapshotRestoreFinalCaptureFileRaw(requestParameters, initOverrides);
1416
+ return await response.value();
1417
+ }
1418
+ /**
1419
+ * Preserves the writable RootFS through external publication and writer fencing, ends the old processes, and starts a fresh runtime. This is not a reconnect, memory restore, or snapshot rollback. Requires sandbox:write and a stable Idempotency-Key bound to expected_runtime_generation. A duplicate returns the original operation and never restarts a newer generation. Request timeout does not cancel committed work. Find the operation by request_key if its acknowledgement was lost. Completion proves runtime replacement, not guest application health. Never use this as an automatic memory fallback.
1420
+ * Explicitly replace a sandbox runtime and discard process state
1421
+ */
1422
+ async restartSandboxRaw(requestParameters, initOverrides) {
1423
+ if (requestParameters['id'] == null) {
1424
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling restartSandbox().');
1425
+ }
1426
+ if (requestParameters['idempotencyKey'] == null) {
1427
+ throw new runtime.RequiredError('idempotencyKey', 'Required parameter "idempotencyKey" was null or undefined when calling restartSandbox().');
1428
+ }
1429
+ if (requestParameters['sandboxRestartRequest'] == null) {
1430
+ throw new runtime.RequiredError('sandboxRestartRequest', 'Required parameter "sandboxRestartRequest" was null or undefined when calling restartSandbox().');
1431
+ }
1432
+ const queryParameters = {};
1433
+ const headerParameters = {};
1434
+ headerParameters['Content-Type'] = 'application/json';
1435
+ if (requestParameters['idempotencyKey'] != null) {
1436
+ headerParameters['Idempotency-Key'] = String(requestParameters['idempotencyKey']);
1437
+ }
1438
+ if (this.configuration && this.configuration.accessToken) {
1439
+ const token = this.configuration.accessToken;
1440
+ const tokenString = await token("bearerAuth", []);
1441
+ if (tokenString) {
1442
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
1443
+ }
1444
+ }
1445
+ let urlPath = `/api/v1/sandboxes/{id}/restart`;
1446
+ urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id'])));
1447
+ const response = await this.request({
1448
+ path: urlPath,
1449
+ method: 'POST',
1450
+ headers: headerParameters,
1451
+ query: queryParameters,
1452
+ body: SandboxRestartRequestToJSON(requestParameters['sandboxRestartRequest']),
1453
+ }, initOverrides);
1454
+ return new runtime.JSONApiResponse(response, (jsonValue) => SuccessSandboxRestartOperationResponseFromJSON(jsonValue));
1455
+ }
1456
+ /**
1457
+ * Preserves the writable RootFS through external publication and writer fencing, ends the old processes, and starts a fresh runtime. This is not a reconnect, memory restore, or snapshot rollback. Requires sandbox:write and a stable Idempotency-Key bound to expected_runtime_generation. A duplicate returns the original operation and never restarts a newer generation. Request timeout does not cancel committed work. Find the operation by request_key if its acknowledgement was lost. Completion proves runtime replacement, not guest application health. Never use this as an automatic memory fallback.
1458
+ * Explicitly replace a sandbox runtime and discard process state
1459
+ */
1460
+ async restartSandbox(requestParameters, initOverrides) {
1461
+ const response = await this.restartSandboxRaw(requestParameters, initOverrides);
1462
+ return await response.value();
1463
+ }
1464
+ /**
1465
+ * Explicitly discards source process state and replaces its writable RootFS with the exact selected snapshot generation. Requires sandbox:write, discard_process_state=true and a stable Idempotency-Key bound to the source runtime generation and snapshot identity. Admission pins the selected data, including across later snapshot expiry or deletion. External final capture retains projected credential custody before source retirement. Head replacement and cold resume admission commit together. A duplicate returns the original operation and cannot restore again. Request timeout does not cancel accepted work; recover its acknowledgement by request_key. Completion proves external runtime launch, not guest application health. Never use as a memory fallback.
1466
+ * Restore a selected snapshot and start a fresh runtime
1467
+ */
1468
+ async restoreSandboxSnapshotRaw(requestParameters, initOverrides) {
1469
+ if (requestParameters['id'] == null) {
1470
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling restoreSandboxSnapshot().');
1471
+ }
1472
+ if (requestParameters['idempotencyKey'] == null) {
1473
+ throw new runtime.RequiredError('idempotencyKey', 'Required parameter "idempotencyKey" was null or undefined when calling restoreSandboxSnapshot().');
1474
+ }
1475
+ if (requestParameters['sandboxSnapshotRestoreRequest'] == null) {
1476
+ throw new runtime.RequiredError('sandboxSnapshotRestoreRequest', 'Required parameter "sandboxSnapshotRestoreRequest" was null or undefined when calling restoreSandboxSnapshot().');
1477
+ }
1478
+ const queryParameters = {};
1479
+ const headerParameters = {};
1480
+ headerParameters['Content-Type'] = 'application/json';
1481
+ if (requestParameters['idempotencyKey'] != null) {
1482
+ headerParameters['Idempotency-Key'] = String(requestParameters['idempotencyKey']);
1483
+ }
1484
+ if (this.configuration && this.configuration.accessToken) {
1485
+ const token = this.configuration.accessToken;
1486
+ const tokenString = await token("bearerAuth", []);
1487
+ if (tokenString) {
1488
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
1489
+ }
1490
+ }
1491
+ let urlPath = `/api/v1/sandboxes/{id}/snapshot-restore`;
1492
+ urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id'])));
1493
+ const response = await this.request({
1494
+ path: urlPath,
1495
+ method: 'POST',
1496
+ headers: headerParameters,
1497
+ query: queryParameters,
1498
+ body: SandboxSnapshotRestoreRequestToJSON(requestParameters['sandboxSnapshotRestoreRequest']),
1499
+ }, initOverrides);
1500
+ return new runtime.JSONApiResponse(response, (jsonValue) => SuccessSandboxSnapshotRestoreOperationResponseFromJSON(jsonValue));
1501
+ }
1502
+ /**
1503
+ * Explicitly discards source process state and replaces its writable RootFS with the exact selected snapshot generation. Requires sandbox:write, discard_process_state=true and a stable Idempotency-Key bound to the source runtime generation and snapshot identity. Admission pins the selected data, including across later snapshot expiry or deletion. External final capture retains projected credential custody before source retirement. Head replacement and cold resume admission commit together. A duplicate returns the original operation and cannot restore again. Request timeout does not cancel accepted work; recover its acknowledgement by request_key. Completion proves external runtime launch, not guest application health. Never use as a memory fallback.
1504
+ * Restore a selected snapshot and start a fresh runtime
1505
+ */
1506
+ async restoreSandboxSnapshot(requestParameters, initOverrides) {
1507
+ const response = await this.restoreSandboxSnapshotRaw(requestParameters, initOverrides);
1508
+ return await response.value();
1509
+ }
1510
+ /**
1511
+ * The expected mutation sequence is consumed before file I/O. An ambiguous response must be reconciled with inspect/read; never automatically retry with a newly fetched sequence. The sequence orders platform requests, not native guest refreshes.
1512
+ * Replace a managed runtime file conditionally
1513
+ */
1514
+ async writeSandboxManagedFileRaw(requestParameters, initOverrides) {
1515
+ if (requestParameters['id'] == null) {
1516
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling writeSandboxManagedFile().');
1517
+ }
1518
+ if (requestParameters['runtimeGeneration'] == null) {
1519
+ throw new runtime.RequiredError('runtimeGeneration', 'Required parameter "runtimeGeneration" was null or undefined when calling writeSandboxManagedFile().');
1520
+ }
1521
+ if (requestParameters['name'] == null) {
1522
+ throw new runtime.RequiredError('name', 'Required parameter "name" was null or undefined when calling writeSandboxManagedFile().');
1523
+ }
1524
+ if (requestParameters['managedFileWriteRequest'] == null) {
1525
+ throw new runtime.RequiredError('managedFileWriteRequest', 'Required parameter "managedFileWriteRequest" was null or undefined when calling writeSandboxManagedFile().');
1526
+ }
1527
+ const queryParameters = {};
1528
+ if (requestParameters['runtimeGeneration'] != null) {
1529
+ queryParameters['runtime_generation'] = requestParameters['runtimeGeneration'];
1530
+ }
1531
+ const headerParameters = {};
1532
+ headerParameters['Content-Type'] = 'application/json';
1533
+ if (this.configuration && this.configuration.accessToken) {
1534
+ const token = this.configuration.accessToken;
1535
+ const tokenString = await token("bearerAuth", []);
1536
+ if (tokenString) {
1537
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
1538
+ }
1539
+ }
1540
+ let urlPath = `/api/v1/sandboxes/{id}/managed-files/{name}`;
1541
+ urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id'])));
1542
+ urlPath = urlPath.replace(`{${"name"}}`, encodeURIComponent(String(requestParameters['name'])));
1543
+ const response = await this.request({
1544
+ path: urlPath,
1545
+ method: 'PUT',
1546
+ headers: headerParameters,
1547
+ query: queryParameters,
1548
+ body: ManagedFileWriteRequestToJSON(requestParameters['managedFileWriteRequest']),
1549
+ }, initOverrides);
1550
+ return new runtime.JSONApiResponse(response, (jsonValue) => SuccessManagedFilesStateResponseFromJSON(jsonValue));
1551
+ }
1552
+ /**
1553
+ * The expected mutation sequence is consumed before file I/O. An ambiguous response must be reconciled with inspect/read; never automatically retry with a newly fetched sequence. The sequence orders platform requests, not native guest refreshes.
1554
+ * Replace a managed runtime file conditionally
1555
+ */
1556
+ async writeSandboxManagedFile(requestParameters, initOverrides) {
1557
+ const response = await this.writeSandboxManagedFileRaw(requestParameters, initOverrides);
1558
+ return await response.value();
1559
+ }
1560
+ /**
1561
+ * The expected mutation sequence is consumed before file I/O. An ambiguous response must be reconciled with inspect/read; never automatically retry with a newly fetched sequence. The sequence orders platform requests, not native guest refreshes.
1562
+ * Replace a namespaced managed runtime file conditionally
1563
+ */
1564
+ async writeSandboxNamespacedManagedFileRaw(requestParameters, initOverrides) {
1565
+ if (requestParameters['id'] == null) {
1566
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling writeSandboxNamespacedManagedFile().');
1567
+ }
1568
+ if (requestParameters['runtimeGeneration'] == null) {
1569
+ throw new runtime.RequiredError('runtimeGeneration', 'Required parameter "runtimeGeneration" was null or undefined when calling writeSandboxNamespacedManagedFile().');
1570
+ }
1571
+ if (requestParameters['name'] == null) {
1572
+ throw new runtime.RequiredError('name', 'Required parameter "name" was null or undefined when calling writeSandboxNamespacedManagedFile().');
1573
+ }
1574
+ if (requestParameters['namespace'] == null) {
1575
+ throw new runtime.RequiredError('namespace', 'Required parameter "namespace" was null or undefined when calling writeSandboxNamespacedManagedFile().');
1576
+ }
1577
+ if (requestParameters['managedFileWriteRequest'] == null) {
1578
+ throw new runtime.RequiredError('managedFileWriteRequest', 'Required parameter "managedFileWriteRequest" was null or undefined when calling writeSandboxNamespacedManagedFile().');
1579
+ }
1580
+ const queryParameters = {};
1581
+ if (requestParameters['runtimeGeneration'] != null) {
1582
+ queryParameters['runtime_generation'] = requestParameters['runtimeGeneration'];
1583
+ }
1584
+ const headerParameters = {};
1585
+ headerParameters['Content-Type'] = 'application/json';
1586
+ if (this.configuration && this.configuration.accessToken) {
1587
+ const token = this.configuration.accessToken;
1588
+ const tokenString = await token("bearerAuth", []);
1589
+ if (tokenString) {
1590
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
1591
+ }
1592
+ }
1593
+ let urlPath = `/api/v1/sandboxes/{id}/managed-file-namespaces/{namespace}/{name}`;
1594
+ urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id'])));
1595
+ urlPath = urlPath.replace(`{${"name"}}`, encodeURIComponent(String(requestParameters['name'])));
1596
+ urlPath = urlPath.replace(`{${"namespace"}}`, encodeURIComponent(String(requestParameters['namespace'])));
1597
+ const response = await this.request({
1598
+ path: urlPath,
1599
+ method: 'PUT',
1600
+ headers: headerParameters,
1601
+ query: queryParameters,
1602
+ body: ManagedFileWriteRequestToJSON(requestParameters['managedFileWriteRequest']),
1603
+ }, initOverrides);
1604
+ return new runtime.JSONApiResponse(response, (jsonValue) => SuccessManagedFilesStateResponseFromJSON(jsonValue));
1605
+ }
1606
+ /**
1607
+ * The expected mutation sequence is consumed before file I/O. An ambiguous response must be reconciled with inspect/read; never automatically retry with a newly fetched sequence. The sequence orders platform requests, not native guest refreshes.
1608
+ * Replace a namespaced managed runtime file conditionally
1609
+ */
1610
+ async writeSandboxNamespacedManagedFile(requestParameters, initOverrides) {
1611
+ const response = await this.writeSandboxNamespacedManagedFileRaw(requestParameters, initOverrides);
1612
+ return await response.value();
1613
+ }
1614
+ }
1615
+ /**
1616
+ * @export
1617
+ */
1618
+ export const LookupSandboxMemoryOperationActionEnum = {
1619
+ Pause: 'pause',
1620
+ Resume: 'resume'
1621
+ };