@spaciv/sdk 0.1.26 → 0.1.28
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 +2 -0
- package/README.md +2 -2
- package/dist/apis/FilesApi.d.ts +52 -27
- package/dist/apis/FilesApi.js +50 -12
- package/dist/apis/LogicLayersApi.d.ts +8 -18
- package/dist/apis/LogicLayersApi.js +5 -15
- package/dist/esm/apis/FilesApi.d.ts +52 -27
- package/dist/esm/apis/FilesApi.js +51 -13
- package/dist/esm/apis/LogicLayersApi.d.ts +8 -18
- package/dist/esm/apis/LogicLayersApi.js +4 -14
- package/dist/esm/models/AccountDirectoryPatchBody.d.ts +12 -0
- package/dist/esm/models/AccountDirectoryPatchBody.js +4 -0
- package/dist/esm/models/AccountFilePatchBody.d.ts +12 -0
- package/dist/esm/models/AccountFilePatchBody.js +4 -0
- package/dist/esm/models/Directory.d.ts +14 -0
- package/dist/esm/models/Directory.js +4 -0
- package/dist/esm/models/ListPage.d.ts +1 -1
- package/dist/esm/models/ModelRecord.d.ts +14 -0
- package/dist/esm/models/ModelRecord.js +4 -0
- package/dist/esm/models/ReservedTagInfo.d.ts +46 -0
- package/dist/esm/models/ReservedTagInfo.js +54 -0
- package/dist/esm/models/TagList.d.ts +39 -0
- package/dist/esm/models/TagList.js +48 -0
- package/dist/esm/models/index.d.ts +2 -0
- package/dist/esm/models/index.js +2 -0
- package/dist/models/AccountDirectoryPatchBody.d.ts +12 -0
- package/dist/models/AccountDirectoryPatchBody.js +4 -0
- package/dist/models/AccountFilePatchBody.d.ts +12 -0
- package/dist/models/AccountFilePatchBody.js +4 -0
- package/dist/models/Directory.d.ts +14 -0
- package/dist/models/Directory.js +4 -0
- package/dist/models/ListPage.d.ts +1 -1
- package/dist/models/ModelRecord.d.ts +14 -0
- package/dist/models/ModelRecord.js +4 -0
- package/dist/models/ReservedTagInfo.d.ts +46 -0
- package/dist/models/ReservedTagInfo.js +62 -0
- package/dist/models/TagList.d.ts +39 -0
- package/dist/models/TagList.js +55 -0
- package/dist/models/index.d.ts +2 -0
- package/dist/models/index.js +2 -0
- package/package.json +1 -1
- package/src/apis/FilesApi.ts +89 -26
- package/src/apis/LogicLayersApi.ts +8 -23
- package/src/models/AccountDirectoryPatchBody.ts +16 -0
- package/src/models/AccountFilePatchBody.ts +16 -0
- package/src/models/Directory.ts +16 -0
- package/src/models/ListPage.ts +1 -1
- package/src/models/ModelRecord.ts +16 -0
- package/src/models/ReservedTagInfo.ts +86 -0
- package/src/models/TagList.ts +83 -0
- package/src/models/index.ts +2 -0
|
@@ -22,7 +22,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
22
22
|
});
|
|
23
23
|
};
|
|
24
24
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
-
exports.
|
|
25
|
+
exports.LogicLayersApi = void 0;
|
|
26
26
|
const runtime = require("../runtime");
|
|
27
27
|
const index_1 = require("../models/index");
|
|
28
28
|
/**
|
|
@@ -209,7 +209,7 @@ class LogicLayersApi extends runtime.BaseAPI {
|
|
|
209
209
|
});
|
|
210
210
|
}
|
|
211
211
|
/**
|
|
212
|
-
* Returns the full detail of a logic layer, including its rules as a `LogicLayerConfig`. Each rule balances the supply objects its filters select against the demand objects its filters select, at a ratio of supply per demand or as a total spread over the demand.
|
|
212
|
+
* Returns the full detail of a logic layer, including its rules as a `LogicLayerConfig`. Each rule balances the supply objects its filters select against the demand objects its filters select, at a ratio of supply per demand or as a total spread over the demand. Returns `404` if the logic layer does not exist. Requires the *View space rule set details* permission.
|
|
213
213
|
* Get a logic layer
|
|
214
214
|
*/
|
|
215
215
|
getSpaceRulesetsRaw(requestParameters, initOverrides) {
|
|
@@ -218,9 +218,6 @@ class LogicLayersApi extends runtime.BaseAPI {
|
|
|
218
218
|
throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling getSpaceRulesets().');
|
|
219
219
|
}
|
|
220
220
|
const queryParameters = {};
|
|
221
|
-
if (requestParameters['format'] != null) {
|
|
222
|
-
queryParameters['format'] = requestParameters['format'];
|
|
223
|
-
}
|
|
224
221
|
const headerParameters = {};
|
|
225
222
|
if (this.configuration && this.configuration.accessToken) {
|
|
226
223
|
const token = this.configuration.accessToken;
|
|
@@ -241,7 +238,7 @@ class LogicLayersApi extends runtime.BaseAPI {
|
|
|
241
238
|
});
|
|
242
239
|
}
|
|
243
240
|
/**
|
|
244
|
-
* Returns the full detail of a logic layer, including its rules as a `LogicLayerConfig`. Each rule balances the supply objects its filters select against the demand objects its filters select, at a ratio of supply per demand or as a total spread over the demand.
|
|
241
|
+
* Returns the full detail of a logic layer, including its rules as a `LogicLayerConfig`. Each rule balances the supply objects its filters select against the demand objects its filters select, at a ratio of supply per demand or as a total spread over the demand. Returns `404` if the logic layer does not exist. Requires the *View space rule set details* permission.
|
|
245
242
|
* Get a logic layer
|
|
246
243
|
*/
|
|
247
244
|
getSpaceRulesets(requestParameters, initOverrides) {
|
|
@@ -368,7 +365,7 @@ class LogicLayersApi extends runtime.BaseAPI {
|
|
|
368
365
|
});
|
|
369
366
|
}
|
|
370
367
|
/**
|
|
371
|
-
* Updates one or more fields of a logic layer. Only fields present in the request body are changed; `modifiedAt` is always updated to the current time. `config` is a `LogicLayerConfig
|
|
368
|
+
* Updates one or more fields of a logic layer. Only fields present in the request body are changed; `modifiedAt` is always updated to the current time. `config` is a `LogicLayerConfig`. Functions may use account number variables (`{\"var\": \"account:<id>\"}`), which needs the *Variable controls* feature. Returns `400` if `config` is not a valid logic layer or uses an unknown or non-number variable, and `404` if the logic layer does not exist. Requires the *Edit space rule set details* permission.
|
|
372
369
|
* Update a logic layer
|
|
373
370
|
*/
|
|
374
371
|
updateSpaceRulesetsRaw(requestParameters, initOverrides) {
|
|
@@ -402,7 +399,7 @@ class LogicLayersApi extends runtime.BaseAPI {
|
|
|
402
399
|
});
|
|
403
400
|
}
|
|
404
401
|
/**
|
|
405
|
-
* Updates one or more fields of a logic layer. Only fields present in the request body are changed; `modifiedAt` is always updated to the current time. `config` is a `LogicLayerConfig
|
|
402
|
+
* Updates one or more fields of a logic layer. Only fields present in the request body are changed; `modifiedAt` is always updated to the current time. `config` is a `LogicLayerConfig`. Functions may use account number variables (`{\"var\": \"account:<id>\"}`), which needs the *Variable controls* feature. Returns `400` if `config` is not a valid logic layer or uses an unknown or non-number variable, and `404` if the logic layer does not exist. Requires the *Edit space rule set details* permission.
|
|
406
403
|
* Update a logic layer
|
|
407
404
|
*/
|
|
408
405
|
updateSpaceRulesets(requestParameters, initOverrides) {
|
|
@@ -413,10 +410,3 @@ class LogicLayersApi extends runtime.BaseAPI {
|
|
|
413
410
|
}
|
|
414
411
|
}
|
|
415
412
|
exports.LogicLayersApi = LogicLayersApi;
|
|
416
|
-
/**
|
|
417
|
-
* @export
|
|
418
|
-
*/
|
|
419
|
-
exports.LogicLayersApiGetSpaceRulesetsFormatEnum = {
|
|
420
|
-
Stored: 'stored',
|
|
421
|
-
Logic: 'logic'
|
|
422
|
-
};
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime';
|
|
13
|
-
import type { AccountDirectoryPatchBody, AccountDirectoryPostBody, AccountFilePatchBody, AccountTextFilePostBody, Directory, DirectoryPage, ListPage, ModelRecord } from '../models/index';
|
|
13
|
+
import type { AccountDirectoryPatchBody, AccountDirectoryPostBody, AccountFilePatchBody, AccountTextFilePostBody, Directory, DirectoryPage, ListPage, ModelRecord, TagList } from '../models/index';
|
|
14
14
|
export interface FilesApiCreateAccountDirectoriesRequest {
|
|
15
15
|
accountDirectoryPostBody: AccountDirectoryPostBody;
|
|
16
16
|
}
|
|
@@ -38,6 +38,7 @@ export interface FilesApiListAccountFilesRequest {
|
|
|
38
38
|
limit?: number;
|
|
39
39
|
cursor?: string;
|
|
40
40
|
parent?: string;
|
|
41
|
+
tag?: string;
|
|
41
42
|
}
|
|
42
43
|
export interface FilesApiUpdateAccountDirectoriesRequest {
|
|
43
44
|
id: string;
|
|
@@ -75,7 +76,7 @@ export interface FilesApiInterface {
|
|
|
75
76
|
*/
|
|
76
77
|
createAccountDirectories(requestParameters: FilesApiCreateAccountDirectoriesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Directory>;
|
|
77
78
|
/**
|
|
78
|
-
* Stores a file against the account and returns the record describing it. Send the request as `multipart/form-data` with a single file field named `file`, and optionally a `parentId` field naming the directory to store it in; without one the file goes in the root, and a `parentId` the account has no directory for is rejected with 404. The uploaded file\'s name, normalised to Unicode NFC, becomes the record\'s `name`, so it must be non-empty and free of `/` and `\\`; a name over 255 bytes is shortened to fit, keeping its extension. Names are unique within a directory among its files and directories, compared exactly, so `Report.pdf` and `report.pdf` can sit side by side: when the name is already taken there, the file is stored under the lowest free numbered name instead, such as `image (2).png`, with the number before the extension, and the response\'s `name` is the name it was stored under. Any media type is accepted; `mimeType` is detected from the file\'s contents rather than from its name or the type the client declared. Maximum file size is 25 MiB, and uploads are rejected if a virus scan fails. The files stored against an account may total at most 1 GiB. An upload that would take the account past that is rejected with 413 and no file is added to the account, though the uploaded bytes may briefly remain in storage until they are cleaned up; deleting files frees their space. A 409 means concurrent uploads kept changing the account\'s usage or taking the names it tried, and the upload can be retried as it stands. The response body is the same record shape the list operation returns, so a client can add it to a list it already holds instead of refetching. Requires the *Edit file storage* permission.
|
|
79
|
+
* Stores a file against the account and returns the record describing it. Send the request as `multipart/form-data` with a single file field named `file`, and optionally a `parentId` field naming the directory to store it in; without one the file goes in the root, and a `parentId` the account has no directory for is rejected with 404. The uploaded file\'s name, normalised to Unicode NFC, becomes the record\'s `name`, so it must be non-empty and free of `/` and `\\`; a name over 255 bytes is shortened to fit, keeping its extension. Names are unique within a directory among its files and directories, compared exactly, so `Report.pdf` and `report.pdf` can sit side by side: when the name is already taken there, the file is stored under the lowest free numbered name instead, such as `image (2).png`, with the number before the extension, and the response\'s `name` is the name it was stored under. Any media type is accepted; `mimeType` is detected from the file\'s contents rather than from its name or the type the client declared. Maximum file size is 25 MiB, and uploads are rejected if a virus scan fails. The files stored against an account may total at most 1 GiB. An upload that would take the account past that is rejected with 413 and no file is added to the account, though the uploaded bytes may briefly remain in storage until they are cleaned up; deleting files frees their space. A 409 means concurrent uploads kept changing the account\'s usage or taking the names it tried, and the upload can be retried as it stands. Uploading into a directory that has a reserved tag, or into any directory inside one at any depth, needs the permission that tag requires (*Manage my account* for `skill`); otherwise the upload is rejected with 403 and no file is added to the account. `GET /v1/account/file-tags` lists the reserved tags. The response body is the same record shape the list operation returns, so a client can add it to a list it already holds instead of refetching. Requires the *Edit file storage* permission.
|
|
79
80
|
* @summary Upload a file to the account
|
|
80
81
|
* @param {Blob} [filename] filename of the file being uploaded
|
|
81
82
|
* @param {string} [name] general purpose name for multipart form value
|
|
@@ -85,7 +86,7 @@ export interface FilesApiInterface {
|
|
|
85
86
|
*/
|
|
86
87
|
createAccountFilesRaw(requestParameters: FilesApiCreateAccountFilesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ModelRecord>>;
|
|
87
88
|
/**
|
|
88
|
-
* Stores a file against the account and returns the record describing it. Send the request as `multipart/form-data` with a single file field named `file`, and optionally a `parentId` field naming the directory to store it in; without one the file goes in the root, and a `parentId` the account has no directory for is rejected with 404. The uploaded file\'s name, normalised to Unicode NFC, becomes the record\'s `name`, so it must be non-empty and free of `/` and `\\`; a name over 255 bytes is shortened to fit, keeping its extension. Names are unique within a directory among its files and directories, compared exactly, so `Report.pdf` and `report.pdf` can sit side by side: when the name is already taken there, the file is stored under the lowest free numbered name instead, such as `image (2).png`, with the number before the extension, and the response\'s `name` is the name it was stored under. Any media type is accepted; `mimeType` is detected from the file\'s contents rather than from its name or the type the client declared. Maximum file size is 25 MiB, and uploads are rejected if a virus scan fails. The files stored against an account may total at most 1 GiB. An upload that would take the account past that is rejected with 413 and no file is added to the account, though the uploaded bytes may briefly remain in storage until they are cleaned up; deleting files frees their space. A 409 means concurrent uploads kept changing the account\'s usage or taking the names it tried, and the upload can be retried as it stands. The response body is the same record shape the list operation returns, so a client can add it to a list it already holds instead of refetching. Requires the *Edit file storage* permission.
|
|
89
|
+
* Stores a file against the account and returns the record describing it. Send the request as `multipart/form-data` with a single file field named `file`, and optionally a `parentId` field naming the directory to store it in; without one the file goes in the root, and a `parentId` the account has no directory for is rejected with 404. The uploaded file\'s name, normalised to Unicode NFC, becomes the record\'s `name`, so it must be non-empty and free of `/` and `\\`; a name over 255 bytes is shortened to fit, keeping its extension. Names are unique within a directory among its files and directories, compared exactly, so `Report.pdf` and `report.pdf` can sit side by side: when the name is already taken there, the file is stored under the lowest free numbered name instead, such as `image (2).png`, with the number before the extension, and the response\'s `name` is the name it was stored under. Any media type is accepted; `mimeType` is detected from the file\'s contents rather than from its name or the type the client declared. Maximum file size is 25 MiB, and uploads are rejected if a virus scan fails. The files stored against an account may total at most 1 GiB. An upload that would take the account past that is rejected with 413 and no file is added to the account, though the uploaded bytes may briefly remain in storage until they are cleaned up; deleting files frees their space. A 409 means concurrent uploads kept changing the account\'s usage or taking the names it tried, and the upload can be retried as it stands. Uploading into a directory that has a reserved tag, or into any directory inside one at any depth, needs the permission that tag requires (*Manage my account* for `skill`); otherwise the upload is rejected with 403 and no file is added to the account. `GET /v1/account/file-tags` lists the reserved tags. The response body is the same record shape the list operation returns, so a client can add it to a list it already holds instead of refetching. Requires the *Edit file storage* permission.
|
|
89
90
|
* Upload a file to the account
|
|
90
91
|
*/
|
|
91
92
|
createAccountFiles(requestParameters: FilesApiCreateAccountFilesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ModelRecord>;
|
|
@@ -161,24 +162,38 @@ export interface FilesApiInterface {
|
|
|
161
162
|
*/
|
|
162
163
|
listAccountDirectories(requestParameters: FilesApiListAccountDirectoriesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DirectoryPage>;
|
|
163
164
|
/**
|
|
164
|
-
*
|
|
165
|
+
* Returns every tag in use on the account\'s files and directories, each once, for suggesting tags as they are typed. Pass one to the list operation\'s `tag` to list the files and directories that have it. A tag that has just been added or removed may take a moment to be reflected here. Also returns the reserved tags, which give an item a meaning Spaciv acts on, with the kinds of item each can be added to. Requires the *View file storage* permission.
|
|
166
|
+
* @summary List the account\'s file and directory tags
|
|
167
|
+
* @param {*} [options] Override http request option.
|
|
168
|
+
* @throws {RequiredError}
|
|
169
|
+
* @memberof FilesApiInterface
|
|
170
|
+
*/
|
|
171
|
+
listAccountFileTagsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<TagList>>;
|
|
172
|
+
/**
|
|
173
|
+
* Returns every tag in use on the account\'s files and directories, each once, for suggesting tags as they are typed. Pass one to the list operation\'s `tag` to list the files and directories that have it. A tag that has just been added or removed may take a moment to be reflected here. Also returns the reserved tags, which give an item a meaning Spaciv acts on, with the kinds of item each can be added to. Requires the *View file storage* permission.
|
|
174
|
+
* List the account\'s file and directory tags
|
|
175
|
+
*/
|
|
176
|
+
listAccountFileTags(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<TagList>;
|
|
177
|
+
/**
|
|
178
|
+
* Without `parent` or `tag`, returns a page of every file stored against the account, whatever directory it is in, most recently uploaded first. Files belonging to other accounts are never returned. With `parent`, returns a page of what is directly inside that directory, or inside the root when `parent` is `root`: its directories in `directories`, most recently created first, then its files in `files`, most recently uploaded first. Returns 404 if the account has no directory with that identifier. With `tag`, returns a page of the files and directories that have that tag, wherever they are: the files in `files` and the directories in `directories`, each most recently created first. The contents of a tagged directory are not included unless they have the tag themselves. Giving both `parent` and `tag` is rejected with 400, and so is a tag that is not at most 32 letters, digits and hyphens. When `nextCursor` is present there are more items to fetch; pass it back as `cursor`, with the same `parent` or `tag`, to retrieve the following page. A page may come back shorter than `limit` while still having a `nextCursor`, and may have neither files nor directories. A file that has just been uploaded, moved, renamed or tagged may not show its change here immediately, so clients should apply the record returned by the upload or update operation to their list rather than refetching. Requires the *View file storage* permission.
|
|
165
179
|
* @summary List the account\'s files
|
|
166
180
|
* @param {number} [limit] Maximum number of files to return in this page.
|
|
167
|
-
* @param {string} [cursor] Opaque pagination cursor returned as nextCursor by a previous response. A cursor is only valid for the account, and the parent, it was issued for.
|
|
168
|
-
* @param {string} [parent] List only what is directly inside this directory: a directory identifier, or root for the root. Leave it out to list every file of the account, whatever directory it is in.
|
|
181
|
+
* @param {string} [cursor] Opaque pagination cursor returned as nextCursor by a previous response. A cursor is only valid for the account, and the parent or tag, it was issued for.
|
|
182
|
+
* @param {string} [parent] List only what is directly inside this directory: a directory identifier, or root for the root. Leave it out to list every file of the account, whatever directory it is in. Cannot be given with tag.
|
|
183
|
+
* @param {string} [tag] List only the files and directories with this tag, wherever they are. Matched without regard to case. Cannot be given with parent.
|
|
169
184
|
* @param {*} [options] Override http request option.
|
|
170
185
|
* @throws {RequiredError}
|
|
171
186
|
* @memberof FilesApiInterface
|
|
172
187
|
*/
|
|
173
188
|
listAccountFilesRaw(requestParameters: FilesApiListAccountFilesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ListPage>>;
|
|
174
189
|
/**
|
|
175
|
-
* Without `parent`, returns a page of every file stored against the account, whatever directory it is in, most recently uploaded first. Files belonging to other accounts are never returned. With `parent`, returns a page of what is directly inside that directory, or inside the root when `parent` is `root`: its directories in `directories`, most recently created first, then its files in `files`, most recently uploaded first. Returns 404 if the account has no directory with that identifier. When `nextCursor` is present there are more items to fetch; pass it back as `cursor`, with the same `parent`, to retrieve the following page. A page may come back shorter than `limit` while still having a `nextCursor
|
|
190
|
+
* Without `parent` or `tag`, returns a page of every file stored against the account, whatever directory it is in, most recently uploaded first. Files belonging to other accounts are never returned. With `parent`, returns a page of what is directly inside that directory, or inside the root when `parent` is `root`: its directories in `directories`, most recently created first, then its files in `files`, most recently uploaded first. Returns 404 if the account has no directory with that identifier. With `tag`, returns a page of the files and directories that have that tag, wherever they are: the files in `files` and the directories in `directories`, each most recently created first. The contents of a tagged directory are not included unless they have the tag themselves. Giving both `parent` and `tag` is rejected with 400, and so is a tag that is not at most 32 letters, digits and hyphens. When `nextCursor` is present there are more items to fetch; pass it back as `cursor`, with the same `parent` or `tag`, to retrieve the following page. A page may come back shorter than `limit` while still having a `nextCursor`, and may have neither files nor directories. A file that has just been uploaded, moved, renamed or tagged may not show its change here immediately, so clients should apply the record returned by the upload or update operation to their list rather than refetching. Requires the *View file storage* permission.
|
|
176
191
|
* List the account\'s files
|
|
177
192
|
*/
|
|
178
193
|
listAccountFiles(requestParameters: FilesApiListAccountFilesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ListPage>;
|
|
179
194
|
/**
|
|
180
|
-
* Changes a directory\'s name, moves it into another directory, or
|
|
181
|
-
* @summary Rename or
|
|
195
|
+
* Changes a directory\'s name, moves it into another directory, changes its tags, or any of these, and returns the updated directory. Give `name`, `parentId`, `addTags`, `removeTags` or any of them; a body with none is rejected with 400. Everything inside the directory moves with it and keeps its identifier, so anything referencing those files keeps working. A rename or move and a tag change made in one request are saved, and audited, one after the other. The name is normalised to Unicode NFC, and names are unique within a directory among its files and directories, compared exactly: a name already taken in the destination by a file or another directory, whether by a rename or a move, is rejected with 409. Moving a directory into itself or into a directory inside it, or so that something inside it would be nested more than 8 deep, is rejected with 400. Tags are added and removed as given, without replacing the directory\'s other tags, so two people tagging the same directory at once do not undo each other\'s changes. A tag cannot be both added and removed in one request. The files and directories inside do not take on the directory\'s tags. Some tags are reserved: they give an item a meaning Spaciv acts on, and `GET /v1/account/file-tags` lists them. `skill` marks a directory as a skill. Adding or removing a reserved tag, or renaming, moving, retagging or deleting a directory that has one, needs the permission that tag requires (*Manage my account* for `skill`), and so does any change to a directory inside one that has it, at any depth, including moving it into or out of one; otherwise the request is rejected with 403. A reserved tag may check the directory it is on, when it is added and whenever the directory or anything inside it changes, and record what it finds in `tagProblems` rather than refusing the change. Returns 404 if the account has no directory with this identifier, or none with the given `parentId`. Any other 409 means the account\'s directories changed during the request, and the request can be retried. Requires the *Edit file storage* permission.
|
|
196
|
+
* @summary Rename, move or tag a directory
|
|
182
197
|
* @param {string} id
|
|
183
198
|
* @param {AccountDirectoryPatchBody} accountDirectoryPatchBody
|
|
184
199
|
* @param {*} [options] Override http request option.
|
|
@@ -187,13 +202,13 @@ export interface FilesApiInterface {
|
|
|
187
202
|
*/
|
|
188
203
|
updateAccountDirectoriesRaw(requestParameters: FilesApiUpdateAccountDirectoriesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Directory>>;
|
|
189
204
|
/**
|
|
190
|
-
* Changes a directory\'s name, moves it into another directory, or
|
|
191
|
-
* Rename or
|
|
205
|
+
* Changes a directory\'s name, moves it into another directory, changes its tags, or any of these, and returns the updated directory. Give `name`, `parentId`, `addTags`, `removeTags` or any of them; a body with none is rejected with 400. Everything inside the directory moves with it and keeps its identifier, so anything referencing those files keeps working. A rename or move and a tag change made in one request are saved, and audited, one after the other. The name is normalised to Unicode NFC, and names are unique within a directory among its files and directories, compared exactly: a name already taken in the destination by a file or another directory, whether by a rename or a move, is rejected with 409. Moving a directory into itself or into a directory inside it, or so that something inside it would be nested more than 8 deep, is rejected with 400. Tags are added and removed as given, without replacing the directory\'s other tags, so two people tagging the same directory at once do not undo each other\'s changes. A tag cannot be both added and removed in one request. The files and directories inside do not take on the directory\'s tags. Some tags are reserved: they give an item a meaning Spaciv acts on, and `GET /v1/account/file-tags` lists them. `skill` marks a directory as a skill. Adding or removing a reserved tag, or renaming, moving, retagging or deleting a directory that has one, needs the permission that tag requires (*Manage my account* for `skill`), and so does any change to a directory inside one that has it, at any depth, including moving it into or out of one; otherwise the request is rejected with 403. A reserved tag may check the directory it is on, when it is added and whenever the directory or anything inside it changes, and record what it finds in `tagProblems` rather than refusing the change. Returns 404 if the account has no directory with this identifier, or none with the given `parentId`. Any other 409 means the account\'s directories changed during the request, and the request can be retried. Requires the *Edit file storage* permission.
|
|
206
|
+
* Rename, move or tag a directory
|
|
192
207
|
*/
|
|
193
208
|
updateAccountDirectories(requestParameters: FilesApiUpdateAccountDirectoriesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Directory>;
|
|
194
209
|
/**
|
|
195
|
-
* Changes the display name of a file stored against the account, moves it into another directory, or
|
|
196
|
-
* @summary Rename or
|
|
210
|
+
* Changes the display name of a file stored against the account, moves it into another directory, changes its tags, or any of these, and returns the updated record. Give `name`, `parentId`, `addTags`, `removeTags` or any of them; a body with none is rejected with 400. The stored content, media type, size and identifier are untouched, so anything already referencing the file keeps working. A rename or move and a tag change made in one request are saved, and audited, one after the other. The name is normalised to Unicode NFC, and names are unique within a directory among its files and directories, compared exactly. Giving a `name` already taken in the destination is rejected with 409. A move that gives only `parentId` never fails for its name: if the file\'s name is taken in the destination, it is stored under the lowest free numbered name instead, such as `lease (2).pdf`, and a name normalising makes longer than 255 bytes is shortened to fit; the response\'s `name` is the name it now has. Tags are added and removed as given, without replacing the file\'s other tags, so two people tagging the same file at once do not undo each other\'s changes. A tag cannot be both added and removed in one request. Some tags are reserved: they give an item a meaning Spaciv acts on, and `GET /v1/account/file-tags` lists them. A reserved tag can only be added to the kinds of item it applies to, so `skill` on a file is rejected with 400. Adding or removing a reserved tag, or renaming, moving, retagging or deleting an item that has one, needs the permission that tag requires (*Manage my account* for `skill`), and so does any change to a file inside a directory that has one, at any depth, including moving the file into or out of it; otherwise the request is rejected with 403. A reserved tag may check the item it is on, when it is added and after the item changes, and record what it finds in `tagProblems` rather than refusing the change. The identifier must be one returned by the upload or list operations; a malformed identifier is rejected with 400. Returns 404 if the account has no file with this identifier, or no directory with the given `parentId`. Any other 409 means the file changed during the request, and the request can be retried as it stands. Requires the *Edit file storage* permission.
|
|
211
|
+
* @summary Rename, move or tag an account file
|
|
197
212
|
* @param {string} id
|
|
198
213
|
* @param {AccountFilePatchBody} accountFilePatchBody
|
|
199
214
|
* @param {*} [options] Override http request option.
|
|
@@ -202,8 +217,8 @@ export interface FilesApiInterface {
|
|
|
202
217
|
*/
|
|
203
218
|
updateAccountFilesRaw(requestParameters: FilesApiUpdateAccountFilesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ModelRecord>>;
|
|
204
219
|
/**
|
|
205
|
-
* Changes the display name of a file stored against the account, moves it into another directory, or
|
|
206
|
-
* Rename or
|
|
220
|
+
* Changes the display name of a file stored against the account, moves it into another directory, changes its tags, or any of these, and returns the updated record. Give `name`, `parentId`, `addTags`, `removeTags` or any of them; a body with none is rejected with 400. The stored content, media type, size and identifier are untouched, so anything already referencing the file keeps working. A rename or move and a tag change made in one request are saved, and audited, one after the other. The name is normalised to Unicode NFC, and names are unique within a directory among its files and directories, compared exactly. Giving a `name` already taken in the destination is rejected with 409. A move that gives only `parentId` never fails for its name: if the file\'s name is taken in the destination, it is stored under the lowest free numbered name instead, such as `lease (2).pdf`, and a name normalising makes longer than 255 bytes is shortened to fit; the response\'s `name` is the name it now has. Tags are added and removed as given, without replacing the file\'s other tags, so two people tagging the same file at once do not undo each other\'s changes. A tag cannot be both added and removed in one request. Some tags are reserved: they give an item a meaning Spaciv acts on, and `GET /v1/account/file-tags` lists them. A reserved tag can only be added to the kinds of item it applies to, so `skill` on a file is rejected with 400. Adding or removing a reserved tag, or renaming, moving, retagging or deleting an item that has one, needs the permission that tag requires (*Manage my account* for `skill`), and so does any change to a file inside a directory that has one, at any depth, including moving the file into or out of it; otherwise the request is rejected with 403. A reserved tag may check the item it is on, when it is added and after the item changes, and record what it finds in `tagProblems` rather than refusing the change. The identifier must be one returned by the upload or list operations; a malformed identifier is rejected with 400. Returns 404 if the account has no file with this identifier, or no directory with the given `parentId`. Any other 409 means the file changed during the request, and the request can be retried as it stands. Requires the *Edit file storage* permission.
|
|
221
|
+
* Rename, move or tag an account file
|
|
207
222
|
*/
|
|
208
223
|
updateAccountFiles(requestParameters: FilesApiUpdateAccountFilesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ModelRecord>;
|
|
209
224
|
/**
|
|
@@ -239,12 +254,12 @@ export declare class FilesApi extends runtime.BaseAPI implements FilesApiInterfa
|
|
|
239
254
|
*/
|
|
240
255
|
createAccountDirectories(requestParameters: FilesApiCreateAccountDirectoriesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Directory>;
|
|
241
256
|
/**
|
|
242
|
-
* Stores a file against the account and returns the record describing it. Send the request as `multipart/form-data` with a single file field named `file`, and optionally a `parentId` field naming the directory to store it in; without one the file goes in the root, and a `parentId` the account has no directory for is rejected with 404. The uploaded file\'s name, normalised to Unicode NFC, becomes the record\'s `name`, so it must be non-empty and free of `/` and `\\`; a name over 255 bytes is shortened to fit, keeping its extension. Names are unique within a directory among its files and directories, compared exactly, so `Report.pdf` and `report.pdf` can sit side by side: when the name is already taken there, the file is stored under the lowest free numbered name instead, such as `image (2).png`, with the number before the extension, and the response\'s `name` is the name it was stored under. Any media type is accepted; `mimeType` is detected from the file\'s contents rather than from its name or the type the client declared. Maximum file size is 25 MiB, and uploads are rejected if a virus scan fails. The files stored against an account may total at most 1 GiB. An upload that would take the account past that is rejected with 413 and no file is added to the account, though the uploaded bytes may briefly remain in storage until they are cleaned up; deleting files frees their space. A 409 means concurrent uploads kept changing the account\'s usage or taking the names it tried, and the upload can be retried as it stands. The response body is the same record shape the list operation returns, so a client can add it to a list it already holds instead of refetching. Requires the *Edit file storage* permission.
|
|
257
|
+
* Stores a file against the account and returns the record describing it. Send the request as `multipart/form-data` with a single file field named `file`, and optionally a `parentId` field naming the directory to store it in; without one the file goes in the root, and a `parentId` the account has no directory for is rejected with 404. The uploaded file\'s name, normalised to Unicode NFC, becomes the record\'s `name`, so it must be non-empty and free of `/` and `\\`; a name over 255 bytes is shortened to fit, keeping its extension. Names are unique within a directory among its files and directories, compared exactly, so `Report.pdf` and `report.pdf` can sit side by side: when the name is already taken there, the file is stored under the lowest free numbered name instead, such as `image (2).png`, with the number before the extension, and the response\'s `name` is the name it was stored under. Any media type is accepted; `mimeType` is detected from the file\'s contents rather than from its name or the type the client declared. Maximum file size is 25 MiB, and uploads are rejected if a virus scan fails. The files stored against an account may total at most 1 GiB. An upload that would take the account past that is rejected with 413 and no file is added to the account, though the uploaded bytes may briefly remain in storage until they are cleaned up; deleting files frees their space. A 409 means concurrent uploads kept changing the account\'s usage or taking the names it tried, and the upload can be retried as it stands. Uploading into a directory that has a reserved tag, or into any directory inside one at any depth, needs the permission that tag requires (*Manage my account* for `skill`); otherwise the upload is rejected with 403 and no file is added to the account. `GET /v1/account/file-tags` lists the reserved tags. The response body is the same record shape the list operation returns, so a client can add it to a list it already holds instead of refetching. Requires the *Edit file storage* permission.
|
|
243
258
|
* Upload a file to the account
|
|
244
259
|
*/
|
|
245
260
|
createAccountFilesRaw(requestParameters: FilesApiCreateAccountFilesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ModelRecord>>;
|
|
246
261
|
/**
|
|
247
|
-
* Stores a file against the account and returns the record describing it. Send the request as `multipart/form-data` with a single file field named `file`, and optionally a `parentId` field naming the directory to store it in; without one the file goes in the root, and a `parentId` the account has no directory for is rejected with 404. The uploaded file\'s name, normalised to Unicode NFC, becomes the record\'s `name`, so it must be non-empty and free of `/` and `\\`; a name over 255 bytes is shortened to fit, keeping its extension. Names are unique within a directory among its files and directories, compared exactly, so `Report.pdf` and `report.pdf` can sit side by side: when the name is already taken there, the file is stored under the lowest free numbered name instead, such as `image (2).png`, with the number before the extension, and the response\'s `name` is the name it was stored under. Any media type is accepted; `mimeType` is detected from the file\'s contents rather than from its name or the type the client declared. Maximum file size is 25 MiB, and uploads are rejected if a virus scan fails. The files stored against an account may total at most 1 GiB. An upload that would take the account past that is rejected with 413 and no file is added to the account, though the uploaded bytes may briefly remain in storage until they are cleaned up; deleting files frees their space. A 409 means concurrent uploads kept changing the account\'s usage or taking the names it tried, and the upload can be retried as it stands. The response body is the same record shape the list operation returns, so a client can add it to a list it already holds instead of refetching. Requires the *Edit file storage* permission.
|
|
262
|
+
* Stores a file against the account and returns the record describing it. Send the request as `multipart/form-data` with a single file field named `file`, and optionally a `parentId` field naming the directory to store it in; without one the file goes in the root, and a `parentId` the account has no directory for is rejected with 404. The uploaded file\'s name, normalised to Unicode NFC, becomes the record\'s `name`, so it must be non-empty and free of `/` and `\\`; a name over 255 bytes is shortened to fit, keeping its extension. Names are unique within a directory among its files and directories, compared exactly, so `Report.pdf` and `report.pdf` can sit side by side: when the name is already taken there, the file is stored under the lowest free numbered name instead, such as `image (2).png`, with the number before the extension, and the response\'s `name` is the name it was stored under. Any media type is accepted; `mimeType` is detected from the file\'s contents rather than from its name or the type the client declared. Maximum file size is 25 MiB, and uploads are rejected if a virus scan fails. The files stored against an account may total at most 1 GiB. An upload that would take the account past that is rejected with 413 and no file is added to the account, though the uploaded bytes may briefly remain in storage until they are cleaned up; deleting files frees their space. A 409 means concurrent uploads kept changing the account\'s usage or taking the names it tried, and the upload can be retried as it stands. Uploading into a directory that has a reserved tag, or into any directory inside one at any depth, needs the permission that tag requires (*Manage my account* for `skill`); otherwise the upload is rejected with 403 and no file is added to the account. `GET /v1/account/file-tags` lists the reserved tags. The response body is the same record shape the list operation returns, so a client can add it to a list it already holds instead of refetching. Requires the *Edit file storage* permission.
|
|
248
263
|
* Upload a file to the account
|
|
249
264
|
*/
|
|
250
265
|
createAccountFiles(requestParameters?: FilesApiCreateAccountFilesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ModelRecord>;
|
|
@@ -299,33 +314,43 @@ export declare class FilesApi extends runtime.BaseAPI implements FilesApiInterfa
|
|
|
299
314
|
*/
|
|
300
315
|
listAccountDirectories(requestParameters?: FilesApiListAccountDirectoriesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DirectoryPage>;
|
|
301
316
|
/**
|
|
302
|
-
*
|
|
317
|
+
* Returns every tag in use on the account\'s files and directories, each once, for suggesting tags as they are typed. Pass one to the list operation\'s `tag` to list the files and directories that have it. A tag that has just been added or removed may take a moment to be reflected here. Also returns the reserved tags, which give an item a meaning Spaciv acts on, with the kinds of item each can be added to. Requires the *View file storage* permission.
|
|
318
|
+
* List the account\'s file and directory tags
|
|
319
|
+
*/
|
|
320
|
+
listAccountFileTagsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<TagList>>;
|
|
321
|
+
/**
|
|
322
|
+
* Returns every tag in use on the account\'s files and directories, each once, for suggesting tags as they are typed. Pass one to the list operation\'s `tag` to list the files and directories that have it. A tag that has just been added or removed may take a moment to be reflected here. Also returns the reserved tags, which give an item a meaning Spaciv acts on, with the kinds of item each can be added to. Requires the *View file storage* permission.
|
|
323
|
+
* List the account\'s file and directory tags
|
|
324
|
+
*/
|
|
325
|
+
listAccountFileTags(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<TagList>;
|
|
326
|
+
/**
|
|
327
|
+
* Without `parent` or `tag`, returns a page of every file stored against the account, whatever directory it is in, most recently uploaded first. Files belonging to other accounts are never returned. With `parent`, returns a page of what is directly inside that directory, or inside the root when `parent` is `root`: its directories in `directories`, most recently created first, then its files in `files`, most recently uploaded first. Returns 404 if the account has no directory with that identifier. With `tag`, returns a page of the files and directories that have that tag, wherever they are: the files in `files` and the directories in `directories`, each most recently created first. The contents of a tagged directory are not included unless they have the tag themselves. Giving both `parent` and `tag` is rejected with 400, and so is a tag that is not at most 32 letters, digits and hyphens. When `nextCursor` is present there are more items to fetch; pass it back as `cursor`, with the same `parent` or `tag`, to retrieve the following page. A page may come back shorter than `limit` while still having a `nextCursor`, and may have neither files nor directories. A file that has just been uploaded, moved, renamed or tagged may not show its change here immediately, so clients should apply the record returned by the upload or update operation to their list rather than refetching. Requires the *View file storage* permission.
|
|
303
328
|
* List the account\'s files
|
|
304
329
|
*/
|
|
305
330
|
listAccountFilesRaw(requestParameters: FilesApiListAccountFilesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ListPage>>;
|
|
306
331
|
/**
|
|
307
|
-
* Without `parent`, returns a page of every file stored against the account, whatever directory it is in, most recently uploaded first. Files belonging to other accounts are never returned. With `parent`, returns a page of what is directly inside that directory, or inside the root when `parent` is `root`: its directories in `directories`, most recently created first, then its files in `files`, most recently uploaded first. Returns 404 if the account has no directory with that identifier. When `nextCursor` is present there are more items to fetch; pass it back as `cursor`, with the same `parent`, to retrieve the following page. A page may come back shorter than `limit` while still having a `nextCursor
|
|
332
|
+
* Without `parent` or `tag`, returns a page of every file stored against the account, whatever directory it is in, most recently uploaded first. Files belonging to other accounts are never returned. With `parent`, returns a page of what is directly inside that directory, or inside the root when `parent` is `root`: its directories in `directories`, most recently created first, then its files in `files`, most recently uploaded first. Returns 404 if the account has no directory with that identifier. With `tag`, returns a page of the files and directories that have that tag, wherever they are: the files in `files` and the directories in `directories`, each most recently created first. The contents of a tagged directory are not included unless they have the tag themselves. Giving both `parent` and `tag` is rejected with 400, and so is a tag that is not at most 32 letters, digits and hyphens. When `nextCursor` is present there are more items to fetch; pass it back as `cursor`, with the same `parent` or `tag`, to retrieve the following page. A page may come back shorter than `limit` while still having a `nextCursor`, and may have neither files nor directories. A file that has just been uploaded, moved, renamed or tagged may not show its change here immediately, so clients should apply the record returned by the upload or update operation to their list rather than refetching. Requires the *View file storage* permission.
|
|
308
333
|
* List the account\'s files
|
|
309
334
|
*/
|
|
310
335
|
listAccountFiles(requestParameters?: FilesApiListAccountFilesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ListPage>;
|
|
311
336
|
/**
|
|
312
|
-
* Changes a directory\'s name, moves it into another directory, or
|
|
313
|
-
* Rename or
|
|
337
|
+
* Changes a directory\'s name, moves it into another directory, changes its tags, or any of these, and returns the updated directory. Give `name`, `parentId`, `addTags`, `removeTags` or any of them; a body with none is rejected with 400. Everything inside the directory moves with it and keeps its identifier, so anything referencing those files keeps working. A rename or move and a tag change made in one request are saved, and audited, one after the other. The name is normalised to Unicode NFC, and names are unique within a directory among its files and directories, compared exactly: a name already taken in the destination by a file or another directory, whether by a rename or a move, is rejected with 409. Moving a directory into itself or into a directory inside it, or so that something inside it would be nested more than 8 deep, is rejected with 400. Tags are added and removed as given, without replacing the directory\'s other tags, so two people tagging the same directory at once do not undo each other\'s changes. A tag cannot be both added and removed in one request. The files and directories inside do not take on the directory\'s tags. Some tags are reserved: they give an item a meaning Spaciv acts on, and `GET /v1/account/file-tags` lists them. `skill` marks a directory as a skill. Adding or removing a reserved tag, or renaming, moving, retagging or deleting a directory that has one, needs the permission that tag requires (*Manage my account* for `skill`), and so does any change to a directory inside one that has it, at any depth, including moving it into or out of one; otherwise the request is rejected with 403. A reserved tag may check the directory it is on, when it is added and whenever the directory or anything inside it changes, and record what it finds in `tagProblems` rather than refusing the change. Returns 404 if the account has no directory with this identifier, or none with the given `parentId`. Any other 409 means the account\'s directories changed during the request, and the request can be retried. Requires the *Edit file storage* permission.
|
|
338
|
+
* Rename, move or tag a directory
|
|
314
339
|
*/
|
|
315
340
|
updateAccountDirectoriesRaw(requestParameters: FilesApiUpdateAccountDirectoriesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Directory>>;
|
|
316
341
|
/**
|
|
317
|
-
* Changes a directory\'s name, moves it into another directory, or
|
|
318
|
-
* Rename or
|
|
342
|
+
* Changes a directory\'s name, moves it into another directory, changes its tags, or any of these, and returns the updated directory. Give `name`, `parentId`, `addTags`, `removeTags` or any of them; a body with none is rejected with 400. Everything inside the directory moves with it and keeps its identifier, so anything referencing those files keeps working. A rename or move and a tag change made in one request are saved, and audited, one after the other. The name is normalised to Unicode NFC, and names are unique within a directory among its files and directories, compared exactly: a name already taken in the destination by a file or another directory, whether by a rename or a move, is rejected with 409. Moving a directory into itself or into a directory inside it, or so that something inside it would be nested more than 8 deep, is rejected with 400. Tags are added and removed as given, without replacing the directory\'s other tags, so two people tagging the same directory at once do not undo each other\'s changes. A tag cannot be both added and removed in one request. The files and directories inside do not take on the directory\'s tags. Some tags are reserved: they give an item a meaning Spaciv acts on, and `GET /v1/account/file-tags` lists them. `skill` marks a directory as a skill. Adding or removing a reserved tag, or renaming, moving, retagging or deleting a directory that has one, needs the permission that tag requires (*Manage my account* for `skill`), and so does any change to a directory inside one that has it, at any depth, including moving it into or out of one; otherwise the request is rejected with 403. A reserved tag may check the directory it is on, when it is added and whenever the directory or anything inside it changes, and record what it finds in `tagProblems` rather than refusing the change. Returns 404 if the account has no directory with this identifier, or none with the given `parentId`. Any other 409 means the account\'s directories changed during the request, and the request can be retried. Requires the *Edit file storage* permission.
|
|
343
|
+
* Rename, move or tag a directory
|
|
319
344
|
*/
|
|
320
345
|
updateAccountDirectories(requestParameters: FilesApiUpdateAccountDirectoriesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Directory>;
|
|
321
346
|
/**
|
|
322
|
-
* Changes the display name of a file stored against the account, moves it into another directory, or
|
|
323
|
-
* Rename or
|
|
347
|
+
* Changes the display name of a file stored against the account, moves it into another directory, changes its tags, or any of these, and returns the updated record. Give `name`, `parentId`, `addTags`, `removeTags` or any of them; a body with none is rejected with 400. The stored content, media type, size and identifier are untouched, so anything already referencing the file keeps working. A rename or move and a tag change made in one request are saved, and audited, one after the other. The name is normalised to Unicode NFC, and names are unique within a directory among its files and directories, compared exactly. Giving a `name` already taken in the destination is rejected with 409. A move that gives only `parentId` never fails for its name: if the file\'s name is taken in the destination, it is stored under the lowest free numbered name instead, such as `lease (2).pdf`, and a name normalising makes longer than 255 bytes is shortened to fit; the response\'s `name` is the name it now has. Tags are added and removed as given, without replacing the file\'s other tags, so two people tagging the same file at once do not undo each other\'s changes. A tag cannot be both added and removed in one request. Some tags are reserved: they give an item a meaning Spaciv acts on, and `GET /v1/account/file-tags` lists them. A reserved tag can only be added to the kinds of item it applies to, so `skill` on a file is rejected with 400. Adding or removing a reserved tag, or renaming, moving, retagging or deleting an item that has one, needs the permission that tag requires (*Manage my account* for `skill`), and so does any change to a file inside a directory that has one, at any depth, including moving the file into or out of it; otherwise the request is rejected with 403. A reserved tag may check the item it is on, when it is added and after the item changes, and record what it finds in `tagProblems` rather than refusing the change. The identifier must be one returned by the upload or list operations; a malformed identifier is rejected with 400. Returns 404 if the account has no file with this identifier, or no directory with the given `parentId`. Any other 409 means the file changed during the request, and the request can be retried as it stands. Requires the *Edit file storage* permission.
|
|
348
|
+
* Rename, move or tag an account file
|
|
324
349
|
*/
|
|
325
350
|
updateAccountFilesRaw(requestParameters: FilesApiUpdateAccountFilesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ModelRecord>>;
|
|
326
351
|
/**
|
|
327
|
-
* Changes the display name of a file stored against the account, moves it into another directory, or
|
|
328
|
-
* Rename or
|
|
352
|
+
* Changes the display name of a file stored against the account, moves it into another directory, changes its tags, or any of these, and returns the updated record. Give `name`, `parentId`, `addTags`, `removeTags` or any of them; a body with none is rejected with 400. The stored content, media type, size and identifier are untouched, so anything already referencing the file keeps working. A rename or move and a tag change made in one request are saved, and audited, one after the other. The name is normalised to Unicode NFC, and names are unique within a directory among its files and directories, compared exactly. Giving a `name` already taken in the destination is rejected with 409. A move that gives only `parentId` never fails for its name: if the file\'s name is taken in the destination, it is stored under the lowest free numbered name instead, such as `lease (2).pdf`, and a name normalising makes longer than 255 bytes is shortened to fit; the response\'s `name` is the name it now has. Tags are added and removed as given, without replacing the file\'s other tags, so two people tagging the same file at once do not undo each other\'s changes. A tag cannot be both added and removed in one request. Some tags are reserved: they give an item a meaning Spaciv acts on, and `GET /v1/account/file-tags` lists them. A reserved tag can only be added to the kinds of item it applies to, so `skill` on a file is rejected with 400. Adding or removing a reserved tag, or renaming, moving, retagging or deleting an item that has one, needs the permission that tag requires (*Manage my account* for `skill`), and so does any change to a file inside a directory that has one, at any depth, including moving the file into or out of it; otherwise the request is rejected with 403. A reserved tag may check the item it is on, when it is added and after the item changes, and record what it finds in `tagProblems` rather than refusing the change. The identifier must be one returned by the upload or list operations; a malformed identifier is rejected with 400. Returns 404 if the account has no file with this identifier, or no directory with the given `parentId`. Any other 409 means the file changed during the request, and the request can be retried as it stands. Requires the *Edit file storage* permission.
|
|
353
|
+
* Rename, move or tag an account file
|
|
329
354
|
*/
|
|
330
355
|
updateAccountFiles(requestParameters: FilesApiUpdateAccountFilesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ModelRecord>;
|
|
331
356
|
/**
|
|
@@ -21,7 +21,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
21
21
|
});
|
|
22
22
|
};
|
|
23
23
|
import * as runtime from '../runtime';
|
|
24
|
-
import { AccountDirectoryPatchBodyToJSON, AccountDirectoryPostBodyToJSON, AccountFilePatchBodyToJSON, AccountTextFilePostBodyToJSON, DirectoryFromJSON, DirectoryPageFromJSON, ListPageFromJSON, ModelRecordFromJSON, } from '../models/index';
|
|
24
|
+
import { AccountDirectoryPatchBodyToJSON, AccountDirectoryPostBodyToJSON, AccountFilePatchBodyToJSON, AccountTextFilePostBodyToJSON, DirectoryFromJSON, DirectoryPageFromJSON, ListPageFromJSON, ModelRecordFromJSON, TagListFromJSON, } from '../models/index';
|
|
25
25
|
/**
|
|
26
26
|
*
|
|
27
27
|
*/
|
|
@@ -67,7 +67,7 @@ export class FilesApi extends runtime.BaseAPI {
|
|
|
67
67
|
});
|
|
68
68
|
}
|
|
69
69
|
/**
|
|
70
|
-
* Stores a file against the account and returns the record describing it. Send the request as `multipart/form-data` with a single file field named `file`, and optionally a `parentId` field naming the directory to store it in; without one the file goes in the root, and a `parentId` the account has no directory for is rejected with 404. The uploaded file\'s name, normalised to Unicode NFC, becomes the record\'s `name`, so it must be non-empty and free of `/` and `\\`; a name over 255 bytes is shortened to fit, keeping its extension. Names are unique within a directory among its files and directories, compared exactly, so `Report.pdf` and `report.pdf` can sit side by side: when the name is already taken there, the file is stored under the lowest free numbered name instead, such as `image (2).png`, with the number before the extension, and the response\'s `name` is the name it was stored under. Any media type is accepted; `mimeType` is detected from the file\'s contents rather than from its name or the type the client declared. Maximum file size is 25 MiB, and uploads are rejected if a virus scan fails. The files stored against an account may total at most 1 GiB. An upload that would take the account past that is rejected with 413 and no file is added to the account, though the uploaded bytes may briefly remain in storage until they are cleaned up; deleting files frees their space. A 409 means concurrent uploads kept changing the account\'s usage or taking the names it tried, and the upload can be retried as it stands. The response body is the same record shape the list operation returns, so a client can add it to a list it already holds instead of refetching. Requires the *Edit file storage* permission.
|
|
70
|
+
* Stores a file against the account and returns the record describing it. Send the request as `multipart/form-data` with a single file field named `file`, and optionally a `parentId` field naming the directory to store it in; without one the file goes in the root, and a `parentId` the account has no directory for is rejected with 404. The uploaded file\'s name, normalised to Unicode NFC, becomes the record\'s `name`, so it must be non-empty and free of `/` and `\\`; a name over 255 bytes is shortened to fit, keeping its extension. Names are unique within a directory among its files and directories, compared exactly, so `Report.pdf` and `report.pdf` can sit side by side: when the name is already taken there, the file is stored under the lowest free numbered name instead, such as `image (2).png`, with the number before the extension, and the response\'s `name` is the name it was stored under. Any media type is accepted; `mimeType` is detected from the file\'s contents rather than from its name or the type the client declared. Maximum file size is 25 MiB, and uploads are rejected if a virus scan fails. The files stored against an account may total at most 1 GiB. An upload that would take the account past that is rejected with 413 and no file is added to the account, though the uploaded bytes may briefly remain in storage until they are cleaned up; deleting files frees their space. A 409 means concurrent uploads kept changing the account\'s usage or taking the names it tried, and the upload can be retried as it stands. Uploading into a directory that has a reserved tag, or into any directory inside one at any depth, needs the permission that tag requires (*Manage my account* for `skill`); otherwise the upload is rejected with 403 and no file is added to the account. `GET /v1/account/file-tags` lists the reserved tags. The response body is the same record shape the list operation returns, so a client can add it to a list it already holds instead of refetching. Requires the *Edit file storage* permission.
|
|
71
71
|
* Upload a file to the account
|
|
72
72
|
*/
|
|
73
73
|
createAccountFilesRaw(requestParameters, initOverrides) {
|
|
@@ -114,7 +114,7 @@ export class FilesApi extends runtime.BaseAPI {
|
|
|
114
114
|
});
|
|
115
115
|
}
|
|
116
116
|
/**
|
|
117
|
-
* Stores a file against the account and returns the record describing it. Send the request as `multipart/form-data` with a single file field named `file`, and optionally a `parentId` field naming the directory to store it in; without one the file goes in the root, and a `parentId` the account has no directory for is rejected with 404. The uploaded file\'s name, normalised to Unicode NFC, becomes the record\'s `name`, so it must be non-empty and free of `/` and `\\`; a name over 255 bytes is shortened to fit, keeping its extension. Names are unique within a directory among its files and directories, compared exactly, so `Report.pdf` and `report.pdf` can sit side by side: when the name is already taken there, the file is stored under the lowest free numbered name instead, such as `image (2).png`, with the number before the extension, and the response\'s `name` is the name it was stored under. Any media type is accepted; `mimeType` is detected from the file\'s contents rather than from its name or the type the client declared. Maximum file size is 25 MiB, and uploads are rejected if a virus scan fails. The files stored against an account may total at most 1 GiB. An upload that would take the account past that is rejected with 413 and no file is added to the account, though the uploaded bytes may briefly remain in storage until they are cleaned up; deleting files frees their space. A 409 means concurrent uploads kept changing the account\'s usage or taking the names it tried, and the upload can be retried as it stands. The response body is the same record shape the list operation returns, so a client can add it to a list it already holds instead of refetching. Requires the *Edit file storage* permission.
|
|
117
|
+
* Stores a file against the account and returns the record describing it. Send the request as `multipart/form-data` with a single file field named `file`, and optionally a `parentId` field naming the directory to store it in; without one the file goes in the root, and a `parentId` the account has no directory for is rejected with 404. The uploaded file\'s name, normalised to Unicode NFC, becomes the record\'s `name`, so it must be non-empty and free of `/` and `\\`; a name over 255 bytes is shortened to fit, keeping its extension. Names are unique within a directory among its files and directories, compared exactly, so `Report.pdf` and `report.pdf` can sit side by side: when the name is already taken there, the file is stored under the lowest free numbered name instead, such as `image (2).png`, with the number before the extension, and the response\'s `name` is the name it was stored under. Any media type is accepted; `mimeType` is detected from the file\'s contents rather than from its name or the type the client declared. Maximum file size is 25 MiB, and uploads are rejected if a virus scan fails. The files stored against an account may total at most 1 GiB. An upload that would take the account past that is rejected with 413 and no file is added to the account, though the uploaded bytes may briefly remain in storage until they are cleaned up; deleting files frees their space. A 409 means concurrent uploads kept changing the account\'s usage or taking the names it tried, and the upload can be retried as it stands. Uploading into a directory that has a reserved tag, or into any directory inside one at any depth, needs the permission that tag requires (*Manage my account* for `skill`); otherwise the upload is rejected with 403 and no file is added to the account. `GET /v1/account/file-tags` lists the reserved tags. The response body is the same record shape the list operation returns, so a client can add it to a list it already holds instead of refetching. Requires the *Edit file storage* permission.
|
|
118
118
|
* Upload a file to the account
|
|
119
119
|
*/
|
|
120
120
|
createAccountFiles() {
|
|
@@ -327,7 +327,42 @@ export class FilesApi extends runtime.BaseAPI {
|
|
|
327
327
|
});
|
|
328
328
|
}
|
|
329
329
|
/**
|
|
330
|
-
*
|
|
330
|
+
* Returns every tag in use on the account\'s files and directories, each once, for suggesting tags as they are typed. Pass one to the list operation\'s `tag` to list the files and directories that have it. A tag that has just been added or removed may take a moment to be reflected here. Also returns the reserved tags, which give an item a meaning Spaciv acts on, with the kinds of item each can be added to. Requires the *View file storage* permission.
|
|
331
|
+
* List the account\'s file and directory tags
|
|
332
|
+
*/
|
|
333
|
+
listAccountFileTagsRaw(initOverrides) {
|
|
334
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
335
|
+
const queryParameters = {};
|
|
336
|
+
const headerParameters = {};
|
|
337
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
338
|
+
const token = this.configuration.accessToken;
|
|
339
|
+
const tokenString = yield token("accessToken", []);
|
|
340
|
+
if (tokenString) {
|
|
341
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
342
|
+
}
|
|
343
|
+
}
|
|
344
|
+
let urlPath = `/v1/account/file-tags`;
|
|
345
|
+
const response = yield this.request({
|
|
346
|
+
path: urlPath,
|
|
347
|
+
method: 'GET',
|
|
348
|
+
headers: headerParameters,
|
|
349
|
+
query: queryParameters,
|
|
350
|
+
}, initOverrides);
|
|
351
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => TagListFromJSON(jsonValue));
|
|
352
|
+
});
|
|
353
|
+
}
|
|
354
|
+
/**
|
|
355
|
+
* Returns every tag in use on the account\'s files and directories, each once, for suggesting tags as they are typed. Pass one to the list operation\'s `tag` to list the files and directories that have it. A tag that has just been added or removed may take a moment to be reflected here. Also returns the reserved tags, which give an item a meaning Spaciv acts on, with the kinds of item each can be added to. Requires the *View file storage* permission.
|
|
356
|
+
* List the account\'s file and directory tags
|
|
357
|
+
*/
|
|
358
|
+
listAccountFileTags(initOverrides) {
|
|
359
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
360
|
+
const response = yield this.listAccountFileTagsRaw(initOverrides);
|
|
361
|
+
return yield response.value();
|
|
362
|
+
});
|
|
363
|
+
}
|
|
364
|
+
/**
|
|
365
|
+
* Without `parent` or `tag`, returns a page of every file stored against the account, whatever directory it is in, most recently uploaded first. Files belonging to other accounts are never returned. With `parent`, returns a page of what is directly inside that directory, or inside the root when `parent` is `root`: its directories in `directories`, most recently created first, then its files in `files`, most recently uploaded first. Returns 404 if the account has no directory with that identifier. With `tag`, returns a page of the files and directories that have that tag, wherever they are: the files in `files` and the directories in `directories`, each most recently created first. The contents of a tagged directory are not included unless they have the tag themselves. Giving both `parent` and `tag` is rejected with 400, and so is a tag that is not at most 32 letters, digits and hyphens. When `nextCursor` is present there are more items to fetch; pass it back as `cursor`, with the same `parent` or `tag`, to retrieve the following page. A page may come back shorter than `limit` while still having a `nextCursor`, and may have neither files nor directories. A file that has just been uploaded, moved, renamed or tagged may not show its change here immediately, so clients should apply the record returned by the upload or update operation to their list rather than refetching. Requires the *View file storage* permission.
|
|
331
366
|
* List the account\'s files
|
|
332
367
|
*/
|
|
333
368
|
listAccountFilesRaw(requestParameters, initOverrides) {
|
|
@@ -342,6 +377,9 @@ export class FilesApi extends runtime.BaseAPI {
|
|
|
342
377
|
if (requestParameters['parent'] != null) {
|
|
343
378
|
queryParameters['parent'] = requestParameters['parent'];
|
|
344
379
|
}
|
|
380
|
+
if (requestParameters['tag'] != null) {
|
|
381
|
+
queryParameters['tag'] = requestParameters['tag'];
|
|
382
|
+
}
|
|
345
383
|
const headerParameters = {};
|
|
346
384
|
if (this.configuration && this.configuration.accessToken) {
|
|
347
385
|
const token = this.configuration.accessToken;
|
|
@@ -361,7 +399,7 @@ export class FilesApi extends runtime.BaseAPI {
|
|
|
361
399
|
});
|
|
362
400
|
}
|
|
363
401
|
/**
|
|
364
|
-
* Without `parent`, returns a page of every file stored against the account, whatever directory it is in, most recently uploaded first. Files belonging to other accounts are never returned. With `parent`, returns a page of what is directly inside that directory, or inside the root when `parent` is `root`: its directories in `directories`, most recently created first, then its files in `files`, most recently uploaded first. Returns 404 if the account has no directory with that identifier. When `nextCursor` is present there are more items to fetch; pass it back as `cursor`, with the same `parent`, to retrieve the following page. A page may come back shorter than `limit` while still having a `nextCursor
|
|
402
|
+
* Without `parent` or `tag`, returns a page of every file stored against the account, whatever directory it is in, most recently uploaded first. Files belonging to other accounts are never returned. With `parent`, returns a page of what is directly inside that directory, or inside the root when `parent` is `root`: its directories in `directories`, most recently created first, then its files in `files`, most recently uploaded first. Returns 404 if the account has no directory with that identifier. With `tag`, returns a page of the files and directories that have that tag, wherever they are: the files in `files` and the directories in `directories`, each most recently created first. The contents of a tagged directory are not included unless they have the tag themselves. Giving both `parent` and `tag` is rejected with 400, and so is a tag that is not at most 32 letters, digits and hyphens. When `nextCursor` is present there are more items to fetch; pass it back as `cursor`, with the same `parent` or `tag`, to retrieve the following page. A page may come back shorter than `limit` while still having a `nextCursor`, and may have neither files nor directories. A file that has just been uploaded, moved, renamed or tagged may not show its change here immediately, so clients should apply the record returned by the upload or update operation to their list rather than refetching. Requires the *View file storage* permission.
|
|
365
403
|
* List the account\'s files
|
|
366
404
|
*/
|
|
367
405
|
listAccountFiles() {
|
|
@@ -371,8 +409,8 @@ export class FilesApi extends runtime.BaseAPI {
|
|
|
371
409
|
});
|
|
372
410
|
}
|
|
373
411
|
/**
|
|
374
|
-
* Changes a directory\'s name, moves it into another directory, or
|
|
375
|
-
* Rename or
|
|
412
|
+
* Changes a directory\'s name, moves it into another directory, changes its tags, or any of these, and returns the updated directory. Give `name`, `parentId`, `addTags`, `removeTags` or any of them; a body with none is rejected with 400. Everything inside the directory moves with it and keeps its identifier, so anything referencing those files keeps working. A rename or move and a tag change made in one request are saved, and audited, one after the other. The name is normalised to Unicode NFC, and names are unique within a directory among its files and directories, compared exactly: a name already taken in the destination by a file or another directory, whether by a rename or a move, is rejected with 409. Moving a directory into itself or into a directory inside it, or so that something inside it would be nested more than 8 deep, is rejected with 400. Tags are added and removed as given, without replacing the directory\'s other tags, so two people tagging the same directory at once do not undo each other\'s changes. A tag cannot be both added and removed in one request. The files and directories inside do not take on the directory\'s tags. Some tags are reserved: they give an item a meaning Spaciv acts on, and `GET /v1/account/file-tags` lists them. `skill` marks a directory as a skill. Adding or removing a reserved tag, or renaming, moving, retagging or deleting a directory that has one, needs the permission that tag requires (*Manage my account* for `skill`), and so does any change to a directory inside one that has it, at any depth, including moving it into or out of one; otherwise the request is rejected with 403. A reserved tag may check the directory it is on, when it is added and whenever the directory or anything inside it changes, and record what it finds in `tagProblems` rather than refusing the change. Returns 404 if the account has no directory with this identifier, or none with the given `parentId`. Any other 409 means the account\'s directories changed during the request, and the request can be retried. Requires the *Edit file storage* permission.
|
|
413
|
+
* Rename, move or tag a directory
|
|
376
414
|
*/
|
|
377
415
|
updateAccountDirectoriesRaw(requestParameters, initOverrides) {
|
|
378
416
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -405,8 +443,8 @@ export class FilesApi extends runtime.BaseAPI {
|
|
|
405
443
|
});
|
|
406
444
|
}
|
|
407
445
|
/**
|
|
408
|
-
* Changes a directory\'s name, moves it into another directory, or
|
|
409
|
-
* Rename or
|
|
446
|
+
* Changes a directory\'s name, moves it into another directory, changes its tags, or any of these, and returns the updated directory. Give `name`, `parentId`, `addTags`, `removeTags` or any of them; a body with none is rejected with 400. Everything inside the directory moves with it and keeps its identifier, so anything referencing those files keeps working. A rename or move and a tag change made in one request are saved, and audited, one after the other. The name is normalised to Unicode NFC, and names are unique within a directory among its files and directories, compared exactly: a name already taken in the destination by a file or another directory, whether by a rename or a move, is rejected with 409. Moving a directory into itself or into a directory inside it, or so that something inside it would be nested more than 8 deep, is rejected with 400. Tags are added and removed as given, without replacing the directory\'s other tags, so two people tagging the same directory at once do not undo each other\'s changes. A tag cannot be both added and removed in one request. The files and directories inside do not take on the directory\'s tags. Some tags are reserved: they give an item a meaning Spaciv acts on, and `GET /v1/account/file-tags` lists them. `skill` marks a directory as a skill. Adding or removing a reserved tag, or renaming, moving, retagging or deleting a directory that has one, needs the permission that tag requires (*Manage my account* for `skill`), and so does any change to a directory inside one that has it, at any depth, including moving it into or out of one; otherwise the request is rejected with 403. A reserved tag may check the directory it is on, when it is added and whenever the directory or anything inside it changes, and record what it finds in `tagProblems` rather than refusing the change. Returns 404 if the account has no directory with this identifier, or none with the given `parentId`. Any other 409 means the account\'s directories changed during the request, and the request can be retried. Requires the *Edit file storage* permission.
|
|
447
|
+
* Rename, move or tag a directory
|
|
410
448
|
*/
|
|
411
449
|
updateAccountDirectories(requestParameters, initOverrides) {
|
|
412
450
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -415,8 +453,8 @@ export class FilesApi extends runtime.BaseAPI {
|
|
|
415
453
|
});
|
|
416
454
|
}
|
|
417
455
|
/**
|
|
418
|
-
* Changes the display name of a file stored against the account, moves it into another directory, or
|
|
419
|
-
* Rename or
|
|
456
|
+
* Changes the display name of a file stored against the account, moves it into another directory, changes its tags, or any of these, and returns the updated record. Give `name`, `parentId`, `addTags`, `removeTags` or any of them; a body with none is rejected with 400. The stored content, media type, size and identifier are untouched, so anything already referencing the file keeps working. A rename or move and a tag change made in one request are saved, and audited, one after the other. The name is normalised to Unicode NFC, and names are unique within a directory among its files and directories, compared exactly. Giving a `name` already taken in the destination is rejected with 409. A move that gives only `parentId` never fails for its name: if the file\'s name is taken in the destination, it is stored under the lowest free numbered name instead, such as `lease (2).pdf`, and a name normalising makes longer than 255 bytes is shortened to fit; the response\'s `name` is the name it now has. Tags are added and removed as given, without replacing the file\'s other tags, so two people tagging the same file at once do not undo each other\'s changes. A tag cannot be both added and removed in one request. Some tags are reserved: they give an item a meaning Spaciv acts on, and `GET /v1/account/file-tags` lists them. A reserved tag can only be added to the kinds of item it applies to, so `skill` on a file is rejected with 400. Adding or removing a reserved tag, or renaming, moving, retagging or deleting an item that has one, needs the permission that tag requires (*Manage my account* for `skill`), and so does any change to a file inside a directory that has one, at any depth, including moving the file into or out of it; otherwise the request is rejected with 403. A reserved tag may check the item it is on, when it is added and after the item changes, and record what it finds in `tagProblems` rather than refusing the change. The identifier must be one returned by the upload or list operations; a malformed identifier is rejected with 400. Returns 404 if the account has no file with this identifier, or no directory with the given `parentId`. Any other 409 means the file changed during the request, and the request can be retried as it stands. Requires the *Edit file storage* permission.
|
|
457
|
+
* Rename, move or tag an account file
|
|
420
458
|
*/
|
|
421
459
|
updateAccountFilesRaw(requestParameters, initOverrides) {
|
|
422
460
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -449,8 +487,8 @@ export class FilesApi extends runtime.BaseAPI {
|
|
|
449
487
|
});
|
|
450
488
|
}
|
|
451
489
|
/**
|
|
452
|
-
* Changes the display name of a file stored against the account, moves it into another directory, or
|
|
453
|
-
* Rename or
|
|
490
|
+
* Changes the display name of a file stored against the account, moves it into another directory, changes its tags, or any of these, and returns the updated record. Give `name`, `parentId`, `addTags`, `removeTags` or any of them; a body with none is rejected with 400. The stored content, media type, size and identifier are untouched, so anything already referencing the file keeps working. A rename or move and a tag change made in one request are saved, and audited, one after the other. The name is normalised to Unicode NFC, and names are unique within a directory among its files and directories, compared exactly. Giving a `name` already taken in the destination is rejected with 409. A move that gives only `parentId` never fails for its name: if the file\'s name is taken in the destination, it is stored under the lowest free numbered name instead, such as `lease (2).pdf`, and a name normalising makes longer than 255 bytes is shortened to fit; the response\'s `name` is the name it now has. Tags are added and removed as given, without replacing the file\'s other tags, so two people tagging the same file at once do not undo each other\'s changes. A tag cannot be both added and removed in one request. Some tags are reserved: they give an item a meaning Spaciv acts on, and `GET /v1/account/file-tags` lists them. A reserved tag can only be added to the kinds of item it applies to, so `skill` on a file is rejected with 400. Adding or removing a reserved tag, or renaming, moving, retagging or deleting an item that has one, needs the permission that tag requires (*Manage my account* for `skill`), and so does any change to a file inside a directory that has one, at any depth, including moving the file into or out of it; otherwise the request is rejected with 403. A reserved tag may check the item it is on, when it is added and after the item changes, and record what it finds in `tagProblems` rather than refusing the change. The identifier must be one returned by the upload or list operations; a malformed identifier is rejected with 400. Returns 404 if the account has no file with this identifier, or no directory with the given `parentId`. Any other 409 means the file changed during the request, and the request can be retried as it stands. Requires the *Edit file storage* permission.
|
|
491
|
+
* Rename, move or tag an account file
|
|
454
492
|
*/
|
|
455
493
|
updateAccountFiles(requestParameters, initOverrides) {
|
|
456
494
|
return __awaiter(this, void 0, void 0, function* () {
|