@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,68 @@
|
|
|
1
|
+
import { getRUNAS_USERID, getSECRET } from '../../../env.js';
|
|
2
|
+
import { print } from '../../../output.js';
|
|
3
|
+
import { FileClient } from '@chatbotkit/sdk/file/index.js';
|
|
4
|
+
import { Command } from 'commander';
|
|
5
|
+
function getClient() {
|
|
6
|
+
return new FileClient({
|
|
7
|
+
secret: getSECRET(),
|
|
8
|
+
runAsUserId: getRUNAS_USERID(),
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
export const fileList = new Command()
|
|
12
|
+
.name('list')
|
|
13
|
+
.description('List files')
|
|
14
|
+
.option('-s, --stream', 'Stream files')
|
|
15
|
+
.action(async (str, options) => {
|
|
16
|
+
const { stream } = options;
|
|
17
|
+
const client = getClient();
|
|
18
|
+
if (stream) {
|
|
19
|
+
for await (const file of client.list().stream()) {
|
|
20
|
+
print(file);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
else {
|
|
24
|
+
const { items } = await client.list();
|
|
25
|
+
for (const file of items) {
|
|
26
|
+
print(file);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
export const fileFetch = new Command()
|
|
31
|
+
.name('fetch')
|
|
32
|
+
.description('Fetch file')
|
|
33
|
+
.argument('<fileId>', 'File ID')
|
|
34
|
+
.action(async (fileId) => {
|
|
35
|
+
const client = getClient();
|
|
36
|
+
const file = await client.fetch(fileId);
|
|
37
|
+
print(file);
|
|
38
|
+
});
|
|
39
|
+
export const fileDelete = new Command()
|
|
40
|
+
.name('delete')
|
|
41
|
+
.description('Delete file')
|
|
42
|
+
.argument('<fileId>', 'File ID')
|
|
43
|
+
.action(async (fileId) => {
|
|
44
|
+
const client = getClient();
|
|
45
|
+
await client.delete(fileId);
|
|
46
|
+
});
|
|
47
|
+
export const fileSync = new Command()
|
|
48
|
+
.name('sync')
|
|
49
|
+
.description('Sync file')
|
|
50
|
+
.argument('<fileId>', 'File ID')
|
|
51
|
+
.action(async (fileId) => {
|
|
52
|
+
const client = getClient();
|
|
53
|
+
const result = await client.sync(fileId);
|
|
54
|
+
print(result);
|
|
55
|
+
});
|
|
56
|
+
const commands = {
|
|
57
|
+
list: fileList,
|
|
58
|
+
fetch: fileFetch,
|
|
59
|
+
delete: fileDelete,
|
|
60
|
+
sync: fileSync,
|
|
61
|
+
};
|
|
62
|
+
export const command = new Command()
|
|
63
|
+
.name('file')
|
|
64
|
+
.description('File tools for ChatBotKit');
|
|
65
|
+
for (const cmd of Object.values(commands)) {
|
|
66
|
+
command.addCommand(cmd);
|
|
67
|
+
}
|
|
68
|
+
export default command;
|
|
@@ -1,14 +1,30 @@
|
|
|
1
1
|
import { config as printConfig } from '../../output.js';
|
|
2
|
+
import blueprint from './blueprint/index.js';
|
|
3
|
+
import bot from './bot/index.js';
|
|
4
|
+
import contact from './contact/index.js';
|
|
2
5
|
import conversation from './conversation/index.js';
|
|
3
6
|
import dataset from './dataset/index.js';
|
|
7
|
+
import file from './file/index.js';
|
|
8
|
+
import integration from './integration/index.js';
|
|
9
|
+
import memory from './memory/index.js';
|
|
4
10
|
import partner from './partner/index.js';
|
|
11
|
+
import secret from './secret/index.js';
|
|
5
12
|
import skillset from './skillset/index.js';
|
|
13
|
+
import team from './team/index.js';
|
|
6
14
|
import { Command, Option } from 'commander';
|
|
7
15
|
const commands = {
|
|
16
|
+
blueprint,
|
|
17
|
+
bot,
|
|
18
|
+
contact,
|
|
8
19
|
conversation,
|
|
9
20
|
dataset,
|
|
10
|
-
|
|
21
|
+
file,
|
|
22
|
+
integration,
|
|
23
|
+
memory,
|
|
11
24
|
partner,
|
|
25
|
+
secret,
|
|
26
|
+
skillset,
|
|
27
|
+
team,
|
|
12
28
|
};
|
|
13
29
|
export const command = new Command()
|
|
14
30
|
.name('api')
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { getRUNAS_USERID, getSECRET } from '../../../../env.js';
|
|
2
|
+
import { print } from '../../../../output.js';
|
|
3
|
+
import { DiscordIntegrationClient } from '@chatbotkit/sdk/integration/discord/index.js';
|
|
4
|
+
import { Command } from 'commander';
|
|
5
|
+
function getClient() {
|
|
6
|
+
return new DiscordIntegrationClient({
|
|
7
|
+
secret: getSECRET(),
|
|
8
|
+
runAsUserId: getRUNAS_USERID(),
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
export const discordList = new Command()
|
|
12
|
+
.name('list')
|
|
13
|
+
.description('List discord integrations')
|
|
14
|
+
.option('-s, --stream', 'Stream discord integrations')
|
|
15
|
+
.action(async (str, options) => {
|
|
16
|
+
const { stream } = options;
|
|
17
|
+
const client = getClient();
|
|
18
|
+
if (stream) {
|
|
19
|
+
for await (const discord of client.list().stream()) {
|
|
20
|
+
print(discord);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
else {
|
|
24
|
+
const { items } = await client.list();
|
|
25
|
+
for (const discord of items) {
|
|
26
|
+
print(discord);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
export const discordFetch = new Command()
|
|
31
|
+
.name('fetch')
|
|
32
|
+
.description('Fetch discord integration')
|
|
33
|
+
.argument('<discordId>', 'Discord ID')
|
|
34
|
+
.action(async (discordId) => {
|
|
35
|
+
const client = getClient();
|
|
36
|
+
const discord = await client.fetch(discordId);
|
|
37
|
+
print(discord);
|
|
38
|
+
});
|
|
39
|
+
export const discordDelete = new Command()
|
|
40
|
+
.name('delete')
|
|
41
|
+
.description('Delete discord integration')
|
|
42
|
+
.argument('<discordId>', 'Discord ID')
|
|
43
|
+
.action(async (discordId) => {
|
|
44
|
+
const client = getClient();
|
|
45
|
+
await client.delete(discordId);
|
|
46
|
+
});
|
|
47
|
+
export const discordSetup = new Command()
|
|
48
|
+
.name('setup')
|
|
49
|
+
.description('Setup discord integration')
|
|
50
|
+
.argument('<discordId>', 'Discord ID')
|
|
51
|
+
.action(async (discordId) => {
|
|
52
|
+
const client = getClient();
|
|
53
|
+
const result = await client.setup(discordId);
|
|
54
|
+
print(result);
|
|
55
|
+
});
|
|
56
|
+
const commands = {
|
|
57
|
+
list: discordList,
|
|
58
|
+
fetch: discordFetch,
|
|
59
|
+
delete: discordDelete,
|
|
60
|
+
setup: discordSetup,
|
|
61
|
+
};
|
|
62
|
+
export const command = new Command()
|
|
63
|
+
.name('discord')
|
|
64
|
+
.description('Discord integration tools for ChatBotKit');
|
|
65
|
+
for (const cmd of Object.values(commands)) {
|
|
66
|
+
command.addCommand(cmd);
|
|
67
|
+
}
|
|
68
|
+
export default command;
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { getRUNAS_USERID, getSECRET } from '../../../../env.js';
|
|
2
|
+
import { print } from '../../../../output.js';
|
|
3
|
+
import { EmailIntegrationClient } from '@chatbotkit/sdk/integration/email/index.js';
|
|
4
|
+
import { Command } from 'commander';
|
|
5
|
+
function getClient() {
|
|
6
|
+
return new EmailIntegrationClient({
|
|
7
|
+
secret: getSECRET(),
|
|
8
|
+
runAsUserId: getRUNAS_USERID(),
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
export const emailList = new Command()
|
|
12
|
+
.name('list')
|
|
13
|
+
.description('List email integrations')
|
|
14
|
+
.option('-s, --stream', 'Stream email integrations')
|
|
15
|
+
.action(async (str, options) => {
|
|
16
|
+
const { stream } = options;
|
|
17
|
+
const client = getClient();
|
|
18
|
+
if (stream) {
|
|
19
|
+
for await (const email of client.list().stream()) {
|
|
20
|
+
print(email);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
else {
|
|
24
|
+
const { items } = await client.list();
|
|
25
|
+
for (const email of items) {
|
|
26
|
+
print(email);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
export const emailFetch = new Command()
|
|
31
|
+
.name('fetch')
|
|
32
|
+
.description('Fetch email integration')
|
|
33
|
+
.argument('<emailId>', 'Email ID')
|
|
34
|
+
.action(async (emailId) => {
|
|
35
|
+
const client = getClient();
|
|
36
|
+
const email = await client.fetch(emailId);
|
|
37
|
+
print(email);
|
|
38
|
+
});
|
|
39
|
+
export const emailDelete = new Command()
|
|
40
|
+
.name('delete')
|
|
41
|
+
.description('Delete email integration')
|
|
42
|
+
.argument('<emailId>', 'Email ID')
|
|
43
|
+
.action(async (emailId) => {
|
|
44
|
+
const client = getClient();
|
|
45
|
+
await client.delete(emailId);
|
|
46
|
+
});
|
|
47
|
+
export const emailSetup = new Command()
|
|
48
|
+
.name('setup')
|
|
49
|
+
.description('Setup email integration')
|
|
50
|
+
.argument('<emailId>', 'Email ID')
|
|
51
|
+
.action(async (emailId) => {
|
|
52
|
+
const client = getClient();
|
|
53
|
+
const result = await client.setup(emailId);
|
|
54
|
+
print(result);
|
|
55
|
+
});
|
|
56
|
+
const commands = {
|
|
57
|
+
list: emailList,
|
|
58
|
+
fetch: emailFetch,
|
|
59
|
+
delete: emailDelete,
|
|
60
|
+
setup: emailSetup,
|
|
61
|
+
};
|
|
62
|
+
export const command = new Command()
|
|
63
|
+
.name('email')
|
|
64
|
+
.description('Email integration tools for ChatBotKit');
|
|
65
|
+
for (const cmd of Object.values(commands)) {
|
|
66
|
+
command.addCommand(cmd);
|
|
67
|
+
}
|
|
68
|
+
export default command;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { getRUNAS_USERID, getSECRET } from '../../../../env.js';
|
|
2
|
+
import { print } from '../../../../output.js';
|
|
3
|
+
import { ExtractIntegrationClient } from '@chatbotkit/sdk/integration/extract/index.js';
|
|
4
|
+
import { Command } from 'commander';
|
|
5
|
+
function getClient() {
|
|
6
|
+
return new ExtractIntegrationClient({
|
|
7
|
+
secret: getSECRET(),
|
|
8
|
+
runAsUserId: getRUNAS_USERID(),
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
export const extractList = new Command()
|
|
12
|
+
.name('list')
|
|
13
|
+
.description('List extract integrations')
|
|
14
|
+
.option('-s, --stream', 'Stream extract integrations')
|
|
15
|
+
.action(async (str, options) => {
|
|
16
|
+
const { stream } = options;
|
|
17
|
+
const client = getClient();
|
|
18
|
+
if (stream) {
|
|
19
|
+
for await (const extract of client.list().stream()) {
|
|
20
|
+
print(extract);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
else {
|
|
24
|
+
const { items } = await client.list();
|
|
25
|
+
for (const extract of items) {
|
|
26
|
+
print(extract);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
export const extractFetch = new Command()
|
|
31
|
+
.name('fetch')
|
|
32
|
+
.description('Fetch extract integration')
|
|
33
|
+
.argument('<extractId>', 'Extract ID')
|
|
34
|
+
.action(async (extractId) => {
|
|
35
|
+
const client = getClient();
|
|
36
|
+
const extract = await client.fetch(extractId);
|
|
37
|
+
print(extract);
|
|
38
|
+
});
|
|
39
|
+
export const extractDelete = new Command()
|
|
40
|
+
.name('delete')
|
|
41
|
+
.description('Delete extract integration')
|
|
42
|
+
.argument('<extractId>', 'Extract ID')
|
|
43
|
+
.action(async (extractId) => {
|
|
44
|
+
const client = getClient();
|
|
45
|
+
await client.delete(extractId);
|
|
46
|
+
});
|
|
47
|
+
const commands = {
|
|
48
|
+
list: extractList,
|
|
49
|
+
fetch: extractFetch,
|
|
50
|
+
delete: extractDelete,
|
|
51
|
+
};
|
|
52
|
+
export const command = new Command()
|
|
53
|
+
.name('extract')
|
|
54
|
+
.description('Extract integration tools for ChatBotKit');
|
|
55
|
+
for (const cmd of Object.values(commands)) {
|
|
56
|
+
command.addCommand(cmd);
|
|
57
|
+
}
|
|
58
|
+
export default command;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import discord from './discord/index.js';
|
|
2
|
+
import email from './email/index.js';
|
|
3
|
+
import extract from './extract/index.js';
|
|
4
|
+
import instagram from './instagram/index.js';
|
|
5
|
+
import mcpserver from './mcpserver/index.js';
|
|
6
|
+
import messenger from './messenger/index.js';
|
|
7
|
+
import notion from './notion/index.js';
|
|
8
|
+
import sitemap from './sitemap/index.js';
|
|
9
|
+
import slack from './slack/index.js';
|
|
10
|
+
import support from './support/index.js';
|
|
11
|
+
import telegram from './telegram/index.js';
|
|
12
|
+
import trigger from './trigger/index.js';
|
|
13
|
+
import twilio from './twilio/index.js';
|
|
14
|
+
import whatsapp from './whatsapp/index.js';
|
|
15
|
+
import widget from './widget/index.js';
|
|
16
|
+
import { Command } from 'commander';
|
|
17
|
+
const commands = {
|
|
18
|
+
widget,
|
|
19
|
+
slack,
|
|
20
|
+
discord,
|
|
21
|
+
whatsapp,
|
|
22
|
+
messenger,
|
|
23
|
+
instagram,
|
|
24
|
+
telegram,
|
|
25
|
+
trigger,
|
|
26
|
+
email,
|
|
27
|
+
sitemap,
|
|
28
|
+
notion,
|
|
29
|
+
support,
|
|
30
|
+
extract,
|
|
31
|
+
mcpserver,
|
|
32
|
+
twilio,
|
|
33
|
+
};
|
|
34
|
+
export const command = new Command()
|
|
35
|
+
.name('integration')
|
|
36
|
+
.description('Integration tools for ChatBotKit');
|
|
37
|
+
for (const cmd of Object.values(commands)) {
|
|
38
|
+
command.addCommand(cmd);
|
|
39
|
+
}
|
|
40
|
+
export default command;
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { getRUNAS_USERID, getSECRET } from '../../../../env.js';
|
|
2
|
+
import { print } from '../../../../output.js';
|
|
3
|
+
import { InstagramIntegrationClient } from '@chatbotkit/sdk/integration/instagram/index.js';
|
|
4
|
+
import { Command } from 'commander';
|
|
5
|
+
function getClient() {
|
|
6
|
+
return new InstagramIntegrationClient({
|
|
7
|
+
secret: getSECRET(),
|
|
8
|
+
runAsUserId: getRUNAS_USERID(),
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
export const instagramList = new Command()
|
|
12
|
+
.name('list')
|
|
13
|
+
.description('List instagram integrations')
|
|
14
|
+
.option('-s, --stream', 'Stream instagram integrations')
|
|
15
|
+
.action(async (str, options) => {
|
|
16
|
+
const { stream } = options;
|
|
17
|
+
const client = getClient();
|
|
18
|
+
if (stream) {
|
|
19
|
+
for await (const instagram of client.list().stream()) {
|
|
20
|
+
print(instagram);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
else {
|
|
24
|
+
const { items } = await client.list();
|
|
25
|
+
for (const instagram of items) {
|
|
26
|
+
print(instagram);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
export const instagramFetch = new Command()
|
|
31
|
+
.name('fetch')
|
|
32
|
+
.description('Fetch instagram integration')
|
|
33
|
+
.argument('<instagramId>', 'Instagram ID')
|
|
34
|
+
.action(async (instagramId) => {
|
|
35
|
+
const client = getClient();
|
|
36
|
+
const instagram = await client.fetch(instagramId);
|
|
37
|
+
print(instagram);
|
|
38
|
+
});
|
|
39
|
+
export const instagramDelete = new Command()
|
|
40
|
+
.name('delete')
|
|
41
|
+
.description('Delete instagram integration')
|
|
42
|
+
.argument('<instagramId>', 'Instagram ID')
|
|
43
|
+
.action(async (instagramId) => {
|
|
44
|
+
const client = getClient();
|
|
45
|
+
await client.delete(instagramId);
|
|
46
|
+
});
|
|
47
|
+
export const instagramSetup = new Command()
|
|
48
|
+
.name('setup')
|
|
49
|
+
.description('Setup instagram integration')
|
|
50
|
+
.argument('<instagramId>', 'Instagram ID')
|
|
51
|
+
.action(async (instagramId) => {
|
|
52
|
+
const client = getClient();
|
|
53
|
+
const result = await client.setup(instagramId);
|
|
54
|
+
print(result);
|
|
55
|
+
});
|
|
56
|
+
const commands = {
|
|
57
|
+
list: instagramList,
|
|
58
|
+
fetch: instagramFetch,
|
|
59
|
+
delete: instagramDelete,
|
|
60
|
+
setup: instagramSetup,
|
|
61
|
+
};
|
|
62
|
+
export const command = new Command()
|
|
63
|
+
.name('instagram')
|
|
64
|
+
.description('Instagram integration tools for ChatBotKit');
|
|
65
|
+
for (const cmd of Object.values(commands)) {
|
|
66
|
+
command.addCommand(cmd);
|
|
67
|
+
}
|
|
68
|
+
export default command;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { getRUNAS_USERID, getSECRET } from '../../../../env.js';
|
|
2
|
+
import { print } from '../../../../output.js';
|
|
3
|
+
import { McpServerIntegrationClient } from '@chatbotkit/sdk/integration/mcpserver/index.js';
|
|
4
|
+
import { Command } from 'commander';
|
|
5
|
+
function getClient() {
|
|
6
|
+
return new McpServerIntegrationClient({
|
|
7
|
+
secret: getSECRET(),
|
|
8
|
+
runAsUserId: getRUNAS_USERID(),
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
export const mcpserverList = new Command()
|
|
12
|
+
.name('list')
|
|
13
|
+
.description('List MCP server integrations')
|
|
14
|
+
.option('-s, --stream', 'Stream MCP server integrations')
|
|
15
|
+
.action(async (str, options) => {
|
|
16
|
+
const { stream } = options;
|
|
17
|
+
const client = getClient();
|
|
18
|
+
if (stream) {
|
|
19
|
+
for await (const mcpserver of client.list().stream()) {
|
|
20
|
+
print(mcpserver);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
else {
|
|
24
|
+
const { items } = await client.list();
|
|
25
|
+
for (const mcpserver of items) {
|
|
26
|
+
print(mcpserver);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
export const mcpserverFetch = new Command()
|
|
31
|
+
.name('fetch')
|
|
32
|
+
.description('Fetch MCP server integration')
|
|
33
|
+
.argument('<mcpserverId>', 'MCP Server ID')
|
|
34
|
+
.action(async (mcpserverId) => {
|
|
35
|
+
const client = getClient();
|
|
36
|
+
const mcpserver = await client.fetch(mcpserverId);
|
|
37
|
+
print(mcpserver);
|
|
38
|
+
});
|
|
39
|
+
export const mcpserverDelete = new Command()
|
|
40
|
+
.name('delete')
|
|
41
|
+
.description('Delete MCP server integration')
|
|
42
|
+
.argument('<mcpserverId>', 'MCP Server ID')
|
|
43
|
+
.action(async (mcpserverId) => {
|
|
44
|
+
const client = getClient();
|
|
45
|
+
await client.delete(mcpserverId);
|
|
46
|
+
});
|
|
47
|
+
const commands = {
|
|
48
|
+
list: mcpserverList,
|
|
49
|
+
fetch: mcpserverFetch,
|
|
50
|
+
delete: mcpserverDelete,
|
|
51
|
+
};
|
|
52
|
+
export const command = new Command()
|
|
53
|
+
.name('mcpserver')
|
|
54
|
+
.description('MCP Server integration tools for ChatBotKit');
|
|
55
|
+
for (const cmd of Object.values(commands)) {
|
|
56
|
+
command.addCommand(cmd);
|
|
57
|
+
}
|
|
58
|
+
export default command;
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { getRUNAS_USERID, getSECRET } from '../../../../env.js';
|
|
2
|
+
import { print } from '../../../../output.js';
|
|
3
|
+
import { MessengerIntegrationClient } from '@chatbotkit/sdk/integration/messenger/index.js';
|
|
4
|
+
import { Command } from 'commander';
|
|
5
|
+
function getClient() {
|
|
6
|
+
return new MessengerIntegrationClient({
|
|
7
|
+
secret: getSECRET(),
|
|
8
|
+
runAsUserId: getRUNAS_USERID(),
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
export const messengerList = new Command()
|
|
12
|
+
.name('list')
|
|
13
|
+
.description('List messenger integrations')
|
|
14
|
+
.option('-s, --stream', 'Stream messenger integrations')
|
|
15
|
+
.action(async (str, options) => {
|
|
16
|
+
const { stream } = options;
|
|
17
|
+
const client = getClient();
|
|
18
|
+
if (stream) {
|
|
19
|
+
for await (const messenger of client.list().stream()) {
|
|
20
|
+
print(messenger);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
else {
|
|
24
|
+
const { items } = await client.list();
|
|
25
|
+
for (const messenger of items) {
|
|
26
|
+
print(messenger);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
export const messengerFetch = new Command()
|
|
31
|
+
.name('fetch')
|
|
32
|
+
.description('Fetch messenger integration')
|
|
33
|
+
.argument('<messengerId>', 'Messenger ID')
|
|
34
|
+
.action(async (messengerId) => {
|
|
35
|
+
const client = getClient();
|
|
36
|
+
const messenger = await client.fetch(messengerId);
|
|
37
|
+
print(messenger);
|
|
38
|
+
});
|
|
39
|
+
export const messengerDelete = new Command()
|
|
40
|
+
.name('delete')
|
|
41
|
+
.description('Delete messenger integration')
|
|
42
|
+
.argument('<messengerId>', 'Messenger ID')
|
|
43
|
+
.action(async (messengerId) => {
|
|
44
|
+
const client = getClient();
|
|
45
|
+
await client.delete(messengerId);
|
|
46
|
+
});
|
|
47
|
+
export const messengerSetup = new Command()
|
|
48
|
+
.name('setup')
|
|
49
|
+
.description('Setup messenger integration')
|
|
50
|
+
.argument('<messengerId>', 'Messenger ID')
|
|
51
|
+
.action(async (messengerId) => {
|
|
52
|
+
const client = getClient();
|
|
53
|
+
const result = await client.setup(messengerId);
|
|
54
|
+
print(result);
|
|
55
|
+
});
|
|
56
|
+
const commands = {
|
|
57
|
+
list: messengerList,
|
|
58
|
+
fetch: messengerFetch,
|
|
59
|
+
delete: messengerDelete,
|
|
60
|
+
setup: messengerSetup,
|
|
61
|
+
};
|
|
62
|
+
export const command = new Command()
|
|
63
|
+
.name('messenger')
|
|
64
|
+
.description('Messenger integration tools for ChatBotKit');
|
|
65
|
+
for (const cmd of Object.values(commands)) {
|
|
66
|
+
command.addCommand(cmd);
|
|
67
|
+
}
|
|
68
|
+
export default command;
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { getRUNAS_USERID, getSECRET } from '../../../../env.js';
|
|
2
|
+
import { print } from '../../../../output.js';
|
|
3
|
+
import { NotionIntegrationClient } from '@chatbotkit/sdk/integration/notion/index.js';
|
|
4
|
+
import { Command } from 'commander';
|
|
5
|
+
function getClient() {
|
|
6
|
+
return new NotionIntegrationClient({
|
|
7
|
+
secret: getSECRET(),
|
|
8
|
+
runAsUserId: getRUNAS_USERID(),
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
export const notionList = new Command()
|
|
12
|
+
.name('list')
|
|
13
|
+
.description('List notion integrations')
|
|
14
|
+
.option('-s, --stream', 'Stream notion integrations')
|
|
15
|
+
.action(async (str, options) => {
|
|
16
|
+
const { stream } = options;
|
|
17
|
+
const client = getClient();
|
|
18
|
+
if (stream) {
|
|
19
|
+
for await (const notion of client.list().stream()) {
|
|
20
|
+
print(notion);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
else {
|
|
24
|
+
const { items } = await client.list();
|
|
25
|
+
for (const notion of items) {
|
|
26
|
+
print(notion);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
export const notionFetch = new Command()
|
|
31
|
+
.name('fetch')
|
|
32
|
+
.description('Fetch notion integration')
|
|
33
|
+
.argument('<notionId>', 'Notion ID')
|
|
34
|
+
.action(async (notionId) => {
|
|
35
|
+
const client = getClient();
|
|
36
|
+
const notion = await client.fetch(notionId);
|
|
37
|
+
print(notion);
|
|
38
|
+
});
|
|
39
|
+
export const notionDelete = new Command()
|
|
40
|
+
.name('delete')
|
|
41
|
+
.description('Delete notion integration')
|
|
42
|
+
.argument('<notionId>', 'Notion ID')
|
|
43
|
+
.action(async (notionId) => {
|
|
44
|
+
const client = getClient();
|
|
45
|
+
await client.delete(notionId);
|
|
46
|
+
});
|
|
47
|
+
export const notionSync = new Command()
|
|
48
|
+
.name('sync')
|
|
49
|
+
.description('Sync notion integration')
|
|
50
|
+
.argument('<notionId>', 'Notion ID')
|
|
51
|
+
.action(async (notionId) => {
|
|
52
|
+
const client = getClient();
|
|
53
|
+
const result = await client.sync(notionId);
|
|
54
|
+
print(result);
|
|
55
|
+
});
|
|
56
|
+
const commands = {
|
|
57
|
+
list: notionList,
|
|
58
|
+
fetch: notionFetch,
|
|
59
|
+
delete: notionDelete,
|
|
60
|
+
sync: notionSync,
|
|
61
|
+
};
|
|
62
|
+
export const command = new Command()
|
|
63
|
+
.name('notion')
|
|
64
|
+
.description('Notion integration tools for ChatBotKit');
|
|
65
|
+
for (const cmd of Object.values(commands)) {
|
|
66
|
+
command.addCommand(cmd);
|
|
67
|
+
}
|
|
68
|
+
export default command;
|