@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,151 @@
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 ScriptExportRun
20
+ */
21
+ export interface ScriptExportRun {
22
+ /**
23
+ *
24
+ * @type {number}
25
+ * @memberof ScriptExportRun
26
+ */
27
+ durationMs?: number;
28
+ /**
29
+ *
30
+ * @type {Date}
31
+ * @memberof ScriptExportRun
32
+ */
33
+ endedAt?: Date;
34
+ /**
35
+ *
36
+ * @type {number}
37
+ * @memberof ScriptExportRun
38
+ */
39
+ exitCode: number;
40
+ /**
41
+ *
42
+ * @type {string}
43
+ * @memberof ScriptExportRun
44
+ */
45
+ id: string;
46
+ /**
47
+ * "build" for a dependency build, "run" for an execution.
48
+ * @type {string}
49
+ * @memberof ScriptExportRun
50
+ */
51
+ kind: string;
52
+ /**
53
+ * API path that returns the run's logs while the run is kept.
54
+ * @type {string}
55
+ * @memberof ScriptExportRun
56
+ */
57
+ logsPath: string;
58
+ /**
59
+ *
60
+ * @type {string}
61
+ * @memberof ScriptExportRun
62
+ */
63
+ message?: string;
64
+ /**
65
+ *
66
+ * @type {Date}
67
+ * @memberof ScriptExportRun
68
+ */
69
+ queuedAt?: Date;
70
+ /**
71
+ *
72
+ * @type {Date}
73
+ * @memberof ScriptExportRun
74
+ */
75
+ startedAt?: Date;
76
+ /**
77
+ *
78
+ * @type {string}
79
+ * @memberof ScriptExportRun
80
+ */
81
+ status: string;
82
+ /**
83
+ *
84
+ * @type {string}
85
+ * @memberof ScriptExportRun
86
+ */
87
+ trigger: string;
88
+ }
89
+
90
+ /**
91
+ * Check if a given object implements the ScriptExportRun interface.
92
+ */
93
+ export function instanceOfScriptExportRun(value: object): value is ScriptExportRun {
94
+ if (!('exitCode' in value) || value['exitCode'] === undefined) return false;
95
+ if (!('id' in value) || value['id'] === undefined) return false;
96
+ if (!('kind' in value) || value['kind'] === undefined) return false;
97
+ if (!('logsPath' in value) || value['logsPath'] === undefined) return false;
98
+ if (!('status' in value) || value['status'] === undefined) return false;
99
+ if (!('trigger' in value) || value['trigger'] === undefined) return false;
100
+ return true;
101
+ }
102
+
103
+ export function ScriptExportRunFromJSON(json: any): ScriptExportRun {
104
+ return ScriptExportRunFromJSONTyped(json, false);
105
+ }
106
+
107
+ export function ScriptExportRunFromJSONTyped(json: any, ignoreDiscriminator: boolean): ScriptExportRun {
108
+ if (json == null) {
109
+ return json;
110
+ }
111
+ return {
112
+
113
+ 'durationMs': json['durationMs'] == null ? undefined : json['durationMs'],
114
+ 'endedAt': json['endedAt'] == null ? undefined : (new Date(json['endedAt'])),
115
+ 'exitCode': json['exitCode'],
116
+ 'id': json['id'],
117
+ 'kind': json['kind'],
118
+ 'logsPath': json['logsPath'],
119
+ 'message': json['message'] == null ? undefined : json['message'],
120
+ 'queuedAt': json['queuedAt'] == null ? undefined : (new Date(json['queuedAt'])),
121
+ 'startedAt': json['startedAt'] == null ? undefined : (new Date(json['startedAt'])),
122
+ 'status': json['status'],
123
+ 'trigger': json['trigger'],
124
+ };
125
+ }
126
+
127
+ export function ScriptExportRunToJSON(json: any): ScriptExportRun {
128
+ return ScriptExportRunToJSONTyped(json, false);
129
+ }
130
+
131
+ export function ScriptExportRunToJSONTyped(value?: ScriptExportRun | null, ignoreDiscriminator: boolean = false): any {
132
+ if (value == null) {
133
+ return value;
134
+ }
135
+
136
+ return {
137
+
138
+ 'durationMs': value['durationMs'],
139
+ 'endedAt': value['endedAt'] == null ? undefined : ((value['endedAt']).toISOString()),
140
+ 'exitCode': value['exitCode'],
141
+ 'id': value['id'],
142
+ 'kind': value['kind'],
143
+ 'logsPath': value['logsPath'],
144
+ 'message': value['message'],
145
+ 'queuedAt': value['queuedAt'] == null ? undefined : ((value['queuedAt']).toISOString()),
146
+ 'startedAt': value['startedAt'] == null ? undefined : ((value['startedAt']).toISOString()),
147
+ 'status': value['status'],
148
+ 'trigger': value['trigger'],
149
+ };
150
+ }
151
+
@@ -0,0 +1,109 @@
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 ScriptKey
20
+ */
21
+ export interface ScriptKey {
22
+ /**
23
+ *
24
+ * @type {Date}
25
+ * @memberof ScriptKey
26
+ */
27
+ expiresAt?: Date;
28
+ /**
29
+ * Why the last automatic rotation failed or why the key needs re-authorising.
30
+ * @type {string}
31
+ * @memberof ScriptKey
32
+ */
33
+ lastError?: string;
34
+ /**
35
+ * User whose permissions the key acts with.
36
+ * @type {number}
37
+ * @memberof ScriptKey
38
+ */
39
+ ownerUserId?: number;
40
+ /**
41
+ * When the key is next replaced automatically.
42
+ * @type {Date}
43
+ * @memberof ScriptKey
44
+ */
45
+ rotateAt?: Date;
46
+ /**
47
+ * Whether the script's Spaciv API key is usable. While "needs_reauthorisation", runs are paused until someone with *Manage my account* re-authorises it.
48
+ * @type {string}
49
+ * @memberof ScriptKey
50
+ */
51
+ status: ScriptKeyStatusEnum;
52
+ }
53
+
54
+
55
+ /**
56
+ * @export
57
+ */
58
+ export const ScriptKeyStatusEnum = {
59
+ Active: 'active',
60
+ NeedsReauthorisation: 'needs_reauthorisation'
61
+ } as const;
62
+ export type ScriptKeyStatusEnum = typeof ScriptKeyStatusEnum[keyof typeof ScriptKeyStatusEnum];
63
+
64
+
65
+ /**
66
+ * Check if a given object implements the ScriptKey interface.
67
+ */
68
+ export function instanceOfScriptKey(value: object): value is ScriptKey {
69
+ if (!('status' in value) || value['status'] === undefined) return false;
70
+ return true;
71
+ }
72
+
73
+ export function ScriptKeyFromJSON(json: any): ScriptKey {
74
+ return ScriptKeyFromJSONTyped(json, false);
75
+ }
76
+
77
+ export function ScriptKeyFromJSONTyped(json: any, ignoreDiscriminator: boolean): ScriptKey {
78
+ if (json == null) {
79
+ return json;
80
+ }
81
+ return {
82
+
83
+ 'expiresAt': json['expiresAt'] == null ? undefined : (new Date(json['expiresAt'])),
84
+ 'lastError': json['lastError'] == null ? undefined : json['lastError'],
85
+ 'ownerUserId': json['ownerUserId'] == null ? undefined : json['ownerUserId'],
86
+ 'rotateAt': json['rotateAt'] == null ? undefined : (new Date(json['rotateAt'])),
87
+ 'status': json['status'],
88
+ };
89
+ }
90
+
91
+ export function ScriptKeyToJSON(json: any): ScriptKey {
92
+ return ScriptKeyToJSONTyped(json, false);
93
+ }
94
+
95
+ export function ScriptKeyToJSONTyped(value?: ScriptKey | null, ignoreDiscriminator: boolean = false): any {
96
+ if (value == null) {
97
+ return value;
98
+ }
99
+
100
+ return {
101
+
102
+ 'expiresAt': value['expiresAt'] == null ? undefined : ((value['expiresAt']).toISOString()),
103
+ 'lastError': value['lastError'],
104
+ 'ownerUserId': value['ownerUserId'],
105
+ 'rotateAt': value['rotateAt'] == null ? undefined : ((value['rotateAt']).toISOString()),
106
+ 'status': value['status'],
107
+ };
108
+ }
109
+
@@ -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
+