Spaces:
Paused
Paused
Download dist/api/model/initializer.d.ts from AUXteam/wppconnect-api: direct link, hf CLI and curl.
- Browser
- Download file 2.46 kB
-
https://huggingface.co/spaces/AUXteam/wppconnect-api/resolve/main/dist/api/model/initializer.d.ts
- Command line
-
hf download hf://spaces/AUXteam/wppconnect-api/dist/api/model/initializer.d.ts
-
curl -L -o initializer.d.ts https://huggingface.co/spaces/AUXteam/wppconnect-api/resolve/main/dist/api/model/initializer.d.ts
2.46 kB
| import { StreamInfo, StreamMode } from '@wppconnect/wa-js/dist/whatsapp/enums'; | |
| import { CreateConfig } from '../../config/create-config'; | |
| import { SessionToken } from '../../token-store'; | |
| import { StatusFind } from './enum'; | |
| /** | |
| * A callback will be received, informing the status of the qrcode | |
| */ | |
| export type CatchQRCallback = (qrCode: string, asciiQR: string, attempt: number, urlCode?: string) => void; | |
| /** | |
| * A callback will be received, informing the customer's status | |
| */ | |
| export type StatusFindCallback = (status: StatusFind | keyof typeof StatusFind, session: string) => void; | |
| /** | |
| * A callback will be received, informing data as percentage and loading screen message | |
| */ | |
| export type LoadingScreenCallback = (percent: number, message: string) => void; | |
| /** | |
| * A callback will be received, informing the stream mode has changed | |
| */ | |
| export type OnStreamModeCallback = (mode: StreamMode) => void; | |
| /** | |
| * A callback will be received, informing the stream info has changed | |
| */ | |
| export type OnStreamInfoCallback = (info: StreamInfo) => void; | |
| /** | |
| * A callback will be received, informing a code to you connect | |
| */ | |
| export type LinkByCodeCallback = (code: string) => void; | |
| export interface CreateOptions extends CreateConfig { | |
| /** | |
| * You must pass a string type parameter, this parameter will be the name of the client's session. If the parameter is not passed, the section name will be "session". | |
| */ | |
| session?: string; | |
| /** | |
| * A callback will be received, informing the status of the qrcode | |
| */ | |
| catchQR?: CatchQRCallback; | |
| /** | |
| * A callback will be received, informing a code to you connect | |
| */ | |
| catchLinkCode?: LinkByCodeCallback; | |
| /** | |
| * A callback will be received, informing the customer's status | |
| */ | |
| statusFind?: StatusFindCallback; | |
| /** | |
| * A callback will be received, informing data as percentage and loading screen message | |
| */ | |
| onLoadingScreen?: LoadingScreenCallback; | |
| /** | |
| * A callback will be received, informing the stream mode has changed | |
| */ | |
| onStreamModeChanged?: OnStreamModeCallback; | |
| /** | |
| * A callback will be received, informing the stream info has changed | |
| */ | |
| onStreamInfoChanged?: OnStreamInfoCallback; | |
| /** | |
| * Pass the session token information you can receive this token with the await client.getSessionTokenBrowser () function | |
| * @deprecated in favor of `sessionToken` | |
| */ | |
| browserSessionToken?: SessionToken; | |
| } | |