@spaciv/sdk 0.1.12 → 0.1.14
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.
- package/.openapi-generator/FILES +4 -0
- package/README.md +2 -2
- package/dist/apis/FilesApi.d.ts +37 -4
- package/dist/apis/FilesApi.js +69 -2
- package/dist/esm/apis/FilesApi.d.ts +37 -4
- package/dist/esm/apis/FilesApi.js +69 -2
- package/dist/esm/models/ClientMessage.d.ts +67 -0
- package/dist/esm/models/ClientMessage.js +55 -0
- package/dist/esm/models/EntityChangeActor.d.ts +61 -0
- package/dist/esm/models/EntityChangeActor.js +52 -0
- package/dist/esm/models/EntityChangedEvent.d.ts +84 -0
- package/dist/esm/models/EntityChangedEvent.js +57 -0
- package/dist/esm/models/ModelRecord.d.ts +1 -1
- package/dist/esm/models/ServerMessage.d.ts +92 -0
- package/dist/esm/models/ServerMessage.js +67 -0
- package/dist/esm/models/index.d.ts +4 -0
- package/dist/esm/models/index.js +4 -0
- package/dist/models/ClientMessage.d.ts +67 -0
- package/dist/models/ClientMessage.js +63 -0
- package/dist/models/EntityChangeActor.d.ts +61 -0
- package/dist/models/EntityChangeActor.js +60 -0
- package/dist/models/EntityChangedEvent.d.ts +84 -0
- package/dist/models/EntityChangedEvent.js +65 -0
- package/dist/models/ModelRecord.d.ts +1 -1
- package/dist/models/ServerMessage.d.ts +92 -0
- package/dist/models/ServerMessage.js +75 -0
- package/dist/models/index.d.ts +4 -0
- package/dist/models/index.js +4 -0
- package/package.json +1 -1
- package/src/apis/FilesApi.ts +113 -4
- package/src/models/ClientMessage.ts +114 -0
- package/src/models/EntityChangeActor.ts +108 -0
- package/src/models/EntityChangedEvent.ts +149 -0
- package/src/models/ModelRecord.ts +1 -1
- package/src/models/ServerMessage.ts +151 -0
- package/src/models/index.ts +4 -0
package/.openapi-generator/FILES
CHANGED
|
@@ -117,6 +117,7 @@ src/models/CalcTreeValue.ts
|
|
|
117
117
|
src/models/CalcTypeSingleValue.ts
|
|
118
118
|
src/models/ChangelogOption.ts
|
|
119
119
|
src/models/ChangelogValueOption.ts
|
|
120
|
+
src/models/ClientMessage.ts
|
|
120
121
|
src/models/ConfidentialityData.ts
|
|
121
122
|
src/models/Contribution.ts
|
|
122
123
|
src/models/ContributionChangelogBody.ts
|
|
@@ -202,6 +203,8 @@ src/models/DatasetDataOneOf2.ts
|
|
|
202
203
|
src/models/DatasetModify.ts
|
|
203
204
|
src/models/DatasetRes.ts
|
|
204
205
|
src/models/DaysOffData.ts
|
|
206
|
+
src/models/EntityChangeActor.ts
|
|
207
|
+
src/models/EntityChangedEvent.ts
|
|
205
208
|
src/models/EntryPatch.ts
|
|
206
209
|
src/models/EntryPatchPropertiesValue.ts
|
|
207
210
|
src/models/ErrorDetail.ts
|
|
@@ -355,6 +358,7 @@ src/models/ScriptUsageResBody.ts
|
|
|
355
358
|
src/models/ScriptWebhookResBody.ts
|
|
356
359
|
src/models/SendPasswordPutReqBody.ts
|
|
357
360
|
src/models/SerializedEvent.ts
|
|
361
|
+
src/models/ServerMessage.ts
|
|
358
362
|
src/models/SingleSelectChangelogData.ts
|
|
359
363
|
src/models/SingleSelectContributionData.ts
|
|
360
364
|
src/models/SingleSelectData.ts
|
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
## @spaciv/sdk@0.1.
|
|
1
|
+
## @spaciv/sdk@0.1.14
|
|
2
2
|
|
|
3
3
|
This generator creates TypeScript/JavaScript client that utilizes [Fetch API](https://fetch.spec.whatwg.org/). The generated Node module can be used in the following environments:
|
|
4
4
|
|
|
@@ -36,7 +36,7 @@ navigate to the folder of your consuming project and run one of the following co
|
|
|
36
36
|
_published:_
|
|
37
37
|
|
|
38
38
|
```
|
|
39
|
-
npm install @spaciv/sdk@0.1.
|
|
39
|
+
npm install @spaciv/sdk@0.1.14 --save
|
|
40
40
|
```
|
|
41
41
|
|
|
42
42
|
_unPublished (not recommended):_
|
package/dist/apis/FilesApi.d.ts
CHANGED
|
@@ -29,6 +29,12 @@ export interface FilesApiUpdateAccountFilesRequest {
|
|
|
29
29
|
id: string;
|
|
30
30
|
accountFilePatchBody: AccountFilePatchBody;
|
|
31
31
|
}
|
|
32
|
+
export interface FilesApiUpdateAccountFilesContentRequest {
|
|
33
|
+
id: string;
|
|
34
|
+
ifMatch: string;
|
|
35
|
+
filename?: Blob;
|
|
36
|
+
name?: string;
|
|
37
|
+
}
|
|
32
38
|
/**
|
|
33
39
|
* FilesApi - interface
|
|
34
40
|
*
|
|
@@ -66,7 +72,7 @@ export interface FilesApiInterface {
|
|
|
66
72
|
*/
|
|
67
73
|
deleteAccountFiles(requestParameters: FilesApiDeleteAccountFilesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<object>;
|
|
68
74
|
/**
|
|
69
|
-
* Returns the stored bytes of a file held against the account, with the `mimeType` recorded
|
|
75
|
+
* Returns the stored bytes of a file held against the account, with the `mimeType` recorded when the content was last stored as the `Content-Type`. Files belonging to other accounts are never returned. Served only from the user content host, so that a stored file is isolated from the application\'s own origin; any other host returns 404. The response always carries `Content-Disposition: attachment` and `Content-Security-Policy: default-src \'none\'`, so a file is downloaded rather than rendered even when the browser could display it. The response\'s `ETag` identifies this version of the content: send it back as `If-Match` when replacing the content, so that a change made by someone else in the meantime is not overwritten. The identifier must be one returned by the upload or list operations; a malformed identifier is rejected with 400 and an unknown one with 404. Requires the *View file storage* permission. Returns `403` (`file quarantined: it matched a virus signature`) when a rescan found the stored file matches a virus signature; the bytes are kept for investigation.
|
|
70
76
|
* @summary Download an account file
|
|
71
77
|
* @param {string} id
|
|
72
78
|
* @param {*} [options] Override http request option.
|
|
@@ -75,7 +81,7 @@ export interface FilesApiInterface {
|
|
|
75
81
|
*/
|
|
76
82
|
getAccountFilesContentRaw(requestParameters: FilesApiGetAccountFilesContentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<string>>;
|
|
77
83
|
/**
|
|
78
|
-
* Returns the stored bytes of a file held against the account, with the `mimeType` recorded
|
|
84
|
+
* Returns the stored bytes of a file held against the account, with the `mimeType` recorded when the content was last stored as the `Content-Type`. Files belonging to other accounts are never returned. Served only from the user content host, so that a stored file is isolated from the application\'s own origin; any other host returns 404. The response always carries `Content-Disposition: attachment` and `Content-Security-Policy: default-src \'none\'`, so a file is downloaded rather than rendered even when the browser could display it. The response\'s `ETag` identifies this version of the content: send it back as `If-Match` when replacing the content, so that a change made by someone else in the meantime is not overwritten. The identifier must be one returned by the upload or list operations; a malformed identifier is rejected with 400 and an unknown one with 404. Requires the *View file storage* permission. Returns `403` (`file quarantined: it matched a virus signature`) when a rescan found the stored file matches a virus signature; the bytes are kept for investigation.
|
|
79
85
|
* Download an account file
|
|
80
86
|
*/
|
|
81
87
|
getAccountFilesContent(requestParameters: FilesApiGetAccountFilesContentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<string>;
|
|
@@ -109,6 +115,23 @@ export interface FilesApiInterface {
|
|
|
109
115
|
* Rename an account file
|
|
110
116
|
*/
|
|
111
117
|
updateAccountFiles(requestParameters: FilesApiUpdateAccountFilesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ModelRecord>;
|
|
118
|
+
/**
|
|
119
|
+
* Replaces the stored bytes of a file held against the account and returns the updated record, with the new version of the content as the `ETag`. Send the request as `multipart/form-data` with a single file field named `file`. The uploaded file\'s name is ignored: the file keeps its name and identifier, so anything already referencing it keeps working. `mimeType` is detected again from the new contents. Maximum file size is 25 MiB, and the content is rejected if a virus scan fails. Send the `ETag` returned when the content was read as `If-Match`. If the file has been replaced since then, the request is rejected with 412 and nothing changes; read the content again before deciding what to save. A missing `If-Match` is rejected with 422, and `*` with 400. The difference in size counts towards the account\'s 1 GiB storage quota, and content that would take the account past it is rejected with 413. A 409 means concurrent changes to the account\'s files kept changing its usage while the content was being replaced. The new content may already be stored, so read the content and its `ETag` again before deciding what to save: retrying with the same `If-Match` is rejected with 412 if it was. The identifier must be one returned by the upload or list operations; a malformed identifier is rejected with 400 and an unknown one with 404. A quarantined file cannot be replaced (403). Requires the *Edit file storage* permission.
|
|
120
|
+
* @summary Replace an account file\'s content
|
|
121
|
+
* @param {string} id
|
|
122
|
+
* @param {string} ifMatch The ETag returned when the file\'s content was read. The content is replaced only if it has not changed since.
|
|
123
|
+
* @param {Blob} [filename] filename of the file being uploaded
|
|
124
|
+
* @param {string} [name] general purpose name for multipart form value
|
|
125
|
+
* @param {*} [options] Override http request option.
|
|
126
|
+
* @throws {RequiredError}
|
|
127
|
+
* @memberof FilesApiInterface
|
|
128
|
+
*/
|
|
129
|
+
updateAccountFilesContentRaw(requestParameters: FilesApiUpdateAccountFilesContentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ModelRecord>>;
|
|
130
|
+
/**
|
|
131
|
+
* Replaces the stored bytes of a file held against the account and returns the updated record, with the new version of the content as the `ETag`. Send the request as `multipart/form-data` with a single file field named `file`. The uploaded file\'s name is ignored: the file keeps its name and identifier, so anything already referencing it keeps working. `mimeType` is detected again from the new contents. Maximum file size is 25 MiB, and the content is rejected if a virus scan fails. Send the `ETag` returned when the content was read as `If-Match`. If the file has been replaced since then, the request is rejected with 412 and nothing changes; read the content again before deciding what to save. A missing `If-Match` is rejected with 422, and `*` with 400. The difference in size counts towards the account\'s 1 GiB storage quota, and content that would take the account past it is rejected with 413. A 409 means concurrent changes to the account\'s files kept changing its usage while the content was being replaced. The new content may already be stored, so read the content and its `ETag` again before deciding what to save: retrying with the same `If-Match` is rejected with 412 if it was. The identifier must be one returned by the upload or list operations; a malformed identifier is rejected with 400 and an unknown one with 404. A quarantined file cannot be replaced (403). Requires the *Edit file storage* permission.
|
|
132
|
+
* Replace an account file\'s content
|
|
133
|
+
*/
|
|
134
|
+
updateAccountFilesContent(requestParameters: FilesApiUpdateAccountFilesContentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ModelRecord>;
|
|
112
135
|
}
|
|
113
136
|
/**
|
|
114
137
|
*
|
|
@@ -135,12 +158,12 @@ export declare class FilesApi extends runtime.BaseAPI implements FilesApiInterfa
|
|
|
135
158
|
*/
|
|
136
159
|
deleteAccountFiles(requestParameters: FilesApiDeleteAccountFilesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<object>;
|
|
137
160
|
/**
|
|
138
|
-
* Returns the stored bytes of a file held against the account, with the `mimeType` recorded
|
|
161
|
+
* Returns the stored bytes of a file held against the account, with the `mimeType` recorded when the content was last stored as the `Content-Type`. Files belonging to other accounts are never returned. Served only from the user content host, so that a stored file is isolated from the application\'s own origin; any other host returns 404. The response always carries `Content-Disposition: attachment` and `Content-Security-Policy: default-src \'none\'`, so a file is downloaded rather than rendered even when the browser could display it. The response\'s `ETag` identifies this version of the content: send it back as `If-Match` when replacing the content, so that a change made by someone else in the meantime is not overwritten. The identifier must be one returned by the upload or list operations; a malformed identifier is rejected with 400 and an unknown one with 404. Requires the *View file storage* permission. Returns `403` (`file quarantined: it matched a virus signature`) when a rescan found the stored file matches a virus signature; the bytes are kept for investigation.
|
|
139
162
|
* Download an account file
|
|
140
163
|
*/
|
|
141
164
|
getAccountFilesContentRaw(requestParameters: FilesApiGetAccountFilesContentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<string>>;
|
|
142
165
|
/**
|
|
143
|
-
* Returns the stored bytes of a file held against the account, with the `mimeType` recorded
|
|
166
|
+
* Returns the stored bytes of a file held against the account, with the `mimeType` recorded when the content was last stored as the `Content-Type`. Files belonging to other accounts are never returned. Served only from the user content host, so that a stored file is isolated from the application\'s own origin; any other host returns 404. The response always carries `Content-Disposition: attachment` and `Content-Security-Policy: default-src \'none\'`, so a file is downloaded rather than rendered even when the browser could display it. The response\'s `ETag` identifies this version of the content: send it back as `If-Match` when replacing the content, so that a change made by someone else in the meantime is not overwritten. The identifier must be one returned by the upload or list operations; a malformed identifier is rejected with 400 and an unknown one with 404. Requires the *View file storage* permission. Returns `403` (`file quarantined: it matched a virus signature`) when a rescan found the stored file matches a virus signature; the bytes are kept for investigation.
|
|
144
167
|
* Download an account file
|
|
145
168
|
*/
|
|
146
169
|
getAccountFilesContent(requestParameters: FilesApiGetAccountFilesContentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<string>;
|
|
@@ -164,4 +187,14 @@ export declare class FilesApi extends runtime.BaseAPI implements FilesApiInterfa
|
|
|
164
187
|
* Rename an account file
|
|
165
188
|
*/
|
|
166
189
|
updateAccountFiles(requestParameters: FilesApiUpdateAccountFilesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ModelRecord>;
|
|
190
|
+
/**
|
|
191
|
+
* Replaces the stored bytes of a file held against the account and returns the updated record, with the new version of the content as the `ETag`. Send the request as `multipart/form-data` with a single file field named `file`. The uploaded file\'s name is ignored: the file keeps its name and identifier, so anything already referencing it keeps working. `mimeType` is detected again from the new contents. Maximum file size is 25 MiB, and the content is rejected if a virus scan fails. Send the `ETag` returned when the content was read as `If-Match`. If the file has been replaced since then, the request is rejected with 412 and nothing changes; read the content again before deciding what to save. A missing `If-Match` is rejected with 422, and `*` with 400. The difference in size counts towards the account\'s 1 GiB storage quota, and content that would take the account past it is rejected with 413. A 409 means concurrent changes to the account\'s files kept changing its usage while the content was being replaced. The new content may already be stored, so read the content and its `ETag` again before deciding what to save: retrying with the same `If-Match` is rejected with 412 if it was. The identifier must be one returned by the upload or list operations; a malformed identifier is rejected with 400 and an unknown one with 404. A quarantined file cannot be replaced (403). Requires the *Edit file storage* permission.
|
|
192
|
+
* Replace an account file\'s content
|
|
193
|
+
*/
|
|
194
|
+
updateAccountFilesContentRaw(requestParameters: FilesApiUpdateAccountFilesContentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ModelRecord>>;
|
|
195
|
+
/**
|
|
196
|
+
* Replaces the stored bytes of a file held against the account and returns the updated record, with the new version of the content as the `ETag`. Send the request as `multipart/form-data` with a single file field named `file`. The uploaded file\'s name is ignored: the file keeps its name and identifier, so anything already referencing it keeps working. `mimeType` is detected again from the new contents. Maximum file size is 25 MiB, and the content is rejected if a virus scan fails. Send the `ETag` returned when the content was read as `If-Match`. If the file has been replaced since then, the request is rejected with 412 and nothing changes; read the content again before deciding what to save. A missing `If-Match` is rejected with 422, and `*` with 400. The difference in size counts towards the account\'s 1 GiB storage quota, and content that would take the account past it is rejected with 413. A 409 means concurrent changes to the account\'s files kept changing its usage while the content was being replaced. The new content may already be stored, so read the content and its `ETag` again before deciding what to save: retrying with the same `If-Match` is rejected with 412 if it was. The identifier must be one returned by the upload or list operations; a malformed identifier is rejected with 400 and an unknown one with 404. A quarantined file cannot be replaced (403). Requires the *Edit file storage* permission.
|
|
197
|
+
* Replace an account file\'s content
|
|
198
|
+
*/
|
|
199
|
+
updateAccountFilesContent(requestParameters: FilesApiUpdateAccountFilesContentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ModelRecord>;
|
|
167
200
|
}
|
package/dist/apis/FilesApi.js
CHANGED
|
@@ -126,7 +126,7 @@ class FilesApi extends runtime.BaseAPI {
|
|
|
126
126
|
});
|
|
127
127
|
}
|
|
128
128
|
/**
|
|
129
|
-
* Returns the stored bytes of a file held against the account, with the `mimeType` recorded
|
|
129
|
+
* Returns the stored bytes of a file held against the account, with the `mimeType` recorded when the content was last stored as the `Content-Type`. Files belonging to other accounts are never returned. Served only from the user content host, so that a stored file is isolated from the application\'s own origin; any other host returns 404. The response always carries `Content-Disposition: attachment` and `Content-Security-Policy: default-src \'none\'`, so a file is downloaded rather than rendered even when the browser could display it. The response\'s `ETag` identifies this version of the content: send it back as `If-Match` when replacing the content, so that a change made by someone else in the meantime is not overwritten. The identifier must be one returned by the upload or list operations; a malformed identifier is rejected with 400 and an unknown one with 404. Requires the *View file storage* permission. Returns `403` (`file quarantined: it matched a virus signature`) when a rescan found the stored file matches a virus signature; the bytes are kept for investigation.
|
|
130
130
|
* Download an account file
|
|
131
131
|
*/
|
|
132
132
|
getAccountFilesContentRaw(requestParameters, initOverrides) {
|
|
@@ -160,7 +160,7 @@ class FilesApi extends runtime.BaseAPI {
|
|
|
160
160
|
});
|
|
161
161
|
}
|
|
162
162
|
/**
|
|
163
|
-
* Returns the stored bytes of a file held against the account, with the `mimeType` recorded
|
|
163
|
+
* Returns the stored bytes of a file held against the account, with the `mimeType` recorded when the content was last stored as the `Content-Type`. Files belonging to other accounts are never returned. Served only from the user content host, so that a stored file is isolated from the application\'s own origin; any other host returns 404. The response always carries `Content-Disposition: attachment` and `Content-Security-Policy: default-src \'none\'`, so a file is downloaded rather than rendered even when the browser could display it. The response\'s `ETag` identifies this version of the content: send it back as `If-Match` when replacing the content, so that a change made by someone else in the meantime is not overwritten. The identifier must be one returned by the upload or list operations; a malformed identifier is rejected with 400 and an unknown one with 404. Requires the *View file storage* permission. Returns `403` (`file quarantined: it matched a virus signature`) when a rescan found the stored file matches a virus signature; the bytes are kept for investigation.
|
|
164
164
|
* Download an account file
|
|
165
165
|
*/
|
|
166
166
|
getAccountFilesContent(requestParameters, initOverrides) {
|
|
@@ -254,5 +254,72 @@ class FilesApi extends runtime.BaseAPI {
|
|
|
254
254
|
return yield response.value();
|
|
255
255
|
});
|
|
256
256
|
}
|
|
257
|
+
/**
|
|
258
|
+
* Replaces the stored bytes of a file held against the account and returns the updated record, with the new version of the content as the `ETag`. Send the request as `multipart/form-data` with a single file field named `file`. The uploaded file\'s name is ignored: the file keeps its name and identifier, so anything already referencing it keeps working. `mimeType` is detected again from the new contents. Maximum file size is 25 MiB, and the content is rejected if a virus scan fails. Send the `ETag` returned when the content was read as `If-Match`. If the file has been replaced since then, the request is rejected with 412 and nothing changes; read the content again before deciding what to save. A missing `If-Match` is rejected with 422, and `*` with 400. The difference in size counts towards the account\'s 1 GiB storage quota, and content that would take the account past it is rejected with 413. A 409 means concurrent changes to the account\'s files kept changing its usage while the content was being replaced. The new content may already be stored, so read the content and its `ETag` again before deciding what to save: retrying with the same `If-Match` is rejected with 412 if it was. The identifier must be one returned by the upload or list operations; a malformed identifier is rejected with 400 and an unknown one with 404. A quarantined file cannot be replaced (403). Requires the *Edit file storage* permission.
|
|
259
|
+
* Replace an account file\'s content
|
|
260
|
+
*/
|
|
261
|
+
updateAccountFilesContentRaw(requestParameters, initOverrides) {
|
|
262
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
263
|
+
if (requestParameters['id'] == null) {
|
|
264
|
+
throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling updateAccountFilesContent().');
|
|
265
|
+
}
|
|
266
|
+
if (requestParameters['ifMatch'] == null) {
|
|
267
|
+
throw new runtime.RequiredError('ifMatch', 'Required parameter "ifMatch" was null or undefined when calling updateAccountFilesContent().');
|
|
268
|
+
}
|
|
269
|
+
const queryParameters = {};
|
|
270
|
+
const headerParameters = {};
|
|
271
|
+
if (requestParameters['ifMatch'] != null) {
|
|
272
|
+
headerParameters['If-Match'] = String(requestParameters['ifMatch']);
|
|
273
|
+
}
|
|
274
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
275
|
+
const token = this.configuration.accessToken;
|
|
276
|
+
const tokenString = yield token("accessToken", []);
|
|
277
|
+
if (tokenString) {
|
|
278
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
const consumes = [
|
|
282
|
+
{ contentType: 'multipart/form-data' },
|
|
283
|
+
];
|
|
284
|
+
// @ts-ignore: canConsumeForm may be unused
|
|
285
|
+
const canConsumeForm = runtime.canConsumeForm(consumes);
|
|
286
|
+
let formParams;
|
|
287
|
+
let useForm = false;
|
|
288
|
+
// use FormData to transmit files using content-type "multipart/form-data"
|
|
289
|
+
useForm = canConsumeForm;
|
|
290
|
+
if (useForm) {
|
|
291
|
+
formParams = new FormData();
|
|
292
|
+
}
|
|
293
|
+
else {
|
|
294
|
+
formParams = new URLSearchParams();
|
|
295
|
+
}
|
|
296
|
+
if (requestParameters['filename'] != null) {
|
|
297
|
+
formParams.append('filename', requestParameters['filename']);
|
|
298
|
+
}
|
|
299
|
+
if (requestParameters['name'] != null) {
|
|
300
|
+
formParams.append('name', requestParameters['name']);
|
|
301
|
+
}
|
|
302
|
+
let urlPath = `/v1/account/files/{id}/content`;
|
|
303
|
+
urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id'])));
|
|
304
|
+
const response = yield this.request({
|
|
305
|
+
path: urlPath,
|
|
306
|
+
method: 'PUT',
|
|
307
|
+
headers: headerParameters,
|
|
308
|
+
query: queryParameters,
|
|
309
|
+
body: formParams,
|
|
310
|
+
}, initOverrides);
|
|
311
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.ModelRecordFromJSON)(jsonValue));
|
|
312
|
+
});
|
|
313
|
+
}
|
|
314
|
+
/**
|
|
315
|
+
* Replaces the stored bytes of a file held against the account and returns the updated record, with the new version of the content as the `ETag`. Send the request as `multipart/form-data` with a single file field named `file`. The uploaded file\'s name is ignored: the file keeps its name and identifier, so anything already referencing it keeps working. `mimeType` is detected again from the new contents. Maximum file size is 25 MiB, and the content is rejected if a virus scan fails. Send the `ETag` returned when the content was read as `If-Match`. If the file has been replaced since then, the request is rejected with 412 and nothing changes; read the content again before deciding what to save. A missing `If-Match` is rejected with 422, and `*` with 400. The difference in size counts towards the account\'s 1 GiB storage quota, and content that would take the account past it is rejected with 413. A 409 means concurrent changes to the account\'s files kept changing its usage while the content was being replaced. The new content may already be stored, so read the content and its `ETag` again before deciding what to save: retrying with the same `If-Match` is rejected with 412 if it was. The identifier must be one returned by the upload or list operations; a malformed identifier is rejected with 400 and an unknown one with 404. A quarantined file cannot be replaced (403). Requires the *Edit file storage* permission.
|
|
316
|
+
* Replace an account file\'s content
|
|
317
|
+
*/
|
|
318
|
+
updateAccountFilesContent(requestParameters, initOverrides) {
|
|
319
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
320
|
+
const response = yield this.updateAccountFilesContentRaw(requestParameters, initOverrides);
|
|
321
|
+
return yield response.value();
|
|
322
|
+
});
|
|
323
|
+
}
|
|
257
324
|
}
|
|
258
325
|
exports.FilesApi = FilesApi;
|
|
@@ -29,6 +29,12 @@ export interface FilesApiUpdateAccountFilesRequest {
|
|
|
29
29
|
id: string;
|
|
30
30
|
accountFilePatchBody: AccountFilePatchBody;
|
|
31
31
|
}
|
|
32
|
+
export interface FilesApiUpdateAccountFilesContentRequest {
|
|
33
|
+
id: string;
|
|
34
|
+
ifMatch: string;
|
|
35
|
+
filename?: Blob;
|
|
36
|
+
name?: string;
|
|
37
|
+
}
|
|
32
38
|
/**
|
|
33
39
|
* FilesApi - interface
|
|
34
40
|
*
|
|
@@ -66,7 +72,7 @@ export interface FilesApiInterface {
|
|
|
66
72
|
*/
|
|
67
73
|
deleteAccountFiles(requestParameters: FilesApiDeleteAccountFilesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<object>;
|
|
68
74
|
/**
|
|
69
|
-
* Returns the stored bytes of a file held against the account, with the `mimeType` recorded
|
|
75
|
+
* Returns the stored bytes of a file held against the account, with the `mimeType` recorded when the content was last stored as the `Content-Type`. Files belonging to other accounts are never returned. Served only from the user content host, so that a stored file is isolated from the application\'s own origin; any other host returns 404. The response always carries `Content-Disposition: attachment` and `Content-Security-Policy: default-src \'none\'`, so a file is downloaded rather than rendered even when the browser could display it. The response\'s `ETag` identifies this version of the content: send it back as `If-Match` when replacing the content, so that a change made by someone else in the meantime is not overwritten. The identifier must be one returned by the upload or list operations; a malformed identifier is rejected with 400 and an unknown one with 404. Requires the *View file storage* permission. Returns `403` (`file quarantined: it matched a virus signature`) when a rescan found the stored file matches a virus signature; the bytes are kept for investigation.
|
|
70
76
|
* @summary Download an account file
|
|
71
77
|
* @param {string} id
|
|
72
78
|
* @param {*} [options] Override http request option.
|
|
@@ -75,7 +81,7 @@ export interface FilesApiInterface {
|
|
|
75
81
|
*/
|
|
76
82
|
getAccountFilesContentRaw(requestParameters: FilesApiGetAccountFilesContentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<string>>;
|
|
77
83
|
/**
|
|
78
|
-
* Returns the stored bytes of a file held against the account, with the `mimeType` recorded
|
|
84
|
+
* Returns the stored bytes of a file held against the account, with the `mimeType` recorded when the content was last stored as the `Content-Type`. Files belonging to other accounts are never returned. Served only from the user content host, so that a stored file is isolated from the application\'s own origin; any other host returns 404. The response always carries `Content-Disposition: attachment` and `Content-Security-Policy: default-src \'none\'`, so a file is downloaded rather than rendered even when the browser could display it. The response\'s `ETag` identifies this version of the content: send it back as `If-Match` when replacing the content, so that a change made by someone else in the meantime is not overwritten. The identifier must be one returned by the upload or list operations; a malformed identifier is rejected with 400 and an unknown one with 404. Requires the *View file storage* permission. Returns `403` (`file quarantined: it matched a virus signature`) when a rescan found the stored file matches a virus signature; the bytes are kept for investigation.
|
|
79
85
|
* Download an account file
|
|
80
86
|
*/
|
|
81
87
|
getAccountFilesContent(requestParameters: FilesApiGetAccountFilesContentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<string>;
|
|
@@ -109,6 +115,23 @@ export interface FilesApiInterface {
|
|
|
109
115
|
* Rename an account file
|
|
110
116
|
*/
|
|
111
117
|
updateAccountFiles(requestParameters: FilesApiUpdateAccountFilesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ModelRecord>;
|
|
118
|
+
/**
|
|
119
|
+
* Replaces the stored bytes of a file held against the account and returns the updated record, with the new version of the content as the `ETag`. Send the request as `multipart/form-data` with a single file field named `file`. The uploaded file\'s name is ignored: the file keeps its name and identifier, so anything already referencing it keeps working. `mimeType` is detected again from the new contents. Maximum file size is 25 MiB, and the content is rejected if a virus scan fails. Send the `ETag` returned when the content was read as `If-Match`. If the file has been replaced since then, the request is rejected with 412 and nothing changes; read the content again before deciding what to save. A missing `If-Match` is rejected with 422, and `*` with 400. The difference in size counts towards the account\'s 1 GiB storage quota, and content that would take the account past it is rejected with 413. A 409 means concurrent changes to the account\'s files kept changing its usage while the content was being replaced. The new content may already be stored, so read the content and its `ETag` again before deciding what to save: retrying with the same `If-Match` is rejected with 412 if it was. The identifier must be one returned by the upload or list operations; a malformed identifier is rejected with 400 and an unknown one with 404. A quarantined file cannot be replaced (403). Requires the *Edit file storage* permission.
|
|
120
|
+
* @summary Replace an account file\'s content
|
|
121
|
+
* @param {string} id
|
|
122
|
+
* @param {string} ifMatch The ETag returned when the file\'s content was read. The content is replaced only if it has not changed since.
|
|
123
|
+
* @param {Blob} [filename] filename of the file being uploaded
|
|
124
|
+
* @param {string} [name] general purpose name for multipart form value
|
|
125
|
+
* @param {*} [options] Override http request option.
|
|
126
|
+
* @throws {RequiredError}
|
|
127
|
+
* @memberof FilesApiInterface
|
|
128
|
+
*/
|
|
129
|
+
updateAccountFilesContentRaw(requestParameters: FilesApiUpdateAccountFilesContentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ModelRecord>>;
|
|
130
|
+
/**
|
|
131
|
+
* Replaces the stored bytes of a file held against the account and returns the updated record, with the new version of the content as the `ETag`. Send the request as `multipart/form-data` with a single file field named `file`. The uploaded file\'s name is ignored: the file keeps its name and identifier, so anything already referencing it keeps working. `mimeType` is detected again from the new contents. Maximum file size is 25 MiB, and the content is rejected if a virus scan fails. Send the `ETag` returned when the content was read as `If-Match`. If the file has been replaced since then, the request is rejected with 412 and nothing changes; read the content again before deciding what to save. A missing `If-Match` is rejected with 422, and `*` with 400. The difference in size counts towards the account\'s 1 GiB storage quota, and content that would take the account past it is rejected with 413. A 409 means concurrent changes to the account\'s files kept changing its usage while the content was being replaced. The new content may already be stored, so read the content and its `ETag` again before deciding what to save: retrying with the same `If-Match` is rejected with 412 if it was. The identifier must be one returned by the upload or list operations; a malformed identifier is rejected with 400 and an unknown one with 404. A quarantined file cannot be replaced (403). Requires the *Edit file storage* permission.
|
|
132
|
+
* Replace an account file\'s content
|
|
133
|
+
*/
|
|
134
|
+
updateAccountFilesContent(requestParameters: FilesApiUpdateAccountFilesContentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ModelRecord>;
|
|
112
135
|
}
|
|
113
136
|
/**
|
|
114
137
|
*
|
|
@@ -135,12 +158,12 @@ export declare class FilesApi extends runtime.BaseAPI implements FilesApiInterfa
|
|
|
135
158
|
*/
|
|
136
159
|
deleteAccountFiles(requestParameters: FilesApiDeleteAccountFilesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<object>;
|
|
137
160
|
/**
|
|
138
|
-
* Returns the stored bytes of a file held against the account, with the `mimeType` recorded
|
|
161
|
+
* Returns the stored bytes of a file held against the account, with the `mimeType` recorded when the content was last stored as the `Content-Type`. Files belonging to other accounts are never returned. Served only from the user content host, so that a stored file is isolated from the application\'s own origin; any other host returns 404. The response always carries `Content-Disposition: attachment` and `Content-Security-Policy: default-src \'none\'`, so a file is downloaded rather than rendered even when the browser could display it. The response\'s `ETag` identifies this version of the content: send it back as `If-Match` when replacing the content, so that a change made by someone else in the meantime is not overwritten. The identifier must be one returned by the upload or list operations; a malformed identifier is rejected with 400 and an unknown one with 404. Requires the *View file storage* permission. Returns `403` (`file quarantined: it matched a virus signature`) when a rescan found the stored file matches a virus signature; the bytes are kept for investigation.
|
|
139
162
|
* Download an account file
|
|
140
163
|
*/
|
|
141
164
|
getAccountFilesContentRaw(requestParameters: FilesApiGetAccountFilesContentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<string>>;
|
|
142
165
|
/**
|
|
143
|
-
* Returns the stored bytes of a file held against the account, with the `mimeType` recorded
|
|
166
|
+
* Returns the stored bytes of a file held against the account, with the `mimeType` recorded when the content was last stored as the `Content-Type`. Files belonging to other accounts are never returned. Served only from the user content host, so that a stored file is isolated from the application\'s own origin; any other host returns 404. The response always carries `Content-Disposition: attachment` and `Content-Security-Policy: default-src \'none\'`, so a file is downloaded rather than rendered even when the browser could display it. The response\'s `ETag` identifies this version of the content: send it back as `If-Match` when replacing the content, so that a change made by someone else in the meantime is not overwritten. The identifier must be one returned by the upload or list operations; a malformed identifier is rejected with 400 and an unknown one with 404. Requires the *View file storage* permission. Returns `403` (`file quarantined: it matched a virus signature`) when a rescan found the stored file matches a virus signature; the bytes are kept for investigation.
|
|
144
167
|
* Download an account file
|
|
145
168
|
*/
|
|
146
169
|
getAccountFilesContent(requestParameters: FilesApiGetAccountFilesContentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<string>;
|
|
@@ -164,4 +187,14 @@ export declare class FilesApi extends runtime.BaseAPI implements FilesApiInterfa
|
|
|
164
187
|
* Rename an account file
|
|
165
188
|
*/
|
|
166
189
|
updateAccountFiles(requestParameters: FilesApiUpdateAccountFilesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ModelRecord>;
|
|
190
|
+
/**
|
|
191
|
+
* Replaces the stored bytes of a file held against the account and returns the updated record, with the new version of the content as the `ETag`. Send the request as `multipart/form-data` with a single file field named `file`. The uploaded file\'s name is ignored: the file keeps its name and identifier, so anything already referencing it keeps working. `mimeType` is detected again from the new contents. Maximum file size is 25 MiB, and the content is rejected if a virus scan fails. Send the `ETag` returned when the content was read as `If-Match`. If the file has been replaced since then, the request is rejected with 412 and nothing changes; read the content again before deciding what to save. A missing `If-Match` is rejected with 422, and `*` with 400. The difference in size counts towards the account\'s 1 GiB storage quota, and content that would take the account past it is rejected with 413. A 409 means concurrent changes to the account\'s files kept changing its usage while the content was being replaced. The new content may already be stored, so read the content and its `ETag` again before deciding what to save: retrying with the same `If-Match` is rejected with 412 if it was. The identifier must be one returned by the upload or list operations; a malformed identifier is rejected with 400 and an unknown one with 404. A quarantined file cannot be replaced (403). Requires the *Edit file storage* permission.
|
|
192
|
+
* Replace an account file\'s content
|
|
193
|
+
*/
|
|
194
|
+
updateAccountFilesContentRaw(requestParameters: FilesApiUpdateAccountFilesContentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ModelRecord>>;
|
|
195
|
+
/**
|
|
196
|
+
* Replaces the stored bytes of a file held against the account and returns the updated record, with the new version of the content as the `ETag`. Send the request as `multipart/form-data` with a single file field named `file`. The uploaded file\'s name is ignored: the file keeps its name and identifier, so anything already referencing it keeps working. `mimeType` is detected again from the new contents. Maximum file size is 25 MiB, and the content is rejected if a virus scan fails. Send the `ETag` returned when the content was read as `If-Match`. If the file has been replaced since then, the request is rejected with 412 and nothing changes; read the content again before deciding what to save. A missing `If-Match` is rejected with 422, and `*` with 400. The difference in size counts towards the account\'s 1 GiB storage quota, and content that would take the account past it is rejected with 413. A 409 means concurrent changes to the account\'s files kept changing its usage while the content was being replaced. The new content may already be stored, so read the content and its `ETag` again before deciding what to save: retrying with the same `If-Match` is rejected with 412 if it was. The identifier must be one returned by the upload or list operations; a malformed identifier is rejected with 400 and an unknown one with 404. A quarantined file cannot be replaced (403). Requires the *Edit file storage* permission.
|
|
197
|
+
* Replace an account file\'s content
|
|
198
|
+
*/
|
|
199
|
+
updateAccountFilesContent(requestParameters: FilesApiUpdateAccountFilesContentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ModelRecord>;
|
|
167
200
|
}
|
|
@@ -123,7 +123,7 @@ export class FilesApi extends runtime.BaseAPI {
|
|
|
123
123
|
});
|
|
124
124
|
}
|
|
125
125
|
/**
|
|
126
|
-
* Returns the stored bytes of a file held against the account, with the `mimeType` recorded
|
|
126
|
+
* Returns the stored bytes of a file held against the account, with the `mimeType` recorded when the content was last stored as the `Content-Type`. Files belonging to other accounts are never returned. Served only from the user content host, so that a stored file is isolated from the application\'s own origin; any other host returns 404. The response always carries `Content-Disposition: attachment` and `Content-Security-Policy: default-src \'none\'`, so a file is downloaded rather than rendered even when the browser could display it. The response\'s `ETag` identifies this version of the content: send it back as `If-Match` when replacing the content, so that a change made by someone else in the meantime is not overwritten. The identifier must be one returned by the upload or list operations; a malformed identifier is rejected with 400 and an unknown one with 404. Requires the *View file storage* permission. Returns `403` (`file quarantined: it matched a virus signature`) when a rescan found the stored file matches a virus signature; the bytes are kept for investigation.
|
|
127
127
|
* Download an account file
|
|
128
128
|
*/
|
|
129
129
|
getAccountFilesContentRaw(requestParameters, initOverrides) {
|
|
@@ -157,7 +157,7 @@ export class FilesApi extends runtime.BaseAPI {
|
|
|
157
157
|
});
|
|
158
158
|
}
|
|
159
159
|
/**
|
|
160
|
-
* Returns the stored bytes of a file held against the account, with the `mimeType` recorded
|
|
160
|
+
* Returns the stored bytes of a file held against the account, with the `mimeType` recorded when the content was last stored as the `Content-Type`. Files belonging to other accounts are never returned. Served only from the user content host, so that a stored file is isolated from the application\'s own origin; any other host returns 404. The response always carries `Content-Disposition: attachment` and `Content-Security-Policy: default-src \'none\'`, so a file is downloaded rather than rendered even when the browser could display it. The response\'s `ETag` identifies this version of the content: send it back as `If-Match` when replacing the content, so that a change made by someone else in the meantime is not overwritten. The identifier must be one returned by the upload or list operations; a malformed identifier is rejected with 400 and an unknown one with 404. Requires the *View file storage* permission. Returns `403` (`file quarantined: it matched a virus signature`) when a rescan found the stored file matches a virus signature; the bytes are kept for investigation.
|
|
161
161
|
* Download an account file
|
|
162
162
|
*/
|
|
163
163
|
getAccountFilesContent(requestParameters, initOverrides) {
|
|
@@ -251,4 +251,71 @@ export class FilesApi extends runtime.BaseAPI {
|
|
|
251
251
|
return yield response.value();
|
|
252
252
|
});
|
|
253
253
|
}
|
|
254
|
+
/**
|
|
255
|
+
* Replaces the stored bytes of a file held against the account and returns the updated record, with the new version of the content as the `ETag`. Send the request as `multipart/form-data` with a single file field named `file`. The uploaded file\'s name is ignored: the file keeps its name and identifier, so anything already referencing it keeps working. `mimeType` is detected again from the new contents. Maximum file size is 25 MiB, and the content is rejected if a virus scan fails. Send the `ETag` returned when the content was read as `If-Match`. If the file has been replaced since then, the request is rejected with 412 and nothing changes; read the content again before deciding what to save. A missing `If-Match` is rejected with 422, and `*` with 400. The difference in size counts towards the account\'s 1 GiB storage quota, and content that would take the account past it is rejected with 413. A 409 means concurrent changes to the account\'s files kept changing its usage while the content was being replaced. The new content may already be stored, so read the content and its `ETag` again before deciding what to save: retrying with the same `If-Match` is rejected with 412 if it was. The identifier must be one returned by the upload or list operations; a malformed identifier is rejected with 400 and an unknown one with 404. A quarantined file cannot be replaced (403). Requires the *Edit file storage* permission.
|
|
256
|
+
* Replace an account file\'s content
|
|
257
|
+
*/
|
|
258
|
+
updateAccountFilesContentRaw(requestParameters, initOverrides) {
|
|
259
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
260
|
+
if (requestParameters['id'] == null) {
|
|
261
|
+
throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling updateAccountFilesContent().');
|
|
262
|
+
}
|
|
263
|
+
if (requestParameters['ifMatch'] == null) {
|
|
264
|
+
throw new runtime.RequiredError('ifMatch', 'Required parameter "ifMatch" was null or undefined when calling updateAccountFilesContent().');
|
|
265
|
+
}
|
|
266
|
+
const queryParameters = {};
|
|
267
|
+
const headerParameters = {};
|
|
268
|
+
if (requestParameters['ifMatch'] != null) {
|
|
269
|
+
headerParameters['If-Match'] = String(requestParameters['ifMatch']);
|
|
270
|
+
}
|
|
271
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
272
|
+
const token = this.configuration.accessToken;
|
|
273
|
+
const tokenString = yield token("accessToken", []);
|
|
274
|
+
if (tokenString) {
|
|
275
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
const consumes = [
|
|
279
|
+
{ contentType: 'multipart/form-data' },
|
|
280
|
+
];
|
|
281
|
+
// @ts-ignore: canConsumeForm may be unused
|
|
282
|
+
const canConsumeForm = runtime.canConsumeForm(consumes);
|
|
283
|
+
let formParams;
|
|
284
|
+
let useForm = false;
|
|
285
|
+
// use FormData to transmit files using content-type "multipart/form-data"
|
|
286
|
+
useForm = canConsumeForm;
|
|
287
|
+
if (useForm) {
|
|
288
|
+
formParams = new FormData();
|
|
289
|
+
}
|
|
290
|
+
else {
|
|
291
|
+
formParams = new URLSearchParams();
|
|
292
|
+
}
|
|
293
|
+
if (requestParameters['filename'] != null) {
|
|
294
|
+
formParams.append('filename', requestParameters['filename']);
|
|
295
|
+
}
|
|
296
|
+
if (requestParameters['name'] != null) {
|
|
297
|
+
formParams.append('name', requestParameters['name']);
|
|
298
|
+
}
|
|
299
|
+
let urlPath = `/v1/account/files/{id}/content`;
|
|
300
|
+
urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id'])));
|
|
301
|
+
const response = yield this.request({
|
|
302
|
+
path: urlPath,
|
|
303
|
+
method: 'PUT',
|
|
304
|
+
headers: headerParameters,
|
|
305
|
+
query: queryParameters,
|
|
306
|
+
body: formParams,
|
|
307
|
+
}, initOverrides);
|
|
308
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => ModelRecordFromJSON(jsonValue));
|
|
309
|
+
});
|
|
310
|
+
}
|
|
311
|
+
/**
|
|
312
|
+
* Replaces the stored bytes of a file held against the account and returns the updated record, with the new version of the content as the `ETag`. Send the request as `multipart/form-data` with a single file field named `file`. The uploaded file\'s name is ignored: the file keeps its name and identifier, so anything already referencing it keeps working. `mimeType` is detected again from the new contents. Maximum file size is 25 MiB, and the content is rejected if a virus scan fails. Send the `ETag` returned when the content was read as `If-Match`. If the file has been replaced since then, the request is rejected with 412 and nothing changes; read the content again before deciding what to save. A missing `If-Match` is rejected with 422, and `*` with 400. The difference in size counts towards the account\'s 1 GiB storage quota, and content that would take the account past it is rejected with 413. A 409 means concurrent changes to the account\'s files kept changing its usage while the content was being replaced. The new content may already be stored, so read the content and its `ETag` again before deciding what to save: retrying with the same `If-Match` is rejected with 412 if it was. The identifier must be one returned by the upload or list operations; a malformed identifier is rejected with 400 and an unknown one with 404. A quarantined file cannot be replaced (403). Requires the *Edit file storage* permission.
|
|
313
|
+
* Replace an account file\'s content
|
|
314
|
+
*/
|
|
315
|
+
updateAccountFilesContent(requestParameters, initOverrides) {
|
|
316
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
317
|
+
const response = yield this.updateAccountFilesContentRaw(requestParameters, initOverrides);
|
|
318
|
+
return yield response.value();
|
|
319
|
+
});
|
|
320
|
+
}
|
|
254
321
|
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* spaciv API
|
|
3
|
+
* The spaciv API powers workplace planning: modelling how many people an organisation has, how they work, and how much space that requires. ## Getting started 1. Exchange credentials for an access token using one of the operations under **Authentication**. 2. Send that token on every subsequent request as `Authorization: Bearer <token>`. 3. Access tokens are short lived. Call `POST /v1/auth/refresh-token` to obtain a new one before the old one expires. ## Conventions Every operation is versioned under `/v1`. Collections are plural (`GET /v1/dashboards` lists, `POST /v1/dashboards` creates) and individual records live beneath them (`/v1/dashboards/{id}`). Singular paths such as `/v1/account`, `/v1/project` and `/v1/user` refer to the record the access token was issued for. Request and response bodies are JSON. Timestamps are RFC 3339. Identifiers are opaque strings unless documented otherwise, and collection operations return the records visible to the account the token was issued for. Failures return an [RFC 9457](https://www.rfc-editor.org/rfc/rfc9457) problem document with a `detail` field describing what went wrong.
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1.0.0
|
|
6
|
+
* Contact: support@spaciv.com
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
*
|
|
14
|
+
* @export
|
|
15
|
+
* @interface ClientMessage
|
|
16
|
+
*/
|
|
17
|
+
export interface ClientMessage {
|
|
18
|
+
[key: string]: any | any;
|
|
19
|
+
/**
|
|
20
|
+
*
|
|
21
|
+
* @type {string}
|
|
22
|
+
* @memberof ClientMessage
|
|
23
|
+
*/
|
|
24
|
+
token?: string;
|
|
25
|
+
/**
|
|
26
|
+
* Between 1 and 100 topics for subscribe and unsubscribe. A message must fit within 128 KiB as sent, so topics whose JSON encoding is long go in several messages.
|
|
27
|
+
* @type {Array<string>}
|
|
28
|
+
* @memberof ClientMessage
|
|
29
|
+
*/
|
|
30
|
+
topics?: Array<string>;
|
|
31
|
+
/**
|
|
32
|
+
*
|
|
33
|
+
* @type {string}
|
|
34
|
+
* @memberof ClientMessage
|
|
35
|
+
*/
|
|
36
|
+
type: ClientMessageTypeEnum;
|
|
37
|
+
/**
|
|
38
|
+
*
|
|
39
|
+
* @type {number}
|
|
40
|
+
* @memberof ClientMessage
|
|
41
|
+
*/
|
|
42
|
+
v: ClientMessageVEnum;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* @export
|
|
46
|
+
*/
|
|
47
|
+
export declare const ClientMessageTypeEnum: {
|
|
48
|
+
readonly Auth: "auth";
|
|
49
|
+
readonly Subscribe: "subscribe";
|
|
50
|
+
readonly Unsubscribe: "unsubscribe";
|
|
51
|
+
};
|
|
52
|
+
export type ClientMessageTypeEnum = typeof ClientMessageTypeEnum[keyof typeof ClientMessageTypeEnum];
|
|
53
|
+
/**
|
|
54
|
+
* @export
|
|
55
|
+
*/
|
|
56
|
+
export declare const ClientMessageVEnum: {
|
|
57
|
+
readonly NUMBER_1: 1;
|
|
58
|
+
};
|
|
59
|
+
export type ClientMessageVEnum = typeof ClientMessageVEnum[keyof typeof ClientMessageVEnum];
|
|
60
|
+
/**
|
|
61
|
+
* Check if a given object implements the ClientMessage interface.
|
|
62
|
+
*/
|
|
63
|
+
export declare function instanceOfClientMessage(value: object): value is ClientMessage;
|
|
64
|
+
export declare function ClientMessageFromJSON(json: any): ClientMessage;
|
|
65
|
+
export declare function ClientMessageFromJSONTyped(json: any, ignoreDiscriminator: boolean): ClientMessage;
|
|
66
|
+
export declare function ClientMessageToJSON(json: any): ClientMessage;
|
|
67
|
+
export declare function ClientMessageToJSONTyped(value?: ClientMessage | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* spaciv API
|
|
5
|
+
* The spaciv API powers workplace planning: modelling how many people an organisation has, how they work, and how much space that requires. ## Getting started 1. Exchange credentials for an access token using one of the operations under **Authentication**. 2. Send that token on every subsequent request as `Authorization: Bearer <token>`. 3. Access tokens are short lived. Call `POST /v1/auth/refresh-token` to obtain a new one before the old one expires. ## Conventions Every operation is versioned under `/v1`. Collections are plural (`GET /v1/dashboards` lists, `POST /v1/dashboards` creates) and individual records live beneath them (`/v1/dashboards/{id}`). Singular paths such as `/v1/account`, `/v1/project` and `/v1/user` refer to the record the access token was issued for. Request and response bodies are JSON. Timestamps are RFC 3339. Identifiers are opaque strings unless documented otherwise, and collection operations return the records visible to the account the token was issued for. Failures return an [RFC 9457](https://www.rfc-editor.org/rfc/rfc9457) problem document with a `detail` field describing what went wrong.
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0.0
|
|
8
|
+
* Contact: support@spaciv.com
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
/**
|
|
15
|
+
* @export
|
|
16
|
+
*/
|
|
17
|
+
export const ClientMessageTypeEnum = {
|
|
18
|
+
Auth: 'auth',
|
|
19
|
+
Subscribe: 'subscribe',
|
|
20
|
+
Unsubscribe: 'unsubscribe'
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* @export
|
|
24
|
+
*/
|
|
25
|
+
export const ClientMessageVEnum = {
|
|
26
|
+
NUMBER_1: 1
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* Check if a given object implements the ClientMessage interface.
|
|
30
|
+
*/
|
|
31
|
+
export function instanceOfClientMessage(value) {
|
|
32
|
+
if (!('type' in value) || value['type'] === undefined)
|
|
33
|
+
return false;
|
|
34
|
+
if (!('v' in value) || value['v'] === undefined)
|
|
35
|
+
return false;
|
|
36
|
+
return true;
|
|
37
|
+
}
|
|
38
|
+
export function ClientMessageFromJSON(json) {
|
|
39
|
+
return ClientMessageFromJSONTyped(json, false);
|
|
40
|
+
}
|
|
41
|
+
export function ClientMessageFromJSONTyped(json, ignoreDiscriminator) {
|
|
42
|
+
if (json == null) {
|
|
43
|
+
return json;
|
|
44
|
+
}
|
|
45
|
+
return Object.assign(Object.assign({}, json), { 'token': json['token'] == null ? undefined : json['token'], 'topics': json['topics'] == null ? undefined : json['topics'], 'type': json['type'], 'v': json['v'] });
|
|
46
|
+
}
|
|
47
|
+
export function ClientMessageToJSON(json) {
|
|
48
|
+
return ClientMessageToJSONTyped(json, false);
|
|
49
|
+
}
|
|
50
|
+
export function ClientMessageToJSONTyped(value, ignoreDiscriminator = false) {
|
|
51
|
+
if (value == null) {
|
|
52
|
+
return value;
|
|
53
|
+
}
|
|
54
|
+
return Object.assign(Object.assign({}, value), { 'token': value['token'], 'topics': value['topics'], 'type': value['type'], 'v': value['v'] });
|
|
55
|
+
}
|