@spaciv/sdk 0.1.22 → 0.1.24
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 +1 -0
- package/README.md +2 -2
- package/dist/apis/FilesApi.d.ts +28 -1
- package/dist/apis/FilesApi.js +40 -0
- package/dist/apis/LogicLayersApi.d.ts +4 -4
- package/dist/apis/LogicLayersApi.js +2 -2
- package/dist/esm/apis/FilesApi.d.ts +28 -1
- package/dist/esm/apis/FilesApi.js +41 -1
- package/dist/esm/apis/LogicLayersApi.d.ts +4 -4
- package/dist/esm/apis/LogicLayersApi.js +2 -2
- package/dist/esm/models/AccountTextFilePostBody.d.ts +38 -0
- package/dist/esm/models/AccountTextFilePostBody.js +45 -0
- package/dist/esm/models/ModelRecord.d.ts +1 -1
- package/dist/esm/models/index.d.ts +1 -0
- package/dist/esm/models/index.js +1 -0
- package/dist/models/AccountTextFilePostBody.d.ts +38 -0
- package/dist/models/AccountTextFilePostBody.js +52 -0
- package/dist/models/ModelRecord.d.ts +1 -1
- package/dist/models/index.d.ts +1 -0
- package/dist/models/index.js +1 -0
- package/package.json +1 -1
- package/src/apis/FilesApi.ts +72 -0
- package/src/apis/LogicLayersApi.ts +4 -4
- package/src/models/AccountTextFilePostBody.ts +74 -0
- package/src/models/ModelRecord.ts +1 -1
- package/src/models/index.ts +1 -0
package/.openapi-generator/FILES
CHANGED
|
@@ -55,6 +55,7 @@ src/models/AccountPostOIDCProviderReqBody.ts
|
|
|
55
55
|
src/models/AccountPostReqBody.ts
|
|
56
56
|
src/models/AccountPutOIDCClientSecretReqBody.ts
|
|
57
57
|
src/models/AccountPutReqBody.ts
|
|
58
|
+
src/models/AccountTextFilePostBody.ts
|
|
58
59
|
src/models/AccountUsageResBody.ts
|
|
59
60
|
src/models/ActivityData.ts
|
|
60
61
|
src/models/ActivityLocationData.ts
|
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
## @spaciv/sdk@0.1.
|
|
1
|
+
## @spaciv/sdk@0.1.24
|
|
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.24 --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, Directory, DirectoryPage, ListPage, ModelRecord } from '../models/index';
|
|
13
|
+
import type { AccountDirectoryPatchBody, AccountDirectoryPostBody, AccountFilePatchBody, AccountTextFilePostBody, Directory, DirectoryPage, ListPage, ModelRecord } from '../models/index';
|
|
14
14
|
export interface FilesApiCreateAccountDirectoriesRequest {
|
|
15
15
|
accountDirectoryPostBody: AccountDirectoryPostBody;
|
|
16
16
|
}
|
|
@@ -18,6 +18,9 @@ export interface FilesApiCreateAccountFilesRequest {
|
|
|
18
18
|
filename?: Blob;
|
|
19
19
|
name?: string;
|
|
20
20
|
}
|
|
21
|
+
export interface FilesApiCreateAccountTextFilesRequest {
|
|
22
|
+
accountTextFilePostBody: AccountTextFilePostBody;
|
|
23
|
+
}
|
|
21
24
|
export interface FilesApiDeleteAccountDirectoriesRequest {
|
|
22
25
|
id: string;
|
|
23
26
|
}
|
|
@@ -86,6 +89,20 @@ export interface FilesApiInterface {
|
|
|
86
89
|
* Upload a file to the account
|
|
87
90
|
*/
|
|
88
91
|
createAccountFiles(requestParameters: FilesApiCreateAccountFilesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ModelRecord>;
|
|
92
|
+
/**
|
|
93
|
+
* Creates an empty file to write in, at the root or inside another directory, and returns its record. The file is always text, and the name\'s extension, compared ignoring case, chooses its type: `.md` gives `text/markdown; charset=utf-8`, `.py` `text/x-python; charset=utf-8`, `.js` `text/javascript; charset=utf-8`, `.ts` `text/x-typescript; charset=utf-8` and `.go` `text/x-go; charset=utf-8`. Any other name, with or without an extension, gives `text/plain; charset=utf-8`. The file keeps that type when its content is replaced, as long as the new content is detected as plain text. Write the file\'s content by replacing it, with the `ETag` its content is read with. 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 there is rejected with 409 rather than numbered, as an upload\'s would be. Returns 404 if the account has no directory with the given `parentId`. The file counts towards the account\'s 1 GiB storage quota like an upload, and is rejected with 413 when the account is already past it. Requires the *Edit file storage* permission.
|
|
94
|
+
* @summary Create an empty text file in the account\'s files
|
|
95
|
+
* @param {AccountTextFilePostBody} accountTextFilePostBody
|
|
96
|
+
* @param {*} [options] Override http request option.
|
|
97
|
+
* @throws {RequiredError}
|
|
98
|
+
* @memberof FilesApiInterface
|
|
99
|
+
*/
|
|
100
|
+
createAccountTextFilesRaw(requestParameters: FilesApiCreateAccountTextFilesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ModelRecord>>;
|
|
101
|
+
/**
|
|
102
|
+
* Creates an empty file to write in, at the root or inside another directory, and returns its record. The file is always text, and the name\'s extension, compared ignoring case, chooses its type: `.md` gives `text/markdown; charset=utf-8`, `.py` `text/x-python; charset=utf-8`, `.js` `text/javascript; charset=utf-8`, `.ts` `text/x-typescript; charset=utf-8` and `.go` `text/x-go; charset=utf-8`. Any other name, with or without an extension, gives `text/plain; charset=utf-8`. The file keeps that type when its content is replaced, as long as the new content is detected as plain text. Write the file\'s content by replacing it, with the `ETag` its content is read with. 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 there is rejected with 409 rather than numbered, as an upload\'s would be. Returns 404 if the account has no directory with the given `parentId`. The file counts towards the account\'s 1 GiB storage quota like an upload, and is rejected with 413 when the account is already past it. Requires the *Edit file storage* permission.
|
|
103
|
+
* Create an empty text file in the account\'s files
|
|
104
|
+
*/
|
|
105
|
+
createAccountTextFiles(requestParameters: FilesApiCreateAccountTextFilesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ModelRecord>;
|
|
89
106
|
/**
|
|
90
107
|
* Deletes an empty directory from the account\'s files. A directory that still holds a file or another directory is rejected with 409 `directory is not empty`: move or delete its contents first. Deleting a directory that is already gone succeeds rather than returning 404. Any other 409 means the directory changed during the request, and the request can be retried. Requires the *Edit file storage* permission.
|
|
91
108
|
* @summary Delete a directory
|
|
@@ -231,6 +248,16 @@ export declare class FilesApi extends runtime.BaseAPI implements FilesApiInterfa
|
|
|
231
248
|
* Upload a file to the account
|
|
232
249
|
*/
|
|
233
250
|
createAccountFiles(requestParameters?: FilesApiCreateAccountFilesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ModelRecord>;
|
|
251
|
+
/**
|
|
252
|
+
* Creates an empty file to write in, at the root or inside another directory, and returns its record. The file is always text, and the name\'s extension, compared ignoring case, chooses its type: `.md` gives `text/markdown; charset=utf-8`, `.py` `text/x-python; charset=utf-8`, `.js` `text/javascript; charset=utf-8`, `.ts` `text/x-typescript; charset=utf-8` and `.go` `text/x-go; charset=utf-8`. Any other name, with or without an extension, gives `text/plain; charset=utf-8`. The file keeps that type when its content is replaced, as long as the new content is detected as plain text. Write the file\'s content by replacing it, with the `ETag` its content is read with. 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 there is rejected with 409 rather than numbered, as an upload\'s would be. Returns 404 if the account has no directory with the given `parentId`. The file counts towards the account\'s 1 GiB storage quota like an upload, and is rejected with 413 when the account is already past it. Requires the *Edit file storage* permission.
|
|
253
|
+
* Create an empty text file in the account\'s files
|
|
254
|
+
*/
|
|
255
|
+
createAccountTextFilesRaw(requestParameters: FilesApiCreateAccountTextFilesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ModelRecord>>;
|
|
256
|
+
/**
|
|
257
|
+
* Creates an empty file to write in, at the root or inside another directory, and returns its record. The file is always text, and the name\'s extension, compared ignoring case, chooses its type: `.md` gives `text/markdown; charset=utf-8`, `.py` `text/x-python; charset=utf-8`, `.js` `text/javascript; charset=utf-8`, `.ts` `text/x-typescript; charset=utf-8` and `.go` `text/x-go; charset=utf-8`. Any other name, with or without an extension, gives `text/plain; charset=utf-8`. The file keeps that type when its content is replaced, as long as the new content is detected as plain text. Write the file\'s content by replacing it, with the `ETag` its content is read with. 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 there is rejected with 409 rather than numbered, as an upload\'s would be. Returns 404 if the account has no directory with the given `parentId`. The file counts towards the account\'s 1 GiB storage quota like an upload, and is rejected with 413 when the account is already past it. Requires the *Edit file storage* permission.
|
|
258
|
+
* Create an empty text file in the account\'s files
|
|
259
|
+
*/
|
|
260
|
+
createAccountTextFiles(requestParameters: FilesApiCreateAccountTextFilesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ModelRecord>;
|
|
234
261
|
/**
|
|
235
262
|
* Deletes an empty directory from the account\'s files. A directory that still holds a file or another directory is rejected with 409 `directory is not empty`: move or delete its contents first. Deleting a directory that is already gone succeeds rather than returning 404. Any other 409 means the directory changed during the request, and the request can be retried. Requires the *Edit file storage* permission.
|
|
236
263
|
* Delete a directory
|
package/dist/apis/FilesApi.js
CHANGED
|
@@ -126,6 +126,46 @@ class FilesApi extends runtime.BaseAPI {
|
|
|
126
126
|
return yield response.value();
|
|
127
127
|
});
|
|
128
128
|
}
|
|
129
|
+
/**
|
|
130
|
+
* Creates an empty file to write in, at the root or inside another directory, and returns its record. The file is always text, and the name\'s extension, compared ignoring case, chooses its type: `.md` gives `text/markdown; charset=utf-8`, `.py` `text/x-python; charset=utf-8`, `.js` `text/javascript; charset=utf-8`, `.ts` `text/x-typescript; charset=utf-8` and `.go` `text/x-go; charset=utf-8`. Any other name, with or without an extension, gives `text/plain; charset=utf-8`. The file keeps that type when its content is replaced, as long as the new content is detected as plain text. Write the file\'s content by replacing it, with the `ETag` its content is read with. 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 there is rejected with 409 rather than numbered, as an upload\'s would be. Returns 404 if the account has no directory with the given `parentId`. The file counts towards the account\'s 1 GiB storage quota like an upload, and is rejected with 413 when the account is already past it. Requires the *Edit file storage* permission.
|
|
131
|
+
* Create an empty text file in the account\'s files
|
|
132
|
+
*/
|
|
133
|
+
createAccountTextFilesRaw(requestParameters, initOverrides) {
|
|
134
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
135
|
+
if (requestParameters['accountTextFilePostBody'] == null) {
|
|
136
|
+
throw new runtime.RequiredError('accountTextFilePostBody', 'Required parameter "accountTextFilePostBody" was null or undefined when calling createAccountTextFiles().');
|
|
137
|
+
}
|
|
138
|
+
const queryParameters = {};
|
|
139
|
+
const headerParameters = {};
|
|
140
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
141
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
142
|
+
const token = this.configuration.accessToken;
|
|
143
|
+
const tokenString = yield token("accessToken", []);
|
|
144
|
+
if (tokenString) {
|
|
145
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
let urlPath = `/v1/account/text-files`;
|
|
149
|
+
const response = yield this.request({
|
|
150
|
+
path: urlPath,
|
|
151
|
+
method: 'POST',
|
|
152
|
+
headers: headerParameters,
|
|
153
|
+
query: queryParameters,
|
|
154
|
+
body: (0, index_1.AccountTextFilePostBodyToJSON)(requestParameters['accountTextFilePostBody']),
|
|
155
|
+
}, initOverrides);
|
|
156
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.ModelRecordFromJSON)(jsonValue));
|
|
157
|
+
});
|
|
158
|
+
}
|
|
159
|
+
/**
|
|
160
|
+
* Creates an empty file to write in, at the root or inside another directory, and returns its record. The file is always text, and the name\'s extension, compared ignoring case, chooses its type: `.md` gives `text/markdown; charset=utf-8`, `.py` `text/x-python; charset=utf-8`, `.js` `text/javascript; charset=utf-8`, `.ts` `text/x-typescript; charset=utf-8` and `.go` `text/x-go; charset=utf-8`. Any other name, with or without an extension, gives `text/plain; charset=utf-8`. The file keeps that type when its content is replaced, as long as the new content is detected as plain text. Write the file\'s content by replacing it, with the `ETag` its content is read with. 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 there is rejected with 409 rather than numbered, as an upload\'s would be. Returns 404 if the account has no directory with the given `parentId`. The file counts towards the account\'s 1 GiB storage quota like an upload, and is rejected with 413 when the account is already past it. Requires the *Edit file storage* permission.
|
|
161
|
+
* Create an empty text file in the account\'s files
|
|
162
|
+
*/
|
|
163
|
+
createAccountTextFiles(requestParameters, initOverrides) {
|
|
164
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
165
|
+
const response = yield this.createAccountTextFilesRaw(requestParameters, initOverrides);
|
|
166
|
+
return yield response.value();
|
|
167
|
+
});
|
|
168
|
+
}
|
|
129
169
|
/**
|
|
130
170
|
* Deletes an empty directory from the account\'s files. A directory that still holds a file or another directory is rejected with 409 `directory is not empty`: move or delete its contents first. Deleting a directory that is already gone succeeds rather than returning 404. Any other 409 means the directory changed during the request, and the request can be retried. Requires the *Edit file storage* permission.
|
|
131
171
|
* Delete a directory
|
|
@@ -159,7 +159,7 @@ export interface LogicLayersApiInterface {
|
|
|
159
159
|
*/
|
|
160
160
|
listSpaceRulesetsPresets(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<SpaceRuleSet>>;
|
|
161
161
|
/**
|
|
162
|
-
* 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`; one in a space rule shape from before logic layers is
|
|
162
|
+
* 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`; one in a space rule shape from before logic layers is converted and stored as the logic layer it converts to. 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.
|
|
163
163
|
* @summary Update a logic layer
|
|
164
164
|
* @param {string} id
|
|
165
165
|
* @param {SpaceRulesetUpdate} spaceRulesetUpdate
|
|
@@ -169,7 +169,7 @@ export interface LogicLayersApiInterface {
|
|
|
169
169
|
*/
|
|
170
170
|
updateSpaceRulesetsRaw(requestParameters: LogicLayersApiUpdateSpaceRulesetsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<object>>;
|
|
171
171
|
/**
|
|
172
|
-
* 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`; one in a space rule shape from before logic layers is
|
|
172
|
+
* 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`; one in a space rule shape from before logic layers is converted and stored as the logic layer it converts to. 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.
|
|
173
173
|
* Update a logic layer
|
|
174
174
|
*/
|
|
175
175
|
updateSpaceRulesets(requestParameters: LogicLayersApiUpdateSpaceRulesetsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<object>;
|
|
@@ -259,12 +259,12 @@ export declare class LogicLayersApi extends runtime.BaseAPI implements LogicLaye
|
|
|
259
259
|
*/
|
|
260
260
|
listSpaceRulesetsPresets(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<SpaceRuleSet>>;
|
|
261
261
|
/**
|
|
262
|
-
* 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`; one in a space rule shape from before logic layers is
|
|
262
|
+
* 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`; one in a space rule shape from before logic layers is converted and stored as the logic layer it converts to. 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.
|
|
263
263
|
* Update a logic layer
|
|
264
264
|
*/
|
|
265
265
|
updateSpaceRulesetsRaw(requestParameters: LogicLayersApiUpdateSpaceRulesetsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<object>>;
|
|
266
266
|
/**
|
|
267
|
-
* 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`; one in a space rule shape from before logic layers is
|
|
267
|
+
* 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`; one in a space rule shape from before logic layers is converted and stored as the logic layer it converts to. 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.
|
|
268
268
|
* Update a logic layer
|
|
269
269
|
*/
|
|
270
270
|
updateSpaceRulesets(requestParameters: LogicLayersApiUpdateSpaceRulesetsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<object>;
|
|
@@ -368,7 +368,7 @@ class LogicLayersApi extends runtime.BaseAPI {
|
|
|
368
368
|
});
|
|
369
369
|
}
|
|
370
370
|
/**
|
|
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`; one in a space rule shape from before logic layers is
|
|
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`; one in a space rule shape from before logic layers is converted and stored as the logic layer it converts to. 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
372
|
* Update a logic layer
|
|
373
373
|
*/
|
|
374
374
|
updateSpaceRulesetsRaw(requestParameters, initOverrides) {
|
|
@@ -402,7 +402,7 @@ class LogicLayersApi extends runtime.BaseAPI {
|
|
|
402
402
|
});
|
|
403
403
|
}
|
|
404
404
|
/**
|
|
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`; one in a space rule shape from before logic layers is
|
|
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`; one in a space rule shape from before logic layers is converted and stored as the logic layer it converts to. 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
406
|
* Update a logic layer
|
|
407
407
|
*/
|
|
408
408
|
updateSpaceRulesets(requestParameters, initOverrides) {
|
|
@@ -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, Directory, DirectoryPage, ListPage, ModelRecord } from '../models/index';
|
|
13
|
+
import type { AccountDirectoryPatchBody, AccountDirectoryPostBody, AccountFilePatchBody, AccountTextFilePostBody, Directory, DirectoryPage, ListPage, ModelRecord } from '../models/index';
|
|
14
14
|
export interface FilesApiCreateAccountDirectoriesRequest {
|
|
15
15
|
accountDirectoryPostBody: AccountDirectoryPostBody;
|
|
16
16
|
}
|
|
@@ -18,6 +18,9 @@ export interface FilesApiCreateAccountFilesRequest {
|
|
|
18
18
|
filename?: Blob;
|
|
19
19
|
name?: string;
|
|
20
20
|
}
|
|
21
|
+
export interface FilesApiCreateAccountTextFilesRequest {
|
|
22
|
+
accountTextFilePostBody: AccountTextFilePostBody;
|
|
23
|
+
}
|
|
21
24
|
export interface FilesApiDeleteAccountDirectoriesRequest {
|
|
22
25
|
id: string;
|
|
23
26
|
}
|
|
@@ -86,6 +89,20 @@ export interface FilesApiInterface {
|
|
|
86
89
|
* Upload a file to the account
|
|
87
90
|
*/
|
|
88
91
|
createAccountFiles(requestParameters: FilesApiCreateAccountFilesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ModelRecord>;
|
|
92
|
+
/**
|
|
93
|
+
* Creates an empty file to write in, at the root or inside another directory, and returns its record. The file is always text, and the name\'s extension, compared ignoring case, chooses its type: `.md` gives `text/markdown; charset=utf-8`, `.py` `text/x-python; charset=utf-8`, `.js` `text/javascript; charset=utf-8`, `.ts` `text/x-typescript; charset=utf-8` and `.go` `text/x-go; charset=utf-8`. Any other name, with or without an extension, gives `text/plain; charset=utf-8`. The file keeps that type when its content is replaced, as long as the new content is detected as plain text. Write the file\'s content by replacing it, with the `ETag` its content is read with. 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 there is rejected with 409 rather than numbered, as an upload\'s would be. Returns 404 if the account has no directory with the given `parentId`. The file counts towards the account\'s 1 GiB storage quota like an upload, and is rejected with 413 when the account is already past it. Requires the *Edit file storage* permission.
|
|
94
|
+
* @summary Create an empty text file in the account\'s files
|
|
95
|
+
* @param {AccountTextFilePostBody} accountTextFilePostBody
|
|
96
|
+
* @param {*} [options] Override http request option.
|
|
97
|
+
* @throws {RequiredError}
|
|
98
|
+
* @memberof FilesApiInterface
|
|
99
|
+
*/
|
|
100
|
+
createAccountTextFilesRaw(requestParameters: FilesApiCreateAccountTextFilesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ModelRecord>>;
|
|
101
|
+
/**
|
|
102
|
+
* Creates an empty file to write in, at the root or inside another directory, and returns its record. The file is always text, and the name\'s extension, compared ignoring case, chooses its type: `.md` gives `text/markdown; charset=utf-8`, `.py` `text/x-python; charset=utf-8`, `.js` `text/javascript; charset=utf-8`, `.ts` `text/x-typescript; charset=utf-8` and `.go` `text/x-go; charset=utf-8`. Any other name, with or without an extension, gives `text/plain; charset=utf-8`. The file keeps that type when its content is replaced, as long as the new content is detected as plain text. Write the file\'s content by replacing it, with the `ETag` its content is read with. 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 there is rejected with 409 rather than numbered, as an upload\'s would be. Returns 404 if the account has no directory with the given `parentId`. The file counts towards the account\'s 1 GiB storage quota like an upload, and is rejected with 413 when the account is already past it. Requires the *Edit file storage* permission.
|
|
103
|
+
* Create an empty text file in the account\'s files
|
|
104
|
+
*/
|
|
105
|
+
createAccountTextFiles(requestParameters: FilesApiCreateAccountTextFilesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ModelRecord>;
|
|
89
106
|
/**
|
|
90
107
|
* Deletes an empty directory from the account\'s files. A directory that still holds a file or another directory is rejected with 409 `directory is not empty`: move or delete its contents first. Deleting a directory that is already gone succeeds rather than returning 404. Any other 409 means the directory changed during the request, and the request can be retried. Requires the *Edit file storage* permission.
|
|
91
108
|
* @summary Delete a directory
|
|
@@ -231,6 +248,16 @@ export declare class FilesApi extends runtime.BaseAPI implements FilesApiInterfa
|
|
|
231
248
|
* Upload a file to the account
|
|
232
249
|
*/
|
|
233
250
|
createAccountFiles(requestParameters?: FilesApiCreateAccountFilesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ModelRecord>;
|
|
251
|
+
/**
|
|
252
|
+
* Creates an empty file to write in, at the root or inside another directory, and returns its record. The file is always text, and the name\'s extension, compared ignoring case, chooses its type: `.md` gives `text/markdown; charset=utf-8`, `.py` `text/x-python; charset=utf-8`, `.js` `text/javascript; charset=utf-8`, `.ts` `text/x-typescript; charset=utf-8` and `.go` `text/x-go; charset=utf-8`. Any other name, with or without an extension, gives `text/plain; charset=utf-8`. The file keeps that type when its content is replaced, as long as the new content is detected as plain text. Write the file\'s content by replacing it, with the `ETag` its content is read with. 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 there is rejected with 409 rather than numbered, as an upload\'s would be. Returns 404 if the account has no directory with the given `parentId`. The file counts towards the account\'s 1 GiB storage quota like an upload, and is rejected with 413 when the account is already past it. Requires the *Edit file storage* permission.
|
|
253
|
+
* Create an empty text file in the account\'s files
|
|
254
|
+
*/
|
|
255
|
+
createAccountTextFilesRaw(requestParameters: FilesApiCreateAccountTextFilesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ModelRecord>>;
|
|
256
|
+
/**
|
|
257
|
+
* Creates an empty file to write in, at the root or inside another directory, and returns its record. The file is always text, and the name\'s extension, compared ignoring case, chooses its type: `.md` gives `text/markdown; charset=utf-8`, `.py` `text/x-python; charset=utf-8`, `.js` `text/javascript; charset=utf-8`, `.ts` `text/x-typescript; charset=utf-8` and `.go` `text/x-go; charset=utf-8`. Any other name, with or without an extension, gives `text/plain; charset=utf-8`. The file keeps that type when its content is replaced, as long as the new content is detected as plain text. Write the file\'s content by replacing it, with the `ETag` its content is read with. 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 there is rejected with 409 rather than numbered, as an upload\'s would be. Returns 404 if the account has no directory with the given `parentId`. The file counts towards the account\'s 1 GiB storage quota like an upload, and is rejected with 413 when the account is already past it. Requires the *Edit file storage* permission.
|
|
258
|
+
* Create an empty text file in the account\'s files
|
|
259
|
+
*/
|
|
260
|
+
createAccountTextFiles(requestParameters: FilesApiCreateAccountTextFilesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ModelRecord>;
|
|
234
261
|
/**
|
|
235
262
|
* Deletes an empty directory from the account\'s files. A directory that still holds a file or another directory is rejected with 409 `directory is not empty`: move or delete its contents first. Deleting a directory that is already gone succeeds rather than returning 404. Any other 409 means the directory changed during the request, and the request can be retried. Requires the *Edit file storage* permission.
|
|
236
263
|
* Delete a directory
|
|
@@ -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, DirectoryFromJSON, DirectoryPageFromJSON, ListPageFromJSON, ModelRecordFromJSON, } from '../models/index';
|
|
24
|
+
import { AccountDirectoryPatchBodyToJSON, AccountDirectoryPostBodyToJSON, AccountFilePatchBodyToJSON, AccountTextFilePostBodyToJSON, DirectoryFromJSON, DirectoryPageFromJSON, ListPageFromJSON, ModelRecordFromJSON, } from '../models/index';
|
|
25
25
|
/**
|
|
26
26
|
*
|
|
27
27
|
*/
|
|
@@ -123,6 +123,46 @@ export class FilesApi extends runtime.BaseAPI {
|
|
|
123
123
|
return yield response.value();
|
|
124
124
|
});
|
|
125
125
|
}
|
|
126
|
+
/**
|
|
127
|
+
* Creates an empty file to write in, at the root or inside another directory, and returns its record. The file is always text, and the name\'s extension, compared ignoring case, chooses its type: `.md` gives `text/markdown; charset=utf-8`, `.py` `text/x-python; charset=utf-8`, `.js` `text/javascript; charset=utf-8`, `.ts` `text/x-typescript; charset=utf-8` and `.go` `text/x-go; charset=utf-8`. Any other name, with or without an extension, gives `text/plain; charset=utf-8`. The file keeps that type when its content is replaced, as long as the new content is detected as plain text. Write the file\'s content by replacing it, with the `ETag` its content is read with. 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 there is rejected with 409 rather than numbered, as an upload\'s would be. Returns 404 if the account has no directory with the given `parentId`. The file counts towards the account\'s 1 GiB storage quota like an upload, and is rejected with 413 when the account is already past it. Requires the *Edit file storage* permission.
|
|
128
|
+
* Create an empty text file in the account\'s files
|
|
129
|
+
*/
|
|
130
|
+
createAccountTextFilesRaw(requestParameters, initOverrides) {
|
|
131
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
132
|
+
if (requestParameters['accountTextFilePostBody'] == null) {
|
|
133
|
+
throw new runtime.RequiredError('accountTextFilePostBody', 'Required parameter "accountTextFilePostBody" was null or undefined when calling createAccountTextFiles().');
|
|
134
|
+
}
|
|
135
|
+
const queryParameters = {};
|
|
136
|
+
const headerParameters = {};
|
|
137
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
138
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
139
|
+
const token = this.configuration.accessToken;
|
|
140
|
+
const tokenString = yield token("accessToken", []);
|
|
141
|
+
if (tokenString) {
|
|
142
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
let urlPath = `/v1/account/text-files`;
|
|
146
|
+
const response = yield this.request({
|
|
147
|
+
path: urlPath,
|
|
148
|
+
method: 'POST',
|
|
149
|
+
headers: headerParameters,
|
|
150
|
+
query: queryParameters,
|
|
151
|
+
body: AccountTextFilePostBodyToJSON(requestParameters['accountTextFilePostBody']),
|
|
152
|
+
}, initOverrides);
|
|
153
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => ModelRecordFromJSON(jsonValue));
|
|
154
|
+
});
|
|
155
|
+
}
|
|
156
|
+
/**
|
|
157
|
+
* Creates an empty file to write in, at the root or inside another directory, and returns its record. The file is always text, and the name\'s extension, compared ignoring case, chooses its type: `.md` gives `text/markdown; charset=utf-8`, `.py` `text/x-python; charset=utf-8`, `.js` `text/javascript; charset=utf-8`, `.ts` `text/x-typescript; charset=utf-8` and `.go` `text/x-go; charset=utf-8`. Any other name, with or without an extension, gives `text/plain; charset=utf-8`. The file keeps that type when its content is replaced, as long as the new content is detected as plain text. Write the file\'s content by replacing it, with the `ETag` its content is read with. 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 there is rejected with 409 rather than numbered, as an upload\'s would be. Returns 404 if the account has no directory with the given `parentId`. The file counts towards the account\'s 1 GiB storage quota like an upload, and is rejected with 413 when the account is already past it. Requires the *Edit file storage* permission.
|
|
158
|
+
* Create an empty text file in the account\'s files
|
|
159
|
+
*/
|
|
160
|
+
createAccountTextFiles(requestParameters, initOverrides) {
|
|
161
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
162
|
+
const response = yield this.createAccountTextFilesRaw(requestParameters, initOverrides);
|
|
163
|
+
return yield response.value();
|
|
164
|
+
});
|
|
165
|
+
}
|
|
126
166
|
/**
|
|
127
167
|
* Deletes an empty directory from the account\'s files. A directory that still holds a file or another directory is rejected with 409 `directory is not empty`: move or delete its contents first. Deleting a directory that is already gone succeeds rather than returning 404. Any other 409 means the directory changed during the request, and the request can be retried. Requires the *Edit file storage* permission.
|
|
128
168
|
* Delete a directory
|
|
@@ -159,7 +159,7 @@ export interface LogicLayersApiInterface {
|
|
|
159
159
|
*/
|
|
160
160
|
listSpaceRulesetsPresets(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<SpaceRuleSet>>;
|
|
161
161
|
/**
|
|
162
|
-
* 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`; one in a space rule shape from before logic layers is
|
|
162
|
+
* 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`; one in a space rule shape from before logic layers is converted and stored as the logic layer it converts to. 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.
|
|
163
163
|
* @summary Update a logic layer
|
|
164
164
|
* @param {string} id
|
|
165
165
|
* @param {SpaceRulesetUpdate} spaceRulesetUpdate
|
|
@@ -169,7 +169,7 @@ export interface LogicLayersApiInterface {
|
|
|
169
169
|
*/
|
|
170
170
|
updateSpaceRulesetsRaw(requestParameters: LogicLayersApiUpdateSpaceRulesetsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<object>>;
|
|
171
171
|
/**
|
|
172
|
-
* 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`; one in a space rule shape from before logic layers is
|
|
172
|
+
* 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`; one in a space rule shape from before logic layers is converted and stored as the logic layer it converts to. 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.
|
|
173
173
|
* Update a logic layer
|
|
174
174
|
*/
|
|
175
175
|
updateSpaceRulesets(requestParameters: LogicLayersApiUpdateSpaceRulesetsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<object>;
|
|
@@ -259,12 +259,12 @@ export declare class LogicLayersApi extends runtime.BaseAPI implements LogicLaye
|
|
|
259
259
|
*/
|
|
260
260
|
listSpaceRulesetsPresets(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<SpaceRuleSet>>;
|
|
261
261
|
/**
|
|
262
|
-
* 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`; one in a space rule shape from before logic layers is
|
|
262
|
+
* 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`; one in a space rule shape from before logic layers is converted and stored as the logic layer it converts to. 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.
|
|
263
263
|
* Update a logic layer
|
|
264
264
|
*/
|
|
265
265
|
updateSpaceRulesetsRaw(requestParameters: LogicLayersApiUpdateSpaceRulesetsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<object>>;
|
|
266
266
|
/**
|
|
267
|
-
* 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`; one in a space rule shape from before logic layers is
|
|
267
|
+
* 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`; one in a space rule shape from before logic layers is converted and stored as the logic layer it converts to. 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.
|
|
268
268
|
* Update a logic layer
|
|
269
269
|
*/
|
|
270
270
|
updateSpaceRulesets(requestParameters: LogicLayersApiUpdateSpaceRulesetsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<object>;
|
|
@@ -365,7 +365,7 @@ export class LogicLayersApi extends runtime.BaseAPI {
|
|
|
365
365
|
});
|
|
366
366
|
}
|
|
367
367
|
/**
|
|
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`; one in a space rule shape from before logic layers is
|
|
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`; one in a space rule shape from before logic layers is converted and stored as the logic layer it converts to. 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.
|
|
369
369
|
* Update a logic layer
|
|
370
370
|
*/
|
|
371
371
|
updateSpaceRulesetsRaw(requestParameters, initOverrides) {
|
|
@@ -399,7 +399,7 @@ export class LogicLayersApi extends runtime.BaseAPI {
|
|
|
399
399
|
});
|
|
400
400
|
}
|
|
401
401
|
/**
|
|
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`; one in a space rule shape from before logic layers is
|
|
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`; one in a space rule shape from before logic layers is converted and stored as the logic layer it converts to. 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.
|
|
403
403
|
* Update a logic layer
|
|
404
404
|
*/
|
|
405
405
|
updateSpaceRulesets(requestParameters, initOverrides) {
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* spaciv API
|
|
3
|
+
* The spaciv API powers workplace planning: modelling how many people an organisation has, how they work, and how much space that requires. ## Getting started 1. Exchange credentials for an access token using one of the operations under **Authentication**. 2. Send that token on every subsequent request as `Authorization: Bearer <token>`. 3. Access tokens are short lived. Call `POST /v1/auth/refresh-token` to obtain a new one before the old one expires. ## Conventions Every operation is versioned under `/v1`. Collections are plural (`GET /v1/dashboards` lists, `POST /v1/dashboards` creates) and individual records live beneath them (`/v1/dashboards/{id}`). Singular paths such as `/v1/account`, `/v1/project` and `/v1/user` refer to the record the access token was issued for. Request and response bodies are JSON. Timestamps are RFC 3339. Identifiers are opaque strings unless documented otherwise, and collection operations return the records visible to the account the token was issued for. Failures return an [RFC 9457](https://www.rfc-editor.org/rfc/rfc9457) problem document with a `detail` field describing what went wrong.
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1.0.0
|
|
6
|
+
* Contact: support@spaciv.com
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
*
|
|
14
|
+
* @export
|
|
15
|
+
* @interface AccountTextFilePostBody
|
|
16
|
+
*/
|
|
17
|
+
export interface AccountTextFilePostBody {
|
|
18
|
+
/**
|
|
19
|
+
* Name of the new file. Its extension chooses its type. At most 255 bytes after normalising to Unicode NFC. Must not contain a forward slash or a backslash, and must not be . or ..
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof AccountTextFilePostBody
|
|
22
|
+
*/
|
|
23
|
+
name: string;
|
|
24
|
+
/**
|
|
25
|
+
* Identifier of the directory to create the file in. Leave it out to create it at the root.
|
|
26
|
+
* @type {string}
|
|
27
|
+
* @memberof AccountTextFilePostBody
|
|
28
|
+
*/
|
|
29
|
+
parentId?: string;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Check if a given object implements the AccountTextFilePostBody interface.
|
|
33
|
+
*/
|
|
34
|
+
export declare function instanceOfAccountTextFilePostBody(value: object): value is AccountTextFilePostBody;
|
|
35
|
+
export declare function AccountTextFilePostBodyFromJSON(json: any): AccountTextFilePostBody;
|
|
36
|
+
export declare function AccountTextFilePostBodyFromJSONTyped(json: any, ignoreDiscriminator: boolean): AccountTextFilePostBody;
|
|
37
|
+
export declare function AccountTextFilePostBodyToJSON(json: any): AccountTextFilePostBody;
|
|
38
|
+
export declare function AccountTextFilePostBodyToJSONTyped(value?: AccountTextFilePostBody | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* spaciv API
|
|
5
|
+
* The spaciv API powers workplace planning: modelling how many people an organisation has, how they work, and how much space that requires. ## Getting started 1. Exchange credentials for an access token using one of the operations under **Authentication**. 2. Send that token on every subsequent request as `Authorization: Bearer <token>`. 3. Access tokens are short lived. Call `POST /v1/auth/refresh-token` to obtain a new one before the old one expires. ## Conventions Every operation is versioned under `/v1`. Collections are plural (`GET /v1/dashboards` lists, `POST /v1/dashboards` creates) and individual records live beneath them (`/v1/dashboards/{id}`). Singular paths such as `/v1/account`, `/v1/project` and `/v1/user` refer to the record the access token was issued for. Request and response bodies are JSON. Timestamps are RFC 3339. Identifiers are opaque strings unless documented otherwise, and collection operations return the records visible to the account the token was issued for. Failures return an [RFC 9457](https://www.rfc-editor.org/rfc/rfc9457) problem document with a `detail` field describing what went wrong.
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0.0
|
|
8
|
+
* Contact: support@spaciv.com
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
/**
|
|
15
|
+
* Check if a given object implements the AccountTextFilePostBody interface.
|
|
16
|
+
*/
|
|
17
|
+
export function instanceOfAccountTextFilePostBody(value) {
|
|
18
|
+
if (!('name' in value) || value['name'] === undefined)
|
|
19
|
+
return false;
|
|
20
|
+
return true;
|
|
21
|
+
}
|
|
22
|
+
export function AccountTextFilePostBodyFromJSON(json) {
|
|
23
|
+
return AccountTextFilePostBodyFromJSONTyped(json, false);
|
|
24
|
+
}
|
|
25
|
+
export function AccountTextFilePostBodyFromJSONTyped(json, ignoreDiscriminator) {
|
|
26
|
+
if (json == null) {
|
|
27
|
+
return json;
|
|
28
|
+
}
|
|
29
|
+
return {
|
|
30
|
+
'name': json['name'],
|
|
31
|
+
'parentId': json['parentId'] == null ? undefined : json['parentId'],
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
export function AccountTextFilePostBodyToJSON(json) {
|
|
35
|
+
return AccountTextFilePostBodyToJSONTyped(json, false);
|
|
36
|
+
}
|
|
37
|
+
export function AccountTextFilePostBodyToJSONTyped(value, ignoreDiscriminator = false) {
|
|
38
|
+
if (value == null) {
|
|
39
|
+
return value;
|
|
40
|
+
}
|
|
41
|
+
return {
|
|
42
|
+
'name': value['name'],
|
|
43
|
+
'parentId': value['parentId'],
|
|
44
|
+
};
|
|
45
|
+
}
|
|
@@ -28,7 +28,7 @@ export interface ModelRecord {
|
|
|
28
28
|
*/
|
|
29
29
|
id: string;
|
|
30
30
|
/**
|
|
31
|
-
* Media type detected from the file's contents when they were last stored, rather than from its name or the type the client declared.
|
|
31
|
+
* Media type detected from the file's contents when they were last stored, rather than from its name or the type the client declared. A file created empty in the app takes its type from its extension, such as text/markdown; charset=utf-8 for .md, and keeps it while its contents are detected as plain text.
|
|
32
32
|
* @type {string}
|
|
33
33
|
* @memberof ModelRecord
|
|
34
34
|
*/
|
|
@@ -19,6 +19,7 @@ export * from './AccountPostOIDCProviderReqBody';
|
|
|
19
19
|
export * from './AccountPostReqBody';
|
|
20
20
|
export * from './AccountPutOIDCClientSecretReqBody';
|
|
21
21
|
export * from './AccountPutReqBody';
|
|
22
|
+
export * from './AccountTextFilePostBody';
|
|
22
23
|
export * from './AccountUsageResBody';
|
|
23
24
|
export * from './ActivityData';
|
|
24
25
|
export * from './ActivityLocationData';
|
package/dist/esm/models/index.js
CHANGED
|
@@ -21,6 +21,7 @@ export * from './AccountPostOIDCProviderReqBody';
|
|
|
21
21
|
export * from './AccountPostReqBody';
|
|
22
22
|
export * from './AccountPutOIDCClientSecretReqBody';
|
|
23
23
|
export * from './AccountPutReqBody';
|
|
24
|
+
export * from './AccountTextFilePostBody';
|
|
24
25
|
export * from './AccountUsageResBody';
|
|
25
26
|
export * from './ActivityData';
|
|
26
27
|
export * from './ActivityLocationData';
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* spaciv API
|
|
3
|
+
* The spaciv API powers workplace planning: modelling how many people an organisation has, how they work, and how much space that requires. ## Getting started 1. Exchange credentials for an access token using one of the operations under **Authentication**. 2. Send that token on every subsequent request as `Authorization: Bearer <token>`. 3. Access tokens are short lived. Call `POST /v1/auth/refresh-token` to obtain a new one before the old one expires. ## Conventions Every operation is versioned under `/v1`. Collections are plural (`GET /v1/dashboards` lists, `POST /v1/dashboards` creates) and individual records live beneath them (`/v1/dashboards/{id}`). Singular paths such as `/v1/account`, `/v1/project` and `/v1/user` refer to the record the access token was issued for. Request and response bodies are JSON. Timestamps are RFC 3339. Identifiers are opaque strings unless documented otherwise, and collection operations return the records visible to the account the token was issued for. Failures return an [RFC 9457](https://www.rfc-editor.org/rfc/rfc9457) problem document with a `detail` field describing what went wrong.
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1.0.0
|
|
6
|
+
* Contact: support@spaciv.com
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
*
|
|
14
|
+
* @export
|
|
15
|
+
* @interface AccountTextFilePostBody
|
|
16
|
+
*/
|
|
17
|
+
export interface AccountTextFilePostBody {
|
|
18
|
+
/**
|
|
19
|
+
* Name of the new file. Its extension chooses its type. At most 255 bytes after normalising to Unicode NFC. Must not contain a forward slash or a backslash, and must not be . or ..
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof AccountTextFilePostBody
|
|
22
|
+
*/
|
|
23
|
+
name: string;
|
|
24
|
+
/**
|
|
25
|
+
* Identifier of the directory to create the file in. Leave it out to create it at the root.
|
|
26
|
+
* @type {string}
|
|
27
|
+
* @memberof AccountTextFilePostBody
|
|
28
|
+
*/
|
|
29
|
+
parentId?: string;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Check if a given object implements the AccountTextFilePostBody interface.
|
|
33
|
+
*/
|
|
34
|
+
export declare function instanceOfAccountTextFilePostBody(value: object): value is AccountTextFilePostBody;
|
|
35
|
+
export declare function AccountTextFilePostBodyFromJSON(json: any): AccountTextFilePostBody;
|
|
36
|
+
export declare function AccountTextFilePostBodyFromJSONTyped(json: any, ignoreDiscriminator: boolean): AccountTextFilePostBody;
|
|
37
|
+
export declare function AccountTextFilePostBodyToJSON(json: any): AccountTextFilePostBody;
|
|
38
|
+
export declare function AccountTextFilePostBodyToJSONTyped(value?: AccountTextFilePostBody | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* spaciv API
|
|
6
|
+
* The spaciv API powers workplace planning: modelling how many people an organisation has, how they work, and how much space that requires. ## Getting started 1. Exchange credentials for an access token using one of the operations under **Authentication**. 2. Send that token on every subsequent request as `Authorization: Bearer <token>`. 3. Access tokens are short lived. Call `POST /v1/auth/refresh-token` to obtain a new one before the old one expires. ## Conventions Every operation is versioned under `/v1`. Collections are plural (`GET /v1/dashboards` lists, `POST /v1/dashboards` creates) and individual records live beneath them (`/v1/dashboards/{id}`). Singular paths such as `/v1/account`, `/v1/project` and `/v1/user` refer to the record the access token was issued for. Request and response bodies are JSON. Timestamps are RFC 3339. Identifiers are opaque strings unless documented otherwise, and collection operations return the records visible to the account the token was issued for. Failures return an [RFC 9457](https://www.rfc-editor.org/rfc/rfc9457) problem document with a `detail` field describing what went wrong.
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 1.0.0
|
|
9
|
+
* Contact: support@spaciv.com
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.instanceOfAccountTextFilePostBody = instanceOfAccountTextFilePostBody;
|
|
17
|
+
exports.AccountTextFilePostBodyFromJSON = AccountTextFilePostBodyFromJSON;
|
|
18
|
+
exports.AccountTextFilePostBodyFromJSONTyped = AccountTextFilePostBodyFromJSONTyped;
|
|
19
|
+
exports.AccountTextFilePostBodyToJSON = AccountTextFilePostBodyToJSON;
|
|
20
|
+
exports.AccountTextFilePostBodyToJSONTyped = AccountTextFilePostBodyToJSONTyped;
|
|
21
|
+
/**
|
|
22
|
+
* Check if a given object implements the AccountTextFilePostBody interface.
|
|
23
|
+
*/
|
|
24
|
+
function instanceOfAccountTextFilePostBody(value) {
|
|
25
|
+
if (!('name' in value) || value['name'] === undefined)
|
|
26
|
+
return false;
|
|
27
|
+
return true;
|
|
28
|
+
}
|
|
29
|
+
function AccountTextFilePostBodyFromJSON(json) {
|
|
30
|
+
return AccountTextFilePostBodyFromJSONTyped(json, false);
|
|
31
|
+
}
|
|
32
|
+
function AccountTextFilePostBodyFromJSONTyped(json, ignoreDiscriminator) {
|
|
33
|
+
if (json == null) {
|
|
34
|
+
return json;
|
|
35
|
+
}
|
|
36
|
+
return {
|
|
37
|
+
'name': json['name'],
|
|
38
|
+
'parentId': json['parentId'] == null ? undefined : json['parentId'],
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
function AccountTextFilePostBodyToJSON(json) {
|
|
42
|
+
return AccountTextFilePostBodyToJSONTyped(json, false);
|
|
43
|
+
}
|
|
44
|
+
function AccountTextFilePostBodyToJSONTyped(value, ignoreDiscriminator = false) {
|
|
45
|
+
if (value == null) {
|
|
46
|
+
return value;
|
|
47
|
+
}
|
|
48
|
+
return {
|
|
49
|
+
'name': value['name'],
|
|
50
|
+
'parentId': value['parentId'],
|
|
51
|
+
};
|
|
52
|
+
}
|
|
@@ -28,7 +28,7 @@ export interface ModelRecord {
|
|
|
28
28
|
*/
|
|
29
29
|
id: string;
|
|
30
30
|
/**
|
|
31
|
-
* Media type detected from the file's contents when they were last stored, rather than from its name or the type the client declared.
|
|
31
|
+
* Media type detected from the file's contents when they were last stored, rather than from its name or the type the client declared. A file created empty in the app takes its type from its extension, such as text/markdown; charset=utf-8 for .md, and keeps it while its contents are detected as plain text.
|
|
32
32
|
* @type {string}
|
|
33
33
|
* @memberof ModelRecord
|
|
34
34
|
*/
|
package/dist/models/index.d.ts
CHANGED
|
@@ -19,6 +19,7 @@ export * from './AccountPostOIDCProviderReqBody';
|
|
|
19
19
|
export * from './AccountPostReqBody';
|
|
20
20
|
export * from './AccountPutOIDCClientSecretReqBody';
|
|
21
21
|
export * from './AccountPutReqBody';
|
|
22
|
+
export * from './AccountTextFilePostBody';
|
|
22
23
|
export * from './AccountUsageResBody';
|
|
23
24
|
export * from './ActivityData';
|
|
24
25
|
export * from './ActivityLocationData';
|
package/dist/models/index.js
CHANGED
|
@@ -37,6 +37,7 @@ __exportStar(require("./AccountPostOIDCProviderReqBody"), exports);
|
|
|
37
37
|
__exportStar(require("./AccountPostReqBody"), exports);
|
|
38
38
|
__exportStar(require("./AccountPutOIDCClientSecretReqBody"), exports);
|
|
39
39
|
__exportStar(require("./AccountPutReqBody"), exports);
|
|
40
|
+
__exportStar(require("./AccountTextFilePostBody"), exports);
|
|
40
41
|
__exportStar(require("./AccountUsageResBody"), exports);
|
|
41
42
|
__exportStar(require("./ActivityData"), exports);
|
|
42
43
|
__exportStar(require("./ActivityLocationData"), exports);
|
package/package.json
CHANGED
package/src/apis/FilesApi.ts
CHANGED
|
@@ -18,6 +18,7 @@ import type {
|
|
|
18
18
|
AccountDirectoryPatchBody,
|
|
19
19
|
AccountDirectoryPostBody,
|
|
20
20
|
AccountFilePatchBody,
|
|
21
|
+
AccountTextFilePostBody,
|
|
21
22
|
Directory,
|
|
22
23
|
DirectoryPage,
|
|
23
24
|
ErrorModel,
|
|
@@ -31,6 +32,8 @@ import {
|
|
|
31
32
|
AccountDirectoryPostBodyToJSON,
|
|
32
33
|
AccountFilePatchBodyFromJSON,
|
|
33
34
|
AccountFilePatchBodyToJSON,
|
|
35
|
+
AccountTextFilePostBodyFromJSON,
|
|
36
|
+
AccountTextFilePostBodyToJSON,
|
|
34
37
|
DirectoryFromJSON,
|
|
35
38
|
DirectoryToJSON,
|
|
36
39
|
DirectoryPageFromJSON,
|
|
@@ -52,6 +55,10 @@ export interface FilesApiCreateAccountFilesRequest {
|
|
|
52
55
|
name?: string;
|
|
53
56
|
}
|
|
54
57
|
|
|
58
|
+
export interface FilesApiCreateAccountTextFilesRequest {
|
|
59
|
+
accountTextFilePostBody: AccountTextFilePostBody;
|
|
60
|
+
}
|
|
61
|
+
|
|
55
62
|
export interface FilesApiDeleteAccountDirectoriesRequest {
|
|
56
63
|
id: string;
|
|
57
64
|
}
|
|
@@ -132,6 +139,22 @@ export interface FilesApiInterface {
|
|
|
132
139
|
*/
|
|
133
140
|
createAccountFiles(requestParameters: FilesApiCreateAccountFilesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ModelRecord>;
|
|
134
141
|
|
|
142
|
+
/**
|
|
143
|
+
* Creates an empty file to write in, at the root or inside another directory, and returns its record. The file is always text, and the name\'s extension, compared ignoring case, chooses its type: `.md` gives `text/markdown; charset=utf-8`, `.py` `text/x-python; charset=utf-8`, `.js` `text/javascript; charset=utf-8`, `.ts` `text/x-typescript; charset=utf-8` and `.go` `text/x-go; charset=utf-8`. Any other name, with or without an extension, gives `text/plain; charset=utf-8`. The file keeps that type when its content is replaced, as long as the new content is detected as plain text. Write the file\'s content by replacing it, with the `ETag` its content is read with. 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 there is rejected with 409 rather than numbered, as an upload\'s would be. Returns 404 if the account has no directory with the given `parentId`. The file counts towards the account\'s 1 GiB storage quota like an upload, and is rejected with 413 when the account is already past it. Requires the *Edit file storage* permission.
|
|
144
|
+
* @summary Create an empty text file in the account\'s files
|
|
145
|
+
* @param {AccountTextFilePostBody} accountTextFilePostBody
|
|
146
|
+
* @param {*} [options] Override http request option.
|
|
147
|
+
* @throws {RequiredError}
|
|
148
|
+
* @memberof FilesApiInterface
|
|
149
|
+
*/
|
|
150
|
+
createAccountTextFilesRaw(requestParameters: FilesApiCreateAccountTextFilesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ModelRecord>>;
|
|
151
|
+
|
|
152
|
+
/**
|
|
153
|
+
* Creates an empty file to write in, at the root or inside another directory, and returns its record. The file is always text, and the name\'s extension, compared ignoring case, chooses its type: `.md` gives `text/markdown; charset=utf-8`, `.py` `text/x-python; charset=utf-8`, `.js` `text/javascript; charset=utf-8`, `.ts` `text/x-typescript; charset=utf-8` and `.go` `text/x-go; charset=utf-8`. Any other name, with or without an extension, gives `text/plain; charset=utf-8`. The file keeps that type when its content is replaced, as long as the new content is detected as plain text. Write the file\'s content by replacing it, with the `ETag` its content is read with. 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 there is rejected with 409 rather than numbered, as an upload\'s would be. Returns 404 if the account has no directory with the given `parentId`. The file counts towards the account\'s 1 GiB storage quota like an upload, and is rejected with 413 when the account is already past it. Requires the *Edit file storage* permission.
|
|
154
|
+
* Create an empty text file in the account\'s files
|
|
155
|
+
*/
|
|
156
|
+
createAccountTextFiles(requestParameters: FilesApiCreateAccountTextFilesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ModelRecord>;
|
|
157
|
+
|
|
135
158
|
/**
|
|
136
159
|
* Deletes an empty directory from the account\'s files. A directory that still holds a file or another directory is rejected with 409 `directory is not empty`: move or delete its contents first. Deleting a directory that is already gone succeeds rather than returning 404. Any other 409 means the directory changed during the request, and the request can be retried. Requires the *Edit file storage* permission.
|
|
137
160
|
* @summary Delete a directory
|
|
@@ -388,6 +411,55 @@ export class FilesApi extends runtime.BaseAPI implements FilesApiInterface {
|
|
|
388
411
|
return await response.value();
|
|
389
412
|
}
|
|
390
413
|
|
|
414
|
+
/**
|
|
415
|
+
* Creates an empty file to write in, at the root or inside another directory, and returns its record. The file is always text, and the name\'s extension, compared ignoring case, chooses its type: `.md` gives `text/markdown; charset=utf-8`, `.py` `text/x-python; charset=utf-8`, `.js` `text/javascript; charset=utf-8`, `.ts` `text/x-typescript; charset=utf-8` and `.go` `text/x-go; charset=utf-8`. Any other name, with or without an extension, gives `text/plain; charset=utf-8`. The file keeps that type when its content is replaced, as long as the new content is detected as plain text. Write the file\'s content by replacing it, with the `ETag` its content is read with. 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 there is rejected with 409 rather than numbered, as an upload\'s would be. Returns 404 if the account has no directory with the given `parentId`. The file counts towards the account\'s 1 GiB storage quota like an upload, and is rejected with 413 when the account is already past it. Requires the *Edit file storage* permission.
|
|
416
|
+
* Create an empty text file in the account\'s files
|
|
417
|
+
*/
|
|
418
|
+
async createAccountTextFilesRaw(requestParameters: FilesApiCreateAccountTextFilesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ModelRecord>> {
|
|
419
|
+
if (requestParameters['accountTextFilePostBody'] == null) {
|
|
420
|
+
throw new runtime.RequiredError(
|
|
421
|
+
'accountTextFilePostBody',
|
|
422
|
+
'Required parameter "accountTextFilePostBody" was null or undefined when calling createAccountTextFiles().'
|
|
423
|
+
);
|
|
424
|
+
}
|
|
425
|
+
|
|
426
|
+
const queryParameters: any = {};
|
|
427
|
+
|
|
428
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
429
|
+
|
|
430
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
431
|
+
|
|
432
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
433
|
+
const token = this.configuration.accessToken;
|
|
434
|
+
const tokenString = await token("accessToken", []);
|
|
435
|
+
|
|
436
|
+
if (tokenString) {
|
|
437
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
438
|
+
}
|
|
439
|
+
}
|
|
440
|
+
|
|
441
|
+
let urlPath = `/v1/account/text-files`;
|
|
442
|
+
|
|
443
|
+
const response = await this.request({
|
|
444
|
+
path: urlPath,
|
|
445
|
+
method: 'POST',
|
|
446
|
+
headers: headerParameters,
|
|
447
|
+
query: queryParameters,
|
|
448
|
+
body: AccountTextFilePostBodyToJSON(requestParameters['accountTextFilePostBody']),
|
|
449
|
+
}, initOverrides);
|
|
450
|
+
|
|
451
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => ModelRecordFromJSON(jsonValue));
|
|
452
|
+
}
|
|
453
|
+
|
|
454
|
+
/**
|
|
455
|
+
* Creates an empty file to write in, at the root or inside another directory, and returns its record. The file is always text, and the name\'s extension, compared ignoring case, chooses its type: `.md` gives `text/markdown; charset=utf-8`, `.py` `text/x-python; charset=utf-8`, `.js` `text/javascript; charset=utf-8`, `.ts` `text/x-typescript; charset=utf-8` and `.go` `text/x-go; charset=utf-8`. Any other name, with or without an extension, gives `text/plain; charset=utf-8`. The file keeps that type when its content is replaced, as long as the new content is detected as plain text. Write the file\'s content by replacing it, with the `ETag` its content is read with. 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 there is rejected with 409 rather than numbered, as an upload\'s would be. Returns 404 if the account has no directory with the given `parentId`. The file counts towards the account\'s 1 GiB storage quota like an upload, and is rejected with 413 when the account is already past it. Requires the *Edit file storage* permission.
|
|
456
|
+
* Create an empty text file in the account\'s files
|
|
457
|
+
*/
|
|
458
|
+
async createAccountTextFiles(requestParameters: FilesApiCreateAccountTextFilesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ModelRecord> {
|
|
459
|
+
const response = await this.createAccountTextFilesRaw(requestParameters, initOverrides);
|
|
460
|
+
return await response.value();
|
|
461
|
+
}
|
|
462
|
+
|
|
391
463
|
/**
|
|
392
464
|
* Deletes an empty directory from the account\'s files. A directory that still holds a file or another directory is rejected with 409 `directory is not empty`: move or delete its contents first. Deleting a directory that is already gone succeeds rather than returning 404. Any other 409 means the directory changed during the request, and the request can be retried. Requires the *Edit file storage* permission.
|
|
393
465
|
* Delete a directory
|
|
@@ -208,7 +208,7 @@ export interface LogicLayersApiInterface {
|
|
|
208
208
|
listSpaceRulesetsPresets(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<SpaceRuleSet>>;
|
|
209
209
|
|
|
210
210
|
/**
|
|
211
|
-
* 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`; one in a space rule shape from before logic layers is
|
|
211
|
+
* 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`; one in a space rule shape from before logic layers is converted and stored as the logic layer it converts to. 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.
|
|
212
212
|
* @summary Update a logic layer
|
|
213
213
|
* @param {string} id
|
|
214
214
|
* @param {SpaceRulesetUpdate} spaceRulesetUpdate
|
|
@@ -219,7 +219,7 @@ export interface LogicLayersApiInterface {
|
|
|
219
219
|
updateSpaceRulesetsRaw(requestParameters: LogicLayersApiUpdateSpaceRulesetsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<object>>;
|
|
220
220
|
|
|
221
221
|
/**
|
|
222
|
-
* 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`; one in a space rule shape from before logic layers is
|
|
222
|
+
* 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`; one in a space rule shape from before logic layers is converted and stored as the logic layer it converts to. 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.
|
|
223
223
|
* Update a logic layer
|
|
224
224
|
*/
|
|
225
225
|
updateSpaceRulesets(requestParameters: LogicLayersApiUpdateSpaceRulesetsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<object>;
|
|
@@ -631,7 +631,7 @@ export class LogicLayersApi extends runtime.BaseAPI implements LogicLayersApiInt
|
|
|
631
631
|
}
|
|
632
632
|
|
|
633
633
|
/**
|
|
634
|
-
* 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`; one in a space rule shape from before logic layers is
|
|
634
|
+
* 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`; one in a space rule shape from before logic layers is converted and stored as the logic layer it converts to. 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.
|
|
635
635
|
* Update a logic layer
|
|
636
636
|
*/
|
|
637
637
|
async updateSpaceRulesetsRaw(requestParameters: LogicLayersApiUpdateSpaceRulesetsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<object>> {
|
|
@@ -679,7 +679,7 @@ export class LogicLayersApi extends runtime.BaseAPI implements LogicLayersApiInt
|
|
|
679
679
|
}
|
|
680
680
|
|
|
681
681
|
/**
|
|
682
|
-
* 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`; one in a space rule shape from before logic layers is
|
|
682
|
+
* 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`; one in a space rule shape from before logic layers is converted and stored as the logic layer it converts to. 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.
|
|
683
683
|
* Update a logic layer
|
|
684
684
|
*/
|
|
685
685
|
async updateSpaceRulesets(requestParameters: LogicLayersApiUpdateSpaceRulesetsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<object> {
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* spaciv API
|
|
5
|
+
* The spaciv API powers workplace planning: modelling how many people an organisation has, how they work, and how much space that requires. ## Getting started 1. Exchange credentials for an access token using one of the operations under **Authentication**. 2. Send that token on every subsequent request as `Authorization: Bearer <token>`. 3. Access tokens are short lived. Call `POST /v1/auth/refresh-token` to obtain a new one before the old one expires. ## Conventions Every operation is versioned under `/v1`. Collections are plural (`GET /v1/dashboards` lists, `POST /v1/dashboards` creates) and individual records live beneath them (`/v1/dashboards/{id}`). Singular paths such as `/v1/account`, `/v1/project` and `/v1/user` refer to the record the access token was issued for. Request and response bodies are JSON. Timestamps are RFC 3339. Identifiers are opaque strings unless documented otherwise, and collection operations return the records visible to the account the token was issued for. Failures return an [RFC 9457](https://www.rfc-editor.org/rfc/rfc9457) problem document with a `detail` field describing what went wrong.
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0.0
|
|
8
|
+
* Contact: support@spaciv.com
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
* @export
|
|
19
|
+
* @interface AccountTextFilePostBody
|
|
20
|
+
*/
|
|
21
|
+
export interface AccountTextFilePostBody {
|
|
22
|
+
/**
|
|
23
|
+
* Name of the new file. Its extension chooses its type. At most 255 bytes after normalising to Unicode NFC. Must not contain a forward slash or a backslash, and must not be . or ..
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof AccountTextFilePostBody
|
|
26
|
+
*/
|
|
27
|
+
name: string;
|
|
28
|
+
/**
|
|
29
|
+
* Identifier of the directory to create the file in. Leave it out to create it at the root.
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof AccountTextFilePostBody
|
|
32
|
+
*/
|
|
33
|
+
parentId?: string;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Check if a given object implements the AccountTextFilePostBody interface.
|
|
38
|
+
*/
|
|
39
|
+
export function instanceOfAccountTextFilePostBody(value: object): value is AccountTextFilePostBody {
|
|
40
|
+
if (!('name' in value) || value['name'] === undefined) return false;
|
|
41
|
+
return true;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export function AccountTextFilePostBodyFromJSON(json: any): AccountTextFilePostBody {
|
|
45
|
+
return AccountTextFilePostBodyFromJSONTyped(json, false);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export function AccountTextFilePostBodyFromJSONTyped(json: any, ignoreDiscriminator: boolean): AccountTextFilePostBody {
|
|
49
|
+
if (json == null) {
|
|
50
|
+
return json;
|
|
51
|
+
}
|
|
52
|
+
return {
|
|
53
|
+
|
|
54
|
+
'name': json['name'],
|
|
55
|
+
'parentId': json['parentId'] == null ? undefined : json['parentId'],
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export function AccountTextFilePostBodyToJSON(json: any): AccountTextFilePostBody {
|
|
60
|
+
return AccountTextFilePostBodyToJSONTyped(json, false);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export function AccountTextFilePostBodyToJSONTyped(value?: AccountTextFilePostBody | null, ignoreDiscriminator: boolean = false): any {
|
|
64
|
+
if (value == null) {
|
|
65
|
+
return value;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
return {
|
|
69
|
+
|
|
70
|
+
'name': value['name'],
|
|
71
|
+
'parentId': value['parentId'],
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
|
|
@@ -32,7 +32,7 @@ export interface ModelRecord {
|
|
|
32
32
|
*/
|
|
33
33
|
id: string;
|
|
34
34
|
/**
|
|
35
|
-
* Media type detected from the file's contents when they were last stored, rather than from its name or the type the client declared.
|
|
35
|
+
* Media type detected from the file's contents when they were last stored, rather than from its name or the type the client declared. A file created empty in the app takes its type from its extension, such as text/markdown; charset=utf-8 for .md, and keeps it while its contents are detected as plain text.
|
|
36
36
|
* @type {string}
|
|
37
37
|
* @memberof ModelRecord
|
|
38
38
|
*/
|
package/src/models/index.ts
CHANGED
|
@@ -21,6 +21,7 @@ export * from './AccountPostOIDCProviderReqBody';
|
|
|
21
21
|
export * from './AccountPostReqBody';
|
|
22
22
|
export * from './AccountPutOIDCClientSecretReqBody';
|
|
23
23
|
export * from './AccountPutReqBody';
|
|
24
|
+
export * from './AccountTextFilePostBody';
|
|
24
25
|
export * from './AccountUsageResBody';
|
|
25
26
|
export * from './ActivityData';
|
|
26
27
|
export * from './ActivityLocationData';
|