arky-sdk 0.5.60 → 0.5.62
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 +9 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +9 -4
- package/dist/index.js.map +1 -1
- package/dist/types.cjs.map +1 -1
- package/dist/types.d.cts +5 -3
- package/dist/types.d.ts +5 -3
- package/dist/types.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1418,9 +1418,12 @@ var createAgentApi = (apiConfig) => {
|
|
|
1418
1418
|
});
|
|
1419
1419
|
},
|
|
1420
1420
|
async runAgent(params, options) {
|
|
1421
|
+
const body = { message: params.message };
|
|
1422
|
+
if (params.chatId) body.chatId = params.chatId;
|
|
1423
|
+
if (params.direct) body.direct = params.direct;
|
|
1421
1424
|
return apiConfig.httpClient.post(
|
|
1422
1425
|
`/v1/businesses/${apiConfig.businessId}/agents/${params.id}/run`,
|
|
1423
|
-
|
|
1426
|
+
body,
|
|
1424
1427
|
options
|
|
1425
1428
|
);
|
|
1426
1429
|
},
|
|
@@ -1468,10 +1471,12 @@ var createAgentApi = (apiConfig) => {
|
|
|
1468
1471
|
}
|
|
1469
1472
|
);
|
|
1470
1473
|
},
|
|
1471
|
-
async
|
|
1474
|
+
async sendMessage(params, options) {
|
|
1475
|
+
const body = { message: params.message };
|
|
1476
|
+
if (params.direct) body.direct = params.direct;
|
|
1472
1477
|
return apiConfig.httpClient.post(
|
|
1473
|
-
`/v1/businesses/${apiConfig.businessId}/
|
|
1474
|
-
|
|
1478
|
+
`/v1/businesses/${apiConfig.businessId}/chats/${params.chatId}/messages`,
|
|
1479
|
+
body,
|
|
1475
1480
|
options
|
|
1476
1481
|
);
|
|
1477
1482
|
}
|