sandbox0 0.1.11 → 0.1.13

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 (103) hide show
  1. package/dist/apispec/src/apis/UsersApi.d.ts +11 -11
  2. package/dist/apispec/src/apis/UsersApi.d.ts.map +1 -1
  3. package/dist/apispec/src/apis/UsersApi.js +34 -34
  4. package/dist/apispec/src/apis/VolumeSyncApi.d.ts +145 -0
  5. package/dist/apispec/src/apis/VolumeSyncApi.d.ts.map +1 -0
  6. package/dist/apispec/src/apis/VolumeSyncApi.js +416 -0
  7. package/dist/apispec/src/apis/index.d.ts +1 -0
  8. package/dist/apispec/src/apis/index.d.ts.map +1 -1
  9. package/dist/apispec/src/apis/index.js +1 -0
  10. package/dist/apispec/src/models/AppendReplicaChangesRequest.d.ts +46 -0
  11. package/dist/apispec/src/models/AppendReplicaChangesRequest.d.ts.map +1 -0
  12. package/dist/apispec/src/models/AppendReplicaChangesRequest.js +52 -0
  13. package/dist/apispec/src/models/AppendReplicaChangesResponse.d.ts +47 -0
  14. package/dist/apispec/src/models/AppendReplicaChangesResponse.d.ts.map +1 -0
  15. package/dist/apispec/src/models/AppendReplicaChangesResponse.js +53 -0
  16. package/dist/apispec/src/models/ChangeRequest.d.ts +92 -0
  17. package/dist/apispec/src/models/ChangeRequest.d.ts.map +1 -0
  18. package/dist/apispec/src/models/ChangeRequest.js +67 -0
  19. package/dist/apispec/src/models/CreateVolumeSyncBootstrapRequest.d.ts +52 -0
  20. package/dist/apispec/src/models/CreateVolumeSyncBootstrapRequest.d.ts.map +1 -0
  21. package/dist/apispec/src/models/CreateVolumeSyncBootstrapRequest.js +48 -0
  22. package/dist/apispec/src/models/ListVolumeSyncChangesResponse.d.ts +46 -0
  23. package/dist/apispec/src/models/ListVolumeSyncChangesResponse.d.ts.map +1 -0
  24. package/dist/apispec/src/models/ListVolumeSyncChangesResponse.js +52 -0
  25. package/dist/apispec/src/models/ListVolumeSyncConflictsResponse.d.ts +34 -0
  26. package/dist/apispec/src/models/ListVolumeSyncConflictsResponse.d.ts.map +1 -0
  27. package/dist/apispec/src/models/ListVolumeSyncConflictsResponse.js +44 -0
  28. package/dist/apispec/src/models/RegisterRequest.d.ts +6 -0
  29. package/dist/apispec/src/models/RegisterRequest.d.ts.map +1 -1
  30. package/dist/apispec/src/models/RegisterRequest.js +2 -0
  31. package/dist/apispec/src/models/ResolveVolumeSyncConflictRequest.d.ts +53 -0
  32. package/dist/apispec/src/models/ResolveVolumeSyncConflictRequest.d.ts.map +1 -0
  33. package/dist/apispec/src/models/ResolveVolumeSyncConflictRequest.js +54 -0
  34. package/dist/apispec/src/models/SuccessVolumeSyncAppendResponse.d.ts +40 -0
  35. package/dist/apispec/src/models/SuccessVolumeSyncAppendResponse.d.ts.map +1 -0
  36. package/dist/apispec/src/models/SuccessVolumeSyncAppendResponse.js +46 -0
  37. package/dist/apispec/src/models/SuccessVolumeSyncBootstrapResponse.d.ts +40 -0
  38. package/dist/apispec/src/models/SuccessVolumeSyncBootstrapResponse.d.ts.map +1 -0
  39. package/dist/apispec/src/models/SuccessVolumeSyncBootstrapResponse.js +46 -0
  40. package/dist/apispec/src/models/SuccessVolumeSyncChangeListResponse.d.ts +40 -0
  41. package/dist/apispec/src/models/SuccessVolumeSyncChangeListResponse.d.ts.map +1 -0
  42. package/dist/apispec/src/models/SuccessVolumeSyncChangeListResponse.js +46 -0
  43. package/dist/apispec/src/models/SuccessVolumeSyncConflictListResponse.d.ts +40 -0
  44. package/dist/apispec/src/models/SuccessVolumeSyncConflictListResponse.d.ts.map +1 -0
  45. package/dist/apispec/src/models/SuccessVolumeSyncConflictListResponse.js +46 -0
  46. package/dist/apispec/src/models/SuccessVolumeSyncConflictResponse.d.ts +40 -0
  47. package/dist/apispec/src/models/SuccessVolumeSyncConflictResponse.d.ts.map +1 -0
  48. package/dist/apispec/src/models/SuccessVolumeSyncConflictResponse.js +46 -0
  49. package/dist/apispec/src/models/SuccessVolumeSyncReplicaResponse.d.ts +40 -0
  50. package/dist/apispec/src/models/SuccessVolumeSyncReplicaResponse.d.ts.map +1 -0
  51. package/dist/apispec/src/models/SuccessVolumeSyncReplicaResponse.js +46 -0
  52. package/dist/apispec/src/models/SyncConflict.d.ts +119 -0
  53. package/dist/apispec/src/models/SyncConflict.d.ts.map +1 -0
  54. package/dist/apispec/src/models/SyncConflict.js +69 -0
  55. package/dist/apispec/src/models/SyncEventType.d.ts +30 -0
  56. package/dist/apispec/src/models/SyncEventType.d.ts.map +1 -0
  57. package/dist/apispec/src/models/SyncEventType.js +47 -0
  58. package/dist/apispec/src/models/SyncJournalEntry.d.ts +154 -0
  59. package/dist/apispec/src/models/SyncJournalEntry.d.ts.map +1 -0
  60. package/dist/apispec/src/models/SyncJournalEntry.js +90 -0
  61. package/dist/apispec/src/models/SyncReplica.d.ts +100 -0
  62. package/dist/apispec/src/models/SyncReplica.d.ts.map +1 -0
  63. package/dist/apispec/src/models/SyncReplica.js +64 -0
  64. package/dist/apispec/src/models/UpdateSyncReplicaCursorRequest.d.ts +33 -0
  65. package/dist/apispec/src/models/UpdateSyncReplicaCursorRequest.d.ts.map +1 -0
  66. package/dist/apispec/src/models/UpdateSyncReplicaCursorRequest.js +43 -0
  67. package/dist/apispec/src/models/UpsertSyncReplicaRequest.d.ts +58 -0
  68. package/dist/apispec/src/models/UpsertSyncReplicaRequest.d.ts.map +1 -0
  69. package/dist/apispec/src/models/UpsertSyncReplicaRequest.js +50 -0
  70. package/dist/apispec/src/models/VolumeSyncBootstrap.d.ts +46 -0
  71. package/dist/apispec/src/models/VolumeSyncBootstrap.d.ts.map +1 -0
  72. package/dist/apispec/src/models/VolumeSyncBootstrap.js +52 -0
  73. package/dist/apispec/src/models/VolumeSyncBootstrapCompatibilityConflictDetails.d.ts +60 -0
  74. package/dist/apispec/src/models/VolumeSyncBootstrapCompatibilityConflictDetails.d.ts.map +1 -0
  75. package/dist/apispec/src/models/VolumeSyncBootstrapCompatibilityConflictDetails.js +63 -0
  76. package/dist/apispec/src/models/VolumeSyncBootstrapConflictErrorEnvelope.d.ts +40 -0
  77. package/dist/apispec/src/models/VolumeSyncBootstrapConflictErrorEnvelope.d.ts.map +1 -0
  78. package/dist/apispec/src/models/VolumeSyncBootstrapConflictErrorEnvelope.js +48 -0
  79. package/dist/apispec/src/models/VolumeSyncBootstrapConflictErrorEnvelopeAllOfError.d.ts +46 -0
  80. package/dist/apispec/src/models/VolumeSyncBootstrapConflictErrorEnvelopeAllOfError.d.ts.map +1 -0
  81. package/dist/apispec/src/models/VolumeSyncBootstrapConflictErrorEnvelopeAllOfError.js +50 -0
  82. package/dist/apispec/src/models/VolumeSyncCompatibilityIssue.d.ts +63 -0
  83. package/dist/apispec/src/models/VolumeSyncCompatibilityIssue.d.ts.map +1 -0
  84. package/dist/apispec/src/models/VolumeSyncCompatibilityIssue.js +53 -0
  85. package/dist/apispec/src/models/VolumeSyncFilesystemCapabilities.d.ts +45 -0
  86. package/dist/apispec/src/models/VolumeSyncFilesystemCapabilities.d.ts.map +1 -0
  87. package/dist/apispec/src/models/VolumeSyncFilesystemCapabilities.js +51 -0
  88. package/dist/apispec/src/models/VolumeSyncReplicaEnvelope.d.ts +40 -0
  89. package/dist/apispec/src/models/VolumeSyncReplicaEnvelope.d.ts.map +1 -0
  90. package/dist/apispec/src/models/VolumeSyncReplicaEnvelope.js +48 -0
  91. package/dist/apispec/src/models/VolumeSyncReseedRequiredDetails.d.ts +52 -0
  92. package/dist/apispec/src/models/VolumeSyncReseedRequiredDetails.d.ts.map +1 -0
  93. package/dist/apispec/src/models/VolumeSyncReseedRequiredDetails.js +57 -0
  94. package/dist/apispec/src/models/VolumeSyncReseedRequiredErrorEnvelope.d.ts +40 -0
  95. package/dist/apispec/src/models/VolumeSyncReseedRequiredErrorEnvelope.d.ts.map +1 -0
  96. package/dist/apispec/src/models/VolumeSyncReseedRequiredErrorEnvelope.js +48 -0
  97. package/dist/apispec/src/models/VolumeSyncReseedRequiredErrorEnvelopeAllOfError.d.ts +46 -0
  98. package/dist/apispec/src/models/VolumeSyncReseedRequiredErrorEnvelopeAllOfError.d.ts.map +1 -0
  99. package/dist/apispec/src/models/VolumeSyncReseedRequiredErrorEnvelopeAllOfError.js +50 -0
  100. package/dist/apispec/src/models/index.d.ts +29 -0
  101. package/dist/apispec/src/models/index.d.ts.map +1 -1
  102. package/dist/apispec/src/models/index.js +29 -0
  103. package/package.json +1 -1
@@ -0,0 +1,416 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Sandbox0 API
5
+ * Public HTTP APIs exposed by Sandbox0 regional gateways and the global gateway.
6
+ *
7
+ * The version of the OpenAPI document: 0.1.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
+ import * as runtime from '../runtime.js';
15
+ import { AppendReplicaChangesRequestToJSON, CreateVolumeSyncBootstrapRequestToJSON, ResolveVolumeSyncConflictRequestToJSON, SuccessVolumeSyncAppendResponseFromJSON, SuccessVolumeSyncBootstrapResponseFromJSON, SuccessVolumeSyncChangeListResponseFromJSON, SuccessVolumeSyncConflictListResponseFromJSON, SuccessVolumeSyncConflictResponseFromJSON, SuccessVolumeSyncReplicaResponseFromJSON, UpdateSyncReplicaCursorRequestToJSON, UpsertSyncReplicaRequestToJSON, } from '../models/index.js';
16
+ /**
17
+ *
18
+ */
19
+ export class VolumeSyncApi extends runtime.BaseAPI {
20
+ /**
21
+ * Download a bootstrap snapshot archive for local-first sync
22
+ */
23
+ async apiV1SandboxvolumesIdSyncBootstrapArchiveGetRaw(requestParameters, initOverrides) {
24
+ if (requestParameters['id'] == null) {
25
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling apiV1SandboxvolumesIdSyncBootstrapArchiveGet().');
26
+ }
27
+ if (requestParameters['snapshotId'] == null) {
28
+ throw new runtime.RequiredError('snapshotId', 'Required parameter "snapshotId" was null or undefined when calling apiV1SandboxvolumesIdSyncBootstrapArchiveGet().');
29
+ }
30
+ const queryParameters = {};
31
+ if (requestParameters['snapshotId'] != null) {
32
+ queryParameters['snapshot_id'] = requestParameters['snapshotId'];
33
+ }
34
+ const headerParameters = {};
35
+ if (this.configuration && this.configuration.accessToken) {
36
+ const token = this.configuration.accessToken;
37
+ const tokenString = await token("bearerAuth", []);
38
+ if (tokenString) {
39
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
40
+ }
41
+ }
42
+ let urlPath = `/api/v1/sandboxvolumes/{id}/sync/bootstrap/archive`;
43
+ urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id'])));
44
+ const response = await this.request({
45
+ path: urlPath,
46
+ method: 'GET',
47
+ headers: headerParameters,
48
+ query: queryParameters,
49
+ }, initOverrides);
50
+ return new runtime.BlobApiResponse(response);
51
+ }
52
+ /**
53
+ * Download a bootstrap snapshot archive for local-first sync
54
+ */
55
+ async apiV1SandboxvolumesIdSyncBootstrapArchiveGet(requestParameters, initOverrides) {
56
+ const response = await this.apiV1SandboxvolumesIdSyncBootstrapArchiveGetRaw(requestParameters, initOverrides);
57
+ return await response.value();
58
+ }
59
+ /**
60
+ * Create a bootstrap snapshot and journal anchor for local-first sync
61
+ */
62
+ async apiV1SandboxvolumesIdSyncBootstrapPostRaw(requestParameters, initOverrides) {
63
+ if (requestParameters['id'] == null) {
64
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling apiV1SandboxvolumesIdSyncBootstrapPost().');
65
+ }
66
+ const queryParameters = {};
67
+ const headerParameters = {};
68
+ headerParameters['Content-Type'] = 'application/json';
69
+ if (this.configuration && this.configuration.accessToken) {
70
+ const token = this.configuration.accessToken;
71
+ const tokenString = await token("bearerAuth", []);
72
+ if (tokenString) {
73
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
74
+ }
75
+ }
76
+ let urlPath = `/api/v1/sandboxvolumes/{id}/sync/bootstrap`;
77
+ urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id'])));
78
+ const response = await this.request({
79
+ path: urlPath,
80
+ method: 'POST',
81
+ headers: headerParameters,
82
+ query: queryParameters,
83
+ body: CreateVolumeSyncBootstrapRequestToJSON(requestParameters['createVolumeSyncBootstrapRequest']),
84
+ }, initOverrides);
85
+ return new runtime.JSONApiResponse(response, (jsonValue) => SuccessVolumeSyncBootstrapResponseFromJSON(jsonValue));
86
+ }
87
+ /**
88
+ * Create a bootstrap snapshot and journal anchor for local-first sync
89
+ */
90
+ async apiV1SandboxvolumesIdSyncBootstrapPost(requestParameters, initOverrides) {
91
+ const response = await this.apiV1SandboxvolumesIdSyncBootstrapPostRaw(requestParameters, initOverrides);
92
+ return await response.value();
93
+ }
94
+ /**
95
+ * List volume sync journal entries
96
+ */
97
+ async apiV1SandboxvolumesIdSyncChangesGetRaw(requestParameters, initOverrides) {
98
+ if (requestParameters['id'] == null) {
99
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling apiV1SandboxvolumesIdSyncChangesGet().');
100
+ }
101
+ const queryParameters = {};
102
+ if (requestParameters['after'] != null) {
103
+ queryParameters['after'] = requestParameters['after'];
104
+ }
105
+ if (requestParameters['limit'] != null) {
106
+ queryParameters['limit'] = requestParameters['limit'];
107
+ }
108
+ const headerParameters = {};
109
+ if (this.configuration && this.configuration.accessToken) {
110
+ const token = this.configuration.accessToken;
111
+ const tokenString = await token("bearerAuth", []);
112
+ if (tokenString) {
113
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
114
+ }
115
+ }
116
+ let urlPath = `/api/v1/sandboxvolumes/{id}/sync/changes`;
117
+ urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id'])));
118
+ const response = await this.request({
119
+ path: urlPath,
120
+ method: 'GET',
121
+ headers: headerParameters,
122
+ query: queryParameters,
123
+ }, initOverrides);
124
+ return new runtime.JSONApiResponse(response, (jsonValue) => SuccessVolumeSyncChangeListResponseFromJSON(jsonValue));
125
+ }
126
+ /**
127
+ * List volume sync journal entries
128
+ */
129
+ async apiV1SandboxvolumesIdSyncChangesGet(requestParameters, initOverrides) {
130
+ const response = await this.apiV1SandboxvolumesIdSyncChangesGetRaw(requestParameters, initOverrides);
131
+ return await response.value();
132
+ }
133
+ /**
134
+ * Resolve or ignore a volume sync conflict
135
+ */
136
+ async apiV1SandboxvolumesIdSyncConflictsConflictIdPutRaw(requestParameters, initOverrides) {
137
+ if (requestParameters['id'] == null) {
138
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling apiV1SandboxvolumesIdSyncConflictsConflictIdPut().');
139
+ }
140
+ if (requestParameters['conflictId'] == null) {
141
+ throw new runtime.RequiredError('conflictId', 'Required parameter "conflictId" was null or undefined when calling apiV1SandboxvolumesIdSyncConflictsConflictIdPut().');
142
+ }
143
+ if (requestParameters['resolveVolumeSyncConflictRequest'] == null) {
144
+ throw new runtime.RequiredError('resolveVolumeSyncConflictRequest', 'Required parameter "resolveVolumeSyncConflictRequest" was null or undefined when calling apiV1SandboxvolumesIdSyncConflictsConflictIdPut().');
145
+ }
146
+ const queryParameters = {};
147
+ const headerParameters = {};
148
+ headerParameters['Content-Type'] = 'application/json';
149
+ if (this.configuration && this.configuration.accessToken) {
150
+ const token = this.configuration.accessToken;
151
+ const tokenString = await token("bearerAuth", []);
152
+ if (tokenString) {
153
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
154
+ }
155
+ }
156
+ let urlPath = `/api/v1/sandboxvolumes/{id}/sync/conflicts/{conflict_id}`;
157
+ urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id'])));
158
+ urlPath = urlPath.replace(`{${"conflict_id"}}`, encodeURIComponent(String(requestParameters['conflictId'])));
159
+ const response = await this.request({
160
+ path: urlPath,
161
+ method: 'PUT',
162
+ headers: headerParameters,
163
+ query: queryParameters,
164
+ body: ResolveVolumeSyncConflictRequestToJSON(requestParameters['resolveVolumeSyncConflictRequest']),
165
+ }, initOverrides);
166
+ return new runtime.JSONApiResponse(response, (jsonValue) => SuccessVolumeSyncConflictResponseFromJSON(jsonValue));
167
+ }
168
+ /**
169
+ * Resolve or ignore a volume sync conflict
170
+ */
171
+ async apiV1SandboxvolumesIdSyncConflictsConflictIdPut(requestParameters, initOverrides) {
172
+ const response = await this.apiV1SandboxvolumesIdSyncConflictsConflictIdPutRaw(requestParameters, initOverrides);
173
+ return await response.value();
174
+ }
175
+ /**
176
+ * List volume sync conflicts
177
+ */
178
+ async apiV1SandboxvolumesIdSyncConflictsGetRaw(requestParameters, initOverrides) {
179
+ if (requestParameters['id'] == null) {
180
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling apiV1SandboxvolumesIdSyncConflictsGet().');
181
+ }
182
+ const queryParameters = {};
183
+ if (requestParameters['status'] != null) {
184
+ queryParameters['status'] = requestParameters['status'];
185
+ }
186
+ if (requestParameters['limit'] != null) {
187
+ queryParameters['limit'] = requestParameters['limit'];
188
+ }
189
+ const headerParameters = {};
190
+ if (this.configuration && this.configuration.accessToken) {
191
+ const token = this.configuration.accessToken;
192
+ const tokenString = await token("bearerAuth", []);
193
+ if (tokenString) {
194
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
195
+ }
196
+ }
197
+ let urlPath = `/api/v1/sandboxvolumes/{id}/sync/conflicts`;
198
+ urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id'])));
199
+ const response = await this.request({
200
+ path: urlPath,
201
+ method: 'GET',
202
+ headers: headerParameters,
203
+ query: queryParameters,
204
+ }, initOverrides);
205
+ return new runtime.JSONApiResponse(response, (jsonValue) => SuccessVolumeSyncConflictListResponseFromJSON(jsonValue));
206
+ }
207
+ /**
208
+ * List volume sync conflicts
209
+ */
210
+ async apiV1SandboxvolumesIdSyncConflictsGet(requestParameters, initOverrides) {
211
+ const response = await this.apiV1SandboxvolumesIdSyncConflictsGetRaw(requestParameters, initOverrides);
212
+ return await response.value();
213
+ }
214
+ /**
215
+ * Download a replay payload for one sync journal entry
216
+ */
217
+ async apiV1SandboxvolumesIdSyncReplayPayloadGetRaw(requestParameters, initOverrides) {
218
+ if (requestParameters['id'] == null) {
219
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling apiV1SandboxvolumesIdSyncReplayPayloadGet().');
220
+ }
221
+ if (requestParameters['contentRef'] == null) {
222
+ throw new runtime.RequiredError('contentRef', 'Required parameter "contentRef" was null or undefined when calling apiV1SandboxvolumesIdSyncReplayPayloadGet().');
223
+ }
224
+ const queryParameters = {};
225
+ if (requestParameters['contentRef'] != null) {
226
+ queryParameters['content_ref'] = requestParameters['contentRef'];
227
+ }
228
+ const headerParameters = {};
229
+ if (this.configuration && this.configuration.accessToken) {
230
+ const token = this.configuration.accessToken;
231
+ const tokenString = await token("bearerAuth", []);
232
+ if (tokenString) {
233
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
234
+ }
235
+ }
236
+ let urlPath = `/api/v1/sandboxvolumes/{id}/sync/replay-payload`;
237
+ urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id'])));
238
+ const response = await this.request({
239
+ path: urlPath,
240
+ method: 'GET',
241
+ headers: headerParameters,
242
+ query: queryParameters,
243
+ }, initOverrides);
244
+ return new runtime.BlobApiResponse(response);
245
+ }
246
+ /**
247
+ * Download a replay payload for one sync journal entry
248
+ */
249
+ async apiV1SandboxvolumesIdSyncReplayPayloadGet(requestParameters, initOverrides) {
250
+ const response = await this.apiV1SandboxvolumesIdSyncReplayPayloadGetRaw(requestParameters, initOverrides);
251
+ return await response.value();
252
+ }
253
+ /**
254
+ * Append replica-originated sync journal entries
255
+ */
256
+ async apiV1SandboxvolumesIdSyncReplicasReplicaIdChangesPostRaw(requestParameters, initOverrides) {
257
+ if (requestParameters['id'] == null) {
258
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling apiV1SandboxvolumesIdSyncReplicasReplicaIdChangesPost().');
259
+ }
260
+ if (requestParameters['replicaId'] == null) {
261
+ throw new runtime.RequiredError('replicaId', 'Required parameter "replicaId" was null or undefined when calling apiV1SandboxvolumesIdSyncReplicasReplicaIdChangesPost().');
262
+ }
263
+ if (requestParameters['appendReplicaChangesRequest'] == null) {
264
+ throw new runtime.RequiredError('appendReplicaChangesRequest', 'Required parameter "appendReplicaChangesRequest" was null or undefined when calling apiV1SandboxvolumesIdSyncReplicasReplicaIdChangesPost().');
265
+ }
266
+ const queryParameters = {};
267
+ const headerParameters = {};
268
+ headerParameters['Content-Type'] = 'application/json';
269
+ if (this.configuration && this.configuration.accessToken) {
270
+ const token = this.configuration.accessToken;
271
+ const tokenString = await token("bearerAuth", []);
272
+ if (tokenString) {
273
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
274
+ }
275
+ }
276
+ let urlPath = `/api/v1/sandboxvolumes/{id}/sync/replicas/{replica_id}/changes`;
277
+ urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id'])));
278
+ urlPath = urlPath.replace(`{${"replica_id"}}`, encodeURIComponent(String(requestParameters['replicaId'])));
279
+ const response = await this.request({
280
+ path: urlPath,
281
+ method: 'POST',
282
+ headers: headerParameters,
283
+ query: queryParameters,
284
+ body: AppendReplicaChangesRequestToJSON(requestParameters['appendReplicaChangesRequest']),
285
+ }, initOverrides);
286
+ return new runtime.JSONApiResponse(response, (jsonValue) => SuccessVolumeSyncAppendResponseFromJSON(jsonValue));
287
+ }
288
+ /**
289
+ * Append replica-originated sync journal entries
290
+ */
291
+ async apiV1SandboxvolumesIdSyncReplicasReplicaIdChangesPost(requestParameters, initOverrides) {
292
+ const response = await this.apiV1SandboxvolumesIdSyncReplicasReplicaIdChangesPostRaw(requestParameters, initOverrides);
293
+ return await response.value();
294
+ }
295
+ /**
296
+ * Advance a volume sync replica cursor
297
+ */
298
+ async apiV1SandboxvolumesIdSyncReplicasReplicaIdCursorPutRaw(requestParameters, initOverrides) {
299
+ if (requestParameters['id'] == null) {
300
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling apiV1SandboxvolumesIdSyncReplicasReplicaIdCursorPut().');
301
+ }
302
+ if (requestParameters['replicaId'] == null) {
303
+ throw new runtime.RequiredError('replicaId', 'Required parameter "replicaId" was null or undefined when calling apiV1SandboxvolumesIdSyncReplicasReplicaIdCursorPut().');
304
+ }
305
+ if (requestParameters['updateSyncReplicaCursorRequest'] == null) {
306
+ throw new runtime.RequiredError('updateSyncReplicaCursorRequest', 'Required parameter "updateSyncReplicaCursorRequest" was null or undefined when calling apiV1SandboxvolumesIdSyncReplicasReplicaIdCursorPut().');
307
+ }
308
+ const queryParameters = {};
309
+ const headerParameters = {};
310
+ headerParameters['Content-Type'] = 'application/json';
311
+ if (this.configuration && this.configuration.accessToken) {
312
+ const token = this.configuration.accessToken;
313
+ const tokenString = await token("bearerAuth", []);
314
+ if (tokenString) {
315
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
316
+ }
317
+ }
318
+ let urlPath = `/api/v1/sandboxvolumes/{id}/sync/replicas/{replica_id}/cursor`;
319
+ urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id'])));
320
+ urlPath = urlPath.replace(`{${"replica_id"}}`, encodeURIComponent(String(requestParameters['replicaId'])));
321
+ const response = await this.request({
322
+ path: urlPath,
323
+ method: 'PUT',
324
+ headers: headerParameters,
325
+ query: queryParameters,
326
+ body: UpdateSyncReplicaCursorRequestToJSON(requestParameters['updateSyncReplicaCursorRequest']),
327
+ }, initOverrides);
328
+ return new runtime.JSONApiResponse(response, (jsonValue) => SuccessVolumeSyncReplicaResponseFromJSON(jsonValue));
329
+ }
330
+ /**
331
+ * Advance a volume sync replica cursor
332
+ */
333
+ async apiV1SandboxvolumesIdSyncReplicasReplicaIdCursorPut(requestParameters, initOverrides) {
334
+ const response = await this.apiV1SandboxvolumesIdSyncReplicasReplicaIdCursorPutRaw(requestParameters, initOverrides);
335
+ return await response.value();
336
+ }
337
+ /**
338
+ * Get a volume sync replica
339
+ */
340
+ async apiV1SandboxvolumesIdSyncReplicasReplicaIdGetRaw(requestParameters, initOverrides) {
341
+ if (requestParameters['id'] == null) {
342
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling apiV1SandboxvolumesIdSyncReplicasReplicaIdGet().');
343
+ }
344
+ if (requestParameters['replicaId'] == null) {
345
+ throw new runtime.RequiredError('replicaId', 'Required parameter "replicaId" was null or undefined when calling apiV1SandboxvolumesIdSyncReplicasReplicaIdGet().');
346
+ }
347
+ const queryParameters = {};
348
+ const headerParameters = {};
349
+ if (this.configuration && this.configuration.accessToken) {
350
+ const token = this.configuration.accessToken;
351
+ const tokenString = await token("bearerAuth", []);
352
+ if (tokenString) {
353
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
354
+ }
355
+ }
356
+ let urlPath = `/api/v1/sandboxvolumes/{id}/sync/replicas/{replica_id}`;
357
+ urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id'])));
358
+ urlPath = urlPath.replace(`{${"replica_id"}}`, encodeURIComponent(String(requestParameters['replicaId'])));
359
+ const response = await this.request({
360
+ path: urlPath,
361
+ method: 'GET',
362
+ headers: headerParameters,
363
+ query: queryParameters,
364
+ }, initOverrides);
365
+ return new runtime.JSONApiResponse(response, (jsonValue) => SuccessVolumeSyncReplicaResponseFromJSON(jsonValue));
366
+ }
367
+ /**
368
+ * Get a volume sync replica
369
+ */
370
+ async apiV1SandboxvolumesIdSyncReplicasReplicaIdGet(requestParameters, initOverrides) {
371
+ const response = await this.apiV1SandboxvolumesIdSyncReplicasReplicaIdGetRaw(requestParameters, initOverrides);
372
+ return await response.value();
373
+ }
374
+ /**
375
+ * Register or update a volume sync replica
376
+ */
377
+ async apiV1SandboxvolumesIdSyncReplicasReplicaIdPutRaw(requestParameters, initOverrides) {
378
+ if (requestParameters['id'] == null) {
379
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling apiV1SandboxvolumesIdSyncReplicasReplicaIdPut().');
380
+ }
381
+ if (requestParameters['replicaId'] == null) {
382
+ throw new runtime.RequiredError('replicaId', 'Required parameter "replicaId" was null or undefined when calling apiV1SandboxvolumesIdSyncReplicasReplicaIdPut().');
383
+ }
384
+ if (requestParameters['upsertSyncReplicaRequest'] == null) {
385
+ throw new runtime.RequiredError('upsertSyncReplicaRequest', 'Required parameter "upsertSyncReplicaRequest" was null or undefined when calling apiV1SandboxvolumesIdSyncReplicasReplicaIdPut().');
386
+ }
387
+ const queryParameters = {};
388
+ const headerParameters = {};
389
+ headerParameters['Content-Type'] = 'application/json';
390
+ if (this.configuration && this.configuration.accessToken) {
391
+ const token = this.configuration.accessToken;
392
+ const tokenString = await token("bearerAuth", []);
393
+ if (tokenString) {
394
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
395
+ }
396
+ }
397
+ let urlPath = `/api/v1/sandboxvolumes/{id}/sync/replicas/{replica_id}`;
398
+ urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id'])));
399
+ urlPath = urlPath.replace(`{${"replica_id"}}`, encodeURIComponent(String(requestParameters['replicaId'])));
400
+ const response = await this.request({
401
+ path: urlPath,
402
+ method: 'PUT',
403
+ headers: headerParameters,
404
+ query: queryParameters,
405
+ body: UpsertSyncReplicaRequestToJSON(requestParameters['upsertSyncReplicaRequest']),
406
+ }, initOverrides);
407
+ return new runtime.JSONApiResponse(response, (jsonValue) => SuccessVolumeSyncReplicaResponseFromJSON(jsonValue));
408
+ }
409
+ /**
410
+ * Register or update a volume sync replica
411
+ */
412
+ async apiV1SandboxvolumesIdSyncReplicasReplicaIdPut(requestParameters, initOverrides) {
413
+ const response = await this.apiV1SandboxvolumesIdSyncReplicasReplicaIdPutRaw(requestParameters, initOverrides);
414
+ return await response.value();
415
+ }
416
+ }
@@ -13,4 +13,5 @@ export * from './TeamsApi.js';
13
13
  export * from './TemplatesApi.js';
14
14
  export * from './TenantApi.js';
15
15
  export * from './UsersApi.js';
16
+ export * from './VolumeSyncApi.js';
16
17
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/apispec/src/apis/index.ts"],"names":[],"mappings":"AAEA,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;AAC1B,cAAc,eAAe,CAAC;AAC9B,cAAc,wBAAwB,CAAC;AACvC,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,qBAAqB,CAAC;AACpC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,YAAY,CAAC;AAC3B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/apispec/src/apis/index.ts"],"names":[],"mappings":"AAEA,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;AAC1B,cAAc,eAAe,CAAC;AAC9B,cAAc,wBAAwB,CAAC;AACvC,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,qBAAqB,CAAC;AACpC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,YAAY,CAAC;AAC3B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,iBAAiB,CAAC"}
@@ -15,3 +15,4 @@ export * from './TeamsApi.js';
15
15
  export * from './TemplatesApi.js';
16
16
  export * from './TenantApi.js';
17
17
  export * from './UsersApi.js';
18
+ export * from './VolumeSyncApi.js';
@@ -0,0 +1,46 @@
1
+ /**
2
+ * Sandbox0 API
3
+ * Public HTTP APIs exposed by Sandbox0 regional gateways and the global gateway.
4
+ *
5
+ * The version of the OpenAPI document: 0.1.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import type { ChangeRequest } from './ChangeRequest.js';
13
+ /**
14
+ *
15
+ * @export
16
+ * @interface AppendReplicaChangesRequest
17
+ */
18
+ export interface AppendReplicaChangesRequest {
19
+ /**
20
+ *
21
+ * @type {string}
22
+ * @memberof AppendReplicaChangesRequest
23
+ */
24
+ requestId: string;
25
+ /**
26
+ *
27
+ * @type {number}
28
+ * @memberof AppendReplicaChangesRequest
29
+ */
30
+ baseSeq: number;
31
+ /**
32
+ *
33
+ * @type {Array<ChangeRequest>}
34
+ * @memberof AppendReplicaChangesRequest
35
+ */
36
+ changes: Array<ChangeRequest>;
37
+ }
38
+ /**
39
+ * Check if a given object implements the AppendReplicaChangesRequest interface.
40
+ */
41
+ export declare function instanceOfAppendReplicaChangesRequest(value: object): value is AppendReplicaChangesRequest;
42
+ export declare function AppendReplicaChangesRequestFromJSON(json: any): AppendReplicaChangesRequest;
43
+ export declare function AppendReplicaChangesRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): AppendReplicaChangesRequest;
44
+ export declare function AppendReplicaChangesRequestToJSON(json: any): AppendReplicaChangesRequest;
45
+ export declare function AppendReplicaChangesRequestToJSONTyped(value?: AppendReplicaChangesRequest | null, ignoreDiscriminator?: boolean): any;
46
+ //# sourceMappingURL=AppendReplicaChangesRequest.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AppendReplicaChangesRequest.d.ts","sourceRoot":"","sources":["../../../../src/apispec/src/models/AppendReplicaChangesRequest.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;GAUG;AAGH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAQrD;;;;GAIG;AACH,MAAM,WAAW,2BAA2B;IACxC;;;;OAIG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB;;;;OAIG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB;;;;OAIG;IACH,OAAO,EAAE,KAAK,CAAC,aAAa,CAAC,CAAC;CACjC;AAED;;GAEG;AACH,wBAAgB,qCAAqC,CAAC,KAAK,EAAE,MAAM,GAAG,KAAK,IAAI,2BAA2B,CAKzG;AAED,wBAAgB,mCAAmC,CAAC,IAAI,EAAE,GAAG,GAAG,2BAA2B,CAE1F;AAED,wBAAgB,wCAAwC,CAAC,IAAI,EAAE,GAAG,EAAE,mBAAmB,EAAE,OAAO,GAAG,2BAA2B,CAU7H;AAED,wBAAgB,iCAAiC,CAAC,IAAI,EAAE,GAAG,GAAG,2BAA2B,CAExF;AAED,wBAAgB,sCAAsC,CAAC,KAAK,CAAC,EAAE,2BAA2B,GAAG,IAAI,EAAE,mBAAmB,GAAE,OAAe,GAAG,GAAG,CAW5I"}
@@ -0,0 +1,52 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Sandbox0 API
5
+ * Public HTTP APIs exposed by Sandbox0 regional gateways and the global gateway.
6
+ *
7
+ * The version of the OpenAPI document: 0.1.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
+ import { ChangeRequestFromJSON, ChangeRequestToJSON, } from './ChangeRequest.js';
15
+ /**
16
+ * Check if a given object implements the AppendReplicaChangesRequest interface.
17
+ */
18
+ export function instanceOfAppendReplicaChangesRequest(value) {
19
+ if (!('requestId' in value) || value['requestId'] === undefined)
20
+ return false;
21
+ if (!('baseSeq' in value) || value['baseSeq'] === undefined)
22
+ return false;
23
+ if (!('changes' in value) || value['changes'] === undefined)
24
+ return false;
25
+ return true;
26
+ }
27
+ export function AppendReplicaChangesRequestFromJSON(json) {
28
+ return AppendReplicaChangesRequestFromJSONTyped(json, false);
29
+ }
30
+ export function AppendReplicaChangesRequestFromJSONTyped(json, ignoreDiscriminator) {
31
+ if (json == null) {
32
+ return json;
33
+ }
34
+ return {
35
+ 'requestId': json['request_id'],
36
+ 'baseSeq': json['base_seq'],
37
+ 'changes': (json['changes'].map(ChangeRequestFromJSON)),
38
+ };
39
+ }
40
+ export function AppendReplicaChangesRequestToJSON(json) {
41
+ return AppendReplicaChangesRequestToJSONTyped(json, false);
42
+ }
43
+ export function AppendReplicaChangesRequestToJSONTyped(value, ignoreDiscriminator = false) {
44
+ if (value == null) {
45
+ return value;
46
+ }
47
+ return {
48
+ 'request_id': value['requestId'],
49
+ 'base_seq': value['baseSeq'],
50
+ 'changes': (value['changes'].map(ChangeRequestToJSON)),
51
+ };
52
+ }
@@ -0,0 +1,47 @@
1
+ /**
2
+ * Sandbox0 API
3
+ * Public HTTP APIs exposed by Sandbox0 regional gateways and the global gateway.
4
+ *
5
+ * The version of the OpenAPI document: 0.1.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import type { SyncConflict } from './SyncConflict.js';
13
+ import type { SyncJournalEntry } from './SyncJournalEntry.js';
14
+ /**
15
+ *
16
+ * @export
17
+ * @interface AppendReplicaChangesResponse
18
+ */
19
+ export interface AppendReplicaChangesResponse {
20
+ /**
21
+ *
22
+ * @type {number}
23
+ * @memberof AppendReplicaChangesResponse
24
+ */
25
+ headSeq: number;
26
+ /**
27
+ *
28
+ * @type {Array<SyncJournalEntry>}
29
+ * @memberof AppendReplicaChangesResponse
30
+ */
31
+ accepted: Array<SyncJournalEntry>;
32
+ /**
33
+ *
34
+ * @type {Array<SyncConflict>}
35
+ * @memberof AppendReplicaChangesResponse
36
+ */
37
+ conflicts: Array<SyncConflict>;
38
+ }
39
+ /**
40
+ * Check if a given object implements the AppendReplicaChangesResponse interface.
41
+ */
42
+ export declare function instanceOfAppendReplicaChangesResponse(value: object): value is AppendReplicaChangesResponse;
43
+ export declare function AppendReplicaChangesResponseFromJSON(json: any): AppendReplicaChangesResponse;
44
+ export declare function AppendReplicaChangesResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): AppendReplicaChangesResponse;
45
+ export declare function AppendReplicaChangesResponseToJSON(json: any): AppendReplicaChangesResponse;
46
+ export declare function AppendReplicaChangesResponseToJSONTyped(value?: AppendReplicaChangesResponse | null, ignoreDiscriminator?: boolean): any;
47
+ //# sourceMappingURL=AppendReplicaChangesResponse.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AppendReplicaChangesResponse.d.ts","sourceRoot":"","sources":["../../../../src/apispec/src/models/AppendReplicaChangesResponse.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;GAUG;AAGH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAOnD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAQ3D;;;;GAIG;AACH,MAAM,WAAW,4BAA4B;IACzC;;;;OAIG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB;;;;OAIG;IACH,QAAQ,EAAE,KAAK,CAAC,gBAAgB,CAAC,CAAC;IAClC;;;;OAIG;IACH,SAAS,EAAE,KAAK,CAAC,YAAY,CAAC,CAAC;CAClC;AAED;;GAEG;AACH,wBAAgB,sCAAsC,CAAC,KAAK,EAAE,MAAM,GAAG,KAAK,IAAI,4BAA4B,CAK3G;AAED,wBAAgB,oCAAoC,CAAC,IAAI,EAAE,GAAG,GAAG,4BAA4B,CAE5F;AAED,wBAAgB,yCAAyC,CAAC,IAAI,EAAE,GAAG,EAAE,mBAAmB,EAAE,OAAO,GAAG,4BAA4B,CAU/H;AAED,wBAAgB,kCAAkC,CAAC,IAAI,EAAE,GAAG,GAAG,4BAA4B,CAE1F;AAED,wBAAgB,uCAAuC,CAAC,KAAK,CAAC,EAAE,4BAA4B,GAAG,IAAI,EAAE,mBAAmB,GAAE,OAAe,GAAG,GAAG,CAW9I"}
@@ -0,0 +1,53 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Sandbox0 API
5
+ * Public HTTP APIs exposed by Sandbox0 regional gateways and the global gateway.
6
+ *
7
+ * The version of the OpenAPI document: 0.1.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
+ import { SyncConflictFromJSON, SyncConflictToJSON, } from './SyncConflict.js';
15
+ import { SyncJournalEntryFromJSON, SyncJournalEntryToJSON, } from './SyncJournalEntry.js';
16
+ /**
17
+ * Check if a given object implements the AppendReplicaChangesResponse interface.
18
+ */
19
+ export function instanceOfAppendReplicaChangesResponse(value) {
20
+ if (!('headSeq' in value) || value['headSeq'] === undefined)
21
+ return false;
22
+ if (!('accepted' in value) || value['accepted'] === undefined)
23
+ return false;
24
+ if (!('conflicts' in value) || value['conflicts'] === undefined)
25
+ return false;
26
+ return true;
27
+ }
28
+ export function AppendReplicaChangesResponseFromJSON(json) {
29
+ return AppendReplicaChangesResponseFromJSONTyped(json, false);
30
+ }
31
+ export function AppendReplicaChangesResponseFromJSONTyped(json, ignoreDiscriminator) {
32
+ if (json == null) {
33
+ return json;
34
+ }
35
+ return {
36
+ 'headSeq': json['head_seq'],
37
+ 'accepted': (json['accepted'].map(SyncJournalEntryFromJSON)),
38
+ 'conflicts': (json['conflicts'].map(SyncConflictFromJSON)),
39
+ };
40
+ }
41
+ export function AppendReplicaChangesResponseToJSON(json) {
42
+ return AppendReplicaChangesResponseToJSONTyped(json, false);
43
+ }
44
+ export function AppendReplicaChangesResponseToJSONTyped(value, ignoreDiscriminator = false) {
45
+ if (value == null) {
46
+ return value;
47
+ }
48
+ return {
49
+ 'head_seq': value['headSeq'],
50
+ 'accepted': (value['accepted'].map(SyncJournalEntryToJSON)),
51
+ 'conflicts': (value['conflicts'].map(SyncConflictToJSON)),
52
+ };
53
+ }