@japofc/baileys - v2.4.7
    Preparing search index...

    Function makeWASocket

    • Parameters

      • config: any

      Returns {
          addChatLabel: (jid: any, labelId: any) => Promise<void>;
          addLabel: (jid: any, labels: any) => Promise<void>;
          addMessageLabel: (jid: any, messageId: any, labelId: any) => Promise<void>;
          addOrEditContact: (jid: any, contact: any) => Promise<void>;
          addOrEditQuickReply: (quickReply: any) => Promise<void>;
          appPatch: (patchCreate: any) => Promise<void>;
          appStatePatchMutex: { mutex(code: any): any };
          askMetaAI: (prompt: string, opts?: any) => Promise<any>;
          assertSessions: (jids: any, force: any) => Promise<boolean>;
          authState: {
              creds: any;
              keys: {
                  get: (type: any, ids: any) => Promise<any>;
                  isInTransaction: () => boolean;
                  set: (data: any) => Promise<void>;
                  transaction: (work: any, key: any) => Promise<any>;
              };
          };
          cancelScheduledCall: (jid: any, key: any, options?: any) => Promise<any>;
          chatModify: (mod: any, jid: any) => Promise<void>;
          checkUsername: (
              username: string,
              includeSuggestions?: boolean,
          ) => Promise<
              {
                  available: boolean;
                  rejectionReasons?: any[];
                  suggestions?: any[];
                  suggestionsEligible?: boolean;
                  username: string;
              },
          >;
          checkUsernameMulti: (usernames: string[]) => Promise<any>;
          cleanDirtyBits: (type: any, fromTimestamp: any) => Promise<void>;
          communityAcceptInvite: (code: any) => Promise<any>;
          communityAcceptInviteV4: (...args: any[]) => Promise<any>;
          communityCreate: (
              subject: any,
              body: any,
          ) => Promise<
              | {
                  addressingMode: any;
                  announce: boolean;
                  creation: number;
                  desc: any;
                  descId: any;
                  descOwner: string
                  | undefined;
                  descOwnerPn: string | undefined;
                  descOwnerUsername: any;
                  descTime: number | undefined;
                  ephemeralDuration: number | undefined;
                  id: any;
                  isCommunity: boolean;
                  isCommunityAnnounce: boolean;
                  joinApprovalMode: boolean;
                  linkedParent: any;
                  memberAddMode: boolean;
                  notify: any;
                  owner: string | undefined;
                  owner_country_code: any;
                  ownerPn: string | undefined;
                  ownerUsername: any;
                  participants: any;
                  restrict: boolean;
                  size: any;
                  subject: any;
                  subjectOwner: any;
                  subjectOwnerPn: any;
                  subjectOwnerUsername: any;
                  subjectTime: number;
              }
              | null,
          >;
          communityCreateGroup: (
              subject: any,
              participants: any,
              parentCommunityJid: any,
          ) => Promise<
              | {
                  addressingMode: any;
                  announce: boolean;
                  creation: number;
                  desc: any;
                  descId: any;
                  descOwner: string
                  | undefined;
                  descOwnerPn: string | undefined;
                  descOwnerUsername: any;
                  descTime: number | undefined;
                  ephemeralDuration: number | undefined;
                  id: any;
                  isCommunity: boolean;
                  isCommunityAnnounce: boolean;
                  joinApprovalMode: boolean;
                  linkedParent: any;
                  memberAddMode: boolean;
                  notify: any;
                  owner: string | undefined;
                  owner_country_code: any;
                  ownerPn: string | undefined;
                  ownerUsername: any;
                  participants: any;
                  restrict: boolean;
                  size: any;
                  subject: any;
                  subjectOwner: any;
                  subjectOwnerPn: any;
                  subjectOwnerUsername: any;
                  subjectTime: number;
              }
              | null,
          >;
          communityFetchAllParticipating: () => Promise<{}>;
          communityFetchLinkedGroups: (
              jid: any,
          ) => Promise<
              {
                  communityJid: any;
                  isCommunity: boolean;
                  linkedGroups: {
                      creation: number
                      | undefined;
                      id: string | undefined;
                      owner: string | undefined;
                      size: number | undefined;
                      subject: any;
                  }[];
              },
          >;
          communityGetInviteInfo: (
              code: any,
          ) => Promise<
              {
                  addressingMode: any;
                  announce: boolean;
                  creation: number;
                  desc: any;
                  descId: any;
                  ephemeralDuration: number
                  | undefined;
                  id: any;
                  isCommunity: boolean;
                  isCommunityAnnounce: boolean;
                  joinApprovalMode: boolean;
                  linkedParent: any;
                  memberAddMode: boolean;
                  owner: string | undefined;
                  participants: any;
                  restrict: boolean;
                  size: any;
                  subject: any;
                  subjectOwner: any;
                  subjectTime: number;
              },
          >;
          communityInviteCode: (jid: any) => Promise<any>;
          communityJoinApprovalMode: (jid: any, mode: any) => Promise<void>;
          communityLeave: (id: any) => Promise<void>;
          communityLinkGroup: (
              groupJid: any,
              parentCommunityJid: any,
          ) => Promise<void>;
          communityMemberAddMode: (jid: any, mode: any) => Promise<void>;
          communityMetadata: (
              jid: any,
          ) => Promise<
              {
                  addressingMode: any;
                  announce: boolean;
                  creation: number;
                  desc: any;
                  descId: any;
                  ephemeralDuration: number
                  | undefined;
                  id: any;
                  isCommunity: boolean;
                  isCommunityAnnounce: boolean;
                  joinApprovalMode: boolean;
                  linkedParent: any;
                  memberAddMode: boolean;
                  owner: string | undefined;
                  participants: any;
                  restrict: boolean;
                  size: any;
                  subject: any;
                  subjectOwner: any;
                  subjectTime: number;
              },
          >;
          communityParticipantsUpdate: (
              jid: any,
              participants: any,
              action: any,
          ) => Promise<any>;
          communityQuery: (jid: any, type: any, content: any) => Promise<any>;
          communityRequestParticipantsList: (jid: any) => Promise<any>;
          communityRequestParticipantsUpdate: (
              jid: any,
              participants: any,
              action: any,
          ) => Promise<any>;
          communityRevokeInvite: (jid: any) => Promise<any>;
          communityRevokeInviteV4: (
              communityJid: any,
              invitedJid: any,
          ) => Promise<boolean>;
          communitySettingUpdate: (jid: any, setting: any) => Promise<void>;
          communityToggleEphemeral: (
              jid: any,
              ephemeralExpiration: any,
          ) => Promise<void>;
          communityUnlinkGroup: (
              groupJid: any,
              parentCommunityJid: any,
          ) => Promise<void>;
          communityUpdateDescription: (jid: any, description: any) => Promise<void>;
          communityUpdateSubject: (jid: any, subject: any) => Promise<void>;
          copyNForward: (
              jid: any,
              message: any,
              forceForward?: boolean,
              options?: {},
          ) => Promise<any>;
          createCallLink: (type: any, event: any, timeoutMs: any) => Promise<any>;
          createParticipantNodes: (
              recipientJids: any,
              message: any,
              extraAttrs: any,
              dsmMessage: any,
          ) => Promise<{ nodes: any[]; shouldIncludeDeviceIdentity: boolean }>;
          deleteUsername: () => Promise<any>;
          devicesMutex: { mutex(code: any): any };
          digestKeyBundle: () => Promise<void>;
          downloadMedia: (message: any, type?: string, options?: {}) => Promise<any>;
          editPoll: (jid: any, key: any, poll: any, options?: any) => Promise<any>;
          end: (error: any) => Promise<void>;
          ev: {
              buffer: () => void;
              flush: () => boolean;
              off: (...args: any[]) => any;
              on: (...args: any[]) => any;
              removeAllListeners: (...args: any[]) => any;
              createBufferedFunction(work: any): (...args: any[]) => Promise<any>;
              destroy(): void;
              emit(event: any, evData: any): any;
              isBuffering(): boolean;
              process(handler: any): () => void;
          };
          executeUSyncQuery: (usyncQuery: any) => Promise<any>;
          executeWMexQuery: (
              variables: any,
              queryId: any,
              dataPath: any,
          ) => Promise<any>;
          fetchAccountReachoutTimelock: () => Promise<
              {
                  enforcementType: any;
                  isActive: boolean;
                  timeEnforcementEnds: Date
                  | undefined;
              },
          >;
          fetchBlocklist: () => Promise<any>;
          fetchContactUsernames: (...jids: string[]) => Promise<any[]>;
          fetchDisappearingDuration: (...jids: any[]) => Promise<any>;
          fetchMessageHistory: (
              count: any,
              oldestMsgKey: any,
              oldestMsgTimestamp: any,
          ) => Promise<any>;
          fetchNewChatMessageCap: () => Promise<any>;
          fetchPrivacySettings: (force?: boolean) => Promise<any>;
          fetchStatus: (...jids: any[]) => Promise<any>;
          findUserByUsername: (
              username: string,
              pin?: string,
          ) => Promise<{ contact: boolean; jid: string } | null>;
          findUserId: (
              pnLid: any,
          ) => Promise<{ lid: undefined; phoneNumber: undefined }>;
          generateMessageTag: () => string;
          getBotListV2: () => Promise<{ jid: any; personaId: any }[]>;
          getBusinessProfile: (
              jid: any,
          ) => Promise<
              | {
                  address: any;
                  business_hours: { business_config: any; timezone: any };
                  category: any;
                  description: any;
                  email: any;
                  website: any[];
                  wid: any;
              }
              | undefined,
          >;
          getCatalog: (
              __namedParameters: { cursor: any; jid: any; limit: any },
          ) => Promise<{ nextPageCursor: any; products: any }>;
          getCollections: (jid: any, limit?: number) => Promise<{ collections: any }>;
          getLidForPhone: (phone: string) => Promise<string | null>;
          getMediaHost: () => string;
          getMyUsername: () => Promise<string | null>;
          getOrderDetails: (
              orderId: any,
              tokenBase64: any,
          ) => Promise<{ price: { currency: any; total: number }; products: any }>;
          getPhoneNumber: (jid: string) => Promise<string | null>;
          getUsernameQueryIds: () => UsernameQueryIds;
          getUsernameRecommendations: (source?: string | null) => Promise<any>;
          getUSyncDevices: (
              jids: any,
              useCache: any,
              ignoreZeroDevices: any,
          ) => Promise<any[]>;
          groupAcceptInvite: (code: any) => Promise<any>;
          groupAcceptInviteV4: (...args: any[]) => Promise<any>;
          groupCreate: (
              subject: any,
              participants: any,
          ) => Promise<
              {
                  addressingMode: any;
                  announce: boolean;
                  creation: number;
                  desc: any;
                  descId: any;
                  descOwner: string
                  | undefined;
                  descOwnerPn: string | undefined;
                  descOwnerUsername: any;
                  descTime: number | undefined;
                  ephemeralDuration: number | undefined;
                  id: any;
                  isCommunity: boolean;
                  isCommunityAnnounce: boolean;
                  joinApprovalMode: boolean;
                  linkedParent: any;
                  memberAddMode: boolean;
                  notify: any;
                  owner: string | undefined;
                  owner_country_code: any;
                  ownerPn: string | undefined;
                  ownerUsername: any;
                  participants: any;
                  restrict: boolean;
                  size: any;
                  subject: any;
                  subjectOwner: any;
                  subjectOwnerPn: any;
                  subjectOwnerUsername: any;
                  subjectTime: number;
              },
          >;
          groupFetchAllParticipating: () => Promise<{}>;
          groupGetInviteInfo: (
              code: any,
          ) => Promise<
              {
                  addressingMode: any;
                  announce: boolean;
                  creation: number;
                  desc: any;
                  descId: any;
                  descOwner: string
                  | undefined;
                  descOwnerPn: string | undefined;
                  descOwnerUsername: any;
                  descTime: number | undefined;
                  ephemeralDuration: number | undefined;
                  id: any;
                  isCommunity: boolean;
                  isCommunityAnnounce: boolean;
                  joinApprovalMode: boolean;
                  linkedParent: any;
                  memberAddMode: boolean;
                  notify: any;
                  owner: string | undefined;
                  owner_country_code: any;
                  ownerPn: string | undefined;
                  ownerUsername: any;
                  participants: any;
                  restrict: boolean;
                  size: any;
                  subject: any;
                  subjectOwner: any;
                  subjectOwnerPn: any;
                  subjectOwnerUsername: any;
                  subjectTime: number;
              },
          >;
          groupInviteCode: (jid: any) => Promise<any>;
          groupJoinApprovalMode: (jid: any, mode: any) => Promise<void>;
          groupLeave: (id: any) => Promise<void>;
          groupMemberAddMode: (jid: any, mode: any) => Promise<void>;
          groupMetadata: (
              jid: any,
          ) => Promise<
              {
                  addressingMode: any;
                  announce: boolean;
                  creation: number;
                  desc: any;
                  descId: any;
                  descOwner: string
                  | undefined;
                  descOwnerPn: string | undefined;
                  descOwnerUsername: any;
                  descTime: number | undefined;
                  ephemeralDuration: number | undefined;
                  id: any;
                  isCommunity: boolean;
                  isCommunityAnnounce: boolean;
                  joinApprovalMode: boolean;
                  linkedParent: any;
                  memberAddMode: boolean;
                  notify: any;
                  owner: string | undefined;
                  owner_country_code: any;
                  ownerPn: string | undefined;
                  ownerUsername: any;
                  participants: any;
                  restrict: boolean;
                  size: any;
                  subject: any;
                  subjectOwner: any;
                  subjectOwnerPn: any;
                  subjectOwnerUsername: any;
                  subjectTime: number;
              },
          >;
          groupParticipantsUpdate: (
              jid: any,
              participants: any,
              action: any,
          ) => Promise<any[]>;
          groupQuery: (jid: any, type: any, content: any) => Promise<any>;
          groupRequestParticipantsList: (jid: any) => Promise<any>;
          groupRequestParticipantsUpdate: (
              jid: any,
              participants: any,
              action: any,
          ) => Promise<any>;
          groupRevokeInvite: (jid: any) => Promise<any>;
          groupRevokeInviteV4: (groupJid: any, invitedJid: any) => Promise<boolean>;
          groupSettingUpdate: (jid: any, setting: any) => Promise<void>;
          groupToggleEphemeral: (jid: any, ephemeralExpiration: any) => Promise<void>;
          groupUpdateDescription: (jid: any, description: any) => Promise<void>;
          groupUpdateSubject: (jid: any, subject: any) => Promise<void>;
          hideTag: (jid: string, text?: string, options?: any) => Promise<any>;
          issuePrivacyTokens: (jids: any, timestamp: any) => Promise<any>;
          joinGroupViaLink: (linkOrCode: string) => Promise<any>;
          logger: any;
          logout: (msg: any) => Promise<void>;
          messageMutex: { mutex(code: any): any };
          messageRetryManager: MessageRetryManager | null;
          newsletterAdminCount: (jid: any) => Promise<any>;
          newsletterChangeOwner: (jid: any, newOwnerJid: any) => Promise<void>;
          newsletterCreate: (
              name: any,
              description: any,
          ) => Promise<
              {
                  creation_time: number;
                  description: any;
                  id: any;
                  invite: any;
                  mute_state: any;
                  name: any;
                  owner: undefined;
                  picture: { directPath: any; id: any };
                  subscribers: number;
                  verification: any;
              },
          >;
          newsletterDelete: (jid: any) => Promise<void>;
          newsletterDemote: (jid: any, userJid: any) => Promise<void>;
          newsletterFetchMessages: (
              type: any,
              key: any,
              count: any,
              after: any,
              before: any,
          ) => Promise<any[]>;
          newsletterFollow: (jid: any) => Promise<any>;
          newsletterMetadata: (type: any, key: any) => Promise<any>;
          newsletterMute: (jid: any) => Promise<any>;
          newsletterReactMessage: (
              jid: any,
              serverId: any,
              reaction: any,
          ) => Promise<void>;
          newsletterRemovePicture: (jid: any) => Promise<any>;
          newsletterSubscribed: () => Promise<any>;
          newsletterSubscribers: (jid: any) => Promise<any>;
          newsletterUnfollow: (jid: any) => Promise<any>;
          newsletterUnmute: (jid: any) => Promise<any>;
          newsletterUpdate: (jid: any, updates: any) => Promise<any>;
          newsletterUpdateDescription: (jid: any, description: any) => Promise<any>;
          newsletterUpdateName: (jid: any, name: any) => Promise<any>;
          newsletterUpdatePicture: (jid: any, content: any) => Promise<any>;
          notificationMutex: { mutex(code: any): any };
          onUnexpectedError: (err: any, msg: any) => void;
          onWhatsApp: (...phoneNumber: any[]) => Promise<any>;
          placeholderResendCache: any;
          presenceSubscribe: (toJid: any) => Promise<void>;
          productCreate: (
              create: any,
          ) => Promise<
              {
                  availability: string;
                  currency: any;
                  description: any;
                  id: any;
                  imageUrls: { original: any; requested: any };
                  isHidden: boolean;
                  name: any;
                  price: number;
                  retailerId: any;
                  reviewStatus: { whatsapp: any };
                  url: any;
              },
          >;
          productDelete: (productIds: any) => Promise<{ deleted: number }>;
          productUpdate: (
              productId: any,
              update: any,
          ) => Promise<
              {
                  availability: string;
                  currency: any;
                  description: any;
                  id: any;
                  imageUrls: { original: any; requested: any };
                  isHidden: boolean;
                  name: any;
                  price: number;
                  retailerId: any;
                  reviewStatus: { whatsapp: any };
                  url: any;
              },
          >;
          profilePictureUrl: (
              jid: any,
              type?: string,
              timeoutMs?: number,
              shouldIncludeTcToken?: boolean,
          ) => Promise<any>;
          query: (node: any, timeoutMs: any) => Promise<any>;
          readMessages: (keys: any) => Promise<void>;
          receiptMutex: { mutex(code: any): any };
          refreshMediaConn: (forceGet?: boolean) => Promise<any>;
          refreshUsernameQueryIds: (
              options?: { dispatcher?: unknown; timeoutMs?: number },
          ) => Promise<{ isLatest: boolean; queryIds: UsernameQueryIds }>;
          registerSocketEndHandler: (handler: any) => void;
          rejectCall: (callId: any, callFrom: any) => Promise<void>;
          relayMessage: (
              jid: any,
              message: any,
              __namedParameters: {
                  addBizAttributes: any;
                  additionalAttributes: any;
                  additionalNodes: any;
                  messageId: any;
                  participant: any;
                  statusJidList: any;
                  useCachedGroupMetadata: any;
                  useUserDevicesCache: any;
              },
          ) => Promise<any>;
          removeChatLabel: (jid: any, labelId: any) => Promise<void>;
          removeContact: (jid: any) => Promise<void>;
          removeCoverPhoto: (id: any) => Promise<any>;
          removeMessageLabel: (
              jid: any,
              messageId: any,
              labelId: any,
          ) => Promise<void>;
          removeProfilePicture: (jid: any) => Promise<void>;
          removeQuickReply: (timestamp: any) => Promise<void>;
          requestPairingCode: (
              phoneNumber: any,
              customPairingCode: any,
          ) => Promise<any>;
          requestPlaceholderResend: (messageKey: any, msgData: any) => Promise<any>;
          reserveUsername: (username: string, options?: any) => Promise<any>;
          resolveSenderPn: (webMessage: any) => Promise<string | null>;
          resyncAppState: (...args: any[]) => Promise<any>;
          rotateSignedPreKey: () => Promise<void>;
          sendBroadcast: (
              jids: string[],
              content: any,
              options?: BroadcastOptions,
          ) => Promise<BroadcastReport>;
          sendContact: (jid: any, contact: any, options?: any) => Promise<any>;
          sendEvent: (jid: any, event: any, options?: any) => Promise<any>;
          sendEventInvite: (jid: any, invite: any, options?: any) => Promise<any>;
          sendGroupInvite: (jid: any, invite: any, options?: any) => Promise<any>;
          sendHumanized: (
              jid: any,
              content: any,
              humanOpts?: any,
              sendOptions?: any,
          ) => Promise<any>;
          sendInvoice: (jid: any, invoice: any, options?: any) => Promise<any>;
          sendKeep: (jid: any, key: any, options?: any) => Promise<any>;
          sendLocation: (jid: any, location: any, options?: any) => Promise<any>;
          sendMentionAll: (jid: any, text: string, options?: any) => Promise<any>;
          sendMessage: (jid: any, content: any, options?: {}) => Promise<any>;
          sendMessageAck: (node: any, errorCode: any) => Promise<void>;
          sendMiniApp: (jid: any, miniApp: any, options?: any) => Promise<any>;
          sendMusic: (jid: any, music: any, options?: any) => Promise<any>;
          sendNewsletterInvite: (
              jid: any,
              invite: any,
              options?: any,
          ) => Promise<any>;
          sendNode: (frame: any) => Promise<void>;
          sendPayment: (jid: any, pay: any, options?: any) => Promise<any>;
          sendPaymentRequest: (jid: any, req: any, options?: any) => Promise<any>;
          sendPeerDataOperationMessage: (pdoMessage: any) => Promise<any>;
          sendPin: (jid: any, key: any, opts?: any, options?: any) => Promise<any>;
          sendPoll: (jid: any, poll: any, options?: any) => Promise<any>;
          sendPollOption: (
              jid: any,
              pollKey: any,
              options2: any,
              options?: any,
          ) => Promise<any>;
          sendPresenceUpdate: (type: any, toJid: any) => Promise<void>;
          sendQuiz: (jid: any, quiz: any, options?: any) => Promise<any>;
          sendRawMessage: (data: any) => Promise<void>;
          sendReaction: (jid: any, reaction: any, key: any) => Promise<any>;
          sendReceipt: (
              jid: any,
              participant: any,
              messageIds: any,
              type: any,
          ) => Promise<void>;
          sendReceipts: (keys: any, type: any) => Promise<void>;
          sendRetryRequest: (node: any, forceIncludeKeys?: boolean) => Promise<void>;
          sendScheduledCall: (
              jid: any,
              scheduledCall: any,
              options?: any,
          ) => Promise<any>;
          sendStatusMention: (
              content: any,
              mentions: string | string[],
              options?: any,
          ) => Promise<any>;
          sendUnifiedSession: () => Promise<void>;
          sendUnkeep: (jid: any, key: any, options?: any) => Promise<any>;
          sendUnpin: (jid: any, key: any, options?: any) => Promise<any>;
          sendVoiceNote: (jid: any, audio: any, options?: any) => Promise<any>;
          sendWAMBuffer: (wamBuffer: any) => Promise<any>;
          serverProps: {
              lidTrustedTokenIssueToLid: boolean;
              privacyTokenOn1to1: boolean;
              profilePicPrivacyToken: boolean;
          };
          setUsername: (username: string, options?: any) => Promise<any>;
          setUsernamePin: (pin: string) => Promise<any>;
          setUsernameQueryIds: (patch: Partial<UsernameQueryIds>) => UsernameQueryIds;
          shareGroupHistory: (opts: any) => Promise<any>;
          signalRepository: any;
          star: (jid: any, messages: any, star: any) => Promise<void>;
          subscribeNewsletterUpdates: (jid: any) => Promise<{ duration: any } | null>;
          tagAll: (jid: string, text?: string, options?: any) => Promise<any>;
          transcribeMessage: (webMessage: any, opts?: any) => Promise<any>;
          type: string;
          updateBlockStatus: (jid: any, action: any) => Promise<void>;
          updateBusinessProfile: (args: any) => Promise<any>;
          updateBussinesProfile: (args: any) => Promise<any>;
          updateCallPrivacy: (value: any) => Promise<void>;
          updateCoverPhoto: (photo: any) => Promise<any>;
          updateDefaultDisappearingMode: (duration: any) => Promise<void>;
          updateDisableLinkPreviewsPrivacy: (
              isPreviewsDisabled: any,
          ) => Promise<void>;
          updateGroupsAddPrivacy: (value: any) => Promise<void>;
          updateLastSeenPrivacy: (value: any) => Promise<void>;
          updateMediaMessage: (message: any) => Promise<any>;
          updateMemberLabel: (jid: any, memberLabel: any) => Promise<any>;
          updateMessagesPrivacy: (value: any) => Promise<void>;
          updateOnlinePrivacy: (value: any) => Promise<void>;
          updateProfileName: (name: any) => Promise<void>;
          updateProfilePicture: (
              jid: any,
              content: any,
              dimensions: any,
          ) => Promise<void>;
          updateProfilePicturePrivacy: (value: any) => Promise<void>;
          updateProfileStatus: (status: any) => Promise<void>;
          updateReadReceiptsPrivacy: (value: any) => Promise<void>;
          updateServerTimeOffset: (__namedParameters: { attrs: any }) => void;
          updateStatusPrivacy: (value: any) => Promise<void>;
          uploadPreKeys: (count?: number) => Promise<void>;
          uploadPreKeysToServerIfRequired: () => Promise<void>;
          upsertMessage: (...args: any[]) => Promise<any>;
          user: any;
          userDevicesCache: any;
          USERNAME_CHECK_RESULT: UsernameCheckResult;
          USERNAME_QUERY_IDS: UsernameQueryIds;
          USERNAME_SOURCE: UsernameSource;
          waitForConnectionUpdate: (check: any, timeoutMs: any) => Promise<void>;
          waitForMessage: (msgId: any, timeoutMs?: any) => Promise<any>;
          waitForSocketOpen: () => Promise<void>;
          wamBuffer: BinaryInfo;
          waUploadToServer: (
              filePath: any,
              __namedParameters: {
                  fileEncSha256B64: any;
                  mediaType: any;
                  newsletter: any;
                  timeoutMs: any;
              },
          ) => Promise<
              {
                  directPath: any;
                  fbid: any;
                  mediaUrl: any;
                  meta_hmac: any;
                  thumbnailDirectPath: any;
                  thumbnailSha256: any;
                  ts: any;
              },
          >;
          ws: WebSocketClient;
      }