@spaciv/sdk 0.1.0 → 0.1.1

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.
@@ -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
+
@@ -39,6 +39,9 @@ export * from './AssistantConversationFailureBody';
39
39
  export * from './AssistantConversationListEntry';
40
40
  export * from './AssistantConversationListRes';
41
41
  export * from './AssistantModelListBody';
42
+ export * from './AssistantTranscriptBody';
43
+ export * from './AssistantTranscriptMessage';
44
+ export * from './AssistantTranscriptToolCall';
42
45
  export * from './AuthAPIKeyTokenReqBody';
43
46
  export * from './AuthAPIKeyTokenResBody';
44
47
  export * from './AuthLoginPassReqBody';