@spaciv/sdk 0.1.0 → 0.1.2

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.
Files changed (171) hide show
  1. package/.openapi-generator/FILES +26 -0
  2. package/README.md +2 -2
  3. package/dist/apis/AccountsApi.d.ts +24 -24
  4. package/dist/apis/AccountsApi.js +12 -12
  5. package/dist/apis/AssistantApi.d.ts +28 -1
  6. package/dist/apis/AssistantApi.js +39 -0
  7. package/dist/apis/AuditLogApi.d.ts +1 -1
  8. package/dist/apis/AuthenticationApi.d.ts +8 -8
  9. package/dist/apis/AuthenticationApi.js +4 -4
  10. package/dist/apis/ScriptsApi.d.ts +383 -0
  11. package/dist/apis/ScriptsApi.js +559 -0
  12. package/dist/apis/UsersApi.d.ts +4 -4
  13. package/dist/apis/UsersApi.js +2 -2
  14. package/dist/apis/index.d.ts +1 -0
  15. package/dist/apis/index.js +1 -0
  16. package/dist/esm/apis/AccountsApi.d.ts +24 -24
  17. package/dist/esm/apis/AccountsApi.js +12 -12
  18. package/dist/esm/apis/AssistantApi.d.ts +28 -1
  19. package/dist/esm/apis/AssistantApi.js +40 -1
  20. package/dist/esm/apis/AuditLogApi.d.ts +1 -1
  21. package/dist/esm/apis/AuthenticationApi.d.ts +8 -8
  22. package/dist/esm/apis/AuthenticationApi.js +4 -4
  23. package/dist/esm/apis/ScriptsApi.d.ts +383 -0
  24. package/dist/esm/apis/ScriptsApi.js +555 -0
  25. package/dist/esm/apis/UsersApi.d.ts +4 -4
  26. package/dist/esm/apis/UsersApi.js +2 -2
  27. package/dist/esm/apis/index.d.ts +1 -0
  28. package/dist/esm/apis/index.js +1 -0
  29. package/dist/esm/models/APIKey.d.ts +6 -0
  30. package/dist/esm/models/APIKey.js +2 -0
  31. package/dist/esm/models/AssistantTranscriptBody.d.ts +45 -0
  32. package/dist/esm/models/AssistantTranscriptBody.js +52 -0
  33. package/dist/esm/models/AssistantTranscriptMessage.d.ts +98 -0
  34. package/dist/esm/models/AssistantTranscriptMessage.js +90 -0
  35. package/dist/esm/models/AssistantTranscriptToolCall.d.ts +44 -0
  36. package/dist/esm/models/AssistantTranscriptToolCall.js +51 -0
  37. package/dist/esm/models/ScriptAuditEntry.d.ts +67 -0
  38. package/dist/esm/models/ScriptAuditEntry.js +63 -0
  39. package/dist/esm/models/ScriptAuditResBody.d.ts +39 -0
  40. package/dist/esm/models/ScriptAuditResBody.js +46 -0
  41. package/dist/esm/models/ScriptDetail.d.ts +161 -0
  42. package/dist/esm/models/ScriptDetail.js +122 -0
  43. package/dist/esm/models/ScriptExport.d.ts +174 -0
  44. package/dist/esm/models/ScriptExport.js +129 -0
  45. package/dist/esm/models/ScriptExportResBody.d.ts +39 -0
  46. package/dist/esm/models/ScriptExportResBody.js +48 -0
  47. package/dist/esm/models/ScriptExportRun.d.ts +92 -0
  48. package/dist/esm/models/ScriptExportRun.js +73 -0
  49. package/dist/esm/models/ScriptKey.d.ts +64 -0
  50. package/dist/esm/models/ScriptKey.js +58 -0
  51. package/dist/esm/models/ScriptListResBody.d.ts +33 -0
  52. package/dist/esm/models/ScriptListResBody.js +44 -0
  53. package/dist/esm/models/ScriptLogLine.d.ts +38 -0
  54. package/dist/esm/models/ScriptLogLine.js +47 -0
  55. package/dist/esm/models/ScriptPatchReqBody.d.ts +98 -0
  56. package/dist/esm/models/ScriptPatchReqBody.js +70 -0
  57. package/dist/esm/models/ScriptPostReqBody.d.ts +113 -0
  58. package/dist/esm/models/ScriptPostReqBody.js +82 -0
  59. package/dist/esm/models/ScriptRun.d.ts +86 -0
  60. package/dist/esm/models/ScriptRun.js +69 -0
  61. package/dist/esm/models/ScriptRunLogsResBody.d.ts +39 -0
  62. package/dist/esm/models/ScriptRunLogsResBody.js +48 -0
  63. package/dist/esm/models/ScriptRunsResBody.d.ts +39 -0
  64. package/dist/esm/models/ScriptRunsResBody.js +46 -0
  65. package/dist/esm/models/ScriptRuntime.d.ts +62 -0
  66. package/dist/esm/models/ScriptRuntime.js +51 -0
  67. package/dist/esm/models/ScriptSchedule.d.ts +38 -0
  68. package/dist/esm/models/ScriptSchedule.js +43 -0
  69. package/dist/esm/models/ScriptSchedulePreviewReqBody.d.ts +44 -0
  70. package/dist/esm/models/ScriptSchedulePreviewReqBody.js +45 -0
  71. package/dist/esm/models/ScriptSchedulePreviewResBody.d.ts +44 -0
  72. package/dist/esm/models/ScriptSchedulePreviewResBody.js +49 -0
  73. package/dist/esm/models/ScriptSecretsReqBody.d.ts +40 -0
  74. package/dist/esm/models/ScriptSecretsReqBody.js +43 -0
  75. package/dist/esm/models/ScriptSecretsResBody.d.ts +134 -0
  76. package/dist/esm/models/ScriptSecretsResBody.js +111 -0
  77. package/dist/esm/models/ScriptSummary.d.ts +128 -0
  78. package/dist/esm/models/ScriptSummary.js +107 -0
  79. package/dist/esm/models/ScriptWebhookResBody.d.ts +32 -0
  80. package/dist/esm/models/ScriptWebhookResBody.js +43 -0
  81. package/dist/esm/models/index.d.ts +25 -0
  82. package/dist/esm/models/index.js +25 -0
  83. package/dist/models/APIKey.d.ts +6 -0
  84. package/dist/models/APIKey.js +2 -0
  85. package/dist/models/AssistantTranscriptBody.d.ts +45 -0
  86. package/dist/models/AssistantTranscriptBody.js +59 -0
  87. package/dist/models/AssistantTranscriptMessage.d.ts +98 -0
  88. package/dist/models/AssistantTranscriptMessage.js +98 -0
  89. package/dist/models/AssistantTranscriptToolCall.d.ts +44 -0
  90. package/dist/models/AssistantTranscriptToolCall.js +58 -0
  91. package/dist/models/ScriptAuditEntry.d.ts +67 -0
  92. package/dist/models/ScriptAuditEntry.js +71 -0
  93. package/dist/models/ScriptAuditResBody.d.ts +39 -0
  94. package/dist/models/ScriptAuditResBody.js +53 -0
  95. package/dist/models/ScriptDetail.d.ts +161 -0
  96. package/dist/models/ScriptDetail.js +130 -0
  97. package/dist/models/ScriptExport.d.ts +174 -0
  98. package/dist/models/ScriptExport.js +137 -0
  99. package/dist/models/ScriptExportResBody.d.ts +39 -0
  100. package/dist/models/ScriptExportResBody.js +55 -0
  101. package/dist/models/ScriptExportRun.d.ts +92 -0
  102. package/dist/models/ScriptExportRun.js +80 -0
  103. package/dist/models/ScriptKey.d.ts +64 -0
  104. package/dist/models/ScriptKey.js +66 -0
  105. package/dist/models/ScriptListResBody.d.ts +33 -0
  106. package/dist/models/ScriptListResBody.js +51 -0
  107. package/dist/models/ScriptLogLine.d.ts +38 -0
  108. package/dist/models/ScriptLogLine.js +54 -0
  109. package/dist/models/ScriptPatchReqBody.d.ts +98 -0
  110. package/dist/models/ScriptPatchReqBody.js +78 -0
  111. package/dist/models/ScriptPostReqBody.d.ts +113 -0
  112. package/dist/models/ScriptPostReqBody.js +90 -0
  113. package/dist/models/ScriptRun.d.ts +86 -0
  114. package/dist/models/ScriptRun.js +76 -0
  115. package/dist/models/ScriptRunLogsResBody.d.ts +39 -0
  116. package/dist/models/ScriptRunLogsResBody.js +55 -0
  117. package/dist/models/ScriptRunsResBody.d.ts +39 -0
  118. package/dist/models/ScriptRunsResBody.js +53 -0
  119. package/dist/models/ScriptRuntime.d.ts +62 -0
  120. package/dist/models/ScriptRuntime.js +58 -0
  121. package/dist/models/ScriptSchedule.d.ts +38 -0
  122. package/dist/models/ScriptSchedule.js +50 -0
  123. package/dist/models/ScriptSchedulePreviewReqBody.d.ts +44 -0
  124. package/dist/models/ScriptSchedulePreviewReqBody.js +52 -0
  125. package/dist/models/ScriptSchedulePreviewResBody.d.ts +44 -0
  126. package/dist/models/ScriptSchedulePreviewResBody.js +56 -0
  127. package/dist/models/ScriptSecretsReqBody.d.ts +40 -0
  128. package/dist/models/ScriptSecretsReqBody.js +50 -0
  129. package/dist/models/ScriptSecretsResBody.d.ts +134 -0
  130. package/dist/models/ScriptSecretsResBody.js +119 -0
  131. package/dist/models/ScriptSummary.d.ts +128 -0
  132. package/dist/models/ScriptSummary.js +115 -0
  133. package/dist/models/ScriptWebhookResBody.d.ts +32 -0
  134. package/dist/models/ScriptWebhookResBody.js +50 -0
  135. package/dist/models/index.d.ts +25 -0
  136. package/dist/models/index.js +25 -0
  137. package/package.json +1 -1
  138. package/src/apis/AccountsApi.ts +24 -24
  139. package/src/apis/AssistantApi.ts +70 -0
  140. package/src/apis/AuditLogApi.ts +1 -1
  141. package/src/apis/AuthenticationApi.ts +8 -8
  142. package/src/apis/ScriptsApi.ts +984 -0
  143. package/src/apis/UsersApi.ts +4 -4
  144. package/src/apis/index.ts +1 -0
  145. package/src/models/APIKey.ts +8 -0
  146. package/src/models/AssistantTranscriptBody.ts +92 -0
  147. package/src/models/AssistantTranscriptMessage.ts +175 -0
  148. package/src/models/AssistantTranscriptToolCall.ts +84 -0
  149. package/src/models/ScriptAuditEntry.ts +112 -0
  150. package/src/models/ScriptAuditResBody.ts +82 -0
  151. package/src/models/ScriptDetail.ts +265 -0
  152. package/src/models/ScriptExport.ts +289 -0
  153. package/src/models/ScriptExportResBody.ts +83 -0
  154. package/src/models/ScriptExportRun.ts +151 -0
  155. package/src/models/ScriptKey.ts +109 -0
  156. package/src/models/ScriptListResBody.ts +74 -0
  157. package/src/models/ScriptLogLine.ts +75 -0
  158. package/src/models/ScriptPatchReqBody.ts +158 -0
  159. package/src/models/ScriptPostReqBody.ts +176 -0
  160. package/src/models/ScriptRun.ts +142 -0
  161. package/src/models/ScriptRunLogsResBody.ts +83 -0
  162. package/src/models/ScriptRunsResBody.ts +82 -0
  163. package/src/models/ScriptRuntime.ts +105 -0
  164. package/src/models/ScriptSchedule.ts +73 -0
  165. package/src/models/ScriptSchedulePreviewReqBody.ts +81 -0
  166. package/src/models/ScriptSchedulePreviewResBody.ts +83 -0
  167. package/src/models/ScriptSecretsReqBody.ts +73 -0
  168. package/src/models/ScriptSecretsResBody.ts +225 -0
  169. package/src/models/ScriptSummary.ts +216 -0
  170. package/src/models/ScriptWebhookResBody.ts +66 -0
  171. package/src/models/index.ts +25 -0
@@ -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,82 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * spaciv API
5
+ * The spaciv API powers workplace planning: modelling how many people an organisation has, how they work, and how much space that requires. ## Getting started 1. Exchange credentials for an access token using one of the operations under **Authentication**. 2. Send that token on every subsequent request as `Authorization: Bearer <token>`. 3. Access tokens are short lived. Call `POST /v1/auth/refresh-token` to obtain a new one before the old one expires. ## Conventions Every operation is versioned under `/v1`. Collections are plural (`GET /v1/dashboards` lists, `POST /v1/dashboards` creates) and individual records live beneath them (`/v1/dashboards/{id}`). Singular paths such as `/v1/account`, `/v1/project` and `/v1/user` refer to the record the access token was issued for. Request and response bodies are JSON. Timestamps are RFC 3339. Identifiers are opaque strings unless documented otherwise, and collection operations return the records visible to the account the token was issued for. Failures return an [RFC 9457](https://www.rfc-editor.org/rfc/rfc9457) problem document with a `detail` field describing what went wrong.
6
+ *
7
+ * The version of the OpenAPI document: 1.0.0
8
+ * Contact: support@spaciv.com
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+ import { ScriptScheduleFromJSON, ScriptScheduleToJSON, } from './ScriptSchedule';
15
+ /**
16
+ * @export
17
+ */
18
+ export const ScriptPostReqBodyLanguageEnum = {
19
+ Python: 'python',
20
+ Go: 'go',
21
+ Javascript: 'javascript'
22
+ };
23
+ /**
24
+ * @export
25
+ */
26
+ export const ScriptPostReqBodyTypeEnum = {
27
+ Integration: 'integration'
28
+ };
29
+ /**
30
+ * Check if a given object implements the ScriptPostReqBody interface.
31
+ */
32
+ export function instanceOfScriptPostReqBody(value) {
33
+ if (!('files' in value) || value['files'] === undefined)
34
+ return false;
35
+ if (!('language' in value) || value['language'] === undefined)
36
+ return false;
37
+ if (!('name' in value) || value['name'] === undefined)
38
+ return false;
39
+ return true;
40
+ }
41
+ export function ScriptPostReqBodyFromJSON(json) {
42
+ return ScriptPostReqBodyFromJSONTyped(json, false);
43
+ }
44
+ export function ScriptPostReqBodyFromJSONTyped(json, ignoreDiscriminator) {
45
+ if (json == null) {
46
+ return json;
47
+ }
48
+ return {
49
+ 'description': json['description'] == null ? undefined : json['description'],
50
+ 'enabled': json['enabled'] == null ? undefined : json['enabled'],
51
+ 'files': json['files'],
52
+ 'language': json['language'],
53
+ 'manifest': json['manifest'] == null ? undefined : json['manifest'],
54
+ 'name': json['name'],
55
+ 'project': json['project'] == null ? undefined : json['project'],
56
+ 'schedule': json['schedule'] == null ? undefined : ScriptScheduleFromJSON(json['schedule']),
57
+ 'secrets': json['secrets'] == null ? undefined : json['secrets'],
58
+ 'type': json['type'] == null ? undefined : json['type'],
59
+ 'webhook': json['webhook'] == null ? undefined : json['webhook'],
60
+ };
61
+ }
62
+ export function ScriptPostReqBodyToJSON(json) {
63
+ return ScriptPostReqBodyToJSONTyped(json, false);
64
+ }
65
+ export function ScriptPostReqBodyToJSONTyped(value, ignoreDiscriminator = false) {
66
+ if (value == null) {
67
+ return value;
68
+ }
69
+ return {
70
+ 'description': value['description'],
71
+ 'enabled': value['enabled'],
72
+ 'files': value['files'],
73
+ 'language': value['language'],
74
+ 'manifest': value['manifest'],
75
+ 'name': value['name'],
76
+ 'project': value['project'],
77
+ 'schedule': ScriptScheduleToJSON(value['schedule']),
78
+ 'secrets': value['secrets'],
79
+ 'type': value['type'],
80
+ 'webhook': value['webhook'],
81
+ };
82
+ }
@@ -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,69 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * spaciv API
5
+ * The spaciv API powers workplace planning: modelling how many people an organisation has, how they work, and how much space that requires. ## Getting started 1. Exchange credentials for an access token using one of the operations under **Authentication**. 2. Send that token on every subsequent request as `Authorization: Bearer <token>`. 3. Access tokens are short lived. Call `POST /v1/auth/refresh-token` to obtain a new one before the old one expires. ## Conventions Every operation is versioned under `/v1`. Collections are plural (`GET /v1/dashboards` lists, `POST /v1/dashboards` creates) and individual records live beneath them (`/v1/dashboards/{id}`). Singular paths such as `/v1/account`, `/v1/project` and `/v1/user` refer to the record the access token was issued for. Request and response bodies are JSON. Timestamps are RFC 3339. Identifiers are opaque strings unless documented otherwise, and collection operations return the records visible to the account the token was issued for. Failures return an [RFC 9457](https://www.rfc-editor.org/rfc/rfc9457) problem document with a `detail` field describing what went wrong.
6
+ *
7
+ * The version of the OpenAPI document: 1.0.0
8
+ * Contact: support@spaciv.com
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+ /**
15
+ * Check if a given object implements the ScriptRun interface.
16
+ */
17
+ export function instanceOfScriptRun(value) {
18
+ if (!('exitCode' in value) || value['exitCode'] === undefined)
19
+ return false;
20
+ if (!('id' in value) || value['id'] === undefined)
21
+ return false;
22
+ if (!('kind' in value) || value['kind'] === undefined)
23
+ return false;
24
+ if (!('status' in value) || value['status'] === undefined)
25
+ return false;
26
+ if (!('trigger' in value) || value['trigger'] === undefined)
27
+ return false;
28
+ return true;
29
+ }
30
+ export function ScriptRunFromJSON(json) {
31
+ return ScriptRunFromJSONTyped(json, false);
32
+ }
33
+ export function ScriptRunFromJSONTyped(json, ignoreDiscriminator) {
34
+ if (json == null) {
35
+ return json;
36
+ }
37
+ return {
38
+ 'durationMs': json['durationMs'] == null ? undefined : json['durationMs'],
39
+ 'endedAt': json['endedAt'] == null ? undefined : (new Date(json['endedAt'])),
40
+ 'exitCode': json['exitCode'],
41
+ 'id': json['id'],
42
+ 'kind': json['kind'],
43
+ 'message': json['message'] == null ? undefined : json['message'],
44
+ 'queuedAt': json['queuedAt'] == null ? undefined : (new Date(json['queuedAt'])),
45
+ 'startedAt': json['startedAt'] == null ? undefined : (new Date(json['startedAt'])),
46
+ 'status': json['status'],
47
+ 'trigger': json['trigger'],
48
+ };
49
+ }
50
+ export function ScriptRunToJSON(json) {
51
+ return ScriptRunToJSONTyped(json, false);
52
+ }
53
+ export function ScriptRunToJSONTyped(value, ignoreDiscriminator = false) {
54
+ if (value == null) {
55
+ return value;
56
+ }
57
+ return {
58
+ 'durationMs': value['durationMs'],
59
+ 'endedAt': value['endedAt'] == null ? undefined : ((value['endedAt']).toISOString()),
60
+ 'exitCode': value['exitCode'],
61
+ 'id': value['id'],
62
+ 'kind': value['kind'],
63
+ 'message': value['message'],
64
+ 'queuedAt': value['queuedAt'] == null ? undefined : ((value['queuedAt']).toISOString()),
65
+ 'startedAt': value['startedAt'] == null ? undefined : ((value['startedAt']).toISOString()),
66
+ 'status': value['status'],
67
+ 'trigger': value['trigger'],
68
+ };
69
+ }
@@ -0,0 +1,39 @@
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 { ScriptLogLine } from './ScriptLogLine';
13
+ /**
14
+ *
15
+ * @export
16
+ * @interface ScriptRunLogsResBody
17
+ */
18
+ export interface ScriptRunLogsResBody {
19
+ /**
20
+ *
21
+ * @type {Array<ScriptLogLine>}
22
+ * @memberof ScriptRunLogsResBody
23
+ */
24
+ lines: Array<ScriptLogLine>;
25
+ /**
26
+ * Set when the run wrote more output than is kept, so some of it is missing.
27
+ * @type {boolean}
28
+ * @memberof ScriptRunLogsResBody
29
+ */
30
+ truncated: boolean;
31
+ }
32
+ /**
33
+ * Check if a given object implements the ScriptRunLogsResBody interface.
34
+ */
35
+ export declare function instanceOfScriptRunLogsResBody(value: object): value is ScriptRunLogsResBody;
36
+ export declare function ScriptRunLogsResBodyFromJSON(json: any): ScriptRunLogsResBody;
37
+ export declare function ScriptRunLogsResBodyFromJSONTyped(json: any, ignoreDiscriminator: boolean): ScriptRunLogsResBody;
38
+ export declare function ScriptRunLogsResBodyToJSON(json: any): ScriptRunLogsResBody;
39
+ export declare function ScriptRunLogsResBodyToJSONTyped(value?: ScriptRunLogsResBody | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,48 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * spaciv API
5
+ * The spaciv API powers workplace planning: modelling how many people an organisation has, how they work, and how much space that requires. ## Getting started 1. Exchange credentials for an access token using one of the operations under **Authentication**. 2. Send that token on every subsequent request as `Authorization: Bearer <token>`. 3. Access tokens are short lived. Call `POST /v1/auth/refresh-token` to obtain a new one before the old one expires. ## Conventions Every operation is versioned under `/v1`. Collections are plural (`GET /v1/dashboards` lists, `POST /v1/dashboards` creates) and individual records live beneath them (`/v1/dashboards/{id}`). Singular paths such as `/v1/account`, `/v1/project` and `/v1/user` refer to the record the access token was issued for. Request and response bodies are JSON. Timestamps are RFC 3339. Identifiers are opaque strings unless documented otherwise, and collection operations return the records visible to the account the token was issued for. Failures return an [RFC 9457](https://www.rfc-editor.org/rfc/rfc9457) problem document with a `detail` field describing what went wrong.
6
+ *
7
+ * The version of the OpenAPI document: 1.0.0
8
+ * Contact: support@spaciv.com
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+ import { ScriptLogLineFromJSON, ScriptLogLineToJSON, } from './ScriptLogLine';
15
+ /**
16
+ * Check if a given object implements the ScriptRunLogsResBody interface.
17
+ */
18
+ export function instanceOfScriptRunLogsResBody(value) {
19
+ if (!('lines' in value) || value['lines'] === undefined)
20
+ return false;
21
+ if (!('truncated' in value) || value['truncated'] === undefined)
22
+ return false;
23
+ return true;
24
+ }
25
+ export function ScriptRunLogsResBodyFromJSON(json) {
26
+ return ScriptRunLogsResBodyFromJSONTyped(json, false);
27
+ }
28
+ export function ScriptRunLogsResBodyFromJSONTyped(json, ignoreDiscriminator) {
29
+ if (json == null) {
30
+ return json;
31
+ }
32
+ return {
33
+ 'lines': (json['lines'].map(ScriptLogLineFromJSON)),
34
+ 'truncated': json['truncated'],
35
+ };
36
+ }
37
+ export function ScriptRunLogsResBodyToJSON(json) {
38
+ return ScriptRunLogsResBodyToJSONTyped(json, false);
39
+ }
40
+ export function ScriptRunLogsResBodyToJSONTyped(value, ignoreDiscriminator = false) {
41
+ if (value == null) {
42
+ return value;
43
+ }
44
+ return {
45
+ 'lines': (value['lines'].map(ScriptLogLineToJSON)),
46
+ 'truncated': value['truncated'],
47
+ };
48
+ }
@@ -0,0 +1,39 @@
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 { ScriptRun } from './ScriptRun';
13
+ /**
14
+ *
15
+ * @export
16
+ * @interface ScriptRunsResBody
17
+ */
18
+ export interface ScriptRunsResBody {
19
+ /**
20
+ *
21
+ * @type {string}
22
+ * @memberof ScriptRunsResBody
23
+ */
24
+ nextCursor?: string;
25
+ /**
26
+ *
27
+ * @type {Array<ScriptRun>}
28
+ * @memberof ScriptRunsResBody
29
+ */
30
+ runs: Array<ScriptRun>;
31
+ }
32
+ /**
33
+ * Check if a given object implements the ScriptRunsResBody interface.
34
+ */
35
+ export declare function instanceOfScriptRunsResBody(value: object): value is ScriptRunsResBody;
36
+ export declare function ScriptRunsResBodyFromJSON(json: any): ScriptRunsResBody;
37
+ export declare function ScriptRunsResBodyFromJSONTyped(json: any, ignoreDiscriminator: boolean): ScriptRunsResBody;
38
+ export declare function ScriptRunsResBodyToJSON(json: any): ScriptRunsResBody;
39
+ export declare function ScriptRunsResBodyToJSONTyped(value?: ScriptRunsResBody | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,46 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * spaciv API
5
+ * The spaciv API powers workplace planning: modelling how many people an organisation has, how they work, and how much space that requires. ## Getting started 1. Exchange credentials for an access token using one of the operations under **Authentication**. 2. Send that token on every subsequent request as `Authorization: Bearer <token>`. 3. Access tokens are short lived. Call `POST /v1/auth/refresh-token` to obtain a new one before the old one expires. ## Conventions Every operation is versioned under `/v1`. Collections are plural (`GET /v1/dashboards` lists, `POST /v1/dashboards` creates) and individual records live beneath them (`/v1/dashboards/{id}`). Singular paths such as `/v1/account`, `/v1/project` and `/v1/user` refer to the record the access token was issued for. Request and response bodies are JSON. Timestamps are RFC 3339. Identifiers are opaque strings unless documented otherwise, and collection operations return the records visible to the account the token was issued for. Failures return an [RFC 9457](https://www.rfc-editor.org/rfc/rfc9457) problem document with a `detail` field describing what went wrong.
6
+ *
7
+ * The version of the OpenAPI document: 1.0.0
8
+ * Contact: support@spaciv.com
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+ import { ScriptRunFromJSON, ScriptRunToJSON, } from './ScriptRun';
15
+ /**
16
+ * Check if a given object implements the ScriptRunsResBody interface.
17
+ */
18
+ export function instanceOfScriptRunsResBody(value) {
19
+ if (!('runs' in value) || value['runs'] === undefined)
20
+ return false;
21
+ return true;
22
+ }
23
+ export function ScriptRunsResBodyFromJSON(json) {
24
+ return ScriptRunsResBodyFromJSONTyped(json, false);
25
+ }
26
+ export function ScriptRunsResBodyFromJSONTyped(json, ignoreDiscriminator) {
27
+ if (json == null) {
28
+ return json;
29
+ }
30
+ return {
31
+ 'nextCursor': json['nextCursor'] == null ? undefined : json['nextCursor'],
32
+ 'runs': (json['runs'].map(ScriptRunFromJSON)),
33
+ };
34
+ }
35
+ export function ScriptRunsResBodyToJSON(json) {
36
+ return ScriptRunsResBodyToJSONTyped(json, false);
37
+ }
38
+ export function ScriptRunsResBodyToJSONTyped(value, ignoreDiscriminator = false) {
39
+ if (value == null) {
40
+ return value;
41
+ }
42
+ return {
43
+ 'nextCursor': value['nextCursor'],
44
+ 'runs': (value['runs'].map(ScriptRunToJSON)),
45
+ };
46
+ }
@@ -0,0 +1,62 @@
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 ScriptRuntime
16
+ */
17
+ export interface ScriptRuntime {
18
+ /**
19
+ *
20
+ * @type {string}
21
+ * @memberof ScriptRuntime
22
+ */
23
+ buildRunId?: string;
24
+ /**
25
+ * State of the latest dependency build.
26
+ * @type {string}
27
+ * @memberof ScriptRuntime
28
+ */
29
+ buildState?: string;
30
+ /**
31
+ * vCPU units per run (1024 = 1 vCPU).
32
+ * @type {number}
33
+ * @memberof ScriptRuntime
34
+ */
35
+ cpu?: number;
36
+ /**
37
+ *
38
+ * @type {number}
39
+ * @memberof ScriptRuntime
40
+ */
41
+ memoryMb?: number;
42
+ /**
43
+ *
44
+ * @type {Date}
45
+ * @memberof ScriptRuntime
46
+ */
47
+ nextRunAt?: Date;
48
+ /**
49
+ *
50
+ * @type {number}
51
+ * @memberof ScriptRuntime
52
+ */
53
+ timeoutSeconds?: number;
54
+ }
55
+ /**
56
+ * Check if a given object implements the ScriptRuntime interface.
57
+ */
58
+ export declare function instanceOfScriptRuntime(value: object): value is ScriptRuntime;
59
+ export declare function ScriptRuntimeFromJSON(json: any): ScriptRuntime;
60
+ export declare function ScriptRuntimeFromJSONTyped(json: any, ignoreDiscriminator: boolean): ScriptRuntime;
61
+ export declare function ScriptRuntimeToJSON(json: any): ScriptRuntime;
62
+ export declare function ScriptRuntimeToJSONTyped(value?: ScriptRuntime | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,51 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * spaciv API
5
+ * The spaciv API powers workplace planning: modelling how many people an organisation has, how they work, and how much space that requires. ## Getting started 1. Exchange credentials for an access token using one of the operations under **Authentication**. 2. Send that token on every subsequent request as `Authorization: Bearer <token>`. 3. Access tokens are short lived. Call `POST /v1/auth/refresh-token` to obtain a new one before the old one expires. ## Conventions Every operation is versioned under `/v1`. Collections are plural (`GET /v1/dashboards` lists, `POST /v1/dashboards` creates) and individual records live beneath them (`/v1/dashboards/{id}`). Singular paths such as `/v1/account`, `/v1/project` and `/v1/user` refer to the record the access token was issued for. Request and response bodies are JSON. Timestamps are RFC 3339. Identifiers are opaque strings unless documented otherwise, and collection operations return the records visible to the account the token was issued for. Failures return an [RFC 9457](https://www.rfc-editor.org/rfc/rfc9457) problem document with a `detail` field describing what went wrong.
6
+ *
7
+ * The version of the OpenAPI document: 1.0.0
8
+ * Contact: support@spaciv.com
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+ /**
15
+ * Check if a given object implements the ScriptRuntime interface.
16
+ */
17
+ export function instanceOfScriptRuntime(value) {
18
+ return true;
19
+ }
20
+ export function ScriptRuntimeFromJSON(json) {
21
+ return ScriptRuntimeFromJSONTyped(json, false);
22
+ }
23
+ export function ScriptRuntimeFromJSONTyped(json, ignoreDiscriminator) {
24
+ if (json == null) {
25
+ return json;
26
+ }
27
+ return {
28
+ 'buildRunId': json['buildRunId'] == null ? undefined : json['buildRunId'],
29
+ 'buildState': json['buildState'] == null ? undefined : json['buildState'],
30
+ 'cpu': json['cpu'] == null ? undefined : json['cpu'],
31
+ 'memoryMb': json['memoryMb'] == null ? undefined : json['memoryMb'],
32
+ 'nextRunAt': json['nextRunAt'] == null ? undefined : (new Date(json['nextRunAt'])),
33
+ 'timeoutSeconds': json['timeoutSeconds'] == null ? undefined : json['timeoutSeconds'],
34
+ };
35
+ }
36
+ export function ScriptRuntimeToJSON(json) {
37
+ return ScriptRuntimeToJSONTyped(json, false);
38
+ }
39
+ export function ScriptRuntimeToJSONTyped(value, ignoreDiscriminator = false) {
40
+ if (value == null) {
41
+ return value;
42
+ }
43
+ return {
44
+ 'buildRunId': value['buildRunId'],
45
+ 'buildState': value['buildState'],
46
+ 'cpu': value['cpu'],
47
+ 'memoryMb': value['memoryMb'],
48
+ 'nextRunAt': value['nextRunAt'] == null ? undefined : ((value['nextRunAt']).toISOString()),
49
+ 'timeoutSeconds': value['timeoutSeconds'],
50
+ };
51
+ }