@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.
Files changed (191) hide show
  1. package/.openapi-generator/FILES +25 -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/AuditLogApi.d.ts +1 -1
  6. package/dist/apis/AuthenticationApi.d.ts +8 -8
  7. package/dist/apis/AuthenticationApi.js +4 -4
  8. package/dist/apis/ScriptsApi.d.ts +383 -0
  9. package/dist/apis/ScriptsApi.js +559 -0
  10. package/dist/apis/UsersApi.d.ts +4 -4
  11. package/dist/apis/UsersApi.js +2 -2
  12. package/dist/apis/index.d.ts +1 -0
  13. package/dist/apis/index.js +1 -0
  14. package/dist/esm/apis/AccountsApi.d.ts +24 -24
  15. package/dist/esm/apis/AccountsApi.js +12 -12
  16. package/dist/esm/apis/AuditLogApi.d.ts +1 -1
  17. package/dist/esm/apis/AuthenticationApi.d.ts +8 -8
  18. package/dist/esm/apis/AuthenticationApi.js +4 -4
  19. package/dist/esm/apis/ScriptsApi.d.ts +383 -0
  20. package/dist/esm/apis/ScriptsApi.js +555 -0
  21. package/dist/esm/apis/UsersApi.d.ts +4 -4
  22. package/dist/esm/apis/UsersApi.js +2 -2
  23. package/dist/esm/apis/index.d.ts +1 -0
  24. package/dist/esm/apis/index.js +1 -0
  25. package/dist/esm/models/APIKey.d.ts +6 -0
  26. package/dist/esm/models/APIKey.js +2 -0
  27. package/dist/esm/models/ScriptAuditEntry.d.ts +67 -0
  28. package/dist/esm/models/ScriptAuditEntry.js +63 -0
  29. package/dist/esm/models/ScriptAuditResBody.d.ts +39 -0
  30. package/dist/esm/models/ScriptAuditResBody.js +46 -0
  31. package/dist/esm/models/ScriptDetail.d.ts +161 -0
  32. package/dist/esm/models/ScriptDetail.js +122 -0
  33. package/dist/esm/models/ScriptExport.d.ts +174 -0
  34. package/dist/esm/models/ScriptExport.js +129 -0
  35. package/dist/esm/models/ScriptExportResBody.d.ts +39 -0
  36. package/dist/esm/models/ScriptExportResBody.js +48 -0
  37. package/dist/esm/models/ScriptExportRun.d.ts +92 -0
  38. package/dist/esm/models/ScriptExportRun.js +73 -0
  39. package/dist/esm/models/ScriptKey.d.ts +64 -0
  40. package/dist/esm/models/ScriptKey.js +58 -0
  41. package/dist/esm/models/ScriptListResBody.d.ts +33 -0
  42. package/dist/esm/models/ScriptListResBody.js +44 -0
  43. package/dist/esm/models/ScriptLogLine.d.ts +38 -0
  44. package/dist/esm/models/ScriptLogLine.js +47 -0
  45. package/dist/esm/models/ScriptPatchReqBody.d.ts +98 -0
  46. package/dist/esm/models/ScriptPatchReqBody.js +70 -0
  47. package/dist/esm/models/ScriptPostReqBody.d.ts +113 -0
  48. package/dist/esm/models/ScriptPostReqBody.js +82 -0
  49. package/dist/esm/models/ScriptRun.d.ts +86 -0
  50. package/dist/esm/models/ScriptRun.js +69 -0
  51. package/dist/esm/models/ScriptRunLogsResBody.d.ts +39 -0
  52. package/dist/esm/models/ScriptRunLogsResBody.js +48 -0
  53. package/dist/esm/models/ScriptRunsResBody.d.ts +39 -0
  54. package/dist/esm/models/ScriptRunsResBody.js +46 -0
  55. package/dist/esm/models/ScriptRuntime.d.ts +62 -0
  56. package/dist/esm/models/ScriptRuntime.js +51 -0
  57. package/dist/esm/models/ScriptSchedule.d.ts +38 -0
  58. package/dist/esm/models/ScriptSchedule.js +43 -0
  59. package/dist/esm/models/ScriptSchedulePreviewReqBody.d.ts +44 -0
  60. package/dist/esm/models/ScriptSchedulePreviewReqBody.js +45 -0
  61. package/dist/esm/models/ScriptSchedulePreviewResBody.d.ts +44 -0
  62. package/dist/esm/models/ScriptSchedulePreviewResBody.js +49 -0
  63. package/dist/esm/models/ScriptSecretsReqBody.d.ts +40 -0
  64. package/dist/esm/models/ScriptSecretsReqBody.js +43 -0
  65. package/dist/esm/models/ScriptSecretsResBody.d.ts +134 -0
  66. package/dist/esm/models/ScriptSecretsResBody.js +111 -0
  67. package/dist/esm/models/ScriptSummary.d.ts +128 -0
  68. package/dist/esm/models/ScriptSummary.js +107 -0
  69. package/dist/esm/models/ScriptWebhookResBody.d.ts +32 -0
  70. package/dist/esm/models/ScriptWebhookResBody.js +43 -0
  71. package/dist/esm/models/VariableData.d.ts +2 -1
  72. package/dist/esm/models/VariableData.js +7 -0
  73. package/dist/esm/models/VariableDataOneOf2.d.ts +3 -3
  74. package/dist/esm/models/VariableDataOneOf2.js +4 -4
  75. package/dist/esm/models/VariableDataOneOf3.d.ts +3 -3
  76. package/dist/esm/models/VariableDataOneOf3.js +4 -4
  77. package/dist/esm/models/VariableDataOneOf4.d.ts +3 -3
  78. package/dist/esm/models/VariableDataOneOf4.js +4 -4
  79. package/dist/esm/models/VariableDataOneOf5.d.ts +3 -2
  80. package/dist/esm/models/VariableDataOneOf5.js +4 -3
  81. package/dist/esm/models/VariableDataOneOf6.d.ts +1 -1
  82. package/dist/esm/models/VariableDataOneOf6.js +3 -3
  83. package/dist/esm/models/VariableDataOneOf7.d.ts +32 -0
  84. package/dist/esm/models/VariableDataOneOf7.js +43 -0
  85. package/dist/esm/models/VariableDate.d.ts +50 -0
  86. package/dist/esm/models/VariableDate.js +55 -0
  87. package/dist/esm/models/index.d.ts +24 -0
  88. package/dist/esm/models/index.js +24 -0
  89. package/dist/models/APIKey.d.ts +6 -0
  90. package/dist/models/APIKey.js +2 -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/VariableData.d.ts +2 -1
  136. package/dist/models/VariableData.js +7 -0
  137. package/dist/models/VariableDataOneOf2.d.ts +3 -3
  138. package/dist/models/VariableDataOneOf2.js +4 -4
  139. package/dist/models/VariableDataOneOf3.d.ts +3 -3
  140. package/dist/models/VariableDataOneOf3.js +4 -4
  141. package/dist/models/VariableDataOneOf4.d.ts +3 -3
  142. package/dist/models/VariableDataOneOf4.js +4 -4
  143. package/dist/models/VariableDataOneOf5.d.ts +3 -2
  144. package/dist/models/VariableDataOneOf5.js +4 -3
  145. package/dist/models/VariableDataOneOf6.d.ts +1 -1
  146. package/dist/models/VariableDataOneOf6.js +3 -3
  147. package/dist/models/VariableDataOneOf7.d.ts +32 -0
  148. package/dist/models/VariableDataOneOf7.js +50 -0
  149. package/dist/models/VariableDate.d.ts +50 -0
  150. package/dist/models/VariableDate.js +62 -0
  151. package/dist/models/index.d.ts +24 -0
  152. package/dist/models/index.js +24 -0
  153. package/package.json +1 -1
  154. package/src/apis/AccountsApi.ts +24 -24
  155. package/src/apis/AuditLogApi.ts +1 -1
  156. package/src/apis/AuthenticationApi.ts +8 -8
  157. package/src/apis/ScriptsApi.ts +984 -0
  158. package/src/apis/UsersApi.ts +4 -4
  159. package/src/apis/index.ts +1 -0
  160. package/src/models/APIKey.ts +8 -0
  161. package/src/models/ScriptAuditEntry.ts +112 -0
  162. package/src/models/ScriptAuditResBody.ts +82 -0
  163. package/src/models/ScriptDetail.ts +265 -0
  164. package/src/models/ScriptExport.ts +289 -0
  165. package/src/models/ScriptExportResBody.ts +83 -0
  166. package/src/models/ScriptExportRun.ts +151 -0
  167. package/src/models/ScriptKey.ts +109 -0
  168. package/src/models/ScriptListResBody.ts +74 -0
  169. package/src/models/ScriptLogLine.ts +75 -0
  170. package/src/models/ScriptPatchReqBody.ts +158 -0
  171. package/src/models/ScriptPostReqBody.ts +176 -0
  172. package/src/models/ScriptRun.ts +142 -0
  173. package/src/models/ScriptRunLogsResBody.ts +83 -0
  174. package/src/models/ScriptRunsResBody.ts +82 -0
  175. package/src/models/ScriptRuntime.ts +105 -0
  176. package/src/models/ScriptSchedule.ts +73 -0
  177. package/src/models/ScriptSchedulePreviewReqBody.ts +81 -0
  178. package/src/models/ScriptSchedulePreviewResBody.ts +83 -0
  179. package/src/models/ScriptSecretsReqBody.ts +73 -0
  180. package/src/models/ScriptSecretsResBody.ts +225 -0
  181. package/src/models/ScriptSummary.ts +216 -0
  182. package/src/models/ScriptWebhookResBody.ts +66 -0
  183. package/src/models/VariableData.ts +14 -1
  184. package/src/models/VariableDataOneOf2.ts +11 -11
  185. package/src/models/VariableDataOneOf3.ts +11 -11
  186. package/src/models/VariableDataOneOf4.ts +11 -11
  187. package/src/models/VariableDataOneOf5.ts +13 -5
  188. package/src/models/VariableDataOneOf6.ts +4 -4
  189. package/src/models/VariableDataOneOf7.ts +66 -0
  190. package/src/models/VariableDate.ts +93 -0
  191. package/src/models/index.ts +24 -0
@@ -0,0 +1,225 @@
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 { ScriptKey } from './ScriptKey';
17
+ import {
18
+ ScriptKeyFromJSON,
19
+ ScriptKeyFromJSONTyped,
20
+ ScriptKeyToJSON,
21
+ ScriptKeyToJSONTyped,
22
+ } from './ScriptKey';
23
+ import type { ScriptSchedule } from './ScriptSchedule';
24
+ import {
25
+ ScriptScheduleFromJSON,
26
+ ScriptScheduleFromJSONTyped,
27
+ ScriptScheduleToJSON,
28
+ ScriptScheduleToJSONTyped,
29
+ } from './ScriptSchedule';
30
+
31
+ /**
32
+ *
33
+ * @export
34
+ * @interface ScriptSecretsResBody
35
+ */
36
+ export interface ScriptSecretsResBody {
37
+ /**
38
+ *
39
+ * @type {Date}
40
+ * @memberof ScriptSecretsResBody
41
+ */
42
+ createdAt: Date;
43
+ /**
44
+ *
45
+ * @type {number}
46
+ * @memberof ScriptSecretsResBody
47
+ */
48
+ createdBy: number;
49
+ /**
50
+ *
51
+ * @type {string}
52
+ * @memberof ScriptSecretsResBody
53
+ */
54
+ description?: string;
55
+ /**
56
+ *
57
+ * @type {boolean}
58
+ * @memberof ScriptSecretsResBody
59
+ */
60
+ enabled: boolean;
61
+ /**
62
+ *
63
+ * @type {string}
64
+ * @memberof ScriptSecretsResBody
65
+ */
66
+ id: string;
67
+ /**
68
+ *
69
+ * @type {ScriptKey}
70
+ * @memberof ScriptSecretsResBody
71
+ */
72
+ key: ScriptKey;
73
+ /**
74
+ *
75
+ * @type {string}
76
+ * @memberof ScriptSecretsResBody
77
+ */
78
+ language: ScriptSecretsResBodyLanguageEnum;
79
+ /**
80
+ *
81
+ * @type {string}
82
+ * @memberof ScriptSecretsResBody
83
+ */
84
+ name: string;
85
+ /**
86
+ * Project the script's API key is scoped to. Absent when it acts across the account.
87
+ * @type {number}
88
+ * @memberof ScriptSecretsResBody
89
+ */
90
+ project?: number;
91
+ /**
92
+ * Pass back when updating, so a concurrent change is reported rather than overwritten.
93
+ * @type {number}
94
+ * @memberof ScriptSecretsResBody
95
+ */
96
+ revision: number;
97
+ /**
98
+ *
99
+ * @type {ScriptSchedule}
100
+ * @memberof ScriptSecretsResBody
101
+ */
102
+ schedule: ScriptSchedule;
103
+ /**
104
+ *
105
+ * @type {Array<string>}
106
+ * @memberof ScriptSecretsResBody
107
+ */
108
+ secretNames: Array<string>;
109
+ /**
110
+ * The handler signature the script implements.
111
+ * @type {string}
112
+ * @memberof ScriptSecretsResBody
113
+ */
114
+ type: ScriptSecretsResBodyTypeEnum;
115
+ /**
116
+ *
117
+ * @type {Date}
118
+ * @memberof ScriptSecretsResBody
119
+ */
120
+ updatedAt: Date;
121
+ /**
122
+ *
123
+ * @type {boolean}
124
+ * @memberof ScriptSecretsResBody
125
+ */
126
+ webhook: boolean;
127
+ }
128
+
129
+
130
+ /**
131
+ * @export
132
+ */
133
+ export const ScriptSecretsResBodyLanguageEnum = {
134
+ Python: 'python',
135
+ Go: 'go',
136
+ Javascript: 'javascript'
137
+ } as const;
138
+ export type ScriptSecretsResBodyLanguageEnum = typeof ScriptSecretsResBodyLanguageEnum[keyof typeof ScriptSecretsResBodyLanguageEnum];
139
+
140
+ /**
141
+ * @export
142
+ */
143
+ export const ScriptSecretsResBodyTypeEnum = {
144
+ Integration: 'integration'
145
+ } as const;
146
+ export type ScriptSecretsResBodyTypeEnum = typeof ScriptSecretsResBodyTypeEnum[keyof typeof ScriptSecretsResBodyTypeEnum];
147
+
148
+
149
+ /**
150
+ * Check if a given object implements the ScriptSecretsResBody interface.
151
+ */
152
+ export function instanceOfScriptSecretsResBody(value: object): value is ScriptSecretsResBody {
153
+ if (!('createdAt' in value) || value['createdAt'] === undefined) return false;
154
+ if (!('createdBy' in value) || value['createdBy'] === undefined) return false;
155
+ if (!('enabled' in value) || value['enabled'] === undefined) return false;
156
+ if (!('id' in value) || value['id'] === undefined) return false;
157
+ if (!('key' in value) || value['key'] === undefined) return false;
158
+ if (!('language' in value) || value['language'] === undefined) return false;
159
+ if (!('name' in value) || value['name'] === undefined) return false;
160
+ if (!('revision' in value) || value['revision'] === undefined) return false;
161
+ if (!('schedule' in value) || value['schedule'] === undefined) return false;
162
+ if (!('secretNames' in value) || value['secretNames'] === undefined) return false;
163
+ if (!('type' in value) || value['type'] === undefined) return false;
164
+ if (!('updatedAt' in value) || value['updatedAt'] === undefined) return false;
165
+ if (!('webhook' in value) || value['webhook'] === undefined) return false;
166
+ return true;
167
+ }
168
+
169
+ export function ScriptSecretsResBodyFromJSON(json: any): ScriptSecretsResBody {
170
+ return ScriptSecretsResBodyFromJSONTyped(json, false);
171
+ }
172
+
173
+ export function ScriptSecretsResBodyFromJSONTyped(json: any, ignoreDiscriminator: boolean): ScriptSecretsResBody {
174
+ if (json == null) {
175
+ return json;
176
+ }
177
+ return {
178
+
179
+ 'createdAt': (new Date(json['createdAt'])),
180
+ 'createdBy': json['createdBy'],
181
+ 'description': json['description'] == null ? undefined : json['description'],
182
+ 'enabled': json['enabled'],
183
+ 'id': json['id'],
184
+ 'key': ScriptKeyFromJSON(json['key']),
185
+ 'language': json['language'],
186
+ 'name': json['name'],
187
+ 'project': json['project'] == null ? undefined : json['project'],
188
+ 'revision': json['revision'],
189
+ 'schedule': ScriptScheduleFromJSON(json['schedule']),
190
+ 'secretNames': json['secretNames'],
191
+ 'type': json['type'],
192
+ 'updatedAt': (new Date(json['updatedAt'])),
193
+ 'webhook': json['webhook'],
194
+ };
195
+ }
196
+
197
+ export function ScriptSecretsResBodyToJSON(json: any): ScriptSecretsResBody {
198
+ return ScriptSecretsResBodyToJSONTyped(json, false);
199
+ }
200
+
201
+ export function ScriptSecretsResBodyToJSONTyped(value?: ScriptSecretsResBody | null, ignoreDiscriminator: boolean = false): any {
202
+ if (value == null) {
203
+ return value;
204
+ }
205
+
206
+ return {
207
+
208
+ 'createdAt': ((value['createdAt']).toISOString()),
209
+ 'createdBy': value['createdBy'],
210
+ 'description': value['description'],
211
+ 'enabled': value['enabled'],
212
+ 'id': value['id'],
213
+ 'key': ScriptKeyToJSON(value['key']),
214
+ 'language': value['language'],
215
+ 'name': value['name'],
216
+ 'project': value['project'],
217
+ 'revision': value['revision'],
218
+ 'schedule': ScriptScheduleToJSON(value['schedule']),
219
+ 'secretNames': value['secretNames'],
220
+ 'type': value['type'],
221
+ 'updatedAt': ((value['updatedAt']).toISOString()),
222
+ 'webhook': value['webhook'],
223
+ };
224
+ }
225
+
@@ -0,0 +1,216 @@
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 { ScriptKey } from './ScriptKey';
17
+ import {
18
+ ScriptKeyFromJSON,
19
+ ScriptKeyFromJSONTyped,
20
+ ScriptKeyToJSON,
21
+ ScriptKeyToJSONTyped,
22
+ } from './ScriptKey';
23
+ import type { ScriptSchedule } from './ScriptSchedule';
24
+ import {
25
+ ScriptScheduleFromJSON,
26
+ ScriptScheduleFromJSONTyped,
27
+ ScriptScheduleToJSON,
28
+ ScriptScheduleToJSONTyped,
29
+ } from './ScriptSchedule';
30
+
31
+ /**
32
+ *
33
+ * @export
34
+ * @interface ScriptSummary
35
+ */
36
+ export interface ScriptSummary {
37
+ /**
38
+ *
39
+ * @type {Date}
40
+ * @memberof ScriptSummary
41
+ */
42
+ createdAt: Date;
43
+ /**
44
+ *
45
+ * @type {number}
46
+ * @memberof ScriptSummary
47
+ */
48
+ createdBy: number;
49
+ /**
50
+ *
51
+ * @type {string}
52
+ * @memberof ScriptSummary
53
+ */
54
+ description?: string;
55
+ /**
56
+ *
57
+ * @type {boolean}
58
+ * @memberof ScriptSummary
59
+ */
60
+ enabled: boolean;
61
+ /**
62
+ *
63
+ * @type {string}
64
+ * @memberof ScriptSummary
65
+ */
66
+ id: string;
67
+ /**
68
+ *
69
+ * @type {ScriptKey}
70
+ * @memberof ScriptSummary
71
+ */
72
+ key: ScriptKey;
73
+ /**
74
+ *
75
+ * @type {string}
76
+ * @memberof ScriptSummary
77
+ */
78
+ language: ScriptSummaryLanguageEnum;
79
+ /**
80
+ *
81
+ * @type {string}
82
+ * @memberof ScriptSummary
83
+ */
84
+ name: string;
85
+ /**
86
+ * Project the script's API key is scoped to. Absent when it acts across the account.
87
+ * @type {number}
88
+ * @memberof ScriptSummary
89
+ */
90
+ project?: number;
91
+ /**
92
+ * Pass back when updating, so a concurrent change is reported rather than overwritten.
93
+ * @type {number}
94
+ * @memberof ScriptSummary
95
+ */
96
+ revision: number;
97
+ /**
98
+ *
99
+ * @type {ScriptSchedule}
100
+ * @memberof ScriptSummary
101
+ */
102
+ schedule: ScriptSchedule;
103
+ /**
104
+ * The handler signature the script implements.
105
+ * @type {string}
106
+ * @memberof ScriptSummary
107
+ */
108
+ type: ScriptSummaryTypeEnum;
109
+ /**
110
+ *
111
+ * @type {Date}
112
+ * @memberof ScriptSummary
113
+ */
114
+ updatedAt: Date;
115
+ /**
116
+ *
117
+ * @type {boolean}
118
+ * @memberof ScriptSummary
119
+ */
120
+ webhook: boolean;
121
+ }
122
+
123
+
124
+ /**
125
+ * @export
126
+ */
127
+ export const ScriptSummaryLanguageEnum = {
128
+ Python: 'python',
129
+ Go: 'go',
130
+ Javascript: 'javascript'
131
+ } as const;
132
+ export type ScriptSummaryLanguageEnum = typeof ScriptSummaryLanguageEnum[keyof typeof ScriptSummaryLanguageEnum];
133
+
134
+ /**
135
+ * @export
136
+ */
137
+ export const ScriptSummaryTypeEnum = {
138
+ Integration: 'integration'
139
+ } as const;
140
+ export type ScriptSummaryTypeEnum = typeof ScriptSummaryTypeEnum[keyof typeof ScriptSummaryTypeEnum];
141
+
142
+
143
+ /**
144
+ * Check if a given object implements the ScriptSummary interface.
145
+ */
146
+ export function instanceOfScriptSummary(value: object): value is ScriptSummary {
147
+ if (!('createdAt' in value) || value['createdAt'] === undefined) return false;
148
+ if (!('createdBy' in value) || value['createdBy'] === undefined) return false;
149
+ if (!('enabled' in value) || value['enabled'] === undefined) return false;
150
+ if (!('id' in value) || value['id'] === undefined) return false;
151
+ if (!('key' in value) || value['key'] === undefined) return false;
152
+ if (!('language' in value) || value['language'] === undefined) return false;
153
+ if (!('name' in value) || value['name'] === undefined) return false;
154
+ if (!('revision' in value) || value['revision'] === undefined) return false;
155
+ if (!('schedule' in value) || value['schedule'] === undefined) return false;
156
+ if (!('type' in value) || value['type'] === undefined) return false;
157
+ if (!('updatedAt' in value) || value['updatedAt'] === undefined) return false;
158
+ if (!('webhook' in value) || value['webhook'] === undefined) return false;
159
+ return true;
160
+ }
161
+
162
+ export function ScriptSummaryFromJSON(json: any): ScriptSummary {
163
+ return ScriptSummaryFromJSONTyped(json, false);
164
+ }
165
+
166
+ export function ScriptSummaryFromJSONTyped(json: any, ignoreDiscriminator: boolean): ScriptSummary {
167
+ if (json == null) {
168
+ return json;
169
+ }
170
+ return {
171
+
172
+ 'createdAt': (new Date(json['createdAt'])),
173
+ 'createdBy': json['createdBy'],
174
+ 'description': json['description'] == null ? undefined : json['description'],
175
+ 'enabled': json['enabled'],
176
+ 'id': json['id'],
177
+ 'key': ScriptKeyFromJSON(json['key']),
178
+ 'language': json['language'],
179
+ 'name': json['name'],
180
+ 'project': json['project'] == null ? undefined : json['project'],
181
+ 'revision': json['revision'],
182
+ 'schedule': ScriptScheduleFromJSON(json['schedule']),
183
+ 'type': json['type'],
184
+ 'updatedAt': (new Date(json['updatedAt'])),
185
+ 'webhook': json['webhook'],
186
+ };
187
+ }
188
+
189
+ export function ScriptSummaryToJSON(json: any): ScriptSummary {
190
+ return ScriptSummaryToJSONTyped(json, false);
191
+ }
192
+
193
+ export function ScriptSummaryToJSONTyped(value?: ScriptSummary | null, ignoreDiscriminator: boolean = false): any {
194
+ if (value == null) {
195
+ return value;
196
+ }
197
+
198
+ return {
199
+
200
+ 'createdAt': ((value['createdAt']).toISOString()),
201
+ 'createdBy': value['createdBy'],
202
+ 'description': value['description'],
203
+ 'enabled': value['enabled'],
204
+ 'id': value['id'],
205
+ 'key': ScriptKeyToJSON(value['key']),
206
+ 'language': value['language'],
207
+ 'name': value['name'],
208
+ 'project': value['project'],
209
+ 'revision': value['revision'],
210
+ 'schedule': ScriptScheduleToJSON(value['schedule']),
211
+ 'type': value['type'],
212
+ 'updatedAt': ((value['updatedAt']).toISOString()),
213
+ 'webhook': value['webhook'],
214
+ };
215
+ }
216
+
@@ -0,0 +1,66 @@
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 ScriptWebhookResBody
20
+ */
21
+ export interface ScriptWebhookResBody {
22
+ /**
23
+ *
24
+ * @type {string}
25
+ * @memberof ScriptWebhookResBody
26
+ */
27
+ webhookUrl: string;
28
+ }
29
+
30
+ /**
31
+ * Check if a given object implements the ScriptWebhookResBody interface.
32
+ */
33
+ export function instanceOfScriptWebhookResBody(value: object): value is ScriptWebhookResBody {
34
+ if (!('webhookUrl' in value) || value['webhookUrl'] === undefined) return false;
35
+ return true;
36
+ }
37
+
38
+ export function ScriptWebhookResBodyFromJSON(json: any): ScriptWebhookResBody {
39
+ return ScriptWebhookResBodyFromJSONTyped(json, false);
40
+ }
41
+
42
+ export function ScriptWebhookResBodyFromJSONTyped(json: any, ignoreDiscriminator: boolean): ScriptWebhookResBody {
43
+ if (json == null) {
44
+ return json;
45
+ }
46
+ return {
47
+
48
+ 'webhookUrl': json['webhookUrl'],
49
+ };
50
+ }
51
+
52
+ export function ScriptWebhookResBodyToJSON(json: any): ScriptWebhookResBody {
53
+ return ScriptWebhookResBodyToJSONTyped(json, false);
54
+ }
55
+
56
+ export function ScriptWebhookResBodyToJSONTyped(value?: ScriptWebhookResBody | null, ignoreDiscriminator: boolean = false): any {
57
+ if (value == null) {
58
+ return value;
59
+ }
60
+
61
+ return {
62
+
63
+ 'webhookUrl': value['webhookUrl'],
64
+ };
65
+ }
66
+
@@ -68,13 +68,20 @@ import {
68
68
  VariableDataOneOf6FromJSONTyped,
69
69
  VariableDataOneOf6ToJSON,
70
70
  } from './VariableDataOneOf6';
71
+ import type { VariableDataOneOf7 } from './VariableDataOneOf7';
72
+ import {
73
+ instanceOfVariableDataOneOf7,
74
+ VariableDataOneOf7FromJSON,
75
+ VariableDataOneOf7FromJSONTyped,
76
+ VariableDataOneOf7ToJSON,
77
+ } from './VariableDataOneOf7';
71
78
 
72
79
  /**
73
80
  * @type VariableData
74
81
  *
75
82
  * @export
76
83
  */
77
- export type VariableData = PropertySourceOneOf | VariableDataOneOf | VariableDataOneOf1 | VariableDataOneOf2 | VariableDataOneOf3 | VariableDataOneOf4 | VariableDataOneOf5 | VariableDataOneOf6;
84
+ export type VariableData = PropertySourceOneOf | VariableDataOneOf | VariableDataOneOf1 | VariableDataOneOf2 | VariableDataOneOf3 | VariableDataOneOf4 | VariableDataOneOf5 | VariableDataOneOf6 | VariableDataOneOf7;
78
85
 
79
86
  export function VariableDataFromJSON(json: any): VariableData {
80
87
  return VariableDataFromJSONTyped(json, false);
@@ -111,6 +118,9 @@ export function VariableDataFromJSONTyped(json: any, ignoreDiscriminator: boolea
111
118
  if (instanceOfVariableDataOneOf6(json)) {
112
119
  return VariableDataOneOf6FromJSONTyped(json, true);
113
120
  }
121
+ if (instanceOfVariableDataOneOf7(json)) {
122
+ return VariableDataOneOf7FromJSONTyped(json, true);
123
+ }
114
124
  return {} as any;
115
125
  }
116
126
 
@@ -149,6 +159,9 @@ export function VariableDataToJSONTyped(value?: VariableData | null, ignoreDiscr
149
159
  if (instanceOfVariableDataOneOf6(value)) {
150
160
  return VariableDataOneOf6ToJSON(value as VariableDataOneOf6);
151
161
  }
162
+ if (instanceOfVariableDataOneOf7(value)) {
163
+ return VariableDataOneOf7ToJSON(value as VariableDataOneOf7);
164
+ }
152
165
  return {};
153
166
  }
154
167
 
@@ -13,13 +13,13 @@
13
13
  */
14
14
 
15
15
  import { mapValues } from '../runtime';
16
- import type { VariableProperty } from './VariableProperty';
16
+ import type { VariableDate } from './VariableDate';
17
17
  import {
18
- VariablePropertyFromJSON,
19
- VariablePropertyFromJSONTyped,
20
- VariablePropertyToJSON,
21
- VariablePropertyToJSONTyped,
22
- } from './VariableProperty';
18
+ VariableDateFromJSON,
19
+ VariableDateFromJSONTyped,
20
+ VariableDateToJSON,
21
+ VariableDateToJSONTyped,
22
+ } from './VariableDate';
23
23
 
24
24
  /**
25
25
  *
@@ -29,17 +29,17 @@ import {
29
29
  export interface VariableDataOneOf2 {
30
30
  /**
31
31
  *
32
- * @type {VariableProperty}
32
+ * @type {VariableDate}
33
33
  * @memberof VariableDataOneOf2
34
34
  */
35
- node: VariableProperty;
35
+ dateRange: VariableDate;
36
36
  }
37
37
 
38
38
  /**
39
39
  * Check if a given object implements the VariableDataOneOf2 interface.
40
40
  */
41
41
  export function instanceOfVariableDataOneOf2(value: object): value is VariableDataOneOf2 {
42
- if (!('node' in value) || value['node'] === undefined) return false;
42
+ if (!('dateRange' in value) || value['dateRange'] === undefined) return false;
43
43
  return true;
44
44
  }
45
45
 
@@ -53,7 +53,7 @@ export function VariableDataOneOf2FromJSONTyped(json: any, ignoreDiscriminator:
53
53
  }
54
54
  return {
55
55
 
56
- 'node': VariablePropertyFromJSON(json['node']),
56
+ 'dateRange': VariableDateFromJSON(json['dateRange']),
57
57
  };
58
58
  }
59
59
 
@@ -68,7 +68,7 @@ export function VariableDataOneOf2ToJSONTyped(value?: VariableDataOneOf2 | null,
68
68
 
69
69
  return {
70
70
 
71
- 'node': VariablePropertyToJSON(value['node']),
71
+ 'dateRange': VariableDateToJSON(value['dateRange']),
72
72
  };
73
73
  }
74
74
 
@@ -13,13 +13,13 @@
13
13
  */
14
14
 
15
15
  import { mapValues } from '../runtime';
16
- import type { VariableNumber } from './VariableNumber';
16
+ import type { VariableProperty } from './VariableProperty';
17
17
  import {
18
- VariableNumberFromJSON,
19
- VariableNumberFromJSONTyped,
20
- VariableNumberToJSON,
21
- VariableNumberToJSONTyped,
22
- } from './VariableNumber';
18
+ VariablePropertyFromJSON,
19
+ VariablePropertyFromJSONTyped,
20
+ VariablePropertyToJSON,
21
+ VariablePropertyToJSONTyped,
22
+ } from './VariableProperty';
23
23
 
24
24
  /**
25
25
  *
@@ -29,17 +29,17 @@ import {
29
29
  export interface VariableDataOneOf3 {
30
30
  /**
31
31
  *
32
- * @type {VariableNumber}
32
+ * @type {VariableProperty}
33
33
  * @memberof VariableDataOneOf3
34
34
  */
35
- number: VariableNumber;
35
+ node: VariableProperty;
36
36
  }
37
37
 
38
38
  /**
39
39
  * Check if a given object implements the VariableDataOneOf3 interface.
40
40
  */
41
41
  export function instanceOfVariableDataOneOf3(value: object): value is VariableDataOneOf3 {
42
- if (!('number' in value) || value['number'] === undefined) return false;
42
+ if (!('node' in value) || value['node'] === undefined) return false;
43
43
  return true;
44
44
  }
45
45
 
@@ -53,7 +53,7 @@ export function VariableDataOneOf3FromJSONTyped(json: any, ignoreDiscriminator:
53
53
  }
54
54
  return {
55
55
 
56
- 'number': VariableNumberFromJSON(json['number']),
56
+ 'node': VariablePropertyFromJSON(json['node']),
57
57
  };
58
58
  }
59
59
 
@@ -68,7 +68,7 @@ export function VariableDataOneOf3ToJSONTyped(value?: VariableDataOneOf3 | null,
68
68
 
69
69
  return {
70
70
 
71
- 'number': VariableNumberToJSON(value['number']),
71
+ 'node': VariablePropertyToJSON(value['node']),
72
72
  };
73
73
  }
74
74