@mtcute/core 0.7.2 → 0.8.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/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 +17 -13
- 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/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/authorization.js +1 -0
- package/cjs/network/authorization.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/mtproto-session.d.ts +1 -0
- package/cjs/network/mtproto-session.js +7 -1
- package/cjs/network/mtproto-session.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 +21 -7
- 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 +1 -2
- package/cjs/storage/index.js +1 -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/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 +17 -13
- 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/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/authorization.js +1 -0
- package/esm/network/authorization.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/mtproto-session.d.ts +1 -0
- package/esm/network/mtproto-session.js +7 -1
- package/esm/network/mtproto-session.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 +21 -7
- 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 +1 -2
- package/esm/storage/index.js +1 -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/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 +24 -52
- 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
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
import { tl } from '@mtcute/tl';
|
|
2
|
+
import { InputFileLike } from '../../files/utils.js';
|
|
3
|
+
import { CaptionMixin, InputMediaAudio, InputMediaAuto, InputMediaContact, InputMediaDice, InputMediaDocument, InputMediaGame, InputMediaGeo, InputMediaGeoLive, InputMediaInvoice, InputMediaLike, InputMediaPhoto, InputMediaPoll, InputMediaQuiz, InputMediaSticker, InputMediaStory, InputMediaVenue, InputMediaVideo, InputMediaVoice, InputMediaWebpage } from './types.js';
|
|
4
|
+
/** Omit `type` and `file` from the given type */
|
|
5
|
+
export type OmitTypeAndFile<T extends InputMediaLike, K extends keyof T = never> = Omit<T, 'type' | 'file' | K>;
|
|
6
|
+
/**
|
|
7
|
+
* Create an animation to be sent
|
|
8
|
+
*
|
|
9
|
+
* @param file Animation
|
|
10
|
+
* @param params Additional parameters
|
|
11
|
+
*/
|
|
12
|
+
export declare function animation(file: InputFileLike, params?: OmitTypeAndFile<InputMediaVideo>): InputMediaVideo;
|
|
13
|
+
/**
|
|
14
|
+
* Create an audio to be sent
|
|
15
|
+
*
|
|
16
|
+
* @param file Audio file
|
|
17
|
+
* @param params Additional parameters
|
|
18
|
+
*/
|
|
19
|
+
export declare function audio(file: InputFileLike, params?: OmitTypeAndFile<InputMediaAudio>): InputMediaAudio;
|
|
20
|
+
/**
|
|
21
|
+
* Create an document to be sent
|
|
22
|
+
*
|
|
23
|
+
* @param file Document
|
|
24
|
+
* @param params Additional parameters
|
|
25
|
+
*/
|
|
26
|
+
export declare function document(file: InputFileLike, params?: OmitTypeAndFile<InputMediaDocument>): InputMediaDocument;
|
|
27
|
+
/**
|
|
28
|
+
* Create an photo to be sent
|
|
29
|
+
*
|
|
30
|
+
* @param file Photo
|
|
31
|
+
* @param params Additional parameters
|
|
32
|
+
*/
|
|
33
|
+
export declare function photo(file: InputFileLike, params?: OmitTypeAndFile<InputMediaPhoto>): InputMediaPhoto;
|
|
34
|
+
/**
|
|
35
|
+
* Create an video to be sent
|
|
36
|
+
*
|
|
37
|
+
* @param file Video
|
|
38
|
+
* @param params Additional parameters
|
|
39
|
+
*/
|
|
40
|
+
export declare function video(file: InputFileLike, params?: OmitTypeAndFile<InputMediaVideo>): InputMediaVideo;
|
|
41
|
+
/**
|
|
42
|
+
* Create a voice note to be sent
|
|
43
|
+
*
|
|
44
|
+
* @param file Voice note
|
|
45
|
+
* @param params Additional parameters
|
|
46
|
+
*/
|
|
47
|
+
export declare function voice(file: InputFileLike, params?: OmitTypeAndFile<InputMediaVoice>): InputMediaVoice;
|
|
48
|
+
/**
|
|
49
|
+
* Create a sticker to be sent
|
|
50
|
+
*
|
|
51
|
+
* @param file Sticker
|
|
52
|
+
* @param params Additional parameters
|
|
53
|
+
*/
|
|
54
|
+
export declare function sticker(file: InputFileLike, params?: OmitTypeAndFile<InputMediaSticker>): InputMediaSticker;
|
|
55
|
+
/**
|
|
56
|
+
* Create a venue to be sent
|
|
57
|
+
*
|
|
58
|
+
* @param params Venue parameters
|
|
59
|
+
*/
|
|
60
|
+
export declare function venue(params: OmitTypeAndFile<InputMediaVenue>): InputMediaVenue;
|
|
61
|
+
/**
|
|
62
|
+
* Create a geolocation to be sent
|
|
63
|
+
*
|
|
64
|
+
* @param latitude Latitude of the location
|
|
65
|
+
* @param longitude Longitude of the location
|
|
66
|
+
* @param params Additional parameters
|
|
67
|
+
*/
|
|
68
|
+
export declare function geo(latitude: number, longitude: number, params?: OmitTypeAndFile<InputMediaGeo, 'latitude' | 'longitude'>): InputMediaGeo;
|
|
69
|
+
/**
|
|
70
|
+
* Create a live geolocation to be sent
|
|
71
|
+
*
|
|
72
|
+
* @param latitude Latitude of the current location
|
|
73
|
+
* @param longitude Longitude of the current location
|
|
74
|
+
* @param params Additional parameters
|
|
75
|
+
*/
|
|
76
|
+
export declare function geoLive(latitude: number, longitude: number, params?: OmitTypeAndFile<InputMediaGeoLive, 'latitude' | 'longitude'>): InputMediaGeoLive;
|
|
77
|
+
/**
|
|
78
|
+
* Create a dice to be sent
|
|
79
|
+
*
|
|
80
|
+
* For convenience, known dice emojis are available
|
|
81
|
+
* as static members of {@link Dice}.
|
|
82
|
+
*
|
|
83
|
+
* @param emoji Emoji representing the dice
|
|
84
|
+
* @param params Additional parameters
|
|
85
|
+
*/
|
|
86
|
+
export declare function dice(emoji: string, params: CaptionMixin): InputMediaDice;
|
|
87
|
+
/**
|
|
88
|
+
* Create a contact to be sent
|
|
89
|
+
*
|
|
90
|
+
* @param params Contact parameters
|
|
91
|
+
*/
|
|
92
|
+
export declare function contact(params: OmitTypeAndFile<InputMediaContact>): InputMediaContact;
|
|
93
|
+
/**
|
|
94
|
+
* Create a game to be sent
|
|
95
|
+
*
|
|
96
|
+
* @param game Game short name or TL object representing one
|
|
97
|
+
*/
|
|
98
|
+
export declare function game(game: string | tl.TypeInputGame): InputMediaGame;
|
|
99
|
+
/**
|
|
100
|
+
* Create an invoice to be sent
|
|
101
|
+
*
|
|
102
|
+
* @param params Invoice parameters
|
|
103
|
+
*/
|
|
104
|
+
export declare function invoice(params: OmitTypeAndFile<InputMediaInvoice>): InputMediaInvoice;
|
|
105
|
+
/**
|
|
106
|
+
* Create a poll to be sent
|
|
107
|
+
*
|
|
108
|
+
* @param params Poll parameters
|
|
109
|
+
*/
|
|
110
|
+
export declare function poll(params: OmitTypeAndFile<InputMediaPoll>): InputMediaPoll;
|
|
111
|
+
/**
|
|
112
|
+
* Create a quiz to be sent
|
|
113
|
+
*
|
|
114
|
+
* @param params Quiz parameters
|
|
115
|
+
*/
|
|
116
|
+
export declare function quiz(params: OmitTypeAndFile<InputMediaQuiz>): InputMediaQuiz;
|
|
117
|
+
/**
|
|
118
|
+
* Create a story to be sent
|
|
119
|
+
*
|
|
120
|
+
* @param params Story parameters
|
|
121
|
+
*/
|
|
122
|
+
export declare function story(params: OmitTypeAndFile<InputMediaStory>): InputMediaStory;
|
|
123
|
+
/**
|
|
124
|
+
* Create a webpage to be sent
|
|
125
|
+
*
|
|
126
|
+
* @param url Webpage URL
|
|
127
|
+
* @param params Additional parameters
|
|
128
|
+
*/
|
|
129
|
+
export declare function webpage(url: string, params?: OmitTypeAndFile<InputMediaWebpage, 'url'>): InputMediaWebpage;
|
|
130
|
+
/**
|
|
131
|
+
* Create a document to be sent, which subtype
|
|
132
|
+
* is inferred automatically by file contents.
|
|
133
|
+
*
|
|
134
|
+
* Photo type is only inferred for reused files,
|
|
135
|
+
* newly uploaded photos with `auto` will be
|
|
136
|
+
* uploaded as a document
|
|
137
|
+
*
|
|
138
|
+
* @param file The media file
|
|
139
|
+
* @param params Additional parameters
|
|
140
|
+
*/
|
|
141
|
+
export declare function auto(file: InputFileLike, params?: OmitTypeAndFile<InputMediaAuto>): InputMediaAuto;
|
|
@@ -0,0 +1,250 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.auto = exports.webpage = exports.story = exports.quiz = exports.poll = exports.invoice = exports.game = exports.contact = exports.dice = exports.geoLive = exports.geo = exports.venue = exports.sticker = exports.voice = exports.video = exports.photo = exports.document = exports.audio = exports.animation = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Create an animation to be sent
|
|
6
|
+
*
|
|
7
|
+
* @param file Animation
|
|
8
|
+
* @param params Additional parameters
|
|
9
|
+
*/
|
|
10
|
+
function animation(file, params = {}) {
|
|
11
|
+
const ret = params;
|
|
12
|
+
ret.type = 'video';
|
|
13
|
+
ret.file = file;
|
|
14
|
+
ret.isAnimated = true;
|
|
15
|
+
return ret;
|
|
16
|
+
}
|
|
17
|
+
exports.animation = animation;
|
|
18
|
+
/**
|
|
19
|
+
* Create an audio to be sent
|
|
20
|
+
*
|
|
21
|
+
* @param file Audio file
|
|
22
|
+
* @param params Additional parameters
|
|
23
|
+
*/
|
|
24
|
+
function audio(file, params = {}) {
|
|
25
|
+
const ret = params;
|
|
26
|
+
ret.type = 'audio';
|
|
27
|
+
ret.file = file;
|
|
28
|
+
return ret;
|
|
29
|
+
}
|
|
30
|
+
exports.audio = audio;
|
|
31
|
+
/**
|
|
32
|
+
* Create an document to be sent
|
|
33
|
+
*
|
|
34
|
+
* @param file Document
|
|
35
|
+
* @param params Additional parameters
|
|
36
|
+
*/
|
|
37
|
+
function document(file, params = {}) {
|
|
38
|
+
const ret = params;
|
|
39
|
+
ret.type = 'document';
|
|
40
|
+
ret.file = file;
|
|
41
|
+
return ret;
|
|
42
|
+
}
|
|
43
|
+
exports.document = document;
|
|
44
|
+
/**
|
|
45
|
+
* Create an photo to be sent
|
|
46
|
+
*
|
|
47
|
+
* @param file Photo
|
|
48
|
+
* @param params Additional parameters
|
|
49
|
+
*/
|
|
50
|
+
function photo(file, params = {}) {
|
|
51
|
+
const ret = params;
|
|
52
|
+
ret.type = 'photo';
|
|
53
|
+
ret.file = file;
|
|
54
|
+
return ret;
|
|
55
|
+
}
|
|
56
|
+
exports.photo = photo;
|
|
57
|
+
/**
|
|
58
|
+
* Create an video to be sent
|
|
59
|
+
*
|
|
60
|
+
* @param file Video
|
|
61
|
+
* @param params Additional parameters
|
|
62
|
+
*/
|
|
63
|
+
function video(file, params = {}) {
|
|
64
|
+
const ret = params;
|
|
65
|
+
ret.type = 'video';
|
|
66
|
+
ret.file = file;
|
|
67
|
+
return ret;
|
|
68
|
+
}
|
|
69
|
+
exports.video = video;
|
|
70
|
+
/**
|
|
71
|
+
* Create a voice note to be sent
|
|
72
|
+
*
|
|
73
|
+
* @param file Voice note
|
|
74
|
+
* @param params Additional parameters
|
|
75
|
+
*/
|
|
76
|
+
function voice(file, params = {}) {
|
|
77
|
+
const ret = params;
|
|
78
|
+
ret.type = 'voice';
|
|
79
|
+
ret.file = file;
|
|
80
|
+
return ret;
|
|
81
|
+
}
|
|
82
|
+
exports.voice = voice;
|
|
83
|
+
/**
|
|
84
|
+
* Create a sticker to be sent
|
|
85
|
+
*
|
|
86
|
+
* @param file Sticker
|
|
87
|
+
* @param params Additional parameters
|
|
88
|
+
*/
|
|
89
|
+
function sticker(file, params = {}) {
|
|
90
|
+
const ret = params;
|
|
91
|
+
ret.type = 'sticker';
|
|
92
|
+
ret.file = file;
|
|
93
|
+
return ret;
|
|
94
|
+
}
|
|
95
|
+
exports.sticker = sticker;
|
|
96
|
+
/**
|
|
97
|
+
* Create a venue to be sent
|
|
98
|
+
*
|
|
99
|
+
* @param params Venue parameters
|
|
100
|
+
*/
|
|
101
|
+
function venue(params) {
|
|
102
|
+
const ret = params;
|
|
103
|
+
ret.type = 'venue';
|
|
104
|
+
return ret;
|
|
105
|
+
}
|
|
106
|
+
exports.venue = venue;
|
|
107
|
+
/**
|
|
108
|
+
* Create a geolocation to be sent
|
|
109
|
+
*
|
|
110
|
+
* @param latitude Latitude of the location
|
|
111
|
+
* @param longitude Longitude of the location
|
|
112
|
+
* @param params Additional parameters
|
|
113
|
+
*/
|
|
114
|
+
function geo(latitude, longitude, params = {}) {
|
|
115
|
+
const ret = params;
|
|
116
|
+
ret.type = 'geo';
|
|
117
|
+
ret.latitude = latitude;
|
|
118
|
+
ret.longitude = longitude;
|
|
119
|
+
return ret;
|
|
120
|
+
}
|
|
121
|
+
exports.geo = geo;
|
|
122
|
+
/**
|
|
123
|
+
* Create a live geolocation to be sent
|
|
124
|
+
*
|
|
125
|
+
* @param latitude Latitude of the current location
|
|
126
|
+
* @param longitude Longitude of the current location
|
|
127
|
+
* @param params Additional parameters
|
|
128
|
+
*/
|
|
129
|
+
function geoLive(latitude, longitude, params = {}) {
|
|
130
|
+
const ret = params;
|
|
131
|
+
ret.type = 'geo_live';
|
|
132
|
+
ret.latitude = latitude;
|
|
133
|
+
ret.longitude = longitude;
|
|
134
|
+
return ret;
|
|
135
|
+
}
|
|
136
|
+
exports.geoLive = geoLive;
|
|
137
|
+
/**
|
|
138
|
+
* Create a dice to be sent
|
|
139
|
+
*
|
|
140
|
+
* For convenience, known dice emojis are available
|
|
141
|
+
* as static members of {@link Dice}.
|
|
142
|
+
*
|
|
143
|
+
* @param emoji Emoji representing the dice
|
|
144
|
+
* @param params Additional parameters
|
|
145
|
+
*/
|
|
146
|
+
function dice(emoji, params) {
|
|
147
|
+
const ret = params;
|
|
148
|
+
ret.type = 'dice';
|
|
149
|
+
return ret;
|
|
150
|
+
}
|
|
151
|
+
exports.dice = dice;
|
|
152
|
+
/**
|
|
153
|
+
* Create a contact to be sent
|
|
154
|
+
*
|
|
155
|
+
* @param params Contact parameters
|
|
156
|
+
*/
|
|
157
|
+
function contact(params) {
|
|
158
|
+
const ret = params;
|
|
159
|
+
ret.type = 'contact';
|
|
160
|
+
return ret;
|
|
161
|
+
}
|
|
162
|
+
exports.contact = contact;
|
|
163
|
+
/**
|
|
164
|
+
* Create a game to be sent
|
|
165
|
+
*
|
|
166
|
+
* @param game Game short name or TL object representing one
|
|
167
|
+
*/
|
|
168
|
+
function game(game) {
|
|
169
|
+
return {
|
|
170
|
+
type: 'game',
|
|
171
|
+
game,
|
|
172
|
+
};
|
|
173
|
+
}
|
|
174
|
+
exports.game = game;
|
|
175
|
+
/**
|
|
176
|
+
* Create an invoice to be sent
|
|
177
|
+
*
|
|
178
|
+
* @param params Invoice parameters
|
|
179
|
+
*/
|
|
180
|
+
function invoice(params) {
|
|
181
|
+
const ret = params;
|
|
182
|
+
ret.type = 'invoice';
|
|
183
|
+
return ret;
|
|
184
|
+
}
|
|
185
|
+
exports.invoice = invoice;
|
|
186
|
+
/**
|
|
187
|
+
* Create a poll to be sent
|
|
188
|
+
*
|
|
189
|
+
* @param params Poll parameters
|
|
190
|
+
*/
|
|
191
|
+
function poll(params) {
|
|
192
|
+
const ret = params;
|
|
193
|
+
ret.type = 'poll';
|
|
194
|
+
return ret;
|
|
195
|
+
}
|
|
196
|
+
exports.poll = poll;
|
|
197
|
+
/**
|
|
198
|
+
* Create a quiz to be sent
|
|
199
|
+
*
|
|
200
|
+
* @param params Quiz parameters
|
|
201
|
+
*/
|
|
202
|
+
function quiz(params) {
|
|
203
|
+
const ret = params;
|
|
204
|
+
ret.type = 'quiz';
|
|
205
|
+
return ret;
|
|
206
|
+
}
|
|
207
|
+
exports.quiz = quiz;
|
|
208
|
+
/**
|
|
209
|
+
* Create a story to be sent
|
|
210
|
+
*
|
|
211
|
+
* @param params Story parameters
|
|
212
|
+
*/
|
|
213
|
+
function story(params) {
|
|
214
|
+
const ret = params;
|
|
215
|
+
ret.type = 'story';
|
|
216
|
+
return ret;
|
|
217
|
+
}
|
|
218
|
+
exports.story = story;
|
|
219
|
+
/**
|
|
220
|
+
* Create a webpage to be sent
|
|
221
|
+
*
|
|
222
|
+
* @param url Webpage URL
|
|
223
|
+
* @param params Additional parameters
|
|
224
|
+
*/
|
|
225
|
+
function webpage(url, params = {}) {
|
|
226
|
+
const ret = params;
|
|
227
|
+
ret.type = 'webpage';
|
|
228
|
+
ret.url = url;
|
|
229
|
+
return ret;
|
|
230
|
+
}
|
|
231
|
+
exports.webpage = webpage;
|
|
232
|
+
/**
|
|
233
|
+
* Create a document to be sent, which subtype
|
|
234
|
+
* is inferred automatically by file contents.
|
|
235
|
+
*
|
|
236
|
+
* Photo type is only inferred for reused files,
|
|
237
|
+
* newly uploaded photos with `auto` will be
|
|
238
|
+
* uploaded as a document
|
|
239
|
+
*
|
|
240
|
+
* @param file The media file
|
|
241
|
+
* @param params Additional parameters
|
|
242
|
+
*/
|
|
243
|
+
function auto(file, params = {}) {
|
|
244
|
+
const ret = params;
|
|
245
|
+
ret.type = 'auto';
|
|
246
|
+
ret.file = file;
|
|
247
|
+
return ret;
|
|
248
|
+
}
|
|
249
|
+
exports.auto = auto;
|
|
250
|
+
//# sourceMappingURL=factories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"factories.js","sourceRoot":"","sources":["../../../../../../src/highlevel/types/media/input-media/factories.ts"],"names":[],"mappings":";;;AA6BA;;;;;GAKG;AACH,SAAgB,SAAS,CAAC,IAAmB,EAAE,SAA2C,EAAE;IACxF,MAAM,GAAG,GAAG,MAAqC,CAAA;IACjD,GAAG,CAAC,IAAI,GAAG,OAAO,CAAA;IAClB,GAAG,CAAC,IAAI,GAAG,IAAI,CAAA;IACf,GAAG,CAAC,UAAU,GAAG,IAAI,CAAA;IAErB,OAAO,GAAG,CAAA;AACd,CAAC;AAPD,8BAOC;AAED;;;;;GAKG;AACH,SAAgB,KAAK,CAAC,IAAmB,EAAE,SAA2C,EAAE;IACpF,MAAM,GAAG,GAAG,MAAqC,CAAA;IACjD,GAAG,CAAC,IAAI,GAAG,OAAO,CAAA;IAClB,GAAG,CAAC,IAAI,GAAG,IAAI,CAAA;IAEf,OAAO,GAAG,CAAA;AACd,CAAC;AAND,sBAMC;AAED;;;;;GAKG;AACH,SAAgB,QAAQ,CAAC,IAAmB,EAAE,SAA8C,EAAE;IAC1F,MAAM,GAAG,GAAG,MAAwC,CAAA;IACpD,GAAG,CAAC,IAAI,GAAG,UAAU,CAAA;IACrB,GAAG,CAAC,IAAI,GAAG,IAAI,CAAA;IAEf,OAAO,GAAG,CAAA;AACd,CAAC;AAND,4BAMC;AAED;;;;;GAKG;AACH,SAAgB,KAAK,CAAC,IAAmB,EAAE,SAA2C,EAAE;IACpF,MAAM,GAAG,GAAG,MAAqC,CAAA;IACjD,GAAG,CAAC,IAAI,GAAG,OAAO,CAAA;IAClB,GAAG,CAAC,IAAI,GAAG,IAAI,CAAA;IAEf,OAAO,GAAG,CAAA;AACd,CAAC;AAND,sBAMC;AAED;;;;;GAKG;AACH,SAAgB,KAAK,CAAC,IAAmB,EAAE,SAA2C,EAAE;IACpF,MAAM,GAAG,GAAG,MAAqC,CAAA;IACjD,GAAG,CAAC,IAAI,GAAG,OAAO,CAAA;IAClB,GAAG,CAAC,IAAI,GAAG,IAAI,CAAA;IAEf,OAAO,GAAG,CAAA;AACd,CAAC;AAND,sBAMC;AAED;;;;;GAKG;AACH,SAAgB,KAAK,CAAC,IAAmB,EAAE,SAA2C,EAAE;IACpF,MAAM,GAAG,GAAG,MAAqC,CAAA;IACjD,GAAG,CAAC,IAAI,GAAG,OAAO,CAAA;IAClB,GAAG,CAAC,IAAI,GAAG,IAAI,CAAA;IAEf,OAAO,GAAG,CAAA;AACd,CAAC;AAND,sBAMC;AAED;;;;;GAKG;AACH,SAAgB,OAAO,CAAC,IAAmB,EAAE,SAA6C,EAAE;IACxF,MAAM,GAAG,GAAG,MAAuC,CAAA;IACnD,GAAG,CAAC,IAAI,GAAG,SAAS,CAAA;IACpB,GAAG,CAAC,IAAI,GAAG,IAAI,CAAA;IAEf,OAAO,GAAG,CAAA;AACd,CAAC;AAND,0BAMC;AAED;;;;GAIG;AACH,SAAgB,KAAK,CAAC,MAAwC;IAC1D,MAAM,GAAG,GAAG,MAAqC,CAAA;IACjD,GAAG,CAAC,IAAI,GAAG,OAAO,CAAA;IAElB,OAAO,GAAG,CAAA;AACd,CAAC;AALD,sBAKC;AAED;;;;;;GAMG;AACH,SAAgB,GAAG,CACf,QAAgB,EAChB,SAAiB,EACjB,SAAmE,EAAE;IAErE,MAAM,GAAG,GAAG,MAAmC,CAAA;IAC/C,GAAG,CAAC,IAAI,GAAG,KAAK,CAAA;IAChB,GAAG,CAAC,QAAQ,GAAG,QAAQ,CAAA;IACvB,GAAG,CAAC,SAAS,GAAG,SAAS,CAAA;IAEzB,OAAO,GAAG,CAAA;AACd,CAAC;AAXD,kBAWC;AAED;;;;;;GAMG;AACH,SAAgB,OAAO,CACnB,QAAgB,EAChB,SAAiB,EACjB,SAAuE,EAAE;IAEzE,MAAM,GAAG,GAAG,MAAuC,CAAA;IACnD,GAAG,CAAC,IAAI,GAAG,UAAU,CAAA;IACrB,GAAG,CAAC,QAAQ,GAAG,QAAQ,CAAA;IACvB,GAAG,CAAC,SAAS,GAAG,SAAS,CAAA;IAEzB,OAAO,GAAG,CAAA;AACd,CAAC;AAXD,0BAWC;AAED;;;;;;;;GAQG;AACH,SAAgB,IAAI,CAAC,KAAa,EAAE,MAAoB;IACpD,MAAM,GAAG,GAAG,MAAoC,CAAA;IAChD,GAAG,CAAC,IAAI,GAAG,MAAM,CAAA;IAEjB,OAAO,GAAG,CAAA;AACd,CAAC;AALD,oBAKC;AAED;;;;GAIG;AACH,SAAgB,OAAO,CAAC,MAA0C;IAC9D,MAAM,GAAG,GAAG,MAAuC,CAAA;IACnD,GAAG,CAAC,IAAI,GAAG,SAAS,CAAA;IAEpB,OAAO,GAAG,CAAA;AACd,CAAC;AALD,0BAKC;AAED;;;;GAIG;AACH,SAAgB,IAAI,CAAC,IAA+B;IAChD,OAAO;QACH,IAAI,EAAE,MAAM;QACZ,IAAI;KACP,CAAA;AACL,CAAC;AALD,oBAKC;AAED;;;;GAIG;AACH,SAAgB,OAAO,CAAC,MAA0C;IAC9D,MAAM,GAAG,GAAG,MAAuC,CAAA;IACnD,GAAG,CAAC,IAAI,GAAG,SAAS,CAAA;IAEpB,OAAO,GAAG,CAAA;AACd,CAAC;AALD,0BAKC;AAED;;;;GAIG;AACH,SAAgB,IAAI,CAAC,MAAuC;IACxD,MAAM,GAAG,GAAG,MAAoC,CAAA;IAChD,GAAG,CAAC,IAAI,GAAG,MAAM,CAAA;IAEjB,OAAO,GAAG,CAAA;AACd,CAAC;AALD,oBAKC;AAED;;;;GAIG;AACH,SAAgB,IAAI,CAAC,MAAuC;IACxD,MAAM,GAAG,GAAG,MAAoC,CAAA;IAChD,GAAG,CAAC,IAAI,GAAG,MAAM,CAAA;IAEjB,OAAO,GAAG,CAAA;AACd,CAAC;AALD,oBAKC;AAED;;;;GAIG;AACH,SAAgB,KAAK,CAAC,MAAwC;IAC1D,MAAM,GAAG,GAAG,MAAqC,CAAA;IACjD,GAAG,CAAC,IAAI,GAAG,OAAO,CAAA;IAElB,OAAO,GAAG,CAAA;AACd,CAAC;AALD,sBAKC;AAED;;;;;GAKG;AACH,SAAgB,OAAO,CAAC,GAAW,EAAE,SAAoD,EAAE;IACvF,MAAM,GAAG,GAAG,MAAuC,CAAA;IACnD,GAAG,CAAC,IAAI,GAAG,SAAS,CAAA;IACpB,GAAG,CAAC,GAAG,GAAG,GAAG,CAAA;IAEb,OAAO,GAAG,CAAA;AACd,CAAC;AAND,0BAMC;AAED;;;;;;;;;;GAUG;AACH,SAAgB,IAAI,CAAC,IAAmB,EAAE,SAA0C,EAAE;IAClF,MAAM,GAAG,GAAG,MAAoC,CAAA;IAChD,GAAG,CAAC,IAAI,GAAG,MAAM,CAAA;IACjB,GAAG,CAAC,IAAI,GAAG,IAAI,CAAA;IAEf,OAAO,GAAG,CAAA;AACd,CAAC;AAND,oBAMC","sourcesContent":["import { tl } from '@mtcute/tl'\n\nimport { InputFileLike } from '../../files/utils.js'\nimport {\n CaptionMixin,\n InputMediaAudio,\n InputMediaAuto,\n InputMediaContact,\n InputMediaDice,\n InputMediaDocument,\n InputMediaGame,\n InputMediaGeo,\n InputMediaGeoLive,\n InputMediaInvoice,\n InputMediaLike,\n InputMediaPhoto,\n InputMediaPoll,\n InputMediaQuiz,\n InputMediaSticker,\n InputMediaStory,\n InputMediaVenue,\n InputMediaVideo,\n InputMediaVoice,\n InputMediaWebpage,\n} from './types.js'\n\n/** Omit `type` and `file` from the given type */\nexport type OmitTypeAndFile<T extends InputMediaLike, K extends keyof T = never> = Omit<T, 'type' | 'file' | K>\n\n/**\n * Create an animation to be sent\n *\n * @param file Animation\n * @param params Additional parameters\n */\nexport function animation(file: InputFileLike, params: OmitTypeAndFile<InputMediaVideo> = {}): InputMediaVideo {\n const ret = params as tl.Mutable<InputMediaVideo>\n ret.type = 'video'\n ret.file = file\n ret.isAnimated = true\n\n return ret\n}\n\n/**\n * Create an audio to be sent\n *\n * @param file Audio file\n * @param params Additional parameters\n */\nexport function audio(file: InputFileLike, params: OmitTypeAndFile<InputMediaAudio> = {}): InputMediaAudio {\n const ret = params as tl.Mutable<InputMediaAudio>\n ret.type = 'audio'\n ret.file = file\n\n return ret\n}\n\n/**\n * Create an document to be sent\n *\n * @param file Document\n * @param params Additional parameters\n */\nexport function document(file: InputFileLike, params: OmitTypeAndFile<InputMediaDocument> = {}): InputMediaDocument {\n const ret = params as tl.Mutable<InputMediaDocument>\n ret.type = 'document'\n ret.file = file\n\n return ret\n}\n\n/**\n * Create an photo to be sent\n *\n * @param file Photo\n * @param params Additional parameters\n */\nexport function photo(file: InputFileLike, params: OmitTypeAndFile<InputMediaPhoto> = {}): InputMediaPhoto {\n const ret = params as tl.Mutable<InputMediaPhoto>\n ret.type = 'photo'\n ret.file = file\n\n return ret\n}\n\n/**\n * Create an video to be sent\n *\n * @param file Video\n * @param params Additional parameters\n */\nexport function video(file: InputFileLike, params: OmitTypeAndFile<InputMediaVideo> = {}): InputMediaVideo {\n const ret = params as tl.Mutable<InputMediaVideo>\n ret.type = 'video'\n ret.file = file\n\n return ret\n}\n\n/**\n * Create a voice note to be sent\n *\n * @param file Voice note\n * @param params Additional parameters\n */\nexport function voice(file: InputFileLike, params: OmitTypeAndFile<InputMediaVoice> = {}): InputMediaVoice {\n const ret = params as tl.Mutable<InputMediaVoice>\n ret.type = 'voice'\n ret.file = file\n\n return ret\n}\n\n/**\n * Create a sticker to be sent\n *\n * @param file Sticker\n * @param params Additional parameters\n */\nexport function sticker(file: InputFileLike, params: OmitTypeAndFile<InputMediaSticker> = {}): InputMediaSticker {\n const ret = params as tl.Mutable<InputMediaSticker>\n ret.type = 'sticker'\n ret.file = file\n\n return ret\n}\n\n/**\n * Create a venue to be sent\n *\n * @param params Venue parameters\n */\nexport function venue(params: OmitTypeAndFile<InputMediaVenue>): InputMediaVenue {\n const ret = params as tl.Mutable<InputMediaVenue>\n ret.type = 'venue'\n\n return ret\n}\n\n/**\n * Create a geolocation to be sent\n *\n * @param latitude Latitude of the location\n * @param longitude Longitude of the location\n * @param params Additional parameters\n */\nexport function geo(\n latitude: number,\n longitude: number,\n params: OmitTypeAndFile<InputMediaGeo, 'latitude' | 'longitude'> = {},\n): InputMediaGeo {\n const ret = params as tl.Mutable<InputMediaGeo>\n ret.type = 'geo'\n ret.latitude = latitude\n ret.longitude = longitude\n\n return ret\n}\n\n/**\n * Create a live geolocation to be sent\n *\n * @param latitude Latitude of the current location\n * @param longitude Longitude of the current location\n * @param params Additional parameters\n */\nexport function geoLive(\n latitude: number,\n longitude: number,\n params: OmitTypeAndFile<InputMediaGeoLive, 'latitude' | 'longitude'> = {},\n): InputMediaGeoLive {\n const ret = params as tl.Mutable<InputMediaGeoLive>\n ret.type = 'geo_live'\n ret.latitude = latitude\n ret.longitude = longitude\n\n return ret\n}\n\n/**\n * Create a dice to be sent\n *\n * For convenience, known dice emojis are available\n * as static members of {@link Dice}.\n *\n * @param emoji Emoji representing the dice\n * @param params Additional parameters\n */\nexport function dice(emoji: string, params: CaptionMixin): InputMediaDice {\n const ret = params as tl.Mutable<InputMediaDice>\n ret.type = 'dice'\n\n return ret\n}\n\n/**\n * Create a contact to be sent\n *\n * @param params Contact parameters\n */\nexport function contact(params: OmitTypeAndFile<InputMediaContact>): InputMediaContact {\n const ret = params as tl.Mutable<InputMediaContact>\n ret.type = 'contact'\n\n return ret\n}\n\n/**\n * Create a game to be sent\n *\n * @param game Game short name or TL object representing one\n */\nexport function game(game: string | tl.TypeInputGame): InputMediaGame {\n return {\n type: 'game',\n game,\n }\n}\n\n/**\n * Create an invoice to be sent\n *\n * @param params Invoice parameters\n */\nexport function invoice(params: OmitTypeAndFile<InputMediaInvoice>): InputMediaInvoice {\n const ret = params as tl.Mutable<InputMediaInvoice>\n ret.type = 'invoice'\n\n return ret\n}\n\n/**\n * Create a poll to be sent\n *\n * @param params Poll parameters\n */\nexport function poll(params: OmitTypeAndFile<InputMediaPoll>): InputMediaPoll {\n const ret = params as tl.Mutable<InputMediaPoll>\n ret.type = 'poll'\n\n return ret\n}\n\n/**\n * Create a quiz to be sent\n *\n * @param params Quiz parameters\n */\nexport function quiz(params: OmitTypeAndFile<InputMediaQuiz>): InputMediaQuiz {\n const ret = params as tl.Mutable<InputMediaQuiz>\n ret.type = 'quiz'\n\n return ret\n}\n\n/**\n * Create a story to be sent\n *\n * @param params Story parameters\n */\nexport function story(params: OmitTypeAndFile<InputMediaStory>): InputMediaStory {\n const ret = params as tl.Mutable<InputMediaStory>\n ret.type = 'story'\n\n return ret\n}\n\n/**\n * Create a webpage to be sent\n *\n * @param url Webpage URL\n * @param params Additional parameters\n */\nexport function webpage(url: string, params: OmitTypeAndFile<InputMediaWebpage, 'url'> = {}): InputMediaWebpage {\n const ret = params as tl.Mutable<InputMediaWebpage>\n ret.type = 'webpage'\n ret.url = url\n\n return ret\n}\n\n/**\n * Create a document to be sent, which subtype\n * is inferred automatically by file contents.\n *\n * Photo type is only inferred for reused files,\n * newly uploaded photos with `auto` will be\n * uploaded as a document\n *\n * @param file The media file\n * @param params Additional parameters\n */\nexport function auto(file: InputFileLike, params: OmitTypeAndFile<InputMediaAuto> = {}): InputMediaAuto {\n const ret = params as tl.Mutable<InputMediaAuto>\n ret.type = 'auto'\n ret.file = file\n\n return ret\n}\n"]}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
26
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
27
|
+
};
|
|
28
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
+
exports.InputMedia = void 0;
|
|
30
|
+
const InputMedia = __importStar(require("./factories.js"));
|
|
31
|
+
exports.InputMedia = InputMedia;
|
|
32
|
+
__exportStar(require("./types.js"), exports);
|
|
33
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/highlevel/types/media/input-media/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2DAA4C;AAEnC,gCAAU;AADnB,6CAA0B","sourcesContent":["import * as InputMedia from './factories.js'\nexport * from './types.js'\nexport { InputMedia }\n"]}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { tl } from '@mtcute/tl';
|
|
2
|
-
import { MaybeArray } from '
|
|
3
|
-
import { InputText } from '
|
|
4
|
-
import { InputFileLike } from '
|
|
5
|
-
import { InputPeerLike } from '
|
|
6
|
-
import { VenueSource } from '
|
|
2
|
+
import { MaybeArray } from '../../../../types/utils.js';
|
|
3
|
+
import { InputText } from '../../../types/misc/entities.js';
|
|
4
|
+
import { InputFileLike } from '../../files/index.js';
|
|
5
|
+
import { InputPeerLike } from '../../peers/index.js';
|
|
6
|
+
import { VenueSource } from '../venue.js';
|
|
7
7
|
export interface CaptionMixin {
|
|
8
8
|
/**
|
|
9
9
|
* Caption of the media
|
|
@@ -503,143 +503,3 @@ export interface InputMediaWebpage extends CaptionMixin {
|
|
|
503
503
|
* @link InputMedia
|
|
504
504
|
*/
|
|
505
505
|
export type InputMediaLike = InputMediaAudio | InputMediaVoice | InputMediaDocument | InputMediaPhoto | InputMediaVideo | InputMediaAuto | InputMediaSticker | InputMediaVenue | InputMediaGeo | InputMediaGeoLive | InputMediaDice | InputMediaContact | InputMediaGame | InputMediaInvoice | InputMediaPoll | InputMediaQuiz | InputMediaStory | InputMediaWebpage | tl.TypeInputMedia;
|
|
506
|
-
export declare namespace InputMedia {
|
|
507
|
-
/** Omit `type` and `file` from the given type */
|
|
508
|
-
type OmitTypeAndFile<T extends InputMediaLike, K extends keyof T = never> = Omit<T, 'type' | 'file' | K>;
|
|
509
|
-
/**
|
|
510
|
-
* Create an animation to be sent
|
|
511
|
-
*
|
|
512
|
-
* @param file Animation
|
|
513
|
-
* @param params Additional parameters
|
|
514
|
-
*/
|
|
515
|
-
function animation(file: InputFileLike, params?: OmitTypeAndFile<InputMediaVideo>): InputMediaVideo;
|
|
516
|
-
/**
|
|
517
|
-
* Create an audio to be sent
|
|
518
|
-
*
|
|
519
|
-
* @param file Audio file
|
|
520
|
-
* @param params Additional parameters
|
|
521
|
-
*/
|
|
522
|
-
function audio(file: InputFileLike, params?: OmitTypeAndFile<InputMediaAudio>): InputMediaAudio;
|
|
523
|
-
/**
|
|
524
|
-
* Create an document to be sent
|
|
525
|
-
*
|
|
526
|
-
* @param file Document
|
|
527
|
-
* @param params Additional parameters
|
|
528
|
-
*/
|
|
529
|
-
function document(file: InputFileLike, params?: OmitTypeAndFile<InputMediaDocument>): InputMediaDocument;
|
|
530
|
-
/**
|
|
531
|
-
* Create an photo to be sent
|
|
532
|
-
*
|
|
533
|
-
* @param file Photo
|
|
534
|
-
* @param params Additional parameters
|
|
535
|
-
*/
|
|
536
|
-
function photo(file: InputFileLike, params?: OmitTypeAndFile<InputMediaPhoto>): InputMediaPhoto;
|
|
537
|
-
/**
|
|
538
|
-
* Create an video to be sent
|
|
539
|
-
*
|
|
540
|
-
* @param file Video
|
|
541
|
-
* @param params Additional parameters
|
|
542
|
-
*/
|
|
543
|
-
function video(file: InputFileLike, params?: OmitTypeAndFile<InputMediaVideo>): InputMediaVideo;
|
|
544
|
-
/**
|
|
545
|
-
* Create a voice note to be sent
|
|
546
|
-
*
|
|
547
|
-
* @param file Voice note
|
|
548
|
-
* @param params Additional parameters
|
|
549
|
-
*/
|
|
550
|
-
function voice(file: InputFileLike, params?: OmitTypeAndFile<InputMediaVoice>): InputMediaVoice;
|
|
551
|
-
/**
|
|
552
|
-
* Create a sticker to be sent
|
|
553
|
-
*
|
|
554
|
-
* @param file Sticker
|
|
555
|
-
* @param params Additional parameters
|
|
556
|
-
*/
|
|
557
|
-
function sticker(file: InputFileLike, params?: OmitTypeAndFile<InputMediaSticker>): InputMediaSticker;
|
|
558
|
-
/**
|
|
559
|
-
* Create a venue to be sent
|
|
560
|
-
*
|
|
561
|
-
* @param params Venue parameters
|
|
562
|
-
*/
|
|
563
|
-
function venue(params: OmitTypeAndFile<InputMediaVenue>): InputMediaVenue;
|
|
564
|
-
/**
|
|
565
|
-
* Create a geolocation to be sent
|
|
566
|
-
*
|
|
567
|
-
* @param latitude Latitude of the location
|
|
568
|
-
* @param longitude Longitude of the location
|
|
569
|
-
* @param params Additional parameters
|
|
570
|
-
*/
|
|
571
|
-
function geo(latitude: number, longitude: number, params?: OmitTypeAndFile<InputMediaGeo, 'latitude' | 'longitude'>): InputMediaGeo;
|
|
572
|
-
/**
|
|
573
|
-
* Create a live geolocation to be sent
|
|
574
|
-
*
|
|
575
|
-
* @param latitude Latitude of the current location
|
|
576
|
-
* @param longitude Longitude of the current location
|
|
577
|
-
* @param params Additional parameters
|
|
578
|
-
*/
|
|
579
|
-
function geoLive(latitude: number, longitude: number, params?: OmitTypeAndFile<InputMediaGeoLive, 'latitude' | 'longitude'>): InputMediaGeoLive;
|
|
580
|
-
/**
|
|
581
|
-
* Create a dice to be sent
|
|
582
|
-
*
|
|
583
|
-
* For convenience, known dice emojis are available
|
|
584
|
-
* as static members of {@link Dice}.
|
|
585
|
-
*
|
|
586
|
-
* @param emoji Emoji representing the dice
|
|
587
|
-
* @param params Additional parameters
|
|
588
|
-
*/
|
|
589
|
-
function dice(emoji: string, params: CaptionMixin): InputMediaDice;
|
|
590
|
-
/**
|
|
591
|
-
* Create a contact to be sent
|
|
592
|
-
*
|
|
593
|
-
* @param params Contact parameters
|
|
594
|
-
*/
|
|
595
|
-
function contact(params: OmitTypeAndFile<InputMediaContact>): InputMediaContact;
|
|
596
|
-
/**
|
|
597
|
-
* Create a game to be sent
|
|
598
|
-
*
|
|
599
|
-
* @param game Game short name or TL object representing one
|
|
600
|
-
*/
|
|
601
|
-
function game(game: string | tl.TypeInputGame): InputMediaGame;
|
|
602
|
-
/**
|
|
603
|
-
* Create an invoice to be sent
|
|
604
|
-
*
|
|
605
|
-
* @param params Invoice parameters
|
|
606
|
-
*/
|
|
607
|
-
function invoice(params: OmitTypeAndFile<InputMediaInvoice>): InputMediaInvoice;
|
|
608
|
-
/**
|
|
609
|
-
* Create a poll to be sent
|
|
610
|
-
*
|
|
611
|
-
* @param params Poll parameters
|
|
612
|
-
*/
|
|
613
|
-
function poll(params: OmitTypeAndFile<InputMediaPoll>): InputMediaPoll;
|
|
614
|
-
/**
|
|
615
|
-
* Create a quiz to be sent
|
|
616
|
-
*
|
|
617
|
-
* @param params Quiz parameters
|
|
618
|
-
*/
|
|
619
|
-
function quiz(params: OmitTypeAndFile<InputMediaQuiz>): InputMediaQuiz;
|
|
620
|
-
/**
|
|
621
|
-
* Create a story to be sent
|
|
622
|
-
*
|
|
623
|
-
* @param params Story parameters
|
|
624
|
-
*/
|
|
625
|
-
function story(params: OmitTypeAndFile<InputMediaStory>): InputMediaStory;
|
|
626
|
-
/**
|
|
627
|
-
* Create a webpage to be sent
|
|
628
|
-
*
|
|
629
|
-
* @param url Webpage URL
|
|
630
|
-
* @param params Additional parameters
|
|
631
|
-
*/
|
|
632
|
-
function webpage(url: string, params?: OmitTypeAndFile<InputMediaWebpage, 'url'>): InputMediaWebpage;
|
|
633
|
-
/**
|
|
634
|
-
* Create a document to be sent, which subtype
|
|
635
|
-
* is inferred automatically by file contents.
|
|
636
|
-
*
|
|
637
|
-
* Photo type is only inferred for reused files,
|
|
638
|
-
* newly uploaded photos with `auto` will be
|
|
639
|
-
* uploaded as a document
|
|
640
|
-
*
|
|
641
|
-
* @param file The media file
|
|
642
|
-
* @param params Additional parameters
|
|
643
|
-
*/
|
|
644
|
-
function auto(file: InputFileLike, params?: OmitTypeAndFile<InputMediaAuto>): InputMediaAuto;
|
|
645
|
-
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../../src/highlevel/types/media/input-media/types.ts"],"names":[],"mappings":"","sourcesContent":["import { tl } from '@mtcute/tl'\n\nimport { MaybeArray } from '../../../../types/utils.js'\nimport { InputText } from '../../../types/misc/entities.js'\nimport { InputFileLike } from '../../files/index.js'\nimport { InputPeerLike } from '../../peers/index.js'\nimport { VenueSource } from '../venue.js'\n\nexport interface CaptionMixin {\n /**\n * Caption of the media\n */\n caption?: InputText\n}\n\nexport interface FileMixin {\n /**\n * File to be sent\n */\n file: InputFileLike\n\n /**\n * Override file name for the file.\n *\n * Only applicable to newly uploaded files.\n */\n fileName?: string\n\n /**\n * Override MIME type for the file\n *\n * Only applicable to newly uploaded files.\n */\n fileMime?: string\n\n /**\n * Override file size for the file\n *\n * Only applicable to newly uploaded files.\n */\n fileSize?: number\n\n /**\n * TTL for the media in seconds.\n *\n * Only applicable to some media types\n */\n ttlSeconds?: number\n}\n\n/**\n * Automatically detect media type based on file contents.\n *\n * Photo type is only inferred for reused files,\n * newly uploaded photos with `auto` will be\n * uploaded as a document\n */\nexport interface InputMediaAuto extends FileMixin, CaptionMixin {\n type: 'auto'\n}\n\n/**\n * An audio file or voice message to be sent\n */\nexport interface InputMediaAudio extends FileMixin, CaptionMixin {\n type: 'audio'\n\n /**\n * Thumbnail of the audio file album cover.\n *\n * The thumbnail should be in JPEG format and less than 200 KB in size.\n * A thumbnail's width and height should not exceed 320 pixels.\n * Thumbnails can't be reused and can be only uploaded as a new file.\n *\n * Only applicable to newly uploaded files.\n */\n thumb?: InputFileLike\n\n /**\n * Duration of the audio in seconds\n *\n * Only applicable to newly uploaded files.\n */\n duration?: number\n\n /**\n * Performer of the audio\n *\n * Only applicable to newly uploaded files.\n */\n performer?: string\n\n /**\n * Title of the audio\n *\n * Only applicable to newly uploaded files.\n */\n title?: string\n}\n\n/**\n * Voice message to be sent\n */\nexport interface InputMediaVoice extends FileMixin, CaptionMixin {\n type: 'voice'\n\n /**\n * Duration of the voice message in seconds\n *\n * Only applicable to newly uploaded files.\n */\n duration?: number\n\n /**\n * Waveform of the voice message.\n *\n * Represented with integers in range [0, 31],\n * usually has length of 100.\n * Generated by the server if omitted.\n *\n * Only applicable to newly uploaded files.\n */\n waveform?: number[]\n}\n\n/**\n * A generic file to be sent\n */\nexport interface InputMediaDocument extends FileMixin, CaptionMixin {\n type: 'document'\n\n /**\n * Thumbnail of the document.\n *\n * The thumbnail should be in JPEG format and less than 200 KB in size.\n * A thumbnail's width and height should not exceed 320 pixels.\n * Thumbnails can't be reused and can be only uploaded as a new file.\n *\n * Only applicable to newly uploaded files.\n */\n thumb?: InputFileLike\n}\n\n/**\n * A photo to be sent\n */\nexport interface InputMediaPhoto extends FileMixin, CaptionMixin {\n type: 'photo'\n\n /**\n * Whether this photo should be hidden with a spoiler\n */\n spoiler?: boolean\n}\n\n/**\n * A sticker to be sent\n */\nexport interface InputMediaSticker extends FileMixin, CaptionMixin {\n type: 'sticker'\n\n /**\n * Whether this sticker is animated?\n *\n * Note that animated stickers must be in TGS\n * format, which is Lottie JSON compressed using GZip\n *\n * Only applicable to newly uploaded files.\n *\n * @default false\n */\n isAnimated?: boolean\n\n /**\n * An emoji representing this sticker\n *\n * Only applicable to newly uploaded files,\n * for some reason doesn't work with animated stickers.\n */\n alt?: string\n}\n\n/**\n * A video to be sent\n */\nexport interface InputMediaVideo extends FileMixin, CaptionMixin {\n type: 'video'\n\n /**\n * Thumbnail of the video.\n *\n * The thumbnail should be in JPEG format and less than 200 KB in size.\n * A thumbnail's width and height should not exceed 320 pixels.\n * Thumbnails can't be reused and can be only uploaded as a new file.\n *\n * Only applicable to newly uploaded files.\n */\n thumb?: InputFileLike\n\n /**\n * Width of the video in pixels\n *\n * Only applicable to newly uploaded files.\n */\n width?: number\n\n /**\n * Height of the video in pixels\n *\n * Only applicable to newly uploaded files.\n */\n height?: number\n\n /**\n * Duration of the video in seconds\n *\n * Only applicable to newly uploaded files.\n */\n duration?: number\n\n /**\n * Whether the video is suitable for streaming\n *\n * Only applicable to newly uploaded files.\n */\n supportsStreaming?: boolean\n\n /**\n * Whether this video is an animated GIF\n *\n * Only applicable to newly uploaded files.\n */\n isAnimated?: boolean\n\n /**\n * Whether this video is a round message (aka video note)\n *\n * Only applicable to newly uploaded files.\n */\n isRound?: boolean\n\n /**\n * Whether this video should be hidden with a spoiler\n */\n spoiler?: boolean\n}\n\n/**\n * A geolocation to be sent\n */\nexport interface InputMediaGeo extends CaptionMixin {\n type: 'geo'\n\n /**\n * Latitude of the geolocation\n */\n latitude: number\n\n /**\n * Longitude of the geolocation\n */\n longitude: number\n\n /**\n * The estimated horizontal accuracy of the\n * geolocation, in meters (0-1500)\n */\n accuracy?: number\n}\n\n/**\n * A live geolocation to be sent\n */\nexport interface InputMediaGeoLive extends Omit<InputMediaGeo, 'type'> {\n type: 'geo_live'\n\n /**\n * Whether sending of the geolocation has stopped\n */\n stopped?: boolean\n\n /**\n * Direction in which the location moves, in degrees (1-360)\n */\n heading?: number\n\n /**\n * Validity period of the live location\n */\n period?: number\n\n /**\n * Maximum distance to another chat member for proximity\n * alerts, in meters (0-100000)\n */\n proximityNotificationRadius?: number\n}\n\n/**\n * An animated dice with a random value to be sent\n *\n * For convenience, known dice emojis are available\n * as static members of {@link Dice}.\n *\n * Note that dice result value is generated randomly on the server,\n * you can't influence it in any way!\n */\nexport interface InputMediaDice extends CaptionMixin {\n type: 'dice'\n\n /**\n * Emoji representing a dice\n */\n emoji: string\n}\n\n/**\n * A venue to be sent\n */\nexport interface InputMediaVenue extends CaptionMixin {\n type: 'venue'\n\n /**\n * Latitude of the geolocation\n */\n latitude: number\n\n /**\n * Longitude of the geolocation\n */\n longitude: number\n\n /**\n * Venue name\n */\n title: string\n\n /**\n * Venue address\n */\n address: string\n\n /**\n * When available, source from where this venue was acquired\n */\n source?: VenueSource\n}\n\n/**\n * A contact to be sent\n */\nexport interface InputMediaContact extends CaptionMixin {\n type: 'contact'\n\n /**\n * Contact's phone number\n */\n phone: string\n\n /**\n * Contact's first name\n */\n firstName: string\n\n /**\n * Contact's last name\n */\n lastName?: string\n\n /**\n * Additional data about the contact\n * as a vCard (0-2048 bytes)\n */\n vcard?: string\n}\n\n/**\n * A game to be sent\n */\nexport interface InputMediaGame extends CaptionMixin {\n type: 'game'\n\n /**\n * Game's short name, or a TL object with an input game\n */\n game: string | tl.TypeInputGame\n}\n\n/**\n * An invoice to be sent (see https://core.telegram.org/bots/payments)\n */\nexport interface InputMediaInvoice extends CaptionMixin {\n type: 'invoice'\n\n /**\n * Product name (1-32 chars)\n */\n title: string\n\n /**\n * Product description (1-255 chars)\n */\n description: string\n\n /**\n * The invoice itself\n */\n invoice: tl.TypeInvoice\n\n /**\n * Bot-defined invoice payload (1-128 bytes).\n *\n * Will not be displayed to the user and can be used\n * for internal processes\n */\n payload: Uint8Array\n\n /**\n * Payments provider token, obtained from\n * [@BotFather](//t.me/botfather)\n */\n token: string\n\n /**\n * Data about the invoice as a plain JS object, which\n * will be shared with the payment provider. A detailed\n * description of required fields should be provided by\n * the payment provider.\n */\n providerData: unknown\n\n /**\n * Start parameter for the bot\n */\n startParam: string\n\n /**\n * Product photo. Can be a photo of the goods or a marketing image for a service.\n *\n * Can be a URL, or a TL object with input web document\n */\n photo?: string | tl.TypeInputWebDocument\n\n /**\n * Extended media (i.e. media that will be available once the invoice is paid)\n */\n extendedMedia?: InputMediaLike\n}\n\n/**\n * A simple poll to be sent\n *\n * > **Note**: when using user account,\n * > the poll can't be sent to PMs, only to channels/groups,\n * > otherwise there will be `MEDIA_INVALID` error.\n */\nexport interface InputMediaPoll extends CaptionMixin {\n type: 'poll'\n\n /**\n * Question of the poll (1-255 chars for users, 1-300 chars for bots)\n */\n question: string\n\n /**\n * Answers of the poll.\n *\n * You can either provide a string, or a\n * TL object representing an answer.\n * Strings will be transformed to TL\n * objects, with a single=byte incrementing\n * `option` value.\n */\n answers: (string | tl.TypePollAnswer)[]\n\n /**\n * Whether this is poll is closed\n * (i.e. nobody can vote anymore)\n */\n closed?: boolean\n\n /**\n * Whether this is a public poll\n * (i.e. users who have voted are visible to everyone)\n */\n public?: boolean\n\n /**\n * Whether users can select multiple answers\n * as an answer\n */\n multiple?: boolean\n\n /**\n * Amount of time in seconds the poll will be active after creation (5-600).\n *\n * Can't be used together with `closeDate`.\n */\n closePeriod?: number\n\n /**\n * Point in time when the poll will be automatically closed.\n *\n * Must be at least 5 and no more than 600 seconds in the future,\n * can't be used together with `closePeriod`.\n *\n * When `number` is used, UNIX time in ms is expected\n */\n closeDate?: number | Date\n}\n\n/**\n * A quiz to be sent.\n *\n * Quiz is an extended version of a poll, but quizzes have\n * correct answers, and votes can't be retracted from them\n */\nexport interface InputMediaQuiz extends Omit<InputMediaPoll, 'type'> {\n type: 'quiz'\n\n /**\n * Correct answer ID(s) or index(es).\n *\n * > **Note**: even though quizzes can actually\n * > only have exactly one correct answer,\n * > the API itself has the possibility to pass\n * > multiple or zero correct answers,\n * > but that would result in `QUIZ_CORRECT_ANSWERS_TOO_MUCH`\n * > and `QUIZ_CORRECT_ANSWERS_EMPTY` errors respectively.\n * >\n * > But since the API has that option, we also provide it,\n * > maybe to future-proof this :shrug:\n */\n correct: MaybeArray<number | Uint8Array>\n\n /**\n * Explanation of the quiz solution\n */\n solution?: InputText\n}\n\n/**\n * A story to be sent\n */\nexport interface InputMediaStory extends CaptionMixin {\n type: 'story'\n\n /**\n * Owner of the story\n */\n peer: InputPeerLike\n\n /**\n * ID of the story\n */\n id: number\n}\n\n/** A webpage to be sent */\nexport interface InputMediaWebpage extends CaptionMixin {\n type: 'webpage'\n\n /**\n * Whether the link must be present in the message\n * for the preview to appear\n */\n required?: boolean\n\n /**\n * By default, size of the media in the preview\n * is determined based on content type.\n *\n * You can override this behaviour by passing the wanted size here\n */\n size?: 'large' | 'small'\n\n /** Webpage URL */\n url: string\n}\n\n/**\n * Input media that can be sent somewhere.\n *\n * Note that meta-fields (like `duration`) are only\n * applicable if `file` is {@link UploadFileLike},\n * otherwise they are ignored.\n *\n * @link InputMedia\n */\nexport type InputMediaLike =\n | InputMediaAudio\n | InputMediaVoice\n | InputMediaDocument\n | InputMediaPhoto\n | InputMediaVideo\n | InputMediaAuto\n | InputMediaSticker\n | InputMediaVenue\n | InputMediaGeo\n | InputMediaGeoLive\n | InputMediaDice\n | InputMediaContact\n | InputMediaGame\n | InputMediaInvoice\n | InputMediaPoll\n | InputMediaQuiz\n | InputMediaStory\n | InputMediaWebpage\n | tl.TypeInputMedia\n"]}
|