@breign/client 1.0.98 → 1.0.99

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.
@@ -80,6 +80,7 @@ export interface GetConversationsForAgentRequest {
80
80
  instanceId?: string;
81
81
  lastMessageFrom?: Date;
82
82
  lastMessageTo?: Date;
83
+ sortOrder?: GetConversationsForAgentSortOrderEnum;
83
84
  }
84
85
  export interface GetFlowRequest {
85
86
  agentId: string;
@@ -311,7 +312,7 @@ export declare class AgentApi extends runtime.BaseAPI {
311
312
  * Get conversations for an agent
312
313
  * Get conversations for an agent
313
314
  */
314
- getConversationsForAgent(agentId: string, page?: number, search?: string, appId?: string, instanceId?: string, lastMessageFrom?: Date, lastMessageTo?: Date, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<ChatUio>>;
315
+ getConversationsForAgent(agentId: string, page?: number, search?: string, appId?: string, instanceId?: string, lastMessageFrom?: Date, lastMessageTo?: Date, sortOrder?: GetConversationsForAgentSortOrderEnum, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<ChatUio>>;
315
316
  /**
316
317
  * Retrieves a specific conversation flow by ID
317
318
  * Get a specific flow
@@ -493,6 +494,14 @@ export declare const GetAgentsProviderSourceEnum: {
493
494
  readonly Internal: "INTERNAL";
494
495
  };
495
496
  export type GetAgentsProviderSourceEnum = typeof GetAgentsProviderSourceEnum[keyof typeof GetAgentsProviderSourceEnum];
497
+ /**
498
+ * @export
499
+ */
500
+ export declare const GetConversationsForAgentSortOrderEnum: {
501
+ readonly Asc: "asc";
502
+ readonly Desc: "desc";
503
+ };
504
+ export type GetConversationsForAgentSortOrderEnum = typeof GetConversationsForAgentSortOrderEnum[keyof typeof GetConversationsForAgentSortOrderEnum];
496
505
  /**
497
506
  * @export
498
507
  */
@@ -46,7 +46,7 @@ var __importStar = (this && this.__importStar) || (function () {
46
46
  };
47
47
  })();
48
48
  Object.defineProperty(exports, "__esModule", { value: true });
49
- exports.ListOrganizationAgentsProviderSourceEnum = exports.GetAgentsProviderSourceEnum = exports.AgentApi = void 0;
49
+ exports.ListOrganizationAgentsProviderSourceEnum = exports.GetConversationsForAgentSortOrderEnum = exports.GetAgentsProviderSourceEnum = exports.AgentApi = void 0;
50
50
  const runtime = __importStar(require("../runtime"));
51
51
  const index_1 = require("../models/index");
52
52
  /**
@@ -566,6 +566,9 @@ class AgentApi extends runtime.BaseAPI {
566
566
  if (requestParameters['lastMessageTo'] != null) {
567
567
  queryParameters['lastMessageTo'] = requestParameters['lastMessageTo'].toISOString();
568
568
  }
569
+ if (requestParameters['sortOrder'] != null) {
570
+ queryParameters['sortOrder'] = requestParameters['sortOrder'];
571
+ }
569
572
  const headerParameters = {};
570
573
  if (this.configuration && this.configuration.apiKey) {
571
574
  headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
@@ -582,8 +585,8 @@ class AgentApi extends runtime.BaseAPI {
582
585
  * Get conversations for an agent
583
586
  * Get conversations for an agent
584
587
  */
585
- async getConversationsForAgent(agentId, page, search, appId, instanceId, lastMessageFrom, lastMessageTo, initOverrides) {
586
- const response = await this.getConversationsForAgentRaw({ agentId: agentId, page: page, search: search, appId: appId, instanceId: instanceId, lastMessageFrom: lastMessageFrom, lastMessageTo: lastMessageTo }, initOverrides);
588
+ async getConversationsForAgent(agentId, page, search, appId, instanceId, lastMessageFrom, lastMessageTo, sortOrder, initOverrides) {
589
+ const response = await this.getConversationsForAgentRaw({ agentId: agentId, page: page, search: search, appId: appId, instanceId: instanceId, lastMessageFrom: lastMessageFrom, lastMessageTo: lastMessageTo, sortOrder: sortOrder }, initOverrides);
587
590
  return await response.value();
588
591
  }
589
592
  /**
@@ -1161,6 +1164,13 @@ exports.GetAgentsProviderSourceEnum = {
1161
1164
  External: 'EXTERNAL',
1162
1165
  Internal: 'INTERNAL'
1163
1166
  };
1167
+ /**
1168
+ * @export
1169
+ */
1170
+ exports.GetConversationsForAgentSortOrderEnum = {
1171
+ Asc: 'asc',
1172
+ Desc: 'desc'
1173
+ };
1164
1174
  /**
1165
1175
  * @export
1166
1176
  */
package/dist/openapi.json CHANGED
@@ -1496,6 +1496,15 @@
1496
1496
  "format" : "date-time",
1497
1497
  "type" : "string"
1498
1498
  }
1499
+ }, {
1500
+ "description" : "Sort conversations by last activity (asc = oldest first, desc = most recent first)",
1501
+ "in" : "query",
1502
+ "name" : "sortOrder",
1503
+ "schema" : {
1504
+ "default" : "desc",
1505
+ "enum" : [ "asc", "desc" ],
1506
+ "type" : "string"
1507
+ }
1499
1508
  } ],
1500
1509
  "responses" : {
1501
1510
  "200" : {
@@ -8536,6 +8545,16 @@
8536
8545
  "type" : "string"
8537
8546
  }
8538
8547
  },
8548
+ "sortOrder" : {
8549
+ "description" : "Sort conversations by last activity (asc = oldest first, desc = most recent first)",
8550
+ "in" : "query",
8551
+ "name" : "sortOrder",
8552
+ "schema" : {
8553
+ "default" : "desc",
8554
+ "enum" : [ "asc", "desc" ],
8555
+ "type" : "string"
8556
+ }
8557
+ },
8539
8558
  "ephemeral" : {
8540
8559
  "description" : "If true, the resource will not appear in history and will be deleted after a certain time.",
8541
8560
  "in" : "query",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@breign/client",
3
- "version": "1.0.98",
3
+ "version": "1.0.99",
4
4
  "main": "dist/index.js",
5
5
  "exports": {
6
6
  ".": "./dist/index.js",