@spaciv/sdk 0.1.26 → 0.1.27
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/esm/apis/FilesApi.d.ts +52 -27
- package/dist/esm/apis/FilesApi.js +51 -13
- 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/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
package/.openapi-generator/FILES
CHANGED
|
@@ -343,6 +343,7 @@ src/models/ReferencesRes.ts
|
|
|
343
343
|
src/models/RelationshipData.ts
|
|
344
344
|
src/models/RepairFloorplansResBody.ts
|
|
345
345
|
src/models/ReportParamsWrapperBody.ts
|
|
346
|
+
src/models/ReservedTagInfo.ts
|
|
346
347
|
src/models/RetriesResBody.ts
|
|
347
348
|
src/models/RetryBody.ts
|
|
348
349
|
src/models/RoleTagsData.ts
|
|
@@ -404,6 +405,7 @@ src/models/SpaceRulesetListEntry.ts
|
|
|
404
405
|
src/models/SpaceRulesetUpdate.ts
|
|
405
406
|
src/models/Step.ts
|
|
406
407
|
src/models/SysAdminUpdateFeatureGroupsParamsWrapperBody.ts
|
|
408
|
+
src/models/TagList.ts
|
|
407
409
|
src/models/TopDownModelChangelogBody.ts
|
|
408
410
|
src/models/TopDownModelEntry.ts
|
|
409
411
|
src/models/TopDownModelEntryChangelogBody.ts
|
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
## @spaciv/sdk@0.1.
|
|
1
|
+
## @spaciv/sdk@0.1.27
|
|
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.27 --save
|
|
40
40
|
```
|
|
41
41
|
|
|
42
42
|
_unPublished (not recommended):_
|
package/dist/apis/FilesApi.d.ts
CHANGED
|
@@ -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
|
/**
|
package/dist/apis/FilesApi.js
CHANGED
|
@@ -70,7 +70,7 @@ class FilesApi extends runtime.BaseAPI {
|
|
|
70
70
|
});
|
|
71
71
|
}
|
|
72
72
|
/**
|
|
73
|
-
* 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.
|
|
73
|
+
* 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.
|
|
74
74
|
* Upload a file to the account
|
|
75
75
|
*/
|
|
76
76
|
createAccountFilesRaw(requestParameters, initOverrides) {
|
|
@@ -117,7 +117,7 @@ class FilesApi extends runtime.BaseAPI {
|
|
|
117
117
|
});
|
|
118
118
|
}
|
|
119
119
|
/**
|
|
120
|
-
* 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.
|
|
120
|
+
* 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.
|
|
121
121
|
* Upload a file to the account
|
|
122
122
|
*/
|
|
123
123
|
createAccountFiles() {
|
|
@@ -330,7 +330,42 @@ class FilesApi extends runtime.BaseAPI {
|
|
|
330
330
|
});
|
|
331
331
|
}
|
|
332
332
|
/**
|
|
333
|
-
*
|
|
333
|
+
* 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.
|
|
334
|
+
* List the account\'s file and directory tags
|
|
335
|
+
*/
|
|
336
|
+
listAccountFileTagsRaw(initOverrides) {
|
|
337
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
338
|
+
const queryParameters = {};
|
|
339
|
+
const headerParameters = {};
|
|
340
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
341
|
+
const token = this.configuration.accessToken;
|
|
342
|
+
const tokenString = yield token("accessToken", []);
|
|
343
|
+
if (tokenString) {
|
|
344
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
345
|
+
}
|
|
346
|
+
}
|
|
347
|
+
let urlPath = `/v1/account/file-tags`;
|
|
348
|
+
const response = yield this.request({
|
|
349
|
+
path: urlPath,
|
|
350
|
+
method: 'GET',
|
|
351
|
+
headers: headerParameters,
|
|
352
|
+
query: queryParameters,
|
|
353
|
+
}, initOverrides);
|
|
354
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.TagListFromJSON)(jsonValue));
|
|
355
|
+
});
|
|
356
|
+
}
|
|
357
|
+
/**
|
|
358
|
+
* 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.
|
|
359
|
+
* List the account\'s file and directory tags
|
|
360
|
+
*/
|
|
361
|
+
listAccountFileTags(initOverrides) {
|
|
362
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
363
|
+
const response = yield this.listAccountFileTagsRaw(initOverrides);
|
|
364
|
+
return yield response.value();
|
|
365
|
+
});
|
|
366
|
+
}
|
|
367
|
+
/**
|
|
368
|
+
* 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.
|
|
334
369
|
* List the account\'s files
|
|
335
370
|
*/
|
|
336
371
|
listAccountFilesRaw(requestParameters, initOverrides) {
|
|
@@ -345,6 +380,9 @@ class FilesApi extends runtime.BaseAPI {
|
|
|
345
380
|
if (requestParameters['parent'] != null) {
|
|
346
381
|
queryParameters['parent'] = requestParameters['parent'];
|
|
347
382
|
}
|
|
383
|
+
if (requestParameters['tag'] != null) {
|
|
384
|
+
queryParameters['tag'] = requestParameters['tag'];
|
|
385
|
+
}
|
|
348
386
|
const headerParameters = {};
|
|
349
387
|
if (this.configuration && this.configuration.accessToken) {
|
|
350
388
|
const token = this.configuration.accessToken;
|
|
@@ -364,7 +402,7 @@ class FilesApi extends runtime.BaseAPI {
|
|
|
364
402
|
});
|
|
365
403
|
}
|
|
366
404
|
/**
|
|
367
|
-
* 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
|
|
405
|
+
* 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.
|
|
368
406
|
* List the account\'s files
|
|
369
407
|
*/
|
|
370
408
|
listAccountFiles() {
|
|
@@ -374,8 +412,8 @@ class FilesApi extends runtime.BaseAPI {
|
|
|
374
412
|
});
|
|
375
413
|
}
|
|
376
414
|
/**
|
|
377
|
-
* Changes a directory\'s name, moves it into another directory, or
|
|
378
|
-
* Rename or
|
|
415
|
+
* 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.
|
|
416
|
+
* Rename, move or tag a directory
|
|
379
417
|
*/
|
|
380
418
|
updateAccountDirectoriesRaw(requestParameters, initOverrides) {
|
|
381
419
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -408,8 +446,8 @@ class FilesApi extends runtime.BaseAPI {
|
|
|
408
446
|
});
|
|
409
447
|
}
|
|
410
448
|
/**
|
|
411
|
-
* Changes a directory\'s name, moves it into another directory, or
|
|
412
|
-
* Rename or
|
|
449
|
+
* 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.
|
|
450
|
+
* Rename, move or tag a directory
|
|
413
451
|
*/
|
|
414
452
|
updateAccountDirectories(requestParameters, initOverrides) {
|
|
415
453
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -418,8 +456,8 @@ class FilesApi extends runtime.BaseAPI {
|
|
|
418
456
|
});
|
|
419
457
|
}
|
|
420
458
|
/**
|
|
421
|
-
* Changes the display name of a file stored against the account, moves it into another directory, or
|
|
422
|
-
* Rename or
|
|
459
|
+
* 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.
|
|
460
|
+
* Rename, move or tag an account file
|
|
423
461
|
*/
|
|
424
462
|
updateAccountFilesRaw(requestParameters, initOverrides) {
|
|
425
463
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -452,8 +490,8 @@ class FilesApi extends runtime.BaseAPI {
|
|
|
452
490
|
});
|
|
453
491
|
}
|
|
454
492
|
/**
|
|
455
|
-
* Changes the display name of a file stored against the account, moves it into another directory, or
|
|
456
|
-
* Rename or
|
|
493
|
+
* 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.
|
|
494
|
+
* Rename, move or tag an account file
|
|
457
495
|
*/
|
|
458
496
|
updateAccountFiles(requestParameters, initOverrides) {
|
|
459
497
|
return __awaiter(this, void 0, void 0, function* () {
|