arky-sdk 0.5.55 → 0.5.57
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 +24 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +7 -3
- package/dist/index.d.ts +7 -3
- package/dist/index.js +24 -5
- package/dist/index.js.map +1 -1
- package/dist/types.cjs.map +1 -1
- package/dist/types.d.cts +10 -6
- package/dist/types.d.ts +10 -6
- package/dist/types.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1424,22 +1424,41 @@ var createAgentApi = (apiConfig) => {
|
|
|
1424
1424
|
options
|
|
1425
1425
|
);
|
|
1426
1426
|
},
|
|
1427
|
-
async
|
|
1427
|
+
async getChats(params, options) {
|
|
1428
1428
|
const queryParams = {};
|
|
1429
1429
|
if (params.limit) queryParams.limit = String(params.limit);
|
|
1430
|
+
if (params.cursor) queryParams.cursor = params.cursor;
|
|
1430
1431
|
return apiConfig.httpClient.get(
|
|
1431
|
-
`/v1/businesses/${apiConfig.businessId}/agents/${params.id}/
|
|
1432
|
+
`/v1/businesses/${apiConfig.businessId}/agents/${params.id}/chats`,
|
|
1432
1433
|
{
|
|
1433
1434
|
...options,
|
|
1434
1435
|
params: Object.keys(queryParams).length > 0 ? queryParams : void 0
|
|
1435
1436
|
}
|
|
1436
1437
|
);
|
|
1437
1438
|
},
|
|
1438
|
-
async
|
|
1439
|
-
return apiConfig.httpClient.
|
|
1440
|
-
`/v1/businesses/${apiConfig.businessId}/agents/${params.id}/
|
|
1439
|
+
async getChat(params, options) {
|
|
1440
|
+
return apiConfig.httpClient.get(
|
|
1441
|
+
`/v1/businesses/${apiConfig.businessId}/agents/${params.id}/chats/${params.chatId}`,
|
|
1442
|
+
options
|
|
1443
|
+
);
|
|
1444
|
+
},
|
|
1445
|
+
async updateChat(params, options) {
|
|
1446
|
+
return apiConfig.httpClient.put(
|
|
1447
|
+
`/v1/businesses/${apiConfig.businessId}/agents/${params.id}/chats/${params.chatId}`,
|
|
1448
|
+
{ status: params.status },
|
|
1441
1449
|
options
|
|
1442
1450
|
);
|
|
1451
|
+
},
|
|
1452
|
+
async getChatMessages(params, options) {
|
|
1453
|
+
const queryParams = {};
|
|
1454
|
+
if (params.limit) queryParams.limit = String(params.limit);
|
|
1455
|
+
return apiConfig.httpClient.get(
|
|
1456
|
+
`/v1/businesses/${apiConfig.businessId}/agents/${params.id}/chats/${params.chatId}/messages`,
|
|
1457
|
+
{
|
|
1458
|
+
...options,
|
|
1459
|
+
params: Object.keys(queryParams).length > 0 ? queryParams : void 0
|
|
1460
|
+
}
|
|
1461
|
+
);
|
|
1443
1462
|
}
|
|
1444
1463
|
};
|
|
1445
1464
|
};
|