Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: export clients, factories from messaging-apis #806

Merged
merged 1 commit into from
Jun 17, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions packages/bottender/src/__tests__/index.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,15 @@ describe('core', () => {
expect(core.ViberConnector).toBeDefined();
});

it('export clients', () => {
expect(core.MessengerClient).toBeDefined();
expect(core.TwilioClient).toBeDefined();
expect(core.LineClient).toBeDefined();
expect(core.SlackOAuthClient).toBeDefined();
expect(core.TelegramClient).toBeDefined();
expect(core.ViberClient).toBeDefined();
});

it('export cache implements', () => {
expect(core.MemoryCacheStore).toBeDefined();
expect(core.RedisCacheStore).toBeDefined();
Expand Down
11 changes: 10 additions & 1 deletion packages/bottender/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,42 +43,51 @@ export { default as FacebookBaseConnector } from './messenger/FacebookBaseConnec
export { default as MessengerConnector } from './messenger/MessengerConnector';
export { default as MessengerContext } from './messenger/MessengerContext';
export { default as MessengerEvent } from './messenger/MessengerEvent';
export {
Messenger,
MessengerClient,
MessengerBatch,
} from 'messaging-api-messenger';
export { MessengerTypes };

/* WhatsApp */
export { default as WhatsappBot } from './whatsapp/WhatsappBot';
export { default as WhatsappConnector } from './whatsapp/WhatsappConnector';
export { default as WhatsappContext } from './whatsapp/WhatsappContext';
export { default as WhatsappEvent } from './whatsapp/WhatsappEvent';
export { default as TwilioClient } from './whatsapp/TwilioClient';
export { WhatsappTypes };

/* LINE */
export { default as LineBot } from './line/LineBot';
export { default as LineConnector } from './line/LineConnector';
export { default as LineContext } from './line/LineContext';
export { default as LineEvent } from './line/LineEvent';
export { LineNotify } from 'messaging-api-line';
export { Line, LineNotify, LineClient } from 'messaging-api-line';
export { LineTypes };

/* Slack */
export { default as SlackBot } from './slack/SlackBot';
export { default as SlackConnector } from './slack/SlackConnector';
export { default as SlackContext } from './slack/SlackContext';
export { default as SlackEvent } from './slack/SlackEvent';
export { SlackOAuthClient } from 'messaging-api-slack';
export { SlackTypes };

/* Telegram */
export { default as TelegramBot } from './telegram/TelegramBot';
export { default as TelegramConnector } from './telegram/TelegramConnector';
export { default as TelegramContext } from './telegram/TelegramContext';
export { default as TelegramEvent } from './telegram/TelegramEvent';
export { TelegramClient } from 'messaging-api-telegram';
export { TelegramTypes };

/* Viber */
export { default as ViberBot } from './viber/ViberBot';
export { default as ViberConnector } from './viber/ViberConnector';
export { default as ViberContext } from './viber/ViberContext';
export { default as ViberEvent } from './viber/ViberEvent';
export { ViberClient } from 'messaging-api-viber';
export { ViberTypes };

/* Types */
Expand Down