@spaciv/sdk 0.1.1 → 0.1.3
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 +25 -0
- package/README.md +2 -2
- package/dist/apis/AccountsApi.d.ts +24 -24
- package/dist/apis/AccountsApi.js +12 -12
- package/dist/apis/AuditLogApi.d.ts +1 -1
- package/dist/apis/AuthenticationApi.d.ts +8 -8
- package/dist/apis/AuthenticationApi.js +4 -4
- package/dist/apis/ScriptsApi.d.ts +383 -0
- package/dist/apis/ScriptsApi.js +559 -0
- package/dist/apis/UsersApi.d.ts +4 -4
- package/dist/apis/UsersApi.js +2 -2
- package/dist/apis/index.d.ts +1 -0
- package/dist/apis/index.js +1 -0
- package/dist/esm/apis/AccountsApi.d.ts +24 -24
- package/dist/esm/apis/AccountsApi.js +12 -12
- package/dist/esm/apis/AuditLogApi.d.ts +1 -1
- package/dist/esm/apis/AuthenticationApi.d.ts +8 -8
- package/dist/esm/apis/AuthenticationApi.js +4 -4
- package/dist/esm/apis/ScriptsApi.d.ts +383 -0
- package/dist/esm/apis/ScriptsApi.js +555 -0
- package/dist/esm/apis/UsersApi.d.ts +4 -4
- package/dist/esm/apis/UsersApi.js +2 -2
- package/dist/esm/apis/index.d.ts +1 -0
- package/dist/esm/apis/index.js +1 -0
- package/dist/esm/models/APIKey.d.ts +6 -0
- package/dist/esm/models/APIKey.js +2 -0
- package/dist/esm/models/ScriptAuditEntry.d.ts +67 -0
- package/dist/esm/models/ScriptAuditEntry.js +63 -0
- package/dist/esm/models/ScriptAuditResBody.d.ts +39 -0
- package/dist/esm/models/ScriptAuditResBody.js +46 -0
- package/dist/esm/models/ScriptDetail.d.ts +161 -0
- package/dist/esm/models/ScriptDetail.js +122 -0
- package/dist/esm/models/ScriptExport.d.ts +174 -0
- package/dist/esm/models/ScriptExport.js +129 -0
- package/dist/esm/models/ScriptExportResBody.d.ts +39 -0
- package/dist/esm/models/ScriptExportResBody.js +48 -0
- package/dist/esm/models/ScriptExportRun.d.ts +92 -0
- package/dist/esm/models/ScriptExportRun.js +73 -0
- package/dist/esm/models/ScriptKey.d.ts +64 -0
- package/dist/esm/models/ScriptKey.js +58 -0
- package/dist/esm/models/ScriptListResBody.d.ts +33 -0
- package/dist/esm/models/ScriptListResBody.js +44 -0
- package/dist/esm/models/ScriptLogLine.d.ts +38 -0
- package/dist/esm/models/ScriptLogLine.js +47 -0
- package/dist/esm/models/ScriptPatchReqBody.d.ts +98 -0
- package/dist/esm/models/ScriptPatchReqBody.js +70 -0
- package/dist/esm/models/ScriptPostReqBody.d.ts +113 -0
- package/dist/esm/models/ScriptPostReqBody.js +82 -0
- package/dist/esm/models/ScriptRun.d.ts +86 -0
- package/dist/esm/models/ScriptRun.js +69 -0
- package/dist/esm/models/ScriptRunLogsResBody.d.ts +39 -0
- package/dist/esm/models/ScriptRunLogsResBody.js +48 -0
- package/dist/esm/models/ScriptRunsResBody.d.ts +39 -0
- package/dist/esm/models/ScriptRunsResBody.js +46 -0
- package/dist/esm/models/ScriptRuntime.d.ts +62 -0
- package/dist/esm/models/ScriptRuntime.js +51 -0
- package/dist/esm/models/ScriptSchedule.d.ts +38 -0
- package/dist/esm/models/ScriptSchedule.js +43 -0
- package/dist/esm/models/ScriptSchedulePreviewReqBody.d.ts +44 -0
- package/dist/esm/models/ScriptSchedulePreviewReqBody.js +45 -0
- package/dist/esm/models/ScriptSchedulePreviewResBody.d.ts +44 -0
- package/dist/esm/models/ScriptSchedulePreviewResBody.js +49 -0
- package/dist/esm/models/ScriptSecretsReqBody.d.ts +40 -0
- package/dist/esm/models/ScriptSecretsReqBody.js +43 -0
- package/dist/esm/models/ScriptSecretsResBody.d.ts +134 -0
- package/dist/esm/models/ScriptSecretsResBody.js +111 -0
- package/dist/esm/models/ScriptSummary.d.ts +128 -0
- package/dist/esm/models/ScriptSummary.js +107 -0
- package/dist/esm/models/ScriptWebhookResBody.d.ts +32 -0
- package/dist/esm/models/ScriptWebhookResBody.js +43 -0
- package/dist/esm/models/VariableData.d.ts +2 -1
- package/dist/esm/models/VariableData.js +7 -0
- package/dist/esm/models/VariableDataOneOf2.d.ts +3 -3
- package/dist/esm/models/VariableDataOneOf2.js +4 -4
- package/dist/esm/models/VariableDataOneOf3.d.ts +3 -3
- package/dist/esm/models/VariableDataOneOf3.js +4 -4
- package/dist/esm/models/VariableDataOneOf4.d.ts +3 -3
- package/dist/esm/models/VariableDataOneOf4.js +4 -4
- package/dist/esm/models/VariableDataOneOf5.d.ts +3 -2
- package/dist/esm/models/VariableDataOneOf5.js +4 -3
- package/dist/esm/models/VariableDataOneOf6.d.ts +1 -1
- package/dist/esm/models/VariableDataOneOf6.js +3 -3
- package/dist/esm/models/VariableDataOneOf7.d.ts +32 -0
- package/dist/esm/models/VariableDataOneOf7.js +43 -0
- package/dist/esm/models/VariableDate.d.ts +50 -0
- package/dist/esm/models/VariableDate.js +55 -0
- package/dist/esm/models/index.d.ts +24 -0
- package/dist/esm/models/index.js +24 -0
- package/dist/models/APIKey.d.ts +6 -0
- package/dist/models/APIKey.js +2 -0
- package/dist/models/ScriptAuditEntry.d.ts +67 -0
- package/dist/models/ScriptAuditEntry.js +71 -0
- package/dist/models/ScriptAuditResBody.d.ts +39 -0
- package/dist/models/ScriptAuditResBody.js +53 -0
- package/dist/models/ScriptDetail.d.ts +161 -0
- package/dist/models/ScriptDetail.js +130 -0
- package/dist/models/ScriptExport.d.ts +174 -0
- package/dist/models/ScriptExport.js +137 -0
- package/dist/models/ScriptExportResBody.d.ts +39 -0
- package/dist/models/ScriptExportResBody.js +55 -0
- package/dist/models/ScriptExportRun.d.ts +92 -0
- package/dist/models/ScriptExportRun.js +80 -0
- package/dist/models/ScriptKey.d.ts +64 -0
- package/dist/models/ScriptKey.js +66 -0
- package/dist/models/ScriptListResBody.d.ts +33 -0
- package/dist/models/ScriptListResBody.js +51 -0
- package/dist/models/ScriptLogLine.d.ts +38 -0
- package/dist/models/ScriptLogLine.js +54 -0
- package/dist/models/ScriptPatchReqBody.d.ts +98 -0
- package/dist/models/ScriptPatchReqBody.js +78 -0
- package/dist/models/ScriptPostReqBody.d.ts +113 -0
- package/dist/models/ScriptPostReqBody.js +90 -0
- package/dist/models/ScriptRun.d.ts +86 -0
- package/dist/models/ScriptRun.js +76 -0
- package/dist/models/ScriptRunLogsResBody.d.ts +39 -0
- package/dist/models/ScriptRunLogsResBody.js +55 -0
- package/dist/models/ScriptRunsResBody.d.ts +39 -0
- package/dist/models/ScriptRunsResBody.js +53 -0
- package/dist/models/ScriptRuntime.d.ts +62 -0
- package/dist/models/ScriptRuntime.js +58 -0
- package/dist/models/ScriptSchedule.d.ts +38 -0
- package/dist/models/ScriptSchedule.js +50 -0
- package/dist/models/ScriptSchedulePreviewReqBody.d.ts +44 -0
- package/dist/models/ScriptSchedulePreviewReqBody.js +52 -0
- package/dist/models/ScriptSchedulePreviewResBody.d.ts +44 -0
- package/dist/models/ScriptSchedulePreviewResBody.js +56 -0
- package/dist/models/ScriptSecretsReqBody.d.ts +40 -0
- package/dist/models/ScriptSecretsReqBody.js +50 -0
- package/dist/models/ScriptSecretsResBody.d.ts +134 -0
- package/dist/models/ScriptSecretsResBody.js +119 -0
- package/dist/models/ScriptSummary.d.ts +128 -0
- package/dist/models/ScriptSummary.js +115 -0
- package/dist/models/ScriptWebhookResBody.d.ts +32 -0
- package/dist/models/ScriptWebhookResBody.js +50 -0
- package/dist/models/VariableData.d.ts +2 -1
- package/dist/models/VariableData.js +7 -0
- package/dist/models/VariableDataOneOf2.d.ts +3 -3
- package/dist/models/VariableDataOneOf2.js +4 -4
- package/dist/models/VariableDataOneOf3.d.ts +3 -3
- package/dist/models/VariableDataOneOf3.js +4 -4
- package/dist/models/VariableDataOneOf4.d.ts +3 -3
- package/dist/models/VariableDataOneOf4.js +4 -4
- package/dist/models/VariableDataOneOf5.d.ts +3 -2
- package/dist/models/VariableDataOneOf5.js +4 -3
- package/dist/models/VariableDataOneOf6.d.ts +1 -1
- package/dist/models/VariableDataOneOf6.js +3 -3
- package/dist/models/VariableDataOneOf7.d.ts +32 -0
- package/dist/models/VariableDataOneOf7.js +50 -0
- package/dist/models/VariableDate.d.ts +50 -0
- package/dist/models/VariableDate.js +62 -0
- package/dist/models/index.d.ts +24 -0
- package/dist/models/index.js +24 -0
- package/package.json +1 -1
- package/src/apis/AccountsApi.ts +24 -24
- package/src/apis/AuditLogApi.ts +1 -1
- package/src/apis/AuthenticationApi.ts +8 -8
- package/src/apis/ScriptsApi.ts +984 -0
- package/src/apis/UsersApi.ts +4 -4
- package/src/apis/index.ts +1 -0
- package/src/models/APIKey.ts +8 -0
- package/src/models/ScriptAuditEntry.ts +112 -0
- package/src/models/ScriptAuditResBody.ts +82 -0
- package/src/models/ScriptDetail.ts +265 -0
- package/src/models/ScriptExport.ts +289 -0
- package/src/models/ScriptExportResBody.ts +83 -0
- package/src/models/ScriptExportRun.ts +151 -0
- package/src/models/ScriptKey.ts +109 -0
- package/src/models/ScriptListResBody.ts +74 -0
- package/src/models/ScriptLogLine.ts +75 -0
- package/src/models/ScriptPatchReqBody.ts +158 -0
- package/src/models/ScriptPostReqBody.ts +176 -0
- package/src/models/ScriptRun.ts +142 -0
- package/src/models/ScriptRunLogsResBody.ts +83 -0
- package/src/models/ScriptRunsResBody.ts +82 -0
- package/src/models/ScriptRuntime.ts +105 -0
- package/src/models/ScriptSchedule.ts +73 -0
- package/src/models/ScriptSchedulePreviewReqBody.ts +81 -0
- package/src/models/ScriptSchedulePreviewResBody.ts +83 -0
- package/src/models/ScriptSecretsReqBody.ts +73 -0
- package/src/models/ScriptSecretsResBody.ts +225 -0
- package/src/models/ScriptSummary.ts +216 -0
- package/src/models/ScriptWebhookResBody.ts +66 -0
- package/src/models/VariableData.ts +14 -1
- package/src/models/VariableDataOneOf2.ts +11 -11
- package/src/models/VariableDataOneOf3.ts +11 -11
- package/src/models/VariableDataOneOf4.ts +11 -11
- package/src/models/VariableDataOneOf5.ts +13 -5
- package/src/models/VariableDataOneOf6.ts +4 -4
- package/src/models/VariableDataOneOf7.ts +66 -0
- package/src/models/VariableDate.ts +93 -0
- package/src/models/index.ts +24 -0
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* spaciv API
|
|
3
|
+
* The spaciv API powers workplace planning: modelling how many people an organisation has, how they work, and how much space that requires. ## Getting started 1. Exchange credentials for an access token using one of the operations under **Authentication**. 2. Send that token on every subsequent request as `Authorization: Bearer <token>`. 3. Access tokens are short lived. Call `POST /v1/auth/refresh-token` to obtain a new one before the old one expires. ## Conventions Every operation is versioned under `/v1`. Collections are plural (`GET /v1/dashboards` lists, `POST /v1/dashboards` creates) and individual records live beneath them (`/v1/dashboards/{id}`). Singular paths such as `/v1/account`, `/v1/project` and `/v1/user` refer to the record the access token was issued for. Request and response bodies are JSON. Timestamps are RFC 3339. Identifiers are opaque strings unless documented otherwise, and collection operations return the records visible to the account the token was issued for. Failures return an [RFC 9457](https://www.rfc-editor.org/rfc/rfc9457) problem document with a `detail` field describing what went wrong.
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1.0.0
|
|
6
|
+
* Contact: support@spaciv.com
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
*
|
|
14
|
+
* @export
|
|
15
|
+
* @interface ScriptLogLine
|
|
16
|
+
*/
|
|
17
|
+
export interface ScriptLogLine {
|
|
18
|
+
/**
|
|
19
|
+
*
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof ScriptLogLine
|
|
22
|
+
*/
|
|
23
|
+
message: string;
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @type {Date}
|
|
27
|
+
* @memberof ScriptLogLine
|
|
28
|
+
*/
|
|
29
|
+
timestamp: Date;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Check if a given object implements the ScriptLogLine interface.
|
|
33
|
+
*/
|
|
34
|
+
export declare function instanceOfScriptLogLine(value: object): value is ScriptLogLine;
|
|
35
|
+
export declare function ScriptLogLineFromJSON(json: any): ScriptLogLine;
|
|
36
|
+
export declare function ScriptLogLineFromJSONTyped(json: any, ignoreDiscriminator: boolean): ScriptLogLine;
|
|
37
|
+
export declare function ScriptLogLineToJSON(json: any): ScriptLogLine;
|
|
38
|
+
export declare function ScriptLogLineToJSONTyped(value?: ScriptLogLine | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,54 @@
|
|
|
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.instanceOfScriptLogLine = instanceOfScriptLogLine;
|
|
17
|
+
exports.ScriptLogLineFromJSON = ScriptLogLineFromJSON;
|
|
18
|
+
exports.ScriptLogLineFromJSONTyped = ScriptLogLineFromJSONTyped;
|
|
19
|
+
exports.ScriptLogLineToJSON = ScriptLogLineToJSON;
|
|
20
|
+
exports.ScriptLogLineToJSONTyped = ScriptLogLineToJSONTyped;
|
|
21
|
+
/**
|
|
22
|
+
* Check if a given object implements the ScriptLogLine interface.
|
|
23
|
+
*/
|
|
24
|
+
function instanceOfScriptLogLine(value) {
|
|
25
|
+
if (!('message' in value) || value['message'] === undefined)
|
|
26
|
+
return false;
|
|
27
|
+
if (!('timestamp' in value) || value['timestamp'] === undefined)
|
|
28
|
+
return false;
|
|
29
|
+
return true;
|
|
30
|
+
}
|
|
31
|
+
function ScriptLogLineFromJSON(json) {
|
|
32
|
+
return ScriptLogLineFromJSONTyped(json, false);
|
|
33
|
+
}
|
|
34
|
+
function ScriptLogLineFromJSONTyped(json, ignoreDiscriminator) {
|
|
35
|
+
if (json == null) {
|
|
36
|
+
return json;
|
|
37
|
+
}
|
|
38
|
+
return {
|
|
39
|
+
'message': json['message'],
|
|
40
|
+
'timestamp': (new Date(json['timestamp'])),
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
function ScriptLogLineToJSON(json) {
|
|
44
|
+
return ScriptLogLineToJSONTyped(json, false);
|
|
45
|
+
}
|
|
46
|
+
function ScriptLogLineToJSONTyped(value, ignoreDiscriminator = false) {
|
|
47
|
+
if (value == null) {
|
|
48
|
+
return value;
|
|
49
|
+
}
|
|
50
|
+
return {
|
|
51
|
+
'message': value['message'],
|
|
52
|
+
'timestamp': ((value['timestamp']).toISOString()),
|
|
53
|
+
};
|
|
54
|
+
}
|
|
@@ -0,0 +1,98 @@
|
|
|
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 { ScriptSchedule } from './ScriptSchedule';
|
|
13
|
+
/**
|
|
14
|
+
*
|
|
15
|
+
* @export
|
|
16
|
+
* @interface ScriptPatchReqBody
|
|
17
|
+
*/
|
|
18
|
+
export interface ScriptPatchReqBody {
|
|
19
|
+
/**
|
|
20
|
+
*
|
|
21
|
+
* @type {string}
|
|
22
|
+
* @memberof ScriptPatchReqBody
|
|
23
|
+
*/
|
|
24
|
+
description?: string;
|
|
25
|
+
/**
|
|
26
|
+
*
|
|
27
|
+
* @type {boolean}
|
|
28
|
+
* @memberof ScriptPatchReqBody
|
|
29
|
+
*/
|
|
30
|
+
enabled?: boolean;
|
|
31
|
+
/**
|
|
32
|
+
*
|
|
33
|
+
* @type {{ [key: string]: string; }}
|
|
34
|
+
* @memberof ScriptPatchReqBody
|
|
35
|
+
*/
|
|
36
|
+
files?: {
|
|
37
|
+
[key: string]: string;
|
|
38
|
+
};
|
|
39
|
+
/**
|
|
40
|
+
*
|
|
41
|
+
* @type {string}
|
|
42
|
+
* @memberof ScriptPatchReqBody
|
|
43
|
+
*/
|
|
44
|
+
language?: ScriptPatchReqBodyLanguageEnum;
|
|
45
|
+
/**
|
|
46
|
+
*
|
|
47
|
+
* @type {string}
|
|
48
|
+
* @memberof ScriptPatchReqBody
|
|
49
|
+
*/
|
|
50
|
+
manifest?: string;
|
|
51
|
+
/**
|
|
52
|
+
*
|
|
53
|
+
* @type {string}
|
|
54
|
+
* @memberof ScriptPatchReqBody
|
|
55
|
+
*/
|
|
56
|
+
name?: string;
|
|
57
|
+
/**
|
|
58
|
+
* 0 removes the project.
|
|
59
|
+
* @type {number}
|
|
60
|
+
* @memberof ScriptPatchReqBody
|
|
61
|
+
*/
|
|
62
|
+
project?: number;
|
|
63
|
+
/**
|
|
64
|
+
* The revision last read; a different current revision is rejected with 409.
|
|
65
|
+
* @type {number}
|
|
66
|
+
* @memberof ScriptPatchReqBody
|
|
67
|
+
*/
|
|
68
|
+
revision: number;
|
|
69
|
+
/**
|
|
70
|
+
*
|
|
71
|
+
* @type {ScriptSchedule}
|
|
72
|
+
* @memberof ScriptPatchReqBody
|
|
73
|
+
*/
|
|
74
|
+
schedule?: ScriptSchedule;
|
|
75
|
+
/**
|
|
76
|
+
*
|
|
77
|
+
* @type {boolean}
|
|
78
|
+
* @memberof ScriptPatchReqBody
|
|
79
|
+
*/
|
|
80
|
+
webhook?: boolean;
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* @export
|
|
84
|
+
*/
|
|
85
|
+
export declare const ScriptPatchReqBodyLanguageEnum: {
|
|
86
|
+
readonly Python: "python";
|
|
87
|
+
readonly Go: "go";
|
|
88
|
+
readonly Javascript: "javascript";
|
|
89
|
+
};
|
|
90
|
+
export type ScriptPatchReqBodyLanguageEnum = typeof ScriptPatchReqBodyLanguageEnum[keyof typeof ScriptPatchReqBodyLanguageEnum];
|
|
91
|
+
/**
|
|
92
|
+
* Check if a given object implements the ScriptPatchReqBody interface.
|
|
93
|
+
*/
|
|
94
|
+
export declare function instanceOfScriptPatchReqBody(value: object): value is ScriptPatchReqBody;
|
|
95
|
+
export declare function ScriptPatchReqBodyFromJSON(json: any): ScriptPatchReqBody;
|
|
96
|
+
export declare function ScriptPatchReqBodyFromJSONTyped(json: any, ignoreDiscriminator: boolean): ScriptPatchReqBody;
|
|
97
|
+
export declare function ScriptPatchReqBodyToJSON(json: any): ScriptPatchReqBody;
|
|
98
|
+
export declare function ScriptPatchReqBodyToJSONTyped(value?: ScriptPatchReqBody | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,78 @@
|
|
|
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.ScriptPatchReqBodyLanguageEnum = void 0;
|
|
17
|
+
exports.instanceOfScriptPatchReqBody = instanceOfScriptPatchReqBody;
|
|
18
|
+
exports.ScriptPatchReqBodyFromJSON = ScriptPatchReqBodyFromJSON;
|
|
19
|
+
exports.ScriptPatchReqBodyFromJSONTyped = ScriptPatchReqBodyFromJSONTyped;
|
|
20
|
+
exports.ScriptPatchReqBodyToJSON = ScriptPatchReqBodyToJSON;
|
|
21
|
+
exports.ScriptPatchReqBodyToJSONTyped = ScriptPatchReqBodyToJSONTyped;
|
|
22
|
+
const ScriptSchedule_1 = require("./ScriptSchedule");
|
|
23
|
+
/**
|
|
24
|
+
* @export
|
|
25
|
+
*/
|
|
26
|
+
exports.ScriptPatchReqBodyLanguageEnum = {
|
|
27
|
+
Python: 'python',
|
|
28
|
+
Go: 'go',
|
|
29
|
+
Javascript: 'javascript'
|
|
30
|
+
};
|
|
31
|
+
/**
|
|
32
|
+
* Check if a given object implements the ScriptPatchReqBody interface.
|
|
33
|
+
*/
|
|
34
|
+
function instanceOfScriptPatchReqBody(value) {
|
|
35
|
+
if (!('revision' in value) || value['revision'] === undefined)
|
|
36
|
+
return false;
|
|
37
|
+
return true;
|
|
38
|
+
}
|
|
39
|
+
function ScriptPatchReqBodyFromJSON(json) {
|
|
40
|
+
return ScriptPatchReqBodyFromJSONTyped(json, false);
|
|
41
|
+
}
|
|
42
|
+
function ScriptPatchReqBodyFromJSONTyped(json, ignoreDiscriminator) {
|
|
43
|
+
if (json == null) {
|
|
44
|
+
return json;
|
|
45
|
+
}
|
|
46
|
+
return {
|
|
47
|
+
'description': json['description'] == null ? undefined : json['description'],
|
|
48
|
+
'enabled': json['enabled'] == null ? undefined : json['enabled'],
|
|
49
|
+
'files': json['files'] == null ? undefined : json['files'],
|
|
50
|
+
'language': json['language'] == null ? undefined : json['language'],
|
|
51
|
+
'manifest': json['manifest'] == null ? undefined : json['manifest'],
|
|
52
|
+
'name': json['name'] == null ? undefined : json['name'],
|
|
53
|
+
'project': json['project'] == null ? undefined : json['project'],
|
|
54
|
+
'revision': json['revision'],
|
|
55
|
+
'schedule': json['schedule'] == null ? undefined : (0, ScriptSchedule_1.ScriptScheduleFromJSON)(json['schedule']),
|
|
56
|
+
'webhook': json['webhook'] == null ? undefined : json['webhook'],
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
function ScriptPatchReqBodyToJSON(json) {
|
|
60
|
+
return ScriptPatchReqBodyToJSONTyped(json, false);
|
|
61
|
+
}
|
|
62
|
+
function ScriptPatchReqBodyToJSONTyped(value, ignoreDiscriminator = false) {
|
|
63
|
+
if (value == null) {
|
|
64
|
+
return value;
|
|
65
|
+
}
|
|
66
|
+
return {
|
|
67
|
+
'description': value['description'],
|
|
68
|
+
'enabled': value['enabled'],
|
|
69
|
+
'files': value['files'],
|
|
70
|
+
'language': value['language'],
|
|
71
|
+
'manifest': value['manifest'],
|
|
72
|
+
'name': value['name'],
|
|
73
|
+
'project': value['project'],
|
|
74
|
+
'revision': value['revision'],
|
|
75
|
+
'schedule': (0, ScriptSchedule_1.ScriptScheduleToJSON)(value['schedule']),
|
|
76
|
+
'webhook': value['webhook'],
|
|
77
|
+
};
|
|
78
|
+
}
|
|
@@ -0,0 +1,113 @@
|
|
|
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 { ScriptSchedule } from './ScriptSchedule';
|
|
13
|
+
/**
|
|
14
|
+
*
|
|
15
|
+
* @export
|
|
16
|
+
* @interface ScriptPostReqBody
|
|
17
|
+
*/
|
|
18
|
+
export interface ScriptPostReqBody {
|
|
19
|
+
/**
|
|
20
|
+
*
|
|
21
|
+
* @type {string}
|
|
22
|
+
* @memberof ScriptPostReqBody
|
|
23
|
+
*/
|
|
24
|
+
description?: string;
|
|
25
|
+
/**
|
|
26
|
+
* Whether schedules and webhooks start runs.
|
|
27
|
+
* @type {boolean}
|
|
28
|
+
* @memberof ScriptPostReqBody
|
|
29
|
+
*/
|
|
30
|
+
enabled?: boolean;
|
|
31
|
+
/**
|
|
32
|
+
* Source files keyed by path. Python needs script.py defining handle(event, ctx), JavaScript needs script.js exporting handle(event, ctx), and Go needs script.go in a non-main package exporting Handle(ctx context.Context, event handler.Event, hc handler.Context) (any, error) from spaciv/handler.
|
|
33
|
+
* @type {{ [key: string]: string; }}
|
|
34
|
+
* @memberof ScriptPostReqBody
|
|
35
|
+
*/
|
|
36
|
+
files: {
|
|
37
|
+
[key: string]: string;
|
|
38
|
+
};
|
|
39
|
+
/**
|
|
40
|
+
*
|
|
41
|
+
* @type {string}
|
|
42
|
+
* @memberof ScriptPostReqBody
|
|
43
|
+
*/
|
|
44
|
+
language: ScriptPostReqBodyLanguageEnum;
|
|
45
|
+
/**
|
|
46
|
+
* Dependency manifest: requirements.txt for Python, go.mod for Go, package.json for JavaScript.
|
|
47
|
+
* @type {string}
|
|
48
|
+
* @memberof ScriptPostReqBody
|
|
49
|
+
*/
|
|
50
|
+
manifest?: string;
|
|
51
|
+
/**
|
|
52
|
+
*
|
|
53
|
+
* @type {string}
|
|
54
|
+
* @memberof ScriptPostReqBody
|
|
55
|
+
*/
|
|
56
|
+
name: string;
|
|
57
|
+
/**
|
|
58
|
+
* Optional project to scope the script's API key to, for example to update its dashboards. Omit for account-wide access.
|
|
59
|
+
* @type {number}
|
|
60
|
+
* @memberof ScriptPostReqBody
|
|
61
|
+
*/
|
|
62
|
+
project?: number;
|
|
63
|
+
/**
|
|
64
|
+
*
|
|
65
|
+
* @type {ScriptSchedule}
|
|
66
|
+
* @memberof ScriptPostReqBody
|
|
67
|
+
*/
|
|
68
|
+
schedule?: ScriptSchedule;
|
|
69
|
+
/**
|
|
70
|
+
* Secrets exposed to the script as environment variables. Names must be upper case and must not start with SPACIV_.
|
|
71
|
+
* @type {{ [key: string]: string; }}
|
|
72
|
+
* @memberof ScriptPostReqBody
|
|
73
|
+
*/
|
|
74
|
+
secrets?: {
|
|
75
|
+
[key: string]: string;
|
|
76
|
+
};
|
|
77
|
+
/**
|
|
78
|
+
* The handler signature the script implements; defaults to integration and cannot be changed. An integration handles each run as handle(event, ctx), where event has the trigger and, for webhook runs, the request, and ctx has the account, project, API key and secrets.
|
|
79
|
+
* @type {string}
|
|
80
|
+
* @memberof ScriptPostReqBody
|
|
81
|
+
*/
|
|
82
|
+
type?: ScriptPostReqBodyTypeEnum;
|
|
83
|
+
/**
|
|
84
|
+
* Whether the script can be triggered by an HTTP POST to its webhook URL.
|
|
85
|
+
* @type {boolean}
|
|
86
|
+
* @memberof ScriptPostReqBody
|
|
87
|
+
*/
|
|
88
|
+
webhook?: boolean;
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* @export
|
|
92
|
+
*/
|
|
93
|
+
export declare const ScriptPostReqBodyLanguageEnum: {
|
|
94
|
+
readonly Python: "python";
|
|
95
|
+
readonly Go: "go";
|
|
96
|
+
readonly Javascript: "javascript";
|
|
97
|
+
};
|
|
98
|
+
export type ScriptPostReqBodyLanguageEnum = typeof ScriptPostReqBodyLanguageEnum[keyof typeof ScriptPostReqBodyLanguageEnum];
|
|
99
|
+
/**
|
|
100
|
+
* @export
|
|
101
|
+
*/
|
|
102
|
+
export declare const ScriptPostReqBodyTypeEnum: {
|
|
103
|
+
readonly Integration: "integration";
|
|
104
|
+
};
|
|
105
|
+
export type ScriptPostReqBodyTypeEnum = typeof ScriptPostReqBodyTypeEnum[keyof typeof ScriptPostReqBodyTypeEnum];
|
|
106
|
+
/**
|
|
107
|
+
* Check if a given object implements the ScriptPostReqBody interface.
|
|
108
|
+
*/
|
|
109
|
+
export declare function instanceOfScriptPostReqBody(value: object): value is ScriptPostReqBody;
|
|
110
|
+
export declare function ScriptPostReqBodyFromJSON(json: any): ScriptPostReqBody;
|
|
111
|
+
export declare function ScriptPostReqBodyFromJSONTyped(json: any, ignoreDiscriminator: boolean): ScriptPostReqBody;
|
|
112
|
+
export declare function ScriptPostReqBodyToJSON(json: any): ScriptPostReqBody;
|
|
113
|
+
export declare function ScriptPostReqBodyToJSONTyped(value?: ScriptPostReqBody | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,90 @@
|
|
|
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.ScriptPostReqBodyTypeEnum = exports.ScriptPostReqBodyLanguageEnum = void 0;
|
|
17
|
+
exports.instanceOfScriptPostReqBody = instanceOfScriptPostReqBody;
|
|
18
|
+
exports.ScriptPostReqBodyFromJSON = ScriptPostReqBodyFromJSON;
|
|
19
|
+
exports.ScriptPostReqBodyFromJSONTyped = ScriptPostReqBodyFromJSONTyped;
|
|
20
|
+
exports.ScriptPostReqBodyToJSON = ScriptPostReqBodyToJSON;
|
|
21
|
+
exports.ScriptPostReqBodyToJSONTyped = ScriptPostReqBodyToJSONTyped;
|
|
22
|
+
const ScriptSchedule_1 = require("./ScriptSchedule");
|
|
23
|
+
/**
|
|
24
|
+
* @export
|
|
25
|
+
*/
|
|
26
|
+
exports.ScriptPostReqBodyLanguageEnum = {
|
|
27
|
+
Python: 'python',
|
|
28
|
+
Go: 'go',
|
|
29
|
+
Javascript: 'javascript'
|
|
30
|
+
};
|
|
31
|
+
/**
|
|
32
|
+
* @export
|
|
33
|
+
*/
|
|
34
|
+
exports.ScriptPostReqBodyTypeEnum = {
|
|
35
|
+
Integration: 'integration'
|
|
36
|
+
};
|
|
37
|
+
/**
|
|
38
|
+
* Check if a given object implements the ScriptPostReqBody interface.
|
|
39
|
+
*/
|
|
40
|
+
function instanceOfScriptPostReqBody(value) {
|
|
41
|
+
if (!('files' in value) || value['files'] === undefined)
|
|
42
|
+
return false;
|
|
43
|
+
if (!('language' in value) || value['language'] === undefined)
|
|
44
|
+
return false;
|
|
45
|
+
if (!('name' in value) || value['name'] === undefined)
|
|
46
|
+
return false;
|
|
47
|
+
return true;
|
|
48
|
+
}
|
|
49
|
+
function ScriptPostReqBodyFromJSON(json) {
|
|
50
|
+
return ScriptPostReqBodyFromJSONTyped(json, false);
|
|
51
|
+
}
|
|
52
|
+
function ScriptPostReqBodyFromJSONTyped(json, ignoreDiscriminator) {
|
|
53
|
+
if (json == null) {
|
|
54
|
+
return json;
|
|
55
|
+
}
|
|
56
|
+
return {
|
|
57
|
+
'description': json['description'] == null ? undefined : json['description'],
|
|
58
|
+
'enabled': json['enabled'] == null ? undefined : json['enabled'],
|
|
59
|
+
'files': json['files'],
|
|
60
|
+
'language': json['language'],
|
|
61
|
+
'manifest': json['manifest'] == null ? undefined : json['manifest'],
|
|
62
|
+
'name': json['name'],
|
|
63
|
+
'project': json['project'] == null ? undefined : json['project'],
|
|
64
|
+
'schedule': json['schedule'] == null ? undefined : (0, ScriptSchedule_1.ScriptScheduleFromJSON)(json['schedule']),
|
|
65
|
+
'secrets': json['secrets'] == null ? undefined : json['secrets'],
|
|
66
|
+
'type': json['type'] == null ? undefined : json['type'],
|
|
67
|
+
'webhook': json['webhook'] == null ? undefined : json['webhook'],
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
function ScriptPostReqBodyToJSON(json) {
|
|
71
|
+
return ScriptPostReqBodyToJSONTyped(json, false);
|
|
72
|
+
}
|
|
73
|
+
function ScriptPostReqBodyToJSONTyped(value, ignoreDiscriminator = false) {
|
|
74
|
+
if (value == null) {
|
|
75
|
+
return value;
|
|
76
|
+
}
|
|
77
|
+
return {
|
|
78
|
+
'description': value['description'],
|
|
79
|
+
'enabled': value['enabled'],
|
|
80
|
+
'files': value['files'],
|
|
81
|
+
'language': value['language'],
|
|
82
|
+
'manifest': value['manifest'],
|
|
83
|
+
'name': value['name'],
|
|
84
|
+
'project': value['project'],
|
|
85
|
+
'schedule': (0, ScriptSchedule_1.ScriptScheduleToJSON)(value['schedule']),
|
|
86
|
+
'secrets': value['secrets'],
|
|
87
|
+
'type': value['type'],
|
|
88
|
+
'webhook': value['webhook'],
|
|
89
|
+
};
|
|
90
|
+
}
|
|
@@ -0,0 +1,86 @@
|
|
|
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 ScriptRun
|
|
16
|
+
*/
|
|
17
|
+
export interface ScriptRun {
|
|
18
|
+
/**
|
|
19
|
+
*
|
|
20
|
+
* @type {number}
|
|
21
|
+
* @memberof ScriptRun
|
|
22
|
+
*/
|
|
23
|
+
durationMs?: number;
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @type {Date}
|
|
27
|
+
* @memberof ScriptRun
|
|
28
|
+
*/
|
|
29
|
+
endedAt?: Date;
|
|
30
|
+
/**
|
|
31
|
+
*
|
|
32
|
+
* @type {number}
|
|
33
|
+
* @memberof ScriptRun
|
|
34
|
+
*/
|
|
35
|
+
exitCode: number;
|
|
36
|
+
/**
|
|
37
|
+
*
|
|
38
|
+
* @type {string}
|
|
39
|
+
* @memberof ScriptRun
|
|
40
|
+
*/
|
|
41
|
+
id: string;
|
|
42
|
+
/**
|
|
43
|
+
* "build" for a dependency build, "run" for an execution.
|
|
44
|
+
* @type {string}
|
|
45
|
+
* @memberof ScriptRun
|
|
46
|
+
*/
|
|
47
|
+
kind: string;
|
|
48
|
+
/**
|
|
49
|
+
*
|
|
50
|
+
* @type {string}
|
|
51
|
+
* @memberof ScriptRun
|
|
52
|
+
*/
|
|
53
|
+
message?: string;
|
|
54
|
+
/**
|
|
55
|
+
*
|
|
56
|
+
* @type {Date}
|
|
57
|
+
* @memberof ScriptRun
|
|
58
|
+
*/
|
|
59
|
+
queuedAt?: Date;
|
|
60
|
+
/**
|
|
61
|
+
*
|
|
62
|
+
* @type {Date}
|
|
63
|
+
* @memberof ScriptRun
|
|
64
|
+
*/
|
|
65
|
+
startedAt?: Date;
|
|
66
|
+
/**
|
|
67
|
+
*
|
|
68
|
+
* @type {string}
|
|
69
|
+
* @memberof ScriptRun
|
|
70
|
+
*/
|
|
71
|
+
status: string;
|
|
72
|
+
/**
|
|
73
|
+
*
|
|
74
|
+
* @type {string}
|
|
75
|
+
* @memberof ScriptRun
|
|
76
|
+
*/
|
|
77
|
+
trigger: string;
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Check if a given object implements the ScriptRun interface.
|
|
81
|
+
*/
|
|
82
|
+
export declare function instanceOfScriptRun(value: object): value is ScriptRun;
|
|
83
|
+
export declare function ScriptRunFromJSON(json: any): ScriptRun;
|
|
84
|
+
export declare function ScriptRunFromJSONTyped(json: any, ignoreDiscriminator: boolean): ScriptRun;
|
|
85
|
+
export declare function ScriptRunToJSON(json: any): ScriptRun;
|
|
86
|
+
export declare function ScriptRunToJSONTyped(value?: ScriptRun | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,76 @@
|
|
|
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.instanceOfScriptRun = instanceOfScriptRun;
|
|
17
|
+
exports.ScriptRunFromJSON = ScriptRunFromJSON;
|
|
18
|
+
exports.ScriptRunFromJSONTyped = ScriptRunFromJSONTyped;
|
|
19
|
+
exports.ScriptRunToJSON = ScriptRunToJSON;
|
|
20
|
+
exports.ScriptRunToJSONTyped = ScriptRunToJSONTyped;
|
|
21
|
+
/**
|
|
22
|
+
* Check if a given object implements the ScriptRun interface.
|
|
23
|
+
*/
|
|
24
|
+
function instanceOfScriptRun(value) {
|
|
25
|
+
if (!('exitCode' in value) || value['exitCode'] === undefined)
|
|
26
|
+
return false;
|
|
27
|
+
if (!('id' in value) || value['id'] === undefined)
|
|
28
|
+
return false;
|
|
29
|
+
if (!('kind' in value) || value['kind'] === undefined)
|
|
30
|
+
return false;
|
|
31
|
+
if (!('status' in value) || value['status'] === undefined)
|
|
32
|
+
return false;
|
|
33
|
+
if (!('trigger' in value) || value['trigger'] === undefined)
|
|
34
|
+
return false;
|
|
35
|
+
return true;
|
|
36
|
+
}
|
|
37
|
+
function ScriptRunFromJSON(json) {
|
|
38
|
+
return ScriptRunFromJSONTyped(json, false);
|
|
39
|
+
}
|
|
40
|
+
function ScriptRunFromJSONTyped(json, ignoreDiscriminator) {
|
|
41
|
+
if (json == null) {
|
|
42
|
+
return json;
|
|
43
|
+
}
|
|
44
|
+
return {
|
|
45
|
+
'durationMs': json['durationMs'] == null ? undefined : json['durationMs'],
|
|
46
|
+
'endedAt': json['endedAt'] == null ? undefined : (new Date(json['endedAt'])),
|
|
47
|
+
'exitCode': json['exitCode'],
|
|
48
|
+
'id': json['id'],
|
|
49
|
+
'kind': json['kind'],
|
|
50
|
+
'message': json['message'] == null ? undefined : json['message'],
|
|
51
|
+
'queuedAt': json['queuedAt'] == null ? undefined : (new Date(json['queuedAt'])),
|
|
52
|
+
'startedAt': json['startedAt'] == null ? undefined : (new Date(json['startedAt'])),
|
|
53
|
+
'status': json['status'],
|
|
54
|
+
'trigger': json['trigger'],
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
function ScriptRunToJSON(json) {
|
|
58
|
+
return ScriptRunToJSONTyped(json, false);
|
|
59
|
+
}
|
|
60
|
+
function ScriptRunToJSONTyped(value, ignoreDiscriminator = false) {
|
|
61
|
+
if (value == null) {
|
|
62
|
+
return value;
|
|
63
|
+
}
|
|
64
|
+
return {
|
|
65
|
+
'durationMs': value['durationMs'],
|
|
66
|
+
'endedAt': value['endedAt'] == null ? undefined : ((value['endedAt']).toISOString()),
|
|
67
|
+
'exitCode': value['exitCode'],
|
|
68
|
+
'id': value['id'],
|
|
69
|
+
'kind': value['kind'],
|
|
70
|
+
'message': value['message'],
|
|
71
|
+
'queuedAt': value['queuedAt'] == null ? undefined : ((value['queuedAt']).toISOString()),
|
|
72
|
+
'startedAt': value['startedAt'] == null ? undefined : ((value['startedAt']).toISOString()),
|
|
73
|
+
'status': value['status'],
|
|
74
|
+
'trigger': value['trigger'],
|
|
75
|
+
};
|
|
76
|
+
}
|