UNPKG

@waboyz-baileys/shared

Version:

50 lines (49 loc) 1.66 kB
import type { S3ClientConfig } from '@aws-sdk/client-s3'; export type { ServerContext } from './context.js'; export type { GrpcMasterToWorkerActions } from './g-actions.js'; export type { GrpcWorkerToMasterEvents } from './g-events.js'; export { EventData, EventNull, EventVersion, EventError, EventMeta, SpawnStatus, SpawnUsage, MetaPayload, IPCActions, IPCEvents } from './ipc.js'; import type { BaileysEventMap, Chat, Contact, WAMessage } from "@whiskeysockets/baileys"; import type { MongoClient, Collection, MongoClientOptions } from 'mongodb'; import type { LRUCache } from 'lru-cache'; export type Profilepictures = { id: string; url?: string; timestamp: number; failed?: boolean; }; export type BaileysEvent = keyof BaileysEventMap; export type { MongoClient, Collection, }; export type PaginatedMessages = { messages: WAMessage[]; hasNextPage: boolean; }; export type CacheOption<K extends {}, T extends {}> = LRUCache.OptionsBase<K, T, unknown> & { max: number; enable: boolean; }; export interface CacheConfig { contacts?: CacheOption<'contacts', Contact[]>; chats?: CacheOption<'chats', Chat[]>; messages?: CacheOption<string, PaginatedMessages>; pps?: CacheOption<'pps', Profilepictures[]>; } export type MongoConfig = { url: string; options?: MongoClientOptions; }; export type R2Config = { s3Config: S3ClientConfig; bucket: string; publicUrl?: string; }; export type TopicsInput = { topics: string[]; }; export declare enum MessageContentType { REACTION = "reaction", RECEIPT = "receipt", POLL = "poll", STANDARD = "standard", UNKNOWN = "unknown" }