arky-sdk 0.5.58 → 0.5.60
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 +15 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +5 -1
- package/dist/index.d.ts +5 -1
- package/dist/index.js +15 -0
- package/dist/index.js.map +1 -1
- package/dist/types.cjs.map +1 -1
- package/dist/types.d.cts +12 -1
- package/dist/types.d.ts +12 -1
- package/dist/types.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1449,6 +1449,14 @@ var createAgentApi = (apiConfig) => {
|
|
|
1449
1449
|
options
|
|
1450
1450
|
);
|
|
1451
1451
|
},
|
|
1452
|
+
async getBusinessChats(params, options) {
|
|
1453
|
+
const businessId = params.businessId || apiConfig.businessId;
|
|
1454
|
+
const { businessId: _, ...queryParams } = params;
|
|
1455
|
+
return apiConfig.httpClient.get(`/v1/businesses/${businessId}/chats`, {
|
|
1456
|
+
...options,
|
|
1457
|
+
params: Object.keys(queryParams).length > 0 ? queryParams : void 0
|
|
1458
|
+
});
|
|
1459
|
+
},
|
|
1452
1460
|
async getChatMessages(params, options) {
|
|
1453
1461
|
const queryParams = {};
|
|
1454
1462
|
if (params.limit) queryParams.limit = String(params.limit);
|
|
@@ -1459,6 +1467,13 @@ var createAgentApi = (apiConfig) => {
|
|
|
1459
1467
|
params: Object.keys(queryParams).length > 0 ? queryParams : void 0
|
|
1460
1468
|
}
|
|
1461
1469
|
);
|
|
1470
|
+
},
|
|
1471
|
+
async sendChatMessage(params, options) {
|
|
1472
|
+
return apiConfig.httpClient.post(
|
|
1473
|
+
`/v1/businesses/${apiConfig.businessId}/agents/${params.id}/chats/${params.chatId}/messages`,
|
|
1474
|
+
{ message: params.message },
|
|
1475
|
+
options
|
|
1476
|
+
);
|
|
1462
1477
|
}
|
|
1463
1478
|
};
|
|
1464
1479
|
};
|