@spaciv/sdk 0.1.19 → 0.1.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.openapi-generator/FILES +4 -0
- package/README.md +2 -2
- package/dist/apis/FilesApi.d.ts +132 -18
- package/dist/apis/FilesApi.js +175 -8
- package/dist/esm/apis/FilesApi.d.ts +132 -18
- package/dist/esm/apis/FilesApi.js +176 -9
- package/dist/esm/models/AccountDirectoryPatchBody.d.ts +38 -0
- package/dist/esm/models/AccountDirectoryPatchBody.js +43 -0
- package/dist/esm/models/AccountDirectoryPostBody.d.ts +38 -0
- package/dist/esm/models/AccountDirectoryPostBody.js +45 -0
- package/dist/esm/models/AccountFilePatchBody.d.ts +8 -2
- package/dist/esm/models/AccountFilePatchBody.js +3 -3
- package/dist/esm/models/Directory.d.ts +56 -0
- package/dist/esm/models/Directory.js +57 -0
- package/dist/esm/models/DirectoryPage.d.ts +39 -0
- package/dist/esm/models/DirectoryPage.js +46 -0
- package/dist/esm/models/ListPage.d.ts +7 -0
- package/dist/esm/models/ListPage.js +3 -0
- package/dist/esm/models/ModelRecord.d.ts +7 -1
- package/dist/esm/models/ModelRecord.js +2 -0
- package/dist/esm/models/index.d.ts +4 -0
- package/dist/esm/models/index.js +4 -0
- package/dist/models/AccountDirectoryPatchBody.d.ts +38 -0
- package/dist/models/AccountDirectoryPatchBody.js +50 -0
- package/dist/models/AccountDirectoryPostBody.d.ts +38 -0
- package/dist/models/AccountDirectoryPostBody.js +52 -0
- package/dist/models/AccountFilePatchBody.d.ts +8 -2
- package/dist/models/AccountFilePatchBody.js +3 -3
- package/dist/models/Directory.d.ts +56 -0
- package/dist/models/Directory.js +64 -0
- package/dist/models/DirectoryPage.d.ts +39 -0
- package/dist/models/DirectoryPage.js +53 -0
- package/dist/models/ListPage.d.ts +7 -0
- package/dist/models/ListPage.js +3 -0
- package/dist/models/ModelRecord.d.ts +7 -1
- package/dist/models/ModelRecord.js +2 -0
- package/dist/models/index.d.ts +4 -0
- package/dist/models/index.js +4 -0
- package/package.json +1 -1
- package/src/apis/FilesApi.ts +319 -17
- package/src/models/AccountDirectoryPatchBody.ts +73 -0
- package/src/models/AccountDirectoryPostBody.ts +74 -0
- package/src/models/AccountFilePatchBody.ts +11 -4
- package/src/models/Directory.ts +101 -0
- package/src/models/DirectoryPage.ts +82 -0
- package/src/models/ListPage.ts +15 -0
- package/src/models/ModelRecord.ts +9 -1
- package/src/models/index.ts +4 -0
|
@@ -0,0 +1,53 @@
|
|
|
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.instanceOfDirectoryPage = instanceOfDirectoryPage;
|
|
17
|
+
exports.DirectoryPageFromJSON = DirectoryPageFromJSON;
|
|
18
|
+
exports.DirectoryPageFromJSONTyped = DirectoryPageFromJSONTyped;
|
|
19
|
+
exports.DirectoryPageToJSON = DirectoryPageToJSON;
|
|
20
|
+
exports.DirectoryPageToJSONTyped = DirectoryPageToJSONTyped;
|
|
21
|
+
const Directory_1 = require("./Directory");
|
|
22
|
+
/**
|
|
23
|
+
* Check if a given object implements the DirectoryPage interface.
|
|
24
|
+
*/
|
|
25
|
+
function instanceOfDirectoryPage(value) {
|
|
26
|
+
if (!('directories' in value) || value['directories'] === undefined)
|
|
27
|
+
return false;
|
|
28
|
+
return true;
|
|
29
|
+
}
|
|
30
|
+
function DirectoryPageFromJSON(json) {
|
|
31
|
+
return DirectoryPageFromJSONTyped(json, false);
|
|
32
|
+
}
|
|
33
|
+
function DirectoryPageFromJSONTyped(json, ignoreDiscriminator) {
|
|
34
|
+
if (json == null) {
|
|
35
|
+
return json;
|
|
36
|
+
}
|
|
37
|
+
return {
|
|
38
|
+
'directories': (json['directories'].map(Directory_1.DirectoryFromJSON)),
|
|
39
|
+
'nextCursor': json['nextCursor'] == null ? undefined : json['nextCursor'],
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
function DirectoryPageToJSON(json) {
|
|
43
|
+
return DirectoryPageToJSONTyped(json, false);
|
|
44
|
+
}
|
|
45
|
+
function DirectoryPageToJSONTyped(value, ignoreDiscriminator = false) {
|
|
46
|
+
if (value == null) {
|
|
47
|
+
return value;
|
|
48
|
+
}
|
|
49
|
+
return {
|
|
50
|
+
'directories': (value['directories'].map(Directory_1.DirectoryToJSON)),
|
|
51
|
+
'nextCursor': value['nextCursor'],
|
|
52
|
+
};
|
|
53
|
+
}
|
|
@@ -10,12 +10,19 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import type { ModelRecord } from './ModelRecord';
|
|
13
|
+
import type { Directory } from './Directory';
|
|
13
14
|
/**
|
|
14
15
|
*
|
|
15
16
|
* @export
|
|
16
17
|
* @interface ListPage
|
|
17
18
|
*/
|
|
18
19
|
export interface ListPage {
|
|
20
|
+
/**
|
|
21
|
+
* Directories directly inside the listed directory. Returned only when a parent is given, and only on the pages that hold some.
|
|
22
|
+
* @type {Array<Directory>}
|
|
23
|
+
* @memberof ListPage
|
|
24
|
+
*/
|
|
25
|
+
directories?: Array<Directory>;
|
|
19
26
|
/**
|
|
20
27
|
*
|
|
21
28
|
* @type {Array<ModelRecord>}
|
package/dist/models/ListPage.js
CHANGED
|
@@ -19,6 +19,7 @@ exports.ListPageFromJSONTyped = ListPageFromJSONTyped;
|
|
|
19
19
|
exports.ListPageToJSON = ListPageToJSON;
|
|
20
20
|
exports.ListPageToJSONTyped = ListPageToJSONTyped;
|
|
21
21
|
const ModelRecord_1 = require("./ModelRecord");
|
|
22
|
+
const Directory_1 = require("./Directory");
|
|
22
23
|
/**
|
|
23
24
|
* Check if a given object implements the ListPage interface.
|
|
24
25
|
*/
|
|
@@ -35,6 +36,7 @@ function ListPageFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
35
36
|
return json;
|
|
36
37
|
}
|
|
37
38
|
return {
|
|
39
|
+
'directories': json['directories'] == null ? undefined : (json['directories'].map(Directory_1.DirectoryFromJSON)),
|
|
38
40
|
'files': (json['files'].map(ModelRecord_1.ModelRecordFromJSON)),
|
|
39
41
|
'nextCursor': json['nextCursor'] == null ? undefined : json['nextCursor'],
|
|
40
42
|
};
|
|
@@ -47,6 +49,7 @@ function ListPageToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
47
49
|
return value;
|
|
48
50
|
}
|
|
49
51
|
return {
|
|
52
|
+
'directories': value['directories'] == null ? undefined : (value['directories'].map(Directory_1.DirectoryToJSON)),
|
|
50
53
|
'files': (value['files'].map(ModelRecord_1.ModelRecordToJSON)),
|
|
51
54
|
'nextCursor': value['nextCursor'],
|
|
52
55
|
};
|
|
@@ -34,11 +34,17 @@ export interface ModelRecord {
|
|
|
34
34
|
*/
|
|
35
35
|
mimeType: string;
|
|
36
36
|
/**
|
|
37
|
-
* Display name of the file, taken from the uploaded file name and changeable afterwards.
|
|
37
|
+
* Display name of the file, taken from the uploaded file name and changeable afterwards. Nothing else in the same directory has the same name, compared exactly and after normalising to Unicode NFC.
|
|
38
38
|
* @type {string}
|
|
39
39
|
* @memberof ModelRecord
|
|
40
40
|
*/
|
|
41
41
|
name: string;
|
|
42
|
+
/**
|
|
43
|
+
* Identifier of the directory the file is in. Absent for a file at the root.
|
|
44
|
+
* @type {string}
|
|
45
|
+
* @memberof ModelRecord
|
|
46
|
+
*/
|
|
47
|
+
parentId?: string;
|
|
42
48
|
/**
|
|
43
49
|
* Name of the virus signature the file matched when it was quarantined.
|
|
44
50
|
* @type {string}
|
|
@@ -48,6 +48,7 @@ function ModelRecordFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
48
48
|
'id': json['id'],
|
|
49
49
|
'mimeType': json['mimeType'],
|
|
50
50
|
'name': json['name'],
|
|
51
|
+
'parentId': json['parentId'] == null ? undefined : json['parentId'],
|
|
51
52
|
'quarantineSignature': json['quarantineSignature'] == null ? undefined : json['quarantineSignature'],
|
|
52
53
|
'quarantinedAt': json['quarantinedAt'] == null ? undefined : (new Date(json['quarantinedAt'])),
|
|
53
54
|
'size': json['size'],
|
|
@@ -66,6 +67,7 @@ function ModelRecordToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
66
67
|
'id': value['id'],
|
|
67
68
|
'mimeType': value['mimeType'],
|
|
68
69
|
'name': value['name'],
|
|
70
|
+
'parentId': value['parentId'],
|
|
69
71
|
'quarantineSignature': value['quarantineSignature'],
|
|
70
72
|
'quarantinedAt': value['quarantinedAt'] == null ? undefined : ((value['quarantinedAt']).toISOString()),
|
|
71
73
|
'size': value['size'],
|
package/dist/models/index.d.ts
CHANGED
|
@@ -4,6 +4,8 @@ export * from './AccountAuthOption';
|
|
|
4
4
|
export * from './AccountCalculationUsageBody';
|
|
5
5
|
export * from './AccountCalculationUsageDay';
|
|
6
6
|
export * from './AccountDetailsResBody';
|
|
7
|
+
export * from './AccountDirectoryPatchBody';
|
|
8
|
+
export * from './AccountDirectoryPostBody';
|
|
7
9
|
export * from './AccountFilePatchBody';
|
|
8
10
|
export * from './AccountGetAuthOptionsResBody';
|
|
9
11
|
export * from './AccountOIDCProvider';
|
|
@@ -167,6 +169,8 @@ export * from './DatasetDataOneOf2';
|
|
|
167
169
|
export * from './DatasetModify';
|
|
168
170
|
export * from './DatasetRes';
|
|
169
171
|
export * from './DaysOffData';
|
|
172
|
+
export * from './Directory';
|
|
173
|
+
export * from './DirectoryPage';
|
|
170
174
|
export * from './EntityChangeActor';
|
|
171
175
|
export * from './EntityChangedEvent';
|
|
172
176
|
export * from './EntryPatch';
|
package/dist/models/index.js
CHANGED
|
@@ -22,6 +22,8 @@ __exportStar(require("./AccountAuthOption"), exports);
|
|
|
22
22
|
__exportStar(require("./AccountCalculationUsageBody"), exports);
|
|
23
23
|
__exportStar(require("./AccountCalculationUsageDay"), exports);
|
|
24
24
|
__exportStar(require("./AccountDetailsResBody"), exports);
|
|
25
|
+
__exportStar(require("./AccountDirectoryPatchBody"), exports);
|
|
26
|
+
__exportStar(require("./AccountDirectoryPostBody"), exports);
|
|
25
27
|
__exportStar(require("./AccountFilePatchBody"), exports);
|
|
26
28
|
__exportStar(require("./AccountGetAuthOptionsResBody"), exports);
|
|
27
29
|
__exportStar(require("./AccountOIDCProvider"), exports);
|
|
@@ -185,6 +187,8 @@ __exportStar(require("./DatasetDataOneOf2"), exports);
|
|
|
185
187
|
__exportStar(require("./DatasetModify"), exports);
|
|
186
188
|
__exportStar(require("./DatasetRes"), exports);
|
|
187
189
|
__exportStar(require("./DaysOffData"), exports);
|
|
190
|
+
__exportStar(require("./Directory"), exports);
|
|
191
|
+
__exportStar(require("./DirectoryPage"), exports);
|
|
188
192
|
__exportStar(require("./EntityChangeActor"), exports);
|
|
189
193
|
__exportStar(require("./EntityChangedEvent"), exports);
|
|
190
194
|
__exportStar(require("./EntryPatch"), exports);
|