@spaciv/sdk 0.1.20 → 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 +4 -0
- package/README.md +2 -2
- package/dist/apis/ScriptsApi.d.ts +57 -1
- package/dist/apis/ScriptsApi.js +82 -0
- package/dist/esm/apis/ScriptsApi.d.ts +57 -1
- package/dist/esm/apis/ScriptsApi.js +83 -1
- 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 +4 -0
- package/dist/esm/models/index.js +4 -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 +4 -0
- package/dist/models/index.js +4 -0
- package/package.json +1 -1
- package/src/apis/ScriptsApi.ts +148 -0
- 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 +4 -0
|
@@ -0,0 +1,56 @@
|
|
|
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.instanceOfScratchpadOutputFile = instanceOfScratchpadOutputFile;
|
|
17
|
+
exports.ScratchpadOutputFileFromJSON = ScratchpadOutputFileFromJSON;
|
|
18
|
+
exports.ScratchpadOutputFileFromJSONTyped = ScratchpadOutputFileFromJSONTyped;
|
|
19
|
+
exports.ScratchpadOutputFileToJSON = ScratchpadOutputFileToJSON;
|
|
20
|
+
exports.ScratchpadOutputFileToJSONTyped = ScratchpadOutputFileToJSONTyped;
|
|
21
|
+
/**
|
|
22
|
+
* Check if a given object implements the ScratchpadOutputFile interface.
|
|
23
|
+
*/
|
|
24
|
+
function instanceOfScratchpadOutputFile(value) {
|
|
25
|
+
if (!('content' in value) || value['content'] === undefined)
|
|
26
|
+
return false;
|
|
27
|
+
if (!('path' in value) || value['path'] === undefined)
|
|
28
|
+
return false;
|
|
29
|
+
return true;
|
|
30
|
+
}
|
|
31
|
+
function ScratchpadOutputFileFromJSON(json) {
|
|
32
|
+
return ScratchpadOutputFileFromJSONTyped(json, false);
|
|
33
|
+
}
|
|
34
|
+
function ScratchpadOutputFileFromJSONTyped(json, ignoreDiscriminator) {
|
|
35
|
+
if (json == null) {
|
|
36
|
+
return json;
|
|
37
|
+
}
|
|
38
|
+
return {
|
|
39
|
+
'content': json['content'],
|
|
40
|
+
'contentType': json['contentType'] == null ? undefined : json['contentType'],
|
|
41
|
+
'path': json['path'],
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
function ScratchpadOutputFileToJSON(json) {
|
|
45
|
+
return ScratchpadOutputFileToJSONTyped(json, false);
|
|
46
|
+
}
|
|
47
|
+
function ScratchpadOutputFileToJSONTyped(value, ignoreDiscriminator = false) {
|
|
48
|
+
if (value == null) {
|
|
49
|
+
return value;
|
|
50
|
+
}
|
|
51
|
+
return {
|
|
52
|
+
'content': value['content'],
|
|
53
|
+
'contentType': value['contentType'],
|
|
54
|
+
'path': value['path'],
|
|
55
|
+
};
|
|
56
|
+
}
|
|
@@ -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,99 @@
|
|
|
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.ScratchpadRunLanguageEnum = void 0;
|
|
17
|
+
exports.instanceOfScratchpadRun = instanceOfScratchpadRun;
|
|
18
|
+
exports.ScratchpadRunFromJSON = ScratchpadRunFromJSON;
|
|
19
|
+
exports.ScratchpadRunFromJSONTyped = ScratchpadRunFromJSONTyped;
|
|
20
|
+
exports.ScratchpadRunToJSON = ScratchpadRunToJSON;
|
|
21
|
+
exports.ScratchpadRunToJSONTyped = ScratchpadRunToJSONTyped;
|
|
22
|
+
const ScratchpadOutput_1 = require("./ScratchpadOutput");
|
|
23
|
+
/**
|
|
24
|
+
* @export
|
|
25
|
+
*/
|
|
26
|
+
exports.ScratchpadRunLanguageEnum = {
|
|
27
|
+
Python: 'python',
|
|
28
|
+
Javascript: 'javascript'
|
|
29
|
+
};
|
|
30
|
+
/**
|
|
31
|
+
* Check if a given object implements the ScratchpadRun interface.
|
|
32
|
+
*/
|
|
33
|
+
function instanceOfScratchpadRun(value) {
|
|
34
|
+
if (!('exitCode' in value) || value['exitCode'] === undefined)
|
|
35
|
+
return false;
|
|
36
|
+
if (!('files' in value) || value['files'] === undefined)
|
|
37
|
+
return false;
|
|
38
|
+
if (!('id' in value) || value['id'] === undefined)
|
|
39
|
+
return false;
|
|
40
|
+
if (!('language' in value) || value['language'] === undefined)
|
|
41
|
+
return false;
|
|
42
|
+
if (!('status' in value) || value['status'] === undefined)
|
|
43
|
+
return false;
|
|
44
|
+
if (!('timeoutSeconds' in value) || value['timeoutSeconds'] === undefined)
|
|
45
|
+
return false;
|
|
46
|
+
if (!('warm' in value) || value['warm'] === undefined)
|
|
47
|
+
return false;
|
|
48
|
+
return true;
|
|
49
|
+
}
|
|
50
|
+
function ScratchpadRunFromJSON(json) {
|
|
51
|
+
return ScratchpadRunFromJSONTyped(json, false);
|
|
52
|
+
}
|
|
53
|
+
function ScratchpadRunFromJSONTyped(json, ignoreDiscriminator) {
|
|
54
|
+
if (json == null) {
|
|
55
|
+
return json;
|
|
56
|
+
}
|
|
57
|
+
return {
|
|
58
|
+
'durationMs': json['durationMs'] == null ? undefined : json['durationMs'],
|
|
59
|
+
'endedAt': json['endedAt'] == null ? undefined : (new Date(json['endedAt'])),
|
|
60
|
+
'exitCode': json['exitCode'],
|
|
61
|
+
'expiresAt': json['expiresAt'] == null ? undefined : (new Date(json['expiresAt'])),
|
|
62
|
+
'files': json['files'],
|
|
63
|
+
'id': json['id'],
|
|
64
|
+
'language': json['language'],
|
|
65
|
+
'message': json['message'] == null ? undefined : json['message'],
|
|
66
|
+
'output': json['output'] == null ? undefined : (0, ScratchpadOutput_1.ScratchpadOutputFromJSON)(json['output']),
|
|
67
|
+
'queuedAt': json['queuedAt'] == null ? undefined : (new Date(json['queuedAt'])),
|
|
68
|
+
'startedAt': json['startedAt'] == null ? undefined : (new Date(json['startedAt'])),
|
|
69
|
+
'startupMs': json['startupMs'] == null ? undefined : json['startupMs'],
|
|
70
|
+
'status': json['status'],
|
|
71
|
+
'timeoutSeconds': json['timeoutSeconds'],
|
|
72
|
+
'warm': json['warm'],
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
function ScratchpadRunToJSON(json) {
|
|
76
|
+
return ScratchpadRunToJSONTyped(json, false);
|
|
77
|
+
}
|
|
78
|
+
function ScratchpadRunToJSONTyped(value, ignoreDiscriminator = false) {
|
|
79
|
+
if (value == null) {
|
|
80
|
+
return value;
|
|
81
|
+
}
|
|
82
|
+
return {
|
|
83
|
+
'durationMs': value['durationMs'],
|
|
84
|
+
'endedAt': value['endedAt'] == null ? undefined : ((value['endedAt']).toISOString()),
|
|
85
|
+
'exitCode': value['exitCode'],
|
|
86
|
+
'expiresAt': value['expiresAt'] == null ? undefined : ((value['expiresAt']).toISOString()),
|
|
87
|
+
'files': value['files'],
|
|
88
|
+
'id': value['id'],
|
|
89
|
+
'language': value['language'],
|
|
90
|
+
'message': value['message'],
|
|
91
|
+
'output': (0, ScratchpadOutput_1.ScratchpadOutputToJSON)(value['output']),
|
|
92
|
+
'queuedAt': value['queuedAt'] == null ? undefined : ((value['queuedAt']).toISOString()),
|
|
93
|
+
'startedAt': value['startedAt'] == null ? undefined : ((value['startedAt']).toISOString()),
|
|
94
|
+
'startupMs': value['startupMs'],
|
|
95
|
+
'status': value['status'],
|
|
96
|
+
'timeoutSeconds': value['timeoutSeconds'],
|
|
97
|
+
'warm': value['warm'],
|
|
98
|
+
};
|
|
99
|
+
}
|
|
@@ -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;
|
|
@@ -0,0 +1,60 @@
|
|
|
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.instanceOfScratchpadRunPostReqBody = instanceOfScratchpadRunPostReqBody;
|
|
17
|
+
exports.ScratchpadRunPostReqBodyFromJSON = ScratchpadRunPostReqBodyFromJSON;
|
|
18
|
+
exports.ScratchpadRunPostReqBodyFromJSONTyped = ScratchpadRunPostReqBodyFromJSONTyped;
|
|
19
|
+
exports.ScratchpadRunPostReqBodyToJSON = ScratchpadRunPostReqBodyToJSON;
|
|
20
|
+
exports.ScratchpadRunPostReqBodyToJSONTyped = ScratchpadRunPostReqBodyToJSONTyped;
|
|
21
|
+
/**
|
|
22
|
+
* Check if a given object implements the ScratchpadRunPostReqBody interface.
|
|
23
|
+
*/
|
|
24
|
+
function instanceOfScratchpadRunPostReqBody(value) {
|
|
25
|
+
if (!('files' in value) || value['files'] === undefined)
|
|
26
|
+
return false;
|
|
27
|
+
if (!('language' in value) || value['language'] === undefined)
|
|
28
|
+
return false;
|
|
29
|
+
return true;
|
|
30
|
+
}
|
|
31
|
+
function ScratchpadRunPostReqBodyFromJSON(json) {
|
|
32
|
+
return ScratchpadRunPostReqBodyFromJSONTyped(json, false);
|
|
33
|
+
}
|
|
34
|
+
function ScratchpadRunPostReqBodyFromJSONTyped(json, ignoreDiscriminator) {
|
|
35
|
+
if (json == null) {
|
|
36
|
+
return json;
|
|
37
|
+
}
|
|
38
|
+
return {
|
|
39
|
+
'files': json['files'],
|
|
40
|
+
'input': json['input'] == null ? undefined : json['input'],
|
|
41
|
+
'language': json['language'],
|
|
42
|
+
'timeoutSeconds': json['timeoutSeconds'] == null ? undefined : json['timeoutSeconds'],
|
|
43
|
+
'waitSeconds': json['waitSeconds'] == null ? undefined : json['waitSeconds'],
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
function ScratchpadRunPostReqBodyToJSON(json) {
|
|
47
|
+
return ScratchpadRunPostReqBodyToJSONTyped(json, false);
|
|
48
|
+
}
|
|
49
|
+
function ScratchpadRunPostReqBodyToJSONTyped(value, ignoreDiscriminator = false) {
|
|
50
|
+
if (value == null) {
|
|
51
|
+
return value;
|
|
52
|
+
}
|
|
53
|
+
return {
|
|
54
|
+
'files': value['files'],
|
|
55
|
+
'input': value['input'],
|
|
56
|
+
'language': value['language'],
|
|
57
|
+
'timeoutSeconds': value['timeoutSeconds'],
|
|
58
|
+
'waitSeconds': value['waitSeconds'],
|
|
59
|
+
};
|
|
60
|
+
}
|
package/dist/models/index.d.ts
CHANGED
|
@@ -296,6 +296,10 @@ export * from './ScenarioListEntry';
|
|
|
296
296
|
export * from './ScenarioListRes';
|
|
297
297
|
export * from './ScenarioNotFoundDetail';
|
|
298
298
|
export * from './ScenarioPatch';
|
|
299
|
+
export * from './ScratchpadOutput';
|
|
300
|
+
export * from './ScratchpadOutputFile';
|
|
301
|
+
export * from './ScratchpadRun';
|
|
302
|
+
export * from './ScratchpadRunPostReqBody';
|
|
299
303
|
export * from './ScriptAuditEntry';
|
|
300
304
|
export * from './ScriptAuditResBody';
|
|
301
305
|
export * from './ScriptDetail';
|
package/dist/models/index.js
CHANGED
|
@@ -314,6 +314,10 @@ __exportStar(require("./ScenarioListEntry"), exports);
|
|
|
314
314
|
__exportStar(require("./ScenarioListRes"), exports);
|
|
315
315
|
__exportStar(require("./ScenarioNotFoundDetail"), exports);
|
|
316
316
|
__exportStar(require("./ScenarioPatch"), exports);
|
|
317
|
+
__exportStar(require("./ScratchpadOutput"), exports);
|
|
318
|
+
__exportStar(require("./ScratchpadOutputFile"), exports);
|
|
319
|
+
__exportStar(require("./ScratchpadRun"), exports);
|
|
320
|
+
__exportStar(require("./ScratchpadRunPostReqBody"), exports);
|
|
317
321
|
__exportStar(require("./ScriptAuditEntry"), exports);
|
|
318
322
|
__exportStar(require("./ScriptAuditResBody"), exports);
|
|
319
323
|
__exportStar(require("./ScriptDetail"), exports);
|
package/package.json
CHANGED
package/src/apis/ScriptsApi.ts
CHANGED
|
@@ -16,6 +16,8 @@
|
|
|
16
16
|
import * as runtime from '../runtime';
|
|
17
17
|
import type {
|
|
18
18
|
ErrorModel,
|
|
19
|
+
ScratchpadRun,
|
|
20
|
+
ScratchpadRunPostReqBody,
|
|
19
21
|
ScriptAuditResBody,
|
|
20
22
|
ScriptDetail,
|
|
21
23
|
ScriptExportResBody,
|
|
@@ -34,6 +36,10 @@ import type {
|
|
|
34
36
|
import {
|
|
35
37
|
ErrorModelFromJSON,
|
|
36
38
|
ErrorModelToJSON,
|
|
39
|
+
ScratchpadRunFromJSON,
|
|
40
|
+
ScratchpadRunToJSON,
|
|
41
|
+
ScratchpadRunPostReqBodyFromJSON,
|
|
42
|
+
ScratchpadRunPostReqBodyToJSON,
|
|
37
43
|
ScriptAuditResBodyFromJSON,
|
|
38
44
|
ScriptAuditResBodyToJSON,
|
|
39
45
|
ScriptDetailFromJSON,
|
|
@@ -80,6 +86,10 @@ export interface ScriptsApiCreateSchedulePreviewRequest {
|
|
|
80
86
|
scriptSchedulePreviewReqBody: ScriptSchedulePreviewReqBody;
|
|
81
87
|
}
|
|
82
88
|
|
|
89
|
+
export interface ScriptsApiCreateScratchpadRunsRequest {
|
|
90
|
+
scratchpadRunPostReqBody: ScratchpadRunPostReqBody;
|
|
91
|
+
}
|
|
92
|
+
|
|
83
93
|
export interface ScriptsApiDeleteRequest {
|
|
84
94
|
id: string;
|
|
85
95
|
}
|
|
@@ -94,6 +104,11 @@ export interface ScriptsApiGetAuditRequest {
|
|
|
94
104
|
cursor?: string;
|
|
95
105
|
}
|
|
96
106
|
|
|
107
|
+
export interface ScriptsApiGetScratchpadRunsRequest {
|
|
108
|
+
runId: string;
|
|
109
|
+
waitSeconds?: number;
|
|
110
|
+
}
|
|
111
|
+
|
|
97
112
|
export interface ScriptsApiListRunsRequest {
|
|
98
113
|
id: string;
|
|
99
114
|
limit?: number;
|
|
@@ -186,6 +201,22 @@ export interface ScriptsApiInterface {
|
|
|
186
201
|
*/
|
|
187
202
|
createSchedulePreview(requestParameters: ScriptsApiCreateSchedulePreviewRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ScriptSchedulePreviewResBody>;
|
|
188
203
|
|
|
204
|
+
/**
|
|
205
|
+
* Runs Python or JavaScript code once in a sandbox without saving it as a script, for working something out from the account\'s data. The handler is the one an integration script implements, with `input` as `event.input`; there is no build, so dependency manifests and Go are not supported. The code runs with a read-only access token scoped to the caller: only the caller\'s view permissions, in the caller\'s current project if there is one, for 5 minutes. `ctx.fetch` sends it to the Spaciv API. Files the handler writes to its output directory (`ctx.output_dir` in Python, `ctx.outputDir` in JavaScript) are returned with its stdout, stderr and return value. Limits: code up to 256 KiB in at most 50 files, `input` up to 1 MiB, and `timeoutSeconds` up to 120 (default 30). Of the output, stdout and stderr are kept up to 256 KiB each, the return value up to 256 KiB, and up to 20 output files totalling 2 MiB. Runs count towards the account\'s script credits and concurrent runs. The request waits up to `waitSeconds` for the run to finish; a run still in progress is returned without `output`, and can be read with `GET /v1/scripts/scratchpad/runs/{runId}`. A run is visible only to the user who started it, and is kept for 24 hours. Returns `422` when the language or code is not accepted, and `403` for a script\'s API key or a scratchpad run\'s own token. Requires the *AI assistant* permission.
|
|
206
|
+
* @summary Run scratchpad code
|
|
207
|
+
* @param {ScratchpadRunPostReqBody} scratchpadRunPostReqBody
|
|
208
|
+
* @param {*} [options] Override http request option.
|
|
209
|
+
* @throws {RequiredError}
|
|
210
|
+
* @memberof ScriptsApiInterface
|
|
211
|
+
*/
|
|
212
|
+
createScratchpadRunsRaw(requestParameters: ScriptsApiCreateScratchpadRunsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ScratchpadRun>>;
|
|
213
|
+
|
|
214
|
+
/**
|
|
215
|
+
* Runs Python or JavaScript code once in a sandbox without saving it as a script, for working something out from the account\'s data. The handler is the one an integration script implements, with `input` as `event.input`; there is no build, so dependency manifests and Go are not supported. The code runs with a read-only access token scoped to the caller: only the caller\'s view permissions, in the caller\'s current project if there is one, for 5 minutes. `ctx.fetch` sends it to the Spaciv API. Files the handler writes to its output directory (`ctx.output_dir` in Python, `ctx.outputDir` in JavaScript) are returned with its stdout, stderr and return value. Limits: code up to 256 KiB in at most 50 files, `input` up to 1 MiB, and `timeoutSeconds` up to 120 (default 30). Of the output, stdout and stderr are kept up to 256 KiB each, the return value up to 256 KiB, and up to 20 output files totalling 2 MiB. Runs count towards the account\'s script credits and concurrent runs. The request waits up to `waitSeconds` for the run to finish; a run still in progress is returned without `output`, and can be read with `GET /v1/scripts/scratchpad/runs/{runId}`. A run is visible only to the user who started it, and is kept for 24 hours. Returns `422` when the language or code is not accepted, and `403` for a script\'s API key or a scratchpad run\'s own token. Requires the *AI assistant* permission.
|
|
216
|
+
* Run scratchpad code
|
|
217
|
+
*/
|
|
218
|
+
createScratchpadRuns(requestParameters: ScriptsApiCreateScratchpadRunsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ScratchpadRun>;
|
|
219
|
+
|
|
189
220
|
/**
|
|
190
221
|
* Stops any active runs, deletes the script with its secrets and run history, and revokes its API keys. Requires the *Manage my account* permission.
|
|
191
222
|
* @summary Delete a script
|
|
@@ -251,6 +282,23 @@ export interface ScriptsApiInterface {
|
|
|
251
282
|
*/
|
|
252
283
|
getExport(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ScriptExportResBody>;
|
|
253
284
|
|
|
285
|
+
/**
|
|
286
|
+
* Returns a scratchpad run the caller started, with its output once it has finished. Runs are kept for 24 hours. Returns `404` when the run does not exist, has expired or was started by someone else, and `403` for a script\'s API key or a scratchpad run\'s own token. Requires the *AI assistant* permission.
|
|
287
|
+
* @summary Get a scratchpad run
|
|
288
|
+
* @param {string} runId
|
|
289
|
+
* @param {number} [waitSeconds] Longest to wait for a run in progress to finish before responding. Defaults to 0, returning at once.
|
|
290
|
+
* @param {*} [options] Override http request option.
|
|
291
|
+
* @throws {RequiredError}
|
|
292
|
+
* @memberof ScriptsApiInterface
|
|
293
|
+
*/
|
|
294
|
+
getScratchpadRunsRaw(requestParameters: ScriptsApiGetScratchpadRunsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ScratchpadRun>>;
|
|
295
|
+
|
|
296
|
+
/**
|
|
297
|
+
* Returns a scratchpad run the caller started, with its output once it has finished. Runs are kept for 24 hours. Returns `404` when the run does not exist, has expired or was started by someone else, and `403` for a script\'s API key or a scratchpad run\'s own token. Requires the *AI assistant* permission.
|
|
298
|
+
* Get a scratchpad run
|
|
299
|
+
*/
|
|
300
|
+
getScratchpadRuns(requestParameters: ScriptsApiGetScratchpadRunsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ScratchpadRun>;
|
|
301
|
+
|
|
254
302
|
/**
|
|
255
303
|
* Returns the credits the account\'s script runs were charged this calendar month (UTC), against the account\'s monthly script credit limit and its other script limits, with how many runs each script made, failed and had refused. creditState is near from 80% of the monthly limit and reached once it is used, after which runs are recorded as quota_exceeded until the month ends. creditsUsed is the scripts figure of `GET /v1/account/usage/calculation-credits`. Run counts are added when runs end. Requires the *Manage my account* permission.
|
|
256
304
|
* @summary Get script usage
|
|
@@ -549,6 +597,55 @@ export class ScriptsApi extends runtime.BaseAPI implements ScriptsApiInterface {
|
|
|
549
597
|
return await response.value();
|
|
550
598
|
}
|
|
551
599
|
|
|
600
|
+
/**
|
|
601
|
+
* Runs Python or JavaScript code once in a sandbox without saving it as a script, for working something out from the account\'s data. The handler is the one an integration script implements, with `input` as `event.input`; there is no build, so dependency manifests and Go are not supported. The code runs with a read-only access token scoped to the caller: only the caller\'s view permissions, in the caller\'s current project if there is one, for 5 minutes. `ctx.fetch` sends it to the Spaciv API. Files the handler writes to its output directory (`ctx.output_dir` in Python, `ctx.outputDir` in JavaScript) are returned with its stdout, stderr and return value. Limits: code up to 256 KiB in at most 50 files, `input` up to 1 MiB, and `timeoutSeconds` up to 120 (default 30). Of the output, stdout and stderr are kept up to 256 KiB each, the return value up to 256 KiB, and up to 20 output files totalling 2 MiB. Runs count towards the account\'s script credits and concurrent runs. The request waits up to `waitSeconds` for the run to finish; a run still in progress is returned without `output`, and can be read with `GET /v1/scripts/scratchpad/runs/{runId}`. A run is visible only to the user who started it, and is kept for 24 hours. Returns `422` when the language or code is not accepted, and `403` for a script\'s API key or a scratchpad run\'s own token. Requires the *AI assistant* permission.
|
|
602
|
+
* Run scratchpad code
|
|
603
|
+
*/
|
|
604
|
+
async createScratchpadRunsRaw(requestParameters: ScriptsApiCreateScratchpadRunsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ScratchpadRun>> {
|
|
605
|
+
if (requestParameters['scratchpadRunPostReqBody'] == null) {
|
|
606
|
+
throw new runtime.RequiredError(
|
|
607
|
+
'scratchpadRunPostReqBody',
|
|
608
|
+
'Required parameter "scratchpadRunPostReqBody" was null or undefined when calling createScratchpadRuns().'
|
|
609
|
+
);
|
|
610
|
+
}
|
|
611
|
+
|
|
612
|
+
const queryParameters: any = {};
|
|
613
|
+
|
|
614
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
615
|
+
|
|
616
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
617
|
+
|
|
618
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
619
|
+
const token = this.configuration.accessToken;
|
|
620
|
+
const tokenString = await token("accessToken", []);
|
|
621
|
+
|
|
622
|
+
if (tokenString) {
|
|
623
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
624
|
+
}
|
|
625
|
+
}
|
|
626
|
+
|
|
627
|
+
let urlPath = `/v1/scripts/scratchpad/runs`;
|
|
628
|
+
|
|
629
|
+
const response = await this.request({
|
|
630
|
+
path: urlPath,
|
|
631
|
+
method: 'POST',
|
|
632
|
+
headers: headerParameters,
|
|
633
|
+
query: queryParameters,
|
|
634
|
+
body: ScratchpadRunPostReqBodyToJSON(requestParameters['scratchpadRunPostReqBody']),
|
|
635
|
+
}, initOverrides);
|
|
636
|
+
|
|
637
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => ScratchpadRunFromJSON(jsonValue));
|
|
638
|
+
}
|
|
639
|
+
|
|
640
|
+
/**
|
|
641
|
+
* Runs Python or JavaScript code once in a sandbox without saving it as a script, for working something out from the account\'s data. The handler is the one an integration script implements, with `input` as `event.input`; there is no build, so dependency manifests and Go are not supported. The code runs with a read-only access token scoped to the caller: only the caller\'s view permissions, in the caller\'s current project if there is one, for 5 minutes. `ctx.fetch` sends it to the Spaciv API. Files the handler writes to its output directory (`ctx.output_dir` in Python, `ctx.outputDir` in JavaScript) are returned with its stdout, stderr and return value. Limits: code up to 256 KiB in at most 50 files, `input` up to 1 MiB, and `timeoutSeconds` up to 120 (default 30). Of the output, stdout and stderr are kept up to 256 KiB each, the return value up to 256 KiB, and up to 20 output files totalling 2 MiB. Runs count towards the account\'s script credits and concurrent runs. The request waits up to `waitSeconds` for the run to finish; a run still in progress is returned without `output`, and can be read with `GET /v1/scripts/scratchpad/runs/{runId}`. A run is visible only to the user who started it, and is kept for 24 hours. Returns `422` when the language or code is not accepted, and `403` for a script\'s API key or a scratchpad run\'s own token. Requires the *AI assistant* permission.
|
|
642
|
+
* Run scratchpad code
|
|
643
|
+
*/
|
|
644
|
+
async createScratchpadRuns(requestParameters: ScriptsApiCreateScratchpadRunsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ScratchpadRun> {
|
|
645
|
+
const response = await this.createScratchpadRunsRaw(requestParameters, initOverrides);
|
|
646
|
+
return await response.value();
|
|
647
|
+
}
|
|
648
|
+
|
|
552
649
|
/**
|
|
553
650
|
* Stops any active runs, deletes the script with its secrets and run history, and revokes its API keys. Requires the *Manage my account* permission.
|
|
554
651
|
* Delete a script
|
|
@@ -736,6 +833,57 @@ export class ScriptsApi extends runtime.BaseAPI implements ScriptsApiInterface {
|
|
|
736
833
|
return await response.value();
|
|
737
834
|
}
|
|
738
835
|
|
|
836
|
+
/**
|
|
837
|
+
* Returns a scratchpad run the caller started, with its output once it has finished. Runs are kept for 24 hours. Returns `404` when the run does not exist, has expired or was started by someone else, and `403` for a script\'s API key or a scratchpad run\'s own token. Requires the *AI assistant* permission.
|
|
838
|
+
* Get a scratchpad run
|
|
839
|
+
*/
|
|
840
|
+
async getScratchpadRunsRaw(requestParameters: ScriptsApiGetScratchpadRunsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ScratchpadRun>> {
|
|
841
|
+
if (requestParameters['runId'] == null) {
|
|
842
|
+
throw new runtime.RequiredError(
|
|
843
|
+
'runId',
|
|
844
|
+
'Required parameter "runId" was null or undefined when calling getScratchpadRuns().'
|
|
845
|
+
);
|
|
846
|
+
}
|
|
847
|
+
|
|
848
|
+
const queryParameters: any = {};
|
|
849
|
+
|
|
850
|
+
if (requestParameters['waitSeconds'] != null) {
|
|
851
|
+
queryParameters['waitSeconds'] = requestParameters['waitSeconds'];
|
|
852
|
+
}
|
|
853
|
+
|
|
854
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
855
|
+
|
|
856
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
857
|
+
const token = this.configuration.accessToken;
|
|
858
|
+
const tokenString = await token("accessToken", []);
|
|
859
|
+
|
|
860
|
+
if (tokenString) {
|
|
861
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
862
|
+
}
|
|
863
|
+
}
|
|
864
|
+
|
|
865
|
+
let urlPath = `/v1/scripts/scratchpad/runs/{runId}`;
|
|
866
|
+
urlPath = urlPath.replace(`{${"runId"}}`, encodeURIComponent(String(requestParameters['runId'])));
|
|
867
|
+
|
|
868
|
+
const response = await this.request({
|
|
869
|
+
path: urlPath,
|
|
870
|
+
method: 'GET',
|
|
871
|
+
headers: headerParameters,
|
|
872
|
+
query: queryParameters,
|
|
873
|
+
}, initOverrides);
|
|
874
|
+
|
|
875
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => ScratchpadRunFromJSON(jsonValue));
|
|
876
|
+
}
|
|
877
|
+
|
|
878
|
+
/**
|
|
879
|
+
* Returns a scratchpad run the caller started, with its output once it has finished. Runs are kept for 24 hours. Returns `404` when the run does not exist, has expired or was started by someone else, and `403` for a script\'s API key or a scratchpad run\'s own token. Requires the *AI assistant* permission.
|
|
880
|
+
* Get a scratchpad run
|
|
881
|
+
*/
|
|
882
|
+
async getScratchpadRuns(requestParameters: ScriptsApiGetScratchpadRunsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ScratchpadRun> {
|
|
883
|
+
const response = await this.getScratchpadRunsRaw(requestParameters, initOverrides);
|
|
884
|
+
return await response.value();
|
|
885
|
+
}
|
|
886
|
+
|
|
739
887
|
/**
|
|
740
888
|
* Returns the credits the account\'s script runs were charged this calendar month (UTC), against the account\'s monthly script credit limit and its other script limits, with how many runs each script made, failed and had refused. creditState is near from 80% of the monthly limit and reached once it is used, after which runs are recorded as quota_exceeded until the month ends. creditsUsed is the scripts figure of `GET /v1/account/usage/calculation-credits`. Run counts are added when runs end. Requires the *Manage my account* permission.
|
|
741
889
|
* Get script usage
|