@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,74 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* spaciv API
|
|
5
|
+
* The spaciv API powers workplace planning: modelling how many people an organisation has, how they work, and how much space that requires. ## Getting started 1. Exchange credentials for an access token using one of the operations under **Authentication**. 2. Send that token on every subsequent request as `Authorization: Bearer <token>`. 3. Access tokens are short lived. Call `POST /v1/auth/refresh-token` to obtain a new one before the old one expires. ## Conventions Every operation is versioned under `/v1`. Collections are plural (`GET /v1/dashboards` lists, `POST /v1/dashboards` creates) and individual records live beneath them (`/v1/dashboards/{id}`). Singular paths such as `/v1/account`, `/v1/project` and `/v1/user` refer to the record the access token was issued for. Request and response bodies are JSON. Timestamps are RFC 3339. Identifiers are opaque strings unless documented otherwise, and collection operations return the records visible to the account the token was issued for. Failures return an [RFC 9457](https://www.rfc-editor.org/rfc/rfc9457) problem document with a `detail` field describing what went wrong.
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0.0
|
|
8
|
+
* Contact: support@spaciv.com
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
import type { ScriptSummary } from './ScriptSummary';
|
|
17
|
+
import {
|
|
18
|
+
ScriptSummaryFromJSON,
|
|
19
|
+
ScriptSummaryFromJSONTyped,
|
|
20
|
+
ScriptSummaryToJSON,
|
|
21
|
+
ScriptSummaryToJSONTyped,
|
|
22
|
+
} from './ScriptSummary';
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @export
|
|
27
|
+
* @interface ScriptListResBody
|
|
28
|
+
*/
|
|
29
|
+
export interface ScriptListResBody {
|
|
30
|
+
/**
|
|
31
|
+
*
|
|
32
|
+
* @type {Array<ScriptSummary>}
|
|
33
|
+
* @memberof ScriptListResBody
|
|
34
|
+
*/
|
|
35
|
+
scripts: Array<ScriptSummary>;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Check if a given object implements the ScriptListResBody interface.
|
|
40
|
+
*/
|
|
41
|
+
export function instanceOfScriptListResBody(value: object): value is ScriptListResBody {
|
|
42
|
+
if (!('scripts' in value) || value['scripts'] === undefined) return false;
|
|
43
|
+
return true;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export function ScriptListResBodyFromJSON(json: any): ScriptListResBody {
|
|
47
|
+
return ScriptListResBodyFromJSONTyped(json, false);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export function ScriptListResBodyFromJSONTyped(json: any, ignoreDiscriminator: boolean): ScriptListResBody {
|
|
51
|
+
if (json == null) {
|
|
52
|
+
return json;
|
|
53
|
+
}
|
|
54
|
+
return {
|
|
55
|
+
|
|
56
|
+
'scripts': ((json['scripts'] as Array<any>).map(ScriptSummaryFromJSON)),
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export function ScriptListResBodyToJSON(json: any): ScriptListResBody {
|
|
61
|
+
return ScriptListResBodyToJSONTyped(json, false);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export function ScriptListResBodyToJSONTyped(value?: ScriptListResBody | null, ignoreDiscriminator: boolean = false): any {
|
|
65
|
+
if (value == null) {
|
|
66
|
+
return value;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
return {
|
|
70
|
+
|
|
71
|
+
'scripts': ((value['scripts'] as Array<any>).map(ScriptSummaryToJSON)),
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* spaciv API
|
|
5
|
+
* The spaciv API powers workplace planning: modelling how many people an organisation has, how they work, and how much space that requires. ## Getting started 1. Exchange credentials for an access token using one of the operations under **Authentication**. 2. Send that token on every subsequent request as `Authorization: Bearer <token>`. 3. Access tokens are short lived. Call `POST /v1/auth/refresh-token` to obtain a new one before the old one expires. ## Conventions Every operation is versioned under `/v1`. Collections are plural (`GET /v1/dashboards` lists, `POST /v1/dashboards` creates) and individual records live beneath them (`/v1/dashboards/{id}`). Singular paths such as `/v1/account`, `/v1/project` and `/v1/user` refer to the record the access token was issued for. Request and response bodies are JSON. Timestamps are RFC 3339. Identifiers are opaque strings unless documented otherwise, and collection operations return the records visible to the account the token was issued for. Failures return an [RFC 9457](https://www.rfc-editor.org/rfc/rfc9457) problem document with a `detail` field describing what went wrong.
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0.0
|
|
8
|
+
* Contact: support@spaciv.com
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
* @export
|
|
19
|
+
* @interface ScriptLogLine
|
|
20
|
+
*/
|
|
21
|
+
export interface ScriptLogLine {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof ScriptLogLine
|
|
26
|
+
*/
|
|
27
|
+
message: string;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {Date}
|
|
31
|
+
* @memberof ScriptLogLine
|
|
32
|
+
*/
|
|
33
|
+
timestamp: Date;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Check if a given object implements the ScriptLogLine interface.
|
|
38
|
+
*/
|
|
39
|
+
export function instanceOfScriptLogLine(value: object): value is ScriptLogLine {
|
|
40
|
+
if (!('message' in value) || value['message'] === undefined) return false;
|
|
41
|
+
if (!('timestamp' in value) || value['timestamp'] === undefined) return false;
|
|
42
|
+
return true;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export function ScriptLogLineFromJSON(json: any): ScriptLogLine {
|
|
46
|
+
return ScriptLogLineFromJSONTyped(json, false);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export function ScriptLogLineFromJSONTyped(json: any, ignoreDiscriminator: boolean): ScriptLogLine {
|
|
50
|
+
if (json == null) {
|
|
51
|
+
return json;
|
|
52
|
+
}
|
|
53
|
+
return {
|
|
54
|
+
|
|
55
|
+
'message': json['message'],
|
|
56
|
+
'timestamp': (new Date(json['timestamp'])),
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export function ScriptLogLineToJSON(json: any): ScriptLogLine {
|
|
61
|
+
return ScriptLogLineToJSONTyped(json, false);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export function ScriptLogLineToJSONTyped(value?: ScriptLogLine | null, ignoreDiscriminator: boolean = false): any {
|
|
65
|
+
if (value == null) {
|
|
66
|
+
return value;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
return {
|
|
70
|
+
|
|
71
|
+
'message': value['message'],
|
|
72
|
+
'timestamp': ((value['timestamp']).toISOString()),
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* spaciv API
|
|
5
|
+
* The spaciv API powers workplace planning: modelling how many people an organisation has, how they work, and how much space that requires. ## Getting started 1. Exchange credentials for an access token using one of the operations under **Authentication**. 2. Send that token on every subsequent request as `Authorization: Bearer <token>`. 3. Access tokens are short lived. Call `POST /v1/auth/refresh-token` to obtain a new one before the old one expires. ## Conventions Every operation is versioned under `/v1`. Collections are plural (`GET /v1/dashboards` lists, `POST /v1/dashboards` creates) and individual records live beneath them (`/v1/dashboards/{id}`). Singular paths such as `/v1/account`, `/v1/project` and `/v1/user` refer to the record the access token was issued for. Request and response bodies are JSON. Timestamps are RFC 3339. Identifiers are opaque strings unless documented otherwise, and collection operations return the records visible to the account the token was issued for. Failures return an [RFC 9457](https://www.rfc-editor.org/rfc/rfc9457) problem document with a `detail` field describing what went wrong.
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0.0
|
|
8
|
+
* Contact: support@spaciv.com
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
import type { ScriptSchedule } from './ScriptSchedule';
|
|
17
|
+
import {
|
|
18
|
+
ScriptScheduleFromJSON,
|
|
19
|
+
ScriptScheduleFromJSONTyped,
|
|
20
|
+
ScriptScheduleToJSON,
|
|
21
|
+
ScriptScheduleToJSONTyped,
|
|
22
|
+
} from './ScriptSchedule';
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @export
|
|
27
|
+
* @interface ScriptPatchReqBody
|
|
28
|
+
*/
|
|
29
|
+
export interface ScriptPatchReqBody {
|
|
30
|
+
/**
|
|
31
|
+
*
|
|
32
|
+
* @type {string}
|
|
33
|
+
* @memberof ScriptPatchReqBody
|
|
34
|
+
*/
|
|
35
|
+
description?: string;
|
|
36
|
+
/**
|
|
37
|
+
*
|
|
38
|
+
* @type {boolean}
|
|
39
|
+
* @memberof ScriptPatchReqBody
|
|
40
|
+
*/
|
|
41
|
+
enabled?: boolean;
|
|
42
|
+
/**
|
|
43
|
+
*
|
|
44
|
+
* @type {{ [key: string]: string; }}
|
|
45
|
+
* @memberof ScriptPatchReqBody
|
|
46
|
+
*/
|
|
47
|
+
files?: { [key: string]: string; };
|
|
48
|
+
/**
|
|
49
|
+
*
|
|
50
|
+
* @type {string}
|
|
51
|
+
* @memberof ScriptPatchReqBody
|
|
52
|
+
*/
|
|
53
|
+
language?: ScriptPatchReqBodyLanguageEnum;
|
|
54
|
+
/**
|
|
55
|
+
*
|
|
56
|
+
* @type {string}
|
|
57
|
+
* @memberof ScriptPatchReqBody
|
|
58
|
+
*/
|
|
59
|
+
manifest?: string;
|
|
60
|
+
/**
|
|
61
|
+
*
|
|
62
|
+
* @type {string}
|
|
63
|
+
* @memberof ScriptPatchReqBody
|
|
64
|
+
*/
|
|
65
|
+
name?: string;
|
|
66
|
+
/**
|
|
67
|
+
* 0 removes the project.
|
|
68
|
+
* @type {number}
|
|
69
|
+
* @memberof ScriptPatchReqBody
|
|
70
|
+
*/
|
|
71
|
+
project?: number;
|
|
72
|
+
/**
|
|
73
|
+
* The revision last read; a different current revision is rejected with 409.
|
|
74
|
+
* @type {number}
|
|
75
|
+
* @memberof ScriptPatchReqBody
|
|
76
|
+
*/
|
|
77
|
+
revision: number;
|
|
78
|
+
/**
|
|
79
|
+
*
|
|
80
|
+
* @type {ScriptSchedule}
|
|
81
|
+
* @memberof ScriptPatchReqBody
|
|
82
|
+
*/
|
|
83
|
+
schedule?: ScriptSchedule;
|
|
84
|
+
/**
|
|
85
|
+
*
|
|
86
|
+
* @type {boolean}
|
|
87
|
+
* @memberof ScriptPatchReqBody
|
|
88
|
+
*/
|
|
89
|
+
webhook?: boolean;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* @export
|
|
95
|
+
*/
|
|
96
|
+
export const ScriptPatchReqBodyLanguageEnum = {
|
|
97
|
+
Python: 'python',
|
|
98
|
+
Go: 'go',
|
|
99
|
+
Javascript: 'javascript'
|
|
100
|
+
} as const;
|
|
101
|
+
export type ScriptPatchReqBodyLanguageEnum = typeof ScriptPatchReqBodyLanguageEnum[keyof typeof ScriptPatchReqBodyLanguageEnum];
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* Check if a given object implements the ScriptPatchReqBody interface.
|
|
106
|
+
*/
|
|
107
|
+
export function instanceOfScriptPatchReqBody(value: object): value is ScriptPatchReqBody {
|
|
108
|
+
if (!('revision' in value) || value['revision'] === undefined) return false;
|
|
109
|
+
return true;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
export function ScriptPatchReqBodyFromJSON(json: any): ScriptPatchReqBody {
|
|
113
|
+
return ScriptPatchReqBodyFromJSONTyped(json, false);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
export function ScriptPatchReqBodyFromJSONTyped(json: any, ignoreDiscriminator: boolean): ScriptPatchReqBody {
|
|
117
|
+
if (json == null) {
|
|
118
|
+
return json;
|
|
119
|
+
}
|
|
120
|
+
return {
|
|
121
|
+
|
|
122
|
+
'description': json['description'] == null ? undefined : json['description'],
|
|
123
|
+
'enabled': json['enabled'] == null ? undefined : json['enabled'],
|
|
124
|
+
'files': json['files'] == null ? undefined : json['files'],
|
|
125
|
+
'language': json['language'] == null ? undefined : json['language'],
|
|
126
|
+
'manifest': json['manifest'] == null ? undefined : json['manifest'],
|
|
127
|
+
'name': json['name'] == null ? undefined : json['name'],
|
|
128
|
+
'project': json['project'] == null ? undefined : json['project'],
|
|
129
|
+
'revision': json['revision'],
|
|
130
|
+
'schedule': json['schedule'] == null ? undefined : ScriptScheduleFromJSON(json['schedule']),
|
|
131
|
+
'webhook': json['webhook'] == null ? undefined : json['webhook'],
|
|
132
|
+
};
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
export function ScriptPatchReqBodyToJSON(json: any): ScriptPatchReqBody {
|
|
136
|
+
return ScriptPatchReqBodyToJSONTyped(json, false);
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
export function ScriptPatchReqBodyToJSONTyped(value?: ScriptPatchReqBody | null, ignoreDiscriminator: boolean = false): any {
|
|
140
|
+
if (value == null) {
|
|
141
|
+
return value;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
return {
|
|
145
|
+
|
|
146
|
+
'description': value['description'],
|
|
147
|
+
'enabled': value['enabled'],
|
|
148
|
+
'files': value['files'],
|
|
149
|
+
'language': value['language'],
|
|
150
|
+
'manifest': value['manifest'],
|
|
151
|
+
'name': value['name'],
|
|
152
|
+
'project': value['project'],
|
|
153
|
+
'revision': value['revision'],
|
|
154
|
+
'schedule': ScriptScheduleToJSON(value['schedule']),
|
|
155
|
+
'webhook': value['webhook'],
|
|
156
|
+
};
|
|
157
|
+
}
|
|
158
|
+
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* spaciv API
|
|
5
|
+
* The spaciv API powers workplace planning: modelling how many people an organisation has, how they work, and how much space that requires. ## Getting started 1. Exchange credentials for an access token using one of the operations under **Authentication**. 2. Send that token on every subsequent request as `Authorization: Bearer <token>`. 3. Access tokens are short lived. Call `POST /v1/auth/refresh-token` to obtain a new one before the old one expires. ## Conventions Every operation is versioned under `/v1`. Collections are plural (`GET /v1/dashboards` lists, `POST /v1/dashboards` creates) and individual records live beneath them (`/v1/dashboards/{id}`). Singular paths such as `/v1/account`, `/v1/project` and `/v1/user` refer to the record the access token was issued for. Request and response bodies are JSON. Timestamps are RFC 3339. Identifiers are opaque strings unless documented otherwise, and collection operations return the records visible to the account the token was issued for. Failures return an [RFC 9457](https://www.rfc-editor.org/rfc/rfc9457) problem document with a `detail` field describing what went wrong.
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0.0
|
|
8
|
+
* Contact: support@spaciv.com
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
import type { ScriptSchedule } from './ScriptSchedule';
|
|
17
|
+
import {
|
|
18
|
+
ScriptScheduleFromJSON,
|
|
19
|
+
ScriptScheduleFromJSONTyped,
|
|
20
|
+
ScriptScheduleToJSON,
|
|
21
|
+
ScriptScheduleToJSONTyped,
|
|
22
|
+
} from './ScriptSchedule';
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @export
|
|
27
|
+
* @interface ScriptPostReqBody
|
|
28
|
+
*/
|
|
29
|
+
export interface ScriptPostReqBody {
|
|
30
|
+
/**
|
|
31
|
+
*
|
|
32
|
+
* @type {string}
|
|
33
|
+
* @memberof ScriptPostReqBody
|
|
34
|
+
*/
|
|
35
|
+
description?: string;
|
|
36
|
+
/**
|
|
37
|
+
* Whether schedules and webhooks start runs.
|
|
38
|
+
* @type {boolean}
|
|
39
|
+
* @memberof ScriptPostReqBody
|
|
40
|
+
*/
|
|
41
|
+
enabled?: boolean;
|
|
42
|
+
/**
|
|
43
|
+
* 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.
|
|
44
|
+
* @type {{ [key: string]: string; }}
|
|
45
|
+
* @memberof ScriptPostReqBody
|
|
46
|
+
*/
|
|
47
|
+
files: { [key: string]: string; };
|
|
48
|
+
/**
|
|
49
|
+
*
|
|
50
|
+
* @type {string}
|
|
51
|
+
* @memberof ScriptPostReqBody
|
|
52
|
+
*/
|
|
53
|
+
language: ScriptPostReqBodyLanguageEnum;
|
|
54
|
+
/**
|
|
55
|
+
* Dependency manifest: requirements.txt for Python, go.mod for Go, package.json for JavaScript.
|
|
56
|
+
* @type {string}
|
|
57
|
+
* @memberof ScriptPostReqBody
|
|
58
|
+
*/
|
|
59
|
+
manifest?: string;
|
|
60
|
+
/**
|
|
61
|
+
*
|
|
62
|
+
* @type {string}
|
|
63
|
+
* @memberof ScriptPostReqBody
|
|
64
|
+
*/
|
|
65
|
+
name: string;
|
|
66
|
+
/**
|
|
67
|
+
* Optional project to scope the script's API key to, for example to update its dashboards. Omit for account-wide access.
|
|
68
|
+
* @type {number}
|
|
69
|
+
* @memberof ScriptPostReqBody
|
|
70
|
+
*/
|
|
71
|
+
project?: number;
|
|
72
|
+
/**
|
|
73
|
+
*
|
|
74
|
+
* @type {ScriptSchedule}
|
|
75
|
+
* @memberof ScriptPostReqBody
|
|
76
|
+
*/
|
|
77
|
+
schedule?: ScriptSchedule;
|
|
78
|
+
/**
|
|
79
|
+
* Secrets exposed to the script as environment variables. Names must be upper case and must not start with SPACIV_.
|
|
80
|
+
* @type {{ [key: string]: string; }}
|
|
81
|
+
* @memberof ScriptPostReqBody
|
|
82
|
+
*/
|
|
83
|
+
secrets?: { [key: string]: string; };
|
|
84
|
+
/**
|
|
85
|
+
* 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.
|
|
86
|
+
* @type {string}
|
|
87
|
+
* @memberof ScriptPostReqBody
|
|
88
|
+
*/
|
|
89
|
+
type?: ScriptPostReqBodyTypeEnum;
|
|
90
|
+
/**
|
|
91
|
+
* Whether the script can be triggered by an HTTP POST to its webhook URL.
|
|
92
|
+
* @type {boolean}
|
|
93
|
+
* @memberof ScriptPostReqBody
|
|
94
|
+
*/
|
|
95
|
+
webhook?: boolean;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* @export
|
|
101
|
+
*/
|
|
102
|
+
export const ScriptPostReqBodyLanguageEnum = {
|
|
103
|
+
Python: 'python',
|
|
104
|
+
Go: 'go',
|
|
105
|
+
Javascript: 'javascript'
|
|
106
|
+
} as const;
|
|
107
|
+
export type ScriptPostReqBodyLanguageEnum = typeof ScriptPostReqBodyLanguageEnum[keyof typeof ScriptPostReqBodyLanguageEnum];
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* @export
|
|
111
|
+
*/
|
|
112
|
+
export const ScriptPostReqBodyTypeEnum = {
|
|
113
|
+
Integration: 'integration'
|
|
114
|
+
} as const;
|
|
115
|
+
export type ScriptPostReqBodyTypeEnum = typeof ScriptPostReqBodyTypeEnum[keyof typeof ScriptPostReqBodyTypeEnum];
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* Check if a given object implements the ScriptPostReqBody interface.
|
|
120
|
+
*/
|
|
121
|
+
export function instanceOfScriptPostReqBody(value: object): value is ScriptPostReqBody {
|
|
122
|
+
if (!('files' in value) || value['files'] === undefined) return false;
|
|
123
|
+
if (!('language' in value) || value['language'] === undefined) return false;
|
|
124
|
+
if (!('name' in value) || value['name'] === undefined) return false;
|
|
125
|
+
return true;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
export function ScriptPostReqBodyFromJSON(json: any): ScriptPostReqBody {
|
|
129
|
+
return ScriptPostReqBodyFromJSONTyped(json, false);
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
export function ScriptPostReqBodyFromJSONTyped(json: any, ignoreDiscriminator: boolean): ScriptPostReqBody {
|
|
133
|
+
if (json == null) {
|
|
134
|
+
return json;
|
|
135
|
+
}
|
|
136
|
+
return {
|
|
137
|
+
|
|
138
|
+
'description': json['description'] == null ? undefined : json['description'],
|
|
139
|
+
'enabled': json['enabled'] == null ? undefined : json['enabled'],
|
|
140
|
+
'files': json['files'],
|
|
141
|
+
'language': json['language'],
|
|
142
|
+
'manifest': json['manifest'] == null ? undefined : json['manifest'],
|
|
143
|
+
'name': json['name'],
|
|
144
|
+
'project': json['project'] == null ? undefined : json['project'],
|
|
145
|
+
'schedule': json['schedule'] == null ? undefined : ScriptScheduleFromJSON(json['schedule']),
|
|
146
|
+
'secrets': json['secrets'] == null ? undefined : json['secrets'],
|
|
147
|
+
'type': json['type'] == null ? undefined : json['type'],
|
|
148
|
+
'webhook': json['webhook'] == null ? undefined : json['webhook'],
|
|
149
|
+
};
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
export function ScriptPostReqBodyToJSON(json: any): ScriptPostReqBody {
|
|
153
|
+
return ScriptPostReqBodyToJSONTyped(json, false);
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
export function ScriptPostReqBodyToJSONTyped(value?: ScriptPostReqBody | null, ignoreDiscriminator: boolean = false): any {
|
|
157
|
+
if (value == null) {
|
|
158
|
+
return value;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
return {
|
|
162
|
+
|
|
163
|
+
'description': value['description'],
|
|
164
|
+
'enabled': value['enabled'],
|
|
165
|
+
'files': value['files'],
|
|
166
|
+
'language': value['language'],
|
|
167
|
+
'manifest': value['manifest'],
|
|
168
|
+
'name': value['name'],
|
|
169
|
+
'project': value['project'],
|
|
170
|
+
'schedule': ScriptScheduleToJSON(value['schedule']),
|
|
171
|
+
'secrets': value['secrets'],
|
|
172
|
+
'type': value['type'],
|
|
173
|
+
'webhook': value['webhook'],
|
|
174
|
+
};
|
|
175
|
+
}
|
|
176
|
+
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* spaciv API
|
|
5
|
+
* The spaciv API powers workplace planning: modelling how many people an organisation has, how they work, and how much space that requires. ## Getting started 1. Exchange credentials for an access token using one of the operations under **Authentication**. 2. Send that token on every subsequent request as `Authorization: Bearer <token>`. 3. Access tokens are short lived. Call `POST /v1/auth/refresh-token` to obtain a new one before the old one expires. ## Conventions Every operation is versioned under `/v1`. Collections are plural (`GET /v1/dashboards` lists, `POST /v1/dashboards` creates) and individual records live beneath them (`/v1/dashboards/{id}`). Singular paths such as `/v1/account`, `/v1/project` and `/v1/user` refer to the record the access token was issued for. Request and response bodies are JSON. Timestamps are RFC 3339. Identifiers are opaque strings unless documented otherwise, and collection operations return the records visible to the account the token was issued for. Failures return an [RFC 9457](https://www.rfc-editor.org/rfc/rfc9457) problem document with a `detail` field describing what went wrong.
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0.0
|
|
8
|
+
* Contact: support@spaciv.com
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
* @export
|
|
19
|
+
* @interface ScriptRun
|
|
20
|
+
*/
|
|
21
|
+
export interface ScriptRun {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {number}
|
|
25
|
+
* @memberof ScriptRun
|
|
26
|
+
*/
|
|
27
|
+
durationMs?: number;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {Date}
|
|
31
|
+
* @memberof ScriptRun
|
|
32
|
+
*/
|
|
33
|
+
endedAt?: Date;
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @type {number}
|
|
37
|
+
* @memberof ScriptRun
|
|
38
|
+
*/
|
|
39
|
+
exitCode: number;
|
|
40
|
+
/**
|
|
41
|
+
*
|
|
42
|
+
* @type {string}
|
|
43
|
+
* @memberof ScriptRun
|
|
44
|
+
*/
|
|
45
|
+
id: string;
|
|
46
|
+
/**
|
|
47
|
+
* "build" for a dependency build, "run" for an execution.
|
|
48
|
+
* @type {string}
|
|
49
|
+
* @memberof ScriptRun
|
|
50
|
+
*/
|
|
51
|
+
kind: string;
|
|
52
|
+
/**
|
|
53
|
+
*
|
|
54
|
+
* @type {string}
|
|
55
|
+
* @memberof ScriptRun
|
|
56
|
+
*/
|
|
57
|
+
message?: string;
|
|
58
|
+
/**
|
|
59
|
+
*
|
|
60
|
+
* @type {Date}
|
|
61
|
+
* @memberof ScriptRun
|
|
62
|
+
*/
|
|
63
|
+
queuedAt?: Date;
|
|
64
|
+
/**
|
|
65
|
+
*
|
|
66
|
+
* @type {Date}
|
|
67
|
+
* @memberof ScriptRun
|
|
68
|
+
*/
|
|
69
|
+
startedAt?: Date;
|
|
70
|
+
/**
|
|
71
|
+
*
|
|
72
|
+
* @type {string}
|
|
73
|
+
* @memberof ScriptRun
|
|
74
|
+
*/
|
|
75
|
+
status: string;
|
|
76
|
+
/**
|
|
77
|
+
*
|
|
78
|
+
* @type {string}
|
|
79
|
+
* @memberof ScriptRun
|
|
80
|
+
*/
|
|
81
|
+
trigger: string;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* Check if a given object implements the ScriptRun interface.
|
|
86
|
+
*/
|
|
87
|
+
export function instanceOfScriptRun(value: object): value is ScriptRun {
|
|
88
|
+
if (!('exitCode' in value) || value['exitCode'] === undefined) return false;
|
|
89
|
+
if (!('id' in value) || value['id'] === undefined) return false;
|
|
90
|
+
if (!('kind' in value) || value['kind'] === undefined) return false;
|
|
91
|
+
if (!('status' in value) || value['status'] === undefined) return false;
|
|
92
|
+
if (!('trigger' in value) || value['trigger'] === undefined) return false;
|
|
93
|
+
return true;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
export function ScriptRunFromJSON(json: any): ScriptRun {
|
|
97
|
+
return ScriptRunFromJSONTyped(json, false);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
export function ScriptRunFromJSONTyped(json: any, ignoreDiscriminator: boolean): ScriptRun {
|
|
101
|
+
if (json == null) {
|
|
102
|
+
return json;
|
|
103
|
+
}
|
|
104
|
+
return {
|
|
105
|
+
|
|
106
|
+
'durationMs': json['durationMs'] == null ? undefined : json['durationMs'],
|
|
107
|
+
'endedAt': json['endedAt'] == null ? undefined : (new Date(json['endedAt'])),
|
|
108
|
+
'exitCode': json['exitCode'],
|
|
109
|
+
'id': json['id'],
|
|
110
|
+
'kind': json['kind'],
|
|
111
|
+
'message': json['message'] == null ? undefined : json['message'],
|
|
112
|
+
'queuedAt': json['queuedAt'] == null ? undefined : (new Date(json['queuedAt'])),
|
|
113
|
+
'startedAt': json['startedAt'] == null ? undefined : (new Date(json['startedAt'])),
|
|
114
|
+
'status': json['status'],
|
|
115
|
+
'trigger': json['trigger'],
|
|
116
|
+
};
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
export function ScriptRunToJSON(json: any): ScriptRun {
|
|
120
|
+
return ScriptRunToJSONTyped(json, false);
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
export function ScriptRunToJSONTyped(value?: ScriptRun | null, ignoreDiscriminator: boolean = false): any {
|
|
124
|
+
if (value == null) {
|
|
125
|
+
return value;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
return {
|
|
129
|
+
|
|
130
|
+
'durationMs': value['durationMs'],
|
|
131
|
+
'endedAt': value['endedAt'] == null ? undefined : ((value['endedAt']).toISOString()),
|
|
132
|
+
'exitCode': value['exitCode'],
|
|
133
|
+
'id': value['id'],
|
|
134
|
+
'kind': value['kind'],
|
|
135
|
+
'message': value['message'],
|
|
136
|
+
'queuedAt': value['queuedAt'] == null ? undefined : ((value['queuedAt']).toISOString()),
|
|
137
|
+
'startedAt': value['startedAt'] == null ? undefined : ((value['startedAt']).toISOString()),
|
|
138
|
+
'status': value['status'],
|
|
139
|
+
'trigger': value['trigger'],
|
|
140
|
+
};
|
|
141
|
+
}
|
|
142
|
+
|