@mtcute/core 0.7.3 → 0.9.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/LICENSE +1 -1
- package/README.md +26 -3
- package/cjs/highlevel/base.d.ts +3 -1
- package/cjs/highlevel/base.js +18 -0
- package/cjs/highlevel/base.js.map +1 -1
- package/cjs/highlevel/client.d.ts +23 -10
- package/cjs/highlevel/client.js +26 -19
- package/cjs/highlevel/client.js.map +1 -1
- package/cjs/highlevel/client.types.d.ts +14 -0
- package/cjs/highlevel/client.types.js.map +1 -1
- package/cjs/highlevel/index.d.ts +0 -2
- package/cjs/highlevel/index.js +0 -2
- package/cjs/highlevel/index.js.map +1 -1
- package/cjs/highlevel/methods/_imports.js.map +1 -1
- package/cjs/highlevel/methods/_init.js +4 -29
- package/cjs/highlevel/methods/_init.js.map +1 -1
- package/cjs/highlevel/methods/bots/get-callback-answer.js +2 -2
- package/cjs/highlevel/methods/bots/get-callback-answer.js.map +1 -1
- package/cjs/highlevel/methods/dialogs/create-folder.js +1 -1
- package/cjs/highlevel/methods/dialogs/create-folder.js.map +1 -1
- package/cjs/highlevel/methods/dialogs/edit-folder.js +1 -1
- package/cjs/highlevel/methods/dialogs/edit-folder.js.map +1 -1
- package/cjs/highlevel/methods/dialogs/find-folder.js +1 -1
- package/cjs/highlevel/methods/dialogs/find-folder.js.map +1 -1
- package/cjs/highlevel/methods/dialogs/get-folders.d.ts +1 -1
- package/cjs/highlevel/methods/dialogs/get-folders.js +1 -1
- package/cjs/highlevel/methods/dialogs/get-folders.js.map +1 -1
- package/cjs/highlevel/methods/files/download-file.d.ts +1 -10
- package/cjs/highlevel/methods/files/download-file.js +1 -32
- package/cjs/highlevel/methods/files/download-file.js.map +1 -1
- package/cjs/highlevel/methods/files/download-iterable.js +2 -1
- package/cjs/highlevel/methods/files/download-iterable.js.map +1 -1
- package/cjs/highlevel/methods/files/download-node-stream.js +4 -0
- package/cjs/highlevel/methods/files/download-node-stream.js.map +1 -0
- package/cjs/highlevel/methods/files/normalize-input-media.d.ts +1 -1
- package/cjs/highlevel/methods/files/normalize-input-media.js +2 -1
- package/cjs/highlevel/methods/files/normalize-input-media.js.map +1 -1
- package/cjs/highlevel/methods/files/upload-file.d.ts +0 -3
- package/cjs/highlevel/methods/files/upload-file.js +24 -11
- package/cjs/highlevel/methods/files/upload-file.js.map +1 -1
- package/cjs/highlevel/methods/messages/find-in-update.js +23 -8
- package/cjs/highlevel/methods/messages/find-in-update.js.map +1 -1
- package/cjs/highlevel/methods/messages/send-media-group.d.ts +1 -1
- package/cjs/highlevel/methods/messages/send-media-group.js.map +1 -1
- package/cjs/highlevel/methods/messages/send-media.d.ts +2 -2
- package/cjs/highlevel/methods/messages/send-media.js +5 -4
- package/cjs/highlevel/methods/messages/send-media.js.map +1 -1
- package/cjs/highlevel/methods/messages/send-text.d.ts +1 -1
- package/cjs/highlevel/methods/messages/send-text.js +7 -6
- package/cjs/highlevel/methods/messages/send-text.js.map +1 -1
- package/cjs/highlevel/methods/misc/with-params.d.ts +10 -0
- package/cjs/highlevel/methods/misc/with-params.js +32 -0
- package/cjs/highlevel/methods/misc/with-params.js.map +1 -0
- package/cjs/highlevel/methods.d.ts +13 -1
- package/cjs/highlevel/methods.js +4 -6
- package/cjs/highlevel/methods.js.map +1 -1
- package/cjs/highlevel/types/bots/command-scope/index.d.ts +10 -0
- package/cjs/highlevel/types/bots/command-scope/index.js +29 -0
- package/cjs/highlevel/types/bots/command-scope/index.js.map +1 -0
- package/cjs/highlevel/types/bots/command-scope/inner.d.ts +54 -0
- package/cjs/highlevel/types/bots/command-scope/inner.js +76 -0
- package/cjs/highlevel/types/bots/command-scope/inner.js.map +1 -0
- package/cjs/highlevel/types/bots/index.d.ts +4 -4
- package/cjs/highlevel/types/bots/index.js +4 -4
- package/cjs/highlevel/types/bots/index.js.map +1 -1
- package/cjs/highlevel/types/bots/inline-message/factories.d.ts +43 -0
- package/cjs/highlevel/types/bots/inline-message/factories.js +175 -0
- package/cjs/highlevel/types/bots/inline-message/factories.js.map +1 -0
- package/cjs/highlevel/types/bots/inline-message/index.d.ts +3 -0
- package/cjs/highlevel/types/bots/inline-message/index.js +33 -0
- package/cjs/highlevel/types/bots/inline-message/index.js.map +1 -0
- package/{esm/highlevel/types/bots/input/input-inline-message.d.ts → cjs/highlevel/types/bots/inline-message/types.d.ts} +2 -45
- package/cjs/highlevel/types/bots/inline-message/types.js +3 -0
- package/cjs/highlevel/types/bots/inline-message/types.js.map +1 -0
- package/cjs/highlevel/types/bots/inline-result/factories.d.ts +94 -0
- package/cjs/highlevel/types/bots/inline-result/factories.js +486 -0
- package/cjs/highlevel/types/bots/inline-result/factories.js.map +1 -0
- package/cjs/highlevel/types/bots/inline-result/index.d.ts +3 -0
- package/cjs/highlevel/types/bots/inline-result/index.js +33 -0
- package/cjs/highlevel/types/bots/inline-result/index.js.map +1 -0
- package/{esm/highlevel/types/bots/input/input-inline-result.d.ts → cjs/highlevel/types/bots/inline-result/types.d.ts} +1 -95
- package/cjs/highlevel/types/bots/inline-result/types.js +3 -0
- package/cjs/highlevel/types/bots/inline-result/types.js.map +1 -0
- package/cjs/highlevel/types/bots/{keyboard-builder.d.ts → keyboards/builder.d.ts} +1 -1
- package/cjs/highlevel/types/bots/{keyboard-builder.js → keyboards/builder.js} +1 -1
- package/cjs/highlevel/types/bots/keyboards/builder.js.map +1 -0
- package/cjs/highlevel/types/bots/keyboards/factories.d.ts +195 -0
- package/cjs/highlevel/types/bots/keyboards/factories.js +366 -0
- package/cjs/highlevel/types/bots/keyboards/factories.js.map +1 -0
- package/cjs/highlevel/types/bots/keyboards/index.d.ts +14 -0
- package/cjs/highlevel/types/bots/keyboards/index.js +33 -0
- package/cjs/highlevel/types/bots/keyboards/index.js.map +1 -0
- package/cjs/highlevel/types/bots/keyboards/types.d.ts +34 -0
- package/cjs/highlevel/types/bots/keyboards/types.js +3 -0
- package/cjs/highlevel/types/bots/keyboards/types.js.map +1 -0
- package/cjs/highlevel/types/files/utils.d.ts +9 -6
- package/cjs/highlevel/types/files/utils.js.map +1 -1
- package/cjs/highlevel/types/media/document.js +3 -2
- package/cjs/highlevel/types/media/document.js.map +1 -1
- package/cjs/highlevel/types/media/index.d.ts +1 -1
- package/cjs/highlevel/types/media/index.js +1 -1
- package/cjs/highlevel/types/media/index.js.map +1 -1
- package/cjs/highlevel/types/media/input-media/factories.d.ts +141 -0
- package/cjs/highlevel/types/media/input-media/factories.js +250 -0
- package/cjs/highlevel/types/media/input-media/factories.js.map +1 -0
- package/cjs/highlevel/types/media/input-media/index.d.ts +3 -0
- package/cjs/highlevel/types/media/input-media/index.js +33 -0
- package/cjs/highlevel/types/media/input-media/index.js.map +1 -0
- package/cjs/highlevel/types/media/{input-media.d.ts → input-media/types.d.ts} +5 -145
- package/cjs/highlevel/types/media/input-media/types.js +3 -0
- package/cjs/highlevel/types/media/input-media/types.js.map +1 -0
- package/cjs/highlevel/types/media/thumbnail.js +5 -4
- package/cjs/highlevel/types/media/thumbnail.js.map +1 -1
- package/cjs/highlevel/types/messages/message.d.ts +1 -1
- package/cjs/highlevel/types/messages/message.js +3 -3
- package/cjs/highlevel/types/messages/message.js.map +1 -1
- package/cjs/highlevel/types/misc/index.d.ts +1 -1
- package/cjs/highlevel/types/misc/index.js +1 -1
- package/cjs/highlevel/types/misc/index.js.map +1 -1
- package/cjs/highlevel/types/misc/input-privacy-rule/allow.d.ts +22 -0
- package/cjs/highlevel/types/misc/input-privacy-rule/allow.js +36 -0
- package/cjs/highlevel/types/misc/input-privacy-rule/allow.js.map +1 -0
- package/cjs/highlevel/types/misc/input-privacy-rule/bundle.d.ts +3 -0
- package/cjs/highlevel/types/misc/input-privacy-rule/bundle.js +31 -0
- package/cjs/highlevel/types/misc/input-privacy-rule/bundle.js.map +1 -0
- package/cjs/highlevel/types/misc/input-privacy-rule/disallow.d.ts +20 -0
- package/cjs/highlevel/types/misc/input-privacy-rule/disallow.js +32 -0
- package/cjs/highlevel/types/misc/input-privacy-rule/disallow.js.map +1 -0
- package/cjs/highlevel/types/misc/input-privacy-rule/index.d.ts +3 -0
- package/cjs/highlevel/types/misc/input-privacy-rule/index.js +33 -0
- package/cjs/highlevel/types/misc/input-privacy-rule/index.js.map +1 -0
- package/cjs/highlevel/types/misc/input-privacy-rule/types.d.ts +11 -0
- package/cjs/highlevel/types/misc/input-privacy-rule/types.js +3 -0
- package/cjs/highlevel/types/misc/input-privacy-rule/types.js.map +1 -0
- package/cjs/highlevel/types/peers/chat-photo.js +3 -2
- package/cjs/highlevel/types/peers/chat-photo.js.map +1 -1
- package/cjs/highlevel/types/updates/callback-query.js +2 -2
- package/cjs/highlevel/types/updates/callback-query.js.map +1 -1
- package/cjs/highlevel/types/updates/user-status-update.js +1 -1
- package/cjs/highlevel/types/updates/user-status-update.js.map +1 -1
- package/cjs/highlevel/updates/manager.d.ts +5 -3
- package/cjs/highlevel/updates/manager.js +81 -67
- package/cjs/highlevel/updates/manager.js.map +1 -1
- package/cjs/highlevel/utils/convert-file-id.js +7 -6
- package/cjs/highlevel/utils/convert-file-id.js.map +1 -1
- package/cjs/highlevel/utils/file-utils.js +8 -4
- package/cjs/highlevel/utils/file-utils.js.map +1 -1
- package/cjs/highlevel/utils/inline-utils.js +3 -2
- package/cjs/highlevel/utils/inline-utils.js.map +1 -1
- package/cjs/highlevel/utils/inspectable.d.ts +1 -1
- package/cjs/highlevel/utils/inspectable.js +3 -2
- package/cjs/highlevel/utils/inspectable.js.map +1 -1
- package/cjs/highlevel/utils/memoize.d.ts +1 -1
- package/cjs/highlevel/utils/memoize.js +1 -0
- package/cjs/highlevel/utils/memoize.js.map +1 -1
- package/cjs/highlevel/utils/stream-utils.d.ts +0 -2
- package/cjs/highlevel/utils/stream-utils.js +1 -28
- package/cjs/highlevel/utils/stream-utils.js.map +1 -1
- package/cjs/highlevel/utils/string-session.js +3 -2
- package/cjs/highlevel/utils/string-session.js.map +1 -1
- package/cjs/highlevel/worker/index.d.ts +3 -0
- package/cjs/highlevel/{types/bots/input → worker}/index.js +3 -2
- package/cjs/highlevel/worker/index.js.map +1 -0
- package/cjs/highlevel/worker/port.d.ts +6 -3
- package/cjs/highlevel/worker/port.js +8 -2
- package/cjs/highlevel/worker/port.js.map +1 -1
- package/cjs/highlevel/worker/protocol.d.ts +5 -1
- package/cjs/highlevel/worker/protocol.js.map +1 -1
- package/cjs/highlevel/worker/worker.d.ts +11 -4
- package/cjs/highlevel/worker/worker.js +53 -49
- package/cjs/highlevel/worker/worker.js.map +1 -1
- package/cjs/network/client.d.ts +4 -4
- package/cjs/network/client.js +3 -1
- package/cjs/network/client.js.map +1 -1
- package/cjs/network/multi-session-connection.d.ts +1 -0
- package/cjs/network/multi-session-connection.js +6 -0
- package/cjs/network/multi-session-connection.js.map +1 -1
- package/cjs/network/network-manager.d.ts +5 -1
- package/cjs/network/network-manager.js +24 -15
- package/cjs/network/network-manager.js.map +1 -1
- package/cjs/network/persistent-connection.d.ts +3 -0
- package/cjs/network/persistent-connection.js +23 -1
- package/cjs/network/persistent-connection.js.map +1 -1
- package/cjs/network/session-connection.d.ts +2 -0
- package/cjs/network/session-connection.js +18 -4
- package/cjs/network/session-connection.js.map +1 -1
- package/cjs/network/transports/index.d.ts +0 -3
- package/cjs/network/transports/index.js +0 -4
- package/cjs/network/transports/index.js.map +1 -1
- package/cjs/platform.d.ts +18 -0
- package/cjs/platform.js +36 -0
- package/cjs/platform.js.map +1 -0
- package/cjs/storage/index.d.ts +2 -2
- package/cjs/storage/index.js +2 -2
- package/cjs/storage/index.js.map +1 -1
- package/{esm/storage/providers → cjs/storage}/memory/driver.d.ts +1 -1
- package/cjs/storage/memory/driver.js.map +1 -0
- package/{esm/storage/providers → cjs/storage}/memory/index.d.ts +2 -2
- package/cjs/storage/memory/index.js.map +1 -0
- package/cjs/storage/{providers/memory → memory}/repository/auth-keys.d.ts +1 -1
- package/cjs/storage/memory/repository/auth-keys.js.map +1 -0
- package/{esm/storage/providers → cjs/storage}/memory/repository/kv.d.ts +1 -1
- package/cjs/storage/memory/repository/kv.js.map +1 -0
- package/{esm/storage/providers → cjs/storage}/memory/repository/peers.d.ts +1 -1
- package/cjs/storage/memory/repository/peers.js.map +1 -0
- package/{esm/storage/providers → cjs/storage}/memory/repository/ref-messages.d.ts +1 -1
- package/cjs/storage/memory/repository/ref-messages.js.map +1 -0
- package/cjs/storage/sqlite/driver.d.ts +24 -0
- package/cjs/storage/sqlite/driver.js +129 -0
- package/cjs/storage/sqlite/driver.js.map +1 -0
- package/cjs/storage/sqlite/index.d.ts +17 -0
- package/cjs/storage/sqlite/index.js +35 -0
- package/cjs/storage/sqlite/index.js.map +1 -0
- package/cjs/storage/sqlite/repository/auth-keys.d.ts +20 -0
- package/cjs/storage/sqlite/repository/auth-keys.js +68 -0
- package/cjs/storage/sqlite/repository/auth-keys.js.map +1 -0
- package/cjs/storage/sqlite/repository/kv.d.ts +14 -0
- package/cjs/storage/sqlite/repository/kv.js +96 -0
- package/cjs/storage/sqlite/repository/kv.js.map +1 -0
- package/cjs/storage/sqlite/repository/peers.d.ts +16 -0
- package/cjs/storage/sqlite/repository/peers.js +77 -0
- package/cjs/storage/sqlite/repository/peers.js.map +1 -0
- package/cjs/storage/sqlite/repository/ref-messages.d.ts +16 -0
- package/cjs/storage/sqlite/repository/ref-messages.js +49 -0
- package/cjs/storage/sqlite/repository/ref-messages.js.map +1 -0
- package/cjs/storage/sqlite/types.d.ts +18 -0
- package/cjs/storage/sqlite/types.js +3 -0
- package/cjs/storage/sqlite/types.js.map +1 -0
- package/cjs/storage/storage.js +2 -1
- package/cjs/storage/storage.js.map +1 -1
- package/cjs/utils/binary/asn1-parser.js +3 -3
- package/cjs/utils/binary/asn1-parser.js.map +1 -1
- package/cjs/utils/crypto/abstract.d.ts +0 -1
- package/cjs/utils/crypto/abstract.js.map +1 -1
- package/cjs/utils/crypto/index.d.ts +0 -2
- package/cjs/utils/crypto/index.js +0 -3
- package/cjs/utils/crypto/index.js.map +1 -1
- package/cjs/utils/crypto/keys.js +5 -3
- package/cjs/utils/crypto/keys.js.map +1 -1
- package/cjs/utils/crypto/password.js +3 -3
- package/cjs/utils/crypto/password.js.map +1 -1
- package/cjs/utils/dcs.d.ts +4 -0
- package/cjs/utils/dcs.js +0 -4
- package/cjs/utils/dcs.js.map +1 -1
- package/cjs/utils/{platform/error-reporting.d.ts → error-reporting.d.ts} +1 -1
- package/cjs/utils/error-reporting.js.map +1 -0
- package/cjs/utils/index.d.ts +4 -1
- package/cjs/utils/index.js +6 -1
- package/cjs/utils/index.js.map +1 -1
- package/cjs/utils/links/common.js +1 -1
- package/cjs/utils/links/common.js.map +1 -1
- package/cjs/utils/logger.d.ts +1 -0
- package/cjs/utils/logger.js +9 -22
- package/cjs/utils/logger.js.map +1 -1
- package/esm/highlevel/base.d.ts +3 -1
- package/esm/highlevel/base.js +18 -0
- package/esm/highlevel/base.js.map +1 -1
- package/esm/highlevel/client.d.ts +23 -10
- package/esm/highlevel/client.js +12 -19
- package/esm/highlevel/client.js.map +1 -1
- package/esm/highlevel/client.types.d.ts +14 -0
- package/esm/highlevel/client.types.js.map +1 -1
- package/esm/highlevel/index.d.ts +0 -2
- package/esm/highlevel/index.js +0 -2
- package/esm/highlevel/index.js.map +1 -1
- package/esm/highlevel/methods/_imports.js.map +1 -1
- package/esm/highlevel/methods/_init.js +4 -29
- package/esm/highlevel/methods/_init.js.map +1 -1
- package/esm/highlevel/methods/bots/get-callback-answer.js +2 -2
- package/esm/highlevel/methods/bots/get-callback-answer.js.map +1 -1
- package/esm/highlevel/methods/dialogs/create-folder.js +1 -1
- package/esm/highlevel/methods/dialogs/create-folder.js.map +1 -1
- package/esm/highlevel/methods/dialogs/edit-folder.js +1 -1
- package/esm/highlevel/methods/dialogs/edit-folder.js.map +1 -1
- package/esm/highlevel/methods/dialogs/find-folder.js +1 -1
- package/esm/highlevel/methods/dialogs/find-folder.js.map +1 -1
- package/esm/highlevel/methods/dialogs/get-folders.d.ts +1 -1
- package/esm/highlevel/methods/dialogs/get-folders.js +1 -1
- package/esm/highlevel/methods/dialogs/get-folders.js.map +1 -1
- package/esm/highlevel/methods/files/download-file.d.ts +1 -10
- package/esm/highlevel/methods/files/download-file.js +2 -30
- package/esm/highlevel/methods/files/download-file.js.map +1 -1
- package/esm/highlevel/methods/files/download-iterable.js +2 -1
- package/esm/highlevel/methods/files/download-iterable.js.map +1 -1
- package/esm/highlevel/methods/files/download-node-stream.js +3 -0
- package/esm/highlevel/methods/files/download-node-stream.js.map +1 -0
- package/esm/highlevel/methods/files/normalize-input-media.d.ts +1 -1
- package/esm/highlevel/methods/files/normalize-input-media.js +2 -1
- package/esm/highlevel/methods/files/normalize-input-media.js.map +1 -1
- package/esm/highlevel/methods/files/upload-file.d.ts +0 -3
- package/esm/highlevel/methods/files/upload-file.js +24 -11
- package/esm/highlevel/methods/files/upload-file.js.map +1 -1
- package/esm/highlevel/methods/messages/find-in-update.js +23 -8
- package/esm/highlevel/methods/messages/find-in-update.js.map +1 -1
- package/esm/highlevel/methods/messages/send-media-group.d.ts +1 -1
- package/esm/highlevel/methods/messages/send-media-group.js.map +1 -1
- package/esm/highlevel/methods/messages/send-media.d.ts +2 -2
- package/esm/highlevel/methods/messages/send-media.js +4 -3
- package/esm/highlevel/methods/messages/send-media.js.map +1 -1
- package/esm/highlevel/methods/messages/send-text.d.ts +1 -1
- package/esm/highlevel/methods/messages/send-text.js +4 -3
- package/esm/highlevel/methods/messages/send-text.js.map +1 -1
- package/esm/highlevel/methods/misc/with-params.d.ts +10 -0
- package/esm/highlevel/methods/misc/with-params.js +28 -0
- package/esm/highlevel/methods/misc/with-params.js.map +1 -0
- package/esm/highlevel/methods.d.ts +13 -1
- package/esm/highlevel/methods.js +0 -1
- package/esm/highlevel/methods.js.map +1 -1
- package/esm/highlevel/types/auth/sent-code.js +4 -3
- package/esm/highlevel/types/bots/command-scope/index.d.ts +10 -0
- package/esm/highlevel/types/bots/command-scope/index.js +11 -0
- package/esm/highlevel/types/bots/command-scope/index.js.map +1 -0
- package/esm/highlevel/types/bots/command-scope/inner.d.ts +54 -0
- package/esm/highlevel/types/bots/command-scope/inner.js +69 -0
- package/esm/highlevel/types/bots/command-scope/inner.js.map +1 -0
- package/esm/highlevel/types/bots/game-high-score.js +5 -4
- package/esm/highlevel/types/bots/index.d.ts +4 -4
- package/esm/highlevel/types/bots/index.js +4 -4
- package/esm/highlevel/types/bots/index.js.map +1 -1
- package/esm/highlevel/types/bots/inline-message/factories.d.ts +43 -0
- package/esm/highlevel/types/bots/inline-message/factories.js +163 -0
- package/esm/highlevel/types/bots/inline-message/factories.js.map +1 -0
- package/esm/highlevel/types/bots/inline-message/index.d.ts +3 -0
- package/esm/highlevel/types/bots/inline-message/index.js +4 -0
- package/esm/highlevel/types/bots/inline-message/index.js.map +1 -0
- package/{cjs/highlevel/types/bots/input/input-inline-message.d.ts → esm/highlevel/types/bots/inline-message/types.d.ts} +2 -45
- package/esm/highlevel/types/bots/inline-message/types.js +2 -0
- package/esm/highlevel/types/bots/inline-message/types.js.map +1 -0
- package/esm/highlevel/types/bots/inline-result/factories.d.ts +94 -0
- package/esm/highlevel/types/bots/inline-result/factories.js +470 -0
- package/esm/highlevel/types/bots/inline-result/factories.js.map +1 -0
- package/esm/highlevel/types/bots/inline-result/index.d.ts +3 -0
- package/esm/highlevel/types/bots/inline-result/index.js +4 -0
- package/esm/highlevel/types/bots/inline-result/index.js.map +1 -0
- package/{cjs/highlevel/types/bots/input/input-inline-result.d.ts → esm/highlevel/types/bots/inline-result/types.d.ts} +1 -95
- package/esm/highlevel/types/bots/inline-result/types.js +2 -0
- package/esm/highlevel/types/bots/inline-result/types.js.map +1 -0
- package/esm/highlevel/types/bots/{keyboard-builder.d.ts → keyboards/builder.d.ts} +1 -1
- package/esm/highlevel/types/bots/{keyboard-builder.js → keyboards/builder.js} +1 -1
- package/esm/highlevel/types/bots/keyboards/builder.js.map +1 -0
- package/esm/highlevel/types/bots/keyboards/factories.d.ts +195 -0
- package/esm/highlevel/types/bots/keyboards/factories.js +341 -0
- package/esm/highlevel/types/bots/keyboards/factories.js.map +1 -0
- package/esm/highlevel/types/bots/keyboards/index.d.ts +14 -0
- package/esm/highlevel/types/bots/keyboards/index.js +15 -0
- package/esm/highlevel/types/bots/keyboards/index.js.map +1 -0
- package/esm/highlevel/types/bots/keyboards/types.d.ts +34 -0
- package/esm/highlevel/types/bots/keyboards/types.js +2 -0
- package/esm/highlevel/types/bots/keyboards/types.js.map +1 -0
- package/esm/highlevel/types/files/file-location.js +4 -3
- package/esm/highlevel/types/files/utils.d.ts +9 -6
- package/esm/highlevel/types/files/utils.js.map +1 -1
- package/esm/highlevel/types/files/web-document.js +4 -3
- package/esm/highlevel/types/media/audio.js +5 -4
- package/esm/highlevel/types/media/contact.js +4 -3
- package/esm/highlevel/types/media/dice.js +4 -3
- package/esm/highlevel/types/media/document.js +8 -6
- package/esm/highlevel/types/media/document.js.map +1 -1
- package/esm/highlevel/types/media/game.js +5 -4
- package/esm/highlevel/types/media/index.d.ts +1 -1
- package/esm/highlevel/types/media/index.js +1 -1
- package/esm/highlevel/types/media/index.js.map +1 -1
- package/esm/highlevel/types/media/input-media/factories.d.ts +141 -0
- package/esm/highlevel/types/media/input-media/factories.js +228 -0
- package/esm/highlevel/types/media/input-media/factories.js.map +1 -0
- package/esm/highlevel/types/media/input-media/index.d.ts +3 -0
- package/esm/highlevel/types/media/input-media/index.js +4 -0
- package/esm/highlevel/types/media/input-media/index.js.map +1 -0
- package/esm/highlevel/types/media/{input-media.d.ts → input-media/types.d.ts} +5 -145
- package/esm/highlevel/types/media/input-media/types.js +2 -0
- package/esm/highlevel/types/media/input-media/types.js.map +1 -0
- package/esm/highlevel/types/media/invoice.js +9 -7
- package/esm/highlevel/types/media/location.js +7 -5
- package/esm/highlevel/types/media/photo.js +5 -4
- package/esm/highlevel/types/media/poll.js +5 -4
- package/esm/highlevel/types/media/sticker.js +5 -4
- package/esm/highlevel/types/media/story.js +4 -3
- package/esm/highlevel/types/media/thumbnail.js +10 -8
- package/esm/highlevel/types/media/thumbnail.js.map +1 -1
- package/esm/highlevel/types/media/venue.js +5 -4
- package/esm/highlevel/types/media/video.js +5 -4
- package/esm/highlevel/types/media/voice.js +5 -4
- package/esm/highlevel/types/media/web-page.js +5 -4
- package/esm/highlevel/types/messages/dialog.js +5 -4
- package/esm/highlevel/types/messages/draft-message.js +5 -4
- package/esm/highlevel/types/messages/message-entity.js +5 -4
- package/esm/highlevel/types/messages/message-forward.js +5 -4
- package/esm/highlevel/types/messages/message-reactions.js +5 -4
- package/esm/highlevel/types/messages/message-replies.js +5 -4
- package/esm/highlevel/types/messages/message.d.ts +1 -1
- package/esm/highlevel/types/messages/message.js +6 -5
- package/esm/highlevel/types/messages/message.js.map +1 -1
- package/esm/highlevel/types/messages/replied-message.js +5 -4
- package/esm/highlevel/types/misc/index.d.ts +1 -1
- package/esm/highlevel/types/misc/index.js +1 -1
- package/esm/highlevel/types/misc/index.js.map +1 -1
- package/esm/highlevel/types/misc/input-privacy-rule/allow.d.ts +22 -0
- package/esm/highlevel/types/misc/input-privacy-rule/allow.js +31 -0
- package/esm/highlevel/types/misc/input-privacy-rule/allow.js.map +1 -0
- package/esm/highlevel/types/misc/input-privacy-rule/bundle.d.ts +3 -0
- package/esm/highlevel/types/misc/input-privacy-rule/bundle.js +4 -0
- package/esm/highlevel/types/misc/input-privacy-rule/bundle.js.map +1 -0
- package/esm/highlevel/types/misc/input-privacy-rule/disallow.d.ts +20 -0
- package/esm/highlevel/types/misc/input-privacy-rule/disallow.js +27 -0
- package/esm/highlevel/types/misc/input-privacy-rule/disallow.js.map +1 -0
- package/esm/highlevel/types/misc/input-privacy-rule/index.d.ts +3 -0
- package/esm/highlevel/types/misc/input-privacy-rule/index.js +4 -0
- package/esm/highlevel/types/misc/input-privacy-rule/index.js.map +1 -0
- package/esm/highlevel/types/misc/input-privacy-rule/types.d.ts +11 -0
- package/esm/highlevel/types/misc/input-privacy-rule/types.js +2 -0
- package/esm/highlevel/types/misc/input-privacy-rule/types.js.map +1 -0
- package/esm/highlevel/types/misc/sticker-set.js +5 -4
- package/esm/highlevel/types/misc/takeout-session.js +4 -3
- package/esm/highlevel/types/peers/chat-colors.js +4 -3
- package/esm/highlevel/types/peers/chat-event/index.js +5 -4
- package/esm/highlevel/types/peers/chat-invite-link-member.js +5 -4
- package/esm/highlevel/types/peers/chat-invite-link.js +5 -4
- package/esm/highlevel/types/peers/chat-location.js +5 -4
- package/esm/highlevel/types/peers/chat-member.js +5 -4
- package/esm/highlevel/types/peers/chat-permissions.js +4 -3
- package/esm/highlevel/types/peers/chat-photo.js +12 -9
- package/esm/highlevel/types/peers/chat-photo.js.map +1 -1
- package/esm/highlevel/types/peers/chat-preview.js +5 -4
- package/esm/highlevel/types/peers/chat.js +5 -4
- package/esm/highlevel/types/peers/forum-topic.js +5 -4
- package/esm/highlevel/types/peers/user.js +5 -4
- package/esm/highlevel/types/premium/boost-slot.js +5 -4
- package/esm/highlevel/types/premium/boost-stats.js +4 -3
- package/esm/highlevel/types/premium/boost.js +5 -4
- package/esm/highlevel/types/reactions/emoji-status.js +4 -3
- package/esm/highlevel/types/reactions/peer-reaction.js +5 -4
- package/esm/highlevel/types/reactions/reaction-count.js +4 -3
- package/esm/highlevel/types/stories/all-stories.js +5 -4
- package/esm/highlevel/types/stories/interactive/channel-post.js +5 -4
- package/esm/highlevel/types/stories/interactive/location.js +5 -4
- package/esm/highlevel/types/stories/interactive/reaction.js +4 -3
- package/esm/highlevel/types/stories/interactive/venue.js +5 -4
- package/esm/highlevel/types/stories/peer-stories.js +5 -4
- package/esm/highlevel/types/stories/stealth-mode.js +4 -3
- package/esm/highlevel/types/stories/story-interactions.js +5 -4
- package/esm/highlevel/types/stories/story-viewer.js +9 -7
- package/esm/highlevel/types/stories/story.js +5 -4
- package/esm/highlevel/types/updates/bot-chat-join-request.js +5 -4
- package/esm/highlevel/types/updates/bot-reaction.js +9 -7
- package/esm/highlevel/types/updates/bot-stopped.js +5 -4
- package/esm/highlevel/types/updates/callback-query.js +11 -9
- package/esm/highlevel/types/updates/callback-query.js.map +1 -1
- package/esm/highlevel/types/updates/chat-join-request.js +5 -4
- package/esm/highlevel/types/updates/chat-member-update.js +5 -4
- package/esm/highlevel/types/updates/chosen-inline-result.js +5 -4
- package/esm/highlevel/types/updates/delete-message-update.js +4 -3
- package/esm/highlevel/types/updates/delete-story-update.js +5 -4
- package/esm/highlevel/types/updates/history-read-update.js +4 -3
- package/esm/highlevel/types/updates/inline-query.js +5 -4
- package/esm/highlevel/types/updates/poll-update.js +5 -4
- package/esm/highlevel/types/updates/poll-vote.js +5 -4
- package/esm/highlevel/types/updates/pre-checkout-query.js +5 -4
- package/esm/highlevel/types/updates/story-update.js +5 -4
- package/esm/highlevel/types/updates/user-status-update.js +5 -4
- package/esm/highlevel/types/updates/user-status-update.js.map +1 -1
- package/esm/highlevel/types/updates/user-typing-update.js +4 -3
- package/esm/highlevel/updates/manager.d.ts +5 -3
- package/esm/highlevel/updates/manager.js +81 -67
- package/esm/highlevel/updates/manager.js.map +1 -1
- package/esm/highlevel/utils/convert-file-id.js +7 -6
- package/esm/highlevel/utils/convert-file-id.js.map +1 -1
- package/esm/highlevel/utils/file-utils.js +8 -4
- package/esm/highlevel/utils/file-utils.js.map +1 -1
- package/esm/highlevel/utils/inline-utils.js +4 -3
- package/esm/highlevel/utils/inline-utils.js.map +1 -1
- package/esm/highlevel/utils/inspectable.d.ts +1 -1
- package/esm/highlevel/utils/inspectable.js +3 -2
- package/esm/highlevel/utils/inspectable.js.map +1 -1
- package/esm/highlevel/utils/memoize.d.ts +1 -1
- package/esm/highlevel/utils/memoize.js +1 -0
- package/esm/highlevel/utils/memoize.js.map +1 -1
- package/esm/highlevel/utils/stream-utils.d.ts +0 -2
- package/esm/highlevel/utils/stream-utils.js +0 -26
- package/esm/highlevel/utils/stream-utils.js.map +1 -1
- package/esm/highlevel/utils/string-session.js +4 -3
- package/esm/highlevel/utils/string-session.js.map +1 -1
- package/esm/highlevel/worker/index.d.ts +3 -0
- package/esm/highlevel/worker/index.js +4 -0
- package/esm/highlevel/worker/index.js.map +1 -0
- package/esm/highlevel/worker/port.d.ts +6 -3
- package/esm/highlevel/worker/port.js +8 -2
- package/esm/highlevel/worker/port.js.map +1 -1
- package/esm/highlevel/worker/protocol.d.ts +5 -1
- package/esm/highlevel/worker/protocol.js.map +1 -1
- package/esm/highlevel/worker/worker.d.ts +11 -4
- package/esm/highlevel/worker/worker.js +51 -47
- package/esm/highlevel/worker/worker.js.map +1 -1
- package/esm/network/client.d.ts +4 -4
- package/esm/network/client.js +4 -2
- package/esm/network/client.js.map +1 -1
- package/esm/network/multi-session-connection.d.ts +1 -0
- package/esm/network/multi-session-connection.js +6 -0
- package/esm/network/multi-session-connection.js.map +1 -1
- package/esm/network/network-manager.d.ts +5 -1
- package/esm/network/network-manager.js +24 -15
- package/esm/network/network-manager.js.map +1 -1
- package/esm/network/persistent-connection.d.ts +3 -0
- package/esm/network/persistent-connection.js +23 -1
- package/esm/network/persistent-connection.js.map +1 -1
- package/esm/network/session-connection.d.ts +2 -0
- package/esm/network/session-connection.js +18 -4
- package/esm/network/session-connection.js.map +1 -1
- package/esm/network/transports/index.d.ts +0 -3
- package/esm/network/transports/index.js +0 -3
- package/esm/network/transports/index.js.map +1 -1
- package/esm/platform.d.ts +18 -0
- package/esm/platform.js +31 -0
- package/esm/platform.js.map +1 -0
- package/esm/storage/index.d.ts +2 -2
- package/esm/storage/index.js +2 -2
- package/esm/storage/index.js.map +1 -1
- package/{cjs/storage/providers → esm/storage}/memory/driver.d.ts +1 -1
- package/esm/storage/memory/driver.js.map +1 -0
- package/{cjs/storage/providers → esm/storage}/memory/index.d.ts +2 -2
- package/esm/storage/memory/index.js.map +1 -0
- package/esm/storage/{providers/memory → memory}/repository/auth-keys.d.ts +1 -1
- package/esm/storage/memory/repository/auth-keys.js.map +1 -0
- package/{cjs/storage/providers → esm/storage}/memory/repository/kv.d.ts +1 -1
- package/esm/storage/memory/repository/kv.js.map +1 -0
- package/{cjs/storage/providers → esm/storage}/memory/repository/peers.d.ts +1 -1
- package/esm/storage/memory/repository/peers.js.map +1 -0
- package/{cjs/storage/providers → esm/storage}/memory/repository/ref-messages.d.ts +1 -1
- package/esm/storage/memory/repository/ref-messages.js.map +1 -0
- package/esm/storage/sqlite/driver.d.ts +24 -0
- package/esm/storage/sqlite/driver.js +125 -0
- package/esm/storage/sqlite/driver.js.map +1 -0
- package/esm/storage/sqlite/index.d.ts +17 -0
- package/esm/storage/sqlite/index.js +17 -0
- package/esm/storage/sqlite/index.js.map +1 -0
- package/esm/storage/sqlite/repository/auth-keys.d.ts +20 -0
- package/esm/storage/sqlite/repository/auth-keys.js +64 -0
- package/esm/storage/sqlite/repository/auth-keys.js.map +1 -0
- package/esm/storage/sqlite/repository/kv.d.ts +14 -0
- package/esm/storage/sqlite/repository/kv.js +92 -0
- package/esm/storage/sqlite/repository/kv.js.map +1 -0
- package/esm/storage/sqlite/repository/peers.d.ts +16 -0
- package/esm/storage/sqlite/repository/peers.js +73 -0
- package/esm/storage/sqlite/repository/peers.js.map +1 -0
- package/esm/storage/sqlite/repository/ref-messages.d.ts +16 -0
- package/esm/storage/sqlite/repository/ref-messages.js +45 -0
- package/esm/storage/sqlite/repository/ref-messages.js.map +1 -0
- package/esm/storage/sqlite/types.d.ts +18 -0
- package/esm/storage/sqlite/types.js +2 -0
- package/esm/storage/sqlite/types.js.map +1 -0
- package/esm/storage/storage.js +3 -2
- package/esm/storage/storage.js.map +1 -1
- package/esm/utils/binary/asn1-parser.js +3 -3
- package/esm/utils/binary/asn1-parser.js.map +1 -1
- package/esm/utils/crypto/abstract.d.ts +0 -1
- package/esm/utils/crypto/abstract.js.map +1 -1
- package/esm/utils/crypto/index.d.ts +0 -2
- package/esm/utils/crypto/index.js +0 -2
- package/esm/utils/crypto/index.js.map +1 -1
- package/esm/utils/crypto/keys.js +6 -4
- package/esm/utils/crypto/keys.js.map +1 -1
- package/esm/utils/crypto/password.js +3 -3
- package/esm/utils/crypto/password.js.map +1 -1
- package/esm/utils/dcs.d.ts +4 -0
- package/esm/utils/dcs.js +0 -4
- package/esm/utils/dcs.js.map +1 -1
- package/esm/utils/{platform/error-reporting.d.ts → error-reporting.d.ts} +1 -1
- package/esm/utils/error-reporting.js.map +1 -0
- package/esm/utils/index.d.ts +4 -1
- package/esm/utils/index.js +6 -1
- package/esm/utils/index.js.map +1 -1
- package/esm/utils/links/common.js +1 -1
- package/esm/utils/links/common.js.map +1 -1
- package/esm/utils/logger.d.ts +1 -0
- package/esm/utils/logger.js +9 -22
- package/esm/utils/logger.js.map +1 -1
- package/package.json +25 -53
- package/cjs/highlevel/base.test.js +0 -14
- package/cjs/highlevel/base.test.js.map +0 -1
- package/cjs/highlevel/methods/files/_platform.js +0 -33
- package/cjs/highlevel/methods/files/_platform.js.map +0 -1
- package/cjs/highlevel/methods/files/_platform.web.d.ts +0 -1
- package/cjs/highlevel/methods/files/_platform.web.js +0 -26
- package/cjs/highlevel/methods/files/_platform.web.js.map +0 -1
- package/cjs/highlevel/methods/files/download-file.web.d.ts +0 -1
- package/cjs/highlevel/methods/files/download-file.web.js +0 -9
- package/cjs/highlevel/methods/files/download-file.web.js.map +0 -1
- package/cjs/highlevel/methods/messages/send-text.test.d.ts +0 -1
- package/cjs/highlevel/methods/messages/send-text.test.js +0 -140
- package/cjs/highlevel/methods/messages/send-text.test.js.map +0 -1
- package/cjs/highlevel/methods/users/get-users.test.d.ts +0 -1
- package/cjs/highlevel/methods/users/get-users.test.js +0 -33
- package/cjs/highlevel/methods/users/get-users.test.js.map +0 -1
- package/cjs/highlevel/methods/users/resolve-peer.test.d.ts +0 -1
- package/cjs/highlevel/methods/users/resolve-peer.test.js +0 -307
- package/cjs/highlevel/methods/users/resolve-peer.test.js.map +0 -1
- package/cjs/highlevel/types/bots/command-scope.d.ts +0 -63
- package/cjs/highlevel/types/bots/command-scope.js +0 -87
- package/cjs/highlevel/types/bots/command-scope.js.map +0 -1
- package/cjs/highlevel/types/bots/input/index.d.ts +0 -2
- package/cjs/highlevel/types/bots/input/index.js.map +0 -1
- package/cjs/highlevel/types/bots/input/input-inline-message.js +0 -179
- package/cjs/highlevel/types/bots/input/input-inline-message.js.map +0 -1
- package/cjs/highlevel/types/bots/input/input-inline-result.js +0 -490
- package/cjs/highlevel/types/bots/input/input-inline-result.js.map +0 -1
- package/cjs/highlevel/types/bots/keyboard-builder.js.map +0 -1
- package/cjs/highlevel/types/bots/keyboard-builder.test.d.ts +0 -1
- package/cjs/highlevel/types/bots/keyboard-builder.test.js +0 -162
- package/cjs/highlevel/types/bots/keyboard-builder.test.js.map +0 -1
- package/cjs/highlevel/types/bots/keyboards.d.ts +0 -239
- package/cjs/highlevel/types/bots/keyboards.js +0 -380
- package/cjs/highlevel/types/bots/keyboards.js.map +0 -1
- package/cjs/highlevel/types/bots/keyboards.test.d.ts +0 -1
- package/cjs/highlevel/types/bots/keyboards.test.js +0 -146
- package/cjs/highlevel/types/bots/keyboards.test.js.map +0 -1
- package/cjs/highlevel/types/media/input-media.js +0 -254
- package/cjs/highlevel/types/media/input-media.js.map +0 -1
- package/cjs/highlevel/types/misc/input-privacy-rule.d.ts +0 -63
- package/cjs/highlevel/types/misc/input-privacy-rule.js +0 -85
- package/cjs/highlevel/types/misc/input-privacy-rule.js.map +0 -1
- package/cjs/highlevel/types/peers/peers-index.test.d.ts +0 -1
- package/cjs/highlevel/types/peers/peers-index.test.js +0 -71
- package/cjs/highlevel/types/peers/peers-index.test.js.map +0 -1
- package/cjs/highlevel/types/peers/user.test.d.ts +0 -1
- package/cjs/highlevel/types/peers/user.test.js +0 -176
- package/cjs/highlevel/types/peers/user.test.js.map +0 -1
- package/cjs/highlevel/utils/file-type.test.d.ts +0 -1
- package/cjs/highlevel/utils/file-type.test.js +0 -64
- package/cjs/highlevel/utils/file-type.test.js.map +0 -1
- package/cjs/highlevel/utils/file-utils.test.d.ts +0 -1
- package/cjs/highlevel/utils/file-utils.test.js +0 -126
- package/cjs/highlevel/utils/file-utils.test.js.map +0 -1
- package/cjs/highlevel/utils/inline-utils.test.d.ts +0 -1
- package/cjs/highlevel/utils/inline-utils.test.js +0 -47
- package/cjs/highlevel/utils/inline-utils.test.js.map +0 -1
- package/cjs/highlevel/utils/inspectable.test.d.ts +0 -1
- package/cjs/highlevel/utils/inspectable.test.js +0 -97
- package/cjs/highlevel/utils/inspectable.test.js.map +0 -1
- package/cjs/highlevel/utils/memoize.test.d.ts +0 -1
- package/cjs/highlevel/utils/memoize.test.js +0 -60
- package/cjs/highlevel/utils/memoize.test.js.map +0 -1
- package/cjs/highlevel/utils/peer-utils.test.d.ts +0 -1
- package/cjs/highlevel/utils/peer-utils.test.js +0 -109
- package/cjs/highlevel/utils/peer-utils.test.js.map +0 -1
- package/cjs/highlevel/utils/platform/storage.d.ts +0 -1
- package/cjs/highlevel/utils/platform/storage.js +0 -10
- package/cjs/highlevel/utils/platform/storage.js.map +0 -1
- package/cjs/highlevel/utils/platform/storage.web.d.ts +0 -1
- package/cjs/highlevel/utils/platform/storage.web.js +0 -14
- package/cjs/highlevel/utils/platform/storage.web.js.map +0 -1
- package/cjs/highlevel/utils/query-batcher.test.d.ts +0 -1
- package/cjs/highlevel/utils/query-batcher.test.js +0 -502
- package/cjs/highlevel/utils/query-batcher.test.js.map +0 -1
- package/cjs/highlevel/utils/stream-utils.test.d.ts +0 -1
- package/cjs/highlevel/utils/stream-utils.test.js +0 -98
- package/cjs/highlevel/utils/stream-utils.test.js.map +0 -1
- package/cjs/highlevel/utils/string-session.test.d.ts +0 -1
- package/cjs/highlevel/utils/string-session.test.js +0 -198
- package/cjs/highlevel/utils/string-session.test.js.map +0 -1
- package/cjs/highlevel/utils/voice-utils.test.d.ts +0 -1
- package/cjs/highlevel/utils/voice-utils.test.js +0 -28
- package/cjs/highlevel/utils/voice-utils.test.js.map +0 -1
- package/cjs/highlevel/worker/platform/connect.d.ts +0 -2
- package/cjs/highlevel/worker/platform/connect.js +0 -19
- package/cjs/highlevel/worker/platform/connect.js.map +0 -1
- package/cjs/highlevel/worker/platform/connect.web.d.ts +0 -2
- package/cjs/highlevel/worker/platform/connect.web.js +0 -51
- package/cjs/highlevel/worker/platform/connect.web.js.map +0 -1
- package/cjs/highlevel/worker/platform/register.d.ts +0 -2
- package/cjs/highlevel/worker/platform/register.js +0 -20
- package/cjs/highlevel/worker/platform/register.js.map +0 -1
- package/cjs/highlevel/worker/platform/register.web.d.ts +0 -2
- package/cjs/highlevel/worker/platform/register.web.js +0 -64
- package/cjs/highlevel/worker/platform/register.web.js.map +0 -1
- package/cjs/network/auth-key.test.d.ts +0 -1
- package/cjs/network/auth-key.test.js +0 -111
- package/cjs/network/auth-key.test.js.map +0 -1
- package/cjs/network/config-manager.test.d.ts +0 -1
- package/cjs/network/config-manager.test.js +0 -174
- package/cjs/network/config-manager.test.js.map +0 -1
- package/cjs/network/persistent-connection.test.d.ts +0 -1
- package/cjs/network/persistent-connection.test.js +0 -157
- package/cjs/network/persistent-connection.test.js.map +0 -1
- package/cjs/network/transports/intermediate.test.d.ts +0 -1
- package/cjs/network/transports/intermediate.test.js +0 -84
- package/cjs/network/transports/intermediate.test.js.map +0 -1
- package/cjs/network/transports/obfuscated.test.d.ts +0 -1
- package/cjs/network/transports/obfuscated.test.js +0 -131
- package/cjs/network/transports/obfuscated.test.js.map +0 -1
- package/cjs/network/transports/tcp.d.ts +0 -32
- package/cjs/network/transports/tcp.js +0 -130
- package/cjs/network/transports/tcp.js.map +0 -1
- package/cjs/network/transports/tcp.test.d.ts +0 -1
- package/cjs/network/transports/tcp.test.js +0 -103
- package/cjs/network/transports/tcp.test.js.map +0 -1
- package/cjs/network/transports/websocket.d.ts +0 -46
- package/cjs/network/transports/websocket.js +0 -124
- package/cjs/network/transports/websocket.js.map +0 -1
- package/cjs/network/transports/websocket.test.d.ts +0 -1
- package/cjs/network/transports/websocket.test.js +0 -91
- package/cjs/network/transports/websocket.test.js.map +0 -1
- package/cjs/storage/providers/idb/driver.d.ts +0 -18
- package/cjs/storage/providers/idb/driver.js +0 -138
- package/cjs/storage/providers/idb/driver.js.map +0 -1
- package/cjs/storage/providers/idb/idb.test.d.ts +0 -1
- package/cjs/storage/providers/idb/idb.test.js +0 -29
- package/cjs/storage/providers/idb/idb.test.js.map +0 -1
- package/cjs/storage/providers/idb/index.d.ts +0 -22
- package/cjs/storage/providers/idb/index.js +0 -28
- package/cjs/storage/providers/idb/index.js.map +0 -1
- package/cjs/storage/providers/idb/repository/auth-keys.d.ts +0 -14
- package/cjs/storage/providers/idb/repository/auth-keys.js +0 -70
- package/cjs/storage/providers/idb/repository/auth-keys.js.map +0 -1
- package/cjs/storage/providers/idb/repository/kv.d.ts +0 -11
- package/cjs/storage/providers/idb/repository/kv.js +0 -34
- package/cjs/storage/providers/idb/repository/kv.js.map +0 -1
- package/cjs/storage/providers/idb/repository/peers.d.ts +0 -12
- package/cjs/storage/providers/idb/repository/peers.js +0 -38
- package/cjs/storage/providers/idb/repository/peers.js.map +0 -1
- package/cjs/storage/providers/idb/repository/ref-messages.d.ts +0 -12
- package/cjs/storage/providers/idb/repository/ref-messages.js +0 -57
- package/cjs/storage/providers/idb/repository/ref-messages.js.map +0 -1
- package/cjs/storage/providers/idb/utils.d.ts +0 -3
- package/cjs/storage/providers/idb/utils.js +0 -27
- package/cjs/storage/providers/idb/utils.js.map +0 -1
- package/cjs/storage/providers/memory/driver.js.map +0 -1
- package/cjs/storage/providers/memory/index.js.map +0 -1
- package/cjs/storage/providers/memory/memory.test.d.ts +0 -1
- package/cjs/storage/providers/memory/memory.test.js +0 -13
- package/cjs/storage/providers/memory/memory.test.js.map +0 -1
- package/cjs/storage/providers/memory/repository/auth-keys.js.map +0 -1
- package/cjs/storage/providers/memory/repository/kv.js.map +0 -1
- package/cjs/storage/providers/memory/repository/peers.js.map +0 -1
- package/cjs/storage/providers/memory/repository/ref-messages.js.map +0 -1
- package/cjs/storage/service/auth-keys.test.d.ts +0 -1
- package/cjs/storage/service/auth-keys.test.js +0 -22
- package/cjs/storage/service/auth-keys.test.js.map +0 -1
- package/cjs/storage/service/updates.test.d.ts +0 -1
- package/cjs/storage/service/updates.test.js +0 -60
- package/cjs/storage/service/updates.test.js.map +0 -1
- package/cjs/storage/service/utils.test-utils.d.ts +0 -2
- package/cjs/storage/service/utils.test-utils.js +0 -19
- package/cjs/storage/service/utils.test-utils.js.map +0 -1
- package/cjs/utils/async-lock.test.d.ts +0 -1
- package/cjs/utils/async-lock.test.js +0 -25
- package/cjs/utils/async-lock.test.js.map +0 -1
- package/cjs/utils/bigint-utils.test.d.ts +0 -1
- package/cjs/utils/bigint-utils.test.js +0 -150
- package/cjs/utils/bigint-utils.test.js.map +0 -1
- package/cjs/utils/buffer-utils.test.d.ts +0 -1
- package/cjs/utils/buffer-utils.test.js +0 -69
- package/cjs/utils/buffer-utils.test.js.map +0 -1
- package/cjs/utils/condition-variable.test.d.ts +0 -1
- package/cjs/utils/condition-variable.test.js +0 -27
- package/cjs/utils/condition-variable.test.js.map +0 -1
- package/cjs/utils/controllable-promise.test.d.ts +0 -1
- package/cjs/utils/controllable-promise.test.js +0 -17
- package/cjs/utils/controllable-promise.test.js.map +0 -1
- package/cjs/utils/crypto/factorization.test.d.ts +0 -1
- package/cjs/utils/crypto/factorization.test.js +0 -19
- package/cjs/utils/crypto/factorization.test.js.map +0 -1
- package/cjs/utils/crypto/keys.test.d.ts +0 -1
- package/cjs/utils/crypto/keys.test.js +0 -40
- package/cjs/utils/crypto/keys.test.js.map +0 -1
- package/cjs/utils/crypto/miller-rabin.test.d.ts +0 -1
- package/cjs/utils/crypto/miller-rabin.test.js +0 -60
- package/cjs/utils/crypto/miller-rabin.test.js.map +0 -1
- package/cjs/utils/crypto/mtproto.test.d.ts +0 -1
- package/cjs/utils/crypto/mtproto.test.js +0 -50
- package/cjs/utils/crypto/mtproto.test.js.map +0 -1
- package/cjs/utils/crypto/node.d.ts +0 -21
- package/cjs/utils/crypto/node.js +0 -74
- package/cjs/utils/crypto/node.js.map +0 -1
- package/cjs/utils/crypto/node.test.d.ts +0 -1
- package/cjs/utils/crypto/node.test.js +0 -14
- package/cjs/utils/crypto/node.test.js.map +0 -1
- package/cjs/utils/crypto/password.test.d.ts +0 -1
- package/cjs/utils/crypto/password.test.js +0 -95
- package/cjs/utils/crypto/password.test.js.map +0 -1
- package/cjs/utils/crypto/utils.test.d.ts +0 -1
- package/cjs/utils/crypto/utils.test.js +0 -49
- package/cjs/utils/crypto/utils.test.js.map +0 -1
- package/cjs/utils/crypto/wasm.d.ts +0 -22
- package/cjs/utils/crypto/wasm.js +0 -41
- package/cjs/utils/crypto/wasm.js.map +0 -1
- package/cjs/utils/crypto/web.d.ts +0 -11
- package/cjs/utils/crypto/web.js +0 -40
- package/cjs/utils/crypto/web.js.map +0 -1
- package/cjs/utils/crypto/web.test.d.ts +0 -1
- package/cjs/utils/crypto/web.test.js +0 -17
- package/cjs/utils/crypto/web.test.js.map +0 -1
- package/cjs/utils/deque.test.d.ts +0 -1
- package/cjs/utils/deque.test.js +0 -128
- package/cjs/utils/deque.test.js.map +0 -1
- package/cjs/utils/function-utils.test.d.ts +0 -1
- package/cjs/utils/function-utils.test.js +0 -23
- package/cjs/utils/function-utils.test.js.map +0 -1
- package/cjs/utils/linked-list.test.d.ts +0 -1
- package/cjs/utils/linked-list.test.js +0 -36
- package/cjs/utils/linked-list.test.js.map +0 -1
- package/cjs/utils/links/bots.test.d.ts +0 -1
- package/cjs/utils/links/bots.test.js +0 -152
- package/cjs/utils/links/bots.test.js.map +0 -1
- package/cjs/utils/links/chat.test.d.ts +0 -1
- package/cjs/utils/links/chat.test.js +0 -84
- package/cjs/utils/links/chat.test.js.map +0 -1
- package/cjs/utils/links/misc.test.d.ts +0 -1
- package/cjs/utils/links/misc.test.js +0 -153
- package/cjs/utils/links/misc.test.js.map +0 -1
- package/cjs/utils/links/proxy.test.d.ts +0 -1
- package/cjs/utils/links/proxy.test.js +0 -74
- package/cjs/utils/links/proxy.test.js.map +0 -1
- package/cjs/utils/links/user.test.d.ts +0 -1
- package/cjs/utils/links/user.test.js +0 -63
- package/cjs/utils/links/user.test.js.map +0 -1
- package/cjs/utils/logger.test.d.ts +0 -1
- package/cjs/utils/logger.test.js +0 -139
- package/cjs/utils/logger.test.js.map +0 -1
- package/cjs/utils/long-utils.test.d.ts +0 -1
- package/cjs/utils/long-utils.test.js +0 -158
- package/cjs/utils/long-utils.test.js.map +0 -1
- package/cjs/utils/lru-map.test.d.ts +0 -1
- package/cjs/utils/lru-map.test.js +0 -96
- package/cjs/utils/lru-map.test.js.map +0 -1
- package/cjs/utils/lru-set.test.d.ts +0 -1
- package/cjs/utils/lru-set.test.js +0 -77
- package/cjs/utils/lru-set.test.js.map +0 -1
- package/cjs/utils/peer-utils.test.d.ts +0 -1
- package/cjs/utils/peer-utils.test.js +0 -110
- package/cjs/utils/peer-utils.test.js.map +0 -1
- package/cjs/utils/platform/crypto.d.ts +0 -1
- package/cjs/utils/platform/crypto.js +0 -8
- package/cjs/utils/platform/crypto.js.map +0 -1
- package/cjs/utils/platform/crypto.web.d.ts +0 -1
- package/cjs/utils/platform/crypto.web.js +0 -14
- package/cjs/utils/platform/crypto.web.js.map +0 -1
- package/cjs/utils/platform/error-reporting.js.map +0 -1
- package/cjs/utils/platform/exit-hook.d.ts +0 -1
- package/cjs/utils/platform/exit-hook.js +0 -45
- package/cjs/utils/platform/exit-hook.js.map +0 -1
- package/cjs/utils/platform/exit-hook.web.d.ts +0 -1
- package/cjs/utils/platform/exit-hook.web.js +0 -21
- package/cjs/utils/platform/exit-hook.web.js.map +0 -1
- package/cjs/utils/platform/logging.d.ts +0 -1
- package/cjs/utils/platform/logging.js +0 -34
- package/cjs/utils/platform/logging.js.map +0 -1
- package/cjs/utils/platform/logging.web.d.ts +0 -1
- package/cjs/utils/platform/logging.web.js +0 -35
- package/cjs/utils/platform/logging.web.js.map +0 -1
- package/cjs/utils/platform/transport.d.ts +0 -1
- package/cjs/utils/platform/transport.js +0 -8
- package/cjs/utils/platform/transport.js.map +0 -1
- package/cjs/utils/platform/transport.web.d.ts +0 -1
- package/cjs/utils/platform/transport.web.js +0 -15
- package/cjs/utils/platform/transport.web.js.map +0 -1
- package/cjs/utils/sorted-array.test.d.ts +0 -1
- package/cjs/utils/sorted-array.test.js +0 -66
- package/cjs/utils/sorted-array.test.js.map +0 -1
- package/cjs/utils/tl-json.test.d.ts +0 -1
- package/cjs/utils/tl-json.test.js +0 -83
- package/cjs/utils/tl-json.test.js.map +0 -1
- package/cjs/utils/type-assertions.test.d.ts +0 -1
- package/cjs/utils/type-assertions.test.js +0 -67
- package/cjs/utils/type-assertions.test.js.map +0 -1
- package/esm/highlevel/base.test.d.ts +0 -1
- package/esm/highlevel/base.test.js +0 -12
- package/esm/highlevel/base.test.js.map +0 -1
- package/esm/highlevel/methods/files/_platform.d.ts +0 -1
- package/esm/highlevel/methods/files/_platform.js +0 -26
- package/esm/highlevel/methods/files/_platform.js.map +0 -1
- package/esm/highlevel/methods/files/_platform.web.d.ts +0 -1
- package/esm/highlevel/methods/files/_platform.web.js +0 -19
- package/esm/highlevel/methods/files/_platform.web.js.map +0 -1
- package/esm/highlevel/methods/files/download-file.web.d.ts +0 -1
- package/esm/highlevel/methods/files/download-file.web.js +0 -5
- package/esm/highlevel/methods/files/download-file.web.js.map +0 -1
- package/esm/highlevel/methods/messages/send-text.test.d.ts +0 -1
- package/esm/highlevel/methods/messages/send-text.test.js +0 -135
- package/esm/highlevel/methods/messages/send-text.test.js.map +0 -1
- package/esm/highlevel/methods/users/get-users.test.d.ts +0 -1
- package/esm/highlevel/methods/users/get-users.test.js +0 -28
- package/esm/highlevel/methods/users/get-users.test.js.map +0 -1
- package/esm/highlevel/methods/users/resolve-peer.test.d.ts +0 -1
- package/esm/highlevel/methods/users/resolve-peer.test.js +0 -302
- package/esm/highlevel/methods/users/resolve-peer.test.js.map +0 -1
- package/esm/highlevel/types/bots/command-scope.d.ts +0 -63
- package/esm/highlevel/types/bots/command-scope.js +0 -84
- package/esm/highlevel/types/bots/command-scope.js.map +0 -1
- package/esm/highlevel/types/bots/input/index.d.ts +0 -2
- package/esm/highlevel/types/bots/input/index.js +0 -3
- package/esm/highlevel/types/bots/input/index.js.map +0 -1
- package/esm/highlevel/types/bots/input/input-inline-message.js +0 -176
- package/esm/highlevel/types/bots/input/input-inline-message.js.map +0 -1
- package/esm/highlevel/types/bots/input/input-inline-result.js +0 -487
- package/esm/highlevel/types/bots/input/input-inline-result.js.map +0 -1
- package/esm/highlevel/types/bots/keyboard-builder.js.map +0 -1
- package/esm/highlevel/types/bots/keyboard-builder.test.d.ts +0 -1
- package/esm/highlevel/types/bots/keyboard-builder.test.js +0 -160
- package/esm/highlevel/types/bots/keyboard-builder.test.js.map +0 -1
- package/esm/highlevel/types/bots/keyboards.d.ts +0 -239
- package/esm/highlevel/types/bots/keyboards.js +0 -377
- package/esm/highlevel/types/bots/keyboards.js.map +0 -1
- package/esm/highlevel/types/bots/keyboards.test.d.ts +0 -1
- package/esm/highlevel/types/bots/keyboards.test.js +0 -144
- package/esm/highlevel/types/bots/keyboards.test.js.map +0 -1
- package/esm/highlevel/types/media/input-media.js +0 -251
- package/esm/highlevel/types/media/input-media.js.map +0 -1
- package/esm/highlevel/types/misc/input-privacy-rule.d.ts +0 -63
- package/esm/highlevel/types/misc/input-privacy-rule.js +0 -82
- package/esm/highlevel/types/misc/input-privacy-rule.js.map +0 -1
- package/esm/highlevel/types/peers/peers-index.test.d.ts +0 -1
- package/esm/highlevel/types/peers/peers-index.test.js +0 -69
- package/esm/highlevel/types/peers/peers-index.test.js.map +0 -1
- package/esm/highlevel/types/peers/user.test.d.ts +0 -1
- package/esm/highlevel/types/peers/user.test.js +0 -171
- package/esm/highlevel/types/peers/user.test.js.map +0 -1
- package/esm/highlevel/utils/file-type.test.d.ts +0 -1
- package/esm/highlevel/utils/file-type.test.js +0 -62
- package/esm/highlevel/utils/file-type.test.js.map +0 -1
- package/esm/highlevel/utils/file-utils.test.d.ts +0 -1
- package/esm/highlevel/utils/file-utils.test.js +0 -124
- package/esm/highlevel/utils/file-utils.test.js.map +0 -1
- package/esm/highlevel/utils/inline-utils.test.d.ts +0 -1
- package/esm/highlevel/utils/inline-utils.test.js +0 -42
- package/esm/highlevel/utils/inline-utils.test.js.map +0 -1
- package/esm/highlevel/utils/inspectable.test.d.ts +0 -1
- package/esm/highlevel/utils/inspectable.test.js +0 -95
- package/esm/highlevel/utils/inspectable.test.js.map +0 -1
- package/esm/highlevel/utils/memoize.test.d.ts +0 -1
- package/esm/highlevel/utils/memoize.test.js +0 -58
- package/esm/highlevel/utils/memoize.test.js.map +0 -1
- package/esm/highlevel/utils/peer-utils.test.d.ts +0 -1
- package/esm/highlevel/utils/peer-utils.test.js +0 -107
- package/esm/highlevel/utils/peer-utils.test.js.map +0 -1
- package/esm/highlevel/utils/platform/storage.d.ts +0 -1
- package/esm/highlevel/utils/platform/storage.js +0 -6
- package/esm/highlevel/utils/platform/storage.js.map +0 -1
- package/esm/highlevel/utils/platform/storage.web.d.ts +0 -1
- package/esm/highlevel/utils/platform/storage.web.js +0 -10
- package/esm/highlevel/utils/platform/storage.web.js.map +0 -1
- package/esm/highlevel/utils/query-batcher.test.d.ts +0 -1
- package/esm/highlevel/utils/query-batcher.test.js +0 -500
- package/esm/highlevel/utils/query-batcher.test.js.map +0 -1
- package/esm/highlevel/utils/stream-utils.test.d.ts +0 -1
- package/esm/highlevel/utils/stream-utils.test.js +0 -96
- package/esm/highlevel/utils/stream-utils.test.js.map +0 -1
- package/esm/highlevel/utils/string-session.test.d.ts +0 -1
- package/esm/highlevel/utils/string-session.test.js +0 -196
- package/esm/highlevel/utils/string-session.test.js.map +0 -1
- package/esm/highlevel/utils/voice-utils.test.d.ts +0 -1
- package/esm/highlevel/utils/voice-utils.test.js +0 -26
- package/esm/highlevel/utils/voice-utils.test.js.map +0 -1
- package/esm/highlevel/worker/platform/connect.d.ts +0 -2
- package/esm/highlevel/worker/platform/connect.js +0 -15
- package/esm/highlevel/worker/platform/connect.js.map +0 -1
- package/esm/highlevel/worker/platform/connect.web.d.ts +0 -2
- package/esm/highlevel/worker/platform/connect.web.js +0 -47
- package/esm/highlevel/worker/platform/connect.web.js.map +0 -1
- package/esm/highlevel/worker/platform/register.d.ts +0 -2
- package/esm/highlevel/worker/platform/register.js +0 -16
- package/esm/highlevel/worker/platform/register.js.map +0 -1
- package/esm/highlevel/worker/platform/register.web.d.ts +0 -2
- package/esm/highlevel/worker/platform/register.web.js +0 -60
- package/esm/highlevel/worker/platform/register.web.js.map +0 -1
- package/esm/network/auth-key.test.d.ts +0 -1
- package/esm/network/auth-key.test.js +0 -106
- package/esm/network/auth-key.test.js.map +0 -1
- package/esm/network/config-manager.test.d.ts +0 -1
- package/esm/network/config-manager.test.js +0 -172
- package/esm/network/config-manager.test.js.map +0 -1
- package/esm/network/persistent-connection.test.d.ts +0 -1
- package/esm/network/persistent-connection.test.js +0 -155
- package/esm/network/persistent-connection.test.js.map +0 -1
- package/esm/network/transports/intermediate.test.d.ts +0 -1
- package/esm/network/transports/intermediate.test.js +0 -82
- package/esm/network/transports/intermediate.test.js.map +0 -1
- package/esm/network/transports/obfuscated.test.d.ts +0 -1
- package/esm/network/transports/obfuscated.test.js +0 -129
- package/esm/network/transports/obfuscated.test.js.map +0 -1
- package/esm/network/transports/tcp.d.ts +0 -32
- package/esm/network/transports/tcp.js +0 -122
- package/esm/network/transports/tcp.js.map +0 -1
- package/esm/network/transports/tcp.test.d.ts +0 -1
- package/esm/network/transports/tcp.test.js +0 -101
- package/esm/network/transports/tcp.test.js.map +0 -1
- package/esm/network/transports/websocket.d.ts +0 -46
- package/esm/network/transports/websocket.js +0 -116
- package/esm/network/transports/websocket.js.map +0 -1
- package/esm/network/transports/websocket.test.d.ts +0 -1
- package/esm/network/transports/websocket.test.js +0 -89
- package/esm/network/transports/websocket.test.js.map +0 -1
- package/esm/storage/providers/idb/driver.d.ts +0 -18
- package/esm/storage/providers/idb/driver.js +0 -134
- package/esm/storage/providers/idb/driver.js.map +0 -1
- package/esm/storage/providers/idb/idb.test.d.ts +0 -1
- package/esm/storage/providers/idb/idb.test.js +0 -27
- package/esm/storage/providers/idb/idb.test.js.map +0 -1
- package/esm/storage/providers/idb/index.d.ts +0 -22
- package/esm/storage/providers/idb/index.js +0 -23
- package/esm/storage/providers/idb/index.js.map +0 -1
- package/esm/storage/providers/idb/repository/auth-keys.d.ts +0 -14
- package/esm/storage/providers/idb/repository/auth-keys.js +0 -66
- package/esm/storage/providers/idb/repository/auth-keys.js.map +0 -1
- package/esm/storage/providers/idb/repository/kv.d.ts +0 -11
- package/esm/storage/providers/idb/repository/kv.js +0 -30
- package/esm/storage/providers/idb/repository/kv.js.map +0 -1
- package/esm/storage/providers/idb/repository/peers.d.ts +0 -12
- package/esm/storage/providers/idb/repository/peers.js +0 -34
- package/esm/storage/providers/idb/repository/peers.js.map +0 -1
- package/esm/storage/providers/idb/repository/ref-messages.d.ts +0 -12
- package/esm/storage/providers/idb/repository/ref-messages.js +0 -53
- package/esm/storage/providers/idb/repository/ref-messages.js.map +0 -1
- package/esm/storage/providers/idb/utils.d.ts +0 -3
- package/esm/storage/providers/idb/utils.js +0 -21
- package/esm/storage/providers/idb/utils.js.map +0 -1
- package/esm/storage/providers/memory/driver.js.map +0 -1
- package/esm/storage/providers/memory/index.js.map +0 -1
- package/esm/storage/providers/memory/memory.test.d.ts +0 -1
- package/esm/storage/providers/memory/memory.test.js +0 -11
- package/esm/storage/providers/memory/memory.test.js.map +0 -1
- package/esm/storage/providers/memory/repository/auth-keys.js.map +0 -1
- package/esm/storage/providers/memory/repository/kv.js.map +0 -1
- package/esm/storage/providers/memory/repository/peers.js.map +0 -1
- package/esm/storage/providers/memory/repository/ref-messages.js.map +0 -1
- package/esm/storage/service/auth-keys.test.d.ts +0 -1
- package/esm/storage/service/auth-keys.test.js +0 -20
- package/esm/storage/service/auth-keys.test.js.map +0 -1
- package/esm/storage/service/updates.test.d.ts +0 -1
- package/esm/storage/service/updates.test.js +0 -58
- package/esm/storage/service/updates.test.js.map +0 -1
- package/esm/storage/service/utils.test-utils.d.ts +0 -2
- package/esm/storage/service/utils.test-utils.js +0 -15
- package/esm/storage/service/utils.test-utils.js.map +0 -1
- package/esm/utils/async-lock.test.d.ts +0 -1
- package/esm/utils/async-lock.test.js +0 -23
- package/esm/utils/async-lock.test.js.map +0 -1
- package/esm/utils/bigint-utils.test.d.ts +0 -1
- package/esm/utils/bigint-utils.test.js +0 -148
- package/esm/utils/bigint-utils.test.js.map +0 -1
- package/esm/utils/buffer-utils.test.d.ts +0 -1
- package/esm/utils/buffer-utils.test.js +0 -67
- package/esm/utils/buffer-utils.test.js.map +0 -1
- package/esm/utils/condition-variable.test.d.ts +0 -1
- package/esm/utils/condition-variable.test.js +0 -25
- package/esm/utils/condition-variable.test.js.map +0 -1
- package/esm/utils/controllable-promise.test.d.ts +0 -1
- package/esm/utils/controllable-promise.test.js +0 -15
- package/esm/utils/controllable-promise.test.js.map +0 -1
- package/esm/utils/crypto/factorization.test.d.ts +0 -1
- package/esm/utils/crypto/factorization.test.js +0 -17
- package/esm/utils/crypto/factorization.test.js.map +0 -1
- package/esm/utils/crypto/keys.test.d.ts +0 -1
- package/esm/utils/crypto/keys.test.js +0 -38
- package/esm/utils/crypto/keys.test.js.map +0 -1
- package/esm/utils/crypto/miller-rabin.test.d.ts +0 -1
- package/esm/utils/crypto/miller-rabin.test.js +0 -58
- package/esm/utils/crypto/miller-rabin.test.js.map +0 -1
- package/esm/utils/crypto/mtproto.test.d.ts +0 -1
- package/esm/utils/crypto/mtproto.test.js +0 -48
- package/esm/utils/crypto/mtproto.test.js.map +0 -1
- package/esm/utils/crypto/node.d.ts +0 -21
- package/esm/utils/crypto/node.js +0 -69
- package/esm/utils/crypto/node.js.map +0 -1
- package/esm/utils/crypto/node.test.d.ts +0 -1
- package/esm/utils/crypto/node.test.js +0 -12
- package/esm/utils/crypto/node.test.js.map +0 -1
- package/esm/utils/crypto/password.test.d.ts +0 -1
- package/esm/utils/crypto/password.test.js +0 -90
- package/esm/utils/crypto/password.test.js.map +0 -1
- package/esm/utils/crypto/utils.test.d.ts +0 -1
- package/esm/utils/crypto/utils.test.js +0 -47
- package/esm/utils/crypto/utils.test.js.map +0 -1
- package/esm/utils/crypto/wasm.d.ts +0 -22
- package/esm/utils/crypto/wasm.js +0 -37
- package/esm/utils/crypto/wasm.js.map +0 -1
- package/esm/utils/crypto/web.d.ts +0 -11
- package/esm/utils/crypto/web.js +0 -36
- package/esm/utils/crypto/web.js.map +0 -1
- package/esm/utils/crypto/web.test.d.ts +0 -1
- package/esm/utils/crypto/web.test.js +0 -15
- package/esm/utils/crypto/web.test.js.map +0 -1
- package/esm/utils/deque.test.d.ts +0 -1
- package/esm/utils/deque.test.js +0 -126
- package/esm/utils/deque.test.js.map +0 -1
- package/esm/utils/function-utils.test.d.ts +0 -1
- package/esm/utils/function-utils.test.js +0 -21
- package/esm/utils/function-utils.test.js.map +0 -1
- package/esm/utils/linked-list.test.d.ts +0 -1
- package/esm/utils/linked-list.test.js +0 -34
- package/esm/utils/linked-list.test.js.map +0 -1
- package/esm/utils/links/bots.test.d.ts +0 -1
- package/esm/utils/links/bots.test.js +0 -150
- package/esm/utils/links/bots.test.js.map +0 -1
- package/esm/utils/links/chat.test.d.ts +0 -1
- package/esm/utils/links/chat.test.js +0 -82
- package/esm/utils/links/chat.test.js.map +0 -1
- package/esm/utils/links/misc.test.d.ts +0 -1
- package/esm/utils/links/misc.test.js +0 -151
- package/esm/utils/links/misc.test.js.map +0 -1
- package/esm/utils/links/proxy.test.d.ts +0 -1
- package/esm/utils/links/proxy.test.js +0 -72
- package/esm/utils/links/proxy.test.js.map +0 -1
- package/esm/utils/links/user.test.d.ts +0 -1
- package/esm/utils/links/user.test.js +0 -61
- package/esm/utils/links/user.test.js.map +0 -1
- package/esm/utils/logger.test.d.ts +0 -1
- package/esm/utils/logger.test.js +0 -134
- package/esm/utils/logger.test.js.map +0 -1
- package/esm/utils/long-utils.test.d.ts +0 -1
- package/esm/utils/long-utils.test.js +0 -153
- package/esm/utils/long-utils.test.js.map +0 -1
- package/esm/utils/lru-map.test.d.ts +0 -1
- package/esm/utils/lru-map.test.js +0 -94
- package/esm/utils/lru-map.test.js.map +0 -1
- package/esm/utils/lru-set.test.d.ts +0 -1
- package/esm/utils/lru-set.test.js +0 -72
- package/esm/utils/lru-set.test.js.map +0 -1
- package/esm/utils/peer-utils.test.d.ts +0 -1
- package/esm/utils/peer-utils.test.js +0 -105
- package/esm/utils/peer-utils.test.js.map +0 -1
- package/esm/utils/platform/crypto.d.ts +0 -1
- package/esm/utils/platform/crypto.js +0 -4
- package/esm/utils/platform/crypto.js.map +0 -1
- package/esm/utils/platform/crypto.web.d.ts +0 -1
- package/esm/utils/platform/crypto.web.js +0 -10
- package/esm/utils/platform/crypto.web.js.map +0 -1
- package/esm/utils/platform/error-reporting.js.map +0 -1
- package/esm/utils/platform/exit-hook.d.ts +0 -1
- package/esm/utils/platform/exit-hook.js +0 -41
- package/esm/utils/platform/exit-hook.js.map +0 -1
- package/esm/utils/platform/exit-hook.web.d.ts +0 -1
- package/esm/utils/platform/exit-hook.web.js +0 -17
- package/esm/utils/platform/exit-hook.web.js.map +0 -1
- package/esm/utils/platform/logging.d.ts +0 -1
- package/esm/utils/platform/logging.js +0 -31
- package/esm/utils/platform/logging.js.map +0 -1
- package/esm/utils/platform/logging.web.d.ts +0 -1
- package/esm/utils/platform/logging.web.js +0 -31
- package/esm/utils/platform/logging.web.js.map +0 -1
- package/esm/utils/platform/transport.d.ts +0 -1
- package/esm/utils/platform/transport.js +0 -4
- package/esm/utils/platform/transport.js.map +0 -1
- package/esm/utils/platform/transport.web.d.ts +0 -1
- package/esm/utils/platform/transport.web.js +0 -12
- package/esm/utils/platform/transport.web.js.map +0 -1
- package/esm/utils/sorted-array.test.d.ts +0 -1
- package/esm/utils/sorted-array.test.js +0 -64
- package/esm/utils/sorted-array.test.js.map +0 -1
- package/esm/utils/tl-json.test.d.ts +0 -1
- package/esm/utils/tl-json.test.js +0 -81
- package/esm/utils/tl-json.test.js.map +0 -1
- package/esm/utils/type-assertions.test.d.ts +0 -1
- package/esm/utils/type-assertions.test.js +0 -65
- package/esm/utils/type-assertions.test.js.map +0 -1
- /package/cjs/highlevel/{base.test.d.ts → methods/files/download-node-stream.d.ts} +0 -0
- /package/cjs/storage/{providers/memory → memory}/driver.js +0 -0
- /package/cjs/storage/{providers/memory → memory}/index.js +0 -0
- /package/cjs/storage/{providers/memory → memory}/repository/auth-keys.js +0 -0
- /package/cjs/storage/{providers/memory → memory}/repository/kv.js +0 -0
- /package/cjs/storage/{providers/memory → memory}/repository/peers.js +0 -0
- /package/cjs/storage/{providers/memory → memory}/repository/ref-messages.js +0 -0
- /package/cjs/utils/{platform/error-reporting.js → error-reporting.js} +0 -0
- /package/{cjs/highlevel/methods/files/_platform.d.ts → esm/highlevel/methods/files/download-node-stream.d.ts} +0 -0
- /package/esm/storage/{providers/memory → memory}/driver.js +0 -0
- /package/esm/storage/{providers/memory → memory}/index.js +0 -0
- /package/esm/storage/{providers/memory → memory}/repository/auth-keys.js +0 -0
- /package/esm/storage/{providers/memory → memory}/repository/kv.js +0 -0
- /package/esm/storage/{providers/memory → memory}/repository/peers.js +0 -0
- /package/esm/storage/{providers/memory → memory}/repository/ref-messages.js +0 -0
- /package/esm/utils/{platform/error-reporting.js → error-reporting.js} +0 -0
|
@@ -1,162 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const vitest_1 = require("vitest");
|
|
4
|
-
const keyboard_builder_js_1 = require("./keyboard-builder.js");
|
|
5
|
-
(0, vitest_1.describe)('BotKeyboardBuilder', () => {
|
|
6
|
-
(0, vitest_1.describe)('#push', () => {
|
|
7
|
-
(0, vitest_1.it)('should add buttons', () => {
|
|
8
|
-
const builder = new keyboard_builder_js_1.BotKeyboardBuilder();
|
|
9
|
-
builder.push({ _: 'keyboardButton', text: '1' }, { _: 'keyboardButton', text: '2' }, { _: 'keyboardButton', text: '3' });
|
|
10
|
-
(0, vitest_1.expect)(builder.asInline()).toEqual({
|
|
11
|
-
type: 'inline',
|
|
12
|
-
buttons: [
|
|
13
|
-
[
|
|
14
|
-
{ _: 'keyboardButton', text: '1' },
|
|
15
|
-
{ _: 'keyboardButton', text: '2' },
|
|
16
|
-
{ _: 'keyboardButton', text: '3' },
|
|
17
|
-
],
|
|
18
|
-
],
|
|
19
|
-
});
|
|
20
|
-
});
|
|
21
|
-
(0, vitest_1.it)('should wrap long rows buttons', () => {
|
|
22
|
-
const builder = new keyboard_builder_js_1.BotKeyboardBuilder(3);
|
|
23
|
-
builder.push({ _: 'keyboardButton', text: '1' }, { _: 'keyboardButton', text: '2' }, { _: 'keyboardButton', text: '3' }, { _: 'keyboardButton', text: '4' });
|
|
24
|
-
(0, vitest_1.expect)(builder.asInline()).toEqual({
|
|
25
|
-
type: 'inline',
|
|
26
|
-
buttons: [
|
|
27
|
-
[
|
|
28
|
-
{ _: 'keyboardButton', text: '1' },
|
|
29
|
-
{ _: 'keyboardButton', text: '2' },
|
|
30
|
-
{ _: 'keyboardButton', text: '3' },
|
|
31
|
-
],
|
|
32
|
-
[{ _: 'keyboardButton', text: '4' }],
|
|
33
|
-
],
|
|
34
|
-
});
|
|
35
|
-
});
|
|
36
|
-
(0, vitest_1.it)('should always add a new row', () => {
|
|
37
|
-
const builder = new keyboard_builder_js_1.BotKeyboardBuilder(3);
|
|
38
|
-
builder.push({ _: 'keyboardButton', text: '1' });
|
|
39
|
-
builder.push({ _: 'keyboardButton', text: '2' });
|
|
40
|
-
builder.push({ _: 'keyboardButton', text: '3' });
|
|
41
|
-
(0, vitest_1.expect)(builder.asInline()).toEqual({
|
|
42
|
-
type: 'inline',
|
|
43
|
-
buttons: [
|
|
44
|
-
[{ _: 'keyboardButton', text: '1' }],
|
|
45
|
-
[{ _: 'keyboardButton', text: '2' }],
|
|
46
|
-
[{ _: 'keyboardButton', text: '3' }],
|
|
47
|
-
],
|
|
48
|
-
});
|
|
49
|
-
});
|
|
50
|
-
(0, vitest_1.it)('should accept functions and falsy values', () => {
|
|
51
|
-
const builder = new keyboard_builder_js_1.BotKeyboardBuilder(3);
|
|
52
|
-
builder.push({ _: 'keyboardButton', text: '1' });
|
|
53
|
-
builder.push(() => ({ _: 'keyboardButton', text: '2' }));
|
|
54
|
-
builder.push(1 > 1 && { _: 'keyboardButton', text: '3' });
|
|
55
|
-
(0, vitest_1.expect)(builder.asInline()).toEqual({
|
|
56
|
-
type: 'inline',
|
|
57
|
-
buttons: [[{ _: 'keyboardButton', text: '1' }], [{ _: 'keyboardButton', text: '2' }]],
|
|
58
|
-
});
|
|
59
|
-
});
|
|
60
|
-
});
|
|
61
|
-
(0, vitest_1.describe)('#append', () => {
|
|
62
|
-
(0, vitest_1.it)('should append (or wrap) to the last row', () => {
|
|
63
|
-
const builder = new keyboard_builder_js_1.BotKeyboardBuilder(3);
|
|
64
|
-
builder.append({ _: 'keyboardButton', text: '1' });
|
|
65
|
-
builder.append({ _: 'keyboardButton', text: '2' });
|
|
66
|
-
builder.append({ _: 'keyboardButton', text: '3' });
|
|
67
|
-
builder.append({ _: 'keyboardButton', text: '4' });
|
|
68
|
-
(0, vitest_1.expect)(builder.asInline()).toEqual({
|
|
69
|
-
type: 'inline',
|
|
70
|
-
buttons: [
|
|
71
|
-
[
|
|
72
|
-
{ _: 'keyboardButton', text: '1' },
|
|
73
|
-
{ _: 'keyboardButton', text: '2' },
|
|
74
|
-
{ _: 'keyboardButton', text: '3' },
|
|
75
|
-
],
|
|
76
|
-
[{ _: 'keyboardButton', text: '4' }],
|
|
77
|
-
],
|
|
78
|
-
});
|
|
79
|
-
});
|
|
80
|
-
(0, vitest_1.it)('accept functions and falsy values', () => {
|
|
81
|
-
const builder = new keyboard_builder_js_1.BotKeyboardBuilder(3);
|
|
82
|
-
builder.append({ _: 'keyboardButton', text: '1' });
|
|
83
|
-
builder.append(() => ({ _: 'keyboardButton', text: '2' }));
|
|
84
|
-
builder.append(1 > 1 && { _: 'keyboardButton', text: '3' });
|
|
85
|
-
(0, vitest_1.expect)(builder.asInline()).toEqual({
|
|
86
|
-
type: 'inline',
|
|
87
|
-
buttons: [
|
|
88
|
-
[
|
|
89
|
-
{ _: 'keyboardButton', text: '1' },
|
|
90
|
-
{ _: 'keyboardButton', text: '2' },
|
|
91
|
-
],
|
|
92
|
-
],
|
|
93
|
-
});
|
|
94
|
-
});
|
|
95
|
-
});
|
|
96
|
-
(0, vitest_1.it)('should accept custom row size', () => {
|
|
97
|
-
const builder = new keyboard_builder_js_1.BotKeyboardBuilder(5);
|
|
98
|
-
builder.append({ _: 'keyboardButton', text: '1' });
|
|
99
|
-
builder.append({ _: 'keyboardButton', text: '2' });
|
|
100
|
-
builder.append({ _: 'keyboardButton', text: '3' });
|
|
101
|
-
builder.append({ _: 'keyboardButton', text: '4' });
|
|
102
|
-
builder.append({ _: 'keyboardButton', text: '5' });
|
|
103
|
-
builder.append({ _: 'keyboardButton', text: '6' });
|
|
104
|
-
(0, vitest_1.expect)(builder.asInline()).toEqual({
|
|
105
|
-
type: 'inline',
|
|
106
|
-
buttons: [
|
|
107
|
-
[
|
|
108
|
-
{ _: 'keyboardButton', text: '1' },
|
|
109
|
-
{ _: 'keyboardButton', text: '2' },
|
|
110
|
-
{ _: 'keyboardButton', text: '3' },
|
|
111
|
-
{ _: 'keyboardButton', text: '4' },
|
|
112
|
-
{ _: 'keyboardButton', text: '5' },
|
|
113
|
-
],
|
|
114
|
-
[{ _: 'keyboardButton', text: '6' }],
|
|
115
|
-
],
|
|
116
|
-
});
|
|
117
|
-
});
|
|
118
|
-
(0, vitest_1.it)('#row should add entire rows of buttons', () => {
|
|
119
|
-
const builder = new keyboard_builder_js_1.BotKeyboardBuilder(3);
|
|
120
|
-
builder.row([
|
|
121
|
-
{ _: 'keyboardButton', text: '1' },
|
|
122
|
-
{ _: 'keyboardButton', text: '2' },
|
|
123
|
-
{ _: 'keyboardButton', text: '3' },
|
|
124
|
-
{ _: 'keyboardButton', text: '4' },
|
|
125
|
-
{ _: 'keyboardButton', text: '5' },
|
|
126
|
-
]);
|
|
127
|
-
builder.append({ _: 'keyboardButton', text: '6' });
|
|
128
|
-
(0, vitest_1.expect)(builder.asInline()).toEqual({
|
|
129
|
-
type: 'inline',
|
|
130
|
-
buttons: [
|
|
131
|
-
[
|
|
132
|
-
{ _: 'keyboardButton', text: '1' },
|
|
133
|
-
{ _: 'keyboardButton', text: '2' },
|
|
134
|
-
{ _: 'keyboardButton', text: '3' },
|
|
135
|
-
{ _: 'keyboardButton', text: '4' },
|
|
136
|
-
{ _: 'keyboardButton', text: '5' },
|
|
137
|
-
],
|
|
138
|
-
[{ _: 'keyboardButton', text: '6' }],
|
|
139
|
-
],
|
|
140
|
-
});
|
|
141
|
-
});
|
|
142
|
-
(0, vitest_1.it)('should support reply keyboards', () => {
|
|
143
|
-
const builder = new keyboard_builder_js_1.BotKeyboardBuilder(3);
|
|
144
|
-
builder.append({ _: 'keyboardButton', text: '1' });
|
|
145
|
-
builder.append({ _: 'keyboardButton', text: '2' });
|
|
146
|
-
builder.append({ _: 'keyboardButton', text: '3' });
|
|
147
|
-
builder.append({ _: 'keyboardButton', text: '4' });
|
|
148
|
-
(0, vitest_1.expect)(builder.asReply({ resize: true })).toEqual({
|
|
149
|
-
type: 'reply',
|
|
150
|
-
resize: true,
|
|
151
|
-
buttons: [
|
|
152
|
-
[
|
|
153
|
-
{ _: 'keyboardButton', text: '1' },
|
|
154
|
-
{ _: 'keyboardButton', text: '2' },
|
|
155
|
-
{ _: 'keyboardButton', text: '3' },
|
|
156
|
-
],
|
|
157
|
-
[{ _: 'keyboardButton', text: '4' }],
|
|
158
|
-
],
|
|
159
|
-
});
|
|
160
|
-
});
|
|
161
|
-
});
|
|
162
|
-
//# sourceMappingURL=keyboard-builder.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"keyboard-builder.test.js","sourceRoot":"","sources":["../../../../../src/highlevel/types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yboard-builder.js'\n\ndescribe('BotKeyboardBuilder', () => {\n describe('#push', () => {\n it('should add buttons', () => {\n const builder = new BotKeyboardBuilder()\n\n builder.push(\n { _: 'keyboardButton', text: '1' },\n { _: 'keyboardButton', text: '2' },\n { _: 'keyboardButton', text: '3' },\n )\n\n expect(builder.asInline()).toEqual({\n type: 'inline',\n buttons: [\n [\n { _: 'keyboardButton', text: '1' },\n { _: 'keyboardButton', text: '2' },\n { _: 'keyboardButton', text: '3' },\n ],\n ],\n })\n })\n\n it('should wrap long rows buttons', () => {\n const builder = new BotKeyboardBuilder(3)\n\n builder.push(\n { _: 'keyboardButton', text: '1' },\n { _: 'keyboardButton', text: '2' },\n { _: 'keyboardButton', text: '3' },\n { _: 'keyboardButton', text: '4' },\n )\n\n expect(builder.asInline()).toEqual({\n type: 'inline',\n buttons: [\n [\n { _: 'keyboardButton', text: '1' },\n { _: 'keyboardButton', text: '2' },\n { _: 'keyboardButton', text: '3' },\n ],\n [{ _: 'keyboardButton', text: '4' }],\n ],\n })\n })\n\n it('should always add a new row', () => {\n const builder = new BotKeyboardBuilder(3)\n\n builder.push({ _: 'keyboardButton', text: '1' })\n builder.push({ _: 'keyboardButton', text: '2' })\n builder.push({ _: 'keyboardButton', text: '3' })\n\n expect(builder.asInline()).toEqual({\n type: 'inline',\n buttons: [\n [{ _: 'keyboardButton', text: '1' }],\n [{ _: 'keyboardButton', text: '2' }],\n [{ _: 'keyboardButton', text: '3' }],\n ],\n })\n })\n\n it('should accept functions and falsy values', () => {\n const builder = new BotKeyboardBuilder(3)\n\n builder.push({ _: 'keyboardButton', text: '1' })\n builder.push(() => ({ _: 'keyboardButton', text: '2' }))\n builder.push(1 > 1 && { _: 'keyboardButton', text: '3' })\n\n expect(builder.asInline()).toEqual({\n type: 'inline',\n buttons: [[{ _: 'keyboardButton', text: '1' }], [{ _: 'keyboardButton', text: '2' }]],\n })\n })\n })\n\n describe('#append', () => {\n it('should append (or wrap) to the last row', () => {\n const builder = new BotKeyboardBuilder(3)\n\n builder.append({ _: 'keyboardButton', text: '1' })\n builder.append({ _: 'keyboardButton', text: '2' })\n builder.append({ _: 'keyboardButton', text: '3' })\n builder.append({ _: 'keyboardButton', text: '4' })\n\n expect(builder.asInline()).toEqual({\n type: 'inline',\n buttons: [\n [\n { _: 'keyboardButton', text: '1' },\n { _: 'keyboardButton', text: '2' },\n { _: 'keyboardButton', text: '3' },\n ],\n [{ _: 'keyboardButton', text: '4' }],\n ],\n })\n })\n\n it('accept functions and falsy values', () => {\n const builder = new BotKeyboardBuilder(3)\n\n builder.append({ _: 'keyboardButton', text: '1' })\n builder.append(() => ({ _: 'keyboardButton', text: '2' }))\n builder.append(1 > 1 && { _: 'keyboardButton', text: '3' })\n\n expect(builder.asInline()).toEqual({\n type: 'inline',\n buttons: [\n [\n { _: 'keyboardButton', text: '1' },\n { _: 'keyboardButton', text: '2' },\n ],\n ],\n })\n })\n })\n\n it('should accept custom row size', () => {\n const builder = new BotKeyboardBuilder(5)\n\n builder.append({ _: 'keyboardButton', text: '1' })\n builder.append({ _: 'keyboardButton', text: '2' })\n builder.append({ _: 'keyboardButton', text: '3' })\n builder.append({ _: 'keyboardButton', text: '4' })\n builder.append({ _: 'keyboardButton', text: '5' })\n builder.append({ _: 'keyboardButton', text: '6' })\n\n expect(builder.asInline()).toEqual({\n type: 'inline',\n buttons: [\n [\n { _: 'keyboardButton', text: '1' },\n { _: 'keyboardButton', text: '2' },\n { _: 'keyboardButton', text: '3' },\n { _: 'keyboardButton', text: '4' },\n { _: 'keyboardButton', text: '5' },\n ],\n [{ _: 'keyboardButton', text: '6' }],\n ],\n })\n })\n\n it('#row should add entire rows of buttons', () => {\n const builder = new BotKeyboardBuilder(3)\n\n builder.row([\n { _: 'keyboardButton', text: '1' },\n { _: 'keyboardButton', text: '2' },\n { _: 'keyboardButton', text: '3' },\n { _: 'keyboardButton', text: '4' },\n { _: 'keyboardButton', text: '5' },\n ])\n builder.append({ _: 'keyboardButton', text: '6' })\n\n expect(builder.asInline()).toEqual({\n type: 'inline',\n buttons: [\n [\n { _: 'keyboardButton', text: '1' },\n { _: 'keyboardButton', text: '2' },\n { _: 'keyboardButton', text: '3' },\n { _: 'keyboardButton', text: '4' },\n { _: 'keyboardButton', text: '5' },\n ],\n [{ _: 'keyboardButton', text: '6' }],\n ],\n })\n })\n\n it('should support reply keyboards', () => {\n const builder = new BotKeyboardBuilder(3)\n\n builder.append({ _: 'keyboardButton', text: '1' })\n builder.append({ _: 'keyboardButton', text: '2' })\n builder.append({ _: 'keyboardButton', text: '3' })\n builder.append({ _: 'keyboardButton', text: '4' })\n\n expect(builder.asReply({ resize: true })).toEqual({\n type: 'reply',\n resize: true,\n buttons: [\n [\n { _: 'keyboardButton', text: '1' },\n { _: 'keyboardButton', text: '2' },\n { _: 'keyboardButton', text: '3' },\n ],\n [{ _: 'keyboardButton', text: '4' }],\n ],\n })\n })\n})\n"]}
|
|
@@ -1,239 +0,0 @@
|
|
|
1
|
-
import { tl } from '@mtcute/tl';
|
|
2
|
-
import { BotKeyboardBuilder } from './keyboard-builder.js';
|
|
3
|
-
/**
|
|
4
|
-
* Reply keyboard markup
|
|
5
|
-
*/
|
|
6
|
-
export interface ReplyKeyboardMarkup extends Omit<tl.RawReplyKeyboardMarkup, '_' | 'rows'> {
|
|
7
|
-
readonly type: 'reply';
|
|
8
|
-
/**
|
|
9
|
-
* Two-dimensional array of buttons
|
|
10
|
-
*/
|
|
11
|
-
readonly buttons: tl.TypeKeyboardButton[][];
|
|
12
|
-
}
|
|
13
|
-
/**
|
|
14
|
-
* Hide previously sent bot keyboard
|
|
15
|
-
*/
|
|
16
|
-
export interface ReplyKeyboardHide extends Omit<tl.RawReplyKeyboardHide, '_'> {
|
|
17
|
-
readonly type: 'reply_hide';
|
|
18
|
-
}
|
|
19
|
-
/**
|
|
20
|
-
* Force the user to send a reply
|
|
21
|
-
*/
|
|
22
|
-
export interface ReplyKeyboardForceReply extends Omit<tl.RawReplyKeyboardForceReply, '_'> {
|
|
23
|
-
readonly type: 'force_reply';
|
|
24
|
-
}
|
|
25
|
-
/**
|
|
26
|
-
* Inline keyboard markup
|
|
27
|
-
*/
|
|
28
|
-
export interface InlineKeyboardMarkup {
|
|
29
|
-
readonly type: 'inline';
|
|
30
|
-
/**
|
|
31
|
-
* Two-dimensional array of buttons
|
|
32
|
-
*/
|
|
33
|
-
readonly buttons: tl.TypeKeyboardButton[][];
|
|
34
|
-
}
|
|
35
|
-
export type ReplyMarkup = ReplyKeyboardMarkup | ReplyKeyboardHide | ReplyKeyboardForceReply | InlineKeyboardMarkup | tl.TypeReplyMarkup;
|
|
36
|
-
/**
|
|
37
|
-
* Convenience methods wrapping TL
|
|
38
|
-
* objects creation for bot keyboard buttons.
|
|
39
|
-
*
|
|
40
|
-
* You can also use the type-discriminated objects directly.
|
|
41
|
-
*
|
|
42
|
-
* > **Note**: Button creation functions are intended to be used
|
|
43
|
-
* > with inline reply markup, unless stated otherwise
|
|
44
|
-
* > in the description.
|
|
45
|
-
*/
|
|
46
|
-
export declare namespace BotKeyboard {
|
|
47
|
-
/** Create a keyboard builder */
|
|
48
|
-
function builder(maxRowWidth?: number | null): BotKeyboardBuilder;
|
|
49
|
-
/**
|
|
50
|
-
* Create an inline keyboard markup
|
|
51
|
-
*
|
|
52
|
-
* @param buttons Two-dimensional array of buttons
|
|
53
|
-
*/
|
|
54
|
-
function inline(buttons: tl.TypeKeyboardButton[][]): InlineKeyboardMarkup;
|
|
55
|
-
/**
|
|
56
|
-
* Create a reply keyboard markup
|
|
57
|
-
*
|
|
58
|
-
* @param buttons Two-dimensional array of buttons
|
|
59
|
-
* @param params Additional parameters for the keyboard
|
|
60
|
-
*/
|
|
61
|
-
function reply(buttons: tl.TypeKeyboardButton[][], params?: Omit<ReplyKeyboardMarkup, 'type' | 'buttons'>): ReplyKeyboardMarkup;
|
|
62
|
-
/**
|
|
63
|
-
* Hide the previously sent reply keyboard
|
|
64
|
-
*
|
|
65
|
-
* @param selective
|
|
66
|
-
* Whether to remove the keyboard for specific users only. Targets:
|
|
67
|
-
* - users that are @mentioned in the text of the Message
|
|
68
|
-
* - in case this is a reply, sender of the original message
|
|
69
|
-
*/
|
|
70
|
-
function hideReply(selective?: boolean): ReplyKeyboardHide;
|
|
71
|
-
/**
|
|
72
|
-
* Force the user to send a reply
|
|
73
|
-
*/
|
|
74
|
-
function forceReply(params?: Omit<ReplyKeyboardForceReply, 'type'>): ReplyKeyboardForceReply;
|
|
75
|
-
/**
|
|
76
|
-
* Create a text-only keyboard button.
|
|
77
|
-
*
|
|
78
|
-
* Used for reply keyboards, not inline!
|
|
79
|
-
*
|
|
80
|
-
* @param text Button text
|
|
81
|
-
*/
|
|
82
|
-
function text(text: string): tl.RawKeyboardButton;
|
|
83
|
-
/**
|
|
84
|
-
* Create a keyboard button requesting for user's contact.
|
|
85
|
-
* Available only for private chats.
|
|
86
|
-
*
|
|
87
|
-
* Used for reply keyboards, not inline!
|
|
88
|
-
*
|
|
89
|
-
* @param text Button text
|
|
90
|
-
*/
|
|
91
|
-
function requestContact(text: string): tl.RawKeyboardButtonRequestPhone;
|
|
92
|
-
/**
|
|
93
|
-
* Create a keyboard button requesting for user's geo location.
|
|
94
|
-
* Available only for private chats.
|
|
95
|
-
*
|
|
96
|
-
* Used for reply keyboards, not inline!
|
|
97
|
-
*
|
|
98
|
-
* @param text Button text
|
|
99
|
-
*/
|
|
100
|
-
function requestGeo(text: string): tl.RawKeyboardButtonRequestGeoLocation;
|
|
101
|
-
/**
|
|
102
|
-
* Create a keyboard button requesting the user to create and send a poll.
|
|
103
|
-
* Available only for private chats.
|
|
104
|
-
*
|
|
105
|
-
* Used for reply keyboards, not inline!
|
|
106
|
-
*
|
|
107
|
-
* @param text Button text
|
|
108
|
-
* @param quiz If set, only quiz polls can be sent
|
|
109
|
-
*/
|
|
110
|
-
function requestPoll(text: string, quiz?: boolean): tl.RawKeyboardButtonRequestPoll;
|
|
111
|
-
/**
|
|
112
|
-
* Create a keyboard button with a link.
|
|
113
|
-
*
|
|
114
|
-
* Used for inline keyboards, not reply!
|
|
115
|
-
*
|
|
116
|
-
* @param text Button text
|
|
117
|
-
* @param url URL
|
|
118
|
-
*/
|
|
119
|
-
function url(text: string, url: string): tl.RawKeyboardButtonUrl;
|
|
120
|
-
/**
|
|
121
|
-
* Create a keyboard button with a link.
|
|
122
|
-
*
|
|
123
|
-
* Used for inline keyboards, not reply!
|
|
124
|
-
*
|
|
125
|
-
* @param text Button text
|
|
126
|
-
* @param data Callback data (1-64 bytes). String will be converted to `Buffer`
|
|
127
|
-
* @param requiresPassword
|
|
128
|
-
* Whether the user should verify their identity by entering 2FA password.
|
|
129
|
-
* See more: {@link tl.RawKeyboardButtonCallback#requiresPassword}
|
|
130
|
-
*/
|
|
131
|
-
function callback(text: string, data: string | Uint8Array, requiresPassword?: boolean): tl.RawKeyboardButtonCallback;
|
|
132
|
-
/**
|
|
133
|
-
* Button to force a user to switch to inline mode.
|
|
134
|
-
*
|
|
135
|
-
* Pressing the button will prompt the user to select
|
|
136
|
-
* one of their chats, open that chat and insert the bot‘s
|
|
137
|
-
* username and the specified inline query (if any) in the input field.
|
|
138
|
-
*
|
|
139
|
-
* Used for inline keyboards, not reply!
|
|
140
|
-
*
|
|
141
|
-
* @param text Button text
|
|
142
|
-
* @param query Inline query (can be empty or omitted)
|
|
143
|
-
* @param currentChat
|
|
144
|
-
* If set, pressing the button will insert the bot's username
|
|
145
|
-
* and the specified inline query in the current chat's input field
|
|
146
|
-
*/
|
|
147
|
-
function switchInline(text: string, query?: string, currentChat?: boolean): tl.RawKeyboardButtonSwitchInline;
|
|
148
|
-
/**
|
|
149
|
-
* Button to start a game
|
|
150
|
-
*
|
|
151
|
-
* Used for inline keyboards, not reply!
|
|
152
|
-
*
|
|
153
|
-
* **Note**: This type of button must always be
|
|
154
|
-
* the first button in the first row. ID of the
|
|
155
|
-
* game is inferred from {@link InputMedia.game},
|
|
156
|
-
* thus this button should only be used with it.
|
|
157
|
-
*/
|
|
158
|
-
function game(text: string): tl.RawKeyboardButtonGame;
|
|
159
|
-
/**
|
|
160
|
-
* Button to pay for a product.
|
|
161
|
-
*
|
|
162
|
-
* Used for inline keyboards, not reply!
|
|
163
|
-
*
|
|
164
|
-
* **Note**: This type of button must always be
|
|
165
|
-
* the first button in the first row. Related
|
|
166
|
-
* invoice is inferred from {@link InputMedia.invoice},
|
|
167
|
-
* thus this button should only be used with it.
|
|
168
|
-
*/
|
|
169
|
-
function pay(text: string): tl.RawKeyboardButtonBuy;
|
|
170
|
-
/**
|
|
171
|
-
* Button to authorize a user
|
|
172
|
-
*
|
|
173
|
-
* Used for inline keyboards, not reply!
|
|
174
|
-
*
|
|
175
|
-
* @param text Button label
|
|
176
|
-
* @param url Authorization URL (see {@link tl.RawInputKeyboardButtonUrlAuth})
|
|
177
|
-
* @param params
|
|
178
|
-
*/
|
|
179
|
-
function urlAuth(text: string, url: string, params?: {
|
|
180
|
-
/**
|
|
181
|
-
* Button label when forwarded
|
|
182
|
-
*/
|
|
183
|
-
fwdText?: string;
|
|
184
|
-
/**
|
|
185
|
-
* Whether to request the permission for
|
|
186
|
-
* your bot to send messages to the user
|
|
187
|
-
*/
|
|
188
|
-
requestWriteAccess?: boolean;
|
|
189
|
-
/**
|
|
190
|
-
* Bot, which will be used for user authorization.
|
|
191
|
-
* `url` domain must be the same as the domain linked
|
|
192
|
-
* with the bot.
|
|
193
|
-
*
|
|
194
|
-
* @default current bot
|
|
195
|
-
*/
|
|
196
|
-
bot?: tl.TypeInputUser;
|
|
197
|
-
}): tl.RawInputKeyboardButtonUrlAuth;
|
|
198
|
-
/**
|
|
199
|
-
* Button to open webview
|
|
200
|
-
*
|
|
201
|
-
* Used for both inline keyboards and reply ones
|
|
202
|
-
*
|
|
203
|
-
* @param text Button label
|
|
204
|
-
* @param url WebView URL
|
|
205
|
-
*/
|
|
206
|
-
function webView(text: string, url: string): tl.RawKeyboardButtonWebView;
|
|
207
|
-
/**
|
|
208
|
-
* Button to open user profile
|
|
209
|
-
*
|
|
210
|
-
* @param text Text of the button
|
|
211
|
-
* @param user User to be opened (use {@link TelegramClient.resolvePeer})
|
|
212
|
-
*/
|
|
213
|
-
function userProfile(text: string, user: tl.TypeInputPeer): tl.RawInputKeyboardButtonUserProfile;
|
|
214
|
-
/**
|
|
215
|
-
* Button to request a peer from the user
|
|
216
|
-
*
|
|
217
|
-
* @param text Text of the button
|
|
218
|
-
* @param buttonId ID of the button that will later be passed to the service message
|
|
219
|
-
*/
|
|
220
|
-
function requestPeer(text: string, buttonId: number, params: {
|
|
221
|
-
/**
|
|
222
|
-
* Peer type, along with filters
|
|
223
|
-
*/
|
|
224
|
-
peerType: tl.TypeRequestPeerType;
|
|
225
|
-
/**
|
|
226
|
-
* Maximum number of peers to be selected
|
|
227
|
-
*
|
|
228
|
-
* @default 1
|
|
229
|
-
*/
|
|
230
|
-
count?: number;
|
|
231
|
-
}): tl.RawKeyboardButtonRequestPeer;
|
|
232
|
-
/**
|
|
233
|
-
* Find a button in the keyboard by its text or by predicate
|
|
234
|
-
*
|
|
235
|
-
* @param buttons Two-dimensional array of buttons
|
|
236
|
-
* @param predicate Button text or predicate function
|
|
237
|
-
*/
|
|
238
|
-
function findButton(buttons: tl.TypeKeyboardButton[][], predicate: string | ((btn: tl.TypeKeyboardButton) => boolean)): tl.TypeKeyboardButton | null;
|
|
239
|
-
}
|