@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
@@ -98,7 +98,7 @@ export interface UsersApiInterface {
98
98
  createImport(requestParameters: UsersApiCreateImportRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
99
99
 
100
100
  /**
101
- * Permanently deletes the authenticated user\'s own account and all associated data. Requires the *Edit my user profile* permission. This action is irreversible.
101
+ * Permanently deletes the authenticated user\'s own account and all associated data. Requires the *Edit my user profile* permission. This action is irreversible. A script\'s own API key cannot delete its user.
102
102
  * @summary Delete the current user\'s account
103
103
  * @param {*} [options] Override http request option.
104
104
  * @throws {RequiredError}
@@ -107,7 +107,7 @@ export interface UsersApiInterface {
107
107
  deleteRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
108
108
 
109
109
  /**
110
- * Permanently deletes the authenticated user\'s own account and all associated data. Requires the *Edit my user profile* permission. This action is irreversible.
110
+ * Permanently deletes the authenticated user\'s own account and all associated data. Requires the *Edit my user profile* permission. This action is irreversible. A script\'s own API key cannot delete its user.
111
111
  * Delete the current user\'s account
112
112
  */
113
113
  delete(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
@@ -317,7 +317,7 @@ export class UsersApi extends runtime.BaseAPI implements UsersApiInterface {
317
317
  }
318
318
 
319
319
  /**
320
- * Permanently deletes the authenticated user\'s own account and all associated data. Requires the *Edit my user profile* permission. This action is irreversible.
320
+ * Permanently deletes the authenticated user\'s own account and all associated data. Requires the *Edit my user profile* permission. This action is irreversible. A script\'s own API key cannot delete its user.
321
321
  * Delete the current user\'s account
322
322
  */
323
323
  async deleteRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
@@ -347,7 +347,7 @@ export class UsersApi extends runtime.BaseAPI implements UsersApiInterface {
347
347
  }
348
348
 
349
349
  /**
350
- * Permanently deletes the authenticated user\'s own account and all associated data. Requires the *Edit my user profile* permission. This action is irreversible.
350
+ * Permanently deletes the authenticated user\'s own account and all associated data. Requires the *Edit my user profile* permission. This action is irreversible. A script\'s own API key cannot delete its user.
351
351
  * Delete the current user\'s account
352
352
  */
353
353
  async delete(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
package/src/apis/index.ts CHANGED
@@ -22,6 +22,7 @@ export * from './ProjectsApi';
22
22
  export * from './PropertiesApi';
23
23
  export * from './ReportsApi';
24
24
  export * from './ScenariosApi';
25
+ export * from './ScriptsApi';
25
26
  export * from './ServiceApi';
26
27
  export * from './SpaceRulesetsApi';
27
28
  export * from './TemplateProjectsApi';
@@ -67,6 +67,12 @@ export interface APIKey {
67
67
  * @memberof APIKey
68
68
  */
69
69
  projectId: number;
70
+ /**
71
+ * Set when the key is created and rotated by a script; it can't be revoked here.
72
+ * @type {string}
73
+ * @memberof APIKey
74
+ */
75
+ scriptId?: string;
70
76
  }
71
77
 
72
78
  /**
@@ -101,6 +107,7 @@ export function APIKeyFromJSONTyped(json: any, ignoreDiscriminator: boolean): AP
101
107
  'name': json['name'],
102
108
  'prefix': json['prefix'],
103
109
  'projectId': json['projectId'],
110
+ 'scriptId': json['scriptId'] == null ? undefined : json['scriptId'],
104
111
  };
105
112
  }
106
113
 
@@ -123,6 +130,7 @@ export function APIKeyToJSONTyped(value?: APIKey | null, ignoreDiscriminator: bo
123
130
  'name': value['name'],
124
131
  'prefix': value['prefix'],
125
132
  'projectId': value['projectId'],
133
+ 'scriptId': value['scriptId'],
126
134
  };
127
135
  }
128
136
 
@@ -0,0 +1,92 @@
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 { AssistantTranscriptMessage } from './AssistantTranscriptMessage';
17
+ import {
18
+ AssistantTranscriptMessageFromJSON,
19
+ AssistantTranscriptMessageFromJSONTyped,
20
+ AssistantTranscriptMessageToJSON,
21
+ AssistantTranscriptMessageToJSONTyped,
22
+ } from './AssistantTranscriptMessage';
23
+
24
+ /**
25
+ *
26
+ * @export
27
+ * @interface AssistantTranscriptBody
28
+ */
29
+ export interface AssistantTranscriptBody {
30
+ /**
31
+ *
32
+ * @type {Array<AssistantTranscriptMessage>}
33
+ * @memberof AssistantTranscriptBody
34
+ */
35
+ messages: Array<AssistantTranscriptMessage>;
36
+ /**
37
+ * What the assistant is told of the messages it no longer replays, once the conversation has been compacted. Empty until then.
38
+ * @type {string}
39
+ * @memberof AssistantTranscriptBody
40
+ */
41
+ summary: string;
42
+ /**
43
+ * How many of the leading messages the summary stands in for.
44
+ * @type {number}
45
+ * @memberof AssistantTranscriptBody
46
+ */
47
+ summaryUpTo: number;
48
+ }
49
+
50
+ /**
51
+ * Check if a given object implements the AssistantTranscriptBody interface.
52
+ */
53
+ export function instanceOfAssistantTranscriptBody(value: object): value is AssistantTranscriptBody {
54
+ if (!('messages' in value) || value['messages'] === undefined) return false;
55
+ if (!('summary' in value) || value['summary'] === undefined) return false;
56
+ if (!('summaryUpTo' in value) || value['summaryUpTo'] === undefined) return false;
57
+ return true;
58
+ }
59
+
60
+ export function AssistantTranscriptBodyFromJSON(json: any): AssistantTranscriptBody {
61
+ return AssistantTranscriptBodyFromJSONTyped(json, false);
62
+ }
63
+
64
+ export function AssistantTranscriptBodyFromJSONTyped(json: any, ignoreDiscriminator: boolean): AssistantTranscriptBody {
65
+ if (json == null) {
66
+ return json;
67
+ }
68
+ return {
69
+
70
+ 'messages': ((json['messages'] as Array<any>).map(AssistantTranscriptMessageFromJSON)),
71
+ 'summary': json['summary'],
72
+ 'summaryUpTo': json['summaryUpTo'],
73
+ };
74
+ }
75
+
76
+ export function AssistantTranscriptBodyToJSON(json: any): AssistantTranscriptBody {
77
+ return AssistantTranscriptBodyToJSONTyped(json, false);
78
+ }
79
+
80
+ export function AssistantTranscriptBodyToJSONTyped(value?: AssistantTranscriptBody | null, ignoreDiscriminator: boolean = false): any {
81
+ if (value == null) {
82
+ return value;
83
+ }
84
+
85
+ return {
86
+
87
+ 'messages': ((value['messages'] as Array<any>).map(AssistantTranscriptMessageToJSON)),
88
+ 'summary': value['summary'],
89
+ 'summaryUpTo': value['summaryUpTo'],
90
+ };
91
+ }
92
+
@@ -0,0 +1,175 @@
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 { AssistantTranscriptToolCall } from './AssistantTranscriptToolCall';
17
+ import {
18
+ AssistantTranscriptToolCallFromJSON,
19
+ AssistantTranscriptToolCallFromJSONTyped,
20
+ AssistantTranscriptToolCallToJSON,
21
+ AssistantTranscriptToolCallToJSONTyped,
22
+ } from './AssistantTranscriptToolCall';
23
+ import type { AssistantChatPollAttachment } from './AssistantChatPollAttachment';
24
+ import {
25
+ AssistantChatPollAttachmentFromJSON,
26
+ AssistantChatPollAttachmentFromJSONTyped,
27
+ AssistantChatPollAttachmentToJSON,
28
+ AssistantChatPollAttachmentToJSONTyped,
29
+ } from './AssistantChatPollAttachment';
30
+
31
+ /**
32
+ *
33
+ * @export
34
+ * @interface AssistantTranscriptMessage
35
+ */
36
+ export interface AssistantTranscriptMessage {
37
+ /**
38
+ * Files attached to a user message. Empty on every other message.
39
+ * @type {Array<AssistantChatPollAttachment>}
40
+ * @memberof AssistantTranscriptMessage
41
+ */
42
+ attachments: Array<AssistantChatPollAttachment>;
43
+ /**
44
+ *
45
+ * @type {string}
46
+ * @memberof AssistantTranscriptMessage
47
+ */
48
+ createdAt: string;
49
+ /**
50
+ * Whether the tool call a tool message answers failed: the tool refused it, returned an error, or was not available.
51
+ * @type {boolean}
52
+ * @memberof AssistantTranscriptMessage
53
+ */
54
+ failed: boolean;
55
+ /**
56
+ * The message's index in the conversation. A poll's message ids start with it.
57
+ * @type {string}
58
+ * @memberof AssistantTranscriptMessage
59
+ */
60
+ id: string;
61
+ /**
62
+ * Why a notice was given, as the id a poll shows it with.
63
+ * @type {string}
64
+ * @memberof AssistantTranscriptMessage
65
+ */
66
+ reason: string;
67
+ /**
68
+ *
69
+ * @type {string}
70
+ * @memberof AssistantTranscriptMessage
71
+ */
72
+ requestId: string;
73
+ /**
74
+ *
75
+ * @type {string}
76
+ * @memberof AssistantTranscriptMessage
77
+ */
78
+ role: AssistantTranscriptMessageRoleEnum;
79
+ /**
80
+ * For a tool message, the result the assistant was given.
81
+ * @type {string}
82
+ * @memberof AssistantTranscriptMessage
83
+ */
84
+ text: string;
85
+ /**
86
+ * The id of the tool call a tool message is the result of.
87
+ * @type {string}
88
+ * @memberof AssistantTranscriptMessage
89
+ */
90
+ toolCallId: string;
91
+ /**
92
+ * The tools an assistant message called. Empty on every other message.
93
+ * @type {Array<AssistantTranscriptToolCall>}
94
+ * @memberof AssistantTranscriptMessage
95
+ */
96
+ toolCalls: Array<AssistantTranscriptToolCall>;
97
+ }
98
+
99
+
100
+ /**
101
+ * @export
102
+ */
103
+ export const AssistantTranscriptMessageRoleEnum = {
104
+ User: 'user',
105
+ Assistant: 'assistant',
106
+ Tool: 'tool',
107
+ Notice: 'notice'
108
+ } as const;
109
+ export type AssistantTranscriptMessageRoleEnum = typeof AssistantTranscriptMessageRoleEnum[keyof typeof AssistantTranscriptMessageRoleEnum];
110
+
111
+
112
+ /**
113
+ * Check if a given object implements the AssistantTranscriptMessage interface.
114
+ */
115
+ export function instanceOfAssistantTranscriptMessage(value: object): value is AssistantTranscriptMessage {
116
+ if (!('attachments' in value) || value['attachments'] === undefined) return false;
117
+ if (!('createdAt' in value) || value['createdAt'] === undefined) return false;
118
+ if (!('failed' in value) || value['failed'] === undefined) return false;
119
+ if (!('id' in value) || value['id'] === undefined) return false;
120
+ if (!('reason' in value) || value['reason'] === undefined) return false;
121
+ if (!('requestId' in value) || value['requestId'] === undefined) return false;
122
+ if (!('role' in value) || value['role'] === undefined) return false;
123
+ if (!('text' in value) || value['text'] === undefined) return false;
124
+ if (!('toolCallId' in value) || value['toolCallId'] === undefined) return false;
125
+ if (!('toolCalls' in value) || value['toolCalls'] === undefined) return false;
126
+ return true;
127
+ }
128
+
129
+ export function AssistantTranscriptMessageFromJSON(json: any): AssistantTranscriptMessage {
130
+ return AssistantTranscriptMessageFromJSONTyped(json, false);
131
+ }
132
+
133
+ export function AssistantTranscriptMessageFromJSONTyped(json: any, ignoreDiscriminator: boolean): AssistantTranscriptMessage {
134
+ if (json == null) {
135
+ return json;
136
+ }
137
+ return {
138
+
139
+ 'attachments': ((json['attachments'] as Array<any>).map(AssistantChatPollAttachmentFromJSON)),
140
+ 'createdAt': json['createdAt'],
141
+ 'failed': json['failed'],
142
+ 'id': json['id'],
143
+ 'reason': json['reason'],
144
+ 'requestId': json['requestId'],
145
+ 'role': json['role'],
146
+ 'text': json['text'],
147
+ 'toolCallId': json['toolCallId'],
148
+ 'toolCalls': ((json['toolCalls'] as Array<any>).map(AssistantTranscriptToolCallFromJSON)),
149
+ };
150
+ }
151
+
152
+ export function AssistantTranscriptMessageToJSON(json: any): AssistantTranscriptMessage {
153
+ return AssistantTranscriptMessageToJSONTyped(json, false);
154
+ }
155
+
156
+ export function AssistantTranscriptMessageToJSONTyped(value?: AssistantTranscriptMessage | null, ignoreDiscriminator: boolean = false): any {
157
+ if (value == null) {
158
+ return value;
159
+ }
160
+
161
+ return {
162
+
163
+ 'attachments': ((value['attachments'] as Array<any>).map(AssistantChatPollAttachmentToJSON)),
164
+ 'createdAt': value['createdAt'],
165
+ 'failed': value['failed'],
166
+ 'id': value['id'],
167
+ 'reason': value['reason'],
168
+ 'requestId': value['requestId'],
169
+ 'role': value['role'],
170
+ 'text': value['text'],
171
+ 'toolCallId': value['toolCallId'],
172
+ 'toolCalls': ((value['toolCalls'] as Array<any>).map(AssistantTranscriptToolCallToJSON)),
173
+ };
174
+ }
175
+
@@ -0,0 +1,84 @@
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 AssistantTranscriptToolCall
20
+ */
21
+ export interface AssistantTranscriptToolCall {
22
+ /**
23
+ * The call's JSON arguments.
24
+ * @type {string}
25
+ * @memberof AssistantTranscriptToolCall
26
+ */
27
+ arguments: string;
28
+ /**
29
+ *
30
+ * @type {string}
31
+ * @memberof AssistantTranscriptToolCall
32
+ */
33
+ id: string;
34
+ /**
35
+ *
36
+ * @type {string}
37
+ * @memberof AssistantTranscriptToolCall
38
+ */
39
+ name: string;
40
+ }
41
+
42
+ /**
43
+ * Check if a given object implements the AssistantTranscriptToolCall interface.
44
+ */
45
+ export function instanceOfAssistantTranscriptToolCall(value: object): value is AssistantTranscriptToolCall {
46
+ if (!('arguments' in value) || value['arguments'] === undefined) return false;
47
+ if (!('id' in value) || value['id'] === undefined) return false;
48
+ if (!('name' in value) || value['name'] === undefined) return false;
49
+ return true;
50
+ }
51
+
52
+ export function AssistantTranscriptToolCallFromJSON(json: any): AssistantTranscriptToolCall {
53
+ return AssistantTranscriptToolCallFromJSONTyped(json, false);
54
+ }
55
+
56
+ export function AssistantTranscriptToolCallFromJSONTyped(json: any, ignoreDiscriminator: boolean): AssistantTranscriptToolCall {
57
+ if (json == null) {
58
+ return json;
59
+ }
60
+ return {
61
+
62
+ 'arguments': json['arguments'],
63
+ 'id': json['id'],
64
+ 'name': json['name'],
65
+ };
66
+ }
67
+
68
+ export function AssistantTranscriptToolCallToJSON(json: any): AssistantTranscriptToolCall {
69
+ return AssistantTranscriptToolCallToJSONTyped(json, false);
70
+ }
71
+
72
+ export function AssistantTranscriptToolCallToJSONTyped(value?: AssistantTranscriptToolCall | null, ignoreDiscriminator: boolean = false): any {
73
+ if (value == null) {
74
+ return value;
75
+ }
76
+
77
+ return {
78
+
79
+ 'arguments': value['arguments'],
80
+ 'id': value['id'],
81
+ 'name': value['name'],
82
+ };
83
+ }
84
+
@@ -0,0 +1,112 @@
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 ScriptAuditEntry
20
+ */
21
+ export interface ScriptAuditEntry {
22
+ /**
23
+ *
24
+ * @type {string}
25
+ * @memberof ScriptAuditEntry
26
+ */
27
+ actorType: ScriptAuditEntryActorTypeEnum;
28
+ /**
29
+ * What changed, for example created, updated, api-key-rotated or needs-reauthorisation.
30
+ * @type {string}
31
+ * @memberof ScriptAuditEntry
32
+ */
33
+ kind: string;
34
+ /**
35
+ *
36
+ * @type {Date}
37
+ * @memberof ScriptAuditEntry
38
+ */
39
+ modifiedAt: Date;
40
+ /**
41
+ * User who made the change, when actorType is user.
42
+ * @type {number}
43
+ * @memberof ScriptAuditEntry
44
+ */
45
+ modifiedBy?: number;
46
+ /**
47
+ *
48
+ * @type {{ [key: string]: string; }}
49
+ * @memberof ScriptAuditEntry
50
+ */
51
+ params?: { [key: string]: string; };
52
+ }
53
+
54
+
55
+ /**
56
+ * @export
57
+ */
58
+ export const ScriptAuditEntryActorTypeEnum = {
59
+ User: 'user',
60
+ System: 'system',
61
+ Anonymous: 'anonymous'
62
+ } as const;
63
+ export type ScriptAuditEntryActorTypeEnum = typeof ScriptAuditEntryActorTypeEnum[keyof typeof ScriptAuditEntryActorTypeEnum];
64
+
65
+
66
+ /**
67
+ * Check if a given object implements the ScriptAuditEntry interface.
68
+ */
69
+ export function instanceOfScriptAuditEntry(value: object): value is ScriptAuditEntry {
70
+ if (!('actorType' in value) || value['actorType'] === undefined) return false;
71
+ if (!('kind' in value) || value['kind'] === undefined) return false;
72
+ if (!('modifiedAt' in value) || value['modifiedAt'] === undefined) return false;
73
+ return true;
74
+ }
75
+
76
+ export function ScriptAuditEntryFromJSON(json: any): ScriptAuditEntry {
77
+ return ScriptAuditEntryFromJSONTyped(json, false);
78
+ }
79
+
80
+ export function ScriptAuditEntryFromJSONTyped(json: any, ignoreDiscriminator: boolean): ScriptAuditEntry {
81
+ if (json == null) {
82
+ return json;
83
+ }
84
+ return {
85
+
86
+ 'actorType': json['actorType'],
87
+ 'kind': json['kind'],
88
+ 'modifiedAt': (new Date(json['modifiedAt'])),
89
+ 'modifiedBy': json['modifiedBy'] == null ? undefined : json['modifiedBy'],
90
+ 'params': json['params'] == null ? undefined : json['params'],
91
+ };
92
+ }
93
+
94
+ export function ScriptAuditEntryToJSON(json: any): ScriptAuditEntry {
95
+ return ScriptAuditEntryToJSONTyped(json, false);
96
+ }
97
+
98
+ export function ScriptAuditEntryToJSONTyped(value?: ScriptAuditEntry | null, ignoreDiscriminator: boolean = false): any {
99
+ if (value == null) {
100
+ return value;
101
+ }
102
+
103
+ return {
104
+
105
+ 'actorType': value['actorType'],
106
+ 'kind': value['kind'],
107
+ 'modifiedAt': ((value['modifiedAt']).toISOString()),
108
+ 'modifiedBy': value['modifiedBy'],
109
+ 'params': value['params'],
110
+ };
111
+ }
112
+
@@ -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
+
15
+ import { mapValues } from '../runtime';
16
+ import type { ScriptAuditEntry } from './ScriptAuditEntry';
17
+ import {
18
+ ScriptAuditEntryFromJSON,
19
+ ScriptAuditEntryFromJSONTyped,
20
+ ScriptAuditEntryToJSON,
21
+ ScriptAuditEntryToJSONTyped,
22
+ } from './ScriptAuditEntry';
23
+
24
+ /**
25
+ *
26
+ * @export
27
+ * @interface ScriptAuditResBody
28
+ */
29
+ export interface ScriptAuditResBody {
30
+ /**
31
+ *
32
+ * @type {Array<ScriptAuditEntry>}
33
+ * @memberof ScriptAuditResBody
34
+ */
35
+ entries: Array<ScriptAuditEntry>;
36
+ /**
37
+ *
38
+ * @type {string}
39
+ * @memberof ScriptAuditResBody
40
+ */
41
+ nextCursor?: string;
42
+ }
43
+
44
+ /**
45
+ * Check if a given object implements the ScriptAuditResBody interface.
46
+ */
47
+ export function instanceOfScriptAuditResBody(value: object): value is ScriptAuditResBody {
48
+ if (!('entries' in value) || value['entries'] === undefined) return false;
49
+ return true;
50
+ }
51
+
52
+ export function ScriptAuditResBodyFromJSON(json: any): ScriptAuditResBody {
53
+ return ScriptAuditResBodyFromJSONTyped(json, false);
54
+ }
55
+
56
+ export function ScriptAuditResBodyFromJSONTyped(json: any, ignoreDiscriminator: boolean): ScriptAuditResBody {
57
+ if (json == null) {
58
+ return json;
59
+ }
60
+ return {
61
+
62
+ 'entries': ((json['entries'] as Array<any>).map(ScriptAuditEntryFromJSON)),
63
+ 'nextCursor': json['nextCursor'] == null ? undefined : json['nextCursor'],
64
+ };
65
+ }
66
+
67
+ export function ScriptAuditResBodyToJSON(json: any): ScriptAuditResBody {
68
+ return ScriptAuditResBodyToJSONTyped(json, false);
69
+ }
70
+
71
+ export function ScriptAuditResBodyToJSONTyped(value?: ScriptAuditResBody | null, ignoreDiscriminator: boolean = false): any {
72
+ if (value == null) {
73
+ return value;
74
+ }
75
+
76
+ return {
77
+
78
+ 'entries': ((value['entries'] as Array<any>).map(ScriptAuditEntryToJSON)),
79
+ 'nextCursor': value['nextCursor'],
80
+ };
81
+ }
82
+