nodejs-insta-private-api-mqt 1.3.84 → 1.3.86
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/dist/constants/constants.d.ts +1 -0
- package/dist/dist/constants/index.d.ts +25 -0
- package/dist/dist/core/client.d.ts +106 -0
- package/dist/dist/core/nav-chain.d.ts +77 -0
- package/dist/dist/core/repository.d.ts +3 -0
- package/dist/dist/core/request.d.ts +76 -0
- package/dist/dist/core/state.d.ts +605 -0
- package/dist/dist/core/utils.d.ts +129 -0
- package/dist/dist/downloadMedia.d.ts +106 -0
- package/{dist-ts → dist}/dist/downloadMedia.js +19 -20
- package/dist/dist/errors/index.d.ts +18 -0
- package/dist/dist/extend.d.ts +20 -0
- package/dist/dist/fbns/fbns.client.d.ts +43 -0
- package/dist/dist/fbns/fbns.client.events.d.ts +0 -0
- package/{dist-ts → dist}/dist/fbns/fbns.client.js +4 -5
- package/dist/dist/fbns/fbns.device-auth.d.ts +9 -0
- package/{src-ts/dist/fbns/fbns.device-auth.ts → dist/dist/fbns/fbns.device-auth.js} +6 -3
- package/dist/dist/fbns/fbns.types.d.ts +0 -0
- package/dist/dist/fbns/fbns.utilities.d.ts +4 -0
- package/dist/dist/fbns/index.d.ts +2 -0
- package/dist/dist/index.d.ts +49 -0
- package/dist/dist/mqtt-shim.d.ts +1 -0
- package/dist/dist/mqttot/index.d.ts +2 -0
- package/dist/dist/mqttot/mqttot.client.d.ts +77 -0
- package/{dist-ts → dist}/dist/mqttot/mqttot.client.js +10 -10
- package/dist/dist/mqttot/mqttot.connect.request.packet.d.ts +1 -0
- package/dist/dist/mqttot/mqttot.connect.response.packet.d.ts +5 -0
- package/dist/dist/mqttot/mqttot.connection.d.ts +6 -0
- package/dist/dist/realtime/commands/commands.d.ts +19 -0
- package/dist/dist/realtime/commands/direct.commands.d.ts +142 -0
- package/dist/dist/realtime/commands/enhanced.direct.commands.d.ts +425 -0
- package/{dist-ts → dist}/dist/realtime/commands/enhanced.direct.commands.js +8 -10
- package/dist/dist/realtime/commands/index.d.ts +2 -0
- package/dist/dist/realtime/delta-sync.manager.d.ts +82 -0
- package/{dist-ts → dist}/dist/realtime/delta-sync.manager.js +7 -10
- package/dist/dist/realtime/features/dm-sender.d.ts +20 -0
- package/{src-ts/dist/realtime/features/dm-sender.ts → dist/dist/realtime/features/dm-sender.js} +6 -3
- package/dist/dist/realtime/features/error-handler.d.ts +33 -0
- package/{dist-ts → dist}/dist/realtime/features/error-handler.js +4 -4
- package/dist/dist/realtime/features/gap-handler.d.ts +19 -0
- package/dist/dist/realtime/features/persistent-logger.d.ts +28 -0
- package/{dist-ts → dist}/dist/realtime/features/persistent-logger.js +3 -3
- package/dist/dist/realtime/features/presence.manager.d.ts +24 -0
- package/{src-ts/dist/realtime/features/presence.manager.ts → dist/dist/realtime/features/presence.manager.js} +2 -1
- package/dist/dist/realtime/features/session-health-monitor.d.ts +93 -0
- package/{src-ts/dist/realtime/features/session-health-monitor.ts → dist/dist/realtime/features/session-health-monitor.js} +45 -65
- package/dist/dist/realtime/index.d.ts +9 -0
- package/dist/dist/realtime/messages/app-presence.event.d.ts +0 -0
- package/dist/dist/realtime/messages/index.d.ts +2 -0
- package/dist/dist/realtime/messages/message-sync.message.d.ts +1 -0
- package/dist/dist/realtime/messages/realtime-sub.direct.data.d.ts +0 -0
- package/dist/dist/realtime/messages/thread-update.message.d.ts +0 -0
- package/dist/dist/realtime/mixins/index.d.ts +2 -0
- package/dist/dist/realtime/mixins/message-sync.mixin.d.ts +38 -0
- package/{dist-ts → dist}/dist/realtime/mixins/message-sync.mixin.js +16 -18
- package/dist/dist/realtime/mixins/mixin.d.ts +4 -0
- package/dist/dist/realtime/mixins/presence-typing.mixin.d.ts +9 -0
- package/dist/dist/realtime/mixins/realtime-sub.mixin.d.ts +37 -0
- package/{dist-ts → dist}/dist/realtime/mixins/realtime-sub.mixin.js +4 -5
- package/dist/dist/realtime/parsers/graphql-parser.d.ts +18 -0
- package/dist/dist/realtime/parsers/graphql.parser.d.ts +10 -0
- package/{src-ts/dist/realtime/parsers/graphql.parser.ts → dist/dist/realtime/parsers/graphql.parser.js} +0 -1
- package/dist/dist/realtime/parsers/index.d.ts +2 -0
- package/dist/dist/realtime/parsers/iris-parser.d.ts +18 -0
- package/dist/dist/realtime/parsers/iris.parser.d.ts +3 -0
- package/dist/dist/realtime/parsers/json-parser.d.ts +18 -0
- package/dist/dist/realtime/parsers/json.parser.d.ts +6 -0
- package/dist/dist/realtime/parsers/parser.d.ts +0 -0
- package/dist/dist/realtime/parsers/region-hint-parser.d.ts +18 -0
- package/dist/dist/realtime/parsers/region-hint.parser.d.ts +4 -0
- package/dist/dist/realtime/parsers/skywalker-parser.d.ts +18 -0
- package/dist/dist/realtime/parsers/skywalker.parser.d.ts +7 -0
- package/dist/dist/realtime/parsers-advanced.d.ts +93 -0
- package/{dist-ts → dist}/dist/realtime/parsers-advanced.js +5 -8
- package/dist/dist/realtime/proto-parser.d.ts +27 -0
- package/{dist-ts → dist}/dist/realtime/proto-parser.js +1 -2
- package/dist/dist/realtime/protocols/iris.handshake.d.ts +41 -0
- package/dist/dist/realtime/protocols/proto-definitions.d.ts +0 -0
- package/dist/dist/realtime/protocols/skywalker.protocol.d.ts +20 -0
- package/{src-ts/dist/realtime/protocols/skywalker.protocol.ts → dist/dist/realtime/protocols/skywalker.protocol.js} +8 -5
- package/dist/dist/realtime/realtime.client.d.ts +169 -0
- package/dist/dist/realtime/realtime.client.events.d.ts +0 -0
- package/{dist-ts → dist}/dist/realtime/realtime.client.js +75 -86
- package/dist/dist/realtime/realtime.service.d.ts +109 -0
- package/dist/dist/realtime/reconnect.manager.d.ts +15 -0
- package/dist/dist/realtime/session.manager.d.ts +25 -0
- package/dist/dist/realtime/subscriptions/graphql.subscription.d.ts +4 -0
- package/dist/dist/realtime/subscriptions/index.d.ts +2 -0
- package/dist/dist/realtime/subscriptions/skywalker.subscription.d.ts +4 -0
- package/dist/dist/realtime/topic-map.d.ts +97 -0
- package/dist/dist/realtime/topic.d.ts +71 -0
- package/dist/dist/repositories/account.repository.d.ts +72 -0
- package/{dist-ts → dist}/dist/repositories/account.repository.js +4 -6
- package/dist/dist/repositories/bloks.repository.d.ts +6 -0
- package/dist/dist/repositories/captcha.repository.d.ts +6 -0
- package/dist/dist/repositories/challenge.repository.d.ts +12 -0
- package/{dist-ts → dist}/dist/repositories/challenge.repository.js +1 -2
- package/dist/dist/repositories/clip.repository.d.ts +10 -0
- package/dist/dist/repositories/close-friends.repository.d.ts +8 -0
- package/dist/dist/repositories/collection.repository.d.ts +8 -0
- package/dist/dist/repositories/direct-thread.repository.d.ts +88 -0
- package/{dist-ts → dist}/dist/repositories/direct-thread.repository.js +7 -9
- package/dist/dist/repositories/direct.repository.d.ts +22 -0
- package/{dist-ts → dist}/dist/repositories/direct.repository.js +4 -5
- package/dist/dist/repositories/explore.repository.d.ts +7 -0
- package/dist/dist/repositories/fbsearch.repository.d.ts +14 -0
- package/dist/dist/repositories/feed.repository.d.ts +19 -0
- package/dist/dist/repositories/friendship.repository.d.ts +26 -0
- package/dist/dist/repositories/fundraiser.repository.d.ts +6 -0
- package/dist/dist/repositories/hashtag.repository.d.ts +11 -0
- package/dist/dist/repositories/highlights.repository.d.ts +11 -0
- package/dist/dist/repositories/insights.repository.d.ts +8 -0
- package/dist/dist/repositories/location.repository.d.ts +9 -0
- package/dist/dist/repositories/media.repository.d.ts +41 -0
- package/{dist-ts → dist}/dist/repositories/media.repository.js +1 -2
- package/dist/dist/repositories/multiple-accounts.repository.d.ts +7 -0
- package/dist/dist/repositories/news.repository.d.ts +6 -0
- package/dist/dist/repositories/note.repository.d.ts +8 -0
- package/dist/dist/repositories/notification.repository.d.ts +33 -0
- package/{dist-ts → dist}/dist/repositories/notification.repository.js +1 -1
- package/dist/dist/repositories/share.repository.d.ts +12 -0
- package/dist/dist/repositories/signup.repository.d.ts +19 -0
- package/dist/dist/repositories/story.repository.d.ts +23 -0
- package/{dist-ts → dist}/dist/repositories/story.repository.js +1 -2
- package/dist/dist/repositories/timeline.repository.d.ts +7 -0
- package/dist/dist/repositories/totp.repository.d.ts +14 -0
- package/dist/dist/repositories/track.repository.d.ts +7 -0
- package/{dist-ts → dist}/dist/repositories/track.repository.js +1 -2
- package/dist/dist/repositories/upload.repository.d.ts +30 -0
- package/{dist-ts → dist}/dist/repositories/upload.repository.js +4 -5
- package/dist/dist/repositories/user.repository.d.ts +52 -0
- package/dist/dist/sendmedia/index.d.ts +12 -0
- package/dist/dist/sendmedia/sendFile.d.ts +8 -0
- package/dist/dist/sendmedia/sendPhoto.d.ts +26 -0
- package/dist/dist/sendmedia/sendRavenPhoto.d.ts +14 -0
- package/{dist-ts → dist}/dist/sendmedia/sendRavenPhoto.js +4 -5
- package/dist/dist/sendmedia/sendRavenVideo.d.ts +15 -0
- package/{dist-ts → dist}/dist/sendmedia/sendRavenVideo.js +4 -5
- package/dist/dist/sendmedia/uploadPhoto.d.ts +8 -0
- package/dist/dist/sendmedia/uploadfFile.d.ts +13 -0
- package/{dist-ts → dist}/dist/sendmedia/uploadfFile.js +3 -4
- package/dist/dist/services/live.service.d.ts +13 -0
- package/dist/dist/services/search.service.d.ts +11 -0
- package/dist/dist/shared/index.d.ts +4 -0
- package/{src-ts/dist/shared/index.ts → dist/dist/shared/index.js} +14 -13
- package/dist/dist/shared/shared.d.ts +15 -0
- package/dist/dist/thrift/index.d.ts +2 -0
- package/dist/dist/thrift/thrift.d.ts +11 -0
- package/dist/dist/thrift/thrift.reading.d.ts +49 -0
- package/{dist-ts → dist}/dist/thrift/thrift.reading.js +3 -5
- package/dist/dist/thrift/thrift.writing.d.ts +49 -0
- package/{dist-ts → dist}/dist/thrift/thrift.writing.js +2 -4
- package/dist/dist/types/index.d.ts +28 -0
- package/dist/dist/useMultiFileAuthState.d.ts +267 -0
- package/{dist-ts → dist}/dist/useMultiFileAuthState.js +47 -61
- package/dist/dist/utils/helper-1.d.ts +0 -0
- package/dist/dist/utils/helper-10.d.ts +0 -0
- package/dist/dist/utils/helper-11.d.ts +0 -0
- package/dist/dist/utils/helper-12.d.ts +0 -0
- package/dist/dist/utils/helper-13.d.ts +0 -0
- package/dist/dist/utils/helper-14.d.ts +0 -0
- package/dist/dist/utils/helper-15.d.ts +0 -0
- package/dist/dist/utils/helper-16.d.ts +0 -0
- package/dist/dist/utils/helper-17.d.ts +0 -0
- package/dist/dist/utils/helper-18.d.ts +0 -0
- package/dist/dist/utils/helper-19.d.ts +0 -0
- package/dist/dist/utils/helper-2.d.ts +0 -0
- package/dist/dist/utils/helper-20.d.ts +0 -0
- package/dist/dist/utils/helper-21.d.ts +0 -0
- package/dist/dist/utils/helper-22.d.ts +0 -0
- package/dist/dist/utils/helper-23.d.ts +0 -0
- package/dist/dist/utils/helper-24.d.ts +0 -0
- package/dist/dist/utils/helper-25.d.ts +0 -0
- package/dist/dist/utils/helper-26.d.ts +0 -0
- package/dist/dist/utils/helper-27.d.ts +0 -0
- package/dist/dist/utils/helper-28.d.ts +0 -0
- package/dist/dist/utils/helper-29.d.ts +0 -0
- package/dist/dist/utils/helper-3.d.ts +0 -0
- package/dist/dist/utils/helper-30.d.ts +0 -0
- package/dist/dist/utils/helper-4.d.ts +0 -0
- package/dist/dist/utils/helper-5.d.ts +0 -0
- package/dist/dist/utils/helper-6.d.ts +0 -0
- package/dist/dist/utils/helper-7.d.ts +0 -0
- package/dist/dist/utils/helper-8.d.ts +0 -0
- package/dist/dist/utils/helper-9.d.ts +0 -0
- package/dist/dist/utils/index.d.ts +56 -0
- package/{dist-ts → dist}/dist/utils/index.js +1 -2
- package/dist/dist/utils/insta-mqtt-helper.d.ts +30 -0
- package/dist/examples/listen-to-messages.d.ts +4 -0
- package/{dist-ts → dist}/examples/listen-to-messages.js +1 -2
- package/package.json +41 -38
- package/dist-ts/dist/fbns/fbns.device-auth.js +0 -59
- package/dist-ts/dist/realtime/features/dm-sender.js +0 -94
- package/dist-ts/dist/realtime/features/presence.manager.js +0 -68
- package/dist-ts/dist/realtime/features/session-health-monitor.js +0 -327
- package/dist-ts/dist/realtime/parsers/graphql.parser.js +0 -22
- package/dist-ts/dist/realtime/protocols/skywalker.protocol.js +0 -96
- package/dist-ts/dist/shared/index.js +0 -98
- package/examples/listen-to-messages.js +0 -86
- package/src-ts/dist/constants/constants.ts +0 -342
- package/src-ts/dist/constants/index.ts +0 -58
- package/src-ts/dist/core/client.ts +0 -419
- package/src-ts/dist/core/nav-chain.ts +0 -282
- package/src-ts/dist/core/repository.ts +0 -7
- package/src-ts/dist/core/request.ts +0 -395
- package/src-ts/dist/core/state.ts +0 -1484
- package/src-ts/dist/core/utils.ts +0 -786
- package/src-ts/dist/downloadMedia.ts +0 -381
- package/src-ts/dist/errors/index.ts +0 -38
- package/src-ts/dist/extend.ts +0 -167
- package/src-ts/dist/fbns/fbns.client.events.ts +0 -3
- package/src-ts/dist/fbns/fbns.client.ts +0 -252
- package/src-ts/dist/fbns/fbns.types.ts +0 -3
- package/src-ts/dist/fbns/fbns.utilities.ts +0 -79
- package/src-ts/dist/fbns/index.ts +0 -21
- package/src-ts/dist/index.ts +0 -139
- package/src-ts/dist/mqtt-shim.ts +0 -15
- package/src-ts/dist/mqttot/index.ts +0 -21
- package/src-ts/dist/mqttot/mqttot.client.ts +0 -318
- package/src-ts/dist/mqttot/mqttot.connect.request.packet.ts +0 -9
- package/src-ts/dist/mqttot/mqttot.connect.response.packet.ts +0 -24
- package/src-ts/dist/mqttot/mqttot.connection.ts +0 -77
- package/src-ts/dist/realtime/commands/commands.ts +0 -71
- package/src-ts/dist/realtime/commands/direct.commands.ts +0 -417
- package/src-ts/dist/realtime/commands/enhanced.direct.commands.ts +0 -1731
- package/src-ts/dist/realtime/commands/index.ts +0 -20
- package/src-ts/dist/realtime/delta-sync.manager.ts +0 -293
- package/src-ts/dist/realtime/features/error-handler.ts +0 -185
- package/src-ts/dist/realtime/features/gap-handler.ts +0 -61
- package/src-ts/dist/realtime/features/persistent-logger.ts +0 -186
- package/src-ts/dist/realtime/index.ts +0 -30
- package/src-ts/dist/realtime/messages/app-presence.event.ts +0 -3
- package/src-ts/dist/realtime/messages/index.ts +0 -20
- package/src-ts/dist/realtime/messages/message-sync.message.ts +0 -43
- package/src-ts/dist/realtime/messages/realtime-sub.direct.data.ts +0 -3
- package/src-ts/dist/realtime/messages/thread-update.message.ts +0 -3
- package/src-ts/dist/realtime/mixins/index.ts +0 -20
- package/src-ts/dist/realtime/mixins/message-sync.mixin.ts +0 -596
- package/src-ts/dist/realtime/mixins/mixin.ts +0 -41
- package/src-ts/dist/realtime/mixins/presence-typing.mixin.ts +0 -33
- package/src-ts/dist/realtime/mixins/realtime-sub.mixin.ts +0 -181
- package/src-ts/dist/realtime/parsers/graphql-parser.ts +0 -43
- package/src-ts/dist/realtime/parsers/index.ts +0 -23
- package/src-ts/dist/realtime/parsers/iris-parser.ts +0 -43
- package/src-ts/dist/realtime/parsers/iris.parser.ts +0 -10
- package/src-ts/dist/realtime/parsers/json-parser.ts +0 -43
- package/src-ts/dist/realtime/parsers/json.parser.ts +0 -10
- package/src-ts/dist/realtime/parsers/parser.ts +0 -3
- package/src-ts/dist/realtime/parsers/region-hint-parser.ts +0 -43
- package/src-ts/dist/realtime/parsers/region-hint.parser.ts +0 -15
- package/src-ts/dist/realtime/parsers/skywalker-parser.ts +0 -43
- package/src-ts/dist/realtime/parsers/skywalker.parser.ts +0 -15
- package/src-ts/dist/realtime/parsers-advanced.ts +0 -158
- package/src-ts/dist/realtime/proto-parser.ts +0 -195
- package/src-ts/dist/realtime/protocols/iris.handshake.ts +0 -74
- package/src-ts/dist/realtime/protocols/proto-definitions.ts +0 -80
- package/src-ts/dist/realtime/realtime.client.events.ts +0 -3
- package/src-ts/dist/realtime/realtime.client.ts +0 -1996
- package/src-ts/dist/realtime/realtime.service.ts +0 -462
- package/src-ts/dist/realtime/reconnect.manager.ts +0 -88
- package/src-ts/dist/realtime/session.manager.ts +0 -121
- package/src-ts/dist/realtime/subscriptions/graphql.subscription.ts +0 -99
- package/src-ts/dist/realtime/subscriptions/index.ts +0 -19
- package/src-ts/dist/realtime/subscriptions/skywalker.subscription.ts +0 -13
- package/src-ts/dist/realtime/topic-map.ts +0 -71
- package/src-ts/dist/realtime/topic.ts +0 -80
- package/src-ts/dist/repositories/account.repository.ts +0 -1384
- package/src-ts/dist/repositories/bloks.repository.ts +0 -70
- package/src-ts/dist/repositories/captcha.repository.ts +0 -44
- package/src-ts/dist/repositories/challenge.repository.ts +0 -120
- package/src-ts/dist/repositories/clip.repository.ts +0 -165
- package/src-ts/dist/repositories/close-friends.repository.ts +0 -46
- package/src-ts/dist/repositories/collection.repository.ts +0 -68
- package/src-ts/dist/repositories/direct-thread.repository.ts +0 -446
- package/src-ts/dist/repositories/direct.repository.ts +0 -266
- package/src-ts/dist/repositories/explore.repository.ts +0 -70
- package/src-ts/dist/repositories/fbsearch.repository.ts +0 -140
- package/src-ts/dist/repositories/feed.repository.ts +0 -245
- package/src-ts/dist/repositories/friendship.repository.ts +0 -296
- package/src-ts/dist/repositories/fundraiser.repository.ts +0 -49
- package/src-ts/dist/repositories/hashtag.repository.ts +0 -99
- package/src-ts/dist/repositories/highlights.repository.ts +0 -121
- package/src-ts/dist/repositories/insights.repository.ts +0 -82
- package/src-ts/dist/repositories/location.repository.ts +0 -84
- package/src-ts/dist/repositories/media.repository.ts +0 -395
- package/src-ts/dist/repositories/multiple-accounts.repository.ts +0 -41
- package/src-ts/dist/repositories/news.repository.ts +0 -35
- package/src-ts/dist/repositories/note.repository.ts +0 -57
- package/src-ts/dist/repositories/notification.repository.ts +0 -79
- package/src-ts/dist/repositories/share.repository.ts +0 -35
- package/src-ts/dist/repositories/signup.repository.ts +0 -218
- package/src-ts/dist/repositories/story.repository.ts +0 -290
- package/src-ts/dist/repositories/timeline.repository.ts +0 -60
- package/src-ts/dist/repositories/totp.repository.ts +0 -139
- package/src-ts/dist/repositories/track.repository.ts +0 -53
- package/src-ts/dist/repositories/upload.repository.ts +0 -204
- package/src-ts/dist/repositories/user.repository.ts +0 -360
- package/src-ts/dist/sendmedia/index.ts +0 -27
- package/src-ts/dist/sendmedia/sendFile.ts +0 -72
- package/src-ts/dist/sendmedia/sendPhoto.ts +0 -142
- package/src-ts/dist/sendmedia/sendRavenPhoto.ts +0 -153
- package/src-ts/dist/sendmedia/sendRavenVideo.ts +0 -158
- package/src-ts/dist/sendmedia/uploadPhoto.ts +0 -107
- package/src-ts/dist/sendmedia/uploadfFile.ts +0 -130
- package/src-ts/dist/services/live.service.ts +0 -139
- package/src-ts/dist/services/search.service.ts +0 -115
- package/src-ts/dist/shared/shared.ts +0 -86
- package/src-ts/dist/thrift/index.ts +0 -20
- package/src-ts/dist/thrift/thrift.reading.ts +0 -368
- package/src-ts/dist/thrift/thrift.ts +0 -111
- package/src-ts/dist/thrift/thrift.writing.ts +0 -396
- package/src-ts/dist/types/index.ts +0 -285
- package/src-ts/dist/useMultiFileAuthState.ts +0 -1800
- package/src-ts/dist/utils/helper-1.ts +0 -1
- package/src-ts/dist/utils/helper-10.ts +0 -1
- package/src-ts/dist/utils/helper-11.ts +0 -1
- package/src-ts/dist/utils/helper-12.ts +0 -1
- package/src-ts/dist/utils/helper-13.ts +0 -1
- package/src-ts/dist/utils/helper-14.ts +0 -1
- package/src-ts/dist/utils/helper-15.ts +0 -1
- package/src-ts/dist/utils/helper-16.ts +0 -1
- package/src-ts/dist/utils/helper-17.ts +0 -1
- package/src-ts/dist/utils/helper-18.ts +0 -1
- package/src-ts/dist/utils/helper-19.ts +0 -1
- package/src-ts/dist/utils/helper-2.ts +0 -1
- package/src-ts/dist/utils/helper-20.ts +0 -1
- package/src-ts/dist/utils/helper-21.ts +0 -1
- package/src-ts/dist/utils/helper-22.ts +0 -1
- package/src-ts/dist/utils/helper-23.ts +0 -1
- package/src-ts/dist/utils/helper-24.ts +0 -1
- package/src-ts/dist/utils/helper-25.ts +0 -1
- package/src-ts/dist/utils/helper-26.ts +0 -1
- package/src-ts/dist/utils/helper-27.ts +0 -1
- package/src-ts/dist/utils/helper-28.ts +0 -1
- package/src-ts/dist/utils/helper-29.ts +0 -1
- package/src-ts/dist/utils/helper-3.ts +0 -1
- package/src-ts/dist/utils/helper-30.ts +0 -1
- package/src-ts/dist/utils/helper-4.ts +0 -1
- package/src-ts/dist/utils/helper-5.ts +0 -1
- package/src-ts/dist/utils/helper-6.ts +0 -1
- package/src-ts/dist/utils/helper-7.ts +0 -1
- package/src-ts/dist/utils/helper-8.ts +0 -1
- package/src-ts/dist/utils/helper-9.ts +0 -1
- package/src-ts/dist/utils/index.ts +0 -280
- package/src-ts/dist/utils/insta-mqtt-helper.ts +0 -128
- package/src-ts/examples/listen-to-messages.ts +0 -86
- /package/{dist-ts → dist}/dist/constants/constants.js +0 -0
- /package/{dist-ts → dist}/dist/constants/index.js +0 -0
- /package/{dist-ts → dist}/dist/core/client.js +0 -0
- /package/{dist-ts → dist}/dist/core/nav-chain.js +0 -0
- /package/{dist-ts → dist}/dist/core/repository.js +0 -0
- /package/{dist-ts → dist}/dist/core/request.js +0 -0
- /package/{dist-ts → dist}/dist/core/state.js +0 -0
- /package/{dist-ts → dist}/dist/core/utils.js +0 -0
- /package/{dist-ts → dist}/dist/errors/index.js +0 -0
- /package/{dist-ts → dist}/dist/extend.js +0 -0
- /package/{dist-ts → dist}/dist/fbns/fbns.client.events.js +0 -0
- /package/{dist-ts → dist}/dist/fbns/fbns.types.js +0 -0
- /package/{dist-ts → dist}/dist/fbns/fbns.utilities.js +0 -0
- /package/{dist-ts → dist}/dist/fbns/index.js +0 -0
- /package/{dist-ts → dist}/dist/index.js +0 -0
- /package/{dist-ts → dist}/dist/mqtt-shim.js +0 -0
- /package/{dist-ts → dist}/dist/mqttot/index.js +0 -0
- /package/{dist-ts → dist}/dist/mqttot/mqttot.connect.request.packet.js +0 -0
- /package/{dist-ts → dist}/dist/mqttot/mqttot.connect.response.packet.js +0 -0
- /package/{dist-ts → dist}/dist/mqttot/mqttot.connection.js +0 -0
- /package/{dist-ts → dist}/dist/realtime/commands/commands.js +0 -0
- /package/{dist-ts → dist}/dist/realtime/commands/direct.commands.js +0 -0
- /package/{dist-ts → dist}/dist/realtime/commands/index.js +0 -0
- /package/{dist-ts → dist}/dist/realtime/features/gap-handler.js +0 -0
- /package/{dist-ts → dist}/dist/realtime/index.js +0 -0
- /package/{dist-ts → dist}/dist/realtime/messages/app-presence.event.js +0 -0
- /package/{dist-ts → dist}/dist/realtime/messages/index.js +0 -0
- /package/{dist-ts → dist}/dist/realtime/messages/message-sync.message.js +0 -0
- /package/{dist-ts → dist}/dist/realtime/messages/realtime-sub.direct.data.js +0 -0
- /package/{dist-ts → dist}/dist/realtime/messages/thread-update.message.js +0 -0
- /package/{dist-ts → dist}/dist/realtime/mixins/index.js +0 -0
- /package/{dist-ts → dist}/dist/realtime/mixins/mixin.js +0 -0
- /package/{dist-ts → dist}/dist/realtime/mixins/presence-typing.mixin.js +0 -0
- /package/{dist-ts → dist}/dist/realtime/parsers/graphql-parser.js +0 -0
- /package/{dist-ts → dist}/dist/realtime/parsers/index.js +0 -0
- /package/{dist-ts → dist}/dist/realtime/parsers/iris-parser.js +0 -0
- /package/{dist-ts → dist}/dist/realtime/parsers/iris.parser.js +0 -0
- /package/{dist-ts → dist}/dist/realtime/parsers/json-parser.js +0 -0
- /package/{dist-ts → dist}/dist/realtime/parsers/json.parser.js +0 -0
- /package/{dist-ts → dist}/dist/realtime/parsers/parser.js +0 -0
- /package/{dist-ts → dist}/dist/realtime/parsers/region-hint-parser.js +0 -0
- /package/{dist-ts → dist}/dist/realtime/parsers/region-hint.parser.js +0 -0
- /package/{dist-ts → dist}/dist/realtime/parsers/skywalker-parser.js +0 -0
- /package/{dist-ts → dist}/dist/realtime/parsers/skywalker.parser.js +0 -0
- /package/{dist-ts → dist}/dist/realtime/protocols/iris.handshake.js +0 -0
- /package/{dist-ts → dist}/dist/realtime/protocols/proto-definitions.js +0 -0
- /package/{dist-ts → dist}/dist/realtime/realtime.client.events.js +0 -0
- /package/{dist-ts → dist}/dist/realtime/realtime.service.js +0 -0
- /package/{dist-ts → dist}/dist/realtime/reconnect.manager.js +0 -0
- /package/{dist-ts → dist}/dist/realtime/session.manager.js +0 -0
- /package/{dist-ts → dist}/dist/realtime/subscriptions/graphql.subscription.js +0 -0
- /package/{dist-ts → dist}/dist/realtime/subscriptions/index.js +0 -0
- /package/{dist-ts → dist}/dist/realtime/subscriptions/skywalker.subscription.js +0 -0
- /package/{dist-ts → dist}/dist/realtime/topic-map.js +0 -0
- /package/{dist-ts → dist}/dist/realtime/topic.js +0 -0
- /package/{dist-ts → dist}/dist/repositories/bloks.repository.js +0 -0
- /package/{dist-ts → dist}/dist/repositories/captcha.repository.js +0 -0
- /package/{dist-ts → dist}/dist/repositories/clip.repository.js +0 -0
- /package/{dist-ts → dist}/dist/repositories/close-friends.repository.js +0 -0
- /package/{dist-ts → dist}/dist/repositories/collection.repository.js +0 -0
- /package/{dist-ts → dist}/dist/repositories/explore.repository.js +0 -0
- /package/{dist-ts → dist}/dist/repositories/fbsearch.repository.js +0 -0
- /package/{dist-ts → dist}/dist/repositories/feed.repository.js +0 -0
- /package/{dist-ts → dist}/dist/repositories/friendship.repository.js +0 -0
- /package/{dist-ts → dist}/dist/repositories/fundraiser.repository.js +0 -0
- /package/{dist-ts → dist}/dist/repositories/hashtag.repository.js +0 -0
- /package/{dist-ts → dist}/dist/repositories/highlights.repository.js +0 -0
- /package/{dist-ts → dist}/dist/repositories/insights.repository.js +0 -0
- /package/{dist-ts → dist}/dist/repositories/location.repository.js +0 -0
- /package/{dist-ts → dist}/dist/repositories/multiple-accounts.repository.js +0 -0
- /package/{dist-ts → dist}/dist/repositories/news.repository.js +0 -0
- /package/{dist-ts → dist}/dist/repositories/note.repository.js +0 -0
- /package/{dist-ts → dist}/dist/repositories/share.repository.js +0 -0
- /package/{dist-ts → dist}/dist/repositories/signup.repository.js +0 -0
- /package/{dist-ts → dist}/dist/repositories/timeline.repository.js +0 -0
- /package/{dist-ts → dist}/dist/repositories/totp.repository.js +0 -0
- /package/{dist-ts → dist}/dist/repositories/user.repository.js +0 -0
- /package/{dist-ts → dist}/dist/sendmedia/index.js +0 -0
- /package/{dist-ts → dist}/dist/sendmedia/sendFile.js +0 -0
- /package/{dist-ts → dist}/dist/sendmedia/sendPhoto.js +0 -0
- /package/{dist-ts → dist}/dist/sendmedia/uploadPhoto.js +0 -0
- /package/{dist-ts → dist}/dist/services/live.service.js +0 -0
- /package/{dist-ts → dist}/dist/services/search.service.js +0 -0
- /package/{dist-ts → dist}/dist/shared/shared.js +0 -0
- /package/{dist-ts → dist}/dist/thrift/index.js +0 -0
- /package/{dist-ts → dist}/dist/thrift/thrift.js +0 -0
- /package/{dist-ts → dist}/dist/types/index.js +0 -0
- /package/{dist-ts → dist}/dist/utils/helper-1.js +0 -0
- /package/{dist-ts → dist}/dist/utils/helper-10.js +0 -0
- /package/{dist-ts → dist}/dist/utils/helper-11.js +0 -0
- /package/{dist-ts → dist}/dist/utils/helper-12.js +0 -0
- /package/{dist-ts → dist}/dist/utils/helper-13.js +0 -0
- /package/{dist-ts → dist}/dist/utils/helper-14.js +0 -0
- /package/{dist-ts → dist}/dist/utils/helper-15.js +0 -0
- /package/{dist-ts → dist}/dist/utils/helper-16.js +0 -0
- /package/{dist-ts → dist}/dist/utils/helper-17.js +0 -0
- /package/{dist-ts → dist}/dist/utils/helper-18.js +0 -0
- /package/{dist-ts → dist}/dist/utils/helper-19.js +0 -0
- /package/{dist-ts → dist}/dist/utils/helper-2.js +0 -0
- /package/{dist-ts → dist}/dist/utils/helper-20.js +0 -0
- /package/{dist-ts → dist}/dist/utils/helper-21.js +0 -0
- /package/{dist-ts → dist}/dist/utils/helper-22.js +0 -0
- /package/{dist-ts → dist}/dist/utils/helper-23.js +0 -0
- /package/{dist-ts → dist}/dist/utils/helper-24.js +0 -0
- /package/{dist-ts → dist}/dist/utils/helper-25.js +0 -0
- /package/{dist-ts → dist}/dist/utils/helper-26.js +0 -0
- /package/{dist-ts → dist}/dist/utils/helper-27.js +0 -0
- /package/{dist-ts → dist}/dist/utils/helper-28.js +0 -0
- /package/{dist-ts → dist}/dist/utils/helper-29.js +0 -0
- /package/{dist-ts → dist}/dist/utils/helper-3.js +0 -0
- /package/{dist-ts → dist}/dist/utils/helper-30.js +0 -0
- /package/{dist-ts → dist}/dist/utils/helper-4.js +0 -0
- /package/{dist-ts → dist}/dist/utils/helper-5.js +0 -0
- /package/{dist-ts → dist}/dist/utils/helper-6.js +0 -0
- /package/{dist-ts → dist}/dist/utils/helper-7.js +0 -0
- /package/{dist-ts → dist}/dist/utils/helper-8.js +0 -0
- /package/{dist-ts → dist}/dist/utils/helper-9.js +0 -0
- /package/{dist-ts → dist}/dist/utils/insta-mqtt-helper.js +0 -0
|
@@ -0,0 +1,605 @@
|
|
|
1
|
+
declare const fs: any;
|
|
2
|
+
declare const path: any;
|
|
3
|
+
declare const util: any;
|
|
4
|
+
declare const CookieJar: any;
|
|
5
|
+
declare const Chance: any;
|
|
6
|
+
declare const Constants: any;
|
|
7
|
+
declare const EventEmitter: any;
|
|
8
|
+
declare const SESSION_FILE: any;
|
|
9
|
+
declare const SESSION_BACKUP: any;
|
|
10
|
+
declare class State {
|
|
11
|
+
constructor();
|
|
12
|
+
get appVersion(): any;
|
|
13
|
+
get appVersionCode(): any;
|
|
14
|
+
get signatureKey(): any;
|
|
15
|
+
get signatureVersion(): any;
|
|
16
|
+
get fbAnalyticsApplicationId(): any;
|
|
17
|
+
get bloksVersionId(): any;
|
|
18
|
+
get clientSessionId(): any;
|
|
19
|
+
get pigeonSessionId(): any;
|
|
20
|
+
get appUserAgent(): string;
|
|
21
|
+
get iosUserAgent(): string;
|
|
22
|
+
get iosResolution(): any;
|
|
23
|
+
get packageName(): any;
|
|
24
|
+
extractCookie(key: any): any;
|
|
25
|
+
extractCookieValue(key: any): any;
|
|
26
|
+
get cookieCsrfToken(): any;
|
|
27
|
+
get cookieUserId(): any;
|
|
28
|
+
set cookieUserId(val: any);
|
|
29
|
+
get cookieUsername(): any;
|
|
30
|
+
hasValidAuthorization(): boolean;
|
|
31
|
+
updateAuthorization(): void;
|
|
32
|
+
refreshAuthorization(newAuthToken: any): boolean;
|
|
33
|
+
serializeCookieJar(): Promise<any>;
|
|
34
|
+
deserializeCookieJar(serialized: any): Promise<void>;
|
|
35
|
+
/**
|
|
36
|
+
* Return a plain-object ready to be JSON.stringify-ed and saved to disk.
|
|
37
|
+
*/
|
|
38
|
+
serialize(): Promise<{
|
|
39
|
+
constants: any;
|
|
40
|
+
cookies: any;
|
|
41
|
+
deviceString: any;
|
|
42
|
+
deviceId: any;
|
|
43
|
+
uuid: any;
|
|
44
|
+
phoneId: any;
|
|
45
|
+
adid: any;
|
|
46
|
+
build: any;
|
|
47
|
+
authorization: any;
|
|
48
|
+
igWWWClaim: any;
|
|
49
|
+
igURur: any;
|
|
50
|
+
mid: any;
|
|
51
|
+
country: any;
|
|
52
|
+
countryCode: any;
|
|
53
|
+
locale: any;
|
|
54
|
+
passwordEncryptionKeyId: any;
|
|
55
|
+
passwordEncryptionPubKey: any;
|
|
56
|
+
language: any;
|
|
57
|
+
timezoneOffset: any;
|
|
58
|
+
connectionTypeHeader: any;
|
|
59
|
+
capabilitiesHeader: any;
|
|
60
|
+
requestId: any;
|
|
61
|
+
traySessionId: any;
|
|
62
|
+
userId: any;
|
|
63
|
+
}>;
|
|
64
|
+
/**
|
|
65
|
+
* Merge data from a saved session into this State instance.
|
|
66
|
+
* Safe: does NOT overwrite prototype getters (like appVersion).
|
|
67
|
+
*/
|
|
68
|
+
deserialize(state: any): Promise<void>;
|
|
69
|
+
saveSessionToFile(filePath?: any, backupPath?: any): Promise<boolean>;
|
|
70
|
+
loadSessionFromFile(filePath?: any, backupPath?: any): Promise<boolean>;
|
|
71
|
+
saveSession(): Promise<boolean>;
|
|
72
|
+
loadSession(): Promise<boolean>;
|
|
73
|
+
generateDevice(seed: any): void;
|
|
74
|
+
regenerateDevice(seed?: string): void;
|
|
75
|
+
/**
|
|
76
|
+
* Set a custom device to emulate when connecting to Instagram.
|
|
77
|
+
* This allows you to choose which phone model Instagram sees.
|
|
78
|
+
*
|
|
79
|
+
* @param {Object} deviceConfig - The device configuration
|
|
80
|
+
* @param {string} deviceConfig.manufacturer - Phone manufacturer (e.g., 'samsung', 'huawei', 'google')
|
|
81
|
+
* @param {string} deviceConfig.model - Phone model code (e.g., 'SM-S928B' for Samsung S25 Ultra)
|
|
82
|
+
* @param {string} deviceConfig.device - Device codename (e.g., 'e3q' for S25 Ultra)
|
|
83
|
+
* @param {string} deviceConfig.androidVersion - Android version (e.g., '15')
|
|
84
|
+
* @param {number} deviceConfig.androidApiLevel - Android API level (e.g., 35 for Android 15)
|
|
85
|
+
* @param {string} deviceConfig.resolution - Screen resolution (e.g., '1440x3120')
|
|
86
|
+
* @param {string} deviceConfig.dpi - Screen density (e.g., '505dpi')
|
|
87
|
+
* @param {string} deviceConfig.chipset - Chipset name (e.g., 'qcom')
|
|
88
|
+
* @param {string} deviceConfig.build - Build number (optional)
|
|
89
|
+
*
|
|
90
|
+
* @example
|
|
91
|
+
* // Samsung Galaxy S25 Ultra
|
|
92
|
+
* state.setCustomDevice({
|
|
93
|
+
* manufacturer: 'samsung',
|
|
94
|
+
* model: 'SM-S928B',
|
|
95
|
+
* device: 'e3q',
|
|
96
|
+
* androidVersion: '15',
|
|
97
|
+
* androidApiLevel: 35,
|
|
98
|
+
* resolution: '1440x3120',
|
|
99
|
+
* dpi: '505dpi',
|
|
100
|
+
* chipset: 'qcom'
|
|
101
|
+
* });
|
|
102
|
+
*/
|
|
103
|
+
setCustomDevice(deviceConfig: any): any;
|
|
104
|
+
/**
|
|
105
|
+
* Get a list of popular preset devices that can be used with setCustomDevice()
|
|
106
|
+
* @returns {Object} Object containing preset device configurations
|
|
107
|
+
*/
|
|
108
|
+
getPresetDevices(): {
|
|
109
|
+
'Samsung Galaxy S25 Ultra': {
|
|
110
|
+
manufacturer: string;
|
|
111
|
+
model: string;
|
|
112
|
+
device: string;
|
|
113
|
+
androidVersion: string;
|
|
114
|
+
androidApiLevel: number;
|
|
115
|
+
resolution: string;
|
|
116
|
+
dpi: string;
|
|
117
|
+
chipset: string;
|
|
118
|
+
build: string;
|
|
119
|
+
};
|
|
120
|
+
'Samsung Galaxy S24 Ultra': {
|
|
121
|
+
manufacturer: string;
|
|
122
|
+
model: string;
|
|
123
|
+
device: string;
|
|
124
|
+
androidVersion: string;
|
|
125
|
+
androidApiLevel: number;
|
|
126
|
+
resolution: string;
|
|
127
|
+
dpi: string;
|
|
128
|
+
chipset: string;
|
|
129
|
+
build: string;
|
|
130
|
+
};
|
|
131
|
+
'Samsung Galaxy S23 Ultra': {
|
|
132
|
+
manufacturer: string;
|
|
133
|
+
model: string;
|
|
134
|
+
device: string;
|
|
135
|
+
androidVersion: string;
|
|
136
|
+
androidApiLevel: number;
|
|
137
|
+
resolution: string;
|
|
138
|
+
dpi: string;
|
|
139
|
+
chipset: string;
|
|
140
|
+
build: string;
|
|
141
|
+
};
|
|
142
|
+
'Samsung Galaxy Z Fold 5': {
|
|
143
|
+
manufacturer: string;
|
|
144
|
+
model: string;
|
|
145
|
+
device: string;
|
|
146
|
+
androidVersion: string;
|
|
147
|
+
androidApiLevel: number;
|
|
148
|
+
resolution: string;
|
|
149
|
+
dpi: string;
|
|
150
|
+
chipset: string;
|
|
151
|
+
build: string;
|
|
152
|
+
};
|
|
153
|
+
'Huawei P60 Pro': {
|
|
154
|
+
manufacturer: string;
|
|
155
|
+
model: string;
|
|
156
|
+
device: string;
|
|
157
|
+
androidVersion: string;
|
|
158
|
+
androidApiLevel: number;
|
|
159
|
+
resolution: string;
|
|
160
|
+
dpi: string;
|
|
161
|
+
chipset: string;
|
|
162
|
+
build: string;
|
|
163
|
+
};
|
|
164
|
+
'Huawei Mate 60 Pro': {
|
|
165
|
+
manufacturer: string;
|
|
166
|
+
model: string;
|
|
167
|
+
device: string;
|
|
168
|
+
androidVersion: string;
|
|
169
|
+
androidApiLevel: number;
|
|
170
|
+
resolution: string;
|
|
171
|
+
dpi: string;
|
|
172
|
+
chipset: string;
|
|
173
|
+
build: string;
|
|
174
|
+
};
|
|
175
|
+
'Google Pixel 8 Pro': {
|
|
176
|
+
manufacturer: string;
|
|
177
|
+
model: string;
|
|
178
|
+
device: string;
|
|
179
|
+
androidVersion: string;
|
|
180
|
+
androidApiLevel: number;
|
|
181
|
+
resolution: string;
|
|
182
|
+
dpi: string;
|
|
183
|
+
chipset: string;
|
|
184
|
+
build: string;
|
|
185
|
+
};
|
|
186
|
+
'Google Pixel 9 Pro': {
|
|
187
|
+
manufacturer: string;
|
|
188
|
+
model: string;
|
|
189
|
+
device: string;
|
|
190
|
+
androidVersion: string;
|
|
191
|
+
androidApiLevel: number;
|
|
192
|
+
resolution: string;
|
|
193
|
+
dpi: string;
|
|
194
|
+
chipset: string;
|
|
195
|
+
build: string;
|
|
196
|
+
};
|
|
197
|
+
'OnePlus 12': {
|
|
198
|
+
manufacturer: string;
|
|
199
|
+
model: string;
|
|
200
|
+
device: string;
|
|
201
|
+
androidVersion: string;
|
|
202
|
+
androidApiLevel: number;
|
|
203
|
+
resolution: string;
|
|
204
|
+
dpi: string;
|
|
205
|
+
chipset: string;
|
|
206
|
+
build: string;
|
|
207
|
+
};
|
|
208
|
+
'Xiaomi 14 Ultra': {
|
|
209
|
+
manufacturer: string;
|
|
210
|
+
model: string;
|
|
211
|
+
device: string;
|
|
212
|
+
androidVersion: string;
|
|
213
|
+
androidApiLevel: number;
|
|
214
|
+
resolution: string;
|
|
215
|
+
dpi: string;
|
|
216
|
+
chipset: string;
|
|
217
|
+
build: string;
|
|
218
|
+
};
|
|
219
|
+
'Xiaomi Redmi Note 13 Pro': {
|
|
220
|
+
manufacturer: string;
|
|
221
|
+
model: string;
|
|
222
|
+
device: string;
|
|
223
|
+
androidVersion: string;
|
|
224
|
+
androidApiLevel: number;
|
|
225
|
+
resolution: string;
|
|
226
|
+
dpi: string;
|
|
227
|
+
chipset: string;
|
|
228
|
+
build: string;
|
|
229
|
+
};
|
|
230
|
+
'OPPO Find X7 Ultra': {
|
|
231
|
+
manufacturer: string;
|
|
232
|
+
model: string;
|
|
233
|
+
device: string;
|
|
234
|
+
androidVersion: string;
|
|
235
|
+
androidApiLevel: number;
|
|
236
|
+
resolution: string;
|
|
237
|
+
dpi: string;
|
|
238
|
+
chipset: string;
|
|
239
|
+
build: string;
|
|
240
|
+
platform: string;
|
|
241
|
+
};
|
|
242
|
+
'iPhone 16 Pro Max': {
|
|
243
|
+
platform: string;
|
|
244
|
+
iosDeviceModel: string;
|
|
245
|
+
iosDeviceName: string;
|
|
246
|
+
iosVersion: string;
|
|
247
|
+
resolution: string;
|
|
248
|
+
chipset: string;
|
|
249
|
+
};
|
|
250
|
+
'iPhone 16 Pro': {
|
|
251
|
+
platform: string;
|
|
252
|
+
iosDeviceModel: string;
|
|
253
|
+
iosDeviceName: string;
|
|
254
|
+
iosVersion: string;
|
|
255
|
+
resolution: string;
|
|
256
|
+
chipset: string;
|
|
257
|
+
};
|
|
258
|
+
'iPhone 16 Plus': {
|
|
259
|
+
platform: string;
|
|
260
|
+
iosDeviceModel: string;
|
|
261
|
+
iosDeviceName: string;
|
|
262
|
+
iosVersion: string;
|
|
263
|
+
resolution: string;
|
|
264
|
+
chipset: string;
|
|
265
|
+
};
|
|
266
|
+
'iPhone 16': {
|
|
267
|
+
platform: string;
|
|
268
|
+
iosDeviceModel: string;
|
|
269
|
+
iosDeviceName: string;
|
|
270
|
+
iosVersion: string;
|
|
271
|
+
resolution: string;
|
|
272
|
+
chipset: string;
|
|
273
|
+
};
|
|
274
|
+
'iPhone 15 Pro Max': {
|
|
275
|
+
platform: string;
|
|
276
|
+
iosDeviceModel: string;
|
|
277
|
+
iosDeviceName: string;
|
|
278
|
+
iosVersion: string;
|
|
279
|
+
resolution: string;
|
|
280
|
+
chipset: string;
|
|
281
|
+
};
|
|
282
|
+
'iPhone 15 Pro': {
|
|
283
|
+
platform: string;
|
|
284
|
+
iosDeviceModel: string;
|
|
285
|
+
iosDeviceName: string;
|
|
286
|
+
iosVersion: string;
|
|
287
|
+
resolution: string;
|
|
288
|
+
chipset: string;
|
|
289
|
+
};
|
|
290
|
+
'iPhone 15 Plus': {
|
|
291
|
+
platform: string;
|
|
292
|
+
iosDeviceModel: string;
|
|
293
|
+
iosDeviceName: string;
|
|
294
|
+
iosVersion: string;
|
|
295
|
+
resolution: string;
|
|
296
|
+
chipset: string;
|
|
297
|
+
};
|
|
298
|
+
'iPhone 15': {
|
|
299
|
+
platform: string;
|
|
300
|
+
iosDeviceModel: string;
|
|
301
|
+
iosDeviceName: string;
|
|
302
|
+
iosVersion: string;
|
|
303
|
+
resolution: string;
|
|
304
|
+
chipset: string;
|
|
305
|
+
};
|
|
306
|
+
'iPhone 14 Pro Max': {
|
|
307
|
+
platform: string;
|
|
308
|
+
iosDeviceModel: string;
|
|
309
|
+
iosDeviceName: string;
|
|
310
|
+
iosVersion: string;
|
|
311
|
+
resolution: string;
|
|
312
|
+
chipset: string;
|
|
313
|
+
};
|
|
314
|
+
'iPhone 14 Pro': {
|
|
315
|
+
platform: string;
|
|
316
|
+
iosDeviceModel: string;
|
|
317
|
+
iosDeviceName: string;
|
|
318
|
+
iosVersion: string;
|
|
319
|
+
resolution: string;
|
|
320
|
+
chipset: string;
|
|
321
|
+
};
|
|
322
|
+
'iPhone 14 Plus': {
|
|
323
|
+
platform: string;
|
|
324
|
+
iosDeviceModel: string;
|
|
325
|
+
iosDeviceName: string;
|
|
326
|
+
iosVersion: string;
|
|
327
|
+
resolution: string;
|
|
328
|
+
chipset: string;
|
|
329
|
+
};
|
|
330
|
+
'iPhone 14': {
|
|
331
|
+
platform: string;
|
|
332
|
+
iosDeviceModel: string;
|
|
333
|
+
iosDeviceName: string;
|
|
334
|
+
iosVersion: string;
|
|
335
|
+
resolution: string;
|
|
336
|
+
chipset: string;
|
|
337
|
+
};
|
|
338
|
+
'iPhone 13 Pro Max': {
|
|
339
|
+
platform: string;
|
|
340
|
+
iosDeviceModel: string;
|
|
341
|
+
iosDeviceName: string;
|
|
342
|
+
iosVersion: string;
|
|
343
|
+
resolution: string;
|
|
344
|
+
chipset: string;
|
|
345
|
+
};
|
|
346
|
+
'iPhone 13 Pro': {
|
|
347
|
+
platform: string;
|
|
348
|
+
iosDeviceModel: string;
|
|
349
|
+
iosDeviceName: string;
|
|
350
|
+
iosVersion: string;
|
|
351
|
+
resolution: string;
|
|
352
|
+
chipset: string;
|
|
353
|
+
};
|
|
354
|
+
'iPhone 13': {
|
|
355
|
+
platform: string;
|
|
356
|
+
iosDeviceModel: string;
|
|
357
|
+
iosDeviceName: string;
|
|
358
|
+
iosVersion: string;
|
|
359
|
+
resolution: string;
|
|
360
|
+
chipset: string;
|
|
361
|
+
};
|
|
362
|
+
'iPhone 12 Pro Max': {
|
|
363
|
+
platform: string;
|
|
364
|
+
iosDeviceModel: string;
|
|
365
|
+
iosDeviceName: string;
|
|
366
|
+
iosVersion: string;
|
|
367
|
+
resolution: string;
|
|
368
|
+
chipset: string;
|
|
369
|
+
};
|
|
370
|
+
'iPhone 12 Pro': {
|
|
371
|
+
platform: string;
|
|
372
|
+
iosDeviceModel: string;
|
|
373
|
+
iosDeviceName: string;
|
|
374
|
+
iosVersion: string;
|
|
375
|
+
resolution: string;
|
|
376
|
+
chipset: string;
|
|
377
|
+
};
|
|
378
|
+
'iPhone 12': {
|
|
379
|
+
platform: string;
|
|
380
|
+
iosDeviceModel: string;
|
|
381
|
+
iosDeviceName: string;
|
|
382
|
+
iosVersion: string;
|
|
383
|
+
resolution: string;
|
|
384
|
+
chipset: string;
|
|
385
|
+
};
|
|
386
|
+
'iPad Pro 12.9 (6th gen)': {
|
|
387
|
+
platform: string;
|
|
388
|
+
iosDeviceModel: string;
|
|
389
|
+
iosDeviceName: string;
|
|
390
|
+
iosVersion: string;
|
|
391
|
+
resolution: string;
|
|
392
|
+
chipset: string;
|
|
393
|
+
};
|
|
394
|
+
'iPad Pro 11 (4th gen)': {
|
|
395
|
+
platform: string;
|
|
396
|
+
iosDeviceModel: string;
|
|
397
|
+
iosDeviceName: string;
|
|
398
|
+
iosVersion: string;
|
|
399
|
+
resolution: string;
|
|
400
|
+
chipset: string;
|
|
401
|
+
};
|
|
402
|
+
'iPad Air (5th gen)': {
|
|
403
|
+
platform: string;
|
|
404
|
+
iosDeviceModel: string;
|
|
405
|
+
iosDeviceName: string;
|
|
406
|
+
iosVersion: string;
|
|
407
|
+
resolution: string;
|
|
408
|
+
chipset: string;
|
|
409
|
+
};
|
|
410
|
+
};
|
|
411
|
+
/**
|
|
412
|
+
* Get only iOS device presets
|
|
413
|
+
* @returns {Object} Object containing iOS device configurations
|
|
414
|
+
*/
|
|
415
|
+
getIOSDevices(): {};
|
|
416
|
+
/**
|
|
417
|
+
* Get only Android device presets
|
|
418
|
+
* @returns {Object} Object containing Android device configurations
|
|
419
|
+
*/
|
|
420
|
+
getAndroidDevices(): {};
|
|
421
|
+
/**
|
|
422
|
+
* Set an iOS device to emulate
|
|
423
|
+
* @param {Object} iosConfig - iOS device configuration
|
|
424
|
+
* @returns {string} The iOS User-Agent
|
|
425
|
+
*/
|
|
426
|
+
setIOSDevice(iosConfig: any): string;
|
|
427
|
+
/**
|
|
428
|
+
* Switch to iOS platform with a preset device
|
|
429
|
+
* @param {string} presetName - Name of the iOS preset (e.g., 'iPhone 16 Pro Max')
|
|
430
|
+
* @returns {string|null} iOS User-Agent if successful, null if preset not found
|
|
431
|
+
*/
|
|
432
|
+
useIOSDevice(presetName: any): string;
|
|
433
|
+
/**
|
|
434
|
+
* Switch to Android platform with a preset device
|
|
435
|
+
* @param {string} presetName - Name of the Android preset (e.g., 'Samsung Galaxy S25 Ultra')
|
|
436
|
+
* @returns {string|null} Device string if successful, null if preset not found
|
|
437
|
+
*/
|
|
438
|
+
useAndroidDevice(presetName: any): any;
|
|
439
|
+
/**
|
|
440
|
+
* Switch platform between iOS and Android
|
|
441
|
+
* @param {string} targetPlatform - 'ios' or 'android'
|
|
442
|
+
* @param {string} devicePreset - Optional device preset name
|
|
443
|
+
*/
|
|
444
|
+
switchPlatform(targetPlatform: any, devicePreset?: any): any;
|
|
445
|
+
/**
|
|
446
|
+
* Get current platform info
|
|
447
|
+
* @returns {Object} Current platform and device information
|
|
448
|
+
*/
|
|
449
|
+
getPlatformInfo(): {
|
|
450
|
+
iosDeviceModel: any;
|
|
451
|
+
iosDeviceName: any;
|
|
452
|
+
iosVersion: any;
|
|
453
|
+
iosAppVersion: any;
|
|
454
|
+
platform: any;
|
|
455
|
+
userAgent: string;
|
|
456
|
+
packageName: any;
|
|
457
|
+
deviceId: any;
|
|
458
|
+
} | {
|
|
459
|
+
deviceString: any;
|
|
460
|
+
build: any;
|
|
461
|
+
platform: any;
|
|
462
|
+
userAgent: string;
|
|
463
|
+
packageName: any;
|
|
464
|
+
deviceId: any;
|
|
465
|
+
};
|
|
466
|
+
/**
|
|
467
|
+
* List all available device presets grouped by platform
|
|
468
|
+
* @returns {Object} Devices grouped by platform
|
|
469
|
+
*/
|
|
470
|
+
listAllDevices(): {
|
|
471
|
+
android: string[];
|
|
472
|
+
ios: string[];
|
|
473
|
+
};
|
|
474
|
+
/**
|
|
475
|
+
* Quick method to set a device from presets by name
|
|
476
|
+
* @param {string} presetName - Name of the preset (e.g., 'Samsung Galaxy S25 Ultra')
|
|
477
|
+
* @returns {string|null} Device string if successful, null if preset not found
|
|
478
|
+
*
|
|
479
|
+
* @example
|
|
480
|
+
* state.usePresetDevice('Samsung Galaxy S25 Ultra');
|
|
481
|
+
* state.usePresetDevice('Huawei P60 Pro');
|
|
482
|
+
* state.usePresetDevice('Google Pixel 8 Pro');
|
|
483
|
+
*/
|
|
484
|
+
usePresetDevice(presetName: any): any;
|
|
485
|
+
/**
|
|
486
|
+
* Get the current device info being emulated
|
|
487
|
+
* @returns {Object} Current device configuration
|
|
488
|
+
*/
|
|
489
|
+
getCurrentDeviceInfo(): {
|
|
490
|
+
deviceString: any;
|
|
491
|
+
deviceId: any;
|
|
492
|
+
uuid: any;
|
|
493
|
+
phoneId: any;
|
|
494
|
+
adid: any;
|
|
495
|
+
build: any;
|
|
496
|
+
userAgent: string;
|
|
497
|
+
};
|
|
498
|
+
generateTemporaryGuid(seed: any, lifetime: any): any;
|
|
499
|
+
clearCookies(): void;
|
|
500
|
+
listCookies(): any[];
|
|
501
|
+
logStateSummary(): void;
|
|
502
|
+
/**
|
|
503
|
+
* Subscribe to internal state events (non-invasive).
|
|
504
|
+
* Events emitted:
|
|
505
|
+
* - 'session_saved' => (filePath)
|
|
506
|
+
* - 'session_save_failed' => (err)
|
|
507
|
+
* - 'session_loaded' => (filePath)
|
|
508
|
+
* - 'session_load_failed' => (err)
|
|
509
|
+
* - 'cookies_cleared'
|
|
510
|
+
* - 'device_regenerated'
|
|
511
|
+
* - 'session_file_changed' => (eventType, filename)
|
|
512
|
+
*/
|
|
513
|
+
on(event: any, listener: any): void;
|
|
514
|
+
off(event: any, listener: any): void;
|
|
515
|
+
once(event: any, listener: any): void;
|
|
516
|
+
/**
|
|
517
|
+
* Atomic save with retries and backup rotation.
|
|
518
|
+
* Attempts to write to a temp file, rename into place (atomic on most OSes),
|
|
519
|
+
* and maintain up to `_maxBackupCopies` rotated backups.
|
|
520
|
+
*/
|
|
521
|
+
safeSaveSessionToFile(filePath?: any, backupPath?: any, opts?: {}): Promise<boolean>;
|
|
522
|
+
_rotateAndWriteBackup(filePath: any, backupPath: any, maxBackups: any): Promise<void>;
|
|
523
|
+
/**
|
|
524
|
+
* Safe load with retries. Emits session_loaded/session_load_failed events.
|
|
525
|
+
*/
|
|
526
|
+
safeLoadSessionFromFile(filePath?: any, backupPath?: any, opts?: {}): Promise<boolean>;
|
|
527
|
+
/**
|
|
528
|
+
* Validate minimal session integrity: ensure cookie jar has expected cookies or parsed authorization
|
|
529
|
+
*/
|
|
530
|
+
validateSession(): boolean;
|
|
531
|
+
/**
|
|
532
|
+
* Merge cookies from another serialized jar or CookieJar instance into current cookieJar.
|
|
533
|
+
* Accepts: serialized object/string (as used by serializeCookieJar) or CookieJar instance.
|
|
534
|
+
*/
|
|
535
|
+
mergeCookieJarFrom(other: any): Promise<boolean>;
|
|
536
|
+
/**
|
|
537
|
+
* Export a minimal session object (useful for sending to remote storage or IPC).
|
|
538
|
+
*/
|
|
539
|
+
exportMinimalSession(): Promise<{
|
|
540
|
+
deviceId: any;
|
|
541
|
+
deviceString: any;
|
|
542
|
+
uuid: any;
|
|
543
|
+
phoneId: any;
|
|
544
|
+
adid: any;
|
|
545
|
+
build: any;
|
|
546
|
+
authorization: any;
|
|
547
|
+
cookies: any;
|
|
548
|
+
}>;
|
|
549
|
+
/**
|
|
550
|
+
* Import minimal session object (merges cookies if present and sets fields).
|
|
551
|
+
*/
|
|
552
|
+
importMinimalSession(minObj?: {}): Promise<boolean>;
|
|
553
|
+
/**
|
|
554
|
+
* Set proxy URL (persists only in-memory; use saveSessionToFile to persist).
|
|
555
|
+
*/
|
|
556
|
+
setProxyUrl(url: any): any;
|
|
557
|
+
clearProxyUrl(): boolean;
|
|
558
|
+
/**
|
|
559
|
+
* Mark checkpoint metadata object (stores arbitrary checkpoint info).
|
|
560
|
+
*/
|
|
561
|
+
markCheckpoint(obj: any): boolean;
|
|
562
|
+
clearCheckpoint(): boolean;
|
|
563
|
+
/**
|
|
564
|
+
* Ensure session file has safe permissions (owner read/write only)
|
|
565
|
+
*/
|
|
566
|
+
ensureFilePermissions(filePath?: any): boolean;
|
|
567
|
+
/**
|
|
568
|
+
* Watch the session file for external changes and emit 'session_file_changed'.
|
|
569
|
+
* Note: uses fs.watchFile which is more portable; call stopWatchingSessionFile() to stop.
|
|
570
|
+
*/
|
|
571
|
+
watchSessionFile(filePath?: any, intervalMs?: number): boolean;
|
|
572
|
+
stopWatchingSessionFile(filePath?: any): boolean;
|
|
573
|
+
/**
|
|
574
|
+
* If device looks missing or invalid, regenerate device fields.
|
|
575
|
+
* Condition: deviceId missing or doesn't start with expected prefix.
|
|
576
|
+
*/
|
|
577
|
+
refreshDeviceIfMissingOrOld(seed?: string): boolean;
|
|
578
|
+
/**
|
|
579
|
+
* Refresh authorization state from cookies (useful after merging cookies).
|
|
580
|
+
*/
|
|
581
|
+
refreshAuthFromCookies(): boolean;
|
|
582
|
+
/**
|
|
583
|
+
* Safe load helper that tries to load, validate, and optionally attempt fallback to backup copies.
|
|
584
|
+
* If `validate` is true, will call validateSession() and throw if invalid.
|
|
585
|
+
*/
|
|
586
|
+
loadAndValidateSession(filePath?: any, backupPath?: any, opts?: {}): Promise<boolean>;
|
|
587
|
+
_tryLoadRotatedBackups(backupPath: any, opts?: {}): Promise<boolean>;
|
|
588
|
+
/**
|
|
589
|
+
* Clear all session data (cookies + auth + device optional).
|
|
590
|
+
* If `preserveDevice` is true, device fields are kept.
|
|
591
|
+
*/
|
|
592
|
+
clearAllSession(preserveDevice?: boolean): boolean;
|
|
593
|
+
/**
|
|
594
|
+
* Quick helper: get value of cookie if exists, or null (non-throwing).
|
|
595
|
+
*/
|
|
596
|
+
getCookieValueSafe(key: any): any;
|
|
597
|
+
/**
|
|
598
|
+
* Convenience: set default save/retry options
|
|
599
|
+
*/
|
|
600
|
+
setSaveRetryOptions({ retries, delayMs, maxBackups }?: {}): {
|
|
601
|
+
retries: any;
|
|
602
|
+
delayMs: any;
|
|
603
|
+
maxBackups: any;
|
|
604
|
+
};
|
|
605
|
+
}
|