arky-sdk 0.5.62 → 0.5.64

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/dist/index.cjs CHANGED
@@ -1417,12 +1417,12 @@ var createAgentApi = (apiConfig) => {
1417
1417
  params: Object.keys(queryParams).length > 0 ? queryParams : void 0
1418
1418
  });
1419
1419
  },
1420
- async runAgent(params, options) {
1420
+ async sendMessage(params, options) {
1421
1421
  const body = { message: params.message };
1422
1422
  if (params.chatId) body.chatId = params.chatId;
1423
1423
  if (params.direct) body.direct = params.direct;
1424
1424
  return apiConfig.httpClient.post(
1425
- `/v1/businesses/${apiConfig.businessId}/agents/${params.id}/run`,
1425
+ `/v1/businesses/${apiConfig.businessId}/agents/${params.id}/chats/messages`,
1426
1426
  body,
1427
1427
  options
1428
1428
  );
@@ -1452,6 +1452,15 @@ var createAgentApi = (apiConfig) => {
1452
1452
  options
1453
1453
  );
1454
1454
  },
1455
+ async rateChat(params, options) {
1456
+ const body = { rating: params.rating };
1457
+ if (params.comment) body.comment = params.comment;
1458
+ return apiConfig.httpClient.post(
1459
+ `/v1/businesses/${apiConfig.businessId}/agents/${params.id}/chats/${params.chatId}/rate`,
1460
+ body,
1461
+ options
1462
+ );
1463
+ },
1455
1464
  async getBusinessChats(params, options) {
1456
1465
  const businessId = params.businessId || apiConfig.businessId;
1457
1466
  const { businessId: _, ...queryParams } = params;
@@ -1470,15 +1479,6 @@ var createAgentApi = (apiConfig) => {
1470
1479
  params: Object.keys(queryParams).length > 0 ? queryParams : void 0
1471
1480
  }
1472
1481
  );
1473
- },
1474
- async sendMessage(params, options) {
1475
- const body = { message: params.message };
1476
- if (params.direct) body.direct = params.direct;
1477
- return apiConfig.httpClient.post(
1478
- `/v1/businesses/${apiConfig.businessId}/chats/${params.chatId}/messages`,
1479
- body,
1480
- options
1481
- );
1482
1482
  }
1483
1483
  };
1484
1484
  };