zapo-js 1.0.1 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/coordinators/WaMessageCoordinator.js +2 -18
- package/dist/client/coordinators/WaMessageDispatchCoordinator.js +2 -1
- package/dist/client/events/incoming.js +3 -1
- package/dist/client/events/receipt.d.ts +30 -0
- package/dist/client/events/receipt.js +32 -0
- package/dist/{types/client → client}/media.d.ts +59 -2
- package/dist/client/media.js +60 -0
- package/dist/{types/client → client}/types.d.ts +7 -0
- package/dist/esm/appstate-spec.js +2 -2
- package/dist/esm/client/coordinators/WaMessageCoordinator.js +2 -18
- package/dist/esm/client/coordinators/WaMessageDispatchCoordinator.js +2 -1
- package/dist/esm/client/events/incoming.js +3 -1
- package/dist/esm/client/events/receipt.js +31 -0
- package/dist/esm/client/media.js +59 -0
- package/dist/esm/index.js +2 -0
- package/dist/esm/message/context-info.js +16 -3
- package/dist/esm/message/encode/media-payload.js +18 -0
- package/dist/esm/mex.js +1 -1
- package/dist/esm/protocol/message.js +2 -1
- package/dist/esm/version-spec.js +1 -1
- package/dist/{types/index.d.ts → index.d.ts} +4 -1
- package/dist/index.js +6 -2
- package/dist/{types/message → message}/context-info.d.ts +9 -0
- package/dist/message/context-info.js +15 -2
- package/dist/message/encode/media-payload.d.ts +43 -0
- package/dist/message/encode/media-payload.js +18 -0
- package/dist/{types/protocol → protocol}/message.d.ts +1 -0
- package/dist/protocol/message.js +2 -1
- package/package.json +20 -16
- package/dist/types/client/events/receipt.d.ts +0 -14
- package/dist/types/message/encode/media-payload.d.ts +0 -12
- /package/dist/{types/appstate → appstate}/constants.d.ts +0 -0
- /package/dist/{types/appstate → appstate}/crypto/WaAppStateCrypto.d.ts +0 -0
- /package/dist/{types/appstate → appstate}/index.d.ts +0 -0
- /package/dist/{types/appstate → appstate}/parsers/encoding.d.ts +0 -0
- /package/dist/{types/appstate → appstate}/parsers/response-parser.d.ts +0 -0
- /package/dist/{types/appstate → appstate}/sync/WaAppStateSyncClient.d.ts +0 -0
- /package/dist/{types/appstate → appstate}/types.d.ts +0 -0
- /package/dist/{types/appstate → appstate}/utils.d.ts +0 -0
- /package/dist/{types/appstate-spec.d.ts → appstate-spec.d.ts} +0 -0
- /package/dist/{types/auth → auth}/WaAuthClient.d.ts +0 -0
- /package/dist/{types/auth → auth}/credentials-flow.d.ts +0 -0
- /package/dist/{types/auth → auth}/index.d.ts +0 -0
- /package/dist/{types/auth → auth}/pairing/WaPairingFlow.d.ts +0 -0
- /package/dist/{types/auth → auth}/pairing/WaQrFlow.d.ts +0 -0
- /package/dist/{types/auth → auth}/pairing/pairing-code-crypto.d.ts +0 -0
- /package/dist/{types/auth → auth}/types.d.ts +0 -0
- /package/dist/{types/client → client}/WaClient.d.ts +0 -0
- /package/dist/{types/client → client}/WaClientFactory.d.ts +0 -0
- /package/dist/{types/client → client}/connection/WaConnectionManager.d.ts +0 -0
- /package/dist/{types/client → client}/connection/WaReceiptQueue.d.ts +0 -0
- /package/dist/{types/client → client}/coordinators/WaAbPropsCoordinator.d.ts +0 -0
- /package/dist/{types/client → client}/coordinators/WaAppStateMutationCoordinator.d.ts +0 -0
- /package/dist/{types/client → client}/coordinators/WaBotCoordinator.d.ts +0 -0
- /package/dist/{types/client → client}/coordinators/WaBroadcastListCoordinator.d.ts +0 -0
- /package/dist/{types/client → client}/coordinators/WaBusinessCoordinator.d.ts +0 -0
- /package/dist/{types/client → client}/coordinators/WaEmailCoordinator.d.ts +0 -0
- /package/dist/{types/client → client}/coordinators/WaGroupCoordinator.d.ts +0 -0
- /package/dist/{types/client → client}/coordinators/WaIncomingNodeCoordinator.d.ts +0 -0
- /package/dist/{types/client → client}/coordinators/WaLowLevelCoordinator.d.ts +0 -0
- /package/dist/{types/client → client}/coordinators/WaMessageCoordinator.d.ts +0 -0
- /package/dist/{types/client → client}/coordinators/WaMessageDispatchCoordinator.d.ts +0 -0
- /package/dist/{types/client → client}/coordinators/WaNewsletterCoordinator.d.ts +0 -0
- /package/dist/{types/client → client}/coordinators/WaOfflineResumeCoordinator.d.ts +0 -0
- /package/dist/{types/client → client}/coordinators/WaPassiveTasksCoordinator.d.ts +0 -0
- /package/dist/{types/client → client}/coordinators/WaPresenceCoordinator.d.ts +0 -0
- /package/dist/{types/client → client}/coordinators/WaPrivacyCoordinator.d.ts +0 -0
- /package/dist/{types/client → client}/coordinators/WaProfileCoordinator.d.ts +0 -0
- /package/dist/{types/client → client}/coordinators/WaRetryCoordinator.d.ts +0 -0
- /package/dist/{types/client → client}/coordinators/WaStatusCoordinator.d.ts +0 -0
- /package/dist/{types/client → client}/coordinators/WaStreamControlCoordinator.d.ts +0 -0
- /package/dist/{types/client → client}/coordinators/WaTrustedContactTokenCoordinator.d.ts +0 -0
- /package/dist/{types/client → client}/events/abprops.d.ts +0 -0
- /package/dist/{types/client → client}/events/appstate-mutation.d.ts +0 -0
- /package/dist/{types/client → client}/events/business.d.ts +0 -0
- /package/dist/{types/client → client}/events/call.d.ts +0 -0
- /package/dist/{types/client → client}/events/chatstate.d.ts +0 -0
- /package/dist/{types/client → client}/events/devices.d.ts +0 -0
- /package/dist/{types/client → client}/events/dirty.d.ts +0 -0
- /package/dist/{types/client → client}/events/group.d.ts +0 -0
- /package/dist/{types/client → client}/events/identity.d.ts +0 -0
- /package/dist/{types/client → client}/events/incoming.d.ts +0 -0
- /package/dist/{types/client → client}/events/mex-notification.d.ts +0 -0
- /package/dist/{types/client → client}/events/picture.d.ts +0 -0
- /package/dist/{types/client → client}/events/presence.d.ts +0 -0
- /package/dist/{types/client → client}/events/privacy-token.d.ts +0 -0
- /package/dist/{types/client → client}/events/registration.d.ts +0 -0
- /package/dist/{types/client → client}/index.d.ts +0 -0
- /package/dist/{types/client → client}/messaging/fanout.d.ts +0 -0
- /package/dist/{types/client → client}/messaging/group-metadata.d.ts +0 -0
- /package/dist/{types/client → client}/messaging/ignore-key.d.ts +0 -0
- /package/dist/{types/client → client}/messaging/key-protocol.d.ts +0 -0
- /package/dist/{types/client → client}/messaging/link-preview.d.ts +0 -0
- /package/dist/{types/client → client}/messaging/messages.d.ts +0 -0
- /package/dist/{types/client → client}/newsletter/admin.d.ts +0 -0
- /package/dist/{types/client → client}/newsletter/content.d.ts +0 -0
- /package/dist/{types/client → client}/newsletter/discovery.d.ts +0 -0
- /package/dist/{types/client → client}/newsletter/messaging.d.ts +0 -0
- /package/dist/{types/client → client}/newsletter/mex.d.ts +0 -0
- /package/dist/{types/client → client}/newsletter/parse.d.ts +0 -0
- /package/dist/{types/client → client}/newsletter/types.d.ts +0 -0
- /package/dist/{types/client → client}/persistence/WriteBehindPersistence.d.ts +0 -0
- /package/dist/{types/client → client}/persistence/history-sync.d.ts +0 -0
- /package/dist/{types/client → client}/persistence/mailbox.d.ts +0 -0
- /package/dist/{types/client → client}/tokens/cs-token.d.ts +0 -0
- /package/dist/{types/client → client}/tokens/tc-token.d.ts +0 -0
- /package/dist/{types/crypto → crypto}/core/hkdf.d.ts +0 -0
- /package/dist/{types/crypto → crypto}/core/index.d.ts +0 -0
- /package/dist/{types/crypto → crypto}/core/keys.d.ts +0 -0
- /package/dist/{types/crypto → crypto}/core/nonce.d.ts +0 -0
- /package/dist/{types/crypto → crypto}/core/primitives.d.ts +0 -0
- /package/dist/{types/crypto → crypto}/core/random.d.ts +0 -0
- /package/dist/{types/crypto → crypto}/core/xeddsa.d.ts +0 -0
- /package/dist/{types/crypto → crypto}/curves/Ed25519.d.ts +0 -0
- /package/dist/{types/crypto → crypto}/curves/X25519.d.ts +0 -0
- /package/dist/{types/crypto → crypto}/curves/constants.d.ts +0 -0
- /package/dist/{types/crypto → crypto}/curves/types.d.ts +0 -0
- /package/dist/{types/crypto → crypto}/index.d.ts +0 -0
- /package/dist/{types/crypto → crypto}/math/constants.d.ts +0 -0
- /package/dist/{types/crypto → crypto}/math/edwards.d.ts +0 -0
- /package/dist/{types/crypto → crypto}/math/fe.d.ts +0 -0
- /package/dist/{types/crypto → crypto}/math/le.d.ts +0 -0
- /package/dist/{types/crypto → crypto}/math/mod.d.ts +0 -0
- /package/dist/{types/crypto → crypto}/math/types.d.ts +0 -0
- /package/dist/{types/infra → infra}/log/ConsoleLogger.d.ts +0 -0
- /package/dist/{types/infra → infra}/log/PinoLogger.d.ts +0 -0
- /package/dist/{types/infra → infra}/log/types.d.ts +0 -0
- /package/dist/{types/infra → infra}/perf/BackgroundQueue.d.ts +0 -0
- /package/dist/{types/infra → infra}/perf/BoundedTaskQueue.d.ts +0 -0
- /package/dist/{types/infra → infra}/perf/PromiseDedup.d.ts +0 -0
- /package/dist/{types/infra → infra}/perf/SharedExclusiveGate.d.ts +0 -0
- /package/dist/{types/infra → infra}/perf/StoreLock.d.ts +0 -0
- /package/dist/{types/media → media}/constants.d.ts +0 -0
- /package/dist/{types/media → media}/crypto/WaMediaCrypto.d.ts +0 -0
- /package/dist/{types/media → media}/index.d.ts +0 -0
- /package/dist/{types/media → media}/processor.d.ts +0 -0
- /package/dist/{types/media → media}/sticker/sticker-pack.d.ts +0 -0
- /package/dist/{types/media → media}/transfer/WaMediaTransferClient.d.ts +0 -0
- /package/dist/{types/media → media}/transfer/conn.d.ts +0 -0
- /package/dist/{types/media → media}/types.d.ts +0 -0
- /package/dist/{types/message → message}/WaMessageClient.d.ts +0 -0
- /package/dist/{types/message → message}/addons/link-preview/builder.d.ts +0 -0
- /package/dist/{types/message → message}/addons/link-preview/detect.d.ts +0 -0
- /package/dist/{types/message → message}/addons/link-preview/fetcher.d.ts +0 -0
- /package/dist/{types/message → message}/addons/link-preview/types.d.ts +0 -0
- /package/dist/{types/message → message}/crypto/addon-crypto.d.ts +0 -0
- /package/dist/{types/message → message}/crypto/icdc.d.ts +0 -0
- /package/dist/{types/message → message}/crypto/phash.d.ts +0 -0
- /package/dist/{types/message → message}/crypto/reporting-token.d.ts +0 -0
- /package/dist/{types/message → message}/crypto/use-case-secret.d.ts +0 -0
- /package/dist/{types/message → message}/encode/content.d.ts +0 -0
- /package/dist/{types/message → message}/encode/device-sent.d.ts +0 -0
- /package/dist/{types/message → message}/encode/padding.d.ts +0 -0
- /package/dist/{types/message → message}/index.d.ts +0 -0
- /package/dist/{types/message → message}/kinds/bot.d.ts +0 -0
- /package/dist/{types/message → message}/kinds/newsletter.d.ts +0 -0
- /package/dist/{types/message → message}/kinds/sticker-pack.d.ts +0 -0
- /package/dist/{types/message → message}/primitives/ack.d.ts +0 -0
- /package/dist/{types/message → message}/primitives/incoming.d.ts +0 -0
- /package/dist/{types/message → message}/primitives/peer-data-operation.d.ts +0 -0
- /package/dist/{types/message → message}/types.d.ts +0 -0
- /package/dist/{types/mex.d.ts → mex.d.ts} +0 -0
- /package/dist/{types/proto.d.ts → proto.d.ts} +0 -0
- /package/dist/{types/protocol → protocol}/abprops.d.ts +0 -0
- /package/dist/{types/protocol → protocol}/appstate.d.ts +0 -0
- /package/dist/{types/protocol → protocol}/auth.d.ts +0 -0
- /package/dist/{types/protocol → protocol}/bot.d.ts +0 -0
- /package/dist/{types/protocol → protocol}/browser.d.ts +0 -0
- /package/dist/{types/protocol → protocol}/business.d.ts +0 -0
- /package/dist/{types/protocol → protocol}/call.d.ts +0 -0
- /package/dist/{types/protocol → protocol}/constants.d.ts +0 -0
- /package/dist/{types/protocol → protocol}/defaults.d.ts +0 -0
- /package/dist/{types/protocol → protocol}/dirty.d.ts +0 -0
- /package/dist/{types/protocol → protocol}/email.d.ts +0 -0
- /package/dist/{types/protocol → protocol}/group.d.ts +0 -0
- /package/dist/{types/protocol → protocol}/index.d.ts +0 -0
- /package/dist/{types/protocol → protocol}/jid.d.ts +0 -0
- /package/dist/{types/protocol → protocol}/media.d.ts +0 -0
- /package/dist/{types/protocol → protocol}/newsletter.d.ts +0 -0
- /package/dist/{types/protocol → protocol}/nodes.d.ts +0 -0
- /package/dist/{types/protocol → protocol}/notification.d.ts +0 -0
- /package/dist/{types/protocol → protocol}/presence.d.ts +0 -0
- /package/dist/{types/protocol → protocol}/privacy-token.d.ts +0 -0
- /package/dist/{types/protocol → protocol}/privacy.d.ts +0 -0
- /package/dist/{types/protocol → protocol}/status.d.ts +0 -0
- /package/dist/{types/protocol → protocol}/stream.d.ts +0 -0
- /package/dist/{types/protocol → protocol}/usync.d.ts +0 -0
- /package/dist/{types/retry → retry}/codec.d.ts +0 -0
- /package/dist/{types/retry → retry}/constants.d.ts +0 -0
- /package/dist/{types/retry → retry}/index.d.ts +0 -0
- /package/dist/{types/retry → retry}/parse.d.ts +0 -0
- /package/dist/{types/retry → retry}/reason.d.ts +0 -0
- /package/dist/{types/retry → retry}/replay.d.ts +0 -0
- /package/dist/{types/retry → retry}/tracker.d.ts +0 -0
- /package/dist/{types/retry → retry}/types.d.ts +0 -0
- /package/dist/{types/signal → signal}/api/SignalDeviceSyncApi.d.ts +0 -0
- /package/dist/{types/signal → signal}/api/SignalDigestSyncApi.d.ts +0 -0
- /package/dist/{types/signal → signal}/api/SignalIdentitySyncApi.d.ts +0 -0
- /package/dist/{types/signal → signal}/api/SignalMissingPreKeysSyncApi.d.ts +0 -0
- /package/dist/{types/signal → signal}/api/SignalRotateKeyApi.d.ts +0 -0
- /package/dist/{types/signal → signal}/api/SignalSessionSyncApi.d.ts +0 -0
- /package/dist/{types/signal → signal}/api/codec.d.ts +0 -0
- /package/dist/{types/signal → signal}/api/constants.d.ts +0 -0
- /package/dist/{types/signal → signal}/api/prekeys.d.ts +0 -0
- /package/dist/{types/signal → signal}/api/result-map.d.ts +0 -0
- /package/dist/{types/signal → signal}/attestation/WaAdvSignature.d.ts +0 -0
- /package/dist/{types/signal → signal}/attestation/constants.d.ts +0 -0
- /package/dist/{types/signal → signal}/constants.d.ts +0 -0
- /package/dist/{types/signal → signal}/encoding.d.ts +0 -0
- /package/dist/{types/signal → signal}/group/SenderKeyChain.d.ts +0 -0
- /package/dist/{types/signal → signal}/group/SenderKeyCodec.d.ts +0 -0
- /package/dist/{types/signal → signal}/group/SenderKeyManager.d.ts +0 -0
- /package/dist/{types/signal → signal}/group/encoding.d.ts +0 -0
- /package/dist/{types/signal → signal}/index.d.ts +0 -0
- /package/dist/{types/signal → signal}/registration/encoding.d.ts +0 -0
- /package/dist/{types/signal → signal}/registration/keygen.d.ts +0 -0
- /package/dist/{types/signal → signal}/registration/utils.d.ts +0 -0
- /package/dist/{types/signal → signal}/session/SignalProtocol.d.ts +0 -0
- /package/dist/{types/signal → signal}/session/SignalRatchet.d.ts +0 -0
- /package/dist/{types/signal → signal}/session/SignalSerializer.d.ts +0 -0
- /package/dist/{types/signal → signal}/session/SignalSession.d.ts +0 -0
- /package/dist/{types/signal → signal}/session/encoding.d.ts +0 -0
- /package/dist/{types/signal → signal}/session/resolver.d.ts +0 -0
- /package/dist/{types/signal → signal}/types.d.ts +0 -0
- /package/dist/{types/store → store}/cache/identity.cache.d.ts +0 -0
- /package/dist/{types/store → store}/cache/privacy-token.cache.d.ts +0 -0
- /package/dist/{types/store → store}/cache/sender-key.cache.d.ts +0 -0
- /package/dist/{types/store → store}/cache/session.cache.d.ts +0 -0
- /package/dist/{types/store → store}/contracts/appstate.store.d.ts +0 -0
- /package/dist/{types/store → store}/contracts/auth.store.d.ts +0 -0
- /package/dist/{types/store → store}/contracts/contact.store.d.ts +0 -0
- /package/dist/{types/store → store}/contracts/device-list.store.d.ts +0 -0
- /package/dist/{types/store → store}/contracts/group-metadata.store.d.ts +0 -0
- /package/dist/{types/store → store}/contracts/identity.store.d.ts +0 -0
- /package/dist/{types/store → store}/contracts/message-secret.store.d.ts +0 -0
- /package/dist/{types/store → store}/contracts/message.store.d.ts +0 -0
- /package/dist/{types/store → store}/contracts/pre-key.store.d.ts +0 -0
- /package/dist/{types/store → store}/contracts/privacy-token.store.d.ts +0 -0
- /package/dist/{types/store → store}/contracts/retry.store.d.ts +0 -0
- /package/dist/{types/store → store}/contracts/sender-key.store.d.ts +0 -0
- /package/dist/{types/store → store}/contracts/session.store.d.ts +0 -0
- /package/dist/{types/store → store}/contracts/signal.store.d.ts +0 -0
- /package/dist/{types/store → store}/contracts/thread.store.d.ts +0 -0
- /package/dist/{types/store → store}/createStore.d.ts +0 -0
- /package/dist/{types/store → store}/index.d.ts +0 -0
- /package/dist/{types/store → store}/locks/appstate.lock.d.ts +0 -0
- /package/dist/{types/store → store}/locks/auth.lock.d.ts +0 -0
- /package/dist/{types/store → store}/locks/contact.lock.d.ts +0 -0
- /package/dist/{types/store → store}/locks/device-list.lock.d.ts +0 -0
- /package/dist/{types/store → store}/locks/group-metadata.lock.d.ts +0 -0
- /package/dist/{types/store → store}/locks/identity.lock.d.ts +0 -0
- /package/dist/{types/store → store}/locks/message-secret.lock.d.ts +0 -0
- /package/dist/{types/store → store}/locks/message.lock.d.ts +0 -0
- /package/dist/{types/store → store}/locks/pre-key.lock.d.ts +0 -0
- /package/dist/{types/store → store}/locks/privacy-token.lock.d.ts +0 -0
- /package/dist/{types/store → store}/locks/retry.lock.d.ts +0 -0
- /package/dist/{types/store → store}/locks/sender-key.lock.d.ts +0 -0
- /package/dist/{types/store → store}/locks/session.lock.d.ts +0 -0
- /package/dist/{types/store → store}/locks/signal.lock.d.ts +0 -0
- /package/dist/{types/store → store}/locks/thread.lock.d.ts +0 -0
- /package/dist/{types/store → store}/memory/appstate.store.d.ts +0 -0
- /package/dist/{types/store → store}/memory/auth.store.d.ts +0 -0
- /package/dist/{types/store → store}/memory/contact.store.d.ts +0 -0
- /package/dist/{types/store → store}/memory/device-list.store.d.ts +0 -0
- /package/dist/{types/store → store}/memory/group-metadata.store.d.ts +0 -0
- /package/dist/{types/store → store}/memory/identity.store.d.ts +0 -0
- /package/dist/{types/store → store}/memory/message-secret.store.d.ts +0 -0
- /package/dist/{types/store → store}/memory/message.store.d.ts +0 -0
- /package/dist/{types/store → store}/memory/pre-key.store.d.ts +0 -0
- /package/dist/{types/store → store}/memory/privacy-token.store.d.ts +0 -0
- /package/dist/{types/store → store}/memory/retry.store.d.ts +0 -0
- /package/dist/{types/store → store}/memory/sender-key.store.d.ts +0 -0
- /package/dist/{types/store → store}/memory/session.store.d.ts +0 -0
- /package/dist/{types/store → store}/memory/signal.store.d.ts +0 -0
- /package/dist/{types/store → store}/memory/thread.store.d.ts +0 -0
- /package/dist/{types/store → store}/noop.store.d.ts +0 -0
- /package/dist/{types/store → store}/types.d.ts +0 -0
- /package/dist/{types/transport → transport}/WaComms.d.ts +0 -0
- /package/dist/{types/transport → transport}/WaWebSocket.d.ts +0 -0
- /package/dist/{types/transport → transport}/binary/constants.d.ts +0 -0
- /package/dist/{types/transport → transport}/binary/decoder.d.ts +0 -0
- /package/dist/{types/transport → transport}/binary/encoder.d.ts +0 -0
- /package/dist/{types/transport → transport}/binary/index.d.ts +0 -0
- /package/dist/{types/transport → transport}/binary/tokens.d.ts +0 -0
- /package/dist/{types/transport → transport}/index.d.ts +0 -0
- /package/dist/{types/transport → transport}/keepalive/WaKeepAlive.d.ts +0 -0
- /package/dist/{types/transport → transport}/node/WaMobileTcpSocket.d.ts +0 -0
- /package/dist/{types/transport → transport}/node/WaNodeOrchestrator.d.ts +0 -0
- /package/dist/{types/transport → transport}/node/WaNodeTransport.d.ts +0 -0
- /package/dist/{types/transport → transport}/node/builders/abprops.d.ts +0 -0
- /package/dist/{types/transport → transport}/node/builders/account-sync.d.ts +0 -0
- /package/dist/{types/transport → transport}/node/builders/bot.d.ts +0 -0
- /package/dist/{types/transport → transport}/node/builders/business.d.ts +0 -0
- /package/dist/{types/transport → transport}/node/builders/chatstate.d.ts +0 -0
- /package/dist/{types/transport → transport}/node/builders/community.d.ts +0 -0
- /package/dist/{types/transport → transport}/node/builders/device.d.ts +0 -0
- /package/dist/{types/transport → transport}/node/builders/email.d.ts +0 -0
- /package/dist/{types/transport → transport}/node/builders/global.d.ts +0 -0
- /package/dist/{types/transport → transport}/node/builders/group.d.ts +0 -0
- /package/dist/{types/transport → transport}/node/builders/media.d.ts +0 -0
- /package/dist/{types/transport → transport}/node/builders/message.d.ts +0 -0
- /package/dist/{types/transport → transport}/node/builders/newsletter.d.ts +0 -0
- /package/dist/{types/transport → transport}/node/builders/offline.d.ts +0 -0
- /package/dist/{types/transport → transport}/node/builders/pairing.d.ts +0 -0
- /package/dist/{types/transport → transport}/node/builders/passive.d.ts +0 -0
- /package/dist/{types/transport → transport}/node/builders/prekeys.d.ts +0 -0
- /package/dist/{types/transport → transport}/node/builders/presence.d.ts +0 -0
- /package/dist/{types/transport → transport}/node/builders/privacy-token.d.ts +0 -0
- /package/dist/{types/transport → transport}/node/builders/privacy.d.ts +0 -0
- /package/dist/{types/transport → transport}/node/builders/profile.d.ts +0 -0
- /package/dist/{types/transport → transport}/node/builders/retry.d.ts +0 -0
- /package/dist/{types/transport → transport}/node/builders/tos.d.ts +0 -0
- /package/dist/{types/transport → transport}/node/builders/usync.d.ts +0 -0
- /package/dist/{types/transport → transport}/node/helpers.d.ts +0 -0
- /package/dist/{types/transport → transport}/node/mex/argo-decoder.d.ts +0 -0
- /package/dist/{types/transport → transport}/node/mex/client.d.ts +0 -0
- /package/dist/{types/transport → transport}/node/query.d.ts +0 -0
- /package/dist/{types/transport → transport}/node/usync.d.ts +0 -0
- /package/dist/{types/transport → transport}/node/xml.d.ts +0 -0
- /package/dist/{types/transport → transport}/noise/WaClientPayload.d.ts +0 -0
- /package/dist/{types/transport → transport}/noise/WaFrameCodec.d.ts +0 -0
- /package/dist/{types/transport → transport}/noise/WaMobileClientPayload.d.ts +0 -0
- /package/dist/{types/transport → transport}/noise/WaNoiseCert.d.ts +0 -0
- /package/dist/{types/transport → transport}/noise/WaNoiseHandshake.d.ts +0 -0
- /package/dist/{types/transport → transport}/noise/WaNoiseSession.d.ts +0 -0
- /package/dist/{types/transport → transport}/noise/WaNoiseSocket.d.ts +0 -0
- /package/dist/{types/transport → transport}/noise/constants.d.ts +0 -0
- /package/dist/{types/transport → transport}/noise/types.d.ts +0 -0
- /package/dist/{types/transport → transport}/proxy.d.ts +0 -0
- /package/dist/{types/transport → transport}/stream/parse.d.ts +0 -0
- /package/dist/{types/transport → transport}/types.d.ts +0 -0
- /package/dist/{types/transport → transport}/wa-web-version-fetcher.d.ts +0 -0
- /package/dist/{types/util → util}/async.d.ts +0 -0
- /package/dist/{types/util → util}/bytes.d.ts +0 -0
- /package/dist/{types/util → util}/clock.d.ts +0 -0
- /package/dist/{types/util → util}/coercion.d.ts +0 -0
- /package/dist/{types/util → util}/collections.d.ts +0 -0
- /package/dist/{types/util → util}/index.d.ts +0 -0
- /package/dist/{types/util → util}/primitives.d.ts +0 -0
- /package/dist/{types/util → util}/runtime.d.ts +0 -0
- /package/dist/{types/version-spec.d.ts → version-spec.d.ts} +0 -0
|
@@ -43,6 +43,7 @@ type WaQuoteSource = {
|
|
|
43
43
|
readonly id?: string;
|
|
44
44
|
readonly remoteJid?: string;
|
|
45
45
|
readonly participant?: string;
|
|
46
|
+
readonly fromMe?: boolean;
|
|
46
47
|
readonly message?: Proto.IMessage;
|
|
47
48
|
};
|
|
48
49
|
type WaForwardSource = boolean | {
|
|
@@ -54,6 +55,14 @@ export interface WaSendContextResolveInput {
|
|
|
54
55
|
readonly quote?: WaQuoteSource;
|
|
55
56
|
readonly forward?: WaForwardSource;
|
|
56
57
|
readonly mentions?: readonly string[];
|
|
58
|
+
/**
|
|
59
|
+
* Chat the message is being sent to. When provided, the quote's
|
|
60
|
+
* `remoteJid` is emitted only for a cross-chat quote (the quoted message
|
|
61
|
+
* lives in a different chat), mirroring wa-web's `msgContextInfo`, which
|
|
62
|
+
* sets `remoteJid` only when `quotedMsg.remote !== targetChat`. Omit it to
|
|
63
|
+
* keep emitting `remoteJid` unconditionally.
|
|
64
|
+
*/
|
|
65
|
+
readonly targetJid?: string;
|
|
57
66
|
/**
|
|
58
67
|
* LID-form self user JID. Used as the DM-quote `participant` fallback when
|
|
59
68
|
* the quoted message is `fromMe` and no explicit participant was provided.
|
|
@@ -101,13 +101,23 @@ function resolveSendContextInfo(input) {
|
|
|
101
101
|
ctx.quotedMessageId = q.id ?? q.key?.id ?? ctx.quotedMessageId;
|
|
102
102
|
const explicit = q.participant ?? q.key?.participant;
|
|
103
103
|
const quotedRemote = q.remoteJid ?? q.key?.remoteJid;
|
|
104
|
+
const quotedFromMe = q.fromMe ?? q.key?.fromMe;
|
|
104
105
|
const dmFallback = explicit === undefined && quotedRemote && !(0, jid_1.isGroupOrBroadcastJid)(quotedRemote)
|
|
105
|
-
?
|
|
106
|
+
? quotedFromMe
|
|
106
107
|
? input.meLid
|
|
107
108
|
: quotedRemote
|
|
108
109
|
: undefined;
|
|
109
110
|
ctx.quotedParticipant = explicit ?? dmFallback ?? ctx.quotedParticipant;
|
|
110
|
-
|
|
111
|
+
const crossChat = quotedRemote !== undefined &&
|
|
112
|
+
(input.targetJid === undefined || !isSameChatJid(quotedRemote, input.targetJid));
|
|
113
|
+
if (quotedRemote !== undefined) {
|
|
114
|
+
if (crossChat) {
|
|
115
|
+
ctx.quotedRemoteJid = quotedRemote;
|
|
116
|
+
}
|
|
117
|
+
else {
|
|
118
|
+
delete ctx.quotedRemoteJid;
|
|
119
|
+
}
|
|
120
|
+
}
|
|
111
121
|
ctx.quotedMessage = q.message ?? ctx.quotedMessage;
|
|
112
122
|
}
|
|
113
123
|
if (input.forward) {
|
|
@@ -127,3 +137,6 @@ function hasAnyKey(value) {
|
|
|
127
137
|
}
|
|
128
138
|
return false;
|
|
129
139
|
}
|
|
140
|
+
function isSameChatJid(a, b) {
|
|
141
|
+
return (0, jid_1.toUserJid)(a) === (0, jid_1.toUserJid)(b);
|
|
142
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type { MediaCryptoType } from '../../media/types';
|
|
2
|
+
import type { Proto } from '../../proto';
|
|
3
|
+
/**
|
|
4
|
+
* Decrypted media metadata pulled out of a message, carrying everything a CDN
|
|
5
|
+
* download needs (see `downloadMediaMessage`). Binary fields are raw
|
|
6
|
+
* `Uint8Array`s exactly as the protobuf message carried them - never base64
|
|
7
|
+
* strings.
|
|
8
|
+
*/
|
|
9
|
+
export interface WaResolvedMediaPayload {
|
|
10
|
+
/** Crypto/HKDF domain for the kind: image, video, gif, audio, ptt, document, sticker, ptv. */
|
|
11
|
+
readonly mediaType: MediaCryptoType;
|
|
12
|
+
/** Server-relative path (or absolute URL) of the encrypted blob on the media CDN. */
|
|
13
|
+
readonly directPath: string;
|
|
14
|
+
/** Media key used to derive the AES/MAC keys. Sensitive key material - do not log. */
|
|
15
|
+
readonly mediaKey: Uint8Array;
|
|
16
|
+
/** SHA-256 of the decrypted file, when the message carried it. */
|
|
17
|
+
readonly fileSha256?: Uint8Array;
|
|
18
|
+
/** SHA-256 of the encrypted file, when the message carried it. */
|
|
19
|
+
readonly fileEncSha256?: Uint8Array;
|
|
20
|
+
/** Declared MIME type, when present. */
|
|
21
|
+
readonly mimetype?: string;
|
|
22
|
+
/** Declared plaintext length in bytes, when present. */
|
|
23
|
+
readonly fileLength?: number;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Extracts the downloadable media metadata from a message, unwrapping
|
|
27
|
+
* ephemeral / view-once / document-with-caption envelopes first.
|
|
28
|
+
*
|
|
29
|
+
* Returns `null` when `message` is absent, carries no media, or the media node
|
|
30
|
+
* lacks the `directPath` / `mediaKey` needed to fetch and decrypt the blob (a
|
|
31
|
+
* non-`Uint8Array` `mediaKey` also yields `null`). Supported kinds: image,
|
|
32
|
+
* video (gif when `gifPlayback`), audio (ptt when `ptt`), document, sticker,
|
|
33
|
+
* ptv.
|
|
34
|
+
*
|
|
35
|
+
* @example
|
|
36
|
+
* ```ts
|
|
37
|
+
* const payload = resolveMediaPayload(event.message)
|
|
38
|
+
* if (payload) {
|
|
39
|
+
* // payload.directPath, payload.mediaKey, payload.fileEncSha256, ...
|
|
40
|
+
* }
|
|
41
|
+
* ```
|
|
42
|
+
*/
|
|
43
|
+
export declare function resolveMediaPayload(message: Proto.IMessage | null | undefined): WaResolvedMediaPayload | null;
|
|
@@ -23,6 +23,24 @@ function buildPayload(mediaType, fields) {
|
|
|
23
23
|
fileLength: fields.fileLength ? (0, primitives_1.longToNumber)(fields.fileLength) : undefined
|
|
24
24
|
};
|
|
25
25
|
}
|
|
26
|
+
/**
|
|
27
|
+
* Extracts the downloadable media metadata from a message, unwrapping
|
|
28
|
+
* ephemeral / view-once / document-with-caption envelopes first.
|
|
29
|
+
*
|
|
30
|
+
* Returns `null` when `message` is absent, carries no media, or the media node
|
|
31
|
+
* lacks the `directPath` / `mediaKey` needed to fetch and decrypt the blob (a
|
|
32
|
+
* non-`Uint8Array` `mediaKey` also yields `null`). Supported kinds: image,
|
|
33
|
+
* video (gif when `gifPlayback`), audio (ptt when `ptt`), document, sticker,
|
|
34
|
+
* ptv.
|
|
35
|
+
*
|
|
36
|
+
* @example
|
|
37
|
+
* ```ts
|
|
38
|
+
* const payload = resolveMediaPayload(event.message)
|
|
39
|
+
* if (payload) {
|
|
40
|
+
* // payload.directPath, payload.mediaKey, payload.fileEncSha256, ...
|
|
41
|
+
* }
|
|
42
|
+
* ```
|
|
43
|
+
*/
|
|
26
44
|
function resolveMediaPayload(message) {
|
|
27
45
|
if (!message)
|
|
28
46
|
return null;
|
|
@@ -24,6 +24,7 @@ export declare const WA_MESSAGE_TYPES: Readonly<{
|
|
|
24
24
|
readonly RECEIPT_TYPE_SERVER_ERROR: "server-error";
|
|
25
25
|
readonly RECEIPT_TYPE_RETRY: "retry";
|
|
26
26
|
readonly RECEIPT_TYPE_ENC_REKEY_RETRY: "enc_rekey_retry";
|
|
27
|
+
readonly RECEIPT_TYPE_VIEW: "view";
|
|
27
28
|
}>;
|
|
28
29
|
export type WaOutboundReceiptType = typeof WA_MESSAGE_TYPES.RECEIPT_TYPE_READ | typeof WA_MESSAGE_TYPES.RECEIPT_TYPE_READ_SELF | typeof WA_MESSAGE_TYPES.RECEIPT_TYPE_PLAYED | typeof WA_MESSAGE_TYPES.RECEIPT_TYPE_PLAYED_SELF | typeof WA_MESSAGE_TYPES.RECEIPT_TYPE_INACTIVE | typeof WA_MESSAGE_TYPES.RECEIPT_TYPE_HISTORY_SYNC;
|
|
29
30
|
export declare const WA_RETRYABLE_ACK_CODES: readonly ["408", "429", "500", "503"];
|
package/dist/protocol/message.js
CHANGED
|
@@ -26,7 +26,8 @@ exports.WA_MESSAGE_TYPES = Object.freeze({
|
|
|
26
26
|
RECEIPT_TYPE_PEER: 'peer_msg',
|
|
27
27
|
RECEIPT_TYPE_SERVER_ERROR: 'server-error',
|
|
28
28
|
RECEIPT_TYPE_RETRY: 'retry',
|
|
29
|
-
RECEIPT_TYPE_ENC_REKEY_RETRY: 'enc_rekey_retry'
|
|
29
|
+
RECEIPT_TYPE_ENC_REKEY_RETRY: 'enc_rekey_retry',
|
|
30
|
+
RECEIPT_TYPE_VIEW: 'view'
|
|
30
31
|
});
|
|
31
32
|
exports.WA_RETRYABLE_ACK_CODES = Object.freeze(['408', '429', '500', '503']);
|
|
32
33
|
exports.WA_STANZA_MSG_TYPES = Object.freeze({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "zapo-js",
|
|
3
|
-
"version": "1.0
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"description": "High-performance WhatsApp Web TypeScript library",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "vinikjkkj <contact@vinicius.email> (https://github.com/vinikjkkj)",
|
|
@@ -8,91 +8,95 @@
|
|
|
8
8
|
"type": "github",
|
|
9
9
|
"url": "https://github.com/sponsors/vinikjkkj"
|
|
10
10
|
},
|
|
11
|
+
"repository": {
|
|
12
|
+
"type": "git",
|
|
13
|
+
"url": "git+https://github.com/vinikjkkj/zapo.git"
|
|
14
|
+
},
|
|
11
15
|
"packageManager": "npm@10.0.0",
|
|
12
16
|
"main": "dist/index.js",
|
|
13
17
|
"module": "dist/esm/index.js",
|
|
14
|
-
"types": "dist/
|
|
18
|
+
"types": "dist/index.d.ts",
|
|
15
19
|
"exports": {
|
|
16
20
|
".": {
|
|
17
|
-
"types": "./dist/
|
|
21
|
+
"types": "./dist/index.d.ts",
|
|
18
22
|
"require": "./dist/index.js",
|
|
19
23
|
"import": "./dist/esm/index.js",
|
|
20
24
|
"default": "./dist/index.js"
|
|
21
25
|
},
|
|
22
26
|
"./client": {
|
|
23
|
-
"types": "./dist/
|
|
27
|
+
"types": "./dist/client/index.d.ts",
|
|
24
28
|
"require": "./dist/client/index.js",
|
|
25
29
|
"import": "./dist/esm/client/index.js",
|
|
26
30
|
"default": "./dist/client/index.js"
|
|
27
31
|
},
|
|
28
32
|
"./appstate": {
|
|
29
|
-
"types": "./dist/
|
|
33
|
+
"types": "./dist/appstate/index.d.ts",
|
|
30
34
|
"require": "./dist/appstate/index.js",
|
|
31
35
|
"import": "./dist/esm/appstate/index.js",
|
|
32
36
|
"default": "./dist/appstate/index.js"
|
|
33
37
|
},
|
|
34
38
|
"./auth": {
|
|
35
|
-
"types": "./dist/
|
|
39
|
+
"types": "./dist/auth/index.d.ts",
|
|
36
40
|
"require": "./dist/auth/index.js",
|
|
37
41
|
"import": "./dist/esm/auth/index.js",
|
|
38
42
|
"default": "./dist/auth/index.js"
|
|
39
43
|
},
|
|
40
44
|
"./crypto": {
|
|
41
|
-
"types": "./dist/
|
|
45
|
+
"types": "./dist/crypto/index.d.ts",
|
|
42
46
|
"require": "./dist/crypto/index.js",
|
|
43
47
|
"import": "./dist/esm/crypto/index.js",
|
|
44
48
|
"default": "./dist/crypto/index.js"
|
|
45
49
|
},
|
|
46
50
|
"./media": {
|
|
47
|
-
"types": "./dist/
|
|
51
|
+
"types": "./dist/media/index.d.ts",
|
|
48
52
|
"require": "./dist/media/index.js",
|
|
49
53
|
"import": "./dist/esm/media/index.js",
|
|
50
54
|
"default": "./dist/media/index.js"
|
|
51
55
|
},
|
|
52
56
|
"./message": {
|
|
53
|
-
"types": "./dist/
|
|
57
|
+
"types": "./dist/message/index.d.ts",
|
|
54
58
|
"require": "./dist/message/index.js",
|
|
55
59
|
"import": "./dist/esm/message/index.js",
|
|
56
60
|
"default": "./dist/message/index.js"
|
|
57
61
|
},
|
|
58
62
|
"./signal": {
|
|
59
|
-
"types": "./dist/
|
|
63
|
+
"types": "./dist/signal/index.d.ts",
|
|
60
64
|
"require": "./dist/signal/index.js",
|
|
61
65
|
"import": "./dist/esm/signal/index.js",
|
|
62
66
|
"default": "./dist/signal/index.js"
|
|
63
67
|
},
|
|
64
68
|
"./store": {
|
|
65
|
-
"types": "./dist/
|
|
69
|
+
"types": "./dist/store/index.d.ts",
|
|
66
70
|
"require": "./dist/store/index.js",
|
|
67
71
|
"import": "./dist/esm/store/index.js",
|
|
68
72
|
"default": "./dist/store/index.js"
|
|
69
73
|
},
|
|
70
74
|
"./transport": {
|
|
71
|
-
"types": "./dist/
|
|
75
|
+
"types": "./dist/transport/index.d.ts",
|
|
72
76
|
"require": "./dist/transport/index.js",
|
|
73
77
|
"import": "./dist/esm/transport/index.js",
|
|
74
78
|
"default": "./dist/transport/index.js"
|
|
75
79
|
},
|
|
76
80
|
"./protocol": {
|
|
77
|
-
"types": "./dist/
|
|
81
|
+
"types": "./dist/protocol/index.d.ts",
|
|
78
82
|
"require": "./dist/protocol/index.js",
|
|
79
83
|
"import": "./dist/esm/protocol/index.js",
|
|
80
84
|
"default": "./dist/protocol/index.js"
|
|
81
85
|
},
|
|
82
86
|
"./retry": {
|
|
83
|
-
"types": "./dist/
|
|
87
|
+
"types": "./dist/retry/index.d.ts",
|
|
84
88
|
"require": "./dist/retry/index.js",
|
|
85
89
|
"import": "./dist/esm/retry/index.js",
|
|
86
90
|
"default": "./dist/retry/index.js"
|
|
87
91
|
},
|
|
88
92
|
"./util": {
|
|
89
|
-
"types": "./dist/
|
|
93
|
+
"types": "./dist/util/index.d.ts",
|
|
90
94
|
"require": "./dist/util/index.js",
|
|
91
95
|
"import": "./dist/esm/util/index.js",
|
|
92
96
|
"default": "./dist/util/index.js"
|
|
93
97
|
},
|
|
94
98
|
"./proto": {
|
|
95
|
-
"types": "./dist/
|
|
99
|
+
"types": "./dist/proto.d.ts",
|
|
96
100
|
"require": "./dist/proto.js",
|
|
97
101
|
"import": "./dist/esm/proto.js",
|
|
98
102
|
"default": "./dist/proto.js"
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
interface ReceiptTarget {
|
|
2
|
-
readonly chatJid: string;
|
|
3
|
-
readonly id: string;
|
|
4
|
-
readonly senderJid?: string;
|
|
5
|
-
readonly isGroupChat?: boolean;
|
|
6
|
-
readonly isBroadcastChat?: boolean;
|
|
7
|
-
}
|
|
8
|
-
interface AggregatedReceiptGroup {
|
|
9
|
-
readonly jid: string;
|
|
10
|
-
readonly ids: readonly string[];
|
|
11
|
-
readonly participant?: string;
|
|
12
|
-
}
|
|
13
|
-
export declare function aggregateReceiptTargets(targets: readonly ReceiptTarget[]): readonly AggregatedReceiptGroup[];
|
|
14
|
-
export {};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type { MediaCryptoType } from '../../media/types';
|
|
2
|
-
import type { Proto } from '../../proto';
|
|
3
|
-
export interface WaResolvedMediaPayload {
|
|
4
|
-
readonly mediaType: MediaCryptoType;
|
|
5
|
-
readonly directPath: string;
|
|
6
|
-
readonly mediaKey: Uint8Array;
|
|
7
|
-
readonly fileSha256?: Uint8Array;
|
|
8
|
-
readonly fileEncSha256?: Uint8Array;
|
|
9
|
-
readonly mimetype?: string;
|
|
10
|
-
readonly fileLength?: number;
|
|
11
|
-
}
|
|
12
|
-
export declare function resolveMediaPayload(message: Proto.IMessage | null | undefined): WaResolvedMediaPayload | null;
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|