@crestal/nation-sdk 0.7.17 → 0.7.18

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.
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- ## @crestal/nation-sdk@0.7.17
1
+ ## @crestal/nation-sdk@0.7.18
2
2
 
3
3
  This generator creates TypeScript/JavaScript client that utilizes [axios](https://github.com/axios/axios). The generated Node module can be used in the following environments:
4
4
 
@@ -36,7 +36,7 @@ navigate to the folder of your consuming project and run one of the following co
36
36
  _published:_
37
37
 
38
38
  ```
39
- npm install @crestal/nation-sdk@0.7.17 --save
39
+ npm install @crestal/nation-sdk@0.7.18 --save
40
40
  ```
41
41
 
42
42
  _unPublished (not recommended):_
@@ -75,8 +75,10 @@ Class | Method | HTTP request | Description
75
75
  *ChatApi* | [**getSkillHistory**](docs/ChatApi.md#getskillhistory) | **GET** /agents/{aid}/skill/history | Skill History
76
76
  *ChatApi* | [**listChatsForAgent**](docs/ChatApi.md#listchatsforagent) | **GET** /agents/{aid}/chats | List chat threads for an agent
77
77
  *ChatApi* | [**listMessagesInChat**](docs/ChatApi.md#listmessagesinchat) | **GET** /agents/{aid}/chats/{chat_id}/messages | List messages in a chat thread
78
+ *ChatApi* | [**listMessagesInDraft**](docs/ChatApi.md#listmessagesindraft) | **GET** /agents/{aid}/draft/messages | List messages in an agent draft session
78
79
  *ChatApi* | [**retryMessageInChat**](docs/ChatApi.md#retrymessageinchat) | **POST** /agents/{aid}/chats/{chat_id}/messages/retry | Retry a message in a chat thread
79
80
  *ChatApi* | [**sendMessageToChat**](docs/ChatApi.md#sendmessagetochat) | **POST** /agents/{aid}/chats/{chat_id}/messages | Send a message to a chat thread
81
+ *ChatApi* | [**sendMessageToDraft**](docs/ChatApi.md#sendmessagetodraft) | **POST** /agents/{aid}/draft/messages | Send a message to an agent draft session
80
82
  *ChatApi* | [**updateChatThread**](docs/ChatApi.md#updatechatthread) | **PATCH** /agents/{aid}/chats/{chat_id} | Update a chat thread
81
83
  *CreditApi* | [**fetchCreditEvent**](docs/CreditApi.md#fetchcreditevent) | **GET** /credit/events/{event_id} | Credit Event
82
84
  *CreditApi* | [**getUserAccount**](docs/CreditApi.md#getuseraccount) | **GET** /credit/user/account | Get User Account
package/api.ts CHANGED
@@ -4,7 +4,7 @@
4
4
  * Nation IntentKit API
5
5
  * API for Nation IntentKit services
6
6
  *
7
- * The version of the OpenAPI document: 0.7.17
7
+ * The version of the OpenAPI document: 0.7.18
8
8
  *
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -5280,6 +5280,54 @@ export const ChatApiAxiosParamCreator = function (configuration?: Configuration)
5280
5280
 
5281
5281
 
5282
5282
 
5283
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
5284
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
5285
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
5286
+
5287
+ return {
5288
+ url: toPathString(localVarUrlObj),
5289
+ options: localVarRequestOptions,
5290
+ };
5291
+ },
5292
+ /**
5293
+ * Retrieve the message history for the draft chat session of an agent with cursor-based pagination.
5294
+ * @summary List messages in an agent draft session
5295
+ * @param {string} aid Agent ID
5296
+ * @param {string | null} [cursor] Cursor for pagination (message id)
5297
+ * @param {number} [limit] Maximum number of messages to return
5298
+ * @param {*} [options] Override http request option.
5299
+ * @throws {RequiredError}
5300
+ */
5301
+ listMessagesInDraft: async (aid: string, cursor?: string | null, limit?: number, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
5302
+ // verify required parameter 'aid' is not null or undefined
5303
+ assertParamExists('listMessagesInDraft', 'aid', aid)
5304
+ const localVarPath = `/agents/{aid}/draft/messages`
5305
+ .replace(`{${"aid"}}`, encodeURIComponent(String(aid)));
5306
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
5307
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
5308
+ let baseOptions;
5309
+ if (configuration) {
5310
+ baseOptions = configuration.baseOptions;
5311
+ }
5312
+
5313
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
5314
+ const localVarHeaderParameter = {} as any;
5315
+ const localVarQueryParameter = {} as any;
5316
+
5317
+ // authentication HTTPBearer required
5318
+ // http bearer authentication required
5319
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
5320
+
5321
+ if (cursor !== undefined) {
5322
+ localVarQueryParameter['cursor'] = cursor;
5323
+ }
5324
+
5325
+ if (limit !== undefined) {
5326
+ localVarQueryParameter['limit'] = limit;
5327
+ }
5328
+
5329
+
5330
+
5283
5331
  setSearchParams(localVarUrlObj, localVarQueryParameter);
5284
5332
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
5285
5333
  localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
@@ -5367,6 +5415,50 @@ export const ChatApiAxiosParamCreator = function (configuration?: Configuration)
5367
5415
 
5368
5416
 
5369
5417
 
5418
+ localVarHeaderParameter['Content-Type'] = 'application/json';
5419
+
5420
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
5421
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
5422
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
5423
+ localVarRequestOptions.data = serializeDataIfNeeded(chatMessageRequest, localVarRequestOptions, configuration)
5424
+
5425
+ return {
5426
+ url: toPathString(localVarUrlObj),
5427
+ options: localVarRequestOptions,
5428
+ };
5429
+ },
5430
+ /**
5431
+ * Send a message to the draft chat session of an agent. The response contains the messages generated by the agent for the draft session. If streaming is requested, the response will be a Server-Sent Events (SSE) stream with event type \'message\'.
5432
+ * @summary Send a message to an agent draft session
5433
+ * @param {string} aid Agent ID
5434
+ * @param {ChatMessageRequest} chatMessageRequest
5435
+ * @param {*} [options] Override http request option.
5436
+ * @throws {RequiredError}
5437
+ */
5438
+ sendMessageToDraft: async (aid: string, chatMessageRequest: ChatMessageRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
5439
+ // verify required parameter 'aid' is not null or undefined
5440
+ assertParamExists('sendMessageToDraft', 'aid', aid)
5441
+ // verify required parameter 'chatMessageRequest' is not null or undefined
5442
+ assertParamExists('sendMessageToDraft', 'chatMessageRequest', chatMessageRequest)
5443
+ const localVarPath = `/agents/{aid}/draft/messages`
5444
+ .replace(`{${"aid"}}`, encodeURIComponent(String(aid)));
5445
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
5446
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
5447
+ let baseOptions;
5448
+ if (configuration) {
5449
+ baseOptions = configuration.baseOptions;
5450
+ }
5451
+
5452
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
5453
+ const localVarHeaderParameter = {} as any;
5454
+ const localVarQueryParameter = {} as any;
5455
+
5456
+ // authentication HTTPBearer required
5457
+ // http bearer authentication required
5458
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
5459
+
5460
+
5461
+
5370
5462
  localVarHeaderParameter['Content-Type'] = 'application/json';
5371
5463
 
5372
5464
  setSearchParams(localVarUrlObj, localVarQueryParameter);
@@ -5549,6 +5641,21 @@ export const ChatApiFp = function(configuration?: Configuration) {
5549
5641
  const localVarOperationServerBasePath = operationServerMap['ChatApi.listMessagesInChat']?.[localVarOperationServerIndex]?.url;
5550
5642
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
5551
5643
  },
5644
+ /**
5645
+ * Retrieve the message history for the draft chat session of an agent with cursor-based pagination.
5646
+ * @summary List messages in an agent draft session
5647
+ * @param {string} aid Agent ID
5648
+ * @param {string | null} [cursor] Cursor for pagination (message id)
5649
+ * @param {number} [limit] Maximum number of messages to return
5650
+ * @param {*} [options] Override http request option.
5651
+ * @throws {RequiredError}
5652
+ */
5653
+ async listMessagesInDraft(aid: string, cursor?: string | null, limit?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ChatMessagesResponse>> {
5654
+ const localVarAxiosArgs = await localVarAxiosParamCreator.listMessagesInDraft(aid, cursor, limit, options);
5655
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
5656
+ const localVarOperationServerBasePath = operationServerMap['ChatApi.listMessagesInDraft']?.[localVarOperationServerIndex]?.url;
5657
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
5658
+ },
5552
5659
  /**
5553
5660
  * 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.
5554
5661
  * @summary Retry a message in a chat thread
@@ -5578,6 +5685,20 @@ export const ChatApiFp = function(configuration?: Configuration) {
5578
5685
  const localVarOperationServerBasePath = operationServerMap['ChatApi.sendMessageToChat']?.[localVarOperationServerIndex]?.url;
5579
5686
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
5580
5687
  },
5688
+ /**
5689
+ * Send a message to the draft chat session of an agent. The response contains the messages generated by the agent for the draft session. If streaming is requested, the response will be a Server-Sent Events (SSE) stream with event type \'message\'.
5690
+ * @summary Send a message to an agent draft session
5691
+ * @param {string} aid Agent ID
5692
+ * @param {ChatMessageRequest} chatMessageRequest
5693
+ * @param {*} [options] Override http request option.
5694
+ * @throws {RequiredError}
5695
+ */
5696
+ async sendMessageToDraft(aid: string, chatMessageRequest: ChatMessageRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<ChatMessage>>> {
5697
+ const localVarAxiosArgs = await localVarAxiosParamCreator.sendMessageToDraft(aid, chatMessageRequest, options);
5698
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
5699
+ const localVarOperationServerBasePath = operationServerMap['ChatApi.sendMessageToDraft']?.[localVarOperationServerIndex]?.url;
5700
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
5701
+ },
5581
5702
  /**
5582
5703
  * Update details of a specific chat thread. Currently only supports updating the summary.
5583
5704
  * @summary Update a chat thread
@@ -5691,6 +5812,18 @@ export const ChatApiFactory = function (configuration?: Configuration, basePath?
5691
5812
  listMessagesInChat(aid: string, chatId: string, cursor?: string | null, limit?: number, options?: RawAxiosRequestConfig): AxiosPromise<ChatMessagesResponse> {
5692
5813
  return localVarFp.listMessagesInChat(aid, chatId, cursor, limit, options).then((request) => request(axios, basePath));
5693
5814
  },
5815
+ /**
5816
+ * Retrieve the message history for the draft chat session of an agent with cursor-based pagination.
5817
+ * @summary List messages in an agent draft session
5818
+ * @param {string} aid Agent ID
5819
+ * @param {string | null} [cursor] Cursor for pagination (message id)
5820
+ * @param {number} [limit] Maximum number of messages to return
5821
+ * @param {*} [options] Override http request option.
5822
+ * @throws {RequiredError}
5823
+ */
5824
+ listMessagesInDraft(aid: string, cursor?: string | null, limit?: number, options?: RawAxiosRequestConfig): AxiosPromise<ChatMessagesResponse> {
5825
+ return localVarFp.listMessagesInDraft(aid, cursor, limit, options).then((request) => request(axios, basePath));
5826
+ },
5694
5827
  /**
5695
5828
  * 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.
5696
5829
  * @summary Retry a message in a chat thread
@@ -5714,6 +5847,17 @@ export const ChatApiFactory = function (configuration?: Configuration, basePath?
5714
5847
  sendMessageToChat(aid: string, chatId: string, chatMessageRequest: ChatMessageRequest, options?: RawAxiosRequestConfig): AxiosPromise<Array<ChatMessage>> {
5715
5848
  return localVarFp.sendMessageToChat(aid, chatId, chatMessageRequest, options).then((request) => request(axios, basePath));
5716
5849
  },
5850
+ /**
5851
+ * Send a message to the draft chat session of an agent. The response contains the messages generated by the agent for the draft session. If streaming is requested, the response will be a Server-Sent Events (SSE) stream with event type \'message\'.
5852
+ * @summary Send a message to an agent draft session
5853
+ * @param {string} aid Agent ID
5854
+ * @param {ChatMessageRequest} chatMessageRequest
5855
+ * @param {*} [options] Override http request option.
5856
+ * @throws {RequiredError}
5857
+ */
5858
+ sendMessageToDraft(aid: string, chatMessageRequest: ChatMessageRequest, options?: RawAxiosRequestConfig): AxiosPromise<Array<ChatMessage>> {
5859
+ return localVarFp.sendMessageToDraft(aid, chatMessageRequest, options).then((request) => request(axios, basePath));
5860
+ },
5717
5861
  /**
5718
5862
  * Update details of a specific chat thread. Currently only supports updating the summary.
5719
5863
  * @summary Update a chat thread
@@ -5840,6 +5984,20 @@ export class ChatApi extends BaseAPI {
5840
5984
  return ChatApiFp(this.configuration).listMessagesInChat(aid, chatId, cursor, limit, options).then((request) => request(this.axios, this.basePath));
5841
5985
  }
5842
5986
 
5987
+ /**
5988
+ * Retrieve the message history for the draft chat session of an agent with cursor-based pagination.
5989
+ * @summary List messages in an agent draft session
5990
+ * @param {string} aid Agent ID
5991
+ * @param {string | null} [cursor] Cursor for pagination (message id)
5992
+ * @param {number} [limit] Maximum number of messages to return
5993
+ * @param {*} [options] Override http request option.
5994
+ * @throws {RequiredError}
5995
+ * @memberof ChatApi
5996
+ */
5997
+ public listMessagesInDraft(aid: string, cursor?: string | null, limit?: number, options?: RawAxiosRequestConfig) {
5998
+ return ChatApiFp(this.configuration).listMessagesInDraft(aid, cursor, limit, options).then((request) => request(this.axios, this.basePath));
5999
+ }
6000
+
5843
6001
  /**
5844
6002
  * 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.
5845
6003
  * @summary Retry a message in a chat thread
@@ -5867,6 +6025,19 @@ export class ChatApi extends BaseAPI {
5867
6025
  return ChatApiFp(this.configuration).sendMessageToChat(aid, chatId, chatMessageRequest, options).then((request) => request(this.axios, this.basePath));
5868
6026
  }
5869
6027
 
6028
+ /**
6029
+ * Send a message to the draft chat session of an agent. The response contains the messages generated by the agent for the draft session. If streaming is requested, the response will be a Server-Sent Events (SSE) stream with event type \'message\'.
6030
+ * @summary Send a message to an agent draft session
6031
+ * @param {string} aid Agent ID
6032
+ * @param {ChatMessageRequest} chatMessageRequest
6033
+ * @param {*} [options] Override http request option.
6034
+ * @throws {RequiredError}
6035
+ * @memberof ChatApi
6036
+ */
6037
+ public sendMessageToDraft(aid: string, chatMessageRequest: ChatMessageRequest, options?: RawAxiosRequestConfig) {
6038
+ return ChatApiFp(this.configuration).sendMessageToDraft(aid, chatMessageRequest, options).then((request) => request(this.axios, this.basePath));
6039
+ }
6040
+
5870
6041
  /**
5871
6042
  * Update details of a specific chat thread. Currently only supports updating the summary.
5872
6043
  * @summary Update a chat thread
package/base.ts CHANGED
@@ -4,7 +4,7 @@
4
4
  * Nation IntentKit API
5
5
  * API for Nation IntentKit services
6
6
  *
7
- * The version of the OpenAPI document: 0.7.17
7
+ * The version of the OpenAPI document: 0.7.18
8
8
  *
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
package/common.ts CHANGED
@@ -4,7 +4,7 @@
4
4
  * Nation IntentKit API
5
5
  * API for Nation IntentKit services
6
6
  *
7
- * The version of the OpenAPI document: 0.7.17
7
+ * The version of the OpenAPI document: 0.7.18
8
8
  *
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
package/configuration.ts CHANGED
@@ -4,7 +4,7 @@
4
4
  * Nation IntentKit API
5
5
  * API for Nation IntentKit services
6
6
  *
7
- * The version of the OpenAPI document: 0.7.17
7
+ * The version of the OpenAPI document: 0.7.18
8
8
  *
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
package/dist/api.d.ts CHANGED
@@ -2,7 +2,7 @@
2
2
  * Nation IntentKit API
3
3
  * API for Nation IntentKit services
4
4
  *
5
- * The version of the OpenAPI document: 0.7.17
5
+ * The version of the OpenAPI document: 0.7.18
6
6
  *
7
7
  *
8
8
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -4238,6 +4238,16 @@ export declare const ChatApiAxiosParamCreator: (configuration?: Configuration) =
4238
4238
  * @throws {RequiredError}
4239
4239
  */
4240
4240
  listMessagesInChat: (aid: string, chatId: string, cursor?: string | null, limit?: number, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
4241
+ /**
4242
+ * Retrieve the message history for the draft chat session of an agent with cursor-based pagination.
4243
+ * @summary List messages in an agent draft session
4244
+ * @param {string} aid Agent ID
4245
+ * @param {string | null} [cursor] Cursor for pagination (message id)
4246
+ * @param {number} [limit] Maximum number of messages to return
4247
+ * @param {*} [options] Override http request option.
4248
+ * @throws {RequiredError}
4249
+ */
4250
+ listMessagesInDraft: (aid: string, cursor?: string | null, limit?: number, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
4241
4251
  /**
4242
4252
  * 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.
4243
4253
  * @summary Retry a message in a chat thread
@@ -4257,6 +4267,15 @@ export declare const ChatApiAxiosParamCreator: (configuration?: Configuration) =
4257
4267
  * @throws {RequiredError}
4258
4268
  */
4259
4269
  sendMessageToChat: (aid: string, chatId: string, chatMessageRequest: ChatMessageRequest, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
4270
+ /**
4271
+ * Send a message to the draft chat session of an agent. The response contains the messages generated by the agent for the draft session. If streaming is requested, the response will be a Server-Sent Events (SSE) stream with event type \'message\'.
4272
+ * @summary Send a message to an agent draft session
4273
+ * @param {string} aid Agent ID
4274
+ * @param {ChatMessageRequest} chatMessageRequest
4275
+ * @param {*} [options] Override http request option.
4276
+ * @throws {RequiredError}
4277
+ */
4278
+ sendMessageToDraft: (aid: string, chatMessageRequest: ChatMessageRequest, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
4260
4279
  /**
4261
4280
  * Update details of a specific chat thread. Currently only supports updating the summary.
4262
4281
  * @summary Update a chat thread
@@ -4345,6 +4364,16 @@ export declare const ChatApiFp: (configuration?: Configuration) => {
4345
4364
  * @throws {RequiredError}
4346
4365
  */
4347
4366
  listMessagesInChat(aid: string, chatId: string, cursor?: string | null, limit?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ChatMessagesResponse>>;
4367
+ /**
4368
+ * Retrieve the message history for the draft chat session of an agent with cursor-based pagination.
4369
+ * @summary List messages in an agent draft session
4370
+ * @param {string} aid Agent ID
4371
+ * @param {string | null} [cursor] Cursor for pagination (message id)
4372
+ * @param {number} [limit] Maximum number of messages to return
4373
+ * @param {*} [options] Override http request option.
4374
+ * @throws {RequiredError}
4375
+ */
4376
+ listMessagesInDraft(aid: string, cursor?: string | null, limit?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ChatMessagesResponse>>;
4348
4377
  /**
4349
4378
  * 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.
4350
4379
  * @summary Retry a message in a chat thread
@@ -4364,6 +4393,15 @@ export declare const ChatApiFp: (configuration?: Configuration) => {
4364
4393
  * @throws {RequiredError}
4365
4394
  */
4366
4395
  sendMessageToChat(aid: string, chatId: string, chatMessageRequest: ChatMessageRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<ChatMessage>>>;
4396
+ /**
4397
+ * Send a message to the draft chat session of an agent. The response contains the messages generated by the agent for the draft session. If streaming is requested, the response will be a Server-Sent Events (SSE) stream with event type \'message\'.
4398
+ * @summary Send a message to an agent draft session
4399
+ * @param {string} aid Agent ID
4400
+ * @param {ChatMessageRequest} chatMessageRequest
4401
+ * @param {*} [options] Override http request option.
4402
+ * @throws {RequiredError}
4403
+ */
4404
+ sendMessageToDraft(aid: string, chatMessageRequest: ChatMessageRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<ChatMessage>>>;
4367
4405
  /**
4368
4406
  * Update details of a specific chat thread. Currently only supports updating the summary.
4369
4407
  * @summary Update a chat thread
@@ -4452,6 +4490,16 @@ export declare const ChatApiFactory: (configuration?: Configuration, basePath?:
4452
4490
  * @throws {RequiredError}
4453
4491
  */
4454
4492
  listMessagesInChat(aid: string, chatId: string, cursor?: string | null, limit?: number, options?: RawAxiosRequestConfig): AxiosPromise<ChatMessagesResponse>;
4493
+ /**
4494
+ * Retrieve the message history for the draft chat session of an agent with cursor-based pagination.
4495
+ * @summary List messages in an agent draft session
4496
+ * @param {string} aid Agent ID
4497
+ * @param {string | null} [cursor] Cursor for pagination (message id)
4498
+ * @param {number} [limit] Maximum number of messages to return
4499
+ * @param {*} [options] Override http request option.
4500
+ * @throws {RequiredError}
4501
+ */
4502
+ listMessagesInDraft(aid: string, cursor?: string | null, limit?: number, options?: RawAxiosRequestConfig): AxiosPromise<ChatMessagesResponse>;
4455
4503
  /**
4456
4504
  * 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.
4457
4505
  * @summary Retry a message in a chat thread
@@ -4471,6 +4519,15 @@ export declare const ChatApiFactory: (configuration?: Configuration, basePath?:
4471
4519
  * @throws {RequiredError}
4472
4520
  */
4473
4521
  sendMessageToChat(aid: string, chatId: string, chatMessageRequest: ChatMessageRequest, options?: RawAxiosRequestConfig): AxiosPromise<Array<ChatMessage>>;
4522
+ /**
4523
+ * Send a message to the draft chat session of an agent. The response contains the messages generated by the agent for the draft session. If streaming is requested, the response will be a Server-Sent Events (SSE) stream with event type \'message\'.
4524
+ * @summary Send a message to an agent draft session
4525
+ * @param {string} aid Agent ID
4526
+ * @param {ChatMessageRequest} chatMessageRequest
4527
+ * @param {*} [options] Override http request option.
4528
+ * @throws {RequiredError}
4529
+ */
4530
+ sendMessageToDraft(aid: string, chatMessageRequest: ChatMessageRequest, options?: RawAxiosRequestConfig): AxiosPromise<Array<ChatMessage>>;
4474
4531
  /**
4475
4532
  * Update details of a specific chat thread. Currently only supports updating the summary.
4476
4533
  * @summary Update a chat thread
@@ -4569,6 +4626,17 @@ export declare class ChatApi extends BaseAPI {
4569
4626
  * @memberof ChatApi
4570
4627
  */
4571
4628
  listMessagesInChat(aid: string, chatId: string, cursor?: string | null, limit?: number, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<ChatMessagesResponse, any, {}>>;
4629
+ /**
4630
+ * Retrieve the message history for the draft chat session of an agent with cursor-based pagination.
4631
+ * @summary List messages in an agent draft session
4632
+ * @param {string} aid Agent ID
4633
+ * @param {string | null} [cursor] Cursor for pagination (message id)
4634
+ * @param {number} [limit] Maximum number of messages to return
4635
+ * @param {*} [options] Override http request option.
4636
+ * @throws {RequiredError}
4637
+ * @memberof ChatApi
4638
+ */
4639
+ listMessagesInDraft(aid: string, cursor?: string | null, limit?: number, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<ChatMessagesResponse, any, {}>>;
4572
4640
  /**
4573
4641
  * 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.
4574
4642
  * @summary Retry a message in a chat thread
@@ -4590,6 +4658,16 @@ export declare class ChatApi extends BaseAPI {
4590
4658
  * @memberof ChatApi
4591
4659
  */
4592
4660
  sendMessageToChat(aid: string, chatId: string, chatMessageRequest: ChatMessageRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<ChatMessage[], any, {}>>;
4661
+ /**
4662
+ * Send a message to the draft chat session of an agent. The response contains the messages generated by the agent for the draft session. If streaming is requested, the response will be a Server-Sent Events (SSE) stream with event type \'message\'.
4663
+ * @summary Send a message to an agent draft session
4664
+ * @param {string} aid Agent ID
4665
+ * @param {ChatMessageRequest} chatMessageRequest
4666
+ * @param {*} [options] Override http request option.
4667
+ * @throws {RequiredError}
4668
+ * @memberof ChatApi
4669
+ */
4670
+ sendMessageToDraft(aid: string, chatMessageRequest: ChatMessageRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<ChatMessage[], any, {}>>;
4593
4671
  /**
4594
4672
  * Update details of a specific chat thread. Currently only supports updating the summary.
4595
4673
  * @summary Update a chat thread
package/dist/api.js CHANGED
@@ -5,7 +5,7 @@
5
5
  * Nation IntentKit API
6
6
  * API for Nation IntentKit services
7
7
  *
8
- * The version of the OpenAPI document: 0.7.17
8
+ * The version of the OpenAPI document: 0.7.18
9
9
  *
10
10
  *
11
11
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -2338,6 +2338,61 @@ var ChatApiAxiosParamCreator = function (configuration) {
2338
2338
  });
2339
2339
  });
2340
2340
  },
2341
+ /**
2342
+ * Retrieve the message history for the draft chat session of an agent with cursor-based pagination.
2343
+ * @summary List messages in an agent draft session
2344
+ * @param {string} aid Agent ID
2345
+ * @param {string | null} [cursor] Cursor for pagination (message id)
2346
+ * @param {number} [limit] Maximum number of messages to return
2347
+ * @param {*} [options] Override http request option.
2348
+ * @throws {RequiredError}
2349
+ */
2350
+ listMessagesInDraft: function (aid_1, cursor_1, limit_1) {
2351
+ var args_1 = [];
2352
+ for (var _i = 3; _i < arguments.length; _i++) {
2353
+ args_1[_i - 3] = arguments[_i];
2354
+ }
2355
+ return __awaiter(_this, __spreadArray([aid_1, cursor_1, limit_1], args_1, true), void 0, function (aid, cursor, limit, options) {
2356
+ var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
2357
+ if (options === void 0) { options = {}; }
2358
+ return __generator(this, function (_a) {
2359
+ switch (_a.label) {
2360
+ case 0:
2361
+ // verify required parameter 'aid' is not null or undefined
2362
+ (0, common_1.assertParamExists)('listMessagesInDraft', 'aid', aid);
2363
+ localVarPath = "/agents/{aid}/draft/messages"
2364
+ .replace("{".concat("aid", "}"), encodeURIComponent(String(aid)));
2365
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
2366
+ if (configuration) {
2367
+ baseOptions = configuration.baseOptions;
2368
+ }
2369
+ localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
2370
+ localVarHeaderParameter = {};
2371
+ localVarQueryParameter = {};
2372
+ // authentication HTTPBearer required
2373
+ // http bearer authentication required
2374
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
2375
+ case 1:
2376
+ // authentication HTTPBearer required
2377
+ // http bearer authentication required
2378
+ _a.sent();
2379
+ if (cursor !== undefined) {
2380
+ localVarQueryParameter['cursor'] = cursor;
2381
+ }
2382
+ if (limit !== undefined) {
2383
+ localVarQueryParameter['limit'] = limit;
2384
+ }
2385
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
2386
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2387
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
2388
+ return [2 /*return*/, {
2389
+ url: (0, common_1.toPathString)(localVarUrlObj),
2390
+ options: localVarRequestOptions,
2391
+ }];
2392
+ }
2393
+ });
2394
+ });
2395
+ },
2341
2396
  /**
2342
2397
  * 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.
2343
2398
  * @summary Retry a message in a chat thread
@@ -2445,6 +2500,58 @@ var ChatApiAxiosParamCreator = function (configuration) {
2445
2500
  });
2446
2501
  });
2447
2502
  },
2503
+ /**
2504
+ * Send a message to the draft chat session of an agent. The response contains the messages generated by the agent for the draft session. If streaming is requested, the response will be a Server-Sent Events (SSE) stream with event type \'message\'.
2505
+ * @summary Send a message to an agent draft session
2506
+ * @param {string} aid Agent ID
2507
+ * @param {ChatMessageRequest} chatMessageRequest
2508
+ * @param {*} [options] Override http request option.
2509
+ * @throws {RequiredError}
2510
+ */
2511
+ sendMessageToDraft: function (aid_1, chatMessageRequest_1) {
2512
+ var args_1 = [];
2513
+ for (var _i = 2; _i < arguments.length; _i++) {
2514
+ args_1[_i - 2] = arguments[_i];
2515
+ }
2516
+ return __awaiter(_this, __spreadArray([aid_1, chatMessageRequest_1], args_1, true), void 0, function (aid, chatMessageRequest, options) {
2517
+ var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
2518
+ if (options === void 0) { options = {}; }
2519
+ return __generator(this, function (_a) {
2520
+ switch (_a.label) {
2521
+ case 0:
2522
+ // verify required parameter 'aid' is not null or undefined
2523
+ (0, common_1.assertParamExists)('sendMessageToDraft', 'aid', aid);
2524
+ // verify required parameter 'chatMessageRequest' is not null or undefined
2525
+ (0, common_1.assertParamExists)('sendMessageToDraft', 'chatMessageRequest', chatMessageRequest);
2526
+ localVarPath = "/agents/{aid}/draft/messages"
2527
+ .replace("{".concat("aid", "}"), encodeURIComponent(String(aid)));
2528
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
2529
+ if (configuration) {
2530
+ baseOptions = configuration.baseOptions;
2531
+ }
2532
+ localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
2533
+ localVarHeaderParameter = {};
2534
+ localVarQueryParameter = {};
2535
+ // authentication HTTPBearer required
2536
+ // http bearer authentication required
2537
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
2538
+ case 1:
2539
+ // authentication HTTPBearer required
2540
+ // http bearer authentication required
2541
+ _a.sent();
2542
+ localVarHeaderParameter['Content-Type'] = 'application/json';
2543
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
2544
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2545
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
2546
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(chatMessageRequest, localVarRequestOptions, configuration);
2547
+ return [2 /*return*/, {
2548
+ url: (0, common_1.toPathString)(localVarUrlObj),
2549
+ options: localVarRequestOptions,
2550
+ }];
2551
+ }
2552
+ });
2553
+ });
2554
+ },
2448
2555
  /**
2449
2556
  * Update details of a specific chat thread. Currently only supports updating the summary.
2450
2557
  * @summary Update a chat thread
@@ -2703,6 +2810,31 @@ var ChatApiFp = function (configuration) {
2703
2810
  });
2704
2811
  });
2705
2812
  },
2813
+ /**
2814
+ * Retrieve the message history for the draft chat session of an agent with cursor-based pagination.
2815
+ * @summary List messages in an agent draft session
2816
+ * @param {string} aid Agent ID
2817
+ * @param {string | null} [cursor] Cursor for pagination (message id)
2818
+ * @param {number} [limit] Maximum number of messages to return
2819
+ * @param {*} [options] Override http request option.
2820
+ * @throws {RequiredError}
2821
+ */
2822
+ listMessagesInDraft: function (aid, cursor, limit, options) {
2823
+ return __awaiter(this, void 0, void 0, function () {
2824
+ var localVarAxiosArgs, localVarOperationServerIndex, localVarOperationServerBasePath;
2825
+ var _a, _b, _c;
2826
+ return __generator(this, function (_d) {
2827
+ switch (_d.label) {
2828
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.listMessagesInDraft(aid, cursor, limit, options)];
2829
+ case 1:
2830
+ localVarAxiosArgs = _d.sent();
2831
+ localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
2832
+ localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['ChatApi.listMessagesInDraft']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
2833
+ return [2 /*return*/, function (axios, basePath) { return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }];
2834
+ }
2835
+ });
2836
+ });
2837
+ },
2706
2838
  /**
2707
2839
  * 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.
2708
2840
  * @summary Retry a message in a chat thread
@@ -2752,6 +2884,30 @@ var ChatApiFp = function (configuration) {
2752
2884
  });
2753
2885
  });
2754
2886
  },
2887
+ /**
2888
+ * Send a message to the draft chat session of an agent. The response contains the messages generated by the agent for the draft session. If streaming is requested, the response will be a Server-Sent Events (SSE) stream with event type \'message\'.
2889
+ * @summary Send a message to an agent draft session
2890
+ * @param {string} aid Agent ID
2891
+ * @param {ChatMessageRequest} chatMessageRequest
2892
+ * @param {*} [options] Override http request option.
2893
+ * @throws {RequiredError}
2894
+ */
2895
+ sendMessageToDraft: function (aid, chatMessageRequest, options) {
2896
+ return __awaiter(this, void 0, void 0, function () {
2897
+ var localVarAxiosArgs, localVarOperationServerIndex, localVarOperationServerBasePath;
2898
+ var _a, _b, _c;
2899
+ return __generator(this, function (_d) {
2900
+ switch (_d.label) {
2901
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.sendMessageToDraft(aid, chatMessageRequest, options)];
2902
+ case 1:
2903
+ localVarAxiosArgs = _d.sent();
2904
+ localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
2905
+ localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['ChatApi.sendMessageToDraft']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
2906
+ return [2 /*return*/, function (axios, basePath) { return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }];
2907
+ }
2908
+ });
2909
+ });
2910
+ },
2755
2911
  /**
2756
2912
  * Update details of a specific chat thread. Currently only supports updating the summary.
2757
2913
  * @summary Update a chat thread
@@ -2875,6 +3031,18 @@ var ChatApiFactory = function (configuration, basePath, axios) {
2875
3031
  listMessagesInChat: function (aid, chatId, cursor, limit, options) {
2876
3032
  return localVarFp.listMessagesInChat(aid, chatId, cursor, limit, options).then(function (request) { return request(axios, basePath); });
2877
3033
  },
3034
+ /**
3035
+ * Retrieve the message history for the draft chat session of an agent with cursor-based pagination.
3036
+ * @summary List messages in an agent draft session
3037
+ * @param {string} aid Agent ID
3038
+ * @param {string | null} [cursor] Cursor for pagination (message id)
3039
+ * @param {number} [limit] Maximum number of messages to return
3040
+ * @param {*} [options] Override http request option.
3041
+ * @throws {RequiredError}
3042
+ */
3043
+ listMessagesInDraft: function (aid, cursor, limit, options) {
3044
+ return localVarFp.listMessagesInDraft(aid, cursor, limit, options).then(function (request) { return request(axios, basePath); });
3045
+ },
2878
3046
  /**
2879
3047
  * 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.
2880
3048
  * @summary Retry a message in a chat thread
@@ -2898,6 +3066,17 @@ var ChatApiFactory = function (configuration, basePath, axios) {
2898
3066
  sendMessageToChat: function (aid, chatId, chatMessageRequest, options) {
2899
3067
  return localVarFp.sendMessageToChat(aid, chatId, chatMessageRequest, options).then(function (request) { return request(axios, basePath); });
2900
3068
  },
3069
+ /**
3070
+ * Send a message to the draft chat session of an agent. The response contains the messages generated by the agent for the draft session. If streaming is requested, the response will be a Server-Sent Events (SSE) stream with event type \'message\'.
3071
+ * @summary Send a message to an agent draft session
3072
+ * @param {string} aid Agent ID
3073
+ * @param {ChatMessageRequest} chatMessageRequest
3074
+ * @param {*} [options] Override http request option.
3075
+ * @throws {RequiredError}
3076
+ */
3077
+ sendMessageToDraft: function (aid, chatMessageRequest, options) {
3078
+ return localVarFp.sendMessageToDraft(aid, chatMessageRequest, options).then(function (request) { return request(axios, basePath); });
3079
+ },
2901
3080
  /**
2902
3081
  * Update details of a specific chat thread. Currently only supports updating the summary.
2903
3082
  * @summary Update a chat thread
@@ -3028,6 +3207,20 @@ var ChatApi = /** @class */ (function (_super) {
3028
3207
  var _this = this;
3029
3208
  return (0, exports.ChatApiFp)(this.configuration).listMessagesInChat(aid, chatId, cursor, limit, options).then(function (request) { return request(_this.axios, _this.basePath); });
3030
3209
  };
3210
+ /**
3211
+ * Retrieve the message history for the draft chat session of an agent with cursor-based pagination.
3212
+ * @summary List messages in an agent draft session
3213
+ * @param {string} aid Agent ID
3214
+ * @param {string | null} [cursor] Cursor for pagination (message id)
3215
+ * @param {number} [limit] Maximum number of messages to return
3216
+ * @param {*} [options] Override http request option.
3217
+ * @throws {RequiredError}
3218
+ * @memberof ChatApi
3219
+ */
3220
+ ChatApi.prototype.listMessagesInDraft = function (aid, cursor, limit, options) {
3221
+ var _this = this;
3222
+ return (0, exports.ChatApiFp)(this.configuration).listMessagesInDraft(aid, cursor, limit, options).then(function (request) { return request(_this.axios, _this.basePath); });
3223
+ };
3031
3224
  /**
3032
3225
  * 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.
3033
3226
  * @summary Retry a message in a chat thread
@@ -3055,6 +3248,19 @@ var ChatApi = /** @class */ (function (_super) {
3055
3248
  var _this = this;
3056
3249
  return (0, exports.ChatApiFp)(this.configuration).sendMessageToChat(aid, chatId, chatMessageRequest, options).then(function (request) { return request(_this.axios, _this.basePath); });
3057
3250
  };
3251
+ /**
3252
+ * Send a message to the draft chat session of an agent. The response contains the messages generated by the agent for the draft session. If streaming is requested, the response will be a Server-Sent Events (SSE) stream with event type \'message\'.
3253
+ * @summary Send a message to an agent draft session
3254
+ * @param {string} aid Agent ID
3255
+ * @param {ChatMessageRequest} chatMessageRequest
3256
+ * @param {*} [options] Override http request option.
3257
+ * @throws {RequiredError}
3258
+ * @memberof ChatApi
3259
+ */
3260
+ ChatApi.prototype.sendMessageToDraft = function (aid, chatMessageRequest, options) {
3261
+ var _this = this;
3262
+ return (0, exports.ChatApiFp)(this.configuration).sendMessageToDraft(aid, chatMessageRequest, options).then(function (request) { return request(_this.axios, _this.basePath); });
3263
+ };
3058
3264
  /**
3059
3265
  * Update details of a specific chat thread. Currently only supports updating the summary.
3060
3266
  * @summary Update a chat thread
package/dist/base.d.ts CHANGED
@@ -2,7 +2,7 @@
2
2
  * Nation IntentKit API
3
3
  * API for Nation IntentKit services
4
4
  *
5
- * The version of the OpenAPI document: 0.7.17
5
+ * The version of the OpenAPI document: 0.7.18
6
6
  *
7
7
  *
8
8
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
package/dist/base.js CHANGED
@@ -5,7 +5,7 @@
5
5
  * Nation IntentKit API
6
6
  * API for Nation IntentKit services
7
7
  *
8
- * The version of the OpenAPI document: 0.7.17
8
+ * The version of the OpenAPI document: 0.7.18
9
9
  *
10
10
  *
11
11
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
package/dist/common.d.ts CHANGED
@@ -2,7 +2,7 @@
2
2
  * Nation IntentKit API
3
3
  * API for Nation IntentKit services
4
4
  *
5
- * The version of the OpenAPI document: 0.7.17
5
+ * The version of the OpenAPI document: 0.7.18
6
6
  *
7
7
  *
8
8
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
package/dist/common.js CHANGED
@@ -5,7 +5,7 @@
5
5
  * Nation IntentKit API
6
6
  * API for Nation IntentKit services
7
7
  *
8
- * The version of the OpenAPI document: 0.7.17
8
+ * The version of the OpenAPI document: 0.7.18
9
9
  *
10
10
  *
11
11
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -2,7 +2,7 @@
2
2
  * Nation IntentKit API
3
3
  * API for Nation IntentKit services
4
4
  *
5
- * The version of the OpenAPI document: 0.7.17
5
+ * The version of the OpenAPI document: 0.7.18
6
6
  *
7
7
  *
8
8
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -5,7 +5,7 @@
5
5
  * Nation IntentKit API
6
6
  * API for Nation IntentKit services
7
7
  *
8
- * The version of the OpenAPI document: 0.7.17
8
+ * The version of the OpenAPI document: 0.7.18
9
9
  *
10
10
  *
11
11
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
package/dist/index.d.ts CHANGED
@@ -2,7 +2,7 @@
2
2
  * Nation IntentKit API
3
3
  * API for Nation IntentKit services
4
4
  *
5
- * The version of the OpenAPI document: 0.7.17
5
+ * The version of the OpenAPI document: 0.7.18
6
6
  *
7
7
  *
8
8
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
package/dist/index.js CHANGED
@@ -5,7 +5,7 @@
5
5
  * Nation IntentKit API
6
6
  * API for Nation IntentKit services
7
7
  *
8
- * The version of the OpenAPI document: 0.7.17
8
+ * The version of the OpenAPI document: 0.7.18
9
9
  *
10
10
  *
11
11
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
package/docs/ChatApi.md CHANGED
@@ -12,8 +12,10 @@ All URIs are relative to *http://localhost*
12
12
  |[**getSkillHistory**](#getskillhistory) | **GET** /agents/{aid}/skill/history | Skill History|
13
13
  |[**listChatsForAgent**](#listchatsforagent) | **GET** /agents/{aid}/chats | List chat threads for an agent|
14
14
  |[**listMessagesInChat**](#listmessagesinchat) | **GET** /agents/{aid}/chats/{chat_id}/messages | List messages in a chat thread|
15
+ |[**listMessagesInDraft**](#listmessagesindraft) | **GET** /agents/{aid}/draft/messages | List messages in an agent draft session|
15
16
  |[**retryMessageInChat**](#retrymessageinchat) | **POST** /agents/{aid}/chats/{chat_id}/messages/retry | Retry a message in a chat thread|
16
17
  |[**sendMessageToChat**](#sendmessagetochat) | **POST** /agents/{aid}/chats/{chat_id}/messages | Send a message to a chat thread|
18
+ |[**sendMessageToDraft**](#sendmessagetodraft) | **POST** /agents/{aid}/draft/messages | Send a message to an agent draft session|
17
19
  |[**updateChatThread**](#updatechatthread) | **PATCH** /agents/{aid}/chats/{chat_id} | Update a chat thread|
18
20
 
19
21
  # **clearChatThreadMemory**
@@ -434,6 +436,64 @@ const { status, data } = await apiInstance.listMessagesInChat(
434
436
  | **limit** | [**number**] | Maximum number of messages to return | (optional) defaults to 20|
435
437
 
436
438
 
439
+ ### Return type
440
+
441
+ **ChatMessagesResponse**
442
+
443
+ ### Authorization
444
+
445
+ [HTTPBearer](../README.md#HTTPBearer)
446
+
447
+ ### HTTP request headers
448
+
449
+ - **Content-Type**: Not defined
450
+ - **Accept**: application/json
451
+
452
+
453
+ ### HTTP response details
454
+ | Status code | Description | Response headers |
455
+ |-------------|-------------|------------------|
456
+ |**200** | Successful Response | - |
457
+ |**422** | Validation Error | - |
458
+
459
+ [[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)
460
+
461
+ # **listMessagesInDraft**
462
+ > ChatMessagesResponse listMessagesInDraft()
463
+
464
+ Retrieve the message history for the draft chat session of an agent with cursor-based pagination.
465
+
466
+ ### Example
467
+
468
+ ```typescript
469
+ import {
470
+ ChatApi,
471
+ Configuration
472
+ } from '@crestal/nation-sdk';
473
+
474
+ const configuration = new Configuration();
475
+ const apiInstance = new ChatApi(configuration);
476
+
477
+ let aid: string; //Agent ID (default to undefined)
478
+ let cursor: string; //Cursor for pagination (message id) (optional) (default to undefined)
479
+ let limit: number; //Maximum number of messages to return (optional) (default to 20)
480
+
481
+ const { status, data } = await apiInstance.listMessagesInDraft(
482
+ aid,
483
+ cursor,
484
+ limit
485
+ );
486
+ ```
487
+
488
+ ### Parameters
489
+
490
+ |Name | Type | Description | Notes|
491
+ |------------- | ------------- | ------------- | -------------|
492
+ | **aid** | [**string**] | Agent ID | defaults to undefined|
493
+ | **cursor** | [**string**] | Cursor for pagination (message id) | (optional) defaults to undefined|
494
+ | **limit** | [**number**] | Maximum number of messages to return | (optional) defaults to 20|
495
+
496
+
437
497
  ### Return type
438
498
 
439
499
  **ChatMessagesResponse**
@@ -548,6 +608,62 @@ const { status, data } = await apiInstance.sendMessageToChat(
548
608
  | **chatId** | [**string**] | Chat ID | defaults to undefined|
549
609
 
550
610
 
611
+ ### Return type
612
+
613
+ **Array<ChatMessage>**
614
+
615
+ ### Authorization
616
+
617
+ [HTTPBearer](../README.md#HTTPBearer)
618
+
619
+ ### HTTP request headers
620
+
621
+ - **Content-Type**: application/json
622
+ - **Accept**: application/json
623
+
624
+
625
+ ### HTTP response details
626
+ | Status code | Description | Response headers |
627
+ |-------------|-------------|------------------|
628
+ |**200** | Successful Response | - |
629
+ |**422** | Validation Error | - |
630
+
631
+ [[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)
632
+
633
+ # **sendMessageToDraft**
634
+ > Array<ChatMessage> sendMessageToDraft(chatMessageRequest)
635
+
636
+ Send a message to the draft chat session of an agent. The response contains the messages generated by the agent for the draft session. If streaming is requested, the response will be a Server-Sent Events (SSE) stream with event type \'message\'.
637
+
638
+ ### Example
639
+
640
+ ```typescript
641
+ import {
642
+ ChatApi,
643
+ Configuration,
644
+ ChatMessageRequest
645
+ } from '@crestal/nation-sdk';
646
+
647
+ const configuration = new Configuration();
648
+ const apiInstance = new ChatApi(configuration);
649
+
650
+ let aid: string; //Agent ID (default to undefined)
651
+ let chatMessageRequest: ChatMessageRequest; //
652
+
653
+ const { status, data } = await apiInstance.sendMessageToDraft(
654
+ aid,
655
+ chatMessageRequest
656
+ );
657
+ ```
658
+
659
+ ### Parameters
660
+
661
+ |Name | Type | Description | Notes|
662
+ |------------- | ------------- | ------------- | -------------|
663
+ | **chatMessageRequest** | **ChatMessageRequest**| | |
664
+ | **aid** | [**string**] | Agent ID | defaults to undefined|
665
+
666
+
551
667
  ### Return type
552
668
 
553
669
  **Array<ChatMessage>**
@@ -27,8 +27,8 @@ Name | Type | Description | Notes
27
27
  **supports_presence_penalty** | **boolean** | | [optional] [default to true]
28
28
  **api_base** | **string** | | [optional] [default to undefined]
29
29
  **timeout** | **number** | | [optional] [default to 180]
30
- **created_at** | **string** | Timestamp when this data was created | [optional] [default to 2025-09-26T05:14:33.854+00:00]
31
- **updated_at** | **string** | Timestamp when this data was updated | [optional] [default to 2025-09-26T05:14:33.854+00:00]
30
+ **created_at** | **string** | Timestamp when this data was created | [optional] [default to 2025-09-26T08:41:26.444+00:00]
31
+ **updated_at** | **string** | Timestamp when this data was updated | [optional] [default to 2025-09-26T08:41:26.444+00:00]
32
32
  **provider_name** | **string** | | [default to undefined]
33
33
 
34
34
  ## Example
package/index.ts CHANGED
@@ -4,7 +4,7 @@
4
4
  * Nation IntentKit API
5
5
  * API for Nation IntentKit services
6
6
  *
7
- * The version of the OpenAPI document: 0.7.17
7
+ * The version of the OpenAPI document: 0.7.18
8
8
  *
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@crestal/nation-sdk",
3
- "version": "0.7.17",
3
+ "version": "0.7.18",
4
4
  "description": "OpenAPI client for @crestal/nation-sdk",
5
5
  "author": "OpenAPI-Generator Contributors",
6
6
  "repository": {