14 lines
574 B
TypeScript
14 lines
574 B
TypeScript
import { type ResolvedWhatsAppAccount } from "./accounts.js";
|
|
import { webAuthExists } from "./auth-store.js";
|
|
import { type ChannelPlugin } from "./runtime-api.js";
|
|
import { whatsappSetupAdapter } from "./setup-core.js";
|
|
import { createWhatsAppPluginBase, whatsappSetupWizardProxy } from "./shared.js";
|
|
|
|
export const whatsappSetupPlugin: ChannelPlugin<ResolvedWhatsAppAccount> = {
|
|
...createWhatsAppPluginBase({
|
|
setupWizard: whatsappSetupWizardProxy,
|
|
setup: whatsappSetupAdapter,
|
|
isConfigured: async (account) => await webAuthExists(account.authDir),
|
|
}),
|
|
};
|