@chatbotkit/cli 1.26.2 → 1.26.3
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/cjs/command/api/blueprint/index.cjs +81 -0
- package/dist/cjs/command/api/blueprint/index.d.ts +8 -0
- package/dist/cjs/command/api/bot/index.cjs +61 -0
- package/dist/cjs/command/api/bot/index.d.ts +6 -0
- package/dist/cjs/command/api/contact/index.cjs +61 -0
- package/dist/cjs/command/api/contact/index.d.ts +6 -0
- package/dist/cjs/command/api/dataset/file/index.cjs +76 -0
- package/dist/cjs/command/api/dataset/file/index.d.ts +7 -0
- package/dist/cjs/command/api/dataset/index.cjs +7 -2
- package/dist/cjs/command/api/dataset/record/index.cjs +83 -0
- package/dist/cjs/command/api/dataset/record/index.d.ts +7 -0
- package/dist/cjs/command/api/file/index.cjs +71 -0
- package/dist/cjs/command/api/file/index.d.ts +7 -0
- package/dist/cjs/command/api/index.cjs +24 -8
- package/dist/cjs/command/api/integration/discord/index.cjs +71 -0
- package/dist/cjs/command/api/integration/discord/index.d.ts +7 -0
- package/dist/cjs/command/api/integration/email/index.cjs +71 -0
- package/dist/cjs/command/api/integration/email/index.d.ts +7 -0
- package/dist/cjs/command/api/integration/extract/index.cjs +61 -0
- package/dist/cjs/command/api/integration/extract/index.d.ts +6 -0
- package/dist/cjs/command/api/integration/index.cjs +44 -0
- package/dist/cjs/command/api/integration/index.d.ts +3 -0
- package/dist/cjs/command/api/integration/instagram/index.cjs +71 -0
- package/dist/cjs/command/api/integration/instagram/index.d.ts +7 -0
- package/dist/cjs/command/api/integration/mcpserver/index.cjs +61 -0
- package/dist/cjs/command/api/integration/mcpserver/index.d.ts +6 -0
- package/dist/cjs/command/api/integration/messenger/index.cjs +71 -0
- package/dist/cjs/command/api/integration/messenger/index.d.ts +7 -0
- package/dist/cjs/command/api/integration/notion/index.cjs +71 -0
- package/dist/cjs/command/api/integration/notion/index.d.ts +7 -0
- package/dist/cjs/command/api/integration/sitemap/index.cjs +71 -0
- package/dist/cjs/command/api/integration/sitemap/index.d.ts +7 -0
- package/dist/cjs/command/api/integration/slack/index.cjs +71 -0
- package/dist/cjs/command/api/integration/slack/index.d.ts +7 -0
- package/dist/cjs/command/api/integration/support/index.cjs +61 -0
- package/dist/cjs/command/api/integration/support/index.d.ts +6 -0
- package/dist/cjs/command/api/integration/telegram/index.cjs +71 -0
- package/dist/cjs/command/api/integration/telegram/index.d.ts +7 -0
- package/dist/cjs/command/api/integration/trigger/index.cjs +71 -0
- package/dist/cjs/command/api/integration/trigger/index.d.ts +7 -0
- package/dist/cjs/command/api/integration/twilio/index.cjs +71 -0
- package/dist/cjs/command/api/integration/twilio/index.d.ts +7 -0
- package/dist/cjs/command/api/integration/whatsapp/index.cjs +71 -0
- package/dist/cjs/command/api/integration/whatsapp/index.d.ts +7 -0
- package/dist/cjs/command/api/integration/widget/index.cjs +71 -0
- package/dist/cjs/command/api/integration/widget/index.d.ts +7 -0
- package/dist/cjs/command/api/memory/index.cjs +79 -0
- package/dist/cjs/command/api/memory/index.d.ts +7 -0
- package/dist/cjs/command/api/secret/index.cjs +81 -0
- package/dist/cjs/command/api/secret/index.d.ts +8 -0
- package/dist/cjs/command/api/skillset/ability/index.cjs +83 -0
- package/dist/cjs/command/api/skillset/ability/index.d.ts +7 -0
- package/dist/cjs/command/api/skillset/index.cjs +5 -2
- package/dist/cjs/command/api/team/index.cjs +42 -0
- package/dist/cjs/command/api/team/index.d.ts +4 -0
- package/dist/cjs/input.cjs +28 -0
- package/dist/cjs/input.d.ts +5 -0
- package/dist/cjs/solution/index.cjs +1 -1
- package/dist/esm/command/api/blueprint/index.d.ts +8 -0
- package/dist/esm/command/api/blueprint/index.js +78 -0
- package/dist/esm/command/api/bot/index.d.ts +6 -0
- package/dist/esm/command/api/bot/index.js +58 -0
- package/dist/esm/command/api/contact/index.d.ts +6 -0
- package/dist/esm/command/api/contact/index.js +58 -0
- package/dist/esm/command/api/dataset/file/index.d.ts +7 -0
- package/dist/esm/command/api/dataset/file/index.js +73 -0
- package/dist/esm/command/api/dataset/index.js +4 -0
- package/dist/esm/command/api/dataset/record/index.d.ts +7 -0
- package/dist/esm/command/api/dataset/record/index.js +80 -0
- package/dist/esm/command/api/file/index.d.ts +7 -0
- package/dist/esm/command/api/file/index.js +68 -0
- package/dist/esm/command/api/index.js +17 -1
- package/dist/esm/command/api/integration/discord/index.d.ts +7 -0
- package/dist/esm/command/api/integration/discord/index.js +68 -0
- package/dist/esm/command/api/integration/email/index.d.ts +7 -0
- package/dist/esm/command/api/integration/email/index.js +68 -0
- package/dist/esm/command/api/integration/extract/index.d.ts +6 -0
- package/dist/esm/command/api/integration/extract/index.js +58 -0
- package/dist/esm/command/api/integration/index.d.ts +3 -0
- package/dist/esm/command/api/integration/index.js +40 -0
- package/dist/esm/command/api/integration/instagram/index.d.ts +7 -0
- package/dist/esm/command/api/integration/instagram/index.js +68 -0
- package/dist/esm/command/api/integration/mcpserver/index.d.ts +6 -0
- package/dist/esm/command/api/integration/mcpserver/index.js +58 -0
- package/dist/esm/command/api/integration/messenger/index.d.ts +7 -0
- package/dist/esm/command/api/integration/messenger/index.js +68 -0
- package/dist/esm/command/api/integration/notion/index.d.ts +7 -0
- package/dist/esm/command/api/integration/notion/index.js +68 -0
- package/dist/esm/command/api/integration/sitemap/index.d.ts +7 -0
- package/dist/esm/command/api/integration/sitemap/index.js +68 -0
- package/dist/esm/command/api/integration/slack/index.d.ts +7 -0
- package/dist/esm/command/api/integration/slack/index.js +68 -0
- package/dist/esm/command/api/integration/support/index.d.ts +6 -0
- package/dist/esm/command/api/integration/support/index.js +58 -0
- package/dist/esm/command/api/integration/telegram/index.d.ts +7 -0
- package/dist/esm/command/api/integration/telegram/index.js +68 -0
- package/dist/esm/command/api/integration/trigger/index.d.ts +7 -0
- package/dist/esm/command/api/integration/trigger/index.js +68 -0
- package/dist/esm/command/api/integration/twilio/index.d.ts +7 -0
- package/dist/esm/command/api/integration/twilio/index.js +68 -0
- package/dist/esm/command/api/integration/whatsapp/index.d.ts +7 -0
- package/dist/esm/command/api/integration/whatsapp/index.js +68 -0
- package/dist/esm/command/api/integration/widget/index.d.ts +7 -0
- package/dist/esm/command/api/integration/widget/index.js +68 -0
- package/dist/esm/command/api/memory/index.d.ts +7 -0
- package/dist/esm/command/api/memory/index.js +76 -0
- package/dist/esm/command/api/secret/index.d.ts +8 -0
- package/dist/esm/command/api/secret/index.js +78 -0
- package/dist/esm/command/api/skillset/ability/index.d.ts +7 -0
- package/dist/esm/command/api/skillset/ability/index.js +80 -0
- package/dist/esm/command/api/skillset/index.js +2 -0
- package/dist/esm/command/api/team/index.d.ts +4 -0
- package/dist/esm/command/api/team/index.js +39 -0
- package/dist/esm/input.d.ts +5 -0
- package/dist/esm/input.js +27 -0
- package/dist/esm/solution/index.d.ts +74 -68
- package/dist/esm/solution/index.js +1 -1
- package/package.json +804 -26
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.command = exports.supportDelete = exports.supportFetch = exports.supportList = void 0;
|
|
4
|
+
const env_js_1 = require("../../../../env.cjs");
|
|
5
|
+
const output_js_1 = require("../../../../output.cjs");
|
|
6
|
+
const index_js_1 = require("@chatbotkit/sdk/integration/support/index.js");
|
|
7
|
+
const commander_1 = require("commander");
|
|
8
|
+
function getClient() {
|
|
9
|
+
return new index_js_1.SupportIntegrationClient({
|
|
10
|
+
secret: (0, env_js_1.getSECRET)(),
|
|
11
|
+
runAsUserId: (0, env_js_1.getRUNAS_USERID)(),
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
exports.supportList = new commander_1.Command()
|
|
15
|
+
.name('list')
|
|
16
|
+
.description('List support integrations')
|
|
17
|
+
.option('-s, --stream', 'Stream support integrations')
|
|
18
|
+
.action(async (str, options) => {
|
|
19
|
+
const { stream } = options;
|
|
20
|
+
const client = getClient();
|
|
21
|
+
if (stream) {
|
|
22
|
+
for await (const support of client.list().stream()) {
|
|
23
|
+
(0, output_js_1.print)(support);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
else {
|
|
27
|
+
const { items } = await client.list();
|
|
28
|
+
for (const support of items) {
|
|
29
|
+
(0, output_js_1.print)(support);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
exports.supportFetch = new commander_1.Command()
|
|
34
|
+
.name('fetch')
|
|
35
|
+
.description('Fetch support integration')
|
|
36
|
+
.argument('<supportId>', 'Support ID')
|
|
37
|
+
.action(async (supportId) => {
|
|
38
|
+
const client = getClient();
|
|
39
|
+
const support = await client.fetch(supportId);
|
|
40
|
+
(0, output_js_1.print)(support);
|
|
41
|
+
});
|
|
42
|
+
exports.supportDelete = new commander_1.Command()
|
|
43
|
+
.name('delete')
|
|
44
|
+
.description('Delete support integration')
|
|
45
|
+
.argument('<supportId>', 'Support ID')
|
|
46
|
+
.action(async (supportId) => {
|
|
47
|
+
const client = getClient();
|
|
48
|
+
await client.delete(supportId);
|
|
49
|
+
});
|
|
50
|
+
const commands = {
|
|
51
|
+
list: exports.supportList,
|
|
52
|
+
fetch: exports.supportFetch,
|
|
53
|
+
delete: exports.supportDelete,
|
|
54
|
+
};
|
|
55
|
+
exports.command = new commander_1.Command()
|
|
56
|
+
.name('support')
|
|
57
|
+
.description('Support integration tools for ChatBotKit');
|
|
58
|
+
for (const cmd of Object.values(commands)) {
|
|
59
|
+
exports.command.addCommand(cmd);
|
|
60
|
+
}
|
|
61
|
+
exports.default = exports.command;
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.command = exports.telegramSetup = exports.telegramDelete = exports.telegramFetch = exports.telegramList = void 0;
|
|
4
|
+
const env_js_1 = require("../../../../env.cjs");
|
|
5
|
+
const output_js_1 = require("../../../../output.cjs");
|
|
6
|
+
const index_js_1 = require("@chatbotkit/sdk/integration/telegram/index.js");
|
|
7
|
+
const commander_1 = require("commander");
|
|
8
|
+
function getClient() {
|
|
9
|
+
return new index_js_1.TelegramIntegrationClient({
|
|
10
|
+
secret: (0, env_js_1.getSECRET)(),
|
|
11
|
+
runAsUserId: (0, env_js_1.getRUNAS_USERID)(),
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
exports.telegramList = new commander_1.Command()
|
|
15
|
+
.name('list')
|
|
16
|
+
.description('List telegram integrations')
|
|
17
|
+
.option('-s, --stream', 'Stream telegram integrations')
|
|
18
|
+
.action(async (str, options) => {
|
|
19
|
+
const { stream } = options;
|
|
20
|
+
const client = getClient();
|
|
21
|
+
if (stream) {
|
|
22
|
+
for await (const telegram of client.list().stream()) {
|
|
23
|
+
(0, output_js_1.print)(telegram);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
else {
|
|
27
|
+
const { items } = await client.list();
|
|
28
|
+
for (const telegram of items) {
|
|
29
|
+
(0, output_js_1.print)(telegram);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
exports.telegramFetch = new commander_1.Command()
|
|
34
|
+
.name('fetch')
|
|
35
|
+
.description('Fetch telegram integration')
|
|
36
|
+
.argument('<telegramId>', 'Telegram ID')
|
|
37
|
+
.action(async (telegramId) => {
|
|
38
|
+
const client = getClient();
|
|
39
|
+
const telegram = await client.fetch(telegramId);
|
|
40
|
+
(0, output_js_1.print)(telegram);
|
|
41
|
+
});
|
|
42
|
+
exports.telegramDelete = new commander_1.Command()
|
|
43
|
+
.name('delete')
|
|
44
|
+
.description('Delete telegram integration')
|
|
45
|
+
.argument('<telegramId>', 'Telegram ID')
|
|
46
|
+
.action(async (telegramId) => {
|
|
47
|
+
const client = getClient();
|
|
48
|
+
await client.delete(telegramId);
|
|
49
|
+
});
|
|
50
|
+
exports.telegramSetup = new commander_1.Command()
|
|
51
|
+
.name('setup')
|
|
52
|
+
.description('Setup telegram integration')
|
|
53
|
+
.argument('<telegramId>', 'Telegram ID')
|
|
54
|
+
.action(async (telegramId) => {
|
|
55
|
+
const client = getClient();
|
|
56
|
+
const result = await client.setup(telegramId);
|
|
57
|
+
(0, output_js_1.print)(result);
|
|
58
|
+
});
|
|
59
|
+
const commands = {
|
|
60
|
+
list: exports.telegramList,
|
|
61
|
+
fetch: exports.telegramFetch,
|
|
62
|
+
delete: exports.telegramDelete,
|
|
63
|
+
setup: exports.telegramSetup,
|
|
64
|
+
};
|
|
65
|
+
exports.command = new commander_1.Command()
|
|
66
|
+
.name('telegram')
|
|
67
|
+
.description('Telegram integration tools for ChatBotKit');
|
|
68
|
+
for (const cmd of Object.values(commands)) {
|
|
69
|
+
exports.command.addCommand(cmd);
|
|
70
|
+
}
|
|
71
|
+
exports.default = exports.command;
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.command = exports.triggerInvoke = exports.triggerDelete = exports.triggerFetch = exports.triggerList = void 0;
|
|
4
|
+
const env_js_1 = require("../../../../env.cjs");
|
|
5
|
+
const output_js_1 = require("../../../../output.cjs");
|
|
6
|
+
const index_js_1 = require("@chatbotkit/sdk/integration/trigger/index.js");
|
|
7
|
+
const commander_1 = require("commander");
|
|
8
|
+
function getClient() {
|
|
9
|
+
return new index_js_1.TriggerIntegrationClient({
|
|
10
|
+
secret: (0, env_js_1.getSECRET)(),
|
|
11
|
+
runAsUserId: (0, env_js_1.getRUNAS_USERID)(),
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
exports.triggerList = new commander_1.Command()
|
|
15
|
+
.name('list')
|
|
16
|
+
.description('List trigger integrations')
|
|
17
|
+
.option('-s, --stream', 'Stream trigger integrations')
|
|
18
|
+
.action(async (str, options) => {
|
|
19
|
+
const { stream } = options;
|
|
20
|
+
const client = getClient();
|
|
21
|
+
if (stream) {
|
|
22
|
+
for await (const trigger of client.list().stream()) {
|
|
23
|
+
(0, output_js_1.print)(trigger);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
else {
|
|
27
|
+
const { items } = await client.list();
|
|
28
|
+
for (const trigger of items) {
|
|
29
|
+
(0, output_js_1.print)(trigger);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
exports.triggerFetch = new commander_1.Command()
|
|
34
|
+
.name('fetch')
|
|
35
|
+
.description('Fetch trigger integration')
|
|
36
|
+
.argument('<triggerId>', 'Trigger ID')
|
|
37
|
+
.action(async (triggerId) => {
|
|
38
|
+
const client = getClient();
|
|
39
|
+
const trigger = await client.fetch(triggerId);
|
|
40
|
+
(0, output_js_1.print)(trigger);
|
|
41
|
+
});
|
|
42
|
+
exports.triggerDelete = new commander_1.Command()
|
|
43
|
+
.name('delete')
|
|
44
|
+
.description('Delete trigger integration')
|
|
45
|
+
.argument('<triggerId>', 'Trigger ID')
|
|
46
|
+
.action(async (triggerId) => {
|
|
47
|
+
const client = getClient();
|
|
48
|
+
await client.delete(triggerId);
|
|
49
|
+
});
|
|
50
|
+
exports.triggerInvoke = new commander_1.Command()
|
|
51
|
+
.name('invoke')
|
|
52
|
+
.description('Invoke trigger integration')
|
|
53
|
+
.argument('<triggerId>', 'Trigger ID')
|
|
54
|
+
.action(async (triggerId) => {
|
|
55
|
+
const client = getClient();
|
|
56
|
+
const result = await client.invoke(triggerId, {});
|
|
57
|
+
(0, output_js_1.print)(result);
|
|
58
|
+
});
|
|
59
|
+
const commands = {
|
|
60
|
+
list: exports.triggerList,
|
|
61
|
+
fetch: exports.triggerFetch,
|
|
62
|
+
delete: exports.triggerDelete,
|
|
63
|
+
invoke: exports.triggerInvoke,
|
|
64
|
+
};
|
|
65
|
+
exports.command = new commander_1.Command()
|
|
66
|
+
.name('trigger')
|
|
67
|
+
.description('Trigger integration tools for ChatBotKit');
|
|
68
|
+
for (const cmd of Object.values(commands)) {
|
|
69
|
+
exports.command.addCommand(cmd);
|
|
70
|
+
}
|
|
71
|
+
exports.default = exports.command;
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.command = exports.twilioSetup = exports.twilioDelete = exports.twilioFetch = exports.twilioList = void 0;
|
|
4
|
+
const env_js_1 = require("../../../../env.cjs");
|
|
5
|
+
const output_js_1 = require("../../../../output.cjs");
|
|
6
|
+
const index_js_1 = require("@chatbotkit/sdk/integration/twilio/index.js");
|
|
7
|
+
const commander_1 = require("commander");
|
|
8
|
+
function getClient() {
|
|
9
|
+
return new index_js_1.TwilioIntegrationClient({
|
|
10
|
+
secret: (0, env_js_1.getSECRET)(),
|
|
11
|
+
runAsUserId: (0, env_js_1.getRUNAS_USERID)(),
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
exports.twilioList = new commander_1.Command()
|
|
15
|
+
.name('list')
|
|
16
|
+
.description('List twilio integrations')
|
|
17
|
+
.option('-s, --stream', 'Stream twilio integrations')
|
|
18
|
+
.action(async (str, options) => {
|
|
19
|
+
const { stream } = options;
|
|
20
|
+
const client = getClient();
|
|
21
|
+
if (stream) {
|
|
22
|
+
for await (const twilio of client.list().stream()) {
|
|
23
|
+
(0, output_js_1.print)(twilio);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
else {
|
|
27
|
+
const { items } = await client.list();
|
|
28
|
+
for (const twilio of items) {
|
|
29
|
+
(0, output_js_1.print)(twilio);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
exports.twilioFetch = new commander_1.Command()
|
|
34
|
+
.name('fetch')
|
|
35
|
+
.description('Fetch twilio integration')
|
|
36
|
+
.argument('<twilioId>', 'Twilio ID')
|
|
37
|
+
.action(async (twilioId) => {
|
|
38
|
+
const client = getClient();
|
|
39
|
+
const twilio = await client.fetch(twilioId);
|
|
40
|
+
(0, output_js_1.print)(twilio);
|
|
41
|
+
});
|
|
42
|
+
exports.twilioDelete = new commander_1.Command()
|
|
43
|
+
.name('delete')
|
|
44
|
+
.description('Delete twilio integration')
|
|
45
|
+
.argument('<twilioId>', 'Twilio ID')
|
|
46
|
+
.action(async (twilioId) => {
|
|
47
|
+
const client = getClient();
|
|
48
|
+
await client.delete(twilioId);
|
|
49
|
+
});
|
|
50
|
+
exports.twilioSetup = new commander_1.Command()
|
|
51
|
+
.name('setup')
|
|
52
|
+
.description('Setup twilio integration')
|
|
53
|
+
.argument('<twilioId>', 'Twilio ID')
|
|
54
|
+
.action(async (twilioId) => {
|
|
55
|
+
const client = getClient();
|
|
56
|
+
const result = await client.setup(twilioId);
|
|
57
|
+
(0, output_js_1.print)(result);
|
|
58
|
+
});
|
|
59
|
+
const commands = {
|
|
60
|
+
list: exports.twilioList,
|
|
61
|
+
fetch: exports.twilioFetch,
|
|
62
|
+
delete: exports.twilioDelete,
|
|
63
|
+
setup: exports.twilioSetup,
|
|
64
|
+
};
|
|
65
|
+
exports.command = new commander_1.Command()
|
|
66
|
+
.name('twilio')
|
|
67
|
+
.description('Twilio integration tools for ChatBotKit');
|
|
68
|
+
for (const cmd of Object.values(commands)) {
|
|
69
|
+
exports.command.addCommand(cmd);
|
|
70
|
+
}
|
|
71
|
+
exports.default = exports.command;
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.command = exports.whatsappSetup = exports.whatsappDelete = exports.whatsappFetch = exports.whatsappList = void 0;
|
|
4
|
+
const env_js_1 = require("../../../../env.cjs");
|
|
5
|
+
const output_js_1 = require("../../../../output.cjs");
|
|
6
|
+
const index_js_1 = require("@chatbotkit/sdk/integration/whatsapp/index.js");
|
|
7
|
+
const commander_1 = require("commander");
|
|
8
|
+
function getClient() {
|
|
9
|
+
return new index_js_1.WhatsAppIntegrationClient({
|
|
10
|
+
secret: (0, env_js_1.getSECRET)(),
|
|
11
|
+
runAsUserId: (0, env_js_1.getRUNAS_USERID)(),
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
exports.whatsappList = new commander_1.Command()
|
|
15
|
+
.name('list')
|
|
16
|
+
.description('List whatsapp integrations')
|
|
17
|
+
.option('-s, --stream', 'Stream whatsapp integrations')
|
|
18
|
+
.action(async (str, options) => {
|
|
19
|
+
const { stream } = options;
|
|
20
|
+
const client = getClient();
|
|
21
|
+
if (stream) {
|
|
22
|
+
for await (const whatsapp of client.list().stream()) {
|
|
23
|
+
(0, output_js_1.print)(whatsapp);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
else {
|
|
27
|
+
const { items } = await client.list();
|
|
28
|
+
for (const whatsapp of items) {
|
|
29
|
+
(0, output_js_1.print)(whatsapp);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
exports.whatsappFetch = new commander_1.Command()
|
|
34
|
+
.name('fetch')
|
|
35
|
+
.description('Fetch whatsapp integration')
|
|
36
|
+
.argument('<whatsappId>', 'WhatsApp ID')
|
|
37
|
+
.action(async (whatsappId) => {
|
|
38
|
+
const client = getClient();
|
|
39
|
+
const whatsapp = await client.fetch(whatsappId);
|
|
40
|
+
(0, output_js_1.print)(whatsapp);
|
|
41
|
+
});
|
|
42
|
+
exports.whatsappDelete = new commander_1.Command()
|
|
43
|
+
.name('delete')
|
|
44
|
+
.description('Delete whatsapp integration')
|
|
45
|
+
.argument('<whatsappId>', 'WhatsApp ID')
|
|
46
|
+
.action(async (whatsappId) => {
|
|
47
|
+
const client = getClient();
|
|
48
|
+
await client.delete(whatsappId);
|
|
49
|
+
});
|
|
50
|
+
exports.whatsappSetup = new commander_1.Command()
|
|
51
|
+
.name('setup')
|
|
52
|
+
.description('Setup whatsapp integration')
|
|
53
|
+
.argument('<whatsappId>', 'WhatsApp ID')
|
|
54
|
+
.action(async (whatsappId) => {
|
|
55
|
+
const client = getClient();
|
|
56
|
+
const result = await client.setup(whatsappId);
|
|
57
|
+
(0, output_js_1.print)(result);
|
|
58
|
+
});
|
|
59
|
+
const commands = {
|
|
60
|
+
list: exports.whatsappList,
|
|
61
|
+
fetch: exports.whatsappFetch,
|
|
62
|
+
delete: exports.whatsappDelete,
|
|
63
|
+
setup: exports.whatsappSetup,
|
|
64
|
+
};
|
|
65
|
+
exports.command = new commander_1.Command()
|
|
66
|
+
.name('whatsapp')
|
|
67
|
+
.description('WhatsApp integration tools for ChatBotKit');
|
|
68
|
+
for (const cmd of Object.values(commands)) {
|
|
69
|
+
exports.command.addCommand(cmd);
|
|
70
|
+
}
|
|
71
|
+
exports.default = exports.command;
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.command = exports.widgetSetup = exports.widgetDelete = exports.widgetFetch = exports.widgetList = void 0;
|
|
4
|
+
const env_js_1 = require("../../../../env.cjs");
|
|
5
|
+
const output_js_1 = require("../../../../output.cjs");
|
|
6
|
+
const index_js_1 = require("@chatbotkit/sdk/integration/widget/index.js");
|
|
7
|
+
const commander_1 = require("commander");
|
|
8
|
+
function getClient() {
|
|
9
|
+
return new index_js_1.WidgetIntegrationClient({
|
|
10
|
+
secret: (0, env_js_1.getSECRET)(),
|
|
11
|
+
runAsUserId: (0, env_js_1.getRUNAS_USERID)(),
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
exports.widgetList = new commander_1.Command()
|
|
15
|
+
.name('list')
|
|
16
|
+
.description('List widget integrations')
|
|
17
|
+
.option('-s, --stream', 'Stream widget integrations')
|
|
18
|
+
.action(async (str, options) => {
|
|
19
|
+
const { stream } = options;
|
|
20
|
+
const client = getClient();
|
|
21
|
+
if (stream) {
|
|
22
|
+
for await (const widget of client.list().stream()) {
|
|
23
|
+
(0, output_js_1.print)(widget);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
else {
|
|
27
|
+
const { items } = await client.list();
|
|
28
|
+
for (const widget of items) {
|
|
29
|
+
(0, output_js_1.print)(widget);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
exports.widgetFetch = new commander_1.Command()
|
|
34
|
+
.name('fetch')
|
|
35
|
+
.description('Fetch widget integration')
|
|
36
|
+
.argument('<widgetId>', 'Widget ID')
|
|
37
|
+
.action(async (widgetId) => {
|
|
38
|
+
const client = getClient();
|
|
39
|
+
const widget = await client.fetch(widgetId);
|
|
40
|
+
(0, output_js_1.print)(widget);
|
|
41
|
+
});
|
|
42
|
+
exports.widgetDelete = new commander_1.Command()
|
|
43
|
+
.name('delete')
|
|
44
|
+
.description('Delete widget integration')
|
|
45
|
+
.argument('<widgetId>', 'Widget ID')
|
|
46
|
+
.action(async (widgetId) => {
|
|
47
|
+
const client = getClient();
|
|
48
|
+
await client.delete(widgetId);
|
|
49
|
+
});
|
|
50
|
+
exports.widgetSetup = new commander_1.Command()
|
|
51
|
+
.name('setup')
|
|
52
|
+
.description('Setup widget integration')
|
|
53
|
+
.argument('<widgetId>', 'Widget ID')
|
|
54
|
+
.action(async (widgetId) => {
|
|
55
|
+
const client = getClient();
|
|
56
|
+
const result = await client.setup(widgetId);
|
|
57
|
+
(0, output_js_1.print)(result);
|
|
58
|
+
});
|
|
59
|
+
const commands = {
|
|
60
|
+
list: exports.widgetList,
|
|
61
|
+
fetch: exports.widgetFetch,
|
|
62
|
+
delete: exports.widgetDelete,
|
|
63
|
+
setup: exports.widgetSetup,
|
|
64
|
+
};
|
|
65
|
+
exports.command = new commander_1.Command()
|
|
66
|
+
.name('widget')
|
|
67
|
+
.description('Widget integration tools for ChatBotKit');
|
|
68
|
+
for (const cmd of Object.values(commands)) {
|
|
69
|
+
exports.command.addCommand(cmd);
|
|
70
|
+
}
|
|
71
|
+
exports.default = exports.command;
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.command = exports.memoryExport = exports.memoryDelete = exports.memoryFetch = exports.memoryList = void 0;
|
|
4
|
+
const env_js_1 = require("../../../env.cjs");
|
|
5
|
+
const output_js_1 = require("../../../output.cjs");
|
|
6
|
+
const index_js_1 = require("@chatbotkit/sdk/memory/index.js");
|
|
7
|
+
const commander_1 = require("commander");
|
|
8
|
+
function getClient() {
|
|
9
|
+
return new index_js_1.MemoryClient({
|
|
10
|
+
secret: (0, env_js_1.getSECRET)(),
|
|
11
|
+
runAsUserId: (0, env_js_1.getRUNAS_USERID)(),
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
exports.memoryList = new commander_1.Command()
|
|
15
|
+
.name('list')
|
|
16
|
+
.description('List memories')
|
|
17
|
+
.option('-s, --stream', 'Stream memories')
|
|
18
|
+
.action(async (str, options) => {
|
|
19
|
+
const { stream } = options;
|
|
20
|
+
const client = getClient();
|
|
21
|
+
if (stream) {
|
|
22
|
+
for await (const memory of client.list().stream()) {
|
|
23
|
+
(0, output_js_1.print)(memory);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
else {
|
|
27
|
+
const { items } = await client.list();
|
|
28
|
+
for (const memory of items) {
|
|
29
|
+
(0, output_js_1.print)(memory);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
exports.memoryFetch = new commander_1.Command()
|
|
34
|
+
.name('fetch')
|
|
35
|
+
.description('Fetch memory')
|
|
36
|
+
.argument('<memoryId>', 'Memory ID')
|
|
37
|
+
.action(async (memoryId) => {
|
|
38
|
+
const client = getClient();
|
|
39
|
+
const memory = await client.fetch(memoryId);
|
|
40
|
+
(0, output_js_1.print)(memory);
|
|
41
|
+
});
|
|
42
|
+
exports.memoryDelete = new commander_1.Command()
|
|
43
|
+
.name('delete')
|
|
44
|
+
.description('Delete memory')
|
|
45
|
+
.argument('<memoryId>', 'Memory ID')
|
|
46
|
+
.action(async (memoryId) => {
|
|
47
|
+
const client = getClient();
|
|
48
|
+
await client.delete(memoryId);
|
|
49
|
+
});
|
|
50
|
+
exports.memoryExport = new commander_1.Command()
|
|
51
|
+
.name('export')
|
|
52
|
+
.description('Export memories')
|
|
53
|
+
.option('-s, --stream', 'Stream exports')
|
|
54
|
+
.action(async (str, options) => {
|
|
55
|
+
const { stream } = options;
|
|
56
|
+
const client = getClient();
|
|
57
|
+
if (stream) {
|
|
58
|
+
for await (const memory of client.export().stream()) {
|
|
59
|
+
(0, output_js_1.print)(memory);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
else {
|
|
63
|
+
const result = await client.export();
|
|
64
|
+
(0, output_js_1.print)(result);
|
|
65
|
+
}
|
|
66
|
+
});
|
|
67
|
+
const commands = {
|
|
68
|
+
list: exports.memoryList,
|
|
69
|
+
fetch: exports.memoryFetch,
|
|
70
|
+
delete: exports.memoryDelete,
|
|
71
|
+
export: exports.memoryExport,
|
|
72
|
+
};
|
|
73
|
+
exports.command = new commander_1.Command()
|
|
74
|
+
.name('memory')
|
|
75
|
+
.description('Memory tools for ChatBotKit');
|
|
76
|
+
for (const cmd of Object.values(commands)) {
|
|
77
|
+
exports.command.addCommand(cmd);
|
|
78
|
+
}
|
|
79
|
+
exports.default = exports.command;
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.command = exports.secretVerify = exports.secretRevoke = exports.secretDelete = exports.secretFetch = exports.secretList = void 0;
|
|
4
|
+
const env_js_1 = require("../../../env.cjs");
|
|
5
|
+
const output_js_1 = require("../../../output.cjs");
|
|
6
|
+
const index_js_1 = require("@chatbotkit/sdk/secret/index.js");
|
|
7
|
+
const commander_1 = require("commander");
|
|
8
|
+
function getClient() {
|
|
9
|
+
return new index_js_1.SecretClient({
|
|
10
|
+
secret: (0, env_js_1.getSECRET)(),
|
|
11
|
+
runAsUserId: (0, env_js_1.getRUNAS_USERID)(),
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
exports.secretList = new commander_1.Command()
|
|
15
|
+
.name('list')
|
|
16
|
+
.description('List secrets')
|
|
17
|
+
.option('-s, --stream', 'Stream secrets')
|
|
18
|
+
.action(async (str, options) => {
|
|
19
|
+
const { stream } = options;
|
|
20
|
+
const client = getClient();
|
|
21
|
+
if (stream) {
|
|
22
|
+
for await (const secret of client.list().stream()) {
|
|
23
|
+
(0, output_js_1.print)(secret);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
else {
|
|
27
|
+
const { items } = await client.list();
|
|
28
|
+
for (const secret of items) {
|
|
29
|
+
(0, output_js_1.print)(secret);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
exports.secretFetch = new commander_1.Command()
|
|
34
|
+
.name('fetch')
|
|
35
|
+
.description('Fetch secret')
|
|
36
|
+
.argument('<secretId>', 'Secret ID')
|
|
37
|
+
.action(async (secretId) => {
|
|
38
|
+
const client = getClient();
|
|
39
|
+
const secret = await client.fetch(secretId);
|
|
40
|
+
(0, output_js_1.print)(secret);
|
|
41
|
+
});
|
|
42
|
+
exports.secretDelete = new commander_1.Command()
|
|
43
|
+
.name('delete')
|
|
44
|
+
.description('Delete secret')
|
|
45
|
+
.argument('<secretId>', 'Secret ID')
|
|
46
|
+
.action(async (secretId) => {
|
|
47
|
+
const client = getClient();
|
|
48
|
+
await client.delete(secretId);
|
|
49
|
+
});
|
|
50
|
+
exports.secretRevoke = new commander_1.Command()
|
|
51
|
+
.name('revoke')
|
|
52
|
+
.description('Revoke secret')
|
|
53
|
+
.argument('<secretId>', 'Secret ID')
|
|
54
|
+
.action(async (secretId) => {
|
|
55
|
+
const client = getClient();
|
|
56
|
+
const result = await client.revoke(secretId);
|
|
57
|
+
(0, output_js_1.print)(result);
|
|
58
|
+
});
|
|
59
|
+
exports.secretVerify = new commander_1.Command()
|
|
60
|
+
.name('verify')
|
|
61
|
+
.description('Verify secret')
|
|
62
|
+
.argument('<secretId>', 'Secret ID')
|
|
63
|
+
.action(async (secretId) => {
|
|
64
|
+
const client = getClient();
|
|
65
|
+
const result = await client.verify(secretId);
|
|
66
|
+
(0, output_js_1.print)(result);
|
|
67
|
+
});
|
|
68
|
+
const commands = {
|
|
69
|
+
list: exports.secretList,
|
|
70
|
+
fetch: exports.secretFetch,
|
|
71
|
+
delete: exports.secretDelete,
|
|
72
|
+
revoke: exports.secretRevoke,
|
|
73
|
+
verify: exports.secretVerify,
|
|
74
|
+
};
|
|
75
|
+
exports.command = new commander_1.Command()
|
|
76
|
+
.name('secret')
|
|
77
|
+
.description('Secret tools for ChatBotKit');
|
|
78
|
+
for (const cmd of Object.values(commands)) {
|
|
79
|
+
exports.command.addCommand(cmd);
|
|
80
|
+
}
|
|
81
|
+
exports.default = exports.command;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export const secretList: Command;
|
|
2
|
+
export const secretFetch: Command;
|
|
3
|
+
export const secretDelete: Command;
|
|
4
|
+
export const secretRevoke: Command;
|
|
5
|
+
export const secretVerify: Command;
|
|
6
|
+
export const command: Command;
|
|
7
|
+
export default command;
|
|
8
|
+
import { Command } from 'commander';
|