@spaciv/sdk 0.1.19 → 0.1.21
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 +8 -0
- package/README.md +2 -2
- package/dist/apis/FilesApi.d.ts +132 -18
- package/dist/apis/FilesApi.js +175 -8
- package/dist/apis/ScriptsApi.d.ts +57 -1
- package/dist/apis/ScriptsApi.js +82 -0
- package/dist/esm/apis/FilesApi.d.ts +132 -18
- package/dist/esm/apis/FilesApi.js +176 -9
- package/dist/esm/apis/ScriptsApi.d.ts +57 -1
- package/dist/esm/apis/ScriptsApi.js +83 -1
- 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/ScratchpadOutput.d.ts +69 -0
- package/dist/esm/models/ScratchpadOutput.js +64 -0
- package/dist/esm/models/ScratchpadOutputFile.d.ts +44 -0
- package/dist/esm/models/ScratchpadOutputFile.js +49 -0
- package/dist/esm/models/ScratchpadRun.d.ts +127 -0
- package/dist/esm/models/ScratchpadRun.js +91 -0
- package/dist/esm/models/ScratchpadRunPostReqBody.d.ts +58 -0
- package/dist/esm/models/ScratchpadRunPostReqBody.js +53 -0
- package/dist/esm/models/index.d.ts +8 -0
- package/dist/esm/models/index.js +8 -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/ScratchpadOutput.d.ts +69 -0
- package/dist/models/ScratchpadOutput.js +71 -0
- package/dist/models/ScratchpadOutputFile.d.ts +44 -0
- package/dist/models/ScratchpadOutputFile.js +56 -0
- package/dist/models/ScratchpadRun.d.ts +127 -0
- package/dist/models/ScratchpadRun.js +99 -0
- package/dist/models/ScratchpadRunPostReqBody.d.ts +58 -0
- package/dist/models/ScratchpadRunPostReqBody.js +60 -0
- package/dist/models/index.d.ts +8 -0
- package/dist/models/index.js +8 -0
- package/package.json +1 -1
- package/src/apis/FilesApi.ts +319 -17
- package/src/apis/ScriptsApi.ts +148 -0
- 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/ScratchpadOutput.ts +126 -0
- package/src/models/ScratchpadOutputFile.ts +83 -0
- package/src/models/ScratchpadRun.ts +203 -0
- package/src/models/ScratchpadRunPostReqBody.ts +99 -0
- package/src/models/index.ts +8 -0
|
@@ -0,0 +1,46 @@
|
|
|
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
|
+
import { DirectoryFromJSON, DirectoryToJSON, } from './Directory';
|
|
15
|
+
/**
|
|
16
|
+
* Check if a given object implements the DirectoryPage interface.
|
|
17
|
+
*/
|
|
18
|
+
export function instanceOfDirectoryPage(value) {
|
|
19
|
+
if (!('directories' in value) || value['directories'] === undefined)
|
|
20
|
+
return false;
|
|
21
|
+
return true;
|
|
22
|
+
}
|
|
23
|
+
export function DirectoryPageFromJSON(json) {
|
|
24
|
+
return DirectoryPageFromJSONTyped(json, false);
|
|
25
|
+
}
|
|
26
|
+
export function DirectoryPageFromJSONTyped(json, ignoreDiscriminator) {
|
|
27
|
+
if (json == null) {
|
|
28
|
+
return json;
|
|
29
|
+
}
|
|
30
|
+
return {
|
|
31
|
+
'directories': (json['directories'].map(DirectoryFromJSON)),
|
|
32
|
+
'nextCursor': json['nextCursor'] == null ? undefined : json['nextCursor'],
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
export function DirectoryPageToJSON(json) {
|
|
36
|
+
return DirectoryPageToJSONTyped(json, false);
|
|
37
|
+
}
|
|
38
|
+
export function DirectoryPageToJSONTyped(value, ignoreDiscriminator = false) {
|
|
39
|
+
if (value == null) {
|
|
40
|
+
return value;
|
|
41
|
+
}
|
|
42
|
+
return {
|
|
43
|
+
'directories': (value['directories'].map(DirectoryToJSON)),
|
|
44
|
+
'nextCursor': value['nextCursor'],
|
|
45
|
+
};
|
|
46
|
+
}
|
|
@@ -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>}
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
* Do not edit the class manually.
|
|
13
13
|
*/
|
|
14
14
|
import { ModelRecordFromJSON, ModelRecordToJSON, } from './ModelRecord';
|
|
15
|
+
import { DirectoryFromJSON, DirectoryToJSON, } from './Directory';
|
|
15
16
|
/**
|
|
16
17
|
* Check if a given object implements the ListPage interface.
|
|
17
18
|
*/
|
|
@@ -28,6 +29,7 @@ export function ListPageFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
28
29
|
return json;
|
|
29
30
|
}
|
|
30
31
|
return {
|
|
32
|
+
'directories': json['directories'] == null ? undefined : (json['directories'].map(DirectoryFromJSON)),
|
|
31
33
|
'files': (json['files'].map(ModelRecordFromJSON)),
|
|
32
34
|
'nextCursor': json['nextCursor'] == null ? undefined : json['nextCursor'],
|
|
33
35
|
};
|
|
@@ -40,6 +42,7 @@ export function ListPageToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
40
42
|
return value;
|
|
41
43
|
}
|
|
42
44
|
return {
|
|
45
|
+
'directories': value['directories'] == null ? undefined : (value['directories'].map(DirectoryToJSON)),
|
|
43
46
|
'files': (value['files'].map(ModelRecordToJSON)),
|
|
44
47
|
'nextCursor': value['nextCursor'],
|
|
45
48
|
};
|
|
@@ -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}
|
|
@@ -41,6 +41,7 @@ export function ModelRecordFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
41
41
|
'id': json['id'],
|
|
42
42
|
'mimeType': json['mimeType'],
|
|
43
43
|
'name': json['name'],
|
|
44
|
+
'parentId': json['parentId'] == null ? undefined : json['parentId'],
|
|
44
45
|
'quarantineSignature': json['quarantineSignature'] == null ? undefined : json['quarantineSignature'],
|
|
45
46
|
'quarantinedAt': json['quarantinedAt'] == null ? undefined : (new Date(json['quarantinedAt'])),
|
|
46
47
|
'size': json['size'],
|
|
@@ -59,6 +60,7 @@ export function ModelRecordToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
59
60
|
'id': value['id'],
|
|
60
61
|
'mimeType': value['mimeType'],
|
|
61
62
|
'name': value['name'],
|
|
63
|
+
'parentId': value['parentId'],
|
|
62
64
|
'quarantineSignature': value['quarantineSignature'],
|
|
63
65
|
'quarantinedAt': value['quarantinedAt'] == null ? undefined : ((value['quarantinedAt']).toISOString()),
|
|
64
66
|
'size': value['size'],
|
|
@@ -0,0 +1,69 @@
|
|
|
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
|
+
import type { ScratchpadOutputFile } from './ScratchpadOutputFile';
|
|
13
|
+
/**
|
|
14
|
+
*
|
|
15
|
+
* @export
|
|
16
|
+
* @interface ScratchpadOutput
|
|
17
|
+
*/
|
|
18
|
+
export interface ScratchpadOutput {
|
|
19
|
+
/**
|
|
20
|
+
* Why some of the output could not be collected, for example because it was over a limit.
|
|
21
|
+
* @type {string}
|
|
22
|
+
* @memberof ScratchpadOutput
|
|
23
|
+
*/
|
|
24
|
+
error?: string;
|
|
25
|
+
/**
|
|
26
|
+
* Files the handler wrote to its output directory.
|
|
27
|
+
* @type {Array<ScratchpadOutputFile>}
|
|
28
|
+
* @memberof ScratchpadOutput
|
|
29
|
+
*/
|
|
30
|
+
files: Array<ScratchpadOutputFile>;
|
|
31
|
+
/**
|
|
32
|
+
*
|
|
33
|
+
* @type {any}
|
|
34
|
+
* @memberof ScratchpadOutput
|
|
35
|
+
*/
|
|
36
|
+
result?: any | null;
|
|
37
|
+
/**
|
|
38
|
+
*
|
|
39
|
+
* @type {string}
|
|
40
|
+
* @memberof ScratchpadOutput
|
|
41
|
+
*/
|
|
42
|
+
stderr: string;
|
|
43
|
+
/**
|
|
44
|
+
* Set when stderr was longer than the 256 KiB kept.
|
|
45
|
+
* @type {boolean}
|
|
46
|
+
* @memberof ScratchpadOutput
|
|
47
|
+
*/
|
|
48
|
+
stderrTruncated: boolean;
|
|
49
|
+
/**
|
|
50
|
+
*
|
|
51
|
+
* @type {string}
|
|
52
|
+
* @memberof ScratchpadOutput
|
|
53
|
+
*/
|
|
54
|
+
stdout: string;
|
|
55
|
+
/**
|
|
56
|
+
* Set when stdout was longer than the 256 KiB kept.
|
|
57
|
+
* @type {boolean}
|
|
58
|
+
* @memberof ScratchpadOutput
|
|
59
|
+
*/
|
|
60
|
+
stdoutTruncated: boolean;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Check if a given object implements the ScratchpadOutput interface.
|
|
64
|
+
*/
|
|
65
|
+
export declare function instanceOfScratchpadOutput(value: object): value is ScratchpadOutput;
|
|
66
|
+
export declare function ScratchpadOutputFromJSON(json: any): ScratchpadOutput;
|
|
67
|
+
export declare function ScratchpadOutputFromJSONTyped(json: any, ignoreDiscriminator: boolean): ScratchpadOutput;
|
|
68
|
+
export declare function ScratchpadOutputToJSON(json: any): ScratchpadOutput;
|
|
69
|
+
export declare function ScratchpadOutputToJSONTyped(value?: ScratchpadOutput | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,64 @@
|
|
|
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
|
+
import { ScratchpadOutputFileFromJSON, ScratchpadOutputFileToJSON, } from './ScratchpadOutputFile';
|
|
15
|
+
/**
|
|
16
|
+
* Check if a given object implements the ScratchpadOutput interface.
|
|
17
|
+
*/
|
|
18
|
+
export function instanceOfScratchpadOutput(value) {
|
|
19
|
+
if (!('files' in value) || value['files'] === undefined)
|
|
20
|
+
return false;
|
|
21
|
+
if (!('stderr' in value) || value['stderr'] === undefined)
|
|
22
|
+
return false;
|
|
23
|
+
if (!('stderrTruncated' in value) || value['stderrTruncated'] === undefined)
|
|
24
|
+
return false;
|
|
25
|
+
if (!('stdout' in value) || value['stdout'] === undefined)
|
|
26
|
+
return false;
|
|
27
|
+
if (!('stdoutTruncated' in value) || value['stdoutTruncated'] === undefined)
|
|
28
|
+
return false;
|
|
29
|
+
return true;
|
|
30
|
+
}
|
|
31
|
+
export function ScratchpadOutputFromJSON(json) {
|
|
32
|
+
return ScratchpadOutputFromJSONTyped(json, false);
|
|
33
|
+
}
|
|
34
|
+
export function ScratchpadOutputFromJSONTyped(json, ignoreDiscriminator) {
|
|
35
|
+
if (json == null) {
|
|
36
|
+
return json;
|
|
37
|
+
}
|
|
38
|
+
return {
|
|
39
|
+
'error': json['error'] == null ? undefined : json['error'],
|
|
40
|
+
'files': (json['files'].map(ScratchpadOutputFileFromJSON)),
|
|
41
|
+
'result': json['result'] == null ? undefined : json['result'],
|
|
42
|
+
'stderr': json['stderr'],
|
|
43
|
+
'stderrTruncated': json['stderrTruncated'],
|
|
44
|
+
'stdout': json['stdout'],
|
|
45
|
+
'stdoutTruncated': json['stdoutTruncated'],
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
export function ScratchpadOutputToJSON(json) {
|
|
49
|
+
return ScratchpadOutputToJSONTyped(json, false);
|
|
50
|
+
}
|
|
51
|
+
export function ScratchpadOutputToJSONTyped(value, ignoreDiscriminator = false) {
|
|
52
|
+
if (value == null) {
|
|
53
|
+
return value;
|
|
54
|
+
}
|
|
55
|
+
return {
|
|
56
|
+
'error': value['error'],
|
|
57
|
+
'files': (value['files'].map(ScratchpadOutputFileToJSON)),
|
|
58
|
+
'result': value['result'],
|
|
59
|
+
'stderr': value['stderr'],
|
|
60
|
+
'stderrTruncated': value['stderrTruncated'],
|
|
61
|
+
'stdout': value['stdout'],
|
|
62
|
+
'stdoutTruncated': value['stdoutTruncated'],
|
|
63
|
+
};
|
|
64
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
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 ScratchpadOutputFile
|
|
16
|
+
*/
|
|
17
|
+
export interface ScratchpadOutputFile {
|
|
18
|
+
/**
|
|
19
|
+
* The file's content, base64-encoded.
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof ScratchpadOutputFile
|
|
22
|
+
*/
|
|
23
|
+
content: string;
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @type {string}
|
|
27
|
+
* @memberof ScratchpadOutputFile
|
|
28
|
+
*/
|
|
29
|
+
contentType?: string;
|
|
30
|
+
/**
|
|
31
|
+
* Path relative to the output directory.
|
|
32
|
+
* @type {string}
|
|
33
|
+
* @memberof ScratchpadOutputFile
|
|
34
|
+
*/
|
|
35
|
+
path: string;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Check if a given object implements the ScratchpadOutputFile interface.
|
|
39
|
+
*/
|
|
40
|
+
export declare function instanceOfScratchpadOutputFile(value: object): value is ScratchpadOutputFile;
|
|
41
|
+
export declare function ScratchpadOutputFileFromJSON(json: any): ScratchpadOutputFile;
|
|
42
|
+
export declare function ScratchpadOutputFileFromJSONTyped(json: any, ignoreDiscriminator: boolean): ScratchpadOutputFile;
|
|
43
|
+
export declare function ScratchpadOutputFileToJSON(json: any): ScratchpadOutputFile;
|
|
44
|
+
export declare function ScratchpadOutputFileToJSONTyped(value?: ScratchpadOutputFile | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,49 @@
|
|
|
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 ScratchpadOutputFile interface.
|
|
16
|
+
*/
|
|
17
|
+
export function instanceOfScratchpadOutputFile(value) {
|
|
18
|
+
if (!('content' in value) || value['content'] === undefined)
|
|
19
|
+
return false;
|
|
20
|
+
if (!('path' in value) || value['path'] === undefined)
|
|
21
|
+
return false;
|
|
22
|
+
return true;
|
|
23
|
+
}
|
|
24
|
+
export function ScratchpadOutputFileFromJSON(json) {
|
|
25
|
+
return ScratchpadOutputFileFromJSONTyped(json, false);
|
|
26
|
+
}
|
|
27
|
+
export function ScratchpadOutputFileFromJSONTyped(json, ignoreDiscriminator) {
|
|
28
|
+
if (json == null) {
|
|
29
|
+
return json;
|
|
30
|
+
}
|
|
31
|
+
return {
|
|
32
|
+
'content': json['content'],
|
|
33
|
+
'contentType': json['contentType'] == null ? undefined : json['contentType'],
|
|
34
|
+
'path': json['path'],
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
export function ScratchpadOutputFileToJSON(json) {
|
|
38
|
+
return ScratchpadOutputFileToJSONTyped(json, false);
|
|
39
|
+
}
|
|
40
|
+
export function ScratchpadOutputFileToJSONTyped(value, ignoreDiscriminator = false) {
|
|
41
|
+
if (value == null) {
|
|
42
|
+
return value;
|
|
43
|
+
}
|
|
44
|
+
return {
|
|
45
|
+
'content': value['content'],
|
|
46
|
+
'contentType': value['contentType'],
|
|
47
|
+
'path': value['path'],
|
|
48
|
+
};
|
|
49
|
+
}
|
|
@@ -0,0 +1,127 @@
|
|
|
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
|
+
import type { ScratchpadOutput } from './ScratchpadOutput';
|
|
13
|
+
/**
|
|
14
|
+
*
|
|
15
|
+
* @export
|
|
16
|
+
* @interface ScratchpadRun
|
|
17
|
+
*/
|
|
18
|
+
export interface ScratchpadRun {
|
|
19
|
+
/**
|
|
20
|
+
*
|
|
21
|
+
* @type {number}
|
|
22
|
+
* @memberof ScratchpadRun
|
|
23
|
+
*/
|
|
24
|
+
durationMs?: number;
|
|
25
|
+
/**
|
|
26
|
+
*
|
|
27
|
+
* @type {Date}
|
|
28
|
+
* @memberof ScratchpadRun
|
|
29
|
+
*/
|
|
30
|
+
endedAt?: Date;
|
|
31
|
+
/**
|
|
32
|
+
*
|
|
33
|
+
* @type {number}
|
|
34
|
+
* @memberof ScratchpadRun
|
|
35
|
+
*/
|
|
36
|
+
exitCode: number;
|
|
37
|
+
/**
|
|
38
|
+
* When the run and its output are deleted.
|
|
39
|
+
* @type {Date}
|
|
40
|
+
* @memberof ScratchpadRun
|
|
41
|
+
*/
|
|
42
|
+
expiresAt?: Date;
|
|
43
|
+
/**
|
|
44
|
+
* The code that was run, keyed by path.
|
|
45
|
+
* @type {{ [key: string]: string; }}
|
|
46
|
+
* @memberof ScratchpadRun
|
|
47
|
+
*/
|
|
48
|
+
files: {
|
|
49
|
+
[key: string]: string;
|
|
50
|
+
};
|
|
51
|
+
/**
|
|
52
|
+
*
|
|
53
|
+
* @type {string}
|
|
54
|
+
* @memberof ScratchpadRun
|
|
55
|
+
*/
|
|
56
|
+
id: string;
|
|
57
|
+
/**
|
|
58
|
+
*
|
|
59
|
+
* @type {string}
|
|
60
|
+
* @memberof ScratchpadRun
|
|
61
|
+
*/
|
|
62
|
+
language: ScratchpadRunLanguageEnum;
|
|
63
|
+
/**
|
|
64
|
+
*
|
|
65
|
+
* @type {string}
|
|
66
|
+
* @memberof ScratchpadRun
|
|
67
|
+
*/
|
|
68
|
+
message?: string;
|
|
69
|
+
/**
|
|
70
|
+
* What the run produced. Absent while it is in progress.
|
|
71
|
+
* @type {ScratchpadOutput}
|
|
72
|
+
* @memberof ScratchpadRun
|
|
73
|
+
*/
|
|
74
|
+
output?: ScratchpadOutput;
|
|
75
|
+
/**
|
|
76
|
+
*
|
|
77
|
+
* @type {Date}
|
|
78
|
+
* @memberof ScratchpadRun
|
|
79
|
+
*/
|
|
80
|
+
queuedAt?: Date;
|
|
81
|
+
/**
|
|
82
|
+
*
|
|
83
|
+
* @type {Date}
|
|
84
|
+
* @memberof ScratchpadRun
|
|
85
|
+
*/
|
|
86
|
+
startedAt?: Date;
|
|
87
|
+
/**
|
|
88
|
+
* How long the sandbox took to start.
|
|
89
|
+
* @type {number}
|
|
90
|
+
* @memberof ScratchpadRun
|
|
91
|
+
*/
|
|
92
|
+
startupMs?: number;
|
|
93
|
+
/**
|
|
94
|
+
* queued or running while the run is in progress, then success, error, timeout, killed or quota_exceeded.
|
|
95
|
+
* @type {string}
|
|
96
|
+
* @memberof ScratchpadRun
|
|
97
|
+
*/
|
|
98
|
+
status: string;
|
|
99
|
+
/**
|
|
100
|
+
*
|
|
101
|
+
* @type {number}
|
|
102
|
+
* @memberof ScratchpadRun
|
|
103
|
+
*/
|
|
104
|
+
timeoutSeconds: number;
|
|
105
|
+
/**
|
|
106
|
+
* Whether the run used a sandbox that had already started.
|
|
107
|
+
* @type {boolean}
|
|
108
|
+
* @memberof ScratchpadRun
|
|
109
|
+
*/
|
|
110
|
+
warm: boolean;
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* @export
|
|
114
|
+
*/
|
|
115
|
+
export declare const ScratchpadRunLanguageEnum: {
|
|
116
|
+
readonly Python: "python";
|
|
117
|
+
readonly Javascript: "javascript";
|
|
118
|
+
};
|
|
119
|
+
export type ScratchpadRunLanguageEnum = typeof ScratchpadRunLanguageEnum[keyof typeof ScratchpadRunLanguageEnum];
|
|
120
|
+
/**
|
|
121
|
+
* Check if a given object implements the ScratchpadRun interface.
|
|
122
|
+
*/
|
|
123
|
+
export declare function instanceOfScratchpadRun(value: object): value is ScratchpadRun;
|
|
124
|
+
export declare function ScratchpadRunFromJSON(json: any): ScratchpadRun;
|
|
125
|
+
export declare function ScratchpadRunFromJSONTyped(json: any, ignoreDiscriminator: boolean): ScratchpadRun;
|
|
126
|
+
export declare function ScratchpadRunToJSON(json: any): ScratchpadRun;
|
|
127
|
+
export declare function ScratchpadRunToJSONTyped(value?: ScratchpadRun | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,91 @@
|
|
|
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
|
+
import { ScratchpadOutputFromJSON, ScratchpadOutputToJSON, } from './ScratchpadOutput';
|
|
15
|
+
/**
|
|
16
|
+
* @export
|
|
17
|
+
*/
|
|
18
|
+
export const ScratchpadRunLanguageEnum = {
|
|
19
|
+
Python: 'python',
|
|
20
|
+
Javascript: 'javascript'
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* Check if a given object implements the ScratchpadRun interface.
|
|
24
|
+
*/
|
|
25
|
+
export function instanceOfScratchpadRun(value) {
|
|
26
|
+
if (!('exitCode' in value) || value['exitCode'] === undefined)
|
|
27
|
+
return false;
|
|
28
|
+
if (!('files' in value) || value['files'] === undefined)
|
|
29
|
+
return false;
|
|
30
|
+
if (!('id' in value) || value['id'] === undefined)
|
|
31
|
+
return false;
|
|
32
|
+
if (!('language' in value) || value['language'] === undefined)
|
|
33
|
+
return false;
|
|
34
|
+
if (!('status' in value) || value['status'] === undefined)
|
|
35
|
+
return false;
|
|
36
|
+
if (!('timeoutSeconds' in value) || value['timeoutSeconds'] === undefined)
|
|
37
|
+
return false;
|
|
38
|
+
if (!('warm' in value) || value['warm'] === undefined)
|
|
39
|
+
return false;
|
|
40
|
+
return true;
|
|
41
|
+
}
|
|
42
|
+
export function ScratchpadRunFromJSON(json) {
|
|
43
|
+
return ScratchpadRunFromJSONTyped(json, false);
|
|
44
|
+
}
|
|
45
|
+
export function ScratchpadRunFromJSONTyped(json, ignoreDiscriminator) {
|
|
46
|
+
if (json == null) {
|
|
47
|
+
return json;
|
|
48
|
+
}
|
|
49
|
+
return {
|
|
50
|
+
'durationMs': json['durationMs'] == null ? undefined : json['durationMs'],
|
|
51
|
+
'endedAt': json['endedAt'] == null ? undefined : (new Date(json['endedAt'])),
|
|
52
|
+
'exitCode': json['exitCode'],
|
|
53
|
+
'expiresAt': json['expiresAt'] == null ? undefined : (new Date(json['expiresAt'])),
|
|
54
|
+
'files': json['files'],
|
|
55
|
+
'id': json['id'],
|
|
56
|
+
'language': json['language'],
|
|
57
|
+
'message': json['message'] == null ? undefined : json['message'],
|
|
58
|
+
'output': json['output'] == null ? undefined : ScratchpadOutputFromJSON(json['output']),
|
|
59
|
+
'queuedAt': json['queuedAt'] == null ? undefined : (new Date(json['queuedAt'])),
|
|
60
|
+
'startedAt': json['startedAt'] == null ? undefined : (new Date(json['startedAt'])),
|
|
61
|
+
'startupMs': json['startupMs'] == null ? undefined : json['startupMs'],
|
|
62
|
+
'status': json['status'],
|
|
63
|
+
'timeoutSeconds': json['timeoutSeconds'],
|
|
64
|
+
'warm': json['warm'],
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
export function ScratchpadRunToJSON(json) {
|
|
68
|
+
return ScratchpadRunToJSONTyped(json, false);
|
|
69
|
+
}
|
|
70
|
+
export function ScratchpadRunToJSONTyped(value, ignoreDiscriminator = false) {
|
|
71
|
+
if (value == null) {
|
|
72
|
+
return value;
|
|
73
|
+
}
|
|
74
|
+
return {
|
|
75
|
+
'durationMs': value['durationMs'],
|
|
76
|
+
'endedAt': value['endedAt'] == null ? undefined : ((value['endedAt']).toISOString()),
|
|
77
|
+
'exitCode': value['exitCode'],
|
|
78
|
+
'expiresAt': value['expiresAt'] == null ? undefined : ((value['expiresAt']).toISOString()),
|
|
79
|
+
'files': value['files'],
|
|
80
|
+
'id': value['id'],
|
|
81
|
+
'language': value['language'],
|
|
82
|
+
'message': value['message'],
|
|
83
|
+
'output': ScratchpadOutputToJSON(value['output']),
|
|
84
|
+
'queuedAt': value['queuedAt'] == null ? undefined : ((value['queuedAt']).toISOString()),
|
|
85
|
+
'startedAt': value['startedAt'] == null ? undefined : ((value['startedAt']).toISOString()),
|
|
86
|
+
'startupMs': value['startupMs'],
|
|
87
|
+
'status': value['status'],
|
|
88
|
+
'timeoutSeconds': value['timeoutSeconds'],
|
|
89
|
+
'warm': value['warm'],
|
|
90
|
+
};
|
|
91
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
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 ScratchpadRunPostReqBody
|
|
16
|
+
*/
|
|
17
|
+
export interface ScratchpadRunPostReqBody {
|
|
18
|
+
/**
|
|
19
|
+
* Source files keyed by path. Python needs script.py defining handle(event, ctx) and JavaScript needs script.js exporting handle(event, ctx), as an integration script does, so the code can be saved as one unchanged.
|
|
20
|
+
* @type {{ [key: string]: string; }}
|
|
21
|
+
* @memberof ScratchpadRunPostReqBody
|
|
22
|
+
*/
|
|
23
|
+
files: {
|
|
24
|
+
[key: string]: string;
|
|
25
|
+
};
|
|
26
|
+
/**
|
|
27
|
+
*
|
|
28
|
+
* @type {any}
|
|
29
|
+
* @memberof ScratchpadRunPostReqBody
|
|
30
|
+
*/
|
|
31
|
+
input?: any | null;
|
|
32
|
+
/**
|
|
33
|
+
* python or javascript. Go code has to be saved as a script, which builds it.
|
|
34
|
+
* @type {string}
|
|
35
|
+
* @memberof ScratchpadRunPostReqBody
|
|
36
|
+
*/
|
|
37
|
+
language: string;
|
|
38
|
+
/**
|
|
39
|
+
* Longest the code may run. Defaults to 30.
|
|
40
|
+
* @type {number}
|
|
41
|
+
* @memberof ScratchpadRunPostReqBody
|
|
42
|
+
*/
|
|
43
|
+
timeoutSeconds?: number;
|
|
44
|
+
/**
|
|
45
|
+
* Longest to wait for the run to finish before responding. Defaults to 20.
|
|
46
|
+
* @type {number}
|
|
47
|
+
* @memberof ScratchpadRunPostReqBody
|
|
48
|
+
*/
|
|
49
|
+
waitSeconds?: number;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Check if a given object implements the ScratchpadRunPostReqBody interface.
|
|
53
|
+
*/
|
|
54
|
+
export declare function instanceOfScratchpadRunPostReqBody(value: object): value is ScratchpadRunPostReqBody;
|
|
55
|
+
export declare function ScratchpadRunPostReqBodyFromJSON(json: any): ScratchpadRunPostReqBody;
|
|
56
|
+
export declare function ScratchpadRunPostReqBodyFromJSONTyped(json: any, ignoreDiscriminator: boolean): ScratchpadRunPostReqBody;
|
|
57
|
+
export declare function ScratchpadRunPostReqBodyToJSON(json: any): ScratchpadRunPostReqBody;
|
|
58
|
+
export declare function ScratchpadRunPostReqBodyToJSONTyped(value?: ScratchpadRunPostReqBody | null, ignoreDiscriminator?: boolean): any;
|