@crestal/nation-sdk 0.1.19

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 (61) hide show
  1. package/.openapi-generator/FILES +51 -0
  2. package/.openapi-generator/VERSION +1 -0
  3. package/.openapi-generator-ignore +23 -0
  4. package/README.md +126 -0
  5. package/api.ts +4195 -0
  6. package/base.ts +86 -0
  7. package/common.ts +150 -0
  8. package/configuration.ts +115 -0
  9. package/dist/api.d.ts +3103 -0
  10. package/dist/api.js +2629 -0
  11. package/dist/base.d.ts +66 -0
  12. package/dist/base.js +86 -0
  13. package/dist/common.d.ts +65 -0
  14. package/dist/common.js +253 -0
  15. package/dist/configuration.d.ts +91 -0
  16. package/dist/configuration.js +57 -0
  17. package/dist/index.d.ts +13 -0
  18. package/dist/index.js +31 -0
  19. package/docs/AgentApi.md +167 -0
  20. package/docs/AgentAutonomous.md +33 -0
  21. package/docs/AgentExample.md +25 -0
  22. package/docs/AgentResponse.md +91 -0
  23. package/docs/AgentStatisticsResponse.md +49 -0
  24. package/docs/AgentUpdate.md +91 -0
  25. package/docs/AuthorType.md +23 -0
  26. package/docs/Chat.md +33 -0
  27. package/docs/ChatApi.md +516 -0
  28. package/docs/ChatMessage.md +63 -0
  29. package/docs/ChatMessageAttachment.md +23 -0
  30. package/docs/ChatMessageAttachmentType.md +13 -0
  31. package/docs/ChatMessageRequest.md +31 -0
  32. package/docs/ChatMessageSkillCall.md +35 -0
  33. package/docs/ChatMessagesResponse.md +25 -0
  34. package/docs/ChatUpdateRequest.md +21 -0
  35. package/docs/CreditAccount.md +45 -0
  36. package/docs/CreditApi.md +290 -0
  37. package/docs/CreditDebit.md +11 -0
  38. package/docs/CreditEvent.md +101 -0
  39. package/docs/CreditEventWithAgent.md +103 -0
  40. package/docs/CreditEventsResponse.md +25 -0
  41. package/docs/CreditTransactionResp.md +37 -0
  42. package/docs/CreditTransactionsResponse.md +25 -0
  43. package/docs/CreditType.md +13 -0
  44. package/docs/Direction.md +11 -0
  45. package/docs/EventType.md +31 -0
  46. package/docs/FeePercentage.md +19 -0
  47. package/docs/HTTPValidationError.md +20 -0
  48. package/docs/HealthApi.md +52 -0
  49. package/docs/LLMModelInfoWithProviderName.md +67 -0
  50. package/docs/LLMProvider.md +18 -0
  51. package/docs/MetadataApi.md +258 -0
  52. package/docs/OwnerType.md +13 -0
  53. package/docs/Skill.md +43 -0
  54. package/docs/TransactionType.md +39 -0
  55. package/docs/UpstreamType.md +15 -0
  56. package/docs/ValidationError.md +24 -0
  57. package/docs/ValidationErrorLocInner.md +18 -0
  58. package/git_push.sh +57 -0
  59. package/index.ts +18 -0
  60. package/package.json +31 -0
  61. package/tsconfig.json +21 -0
@@ -0,0 +1,516 @@
1
+ # ChatApi
2
+
3
+ All URIs are relative to *http://localhost*
4
+
5
+ |Method | HTTP request | Description|
6
+ |------------- | ------------- | -------------|
7
+ |[**createChatThread**](#createchatthread) | **POST** /agents/{aid}/chats | Create a new chat thread|
8
+ |[**deleteChatThread**](#deletechatthread) | **DELETE** /agents/{aid}/chats/{chat_id} | Delete a chat thread|
9
+ |[**getChatThreadById**](#getchatthreadbyid) | **GET** /agents/{aid}/chats/{chat_id} | Get chat thread by ID|
10
+ |[**getMessageById**](#getmessagebyid) | **GET** /messages/{message_id} | Get message by ID|
11
+ |[**listChatsForAgent**](#listchatsforagent) | **GET** /agents/{aid}/chats | List chat threads for an agent|
12
+ |[**listMessagesInChat**](#listmessagesinchat) | **GET** /agents/{aid}/chats/{chat_id}/messages | List messages in a chat thread|
13
+ |[**retryMessageInChat**](#retrymessageinchat) | **POST** /agents/{aid}/chats/{chat_id}/messages/retry | Retry a message in a chat thread|
14
+ |[**sendMessageToChat**](#sendmessagetochat) | **POST** /agents/{aid}/chats/{chat_id}/messages | Send a message to a chat thread|
15
+ |[**updateChatThread**](#updatechatthread) | **PATCH** /agents/{aid}/chats/{chat_id} | Update a chat thread|
16
+
17
+ # **createChatThread**
18
+ > Chat createChatThread()
19
+
20
+ Create a new chat thread for a specific agent and user.
21
+
22
+ ### Example
23
+
24
+ ```typescript
25
+ import {
26
+ ChatApi,
27
+ Configuration
28
+ } from '@crestal/nation-sdk';
29
+
30
+ const configuration = new Configuration();
31
+ const apiInstance = new ChatApi(configuration);
32
+
33
+ let aid: string; //Agent ID (default to undefined)
34
+
35
+ const { status, data } = await apiInstance.createChatThread(
36
+ aid
37
+ );
38
+ ```
39
+
40
+ ### Parameters
41
+
42
+ |Name | Type | Description | Notes|
43
+ |------------- | ------------- | ------------- | -------------|
44
+ | **aid** | [**string**] | Agent ID | defaults to undefined|
45
+
46
+
47
+ ### Return type
48
+
49
+ **Chat**
50
+
51
+ ### Authorization
52
+
53
+ [HTTPBearer](../README.md#HTTPBearer)
54
+
55
+ ### HTTP request headers
56
+
57
+ - **Content-Type**: Not defined
58
+ - **Accept**: application/json
59
+
60
+
61
+ ### HTTP response details
62
+ | Status code | Description | Response headers |
63
+ |-------------|-------------|------------------|
64
+ |**200** | Successful Response | - |
65
+ |**422** | Validation Error | - |
66
+
67
+ [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
68
+
69
+ # **deleteChatThread**
70
+ > deleteChatThread()
71
+
72
+ Delete a specific chat thread for the current user and agent. Returns 404 if not found or not owned by the user.
73
+
74
+ ### Example
75
+
76
+ ```typescript
77
+ import {
78
+ ChatApi,
79
+ Configuration
80
+ } from '@crestal/nation-sdk';
81
+
82
+ const configuration = new Configuration();
83
+ const apiInstance = new ChatApi(configuration);
84
+
85
+ let aid: string; //Agent ID (default to undefined)
86
+ let chatId: string; //Chat ID (default to undefined)
87
+
88
+ const { status, data } = await apiInstance.deleteChatThread(
89
+ aid,
90
+ chatId
91
+ );
92
+ ```
93
+
94
+ ### Parameters
95
+
96
+ |Name | Type | Description | Notes|
97
+ |------------- | ------------- | ------------- | -------------|
98
+ | **aid** | [**string**] | Agent ID | defaults to undefined|
99
+ | **chatId** | [**string**] | Chat ID | defaults to undefined|
100
+
101
+
102
+ ### Return type
103
+
104
+ void (empty response body)
105
+
106
+ ### Authorization
107
+
108
+ [HTTPBearer](../README.md#HTTPBearer)
109
+
110
+ ### HTTP request headers
111
+
112
+ - **Content-Type**: Not defined
113
+ - **Accept**: application/json
114
+
115
+
116
+ ### HTTP response details
117
+ | Status code | Description | Response headers |
118
+ |-------------|-------------|------------------|
119
+ |**204** | Successful Response | - |
120
+ |**422** | Validation Error | - |
121
+
122
+ [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
123
+
124
+ # **getChatThreadById**
125
+ > Chat getChatThreadById()
126
+
127
+ Retrieve a specific chat thread by its ID for the current user and agent. Returns 404 if not found or not owned by the user.
128
+
129
+ ### Example
130
+
131
+ ```typescript
132
+ import {
133
+ ChatApi,
134
+ Configuration
135
+ } from '@crestal/nation-sdk';
136
+
137
+ const configuration = new Configuration();
138
+ const apiInstance = new ChatApi(configuration);
139
+
140
+ let aid: string; //Agent ID (default to undefined)
141
+ let chatId: string; //Chat ID (default to undefined)
142
+
143
+ const { status, data } = await apiInstance.getChatThreadById(
144
+ aid,
145
+ chatId
146
+ );
147
+ ```
148
+
149
+ ### Parameters
150
+
151
+ |Name | Type | Description | Notes|
152
+ |------------- | ------------- | ------------- | -------------|
153
+ | **aid** | [**string**] | Agent ID | defaults to undefined|
154
+ | **chatId** | [**string**] | Chat ID | defaults to undefined|
155
+
156
+
157
+ ### Return type
158
+
159
+ **Chat**
160
+
161
+ ### Authorization
162
+
163
+ [HTTPBearer](../README.md#HTTPBearer)
164
+
165
+ ### HTTP request headers
166
+
167
+ - **Content-Type**: Not defined
168
+ - **Accept**: application/json
169
+
170
+
171
+ ### HTTP response details
172
+ | Status code | Description | Response headers |
173
+ |-------------|-------------|------------------|
174
+ |**200** | Successful Response | - |
175
+ |**422** | Validation Error | - |
176
+
177
+ [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
178
+
179
+ # **getMessageById**
180
+ > ChatMessage getMessageById()
181
+
182
+ Retrieve a specific chat message by its ID for the current user. Returns 404 if not found or not owned by the user.
183
+
184
+ ### Example
185
+
186
+ ```typescript
187
+ import {
188
+ ChatApi,
189
+ Configuration
190
+ } from '@crestal/nation-sdk';
191
+
192
+ const configuration = new Configuration();
193
+ const apiInstance = new ChatApi(configuration);
194
+
195
+ let messageId: string; //Message ID (default to undefined)
196
+
197
+ const { status, data } = await apiInstance.getMessageById(
198
+ messageId
199
+ );
200
+ ```
201
+
202
+ ### Parameters
203
+
204
+ |Name | Type | Description | Notes|
205
+ |------------- | ------------- | ------------- | -------------|
206
+ | **messageId** | [**string**] | Message ID | defaults to undefined|
207
+
208
+
209
+ ### Return type
210
+
211
+ **ChatMessage**
212
+
213
+ ### Authorization
214
+
215
+ [HTTPBearer](../README.md#HTTPBearer)
216
+
217
+ ### HTTP request headers
218
+
219
+ - **Content-Type**: Not defined
220
+ - **Accept**: application/json
221
+
222
+
223
+ ### HTTP response details
224
+ | Status code | Description | Response headers |
225
+ |-------------|-------------|------------------|
226
+ |**200** | Successful Response | - |
227
+ |**422** | Validation Error | - |
228
+
229
+ [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
230
+
231
+ # **listChatsForAgent**
232
+ > Array<Chat> listChatsForAgent()
233
+
234
+ Retrieve all chat threads associated with a specific agent for the current user.
235
+
236
+ ### Example
237
+
238
+ ```typescript
239
+ import {
240
+ ChatApi,
241
+ Configuration
242
+ } from '@crestal/nation-sdk';
243
+
244
+ const configuration = new Configuration();
245
+ const apiInstance = new ChatApi(configuration);
246
+
247
+ let aid: string; //Agent ID (default to undefined)
248
+
249
+ const { status, data } = await apiInstance.listChatsForAgent(
250
+ aid
251
+ );
252
+ ```
253
+
254
+ ### Parameters
255
+
256
+ |Name | Type | Description | Notes|
257
+ |------------- | ------------- | ------------- | -------------|
258
+ | **aid** | [**string**] | Agent ID | defaults to undefined|
259
+
260
+
261
+ ### Return type
262
+
263
+ **Array<Chat>**
264
+
265
+ ### Authorization
266
+
267
+ [HTTPBearer](../README.md#HTTPBearer)
268
+
269
+ ### HTTP request headers
270
+
271
+ - **Content-Type**: Not defined
272
+ - **Accept**: application/json
273
+
274
+
275
+ ### HTTP response details
276
+ | Status code | Description | Response headers |
277
+ |-------------|-------------|------------------|
278
+ |**200** | Successful Response | - |
279
+ |**422** | Validation Error | - |
280
+
281
+ [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
282
+
283
+ # **listMessagesInChat**
284
+ > ChatMessagesResponse listMessagesInChat()
285
+
286
+ Retrieve the message history for a specific chat thread with cursor-based pagination.
287
+
288
+ ### Example
289
+
290
+ ```typescript
291
+ import {
292
+ ChatApi,
293
+ Configuration
294
+ } from '@crestal/nation-sdk';
295
+
296
+ const configuration = new Configuration();
297
+ const apiInstance = new ChatApi(configuration);
298
+
299
+ let aid: string; //Agent ID (default to undefined)
300
+ let chatId: string; //Chat ID (default to undefined)
301
+ let cursor: string; //Cursor for pagination (message id) (optional) (default to undefined)
302
+ let limit: number; //Maximum number of messages to return (optional) (default to 20)
303
+
304
+ const { status, data } = await apiInstance.listMessagesInChat(
305
+ aid,
306
+ chatId,
307
+ cursor,
308
+ limit
309
+ );
310
+ ```
311
+
312
+ ### Parameters
313
+
314
+ |Name | Type | Description | Notes|
315
+ |------------- | ------------- | ------------- | -------------|
316
+ | **aid** | [**string**] | Agent ID | defaults to undefined|
317
+ | **chatId** | [**string**] | Chat ID | defaults to undefined|
318
+ | **cursor** | [**string**] | Cursor for pagination (message id) | (optional) defaults to undefined|
319
+ | **limit** | [**number**] | Maximum number of messages to return | (optional) defaults to 20|
320
+
321
+
322
+ ### Return type
323
+
324
+ **ChatMessagesResponse**
325
+
326
+ ### Authorization
327
+
328
+ [HTTPBearer](../README.md#HTTPBearer)
329
+
330
+ ### HTTP request headers
331
+
332
+ - **Content-Type**: Not defined
333
+ - **Accept**: application/json
334
+
335
+
336
+ ### HTTP response details
337
+ | Status code | Description | Response headers |
338
+ |-------------|-------------|------------------|
339
+ |**200** | Successful Response | - |
340
+ |**422** | Validation Error | - |
341
+
342
+ [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
343
+
344
+ # **retryMessageInChat**
345
+ > Array<ChatMessage> retryMessageInChat()
346
+
347
+ Retry sending the last message in a specific chat thread. If the last message is from an agent/system, returns all messages after the last user message. If the last message is from a user, generates a new agent response. Only works with non-streaming mode.
348
+
349
+ ### Example
350
+
351
+ ```typescript
352
+ import {
353
+ ChatApi,
354
+ Configuration
355
+ } from '@crestal/nation-sdk';
356
+
357
+ const configuration = new Configuration();
358
+ const apiInstance = new ChatApi(configuration);
359
+
360
+ let aid: string; //Agent ID (default to undefined)
361
+ let chatId: string; //Chat ID (default to undefined)
362
+
363
+ const { status, data } = await apiInstance.retryMessageInChat(
364
+ aid,
365
+ chatId
366
+ );
367
+ ```
368
+
369
+ ### Parameters
370
+
371
+ |Name | Type | Description | Notes|
372
+ |------------- | ------------- | ------------- | -------------|
373
+ | **aid** | [**string**] | Agent ID | defaults to undefined|
374
+ | **chatId** | [**string**] | Chat ID | defaults to undefined|
375
+
376
+
377
+ ### Return type
378
+
379
+ **Array<ChatMessage>**
380
+
381
+ ### Authorization
382
+
383
+ [HTTPBearer](../README.md#HTTPBearer)
384
+
385
+ ### HTTP request headers
386
+
387
+ - **Content-Type**: Not defined
388
+ - **Accept**: application/json
389
+
390
+
391
+ ### HTTP response details
392
+ | Status code | Description | Response headers |
393
+ |-------------|-------------|------------------|
394
+ |**200** | Successful Response | - |
395
+ |**422** | Validation Error | - |
396
+
397
+ [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
398
+
399
+ # **sendMessageToChat**
400
+ > Array<ChatMessage> sendMessageToChat(chatMessageRequest)
401
+
402
+ Send a new message to a specific chat thread. Supports streaming responses if requested.
403
+
404
+ ### Example
405
+
406
+ ```typescript
407
+ import {
408
+ ChatApi,
409
+ Configuration,
410
+ ChatMessageRequest
411
+ } from '@crestal/nation-sdk';
412
+
413
+ const configuration = new Configuration();
414
+ const apiInstance = new ChatApi(configuration);
415
+
416
+ let aid: string; //Agent ID (default to undefined)
417
+ let chatId: string; //Chat ID (default to undefined)
418
+ let chatMessageRequest: ChatMessageRequest; //
419
+
420
+ const { status, data } = await apiInstance.sendMessageToChat(
421
+ aid,
422
+ chatId,
423
+ chatMessageRequest
424
+ );
425
+ ```
426
+
427
+ ### Parameters
428
+
429
+ |Name | Type | Description | Notes|
430
+ |------------- | ------------- | ------------- | -------------|
431
+ | **chatMessageRequest** | **ChatMessageRequest**| | |
432
+ | **aid** | [**string**] | Agent ID | defaults to undefined|
433
+ | **chatId** | [**string**] | Chat ID | defaults to undefined|
434
+
435
+
436
+ ### Return type
437
+
438
+ **Array<ChatMessage>**
439
+
440
+ ### Authorization
441
+
442
+ [HTTPBearer](../README.md#HTTPBearer)
443
+
444
+ ### HTTP request headers
445
+
446
+ - **Content-Type**: application/json
447
+ - **Accept**: application/json
448
+
449
+
450
+ ### HTTP response details
451
+ | Status code | Description | Response headers |
452
+ |-------------|-------------|------------------|
453
+ |**200** | Successful Response | - |
454
+ |**422** | Validation Error | - |
455
+
456
+ [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
457
+
458
+ # **updateChatThread**
459
+ > Chat updateChatThread(chatUpdateRequest)
460
+
461
+ Update details of a specific chat thread. Currently only supports updating the summary.
462
+
463
+ ### Example
464
+
465
+ ```typescript
466
+ import {
467
+ ChatApi,
468
+ Configuration,
469
+ ChatUpdateRequest
470
+ } from '@crestal/nation-sdk';
471
+
472
+ const configuration = new Configuration();
473
+ const apiInstance = new ChatApi(configuration);
474
+
475
+ let aid: string; //Agent ID (default to undefined)
476
+ let chatId: string; //Chat ID (default to undefined)
477
+ let chatUpdateRequest: ChatUpdateRequest; //
478
+
479
+ const { status, data } = await apiInstance.updateChatThread(
480
+ aid,
481
+ chatId,
482
+ chatUpdateRequest
483
+ );
484
+ ```
485
+
486
+ ### Parameters
487
+
488
+ |Name | Type | Description | Notes|
489
+ |------------- | ------------- | ------------- | -------------|
490
+ | **chatUpdateRequest** | **ChatUpdateRequest**| | |
491
+ | **aid** | [**string**] | Agent ID | defaults to undefined|
492
+ | **chatId** | [**string**] | Chat ID | defaults to undefined|
493
+
494
+
495
+ ### Return type
496
+
497
+ **Chat**
498
+
499
+ ### Authorization
500
+
501
+ [HTTPBearer](../README.md#HTTPBearer)
502
+
503
+ ### HTTP request headers
504
+
505
+ - **Content-Type**: application/json
506
+ - **Accept**: application/json
507
+
508
+
509
+ ### HTTP response details
510
+ | Status code | Description | Response headers |
511
+ |-------------|-------------|------------------|
512
+ |**200** | Successful Response | - |
513
+ |**422** | Validation Error | - |
514
+
515
+ [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
516
+
@@ -0,0 +1,63 @@
1
+ # ChatMessage
2
+
3
+ Chat message model with all fields including server-generated ones.
4
+
5
+ ## Properties
6
+
7
+ Name | Type | Description | Notes
8
+ ------------ | ------------- | ------------- | -------------
9
+ **id** | **string** | Unique identifier for the chat message | [optional] [default to undefined]
10
+ **agent_id** | **string** | ID of the agent this message belongs to | [default to undefined]
11
+ **chat_id** | **string** | ID of the chat this message belongs to | [default to undefined]
12
+ **user_id** | **string** | | [default to undefined]
13
+ **author_id** | **string** | ID of the message author | [default to undefined]
14
+ **author_type** | [**AuthorType**](AuthorType.md) | Type of the message author | [default to undefined]
15
+ **model** | **string** | | [optional] [default to undefined]
16
+ **thread_type** | [**AuthorType**](AuthorType.md) | | [optional] [default to undefined]
17
+ **reply_to** | **string** | | [optional] [default to undefined]
18
+ **message** | **string** | Content of the message | [default to undefined]
19
+ **attachments** | [**Array&lt;ChatMessageAttachment&gt;**](ChatMessageAttachment.md) | | [optional] [default to undefined]
20
+ **skill_calls** | [**Array&lt;ChatMessageSkillCall&gt;**](ChatMessageSkillCall.md) | | [optional] [default to undefined]
21
+ **input_tokens** | **number** | Number of tokens in the input message | [optional] [default to 0]
22
+ **output_tokens** | **number** | Number of tokens in the output message | [optional] [default to 0]
23
+ **time_cost** | **number** | Time cost for the message in seconds | [optional] [default to 0.0]
24
+ **credit_event_id** | **string** | | [optional] [default to undefined]
25
+ **credit_cost** | **string** | | [optional] [default to undefined]
26
+ **cold_start_cost** | **number** | Cost for the cold start of the message in seconds | [optional] [default to 0.0]
27
+ **app_id** | **string** | | [optional] [default to undefined]
28
+ **search_mode** | **boolean** | | [optional] [default to undefined]
29
+ **super_mode** | **boolean** | | [optional] [default to undefined]
30
+ **created_at** | **string** | Timestamp when this message was created | [default to undefined]
31
+
32
+ ## Example
33
+
34
+ ```typescript
35
+ import { ChatMessage } from '@crestal/nation-sdk';
36
+
37
+ const instance: ChatMessage = {
38
+ id,
39
+ agent_id,
40
+ chat_id,
41
+ user_id,
42
+ author_id,
43
+ author_type,
44
+ model,
45
+ thread_type,
46
+ reply_to,
47
+ message,
48
+ attachments,
49
+ skill_calls,
50
+ input_tokens,
51
+ output_tokens,
52
+ time_cost,
53
+ credit_event_id,
54
+ credit_cost,
55
+ cold_start_cost,
56
+ app_id,
57
+ search_mode,
58
+ super_mode,
59
+ created_at,
60
+ };
61
+ ```
62
+
63
+ [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
@@ -0,0 +1,23 @@
1
+ # ChatMessageAttachment
2
+
3
+ Chat message attachment model. An attachment can be a link, image, or file that is associated with a chat message.
4
+
5
+ ## Properties
6
+
7
+ Name | Type | Description | Notes
8
+ ------------ | ------------- | ------------- | -------------
9
+ **type** | [**ChatMessageAttachmentType**](ChatMessageAttachmentType.md) | Type of the attachment (link, image, or file) | [default to undefined]
10
+ **url** | **string** | URL of the attachment | [default to undefined]
11
+
12
+ ## Example
13
+
14
+ ```typescript
15
+ import { ChatMessageAttachment } from '@crestal/nation-sdk';
16
+
17
+ const instance: ChatMessageAttachment = {
18
+ type,
19
+ url,
20
+ };
21
+ ```
22
+
23
+ [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
@@ -0,0 +1,13 @@
1
+ # ChatMessageAttachmentType
2
+
3
+ Type of chat message attachment.
4
+
5
+ ## Enum
6
+
7
+ * `Link` (value: `'link'`)
8
+
9
+ * `Image` (value: `'image'`)
10
+
11
+ * `File` (value: `'file'`)
12
+
13
+ [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
@@ -0,0 +1,31 @@
1
+ # ChatMessageRequest
2
+
3
+ Request model for chat messages. This model represents the request body for creating a new chat message. It contains the necessary fields to identify the chat context and message content, along with optional attachments. The user ID is obtained from authentication and not included in the request body.
4
+
5
+ ## Properties
6
+
7
+ Name | Type | Description | Notes
8
+ ------------ | ------------- | ------------- | -------------
9
+ **app_id** | **string** | | [optional] [default to undefined]
10
+ **message** | **string** | Content of the message | [default to undefined]
11
+ **stream** | **boolean** | | [optional] [default to undefined]
12
+ **search_mode** | **boolean** | | [optional] [default to undefined]
13
+ **super_mode** | **boolean** | | [optional] [default to undefined]
14
+ **attachments** | [**Array&lt;ChatMessageAttachment&gt;**](ChatMessageAttachment.md) | | [optional] [default to undefined]
15
+
16
+ ## Example
17
+
18
+ ```typescript
19
+ import { ChatMessageRequest } from '@crestal/nation-sdk';
20
+
21
+ const instance: ChatMessageRequest = {
22
+ app_id,
23
+ message,
24
+ stream,
25
+ search_mode,
26
+ super_mode,
27
+ attachments,
28
+ };
29
+ ```
30
+
31
+ [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
@@ -0,0 +1,35 @@
1
+ # ChatMessageSkillCall
2
+
3
+ TypedDict for skill call details.
4
+
5
+ ## Properties
6
+
7
+ Name | Type | Description | Notes
8
+ ------------ | ------------- | ------------- | -------------
9
+ **id** | **string** | | [optional] [default to undefined]
10
+ **name** | **string** | | [default to undefined]
11
+ **parameters** | **object** | | [default to undefined]
12
+ **success** | **boolean** | | [default to undefined]
13
+ **response** | **string** | | [optional] [default to undefined]
14
+ **error_message** | **string** | | [optional] [default to undefined]
15
+ **credit_event_id** | **string** | | [optional] [default to undefined]
16
+ **credit_cost** | **string** | | [optional] [default to undefined]
17
+
18
+ ## Example
19
+
20
+ ```typescript
21
+ import { ChatMessageSkillCall } from '@crestal/nation-sdk';
22
+
23
+ const instance: ChatMessageSkillCall = {
24
+ id,
25
+ name,
26
+ parameters,
27
+ success,
28
+ response,
29
+ error_message,
30
+ credit_event_id,
31
+ credit_cost,
32
+ };
33
+ ```
34
+
35
+ [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
@@ -0,0 +1,25 @@
1
+ # ChatMessagesResponse
2
+
3
+ Response model for chat messages with pagination.
4
+
5
+ ## Properties
6
+
7
+ Name | Type | Description | Notes
8
+ ------------ | ------------- | ------------- | -------------
9
+ **data** | [**Array&lt;ChatMessage&gt;**](ChatMessage.md) | | [default to undefined]
10
+ **has_more** | **boolean** | | [optional] [default to false]
11
+ **next_cursor** | **string** | | [optional] [default to undefined]
12
+
13
+ ## Example
14
+
15
+ ```typescript
16
+ import { ChatMessagesResponse } from '@crestal/nation-sdk';
17
+
18
+ const instance: ChatMessagesResponse = {
19
+ data,
20
+ has_more,
21
+ next_cursor,
22
+ };
23
+ ```
24
+
25
+ [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)