@crestal/nation-sdk 0.7.17 → 0.7.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.
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- ## @crestal/nation-sdk@0.7.17
1
+ ## @crestal/nation-sdk@0.7.19
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.19 --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.19
8
8
  *
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -3434,6 +3434,7 @@ export const LLMProvider = {
3434
3434
  Openai: 'openai',
3435
3435
  Deepseek: 'deepseek',
3436
3436
  Xai: 'xai',
3437
+ Gatewayz: 'gatewayz',
3437
3438
  Eternal: 'eternal',
3438
3439
  Reigent: 'reigent',
3439
3440
  Venice: 'venice'
@@ -5280,6 +5281,54 @@ export const ChatApiAxiosParamCreator = function (configuration?: Configuration)
5280
5281
 
5281
5282
 
5282
5283
 
5284
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
5285
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
5286
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
5287
+
5288
+ return {
5289
+ url: toPathString(localVarUrlObj),
5290
+ options: localVarRequestOptions,
5291
+ };
5292
+ },
5293
+ /**
5294
+ * Retrieve the message history for the draft chat session of an agent with cursor-based pagination.
5295
+ * @summary List messages in an agent draft session
5296
+ * @param {string} aid Agent ID
5297
+ * @param {string | null} [cursor] Cursor for pagination (message id)
5298
+ * @param {number} [limit] Maximum number of messages to return
5299
+ * @param {*} [options] Override http request option.
5300
+ * @throws {RequiredError}
5301
+ */
5302
+ listMessagesInDraft: async (aid: string, cursor?: string | null, limit?: number, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
5303
+ // verify required parameter 'aid' is not null or undefined
5304
+ assertParamExists('listMessagesInDraft', 'aid', aid)
5305
+ const localVarPath = `/agents/{aid}/draft/messages`
5306
+ .replace(`{${"aid"}}`, encodeURIComponent(String(aid)));
5307
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
5308
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
5309
+ let baseOptions;
5310
+ if (configuration) {
5311
+ baseOptions = configuration.baseOptions;
5312
+ }
5313
+
5314
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
5315
+ const localVarHeaderParameter = {} as any;
5316
+ const localVarQueryParameter = {} as any;
5317
+
5318
+ // authentication HTTPBearer required
5319
+ // http bearer authentication required
5320
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
5321
+
5322
+ if (cursor !== undefined) {
5323
+ localVarQueryParameter['cursor'] = cursor;
5324
+ }
5325
+
5326
+ if (limit !== undefined) {
5327
+ localVarQueryParameter['limit'] = limit;
5328
+ }
5329
+
5330
+
5331
+
5283
5332
  setSearchParams(localVarUrlObj, localVarQueryParameter);
5284
5333
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
5285
5334
  localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
@@ -5367,6 +5416,50 @@ export const ChatApiAxiosParamCreator = function (configuration?: Configuration)
5367
5416
 
5368
5417
 
5369
5418
 
5419
+ localVarHeaderParameter['Content-Type'] = 'application/json';
5420
+
5421
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
5422
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
5423
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
5424
+ localVarRequestOptions.data = serializeDataIfNeeded(chatMessageRequest, localVarRequestOptions, configuration)
5425
+
5426
+ return {
5427
+ url: toPathString(localVarUrlObj),
5428
+ options: localVarRequestOptions,
5429
+ };
5430
+ },
5431
+ /**
5432
+ * 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\'.
5433
+ * @summary Send a message to an agent draft session
5434
+ * @param {string} aid Agent ID
5435
+ * @param {ChatMessageRequest} chatMessageRequest
5436
+ * @param {*} [options] Override http request option.
5437
+ * @throws {RequiredError}
5438
+ */
5439
+ sendMessageToDraft: async (aid: string, chatMessageRequest: ChatMessageRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
5440
+ // verify required parameter 'aid' is not null or undefined
5441
+ assertParamExists('sendMessageToDraft', 'aid', aid)
5442
+ // verify required parameter 'chatMessageRequest' is not null or undefined
5443
+ assertParamExists('sendMessageToDraft', 'chatMessageRequest', chatMessageRequest)
5444
+ const localVarPath = `/agents/{aid}/draft/messages`
5445
+ .replace(`{${"aid"}}`, encodeURIComponent(String(aid)));
5446
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
5447
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
5448
+ let baseOptions;
5449
+ if (configuration) {
5450
+ baseOptions = configuration.baseOptions;
5451
+ }
5452
+
5453
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
5454
+ const localVarHeaderParameter = {} as any;
5455
+ const localVarQueryParameter = {} as any;
5456
+
5457
+ // authentication HTTPBearer required
5458
+ // http bearer authentication required
5459
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
5460
+
5461
+
5462
+
5370
5463
  localVarHeaderParameter['Content-Type'] = 'application/json';
5371
5464
 
5372
5465
  setSearchParams(localVarUrlObj, localVarQueryParameter);
@@ -5549,6 +5642,21 @@ export const ChatApiFp = function(configuration?: Configuration) {
5549
5642
  const localVarOperationServerBasePath = operationServerMap['ChatApi.listMessagesInChat']?.[localVarOperationServerIndex]?.url;
5550
5643
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
5551
5644
  },
5645
+ /**
5646
+ * Retrieve the message history for the draft chat session of an agent with cursor-based pagination.
5647
+ * @summary List messages in an agent draft session
5648
+ * @param {string} aid Agent ID
5649
+ * @param {string | null} [cursor] Cursor for pagination (message id)
5650
+ * @param {number} [limit] Maximum number of messages to return
5651
+ * @param {*} [options] Override http request option.
5652
+ * @throws {RequiredError}
5653
+ */
5654
+ async listMessagesInDraft(aid: string, cursor?: string | null, limit?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ChatMessagesResponse>> {
5655
+ const localVarAxiosArgs = await localVarAxiosParamCreator.listMessagesInDraft(aid, cursor, limit, options);
5656
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
5657
+ const localVarOperationServerBasePath = operationServerMap['ChatApi.listMessagesInDraft']?.[localVarOperationServerIndex]?.url;
5658
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
5659
+ },
5552
5660
  /**
5553
5661
  * 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
5662
  * @summary Retry a message in a chat thread
@@ -5578,6 +5686,20 @@ export const ChatApiFp = function(configuration?: Configuration) {
5578
5686
  const localVarOperationServerBasePath = operationServerMap['ChatApi.sendMessageToChat']?.[localVarOperationServerIndex]?.url;
5579
5687
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
5580
5688
  },
5689
+ /**
5690
+ * 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\'.
5691
+ * @summary Send a message to an agent draft session
5692
+ * @param {string} aid Agent ID
5693
+ * @param {ChatMessageRequest} chatMessageRequest
5694
+ * @param {*} [options] Override http request option.
5695
+ * @throws {RequiredError}
5696
+ */
5697
+ async sendMessageToDraft(aid: string, chatMessageRequest: ChatMessageRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<ChatMessage>>> {
5698
+ const localVarAxiosArgs = await localVarAxiosParamCreator.sendMessageToDraft(aid, chatMessageRequest, options);
5699
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
5700
+ const localVarOperationServerBasePath = operationServerMap['ChatApi.sendMessageToDraft']?.[localVarOperationServerIndex]?.url;
5701
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
5702
+ },
5581
5703
  /**
5582
5704
  * Update details of a specific chat thread. Currently only supports updating the summary.
5583
5705
  * @summary Update a chat thread
@@ -5691,6 +5813,18 @@ export const ChatApiFactory = function (configuration?: Configuration, basePath?
5691
5813
  listMessagesInChat(aid: string, chatId: string, cursor?: string | null, limit?: number, options?: RawAxiosRequestConfig): AxiosPromise<ChatMessagesResponse> {
5692
5814
  return localVarFp.listMessagesInChat(aid, chatId, cursor, limit, options).then((request) => request(axios, basePath));
5693
5815
  },
5816
+ /**
5817
+ * Retrieve the message history for the draft chat session of an agent with cursor-based pagination.
5818
+ * @summary List messages in an agent draft session
5819
+ * @param {string} aid Agent ID
5820
+ * @param {string | null} [cursor] Cursor for pagination (message id)
5821
+ * @param {number} [limit] Maximum number of messages to return
5822
+ * @param {*} [options] Override http request option.
5823
+ * @throws {RequiredError}
5824
+ */
5825
+ listMessagesInDraft(aid: string, cursor?: string | null, limit?: number, options?: RawAxiosRequestConfig): AxiosPromise<ChatMessagesResponse> {
5826
+ return localVarFp.listMessagesInDraft(aid, cursor, limit, options).then((request) => request(axios, basePath));
5827
+ },
5694
5828
  /**
5695
5829
  * 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
5830
  * @summary Retry a message in a chat thread
@@ -5714,6 +5848,17 @@ export const ChatApiFactory = function (configuration?: Configuration, basePath?
5714
5848
  sendMessageToChat(aid: string, chatId: string, chatMessageRequest: ChatMessageRequest, options?: RawAxiosRequestConfig): AxiosPromise<Array<ChatMessage>> {
5715
5849
  return localVarFp.sendMessageToChat(aid, chatId, chatMessageRequest, options).then((request) => request(axios, basePath));
5716
5850
  },
5851
+ /**
5852
+ * 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\'.
5853
+ * @summary Send a message to an agent draft session
5854
+ * @param {string} aid Agent ID
5855
+ * @param {ChatMessageRequest} chatMessageRequest
5856
+ * @param {*} [options] Override http request option.
5857
+ * @throws {RequiredError}
5858
+ */
5859
+ sendMessageToDraft(aid: string, chatMessageRequest: ChatMessageRequest, options?: RawAxiosRequestConfig): AxiosPromise<Array<ChatMessage>> {
5860
+ return localVarFp.sendMessageToDraft(aid, chatMessageRequest, options).then((request) => request(axios, basePath));
5861
+ },
5717
5862
  /**
5718
5863
  * Update details of a specific chat thread. Currently only supports updating the summary.
5719
5864
  * @summary Update a chat thread
@@ -5840,6 +5985,20 @@ export class ChatApi extends BaseAPI {
5840
5985
  return ChatApiFp(this.configuration).listMessagesInChat(aid, chatId, cursor, limit, options).then((request) => request(this.axios, this.basePath));
5841
5986
  }
5842
5987
 
5988
+ /**
5989
+ * Retrieve the message history for the draft chat session of an agent with cursor-based pagination.
5990
+ * @summary List messages in an agent draft session
5991
+ * @param {string} aid Agent ID
5992
+ * @param {string | null} [cursor] Cursor for pagination (message id)
5993
+ * @param {number} [limit] Maximum number of messages to return
5994
+ * @param {*} [options] Override http request option.
5995
+ * @throws {RequiredError}
5996
+ * @memberof ChatApi
5997
+ */
5998
+ public listMessagesInDraft(aid: string, cursor?: string | null, limit?: number, options?: RawAxiosRequestConfig) {
5999
+ return ChatApiFp(this.configuration).listMessagesInDraft(aid, cursor, limit, options).then((request) => request(this.axios, this.basePath));
6000
+ }
6001
+
5843
6002
  /**
5844
6003
  * 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
6004
  * @summary Retry a message in a chat thread
@@ -5867,6 +6026,19 @@ export class ChatApi extends BaseAPI {
5867
6026
  return ChatApiFp(this.configuration).sendMessageToChat(aid, chatId, chatMessageRequest, options).then((request) => request(this.axios, this.basePath));
5868
6027
  }
5869
6028
 
6029
+ /**
6030
+ * 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\'.
6031
+ * @summary Send a message to an agent draft session
6032
+ * @param {string} aid Agent ID
6033
+ * @param {ChatMessageRequest} chatMessageRequest
6034
+ * @param {*} [options] Override http request option.
6035
+ * @throws {RequiredError}
6036
+ * @memberof ChatApi
6037
+ */
6038
+ public sendMessageToDraft(aid: string, chatMessageRequest: ChatMessageRequest, options?: RawAxiosRequestConfig) {
6039
+ return ChatApiFp(this.configuration).sendMessageToDraft(aid, chatMessageRequest, options).then((request) => request(this.axios, this.basePath));
6040
+ }
6041
+
5870
6042
  /**
5871
6043
  * Update details of a specific chat thread. Currently only supports updating the summary.
5872
6044
  * @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.19
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.19
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.19
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.19
6
6
  *
7
7
  *
8
8
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -3349,6 +3349,7 @@ export declare const LLMProvider: {
3349
3349
  readonly Openai: "openai";
3350
3350
  readonly Deepseek: "deepseek";
3351
3351
  readonly Xai: "xai";
3352
+ readonly Gatewayz: "gatewayz";
3352
3353
  readonly Eternal: "eternal";
3353
3354
  readonly Reigent: "reigent";
3354
3355
  readonly Venice: "venice";
@@ -4238,6 +4239,16 @@ export declare const ChatApiAxiosParamCreator: (configuration?: Configuration) =
4238
4239
  * @throws {RequiredError}
4239
4240
  */
4240
4241
  listMessagesInChat: (aid: string, chatId: string, cursor?: string | null, limit?: number, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
4242
+ /**
4243
+ * Retrieve the message history for the draft chat session of an agent with cursor-based pagination.
4244
+ * @summary List messages in an agent draft session
4245
+ * @param {string} aid Agent ID
4246
+ * @param {string | null} [cursor] Cursor for pagination (message id)
4247
+ * @param {number} [limit] Maximum number of messages to return
4248
+ * @param {*} [options] Override http request option.
4249
+ * @throws {RequiredError}
4250
+ */
4251
+ listMessagesInDraft: (aid: string, cursor?: string | null, limit?: number, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
4241
4252
  /**
4242
4253
  * 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
4254
  * @summary Retry a message in a chat thread
@@ -4257,6 +4268,15 @@ export declare const ChatApiAxiosParamCreator: (configuration?: Configuration) =
4257
4268
  * @throws {RequiredError}
4258
4269
  */
4259
4270
  sendMessageToChat: (aid: string, chatId: string, chatMessageRequest: ChatMessageRequest, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
4271
+ /**
4272
+ * 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\'.
4273
+ * @summary Send a message to an agent draft session
4274
+ * @param {string} aid Agent ID
4275
+ * @param {ChatMessageRequest} chatMessageRequest
4276
+ * @param {*} [options] Override http request option.
4277
+ * @throws {RequiredError}
4278
+ */
4279
+ sendMessageToDraft: (aid: string, chatMessageRequest: ChatMessageRequest, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
4260
4280
  /**
4261
4281
  * Update details of a specific chat thread. Currently only supports updating the summary.
4262
4282
  * @summary Update a chat thread
@@ -4345,6 +4365,16 @@ export declare const ChatApiFp: (configuration?: Configuration) => {
4345
4365
  * @throws {RequiredError}
4346
4366
  */
4347
4367
  listMessagesInChat(aid: string, chatId: string, cursor?: string | null, limit?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ChatMessagesResponse>>;
4368
+ /**
4369
+ * Retrieve the message history for the draft chat session of an agent with cursor-based pagination.
4370
+ * @summary List messages in an agent draft session
4371
+ * @param {string} aid Agent ID
4372
+ * @param {string | null} [cursor] Cursor for pagination (message id)
4373
+ * @param {number} [limit] Maximum number of messages to return
4374
+ * @param {*} [options] Override http request option.
4375
+ * @throws {RequiredError}
4376
+ */
4377
+ listMessagesInDraft(aid: string, cursor?: string | null, limit?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ChatMessagesResponse>>;
4348
4378
  /**
4349
4379
  * 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
4380
  * @summary Retry a message in a chat thread
@@ -4364,6 +4394,15 @@ export declare const ChatApiFp: (configuration?: Configuration) => {
4364
4394
  * @throws {RequiredError}
4365
4395
  */
4366
4396
  sendMessageToChat(aid: string, chatId: string, chatMessageRequest: ChatMessageRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<ChatMessage>>>;
4397
+ /**
4398
+ * 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\'.
4399
+ * @summary Send a message to an agent draft session
4400
+ * @param {string} aid Agent ID
4401
+ * @param {ChatMessageRequest} chatMessageRequest
4402
+ * @param {*} [options] Override http request option.
4403
+ * @throws {RequiredError}
4404
+ */
4405
+ sendMessageToDraft(aid: string, chatMessageRequest: ChatMessageRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<ChatMessage>>>;
4367
4406
  /**
4368
4407
  * Update details of a specific chat thread. Currently only supports updating the summary.
4369
4408
  * @summary Update a chat thread
@@ -4452,6 +4491,16 @@ export declare const ChatApiFactory: (configuration?: Configuration, basePath?:
4452
4491
  * @throws {RequiredError}
4453
4492
  */
4454
4493
  listMessagesInChat(aid: string, chatId: string, cursor?: string | null, limit?: number, options?: RawAxiosRequestConfig): AxiosPromise<ChatMessagesResponse>;
4494
+ /**
4495
+ * Retrieve the message history for the draft chat session of an agent with cursor-based pagination.
4496
+ * @summary List messages in an agent draft session
4497
+ * @param {string} aid Agent ID
4498
+ * @param {string | null} [cursor] Cursor for pagination (message id)
4499
+ * @param {number} [limit] Maximum number of messages to return
4500
+ * @param {*} [options] Override http request option.
4501
+ * @throws {RequiredError}
4502
+ */
4503
+ listMessagesInDraft(aid: string, cursor?: string | null, limit?: number, options?: RawAxiosRequestConfig): AxiosPromise<ChatMessagesResponse>;
4455
4504
  /**
4456
4505
  * 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
4506
  * @summary Retry a message in a chat thread
@@ -4471,6 +4520,15 @@ export declare const ChatApiFactory: (configuration?: Configuration, basePath?:
4471
4520
  * @throws {RequiredError}
4472
4521
  */
4473
4522
  sendMessageToChat(aid: string, chatId: string, chatMessageRequest: ChatMessageRequest, options?: RawAxiosRequestConfig): AxiosPromise<Array<ChatMessage>>;
4523
+ /**
4524
+ * 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\'.
4525
+ * @summary Send a message to an agent draft session
4526
+ * @param {string} aid Agent ID
4527
+ * @param {ChatMessageRequest} chatMessageRequest
4528
+ * @param {*} [options] Override http request option.
4529
+ * @throws {RequiredError}
4530
+ */
4531
+ sendMessageToDraft(aid: string, chatMessageRequest: ChatMessageRequest, options?: RawAxiosRequestConfig): AxiosPromise<Array<ChatMessage>>;
4474
4532
  /**
4475
4533
  * Update details of a specific chat thread. Currently only supports updating the summary.
4476
4534
  * @summary Update a chat thread
@@ -4569,6 +4627,17 @@ export declare class ChatApi extends BaseAPI {
4569
4627
  * @memberof ChatApi
4570
4628
  */
4571
4629
  listMessagesInChat(aid: string, chatId: string, cursor?: string | null, limit?: number, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<ChatMessagesResponse, any, {}>>;
4630
+ /**
4631
+ * Retrieve the message history for the draft chat session of an agent with cursor-based pagination.
4632
+ * @summary List messages in an agent draft session
4633
+ * @param {string} aid Agent ID
4634
+ * @param {string | null} [cursor] Cursor for pagination (message id)
4635
+ * @param {number} [limit] Maximum number of messages to return
4636
+ * @param {*} [options] Override http request option.
4637
+ * @throws {RequiredError}
4638
+ * @memberof ChatApi
4639
+ */
4640
+ listMessagesInDraft(aid: string, cursor?: string | null, limit?: number, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<ChatMessagesResponse, any, {}>>;
4572
4641
  /**
4573
4642
  * 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
4643
  * @summary Retry a message in a chat thread
@@ -4590,6 +4659,16 @@ export declare class ChatApi extends BaseAPI {
4590
4659
  * @memberof ChatApi
4591
4660
  */
4592
4661
  sendMessageToChat(aid: string, chatId: string, chatMessageRequest: ChatMessageRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<ChatMessage[], any, {}>>;
4662
+ /**
4663
+ * 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\'.
4664
+ * @summary Send a message to an agent draft session
4665
+ * @param {string} aid Agent ID
4666
+ * @param {ChatMessageRequest} chatMessageRequest
4667
+ * @param {*} [options] Override http request option.
4668
+ * @throws {RequiredError}
4669
+ * @memberof ChatApi
4670
+ */
4671
+ sendMessageToDraft(aid: string, chatMessageRequest: ChatMessageRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<ChatMessage[], any, {}>>;
4593
4672
  /**
4594
4673
  * Update details of a specific chat thread. Currently only supports updating the summary.
4595
4674
  * @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.19
9
9
  *
10
10
  *
11
11
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -322,6 +322,7 @@ exports.LLMProvider = {
322
322
  Openai: 'openai',
323
323
  Deepseek: 'deepseek',
324
324
  Xai: 'xai',
325
+ Gatewayz: 'gatewayz',
325
326
  Eternal: 'eternal',
326
327
  Reigent: 'reigent',
327
328
  Venice: 'venice'
@@ -2338,6 +2339,61 @@ var ChatApiAxiosParamCreator = function (configuration) {
2338
2339
  });
2339
2340
  });
2340
2341
  },
2342
+ /**
2343
+ * Retrieve the message history for the draft chat session of an agent with cursor-based pagination.
2344
+ * @summary List messages in an agent draft session
2345
+ * @param {string} aid Agent ID
2346
+ * @param {string | null} [cursor] Cursor for pagination (message id)
2347
+ * @param {number} [limit] Maximum number of messages to return
2348
+ * @param {*} [options] Override http request option.
2349
+ * @throws {RequiredError}
2350
+ */
2351
+ listMessagesInDraft: function (aid_1, cursor_1, limit_1) {
2352
+ var args_1 = [];
2353
+ for (var _i = 3; _i < arguments.length; _i++) {
2354
+ args_1[_i - 3] = arguments[_i];
2355
+ }
2356
+ return __awaiter(_this, __spreadArray([aid_1, cursor_1, limit_1], args_1, true), void 0, function (aid, cursor, limit, options) {
2357
+ var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
2358
+ if (options === void 0) { options = {}; }
2359
+ return __generator(this, function (_a) {
2360
+ switch (_a.label) {
2361
+ case 0:
2362
+ // verify required parameter 'aid' is not null or undefined
2363
+ (0, common_1.assertParamExists)('listMessagesInDraft', 'aid', aid);
2364
+ localVarPath = "/agents/{aid}/draft/messages"
2365
+ .replace("{".concat("aid", "}"), encodeURIComponent(String(aid)));
2366
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
2367
+ if (configuration) {
2368
+ baseOptions = configuration.baseOptions;
2369
+ }
2370
+ localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
2371
+ localVarHeaderParameter = {};
2372
+ localVarQueryParameter = {};
2373
+ // authentication HTTPBearer required
2374
+ // http bearer authentication required
2375
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
2376
+ case 1:
2377
+ // authentication HTTPBearer required
2378
+ // http bearer authentication required
2379
+ _a.sent();
2380
+ if (cursor !== undefined) {
2381
+ localVarQueryParameter['cursor'] = cursor;
2382
+ }
2383
+ if (limit !== undefined) {
2384
+ localVarQueryParameter['limit'] = limit;
2385
+ }
2386
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
2387
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2388
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
2389
+ return [2 /*return*/, {
2390
+ url: (0, common_1.toPathString)(localVarUrlObj),
2391
+ options: localVarRequestOptions,
2392
+ }];
2393
+ }
2394
+ });
2395
+ });
2396
+ },
2341
2397
  /**
2342
2398
  * 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
2399
  * @summary Retry a message in a chat thread
@@ -2445,6 +2501,58 @@ var ChatApiAxiosParamCreator = function (configuration) {
2445
2501
  });
2446
2502
  });
2447
2503
  },
2504
+ /**
2505
+ * 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\'.
2506
+ * @summary Send a message to an agent draft session
2507
+ * @param {string} aid Agent ID
2508
+ * @param {ChatMessageRequest} chatMessageRequest
2509
+ * @param {*} [options] Override http request option.
2510
+ * @throws {RequiredError}
2511
+ */
2512
+ sendMessageToDraft: function (aid_1, chatMessageRequest_1) {
2513
+ var args_1 = [];
2514
+ for (var _i = 2; _i < arguments.length; _i++) {
2515
+ args_1[_i - 2] = arguments[_i];
2516
+ }
2517
+ return __awaiter(_this, __spreadArray([aid_1, chatMessageRequest_1], args_1, true), void 0, function (aid, chatMessageRequest, options) {
2518
+ var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
2519
+ if (options === void 0) { options = {}; }
2520
+ return __generator(this, function (_a) {
2521
+ switch (_a.label) {
2522
+ case 0:
2523
+ // verify required parameter 'aid' is not null or undefined
2524
+ (0, common_1.assertParamExists)('sendMessageToDraft', 'aid', aid);
2525
+ // verify required parameter 'chatMessageRequest' is not null or undefined
2526
+ (0, common_1.assertParamExists)('sendMessageToDraft', 'chatMessageRequest', chatMessageRequest);
2527
+ localVarPath = "/agents/{aid}/draft/messages"
2528
+ .replace("{".concat("aid", "}"), encodeURIComponent(String(aid)));
2529
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
2530
+ if (configuration) {
2531
+ baseOptions = configuration.baseOptions;
2532
+ }
2533
+ localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
2534
+ localVarHeaderParameter = {};
2535
+ localVarQueryParameter = {};
2536
+ // authentication HTTPBearer required
2537
+ // http bearer authentication required
2538
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
2539
+ case 1:
2540
+ // authentication HTTPBearer required
2541
+ // http bearer authentication required
2542
+ _a.sent();
2543
+ localVarHeaderParameter['Content-Type'] = 'application/json';
2544
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
2545
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2546
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
2547
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(chatMessageRequest, localVarRequestOptions, configuration);
2548
+ return [2 /*return*/, {
2549
+ url: (0, common_1.toPathString)(localVarUrlObj),
2550
+ options: localVarRequestOptions,
2551
+ }];
2552
+ }
2553
+ });
2554
+ });
2555
+ },
2448
2556
  /**
2449
2557
  * Update details of a specific chat thread. Currently only supports updating the summary.
2450
2558
  * @summary Update a chat thread
@@ -2703,6 +2811,31 @@ var ChatApiFp = function (configuration) {
2703
2811
  });
2704
2812
  });
2705
2813
  },
2814
+ /**
2815
+ * Retrieve the message history for the draft chat session of an agent with cursor-based pagination.
2816
+ * @summary List messages in an agent draft session
2817
+ * @param {string} aid Agent ID
2818
+ * @param {string | null} [cursor] Cursor for pagination (message id)
2819
+ * @param {number} [limit] Maximum number of messages to return
2820
+ * @param {*} [options] Override http request option.
2821
+ * @throws {RequiredError}
2822
+ */
2823
+ listMessagesInDraft: function (aid, cursor, limit, options) {
2824
+ return __awaiter(this, void 0, void 0, function () {
2825
+ var localVarAxiosArgs, localVarOperationServerIndex, localVarOperationServerBasePath;
2826
+ var _a, _b, _c;
2827
+ return __generator(this, function (_d) {
2828
+ switch (_d.label) {
2829
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.listMessagesInDraft(aid, cursor, limit, options)];
2830
+ case 1:
2831
+ localVarAxiosArgs = _d.sent();
2832
+ localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
2833
+ localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['ChatApi.listMessagesInDraft']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
2834
+ return [2 /*return*/, function (axios, basePath) { return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }];
2835
+ }
2836
+ });
2837
+ });
2838
+ },
2706
2839
  /**
2707
2840
  * 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
2841
  * @summary Retry a message in a chat thread
@@ -2752,6 +2885,30 @@ var ChatApiFp = function (configuration) {
2752
2885
  });
2753
2886
  });
2754
2887
  },
2888
+ /**
2889
+ * 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\'.
2890
+ * @summary Send a message to an agent draft session
2891
+ * @param {string} aid Agent ID
2892
+ * @param {ChatMessageRequest} chatMessageRequest
2893
+ * @param {*} [options] Override http request option.
2894
+ * @throws {RequiredError}
2895
+ */
2896
+ sendMessageToDraft: function (aid, chatMessageRequest, options) {
2897
+ return __awaiter(this, void 0, void 0, function () {
2898
+ var localVarAxiosArgs, localVarOperationServerIndex, localVarOperationServerBasePath;
2899
+ var _a, _b, _c;
2900
+ return __generator(this, function (_d) {
2901
+ switch (_d.label) {
2902
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.sendMessageToDraft(aid, chatMessageRequest, options)];
2903
+ case 1:
2904
+ localVarAxiosArgs = _d.sent();
2905
+ localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
2906
+ localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['ChatApi.sendMessageToDraft']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
2907
+ return [2 /*return*/, function (axios, basePath) { return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }];
2908
+ }
2909
+ });
2910
+ });
2911
+ },
2755
2912
  /**
2756
2913
  * Update details of a specific chat thread. Currently only supports updating the summary.
2757
2914
  * @summary Update a chat thread
@@ -2875,6 +3032,18 @@ var ChatApiFactory = function (configuration, basePath, axios) {
2875
3032
  listMessagesInChat: function (aid, chatId, cursor, limit, options) {
2876
3033
  return localVarFp.listMessagesInChat(aid, chatId, cursor, limit, options).then(function (request) { return request(axios, basePath); });
2877
3034
  },
3035
+ /**
3036
+ * Retrieve the message history for the draft chat session of an agent with cursor-based pagination.
3037
+ * @summary List messages in an agent draft session
3038
+ * @param {string} aid Agent ID
3039
+ * @param {string | null} [cursor] Cursor for pagination (message id)
3040
+ * @param {number} [limit] Maximum number of messages to return
3041
+ * @param {*} [options] Override http request option.
3042
+ * @throws {RequiredError}
3043
+ */
3044
+ listMessagesInDraft: function (aid, cursor, limit, options) {
3045
+ return localVarFp.listMessagesInDraft(aid, cursor, limit, options).then(function (request) { return request(axios, basePath); });
3046
+ },
2878
3047
  /**
2879
3048
  * 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
3049
  * @summary Retry a message in a chat thread
@@ -2898,6 +3067,17 @@ var ChatApiFactory = function (configuration, basePath, axios) {
2898
3067
  sendMessageToChat: function (aid, chatId, chatMessageRequest, options) {
2899
3068
  return localVarFp.sendMessageToChat(aid, chatId, chatMessageRequest, options).then(function (request) { return request(axios, basePath); });
2900
3069
  },
3070
+ /**
3071
+ * 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\'.
3072
+ * @summary Send a message to an agent draft session
3073
+ * @param {string} aid Agent ID
3074
+ * @param {ChatMessageRequest} chatMessageRequest
3075
+ * @param {*} [options] Override http request option.
3076
+ * @throws {RequiredError}
3077
+ */
3078
+ sendMessageToDraft: function (aid, chatMessageRequest, options) {
3079
+ return localVarFp.sendMessageToDraft(aid, chatMessageRequest, options).then(function (request) { return request(axios, basePath); });
3080
+ },
2901
3081
  /**
2902
3082
  * Update details of a specific chat thread. Currently only supports updating the summary.
2903
3083
  * @summary Update a chat thread
@@ -3028,6 +3208,20 @@ var ChatApi = /** @class */ (function (_super) {
3028
3208
  var _this = this;
3029
3209
  return (0, exports.ChatApiFp)(this.configuration).listMessagesInChat(aid, chatId, cursor, limit, options).then(function (request) { return request(_this.axios, _this.basePath); });
3030
3210
  };
3211
+ /**
3212
+ * Retrieve the message history for the draft chat session of an agent with cursor-based pagination.
3213
+ * @summary List messages in an agent draft session
3214
+ * @param {string} aid Agent ID
3215
+ * @param {string | null} [cursor] Cursor for pagination (message id)
3216
+ * @param {number} [limit] Maximum number of messages to return
3217
+ * @param {*} [options] Override http request option.
3218
+ * @throws {RequiredError}
3219
+ * @memberof ChatApi
3220
+ */
3221
+ ChatApi.prototype.listMessagesInDraft = function (aid, cursor, limit, options) {
3222
+ var _this = this;
3223
+ return (0, exports.ChatApiFp)(this.configuration).listMessagesInDraft(aid, cursor, limit, options).then(function (request) { return request(_this.axios, _this.basePath); });
3224
+ };
3031
3225
  /**
3032
3226
  * 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
3227
  * @summary Retry a message in a chat thread
@@ -3055,6 +3249,19 @@ var ChatApi = /** @class */ (function (_super) {
3055
3249
  var _this = this;
3056
3250
  return (0, exports.ChatApiFp)(this.configuration).sendMessageToChat(aid, chatId, chatMessageRequest, options).then(function (request) { return request(_this.axios, _this.basePath); });
3057
3251
  };
3252
+ /**
3253
+ * 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\'.
3254
+ * @summary Send a message to an agent draft session
3255
+ * @param {string} aid Agent ID
3256
+ * @param {ChatMessageRequest} chatMessageRequest
3257
+ * @param {*} [options] Override http request option.
3258
+ * @throws {RequiredError}
3259
+ * @memberof ChatApi
3260
+ */
3261
+ ChatApi.prototype.sendMessageToDraft = function (aid, chatMessageRequest, options) {
3262
+ var _this = this;
3263
+ return (0, exports.ChatApiFp)(this.configuration).sendMessageToDraft(aid, chatMessageRequest, options).then(function (request) { return request(_this.axios, _this.basePath); });
3264
+ };
3058
3265
  /**
3059
3266
  * Update details of a specific chat thread. Currently only supports updating the summary.
3060
3267
  * @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.19
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.19
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.19
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.19
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.19
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.19
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.19
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.19
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-28T16:12:41.906+00:00]
31
+ **updated_at** | **string** | Timestamp when this data was updated | [optional] [default to 2025-09-28T16:12:41.906+00:00]
32
32
  **provider_name** | **string** | | [default to undefined]
33
33
 
34
34
  ## Example
@@ -9,6 +9,8 @@
9
9
 
10
10
  * `Xai` (value: `'xai'`)
11
11
 
12
+ * `Gatewayz` (value: `'gatewayz'`)
13
+
12
14
  * `Eternal` (value: `'eternal'`)
13
15
 
14
16
  * `Reigent` (value: `'reigent'`)
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.19
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.19",
4
4
  "description": "OpenAPI client for @crestal/nation-sdk",
5
5
  "author": "OpenAPI-Generator Contributors",
6
6
  "repository": {