From 66520c26d80291bb45961b6b5e71b54ec0a2d50d Mon Sep 17 00:00:00 2001 From: Serhii Mamontov Date: Thu, 31 Oct 2024 21:54:36 +0200 Subject: [PATCH] Fix types definition issues (#417) fix(types): fix `Actions` type definition Fix definition of type which represent message actions received from history and list of users which added action of specific type and value to the message. Closes #407 refactor(types): remove indexed signature for publish Remove redundant indexed signature from publish message parameters type definition. Closes #413 refactor(types): add serializable objects to `Payload` type Extend `Payload` type definition with objects which can be serialized by `JSON.stringify` using `toJSON()` methods. Closes #412 refactor(types): aggregate generated types definitions Aggregate multiple types definitions into single type definition type with proper type names and namespaces. Closes #405 #409 #410 refactor(types): add missing Subscribe Event Engine types Add Subscribe Event Engine and Event Listener types to the bundled types definition file. Closes #377 --- .pubnub.yml | 27 +- .scripts/types-aggregate.ts | 803 ++ CHANGELOG.md | 18 + README.md | 4 +- dist/web/pubnub.js | 1530 ++- dist/web/pubnub.min.js | 4 +- dist/web/pubnub.worker.js | 10 +- lib/cbor/common.js | 2 + lib/core/components/abort_signal.js | 5 + lib/core/components/base64_codec.js | 10 +- lib/core/components/configuration.js | 6 +- .../components/cryptography/hmac-sha256.js | 5 + lib/core/components/cryptography/index.js | 9 + lib/core/components/deduping_manager.js | 75 +- lib/core/components/eventEmitter.js | 5 + lib/core/components/push_payload.js | 73 +- lib/core/components/reconnection_manager.js | 2 + lib/core/components/request.js | 5 + lib/core/components/stringify_buffer_keys.js | 8 +- lib/core/components/subject.js | 5 + lib/core/components/subscription-manager.js | 8 +- lib/core/components/token_manager.js | 2 + lib/core/components/uuid.js | 6 + lib/core/constants/operations.js | 14 +- lib/core/endpoints/access_manager/audit.js | 2 + lib/core/endpoints/access_manager/grant.js | 2 + .../endpoints/access_manager/grant_token.js | 2 + .../endpoints/access_manager/revoke_token.js | 2 + .../endpoints/actions/add_message_action.js | 2 + .../endpoints/actions/get_message_actions.js | 2 + .../actions/remove_message_action.js | 2 + .../endpoints/channel_groups/add_channels.js | 2 + .../endpoints/channel_groups/delete_group.js | 2 + .../endpoints/channel_groups/list_channels.js | 2 + .../endpoints/channel_groups/list_groups.js | 2 + .../channel_groups/remove_channels.js | 2 + lib/core/endpoints/fetch_messages.js | 2 + lib/core/endpoints/file_upload/delete_file.js | 2 + .../endpoints/file_upload/download_file.js | 2 + .../file_upload/generate_upload_url.js | 2 + .../endpoints/file_upload/get_file_url.js | 2 + lib/core/endpoints/file_upload/list_files.js | 2 + .../endpoints/file_upload/publish_file.js | 2 + lib/core/endpoints/file_upload/send_file.js | 5 + lib/core/endpoints/file_upload/upload-file.js | 2 + lib/core/endpoints/history/delete_messages.js | 2 + lib/core/endpoints/history/get_history.js | 2 + lib/core/endpoints/history/message_counts.js | 2 + lib/core/endpoints/objects/channel/get.js | 2 + lib/core/endpoints/objects/channel/get_all.js | 2 + lib/core/endpoints/objects/channel/remove.js | 2 + lib/core/endpoints/objects/channel/set.js | 2 + lib/core/endpoints/objects/member/get.js | 2 + lib/core/endpoints/objects/member/set.js | 2 + lib/core/endpoints/objects/membership/get.js | 2 + lib/core/endpoints/objects/membership/set.js | 2 + lib/core/endpoints/objects/uuid/get.js | 2 + lib/core/endpoints/objects/uuid/get_all.js | 2 + lib/core/endpoints/objects/uuid/remove.js | 2 + lib/core/endpoints/objects/uuid/set.js | 2 + lib/core/endpoints/presence/get_state.js | 2 + lib/core/endpoints/presence/heartbeat.js | 2 + lib/core/endpoints/presence/here_now.js | 2 + lib/core/endpoints/presence/leave.js | 2 + lib/core/endpoints/presence/set_state.js | 2 + lib/core/endpoints/presence/where_now.js | 2 + lib/core/endpoints/push/add_push_channels.js | 2 + lib/core/endpoints/push/list_push_channels.js | 2 + lib/core/endpoints/push/push.js | 2 + lib/core/endpoints/push/remove_device.js | 2 + .../endpoints/push/remove_push_channels.js | 2 + lib/core/endpoints/subscribe.js | 2 - .../endpoints/subscriptionUtils/handshake.js | 2 + .../subscriptionUtils/receiveMessages.js | 2 + lib/core/interfaces/configuration.js | 7 +- lib/core/interfaces/crypto-module.js | 6 + lib/core/pubnub-channel-groups.js | 17 +- lib/core/pubnub-common.js | 32 +- lib/core/pubnub-objects.js | 31 +- lib/core/pubnub-push.js | 13 +- lib/core/utils.js | 19 +- .../modules/NodeCryptoModule/aesCbcCryptor.js | 4 + .../modules/NodeCryptoModule/legacyCryptor.js | 4 + .../NodeCryptoModule/nodeCryptoModule.js | 40 +- lib/crypto/modules/node.js | 4 + lib/entities/Channel.js | 28 +- lib/entities/ChannelGroup.js | 29 +- lib/entities/ChannelMetadata.js | 27 +- lib/entities/SubscribeCapable.js | 68 + lib/entities/Subscription.js | 45 + lib/entities/SubscriptionSet.js | 89 + lib/entities/UserMetadata.js | 27 +- lib/errors/pubnub-api-error.js | 4 + lib/errors/pubnub-error.js | 41 +- lib/event-engine/core/change.js | 6 +- lib/event-engine/core/dispatcher.js | 13 +- lib/event-engine/core/engine.js | 12 +- lib/event-engine/core/handler.js | 26 + lib/event-engine/core/index.js | 9 + lib/event-engine/core/retryPolicy.js | 3 + lib/event-engine/core/state.js | 13 +- lib/event-engine/core/types.js | 28 +- lib/event-engine/dispatcher.js | 22 +- lib/event-engine/effects.js | 48 + lib/event-engine/events.js | 110 + lib/event-engine/index.js | 10 + lib/event-engine/presence/dispatcher.js | 24 +- lib/event-engine/presence/effects.js | 40 + lib/event-engine/presence/events.js | 73 + lib/event-engine/presence/presence.js | 10 + .../presence/states/heartbeat_cooldown.js | 12 + .../presence/states/heartbeat_failed.js | 13 + .../presence/states/heartbeat_inactive.js | 12 + .../presence/states/heartbeat_reconnecting.js | 12 + .../presence/states/heartbeat_stopped.js | 13 + .../presence/states/heartbeating.js | 12 + lib/event-engine/states/handshake_failed.js | 15 +- .../states/handshake_reconnecting.js | 12 + lib/event-engine/states/handshake_stopped.js | 13 + lib/event-engine/states/handshaking.js | 13 + lib/event-engine/states/receive_failed.js | 13 + .../states/receive_reconnecting.js | 12 + lib/event-engine/states/receive_stopped.js | 13 + lib/event-engine/states/receiving.js | 12 + lib/event-engine/states/unsubscribed.js | 12 + lib/node/{ => components}/configuration.js | 2 +- lib/node/index.js | 13 +- lib/react_native/index.js | 7 + lib/transport/middleware.js | 10 + lib/transport/node-transport.js | 17 + lib/transport/web-react-native-transport.js | 23 +- lib/types/cbor/common.d.ts | 4 - lib/types/core/components/abort_signal.d.ts | 4 - lib/types/core/components/base64_codec.d.ts | 1 - lib/types/core/components/configuration.d.ts | 4 - .../components/cryptography/hmac-sha256.d.ts | 3 - .../core/components/cryptography/index.d.ts | 143 - .../core/components/deduping_manager.d.ts | 16 - lib/types/core/components/eventEmitter.d.ts | 1 - .../core/components/listener_manager.d.ts | 76 - lib/types/core/components/push_payload.d.ts | 636 -- .../core/components/reconnection_manager.d.ts | 6 - lib/types/core/components/request.d.ts | 1 - .../components/stringify_buffer_keys.d.ts | 1 - lib/types/core/components/subject.d.ts | 1 - .../core/components/subscription-manager.d.ts | 4 - lib/types/core/components/token_manager.d.ts | 4 - lib/types/core/components/uuid.d.ts | 4 - lib/types/core/constants/categories.d.ts | 75 - lib/types/core/constants/operations.d.ts | 203 - .../core/endpoints/access_manager/audit.d.ts | 4 - .../core/endpoints/access_manager/grant.d.ts | 4 - .../endpoints/access_manager/grant_token.d.ts | 4 - .../access_manager/revoke_token.d.ts | 4 - .../endpoints/actions/add_message_action.d.ts | 4 - .../actions/get_message_actions.d.ts | 4 - .../actions/remove_message_action.d.ts | 4 - .../channel_groups/add_channels.d.ts | 4 - .../channel_groups/delete_group.d.ts | 4 - .../channel_groups/list_channels.d.ts | 4 - .../endpoints/channel_groups/list_groups.d.ts | 4 - .../channel_groups/remove_channels.d.ts | 4 - lib/types/core/endpoints/fetch_messages.d.ts | 4 - .../endpoints/file_upload/delete_file.d.ts | 4 - .../endpoints/file_upload/download_file.d.ts | 4 - .../file_upload/generate_upload_url.d.ts | 4 - .../endpoints/file_upload/get_file_url.d.ts | 4 - .../endpoints/file_upload/list_files.d.ts | 4 - .../endpoints/file_upload/publish_file.d.ts | 4 - .../core/endpoints/file_upload/send_file.d.ts | 1 - .../endpoints/file_upload/upload-file.d.ts | 4 - .../endpoints/history/delete_messages.d.ts | 4 - .../core/endpoints/history/get_history.d.ts | 4 - .../endpoints/history/message_counts.d.ts | 4 - .../core/endpoints/objects/channel/get.d.ts | 4 - .../endpoints/objects/channel/get_all.d.ts | 4 - .../endpoints/objects/channel/remove.d.ts | 4 - .../core/endpoints/objects/channel/set.d.ts | 4 - .../core/endpoints/objects/member/get.d.ts | 4 - .../core/endpoints/objects/member/set.d.ts | 4 - .../endpoints/objects/membership/get.d.ts | 4 - .../endpoints/objects/membership/set.d.ts | 4 - .../core/endpoints/objects/uuid/get.d.ts | 4 - .../core/endpoints/objects/uuid/get_all.d.ts | 4 - .../core/endpoints/objects/uuid/remove.d.ts | 4 - .../core/endpoints/objects/uuid/set.d.ts | 4 - .../core/endpoints/presence/get_state.d.ts | 4 - .../core/endpoints/presence/heartbeat.d.ts | 4 - .../core/endpoints/presence/here_now.d.ts | 4 - lib/types/core/endpoints/presence/leave.d.ts | 4 - .../core/endpoints/presence/set_state.d.ts | 4 - .../core/endpoints/presence/where_now.d.ts | 4 - lib/types/core/endpoints/publish.d.ts | 69 - .../endpoints/push/add_push_channels.d.ts | 4 - .../endpoints/push/list_push_channels.d.ts | 4 - lib/types/core/endpoints/push/push.d.ts | 4 - .../core/endpoints/push/remove_device.d.ts | 4 - .../endpoints/push/remove_push_channels.d.ts | 4 - lib/types/core/endpoints/signal.d.ts | 28 - lib/types/core/endpoints/subscribe.d.ts | 4 - .../subscriptionUtils/handshake.d.ts | 4 - .../subscriptionUtils/receiveMessages.d.ts | 4 - lib/types/core/endpoints/time.d.ts | 12 - lib/types/core/interfaces/configuration.d.ts | 276 - lib/types/core/interfaces/crypto-module.d.ts | 152 - lib/types/core/interfaces/cryptography.d.ts | 54 - lib/types/core/interfaces/request.d.ts | 1 - lib/types/core/interfaces/transport.d.ts | 61 - lib/types/core/pubnub-channel-groups.d.ts | 86 - lib/types/core/pubnub-common.d.ts | 1300 --- lib/types/core/pubnub-objects.d.ts | 364 - lib/types/core/pubnub-push.d.ts | 64 - lib/types/core/types/api/access-manager.d.ts | 464 - lib/types/core/types/api/app-context.d.ts | 875 -- lib/types/core/types/api/channel-groups.d.ts | 57 - lib/types/core/types/api/file-sharing.d.ts | 357 - lib/types/core/types/api/history.d.ts | 395 - lib/types/core/types/api/index.d.ts | 121 - lib/types/core/types/api/message-action.d.ts | 153 - lib/types/core/types/api/presence.d.ts | 210 - .../core/types/api/push-notifications.d.ts | 48 - lib/types/core/types/api/push.d.ts | 122 - lib/types/core/types/api/subscription.d.ts | 296 - lib/types/core/types/file.d.ts | 104 - lib/types/core/types/transport-request.d.ts | 97 - lib/types/core/types/transport-response.d.ts | 23 - lib/types/core/utils.d.ts | 31 - lib/types/crypto/index.d.ts | 0 .../modules/NodeCryptoModule/ICryptor.d.ts | 86 - .../NodeCryptoModule/ILegacyCryptor.d.ts | 60 - .../NodeCryptoModule/aesCbcCryptor.d.ts | 57 - .../NodeCryptoModule/legacyCryptor.d.ts | 33 - .../NodeCryptoModule/nodeCryptoModule.d.ts | 108 - lib/types/crypto/modules/node.d.ts | 97 - lib/types/entities/Channel.d.ts | 11 - lib/types/entities/ChannelGroup.d.ts | 11 - lib/types/entities/ChannelMetadata.d.ts | 11 - lib/types/entities/SubscribeCapable.d.ts | 27 - lib/types/entities/Subscription.d.ts | 22 - lib/types/entities/SubscriptionSet.d.ts | 27 - lib/types/entities/UserMetadata.d.ts | 11 - lib/types/entities/commonTypes.d.ts | 3 - lib/types/errors/pubnub-api-error.d.ts | 73 - lib/types/errors/pubnub-error.d.ts | 6 - lib/types/event-engine/core/change.d.ts | 24 - lib/types/event-engine/core/dispatcher.d.ts | 13 - lib/types/event-engine/core/engine.d.ts | 11 - lib/types/event-engine/core/handler.d.ts | 18 - lib/types/event-engine/core/index.d.ts | 4 - lib/types/event-engine/core/retryPolicy.d.ts | 58 - lib/types/event-engine/core/state.d.ts | 21 - lib/types/event-engine/core/types.d.ts | 45 - lib/types/event-engine/dispatcher.d.ts | 27 - lib/types/event-engine/effects.d.ts | 77 - lib/types/event-engine/events.d.ts | 159 - lib/types/event-engine/index.d.ts | 33 - .../event-engine/presence/dispatcher.d.ts | 18 - lib/types/event-engine/presence/effects.d.ts | 31 - lib/types/event-engine/presence/events.d.ts | 47 - lib/types/event-engine/presence/presence.d.ts | 24 - .../presence/states/heartbeat_cooldown.d.ts | 8 - .../presence/states/heartbeat_failed.d.ts | 8 - .../presence/states/heartbeat_inactive.d.ts | 4 - .../states/heartbeat_reconnecting.d.ts | 11 - .../presence/states/heartbeat_stopped.d.ts | 8 - .../presence/states/heartbeating.d.ts | 8 - .../event-engine/states/handshake_failed.d.ts | 12 - .../states/handshake_reconnecting.d.ts | 13 - .../states/handshake_stopped.d.ts | 11 - .../event-engine/states/handshaking.d.ts | 10 - .../event-engine/states/receive_failed.d.ts | 12 - .../states/receive_reconnecting.d.ts | 13 - .../event-engine/states/receive_stopped.d.ts | 11 - lib/types/event-engine/states/receiving.d.ts | 10 - .../event-engine/states/unsubscribed.d.ts | 4 - lib/types/file/modules/node.d.ts | 134 - lib/types/file/modules/react-native.d.ts | 135 - lib/types/index.d.ts | 8115 +++++++++++++++ lib/types/models/Cursor.d.ts | 4 - lib/types/node/configuration.d.ts | 54 - lib/types/node/index.d.ts | 38 - lib/types/react_native/configuration.d.ts | 5 - lib/types/react_native/index.d.ts | 10 - lib/types/transport/middleware.d.ts | 52 - lib/types/transport/node-transport.d.ts | 69 - .../transport/web-react-native-transport.d.ts | 36 - package-lock.json | 9154 ++++++++--------- package.json | 20 +- src/cbor/common.ts | 2 + src/core/components/abort_signal.ts | 6 + src/core/components/base64_codec.ts | 6 + src/core/components/configuration.ts | 14 +- .../components/cryptography/hmac-sha256.js | 6 + src/core/components/cryptography/index.ts | 11 + src/core/components/deduping_manager.js | 50 - src/core/components/deduping_manager.ts | 96 + src/core/components/eventEmitter.ts | 6 + src/core/components/push_payload.ts | 113 +- src/core/components/reconnection_manager.ts | 2 + src/core/components/request.ts | 6 + src/core/components/stringify_buffer_keys.ts | 6 + src/core/components/subject.ts | 6 + src/core/components/subscription-manager.ts | 10 +- src/core/components/token_manager.ts | 137 +- src/core/components/uuid.ts | 7 + src/core/constants/operations.ts | 15 +- src/core/endpoints/access_manager/audit.ts | 2 + src/core/endpoints/access_manager/grant.ts | 2 + .../endpoints/access_manager/grant_token.ts | 2 + .../endpoints/access_manager/revoke_token.ts | 2 + .../endpoints/actions/add_message_action.ts | 2 + .../endpoints/actions/get_message_actions.ts | 2 + .../actions/remove_message_action.ts | 2 + .../endpoints/channel_groups/add_channels.ts | 2 + .../endpoints/channel_groups/delete_group.ts | 2 + .../endpoints/channel_groups/list_channels.ts | 2 + .../endpoints/channel_groups/list_groups.ts | 2 + .../channel_groups/remove_channels.ts | 2 + src/core/endpoints/fetch_messages.ts | 6 +- src/core/endpoints/file_upload/delete_file.ts | 2 + .../endpoints/file_upload/download_file.ts | 6 +- .../file_upload/generate_upload_url.ts | 2 + .../endpoints/file_upload/get_file_url.ts | 2 + src/core/endpoints/file_upload/list_files.ts | 2 + .../endpoints/file_upload/publish_file.ts | 6 +- src/core/endpoints/file_upload/send_file.ts | 10 +- src/core/endpoints/file_upload/upload-file.ts | 2 + src/core/endpoints/history/delete_messages.ts | 2 + src/core/endpoints/history/get_history.ts | 6 +- src/core/endpoints/history/message_counts.ts | 2 + src/core/endpoints/objects/channel/get.ts | 2 + src/core/endpoints/objects/channel/get_all.ts | 2 + src/core/endpoints/objects/channel/remove.ts | 2 + src/core/endpoints/objects/channel/set.ts | 2 + src/core/endpoints/objects/member/get.ts | 2 + src/core/endpoints/objects/member/set.ts | 2 + src/core/endpoints/objects/membership/get.ts | 2 + src/core/endpoints/objects/membership/set.ts | 2 + src/core/endpoints/objects/uuid/get.ts | 2 + src/core/endpoints/objects/uuid/get_all.ts | 2 + src/core/endpoints/objects/uuid/remove.ts | 2 + src/core/endpoints/objects/uuid/set.ts | 2 + src/core/endpoints/presence/get_state.ts | 2 + src/core/endpoints/presence/heartbeat.ts | 2 + src/core/endpoints/presence/here_now.ts | 4 +- src/core/endpoints/presence/leave.ts | 2 + src/core/endpoints/presence/set_state.ts | 2 + src/core/endpoints/presence/where_now.ts | 2 + src/core/endpoints/publish.ts | 9 +- src/core/endpoints/push/add_push_channels.ts | 2 + src/core/endpoints/push/list_push_channels.ts | 2 + src/core/endpoints/push/push.ts | 2 + src/core/endpoints/push/remove_device.ts | 2 + .../endpoints/push/remove_push_channels.ts | 2 + src/core/endpoints/signal.ts | 2 +- src/core/endpoints/subscribe.ts | 28 +- .../endpoints/subscriptionUtils/handshake.ts | 2 + .../subscriptionUtils/receiveMessages.ts | 2 + src/core/interfaces/configuration.ts | 14 +- src/core/interfaces/crypto-module.ts | 18 +- src/core/pubnub-channel-groups.ts | 37 +- src/core/pubnub-common.ts | 52 +- src/core/pubnub-objects.ts | 52 +- src/core/pubnub-push.ts | 35 +- src/core/types/api/access-manager.ts | 142 + src/core/types/api/file-sharing.ts | 6 +- src/core/types/api/history.ts | 2 +- src/core/types/api/index.ts | 12 +- src/core/types/api/message-action.ts | 2 +- src/core/types/api/push-notifications.ts | 2 +- src/core/types/api/subscription.ts | 4 +- src/core/utils.ts | 20 +- .../modules/NodeCryptoModule/ICryptor.ts | 4 +- .../modules/NodeCryptoModule/aesCbcCryptor.ts | 4 + .../modules/NodeCryptoModule/legacyCryptor.ts | 4 + .../NodeCryptoModule/nodeCryptoModule.ts | 37 +- src/crypto/modules/node.ts | 4 + src/crypto/modules/web.ts | 36 +- src/entities/Channel.ts | 53 +- src/entities/ChannelGroup.ts | 55 +- src/entities/ChannelMetadata.ts | 57 +- src/entities/SubscribeCapable.ts | 112 +- src/entities/Subscription.ts | 73 + src/entities/SubscriptionSet.ts | 118 + src/entities/UserMetadata.ts | 57 +- src/entities/commonTypes.ts | 6 + src/errors/pubnub-api-error.ts | 4 + src/errors/pubnub-error.ts | 38 + src/event-engine/core/change.ts | 11 + src/event-engine/core/dispatcher.ts | 18 + src/event-engine/core/engine.ts | 11 + src/event-engine/core/handler.ts | 32 + src/event-engine/core/index.ts | 10 + src/event-engine/core/retryPolicy.ts | 12 +- src/event-engine/core/state.ts | 15 + src/event-engine/core/types.ts | 34 + src/event-engine/dispatcher.ts | 18 + src/event-engine/effects.ts | 54 + src/event-engine/events.ts | 118 + src/event-engine/index.ts | 11 + src/event-engine/presence/dispatcher.ts | 18 + src/event-engine/presence/effects.ts | 46 + src/event-engine/presence/events.ts | 79 + src/event-engine/presence/presence.ts | 11 + .../presence/states/heartbeat_cooldown.ts | 18 + .../presence/states/heartbeat_failed.ts | 19 + .../presence/states/heartbeat_inactive.ts | 13 + .../presence/states/heartbeat_reconnecting.ts | 18 + .../presence/states/heartbeat_stopped.ts | 19 + .../presence/states/heartbeating.ts | 18 + src/event-engine/states/handshake_failed.ts | 21 +- .../states/handshake_reconnecting.ts | 18 + src/event-engine/states/handshake_stopped.ts | 19 + src/event-engine/states/handshaking.ts | 19 + src/event-engine/states/receive_failed.ts | 19 + .../states/receive_reconnecting.ts | 18 + src/event-engine/states/receive_stopped.ts | 19 + src/event-engine/states/receiving.ts | 18 + src/event-engine/states/unsubscribed.ts | 13 + src/models/Cursor.ts | 16 +- src/node/{ => components}/configuration.ts | 10 +- src/node/index.ts | 20 +- src/react_native/index.ts | 7 + src/titanium/index.ts | 7 + src/transport/middleware.ts | 13 + src/transport/node-transport.ts | 23 + .../subscription-worker-middleware.ts | 2 + .../subscription-worker.ts | 2 + src/transport/web-react-native-transport.ts | 23 +- src/web/components/configuration.ts | 4 +- src/web/index.ts | 7 + test/contract/definitions/auth.ts | 7 - test/contract/definitions/event-engine.ts | 14 +- test/contract/definitions/grant.ts | 8 +- test/integration/components/crypto.test.ts | 2 +- .../components/reconnection_manager.test.ts | 6 +- .../components/subscription_manager.test.ts | 22 +- test/utils.ts | 4 +- tsconfig.json | 6 +- 439 files changed, 18594 insertions(+), 14506 deletions(-) create mode 100644 .scripts/types-aggregate.ts rename lib/node/{ => components}/configuration.js (93%) delete mode 100644 lib/types/cbor/common.d.ts delete mode 100644 lib/types/core/components/abort_signal.d.ts delete mode 100644 lib/types/core/components/base64_codec.d.ts delete mode 100644 lib/types/core/components/configuration.d.ts delete mode 100644 lib/types/core/components/cryptography/hmac-sha256.d.ts delete mode 100644 lib/types/core/components/cryptography/index.d.ts delete mode 100644 lib/types/core/components/deduping_manager.d.ts delete mode 100644 lib/types/core/components/eventEmitter.d.ts delete mode 100644 lib/types/core/components/listener_manager.d.ts delete mode 100644 lib/types/core/components/push_payload.d.ts delete mode 100644 lib/types/core/components/reconnection_manager.d.ts delete mode 100644 lib/types/core/components/request.d.ts delete mode 100644 lib/types/core/components/stringify_buffer_keys.d.ts delete mode 100644 lib/types/core/components/subject.d.ts delete mode 100644 lib/types/core/components/subscription-manager.d.ts delete mode 100644 lib/types/core/components/token_manager.d.ts delete mode 100644 lib/types/core/components/uuid.d.ts delete mode 100644 lib/types/core/constants/categories.d.ts delete mode 100644 lib/types/core/constants/operations.d.ts delete mode 100644 lib/types/core/endpoints/access_manager/audit.d.ts delete mode 100644 lib/types/core/endpoints/access_manager/grant.d.ts delete mode 100644 lib/types/core/endpoints/access_manager/grant_token.d.ts delete mode 100644 lib/types/core/endpoints/access_manager/revoke_token.d.ts delete mode 100644 lib/types/core/endpoints/actions/add_message_action.d.ts delete mode 100644 lib/types/core/endpoints/actions/get_message_actions.d.ts delete mode 100644 lib/types/core/endpoints/actions/remove_message_action.d.ts delete mode 100644 lib/types/core/endpoints/channel_groups/add_channels.d.ts delete mode 100644 lib/types/core/endpoints/channel_groups/delete_group.d.ts delete mode 100644 lib/types/core/endpoints/channel_groups/list_channels.d.ts delete mode 100644 lib/types/core/endpoints/channel_groups/list_groups.d.ts delete mode 100644 lib/types/core/endpoints/channel_groups/remove_channels.d.ts delete mode 100644 lib/types/core/endpoints/fetch_messages.d.ts delete mode 100644 lib/types/core/endpoints/file_upload/delete_file.d.ts delete mode 100644 lib/types/core/endpoints/file_upload/download_file.d.ts delete mode 100644 lib/types/core/endpoints/file_upload/generate_upload_url.d.ts delete mode 100644 lib/types/core/endpoints/file_upload/get_file_url.d.ts delete mode 100644 lib/types/core/endpoints/file_upload/list_files.d.ts delete mode 100644 lib/types/core/endpoints/file_upload/publish_file.d.ts delete mode 100644 lib/types/core/endpoints/file_upload/send_file.d.ts delete mode 100644 lib/types/core/endpoints/file_upload/upload-file.d.ts delete mode 100644 lib/types/core/endpoints/history/delete_messages.d.ts delete mode 100644 lib/types/core/endpoints/history/get_history.d.ts delete mode 100644 lib/types/core/endpoints/history/message_counts.d.ts delete mode 100644 lib/types/core/endpoints/objects/channel/get.d.ts delete mode 100644 lib/types/core/endpoints/objects/channel/get_all.d.ts delete mode 100644 lib/types/core/endpoints/objects/channel/remove.d.ts delete mode 100644 lib/types/core/endpoints/objects/channel/set.d.ts delete mode 100644 lib/types/core/endpoints/objects/member/get.d.ts delete mode 100644 lib/types/core/endpoints/objects/member/set.d.ts delete mode 100644 lib/types/core/endpoints/objects/membership/get.d.ts delete mode 100644 lib/types/core/endpoints/objects/membership/set.d.ts delete mode 100644 lib/types/core/endpoints/objects/uuid/get.d.ts delete mode 100644 lib/types/core/endpoints/objects/uuid/get_all.d.ts delete mode 100644 lib/types/core/endpoints/objects/uuid/remove.d.ts delete mode 100644 lib/types/core/endpoints/objects/uuid/set.d.ts delete mode 100644 lib/types/core/endpoints/presence/get_state.d.ts delete mode 100644 lib/types/core/endpoints/presence/heartbeat.d.ts delete mode 100644 lib/types/core/endpoints/presence/here_now.d.ts delete mode 100644 lib/types/core/endpoints/presence/leave.d.ts delete mode 100644 lib/types/core/endpoints/presence/set_state.d.ts delete mode 100644 lib/types/core/endpoints/presence/where_now.d.ts delete mode 100644 lib/types/core/endpoints/publish.d.ts delete mode 100644 lib/types/core/endpoints/push/add_push_channels.d.ts delete mode 100644 lib/types/core/endpoints/push/list_push_channels.d.ts delete mode 100644 lib/types/core/endpoints/push/push.d.ts delete mode 100644 lib/types/core/endpoints/push/remove_device.d.ts delete mode 100644 lib/types/core/endpoints/push/remove_push_channels.d.ts delete mode 100644 lib/types/core/endpoints/signal.d.ts delete mode 100644 lib/types/core/endpoints/subscribe.d.ts delete mode 100644 lib/types/core/endpoints/subscriptionUtils/handshake.d.ts delete mode 100644 lib/types/core/endpoints/subscriptionUtils/receiveMessages.d.ts delete mode 100644 lib/types/core/endpoints/time.d.ts delete mode 100644 lib/types/core/interfaces/configuration.d.ts delete mode 100644 lib/types/core/interfaces/crypto-module.d.ts delete mode 100644 lib/types/core/interfaces/cryptography.d.ts delete mode 100644 lib/types/core/interfaces/request.d.ts delete mode 100644 lib/types/core/interfaces/transport.d.ts delete mode 100644 lib/types/core/pubnub-channel-groups.d.ts delete mode 100644 lib/types/core/pubnub-common.d.ts delete mode 100644 lib/types/core/pubnub-objects.d.ts delete mode 100644 lib/types/core/pubnub-push.d.ts delete mode 100644 lib/types/core/types/api/access-manager.d.ts delete mode 100644 lib/types/core/types/api/app-context.d.ts delete mode 100644 lib/types/core/types/api/channel-groups.d.ts delete mode 100644 lib/types/core/types/api/file-sharing.d.ts delete mode 100644 lib/types/core/types/api/history.d.ts delete mode 100644 lib/types/core/types/api/index.d.ts delete mode 100644 lib/types/core/types/api/message-action.d.ts delete mode 100644 lib/types/core/types/api/presence.d.ts delete mode 100644 lib/types/core/types/api/push-notifications.d.ts delete mode 100644 lib/types/core/types/api/push.d.ts delete mode 100644 lib/types/core/types/api/subscription.d.ts delete mode 100644 lib/types/core/types/file.d.ts delete mode 100644 lib/types/core/types/transport-request.d.ts delete mode 100644 lib/types/core/types/transport-response.d.ts delete mode 100644 lib/types/core/utils.d.ts delete mode 100644 lib/types/crypto/index.d.ts delete mode 100644 lib/types/crypto/modules/NodeCryptoModule/ICryptor.d.ts delete mode 100644 lib/types/crypto/modules/NodeCryptoModule/ILegacyCryptor.d.ts delete mode 100644 lib/types/crypto/modules/NodeCryptoModule/aesCbcCryptor.d.ts delete mode 100644 lib/types/crypto/modules/NodeCryptoModule/legacyCryptor.d.ts delete mode 100644 lib/types/crypto/modules/NodeCryptoModule/nodeCryptoModule.d.ts delete mode 100644 lib/types/crypto/modules/node.d.ts delete mode 100644 lib/types/entities/Channel.d.ts delete mode 100644 lib/types/entities/ChannelGroup.d.ts delete mode 100644 lib/types/entities/ChannelMetadata.d.ts delete mode 100644 lib/types/entities/SubscribeCapable.d.ts delete mode 100644 lib/types/entities/Subscription.d.ts delete mode 100644 lib/types/entities/SubscriptionSet.d.ts delete mode 100644 lib/types/entities/UserMetadata.d.ts delete mode 100644 lib/types/entities/commonTypes.d.ts delete mode 100644 lib/types/errors/pubnub-api-error.d.ts delete mode 100644 lib/types/errors/pubnub-error.d.ts delete mode 100644 lib/types/event-engine/core/change.d.ts delete mode 100644 lib/types/event-engine/core/dispatcher.d.ts delete mode 100644 lib/types/event-engine/core/engine.d.ts delete mode 100644 lib/types/event-engine/core/handler.d.ts delete mode 100644 lib/types/event-engine/core/index.d.ts delete mode 100644 lib/types/event-engine/core/retryPolicy.d.ts delete mode 100644 lib/types/event-engine/core/state.d.ts delete mode 100644 lib/types/event-engine/core/types.d.ts delete mode 100644 lib/types/event-engine/dispatcher.d.ts delete mode 100644 lib/types/event-engine/effects.d.ts delete mode 100644 lib/types/event-engine/events.d.ts delete mode 100644 lib/types/event-engine/index.d.ts delete mode 100644 lib/types/event-engine/presence/dispatcher.d.ts delete mode 100644 lib/types/event-engine/presence/effects.d.ts delete mode 100644 lib/types/event-engine/presence/events.d.ts delete mode 100644 lib/types/event-engine/presence/presence.d.ts delete mode 100644 lib/types/event-engine/presence/states/heartbeat_cooldown.d.ts delete mode 100644 lib/types/event-engine/presence/states/heartbeat_failed.d.ts delete mode 100644 lib/types/event-engine/presence/states/heartbeat_inactive.d.ts delete mode 100644 lib/types/event-engine/presence/states/heartbeat_reconnecting.d.ts delete mode 100644 lib/types/event-engine/presence/states/heartbeat_stopped.d.ts delete mode 100644 lib/types/event-engine/presence/states/heartbeating.d.ts delete mode 100644 lib/types/event-engine/states/handshake_failed.d.ts delete mode 100644 lib/types/event-engine/states/handshake_reconnecting.d.ts delete mode 100644 lib/types/event-engine/states/handshake_stopped.d.ts delete mode 100644 lib/types/event-engine/states/handshaking.d.ts delete mode 100644 lib/types/event-engine/states/receive_failed.d.ts delete mode 100644 lib/types/event-engine/states/receive_reconnecting.d.ts delete mode 100644 lib/types/event-engine/states/receive_stopped.d.ts delete mode 100644 lib/types/event-engine/states/receiving.d.ts delete mode 100644 lib/types/event-engine/states/unsubscribed.d.ts delete mode 100644 lib/types/file/modules/node.d.ts delete mode 100644 lib/types/file/modules/react-native.d.ts create mode 100644 lib/types/index.d.ts delete mode 100644 lib/types/models/Cursor.d.ts delete mode 100644 lib/types/node/configuration.d.ts delete mode 100644 lib/types/node/index.d.ts delete mode 100644 lib/types/react_native/configuration.d.ts delete mode 100644 lib/types/react_native/index.d.ts delete mode 100644 lib/types/transport/middleware.d.ts delete mode 100644 lib/types/transport/node-transport.d.ts delete mode 100644 lib/types/transport/web-react-native-transport.d.ts delete mode 100644 src/core/components/deduping_manager.js create mode 100644 src/core/components/deduping_manager.ts rename src/node/{ => components}/configuration.ts (90%) diff --git a/.pubnub.yml b/.pubnub.yml index 3970ec71c..057604ff3 100644 --- a/.pubnub.yml +++ b/.pubnub.yml @@ -1,5 +1,26 @@ --- changelog: + - date: 2024-10-31 + version: v8.2.10 + changes: + - type: bug + text: "Fix `Actions` type definition." + - type: improvement + text: "Remove indexed signature for publish." + - type: improvement + text: "Add serializable objects to `Payload` type." + - type: improvement + text: "Aggregate generated types definitions." + - type: improvement + text: "Fix definition of type which represents message actions received from history and list of users which added action of specific type and value to the message." + - type: improvement + text: "Remove redundant indexed signature from publish message parameters type definition." + - type: improvement + text: "Extend `Payload` type definition with objects which can be serialized by `JSON.stringify` using `toJSON()` methods." + - type: improvement + text: "Aggregate multiple types definitions into single type definition type with proper type names and namespaces." + - type: improvement + text: "Add the Subscribe Event Engine and Event Listener types to the bundled types definition file." - date: 2024-10-25 version: v8.2.9 changes: @@ -1041,7 +1062,7 @@ supported-platforms: - 'Ubuntu 14.04 and up' - 'Windows 7 and up' version: 'Pubnub Javascript for Node' -version: '8.2.9' +version: '8.2.10' sdks: - full-name: PubNub Javascript SDK short-name: Javascript @@ -1057,7 +1078,7 @@ sdks: - distribution-type: source distribution-repository: GitHub release package-name: pubnub.js - location: https://github.com/pubnub/javascript/archive/refs/tags/v8.2.9.zip + location: https://github.com/pubnub/javascript/archive/refs/tags/v8.2.10.zip requires: - name: 'agentkeepalive' min-version: '3.5.2' @@ -1728,7 +1749,7 @@ sdks: - distribution-type: library distribution-repository: GitHub release package-name: pubnub.js - location: https://github.com/pubnub/javascript/releases/download/v8.2.9/pubnub.8.2.9.js + location: https://github.com/pubnub/javascript/releases/download/v8.2.10/pubnub.8.2.10.js requires: - name: 'agentkeepalive' min-version: '3.5.2' diff --git a/.scripts/types-aggregate.ts b/.scripts/types-aggregate.ts new file mode 100644 index 000000000..b6f9c607f --- /dev/null +++ b/.scripts/types-aggregate.ts @@ -0,0 +1,803 @@ +import { program } from 'commander'; +import * as ts from 'typescript'; +import prettier from 'prettier'; +import * as fs from 'fs'; +import path from 'path'; + +// -------------------------------------------------------- +// ------------------------ Types ------------------------- +// -------------------------------------------------------- +// region Types + +type BaseSourceFileImport = { + /** Imported type name. */ + value: string; + /** Name or path to the module from which type imported. */ + module: string; + /** Import statement. */ + statement: string; + /** Whether this is package type or not. */ + isPackageType: boolean; +}; + +/** Import created with type name and module path. */ +type NamedSourceFileImport = BaseSourceFileImport & { + /** Import type. */ + type: 'name'; +}; + +/** Import created as alias (namespace) to the `*` and module path. */ +type NamespacedSourceFileImport = BaseSourceFileImport & { + /** Import type. */ + type: 'namespace'; +}; + +/** Import created with type name, name as it imported into the code and module path. */ +type AliasedSourceFileImport = BaseSourceFileImport & { + /** Import type. */ + type: 'alias'; + /** Imported type alias name. */ + alias: string; +}; + +/** Package types imported in source file. */ +type SourceFileImport = NamedSourceFileImport | NamespacedSourceFileImport | AliasedSourceFileImport; +// endregion + +// -------------------------------------------------------- +// ---------------------- Helpers ------------------------- +// -------------------------------------------------------- +// region Helpers + +/** + * Load target project TS configuration. + * + * @param configurationPath - Path to the configuration file to load. + * + * @returns Parsed TS configuration file object. + */ +const loadTSConfiguration = (configurationPath: string) => { + const configFile = ts.readConfigFile(configurationPath, ts.sys.readFile); + + if (configFile.error) { + throw new Error(`${path.basename(configurationPath)} load error: ${configFile.error.messageText}`); + } + + return ts.parseJsonConfigFileContent(configFile.config, ts.sys, path.dirname(configurationPath)); +}; + +/** + * Normalize path of resource relative to the file where it used. + * + * @param workingDirectory - Full path to the working directory. + * @param resourcePath - Source from which another resource accessed relatively. + * @param resourceRelativePath - Path to the target resource which is relative to the source. + * + * @returns Path to the target resource which is relative to the working directory. + */ +const relativeToWorkingDirectoryPath = ( + workingDirectory: string, + resourcePath: string, + resourceRelativePath: string, +) => { + const resourceFullPath = path.resolve(path.dirname(resourcePath), resourceRelativePath); + return `.${resourceFullPath.split(workingDirectory).pop()}`; +}; + +// endregion + +/** + * Project package. + * + * Package used to aggregate definition files in the working directory. + */ +class Package { + /** Package source files with types. */ + private readonly files: SourceFile[] = []; + + /** + * Create package bundle. + * + * Create package object which contains information about types used in public interface. + * + * @param name - Project name. + * @param workingDirectory - Root folder with subfolders which represent project structure and contains types definition files. + * @param tsConfiguration - Loaded project's TS configuration + */ + constructor( + public readonly name: string, + private readonly workingDirectory: string, + private readonly tsConfiguration: ts.ParsedCommandLine, + ) { + this.processTypesInDirectory(workingDirectory); + } + + /** + * Retrieve list of type definition files identified for package. + * + * @returns List of type definition {@link SourceFile} instances. + */ + get typeSourceFiles(): SourceFile[] { + return this.files; + } + + /** + * Retrieve list of all external imports used in the project. + * + * @returns Map of imported module to the module information object. + */ + get externalImports(): Record { + const imports: Record = {}; + this.files.forEach((file) => + Object.entries(file.externalImports).forEach(([module, type]) => (imports[module] ??= type)), + ); + return imports; + } + + /** + * Retrieve source file information for file by its path. + * + * @param filePath - Path to the inside of the project. + * + * @returns SourceFile instance or `undefined` if it can't be found at specified path. + */ + sourceFileAtPath(filePath: string): SourceFile | undefined { + if (filePath.startsWith('./') || filePath.startsWith('../')) + filePath = path.resolve(this.workingDirectory, filePath); + + return this.files.find((file) => file.filePath === filePath); + } + + /** + * Process types in specified directory. + * + * @param directory - Directory inside which types and subfolder should be processed. + */ + private processTypesInDirectory(directory: string) { + if (!fs.existsSync(directory)) return; + + fs.readdirSync(directory).forEach((pathComponent) => { + const resourcePath = path.join(directory, pathComponent); + if (fs.statSync(resourcePath).isDirectory()) this.processTypesInDirectory(resourcePath); + else { + // TODO: IGNORE FILES IN A DIFFERENT WAY + if (pathComponent === 'hmac-sha256.d.ts') return; + if (!fs.existsSync(resourcePath)) return; + + // Filter out internal type definition placeholders. + const fileContent = fs.readFileSync(resourcePath, 'utf8'); + const internalModuleMatch = fileContent.match(/^\/\*\*[\s\S]*?@internal[\s\S]*?\*\//); + if (internalModuleMatch && internalModuleMatch.index !== undefined && internalModuleMatch.index === 0) return; + + this.files.push(new SourceFile(resourcePath, this.workingDirectory, this.tsConfiguration.options)); + } + }); + + // Gather type aliases. + const aliases: Record = {}; + this.files.forEach((file) => { + file.imports + .filter((typeImport) => typeImport.isPackageType && typeImport.type === 'alias') + .forEach((typeImport) => { + const { value, alias } = typeImport as AliasedSourceFileImport; + (aliases[value] ??= []).push(alias); + }); + }); + this.files.forEach((file) => { + file.types + .filter((type) => Object.keys(aliases).includes(type.name)) + .forEach((type) => aliases[type.name].forEach((alias) => type.addAlias(alias))); + }); + } +} + +/** + * Type definition file. + * + * Object contain information about types and imports declared in it. + */ +class SourceFile { + /** List of package type imports in source file */ + private readonly _imports: SourceFileImport[] = []; + private readonly _types: TypeDefinition[] = []; + + /** + * Create source file from type definition file in the package. + * + * @param filePath - Path to the type definition file which will be analyzed. + * @param workingDirectory - Root folder with subfolders which represent project structure and contains types definition files. + * @param tsCompileOptions - Package's TS parsed configuration object. + */ + constructor( + public readonly filePath: string, + private readonly workingDirectory: string, + private readonly tsCompileOptions: ts.CompilerOptions, + ) { + const source = this.tsSourceFile(); + this.processImports(source); + this.processTypes(source); + } + + /** + * Retrieve list of imported types and modules. + * + * @returns List of import description objects with details about type and source file location. + */ + get imports() { + return this._imports; + } + + /** + * Retrieve list of types imported from external dependencies. + * + * @returns List of import description objects with details about type and source file location. + */ + get externalImports() { + const imports: Record = {}; + + this._imports + .filter((importedType) => !importedType.isPackageType) + .forEach((importedType) => { + imports[importedType.value] = importedType; + }); + + return imports; + } + + /** + * Retrieve list of types declared in this source file. + * + * @returns List of pre-processed type definition object instances. + */ + get types() { + return this._types; + } + + /** + * Retrieve type definition by its name. + * + * @param typeName - Name of the type for which type definition should be found. + * + * @returns Type definition object instance or `undefined` if specified type name is not part of source file. + */ + typeByName(typeName: string) { + return this._types.find((type) => type.name === typeName); + } + + /** + * Analyze source file imports for easier types processing during type definition files merge. + * + * @param sourceFile - TypeScript SourceFile object with pre-processed type definition file content. + */ + private processImports(sourceFile: ts.SourceFile) { + const storeImport = ( + type: SourceFileImport['type'], + module: string, + statement: string, + value: string, + alias?: string, + ) => { + const isPackageType = module.startsWith('./') || module.startsWith('../'); + if (isPackageType) module = relativeToWorkingDirectoryPath(this.workingDirectory, this.filePath, module); + if (type !== 'alias') this._imports.push({ type, value, module, statement, isPackageType }); + else if (alias) this._imports.push({ type, value, module, statement, isPackageType, alias }); + else throw new Error('Alias is required for alias import'); + }; + + ts.forEachChild(sourceFile, (node) => { + if (!ts.isImportDeclaration(node)) return; + const { importClause } = node; + if (!importClause) return; + + const moduleName = node.moduleSpecifier.getText(sourceFile).replace(/['"]/g, ''); + const statement = node.getText(sourceFile); + + // Process simple named import (import type specified with default export). + if (importClause.name) storeImport('name', moduleName, statement, importClause.name.getText(sourceFile)); + + // Check whether there is named binding specified for import or not. + const { namedBindings } = importClause; + if (!namedBindings) return; + + if (ts.isNamedImports(namedBindings)) { + namedBindings.elements.forEach((element) => { + const alias = element.name.getText(sourceFile); + const name = element.propertyName ? element.propertyName.getText(sourceFile) : alias; + if (name === alias) storeImport('name', moduleName, statement, name); + else storeImport('alias', moduleName, statement, name, alias); + }); + } else if (ts.isNamespaceImport(namedBindings) && namedBindings.name) { + storeImport('namespace', moduleName, statement, namedBindings.name.getText(sourceFile)); + } + }); + } + + /** + * Analyze source file types for easier types processing during type definition files merge. + * + * @param sourceFile - TypeScript SourceFile object with pre-processed type definition file content. + */ + private processTypes(sourceFile: ts.SourceFile) { + ts.forEachChild(sourceFile, (node) => { + if (!ts.isDeclarationStatement(node)) return; + if ( + !ts.isClassDeclaration(node) && + !ts.isInterfaceDeclaration(node) && + !ts.isTypeAliasDeclaration(node) && + !ts.isEnumDeclaration(node) + ) + return; + if (!node.name) return; + + // Stringify node type. + let type: TypeDefinition['type'] = 'type'; + if (ts.isClassDeclaration(node)) type = 'class'; + else if (ts.isInterfaceDeclaration(node)) type = 'interface'; + else if (ts.isEnumDeclaration(node)) type = 'enum'; + + // Extract type documentation. + const jsDocComments = ts.getJSDocCommentsAndTags(node); + const documentation = jsDocComments.map((comment) => comment.getText(node.getSourceFile())).join('\n'); + this._types.push( + new TypeDefinition( + node.name.getText(sourceFile), + type, + this.tsSourceFile(`${documentation}\n${node.getText(sourceFile)}`), + ), + ); + }); + } + + /** + * Create TypeScript source file with same path as instance but potentially different content (if passed). + * + * @param content - Content which should be used for source file instance instead of current file content. + * @private + */ + private tsSourceFile(content?: string) { + content ??= fs.readFileSync(this.filePath, 'utf8'); + + // Ensure that `default export` will be carried with type definition to the resulting definition type. + if (content && /^export default\s[a-zA-Z]+;/gm.test(content)) { + const matchType = /^export default\s([a-zA-Z]+);/gm.exec(content); + if (matchType && matchType.length > 0) { + const replaceRegexp = new RegExp(`^((declare\\s)?(enum|class|type|interface)\\s${matchType[1]})`, 'gm'); + content = content.replace(replaceRegexp, `export $1`); + } + } + + return ts.createSourceFile(this.filePath, content, this.tsCompileOptions.target ?? ts.ScriptTarget.ES2015, true); + } +} + +/** + * Type definition from the source file. + */ +class TypeDefinition { + public readonly superclass?: string; + /** List of aliases under which type has been imported by other types. */ + private readonly aliases: string[] = []; + + constructor( + public readonly name: string, + public type: 'class' | 'interface' | 'type' | 'enum', + private readonly sourceFile: ts.SourceFile, + ) { + if (type === 'class') { + const match = sourceFile.getText(this.sourceFile).match(/class PubNub extends ([a-zA-Z]+)[\s|<]/) ?? []; + if (match.length > 1) this.superclass = match[1]; + } + } + + get filePath() { + return this.sourceFile.fileName; + } + + addAlias(alias: string) { + if (!this.aliases.includes(alias)) this.aliases.push(alias); + } + + toString(packageTypes: string[], namespace?: string): string { + const isPackageType = (type: string) => { + if (type.indexOf('.') === -1) return packageTypes.includes(type); + else return packageTypes.includes(type.split('.').pop()!); + }; + + const typeReferenceTransformer = (context: ts.TransformationContext) => { + const visit: ts.Visitor = (node) => { + let replacement: ts.TypeReferenceNode | ts.ExpressionWithTypeArguments | undefined; + + if (namespace && ts.isTypeReferenceNode(node) && isPackageType(node.typeName.getText(this.sourceFile))) { + const typeName = node.typeName.getText(this.sourceFile); + if (namespace) { + const reference = ts.factory.createQualifiedName(ts.factory.createIdentifier(namespace), typeName); + + replacement = ts.factory.createTypeReferenceNode( + reference, + node.typeArguments + ?.map((typeArg) => ts.visitNode(typeArg, visit)) + .filter((typeArg): typeArg is ts.TypeNode => typeArg !== undefined), + ); + } + } + + if (ts.isTypeQueryNode(node)) { + if (namespace) { + const qualifiedName = ts.factory.createQualifiedName( + ts.factory.createIdentifier(namespace), + node.exprName as ts.Identifier, + ); + + return ts.factory.createTypeQueryNode(qualifiedName); + } + } + + // Checking whether processing superclass information or not. + if (node.parent && ts.isHeritageClause(node.parent) && ts.isExpressionWithTypeArguments(node)) { + const typeName = node.expression.getText(this.sourceFile); + if (namespace) { + let reference = node.expression; + if (this.superclass !== typeName) { + reference = ts.factory.createPropertyAccessExpression(ts.factory.createIdentifier(namespace), typeName); + } + + replacement = ts.factory.createExpressionWithTypeArguments( + reference, + node.typeArguments + ?.map((typeArg) => ts.visitNode(typeArg, visit)) + .filter((typeArg): typeArg is ts.TypeNode => typeArg !== undefined), + ); + } + } + + return replacement ?? ts.visitEachChild(node, visit, context); + }; + + return (node: T): T => ts.visitNode(node, visit) as T; + }; + + const aliasedTypeStrings: string[] = []; + if (this.aliases.length > 0) { + const matches = this.sourceFile.getText(this.sourceFile).match(/^(\s*(export\s+)?(declare\s+)?(type|class)\s)/gm); + if (!matches) throw new Error(`Unable to match prefix for '${this.name}' ${this.type}`); + + this.aliases.forEach((alias) => { + if (this.type === 'class' || this.type === 'interface' || this.type === 'enum') + aliasedTypeStrings.push(`/** Re-export aliased type. */\nexport {${this.name} as ${alias}};\n`); + else aliasedTypeStrings.push(`${matches[0]}${alias} = ${this.name};`); + }); + } + + const transformed = ts.transform(this.sourceFile, [typeReferenceTransformer]); + const formatted = ts.createPrinter().printFile(transformed.transformed[0] as ts.SourceFile); + return aliasedTypeStrings.length === 0 ? formatted : `${formatted}\n${aliasedTypeStrings.join('\n')}`; + } +} + +class PackageTypesDefinition { + /** Types grouped by namespaces. */ + private readonly namespaces: Record = {}; + /** List of type names which is defined by package. */ + private readonly packageTypes: string[] = []; + /** List of type names which already has been added to the output. */ + private writtenTypes: string[] = []; + private writingPackageNamespace: boolean = false; + + /** + * Create package types definition. + * + * Responsible for merged types definition generation. + * + * @param projectPackage - Project package object with types information. + * @param workingDirectory - Root folder with subfolders which represent project structure and contains types definition files. + * @param entryPoint - Path to the source file which is package's entry point and source of the public interface. + */ + constructor( + private readonly projectPackage: Package, + private readonly workingDirectory: string, + private readonly entryPoint: string, + ) {} + + writeToFile(filePath: string) { + this.writingPackageNamespace = false; + const resultContent: string[] = []; + this.writtenTypes = []; + + this.associateTypesWithNamespaces(); + this.addExternalImports(resultContent); + + // Retrieve reference to the entry point source file. + const entryPoint = this.projectPackage.sourceFileAtPath(this.entryPoint); + if (!entryPoint) throw new Error(`Can't load type for entry point at path: ${this.entryPoint}`); + + // Identify and add root types. + entryPoint.types.forEach((type) => { + this.addTypeDefinition(type, resultContent, this.projectPackage.name); + + if (type.type !== 'class' || !type.superclass) return; + + const superClassImport = entryPoint.imports.find( + (importType) => importType.isPackageType && importType.value === type.superclass, + ); + if (!superClassImport) return; + + const sourceFile = this.sourceFileForModule(superClassImport.module); + if (!sourceFile) return; + + const superclassType = sourceFile.typeByName(superClassImport.value); + if (superclassType) this.addTypeDefinition(superclassType, resultContent, this.projectPackage.name); + }); + + this.writingPackageNamespace = true; + resultContent.push(`declare namespace ${this.projectPackage.name} {`); + + this.typeSourceFiles + .filter((sourceFile) => sourceFile !== entryPoint) + .forEach((sourceFile) => { + sourceFile.types.forEach((type) => { + this.addTypeDefinition(type, resultContent); + }); + }); + + for (const namespace in this.namespaces) { + resultContent.push(`export namespace ${namespace} {`); + this.namespaces[namespace].forEach((type) => { + // Try to retrieve proper source file for imported module. + const sourceFile = this.sourceFileForModule(type.file); + if (!sourceFile) return; + + const typeDefinition = sourceFile.typeByName(type.type); + if (typeDefinition) this.addTypeDefinition(typeDefinition, resultContent, undefined, true); + // if (typeDefinition) this.addTypeDefinition(typeDefinition, resultContent, namespace, true); + }); + resultContent.push(`}\n\n`); + } + + resultContent.push(`}\n\nexport = ${this.projectPackage.name}`); + + prettier + .format(resultContent.join('\n'), { + parser: 'typescript', + semi: true, + printWidth: 120, + singleQuote: true, + trailingComma: 'all', + }) + .then((result) => { + fs.writeFileSync(filePath, result, 'utf-8'); + }); + } + + /** + * Retrieve list of type source files which is specific to the entry point. + */ + private get typeSourceFiles() { + const files: SourceFile[] = []; + const entryPoint = this.sourceFileForModule(this.entryPoint); + if (!entryPoint) throw new Error(`Can't load type for entry point at path: ${this.entryPoint}`); + + const flattenImportedTypes = (sourceFile: SourceFile) => { + sourceFile.imports + .filter((importType) => importType.isPackageType) + .forEach((type) => { + const importedTypeSourceFile = this.sourceFileForModule(type.module); + if (!importedTypeSourceFile) { + console.warn( + `Source file for ${type.module} is missing. File can be ignored as internal, but import is still there.`, + ); + return; + } + + if (!files.includes(importedTypeSourceFile)) { + files.push(importedTypeSourceFile); + flattenImportedTypes(importedTypeSourceFile); + } + }); + }; + flattenImportedTypes(entryPoint); + + return files; + } + + /** + * Aggregate types into corresponding namespaces. + * + * Some types can be imported and used through namespace import syntax and this function allows to bind types to the corresponding namespace. + * + * @returns Record where list of types (name and file path) stored under namespace name as key. + */ + private associateTypesWithNamespaces() { + const project = this.projectPackage; + const namespacedTypes: string[] = []; + + project.typeSourceFiles.forEach((file) => { + file.types.forEach((type) => !this.packageTypes.includes(type.name) && this.packageTypes.push(type.name)); + }); + + project.typeSourceFiles.forEach((file) => { + file.imports + .filter((fileImport) => fileImport.isPackageType) + .forEach((fileImport) => { + if (fileImport.type === 'namespace') { + if (namespacedTypes.includes(fileImport.module)) return; + + // Try to retrieve proper source file for imported module. + const sourceFile = this.sourceFileForModule(fileImport.module); + if (!sourceFile) return; + + namespacedTypes.push(fileImport.module); + sourceFile.types.forEach((sourceFileType) => { + this.namespaces[fileImport.value] = this.namespaces[fileImport.value] ?? []; + this.namespaces[fileImport.value].push({ type: sourceFileType.name, file: fileImport.module }); + }); + } else if (namespacedTypes.includes(fileImport.module)) { + throw new Error(`${fileImport.module} already added as namespace and can't be used separately.`); + } + }); + }); + } + + /** + * Adding external imports required for the package. + * + * @param result - Types definition output lines. + */ + private addExternalImports(result: string[]) { + Object.entries(this.projectPackage.externalImports).forEach(([_, typeImport]) => { + if (!result.includes(typeImport.statement)) result.push(typeImport.statement); + }); + + if (result.length > 1) result.push('\n\n'); + } + + private addPackageImports(imports: SourceFileImport[], result: string[]) { + const processedSourceFiles: SourceFile[] = []; + + imports + .filter((fileImport) => fileImport.isPackageType) + .forEach((type) => { + // Try to retrieve proper source file for imported module. + const sourceFile = this.sourceFileForModule(type.module); + if (!sourceFile) return; + + const typeDefinition = sourceFile.typeByName(type.value); + if (typeDefinition) this.addTypeDefinition(typeDefinition, result); + processedSourceFiles.push(sourceFile); + }); + + processedSourceFiles.forEach((sourceFile) => this.addPackageImports(sourceFile.imports, result)); + } + + private addTypeDefinition( + typeDefinition: TypeDefinition, + result: string[], + namespace?: string, + skipNamespaceCheck: boolean = false, + ) { + const typesCacheId = `${typeDefinition.name}-${typeDefinition.filePath}`; + // Check whether type already has been added to the output or not. + if (this.writtenTypes.includes(typesCacheId)) return; + // Check whether namespace member has been added without namespace name. + if (!skipNamespaceCheck && this.isNamespaceMember(typeDefinition)) return; + + let definition = typeDefinition.toString(this.packageTypes, namespace); + + if (this.writingPackageNamespace) { + definition = definition.replace(/\bexport\s+(default\s+)?class\s+/gm, `export class `); + definition = definition.replace(/\bdeclare\s+class\s+/gm, `class `); + definition = definition.replace(/\bexport\s+declare\s+enum\s+/gm, `export enum `); + definition = definition.replace(/\bexport\s+declare\s+abstract\s+class\s+/gm, `export abstract class `); + } else definition = definition.replace(/\bexport\s+declare/g, 'declare'); + + result.push(definition); + + this.writtenTypes.push(typesCacheId); + } + + /** + * Retrieve module source file. + * + * @param modulePath - Relative path to the module (relative to the working directory). + */ + private sourceFileForModule(modulePath: string) { + const project = this.projectPackage; + + // Try to retrieve proper source file for imported module. + let sourceFile = project.sourceFileAtPath(modulePath); + if (!sourceFile && path.extname(modulePath).length === 0) { + sourceFile = project.sourceFileAtPath(`${modulePath}.d.ts`); + if (!sourceFile) { + let updatedPath = path.join(modulePath, 'index.d.ts'); + if ((modulePath.startsWith('./') || modulePath.startsWith('../')) && !updatedPath.startsWith('.')) + updatedPath = `./${updatedPath}`; + sourceFile = project.sourceFileAtPath(updatedPath); + } + } + + if (!sourceFile) { + console.warn( + `Source file for ${modulePath} is missing. File can be ignored as internal, but import is still there.`, + ); + } + + return sourceFile; + } + + /** + * Check whether specified type is member of any known namespaces. + * + * @param typeDefinition - Type definition which should be checked. + * @returns `true` in case if type has been associated with one of the namespaces. + */ + private isNamespaceMember(typeDefinition: TypeDefinition) { + if (Object.keys(this.namespaces).length === 0) return false; + + // Normalize type source file path. + const extensionMatch = new RegExp(`(.d.ts|${path.extname(typeDefinition.filePath)})$`); + let typeFilePath = typeDefinition.filePath.replace(extensionMatch, ''); + if (!typeFilePath.startsWith('./') && !typeFilePath.startsWith('../')) + typeFilePath = `.${typeFilePath.split(this.workingDirectory).pop()!}`; + + for (const name in this.namespaces) { + const namespace = this.namespaces[name]; + if (namespace.find((type) => type.type === typeDefinition.name && type.file === typeFilePath)) return true; + } + + return false; + } +} + +export function syntaxKindToName(kind: ts.SyntaxKind) { + return (ts).SyntaxKind[kind]; +} + +// -------------------------------------------------------- +// -------------------- Configuration ---------------------- +// -------------------------------------------------------- +// region Configuration + +// Parse script launch arguments +const options = program + .option('--package ', 'Name of the package to aggregate types for.') + .option('--working-dir ', 'Path to the processed definition type files root directory.') + .option('--input ', 'Path to the main type definition file.') + .option('--output ', 'Path to the folder or filepath where aggregated type definition file should be saved.') + .option('--ts-config ', "Path to the project's tsconfig.json file.") + .parse() + .opts(); + +if (options.package === undefined || options.package.length === 0) throw new Error('Package file is missing.'); +if (options.workingDir === undefined || options.workingDir.length === 0) + throw new Error('Working directory is missing.'); +if (options.input === undefined || options.input.length === 0) throw new Error('Entry point file is missing.'); +if (options.output === undefined || options.output.length === 0) throw new Error('Output file is missing.'); +if (options.tsConfig === undefined || options.tsConfig.length === 0) throw new Error('tsconfig.json file is missing.'); + +const fullPathFromRelative = (relativePath: string) => + /^(.\/|..\/)/.test(relativePath) ? path.resolve(process.cwd(), relativePath) : relativePath; + +// Processing input arguments. +const packageName = options.package; +const workingDir = fullPathFromRelative(options.workingDir); +const tsConfigFilePath = fullPathFromRelative(options.tsConfig); +const inputFilePath = fullPathFromRelative(options.input); +let outputFilePath = fullPathFromRelative(options.output); +if (path.extname(outputFilePath).length === 0) + outputFilePath = path.resolve(outputFilePath, inputFilePath.split('/').pop()!); + +// endregion + +// -------------------------------------------------------- +// --------------------- Processing ----------------------- +// -------------------------------------------------------- + +const projectPackage = new Package(packageName, workingDir, loadTSConfiguration(tsConfigFilePath)); +const entryPointSourceFile = projectPackage.sourceFileAtPath(inputFilePath); +if (!entryPointSourceFile) throw new Error('Entry point source file not found.'); + +// Files loaded into the project. Clean up working directory. +fs.rmSync(workingDir, { recursive: true, force: true }); +fs.mkdirSync(workingDir); + +const definition = new PackageTypesDefinition(projectPackage, workingDir, inputFilePath); +definition.writeToFile(outputFilePath); diff --git a/CHANGELOG.md b/CHANGELOG.md index 0dfa98a54..fd6e4f017 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,21 @@ +## v8.2.10 +October 31 2024 + +#### Fixed +- Fix `Actions` type definition. + +#### Modified +- Remove indexed signature for publish. +- Add serializable objects to `Payload` type. +- Aggregate generated types definitions. +- Fix definition of type which represents message actions received from history and list of users which added action of specific type and value to the message. Fixed the following issues reported by [@yo1dog](https://github.com/yo1dog): [#407](https://github.com/pubnub/javascript/issues/407). +- Remove redundant indexed signature from publish message parameters type definition. Fixed the following issues reported by [@yo1dog](https://github.com/yo1dog): [#413](https://github.com/pubnub/javascript/issues/413). +- Extend `Payload` type definition with objects which can be serialized by `JSON.stringify` using `toJSON()` methods. Fixed the following issues reported by [@yo1dog](https://github.com/yo1dog): [#412](https://github.com/pubnub/javascript/issues/412). +- Aggregate multiple types definitions into single type definition type with proper type names and namespaces. Fixed + the following issues reported by [@Tallyb](https://github.com/Tallyb) and [@yo1dog](https://github.com/yo1dog): [#405](https://github.com/pubnub/javascript/issues/405) and [#409](https://github.com/pubnub/javascript/issues/409) and [#410](https://github.com/pubnub/javascript/issues/410). +- Add the Subscribe Event Engine and Event Listener types to the bundled types definition file. Fixed the following + issues reported by [@roman-rr](https://github.com/roman-rr): [#377](https://github.com/pubnub/javascript/issues/377). + ## v8.2.9 October 25 2024 diff --git a/README.md b/README.md index 1d546fa73..06e26471e 100644 --- a/README.md +++ b/README.md @@ -28,8 +28,8 @@ Watch [Getting Started with PubNub JS SDK](https://app.dashcam.io/replay/64ee0d2 npm install pubnub ``` * or download one of our builds from our CDN: - * https://cdn.pubnub.com/sdk/javascript/pubnub.8.2.9.js - * https://cdn.pubnub.com/sdk/javascript/pubnub.8.2.9.min.js + * https://cdn.pubnub.com/sdk/javascript/pubnub.8.2.10.js + * https://cdn.pubnub.com/sdk/javascript/pubnub.8.2.10.min.js 2. Configure your keys: diff --git a/dist/web/pubnub.js b/dist/web/pubnub.js index 7cd3b7f5a..b1a1ebfc0 100644 --- a/dist/web/pubnub.js +++ b/dist/web/pubnub.js @@ -410,9 +410,7 @@ var obj = { encode: encode, decode: decode }; - if (typeof undefined$1 === "function" && undefined$1.amd) - undefined$1("cbor/cbor", obj); - else if (module.exports) + if (module.exports) module.exports = obj; else if (!global.CBOR) global.CBOR = obj; @@ -437,7 +435,7 @@ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** */ - /* global Reflect, Promise, SuppressedError, Symbol */ + /* global Reflect, Promise, SuppressedError, Symbol, Iterator */ function __rest(s, e) { @@ -514,6 +512,8 @@ // region Helpers /** * Retrieve list of module's cryptors. + * + * @internal */ getAllCryptors() { return [this.defaultCryptor, ...this.cryptors]; @@ -521,10 +521,14 @@ } /** * `String` to {@link ArrayBuffer} response decoder. + * + * @internal */ AbstractCryptoModule.encoder = new TextEncoder(); /** * {@link ArrayBuffer} to {@link string} decoder. + * + * @internal */ AbstractCryptoModule.decoder = new TextDecoder(); @@ -695,6 +699,11 @@ */ PubNubFile.supportsFileUri = false; + /** + * Base64 support module. + * + * @internal + */ const BASE64_CHARMAP = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/='; /** * Decode a Base64 encoded string. @@ -874,7 +883,25 @@ })(StatusCategory || (StatusCategory = {})); var StatusCategory$1 = StatusCategory; + /** + * PubNub operation error module. + */ + /** + * PubNub operation error. + * + * When an operation can't be performed or there is an error from the server, this object will be returned. + */ class PubNubError extends Error { + /** + * Create PubNub operation error. + * + * @param message - Message with details about why operation failed. + * @param [status] - Additional information about performed operation. + * + * @returns Configured and ready to use PubNub operation error. + * + * @internal + */ constructor(message, status) { super(message); this.status = status; @@ -883,15 +910,40 @@ Object.setPrototypeOf(this, new.target.prototype); } } + /** + * Create error status object. + * + * @param errorPayload - Additional information which should be attached to the error status object. + * + * @returns Error status object. + * + * @internal + */ function createError(errorPayload) { var _a; (_a = errorPayload.statusCode) !== null && _a !== void 0 ? _a : (errorPayload.statusCode = 0); return Object.assign(Object.assign({}, errorPayload), { statusCode: errorPayload.statusCode, category: StatusCategory$1.PNValidationErrorCategory, error: true }); } + /** + * Create operation arguments validation error status object. + * + * @param message - Information about failed validation requirement. + * @param [statusCode] - Operation HTTP status code. + * + * @returns Operation validation error status object. + * + * @internal + */ function createValidationError(message, statusCode) { - return createError(Object.assign({ message }, (statusCode !== undefined ? { statusCode } : {}))); + return createError(Object.assign({ message }, ({}))); } + /** + * CryptoJS implementation. + * + * @internal + */ + /*eslint-disable */ /* @@ -1935,6 +1987,8 @@ /** * Legacy cryptography module. + * + * @internal */ /** * Convert bytes array to words array. @@ -1942,6 +1996,8 @@ * @param b - Bytes array (buffer) which should be converted. * * @returns Word sized array. + * + * @internal */ /* eslint-disable @typescript-eslint/no-explicit-any */ function bufferToWordArray(b) { @@ -1953,6 +2009,11 @@ // @ts-expect-error Bundled library without types. return CryptoJS$1.lib.WordArray.create(wa, b.length); } + /** + * Legacy cryptography module for files and signature. + * + * @internal + */ class Crypto { constructor(configuration) { this.configuration = configuration; @@ -2201,18 +2262,16 @@ } } - /* global crypto */ /** * Legacy browser cryptography module. + * + * @internal */ - function concatArrayBuffer(ab1, ab2) { - const tmp = new Uint8Array(ab1.byteLength + ab2.byteLength); - tmp.set(new Uint8Array(ab1), 0); - tmp.set(new Uint8Array(ab2), ab1.byteLength); - return tmp.buffer; - } + /* global crypto */ /** * Legacy cryptography implementation for browser-based {@link PubNub} client. + * + * @internal */ class WebCryptography { // -------------------------------------------------------- @@ -2248,7 +2307,7 @@ encryptArrayBuffer(key, buffer) { return __awaiter(this, void 0, void 0, function* () { const abIv = crypto.getRandomValues(new Uint8Array(16)); - return concatArrayBuffer(abIv.buffer, yield crypto.subtle.encrypt({ name: 'AES-CBC', iv: abIv }, key, buffer)); + return this.concatArrayBuffer(abIv.buffer, yield crypto.subtle.encrypt({ name: 'AES-CBC', iv: abIv }, key, buffer)); }); } /** @@ -2264,7 +2323,7 @@ const abIv = crypto.getRandomValues(new Uint8Array(16)); const abPlaintext = WebCryptography.encoder.encode(text).buffer; const abPayload = yield crypto.subtle.encrypt({ name: 'AES-CBC', iv: abIv }, key, abPlaintext); - const ciphertext = concatArrayBuffer(abIv.buffer, abPayload); + const ciphertext = this.concatArrayBuffer(abIv.buffer, abPayload); return WebCryptography.decoder.decode(ciphertext); }); } @@ -2397,6 +2456,20 @@ return crypto.subtle.importKey('raw', abKey, 'AES-CBC', true, ['encrypt', 'decrypt']); }); } + /** + * Join two `ArrayBuffer`s. + * + * @param ab1 - `ArrayBuffer` to which other buffer should be appended. + * @param ab2 - `ArrayBuffer` which should appended to the other buffer. + * + * @returns Buffer which starts with `ab1` elements and appended `ab2`. + */ + concatArrayBuffer(ab1, ab2) { + const tmp = new Uint8Array(ab1.byteLength + ab2.byteLength); + tmp.set(new Uint8Array(ab1), 0); + tmp.set(new Uint8Array(ab2), ab1.byteLength); + return tmp.buffer; + } } /** * Random initialization vector size. @@ -2785,9 +2858,13 @@ /** * REST API endpoint use error module. + * + * @internal */ /** * PubNub REST API call error. + * + * @internal */ class PubNubAPIError extends Error { /** @@ -2978,6 +3055,8 @@ * * Middleware optimize subscription feature requests utilizing `Subscription Worker` if available and not disabled * by user. + * + * @internal */ // endregion /** @@ -3200,6 +3279,11 @@ } } + /** + * PubNub package utilities module. + * + * @internal + */ /** * Percent-encode input string. * @@ -3208,6 +3292,8 @@ * @param input - Source string or number for encoding. * * @returns Percent-encoded string. + * + * @internal */ const encodeString = (input) => { return encodeURIComponent(input).replace(/[!~*'()]/g, (x) => `%${x.charCodeAt(0).toString(16).toUpperCase()}`); @@ -3220,11 +3306,16 @@ * @param [defaultString] - String which should be used in case if {@link names} is empty. * * @returns String which contains encoded names joined by non-encoded `,`. + * + * @internal */ const encodeNames = (names, defaultString) => { const encodedNames = names.map((name) => encodeString(name)); - return encodedNames.length ? encodedNames.join(',') : defaultString !== null && defaultString !== void 0 ? defaultString : ''; + return encodedNames.length ? encodedNames.join(',') : (defaultString !== null && defaultString !== void 0 ? defaultString : ''); }; + /** + * @internal + */ const removeSingleOccurrence = (source, elementsToRemove) => { const removed = Object.fromEntries(elementsToRemove.map((prop) => [prop, false])); return source.filter((e) => { @@ -3235,6 +3326,9 @@ return true; }); }; + /** + * @internal + */ const findUniqueCommonElements = (a, b) => { return [...a].filter((value) => b.includes(value) && a.indexOf(value) === a.lastIndexOf(value) && b.indexOf(value) === b.lastIndexOf(value)); }; @@ -3244,6 +3338,8 @@ * @param query - Key / value pairs of the request query parameters. * * @returns Stringified query key / value pairs. + * + * @internal */ const queryStringFromObject = (query) => { return Object.keys(query) @@ -3258,11 +3354,23 @@ /** * Common browser and React Native Transport provider module. + * + * @internal */ /** * Class representing a `fetch`-based browser and React Native transport provider. + * + * @internal */ class WebReactNativeTransport { + /** + * Create and configure transport provider for Web and Rect environments. + * + * @param [keepAlive] - Whether client should try to keep connections open for reuse or not. + * @param logVerbosity - Whether verbose logs should be printed or not. + * + * @internal + */ constructor(keepAlive = false, logVerbosity) { this.keepAlive = keepAlive; this.logVerbosity = logVerbosity; @@ -3294,7 +3402,10 @@ reject(new Error('Request timeout')); }, req.timeout * 1000); }); - return Promise.race([fetch(request, { signal: abortController === null || abortController === void 0 ? void 0 : abortController.signal }), requestTimeout]) + return Promise.race([ + fetch(request, { signal: abortController === null || abortController === void 0 ? void 0 : abortController.signal, credentials: 'omit', cache: 'no-cache' }), + requestTimeout, + ]) .then((response) => response.arrayBuffer().then((arrayBuffer) => [response, arrayBuffer])) .then((response) => { const responseBody = response[1].byteLength > 0 ? response[1] : undefined; @@ -3329,6 +3440,8 @@ * @param req - The {@link TransportRequest} object containing request information. * * @returns Request object generated from the {@link TransportRequest} object. + * + * @internal */ requestFromTransportRequest(req) { return __awaiter(this, void 0, void 0, function* () { @@ -3375,6 +3488,8 @@ * @param request - Platform-specific * @param [elapsed] - How many seconds passed since request processing started. * @param [body] - Service response (if available). + * + * @internal */ logRequestProcessProgress(request, elapsed, body) { if (!this.logVerbosity) @@ -3396,9 +3511,16 @@ } /** * Service {@link ArrayBuffer} response decoder. + * + * @internal */ WebReactNativeTransport.decoder = new TextDecoder(); + /** + * CBOR support module. + * + * @internal + */ /** * Re-map CBOR object keys from potentially C buffer strings to actual strings. * @@ -3569,7 +3691,7 @@ let announceFailedHeartbeats = ANNOUNCE_HEARTBEAT_FAILURE; let fileUploadPublishRetryLimit = FILE_PUBLISH_RETRY_LIMIT; let dedupeOnSubscribe = DEDUPE_ON_SUBSCRIBE; - const maximumCacheSize = DEDUPE_CACHE_SIZE; + let maximumCacheSize = DEDUPE_CACHE_SIZE; let useRequestId = USE_REQUEST_ID; // @ts-expect-error Not documented legacy configuration options. if (configurationCopy.dedupeOnSubscribe !== undefined && typeof configurationCopy.dedupeOnSubscribe === 'boolean') { @@ -3577,6 +3699,11 @@ dedupeOnSubscribe = configurationCopy.dedupeOnSubscribe; } // @ts-expect-error Not documented legacy configuration options. + if (configurationCopy.maximumCacheSize !== undefined && typeof configurationCopy.maximumCacheSize === 'number') { + // @ts-expect-error Not documented legacy configuration options. + maximumCacheSize = configurationCopy.maximumCacheSize; + } + // @ts-expect-error Not documented legacy configuration options. if (configurationCopy.useRequestId !== undefined && typeof configurationCopy.useRequestId === 'boolean') { // @ts-expect-error Not documented legacy configuration options. useRequestId = configurationCopy.useRequestId; @@ -3698,6 +3825,12 @@ var uuidExports = uuid.exports; var uuidGenerator$1 = /*@__PURE__*/getDefaultExportFromCjs(uuidExports); + /** + * Random identifier generator helper module. + * + * @internal + */ + /** @internal */ var uuidGenerator = { createUUID() { if (uuidGenerator$1.uuid) { @@ -3710,6 +3843,8 @@ /** * {@link PubNub} client configuration module. + * + * @internal */ // -------------------------------------------------------- // ----------------------- Defaults ----------------------- @@ -3725,7 +3860,7 @@ * Create {@link PubNub} client private configuration object. * * @param base - User- and platform-provided configuration. - * @param setupCryptoModule - Platform-provided {@link CryptoModule} configuration block. + * @param setupCryptoModule - Platform-provided {@link ICryptoModule} configuration block. * * @returns `PubNub` client private configuration. * @@ -3813,7 +3948,7 @@ return base.PubNubFile; }, get version() { - return '8.2.9'; + return '8.2.10'; }, getVersion() { return this.version; @@ -3865,6 +4000,8 @@ /** * PubNub Access Token Manager module. + * + * @internal */ // endregion /** @@ -4030,6 +4167,11 @@ TransportMethod["LOCAL"] = "LOCAL"; })(TransportMethod || (TransportMethod = {})); + /** + * Common PubNub Network Provider middleware module. + * + * @internal + */ /** * Request signature generator. * @@ -4089,6 +4231,11 @@ } } RequestSignature.textDecoder = new TextDecoder('utf-8'); + /** + * Common PubNub Network Provider middleware. + * + * @internal + */ class PubNubMiddleware { constructor(configuration) { this.configuration = configuration; @@ -4357,6 +4504,8 @@ * Subscription reconnection-manager. * * **Note:** Reconnection manger rely on legacy time-based availability check. + * + * @internal */ /** * Network "discovery" manager. @@ -4402,59 +4551,85 @@ } } - /* */ - - const hashCode = (payload) => { - let hash = 0; - if (payload.length === 0) return hash; - for (let i = 0; i < payload.length; i += 1) { - const character = payload.charCodeAt(i); - hash = (hash << 5) - hash + character; // eslint-disable-line - hash = hash & hash; // eslint-disable-line - } - return hash; - }; - + /** + * Messages de-duplication manager module. + * + * @internal + */ /** * Real-time events deduplication manager. * * @internal */ class DedupingManager { - _config; - - hashHistory; - - constructor({ config }) { - this.hashHistory = []; - this._config = config; - } - - getKey(message) { - const hashedPayload = hashCode(JSON.stringify(message.message)).toString(); - const timetoken = message.timetoken; - return `${timetoken}-${hashedPayload}`; - } - - isDuplicate(message) { - return this.hashHistory.includes(this.getKey(message)); - } - - addEntry(message) { - if (this.hashHistory.length >= this._config.maximumCacheSize) { - this.hashHistory.shift(); + /** + * Create and configure real-time events de-duplication manager. + * + * @param config - PubNub client configuration object. + */ + constructor({ maximumCacheSize }) { + this.maximumCacheSize = maximumCacheSize; + this.hashHistory = []; + } + /** + * Compute unique real-time event payload key. + * + * @param message - Received real-time event payload for which unique key should be computed. + * @returns Unique real-time event payload key in messages cache. + */ + getKey(message) { + var _a; + return `${message.timetoken}-${this.hashCode(JSON.stringify((_a = message.message) !== null && _a !== void 0 ? _a : '')).toString()}`; + } + /** + * Check whether there is similar message already received or not. + * + * @param message - Received real-time event payload which should be checked for duplicates. + * @returns `true` in case if similar payload already has been received before. + */ + isDuplicate(message) { + return this.hashHistory.includes(this.getKey(message)); + } + /** + * Store received message to be used later for duplicate detection. + * + * @param message - Received real-time event payload. + */ + addEntry(message) { + if (this.hashHistory.length >= this.maximumCacheSize) { + this.hashHistory.shift(); + } + this.hashHistory.push(this.getKey(message)); + } + /** + * Clean up cached messages. + */ + clearHistory() { + this.hashHistory = []; + } + /** + * Compute message hash sum. + * + * @param payload - Received payload for which hash sum should be computed. + * @returns {number} - Resulting hash sum. + */ + hashCode(payload) { + let hash = 0; + if (payload.length === 0) + return hash; + for (let i = 0; i < payload.length; i += 1) { + const character = payload.charCodeAt(i); + hash = (hash << 5) - hash + character; // eslint-disable-line + hash = hash & hash; // eslint-disable-line + } + return hash; } - - this.hashHistory.push(this.getKey(message)); - } - - clearHistory() { - this.hashHistory = []; - } } /** * Subscription manager module. + * + * @internal */ /** * Subscription loop manager. @@ -4470,7 +4645,7 @@ this.heartbeatCall = heartbeatCall; this.leaveCall = leaveCall; this.reconnectionManager = new ReconnectionManager(time); - this.dedupingManager = new DedupingManager({ config: this.configuration }); + this.dedupingManager = new DedupingManager(this.configuration); this.heartbeatChannelGroups = {}; this.heartbeatChannels = {}; this.presenceChannelGroups = {}; @@ -4724,7 +4899,7 @@ } try { messages.forEach((message) => { - if (dedupeOnSubscribe) { + if (dedupeOnSubscribe && 'message' in message.data && 'timetoken' in message.data) { if (this.dedupingManager.isDuplicate(message.data)) return; this.dedupingManager.addEntry(message.data); @@ -4840,6 +5015,15 @@ * Base notification payload object. */ class BaseNotificationPayload { + /** + * Base notification provider payload object. + * + * @internal + * + * @param payload - Object which contains vendor-specific preformatted push notification payload. + * @param title - Notification main title. + * @param body - Notification body (main messages). + */ constructor(payload, title, body) { this._payload = payload; this.setDefaultPayloadStructure(); @@ -4896,11 +5080,15 @@ } /** * Platform-specific structure initialization. + * + * @internal */ setDefaultPayloadStructure() { } /** * Translate data object into PubNub push notification payload object. * + * @internal + * * @returns Preformatted push notification payload. */ toObject() { @@ -4915,10 +5103,14 @@ super(...arguments); /** * Type of push notification service for which payload will be created. + * + * @internal */ this._apnsPushType = 'apns'; /** * Whether resulting payload should trigger silent notification or not. + * + * @internal */ this._isSilent = false; } @@ -5048,9 +5240,21 @@ set silent(value) { this._isSilent = value; } + /** + * Setup push notification payload default content. + * + * @internal + */ setDefaultPayloadStructure() { this.payload.aps = { alert: {} }; } + /** + * Translate data object into PubNub push notification payload object. + * + * @internal + * + * @returns Preformatted push notification payload. + */ toObject() { const payload = Object.assign({}, this.payload); const { aps } = payload; @@ -5080,6 +5284,8 @@ /** * Create PubNub push notification service APNS2 configuration information object. * + * @internal + * * @param configuration - Source user-provided APNS2 configuration. * * @returns Preformatted for PubNub service APNS2 configuration information. @@ -5102,6 +5308,8 @@ /** * Create PubNub push notification service APNS2 target information object. * + * @internal + * * @param target - Source user-provided data. * * @returns Preformatted for PubNub service APNS2 target information. @@ -5117,7 +5325,7 @@ } } /** - * Message payload for Firebase Clouse Messaging service. + * Message payload for Firebase Cloud Messaging service. */ class FCMNotificationPayload extends BaseNotificationPayload { get payload() { @@ -5215,9 +5423,19 @@ this.payload.notification.icon = value; this._icon = value; } + /** + * Retrieve notifications grouping tag. + * + * @returns Notifications grouping tag. + */ get tag() { return this._tag; } + /** + * Update notifications grouping tag. + * + * @param value - String which will be used to group similar notifications in notification center. + */ set tag(value) { if (!value || !value.length) return; @@ -5234,10 +5452,22 @@ set silent(value) { this._isSilent = value; } + /** + * Setup push notification payload default content. + * + * @internal + */ setDefaultPayloadStructure() { this.payload.notification = {}; this.payload.data = {}; } + /** + * Translate data object into PubNub push notification payload object. + * + * @internal + * + * @returns Preformatted push notification payload. + */ toObject() { let data = Object.assign({}, this.payload.data); let notification = null; @@ -5259,6 +5489,14 @@ } } class NotificationsPayload { + /** + * Create push notification payload holder. + * + * @internal + * + * @param title - String which will be shown at the top of the notification (below app name). + * @param body - String with message which should be shown when user will check notification. + */ constructor(title, body) { this._payload = { apns: {}, fcm: {} }; this._title = title; @@ -5266,6 +5504,12 @@ this.apns = new APNSNotificationPayload(this._payload.apns, title, body); this.fcm = new FCMNotificationPayload(this._payload.fcm, title, body); } + /** + * Enable or disable push notification debugging message. + * + * @param value - Whether debug message from push notification scheduler should be published to the specific + * channel or not. + */ set debugging(value) { this._debugging = value; } @@ -5343,7 +5587,7 @@ * Build notifications platform for requested platforms. * * @param platforms - List of platforms for which payload should be added to final dictionary. Supported values: - * gcm, apns, and apns2. + * fcm, apns, and apns2. * * @returns Object with data, which can be sent with publish method call and trigger remote notifications for * specified platforms. @@ -5368,6 +5612,11 @@ } } + /** + * Network request module. + * + * @internal + */ /** * Base REST API request class. * @@ -5530,7 +5779,9 @@ */ AbstractRequest.decoder = new TextDecoder(); - /* */ + /** + * Endpoint API operation types. + */ var RequestOperation; (function (RequestOperation) { // -------------------------------------------------------- @@ -5765,7 +6016,17 @@ // -------------------------------------------------------- // ---------------- Subscription Utility ------------------ // -------------------------------------------------------- + /** + * Initial event engine subscription handshake operation. + * + * @internal + */ RequestOperation["PNHandshakeOperation"] = "PNHandshakeOperation"; + /** + * Event engine subscription loop operation. + * + * @internal + */ RequestOperation["PNReceiveMessagesOperation"] = "PNReceiveMessagesOperation"; })(RequestOperation || (RequestOperation = {})); var RequestOperation$1 = RequestOperation; @@ -5788,8 +6049,6 @@ // region Types /** * PubNub-defined event types by payload. - * - * @internal */ var PubNubEventType; (function (PubNubEventType) { @@ -6105,6 +6364,11 @@ } } + /** + * Real-time events emitter module. + * + * @internal + */ /** * Real-time events' emitter. * @@ -6273,6 +6537,11 @@ } } + /** + * Event Engine terminate signal listener module. + * + * @internal + */ /** * @internal */ @@ -6302,7 +6571,18 @@ } } - /* eslint-disable @typescript-eslint/no-explicit-any */ + /** + * Event Engine Core state module. + * + * @internal + */ + /** + * Event engine current state object. + * + * State contains current context and list of invocations which should be performed by the Event Engine. + * + * @internal + */ class State { transition(context, event) { var _a; @@ -6334,7 +6614,17 @@ } } + /** + * Event Engine Core module. + * + * @internal + */ /* eslint-disable @typescript-eslint/no-explicit-any */ + /** + * Generic event engine. + * + * @internal + */ class Engine extends Subject { describe(label) { return new State(label); @@ -6394,7 +6684,18 @@ } } - /* eslint-disable @typescript-eslint/no-explicit-any */ + /** + * Event Engine Core Effects dispatcher module. + * + * @internal + */ + /** + * Event Engine effects dispatcher. + * + * Dispatcher responsible for invocation enqueue and dequeue for processing. + * + * @internal + */ class Dispatcher { constructor(dependencies) { this.dependencies = dependencies; @@ -6431,7 +6732,16 @@ } } - /* eslint-disable @typescript-eslint/no-explicit-any */ + /** + * Event Engine Core types module. + * + * @internal + */ + /** + * Create and configure event engine event. + * + * @internal + */ function createEvent(type, fn) { const creator = function (...args) { return { @@ -6442,6 +6752,11 @@ creator.type = type; return creator; } + /** + * Create and configure short-term effect invocation. + * + * @internal + */ function createEffect(type, fn) { const creator = (...args) => { return { type, payload: fn(...args), managed: false }; @@ -6449,6 +6764,11 @@ creator.type = type; return creator; } + /** + * Create and configure long-running effect invocation. + * + * @internal + */ function createManagedEffect(type, fn) { const creator = (...args) => { return { type, payload: fn(...args), managed: true }; @@ -6458,6 +6778,11 @@ return creator; } + /** + * Event Engine managed effects terminate signal module. + * + * @internal + */ class AbortError extends Error { constructor() { super('The operation was aborted.'); @@ -6489,12 +6814,31 @@ } } + /** + * Event Engine Core Effects handler module. + * + * @internal + */ + /** + * Synchronous (short-term) effect invocation handler. + * + * Handler manages effect execution on behalf of effect dispatcher. + * + * @internal + */ class Handler { constructor(payload, dependencies) { this.payload = payload; this.dependencies = dependencies; } } + /** + * Asynchronous (long-running) effect invocation handler. + * + * Handler manages effect execution on behalf of effect dispatcher. + * + * @internal + */ class AsyncHandler extends Handler { constructor(payload, dependencies, asyncFunction) { super(payload, dependencies); @@ -6511,37 +6855,169 @@ this.abortSignal.abort(); } } + /** + * Asynchronous effect invocation handler constructor. + * + * @param handlerFunction - Function which performs asynchronous action and should be called on `start`. + * + * @internal + */ const asyncHandler = (handlerFunction) => (payload, dependencies) => new AsyncHandler(payload, dependencies, handlerFunction); + /** + * Presence Event Engine events module. + * + * @internal + */ + /** + * Reconnect event. + * + * Event is sent each time when user restores real-time updates processing and notifies other present subscribers + * about joining back. + * + * @internal + */ const reconnect$1 = createEvent('RECONNECT', () => ({})); + /** + * Disconnect event. + * + * Event is sent when user wants to temporarily stop real-time updates processing and notifies other present + * subscribers about leaving. + * + * @internal + */ const disconnect$1 = createEvent('DISCONNECT', () => ({})); + /** + * Channel / group join event. + * + * Event is sent when user adds new channels / groups to the active channels / groups list and notifies other present + * subscribers about joining. + * + * @internal + */ const joined = createEvent('JOINED', (channels, groups) => ({ channels, groups, })); + /** + * Channel / group leave event. + * + * Event is sent when user removes channels / groups from the active channels / groups list and notifies other present + * subscribers about leaving. + * + * @internal + */ const left = createEvent('LEFT', (channels, groups) => ({ channels, groups, })); + /** + * Leave all event. + * + * Event is sent when user doesn't want to receive any real-time updates anymore and notifies other + * subscribers on previously active channels / groups about leaving. + * + * @internal + */ const leftAll = createEvent('LEFT_ALL', () => ({})); + /** + * Presence heartbeat success event. + * + * Event is sent by corresponding effect handler if REST API call was successful. + * + * @internal + */ const heartbeatSuccess = createEvent('HEARTBEAT_SUCCESS', (statusCode) => ({ statusCode })); + /** + * Presence heartbeat did fail event. + * + * Event is sent by corresponding effect handler if REST API call failed. + * + * @internal + */ const heartbeatFailure = createEvent('HEARTBEAT_FAILURE', (error) => error); + /** + * Presence heartbeat impossible event. + * + * Event is sent by corresponding effect handler if REST API call exhausted all retry attempt and won't try again. + * + * @internal + */ const heartbeatGiveup = createEvent('HEARTBEAT_GIVEUP', () => ({})); + /** + * Delayed presence heartbeat event. + * + * Event is sent by corresponding effect handler when delay timer between heartbeat calls fired. + * + * @internal + */ const timesUp = createEvent('TIMES_UP', () => ({})); + /** + * Presence Event Engine effects module. + * + * @internal + */ + /** + * Presence heartbeat effect. + * + * Performs presence heartbeat REST API call. + * + * @internal + */ const heartbeat = createEffect('HEARTBEAT', (channels, groups) => ({ channels, groups, })); + /** + * Presence leave effect. + * + * Performs presence leave REST API call. + * + * @internal + */ const leave = createEffect('LEAVE', (channels, groups) => ({ channels, groups, })); + /** + * Emit presence heartbeat REST API call result status effect. + * + * Notify status change event listeners. + * + * @internal + */ /* eslint-disable @typescript-eslint/no-explicit-any */ const emitStatus$1 = createEffect('EMIT_STATUS', (status) => status); + /** + * Heartbeat delay effect. + * + * Delay of configured length (heartbeat interval) before another heartbeat REST API call will be done. + * + * @internal + */ const wait = createManagedEffect('WAIT', () => ({})); + /** + * Delayed heartbeat effect. + * + * Similar to the {@link wait} effect but used in case if previous heartbeat call did fail. + * + * @internal + */ const delayedHeartbeat = createManagedEffect('DELAYED_HEARTBEAT', (context) => context); + /** + * Presence Event Engine effects dispatcher. + * + * @internal + */ + /** + * Presence Event Engine dispatcher. + * + * Dispatcher responsible for presence events handling and corresponding effects execution. + * + * @internal + */ class PresenceEventEngineDispatcher extends Dispatcher { constructor(engine, dependencies) { super(dependencies); @@ -6558,7 +7034,7 @@ } } }))); - this.on(leave.type, asyncHandler((payload_2, _2, _b) => __awaiter(this, [payload_2, _2, _b], void 0, function* (payload, _, { leave, config }) { + this.on(leave.type, asyncHandler((payload_1, _1, _a) => __awaiter(this, [payload_1, _1, _a], void 0, function* (payload, _, { leave, config }) { if (!config.suppressLeaveEvents) { try { leave({ @@ -6569,13 +7045,13 @@ catch (e) { } } }))); - this.on(wait.type, asyncHandler((_3, abortSignal_1, _c) => __awaiter(this, [_3, abortSignal_1, _c], void 0, function* (_, abortSignal, { heartbeatDelay }) { + this.on(wait.type, asyncHandler((_1, abortSignal_1, _a) => __awaiter(this, [_1, abortSignal_1, _a], void 0, function* (_, abortSignal, { heartbeatDelay }) { abortSignal.throwIfAborted(); yield heartbeatDelay(); abortSignal.throwIfAborted(); return engine.transition(timesUp()); }))); - this.on(delayedHeartbeat.type, asyncHandler((payload_3, abortSignal_2, _d) => __awaiter(this, [payload_3, abortSignal_2, _d], void 0, function* (payload, abortSignal, { heartbeat, retryDelay, presenceState, config }) { + this.on(delayedHeartbeat.type, asyncHandler((payload_1, abortSignal_1, _a) => __awaiter(this, [payload_1, abortSignal_1, _a], void 0, function* (payload, abortSignal, { heartbeat, retryDelay, presenceState, config }) { if (config.retryConfiguration && config.retryConfiguration.shouldRetry(payload.reason, payload.attempts)) { abortSignal.throwIfAborted(); yield retryDelay(config.retryConfiguration.getDelay(payload.attempts, payload.reason)); @@ -6596,9 +7072,9 @@ return engine.transition(heartbeatGiveup()); } }))); - this.on(emitStatus$1.type, asyncHandler((payload_4, _4, _e) => __awaiter(this, [payload_4, _4, _e], void 0, function* (payload, _, { emitStatus, config }) { - var _f; - if (config.announceFailedHeartbeats && ((_f = payload === null || payload === void 0 ? void 0 : payload.status) === null || _f === void 0 ? void 0 : _f.error) === true) { + this.on(emitStatus$1.type, asyncHandler((payload_1, _1, _a) => __awaiter(this, [payload_1, _1, _a], void 0, function* (payload, _, { emitStatus, config }) { + var _b; + if (config.announceFailedHeartbeats && ((_b = payload === null || payload === void 0 ? void 0 : payload.status) === null || _b === void 0 ? void 0 : _b.error) === true) { emitStatus(payload.status); } else if (config.announceSuccessfulHeartbeats && payload.statusCode === 200) { @@ -6608,6 +7084,19 @@ } } + /** + * Heartbeat stopped state module. + * + * @internal + */ + /** + * Heartbeat stopped state. + * + * State in which Presence Event Engine still has information about active channels / groups, but doesn't wait for + * delayed heartbeat request sending. + * + * @internal + */ const HeartbeatStoppedState = new State('HEARTBEAT_STOPPED'); HeartbeatStoppedState.on(joined.type, (context, event) => HeartbeatStoppedState.with({ channels: [...context.channels, ...event.payload.channels], @@ -6623,6 +7112,18 @@ })); HeartbeatStoppedState.on(leftAll.type, (context, _) => HeartbeatInactiveState.with(undefined)); + /** + * Waiting next heartbeat state module. + * + * @internal + */ + /** + * Waiting next heartbeat state. + * + * State in which Presence Event Engine is waiting when delay will run out and next heartbeat call should be done. + * + * @internal + */ const HeartbeatCooldownState = new State('HEARTBEAT_COOLDOWN'); HeartbeatCooldownState.onEnter(() => wait()); HeartbeatCooldownState.onExit(() => wait.cancel); @@ -6644,6 +7145,19 @@ }, [leave(context.channels, context.groups)])); HeartbeatCooldownState.on(leftAll.type, (context, _) => HeartbeatInactiveState.with(undefined, [leave(context.channels, context.groups)])); + /** + * Failed to heartbeat state module. + * + * @internal + */ + /** + * Failed to heartbeat state. + * + * State in which Subscription Event Engine waits for user to try to reconnect after all retry attempts has been + * exhausted. + * + * @internal + */ const HeartbeatFailedState = new State('HEARTBEAT_FAILED'); HeartbeatFailedState.on(joined.type, (context, event) => HeartbeatingState.with({ channels: [...context.channels, ...event.payload.channels], @@ -6663,6 +7177,18 @@ }, [leave(context.channels, context.groups)])); HeartbeatFailedState.on(leftAll.type, (context, _) => HeartbeatInactiveState.with(undefined, [leave(context.channels, context.groups)])); + /** + * Retry heartbeat state module. + * + * @internal + */ + /** + * Retry heartbeat state. + * + * State in which Presence Event Engine tries to recover after error which happened before. + * + * @internal + */ const HearbeatReconnectingState = new State('HEARBEAT_RECONNECTING'); HearbeatReconnectingState.onEnter((context) => delayedHeartbeat(context)); HearbeatReconnectingState.onExit(() => delayedHeartbeat.cancel); @@ -6695,6 +7221,18 @@ }); HearbeatReconnectingState.on(leftAll.type, (context, _) => HeartbeatInactiveState.with(undefined, [leave(context.channels, context.groups)])); + /** + * Heartbeating state module. + * + * @internal + */ + /** + * Heartbeating state module. + * + * State in which Presence Event Engine send heartbeat REST API call. + * + * @internal + */ const HeartbeatingState = new State('HEARTBEATING'); HeartbeatingState.onEnter((context) => heartbeat(context.channels, context.groups)); HeartbeatingState.on(heartbeatSuccess.type, (context, event) => { @@ -6722,12 +7260,34 @@ }, [leave(context.channels, context.groups)])); HeartbeatingState.on(leftAll.type, (context, _) => HeartbeatInactiveState.with(undefined, [leave(context.channels, context.groups)])); + /** + * Inactive heratbeating state module. + * + * @internal + */ + /** + * Inactive heratbeating state + * + * State in which Presence Event Engine doesn't process any heartbeat requests (initial state). + * + * @internal + */ const HeartbeatInactiveState = new State('HEARTBEAT_INACTIVE'); HeartbeatInactiveState.on(joined.type, (_, event) => HeartbeatingState.with({ channels: event.payload.channels, groups: event.payload.groups, })); + /** + * Presence Event Engine module. + * + * @internal + */ + /** + * Presence Event Engine Core. + * + * @internal + */ class PresenceEventEngine { get _engine() { return this.engine; @@ -6766,6 +7326,9 @@ } } + /** + * Failed request retry policy. + */ class RetryPolicy { static LinearRetryPolicy(configuration) { return { @@ -6840,20 +7403,87 @@ } } + /** + * Subscribe Event Engine effects module. + * + * @internal + */ + /** + * Initial subscription effect. + * + * Performs subscribe REST API call with `tt=0`. + * + * @internal + */ const handshake = createManagedEffect('HANDSHAKE', (channels, groups) => ({ channels, groups, })); + /** + * Real-time updates receive effect. + * + * Performs sequential subscribe REST API call with `tt` set to the value received from the previous subscribe + * REST API call. + * + * @internal + */ const receiveMessages = createManagedEffect('RECEIVE_MESSAGES', (channels, groups, cursor) => ({ channels, groups, cursor })); + /** + * Emit real-time updates effect. + * + * Notify event listeners about updates for which listener handlers has been provided. + * + * @internal + */ const emitMessages = createEffect('EMIT_MESSAGES', (events) => events); + /** + * Emit subscription status change effect. + * + * Notify status change event listeners. + * + * @internal + */ const emitStatus = createEffect('EMIT_STATUS', (status) => status); + /** + * Real-time updates receive restore effect. + * + * Performs subscribe REST API call with `tt` which has been received before disconnection or error. + * + * @internal + */ const receiveReconnect = createManagedEffect('RECEIVE_RECONNECT', (context) => context); + /** + * Initial subscription restore effect. + * + * Performs subscribe REST API call with `tt=0` after error. + * + * @internal + */ const handshakeReconnect = createManagedEffect('HANDSHAKE_RECONNECT', (context) => context); + /** + * Subscribe Event Engine events module. + * + * @internal + */ + /** + * Subscription list change event. + * + * Event is sent each time when user would like to change list of active channels / groups. + * + * @internal + */ const subscriptionChange = createEvent('SUBSCRIPTION_CHANGED', (channels, groups) => ({ channels, groups, })); + /** + * Subscription loop restore. + * + * Event is sent when user would like to try catch up on missed updates by providing specific timetoken. + * + * @internal + */ const restore = createEvent('SUBSCRIPTION_RESTORED', (channels, groups, timetoken, region) => ({ channels, groups, @@ -6862,33 +7492,136 @@ region: region !== null && region !== void 0 ? region : 0, }, })); + /** + * Initial subscription handshake success event. + * + * Event is sent by corresponding effect handler if REST API call was successful. + * + * @internal + */ const handshakeSuccess = createEvent('HANDSHAKE_SUCCESS', (cursor) => cursor); + /** + * Initial subscription handshake did fail event. + * + * Event is sent by corresponding effect handler if REST API call failed. + * + * @internal + */ const handshakeFailure = createEvent('HANDSHAKE_FAILURE', (error) => error); + /** + * Initial subscription handshake reconnect success event. + * + * Event is sent by corresponding effect handler if REST API call was successful after transition to the failed state. + * + * @internal + */ const handshakeReconnectSuccess = createEvent('HANDSHAKE_RECONNECT_SUCCESS', (cursor) => ({ cursor, })); + /** + * Initial subscription handshake reconnect did fail event. + * + * Event is sent by corresponding effect handler if REST API call did fail while tried to enter to the success state. + * + * @internal + */ const handshakeReconnectFailure = createEvent('HANDSHAKE_RECONNECT_FAILURE', (error) => error); + /** + * Initial subscription handshake impossible event. + * + * Event is sent by corresponding effect handler if REST API call exhausted all retry attempt and won't try again. + * + * @internal + */ const handshakeReconnectGiveup = createEvent('HANDSHAKE_RECONNECT_GIVEUP', (error) => error); + /** + * Subscription successfully received real-time updates event. + * + * Event is sent by corresponding effect handler if REST API call was successful. + * + * @internal + */ const receiveSuccess = createEvent('RECEIVE_SUCCESS', (cursor, events) => ({ cursor, events, })); + /** + * Subscription did fail to receive real-time updates event. + * + * Event is sent by corresponding effect handler if REST API call failed. + * + * @internal + */ const receiveFailure = createEvent('RECEIVE_FAILURE', (error) => error); + /** + * Subscription successfully received real-time updates on reconnection attempt event. + * + * Event is sent by corresponding effect handler if REST API call was successful after transition to the failed state. + * + * @internal + */ const receiveReconnectSuccess = createEvent('RECEIVE_RECONNECT_SUCCESS', (cursor, events) => ({ cursor, events, })); + /** + * Subscription did fail to receive real-time updates on reconnection attempt event. + * + * Event is sent by corresponding effect handler if REST API call did fail while tried to enter to the success state. + * + * @internal + */ const receiveReconnectFailure = createEvent('RECEIVE_RECONNECT_FAILURE', (error) => error); + /** + * Subscription real-time updates received impossible event. + * + * Event is sent by corresponding effect handler if REST API call exhausted all retry attempt and won't try again. + * + * @internal + */ const receiveReconnectGiveup = createEvent('RECEIVING_RECONNECT_GIVEUP', (error) => error); + /** + * Client disconnect event. + * + * Event is sent when user wants to temporarily stop real-time updates receive. + * + * @internal + */ const disconnect = createEvent('DISCONNECT', () => ({})); + /** + * Client reconnect event. + * + * Event is sent when user wants to restore real-time updates receive. + * + * @internal + */ const reconnect = createEvent('RECONNECT', (timetoken, region) => ({ cursor: { timetoken: timetoken !== null && timetoken !== void 0 ? timetoken : '', region: region !== null && region !== void 0 ? region : 0, }, })); + /** + * Completely stop real-time updates receive event. + * + * Event is sent when user doesn't want to receive any real-time updates anymore. + * + * @internal + */ const unsubscribeAll = createEvent('UNSUBSCRIBE_ALL', () => ({})); + /** + * Subscribe Event Engine effects dispatcher. + * + * @internal + */ + /** + * Subscribe Event Engine dispatcher. + * + * Dispatcher responsible for subscription events handling and corresponding effects execution. + * + * @internal + */ class EventEngineDispatcher extends Dispatcher { constructor(engine, dependencies) { super(dependencies); @@ -6906,7 +7639,7 @@ } } }))); - this.on(receiveMessages.type, asyncHandler((payload_2, abortSignal_2, _b) => __awaiter(this, [payload_2, abortSignal_2, _b], void 0, function* (payload, abortSignal, { receiveMessages, config }) { + this.on(receiveMessages.type, asyncHandler((payload_1, abortSignal_1, _a) => __awaiter(this, [payload_1, abortSignal_1, _a], void 0, function* (payload, abortSignal, { receiveMessages, config }) { abortSignal.throwIfAborted(); try { const result = yield receiveMessages({ @@ -6928,15 +7661,15 @@ } } }))); - this.on(emitMessages.type, asyncHandler((payload_3, _1, _c) => __awaiter(this, [payload_3, _1, _c], void 0, function* (payload, _, { emitMessages }) { + this.on(emitMessages.type, asyncHandler((payload_1, _1, _a) => __awaiter(this, [payload_1, _1, _a], void 0, function* (payload, _, { emitMessages }) { if (payload.length > 0) { emitMessages(payload); } }))); - this.on(emitStatus.type, asyncHandler((payload_4, _2, _d) => __awaiter(this, [payload_4, _2, _d], void 0, function* (payload, _, { emitStatus }) { + this.on(emitStatus.type, asyncHandler((payload_1, _1, _a) => __awaiter(this, [payload_1, _1, _a], void 0, function* (payload, _, { emitStatus }) { emitStatus(payload); }))); - this.on(receiveReconnect.type, asyncHandler((payload_5, abortSignal_3, _e) => __awaiter(this, [payload_5, abortSignal_3, _e], void 0, function* (payload, abortSignal, { receiveMessages, delay, config }) { + this.on(receiveReconnect.type, asyncHandler((payload_1, abortSignal_1, _a) => __awaiter(this, [payload_1, abortSignal_1, _a], void 0, function* (payload, abortSignal, { receiveMessages, delay, config }) { if (config.retryConfiguration && config.retryConfiguration.shouldRetry(payload.reason, payload.attempts)) { abortSignal.throwIfAborted(); yield delay(config.retryConfiguration.getDelay(payload.attempts, payload.reason)); @@ -6966,7 +7699,7 @@ : 'Unable to complete subscribe messages receive.'))); } }))); - this.on(handshakeReconnect.type, asyncHandler((payload_6, abortSignal_4, _f) => __awaiter(this, [payload_6, abortSignal_4, _f], void 0, function* (payload, abortSignal, { handshake, delay, presenceState, config }) { + this.on(handshakeReconnect.type, asyncHandler((payload_1, abortSignal_1, _a) => __awaiter(this, [payload_1, abortSignal_1, _a], void 0, function* (payload, abortSignal, { handshake, delay, presenceState, config }) { if (config.retryConfiguration && config.retryConfiguration.shouldRetry(payload.reason, payload.attempts)) { abortSignal.throwIfAborted(); yield delay(config.retryConfiguration.getDelay(payload.attempts, payload.reason)); @@ -6992,6 +7725,19 @@ } } + /** + * Failed initial subscription handshake (disconnected) state. + * + * @internal + */ + /** + * Failed initial subscription handshake (disconnected) state. + * + * State in which Subscription Event Engine waits for user to try to reconnect after all retry attempts has been + * exhausted. + * + * @internal + */ const HandshakeFailedState = new State('HANDSHAKE_FAILED'); HandshakeFailedState.on(subscriptionChange.type, (context, event) => HandshakingState.with({ channels: event.payload.channels, @@ -7010,12 +7756,25 @@ groups: event.payload.groups, cursor: { timetoken: event.payload.cursor.timetoken, - region: event.payload.cursor.region ? event.payload.cursor.region : (_b = (_a = context === null || context === void 0 ? void 0 : context.cursor) === null || _a === void 0 ? void 0 : _a.region) !== null && _b !== void 0 ? _b : 0, + region: event.payload.cursor.region ? event.payload.cursor.region : ((_b = (_a = context === null || context === void 0 ? void 0 : context.cursor) === null || _a === void 0 ? void 0 : _a.region) !== null && _b !== void 0 ? _b : 0), }, }); }); HandshakeFailedState.on(unsubscribeAll.type, (_) => UnsubscribedState.with()); + /** + * Stopped initial subscription handshake (disconnected) state. + * + * @internal + */ + /** + * Stopped initial subscription handshake (disconnected) state. + * + * State in which Subscription Event Engine still has information about subscription but doesn't have subscription + * cursor for next sequential subscribe REST API call. + * + * @internal + */ const HandshakeStoppedState = new State('HANDSHAKE_STOPPED'); HandshakeStoppedState.on(subscriptionChange.type, (context, event) => HandshakeStoppedState.with({ channels: event.payload.channels, @@ -7036,6 +7795,19 @@ }); HandshakeStoppedState.on(unsubscribeAll.type, (_) => UnsubscribedState.with()); + /** + * Failed to receive real-time updates (disconnected) state. + * + * @internal + */ + /** + * Failed to receive real-time updates (disconnected) state. + * + * State in which Subscription Event Engine waits for user to try to reconnect after all retry attempts has been + * exhausted. + * + * @internal + */ const ReceiveFailedState = new State('RECEIVE_FAILED'); ReceiveFailedState.on(reconnect.type, (context, event) => { var _a; @@ -7063,6 +7835,19 @@ })); ReceiveFailedState.on(unsubscribeAll.type, (_) => UnsubscribedState.with(undefined)); + /** + * Stopped real-time updates (disconnected) state module. + * + * @internal + */ + /** + * Stopped real-time updates (disconnected) state. + * + * State in which Subscription Event Engine still has information about subscription but doesn't process real-time + * updates. + * + * @internal + */ const ReceiveStoppedState = new State('RECEIVE_STOPPED'); ReceiveStoppedState.on(subscriptionChange.type, (context, event) => ReceiveStoppedState.with({ channels: event.payload.channels, @@ -7090,6 +7875,18 @@ }); ReceiveStoppedState.on(unsubscribeAll.type, () => UnsubscribedState.with(undefined)); + /** + * Reconnect to receive real-time updates (disconnected) state. + * + * @internal + */ + /** + * Reconnect to receive real-time updates (disconnected) state. + * + * State in which Subscription Event Engine tries to recover after error which happened before. + * + * @internal + */ const ReceiveReconnectingState = new State('RECEIVE_RECONNECTING'); ReceiveReconnectingState.onEnter((context) => receiveReconnect(context)); ReceiveReconnectingState.onExit(() => receiveReconnect.cancel); @@ -7128,6 +7925,18 @@ })); ReceiveReconnectingState.on(unsubscribeAll.type, (_) => UnsubscribedState.with(undefined, [emitStatus({ category: StatusCategory$1.PNDisconnectedCategory })])); + /** + * Receiving real-time updates (connected) state module. + * + * @internal + */ + /** + * Receiving real-time updates (connected) state. + * + * State in which Subscription Event Engine processes any real-time updates. + * + * @internal + */ const ReceivingState = new State('RECEIVING'); ReceivingState.onEnter((context) => receiveMessages(context.channels, context.groups, context.cursor)); ReceivingState.onExit(() => receiveMessages.cancel); @@ -7171,6 +7980,18 @@ }); ReceivingState.on(unsubscribeAll.type, (_) => UnsubscribedState.with(undefined, [emitStatus({ category: StatusCategory$1.PNDisconnectedCategory })])); + /** + * Retry initial subscription handshake (disconnected) state. + * + * @internal + */ + /** + * Retry initial subscription handshake (disconnected) state. + * + * State in which Subscription Event Engine tries to recover after error which happened before. + * + * @internal + */ const HandshakeReconnectingState = new State('HANDSHAKE_RECONNECTING'); HandshakeReconnectingState.onEnter((context) => handshakeReconnect(context)); HandshakeReconnectingState.onExit(() => handshakeReconnect.cancel); @@ -7219,6 +8040,19 @@ }); HandshakeReconnectingState.on(unsubscribeAll.type, (_) => UnsubscribedState.with(undefined)); + /** + * Initial subscription handshake (disconnected) state. + * + * @internal + */ + /** + * Initial subscription handshake (disconnected) state. + * + * State in which Subscription Event Engine tries to receive subscription cursor for next sequential subscribe REST + * API calls. + * + * @internal + */ const HandshakingState = new State('HANDSHAKING'); HandshakingState.onEnter((context) => handshake(context.channels, context.groups)); HandshakingState.onExit(() => handshake.cancel); @@ -7274,6 +8108,18 @@ }); HandshakingState.on(unsubscribeAll.type, (_) => UnsubscribedState.with()); + /** + * Unsubscribed / disconnected state module. + * + * @internal + */ + /** + * Unsubscribed / disconnected state. + * + * State in which Subscription Event Engine doesn't process any real-time updates. + * + * @internal + */ const UnsubscribedState = new State('UNSUBSCRIBED'); UnsubscribedState.on(subscriptionChange.type, (_, event) => HandshakingState.with({ channels: event.payload.channels, @@ -7287,6 +8133,16 @@ }); }); + /** + * Subscribe Event Engine module. + * + * @internal + */ + /** + * Subscribe Event Engine Core. + * + * @internal + */ class EventEngine { get _engine() { return this.engine; @@ -7528,6 +8384,8 @@ /** * Receive messages subscribe REST API module. + * + * @internal */ /** * Receive messages subscribe request. @@ -7572,6 +8430,8 @@ /** * Handshake subscribe REST API module. + * + * @internal */ /** * Handshake subscribe request. @@ -7603,6 +8463,8 @@ /** * Get Presence State REST API module. + * + * @internal */ // endregion /** @@ -7659,6 +8521,8 @@ /** * Set Presence State REST API module. + * + * @internal */ // endregion /** @@ -7709,6 +8573,8 @@ /** * Announce heartbeat REST API module. + * + * @internal */ // endregion /** @@ -7759,6 +8625,8 @@ /** * Announce leave REST API module. + * + * @internal */ // endregion /** @@ -7811,6 +8679,8 @@ /** * `uuid` presence REST API module. + * + * @internal */ // endregion /** @@ -7851,6 +8721,8 @@ /** * Channels / channel groups presence REST API module. + * + * @internal */ // -------------------------------------------------------- // ----------------------- Defaults ----------------------- @@ -7948,6 +8820,8 @@ /** * Delete messages REST API module. + * + * @internal */ // endregion /** @@ -7992,6 +8866,8 @@ /** * Messages count REST API module. + * + * @internal */ // endregion /** @@ -8044,6 +8920,8 @@ /** * Get history REST API module. + * + * @internal */ // -------------------------------------------------------- // ---------------------- Defaults ------------------------ @@ -8182,6 +9060,8 @@ /** * Fetch messages REST API module. + * + * @internal */ // -------------------------------------------------------- // ---------------------- Defaults ------------------------ @@ -8363,6 +9243,8 @@ /** * Get Message Actions REST API module. + * + * @internal */ // endregion /** @@ -8418,6 +9300,8 @@ /** * Add Message Action REST API module. + * + * @internal */ // endregion /** @@ -8475,6 +9359,8 @@ /** * Remove Message Action REST API module. + * + * @internal */ // endregion /** @@ -8520,6 +9406,8 @@ /** * Publish File Message REST API module. + * + * @internal */ // -------------------------------------------------------- // ----------------------- Defaults ----------------------- @@ -8598,6 +9486,8 @@ /** * File sharing REST API module. + * + * @internal */ // endregion /** @@ -8642,6 +9532,8 @@ /** * Delete file REST API module. + * + * @internal */ // endregion /** @@ -8685,6 +9577,8 @@ /** * List Files REST API module. + * + * @internal */ // -------------------------------------------------------- // ----------------------- Defaults ----------------------- @@ -8739,6 +9633,8 @@ /** * Generate file upload URL REST API request. + * + * @internal */ // endregion /** @@ -8790,6 +9686,8 @@ /** * Upload file REST API request. + * + * @internal */ /** * File Upload request. @@ -8847,6 +9745,11 @@ } } + /** + * Share File API module. + * + * @internal + */ // endregion /** * Send file composed request. @@ -8969,53 +9872,173 @@ } class SubscribeCapable { + /** + * Start receiving real-time updates. + * + * @param subscribeParameters - Additional subscription configuration options which should be used + * for request. + */ subscribe(subscribeParameters) { const timetoken = subscribeParameters === null || subscribeParameters === void 0 ? void 0 : subscribeParameters.timetoken; this.pubnub.subscribe(Object.assign({ channels: this.channelNames, channelGroups: this.groupNames }, (timetoken !== null && timetoken !== '' && { timetoken: timetoken }))); } + /** + * Stop real-time events processing. + */ unsubscribe() { this.pubnub.unsubscribe({ channels: this.channelNames, channelGroups: this.groupNames, }); } + /** + * Set new message handler. + * + * @param onMessageListener - Listener function, which will be called each time when a new message + * is received from the real-time network. + */ set onMessage(onMessageListener) { this.listener.message = onMessageListener; } + /** + * Set new presence events handler. + * + * @param onPresenceListener - Listener function, which will be called each time when a new + * presence event is received from the real-time network. + */ set onPresence(onPresenceListener) { this.listener.presence = onPresenceListener; } + /** + * Set new signal handler. + * + * @param onSignalListener - Listener function, which will be called each time when a new signal + * is received from the real-time network. + */ set onSignal(onSignalListener) { this.listener.signal = onSignalListener; } + /** + * Set new app context event handler. + * + * @param onObjectsListener - Listener function, which will be called each time when a new + * app context event is received from the real-time network. + */ set onObjects(onObjectsListener) { this.listener.objects = onObjectsListener; } + /** + * Set new message reaction event handler. + * + * @param messageActionEventListener - Listener function, which will be called each time when a + * new message reaction event is received from the real-time network. + */ set onMessageAction(messageActionEventListener) { this.listener.messageAction = messageActionEventListener; } + /** + * Set new file handler. + * + * @param fileEventListener - Listener function, which will be called each time when a new file + * is received from the real-time network. + */ set onFile(fileEventListener) { this.listener.file = fileEventListener; } + /** + * Set events handler. + * + * @param listener - Events listener configuration object, which lets specify handlers for multiple + * types of events. + */ addListener(listener) { this.eventEmitter.addListener(listener, this.channelNames.filter((c) => !c.endsWith('-pnpres')), this.groupNames.filter((cg) => !cg.endsWith('-pnpres'))); } + /** + * Remove events handler. + * + * @param listener - Event listener configuration, which should be removed from the list of notified + * listeners. **Important:** Should be the same object which has been passed to the + * {@link addListener}. + */ removeListener(listener) { this.eventEmitter.removeListener(listener, this.channelNames, this.groupNames); } + /** + * Get list of channels which is used for subscription. + * + * @returns List of channel names. + */ get channels() { return this.channelNames.slice(0); } + /** + * Get list of channel groups which is used for subscription. + * + * @returns List of channel group names. + */ get channelGroups() { return this.groupNames.slice(0); } } + /** + * Multiple entities subscription set object which can be used to receive and handle real-time + * updates. + * + * Subscription set object represent collection of per-entity subscription objects and allow + * processing them at once for subscription loop and events handling. + */ class SubscriptionSet extends SubscribeCapable { + /** + * Create entities' subscription set object. + * + * Subscription set object represent collection of per-entity subscription objects and allow + * processing them at once for subscription loop and events handling. + * + * @param channels - List of channels which should be used in subscription loop. + * @param channelGroups - List of channel groups which should be used in subscription loop. + * @param subscriptionOptions - Entities' subscription object configuration. + * @param eventEmitter - Event emitter, which will notify listeners about updates received for + * entities' channels / groups. + * @param pubnub - PubNub instance which will perform subscribe / unsubscribe requests for + * entities. + * + * @returns Ready to use entities' subscription set object. + * + * @internal + */ constructor({ channels = [], channelGroups = [], subscriptionOptions, eventEmitter, pubnub, }) { super(); + /** + * List of channel names for subscription loop. + * + * List of entities' names which can have additional entries depending on from configuration + * options. Presence events observing adds additional name to be used along with entity name. + * + * **Note:** Depending on from the entities' type, they may provide a list of channels which are + * used to receive real-time updates for it. + * + * @internal + */ this.channelNames = []; + /** + * List of channel group names for subscription loop. + * + * List of entities' names which can have additional entries depending on from configuration + * options. Presence events observing adds additional name to be used along with entity name. + * + * **Note:** Depending on from the entities' type, they may provide a list of channels which are + * used to receive real-time updates for it. + * + * @internal + */ this.groupNames = []; + /** + * List of per-entity subscription objects. + * + * @internal + */ this.subscriptionList = []; this.options = subscriptionOptions; this.eventEmitter = eventEmitter; @@ -9033,12 +10056,28 @@ this.listener = {}; eventEmitter.addListener(this.listener, this.channelNames.filter((c) => !c.endsWith('-pnpres')), this.groupNames.filter((cg) => !cg.endsWith('-pnpres'))); } + /** + * Add additional entity's subscription to the subscription set. + * + * **Important:** Changes will be effective only after {@link SubscribeCapable#subscribe} call or + * next subscription loop. + * + * @param subscription - Other entity's subscription object, which should be added. + */ addSubscription(subscription) { this.subscriptionList.push(subscription); this.channelNames = [...this.channelNames, ...subscription.channels]; this.groupNames = [...this.groupNames, ...subscription.channelGroups]; this.eventEmitter.addListener(this.listener, subscription.channels, subscription.channelGroups); } + /** + * Remove entity's subscription object from the set. + * + * **Important:** Changes will be effective only after {@link SubscribeCapable#unsubscribe} call or + * next subscription loop. + * + * @param subscription - Other entity's subscription object, which should be removed. + */ removeSubscription(subscription) { const channelsToRemove = subscription.channels; const groupsToRemove = subscription.channelGroups; @@ -9047,12 +10086,28 @@ this.subscriptionList = this.subscriptionList.filter((s) => s !== subscription); this.eventEmitter.removeListener(this.listener, channelsToRemove, groupsToRemove); } + /** + * Merge with other subscription set object. + * + * **Important:** Changes will be effective only after {@link SubscribeCapable#subscribe} call or + * next subscription loop. + * + * @param subscriptionSet - Other entities' subscription set, which should be joined. + */ addSubscriptionSet(subscriptionSet) { this.subscriptionList = [...this.subscriptionList, ...subscriptionSet.subscriptions]; this.channelNames = [...this.channelNames, ...subscriptionSet.channels]; this.groupNames = [...this.groupNames, ...subscriptionSet.channelGroups]; this.eventEmitter.addListener(this.listener, subscriptionSet.channels, subscriptionSet.channelGroups); } + /** + * Subtract other subscription set object. + * + * **Important:** Changes will be effective only after {@link SubscribeCapable#unsubscribe} call or + * next subscription loop. + * + * @param subscriptionSet - Other entities' subscription set, which should be subtracted. + */ removeSubscriptionSet(subscriptionSet) { const channelsToRemove = subscriptionSet.channels; const groupsToRemove = subscriptionSet.channelGroups; @@ -9061,15 +10116,59 @@ this.subscriptionList = this.subscriptionList.filter((s) => !subscriptionSet.subscriptions.includes(s)); this.eventEmitter.removeListener(this.listener, channelsToRemove, groupsToRemove); } + /** + * Get list of entities' subscription objects registered in subscription set. + * + * @returns Entities' subscription objects list. + */ get subscriptions() { return this.subscriptionList.slice(0); } } + /** + * Single-entity subscription object which can be used to receive and handle real-time updates. + */ class Subscription extends SubscribeCapable { + /** + * Create entity's subscription object. + * + * @param channels - List of channels which should be used in subscription loop. + * @param channelGroups - List of channel groups which should be used in subscription loop. + * @param subscriptionOptions - Per-entity subscription object configuration. + * @param eventEmitter - Event emitter, which will notify listeners about updates received for + * entity channels / groups. + * @param pubnub - PubNub instance which will perform subscribe / unsubscribe requests for entity. + * + * @returns Ready to use entity's subscription object. + * + * @internal + */ constructor({ channels, channelGroups, subscriptionOptions, eventEmitter, pubnub, }) { super(); + /** + * List of channel names for subscription loop. + * + * Entity may have few because of subscription configuration options. Presence events observing + * adds additional name to be used along with entity name. + * + * **Note:** Depending on from the entity type, it may provide a list of channels which are used + * to receive real-time updates for it. + * + * @internal + */ this.channelNames = []; + /** + * List of channel group names for subscription loop. + * + * Entity may have few because of subscription configuration options. Presence events observing + * adds additional name to be used along with entity name. + * + * **Note:** Depending on from the entity type, it may provide a list of channel groups which is + * sed to receive real-time updates for it. + * + * @internal + */ this.groupNames = []; this.channelNames = channels; this.groupNames = channelGroups; @@ -9079,6 +10178,12 @@ this.listener = {}; eventEmitter.addListener(this.listener, this.channelNames.filter((c) => !c.endsWith('-pnpres')), this.groupNames.filter((cg) => !cg.endsWith('-pnpres'))); } + /** + * Merge entities' subscription objects into subscription set. + * + * @param subscription - Other entity's subscription object to be merged with receiver. + * @return Subscription set which contains both receiver and other entities' subscription objects. + */ addSubscription(subscription) { return new SubscriptionSet({ channels: [...this.channelNames, ...subscription.channels], @@ -9090,12 +10195,37 @@ } } + /** + * First-class objects which provides access to the channel app context object-specific APIs. + */ class ChannelMetadata { + /** + * Create channel app context object entity. + * + * @param id - Channel app context object identifier which will be used with subscription loop. + * @param eventEmitter - Event emitter, which will notify listeners about updates received on + * channel's subscription. + * @param pubnub - PubNub instance which will use this entity. + * + * @returns Ready to use channel app context object entity. + * + * @internal + */ constructor(id, eventEmitter, pubnub) { - this.id = id; this.eventEmitter = eventEmitter; this.pubnub = pubnub; + this.id = id; } + /** + * Create channel's app context subscription object for real-time updates. + * + * Create subscription object which can be used to subscribe to the real-time updates sent to the specific channel + * app context object. + * + * @param [subscriptionOptions] - Channel's app context subscription object behavior customization options. + * + * @returns Configured and ready to use channel's app context subscription object. + */ subscription(subscriptionOptions) { { return new Subscription({ @@ -9109,12 +10239,37 @@ } } + /** + * First-class objects which provides access to the channel group-specific APIs. + */ class ChannelGroup { - constructor(channelGroup, eventEmitter, pubnub) { + /** + * Create simple channel entity. + * + * @param name - Name of the channel group which will be used with subscription loop. + * @param eventEmitter - Event emitter, which will notify listeners about updates received on + * channel group's subscription. + * @param pubnub - PubNub instance which will use this entity. + * + * @returns Ready to use channel group entity. + * + * @internal + */ + constructor(name, eventEmitter, pubnub) { this.eventEmitter = eventEmitter; this.pubnub = pubnub; - this.name = channelGroup; + this.name = name; } + /** + * Create channel group's subscription object for real-time updates. + * + * Create subscription object which can be used to subscribe to the real-time updates sent to the channels in + * specific channel group. + * + * @param [subscriptionOptions] - Channel group's subscription object behavior customization options. + * + * @returns Configured and ready to use channel group's subscription object. + */ subscription(subscriptionOptions) { { return new Subscription({ @@ -9128,12 +10283,37 @@ } } + /** + * First-class objects which provides access to the user app context object-specific APIs. + */ class UserMetadata { + /** + * Create user app context object entity. + * + * @param id - User app context object identifier which will be used with subscription loop. + * @param eventEmitter - Event emitter, which will notify listeners about updates received on + * channel's subscription. + * @param pubnub - PubNub instance which will use this entity. + * + * @returns Ready to use user app context object entity. + * + * @internal + */ constructor(id, eventEmitter, pubnub) { - this.id = id; this.eventEmitter = eventEmitter; this.pubnub = pubnub; + this.id = id; } + /** + * Create user's app context subscription object for real-time updates. + * + * Create subscription object which can be used to subscribe to the real-time updates sent to the specific user + * app context object. + * + * @param [subscriptionOptions] - User's app context subscription object behavior customization options. + * + * @returns Configured and ready to use user's app context subscription object. + */ subscription(subscriptionOptions) { { return new Subscription({ @@ -9147,12 +10327,36 @@ } } + /** + * First-class objects which provides access to the channel-specific APIs. + */ class Channel { - constructor(channelName, eventEmitter, pubnub) { + /** + * Create simple channel entity. + * + * @param name - Name of the channel which will be used with subscription loop. + * @param eventEmitter - Event emitter, which will notify listeners about updates received on + * channel's subscription. + * @param pubnub - PubNub instance which will use this entity. + * + * @returns Ready to use channel entity. + * + * @internal + */ + constructor(name, eventEmitter, pubnub) { this.eventEmitter = eventEmitter; this.pubnub = pubnub; - this.name = channelName; + this.name = name; } + /** + * Create channel's subscription object for real-time updates. + * + * Create subscription object which can be used to subscribe to the real-time updates sent to the specific channel. + * + * @param [subscriptionOptions] - Channel's subscription object behavior customization options. + * + * @returns Configured and ready to use channel's subscription object. + */ subscription(subscriptionOptions) { { return new Subscription({ @@ -9168,6 +10372,8 @@ /** * Remove channel group channels REST API module. + * + * @internal */ // endregion /** @@ -9215,6 +10421,8 @@ /** * Add channel group channels REST API module. + * + * @internal */ // endregion /** @@ -9261,6 +10469,8 @@ /** * List channel group channels REST API module. + * + * @internal */ // endregion /** @@ -9301,6 +10511,8 @@ /** * Delete channel group REST API module. + * + * @internal */ // endregion /** @@ -9341,6 +10553,8 @@ /** * List All Channel Groups REST API module. + * + * @internal */ // endregion /** @@ -9379,12 +10593,23 @@ /** * PubNub Channel Groups API module. */ - class PubnubChannelGroups { + /** + * PubNub Stream / Channel group API interface. + */ + class PubNubChannelGroups { + /** + * Create stream / channel group API access object. + * + * @param keySet - PubNub account keys set which should be used for REST API calls. + * @param sendRequest - Function which should be used to send REST API calls. + * + * @internal + */ constructor(keySet, /* eslint-disable @typescript-eslint/no-explicit-any */ sendRequest) { - this.keySet = keySet; this.sendRequest = sendRequest; + this.keySet = keySet; } /** * Fetch channel group channels. @@ -9474,6 +10699,8 @@ /** * Manage channels enabled for device push REST API module. + * + * @internal */ // -------------------------------------------------------- // ----------------------- Defaults ----------------------- @@ -9551,6 +10778,8 @@ /** * Unregister Channels from Device push REST API module. + * + * @internal */ // endregion /** @@ -9578,6 +10807,8 @@ /** * List Device push enabled channels REST API module. + * + * @internal */ // endregion /** @@ -9605,6 +10836,8 @@ /** * Register Channels with Device push REST API module. + * + * @internal */ // endregion /** @@ -9632,6 +10865,8 @@ /** * Unregister Device push REST API module. + * + * @internal */ // endregion /** @@ -9660,12 +10895,23 @@ /** * PubNub Push Notifications API module. */ + /** + * PubNub Push Notifications API interface. + */ class PubNubPushNotifications { + /** + * Create mobile push notifications API access object. + * + * @param keySet - PubNub account keys set which should be used for REST API calls. + * @param sendRequest - Function which should be used to send REST API calls. + * + * @internal + */ constructor(keySet, /* eslint-disable @typescript-eslint/no-explicit-any */ sendRequest) { - this.keySet = keySet; this.sendRequest = sendRequest; + this.keySet = keySet; } /** * Fetch device's push notification enabled channels. @@ -9729,6 +10975,8 @@ /** * Get All Channel Metadata REST API module. + * + * @internal */ // -------------------------------------------------------- // ----------------------- Defaults ----------------------- @@ -9794,6 +11042,8 @@ /** * Remove Channel Metadata REST API module. + * + * @internal */ // endregion /** @@ -9832,6 +11082,8 @@ /** * Get UUID Memberships REST API module. + * + * @internal */ // -------------------------------------------------------- // ----------------------- Defaults ----------------------- @@ -9943,6 +11195,8 @@ /** * Set UUID Memberships REST API module. + * + * @internal */ // -------------------------------------------------------- // ----------------------- Defaults ----------------------- @@ -10049,6 +11303,8 @@ /** * Get All UUID Metadata REST API module. + * + * @internal */ // -------------------------------------------------------- // ----------------------- Defaults ----------------------- @@ -10109,6 +11365,8 @@ /** * Get Channel Metadata REST API module. + * + * @internal */ // -------------------------------------------------------- // ----------------------- Defaults ----------------------- @@ -10165,6 +11423,8 @@ /** * Set Channel Metadata REST API module. + * + * @internal */ // -------------------------------------------------------- // ----------------------- Defaults ----------------------- @@ -10226,6 +11486,8 @@ /** * Remove UUID Metadata REST API module. + * + * @internal */ // endregion /** @@ -10267,6 +11529,8 @@ /** * Get Channel Members REST API module. + * + * @internal */ // -------------------------------------------------------- // ----------------------- Defaults ----------------------- @@ -10375,6 +11639,8 @@ /** * Set Channel Members REST API module. + * + * @internal */ // -------------------------------------------------------- // ----------------------- Defaults ----------------------- @@ -10478,6 +11744,8 @@ /** * Get UUID Metadata REST API module. + * + * @internal */ // -------------------------------------------------------- // ----------------------- Defaults ----------------------- @@ -10536,6 +11804,8 @@ /** * Set UUID Metadata REST API module. + * + * @internal */ // -------------------------------------------------------- // ----------------------- Defaults ----------------------- @@ -10601,13 +11871,24 @@ /** * PubNub Objects API module. */ + /** + * PubNub App Context API interface. + */ class PubNubObjects { + /** + * Create app context API access object. + * + * @param configuration - Extended PubNub client configuration object. + * @param sendRequest - Function which should be used to send REST API calls. + * + * @internal + */ constructor(configuration, /* eslint-disable @typescript-eslint/no-explicit-any */ sendRequest) { + this.keySet = configuration.keySet; this.configuration = configuration; this.sendRequest = sendRequest; - this.keySet = configuration.keySet; } /** * Fetch a paginated list of UUID Metadata objects. @@ -10625,11 +11906,12 @@ /** * Fetch a paginated list of UUID Metadata objects. * - * * @param [parametersOrCallback] - Request configuration parameters or callback from overload. * @param [callback] - Request completion handler callback. * * @returns Asynchronous get all UUID metadata response or `void` in case if `callback` provided. + * + * @internal */ _getAllUUIDMetadata(parametersOrCallback, callback) { return __awaiter(this, void 0, void 0, function* () { @@ -10662,6 +11944,8 @@ * @param [callback] - Request completion handler callback. * * @returns Asynchronous get UUID metadata response or `void` in case if `callback` provided. + * + * @internal */ _getUUIDMetadata(parametersOrCallback, callback) { return __awaiter(this, void 0, void 0, function* () { @@ -10695,6 +11979,8 @@ /** * Update specific UUID Metadata object. * + * @internal + * * @param parameters - Request configuration parameters. Will set UUID metadata for currently * configured PubNub client `uuid` if not set. * @param [callback] - Request completion handler callback. @@ -10729,6 +12015,8 @@ /** * Remove a specific UUID Metadata object. * + * @internal + * * @param [parametersOrCallback] - Request configuration parameters or callback from overload. * @param [callback] - Request completion handler callback. * @@ -10766,6 +12054,8 @@ /** * Fetch a paginated list of Channel Metadata objects. * + * @internal + * * @param [parametersOrCallback] - Request configuration parameters or callback from overload. * @param [callback] - Request completion handler callback. * @@ -10799,6 +12089,8 @@ /** * Fetch Channel Metadata object. * + * @internal + * * @param parameters - Request configuration parameters. * @param [callback] - Request completion handler callback. * @@ -10828,6 +12120,8 @@ /** * Update specific Channel Metadata object. * + * @internal + * * @param parameters - Request configuration parameters. * @param [callback] - Request completion handler callback. * @@ -10858,6 +12152,8 @@ /** * Remove a specific Channel Metadata object. * + * @internal + * * @param parameters - Request configuration parameters. * @param [callback] - Request completion handler callback. * @@ -11088,7 +12384,6 @@ uuids: (_c = (_b = spaceParameters.users) === null || _b === void 0 ? void 0 : _b.map((user) => { if (typeof user === 'string') return user; - user.userId; return { id: user.userId, custom: user.custom }; })) !== null && _c !== void 0 ? _c : spaceParameters.uuids, limit: 0, @@ -11148,6 +12443,8 @@ /** * Download File REST API module. + * + * @internal */ // endregion /** @@ -11199,6 +12496,9 @@ } } + /** + * Core PubNub API module. + */ // endregion /** * Platform-agnostic PubNub client core. @@ -11226,6 +12526,14 @@ return uuidGenerator.createUUID(); } // endregion + /** + * Create and configure PubNub client core. + * + * @param configuration - PubNub client core configuration. + * @returns Configured and ready to use PubNub client. + * + * @internal + */ constructor(configuration) { this._configuration = configuration.configuration; this.cryptography = configuration.cryptography; @@ -11234,7 +12542,7 @@ this.crypto = configuration.crypto; // API group entry points initialization. this._objects = new PubNubObjects(this._configuration, this.sendRequest.bind(this)); - this._channelGroups = new PubnubChannelGroups(this._configuration.keySet, this.sendRequest.bind(this)); + this._channelGroups = new PubNubChannelGroups(this._configuration.keySet, this.sendRequest.bind(this)); this._push = new PubNubPushNotifications(this._configuration.keySet, this.sendRequest.bind(this)); { // Prepare for real-time events announcement. @@ -11591,6 +12899,8 @@ /** * Schedule request execution. * + * @internal + * * @param request - REST API request. * @param [callback] - Request completion handler callback. * @@ -11817,6 +13127,8 @@ * * **Note:** Method passed into managers to let them use it when required. * + * @internal + * * @param parameters - Request configuration parameters. * @param callback - Request completion handler callback. */ @@ -11861,6 +13173,8 @@ * * **Note:** Method passed into managers to let them use it when required. * + * @internal + * * @param parameters - Request configuration parameters. * @param callback - Request completion handler callback. */ @@ -11908,6 +13222,8 @@ /** * Event engine handshake subscribe. * + * @internal + * * @param parameters - Request configuration parameters. */ subscribeHandshake(parameters) { @@ -11934,6 +13250,8 @@ /** * Event engine receive messages subscribe. * + * @internal + * * @param parameters - Request configuration parameters. */ subscribeReceiveMessages(parameters) { @@ -12203,6 +13521,8 @@ /** * Announce user presence * + * @internal + * * @param parameters - Desired presence state for provided list of channels and groups. * @param callback - Request completion handler callback. */ @@ -12221,6 +13541,8 @@ /** * Announce user `join` on specified list of channels and groups. * + * @internal + * * @param parameters - List of channels and groups where `join` event should be sent. */ join(parameters) { @@ -12232,6 +13554,8 @@ /** * Announce user `leave` on specified list of channels and groups. * + * @internal + * * @param parameters - List of channels and groups where `leave` event should be sent. */ leave(parameters) { @@ -12240,6 +13564,8 @@ } /** * Announce user `leave` on all subscribed channels. + * + * @internal */ leaveAll() { var _a; @@ -12577,8 +13903,7 @@ * @returns Asynchronous memberships modification response or `void` in case if `callback` provided. * * @deprecated Use {@link PubNubCore#objects.removeMemberships} or {@link PubNubCore#objects.removeChannelMembers} - * methods instead - * from `objects` API group.. + * methods instead from `objects` API group. */ removeMemberships(parameters, callback) { return __awaiter(this, void 0, void 0, function* () { @@ -12931,6 +14256,8 @@ /** * Cbor decoder module. + * + * @internal */ /** * CBOR data decoder. @@ -12967,6 +14294,13 @@ * PubNub client for browser platform. */ class PubNub extends PubNubCore { + /** + * Create and configure PubNub client core. + * + * @param configuration - User-provided PubNub client configuration. + * + * @returns Configured and ready to use PubNub client. + */ constructor(configuration) { var _a; const configurationCopy = setDefaults(configuration); diff --git a/dist/web/pubnub.min.js b/dist/web/pubnub.min.js index 6b073e00d..212067905 100644 --- a/dist/web/pubnub.min.js +++ b/dist/web/pubnub.min.js @@ -1,2 +1,2 @@ -!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).PubNub=t()}(this,(function(){"use strict";var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function t(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var s={exports:{}};!function(t){!function(e,s){var n=Math.pow(2,-24),r=Math.pow(2,32),i=Math.pow(2,53);var o={encode:function(e){var t,n=new ArrayBuffer(256),o=new DataView(n),a=0;function c(e){for(var s=n.byteLength,r=a+e;s>2,u=0;u>6),r.push(128|63&o)):o<55296?(r.push(224|o>>12),r.push(128|o>>6&63),r.push(128|63&o)):(o=(1023&o)<<10,o|=1023&t.charCodeAt(++n),o+=65536,r.push(240|o>>18),r.push(128|o>>12&63),r.push(128|o>>6&63),r.push(128|63&o))}return d(3,r.length),h(r);default:var p;if(Array.isArray(t))for(d(4,p=t.length),n=0;n>5!==e)throw"Invalid indefinite length element";return s}function f(e,t){for(var s=0;s>10),e.push(56320|1023&n))}}"function"!=typeof t&&(t=function(e){return e}),"function"!=typeof i&&(i=function(){return s});var m=function e(){var r,d,m=l(),b=m>>5,v=31&m;if(7===b)switch(v){case 25:return function(){var e=new ArrayBuffer(4),t=new DataView(e),s=h(),r=32768&s,i=31744&s,o=1023&s;if(31744===i)i=261120;else if(0!==i)i+=114688;else if(0!==o)return o*n;return t.setUint32(0,r<<16|i<<13|o<<13),t.getFloat32(0)}();case 26:return c(o.getFloat32(a),4);case 27:return c(o.getFloat64(a),8)}if((d=g(v))<0&&(b<2||6=0;)S+=d,w.push(u(d));var k=new Uint8Array(S),E=0;for(r=0;r=0;)f(O,d);else f(O,d);return String.fromCharCode.apply(null,O);case 4:var C;if(d<0)for(C=[];!p();)C.push(e());else for(C=new Array(d),r=0;r{const s=new FileReader;s.addEventListener("load",(()=>{if(s.result instanceof ArrayBuffer)return e(s.result)})),s.addEventListener("error",(()=>t(s.error))),s.readAsArrayBuffer(this.data)}))}))}toString(){return i(this,void 0,void 0,(function*(){return new Promise(((e,t)=>{const s=new FileReader;s.addEventListener("load",(()=>{if("string"==typeof s.result)return e(s.result)})),s.addEventListener("error",(()=>{t(s.error)})),s.readAsBinaryString(this.data)}))}))}toStream(){return i(this,void 0,void 0,(function*(){throw new Error("This feature is only supported in Node.js environments.")}))}toFile(){return i(this,void 0,void 0,(function*(){return this.data}))}toFileUri(){return i(this,void 0,void 0,(function*(){throw new Error("This feature is only supported in React Native environments.")}))}toBlob(){return i(this,void 0,void 0,(function*(){return this.data}))}}a.supportsBlob="undefined"!=typeof Blob,a.supportsFile="undefined"!=typeof File,a.supportsBuffer=!1,a.supportsStream=!1,a.supportsString=!0,a.supportsArrayBuffer=!0,a.supportsEncryptFile=!0,a.supportsFileUri=!1;function c(e){const t=e.replace(/==?$/,""),s=Math.floor(t.length/4*3),n=new ArrayBuffer(s),r=new Uint8Array(n);let i=0;function o(){const e=t.charAt(i++),s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(e);if(-1===s)throw new Error(`Illegal character at ${i}: ${t.charAt(i-1)}`);return s}for(let e=0;e>4,c=(15&s)<<4|n>>2,u=(3&n)<<6|i;r[e]=a,64!=n&&(r[e+1]=c),64!=i&&(r[e+2]=u)}return n}function u(e){let t="";const s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n=new Uint8Array(e),r=n.byteLength,i=r%3,o=r-i;let a,c,u,l,h;for(let e=0;e>18,c=(258048&h)>>12,u=(4032&h)>>6,l=63&h,t+=s[a]+s[c]+s[u]+s[l];return 1==i?(h=n[o],a=(252&h)>>2,c=(3&h)<<4,t+=s[a]+s[c]+"=="):2==i&&(h=n[o]<<8|n[o+1],a=(64512&h)>>10,c=(1008&h)>>4,u=(15&h)<<2,t+=s[a]+s[c]+s[u]+"="),t}var l;!function(e){e.PNNetworkIssuesCategory="PNNetworkIssuesCategory",e.PNTimeoutCategory="PNTimeoutCategory",e.PNCancelledCategory="PNCancelledCategory",e.PNBadRequestCategory="PNBadRequestCategory",e.PNAccessDeniedCategory="PNAccessDeniedCategory",e.PNValidationErrorCategory="PNValidationErrorCategory",e.PNAcknowledgmentCategory="PNAcknowledgmentCategory",e.PNUnknownCategory="PNUnknownCategory",e.PNNetworkUpCategory="PNNetworkUpCategory",e.PNNetworkDownCategory="PNNetworkDownCategory",e.PNReconnectedCategory="PNReconnectedCategory",e.PNConnectedCategory="PNConnectedCategory",e.PNRequestMessageCountExceededCategory="PNRequestMessageCountExceededCategory",e.PNDisconnectedCategory="PNDisconnectedCategory",e.PNConnectionErrorCategory="PNConnectionErrorCategory",e.PNDisconnectedUnexpectedlyCategory="PNDisconnectedUnexpectedlyCategory"}(l||(l={}));var h=l;class d extends Error{constructor(e,t){super(e),this.status=t,this.name="PubNubError",this.message=e,Object.setPrototypeOf(this,new.target.prototype)}}function p(e,t){return s=Object.assign({message:e},void 0!==t?{statusCode:t}:{}),null!==(n=s.statusCode)&&void 0!==n||(s.statusCode=0),Object.assign(Object.assign({},s),{statusCode:s.statusCode,category:h.PNValidationErrorCategory,error:!0});var s,n}var g,y,f,m,b,v=v||function(e,t){var s={},n=s.lib={},r=function(){},i=n.Base={extend:function(e){r.prototype=this;var t=new r;return e&&t.mixIn(e),t.hasOwnProperty("init")||(t.init=function(){t.$super.init.apply(this,arguments)}),t.init.prototype=t,t.$super=this,t},create:function(){var e=this.extend();return e.init.apply(e,arguments),e},init:function(){},mixIn:function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e.hasOwnProperty("toString")&&(this.toString=e.toString)},clone:function(){return this.init.prototype.extend(this)}},o=n.WordArray=i.extend({init:function(e,t){e=this.words=e||[],this.sigBytes=null!=t?t:4*e.length},toString:function(e){return(e||c).stringify(this)},concat:function(e){var t=this.words,s=e.words,n=this.sigBytes;if(e=e.sigBytes,this.clamp(),n%4)for(var r=0;r>>2]|=(s[r>>>2]>>>24-r%4*8&255)<<24-(n+r)%4*8;else if(65535>>2]=s[r>>>2];else t.push.apply(t,s);return this.sigBytes+=e,this},clamp:function(){var t=this.words,s=this.sigBytes;t[s>>>2]&=4294967295<<32-s%4*8,t.length=e.ceil(s/4)},clone:function(){var e=i.clone.call(this);return e.words=this.words.slice(0),e},random:function(t){for(var s=[],n=0;n>>2]>>>24-n%4*8&255;s.push((r>>>4).toString(16)),s.push((15&r).toString(16))}return s.join("")},parse:function(e){for(var t=e.length,s=[],n=0;n>>3]|=parseInt(e.substr(n,2),16)<<24-n%8*4;return new o.init(s,t/2)}},u=a.Latin1={stringify:function(e){var t=e.words;e=e.sigBytes;for(var s=[],n=0;n>>2]>>>24-n%4*8&255));return s.join("")},parse:function(e){for(var t=e.length,s=[],n=0;n>>2]|=(255&e.charCodeAt(n))<<24-n%4*8;return new o.init(s,t)}},l=a.Utf8={stringify:function(e){try{return decodeURIComponent(escape(u.stringify(e)))}catch(e){throw Error("Malformed UTF-8 data")}},parse:function(e){return u.parse(unescape(encodeURIComponent(e)))}},h=n.BufferedBlockAlgorithm=i.extend({reset:function(){this._data=new o.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=l.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var s=this._data,n=s.words,r=s.sigBytes,i=this.blockSize,a=r/(4*i);if(t=(a=t?e.ceil(a):e.max((0|a)-this._minBufferSize,0))*i,r=e.min(4*t,r),t){for(var c=0;cu;){var l;e:{l=c;for(var h=e.sqrt(l),d=2;d<=h;d++)if(!(l%d)){l=!1;break e}l=!0}l&&(8>u&&(i[u]=a(e.pow(c,.5))),o[u]=a(e.pow(c,1/3)),u++),c++}var p=[];r=r.SHA256=n.extend({_doReset:function(){this._hash=new s.init(i.slice(0))},_doProcessBlock:function(e,t){for(var s=this._hash.words,n=s[0],r=s[1],i=s[2],a=s[3],c=s[4],u=s[5],l=s[6],h=s[7],d=0;64>d;d++){if(16>d)p[d]=0|e[t+d];else{var g=p[d-15],y=p[d-2];p[d]=((g<<25|g>>>7)^(g<<14|g>>>18)^g>>>3)+p[d-7]+((y<<15|y>>>17)^(y<<13|y>>>19)^y>>>10)+p[d-16]}g=h+((c<<26|c>>>6)^(c<<21|c>>>11)^(c<<7|c>>>25))+(c&u^~c&l)+o[d]+p[d],y=((n<<30|n>>>2)^(n<<19|n>>>13)^(n<<10|n>>>22))+(n&r^n&i^r&i),h=l,l=u,u=c,c=a+g|0,a=i,i=r,r=n,n=g+y|0}s[0]=s[0]+n|0,s[1]=s[1]+r|0,s[2]=s[2]+i|0,s[3]=s[3]+a|0,s[4]=s[4]+c|0,s[5]=s[5]+u|0,s[6]=s[6]+l|0,s[7]=s[7]+h|0},_doFinalize:function(){var t=this._data,s=t.words,n=8*this._nDataBytes,r=8*t.sigBytes;return s[r>>>5]|=128<<24-r%32,s[14+(r+64>>>9<<4)]=e.floor(n/4294967296),s[15+(r+64>>>9<<4)]=n,t.sigBytes=4*s.length,this._process(),this._hash},clone:function(){var e=n.clone.call(this);return e._hash=this._hash.clone(),e}});t.SHA256=n._createHelper(r),t.HmacSHA256=n._createHmacHelper(r)}(Math),y=(g=v).enc.Utf8,g.algo.HMAC=g.lib.Base.extend({init:function(e,t){e=this._hasher=new e.init,"string"==typeof t&&(t=y.parse(t));var s=e.blockSize,n=4*s;t.sigBytes>n&&(t=e.finalize(t)),t.clamp();for(var r=this._oKey=t.clone(),i=this._iKey=t.clone(),o=r.words,a=i.words,c=0;c>>2]>>>24-r%4*8&255)<<16|(t[r+1>>>2]>>>24-(r+1)%4*8&255)<<8|t[r+2>>>2]>>>24-(r+2)%4*8&255,o=0;4>o&&r+.75*o>>6*(3-o)&63));if(t=n.charAt(64))for(;e.length%4;)e.push(t);return e.join("")},parse:function(e){var t=e.length,s=this._map;(n=s.charAt(64))&&-1!=(n=e.indexOf(n))&&(t=n);for(var n=[],r=0,i=0;i>>6-i%4*2;n[r>>>2]|=(o|a)<<24-r%4*8,r++}return m.create(n,r)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="},function(e){function t(e,t,s,n,r,i,o){return((e=e+(t&s|~t&n)+r+o)<>>32-i)+t}function s(e,t,s,n,r,i,o){return((e=e+(t&n|s&~n)+r+o)<>>32-i)+t}function n(e,t,s,n,r,i,o){return((e=e+(t^s^n)+r+o)<>>32-i)+t}function r(e,t,s,n,r,i,o){return((e=e+(s^(t|~n))+r+o)<>>32-i)+t}for(var i=v,o=(c=i.lib).WordArray,a=c.Hasher,c=i.algo,u=[],l=0;64>l;l++)u[l]=4294967296*e.abs(e.sin(l+1))|0;c=c.MD5=a.extend({_doReset:function(){this._hash=new o.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(e,i){for(var o=0;16>o;o++){var a=e[c=i+o];e[c]=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8)}o=this._hash.words;var c=e[i+0],l=(a=e[i+1],e[i+2]),h=e[i+3],d=e[i+4],p=e[i+5],g=e[i+6],y=e[i+7],f=e[i+8],m=e[i+9],b=e[i+10],v=e[i+11],w=e[i+12],S=e[i+13],k=e[i+14],E=e[i+15],O=t(O=o[0],P=o[1],N=o[2],C=o[3],c,7,u[0]),C=t(C,O,P,N,a,12,u[1]),N=t(N,C,O,P,l,17,u[2]),P=t(P,N,C,O,h,22,u[3]);O=t(O,P,N,C,d,7,u[4]),C=t(C,O,P,N,p,12,u[5]),N=t(N,C,O,P,g,17,u[6]),P=t(P,N,C,O,y,22,u[7]),O=t(O,P,N,C,f,7,u[8]),C=t(C,O,P,N,m,12,u[9]),N=t(N,C,O,P,b,17,u[10]),P=t(P,N,C,O,v,22,u[11]),O=t(O,P,N,C,w,7,u[12]),C=t(C,O,P,N,S,12,u[13]),N=t(N,C,O,P,k,17,u[14]),O=s(O,P=t(P,N,C,O,E,22,u[15]),N,C,a,5,u[16]),C=s(C,O,P,N,g,9,u[17]),N=s(N,C,O,P,v,14,u[18]),P=s(P,N,C,O,c,20,u[19]),O=s(O,P,N,C,p,5,u[20]),C=s(C,O,P,N,b,9,u[21]),N=s(N,C,O,P,E,14,u[22]),P=s(P,N,C,O,d,20,u[23]),O=s(O,P,N,C,m,5,u[24]),C=s(C,O,P,N,k,9,u[25]),N=s(N,C,O,P,h,14,u[26]),P=s(P,N,C,O,f,20,u[27]),O=s(O,P,N,C,S,5,u[28]),C=s(C,O,P,N,l,9,u[29]),N=s(N,C,O,P,y,14,u[30]),O=n(O,P=s(P,N,C,O,w,20,u[31]),N,C,p,4,u[32]),C=n(C,O,P,N,f,11,u[33]),N=n(N,C,O,P,v,16,u[34]),P=n(P,N,C,O,k,23,u[35]),O=n(O,P,N,C,a,4,u[36]),C=n(C,O,P,N,d,11,u[37]),N=n(N,C,O,P,y,16,u[38]),P=n(P,N,C,O,b,23,u[39]),O=n(O,P,N,C,S,4,u[40]),C=n(C,O,P,N,c,11,u[41]),N=n(N,C,O,P,h,16,u[42]),P=n(P,N,C,O,g,23,u[43]),O=n(O,P,N,C,m,4,u[44]),C=n(C,O,P,N,w,11,u[45]),N=n(N,C,O,P,E,16,u[46]),O=r(O,P=n(P,N,C,O,l,23,u[47]),N,C,c,6,u[48]),C=r(C,O,P,N,y,10,u[49]),N=r(N,C,O,P,k,15,u[50]),P=r(P,N,C,O,p,21,u[51]),O=r(O,P,N,C,w,6,u[52]),C=r(C,O,P,N,h,10,u[53]),N=r(N,C,O,P,b,15,u[54]),P=r(P,N,C,O,a,21,u[55]),O=r(O,P,N,C,f,6,u[56]),C=r(C,O,P,N,E,10,u[57]),N=r(N,C,O,P,g,15,u[58]),P=r(P,N,C,O,S,21,u[59]),O=r(O,P,N,C,d,6,u[60]),C=r(C,O,P,N,v,10,u[61]),N=r(N,C,O,P,l,15,u[62]),P=r(P,N,C,O,m,21,u[63]);o[0]=o[0]+O|0,o[1]=o[1]+P|0,o[2]=o[2]+N|0,o[3]=o[3]+C|0},_doFinalize:function(){var t=this._data,s=t.words,n=8*this._nDataBytes,r=8*t.sigBytes;s[r>>>5]|=128<<24-r%32;var i=e.floor(n/4294967296);for(s[15+(r+64>>>9<<4)]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8),s[14+(r+64>>>9<<4)]=16711935&(n<<8|n>>>24)|4278255360&(n<<24|n>>>8),t.sigBytes=4*(s.length+1),this._process(),s=(t=this._hash).words,n=0;4>n;n++)r=s[n],s[n]=16711935&(r<<8|r>>>24)|4278255360&(r<<24|r>>>8);return t},clone:function(){var e=a.clone.call(this);return e._hash=this._hash.clone(),e}}),i.MD5=a._createHelper(c),i.HmacMD5=a._createHmacHelper(c)}(Math),function(){var e,t=v,s=(e=t.lib).Base,n=e.WordArray,r=(e=t.algo).EvpKDF=s.extend({cfg:s.extend({keySize:4,hasher:e.MD5,iterations:1}),init:function(e){this.cfg=this.cfg.extend(e)},compute:function(e,t){for(var s=(a=this.cfg).hasher.create(),r=n.create(),i=r.words,o=a.keySize,a=a.iterations;i.length>>2]}},t.BlockCipher=a.extend({cfg:a.cfg.extend({mode:c,padding:l}),reset:function(){a.reset.call(this);var e=(t=this.cfg).iv,t=t.mode;if(this._xformMode==this._ENC_XFORM_MODE)var s=t.createEncryptor;else s=t.createDecryptor,this._minBufferSize=1;this._mode=s.call(t,this,e&&e.words)},_doProcessBlock:function(e,t){this._mode.processBlock(e,t)},_doFinalize:function(){var e=this.cfg.padding;if(this._xformMode==this._ENC_XFORM_MODE){e.pad(this._data,this.blockSize);var t=this._process(!0)}else t=this._process(!0),e.unpad(t);return t},blockSize:4});var h=t.CipherParams=s.extend({init:function(e){this.mixIn(e)},toString:function(e){return(e||this.formatter).stringify(this)}}),d=(c=(p.format={}).OpenSSL={stringify:function(e){var t=e.ciphertext;return((e=e.salt)?n.create([1398893684,1701076831]).concat(e).concat(t):t).toString(i)},parse:function(e){var t=(e=i.parse(e)).words;if(1398893684==t[0]&&1701076831==t[1]){var s=n.create(t.slice(2,4));t.splice(0,4),e.sigBytes-=16}return h.create({ciphertext:e,salt:s})}},t.SerializableCipher=s.extend({cfg:s.extend({format:c}),encrypt:function(e,t,s,n){n=this.cfg.extend(n);var r=e.createEncryptor(s,n);return t=r.finalize(t),r=r.cfg,h.create({ciphertext:t,key:s,iv:r.iv,algorithm:e,mode:r.mode,padding:r.padding,blockSize:e.blockSize,formatter:n.format})},decrypt:function(e,t,s,n){return n=this.cfg.extend(n),t=this._parse(t,n.format),e.createDecryptor(s,n).finalize(t.ciphertext)},_parse:function(e,t){return"string"==typeof e?t.parse(e,this):e}})),p=(p.kdf={}).OpenSSL={execute:function(e,t,s,r){return r||(r=n.random(8)),e=o.create({keySize:t+s}).compute(e,r),s=n.create(e.words.slice(t),4*s),e.sigBytes=4*t,h.create({key:e,iv:s,salt:r})}},g=t.PasswordBasedCipher=d.extend({cfg:d.cfg.extend({kdf:p}),encrypt:function(e,t,s,n){return s=(n=this.cfg.extend(n)).kdf.execute(s,e.keySize,e.ivSize),n.iv=s.iv,(e=d.encrypt.call(this,e,t,s.key,n)).mixIn(s),e},decrypt:function(e,t,s,n){return n=this.cfg.extend(n),t=this._parse(t,n.format),s=n.kdf.execute(s,e.keySize,e.ivSize,t.salt),n.iv=s.iv,d.decrypt.call(this,e,t,s.key,n)}})}(),function(){for(var e=v,t=e.lib.BlockCipher,s=e.algo,n=[],r=[],i=[],o=[],a=[],c=[],u=[],l=[],h=[],d=[],p=[],g=0;256>g;g++)p[g]=128>g?g<<1:g<<1^283;var y=0,f=0;for(g=0;256>g;g++){var m=(m=f^f<<1^f<<2^f<<3^f<<4)>>>8^255&m^99;n[y]=m,r[m]=y;var b=p[y],w=p[b],S=p[w],k=257*p[m]^16843008*m;i[y]=k<<24|k>>>8,o[y]=k<<16|k>>>16,a[y]=k<<8|k>>>24,c[y]=k,k=16843009*S^65537*w^257*b^16843008*y,u[m]=k<<24|k>>>8,l[m]=k<<16|k>>>16,h[m]=k<<8|k>>>24,d[m]=k,y?(y=b^p[p[p[S^b]]],f^=p[p[f]]):y=f=1}var E=[0,1,2,4,8,16,32,64,128,27,54];s=s.AES=t.extend({_doReset:function(){for(var e=(s=this._key).words,t=s.sigBytes/4,s=4*((this._nRounds=t+6)+1),r=this._keySchedule=[],i=0;i>>24]<<24|n[o>>>16&255]<<16|n[o>>>8&255]<<8|n[255&o]):(o=n[(o=o<<8|o>>>24)>>>24]<<24|n[o>>>16&255]<<16|n[o>>>8&255]<<8|n[255&o],o^=E[i/t|0]<<24),r[i]=r[i-t]^o}for(e=this._invKeySchedule=[],t=0;tt||4>=i?o:u[n[o>>>24]]^l[n[o>>>16&255]]^h[n[o>>>8&255]]^d[n[255&o]]},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._keySchedule,i,o,a,c,n)},decryptBlock:function(e,t){var s=e[t+1];e[t+1]=e[t+3],e[t+3]=s,this._doCryptBlock(e,t,this._invKeySchedule,u,l,h,d,r),s=e[t+1],e[t+1]=e[t+3],e[t+3]=s},_doCryptBlock:function(e,t,s,n,r,i,o,a){for(var c=this._nRounds,u=e[t]^s[0],l=e[t+1]^s[1],h=e[t+2]^s[2],d=e[t+3]^s[3],p=4,g=1;g>>24]^r[l>>>16&255]^i[h>>>8&255]^o[255&d]^s[p++],f=n[l>>>24]^r[h>>>16&255]^i[d>>>8&255]^o[255&u]^s[p++],m=n[h>>>24]^r[d>>>16&255]^i[u>>>8&255]^o[255&l]^s[p++];d=n[d>>>24]^r[u>>>16&255]^i[l>>>8&255]^o[255&h]^s[p++],u=y,l=f,h=m}y=(a[u>>>24]<<24|a[l>>>16&255]<<16|a[h>>>8&255]<<8|a[255&d])^s[p++],f=(a[l>>>24]<<24|a[h>>>16&255]<<16|a[d>>>8&255]<<8|a[255&u])^s[p++],m=(a[h>>>24]<<24|a[d>>>16&255]<<16|a[u>>>8&255]<<8|a[255&l])^s[p++],d=(a[d>>>24]<<24|a[u>>>16&255]<<16|a[l>>>8&255]<<8|a[255&h])^s[p++],e[t]=y,e[t+1]=f,e[t+2]=m,e[t+3]=d},keySize:8});e.AES=t._createHelper(s)}(),v.mode.ECB=((b=v.lib.BlockCipherMode.extend()).Encryptor=b.extend({processBlock:function(e,t){this._cipher.encryptBlock(e,t)}}),b.Decryptor=b.extend({processBlock:function(e,t){this._cipher.decryptBlock(e,t)}}),b);var w=t(v);class S{constructor({cipherKey:e}){this.cipherKey=e,this.CryptoJS=w,this.encryptedKey=this.CryptoJS.SHA256(e)}encrypt(e){if(0===("string"==typeof e?e:S.decoder.decode(e)).length)throw new Error("encryption error. empty content");const t=this.getIv();return{metadata:t,data:c(this.CryptoJS.AES.encrypt(e,this.encryptedKey,{iv:this.bufferToWordArray(t),mode:this.CryptoJS.mode.CBC}).ciphertext.toString(this.CryptoJS.enc.Base64))}}encryptFileData(e){return i(this,void 0,void 0,(function*(){const t=yield this.getKey(),s=this.getIv();return{data:yield crypto.subtle.encrypt({name:this.algo,iv:s},t,e),metadata:s}}))}decrypt(e){if("string"==typeof e.data)throw new Error("Decryption error: data for decryption should be ArrayBuffed.");const t=this.bufferToWordArray(new Uint8ClampedArray(e.metadata)),s=this.bufferToWordArray(new Uint8ClampedArray(e.data));return S.encoder.encode(this.CryptoJS.AES.decrypt({ciphertext:s},this.encryptedKey,{iv:t,mode:this.CryptoJS.mode.CBC}).toString(this.CryptoJS.enc.Utf8)).buffer}decryptFileData(e){return i(this,void 0,void 0,(function*(){if("string"==typeof e.data)throw new Error("Decryption error: data for decryption should be ArrayBuffed.");const t=yield this.getKey();return crypto.subtle.decrypt({name:this.algo,iv:e.metadata},t,e.data)}))}get identifier(){return"ACRH"}get algo(){return"AES-CBC"}getIv(){return crypto.getRandomValues(new Uint8Array(S.BLOCK_SIZE))}getKey(){return i(this,void 0,void 0,(function*(){const e=S.encoder.encode(this.cipherKey),t=yield crypto.subtle.digest("SHA-256",e.buffer);return crypto.subtle.importKey("raw",t,this.algo,!0,["encrypt","decrypt"])}))}bufferToWordArray(e){const t=[];let s;for(s=0;se.toString(16).padStart(2,"0"))).join(""),n=C.encoder.encode(s.slice(0,32)).buffer;return crypto.subtle.importKey("raw",n,"AES-CBC",!0,["encrypt","decrypt"])}))}}C.IV_LENGTH=16,C.encoder=new TextEncoder,C.decoder=new TextDecoder;class N{constructor(e){this.config=e,this.cryptor=new E(Object.assign({},e)),this.fileCryptor=new C}encrypt(e){const t="string"==typeof e?e:N.decoder.decode(e);return{data:this.cryptor.encrypt(t),metadata:null}}encryptFile(e,t){return i(this,void 0,void 0,(function*(){var s;if(!this.config.cipherKey)throw new d("File encryption error: cipher key not set.");return this.fileCryptor.encryptFile(null===(s=this.config)||void 0===s?void 0:s.cipherKey,e,t)}))}decrypt(e){const t="string"==typeof e.data?e.data:u(e.data);return this.cryptor.decrypt(t)}decryptFile(e,t){return i(this,void 0,void 0,(function*(){if(!this.config.cipherKey)throw new d("File encryption error: cipher key not set.");return this.fileCryptor.decryptFile(this.config.cipherKey,e,t)}))}get identifier(){return""}}N.encoder=new TextEncoder,N.decoder=new TextDecoder;class P extends o{static legacyCryptoModule(e){var t;if(!e.cipherKey)throw new d("Crypto module error: cipher key not set.");return new P({default:new N(Object.assign(Object.assign({},e),{useRandomIVs:null===(t=e.useRandomIVs)||void 0===t||t})),cryptors:[new S({cipherKey:e.cipherKey})]})}static aesCbcCryptoModule(e){var t;if(!e.cipherKey)throw new d("Crypto module error: cipher key not set.");return new P({default:new S({cipherKey:e.cipherKey}),cryptors:[new N(Object.assign(Object.assign({},e),{useRandomIVs:null===(t=e.useRandomIVs)||void 0===t||t}))]})}static withDefaultCryptor(e){return new this({default:e})}encrypt(e){const t=e instanceof ArrayBuffer&&this.defaultCryptor.identifier===P.LEGACY_IDENTIFIER?this.defaultCryptor.encrypt(P.decoder.decode(e)):this.defaultCryptor.encrypt(e);if(!t.metadata)return t.data;if("string"==typeof t.data)throw new Error("Encryption error: encrypted data should be ArrayBuffed.");const s=this.getHeaderData(t);return this.concatArrayBuffer(s,t.data)}encryptFile(e,t){return i(this,void 0,void 0,(function*(){if(this.defaultCryptor.identifier===M.LEGACY_IDENTIFIER)return this.defaultCryptor.encryptFile(e,t);const s=yield this.getFileData(e),n=yield this.defaultCryptor.encryptFileData(s);if("string"==typeof n.data)throw new Error("Encryption error: encrypted data should be ArrayBuffed.");return t.create({name:e.name,mimeType:"application/octet-stream",data:this.concatArrayBuffer(this.getHeaderData(n),n.data)})}))}decrypt(e){const t="string"==typeof e?c(e):e,s=M.tryParse(t),n=this.getCryptor(s),r=s.length>0?t.slice(s.length-s.metadataLength,s.length):null;if(t.slice(s.length).byteLength<=0)throw new Error("Decryption error: empty content");return n.decrypt({data:t.slice(s.length),metadata:r})}decryptFile(e,t){return i(this,void 0,void 0,(function*(){const s=yield e.data.arrayBuffer(),n=M.tryParse(s),r=this.getCryptor(n);if((null==r?void 0:r.identifier)===M.LEGACY_IDENTIFIER)return r.decryptFile(e,t);const i=(yield this.getFileData(s)).slice(n.length-n.metadataLength,n.length);return t.create({name:e.name,data:yield this.defaultCryptor.decryptFileData({data:s.slice(n.length),metadata:i})})}))}getCryptorFromId(e){const t=this.getAllCryptors().find((t=>e===t.identifier));if(t)return t;throw Error("Unknown cryptor error")}getCryptor(e){if("string"==typeof e){const t=this.getAllCryptors().find((t=>t.identifier===e));if(t)return t;throw new Error("Unknown cryptor error")}if(e instanceof _)return this.getCryptorFromId(e.identifier)}getHeaderData(e){if(!e.metadata)return;const t=M.from(this.defaultCryptor.identifier,e.metadata),s=new Uint8Array(t.length);let n=0;return s.set(t.data,n),n+=t.length-e.metadata.byteLength,s.set(new Uint8Array(e.metadata),n),s.buffer}concatArrayBuffer(e,t){const s=new Uint8Array(e.byteLength+t.byteLength);return s.set(new Uint8Array(e),0),s.set(new Uint8Array(t),e.byteLength),s.buffer}getFileData(e){return i(this,void 0,void 0,(function*(){if(e instanceof ArrayBuffer)return e;if(e instanceof a)return e.toArrayBuffer();throw new Error("Cannot decrypt/encrypt file. In browsers file encrypt/decrypt supported for string, ArrayBuffer or Blob")}))}}P.LEGACY_IDENTIFIER="";class M{static from(e,t){if(e!==M.LEGACY_IDENTIFIER)return new _(e,t.byteLength)}static tryParse(e){const t=new Uint8Array(e);let s,n,r=null;if(t.byteLength>=4&&(s=t.slice(0,4),this.decoder.decode(s)!==M.SENTINEL))return P.LEGACY_IDENTIFIER;if(!(t.byteLength>=5))throw new Error("Decryption error: invalid header version");if(r=t[4],r>M.MAX_VERSION)throw new Error("Decryption error: Unknown cryptor error");let i=5+M.IDENTIFIER_LENGTH;if(!(t.byteLength>=i))throw new Error("Decryption error: invalid crypto identifier");n=t.slice(5,i);let o=null;if(!(t.byteLength>=i+1))throw new Error("Decryption error: invalid metadata length");return o=t[i],i+=1,255===o&&t.byteLength>=i+2&&(o=new Uint16Array(t.slice(i,i+2)).reduce(((e,t)=>(e<<8)+t),0)),new _(this.decoder.decode(n),o)}}M.SENTINEL="PNED",M.LEGACY_IDENTIFIER="",M.IDENTIFIER_LENGTH=4,M.VERSION=1,M.MAX_VERSION=1,M.decoder=new TextDecoder;class _{constructor(e,t){this._identifier=e,this._metadataLength=t}get identifier(){return this._identifier}set identifier(e){this._identifier=e}get metadataLength(){return this._metadataLength}set metadataLength(e){this._metadataLength=e}get version(){return M.VERSION}get length(){return M.SENTINEL.length+1+M.IDENTIFIER_LENGTH+(this.metadataLength<255?1:3)+this.metadataLength}get data(){let e=0;const t=new Uint8Array(this.length),s=new TextEncoder;t.set(s.encode(M.SENTINEL)),e+=M.SENTINEL.length,t[e]=this.version,e++,this.identifier&&t.set(s.encode(this.identifier),e);const n=this.metadataLength;return e+=M.IDENTIFIER_LENGTH,n<255?t[e]=n:t.set([255,n>>8,255&n],e),t}}_.IDENTIFIER_LENGTH=4,_.SENTINEL="PNED";class A extends Error{static create(e,t){return e instanceof Error?A.createFromError(e):A.createFromServiceResponse(e,t)}static createFromError(e){let t=h.PNUnknownCategory,s="Unknown error",n="Error";if(!e)return new A(s,t,0);if(e instanceof A)return e;if(e instanceof Error&&(s=e.message,n=e.name),"AbortError"===n||-1!==s.indexOf("Aborted"))t=h.PNCancelledCategory,s="Request cancelled";else if(-1!==s.indexOf("timeout"))t=h.PNTimeoutCategory,s="Request timeout";else if(-1!==s.indexOf("network"))t=h.PNNetworkIssuesCategory,s="Network issues";else if("TypeError"===n)t=h.PNBadRequestCategory;else if("FetchError"===n){const n=e.code;["ECONNREFUSED","ENETUNREACH","ENOTFOUND","ECONNRESET","EAI_AGAIN"].includes(n)&&(t=h.PNNetworkIssuesCategory),"ECONNREFUSED"===n?s="Connection refused":"ENETUNREACH"===n?s="Network not reachable":"ENOTFOUND"===n?s="Server not found":"ECONNRESET"===n?s="Connection reset by peer":"EAI_AGAIN"===n?s="Name resolution error":"ETIMEDOUT"===n?(t=h.PNTimeoutCategory,s="Request timeout"):s=`Unknown system error: ${e}`}else"Request timeout"===s&&(t=h.PNTimeoutCategory);return new A(s,t,0,e)}static createFromServiceResponse(e,t){let s,n=h.PNUnknownCategory,r="Unknown error",{status:i}=e;if(null!=t||(t=e.body),402===i?r="Not available for used key set. Contact support@pubnub.com":400===i?(n=h.PNBadRequestCategory,r="Bad request"):403===i&&(n=h.PNAccessDeniedCategory,r="Access denied"),t&&t.byteLength>0){const n=(new TextDecoder).decode(t);if(-1!==e.headers["content-type"].indexOf("text/javascript")||-1!==e.headers["content-type"].indexOf("application/json"))try{const e=JSON.parse(n);"object"!=typeof e||Array.isArray(e)||("error"in e&&(1===e.error||!0===e.error)&&"status"in e&&"number"==typeof e.status&&"message"in e&&"service"in e?(s=e,i=e.status):s=e,"error"in e&&e.error instanceof Error&&(s=e.error))}catch(e){s=n}else if(-1!==e.headers["content-type"].indexOf("xml")){const e=/(.*)<\/Message>/gi.exec(n);r=e?`Upload to bucket failed: ${e[1]}`:"Upload to bucket failed."}else s=n}return new A(r,n,i,s)}constructor(e,t,s,n){super(e),this.category=t,this.statusCode=s,this.errorData=n,this.name="PubNubAPIError"}toStatus(e){return{error:!0,category:this.category,operation:e,statusCode:this.statusCode,errorData:this.errorData}}toPubNubError(e,t){return new d(null!=t?t:this.message,this.toStatus(e))}}class j{constructor(e){this.configuration=e,this.subscriptionWorkerReady=!1,this.workerEventsQueue=[],this.callbacks=new Map,this.setupSubscriptionWorker()}makeSendable(e){if(!e.path.startsWith("/v2/subscribe")&&!e.path.endsWith("/leave"))return this.configuration.transport.makeSendable(e);let t;const s={type:"send-request",clientIdentifier:this.configuration.clientIdentifier,subscriptionKey:this.configuration.subscriptionKey,logVerbosity:this.configuration.logVerbosity,request:e};return e.cancellable&&(t={abort:()=>{const t={type:"cancel-request",clientIdentifier:this.configuration.clientIdentifier,subscriptionKey:this.configuration.subscriptionKey,logVerbosity:this.configuration.logVerbosity,identifier:e.identifier};this.scheduleEventPost(t)}}),[new Promise(((t,n)=>{this.callbacks.set(e.identifier,{resolve:t,reject:n}),this.scheduleEventPost(s)})),t]}request(e){return e}scheduleEventPost(e,t=!1){const s=this.sharedSubscriptionWorker;s?s.port.postMessage(e):t?this.workerEventsQueue.splice(0,0,e):this.workerEventsQueue.push(e)}flushScheduledEvents(){const e=this.sharedSubscriptionWorker;if(!e||0===this.workerEventsQueue.length)return;const t=[];for(let e=0;e!t.includes(e))),this.workerEventsQueue.forEach((t=>e.port.postMessage(t))),this.workerEventsQueue=[]}get sharedSubscriptionWorker(){return this.subscriptionWorkerReady?this.subscriptionWorker:null}setupSubscriptionWorker(){"undefined"!=typeof SharedWorker&&(this.subscriptionWorker=new SharedWorker(this.configuration.workerUrl,`/pubnub-${this.configuration.sdkVersion}`),this.subscriptionWorker.port.start(),this.scheduleEventPost({type:"client-register",clientIdentifier:this.configuration.clientIdentifier,subscriptionKey:this.configuration.subscriptionKey,userId:this.configuration.userId,logVerbosity:this.configuration.logVerbosity,workerLogVerbosity:this.configuration.workerLogVerbosity},!0),this.subscriptionWorker.port.onmessage=e=>this.handleWorkerEvent(e))}handleWorkerEvent(e){const{data:t}=e;if("shared-worker-ping"===t.type||"shared-worker-connected"===t.type||"shared-worker-console-log"===t.type||"shared-worker-console-dir"===t.type||t.clientIdentifier===this.configuration.clientIdentifier)if("shared-worker-connected"===t.type)this.subscriptionWorkerReady=!0,this.flushScheduledEvents();else if("shared-worker-console-log"===t.type)console.log(`[SharedWorker] ${t.message}`);else if("shared-worker-console-dir"===t.type)t.message&&console.log(`[SharedWorker] ${t.message}`),console.dir(t.data);else if("shared-worker-ping"===t.type){const{logVerbosity:e,subscriptionKey:t,clientIdentifier:s}=this.configuration;this.scheduleEventPost({type:"client-pong",subscriptionKey:t,clientIdentifier:s,logVerbosity:e})}else if("request-progress-start"===t.type||"request-progress-end"===t.type)this.logRequestProgress(t);else if("request-process-success"===t.type||"request-process-error"===t.type){const{resolve:e,reject:s}=this.callbacks.get(t.identifier);if("request-process-success"===t.type)e({status:t.response.status,url:t.url,headers:t.response.headers,body:t.response.body});else{let e=h.PNUnknownCategory,n="Unknown error";if(t.error)"NETWORK_ISSUE"===t.error.type?e=h.PNNetworkIssuesCategory:"TIMEOUT"===t.error.type?e=h.PNTimeoutCategory:"ABORTED"===t.error.type&&(e=h.PNCancelledCategory),n=`${t.error.message} (${t.identifier})`;else if(t.response)return s(A.create({url:t.url,headers:t.response.headers,body:t.response.body,status:t.response.status},t.response.body));s(new A(n,e,0,new Error(n)))}}}logRequestProgress(e){var t,s;"request-progress-start"===e.type?(console.log("<<<<<"),console.log(`[${e.timestamp}] ${e.url}\n${JSON.stringify(null!==(t=e.query)&&void 0!==t?t:{})}`),console.log("-----")):(console.log(">>>>>>"),console.log(`[${e.timestamp} / ${e.duration}] ${e.url}\n${JSON.stringify(null!==(s=e.query)&&void 0!==s?s:{})}\n${e.response}`),console.log("-----"))}}const I=e=>encodeURIComponent(e).replace(/[!~*'()]/g,(e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`)),R=(e,t)=>{const s=e.map((e=>I(e)));return s.length?s.join(","):null!=t?t:""},U=(e,t)=>{const s=Object.fromEntries(t.map((e=>[e,!1])));return e.filter((e=>!(t.includes(e)&&!s[e])||(s[e]=!0,!1)))},T=(e,t)=>[...e].filter((s=>t.includes(s)&&e.indexOf(s)===e.lastIndexOf(s)&&t.indexOf(s)===t.lastIndexOf(s)));class F{constructor(e=!1,t){this.keepAlive=e,this.logVerbosity=t}makeSendable(e){let t,s;return e.cancellable&&(s=new AbortController,t={abortController:s,abort:()=>null==s?void 0:s.abort()}),[this.requestFromTransportRequest(e).then((t=>{const n=(new Date).getTime();this.logRequestProcessProgress(t);const r=new Promise(((t,s)=>{const n=setTimeout((()=>{clearTimeout(n),s(new Error("Request timeout"))}),1e3*e.timeout)}));return Promise.race([fetch(t,{signal:null==s?void 0:s.signal}),r]).then((e=>e.arrayBuffer().then((t=>[e,t])))).then((e=>{const s=e[1].byteLength>0?e[1]:void 0,{status:r,headers:i}=e[0],o={};i.forEach(((e,t)=>o[t]=e.toLowerCase()));const a={status:r,url:t.url,headers:o,body:s};if(r>=400)throw A.create(a);return this.logRequestProcessProgress(t,(new Date).getTime()-n,s),a})).catch((e=>{throw A.create(e)}))})),t]}request(e){return e}requestFromTransportRequest(e){return i(this,void 0,void 0,(function*(){let t,s=e.path;if(e.formData&&e.formData.length>0){e.queryParameters={};const s=e.body,n=new FormData;for(const{key:t,value:s}of e.formData)n.append(t,s);try{const e=yield s.toArrayBuffer();n.append("file",new Blob([e],{type:"application/octet-stream"}),s.name)}catch(e){try{const e=yield s.toFileUri();n.append("file",e,s.name)}catch(e){}}t=n}else e.body&&("string"==typeof e.body||e.body instanceof ArrayBuffer)&&(t=e.body);var n;return e.queryParameters&&0!==Object.keys(e.queryParameters).length&&(s=`${s}?${n=e.queryParameters,Object.keys(n).map((e=>{const t=n[e];return Array.isArray(t)?t.map((t=>`${e}=${I(t)}`)).join("&"):`${e}=${I(t)}`})).join("&")}`),new Request(`${e.origin}${s}`,{method:e.method,headers:e.headers,redirect:"follow",body:t})}))}logRequestProcessProgress(e,t,s){if(!this.logVerbosity)return;const{protocol:n,host:r,pathname:i,search:o}=new URL(e.url),a=(new Date).toISOString();if(t){const e=s?F.decoder.decode(s):void 0;console.log(">>>>>>"),console.log(`[${a} / ${t}]`,`\n${n}//${r}${i}`,`\n${o}`,`\n${e}`),console.log("-----")}else console.log("<<<<<"),console.log(`[${a}]`,`\n${n}//${r}${i}`,`\n${o}`),console.log("-----")}}function x(e){const t=e=>"object"==typeof e&&null!==e&&e.constructor===Object,s=e=>"number"==typeof e&&isFinite(e);if(!t(e))return e;const n={};return Object.keys(e).forEach((r=>{const i=(e=>"string"==typeof e||e instanceof String)(r);let o=r;const a=e[r];if(i&&r.indexOf(",")>=0){o=r.split(",").map(Number).reduce(((e,t)=>e+String.fromCharCode(t)),"")}else(s(r)||i&&!isNaN(Number(r)))&&(o=String.fromCharCode(s(r)?r:parseInt(r,10)));n[o]=t(a)?x(a):a})),n}F.decoder=new TextDecoder;const D=e=>{var t,s,n;return e.subscriptionWorkerUrl&&"undefined"==typeof SharedWorker&&(e.subscriptionWorkerUrl=null),Object.assign(Object.assign({},(e=>{var t,s,n,r,i,o,a,c,u,l,h,p,g,y;const f=Object.assign({},e);if(null!==(t=f.logVerbosity)&&void 0!==t||(f.logVerbosity=!1),null!==(s=f.ssl)&&void 0!==s||(f.ssl=!0),null!==(n=f.transactionalRequestTimeout)&&void 0!==n||(f.transactionalRequestTimeout=15),null!==(r=f.subscribeRequestTimeout)&&void 0!==r||(f.subscribeRequestTimeout=310),null!==(i=f.restore)&&void 0!==i||(f.restore=!1),null!==(o=f.useInstanceId)&&void 0!==o||(f.useInstanceId=!1),null!==(a=f.suppressLeaveEvents)&&void 0!==a||(f.suppressLeaveEvents=!1),null!==(c=f.requestMessageCountThreshold)&&void 0!==c||(f.requestMessageCountThreshold=100),null!==(u=f.autoNetworkDetection)&&void 0!==u||(f.autoNetworkDetection=!1),null!==(l=f.enableEventEngine)&&void 0!==l||(f.enableEventEngine=!1),null!==(h=f.maintainPresenceState)&&void 0!==h||(f.maintainPresenceState=!0),null!==(p=f.keepAlive)&&void 0!==p||(f.keepAlive=!1),f.userId&&f.uuid)throw new d("PubNub client configuration error: use only 'userId'");if(null!==(g=f.userId)&&void 0!==g||(f.userId=f.uuid),!f.userId)throw new d("PubNub client configuration error: 'userId' not set");if(0===(null===(y=f.userId)||void 0===y?void 0:y.trim().length))throw new d("PubNub client configuration error: 'userId' is empty");f.origin||(f.origin=Array.from({length:20},((e,t)=>`ps${t+1}.pndsn.com`)));const m={subscribeKey:f.subscribeKey,publishKey:f.publishKey,secretKey:f.secretKey};void 0!==f.presenceTimeout&&f.presenceTimeout<20&&(f.presenceTimeout=20,console.log("WARNING: Presence timeout is less than the minimum. Using minimum value: ",20)),void 0!==f.presenceTimeout?f.heartbeatInterval=f.presenceTimeout/2-1:f.presenceTimeout=300;let b=!1,v=!0,w=5,S=!1,k=!0;return void 0!==f.dedupeOnSubscribe&&"boolean"==typeof f.dedupeOnSubscribe&&(S=f.dedupeOnSubscribe),void 0!==f.useRequestId&&"boolean"==typeof f.useRequestId&&(k=f.useRequestId),void 0!==f.announceSuccessfulHeartbeats&&"boolean"==typeof f.announceSuccessfulHeartbeats&&(b=f.announceSuccessfulHeartbeats),void 0!==f.announceFailedHeartbeats&&"boolean"==typeof f.announceFailedHeartbeats&&(v=f.announceFailedHeartbeats),void 0!==f.fileUploadPublishRetryLimit&&"number"==typeof f.fileUploadPublishRetryLimit&&(w=f.fileUploadPublishRetryLimit),Object.assign(Object.assign({},f),{keySet:m,dedupeOnSubscribe:S,maximumCacheSize:100,useRequestId:k,announceSuccessfulHeartbeats:b,announceFailedHeartbeats:v,fileUploadPublishRetryLimit:w})})(e)),{listenToBrowserNetworkEvents:null===(t=e.listenToBrowserNetworkEvents)||void 0===t||t,subscriptionWorkerUrl:e.subscriptionWorkerUrl,subscriptionWorkerLogVerbosity:null!==(s=e.subscriptionWorkerLogVerbosity)&&void 0!==s&&s,keepAlive:null===(n=e.keepAlive)||void 0===n||n})};var q={exports:{}}; -/*! lil-uuid - v0.1 - MIT License - https://github.com/lil-js/uuid */!function(e,t){!function(e){var t="0.1.0",s={3:/^[0-9A-F]{8}-[0-9A-F]{4}-3[0-9A-F]{3}-[0-9A-F]{4}-[0-9A-F]{12}$/i,4:/^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,5:/^[0-9A-F]{8}-[0-9A-F]{4}-5[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,all:/^[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}$/i};function n(){var e,t,s="";for(e=0;e<32;e++)t=16*Math.random()|0,8!==e&&12!==e&&16!==e&&20!==e||(s+="-"),s+=(12===e?4:16===e?3&t|8:t).toString(16);return s}function r(e,t){var n=s[t||"all"];return n&&n.test(e)||!1}n.isUUID=r,n.VERSION=t,e.uuid=n,e.isUUID=r}(t),null!==e&&(e.exports=t.uuid)}(q,q.exports);var G=t(q.exports),K={createUUID:()=>G.uuid?G.uuid():G()};const $=(e,t)=>{var s,n,r;null===(s=e.retryConfiguration)||void 0===s||s.validate(),null!==(n=e.useRandomIVs)&&void 0!==n||(e.useRandomIVs=true),e.origin=L(null!==(r=e.ssl)&&void 0!==r&&r,e.origin);const i=e.cryptoModule;i&&delete e.cryptoModule;const o=Object.assign(Object.assign({},e),{_pnsdkSuffix:{},_instanceId:`pn-${K.createUUID()}`,_cryptoModule:void 0,_cipherKey:void 0,_setupCryptoModule:t,get instanceId(){if(this.useInstanceId)return this._instanceId},getUserId(){return this.userId},setUserId(e){if(!e||"string"!=typeof e||0===e.trim().length)throw new Error("Missing or invalid userId parameter. Provide a valid string userId");this.userId=e},getAuthKey(){return this.authKey},setAuthKey(e){this.authKey=e},getFilterExpression(){return this.filterExpression},setFilterExpression(e){this.filterExpression=e},getCipherKey(){return this._cipherKey},setCipherKey(t){this._cipherKey=t,t||!this._cryptoModule?t&&this._setupCryptoModule&&(this._cryptoModule=this._setupCryptoModule({cipherKey:t,useRandomIVs:e.useRandomIVs,customEncrypt:this.getCustomEncrypt(),customDecrypt:this.getCustomDecrypt()})):this._cryptoModule=void 0},getCryptoModule(){return this._cryptoModule},getUseRandomIVs:()=>e.useRandomIVs,setPresenceTimeout(e){this.heartbeatInterval=e/2-1,this.presenceTimeout=e},getPresenceTimeout(){return this.presenceTimeout},getHeartbeatInterval(){return this.heartbeatInterval},setHeartbeatInterval(e){this.heartbeatInterval=e},getTransactionTimeout(){return this.transactionalRequestTimeout},getSubscribeTimeout(){return this.subscribeRequestTimeout},get PubNubFile(){return e.PubNubFile},get version(){return"8.2.9"},getVersion(){return this.version},_addPnsdkSuffix(e,t){this._pnsdkSuffix[e]=`${t}`},_getPnsdkSuffix(e){const t=Object.values(this._pnsdkSuffix).join(e);return t.length>0?e+t:""},getUUID(){return this.getUserId()},setUUID(e){this.setUserId(e)},getCustomEncrypt:()=>e.customEncrypt,getCustomDecrypt:()=>e.customDecrypt});return e.cipherKey?o.setCipherKey(e.cipherKey):i&&(o._cryptoModule=i),o},L=(e,t)=>{const s=e?"https://":"http://";return"string"==typeof t?`${s}${t}`:`${s}${t[Math.floor(Math.random()*t.length)]}`};class B{constructor(e){this.cbor=e}setToken(e){e&&e.length>0?this.token=e:this.token=void 0}getToken(){return this.token}parseToken(e){const t=this.cbor.decodeToken(e);if(void 0!==t){const e=t.res.uuid?Object.keys(t.res.uuid):[],s=Object.keys(t.res.chan),n=Object.keys(t.res.grp),r=t.pat.uuid?Object.keys(t.pat.uuid):[],i=Object.keys(t.pat.chan),o=Object.keys(t.pat.grp),a={version:t.v,timestamp:t.t,ttl:t.ttl,authorized_uuid:t.uuid,signature:t.sig},c=e.length>0,u=s.length>0,l=n.length>0;if(c||u||l){if(a.resources={},c){const s=a.resources.uuids={};e.forEach((e=>s[e]=this.extractPermissions(t.res.uuid[e])))}if(u){const e=a.resources.channels={};s.forEach((s=>e[s]=this.extractPermissions(t.res.chan[s])))}if(l){const e=a.resources.groups={};n.forEach((s=>e[s]=this.extractPermissions(t.res.grp[s])))}}const h=r.length>0,d=i.length>0,p=o.length>0;if(h||d||p){if(a.patterns={},h){const e=a.patterns.uuids={};r.forEach((s=>e[s]=this.extractPermissions(t.pat.uuid[s])))}if(d){const e=a.patterns.channels={};i.forEach((s=>e[s]=this.extractPermissions(t.pat.chan[s])))}if(p){const e=a.patterns.groups={};o.forEach((s=>e[s]=this.extractPermissions(t.pat.grp[s])))}}return t.meta&&Object.keys(t.meta).length>0&&(a.meta=t.meta),a}}extractPermissions(e){const t={read:!1,write:!1,manage:!1,delete:!1,get:!1,update:!1,join:!1};return 128&~e||(t.join=!0),64&~e||(t.update=!0),32&~e||(t.get=!0),8&~e||(t.delete=!0),4&~e||(t.manage=!0),2&~e||(t.write=!0),1&~e||(t.read=!0),t}}var H;!function(e){e.GET="GET",e.POST="POST",e.PATCH="PATCH",e.DELETE="DELETE",e.LOCAL="LOCAL"}(H||(H={}));class z{constructor(e,t,s){this.publishKey=e,this.secretKey=t,this.hasher=s}signature(e){const t=e.path.startsWith("/publish")?H.GET:e.method;let s=`${t}\n${this.publishKey}\n${e.path}\n${this.queryParameters(e.queryParameters)}\n`;if(t===H.POST||t===H.PATCH){const t=e.body;let n;t&&t instanceof ArrayBuffer?n=z.textDecoder.decode(t):t&&"object"!=typeof t&&(n=t),n&&(s+=n)}return`v2.${this.hasher(s,this.secretKey)}`.replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}queryParameters(e){return Object.keys(e).sort().map((t=>{const s=e[t];return Array.isArray(s)?s.sort().map((e=>`${t}=${I(e)}`)).join("&"):`${t}=${I(s)}`})).join("&")}}z.textDecoder=new TextDecoder("utf-8");class V{constructor(e){this.configuration=e;const{clientConfiguration:{keySet:t},shaHMAC:s}=e;t.secretKey&&s&&(this.signatureGenerator=new z(t.publishKey,t.secretKey,s))}makeSendable(e){return this.configuration.transport.makeSendable(this.request(e))}request(e){var t;const{clientConfiguration:s}=this.configuration;return(e=this.configuration.transport.request(e)).queryParameters||(e.queryParameters={}),s.useInstanceId&&(e.queryParameters.instanceid=s.instanceId),e.queryParameters.uuid||(e.queryParameters.uuid=s.userId),s.useRequestId&&(e.queryParameters.requestid=e.identifier),e.queryParameters.pnsdk=this.generatePNSDK(),null!==(t=e.origin)&&void 0!==t||(e.origin=s.origin),this.authenticateRequest(e),this.signRequest(e),e}authenticateRequest(e){var t;if(e.path.startsWith("/v2/auth/")||e.path.startsWith("/v3/pam/")||e.path.startsWith("/time"))return;const{clientConfiguration:s,tokenManager:n}=this.configuration,r=null!==(t=n&&n.getToken())&&void 0!==t?t:s.authKey;r&&(e.queryParameters.auth=r)}signRequest(e){this.signatureGenerator&&!e.path.startsWith("/time")&&(e.queryParameters.timestamp=String(Math.floor((new Date).getTime()/1e3)),e.queryParameters.signature=this.signatureGenerator.signature(e))}generatePNSDK(){const{clientConfiguration:e}=this.configuration;if(e.sdkName)return e.sdkName;let t=`PubNub-JS-${e.sdkFamily}`;e.partnerId&&(t+=`-${e.partnerId}`),t+=`/${e.getVersion()}`;const s=e._getPnsdkSuffix(" ");return s.length>0&&(t+=s),t}}class W{constructor(){this.listeners=[]}addListener(e){this.listeners.includes(e)||this.listeners.push(e)}removeListener(e){this.listeners=this.listeners.filter((t=>t!==e))}removeAllListeners(){this.listeners=[]}announceStatus(e){this.listeners.forEach((t=>{t.status&&t.status(e)}))}announcePresence(e){this.listeners.forEach((t=>{t.presence&&t.presence(e)}))}announceMessage(e){this.listeners.forEach((t=>{t.message&&t.message(e)}))}announceSignal(e){this.listeners.forEach((t=>{t.signal&&t.signal(e)}))}announceMessageAction(e){this.listeners.forEach((t=>{t.messageAction&&t.messageAction(e)}))}announceFile(e){this.listeners.forEach((t=>{t.file&&t.file(e)}))}announceObjects(e){this.listeners.forEach((t=>{t.objects&&t.objects(e)}))}announceNetworkUp(){this.listeners.forEach((e=>{e.status&&e.status({category:h.PNNetworkUpCategory})}))}announceNetworkDown(){this.listeners.forEach((e=>{e.status&&e.status({category:h.PNNetworkDownCategory})}))}announceUser(e){this.listeners.forEach((t=>{t.user&&t.user(e)}))}announceSpace(e){this.listeners.forEach((t=>{t.space&&t.space(e)}))}announceMembership(e){this.listeners.forEach((t=>{t.membership&&t.membership(e)}))}}class J{constructor(e){this.time=e}onReconnect(e){this.callback=e}startPolling(){this.timeTimer=setInterval((()=>this.callTime()),3e3)}stopPolling(){this.timeTimer&&clearInterval(this.timeTimer),this.timeTimer=null}callTime(){this.time((e=>{e.error||(this.stopPolling(),this.callback&&this.callback())}))}}class Q{_config;hashHistory;constructor({config:e}){this.hashHistory=[],this._config=e}getKey(e){const t=(e=>{let t=0;if(0===e.length)return t;for(let s=0;s=this._config.maximumCacheSize&&this.hashHistory.shift(),this.hashHistory.push(this.getKey(e))}clearHistory(){this.hashHistory=[]}}class Y{constructor(e,t,s,n,r,i,o){this.configuration=e,this.listenerManager=t,this.eventEmitter=s,this.subscribeCall=n,this.heartbeatCall=r,this.leaveCall=i,this.reconnectionManager=new J(o),this.dedupingManager=new Q({config:this.configuration}),this.heartbeatChannelGroups={},this.heartbeatChannels={},this.presenceChannelGroups={},this.presenceChannels={},this.heartbeatTimer=null,this.presenceState={},this.pendingChannelGroupSubscriptions=new Set,this.pendingChannelSubscriptions=new Set,this.channelGroups={},this.channels={},this.currentTimetoken="0",this.lastTimetoken="0",this.storedTimetoken=null,this.subscriptionStatusAnnounced=!1,this.isOnline=!0}get subscribedChannels(){return Object.keys(this.channels)}get subscribedChannelGroups(){return Object.keys(this.channelGroups)}get abort(){return this._subscribeAbort}set abort(e){this._subscribeAbort=e}disconnect(){this.stopSubscribeLoop(),this.stopHeartbeatTimer(),this.reconnectionManager.stopPolling()}reconnect(){this.startSubscribeLoop(),this.startHeartbeatTimer()}subscribe(e){const{channels:t,channelGroups:s,timetoken:n,withPresence:r=!1,withHeartbeats:i=!1}=e;n&&(this.lastTimetoken=this.currentTimetoken,this.currentTimetoken=n),"0"!==this.currentTimetoken&&0!==this.currentTimetoken&&(this.storedTimetoken=this.currentTimetoken,this.currentTimetoken=0),null==t||t.forEach((e=>{this.pendingChannelSubscriptions.add(e),this.channels[e]={},r&&(this.presenceChannels[e]={}),(i||this.configuration.getHeartbeatInterval())&&(this.heartbeatChannels[e]={})})),null==s||s.forEach((e=>{this.pendingChannelGroupSubscriptions.add(e),this.channelGroups[e]={},r&&(this.presenceChannelGroups[e]={}),(i||this.configuration.getHeartbeatInterval())&&(this.heartbeatChannelGroups[e]={})})),this.subscriptionStatusAnnounced=!1,this.reconnect()}unsubscribe(e,t){let{channels:s,channelGroups:n}=e;const i=new Set,o=new Set;null==s||s.forEach((e=>{e in this.channels&&(delete this.channels[e],o.add(e),e in this.heartbeatChannels&&delete this.heartbeatChannels[e]),e in this.presenceState&&delete this.presenceState[e],e in this.presenceChannels&&(delete this.presenceChannels[e],o.add(e))})),null==n||n.forEach((e=>{e in this.channelGroups&&(delete this.channelGroups[e],i.add(e),e in this.heartbeatChannelGroups&&delete this.heartbeatChannelGroups[e]),e in this.presenceState&&delete this.presenceState[e],e in this.presenceChannelGroups&&(delete this.presenceChannelGroups[e],i.add(e))})),0===o.size&&0===i.size||(!1!==this.configuration.suppressLeaveEvents||t||(n=Array.from(i),s=Array.from(o),this.leaveCall({channels:s,channelGroups:n},(e=>{const{error:t}=e,i=r(e,["error"]);let o;t&&(e.errorData&&"object"==typeof e.errorData&&"message"in e.errorData&&"string"==typeof e.errorData.message?o=e.errorData.message:"message"in e&&"string"==typeof e.message&&(o=e.message)),this.listenerManager.announceStatus(Object.assign(Object.assign({},i),{error:null!=o&&o,affectedChannels:s,affectedChannelGroups:n,currentTimetoken:this.currentTimetoken,lastTimetoken:this.lastTimetoken}))}))),0===Object.keys(this.channels).length&&0===Object.keys(this.presenceChannels).length&&0===Object.keys(this.channelGroups).length&&0===Object.keys(this.presenceChannelGroups).length&&(this.lastTimetoken=0,this.currentTimetoken=0,this.storedTimetoken=null,this.region=null,this.reconnectionManager.stopPolling()),this.reconnect())}unsubscribeAll(e){this.unsubscribe({channels:this.subscribedChannels,channelGroups:this.subscribedChannelGroups},e)}startSubscribeLoop(){this.stopSubscribeLoop();const e=[...Object.keys(this.channelGroups)],t=[...Object.keys(this.channels)];Object.keys(this.presenceChannelGroups).forEach((t=>e.push(`${t}-pnpres`))),Object.keys(this.presenceChannels).forEach((e=>t.push(`${e}-pnpres`))),0===t.length&&0===e.length||this.subscribeCall({channels:t,channelGroups:e,state:this.presenceState,heartbeat:this.configuration.getPresenceTimeout(),timetoken:this.currentTimetoken,region:null!==this.region?this.region:void 0,filterExpression:this.configuration.filterExpression},((e,t)=>{this.processSubscribeResponse(e,t)}))}stopSubscribeLoop(){this._subscribeAbort&&(this._subscribeAbort(),this._subscribeAbort=null)}processSubscribeResponse(e,t){if(e.error){if("object"==typeof e.errorData&&"name"in e.errorData&&"AbortError"===e.errorData.name||e.category===h.PNCancelledCategory)return;return void(e.category===h.PNTimeoutCategory?this.startSubscribeLoop():e.category===h.PNNetworkIssuesCategory?(this.disconnect(),e.error&&this.configuration.autoNetworkDetection&&this.isOnline&&(this.isOnline=!1,this.listenerManager.announceNetworkDown()),this.reconnectionManager.onReconnect((()=>{this.configuration.autoNetworkDetection&&!this.isOnline&&(this.isOnline=!0,this.listenerManager.announceNetworkUp()),this.reconnect(),this.subscriptionStatusAnnounced=!0;const t={category:h.PNReconnectedCategory,operation:e.operation,lastTimetoken:this.lastTimetoken,currentTimetoken:this.currentTimetoken};this.listenerManager.announceStatus(t)})),this.reconnectionManager.startPolling(),this.listenerManager.announceStatus(e)):e.category===h.PNBadRequestCategory?(this.stopHeartbeatTimer(),this.listenerManager.announceStatus(e)):this.listenerManager.announceStatus(e))}if(this.storedTimetoken?(this.currentTimetoken=this.storedTimetoken,this.storedTimetoken=null):(this.lastTimetoken=this.currentTimetoken,this.currentTimetoken=t.cursor.timetoken),!this.subscriptionStatusAnnounced){const t={category:h.PNConnectedCategory,operation:e.operation,affectedChannels:Array.from(this.pendingChannelSubscriptions),subscribedChannels:this.subscribedChannels,affectedChannelGroups:Array.from(this.pendingChannelGroupSubscriptions),lastTimetoken:this.lastTimetoken,currentTimetoken:this.currentTimetoken};this.subscriptionStatusAnnounced=!0,this.listenerManager.announceStatus(t),this.pendingChannelGroupSubscriptions.clear(),this.pendingChannelSubscriptions.clear()}const{messages:s}=t,{requestMessageCountThreshold:n,dedupeOnSubscribe:r}=this.configuration;n&&s.length>=n&&this.listenerManager.announceStatus({category:h.PNRequestMessageCountExceededCategory,operation:e.operation});try{s.forEach((e=>{if(r){if(this.dedupingManager.isDuplicate(e.data))return;this.dedupingManager.addEntry(e.data)}this.eventEmitter.emitEvent(e)}))}catch(e){const t={error:!0,category:h.PNUnknownCategory,errorData:e,statusCode:0};this.listenerManager.announceStatus(t)}this.region=t.cursor.region,this.startSubscribeLoop()}setState(e){const{state:t,channels:s,channelGroups:n}=e;null==s||s.forEach((e=>e in this.channels&&(this.presenceState[e]=t))),null==n||n.forEach((e=>e in this.channelGroups&&(this.presenceState[e]=t)))}changePresence(e){const{connected:t,channels:s,channelGroups:n}=e;t?(null==s||s.forEach((e=>this.heartbeatChannels[e]={})),null==n||n.forEach((e=>this.heartbeatChannelGroups[e]={}))):(null==s||s.forEach((e=>{e in this.heartbeatChannels&&delete this.heartbeatChannels[e]})),null==n||n.forEach((e=>{e in this.heartbeatChannelGroups&&delete this.heartbeatChannelGroups[e]})),!1===this.configuration.suppressLeaveEvents&&this.leaveCall({channels:s,channelGroups:n},(e=>this.listenerManager.announceStatus(e)))),this.reconnect()}startHeartbeatTimer(){this.stopHeartbeatTimer();const e=this.configuration.getHeartbeatInterval();e&&0!==e&&(this.sendHeartbeat(),this.heartbeatTimer=setInterval((()=>this.sendHeartbeat()),1e3*e))}stopHeartbeatTimer(){this.heartbeatTimer&&(clearInterval(this.heartbeatTimer),this.heartbeatTimer=null)}sendHeartbeat(){const e=Object.keys(this.heartbeatChannelGroups),t=Object.keys(this.heartbeatChannels);0===t.length&&0===e.length||this.heartbeatCall({channels:t,channelGroups:e,heartbeat:this.configuration.getPresenceTimeout(),state:this.presenceState},(e=>{e.error&&this.configuration.announceFailedHeartbeats&&this.listenerManager.announceStatus(e),e.error&&this.configuration.autoNetworkDetection&&this.isOnline&&(this.isOnline=!1,this.disconnect(),this.listenerManager.announceNetworkDown(),this.reconnect()),!e.error&&this.configuration.announceSuccessfulHeartbeats&&this.listenerManager.announceStatus(e)}))}}class X{constructor(e,t,s){this._payload=e,this.setDefaultPayloadStructure(),this.title=t,this.body=s}get payload(){return this._payload}set title(e){this._title=e}set subtitle(e){this._subtitle=e}set body(e){this._body=e}set badge(e){this._badge=e}set sound(e){this._sound=e}setDefaultPayloadStructure(){}toObject(){return{}}}class Z extends X{constructor(){super(...arguments),this._apnsPushType="apns",this._isSilent=!1}get payload(){return this._payload}set configurations(e){e&&e.length&&(this._configurations=e)}get notification(){return this.payload.aps}get title(){return this._title}set title(e){e&&e.length&&(this.payload.aps.alert.title=e,this._title=e)}get subtitle(){return this._subtitle}set subtitle(e){e&&e.length&&(this.payload.aps.alert.subtitle=e,this._subtitle=e)}get body(){return this._body}set body(e){e&&e.length&&(this.payload.aps.alert.body=e,this._body=e)}get badge(){return this._badge}set badge(e){null!=e&&(this.payload.aps.badge=e,this._badge=e)}get sound(){return this._sound}set sound(e){e&&e.length&&(this.payload.aps.sound=e,this._sound=e)}set silent(e){this._isSilent=e}setDefaultPayloadStructure(){this.payload.aps={alert:{}}}toObject(){const e=Object.assign({},this.payload),{aps:t}=e;let{alert:s}=t;if(this._isSilent&&(t["content-available"]=1),"apns2"===this._apnsPushType){if(!this._configurations||!this._configurations.length)throw new ReferenceError("APNS2 configuration is missing");const t=[];this._configurations.forEach((e=>{t.push(this.objectFromAPNS2Configuration(e))})),t.length&&(e.pn_push=t)}return s&&Object.keys(s).length||delete t.alert,this._isSilent&&(delete t.alert,delete t.badge,delete t.sound,s={}),this._isSilent||s&&Object.keys(s).length?e:null}objectFromAPNS2Configuration(e){if(!e.targets||!e.targets.length)throw new ReferenceError("At least one APNS2 target should be provided");const{collapseId:t,expirationDate:s}=e,n={auth_method:"token",targets:e.targets.map((e=>this.objectFromAPNSTarget(e))),version:"v2"};return t&&t.length&&(n.collapse_id=t),s&&(n.expiration=s.toISOString()),n}objectFromAPNSTarget(e){if(!e.topic||!e.topic.length)throw new TypeError("Target 'topic' undefined.");const{topic:t,environment:s="development",excludedDevices:n=[]}=e,r={topic:t,environment:s};return n.length&&(r.excluded_devices=n),r}}class ee extends X{get payload(){return this._payload}get notification(){return this.payload.notification}get data(){return this.payload.data}get title(){return this._title}set title(e){e&&e.length&&(this.payload.notification.title=e,this._title=e)}get body(){return this._body}set body(e){e&&e.length&&(this.payload.notification.body=e,this._body=e)}get sound(){return this._sound}set sound(e){e&&e.length&&(this.payload.notification.sound=e,this._sound=e)}get icon(){return this._icon}set icon(e){e&&e.length&&(this.payload.notification.icon=e,this._icon=e)}get tag(){return this._tag}set tag(e){e&&e.length&&(this.payload.notification.tag=e,this._tag=e)}set silent(e){this._isSilent=e}setDefaultPayloadStructure(){this.payload.notification={},this.payload.data={}}toObject(){let e=Object.assign({},this.payload.data),t=null;const s={};if(Object.keys(this.payload).length>2){const t=r(this.payload,["notification","data"]);e=Object.assign(Object.assign({},e),t)}return this._isSilent?e.notification=this.payload.notification:t=this.payload.notification,Object.keys(e).length&&(s.data=e),t&&Object.keys(t).length&&(s.notification=t),Object.keys(s).length?s:null}}class te{constructor(e,t){this._payload={apns:{},fcm:{}},this._title=e,this._body=t,this.apns=new Z(this._payload.apns,e,t),this.fcm=new ee(this._payload.fcm,e,t)}set debugging(e){this._debugging=e}get title(){return this._title}get subtitle(){return this._subtitle}set subtitle(e){this._subtitle=e,this.apns.subtitle=e,this.fcm.subtitle=e}get body(){return this._body}get badge(){return this._badge}set badge(e){this._badge=e,this.apns.badge=e,this.fcm.badge=e}get sound(){return this._sound}set sound(e){this._sound=e,this.apns.sound=e,this.fcm.sound=e}buildPayload(e){const t={};if(e.includes("apns")||e.includes("apns2")){this.apns._apnsPushType=e.includes("apns")?"apns":"apns2";const s=this.apns.toObject();s&&Object.keys(s).length&&(t.pn_apns=s)}if(e.includes("fcm")){const e=this.fcm.toObject();e&&Object.keys(e).length&&(t.pn_gcm=e)}return Object.keys(t).length&&this._debugging&&(t.pn_debug=!0),t}}class se{constructor(e){this.params=e,this.requestIdentifier=K.createUUID(),this._cancellationController=null}get cancellationController(){return this._cancellationController}set cancellationController(e){this._cancellationController=e}abort(){this&&this.cancellationController&&this.cancellationController.abort()}operation(){throw Error("Should be implemented by subclass.")}validate(){}parse(e){return i(this,void 0,void 0,(function*(){throw Error("Should be implemented by subclass.")}))}request(){var e,t,s,n;const r={method:null!==(t=null===(e=this.params)||void 0===e?void 0:e.method)&&void 0!==t?t:H.GET,path:this.path,queryParameters:this.queryParameters,cancellable:null!==(n=null===(s=this.params)||void 0===s?void 0:s.cancellable)&&void 0!==n&&n,timeout:1e4,identifier:this.requestIdentifier},i=this.headers;if(i&&(r.headers=i),r.method===H.POST||r.method===H.PATCH){const[e,t]=[this.body,this.formData];t&&(r.formData=t),e&&(r.body=e)}return r}get headers(){}get path(){throw Error("`path` getter should be implemented by subclass.")}get queryParameters(){return{}}get formData(){}get body(){}deserializeResponse(e){const t=e.headers["content-type"];if(!t||-1===t.indexOf("javascript")&&-1===t.indexOf("json"))return;const s=se.decoder.decode(e.body);try{return JSON.parse(s)}catch(e){return void console.error("Error parsing JSON response:",e)}}}var ne;se.decoder=new TextDecoder,function(e){e.PNPublishOperation="PNPublishOperation",e.PNSignalOperation="PNSignalOperation",e.PNSubscribeOperation="PNSubscribeOperation",e.PNUnsubscribeOperation="PNUnsubscribeOperation",e.PNWhereNowOperation="PNWhereNowOperation",e.PNHereNowOperation="PNHereNowOperation",e.PNGlobalHereNowOperation="PNGlobalHereNowOperation",e.PNSetStateOperation="PNSetStateOperation",e.PNGetStateOperation="PNGetStateOperation",e.PNHeartbeatOperation="PNHeartbeatOperation",e.PNAddMessageActionOperation="PNAddActionOperation",e.PNRemoveMessageActionOperation="PNRemoveMessageActionOperation",e.PNGetMessageActionsOperation="PNGetMessageActionsOperation",e.PNTimeOperation="PNTimeOperation",e.PNHistoryOperation="PNHistoryOperation",e.PNDeleteMessagesOperation="PNDeleteMessagesOperation",e.PNFetchMessagesOperation="PNFetchMessagesOperation",e.PNMessageCounts="PNMessageCountsOperation",e.PNGetAllUUIDMetadataOperation="PNGetAllUUIDMetadataOperation",e.PNGetUUIDMetadataOperation="PNGetUUIDMetadataOperation",e.PNSetUUIDMetadataOperation="PNSetUUIDMetadataOperation",e.PNRemoveUUIDMetadataOperation="PNRemoveUUIDMetadataOperation",e.PNGetAllChannelMetadataOperation="PNGetAllChannelMetadataOperation",e.PNGetChannelMetadataOperation="PNGetChannelMetadataOperation",e.PNSetChannelMetadataOperation="PNSetChannelMetadataOperation",e.PNRemoveChannelMetadataOperation="PNRemoveChannelMetadataOperation",e.PNGetMembersOperation="PNGetMembersOperation",e.PNSetMembersOperation="PNSetMembersOperation",e.PNGetMembershipsOperation="PNGetMembershipsOperation",e.PNSetMembershipsOperation="PNSetMembershipsOperation",e.PNListFilesOperation="PNListFilesOperation",e.PNGenerateUploadUrlOperation="PNGenerateUploadUrlOperation",e.PNPublishFileOperation="PNPublishFileOperation",e.PNPublishFileMessageOperation="PNPublishFileMessageOperation",e.PNGetFileUrlOperation="PNGetFileUrlOperation",e.PNDownloadFileOperation="PNDownloadFileOperation",e.PNDeleteFileOperation="PNDeleteFileOperation",e.PNAddPushNotificationEnabledChannelsOperation="PNAddPushNotificationEnabledChannelsOperation",e.PNRemovePushNotificationEnabledChannelsOperation="PNRemovePushNotificationEnabledChannelsOperation",e.PNPushNotificationEnabledChannelsOperation="PNPushNotificationEnabledChannelsOperation",e.PNRemoveAllPushNotificationsOperation="PNRemoveAllPushNotificationsOperation",e.PNChannelGroupsOperation="PNChannelGroupsOperation",e.PNRemoveGroupOperation="PNRemoveGroupOperation",e.PNChannelsForGroupOperation="PNChannelsForGroupOperation",e.PNAddChannelsToGroupOperation="PNAddChannelsToGroupOperation",e.PNRemoveChannelsFromGroupOperation="PNRemoveChannelsFromGroupOperation",e.PNAccessManagerGrant="PNAccessManagerGrant",e.PNAccessManagerGrantToken="PNAccessManagerGrantToken",e.PNAccessManagerAudit="PNAccessManagerAudit",e.PNAccessManagerRevokeToken="PNAccessManagerRevokeToken",e.PNHandshakeOperation="PNHandshakeOperation",e.PNReceiveMessagesOperation="PNReceiveMessagesOperation"}(ne||(ne={}));var re=ne;var ie;!function(e){e[e.Presence=-2]="Presence",e[e.Message=-1]="Message",e[e.Signal=1]="Signal",e[e.AppContext=2]="AppContext",e[e.MessageAction=3]="MessageAction",e[e.Files=4]="Files"}(ie||(ie={}));class oe extends se{constructor(e){var t,s,n,r,i,o;super({cancellable:!0}),this.parameters=e,null!==(t=(r=this.parameters).withPresence)&&void 0!==t||(r.withPresence=false),null!==(s=(i=this.parameters).channelGroups)&&void 0!==s||(i.channelGroups=[]),null!==(n=(o=this.parameters).channels)&&void 0!==n||(o.channels=[])}operation(){return re.PNSubscribeOperation}validate(){const{keySet:{subscribeKey:e},channels:t,channelGroups:s}=this.parameters;return e?t||s?void 0:"`channels` and `channelGroups` both should not be empty":"Missing Subscribe Key"}parse(e){return i(this,void 0,void 0,(function*(){let t;try{const s=se.decoder.decode(e.body);t=JSON.parse(s)}catch(e){console.error("Error parsing JSON response:",e)}if(!t)throw new d("Service response error, check status for details",p("Unable to deserialize service response"));const s=t.m.filter((e=>{const t=void 0===e.b?e.c:e.b;return this.parameters.channels&&this.parameters.channels.includes(t)||this.parameters.channelGroups&&this.parameters.channelGroups.includes(t)})).map((e=>{let{e:t}=e;return null!=t||(t=e.c.endsWith("-pnpres")?ie.Presence:ie.Message),t!=ie.Signal&&"string"==typeof e.d?t==ie.Message?{type:ie.Message,data:this.messageFromEnvelope(e)}:{type:ie.Files,data:this.fileFromEnvelope(e)}:t==ie.Message?{type:ie.Message,data:this.messageFromEnvelope(e)}:t===ie.Presence?{type:ie.Presence,data:this.presenceEventFromEnvelope(e)}:t==ie.Signal?{type:ie.Signal,data:this.signalFromEnvelope(e)}:t===ie.AppContext?{type:ie.AppContext,data:this.appContextFromEnvelope(e)}:t===ie.MessageAction?{type:ie.MessageAction,data:this.messageActionFromEnvelope(e)}:{type:ie.Files,data:this.fileFromEnvelope(e)}}));return{cursor:{timetoken:t.t.t,region:t.t.r},messages:s}}))}get headers(){return{accept:"text/javascript"}}presenceEventFromEnvelope(e){const{d:t}=e,[s,n]=this.subscriptionChannelFromEnvelope(e),r=s.replace("-pnpres",""),i=null!==n?r:null,o=null!==n?n:r;return"string"!=typeof t&&"data"in t&&(t.state=t.data,delete t.data),Object.assign({channel:r,subscription:n,actualChannel:i,subscribedChannel:o,timetoken:e.p.t},t)}messageFromEnvelope(e){const[t,s]=this.subscriptionChannelFromEnvelope(e),[n,r]=this.decryptedData(e.d),i={channel:t,subscription:s,actualChannel:null!==s?t:null,subscribedChannel:null!==s?s:t,timetoken:e.p.t,publisher:e.i,message:n};return e.u&&(i.userMetadata=e.u),r&&(i.error=r),i}signalFromEnvelope(e){const[t,s]=this.subscriptionChannelFromEnvelope(e),n={channel:t,subscription:s,timetoken:e.p.t,publisher:e.i,message:e.d};return e.u&&(n.userMetadata=e.u),n}messageActionFromEnvelope(e){const[t,s]=this.subscriptionChannelFromEnvelope(e),n=e.d;return{channel:t,subscription:s,timetoken:e.p.t,publisher:e.i,event:n.event,data:Object.assign(Object.assign({},n.data),{uuid:e.i})}}appContextFromEnvelope(e){const[t,s]=this.subscriptionChannelFromEnvelope(e),n=e.d;return{channel:t,subscription:s,timetoken:e.p.t,message:n}}fileFromEnvelope(e){const[t,s]=this.subscriptionChannelFromEnvelope(e),[n,r]=this.decryptedData(e.d);let i=r;const o={channel:t,subscription:s,timetoken:e.p.t,publisher:e.i};return e.u&&(o.userMetadata=e.u),n?"string"==typeof n?null!=i||(i="Unexpected file information payload data type."):(o.message=n.message,n.file&&(o.file={id:n.file.id,name:n.file.name,url:this.parameters.getFileUrl({id:n.file.id,name:n.file.name,channel:t})})):null!=i||(i="File information payload is missing."),i&&(o.error=i),o}subscriptionChannelFromEnvelope(e){return[e.c,void 0===e.b?e.c:e.b]}decryptedData(e){if(!this.parameters.crypto||"string"!=typeof e)return[e,void 0];let t,s;try{const s=this.parameters.crypto.decrypt(e);t=s instanceof ArrayBuffer?JSON.parse(ae.decoder.decode(s)):s}catch(e){t=null,s=`Error while decrypting message content: ${e.message}`}return[null!=t?t:e,s]}}class ae extends oe{get path(){var e;const{keySet:{subscribeKey:t},channels:s}=this.parameters;return`/v2/subscribe/${t}/${R(null!==(e=null==s?void 0:s.sort())&&void 0!==e?e:[],",")}/0`}get queryParameters(){const{channelGroups:e,filterExpression:t,heartbeat:s,state:n,timetoken:r,region:i}=this.parameters,o={};return e&&e.length>0&&(o["channel-group"]=e.sort().join(",")),t&&t.length>0&&(o["filter-expr"]=t),s&&(o.heartbeat=s),n&&Object.keys(n).length>0&&(o.state=JSON.stringify(n)),void 0!==r&&"string"==typeof r?r.length>0&&"0"!==r&&(o.tt=r):void 0!==r&&r>0&&(o.tt=r),i&&(o.tr=i),o}}class ce{constructor(e){this.listenerManager=e,this.channelListenerMap=new Map,this.groupListenerMap=new Map}emitEvent(e){if(e.type===ie.Message)this.listenerManager.announceMessage(e.data),this.announce("message",e.data,e.data.channel,e.data.subscription);else if(e.type===ie.Signal)this.listenerManager.announceSignal(e.data),this.announce("signal",e.data,e.data.channel,e.data.subscription);else if(e.type===ie.Presence)this.listenerManager.announcePresence(e.data),this.announce("presence",e.data,e.data.channel,e.data.subscription);else if(e.type===ie.AppContext){const{data:t}=e,{message:s}=t;if(this.listenerManager.announceObjects(t),this.announce("objects",t,t.channel,t.subscription),"uuid"===s.type){const{message:e,channel:n}=t,i=r(t,["message","channel"]),{event:o,type:a}=s,c=r(s,["event","type"]),u=Object.assign(Object.assign({},i),{spaceId:n,message:Object.assign(Object.assign({},c),{event:"set"===o?"updated":"removed",type:"user"})});this.listenerManager.announceUser(u),this.announce("user",u,u.spaceId,u.subscription)}else if("channel"===s.type){const{message:e,channel:n}=t,i=r(t,["message","channel"]),{event:o,type:a}=s,c=r(s,["event","type"]),u=Object.assign(Object.assign({},i),{spaceId:n,message:Object.assign(Object.assign({},c),{event:"set"===o?"updated":"removed",type:"space"})});this.listenerManager.announceSpace(u),this.announce("space",u,u.spaceId,u.subscription)}else if("membership"===s.type){const{message:e,channel:n}=t,i=r(t,["message","channel"]),{event:o,data:a}=s,c=r(s,["event","data"]),{uuid:u,channel:l}=a,h=r(a,["uuid","channel"]),d=Object.assign(Object.assign({},i),{spaceId:n,message:Object.assign(Object.assign({},c),{event:"set"===o?"updated":"removed",data:Object.assign(Object.assign({},h),{user:u,space:l})})});this.listenerManager.announceMembership(d),this.announce("membership",d,d.spaceId,d.subscription)}}else e.type===ie.MessageAction?(this.listenerManager.announceMessageAction(e.data),this.announce("messageAction",e.data,e.data.channel,e.data.subscription)):e.type===ie.Files&&(this.listenerManager.announceFile(e.data),this.announce("file",e.data,e.data.channel,e.data.subscription))}addListener(e,t,s){t&&s?(null==t||t.forEach((t=>{if(this.channelListenerMap.has(t)){const s=this.channelListenerMap.get(t);s.includes(e)||s.push(e)}else this.channelListenerMap.set(t,[e])})),null==s||s.forEach((t=>{if(this.groupListenerMap.has(t)){const s=this.groupListenerMap.get(t);s.includes(e)||s.push(e)}else this.groupListenerMap.set(t,[e])}))):this.listenerManager.addListener(e)}removeListener(e,t,s){t&&s?(null==t||t.forEach((t=>{this.channelListenerMap.has(t)&&this.channelListenerMap.set(t,this.channelListenerMap.get(t).filter((t=>t!==e)))})),null==s||s.forEach((t=>{this.groupListenerMap.has(t)&&this.groupListenerMap.set(t,this.groupListenerMap.get(t).filter((t=>t!==e)))}))):this.listenerManager.removeListener(e)}removeAllListeners(){this.listenerManager.removeAllListeners(),this.channelListenerMap.clear(),this.groupListenerMap.clear()}announce(e,t,s,n){t&&this.channelListenerMap.has(s)&&this.channelListenerMap.get(s).forEach((s=>{const n=s[e];n&&n(t)})),n&&this.groupListenerMap.has(n)&&this.groupListenerMap.get(n).forEach((s=>{const n=s[e];n&&n(t)}))}}class ue{constructor(e=!1){this.sync=e,this.listeners=new Set}subscribe(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}notify(e){const t=()=>{this.listeners.forEach((t=>{t(e)}))};this.sync?t():setTimeout(t,0)}}class le{transition(e,t){var s;if(this.transitionMap.has(t.type))return null===(s=this.transitionMap.get(t.type))||void 0===s?void 0:s(e,t)}constructor(e){this.label=e,this.transitionMap=new Map,this.enterEffects=[],this.exitEffects=[]}on(e,t){return this.transitionMap.set(e,t),this}with(e,t){return[this,e,null!=t?t:[]]}onEnter(e){return this.enterEffects.push(e),this}onExit(e){return this.exitEffects.push(e),this}}class he extends ue{describe(e){return new le(e)}start(e,t){this.currentState=e,this.currentContext=t,this.notify({type:"engineStarted",state:e,context:t})}transition(e){if(!this.currentState)throw new Error("Start the engine first");this.notify({type:"eventReceived",event:e});const t=this.currentState.transition(this.currentContext,e);if(t){const[s,n,r]=t;for(const e of this.currentState.exitEffects)this.notify({type:"invocationDispatched",invocation:e(this.currentContext)});const i=this.currentState;this.currentState=s;const o=this.currentContext;this.currentContext=n,this.notify({type:"transitionDone",fromState:i,fromContext:o,toState:s,toContext:n,event:e});for(const e of r)this.notify({type:"invocationDispatched",invocation:e});for(const e of this.currentState.enterEffects)this.notify({type:"invocationDispatched",invocation:e(this.currentContext)})}}}class de{constructor(e){this.dependencies=e,this.instances=new Map,this.handlers=new Map}on(e,t){this.handlers.set(e,t)}dispatch(e){if("CANCEL"===e.type){if(this.instances.has(e.payload)){const t=this.instances.get(e.payload);null==t||t.cancel(),this.instances.delete(e.payload)}return}const t=this.handlers.get(e.type);if(!t)throw new Error(`Unhandled invocation '${e.type}'`);const s=t(e.payload,this.dependencies);e.managed&&this.instances.set(e.type,s),s.start()}dispose(){for(const[e,t]of this.instances.entries())t.cancel(),this.instances.delete(e)}}function pe(e,t){const s=function(...s){return{type:e,payload:null==t?void 0:t(...s)}};return s.type=e,s}function ge(e,t){const s=(...s)=>({type:e,payload:t(...s),managed:!1});return s.type=e,s}function ye(e,t){const s=(...s)=>({type:e,payload:t(...s),managed:!0});return s.type=e,s.cancel={type:"CANCEL",payload:e,managed:!1},s}class fe extends Error{constructor(){super("The operation was aborted."),this.name="AbortError",Object.setPrototypeOf(this,new.target.prototype)}}class me extends ue{constructor(){super(...arguments),this._aborted=!1}get aborted(){return this._aborted}throwIfAborted(){if(this._aborted)throw new fe}abort(){this._aborted=!0,this.notify(new fe)}}class be{constructor(e,t){this.payload=e,this.dependencies=t}}class ve extends be{constructor(e,t,s){super(e,t),this.asyncFunction=s,this.abortSignal=new me}start(){this.asyncFunction(this.payload,this.abortSignal,this.dependencies).catch((e=>{}))}cancel(){this.abortSignal.abort()}}const we=e=>(t,s)=>new ve(t,s,e),Se=pe("RECONNECT",(()=>({}))),ke=pe("DISCONNECT",(()=>({}))),Ee=pe("JOINED",((e,t)=>({channels:e,groups:t}))),Oe=pe("LEFT",((e,t)=>({channels:e,groups:t}))),Ce=pe("LEFT_ALL",(()=>({}))),Ne=pe("HEARTBEAT_SUCCESS",(e=>({statusCode:e}))),Pe=pe("HEARTBEAT_FAILURE",(e=>e)),Me=pe("HEARTBEAT_GIVEUP",(()=>({}))),_e=pe("TIMES_UP",(()=>({}))),Ae=ge("HEARTBEAT",((e,t)=>({channels:e,groups:t}))),je=ge("LEAVE",((e,t)=>({channels:e,groups:t}))),Ie=ge("EMIT_STATUS",(e=>e)),Re=ye("WAIT",(()=>({}))),Ue=ye("DELAYED_HEARTBEAT",(e=>e));class Te extends de{constructor(e,t){super(t),this.on(Ae.type,we(((t,s,n)=>i(this,[t,s,n],void 0,(function*(t,s,{heartbeat:n,presenceState:r,config:i}){try{yield n(Object.assign(Object.assign({channels:t.channels,channelGroups:t.groups},i.maintainPresenceState&&{state:r}),{heartbeat:i.presenceTimeout}));e.transition(Ne(200))}catch(t){if(t instanceof d){if(t.status&&t.status.category==h.PNCancelledCategory)return;return e.transition(Pe(t))}}}))))),this.on(je.type,we(((e,t,s)=>i(this,[e,t,s],void 0,(function*(e,t,{leave:s,config:n}){if(!n.suppressLeaveEvents)try{s({channels:e.channels,channelGroups:e.groups})}catch(e){}}))))),this.on(Re.type,we(((t,s,n)=>i(this,[t,s,n],void 0,(function*(t,s,{heartbeatDelay:n}){return s.throwIfAborted(),yield n(),s.throwIfAborted(),e.transition(_e())}))))),this.on(Ue.type,we(((t,s,n)=>i(this,[t,s,n],void 0,(function*(t,s,{heartbeat:n,retryDelay:r,presenceState:i,config:o}){if(!o.retryConfiguration||!o.retryConfiguration.shouldRetry(t.reason,t.attempts))return e.transition(Me());s.throwIfAborted(),yield r(o.retryConfiguration.getDelay(t.attempts,t.reason)),s.throwIfAborted();try{yield n(Object.assign(Object.assign({channels:t.channels,channelGroups:t.groups},o.maintainPresenceState&&{state:i}),{heartbeat:o.presenceTimeout}));return e.transition(Ne(200))}catch(t){if(t instanceof d){if(t.status&&t.status.category==h.PNCancelledCategory)return;return e.transition(Pe(t))}}}))))),this.on(Ie.type,we(((e,t,s)=>i(this,[e,t,s],void 0,(function*(e,t,{emitStatus:s,config:n}){var r;n.announceFailedHeartbeats&&!0===(null===(r=null==e?void 0:e.status)||void 0===r?void 0:r.error)?s(e.status):n.announceSuccessfulHeartbeats&&200===e.statusCode&&s(Object.assign(Object.assign({},e),{operation:re.PNHeartbeatOperation,error:!1}))})))))}}const Fe=new le("HEARTBEAT_STOPPED");Fe.on(Ee.type,((e,t)=>Fe.with({channels:[...e.channels,...t.payload.channels],groups:[...e.groups,...t.payload.groups]}))),Fe.on(Oe.type,((e,t)=>Fe.with({channels:e.channels.filter((e=>!t.payload.channels.includes(e))),groups:e.groups.filter((e=>!t.payload.groups.includes(e)))}))),Fe.on(Se.type,((e,t)=>Ge.with({channels:e.channels,groups:e.groups}))),Fe.on(Ce.type,((e,t)=>Ke.with(void 0)));const xe=new le("HEARTBEAT_COOLDOWN");xe.onEnter((()=>Re())),xe.onExit((()=>Re.cancel)),xe.on(_e.type,((e,t)=>Ge.with({channels:e.channels,groups:e.groups}))),xe.on(Ee.type,((e,t)=>Ge.with({channels:[...e.channels,...t.payload.channels],groups:[...e.groups,...t.payload.groups]}))),xe.on(Oe.type,((e,t)=>Ge.with({channels:e.channels.filter((e=>!t.payload.channels.includes(e))),groups:e.groups.filter((e=>!t.payload.groups.includes(e)))},[je(t.payload.channels,t.payload.groups)]))),xe.on(ke.type,(e=>Fe.with({channels:e.channels,groups:e.groups},[je(e.channels,e.groups)]))),xe.on(Ce.type,((e,t)=>Ke.with(void 0,[je(e.channels,e.groups)])));const De=new le("HEARTBEAT_FAILED");De.on(Ee.type,((e,t)=>Ge.with({channels:[...e.channels,...t.payload.channels],groups:[...e.groups,...t.payload.groups]}))),De.on(Oe.type,((e,t)=>Ge.with({channels:e.channels.filter((e=>!t.payload.channels.includes(e))),groups:e.groups.filter((e=>!t.payload.groups.includes(e)))},[je(t.payload.channels,t.payload.groups)]))),De.on(Se.type,((e,t)=>Ge.with({channels:e.channels,groups:e.groups}))),De.on(ke.type,((e,t)=>Fe.with({channels:e.channels,groups:e.groups},[je(e.channels,e.groups)]))),De.on(Ce.type,((e,t)=>Ke.with(void 0,[je(e.channels,e.groups)])));const qe=new le("HEARBEAT_RECONNECTING");qe.onEnter((e=>Ue(e))),qe.onExit((()=>Ue.cancel)),qe.on(Ee.type,((e,t)=>Ge.with({channels:[...e.channels,...t.payload.channels],groups:[...e.groups,...t.payload.groups]}))),qe.on(Oe.type,((e,t)=>Ge.with({channels:e.channels.filter((e=>!t.payload.channels.includes(e))),groups:e.groups.filter((e=>!t.payload.groups.includes(e)))},[je(t.payload.channels,t.payload.groups)]))),qe.on(ke.type,((e,t)=>{Fe.with({channels:e.channels,groups:e.groups},[je(e.channels,e.groups)])})),qe.on(Ne.type,((e,t)=>xe.with({channels:e.channels,groups:e.groups}))),qe.on(Pe.type,((e,t)=>qe.with(Object.assign(Object.assign({},e),{attempts:e.attempts+1,reason:t.payload})))),qe.on(Me.type,((e,t)=>De.with({channels:e.channels,groups:e.groups}))),qe.on(Ce.type,((e,t)=>Ke.with(void 0,[je(e.channels,e.groups)])));const Ge=new le("HEARTBEATING");Ge.onEnter((e=>Ae(e.channels,e.groups))),Ge.on(Ne.type,((e,t)=>xe.with({channels:e.channels,groups:e.groups}))),Ge.on(Ee.type,((e,t)=>Ge.with({channels:[...e.channels,...t.payload.channels],groups:[...e.groups,...t.payload.groups]}))),Ge.on(Oe.type,((e,t)=>Ge.with({channels:e.channels.filter((e=>!t.payload.channels.includes(e))),groups:e.groups.filter((e=>!t.payload.groups.includes(e)))},[je(t.payload.channels,t.payload.groups)]))),Ge.on(Pe.type,((e,t)=>qe.with(Object.assign(Object.assign({},e),{attempts:0,reason:t.payload})))),Ge.on(ke.type,(e=>Fe.with({channels:e.channels,groups:e.groups},[je(e.channels,e.groups)]))),Ge.on(Ce.type,((e,t)=>Ke.with(void 0,[je(e.channels,e.groups)])));const Ke=new le("HEARTBEAT_INACTIVE");Ke.on(Ee.type,((e,t)=>Ge.with({channels:t.payload.channels,groups:t.payload.groups})));class $e{get _engine(){return this.engine}constructor(e){this.dependencies=e,this.engine=new he,this.channels=[],this.groups=[],this.dispatcher=new Te(this.engine,e),this._unsubscribeEngine=this.engine.subscribe((e=>{"invocationDispatched"===e.type&&this.dispatcher.dispatch(e.invocation)})),this.engine.start(Ke,void 0)}join({channels:e,groups:t}){this.channels=[...this.channels,...null!=e?e:[]],this.groups=[...this.groups,...null!=t?t:[]],this.engine.transition(Ee(this.channels.slice(0),this.groups.slice(0)))}leave({channels:e,groups:t}){this.dependencies.presenceState&&(null==e||e.forEach((e=>delete this.dependencies.presenceState[e])),null==t||t.forEach((e=>delete this.dependencies.presenceState[e]))),this.engine.transition(Oe(null!=e?e:[],null!=t?t:[]))}leaveAll(){this.engine.transition(Ce())}dispose(){this._unsubscribeEngine(),this.dispatcher.dispose()}}class Le{static LinearRetryPolicy(e){return{delay:e.delay,maximumRetry:e.maximumRetry,shouldRetry(e,t){var s;return 403!==(null===(s=null==e?void 0:e.status)||void 0===s?void 0:s.statusCode)&&this.maximumRetry>t},getDelay(e,t){var s;return 1e3*((null!==(s=t.retryAfter)&&void 0!==s?s:this.delay)+Math.random())},getGiveupReason(e,t){var s;return this.maximumRetry<=t?"retry attempts exhaused.":403===(null===(s=null==e?void 0:e.status)||void 0===s?void 0:s.statusCode)?"forbidden operation.":"unknown error"},validate(){if(this.maximumRetry>10)throw new Error("Maximum retry for linear retry policy can not be more than 10")}}}static ExponentialRetryPolicy(e){return{minimumDelay:e.minimumDelay,maximumDelay:e.maximumDelay,maximumRetry:e.maximumRetry,shouldRetry(e,t){var s;return 403!==(null===(s=null==e?void 0:e.status)||void 0===s?void 0:s.statusCode)&&this.maximumRetry>t},getDelay(e,t){var s;return 1e3*((null!==(s=t.retryAfter)&&void 0!==s?s:Math.min(Math.pow(2,e),this.maximumDelay))+Math.random())},getGiveupReason(e,t){var s;return this.maximumRetry<=t?"retry attempts exhausted.":403===(null===(s=null==e?void 0:e.status)||void 0===s?void 0:s.statusCode)?"forbidden operation.":"unknown error"},validate(){if(this.minimumDelay<2)throw new Error("Minimum delay can not be set less than 2 seconds for retry");if(this.maximumDelay)throw new Error("Maximum delay can not be set more than 150 seconds for retry");if(this.maximumRetry>6)throw new Error("Maximum retry for exponential retry policy can not be more than 6")}}}}const Be=ye("HANDSHAKE",((e,t)=>({channels:e,groups:t}))),He=ye("RECEIVE_MESSAGES",((e,t,s)=>({channels:e,groups:t,cursor:s}))),ze=ge("EMIT_MESSAGES",(e=>e)),Ve=ge("EMIT_STATUS",(e=>e)),We=ye("RECEIVE_RECONNECT",(e=>e)),Je=ye("HANDSHAKE_RECONNECT",(e=>e)),Qe=pe("SUBSCRIPTION_CHANGED",((e,t)=>({channels:e,groups:t}))),Ye=pe("SUBSCRIPTION_RESTORED",((e,t,s,n)=>({channels:e,groups:t,cursor:{timetoken:s,region:null!=n?n:0}}))),Xe=pe("HANDSHAKE_SUCCESS",(e=>e)),Ze=pe("HANDSHAKE_FAILURE",(e=>e)),et=pe("HANDSHAKE_RECONNECT_SUCCESS",(e=>({cursor:e}))),tt=pe("HANDSHAKE_RECONNECT_FAILURE",(e=>e)),st=pe("HANDSHAKE_RECONNECT_GIVEUP",(e=>e)),nt=pe("RECEIVE_SUCCESS",((e,t)=>({cursor:e,events:t}))),rt=pe("RECEIVE_FAILURE",(e=>e)),it=pe("RECEIVE_RECONNECT_SUCCESS",((e,t)=>({cursor:e,events:t}))),ot=pe("RECEIVE_RECONNECT_FAILURE",(e=>e)),at=pe("RECEIVING_RECONNECT_GIVEUP",(e=>e)),ct=pe("DISCONNECT",(()=>({}))),ut=pe("RECONNECT",((e,t)=>({cursor:{timetoken:null!=e?e:"",region:null!=t?t:0}}))),lt=pe("UNSUBSCRIBE_ALL",(()=>({})));class ht extends de{constructor(e,t){super(t),this.on(Be.type,we(((t,s,n)=>i(this,[t,s,n],void 0,(function*(t,s,{handshake:n,presenceState:r,config:i}){s.throwIfAborted();try{const o=yield n(Object.assign({abortSignal:s,channels:t.channels,channelGroups:t.groups,filterExpression:i.filterExpression},i.maintainPresenceState&&{state:r}));return e.transition(Xe(o))}catch(t){if(t instanceof d){if(t.status&&t.status.category==h.PNCancelledCategory)return;return e.transition(Ze(t))}}}))))),this.on(He.type,we(((t,s,n)=>i(this,[t,s,n],void 0,(function*(t,s,{receiveMessages:n,config:r}){s.throwIfAborted();try{const i=yield n({abortSignal:s,channels:t.channels,channelGroups:t.groups,timetoken:t.cursor.timetoken,region:t.cursor.region,filterExpression:r.filterExpression});e.transition(nt(i.cursor,i.messages))}catch(t){if(t instanceof d){if(t.status&&t.status.category==h.PNCancelledCategory)return;if(!s.aborted)return e.transition(rt(t))}}}))))),this.on(ze.type,we(((e,t,s)=>i(this,[e,t,s],void 0,(function*(e,t,{emitMessages:s}){e.length>0&&s(e)}))))),this.on(Ve.type,we(((e,t,s)=>i(this,[e,t,s],void 0,(function*(e,t,{emitStatus:s}){s(e)}))))),this.on(We.type,we(((t,s,n)=>i(this,[t,s,n],void 0,(function*(t,s,{receiveMessages:n,delay:r,config:i}){if(!i.retryConfiguration||!i.retryConfiguration.shouldRetry(t.reason,t.attempts))return e.transition(at(new d(i.retryConfiguration?i.retryConfiguration.getGiveupReason(t.reason,t.attempts):"Unable to complete subscribe messages receive.")));s.throwIfAborted(),yield r(i.retryConfiguration.getDelay(t.attempts,t.reason)),s.throwIfAborted();try{const r=yield n({abortSignal:s,channels:t.channels,channelGroups:t.groups,timetoken:t.cursor.timetoken,region:t.cursor.region,filterExpression:i.filterExpression});return e.transition(it(r.cursor,r.messages))}catch(t){if(t instanceof d){if(t.status&&t.status.category==h.PNCancelledCategory)return;return e.transition(ot(t))}}}))))),this.on(Je.type,we(((t,s,n)=>i(this,[t,s,n],void 0,(function*(t,s,{handshake:n,delay:r,presenceState:i,config:o}){if(!o.retryConfiguration||!o.retryConfiguration.shouldRetry(t.reason,t.attempts))return e.transition(st(new d(o.retryConfiguration?o.retryConfiguration.getGiveupReason(t.reason,t.attempts):"Unable to complete subscribe handshake")));s.throwIfAborted(),yield r(o.retryConfiguration.getDelay(t.attempts,t.reason)),s.throwIfAborted();try{const r=yield n(Object.assign({abortSignal:s,channels:t.channels,channelGroups:t.groups,filterExpression:o.filterExpression},o.maintainPresenceState&&{state:i}));return e.transition(et(r))}catch(t){if(t instanceof d){if(t.status&&t.status.category==h.PNCancelledCategory)return;return e.transition(tt(t))}}})))))}}const dt=new le("HANDSHAKE_FAILED");dt.on(Qe.type,((e,t)=>vt.with({channels:t.payload.channels,groups:t.payload.groups,cursor:e.cursor}))),dt.on(ut.type,((e,t)=>vt.with({channels:e.channels,groups:e.groups,cursor:t.payload.cursor||e.cursor}))),dt.on(Ye.type,((e,t)=>{var s,n;return vt.with({channels:t.payload.channels,groups:t.payload.groups,cursor:{timetoken:t.payload.cursor.timetoken,region:t.payload.cursor.region?t.payload.cursor.region:null!==(n=null===(s=null==e?void 0:e.cursor)||void 0===s?void 0:s.region)&&void 0!==n?n:0}})})),dt.on(lt.type,(e=>wt.with()));const pt=new le("HANDSHAKE_STOPPED");pt.on(Qe.type,((e,t)=>pt.with({channels:t.payload.channels,groups:t.payload.groups,cursor:e.cursor}))),pt.on(ut.type,((e,t)=>vt.with(Object.assign(Object.assign({},e),{cursor:t.payload.cursor||e.cursor})))),pt.on(Ye.type,((e,t)=>{var s;return pt.with({channels:t.payload.channels,groups:t.payload.groups,cursor:{timetoken:t.payload.cursor.timetoken,region:t.payload.cursor.region||(null===(s=null==e?void 0:e.cursor)||void 0===s?void 0:s.region)||0}})})),pt.on(lt.type,(e=>wt.with()));const gt=new le("RECEIVE_FAILED");gt.on(ut.type,((e,t)=>{var s;return vt.with({channels:e.channels,groups:e.groups,cursor:{timetoken:t.payload.cursor.timetoken?null===(s=t.payload.cursor)||void 0===s?void 0:s.timetoken:e.cursor.timetoken,region:t.payload.cursor.region||e.cursor.region}})})),gt.on(Qe.type,((e,t)=>vt.with({channels:t.payload.channels,groups:t.payload.groups,cursor:e.cursor}))),gt.on(Ye.type,((e,t)=>vt.with({channels:t.payload.channels,groups:t.payload.groups,cursor:{timetoken:t.payload.cursor.timetoken,region:t.payload.cursor.region||e.cursor.region}}))),gt.on(lt.type,(e=>wt.with(void 0)));const yt=new le("RECEIVE_STOPPED");yt.on(Qe.type,((e,t)=>yt.with({channels:t.payload.channels,groups:t.payload.groups,cursor:e.cursor}))),yt.on(Ye.type,((e,t)=>yt.with({channels:t.payload.channels,groups:t.payload.groups,cursor:{timetoken:t.payload.cursor.timetoken,region:t.payload.cursor.region||e.cursor.region}}))),yt.on(ut.type,((e,t)=>{var s;return vt.with({channels:e.channels,groups:e.groups,cursor:{timetoken:t.payload.cursor.timetoken?null===(s=t.payload.cursor)||void 0===s?void 0:s.timetoken:e.cursor.timetoken,region:t.payload.cursor.region||e.cursor.region}})})),yt.on(lt.type,(()=>wt.with(void 0)));const ft=new le("RECEIVE_RECONNECTING");ft.onEnter((e=>We(e))),ft.onExit((()=>We.cancel)),ft.on(it.type,((e,t)=>mt.with({channels:e.channels,groups:e.groups,cursor:t.payload.cursor},[ze(t.payload.events)]))),ft.on(ot.type,((e,t)=>ft.with(Object.assign(Object.assign({},e),{attempts:e.attempts+1,reason:t.payload})))),ft.on(at.type,((e,t)=>{var s;return gt.with({groups:e.groups,channels:e.channels,cursor:e.cursor,reason:t.payload},[Ve({category:h.PNDisconnectedUnexpectedlyCategory,error:null===(s=t.payload)||void 0===s?void 0:s.message})])})),ft.on(ct.type,(e=>yt.with({channels:e.channels,groups:e.groups,cursor:e.cursor},[Ve({category:h.PNDisconnectedCategory})]))),ft.on(Ye.type,((e,t)=>mt.with({channels:t.payload.channels,groups:t.payload.groups,cursor:{timetoken:t.payload.cursor.timetoken,region:t.payload.cursor.region||e.cursor.region}}))),ft.on(Qe.type,((e,t)=>mt.with({channels:t.payload.channels,groups:t.payload.groups,cursor:e.cursor}))),ft.on(lt.type,(e=>wt.with(void 0,[Ve({category:h.PNDisconnectedCategory})])));const mt=new le("RECEIVING");mt.onEnter((e=>He(e.channels,e.groups,e.cursor))),mt.onExit((()=>He.cancel)),mt.on(nt.type,((e,t)=>mt.with({channels:e.channels,groups:e.groups,cursor:t.payload.cursor},[ze(t.payload.events)]))),mt.on(Qe.type,((e,t)=>0===t.payload.channels.length&&0===t.payload.groups.length?wt.with(void 0):mt.with({cursor:e.cursor,channels:t.payload.channels,groups:t.payload.groups}))),mt.on(Ye.type,((e,t)=>0===t.payload.channels.length&&0===t.payload.groups.length?wt.with(void 0):mt.with({channels:t.payload.channels,groups:t.payload.groups,cursor:{timetoken:t.payload.cursor.timetoken,region:t.payload.cursor.region||e.cursor.region}}))),mt.on(rt.type,((e,t)=>ft.with(Object.assign(Object.assign({},e),{attempts:0,reason:t.payload})))),mt.on(ct.type,(e=>yt.with({channels:e.channels,groups:e.groups,cursor:e.cursor},[Ve({category:h.PNDisconnectedCategory})]))),mt.on(lt.type,(e=>wt.with(void 0,[Ve({category:h.PNDisconnectedCategory})])));const bt=new le("HANDSHAKE_RECONNECTING");bt.onEnter((e=>Je(e))),bt.onExit((()=>Je.cancel)),bt.on(et.type,((e,t)=>{var s,n;const r={timetoken:(null===(s=e.cursor)||void 0===s?void 0:s.timetoken)?null===(n=e.cursor)||void 0===n?void 0:n.timetoken:t.payload.cursor.timetoken,region:t.payload.cursor.region};return mt.with({channels:e.channels,groups:e.groups,cursor:r},[Ve({category:h.PNConnectedCategory})])})),bt.on(tt.type,((e,t)=>bt.with(Object.assign(Object.assign({},e),{attempts:e.attempts+1,reason:t.payload})))),bt.on(st.type,((e,t)=>{var s;return dt.with({groups:e.groups,channels:e.channels,cursor:e.cursor,reason:t.payload},[Ve({category:h.PNConnectionErrorCategory,error:null===(s=t.payload)||void 0===s?void 0:s.message})])})),bt.on(ct.type,(e=>pt.with({channels:e.channels,groups:e.groups,cursor:e.cursor}))),bt.on(Qe.type,((e,t)=>vt.with({channels:t.payload.channels,groups:t.payload.groups,cursor:e.cursor}))),bt.on(Ye.type,((e,t)=>{var s,n;return vt.with({channels:t.payload.channels,groups:t.payload.groups,cursor:{timetoken:t.payload.cursor.timetoken,region:(null===(s=t.payload.cursor)||void 0===s?void 0:s.region)||(null===(n=null==e?void 0:e.cursor)||void 0===n?void 0:n.region)||0}})})),bt.on(lt.type,(e=>wt.with(void 0)));const vt=new le("HANDSHAKING");vt.onEnter((e=>Be(e.channels,e.groups))),vt.onExit((()=>Be.cancel)),vt.on(Qe.type,((e,t)=>0===t.payload.channels.length&&0===t.payload.groups.length?wt.with(void 0):vt.with({channels:t.payload.channels,groups:t.payload.groups,cursor:e.cursor}))),vt.on(Xe.type,((e,t)=>{var s,n;return mt.with({channels:e.channels,groups:e.groups,cursor:{timetoken:(null===(s=null==e?void 0:e.cursor)||void 0===s?void 0:s.timetoken)?null===(n=null==e?void 0:e.cursor)||void 0===n?void 0:n.timetoken:t.payload.timetoken,region:t.payload.region}},[Ve({category:h.PNConnectedCategory})])})),vt.on(Ze.type,((e,t)=>bt.with({channels:e.channels,groups:e.groups,cursor:e.cursor,attempts:0,reason:t.payload}))),vt.on(ct.type,(e=>pt.with({channels:e.channels,groups:e.groups,cursor:e.cursor}))),vt.on(Ye.type,((e,t)=>{var s;return vt.with({channels:t.payload.channels,groups:t.payload.groups,cursor:{timetoken:t.payload.cursor.timetoken,region:t.payload.cursor.region||(null===(s=null==e?void 0:e.cursor)||void 0===s?void 0:s.region)||0}})})),vt.on(lt.type,(e=>wt.with()));const wt=new le("UNSUBSCRIBED");wt.on(Qe.type,((e,t)=>vt.with({channels:t.payload.channels,groups:t.payload.groups}))),wt.on(Ye.type,((e,t)=>vt.with({channels:t.payload.channels,groups:t.payload.groups,cursor:t.payload.cursor})));class St{get _engine(){return this.engine}constructor(e){this.engine=new he,this.channels=[],this.groups=[],this.dependencies=e,this.dispatcher=new ht(this.engine,e),this._unsubscribeEngine=this.engine.subscribe((e=>{"invocationDispatched"===e.type&&this.dispatcher.dispatch(e.invocation)})),this.engine.start(wt,void 0)}subscribe({channels:e,channelGroups:t,timetoken:s,withPresence:n}){this.channels=[...this.channels,...null!=e?e:[]],this.groups=[...this.groups,...null!=t?t:[]],n&&(this.channels.map((e=>this.channels.push(`${e}-pnpres`))),this.groups.map((e=>this.groups.push(`${e}-pnpres`)))),s?this.engine.transition(Ye(Array.from(new Set([...this.channels,...null!=e?e:[]])),Array.from(new Set([...this.groups,...null!=t?t:[]])),s)):this.engine.transition(Qe(Array.from(new Set([...this.channels,...null!=e?e:[]])),Array.from(new Set([...this.groups,...null!=t?t:[]])))),this.dependencies.join&&this.dependencies.join({channels:Array.from(new Set(this.channels.filter((e=>!e.endsWith("-pnpres"))))),groups:Array.from(new Set(this.groups.filter((e=>!e.endsWith("-pnpres")))))})}unsubscribe({channels:e=[],channelGroups:t=[]}){const s=U(this.channels,[...e,...e.map((e=>`${e}-pnpres`))]),n=U(this.groups,[...t,...t.map((e=>`${e}-pnpres`))]);if(new Set(this.channels).size!==new Set(s).size||new Set(this.groups).size!==new Set(n).size){const r=T(this.channels,e),i=T(this.groups,t);this.dependencies.presenceState&&(null==r||r.forEach((e=>delete this.dependencies.presenceState[e])),null==i||i.forEach((e=>delete this.dependencies.presenceState[e]))),this.channels=s,this.groups=n,this.engine.transition(Qe(Array.from(new Set(this.channels.slice(0))),Array.from(new Set(this.groups.slice(0))))),this.dependencies.leave&&this.dependencies.leave({channels:r.slice(0),groups:i.slice(0)})}}unsubscribeAll(){this.channels=[],this.groups=[],this.dependencies.presenceState&&Object.keys(this.dependencies.presenceState).forEach((e=>{delete this.dependencies.presenceState[e]})),this.engine.transition(Qe(this.channels.slice(0),this.groups.slice(0))),this.dependencies.leaveAll&&this.dependencies.leaveAll()}reconnect({timetoken:e,region:t}){this.engine.transition(ut(e,t))}disconnect(){this.engine.transition(ct()),this.dependencies.leaveAll&&this.dependencies.leaveAll()}getSubscribedChannels(){return Array.from(new Set(this.channels.slice(0)))}getSubscribedChannelGroups(){return Array.from(new Set(this.groups.slice(0)))}dispose(){this.disconnect(),this._unsubscribeEngine(),this.dispatcher.dispose()}}class kt extends se{constructor(e){var t,s;super({method:e.sendByPost?H.POST:H.GET}),this.parameters=e,null!==(t=(s=this.parameters).sendByPost)&&void 0!==t||(s.sendByPost=false)}operation(){return re.PNPublishOperation}validate(){const{message:e,channel:t,keySet:{publishKey:s}}=this.parameters;return t?e?s?void 0:"Missing 'publishKey'":"Missing 'message'":"Missing 'channel'"}parse(e){return i(this,void 0,void 0,(function*(){const t=this.deserializeResponse(e);if(!t)throw new d("Service response error, check status for details",p("Unable to deserialize service response"));return{timetoken:t[2]}}))}get path(){const{message:e,channel:t,keySet:s}=this.parameters,n=this.prepareMessagePayload(e);return`/publish/${s.publishKey}/${s.subscribeKey}/0/${I(t)}/0${this.parameters.sendByPost?"":`/${I(n)}`}`}get queryParameters(){const{meta:e,replicate:t,storeInHistory:s,ttl:n}=this.parameters,r={};return void 0!==s&&(r.store=s?"1":"0"),void 0!==n&&(r.ttl=n),void 0===t||t||(r.norep="true"),e&&"object"==typeof e&&(r.meta=JSON.stringify(e)),r}get headers(){return{"Content-Type":"application/json"}}get body(){return this.prepareMessagePayload(this.parameters.message)}prepareMessagePayload(e){const{crypto:t}=this.parameters;if(!t)return JSON.stringify(e)||"";const s=t.encrypt(JSON.stringify(e));return JSON.stringify("string"==typeof s?s:u(s))}}class Et extends se{constructor(e){super(),this.parameters=e}operation(){return re.PNSignalOperation}validate(){const{message:e,channel:t,keySet:{publishKey:s}}=this.parameters;return t?e?s?void 0:"Missing 'publishKey'":"Missing 'message'":"Missing 'channel'"}parse(e){return i(this,void 0,void 0,(function*(){const t=this.deserializeResponse(e);if(!t)throw new d("Service response error, check status for details",p("Unable to deserialize service response"));return{timetoken:t[2]}}))}get path(){const{keySet:{publishKey:e,subscribeKey:t},channel:s,message:n}=this.parameters,r=JSON.stringify(n);return`/signal/${e}/${t}/0/${I(s)}/0/${I(r)}`}}class Ot extends oe{operation(){return re.PNReceiveMessagesOperation}validate(){const e=super.validate();return e||(this.parameters.timetoken?this.parameters.region?void 0:"region can not be empty":"timetoken can not be empty")}get path(){const{keySet:{subscribeKey:e},channels:t=[]}=this.parameters;return`/v2/subscribe/${e}/${R(t.sort(),",")}/0`}get queryParameters(){const{channelGroups:e,filterExpression:t,timetoken:s,region:n}=this.parameters,r={ee:""};return e&&e.length>0&&(r["channel-group"]=e.sort().join(",")),t&&t.length>0&&(r["filter-expr"]=t),"string"==typeof s?s&&s.length>0&&(r.tt=s):s&&s>0&&(r.tt=s),n&&(r.tr=n),r}}class Ct extends oe{operation(){return re.PNHandshakeOperation}get path(){const{keySet:{subscribeKey:e},channels:t=[]}=this.parameters;return`/v2/subscribe/${e}/${R(t.sort(),",")}/0`}get queryParameters(){const{channelGroups:e,filterExpression:t,state:s}=this.parameters,n={tt:0,ee:""};return e&&e.length>0&&(n["channel-group"]=e.sort().join(",")),t&&t.length>0&&(n["filter-expr"]=t),s&&Object.keys(s).length>0&&(n.state=JSON.stringify(s)),n}}class Nt extends se{constructor(e){var t,s,n,r;super(),this.parameters=e,null!==(t=(n=this.parameters).channels)&&void 0!==t||(n.channels=[]),null!==(s=(r=this.parameters).channelGroups)&&void 0!==s||(r.channelGroups=[])}operation(){return re.PNGetStateOperation}validate(){const{keySet:{subscribeKey:e},channels:t,channelGroups:s}=this.parameters;if(!e)return"Missing Subscribe Key"}parse(e){return i(this,void 0,void 0,(function*(){const t=this.deserializeResponse(e);if(!t)throw new d("Service response error, check status for details",p("Unable to deserialize service response"));if(t.status>=400)throw A.create(e);const{channels:s=[],channelGroups:n=[]}=this.parameters,r={channels:{}};return 1===s.length&&0===n.length?r.channels[s[0]]=t.payload:r.channels=t.payload,r}))}get path(){const{keySet:{subscribeKey:e},uuid:t,channels:s}=this.parameters;return`/v2/presence/sub-key/${e}/channel/${R(null!=s?s:[],",")}/uuid/${t}`}get queryParameters(){const{channelGroups:e}=this.parameters;return e&&0!==e.length?{"channel-group":e.join(",")}:{}}}class Pt extends se{constructor(e){super(),this.parameters=e}operation(){return re.PNSetStateOperation}validate(){const{keySet:{subscribeKey:e},state:t,channels:s=[],channelGroups:n=[]}=this.parameters;return e?t?0===(null==s?void 0:s.length)&&0===(null==n?void 0:n.length)?"Please provide a list of channels and/or channel-groups":void 0:"Missing State":"Missing Subscribe Key"}parse(e){return i(this,void 0,void 0,(function*(){const t=this.deserializeResponse(e);if(!t)throw new d("Service response error, check status for details",p("Unable to deserialize service response"));if(t.status>=400)throw A.create(e);return{state:t.payload}}))}get path(){const{keySet:{subscribeKey:e},uuid:t,channels:s}=this.parameters;return`/v2/presence/sub-key/${e}/channel/${R(null!=s?s:[],",")}/uuid/${I(t)}/data`}get queryParameters(){const{channelGroups:e,state:t}=this.parameters,s={state:JSON.stringify(t)};return e&&0!==e.length&&(s["channel-group"]=e.join(",")),s}}class Mt extends se{constructor(e){super(),this.parameters=e}operation(){return re.PNHeartbeatOperation}validate(){const{keySet:{subscribeKey:e},channels:t=[],channelGroups:s=[]}=this.parameters;return e?0===t.length&&0===s.length?"Please provide a list of channels and/or channel-groups":void 0:"Missing Subscribe Key"}parse(e){return i(this,void 0,void 0,(function*(){const t=this.deserializeResponse(e);if(!t)throw new d("Service response error, check status for details",p("Unable to deserialize service response"));if(t.status>=400)throw A.create(e);return{}}))}get path(){const{keySet:{subscribeKey:e},channels:t}=this.parameters;return`/v2/presence/sub-key/${e}/channel/${R(null!=t?t:[],",")}/heartbeat`}get queryParameters(){const{channelGroups:e,state:t,heartbeat:s}=this.parameters,n={heartbeat:`${s}`};return e&&0!==e.length&&(n["channel-group"]=e.join(",")),t&&(n.state=JSON.stringify(t)),n}}class _t extends se{constructor(e){super(),this.parameters=e,this.parameters.channelGroups&&(this.parameters.channelGroups=Array.from(new Set(this.parameters.channelGroups))),this.parameters.channels&&(this.parameters.channels=Array.from(new Set(this.parameters.channels)))}operation(){return re.PNUnsubscribeOperation}validate(){const{keySet:{subscribeKey:e},channels:t=[],channelGroups:s=[]}=this.parameters;return e?0===t.length&&0===s.length?"At least one `channel` or `channel group` should be provided.":void 0:"Missing Subscribe Key"}parse(e){return i(this,void 0,void 0,(function*(){const t=this.deserializeResponse(e);if(!t)throw new d("Service response error, check status for details",p("Unable to deserialize service response"));if(t.status>=400)throw A.create(e);return{}}))}get path(){var e;const{keySet:{subscribeKey:t},channels:s}=this.parameters;return`/v2/presence/sub-key/${t}/channel/${R(null!==(e=null==s?void 0:s.sort())&&void 0!==e?e:[],",")}/leave`}get queryParameters(){const{channelGroups:e}=this.parameters;return e&&0!==e.length?{"channel-group":e.sort().join(",")}:{}}}class At extends se{constructor(e){super(),this.parameters=e}operation(){return re.PNWhereNowOperation}validate(){if(!this.parameters.keySet.subscribeKey)return"Missing Subscribe Key"}parse(e){return i(this,void 0,void 0,(function*(){const t=this.deserializeResponse(e);if(!t)throw new d("Service response error, check status for details",p("Unable to deserialize service response"));if(t.status>=400)throw A.create(e);return t.payload?{channels:t.payload.channels}:{channels:[]}}))}get path(){const{keySet:{subscribeKey:e},uuid:t}=this.parameters;return`/v2/presence/sub-key/${e}/uuid/${I(t)}`}}class jt extends se{constructor(e){var t,s,n,r,i,o;super(),this.parameters=e,null!==(t=(r=this.parameters).queryParameters)&&void 0!==t||(r.queryParameters={}),null!==(s=(i=this.parameters).includeUUIDs)&&void 0!==s||(i.includeUUIDs=true),null!==(n=(o=this.parameters).includeState)&&void 0!==n||(o.includeState=false)}operation(){const{channels:e=[],channelGroups:t=[]}=this.parameters;return 0===e.length&&0===t.length?re.PNGlobalHereNowOperation:re.PNHereNowOperation}validate(){if(!this.parameters.keySet.subscribeKey)return"Missing Subscribe Key"}parse(e){return i(this,void 0,void 0,(function*(){var t,s;const n=this.deserializeResponse(e);if(!n)throw new d("Service response error, check status for details",p("Unable to deserialize service response"));if(n.status>=400)throw A.create(e);const r="occupancy"in n?1:n.payload.total_channels,i="occupancy"in n?n.occupancy:n.payload.total_channels,o={};let a={};if("occupancy"in n){const e=this.parameters.channels[0];a[e]={uuids:null!==(t=n.uuids)&&void 0!==t?t:[],occupancy:i}}else a=null!==(s=n.payload.channels)&&void 0!==s?s:{};return Object.keys(a).forEach((e=>{const t=a[e];o[e]={occupants:this.parameters.includeUUIDs?t.uuids.map((e=>"string"==typeof e?{uuid:e,state:null}:e)):[],name:e,occupancy:t.occupancy}})),{totalChannels:r,totalOccupancy:i,channels:o}}))}get path(){const{keySet:{subscribeKey:e},channels:t,channelGroups:s}=this.parameters;let n=`/v2/presence/sub-key/${e}`;return(t&&t.length>0||s&&s.length>0)&&(n+=`/channel/${R(null!=t?t:[],",")}`),n}get queryParameters(){const{channelGroups:e,includeUUIDs:t,includeState:s,queryParameters:n}=this.parameters;return Object.assign(Object.assign(Object.assign(Object.assign({},t?{}:{disable_uuids:"1"}),null!=s&&s?{state:"1"}:{}),e&&e.length>0?{"channel-group":e.join(",")}:{}),n)}}class It extends se{constructor(e){super({method:H.DELETE}),this.parameters=e}operation(){return re.PNDeleteMessagesOperation}validate(){return this.parameters.keySet.subscribeKey?this.parameters.channel?void 0:"Missing channel":"Missing Subscribe Key"}parse(e){return i(this,void 0,void 0,(function*(){const t=this.deserializeResponse(e);if(!t)throw new d("Service response error, check status for details",p("Unable to deserialize service response"));if(t.status>=400)throw A.create(e);return{}}))}get path(){const{keySet:{subscribeKey:e},channel:t}=this.parameters;return`/v3/history/sub-key/${e}/channel/${I(t)}`}get queryParameters(){const{start:e,end:t}=this.parameters;return Object.assign(Object.assign({},e?{start:e}:{}),t?{end:t}:{})}}class Rt extends se{constructor(e){super(),this.parameters=e}operation(){return re.PNMessageCounts}validate(){const{keySet:{subscribeKey:e},channels:t,timetoken:s,channelTimetokens:n}=this.parameters;return e?t?s&&n?"`timetoken` and `channelTimetokens` are incompatible together":s||n?n&&n.length>1&&n.length!==t.length?"Length of `channelTimetokens` and `channels` do not match":void 0:"`timetoken` or `channelTimetokens` need to be set":"Missing channels":"Missing Subscribe Key"}parse(e){return i(this,void 0,void 0,(function*(){const t=this.deserializeResponse(e);if(!t)throw new d("Service response error, check status for details",p("Unable to deserialize service response"));if(t.status>=400)throw A.create(e);return{channels:t.channels}}))}get path(){return`/v3/history/sub-key/${this.parameters.keySet.subscribeKey}/message-counts/${R(this.parameters.channels)}`}get queryParameters(){let{channelTimetokens:e}=this.parameters;return this.parameters.timetoken&&(e=[this.parameters.timetoken]),Object.assign(Object.assign({},1===e.length?{timetoken:e[0]}:{}),e.length>1?{channelsTimetoken:e.join(",")}:{})}}class Ut extends se{constructor(e){var t,s,n;super(),this.parameters=e,e.count?e.count=Math.min(e.count,100):e.count=100,null!==(t=e.stringifiedTimeToken)&&void 0!==t||(e.stringifiedTimeToken=false),null!==(s=e.includeMeta)&&void 0!==s||(e.includeMeta=false),null!==(n=e.logVerbosity)&&void 0!==n||(e.logVerbosity=false)}operation(){return re.PNHistoryOperation}validate(){return this.parameters.keySet.subscribeKey?this.parameters.channel?void 0:"Missing channel":"Missing Subscribe Key"}parse(e){return i(this,void 0,void 0,(function*(){const t=this.deserializeResponse(e);if(!t)throw new d("Service response error, check status for details",p("Unable to deserialize service response"));const s=t[0],n=t[1],r=t[2];return Array.isArray(s)?{messages:s.map((e=>{const t=this.processPayload(e.message),s={entry:t.payload,timetoken:e.timetoken};return t.error&&(s.error=t.error),e.meta&&(s.meta=e.meta),s})),startTimeToken:n,endTimeToken:r}:{messages:[],startTimeToken:n,endTimeToken:r}}))}get path(){const{keySet:{subscribeKey:e},channel:t}=this.parameters;return`/v2/history/sub-key/${e}/channel/${I(t)}`}get queryParameters(){const{start:e,end:t,reverse:s,count:n,stringifiedTimeToken:r,includeMeta:i}=this.parameters;return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({count:n,include_token:"true"},e?{start:e}:{}),t?{end:t}:{}),r?{string_message_token:"true"}:{}),null!=s?{reverse:s.toString()}:{}),i?{include_meta:"true"}:{})}processPayload(e){const{crypto:t,logVerbosity:s}=this.parameters;if(!t||"string"!=typeof e)return{payload:e};let n,r;try{const s=t.decrypt(e);n=s instanceof ArrayBuffer?JSON.parse(Ut.decoder.decode(s)):s}catch(t){s&&console.log("decryption error",t.message),n=e,r=`Error while decrypting message content: ${t.message}`}return{payload:n,error:r}}}var Tt;!function(e){e[e.Message=-1]="Message",e[e.Files=4]="Files"}(Tt||(Tt={}));class Ft extends se{constructor(e){var t,s,n,r,i;super(),this.parameters=e;const o=null!==(t=e.includeMessageActions)&&void 0!==t&&t,a=e.channels.length>1||o?25:100;e.count?e.count=Math.min(e.count,a):e.count=a,e.includeUuid?e.includeUUID=e.includeUuid:null!==(s=e.includeUUID)&&void 0!==s||(e.includeUUID=true),null!==(n=e.stringifiedTimeToken)&&void 0!==n||(e.stringifiedTimeToken=false),null!==(r=e.includeMessageType)&&void 0!==r||(e.includeMessageType=true),null!==(i=e.logVerbosity)&&void 0!==i||(e.logVerbosity=false)}operation(){return re.PNFetchMessagesOperation}validate(){const{keySet:{subscribeKey:e},channels:t,includeMessageActions:s}=this.parameters;return e?t?void 0!==s&&s&&t.length>1?"History can return actions data for a single channel only. Either pass a single channel or disable the includeMessageActions flag.":void 0:"Missing channels":"Missing Subscribe Key"}parse(e){return i(this,void 0,void 0,(function*(){var t;const s=this.deserializeResponse(e);if(!s)throw new d("Service response error, check status for details",p("Unable to deserialize service response"));if(s.status>=400)throw A.create(e);const n=null!==(t=s.channels)&&void 0!==t?t:{},r={};return Object.keys(n).forEach((e=>{r[e]=n[e].map((t=>{null===t.message_type&&(t.message_type=Tt.Message);const s=this.processPayload(e,t),n={channel:e,timetoken:t.timetoken,message:s.payload,messageType:t.message_type,uuid:t.uuid};if(t.actions){const e=n;e.actions=t.actions,e.data=t.actions}return t.meta&&(n.meta=t.meta),s.error&&(n.error=s.error),n}))})),s.more?{channels:r,more:s.more}:{channels:r}}))}get path(){const{keySet:{subscribeKey:e},channels:t,includeMessageActions:s}=this.parameters;return`/v3/${s?"history-with-actions":"history"}/sub-key/${e}/channel/${R(t)}`}get queryParameters(){const{start:e,end:t,count:s,includeMessageType:n,includeMeta:r,includeUUID:i,stringifiedTimeToken:o}=this.parameters;return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({max:s},e?{start:e}:{}),t?{end:t}:{}),o?{string_message_token:"true"}:{}),void 0!==r&&r?{include_meta:"true"}:{}),i?{include_uuid:"true"}:{}),n?{include_message_type:"true"}:{})}processPayload(e,t){const{crypto:s,logVerbosity:n}=this.parameters;if(!s||"string"!=typeof t.message)return{payload:t.message};let r,i;try{const e=s.decrypt(t.message);r=e instanceof ArrayBuffer?JSON.parse(Ft.decoder.decode(e)):e}catch(e){n&&console.log("decryption error",e.message),r=t.message,i=`Error while decrypting message content: ${e.message}`}if(!i&&r&&t.message_type==Tt.Files&&"object"==typeof r&&this.isFileMessage(r)){const t=r;return{payload:{message:t.message,file:Object.assign(Object.assign({},t.file),{url:this.parameters.getFileUrl({channel:e,id:t.file.id,name:t.file.name})})},error:i}}return{payload:r,error:i}}isFileMessage(e){return void 0!==e.file}}class xt extends se{constructor(e){super(),this.parameters=e}operation(){return re.PNGetMessageActionsOperation}validate(){return this.parameters.keySet.subscribeKey?this.parameters.channel?void 0:"Missing message channel":"Missing Subscribe Key"}parse(e){return i(this,void 0,void 0,(function*(){const t=this.deserializeResponse(e);if(!t)throw new d("Service response error, check status for details",p("Unable to deserialize service response"));if(t.status>=400)throw A.create(e);let s=null,n=null;return t.data.length>0&&(s=t.data[0].actionTimetoken,n=t.data[t.data.length-1].actionTimetoken),{data:t.data,more:t.more,start:s,end:n}}))}get path(){const{keySet:{subscribeKey:e},channel:t}=this.parameters;return`/v1/message-actions/${e}/channel/${I(t)}`}get queryParameters(){const{limit:e,start:t,end:s}=this.parameters;return Object.assign(Object.assign(Object.assign({},t?{start:t}:{}),s?{end:s}:{}),e?{limit:e}:{})}}class Dt extends se{constructor(e){super({method:H.POST}),this.parameters=e}operation(){return re.PNAddMessageActionOperation}validate(){const{keySet:{subscribeKey:e},action:t,channel:s,messageTimetoken:n}=this.parameters;return e?s?n?t?t.value?t.type?t.type.length>15?"Action.type value exceed maximum length of 15":void 0:"Missing Action.type":"Missing Action.value":"Missing Action":"Missing message timetoken":"Missing message channel":"Missing Subscribe Key"}parse(e){return i(this,void 0,void 0,(function*(){const t=this.deserializeResponse(e);if(!t)throw new d("Service response error, check status for details",p("Unable to deserialize service response"));if(t.status>=400)throw A.create(e);return{data:t.data}}))}get path(){const{keySet:{subscribeKey:e},channel:t,messageTimetoken:s}=this.parameters;return`/v1/message-actions/${e}/channel/${I(t)}/message/${s}`}get headers(){return{"Content-Type":"application/json"}}get body(){return JSON.stringify(this.parameters.action)}}class qt extends se{constructor(e){super({method:H.DELETE}),this.parameters=e}operation(){return re.PNRemoveMessageActionOperation}validate(){const{keySet:{subscribeKey:e},channel:t,messageTimetoken:s,actionTimetoken:n}=this.parameters;return e?t?s?n?void 0:"Missing action timetoken":"Missing message timetoken":"Missing message action channel":"Missing Subscribe Key"}parse(e){return i(this,void 0,void 0,(function*(){const t=this.deserializeResponse(e);if(!t)throw new d("Service response error, check status for details",p("Unable to deserialize service response"));if(t.status>=400)throw A.create(e);return{data:t.data}}))}get path(){const{keySet:{subscribeKey:e},channel:t,actionTimetoken:s,messageTimetoken:n}=this.parameters;return`/v1/message-actions/${e}/channel/${I(t)}/message/${n}/action/${s}`}}class Gt extends se{constructor(e){var t,s;super(),this.parameters=e,null!==(t=(s=this.parameters).storeInHistory)&&void 0!==t||(s.storeInHistory=true)}operation(){return re.PNPublishFileMessageOperation}validate(){const{channel:e,fileId:t,fileName:s}=this.parameters;return e?t?s?void 0:"file name can't be empty":"file id can't be empty":"channel can't be empty"}parse(e){return i(this,void 0,void 0,(function*(){const t=this.deserializeResponse(e);if(!t)throw new d("Service response error, check status for details",p("Unable to deserialize service response"));return{timetoken:t[2]}}))}get path(){const{message:e,channel:t,keySet:{publishKey:s,subscribeKey:n},fileId:r,fileName:i}=this.parameters,o=Object.assign({file:{name:i,id:r}},e?{message:e}:{});return`/v1/files/publish-file/${s}/${n}/0/${I(t)}/0/${I(this.prepareMessagePayload(o))}`}get queryParameters(){const{storeInHistory:e,ttl:t,meta:s}=this.parameters;return Object.assign(Object.assign({store:e?"1":"0"},t?{ttl:t}:{}),s&&"object"==typeof s?{meta:JSON.stringify(s)}:{})}prepareMessagePayload(e){const{crypto:t}=this.parameters;if(!t)return JSON.stringify(e)||"";const s=t.encrypt(JSON.stringify(e));return JSON.stringify("string"==typeof s?s:u(s))}}class Kt extends se{constructor(e){super({method:H.LOCAL}),this.parameters=e}operation(){return re.PNGetFileUrlOperation}validate(){const{channel:e,id:t,name:s}=this.parameters;return e?t?s?void 0:"file name can't be empty":"file id can't be empty":"channel can't be empty"}parse(e){return i(this,void 0,void 0,(function*(){return e.url}))}get path(){const{channel:e,id:t,name:s,keySet:{subscribeKey:n}}=this.parameters;return`/v1/files/${n}/channels/${I(e)}/files/${t}/${s}`}}class $t extends se{constructor(e){super({method:H.DELETE}),this.parameters=e}operation(){return re.PNDeleteFileOperation}validate(){const{channel:e,id:t,name:s}=this.parameters;return e?t?s?void 0:"file name can't be empty":"file id can't be empty":"channel can't be empty"}parse(e){return i(this,void 0,void 0,(function*(){const t=this.deserializeResponse(e);if(!t)throw new d("Service response error, check status for details",p("Unable to deserialize service response"));if(t.status>=400)throw A.create(e);return t}))}get path(){const{keySet:{subscribeKey:e},id:t,channel:s,name:n}=this.parameters;return`/v1/files/${e}/channels/${I(s)}/files/${t}/${n}`}}class Lt extends se{constructor(e){var t,s;super(),this.parameters=e,null!==(t=(s=this.parameters).limit)&&void 0!==t||(s.limit=100)}operation(){return re.PNListFilesOperation}validate(){if(!this.parameters.channel)return"channel can't be empty"}parse(e){return i(this,void 0,void 0,(function*(){const t=this.deserializeResponse(e);if(!t)throw new d("Service response error, check status for details",p("Unable to deserialize service response"));if(t.status>=400)throw A.create(e);return t}))}get path(){const{keySet:{subscribeKey:e},channel:t}=this.parameters;return`/v1/files/${e}/channels/${I(t)}/files`}get queryParameters(){const{limit:e,next:t}=this.parameters;return Object.assign({limit:e},t?{next:t}:{})}}class Bt extends se{constructor(e){super({method:H.POST}),this.parameters=e}operation(){return re.PNGenerateUploadUrlOperation}validate(){return this.parameters.channel?this.parameters.name?void 0:"'name' can't be empty":"channel can't be empty"}parse(e){return i(this,void 0,void 0,(function*(){const t=this.deserializeResponse(e);if(!t)throw new d("Service response error, check status for details",p("Unable to deserialize service response"));if(t.status>=400)throw A.create(e);return{id:t.data.id,name:t.data.name,url:t.file_upload_request.url,formFields:t.file_upload_request.form_fields}}))}get path(){const{keySet:{subscribeKey:e},channel:t}=this.parameters;return`/v1/files/${e}/channels/${I(t)}/generate-upload-url`}get headers(){return{"Content-Type":"application/json"}}get body(){return JSON.stringify({name:this.parameters.name})}}class Ht extends se{constructor(e){super({method:H.POST}),this.parameters=e;const t=e.file.mimeType;t&&(e.formFields=e.formFields.map((e=>"Content-Type"===e.name?{name:e.name,value:t}:e)))}operation(){return re.PNPublishFileOperation}validate(){const{fileId:e,fileName:t,file:s,uploadUrl:n}=this.parameters;return e?t?s?n?void 0:"Validation failed: file upload 'url' can't be empty":"Validation failed: 'file' can't be empty":"Validation failed: file 'name' can't be empty":"Validation failed: file 'id' can't be empty"}parse(e){return i(this,void 0,void 0,(function*(){return{status:e.status,message:e.body?Ht.decoder.decode(e.body):"OK"}}))}request(){return Object.assign(Object.assign({},super.request()),{origin:new URL(this.parameters.uploadUrl).origin,timeout:300})}get path(){const{pathname:e,search:t}=new URL(this.parameters.uploadUrl);return`${e}${t}`}get body(){return this.parameters.file}get formData(){return this.parameters.formFields}}class zt{constructor(e){var t;if(this.parameters=e,this.file=null===(t=this.parameters.PubNubFile)||void 0===t?void 0:t.create(e.file),!this.file)throw new Error("File upload error: unable to create File object.")}process(){return i(this,void 0,void 0,(function*(){let e,t;return this.generateFileUploadUrl().then((s=>(e=s.name,t=s.id,this.uploadFile(s)))).then((e=>{if(204!==e.status)throw new d("Upload to bucket was unsuccessful",{error:!0,statusCode:e.status,category:h.PNUnknownCategory,operation:re.PNPublishFileOperation,errorData:{message:e.message}})})).then((()=>this.publishFileMessage(t,e))).catch((e=>{if(e instanceof d)throw e;const t=e instanceof A?e:A.create(e);throw new d("File upload error.",t.toStatus(re.PNPublishFileOperation))}))}))}generateFileUploadUrl(){return i(this,void 0,void 0,(function*(){const e=new Bt(Object.assign(Object.assign({},this.parameters),{name:this.file.name,keySet:this.parameters.keySet}));return this.parameters.sendRequest(e)}))}uploadFile(e){return i(this,void 0,void 0,(function*(){const{cipherKey:t,PubNubFile:s,crypto:n,cryptography:r}=this.parameters,{id:i,name:o,url:a,formFields:c}=e;return this.parameters.PubNubFile.supportsEncryptFile&&(!t&&n?this.file=yield n.encryptFile(this.file,s):t&&r&&(this.file=yield r.encryptFile(t,this.file,s))),this.parameters.sendRequest(new Ht({fileId:i,fileName:o,file:this.file,uploadUrl:a,formFields:c}))}))}publishFileMessage(e,t){return i(this,void 0,void 0,(function*(){var s,n,r,i;let o,a={timetoken:"0"},c=this.parameters.fileUploadPublishRetryLimit,u=!1;do{try{a=yield this.parameters.publishFile(Object.assign(Object.assign({},this.parameters),{fileId:e,fileName:t})),u=!0}catch(e){e instanceof d&&(o=e),c-=1}}while(!u&&c>0);if(u)return{status:200,timetoken:a.timetoken,id:e,name:t};throw new d("Publish failed. You may want to execute that operation manually using pubnub.publishFile",{error:!0,category:null!==(n=null===(s=o.status)||void 0===s?void 0:s.category)&&void 0!==n?n:h.PNUnknownCategory,statusCode:null!==(i=null===(r=o.status)||void 0===r?void 0:r.statusCode)&&void 0!==i?i:0,channel:this.parameters.channel,id:e,name:t})}))}}class Vt{subscribe(e){const t=null==e?void 0:e.timetoken;this.pubnub.subscribe(Object.assign({channels:this.channelNames,channelGroups:this.groupNames},null!==t&&""!==t&&{timetoken:t}))}unsubscribe(){this.pubnub.unsubscribe({channels:this.channelNames,channelGroups:this.groupNames})}set onMessage(e){this.listener.message=e}set onPresence(e){this.listener.presence=e}set onSignal(e){this.listener.signal=e}set onObjects(e){this.listener.objects=e}set onMessageAction(e){this.listener.messageAction=e}set onFile(e){this.listener.file=e}addListener(e){this.eventEmitter.addListener(e,this.channelNames.filter((e=>!e.endsWith("-pnpres"))),this.groupNames.filter((e=>!e.endsWith("-pnpres"))))}removeListener(e){this.eventEmitter.removeListener(e,this.channelNames,this.groupNames)}get channels(){return this.channelNames.slice(0)}get channelGroups(){return this.groupNames.slice(0)}}class Wt extends Vt{constructor({channels:e=[],channelGroups:t=[],subscriptionOptions:s,eventEmitter:n,pubnub:r}){super(),this.channelNames=[],this.groupNames=[],this.subscriptionList=[],this.options=s,this.eventEmitter=n,this.pubnub=r,e.forEach((e=>{const t=this.pubnub.channel(e).subscription(this.options);this.channelNames=[...this.channelNames,...t.channels],this.subscriptionList.push(t)})),t.forEach((e=>{const t=this.pubnub.channelGroup(e).subscription(this.options);this.groupNames=[...this.groupNames,...t.channelGroups],this.subscriptionList.push(t)})),this.listener={},n.addListener(this.listener,this.channelNames.filter((e=>!e.endsWith("-pnpres"))),this.groupNames.filter((e=>!e.endsWith("-pnpres"))))}addSubscription(e){this.subscriptionList.push(e),this.channelNames=[...this.channelNames,...e.channels],this.groupNames=[...this.groupNames,...e.channelGroups],this.eventEmitter.addListener(this.listener,e.channels,e.channelGroups)}removeSubscription(e){const t=e.channels,s=e.channelGroups;this.channelNames=this.channelNames.filter((e=>!t.includes(e))),this.groupNames=this.groupNames.filter((e=>!s.includes(e))),this.subscriptionList=this.subscriptionList.filter((t=>t!==e)),this.eventEmitter.removeListener(this.listener,t,s)}addSubscriptionSet(e){this.subscriptionList=[...this.subscriptionList,...e.subscriptions],this.channelNames=[...this.channelNames,...e.channels],this.groupNames=[...this.groupNames,...e.channelGroups],this.eventEmitter.addListener(this.listener,e.channels,e.channelGroups)}removeSubscriptionSet(e){const t=e.channels,s=e.channelGroups;this.channelNames=this.channelNames.filter((e=>!t.includes(e))),this.groupNames=this.groupNames.filter((e=>!s.includes(e))),this.subscriptionList=this.subscriptionList.filter((t=>!e.subscriptions.includes(t))),this.eventEmitter.removeListener(this.listener,t,s)}get subscriptions(){return this.subscriptionList.slice(0)}}class Jt extends Vt{constructor({channels:e,channelGroups:t,subscriptionOptions:s,eventEmitter:n,pubnub:r}){super(),this.channelNames=[],this.groupNames=[],this.channelNames=e,this.groupNames=t,this.options=s,this.pubnub=r,this.eventEmitter=n,this.listener={},n.addListener(this.listener,this.channelNames.filter((e=>!e.endsWith("-pnpres"))),this.groupNames.filter((e=>!e.endsWith("-pnpres"))))}addSubscription(e){return new Wt({channels:[...this.channelNames,...e.channels],channelGroups:[...this.groupNames,...e.channelGroups],subscriptionOptions:Object.assign(Object.assign({},this.options),null==e?void 0:e.options),eventEmitter:this.eventEmitter,pubnub:this.pubnub})}}class Qt{constructor(e,t,s){this.id=e,this.eventEmitter=t,this.pubnub=s}subscription(e){return new Jt({channels:[this.id],channelGroups:[],subscriptionOptions:e,eventEmitter:this.eventEmitter,pubnub:this.pubnub})}}class Yt{constructor(e,t,s){this.eventEmitter=t,this.pubnub=s,this.name=e}subscription(e){return new Jt({channels:[],channelGroups:(null==e?void 0:e.receivePresenceEvents)?[this.name,`${this.name}-pnpres`]:[this.name],subscriptionOptions:e,eventEmitter:this.eventEmitter,pubnub:this.pubnub})}}class Xt{constructor(e,t,s){this.id=e,this.eventEmitter=t,this.pubnub=s}subscription(e){return new Jt({channels:[this.id],channelGroups:[],subscriptionOptions:e,eventEmitter:this.eventEmitter,pubnub:this.pubnub})}}class Zt{constructor(e,t,s){this.eventEmitter=t,this.pubnub=s,this.name=e}subscription(e){return new Jt({channels:(null==e?void 0:e.receivePresenceEvents)?[this.name,`${this.name}-pnpres`]:[this.name],channelGroups:[],subscriptionOptions:e,eventEmitter:this.eventEmitter,pubnub:this.pubnub})}}class es extends se{constructor(e){super(),this.parameters=e}operation(){return re.PNRemoveChannelsFromGroupOperation}validate(){const{keySet:{subscribeKey:e},channels:t,channelGroup:s}=this.parameters;return e?s?t?void 0:"Missing channels":"Missing Channel Group":"Missing Subscribe Key"}parse(e){return i(this,void 0,void 0,(function*(){const t=this.deserializeResponse(e);if(!t)throw new d("Service response error, check status for details",p("Unable to deserialize service response"));if(t.status>=400)throw A.create(e);return{}}))}get path(){const{keySet:{subscribeKey:e},channelGroup:t}=this.parameters;return`/v1/channel-registration/sub-key/${e}/channel-group/${I(t)}`}get queryParameters(){return{remove:this.parameters.channels.join(",")}}}class ts extends se{constructor(e){super(),this.parameters=e}operation(){return re.PNAddChannelsToGroupOperation}validate(){const{keySet:{subscribeKey:e},channels:t,channelGroup:s}=this.parameters;return e?s?t?void 0:"Missing channels":"Missing Channel Group":"Missing Subscribe Key"}parse(e){return i(this,void 0,void 0,(function*(){const t=this.deserializeResponse(e);if(!t)throw new d("Service response error, check status for details",p("Unable to deserialize service response"));if(t.status>=400)throw A.create(e);return{}}))}get path(){const{keySet:{subscribeKey:e},channelGroup:t}=this.parameters;return`/v1/channel-registration/sub-key/${e}/channel-group/${I(t)}`}get queryParameters(){return{add:this.parameters.channels.join(",")}}}class ss extends se{constructor(e){super(),this.parameters=e}operation(){return re.PNChannelsForGroupOperation}validate(){return this.parameters.keySet.subscribeKey?this.parameters.channelGroup?void 0:"Missing Channel Group":"Missing Subscribe Key"}parse(e){return i(this,void 0,void 0,(function*(){const t=this.deserializeResponse(e);if(!t)throw new d("Service response error, check status for details",p("Unable to deserialize service response"));if(t.status>=400)throw A.create(e);return{channels:t.payload.channels}}))}get path(){const{keySet:{subscribeKey:e},channelGroup:t}=this.parameters;return`/v1/channel-registration/sub-key/${e}/channel-group/${I(t)}`}}class ns extends se{constructor(e){super(),this.parameters=e}operation(){return re.PNRemoveGroupOperation}validate(){return this.parameters.keySet.subscribeKey?this.parameters.channelGroup?void 0:"Missing Channel Group":"Missing Subscribe Key"}parse(e){return i(this,void 0,void 0,(function*(){const t=this.deserializeResponse(e);if(!t)throw new d("Service response error, check status for details",p("Unable to deserialize service response"));if(t.status>=400)throw A.create(e);return{}}))}get path(){const{keySet:{subscribeKey:e},channelGroup:t}=this.parameters;return`/v1/channel-registration/sub-key/${e}/channel-group/${I(t)}/remove`}}class rs extends se{constructor(e){super(),this.parameters=e}operation(){return re.PNChannelGroupsOperation}validate(){if(!this.parameters.keySet.subscribeKey)return"Missing Subscribe Key"}parse(e){return i(this,void 0,void 0,(function*(){const t=this.deserializeResponse(e);if(!t)throw new d("Service response error, check status for details",p("Unable to deserialize service response"));if(t.status>=400)throw A.create(e);return{groups:t.payload.groups}}))}get path(){return`/v1/channel-registration/sub-key/${this.parameters.keySet.subscribeKey}/channel-group`}}class is{constructor(e,t){this.keySet=e,this.sendRequest=t}listChannels(e,t){return i(this,void 0,void 0,(function*(){const s=new ss(Object.assign(Object.assign({},e),{keySet:this.keySet}));return t?this.sendRequest(s,t):this.sendRequest(s)}))}listGroups(e){return i(this,void 0,void 0,(function*(){const t=new rs({keySet:this.keySet});return e?this.sendRequest(t,e):this.sendRequest(t)}))}addChannels(e,t){return i(this,void 0,void 0,(function*(){const s=new ts(Object.assign(Object.assign({},e),{keySet:this.keySet}));return t?this.sendRequest(s,t):this.sendRequest(s)}))}removeChannels(e,t){return i(this,void 0,void 0,(function*(){const s=new es(Object.assign(Object.assign({},e),{keySet:this.keySet}));return t?this.sendRequest(s,t):this.sendRequest(s)}))}deleteGroup(e,t){return i(this,void 0,void 0,(function*(){const s=new ns(Object.assign(Object.assign({},e),{keySet:this.keySet}));return t?this.sendRequest(s,t):this.sendRequest(s)}))}}class os extends se{constructor(e){var t,s;super(),this.parameters=e,"apns2"===this.parameters.pushGateway&&(null!==(t=(s=this.parameters).environment)&&void 0!==t||(s.environment="development")),this.parameters.count&&this.parameters.count>1e3&&(this.parameters.count=1e3)}operation(){throw Error("Should be implemented in subclass.")}validate(){const{keySet:{subscribeKey:e},action:t,device:s,pushGateway:n}=this.parameters;return e?s?"add"!==t&&"remove"!==t||"channels"in this.parameters&&0!==this.parameters.channels.length?n?"apns2"!==this.parameters.pushGateway||this.parameters.topic?void 0:"Missing APNS2 topic":"Missing GW Type (pushGateway: gcm or apns2)":"Missing Channels":"Missing Device ID (device)":"Missing Subscribe Key"}parse(e){return i(this,void 0,void 0,(function*(){throw Error("Should be implemented in subclass.")}))}get path(){const{keySet:{subscribeKey:e},action:t,device:s,pushGateway:n}=this.parameters;let r="apns2"===n?`/v2/push/sub-key/${e}/devices-apns2/${s}`:`/v1/push/sub-key/${e}/devices/${s}`;return"remove-device"===t&&(r=`${r}/remove`),r}get queryParameters(){const{start:e,count:t}=this.parameters;let s=Object.assign(Object.assign({type:this.parameters.pushGateway},e?{start:e}:{}),t&&t>0?{count:t}:{});if("channels"in this.parameters&&(s[this.parameters.action]=this.parameters.channels.join(",")),"apns2"===this.parameters.pushGateway){const{environment:e,topic:t}=this.parameters;s=Object.assign(Object.assign({},s),{environment:e,topic:t})}return s}}class as extends os{constructor(e){super(Object.assign(Object.assign({},e),{action:"remove"}))}operation(){return re.PNRemovePushNotificationEnabledChannelsOperation}parse(e){return i(this,void 0,void 0,(function*(){if(!this.deserializeResponse(e))throw new d("Service response error, check status for details",p("Unable to deserialize service response"));return{}}))}}class cs extends os{constructor(e){super(Object.assign(Object.assign({},e),{action:"list"}))}operation(){return re.PNPushNotificationEnabledChannelsOperation}parse(e){return i(this,void 0,void 0,(function*(){const t=this.deserializeResponse(e);if(!t)throw new d("Service response error, check status for details",p("Unable to deserialize service response"));return{channels:t}}))}}class us extends os{constructor(e){super(Object.assign(Object.assign({},e),{action:"add"}))}operation(){return re.PNAddPushNotificationEnabledChannelsOperation}parse(e){return i(this,void 0,void 0,(function*(){if(!this.deserializeResponse(e))throw new d("Service response error, check status for details",p("Unable to deserialize service response"));return{}}))}}class ls extends os{constructor(e){super(Object.assign(Object.assign({},e),{action:"remove-device"}))}operation(){return re.PNRemoveAllPushNotificationsOperation}parse(e){return i(this,void 0,void 0,(function*(){if(!this.deserializeResponse(e))throw new d("Service response error, check status for details",p("Unable to deserialize service response"));return{}}))}}class hs{constructor(e,t){this.keySet=e,this.sendRequest=t}listChannels(e,t){return i(this,void 0,void 0,(function*(){const s=new cs(Object.assign(Object.assign({},e),{keySet:this.keySet}));return t?this.sendRequest(s,t):this.sendRequest(s)}))}addChannels(e,t){return i(this,void 0,void 0,(function*(){const s=new us(Object.assign(Object.assign({},e),{keySet:this.keySet}));return t?this.sendRequest(s,t):this.sendRequest(s)}))}removeChannels(e,t){return i(this,void 0,void 0,(function*(){const s=new as(Object.assign(Object.assign({},e),{keySet:this.keySet}));return t?this.sendRequest(s,t):this.sendRequest(s)}))}deleteDevice(e,t){return i(this,void 0,void 0,(function*(){const s=new ls(Object.assign(Object.assign({},e),{keySet:this.keySet}));return t?this.sendRequest(s,t):this.sendRequest(s)}))}}class ds extends se{constructor(e){var t,s,n,r,i,o;super(),this.parameters=e,null!==(t=e.include)&&void 0!==t||(e.include={}),null!==(s=(i=e.include).customFields)&&void 0!==s||(i.customFields=false),null!==(n=(o=e.include).totalCount)&&void 0!==n||(o.totalCount=false),null!==(r=e.limit)&&void 0!==r||(e.limit=100)}operation(){return re.PNGetAllChannelMetadataOperation}parse(e){return i(this,void 0,void 0,(function*(){const t=this.deserializeResponse(e);if(!t)throw new d("Service response error, check status for details",p("Unable to deserialize service response"));if(t.status>=400)throw A.create(e);return t}))}get path(){return`/v2/objects/${this.parameters.keySet.subscribeKey}/channels`}get queryParameters(){const{include:e,page:t,filter:s,sort:n,limit:r}=this.parameters;let i="";return i="string"==typeof n?n:Object.entries(null!=n?n:{}).map((([e,t])=>null!==t?`${e}:${t}`:e)),Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({include:["status","type",...e.customFields?["custom"]:[]].join(","),count:`${e.totalCount}`},s?{filter:s}:{}),(null==t?void 0:t.next)?{start:t.next}:{}),(null==t?void 0:t.prev)?{end:t.prev}:{}),r?{limit:r}:{}),i.length?{sort:i}:{})}}class ps extends se{constructor(e){super({method:H.DELETE}),this.parameters=e}operation(){return re.PNRemoveChannelMetadataOperation}validate(){if(!this.parameters.channel)return"Channel cannot be empty"}parse(e){return i(this,void 0,void 0,(function*(){const t=this.deserializeResponse(e);if(!t)throw new d("Service response error, check status for details",p("Unable to deserialize service response"));if(t.status>=400)throw A.create(e);return t}))}get path(){const{keySet:{subscribeKey:e},channel:t}=this.parameters;return`/v2/objects/${e}/channels/${I(t)}`}}class gs extends se{constructor(e){var t,s,n,r,i,o,a,c,u,l,h,d,p,g,y,f;super(),this.parameters=e,null!==(t=e.include)&&void 0!==t||(e.include={}),null!==(s=(l=e.include).customFields)&&void 0!==s||(l.customFields=false),null!==(n=(h=e.include).totalCount)&&void 0!==n||(h.totalCount=false),null!==(r=(d=e.include).statusField)&&void 0!==r||(d.statusField=false),null!==(i=(p=e.include).channelFields)&&void 0!==i||(p.channelFields=false),null!==(o=(g=e.include).customChannelFields)&&void 0!==o||(g.customChannelFields=false),null!==(a=(y=e.include).channelStatusField)&&void 0!==a||(y.channelStatusField=false),null!==(c=(f=e.include).channelTypeField)&&void 0!==c||(f.channelTypeField=false),null!==(u=e.limit)&&void 0!==u||(e.limit=100),this.parameters.userId&&(this.parameters.uuid=this.parameters.userId)}operation(){return re.PNGetMembershipsOperation}validate(){if(!this.parameters.uuid)return"'uuid' cannot be empty"}parse(e){return i(this,void 0,void 0,(function*(){const t=this.deserializeResponse(e);if(!t)throw new d("Service response error, check status for details",p("Unable to deserialize service response"));if(t.status>=400)throw A.create(e);return t}))}get path(){const{keySet:{subscribeKey:e},uuid:t}=this.parameters;return`/v2/objects/${e}/uuids/${I(t)}/channels`}get queryParameters(){const{include:e,page:t,filter:s,sort:n,limit:r}=this.parameters;let i="";i="string"==typeof n?n:Object.entries(null!=n?n:{}).map((([e,t])=>null!==t?`${e}:${t}`:e));const o=[];return e.statusField&&o.push("status"),e.customFields&&o.push("custom"),e.channelFields&&o.push("channel"),e.channelStatusField&&o.push("channel.status"),e.channelTypeField&&o.push("channel.type"),e.customChannelFields&&o.push("channel.custom"),Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({count:`${e.totalCount}`},o.length>0?{include:o.join(",")}:{}),s?{filter:s}:{}),(null==t?void 0:t.next)?{start:t.next}:{}),(null==t?void 0:t.prev)?{end:t.prev}:{}),r?{limit:r}:{}),i.length?{sort:i}:{})}}class ys extends se{constructor(e){var t,s,n,r,i,o,a,c,u,l;super({method:H.PATCH}),this.parameters=e,null!==(t=e.include)&&void 0!==t||(e.include={}),null!==(s=(a=e.include).customFields)&&void 0!==s||(a.customFields=false),null!==(n=(c=e.include).totalCount)&&void 0!==n||(c.totalCount=false),null!==(r=(u=e.include).channelFields)&&void 0!==r||(u.channelFields=false),null!==(i=(l=e.include).customChannelFields)&&void 0!==i||(l.customChannelFields=false),null!==(o=e.limit)&&void 0!==o||(e.limit=100),this.parameters.userId&&(this.parameters.uuid=this.parameters.userId)}operation(){return re.PNSetMembershipsOperation}validate(){const{uuid:e,channels:t}=this.parameters;return e?t&&0!==t.length?void 0:"Channels cannot be empty":"'uuid' cannot be empty"}parse(e){return i(this,void 0,void 0,(function*(){const t=this.deserializeResponse(e);if(!t)throw new d("Service response error, check status for details",p("Unable to deserialize service response"));if(t.status>=400)throw A.create(e);return t}))}get path(){const{keySet:{subscribeKey:e},uuid:t}=this.parameters;return`/v2/objects/${e}/uuids/${I(t)}/channels`}get queryParameters(){const{include:e,page:t,filter:s,sort:n,limit:r}=this.parameters;let i="";i="string"==typeof n?n:Object.entries(null!=n?n:{}).map((([e,t])=>null!==t?`${e}:${t}`:e));const o=["channel.status","channel.type","status"];return e.customFields&&o.push("custom"),e.channelFields&&o.push("channel"),e.customChannelFields&&o.push("channel.custom"),Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({count:`${e.totalCount}`},o.length>0?{include:o.join(",")}:{}),s?{filter:s}:{}),(null==t?void 0:t.next)?{start:t.next}:{}),(null==t?void 0:t.prev)?{end:t.prev}:{}),r?{limit:r}:{}),i.length?{sort:i}:{})}get body(){const{channels:e,type:t}=this.parameters;return JSON.stringify({[`${t}`]:e.map((e=>"string"==typeof e?{channel:{id:e}}:{channel:{id:e.id},status:e.status,custom:e.custom}))})}}class fs extends se{constructor(e){var t,s,n,r;super(),this.parameters=e,null!==(t=e.include)&&void 0!==t||(e.include={}),null!==(s=(r=e.include).customFields)&&void 0!==s||(r.customFields=false),null!==(n=e.limit)&&void 0!==n||(e.limit=100)}operation(){return re.PNGetAllUUIDMetadataOperation}parse(e){return i(this,void 0,void 0,(function*(){const t=this.deserializeResponse(e);if(!t)throw new d("Service response error, check status for details",p("Unable to deserialize service response"));if(t.status>=400)throw A.create(e);return t}))}get path(){return`/v2/objects/${this.parameters.keySet.subscribeKey}/uuids`}get queryParameters(){const{include:e,page:t,filter:s,sort:n,limit:r}=this.parameters;let i="";return i="string"==typeof n?n:Object.entries(null!=n?n:{}).map((([e,t])=>null!==t?`${e}:${t}`:e)),Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({include:["status","type",...e.customFields?["custom"]:[]].join(",")},void 0!==e.totalCount?{count:`${e.totalCount}`}:{}),s?{filter:s}:{}),(null==t?void 0:t.next)?{start:t.next}:{}),(null==t?void 0:t.prev)?{end:t.prev}:{}),r?{limit:r}:{}),i.length?{sort:i}:{})}}class ms extends se{constructor(e){var t,s,n;super(),this.parameters=e,null!==(t=e.include)&&void 0!==t||(e.include={}),null!==(s=(n=e.include).customFields)&&void 0!==s||(n.customFields=true)}operation(){return re.PNGetChannelMetadataOperation}validate(){if(!this.parameters.channel)return"Channel cannot be empty"}parse(e){return i(this,void 0,void 0,(function*(){const t=this.deserializeResponse(e);if(!t)throw new d("Service response error, check status for details",p("Unable to deserialize service response"));if(t.status>=400)throw A.create(e);return t}))}get path(){const{keySet:{subscribeKey:e},channel:t}=this.parameters;return`/v2/objects/${e}/channels/${I(t)}`}get queryParameters(){return{include:["status","type",...this.parameters.include.customFields?["custom"]:[]].join(",")}}}class bs extends se{constructor(e){var t,s,n;super({method:H.PATCH}),this.parameters=e,null!==(t=e.include)&&void 0!==t||(e.include={}),null!==(s=(n=e.include).customFields)&&void 0!==s||(n.customFields=true)}operation(){return re.PNSetChannelMetadataOperation}validate(){return this.parameters.channel?this.parameters.data?void 0:"Data cannot be empty":"Channel cannot be empty"}parse(e){return i(this,void 0,void 0,(function*(){const t=this.deserializeResponse(e);if(!t)throw new d("Service response error, check status for details",p("Unable to deserialize service response"));if(t.status>=400)throw A.create(e);return t}))}get path(){const{keySet:{subscribeKey:e},channel:t}=this.parameters;return`/v2/objects/${e}/channels/${I(t)}`}get queryParameters(){return{include:["status","type",...this.parameters.include.customFields?["custom"]:[]].join(",")}}get body(){return JSON.stringify(this.parameters.data)}}class vs extends se{constructor(e){super({method:H.DELETE}),this.parameters=e,this.parameters.userId&&(this.parameters.uuid=this.parameters.userId)}operation(){return re.PNRemoveUUIDMetadataOperation}validate(){if(!this.parameters.uuid)return"'uuid' cannot be empty"}parse(e){return i(this,void 0,void 0,(function*(){const t=this.deserializeResponse(e);if(!t)throw new d("Service response error, check status for details",p("Unable to deserialize service response"));if(t.status>=400)throw A.create(e);return t}))}get path(){const{keySet:{subscribeKey:e},uuid:t}=this.parameters;return`/v2/objects/${e}/uuids/${I(t)}`}}class ws extends se{constructor(e){var t,s,n,r,i,o,a,c,u,l,h,d,p,g,y,f;super(),this.parameters=e,null!==(t=e.include)&&void 0!==t||(e.include={}),null!==(s=(l=e.include).customFields)&&void 0!==s||(l.customFields=false),null!==(n=(h=e.include).totalCount)&&void 0!==n||(h.totalCount=false),null!==(r=(d=e.include).statusField)&&void 0!==r||(d.statusField=false),null!==(i=(p=e.include).UUIDFields)&&void 0!==i||(p.UUIDFields=false),null!==(o=(g=e.include).customUUIDFields)&&void 0!==o||(g.customUUIDFields=false),null!==(a=(y=e.include).UUIDStatusField)&&void 0!==a||(y.UUIDStatusField=false),null!==(c=(f=e.include).UUIDTypeField)&&void 0!==c||(f.UUIDTypeField=false),null!==(u=e.limit)&&void 0!==u||(e.limit=100)}operation(){return re.PNSetMembersOperation}validate(){if(!this.parameters.channel)return"Channel cannot be empty"}parse(e){return i(this,void 0,void 0,(function*(){const t=this.deserializeResponse(e);if(!t)throw new d("Service response error, check status for details",p("Unable to deserialize service response"));if(t.status>=400)throw A.create(e);return t}))}get path(){const{keySet:{subscribeKey:e},channel:t}=this.parameters;return`/v2/objects/${e}/channels/${I(t)}/uuids`}get queryParameters(){const{include:e,page:t,filter:s,sort:n,limit:r}=this.parameters;let i="";i="string"==typeof n?n:Object.entries(null!=n?n:{}).map((([e,t])=>null!==t?`${e}:${t}`:e));const o=[];return e.statusField&&o.push("status"),e.customFields&&o.push("custom"),e.UUIDFields&&o.push("uuid"),e.UUIDStatusField&&o.push("uuid.status"),e.UUIDTypeField&&o.push("uuid.type"),e.customUUIDFields&&o.push("uuid.custom"),Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({count:`${e.totalCount}`},o.length>0?{include:o.join(",")}:{}),s?{filter:s}:{}),(null==t?void 0:t.next)?{start:t.next}:{}),(null==t?void 0:t.prev)?{end:t.prev}:{}),r?{limit:r}:{}),i.length?{sort:i}:{})}}class Ss extends se{constructor(e){var t,s,n,r,i,o,a,c,u,l;super({method:H.PATCH}),this.parameters=e,null!==(t=e.include)&&void 0!==t||(e.include={}),null!==(s=(a=e.include).customFields)&&void 0!==s||(a.customFields=false),null!==(n=(c=e.include).totalCount)&&void 0!==n||(c.totalCount=false),null!==(r=(u=e.include).UUIDFields)&&void 0!==r||(u.UUIDFields=false),null!==(i=(l=e.include).customUUIDFields)&&void 0!==i||(l.customUUIDFields=false),null!==(o=e.limit)&&void 0!==o||(e.limit=100)}operation(){return re.PNSetMembersOperation}validate(){const{channel:e,uuids:t}=this.parameters;return e?t&&0!==t.length?void 0:"UUIDs cannot be empty":"Channel cannot be empty"}parse(e){return i(this,void 0,void 0,(function*(){const t=this.deserializeResponse(e);if(!t)throw new d("Service response error, check status for details",p("Unable to deserialize service response"));if(t.status>=400)throw A.create(e);return t}))}get path(){const{keySet:{subscribeKey:e},channel:t}=this.parameters;return`/v2/objects/${e}/channels/${I(t)}/uuids`}get queryParameters(){const{include:e,page:t,filter:s,sort:n,limit:r}=this.parameters;let i="";i="string"==typeof n?n:Object.entries(null!=n?n:{}).map((([e,t])=>null!==t?`${e}:${t}`:e));const o=["uuid.status","uuid.type","type"];return e.customFields&&o.push("custom"),e.UUIDFields&&o.push("uuid"),e.customUUIDFields&&o.push("uuid.custom"),Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({count:`${e.totalCount}`},o.length>0?{include:o.join(",")}:{}),s?{filter:s}:{}),(null==t?void 0:t.next)?{start:t.next}:{}),(null==t?void 0:t.prev)?{end:t.prev}:{}),r?{limit:r}:{}),i.length?{sort:i}:{})}get body(){const{uuids:e,type:t}=this.parameters;return JSON.stringify({[`${t}`]:e.map((e=>"string"==typeof e?{uuid:{id:e}}:{uuid:{id:e.id},status:e.status,custom:e.custom}))})}}class ks extends se{constructor(e){var t,s,n;super(),this.parameters=e,null!==(t=e.include)&&void 0!==t||(e.include={}),null!==(s=(n=e.include).customFields)&&void 0!==s||(n.customFields=true),this.parameters.userId&&(this.parameters.uuid=this.parameters.userId)}operation(){return re.PNGetUUIDMetadataOperation}validate(){if(!this.parameters.uuid)return"'uuid' cannot be empty"}parse(e){return i(this,void 0,void 0,(function*(){const t=this.deserializeResponse(e);if(!t)throw new d("Service response error, check status for details",p("Unable to deserialize service response"));if(t.status>=400)throw A.create(e);return t}))}get path(){const{keySet:{subscribeKey:e},uuid:t}=this.parameters;return`/v2/objects/${e}/uuids/${I(t)}`}get queryParameters(){const{include:e}=this.parameters;return{include:["status","type",...e.customFields?["custom"]:[]].join(",")}}}class Es extends se{constructor(e){var t,s,n;super({method:H.PATCH}),this.parameters=e,null!==(t=e.include)&&void 0!==t||(e.include={}),null!==(s=(n=e.include).customFields)&&void 0!==s||(n.customFields=true),this.parameters.userId&&(this.parameters.uuid=this.parameters.userId)}operation(){return re.PNSetUUIDMetadataOperation}validate(){return this.parameters.uuid?this.parameters.data?void 0:"Data cannot be empty":"'uuid' cannot be empty"}parse(e){return i(this,void 0,void 0,(function*(){const t=this.deserializeResponse(e);if(!t)throw new d("Service response error, check status for details",p("Unable to deserialize service response"));if(t.status>=400)throw A.create(e);return t}))}get path(){const{keySet:{subscribeKey:e},uuid:t}=this.parameters;return`/v2/objects/${e}/uuids/${I(t)}`}get queryParameters(){return{include:["status","type",...this.parameters.include.customFields?["custom"]:[]].join(",")}}get body(){return JSON.stringify(this.parameters.data)}}class Os{constructor(e,t){this.configuration=e,this.sendRequest=t,this.keySet=e.keySet}getAllUUIDMetadata(e,t){return i(this,void 0,void 0,(function*(){return this._getAllUUIDMetadata(e,t)}))}_getAllUUIDMetadata(e,t){return i(this,void 0,void 0,(function*(){const s=e&&"function"!=typeof e?e:{};null!=t||(t="function"==typeof e?e:void 0);const n=new fs(Object.assign(Object.assign({},s),{keySet:this.keySet}));return t?this.sendRequest(n,t):this.sendRequest(n)}))}getUUIDMetadata(e,t){return i(this,void 0,void 0,(function*(){return this._getUUIDMetadata(e,t)}))}_getUUIDMetadata(e,t){return i(this,void 0,void 0,(function*(){var s;const n=e&&"function"!=typeof e?e:{};null!=t||(t="function"==typeof e?e:void 0),n.userId&&(n.uuid=n.userId),null!==(s=n.uuid)&&void 0!==s||(n.uuid=this.configuration.userId);const r=new ks(Object.assign(Object.assign({},n),{keySet:this.keySet}));return t?this.sendRequest(r,t):this.sendRequest(r)}))}setUUIDMetadata(e,t){return i(this,void 0,void 0,(function*(){return this._setUUIDMetadata(e,t)}))}_setUUIDMetadata(e,t){return i(this,void 0,void 0,(function*(){var s;e.userId&&(e.uuid=e.userId),null!==(s=e.uuid)&&void 0!==s||(e.uuid=this.configuration.userId);const n=new Es(Object.assign(Object.assign({},e),{keySet:this.keySet}));return t?this.sendRequest(n,t):this.sendRequest(n)}))}removeUUIDMetadata(e,t){return i(this,void 0,void 0,(function*(){return this._removeUUIDMetadata(e,t)}))}_removeUUIDMetadata(e,t){return i(this,void 0,void 0,(function*(){var s;const n=e&&"function"!=typeof e?e:{};null!=t||(t="function"==typeof e?e:void 0),n.userId&&(n.uuid=n.userId),null!==(s=n.uuid)&&void 0!==s||(n.uuid=this.configuration.userId);const r=new vs(Object.assign(Object.assign({},n),{keySet:this.keySet}));return t?this.sendRequest(r,t):this.sendRequest(r)}))}getAllChannelMetadata(e,t){return i(this,void 0,void 0,(function*(){return this._getAllChannelMetadata(e,t)}))}_getAllChannelMetadata(e,t){return i(this,void 0,void 0,(function*(){const s=e&&"function"!=typeof e?e:{};null!=t||(t="function"==typeof e?e:void 0);const n=new ds(Object.assign(Object.assign({},s),{keySet:this.keySet}));return t?this.sendRequest(n,t):this.sendRequest(n)}))}getChannelMetadata(e,t){return i(this,void 0,void 0,(function*(){return this._getChannelMetadata(e,t)}))}_getChannelMetadata(e,t){return i(this,void 0,void 0,(function*(){const s=new ms(Object.assign(Object.assign({},e),{keySet:this.keySet}));return t?this.sendRequest(s,t):this.sendRequest(s)}))}setChannelMetadata(e,t){return i(this,void 0,void 0,(function*(){return this._setChannelMetadata(e,t)}))}_setChannelMetadata(e,t){return i(this,void 0,void 0,(function*(){const s=new bs(Object.assign(Object.assign({},e),{keySet:this.keySet}));return t?this.sendRequest(s,t):this.sendRequest(s)}))}removeChannelMetadata(e,t){return i(this,void 0,void 0,(function*(){return this._removeChannelMetadata(e,t)}))}_removeChannelMetadata(e,t){return i(this,void 0,void 0,(function*(){const s=new ps(Object.assign(Object.assign({},e),{keySet:this.keySet}));return t?this.sendRequest(s,t):this.sendRequest(s)}))}getChannelMembers(e,t){return i(this,void 0,void 0,(function*(){const s=new ws(Object.assign(Object.assign({},e),{keySet:this.keySet}));return t?this.sendRequest(s,t):this.sendRequest(s)}))}setChannelMembers(e,t){return i(this,void 0,void 0,(function*(){const s=new Ss(Object.assign(Object.assign({},e),{type:"set",keySet:this.keySet}));return t?this.sendRequest(s,t):this.sendRequest(s)}))}removeChannelMembers(e,t){return i(this,void 0,void 0,(function*(){const s=new Ss(Object.assign(Object.assign({},e),{type:"delete",keySet:this.keySet}));return t?this.sendRequest(s,t):this.sendRequest(s)}))}getMemberships(e,t){return i(this,void 0,void 0,(function*(){var s;const n=e&&"function"!=typeof e?e:{};null!=t||(t="function"==typeof e?e:void 0),n.userId&&(n.uuid=n.userId),null!==(s=n.uuid)&&void 0!==s||(n.uuid=this.configuration.userId);const r=new gs(Object.assign(Object.assign({},n),{keySet:this.keySet}));return t?this.sendRequest(r,t):this.sendRequest(r)}))}setMemberships(e,t){return i(this,void 0,void 0,(function*(){var s;e.userId&&(e.uuid=e.userId),null!==(s=e.uuid)&&void 0!==s||(e.uuid=this.configuration.userId);const n=new ys(Object.assign(Object.assign({},e),{type:"set",keySet:this.keySet}));return t?this.sendRequest(n,t):this.sendRequest(n)}))}removeMemberships(e,t){return i(this,void 0,void 0,(function*(){var s;e.userId&&(e.uuid=e.userId),null!==(s=e.uuid)&&void 0!==s||(e.uuid=this.configuration.userId);const n=new ys(Object.assign(Object.assign({},e),{type:"delete",keySet:this.keySet}));return t?this.sendRequest(n,t):this.sendRequest(n)}))}fetchMemberships(e,t){return i(this,void 0,void 0,(function*(){var s,n;if("spaceId"in e){const n=e,r={channel:null!==(s=n.spaceId)&&void 0!==s?s:n.channel,filter:n.filter,limit:n.limit,page:n.page,include:Object.assign({},n.include),sort:n.sort?Object.fromEntries(Object.entries(n.sort).map((([e,t])=>[e.replace("user","uuid"),t]))):void 0},i=e=>({status:e.status,data:e.data.map((e=>({user:e.uuid,custom:e.custom,updated:e.updated,eTag:e.eTag}))),totalCount:e.totalCount,next:e.next,prev:e.prev});return t?this.getChannelMembers(r,((e,s)=>{t(e,s?i(s):s)})):this.getChannelMembers(r).then(i)}const r=e,i={uuid:null!==(n=r.userId)&&void 0!==n?n:r.uuid,filter:r.filter,limit:r.limit,page:r.page,include:Object.assign({},r.include),sort:r.sort?Object.fromEntries(Object.entries(r.sort).map((([e,t])=>[e.replace("space","channel"),t]))):void 0},o=e=>({status:e.status,data:e.data.map((e=>({space:e.channel,custom:e.custom,updated:e.updated,eTag:e.eTag}))),totalCount:e.totalCount,next:e.next,prev:e.prev});return t?this.getMemberships(i,((e,s)=>{t(e,s?o(s):s)})):this.getMemberships(i).then(o)}))}addMemberships(e,t){return i(this,void 0,void 0,(function*(){var s,n,r,i,o,a;if("spaceId"in e){const i=e,o={channel:null!==(s=i.spaceId)&&void 0!==s?s:i.channel,uuids:null!==(r=null===(n=i.users)||void 0===n?void 0:n.map((e=>"string"==typeof e?e:(e.userId,{id:e.userId,custom:e.custom}))))&&void 0!==r?r:i.uuids,limit:0};return t?this.setChannelMembers(o,t):this.setChannelMembers(o)}const c=e,u={uuid:null!==(i=c.userId)&&void 0!==i?i:c.uuid,channels:null!==(a=null===(o=c.spaces)||void 0===o?void 0:o.map((e=>"string"==typeof e?e:{id:e.spaceId,custom:e.custom})))&&void 0!==a?a:c.channels,limit:0};return t?this.setMemberships(u,t):this.setMemberships(u)}))}}class Cs extends se{constructor(){super()}operation(){return re.PNTimeOperation}parse(e){return i(this,void 0,void 0,(function*(){const t=this.deserializeResponse(e);if(!t)throw new d("Service response error, check status for details",p("Unable to deserialize service response"));return{timetoken:t[0]}}))}get path(){return"/time/0"}}class Ns extends se{constructor(e){super(),this.parameters=e}operation(){return re.PNDownloadFileOperation}validate(){const{channel:e,id:t,name:s}=this.parameters;return e?t?s?void 0:"file name can't be empty":"file id can't be empty":"channel can't be empty"}parse(e){return i(this,void 0,void 0,(function*(){const{cipherKey:t,crypto:s,cryptography:n,name:r,PubNubFile:i}=this.parameters,o=e.headers["content-type"];let a,c=e.body;return i.supportsEncryptFile&&(t||s)&&(t&&n?c=yield n.decrypt(t,c):!t&&s&&(a=yield s.decryptFile(i.create({data:c,name:r,mimeType:o}),i))),a||i.create({data:c,name:r,mimeType:o})}))}get path(){const{keySet:{subscribeKey:e},channel:t,id:s,name:n}=this.parameters;return`/v1/files/${e}/channels/${I(t)}/files/${s}/${n}`}}class Ps{static notificationPayload(e,t){return new te(e,t)}static generateUUID(){return K.createUUID()}constructor(e){if(this._configuration=e.configuration,this.cryptography=e.cryptography,this.tokenManager=e.tokenManager,this.transport=e.transport,this.crypto=e.crypto,this._objects=new Os(this._configuration,this.sendRequest.bind(this)),this._channelGroups=new is(this._configuration.keySet,this.sendRequest.bind(this)),this._push=new hs(this._configuration.keySet,this.sendRequest.bind(this)),this.listenerManager=new W,this.eventEmitter=new ce(this.listenerManager),this._configuration.enableEventEngine){let e=this._configuration.getHeartbeatInterval();this.presenceState={},e&&(this.presenceEventEngine=new $e({heartbeat:this.heartbeat.bind(this),leave:e=>this.makeUnsubscribe(e,(()=>{})),heartbeatDelay:()=>new Promise(((t,s)=>{e=this._configuration.getHeartbeatInterval(),e?setTimeout(t,1e3*e):s(new d("Heartbeat interval has been reset."))})),retryDelay:e=>new Promise((t=>setTimeout(t,e))),emitStatus:e=>this.listenerManager.announceStatus(e),config:this._configuration,presenceState:this.presenceState})),this.eventEngine=new St({handshake:this.subscribeHandshake.bind(this),receiveMessages:this.subscribeReceiveMessages.bind(this),delay:e=>new Promise((t=>setTimeout(t,e))),join:this.join.bind(this),leave:this.leave.bind(this),leaveAll:this.leaveAll.bind(this),presenceState:this.presenceState,config:this._configuration,emitMessages:e=>{try{e.forEach((e=>this.eventEmitter.emitEvent(e)))}catch(e){const t={error:!0,category:h.PNUnknownCategory,errorData:e,statusCode:0};this.listenerManager.announceStatus(t)}},emitStatus:e=>this.listenerManager.announceStatus(e)})}else this.subscriptionManager=new Y(this._configuration,this.listenerManager,this.eventEmitter,this.makeSubscribe.bind(this),this.heartbeat.bind(this),this.makeUnsubscribe.bind(this),this.time.bind(this))}get configuration(){return this._configuration}get _config(){return this.configuration}get authKey(){var e;return null!==(e=this._configuration.authKey)&&void 0!==e?e:void 0}getAuthKey(){return this.authKey}setAuthKey(e){this._configuration.setAuthKey(e)}get userId(){return this._configuration.userId}set userId(e){if(!e||"string"!=typeof e||0===e.trim().length)throw new Error("Missing or invalid userId parameter. Provide a valid string userId");this._configuration.userId=e}getUserId(){return this._configuration.userId}setUserId(e){if(!e||"string"!=typeof e||0===e.trim().length)throw new Error("Missing or invalid userId parameter. Provide a valid string userId");this._configuration.userId=e}get filterExpression(){var e;return null!==(e=this._configuration.getFilterExpression())&&void 0!==e?e:void 0}getFilterExpression(){return this.filterExpression}set filterExpression(e){this._configuration.setFilterExpression(e)}setFilterExpression(e){this.filterExpression=e}get cipherKey(){return this._configuration.getCipherKey()}set cipherKey(e){this._configuration.setCipherKey(e)}setCipherKey(e){this.cipherKey=e}set heartbeatInterval(e){this._configuration.setHeartbeatInterval(e)}setHeartbeatInterval(e){this.heartbeatInterval=e}getVersion(){return this._configuration.getVersion()}_addPnsdkSuffix(e,t){this._configuration._addPnsdkSuffix(e,t)}getUUID(){return this.userId}setUUID(e){this.userId=e}get customEncrypt(){return this._configuration.getCustomEncrypt()}get customDecrypt(){return this._configuration.getCustomDecrypt()}channel(e){return new Zt(e,this.eventEmitter,this)}channelGroup(e){return new Yt(e,this.eventEmitter,this)}channelMetadata(e){return new Qt(e,this.eventEmitter,this)}userMetadata(e){return new Xt(e,this.eventEmitter,this)}subscriptionSet(e){return new Wt(Object.assign(Object.assign({},e),{eventEmitter:this.eventEmitter,pubnub:this}))}sendRequest(e,t){return i(this,void 0,void 0,(function*(){const s=e.validate();if(s){if(t)return t(p(s),null);throw new d("Validation failed, check status for details",p(s))}const n=e.request();n.formData&&n.formData.length>0?n.timeout=300:e.operation()===re.PNSubscribeOperation?n.timeout=this._configuration.getSubscribeTimeout():n.timeout=this._configuration.getTransactionTimeout();const r={error:!1,operation:e.operation(),category:h.PNAcknowledgmentCategory,statusCode:0},[i,o]=this.transport.makeSendable(n);return e.cancellationController=o||null,i.then((t=>{if(r.statusCode=t.status,200!==t.status&&204!==t.status){const e=t.headers["content-type"];if(e||-1!==e.indexOf("javascript")||-1!==e.indexOf("json")){const e=JSON.parse(Ps.decoder.decode(t.body));"object"==typeof e&&"error"in e&&e.error&&"object"==typeof e.error&&(r.errorData=e.error)}}return e.parse(t)})).then((e=>t?t(r,e):e)).catch((s=>{const n=s instanceof A?s:A.create(s);if(t)return t(n.toStatus(e.operation()),null);throw n.toPubNubError(e.operation(),"REST API request processing error, check status for details")}))}))}destroy(e){this.subscriptionManager?(this.subscriptionManager.unsubscribeAll(e),this.subscriptionManager.disconnect()):this.eventEngine&&this.eventEngine.dispose()}stop(){this.destroy()}addListener(e){this.listenerManager.addListener(e)}removeListener(e){this.listenerManager.removeListener(e)}removeAllListeners(){this.listenerManager.removeAllListeners()}publish(e,t){return i(this,void 0,void 0,(function*(){{const s=new kt(Object.assign(Object.assign({},e),{keySet:this._configuration.keySet,crypto:this._configuration.getCryptoModule()}));return t?this.sendRequest(s,t):this.sendRequest(s)}}))}signal(e,t){return i(this,void 0,void 0,(function*(){{const s=new Et(Object.assign(Object.assign({},e),{keySet:this._configuration.keySet}));return t?this.sendRequest(s,t):this.sendRequest(s)}}))}fire(e,t){return i(this,void 0,void 0,(function*(){return null!=t||(t=()=>{}),this.publish(Object.assign(Object.assign({},e),{replicate:!1,storeInHistory:!1}),t)}))}getSubscribedChannels(){return this.subscriptionManager?this.subscriptionManager.subscribedChannels:this.eventEngine?this.eventEngine.getSubscribedChannels():[]}getSubscribedChannelGroups(){return this.subscriptionManager?this.subscriptionManager.subscribedChannelGroups:this.eventEngine?this.eventEngine.getSubscribedChannelGroups():[]}subscribe(e){this.subscriptionManager?this.subscriptionManager.subscribe(e):this.eventEngine&&this.eventEngine.subscribe(e)}makeSubscribe(e,t){{const s=new ae(Object.assign(Object.assign({},e),{keySet:this._configuration.keySet,crypto:this._configuration.getCryptoModule(),getFileUrl:this.getFileUrl.bind(this)}));if(this.sendRequest(s,((e,n)=>{var r;this.subscriptionManager&&(null===(r=this.subscriptionManager.abort)||void 0===r?void 0:r.identifier)===s.requestIdentifier&&(this.subscriptionManager.abort=null),t(e,n)})),this.subscriptionManager){const e=()=>s.abort();e.identifier=s.requestIdentifier,this.subscriptionManager.abort=e}}}unsubscribe(e){this.subscriptionManager?this.subscriptionManager.unsubscribe(e):this.eventEngine&&this.eventEngine.unsubscribe(e)}makeUnsubscribe(e,t){this.sendRequest(new _t(Object.assign(Object.assign({},e),{keySet:this._configuration.keySet})),t)}unsubscribeAll(){this.subscriptionManager?this.subscriptionManager.unsubscribeAll():this.eventEngine&&this.eventEngine.unsubscribeAll()}disconnect(){this.subscriptionManager?this.subscriptionManager.disconnect():this.eventEngine&&this.eventEngine.disconnect()}reconnect(e){this.subscriptionManager?this.subscriptionManager.reconnect():this.eventEngine&&this.eventEngine.reconnect(null!=e?e:{})}subscribeHandshake(e){return i(this,void 0,void 0,(function*(){{const t=new Ct(Object.assign(Object.assign({},e),{keySet:this._configuration.keySet,crypto:this._configuration.getCryptoModule(),getFileUrl:this.getFileUrl.bind(this)})),s=e.abortSignal.subscribe((e=>{t.abort()}));return this.sendRequest(t).then((e=>(s(),e.cursor)))}}))}subscribeReceiveMessages(e){return i(this,void 0,void 0,(function*(){{const t=new Ot(Object.assign(Object.assign({},e),{keySet:this._configuration.keySet,crypto:this._configuration.getCryptoModule(),getFileUrl:this.getFileUrl.bind(this)})),s=e.abortSignal.subscribe((e=>{t.abort()}));return this.sendRequest(t).then((e=>(s(),e)))}}))}getMessageActions(e,t){return i(this,void 0,void 0,(function*(){{const s=new xt(Object.assign(Object.assign({},e),{keySet:this._configuration.keySet}));return t?this.sendRequest(s,t):this.sendRequest(s)}}))}addMessageAction(e,t){return i(this,void 0,void 0,(function*(){{const s=new Dt(Object.assign(Object.assign({},e),{keySet:this._configuration.keySet}));return t?this.sendRequest(s,t):this.sendRequest(s)}}))}removeMessageAction(e,t){return i(this,void 0,void 0,(function*(){{const s=new qt(Object.assign(Object.assign({},e),{keySet:this._configuration.keySet}));return t?this.sendRequest(s,t):this.sendRequest(s)}}))}fetchMessages(e,t){return i(this,void 0,void 0,(function*(){{const s=new Ft(Object.assign(Object.assign({},e),{keySet:this._configuration.keySet,crypto:this._configuration.getCryptoModule(),getFileUrl:this.getFileUrl.bind(this)}));return t?this.sendRequest(s,t):this.sendRequest(s)}}))}deleteMessages(e,t){return i(this,void 0,void 0,(function*(){{const s=new It(Object.assign(Object.assign({},e),{keySet:this._configuration.keySet}));return t?this.sendRequest(s,t):this.sendRequest(s)}}))}messageCounts(e,t){return i(this,void 0,void 0,(function*(){{const s=new Rt(Object.assign(Object.assign({},e),{keySet:this._configuration.keySet}));return t?this.sendRequest(s,t):this.sendRequest(s)}}))}history(e,t){return i(this,void 0,void 0,(function*(){{const s=new Ut(Object.assign(Object.assign({},e),{keySet:this._configuration.keySet,crypto:this._configuration.getCryptoModule()}));return t?this.sendRequest(s,t):this.sendRequest(s)}}))}hereNow(e,t){return i(this,void 0,void 0,(function*(){{const s=new jt(Object.assign(Object.assign({},e),{keySet:this._configuration.keySet}));return t?this.sendRequest(s,t):this.sendRequest(s)}}))}whereNow(e,t){return i(this,void 0,void 0,(function*(){var s;{const n=new At({uuid:null!==(s=e.uuid)&&void 0!==s?s:this._configuration.userId,keySet:this._configuration.keySet});return t?this.sendRequest(n,t):this.sendRequest(n)}}))}getState(e,t){return i(this,void 0,void 0,(function*(){var s;{const n=new Nt(Object.assign(Object.assign({},e),{uuid:null!==(s=e.uuid)&&void 0!==s?s:this._configuration.userId,keySet:this._configuration.keySet}));return t?this.sendRequest(n,t):this.sendRequest(n)}}))}setState(e,t){return i(this,void 0,void 0,(function*(){var s,n;{const{keySet:r,userId:i}=this._configuration,o=this._configuration.getPresenceTimeout();let a;if(this._configuration.enableEventEngine&&this.presenceState){const t=this.presenceState;null===(s=e.channels)||void 0===s||s.forEach((s=>t[s]=e.state)),"channelGroups"in e&&(null===(n=e.channelGroups)||void 0===n||n.forEach((s=>t[s]=e.state)))}return a="withHeartbeat"in e?new Mt(Object.assign(Object.assign({},e),{keySet:r,heartbeat:o})):new Pt(Object.assign(Object.assign({},e),{keySet:r,uuid:i})),this.subscriptionManager&&this.subscriptionManager.setState(e),t?this.sendRequest(a,t):this.sendRequest(a)}}))}presence(e){var t;null===(t=this.subscriptionManager)||void 0===t||t.changePresence(e)}heartbeat(e,t){return i(this,void 0,void 0,(function*(){{const s=new Mt(Object.assign(Object.assign({},e),{keySet:this._configuration.keySet}));return t?this.sendRequest(s,t):this.sendRequest(s)}}))}join(e){var t;null===(t=this.presenceEventEngine)||void 0===t||t.join(e)}leave(e){var t;null===(t=this.presenceEventEngine)||void 0===t||t.leave(e)}leaveAll(){var e;null===(e=this.presenceEventEngine)||void 0===e||e.leaveAll()}grantToken(e,t){return i(this,void 0,void 0,(function*(){throw new Error("Grant Token error: PAM module disabled")}))}revokeToken(e,t){return i(this,void 0,void 0,(function*(){throw new Error("Revoke Token error: PAM module disabled")}))}get token(){return this.tokenManager&&this.tokenManager.getToken()}getToken(){return this.token}set token(e){this.tokenManager&&this.tokenManager.setToken(e)}setToken(e){this.token=e}parseToken(e){return this.tokenManager&&this.tokenManager.parseToken(e)}grant(e,t){return i(this,void 0,void 0,(function*(){throw new Error("Grant error: PAM module disabled")}))}audit(e,t){return i(this,void 0,void 0,(function*(){throw new Error("Grant Permissions error: PAM module disabled")}))}get objects(){return this._objects}fetchUsers(e,t){return i(this,void 0,void 0,(function*(){return this.objects._getAllUUIDMetadata(e,t)}))}fetchUser(e,t){return i(this,void 0,void 0,(function*(){return this.objects._getUUIDMetadata(e,t)}))}createUser(e,t){return i(this,void 0,void 0,(function*(){return this.objects._setUUIDMetadata(e,t)}))}updateUser(e,t){return i(this,void 0,void 0,(function*(){return this.objects._setUUIDMetadata(e,t)}))}removeUser(e,t){return i(this,void 0,void 0,(function*(){return this.objects._removeUUIDMetadata(e,t)}))}fetchSpaces(e,t){return i(this,void 0,void 0,(function*(){return this.objects._getAllChannelMetadata(e,t)}))}fetchSpace(e,t){return i(this,void 0,void 0,(function*(){return this.objects._getChannelMetadata(e,t)}))}createSpace(e,t){return i(this,void 0,void 0,(function*(){return this.objects._setChannelMetadata(e,t)}))}updateSpace(e,t){return i(this,void 0,void 0,(function*(){return this.objects._setChannelMetadata(e,t)}))}removeSpace(e,t){return i(this,void 0,void 0,(function*(){return this.objects._removeChannelMetadata(e,t)}))}fetchMemberships(e,t){return i(this,void 0,void 0,(function*(){return this.objects.fetchMemberships(e,t)}))}addMemberships(e,t){return i(this,void 0,void 0,(function*(){return this.objects.addMemberships(e,t)}))}updateMemberships(e,t){return i(this,void 0,void 0,(function*(){return this.objects.addMemberships(e,t)}))}removeMemberships(e,t){return i(this,void 0,void 0,(function*(){var s,n,r;{if("spaceId"in e){const r=e,i={channel:null!==(s=r.spaceId)&&void 0!==s?s:r.channel,uuids:null!==(n=r.userIds)&&void 0!==n?n:r.uuids,limit:0};return t?this.objects.removeChannelMembers(i,t):this.objects.removeChannelMembers(i)}const i=e,o={uuid:i.userId,channels:null!==(r=i.spaceIds)&&void 0!==r?r:i.channels,limit:0};return t?this.objects.removeMemberships(o,t):this.objects.removeMemberships(o)}}))}get channelGroups(){return this._channelGroups}get push(){return this._push}sendFile(e,t){return i(this,void 0,void 0,(function*(){{if(!this._configuration.PubNubFile)throw new Error("Validation failed: 'PubNubFile' not configured or file upload not supported by the platform.");const s=new zt(Object.assign(Object.assign({},e),{keySet:this._configuration.keySet,PubNubFile:this._configuration.PubNubFile,fileUploadPublishRetryLimit:this._configuration.fileUploadPublishRetryLimit,file:e.file,sendRequest:this.sendRequest.bind(this),publishFile:this.publishFile.bind(this),crypto:this._configuration.getCryptoModule(),cryptography:this.cryptography?this.cryptography:void 0})),n={error:!1,operation:re.PNPublishFileOperation,category:h.PNAcknowledgmentCategory,statusCode:0};return s.process().then((e=>(n.statusCode=e.status,t?t(n,e):e))).catch((e=>{let s;throw e instanceof d?s=e.status:e instanceof A&&(s=e.toStatus(n.operation)),t&&s&&t(s,null),new d("REST API request processing error, check status for details",s)}))}}))}publishFile(e,t){return i(this,void 0,void 0,(function*(){{if(!this._configuration.PubNubFile)throw new Error("Validation failed: 'PubNubFile' not configured or file upload not supported by the platform.");const s=new Gt(Object.assign(Object.assign({},e),{keySet:this._configuration.keySet,crypto:this._configuration.getCryptoModule()}));return t?this.sendRequest(s,t):this.sendRequest(s)}}))}listFiles(e,t){return i(this,void 0,void 0,(function*(){{const s=new Lt(Object.assign(Object.assign({},e),{keySet:this._configuration.keySet}));return t?this.sendRequest(s,t):this.sendRequest(s)}}))}getFileUrl(e){var t;{const s=this.transport.request(new Kt(Object.assign(Object.assign({},e),{keySet:this._configuration.keySet})).request()),n=null!==(t=s.queryParameters)&&void 0!==t?t:{},r=Object.keys(n).map((e=>{const t=n[e];return Array.isArray(t)?t.map((t=>`${e}=${I(t)}`)).join("&"):`${e}=${I(t)}`})).join("&");return`${s.origin}${s.path}?${r}`}}downloadFile(e,t){return i(this,void 0,void 0,(function*(){{if(!this._configuration.PubNubFile)throw new Error("Validation failed: 'PubNubFile' not configured or file upload not supported by the platform.");const s=new Ns(Object.assign(Object.assign({},e),{keySet:this._configuration.keySet,PubNubFile:this._configuration.PubNubFile,cryptography:this.cryptography?this.cryptography:void 0,crypto:this._configuration.getCryptoModule()}));return t?this.sendRequest(s,t):yield this.sendRequest(s)}}))}deleteFile(e,t){return i(this,void 0,void 0,(function*(){{const s=new $t(Object.assign(Object.assign({},e),{keySet:this._configuration.keySet}));return t?this.sendRequest(s,t):this.sendRequest(s)}}))}time(e){return i(this,void 0,void 0,(function*(){const t=new Cs;return e?this.sendRequest(t,e):this.sendRequest(t)}))}encrypt(e,t){const s=this._configuration.getCryptoModule();if(!t&&s&&"string"==typeof e){const t=s.encrypt(e);return"string"==typeof t?t:u(t)}if(!this.crypto)throw new Error("Encryption error: cypher key not set");return this.crypto.encrypt(e,t)}decrypt(e,t){const s=this._configuration.getCryptoModule();if(!t&&s){const t=s.decrypt(e);return t instanceof ArrayBuffer?JSON.parse((new TextDecoder).decode(t)):t}if(!this.crypto)throw new Error("Decryption error: cypher key not set");return this.crypto.decrypt(e,t)}encryptFile(e,t){return i(this,void 0,void 0,(function*(){var s;if("string"!=typeof e&&(t=e),!t)throw new Error("File encryption error. Source file is missing.");if(!this._configuration.PubNubFile)throw new Error("File encryption error. File constructor not configured.");if("string"!=typeof e&&!this._configuration.getCryptoModule())throw new Error("File encryption error. Crypto module not configured.");if("string"==typeof e){if(!this.cryptography)throw new Error("File encryption error. File encryption not available");return this.cryptography.encryptFile(e,t,this._configuration.PubNubFile)}return null===(s=this._configuration.getCryptoModule())||void 0===s?void 0:s.encryptFile(t,this._configuration.PubNubFile)}))}decryptFile(e,t){return i(this,void 0,void 0,(function*(){var s;if("string"!=typeof e&&(t=e),!t)throw new Error("File encryption error. Source file is missing.");if(!this._configuration.PubNubFile)throw new Error("File decryption error. File constructor not configured.");if("string"==typeof e&&!this._configuration.getCryptoModule())throw new Error("File decryption error. Crypto module not configured.");if("string"==typeof e){if(!this.cryptography)throw new Error("File decryption error. File decryption not available");return this.cryptography.decryptFile(e,t,this._configuration.PubNubFile)}return null===(s=this._configuration.getCryptoModule())||void 0===s?void 0:s.decryptFile(t,this._configuration.PubNubFile)}))}}Ps.decoder=new TextDecoder,Ps.OPERATIONS=re,Ps.CATEGORIES=h,Ps.ExponentialRetryPolicy=Le.ExponentialRetryPolicy,Ps.LinearRetryPolicy=Le.LinearRetryPolicy;class Ms{constructor(e,t){this.decode=e,this.base64ToBinary=t}decodeToken(e){let t="";e.length%4==3?t="=":e.length%4==2&&(t="==");const s=e.replace(/-/gi,"+").replace(/_/gi,"/")+t,n=this.decode(this.base64ToBinary(s));return"object"==typeof n?n:void 0}}class _s extends Ps{constructor(e){var t;const s=D(e),r=Object.assign(Object.assign({},s),{sdkFamily:"Web"});r.PubNubFile=a;const i=$(r,(e=>{if(e.cipherKey)return new P({default:new N(Object.assign({},e)),cryptors:[new S({cipherKey:e.cipherKey})]})}));let o,u,l;o=new B(new Ms((e=>x(n.decode(e))),c)),(i.getCipherKey()||i.secretKey)&&(u=new E({secretKey:i.secretKey,cipherKey:i.getCipherKey(),useRandomIVs:i.getUseRandomIVs(),customEncrypt:i.getCustomEncrypt(),customDecrypt:i.getCustomDecrypt()})),l=new C;let h=new F(i.keepAlive,i.logVerbosity);s.subscriptionWorkerUrl&&(h=new j({clientIdentifier:i._instanceId,subscriptionKey:i.subscribeKey,userId:i.getUserId(),workerUrl:s.subscriptionWorkerUrl,sdkVersion:i.getVersion(),logVerbosity:i.logVerbosity,workerLogVerbosity:r.subscriptionWorkerLogVerbosity,transport:h}));super({configuration:i,transport:new V({clientConfiguration:i,tokenManager:o,transport:h}),cryptography:l,tokenManager:o,crypto:u}),(null===(t=e.listenToBrowserNetworkEvents)||void 0===t||t)&&(window.addEventListener("offline",(()=>{this.networkDownDetected()})),window.addEventListener("online",(()=>{this.networkUpDetected()})))}networkDownDetected(){this.listenerManager.announceNetworkDown(),this._configuration.restore?this.disconnect():this.destroy(!0)}networkUpDetected(){this.listenerManager.announceNetworkUp(),this.reconnect()}}return _s.CryptoModule=P,_s})); +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).PubNub=t()}(this,(function(){"use strict";var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function t(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var s={exports:{}};!function(t){!function(e,s){var n=Math.pow(2,-24),r=Math.pow(2,32),i=Math.pow(2,53);var o={encode:function(e){var t,n=new ArrayBuffer(256),o=new DataView(n),a=0;function c(e){for(var s=n.byteLength,r=a+e;s>2,u=0;u>6),r.push(128|63&o)):o<55296?(r.push(224|o>>12),r.push(128|o>>6&63),r.push(128|63&o)):(o=(1023&o)<<10,o|=1023&t.charCodeAt(++n),o+=65536,r.push(240|o>>18),r.push(128|o>>12&63),r.push(128|o>>6&63),r.push(128|63&o))}return d(3,r.length),h(r);default:var p;if(Array.isArray(t))for(d(4,p=t.length),n=0;n>5!==e)throw"Invalid indefinite length element";return s}function f(e,t){for(var s=0;s>10),e.push(56320|1023&n))}}"function"!=typeof t&&(t=function(e){return e}),"function"!=typeof i&&(i=function(){return s});var m=function e(){var r,d,m=l(),b=m>>5,v=31&m;if(7===b)switch(v){case 25:return function(){var e=new ArrayBuffer(4),t=new DataView(e),s=h(),r=32768&s,i=31744&s,o=1023&s;if(31744===i)i=261120;else if(0!==i)i+=114688;else if(0!==o)return o*n;return t.setUint32(0,r<<16|i<<13|o<<13),t.getFloat32(0)}();case 26:return c(o.getFloat32(a),4);case 27:return c(o.getFloat64(a),8)}if((d=g(v))<0&&(b<2||6=0;)S+=d,w.push(u(d));var k=new Uint8Array(S),E=0;for(r=0;r=0;)f(O,d);else f(O,d);return String.fromCharCode.apply(null,O);case 4:var C;if(d<0)for(C=[];!p();)C.push(e());else for(C=new Array(d),r=0;r{const s=new FileReader;s.addEventListener("load",(()=>{if(s.result instanceof ArrayBuffer)return e(s.result)})),s.addEventListener("error",(()=>t(s.error))),s.readAsArrayBuffer(this.data)}))}))}toString(){return i(this,void 0,void 0,(function*(){return new Promise(((e,t)=>{const s=new FileReader;s.addEventListener("load",(()=>{if("string"==typeof s.result)return e(s.result)})),s.addEventListener("error",(()=>{t(s.error)})),s.readAsBinaryString(this.data)}))}))}toStream(){return i(this,void 0,void 0,(function*(){throw new Error("This feature is only supported in Node.js environments.")}))}toFile(){return i(this,void 0,void 0,(function*(){return this.data}))}toFileUri(){return i(this,void 0,void 0,(function*(){throw new Error("This feature is only supported in React Native environments.")}))}toBlob(){return i(this,void 0,void 0,(function*(){return this.data}))}}a.supportsBlob="undefined"!=typeof Blob,a.supportsFile="undefined"!=typeof File,a.supportsBuffer=!1,a.supportsStream=!1,a.supportsString=!0,a.supportsArrayBuffer=!0,a.supportsEncryptFile=!0,a.supportsFileUri=!1;function c(e){const t=e.replace(/==?$/,""),s=Math.floor(t.length/4*3),n=new ArrayBuffer(s),r=new Uint8Array(n);let i=0;function o(){const e=t.charAt(i++),s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(e);if(-1===s)throw new Error(`Illegal character at ${i}: ${t.charAt(i-1)}`);return s}for(let e=0;e>4,c=(15&s)<<4|n>>2,u=(3&n)<<6|i;r[e]=a,64!=n&&(r[e+1]=c),64!=i&&(r[e+2]=u)}return n}function u(e){let t="";const s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n=new Uint8Array(e),r=n.byteLength,i=r%3,o=r-i;let a,c,u,l,h;for(let e=0;e>18,c=(258048&h)>>12,u=(4032&h)>>6,l=63&h,t+=s[a]+s[c]+s[u]+s[l];return 1==i?(h=n[o],a=(252&h)>>2,c=(3&h)<<4,t+=s[a]+s[c]+"=="):2==i&&(h=n[o]<<8|n[o+1],a=(64512&h)>>10,c=(1008&h)>>4,u=(15&h)<<2,t+=s[a]+s[c]+s[u]+"="),t}var l;!function(e){e.PNNetworkIssuesCategory="PNNetworkIssuesCategory",e.PNTimeoutCategory="PNTimeoutCategory",e.PNCancelledCategory="PNCancelledCategory",e.PNBadRequestCategory="PNBadRequestCategory",e.PNAccessDeniedCategory="PNAccessDeniedCategory",e.PNValidationErrorCategory="PNValidationErrorCategory",e.PNAcknowledgmentCategory="PNAcknowledgmentCategory",e.PNUnknownCategory="PNUnknownCategory",e.PNNetworkUpCategory="PNNetworkUpCategory",e.PNNetworkDownCategory="PNNetworkDownCategory",e.PNReconnectedCategory="PNReconnectedCategory",e.PNConnectedCategory="PNConnectedCategory",e.PNRequestMessageCountExceededCategory="PNRequestMessageCountExceededCategory",e.PNDisconnectedCategory="PNDisconnectedCategory",e.PNConnectionErrorCategory="PNConnectionErrorCategory",e.PNDisconnectedUnexpectedlyCategory="PNDisconnectedUnexpectedlyCategory"}(l||(l={}));var h=l;class d extends Error{constructor(e,t){super(e),this.status=t,this.name="PubNubError",this.message=e,Object.setPrototypeOf(this,new.target.prototype)}}function p(e,t){return s=Object.assign({message:e},{}),null!==(n=s.statusCode)&&void 0!==n||(s.statusCode=0),Object.assign(Object.assign({},s),{statusCode:s.statusCode,category:h.PNValidationErrorCategory,error:!0});var s,n}var g,y,f,m,b,v=v||function(e){var t={},s=t.lib={},n=function(){},r=s.Base={extend:function(e){n.prototype=this;var t=new n;return e&&t.mixIn(e),t.hasOwnProperty("init")||(t.init=function(){t.$super.init.apply(this,arguments)}),t.init.prototype=t,t.$super=this,t},create:function(){var e=this.extend();return e.init.apply(e,arguments),e},init:function(){},mixIn:function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e.hasOwnProperty("toString")&&(this.toString=e.toString)},clone:function(){return this.init.prototype.extend(this)}},i=s.WordArray=r.extend({init:function(e,t){e=this.words=e||[],this.sigBytes=null!=t?t:4*e.length},toString:function(e){return(e||a).stringify(this)},concat:function(e){var t=this.words,s=e.words,n=this.sigBytes;if(e=e.sigBytes,this.clamp(),n%4)for(var r=0;r>>2]|=(s[r>>>2]>>>24-r%4*8&255)<<24-(n+r)%4*8;else if(65535>>2]=s[r>>>2];else t.push.apply(t,s);return this.sigBytes+=e,this},clamp:function(){var t=this.words,s=this.sigBytes;t[s>>>2]&=4294967295<<32-s%4*8,t.length=e.ceil(s/4)},clone:function(){var e=r.clone.call(this);return e.words=this.words.slice(0),e},random:function(t){for(var s=[],n=0;n>>2]>>>24-n%4*8&255;s.push((r>>>4).toString(16)),s.push((15&r).toString(16))}return s.join("")},parse:function(e){for(var t=e.length,s=[],n=0;n>>3]|=parseInt(e.substr(n,2),16)<<24-n%8*4;return new i.init(s,t/2)}},c=o.Latin1={stringify:function(e){var t=e.words;e=e.sigBytes;for(var s=[],n=0;n>>2]>>>24-n%4*8&255));return s.join("")},parse:function(e){for(var t=e.length,s=[],n=0;n>>2]|=(255&e.charCodeAt(n))<<24-n%4*8;return new i.init(s,t)}},u=o.Utf8={stringify:function(e){try{return decodeURIComponent(escape(c.stringify(e)))}catch(e){throw Error("Malformed UTF-8 data")}},parse:function(e){return c.parse(unescape(encodeURIComponent(e)))}},l=s.BufferedBlockAlgorithm=r.extend({reset:function(){this._data=new i.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=u.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var s=this._data,n=s.words,r=s.sigBytes,o=this.blockSize,a=r/(4*o);if(t=(a=t?e.ceil(a):e.max((0|a)-this._minBufferSize,0))*o,r=e.min(4*t,r),t){for(var c=0;cu;){var l;e:{l=c;for(var h=e.sqrt(l),d=2;d<=h;d++)if(!(l%d)){l=!1;break e}l=!0}l&&(8>u&&(i[u]=a(e.pow(c,.5))),o[u]=a(e.pow(c,1/3)),u++),c++}var p=[];r=r.SHA256=n.extend({_doReset:function(){this._hash=new s.init(i.slice(0))},_doProcessBlock:function(e,t){for(var s=this._hash.words,n=s[0],r=s[1],i=s[2],a=s[3],c=s[4],u=s[5],l=s[6],h=s[7],d=0;64>d;d++){if(16>d)p[d]=0|e[t+d];else{var g=p[d-15],y=p[d-2];p[d]=((g<<25|g>>>7)^(g<<14|g>>>18)^g>>>3)+p[d-7]+((y<<15|y>>>17)^(y<<13|y>>>19)^y>>>10)+p[d-16]}g=h+((c<<26|c>>>6)^(c<<21|c>>>11)^(c<<7|c>>>25))+(c&u^~c&l)+o[d]+p[d],y=((n<<30|n>>>2)^(n<<19|n>>>13)^(n<<10|n>>>22))+(n&r^n&i^r&i),h=l,l=u,u=c,c=a+g|0,a=i,i=r,r=n,n=g+y|0}s[0]=s[0]+n|0,s[1]=s[1]+r|0,s[2]=s[2]+i|0,s[3]=s[3]+a|0,s[4]=s[4]+c|0,s[5]=s[5]+u|0,s[6]=s[6]+l|0,s[7]=s[7]+h|0},_doFinalize:function(){var t=this._data,s=t.words,n=8*this._nDataBytes,r=8*t.sigBytes;return s[r>>>5]|=128<<24-r%32,s[14+(r+64>>>9<<4)]=e.floor(n/4294967296),s[15+(r+64>>>9<<4)]=n,t.sigBytes=4*s.length,this._process(),this._hash},clone:function(){var e=n.clone.call(this);return e._hash=this._hash.clone(),e}});t.SHA256=n._createHelper(r),t.HmacSHA256=n._createHmacHelper(r)}(Math),y=(g=v).enc.Utf8,g.algo.HMAC=g.lib.Base.extend({init:function(e,t){e=this._hasher=new e.init,"string"==typeof t&&(t=y.parse(t));var s=e.blockSize,n=4*s;t.sigBytes>n&&(t=e.finalize(t)),t.clamp();for(var r=this._oKey=t.clone(),i=this._iKey=t.clone(),o=r.words,a=i.words,c=0;c>>2]>>>24-r%4*8&255)<<16|(t[r+1>>>2]>>>24-(r+1)%4*8&255)<<8|t[r+2>>>2]>>>24-(r+2)%4*8&255,o=0;4>o&&r+.75*o>>6*(3-o)&63));if(t=n.charAt(64))for(;e.length%4;)e.push(t);return e.join("")},parse:function(e){var t=e.length,s=this._map;(n=s.charAt(64))&&-1!=(n=e.indexOf(n))&&(t=n);for(var n=[],r=0,i=0;i>>6-i%4*2;n[r>>>2]|=(o|a)<<24-r%4*8,r++}return m.create(n,r)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="},function(e){function t(e,t,s,n,r,i,o){return((e=e+(t&s|~t&n)+r+o)<>>32-i)+t}function s(e,t,s,n,r,i,o){return((e=e+(t&n|s&~n)+r+o)<>>32-i)+t}function n(e,t,s,n,r,i,o){return((e=e+(t^s^n)+r+o)<>>32-i)+t}function r(e,t,s,n,r,i,o){return((e=e+(s^(t|~n))+r+o)<>>32-i)+t}for(var i=v,o=(c=i.lib).WordArray,a=c.Hasher,c=i.algo,u=[],l=0;64>l;l++)u[l]=4294967296*e.abs(e.sin(l+1))|0;c=c.MD5=a.extend({_doReset:function(){this._hash=new o.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(e,i){for(var o=0;16>o;o++){var a=e[c=i+o];e[c]=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8)}o=this._hash.words;var c=e[i+0],l=(a=e[i+1],e[i+2]),h=e[i+3],d=e[i+4],p=e[i+5],g=e[i+6],y=e[i+7],f=e[i+8],m=e[i+9],b=e[i+10],v=e[i+11],w=e[i+12],S=e[i+13],k=e[i+14],E=e[i+15],O=t(O=o[0],P=o[1],N=o[2],C=o[3],c,7,u[0]),C=t(C,O,P,N,a,12,u[1]),N=t(N,C,O,P,l,17,u[2]),P=t(P,N,C,O,h,22,u[3]);O=t(O,P,N,C,d,7,u[4]),C=t(C,O,P,N,p,12,u[5]),N=t(N,C,O,P,g,17,u[6]),P=t(P,N,C,O,y,22,u[7]),O=t(O,P,N,C,f,7,u[8]),C=t(C,O,P,N,m,12,u[9]),N=t(N,C,O,P,b,17,u[10]),P=t(P,N,C,O,v,22,u[11]),O=t(O,P,N,C,w,7,u[12]),C=t(C,O,P,N,S,12,u[13]),N=t(N,C,O,P,k,17,u[14]),O=s(O,P=t(P,N,C,O,E,22,u[15]),N,C,a,5,u[16]),C=s(C,O,P,N,g,9,u[17]),N=s(N,C,O,P,v,14,u[18]),P=s(P,N,C,O,c,20,u[19]),O=s(O,P,N,C,p,5,u[20]),C=s(C,O,P,N,b,9,u[21]),N=s(N,C,O,P,E,14,u[22]),P=s(P,N,C,O,d,20,u[23]),O=s(O,P,N,C,m,5,u[24]),C=s(C,O,P,N,k,9,u[25]),N=s(N,C,O,P,h,14,u[26]),P=s(P,N,C,O,f,20,u[27]),O=s(O,P,N,C,S,5,u[28]),C=s(C,O,P,N,l,9,u[29]),N=s(N,C,O,P,y,14,u[30]),O=n(O,P=s(P,N,C,O,w,20,u[31]),N,C,p,4,u[32]),C=n(C,O,P,N,f,11,u[33]),N=n(N,C,O,P,v,16,u[34]),P=n(P,N,C,O,k,23,u[35]),O=n(O,P,N,C,a,4,u[36]),C=n(C,O,P,N,d,11,u[37]),N=n(N,C,O,P,y,16,u[38]),P=n(P,N,C,O,b,23,u[39]),O=n(O,P,N,C,S,4,u[40]),C=n(C,O,P,N,c,11,u[41]),N=n(N,C,O,P,h,16,u[42]),P=n(P,N,C,O,g,23,u[43]),O=n(O,P,N,C,m,4,u[44]),C=n(C,O,P,N,w,11,u[45]),N=n(N,C,O,P,E,16,u[46]),O=r(O,P=n(P,N,C,O,l,23,u[47]),N,C,c,6,u[48]),C=r(C,O,P,N,y,10,u[49]),N=r(N,C,O,P,k,15,u[50]),P=r(P,N,C,O,p,21,u[51]),O=r(O,P,N,C,w,6,u[52]),C=r(C,O,P,N,h,10,u[53]),N=r(N,C,O,P,b,15,u[54]),P=r(P,N,C,O,a,21,u[55]),O=r(O,P,N,C,f,6,u[56]),C=r(C,O,P,N,E,10,u[57]),N=r(N,C,O,P,g,15,u[58]),P=r(P,N,C,O,S,21,u[59]),O=r(O,P,N,C,d,6,u[60]),C=r(C,O,P,N,v,10,u[61]),N=r(N,C,O,P,l,15,u[62]),P=r(P,N,C,O,m,21,u[63]);o[0]=o[0]+O|0,o[1]=o[1]+P|0,o[2]=o[2]+N|0,o[3]=o[3]+C|0},_doFinalize:function(){var t=this._data,s=t.words,n=8*this._nDataBytes,r=8*t.sigBytes;s[r>>>5]|=128<<24-r%32;var i=e.floor(n/4294967296);for(s[15+(r+64>>>9<<4)]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8),s[14+(r+64>>>9<<4)]=16711935&(n<<8|n>>>24)|4278255360&(n<<24|n>>>8),t.sigBytes=4*(s.length+1),this._process(),s=(t=this._hash).words,n=0;4>n;n++)r=s[n],s[n]=16711935&(r<<8|r>>>24)|4278255360&(r<<24|r>>>8);return t},clone:function(){var e=a.clone.call(this);return e._hash=this._hash.clone(),e}}),i.MD5=a._createHelper(c),i.HmacMD5=a._createHmacHelper(c)}(Math),function(){var e,t=v,s=(e=t.lib).Base,n=e.WordArray,r=(e=t.algo).EvpKDF=s.extend({cfg:s.extend({keySize:4,hasher:e.MD5,iterations:1}),init:function(e){this.cfg=this.cfg.extend(e)},compute:function(e,t){for(var s=(a=this.cfg).hasher.create(),r=n.create(),i=r.words,o=a.keySize,a=a.iterations;i.length>>2]}},e.BlockCipher=o.extend({cfg:o.cfg.extend({mode:a,padding:u}),reset:function(){o.reset.call(this);var e=(t=this.cfg).iv,t=t.mode;if(this._xformMode==this._ENC_XFORM_MODE)var s=t.createEncryptor;else s=t.createDecryptor,this._minBufferSize=1;this._mode=s.call(t,this,e&&e.words)},_doProcessBlock:function(e,t){this._mode.processBlock(e,t)},_doFinalize:function(){var e=this.cfg.padding;if(this._xformMode==this._ENC_XFORM_MODE){e.pad(this._data,this.blockSize);var t=this._process(!0)}else t=this._process(!0),e.unpad(t);return t},blockSize:4});var l=e.CipherParams=t.extend({init:function(e){this.mixIn(e)},toString:function(e){return(e||this.formatter).stringify(this)}}),h=(a=(d.format={}).OpenSSL={stringify:function(e){var t=e.ciphertext;return((e=e.salt)?s.create([1398893684,1701076831]).concat(e).concat(t):t).toString(r)},parse:function(e){var t=(e=r.parse(e)).words;if(1398893684==t[0]&&1701076831==t[1]){var n=s.create(t.slice(2,4));t.splice(0,4),e.sigBytes-=16}return l.create({ciphertext:e,salt:n})}},e.SerializableCipher=t.extend({cfg:t.extend({format:a}),encrypt:function(e,t,s,n){n=this.cfg.extend(n);var r=e.createEncryptor(s,n);return t=r.finalize(t),r=r.cfg,l.create({ciphertext:t,key:s,iv:r.iv,algorithm:e,mode:r.mode,padding:r.padding,blockSize:e.blockSize,formatter:n.format})},decrypt:function(e,t,s,n){return n=this.cfg.extend(n),t=this._parse(t,n.format),e.createDecryptor(s,n).finalize(t.ciphertext)},_parse:function(e,t){return"string"==typeof e?t.parse(e,this):e}})),d=(d.kdf={}).OpenSSL={execute:function(e,t,n,r){return r||(r=s.random(8)),e=i.create({keySize:t+n}).compute(e,r),n=s.create(e.words.slice(t),4*n),e.sigBytes=4*t,l.create({key:e,iv:n,salt:r})}},p=e.PasswordBasedCipher=h.extend({cfg:h.cfg.extend({kdf:d}),encrypt:function(e,t,s,n){return s=(n=this.cfg.extend(n)).kdf.execute(s,e.keySize,e.ivSize),n.iv=s.iv,(e=h.encrypt.call(this,e,t,s.key,n)).mixIn(s),e},decrypt:function(e,t,s,n){return n=this.cfg.extend(n),t=this._parse(t,n.format),s=n.kdf.execute(s,e.keySize,e.ivSize,t.salt),n.iv=s.iv,h.decrypt.call(this,e,t,s.key,n)}})}(),function(){for(var e=v,t=e.lib.BlockCipher,s=e.algo,n=[],r=[],i=[],o=[],a=[],c=[],u=[],l=[],h=[],d=[],p=[],g=0;256>g;g++)p[g]=128>g?g<<1:g<<1^283;var y=0,f=0;for(g=0;256>g;g++){var m=(m=f^f<<1^f<<2^f<<3^f<<4)>>>8^255&m^99;n[y]=m,r[m]=y;var b=p[y],w=p[b],S=p[w],k=257*p[m]^16843008*m;i[y]=k<<24|k>>>8,o[y]=k<<16|k>>>16,a[y]=k<<8|k>>>24,c[y]=k,k=16843009*S^65537*w^257*b^16843008*y,u[m]=k<<24|k>>>8,l[m]=k<<16|k>>>16,h[m]=k<<8|k>>>24,d[m]=k,y?(y=b^p[p[p[S^b]]],f^=p[p[f]]):y=f=1}var E=[0,1,2,4,8,16,32,64,128,27,54];s=s.AES=t.extend({_doReset:function(){for(var e=(s=this._key).words,t=s.sigBytes/4,s=4*((this._nRounds=t+6)+1),r=this._keySchedule=[],i=0;i>>24]<<24|n[o>>>16&255]<<16|n[o>>>8&255]<<8|n[255&o]):(o=n[(o=o<<8|o>>>24)>>>24]<<24|n[o>>>16&255]<<16|n[o>>>8&255]<<8|n[255&o],o^=E[i/t|0]<<24),r[i]=r[i-t]^o}for(e=this._invKeySchedule=[],t=0;tt||4>=i?o:u[n[o>>>24]]^l[n[o>>>16&255]]^h[n[o>>>8&255]]^d[n[255&o]]},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._keySchedule,i,o,a,c,n)},decryptBlock:function(e,t){var s=e[t+1];e[t+1]=e[t+3],e[t+3]=s,this._doCryptBlock(e,t,this._invKeySchedule,u,l,h,d,r),s=e[t+1],e[t+1]=e[t+3],e[t+3]=s},_doCryptBlock:function(e,t,s,n,r,i,o,a){for(var c=this._nRounds,u=e[t]^s[0],l=e[t+1]^s[1],h=e[t+2]^s[2],d=e[t+3]^s[3],p=4,g=1;g>>24]^r[l>>>16&255]^i[h>>>8&255]^o[255&d]^s[p++],f=n[l>>>24]^r[h>>>16&255]^i[d>>>8&255]^o[255&u]^s[p++],m=n[h>>>24]^r[d>>>16&255]^i[u>>>8&255]^o[255&l]^s[p++];d=n[d>>>24]^r[u>>>16&255]^i[l>>>8&255]^o[255&h]^s[p++],u=y,l=f,h=m}y=(a[u>>>24]<<24|a[l>>>16&255]<<16|a[h>>>8&255]<<8|a[255&d])^s[p++],f=(a[l>>>24]<<24|a[h>>>16&255]<<16|a[d>>>8&255]<<8|a[255&u])^s[p++],m=(a[h>>>24]<<24|a[d>>>16&255]<<16|a[u>>>8&255]<<8|a[255&l])^s[p++],d=(a[d>>>24]<<24|a[u>>>16&255]<<16|a[l>>>8&255]<<8|a[255&h])^s[p++],e[t]=y,e[t+1]=f,e[t+2]=m,e[t+3]=d},keySize:8});e.AES=t._createHelper(s)}(),v.mode.ECB=((b=v.lib.BlockCipherMode.extend()).Encryptor=b.extend({processBlock:function(e,t){this._cipher.encryptBlock(e,t)}}),b.Decryptor=b.extend({processBlock:function(e,t){this._cipher.decryptBlock(e,t)}}),b);var w=t(v);class S{constructor({cipherKey:e}){this.cipherKey=e,this.CryptoJS=w,this.encryptedKey=this.CryptoJS.SHA256(e)}encrypt(e){if(0===("string"==typeof e?e:S.decoder.decode(e)).length)throw new Error("encryption error. empty content");const t=this.getIv();return{metadata:t,data:c(this.CryptoJS.AES.encrypt(e,this.encryptedKey,{iv:this.bufferToWordArray(t),mode:this.CryptoJS.mode.CBC}).ciphertext.toString(this.CryptoJS.enc.Base64))}}encryptFileData(e){return i(this,void 0,void 0,(function*(){const t=yield this.getKey(),s=this.getIv();return{data:yield crypto.subtle.encrypt({name:this.algo,iv:s},t,e),metadata:s}}))}decrypt(e){if("string"==typeof e.data)throw new Error("Decryption error: data for decryption should be ArrayBuffed.");const t=this.bufferToWordArray(new Uint8ClampedArray(e.metadata)),s=this.bufferToWordArray(new Uint8ClampedArray(e.data));return S.encoder.encode(this.CryptoJS.AES.decrypt({ciphertext:s},this.encryptedKey,{iv:t,mode:this.CryptoJS.mode.CBC}).toString(this.CryptoJS.enc.Utf8)).buffer}decryptFileData(e){return i(this,void 0,void 0,(function*(){if("string"==typeof e.data)throw new Error("Decryption error: data for decryption should be ArrayBuffed.");const t=yield this.getKey();return crypto.subtle.decrypt({name:this.algo,iv:e.metadata},t,e.data)}))}get identifier(){return"ACRH"}get algo(){return"AES-CBC"}getIv(){return crypto.getRandomValues(new Uint8Array(S.BLOCK_SIZE))}getKey(){return i(this,void 0,void 0,(function*(){const e=S.encoder.encode(this.cipherKey),t=yield crypto.subtle.digest("SHA-256",e.buffer);return crypto.subtle.importKey("raw",t,this.algo,!0,["encrypt","decrypt"])}))}bufferToWordArray(e){const t=[];let s;for(s=0;se.toString(16).padStart(2,"0"))).join(""),n=O.encoder.encode(s.slice(0,32)).buffer;return crypto.subtle.importKey("raw",n,"AES-CBC",!0,["encrypt","decrypt"])}))}concatArrayBuffer(e,t){const s=new Uint8Array(e.byteLength+t.byteLength);return s.set(new Uint8Array(e),0),s.set(new Uint8Array(t),e.byteLength),s.buffer}}O.IV_LENGTH=16,O.encoder=new TextEncoder,O.decoder=new TextDecoder;class C{constructor(e){this.config=e,this.cryptor=new E(Object.assign({},e)),this.fileCryptor=new O}encrypt(e){const t="string"==typeof e?e:C.decoder.decode(e);return{data:this.cryptor.encrypt(t),metadata:null}}encryptFile(e,t){return i(this,void 0,void 0,(function*(){var s;if(!this.config.cipherKey)throw new d("File encryption error: cipher key not set.");return this.fileCryptor.encryptFile(null===(s=this.config)||void 0===s?void 0:s.cipherKey,e,t)}))}decrypt(e){const t="string"==typeof e.data?e.data:u(e.data);return this.cryptor.decrypt(t)}decryptFile(e,t){return i(this,void 0,void 0,(function*(){if(!this.config.cipherKey)throw new d("File encryption error: cipher key not set.");return this.fileCryptor.decryptFile(this.config.cipherKey,e,t)}))}get identifier(){return""}}C.encoder=new TextEncoder,C.decoder=new TextDecoder;class N extends o{static legacyCryptoModule(e){var t;if(!e.cipherKey)throw new d("Crypto module error: cipher key not set.");return new N({default:new C(Object.assign(Object.assign({},e),{useRandomIVs:null===(t=e.useRandomIVs)||void 0===t||t})),cryptors:[new S({cipherKey:e.cipherKey})]})}static aesCbcCryptoModule(e){var t;if(!e.cipherKey)throw new d("Crypto module error: cipher key not set.");return new N({default:new S({cipherKey:e.cipherKey}),cryptors:[new C(Object.assign(Object.assign({},e),{useRandomIVs:null===(t=e.useRandomIVs)||void 0===t||t}))]})}static withDefaultCryptor(e){return new this({default:e})}encrypt(e){const t=e instanceof ArrayBuffer&&this.defaultCryptor.identifier===N.LEGACY_IDENTIFIER?this.defaultCryptor.encrypt(N.decoder.decode(e)):this.defaultCryptor.encrypt(e);if(!t.metadata)return t.data;if("string"==typeof t.data)throw new Error("Encryption error: encrypted data should be ArrayBuffed.");const s=this.getHeaderData(t);return this.concatArrayBuffer(s,t.data)}encryptFile(e,t){return i(this,void 0,void 0,(function*(){if(this.defaultCryptor.identifier===P.LEGACY_IDENTIFIER)return this.defaultCryptor.encryptFile(e,t);const s=yield this.getFileData(e),n=yield this.defaultCryptor.encryptFileData(s);if("string"==typeof n.data)throw new Error("Encryption error: encrypted data should be ArrayBuffed.");return t.create({name:e.name,mimeType:"application/octet-stream",data:this.concatArrayBuffer(this.getHeaderData(n),n.data)})}))}decrypt(e){const t="string"==typeof e?c(e):e,s=P.tryParse(t),n=this.getCryptor(s),r=s.length>0?t.slice(s.length-s.metadataLength,s.length):null;if(t.slice(s.length).byteLength<=0)throw new Error("Decryption error: empty content");return n.decrypt({data:t.slice(s.length),metadata:r})}decryptFile(e,t){return i(this,void 0,void 0,(function*(){const s=yield e.data.arrayBuffer(),n=P.tryParse(s),r=this.getCryptor(n);if((null==r?void 0:r.identifier)===P.LEGACY_IDENTIFIER)return r.decryptFile(e,t);const i=(yield this.getFileData(s)).slice(n.length-n.metadataLength,n.length);return t.create({name:e.name,data:yield this.defaultCryptor.decryptFileData({data:s.slice(n.length),metadata:i})})}))}getCryptorFromId(e){const t=this.getAllCryptors().find((t=>e===t.identifier));if(t)return t;throw Error("Unknown cryptor error")}getCryptor(e){if("string"==typeof e){const t=this.getAllCryptors().find((t=>t.identifier===e));if(t)return t;throw new Error("Unknown cryptor error")}if(e instanceof M)return this.getCryptorFromId(e.identifier)}getHeaderData(e){if(!e.metadata)return;const t=P.from(this.defaultCryptor.identifier,e.metadata),s=new Uint8Array(t.length);let n=0;return s.set(t.data,n),n+=t.length-e.metadata.byteLength,s.set(new Uint8Array(e.metadata),n),s.buffer}concatArrayBuffer(e,t){const s=new Uint8Array(e.byteLength+t.byteLength);return s.set(new Uint8Array(e),0),s.set(new Uint8Array(t),e.byteLength),s.buffer}getFileData(e){return i(this,void 0,void 0,(function*(){if(e instanceof ArrayBuffer)return e;if(e instanceof a)return e.toArrayBuffer();throw new Error("Cannot decrypt/encrypt file. In browsers file encrypt/decrypt supported for string, ArrayBuffer or Blob")}))}}N.LEGACY_IDENTIFIER="";class P{static from(e,t){if(e!==P.LEGACY_IDENTIFIER)return new M(e,t.byteLength)}static tryParse(e){const t=new Uint8Array(e);let s,n,r=null;if(t.byteLength>=4&&(s=t.slice(0,4),this.decoder.decode(s)!==P.SENTINEL))return N.LEGACY_IDENTIFIER;if(!(t.byteLength>=5))throw new Error("Decryption error: invalid header version");if(r=t[4],r>P.MAX_VERSION)throw new Error("Decryption error: Unknown cryptor error");let i=5+P.IDENTIFIER_LENGTH;if(!(t.byteLength>=i))throw new Error("Decryption error: invalid crypto identifier");n=t.slice(5,i);let o=null;if(!(t.byteLength>=i+1))throw new Error("Decryption error: invalid metadata length");return o=t[i],i+=1,255===o&&t.byteLength>=i+2&&(o=new Uint16Array(t.slice(i,i+2)).reduce(((e,t)=>(e<<8)+t),0)),new M(this.decoder.decode(n),o)}}P.SENTINEL="PNED",P.LEGACY_IDENTIFIER="",P.IDENTIFIER_LENGTH=4,P.VERSION=1,P.MAX_VERSION=1,P.decoder=new TextDecoder;class M{constructor(e,t){this._identifier=e,this._metadataLength=t}get identifier(){return this._identifier}set identifier(e){this._identifier=e}get metadataLength(){return this._metadataLength}set metadataLength(e){this._metadataLength=e}get version(){return P.VERSION}get length(){return P.SENTINEL.length+1+P.IDENTIFIER_LENGTH+(this.metadataLength<255?1:3)+this.metadataLength}get data(){let e=0;const t=new Uint8Array(this.length),s=new TextEncoder;t.set(s.encode(P.SENTINEL)),e+=P.SENTINEL.length,t[e]=this.version,e++,this.identifier&&t.set(s.encode(this.identifier),e);const n=this.metadataLength;return e+=P.IDENTIFIER_LENGTH,n<255?t[e]=n:t.set([255,n>>8,255&n],e),t}}M.IDENTIFIER_LENGTH=4,M.SENTINEL="PNED";class A extends Error{static create(e,t){return e instanceof Error?A.createFromError(e):A.createFromServiceResponse(e,t)}static createFromError(e){let t=h.PNUnknownCategory,s="Unknown error",n="Error";if(!e)return new A(s,t,0);if(e instanceof A)return e;if(e instanceof Error&&(s=e.message,n=e.name),"AbortError"===n||-1!==s.indexOf("Aborted"))t=h.PNCancelledCategory,s="Request cancelled";else if(-1!==s.indexOf("timeout"))t=h.PNTimeoutCategory,s="Request timeout";else if(-1!==s.indexOf("network"))t=h.PNNetworkIssuesCategory,s="Network issues";else if("TypeError"===n)t=h.PNBadRequestCategory;else if("FetchError"===n){const n=e.code;["ECONNREFUSED","ENETUNREACH","ENOTFOUND","ECONNRESET","EAI_AGAIN"].includes(n)&&(t=h.PNNetworkIssuesCategory),"ECONNREFUSED"===n?s="Connection refused":"ENETUNREACH"===n?s="Network not reachable":"ENOTFOUND"===n?s="Server not found":"ECONNRESET"===n?s="Connection reset by peer":"EAI_AGAIN"===n?s="Name resolution error":"ETIMEDOUT"===n?(t=h.PNTimeoutCategory,s="Request timeout"):s=`Unknown system error: ${e}`}else"Request timeout"===s&&(t=h.PNTimeoutCategory);return new A(s,t,0,e)}static createFromServiceResponse(e,t){let s,n=h.PNUnknownCategory,r="Unknown error",{status:i}=e;if(null!=t||(t=e.body),402===i?r="Not available for used key set. Contact support@pubnub.com":400===i?(n=h.PNBadRequestCategory,r="Bad request"):403===i&&(n=h.PNAccessDeniedCategory,r="Access denied"),t&&t.byteLength>0){const n=(new TextDecoder).decode(t);if(-1!==e.headers["content-type"].indexOf("text/javascript")||-1!==e.headers["content-type"].indexOf("application/json"))try{const e=JSON.parse(n);"object"!=typeof e||Array.isArray(e)||("error"in e&&(1===e.error||!0===e.error)&&"status"in e&&"number"==typeof e.status&&"message"in e&&"service"in e?(s=e,i=e.status):s=e,"error"in e&&e.error instanceof Error&&(s=e.error))}catch(e){s=n}else if(-1!==e.headers["content-type"].indexOf("xml")){const e=/(.*)<\/Message>/gi.exec(n);r=e?`Upload to bucket failed: ${e[1]}`:"Upload to bucket failed."}else s=n}return new A(r,n,i,s)}constructor(e,t,s,n){super(e),this.category=t,this.statusCode=s,this.errorData=n,this.name="PubNubAPIError"}toStatus(e){return{error:!0,category:this.category,operation:e,statusCode:this.statusCode,errorData:this.errorData}}toPubNubError(e,t){return new d(null!=t?t:this.message,this.toStatus(e))}}class _{constructor(e){this.configuration=e,this.subscriptionWorkerReady=!1,this.workerEventsQueue=[],this.callbacks=new Map,this.setupSubscriptionWorker()}makeSendable(e){if(!e.path.startsWith("/v2/subscribe")&&!e.path.endsWith("/leave"))return this.configuration.transport.makeSendable(e);let t;const s={type:"send-request",clientIdentifier:this.configuration.clientIdentifier,subscriptionKey:this.configuration.subscriptionKey,logVerbosity:this.configuration.logVerbosity,request:e};return e.cancellable&&(t={abort:()=>{const t={type:"cancel-request",clientIdentifier:this.configuration.clientIdentifier,subscriptionKey:this.configuration.subscriptionKey,logVerbosity:this.configuration.logVerbosity,identifier:e.identifier};this.scheduleEventPost(t)}}),[new Promise(((t,n)=>{this.callbacks.set(e.identifier,{resolve:t,reject:n}),this.scheduleEventPost(s)})),t]}request(e){return e}scheduleEventPost(e,t=!1){const s=this.sharedSubscriptionWorker;s?s.port.postMessage(e):t?this.workerEventsQueue.splice(0,0,e):this.workerEventsQueue.push(e)}flushScheduledEvents(){const e=this.sharedSubscriptionWorker;if(!e||0===this.workerEventsQueue.length)return;const t=[];for(let e=0;e!t.includes(e))),this.workerEventsQueue.forEach((t=>e.port.postMessage(t))),this.workerEventsQueue=[]}get sharedSubscriptionWorker(){return this.subscriptionWorkerReady?this.subscriptionWorker:null}setupSubscriptionWorker(){"undefined"!=typeof SharedWorker&&(this.subscriptionWorker=new SharedWorker(this.configuration.workerUrl,`/pubnub-${this.configuration.sdkVersion}`),this.subscriptionWorker.port.start(),this.scheduleEventPost({type:"client-register",clientIdentifier:this.configuration.clientIdentifier,subscriptionKey:this.configuration.subscriptionKey,userId:this.configuration.userId,logVerbosity:this.configuration.logVerbosity,workerLogVerbosity:this.configuration.workerLogVerbosity},!0),this.subscriptionWorker.port.onmessage=e=>this.handleWorkerEvent(e))}handleWorkerEvent(e){const{data:t}=e;if("shared-worker-ping"===t.type||"shared-worker-connected"===t.type||"shared-worker-console-log"===t.type||"shared-worker-console-dir"===t.type||t.clientIdentifier===this.configuration.clientIdentifier)if("shared-worker-connected"===t.type)this.subscriptionWorkerReady=!0,this.flushScheduledEvents();else if("shared-worker-console-log"===t.type)console.log(`[SharedWorker] ${t.message}`);else if("shared-worker-console-dir"===t.type)t.message&&console.log(`[SharedWorker] ${t.message}`),console.dir(t.data);else if("shared-worker-ping"===t.type){const{logVerbosity:e,subscriptionKey:t,clientIdentifier:s}=this.configuration;this.scheduleEventPost({type:"client-pong",subscriptionKey:t,clientIdentifier:s,logVerbosity:e})}else if("request-progress-start"===t.type||"request-progress-end"===t.type)this.logRequestProgress(t);else if("request-process-success"===t.type||"request-process-error"===t.type){const{resolve:e,reject:s}=this.callbacks.get(t.identifier);if("request-process-success"===t.type)e({status:t.response.status,url:t.url,headers:t.response.headers,body:t.response.body});else{let e=h.PNUnknownCategory,n="Unknown error";if(t.error)"NETWORK_ISSUE"===t.error.type?e=h.PNNetworkIssuesCategory:"TIMEOUT"===t.error.type?e=h.PNTimeoutCategory:"ABORTED"===t.error.type&&(e=h.PNCancelledCategory),n=`${t.error.message} (${t.identifier})`;else if(t.response)return s(A.create({url:t.url,headers:t.response.headers,body:t.response.body,status:t.response.status},t.response.body));s(new A(n,e,0,new Error(n)))}}}logRequestProgress(e){var t,s;"request-progress-start"===e.type?(console.log("<<<<<"),console.log(`[${e.timestamp}] ${e.url}\n${JSON.stringify(null!==(t=e.query)&&void 0!==t?t:{})}`),console.log("-----")):(console.log(">>>>>>"),console.log(`[${e.timestamp} / ${e.duration}] ${e.url}\n${JSON.stringify(null!==(s=e.query)&&void 0!==s?s:{})}\n${e.response}`),console.log("-----"))}}const j=e=>encodeURIComponent(e).replace(/[!~*'()]/g,(e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`)),I=(e,t)=>{const s=e.map((e=>j(e)));return s.length?s.join(","):null!=t?t:""},R=(e,t)=>{const s=Object.fromEntries(t.map((e=>[e,!1])));return e.filter((e=>!(t.includes(e)&&!s[e])||(s[e]=!0,!1)))},U=(e,t)=>[...e].filter((s=>t.includes(s)&&e.indexOf(s)===e.lastIndexOf(s)&&t.indexOf(s)===t.lastIndexOf(s)));class T{constructor(e=!1,t){this.keepAlive=e,this.logVerbosity=t}makeSendable(e){let t,s;return e.cancellable&&(s=new AbortController,t={abortController:s,abort:()=>null==s?void 0:s.abort()}),[this.requestFromTransportRequest(e).then((t=>{const n=(new Date).getTime();this.logRequestProcessProgress(t);const r=new Promise(((t,s)=>{const n=setTimeout((()=>{clearTimeout(n),s(new Error("Request timeout"))}),1e3*e.timeout)}));return Promise.race([fetch(t,{signal:null==s?void 0:s.signal,credentials:"omit",cache:"no-cache"}),r]).then((e=>e.arrayBuffer().then((t=>[e,t])))).then((e=>{const s=e[1].byteLength>0?e[1]:void 0,{status:r,headers:i}=e[0],o={};i.forEach(((e,t)=>o[t]=e.toLowerCase()));const a={status:r,url:t.url,headers:o,body:s};if(r>=400)throw A.create(a);return this.logRequestProcessProgress(t,(new Date).getTime()-n,s),a})).catch((e=>{throw A.create(e)}))})),t]}request(e){return e}requestFromTransportRequest(e){return i(this,void 0,void 0,(function*(){let t,s=e.path;if(e.formData&&e.formData.length>0){e.queryParameters={};const s=e.body,n=new FormData;for(const{key:t,value:s}of e.formData)n.append(t,s);try{const e=yield s.toArrayBuffer();n.append("file",new Blob([e],{type:"application/octet-stream"}),s.name)}catch(e){try{const e=yield s.toFileUri();n.append("file",e,s.name)}catch(e){}}t=n}else e.body&&("string"==typeof e.body||e.body instanceof ArrayBuffer)&&(t=e.body);var n;return e.queryParameters&&0!==Object.keys(e.queryParameters).length&&(s=`${s}?${n=e.queryParameters,Object.keys(n).map((e=>{const t=n[e];return Array.isArray(t)?t.map((t=>`${e}=${j(t)}`)).join("&"):`${e}=${j(t)}`})).join("&")}`),new Request(`${e.origin}${s}`,{method:e.method,headers:e.headers,redirect:"follow",body:t})}))}logRequestProcessProgress(e,t,s){if(!this.logVerbosity)return;const{protocol:n,host:r,pathname:i,search:o}=new URL(e.url),a=(new Date).toISOString();if(t){const e=s?T.decoder.decode(s):void 0;console.log(">>>>>>"),console.log(`[${a} / ${t}]`,`\n${n}//${r}${i}`,`\n${o}`,`\n${e}`),console.log("-----")}else console.log("<<<<<"),console.log(`[${a}]`,`\n${n}//${r}${i}`,`\n${o}`),console.log("-----")}}function F(e){const t=e=>"object"==typeof e&&null!==e&&e.constructor===Object,s=e=>"number"==typeof e&&isFinite(e);if(!t(e))return e;const n={};return Object.keys(e).forEach((r=>{const i=(e=>"string"==typeof e||e instanceof String)(r);let o=r;const a=e[r];if(i&&r.indexOf(",")>=0){o=r.split(",").map(Number).reduce(((e,t)=>e+String.fromCharCode(t)),"")}else(s(r)||i&&!isNaN(Number(r)))&&(o=String.fromCharCode(s(r)?r:parseInt(r,10)));n[o]=t(a)?F(a):a})),n}T.decoder=new TextDecoder;const x=e=>{var t,s,n;return e.subscriptionWorkerUrl&&"undefined"==typeof SharedWorker&&(e.subscriptionWorkerUrl=null),Object.assign(Object.assign({},(e=>{var t,s,n,r,i,o,a,c,u,l,h,p,g,y;const f=Object.assign({},e);if(null!==(t=f.logVerbosity)&&void 0!==t||(f.logVerbosity=!1),null!==(s=f.ssl)&&void 0!==s||(f.ssl=!0),null!==(n=f.transactionalRequestTimeout)&&void 0!==n||(f.transactionalRequestTimeout=15),null!==(r=f.subscribeRequestTimeout)&&void 0!==r||(f.subscribeRequestTimeout=310),null!==(i=f.restore)&&void 0!==i||(f.restore=!1),null!==(o=f.useInstanceId)&&void 0!==o||(f.useInstanceId=!1),null!==(a=f.suppressLeaveEvents)&&void 0!==a||(f.suppressLeaveEvents=!1),null!==(c=f.requestMessageCountThreshold)&&void 0!==c||(f.requestMessageCountThreshold=100),null!==(u=f.autoNetworkDetection)&&void 0!==u||(f.autoNetworkDetection=!1),null!==(l=f.enableEventEngine)&&void 0!==l||(f.enableEventEngine=!1),null!==(h=f.maintainPresenceState)&&void 0!==h||(f.maintainPresenceState=!0),null!==(p=f.keepAlive)&&void 0!==p||(f.keepAlive=!1),f.userId&&f.uuid)throw new d("PubNub client configuration error: use only 'userId'");if(null!==(g=f.userId)&&void 0!==g||(f.userId=f.uuid),!f.userId)throw new d("PubNub client configuration error: 'userId' not set");if(0===(null===(y=f.userId)||void 0===y?void 0:y.trim().length))throw new d("PubNub client configuration error: 'userId' is empty");f.origin||(f.origin=Array.from({length:20},((e,t)=>`ps${t+1}.pndsn.com`)));const m={subscribeKey:f.subscribeKey,publishKey:f.publishKey,secretKey:f.secretKey};void 0!==f.presenceTimeout&&f.presenceTimeout<20&&(f.presenceTimeout=20,console.log("WARNING: Presence timeout is less than the minimum. Using minimum value: ",20)),void 0!==f.presenceTimeout?f.heartbeatInterval=f.presenceTimeout/2-1:f.presenceTimeout=300;let b=!1,v=!0,w=5,S=!1,k=100,E=!0;return void 0!==f.dedupeOnSubscribe&&"boolean"==typeof f.dedupeOnSubscribe&&(S=f.dedupeOnSubscribe),void 0!==f.maximumCacheSize&&"number"==typeof f.maximumCacheSize&&(k=f.maximumCacheSize),void 0!==f.useRequestId&&"boolean"==typeof f.useRequestId&&(E=f.useRequestId),void 0!==f.announceSuccessfulHeartbeats&&"boolean"==typeof f.announceSuccessfulHeartbeats&&(b=f.announceSuccessfulHeartbeats),void 0!==f.announceFailedHeartbeats&&"boolean"==typeof f.announceFailedHeartbeats&&(v=f.announceFailedHeartbeats),void 0!==f.fileUploadPublishRetryLimit&&"number"==typeof f.fileUploadPublishRetryLimit&&(w=f.fileUploadPublishRetryLimit),Object.assign(Object.assign({},f),{keySet:m,dedupeOnSubscribe:S,maximumCacheSize:k,useRequestId:E,announceSuccessfulHeartbeats:b,announceFailedHeartbeats:v,fileUploadPublishRetryLimit:w})})(e)),{listenToBrowserNetworkEvents:null===(t=e.listenToBrowserNetworkEvents)||void 0===t||t,subscriptionWorkerUrl:e.subscriptionWorkerUrl,subscriptionWorkerLogVerbosity:null!==(s=e.subscriptionWorkerLogVerbosity)&&void 0!==s&&s,keepAlive:null===(n=e.keepAlive)||void 0===n||n})};var D={exports:{}}; +/*! lil-uuid - v0.1 - MIT License - https://github.com/lil-js/uuid */!function(e,t){!function(e){var t="0.1.0",s={3:/^[0-9A-F]{8}-[0-9A-F]{4}-3[0-9A-F]{3}-[0-9A-F]{4}-[0-9A-F]{12}$/i,4:/^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,5:/^[0-9A-F]{8}-[0-9A-F]{4}-5[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,all:/^[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}$/i};function n(){var e,t,s="";for(e=0;e<32;e++)t=16*Math.random()|0,8!==e&&12!==e&&16!==e&&20!==e||(s+="-"),s+=(12===e?4:16===e?3&t|8:t).toString(16);return s}function r(e,t){var n=s[t||"all"];return n&&n.test(e)||!1}n.isUUID=r,n.VERSION=t,e.uuid=n,e.isUUID=r}(t),null!==e&&(e.exports=t.uuid)}(D,D.exports);var q=t(D.exports),G={createUUID:()=>q.uuid?q.uuid():q()};const K=(e,t)=>{var s,n,r;null===(s=e.retryConfiguration)||void 0===s||s.validate(),null!==(n=e.useRandomIVs)&&void 0!==n||(e.useRandomIVs=true),e.origin=$(null!==(r=e.ssl)&&void 0!==r&&r,e.origin);const i=e.cryptoModule;i&&delete e.cryptoModule;const o=Object.assign(Object.assign({},e),{_pnsdkSuffix:{},_instanceId:`pn-${G.createUUID()}`,_cryptoModule:void 0,_cipherKey:void 0,_setupCryptoModule:t,get instanceId(){if(this.useInstanceId)return this._instanceId},getUserId(){return this.userId},setUserId(e){if(!e||"string"!=typeof e||0===e.trim().length)throw new Error("Missing or invalid userId parameter. Provide a valid string userId");this.userId=e},getAuthKey(){return this.authKey},setAuthKey(e){this.authKey=e},getFilterExpression(){return this.filterExpression},setFilterExpression(e){this.filterExpression=e},getCipherKey(){return this._cipherKey},setCipherKey(t){this._cipherKey=t,t||!this._cryptoModule?t&&this._setupCryptoModule&&(this._cryptoModule=this._setupCryptoModule({cipherKey:t,useRandomIVs:e.useRandomIVs,customEncrypt:this.getCustomEncrypt(),customDecrypt:this.getCustomDecrypt()})):this._cryptoModule=void 0},getCryptoModule(){return this._cryptoModule},getUseRandomIVs:()=>e.useRandomIVs,setPresenceTimeout(e){this.heartbeatInterval=e/2-1,this.presenceTimeout=e},getPresenceTimeout(){return this.presenceTimeout},getHeartbeatInterval(){return this.heartbeatInterval},setHeartbeatInterval(e){this.heartbeatInterval=e},getTransactionTimeout(){return this.transactionalRequestTimeout},getSubscribeTimeout(){return this.subscribeRequestTimeout},get PubNubFile(){return e.PubNubFile},get version(){return"8.2.10"},getVersion(){return this.version},_addPnsdkSuffix(e,t){this._pnsdkSuffix[e]=`${t}`},_getPnsdkSuffix(e){const t=Object.values(this._pnsdkSuffix).join(e);return t.length>0?e+t:""},getUUID(){return this.getUserId()},setUUID(e){this.setUserId(e)},getCustomEncrypt:()=>e.customEncrypt,getCustomDecrypt:()=>e.customDecrypt});return e.cipherKey?o.setCipherKey(e.cipherKey):i&&(o._cryptoModule=i),o},$=(e,t)=>{const s=e?"https://":"http://";return"string"==typeof t?`${s}${t}`:`${s}${t[Math.floor(Math.random()*t.length)]}`};class L{constructor(e){this.cbor=e}setToken(e){e&&e.length>0?this.token=e:this.token=void 0}getToken(){return this.token}parseToken(e){const t=this.cbor.decodeToken(e);if(void 0!==t){const e=t.res.uuid?Object.keys(t.res.uuid):[],s=Object.keys(t.res.chan),n=Object.keys(t.res.grp),r=t.pat.uuid?Object.keys(t.pat.uuid):[],i=Object.keys(t.pat.chan),o=Object.keys(t.pat.grp),a={version:t.v,timestamp:t.t,ttl:t.ttl,authorized_uuid:t.uuid,signature:t.sig},c=e.length>0,u=s.length>0,l=n.length>0;if(c||u||l){if(a.resources={},c){const s=a.resources.uuids={};e.forEach((e=>s[e]=this.extractPermissions(t.res.uuid[e])))}if(u){const e=a.resources.channels={};s.forEach((s=>e[s]=this.extractPermissions(t.res.chan[s])))}if(l){const e=a.resources.groups={};n.forEach((s=>e[s]=this.extractPermissions(t.res.grp[s])))}}const h=r.length>0,d=i.length>0,p=o.length>0;if(h||d||p){if(a.patterns={},h){const e=a.patterns.uuids={};r.forEach((s=>e[s]=this.extractPermissions(t.pat.uuid[s])))}if(d){const e=a.patterns.channels={};i.forEach((s=>e[s]=this.extractPermissions(t.pat.chan[s])))}if(p){const e=a.patterns.groups={};o.forEach((s=>e[s]=this.extractPermissions(t.pat.grp[s])))}}return t.meta&&Object.keys(t.meta).length>0&&(a.meta=t.meta),a}}extractPermissions(e){const t={read:!1,write:!1,manage:!1,delete:!1,get:!1,update:!1,join:!1};return 128&~e||(t.join=!0),64&~e||(t.update=!0),32&~e||(t.get=!0),8&~e||(t.delete=!0),4&~e||(t.manage=!0),2&~e||(t.write=!0),1&~e||(t.read=!0),t}}var B,H;!function(e){e.GET="GET",e.POST="POST",e.PATCH="PATCH",e.DELETE="DELETE",e.LOCAL="LOCAL"}(B||(B={}));class z{constructor(e,t,s){this.publishKey=e,this.secretKey=t,this.hasher=s}signature(e){const t=e.path.startsWith("/publish")?B.GET:e.method;let s=`${t}\n${this.publishKey}\n${e.path}\n${this.queryParameters(e.queryParameters)}\n`;if(t===B.POST||t===B.PATCH){const t=e.body;let n;t&&t instanceof ArrayBuffer?n=z.textDecoder.decode(t):t&&"object"!=typeof t&&(n=t),n&&(s+=n)}return`v2.${this.hasher(s,this.secretKey)}`.replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}queryParameters(e){return Object.keys(e).sort().map((t=>{const s=e[t];return Array.isArray(s)?s.sort().map((e=>`${t}=${j(e)}`)).join("&"):`${t}=${j(s)}`})).join("&")}}z.textDecoder=new TextDecoder("utf-8");class V{constructor(e){this.configuration=e;const{clientConfiguration:{keySet:t},shaHMAC:s}=e;t.secretKey&&s&&(this.signatureGenerator=new z(t.publishKey,t.secretKey,s))}makeSendable(e){return this.configuration.transport.makeSendable(this.request(e))}request(e){var t;const{clientConfiguration:s}=this.configuration;return(e=this.configuration.transport.request(e)).queryParameters||(e.queryParameters={}),s.useInstanceId&&(e.queryParameters.instanceid=s.instanceId),e.queryParameters.uuid||(e.queryParameters.uuid=s.userId),s.useRequestId&&(e.queryParameters.requestid=e.identifier),e.queryParameters.pnsdk=this.generatePNSDK(),null!==(t=e.origin)&&void 0!==t||(e.origin=s.origin),this.authenticateRequest(e),this.signRequest(e),e}authenticateRequest(e){var t;if(e.path.startsWith("/v2/auth/")||e.path.startsWith("/v3/pam/")||e.path.startsWith("/time"))return;const{clientConfiguration:s,tokenManager:n}=this.configuration,r=null!==(t=n&&n.getToken())&&void 0!==t?t:s.authKey;r&&(e.queryParameters.auth=r)}signRequest(e){this.signatureGenerator&&!e.path.startsWith("/time")&&(e.queryParameters.timestamp=String(Math.floor((new Date).getTime()/1e3)),e.queryParameters.signature=this.signatureGenerator.signature(e))}generatePNSDK(){const{clientConfiguration:e}=this.configuration;if(e.sdkName)return e.sdkName;let t=`PubNub-JS-${e.sdkFamily}`;e.partnerId&&(t+=`-${e.partnerId}`),t+=`/${e.getVersion()}`;const s=e._getPnsdkSuffix(" ");return s.length>0&&(t+=s),t}}class W{constructor(){this.listeners=[]}addListener(e){this.listeners.includes(e)||this.listeners.push(e)}removeListener(e){this.listeners=this.listeners.filter((t=>t!==e))}removeAllListeners(){this.listeners=[]}announceStatus(e){this.listeners.forEach((t=>{t.status&&t.status(e)}))}announcePresence(e){this.listeners.forEach((t=>{t.presence&&t.presence(e)}))}announceMessage(e){this.listeners.forEach((t=>{t.message&&t.message(e)}))}announceSignal(e){this.listeners.forEach((t=>{t.signal&&t.signal(e)}))}announceMessageAction(e){this.listeners.forEach((t=>{t.messageAction&&t.messageAction(e)}))}announceFile(e){this.listeners.forEach((t=>{t.file&&t.file(e)}))}announceObjects(e){this.listeners.forEach((t=>{t.objects&&t.objects(e)}))}announceNetworkUp(){this.listeners.forEach((e=>{e.status&&e.status({category:h.PNNetworkUpCategory})}))}announceNetworkDown(){this.listeners.forEach((e=>{e.status&&e.status({category:h.PNNetworkDownCategory})}))}announceUser(e){this.listeners.forEach((t=>{t.user&&t.user(e)}))}announceSpace(e){this.listeners.forEach((t=>{t.space&&t.space(e)}))}announceMembership(e){this.listeners.forEach((t=>{t.membership&&t.membership(e)}))}}class J{constructor(e){this.time=e}onReconnect(e){this.callback=e}startPolling(){this.timeTimer=setInterval((()=>this.callTime()),3e3)}stopPolling(){this.timeTimer&&clearInterval(this.timeTimer),this.timeTimer=null}callTime(){this.time((e=>{e.error||(this.stopPolling(),this.callback&&this.callback())}))}}class Q{constructor({maximumCacheSize:e}){this.maximumCacheSize=e,this.hashHistory=[]}getKey(e){var t;return`${e.timetoken}-${this.hashCode(JSON.stringify(null!==(t=e.message)&&void 0!==t?t:"")).toString()}`}isDuplicate(e){return this.hashHistory.includes(this.getKey(e))}addEntry(e){this.hashHistory.length>=this.maximumCacheSize&&this.hashHistory.shift(),this.hashHistory.push(this.getKey(e))}clearHistory(){this.hashHistory=[]}hashCode(e){let t=0;if(0===e.length)return t;for(let s=0;s{this.pendingChannelSubscriptions.add(e),this.channels[e]={},r&&(this.presenceChannels[e]={}),(i||this.configuration.getHeartbeatInterval())&&(this.heartbeatChannels[e]={})})),null==s||s.forEach((e=>{this.pendingChannelGroupSubscriptions.add(e),this.channelGroups[e]={},r&&(this.presenceChannelGroups[e]={}),(i||this.configuration.getHeartbeatInterval())&&(this.heartbeatChannelGroups[e]={})})),this.subscriptionStatusAnnounced=!1,this.reconnect()}unsubscribe(e,t){let{channels:s,channelGroups:n}=e;const i=new Set,o=new Set;null==s||s.forEach((e=>{e in this.channels&&(delete this.channels[e],o.add(e),e in this.heartbeatChannels&&delete this.heartbeatChannels[e]),e in this.presenceState&&delete this.presenceState[e],e in this.presenceChannels&&(delete this.presenceChannels[e],o.add(e))})),null==n||n.forEach((e=>{e in this.channelGroups&&(delete this.channelGroups[e],i.add(e),e in this.heartbeatChannelGroups&&delete this.heartbeatChannelGroups[e]),e in this.presenceState&&delete this.presenceState[e],e in this.presenceChannelGroups&&(delete this.presenceChannelGroups[e],i.add(e))})),0===o.size&&0===i.size||(!1!==this.configuration.suppressLeaveEvents||t||(n=Array.from(i),s=Array.from(o),this.leaveCall({channels:s,channelGroups:n},(e=>{const{error:t}=e,i=r(e,["error"]);let o;t&&(e.errorData&&"object"==typeof e.errorData&&"message"in e.errorData&&"string"==typeof e.errorData.message?o=e.errorData.message:"message"in e&&"string"==typeof e.message&&(o=e.message)),this.listenerManager.announceStatus(Object.assign(Object.assign({},i),{error:null!=o&&o,affectedChannels:s,affectedChannelGroups:n,currentTimetoken:this.currentTimetoken,lastTimetoken:this.lastTimetoken}))}))),0===Object.keys(this.channels).length&&0===Object.keys(this.presenceChannels).length&&0===Object.keys(this.channelGroups).length&&0===Object.keys(this.presenceChannelGroups).length&&(this.lastTimetoken=0,this.currentTimetoken=0,this.storedTimetoken=null,this.region=null,this.reconnectionManager.stopPolling()),this.reconnect())}unsubscribeAll(e){this.unsubscribe({channels:this.subscribedChannels,channelGroups:this.subscribedChannelGroups},e)}startSubscribeLoop(){this.stopSubscribeLoop();const e=[...Object.keys(this.channelGroups)],t=[...Object.keys(this.channels)];Object.keys(this.presenceChannelGroups).forEach((t=>e.push(`${t}-pnpres`))),Object.keys(this.presenceChannels).forEach((e=>t.push(`${e}-pnpres`))),0===t.length&&0===e.length||this.subscribeCall({channels:t,channelGroups:e,state:this.presenceState,heartbeat:this.configuration.getPresenceTimeout(),timetoken:this.currentTimetoken,region:null!==this.region?this.region:void 0,filterExpression:this.configuration.filterExpression},((e,t)=>{this.processSubscribeResponse(e,t)}))}stopSubscribeLoop(){this._subscribeAbort&&(this._subscribeAbort(),this._subscribeAbort=null)}processSubscribeResponse(e,t){if(e.error){if("object"==typeof e.errorData&&"name"in e.errorData&&"AbortError"===e.errorData.name||e.category===h.PNCancelledCategory)return;return void(e.category===h.PNTimeoutCategory?this.startSubscribeLoop():e.category===h.PNNetworkIssuesCategory?(this.disconnect(),e.error&&this.configuration.autoNetworkDetection&&this.isOnline&&(this.isOnline=!1,this.listenerManager.announceNetworkDown()),this.reconnectionManager.onReconnect((()=>{this.configuration.autoNetworkDetection&&!this.isOnline&&(this.isOnline=!0,this.listenerManager.announceNetworkUp()),this.reconnect(),this.subscriptionStatusAnnounced=!0;const t={category:h.PNReconnectedCategory,operation:e.operation,lastTimetoken:this.lastTimetoken,currentTimetoken:this.currentTimetoken};this.listenerManager.announceStatus(t)})),this.reconnectionManager.startPolling(),this.listenerManager.announceStatus(e)):e.category===h.PNBadRequestCategory?(this.stopHeartbeatTimer(),this.listenerManager.announceStatus(e)):this.listenerManager.announceStatus(e))}if(this.storedTimetoken?(this.currentTimetoken=this.storedTimetoken,this.storedTimetoken=null):(this.lastTimetoken=this.currentTimetoken,this.currentTimetoken=t.cursor.timetoken),!this.subscriptionStatusAnnounced){const t={category:h.PNConnectedCategory,operation:e.operation,affectedChannels:Array.from(this.pendingChannelSubscriptions),subscribedChannels:this.subscribedChannels,affectedChannelGroups:Array.from(this.pendingChannelGroupSubscriptions),lastTimetoken:this.lastTimetoken,currentTimetoken:this.currentTimetoken};this.subscriptionStatusAnnounced=!0,this.listenerManager.announceStatus(t),this.pendingChannelGroupSubscriptions.clear(),this.pendingChannelSubscriptions.clear()}const{messages:s}=t,{requestMessageCountThreshold:n,dedupeOnSubscribe:r}=this.configuration;n&&s.length>=n&&this.listenerManager.announceStatus({category:h.PNRequestMessageCountExceededCategory,operation:e.operation});try{s.forEach((e=>{if(r&&"message"in e.data&&"timetoken"in e.data){if(this.dedupingManager.isDuplicate(e.data))return;this.dedupingManager.addEntry(e.data)}this.eventEmitter.emitEvent(e)}))}catch(e){const t={error:!0,category:h.PNUnknownCategory,errorData:e,statusCode:0};this.listenerManager.announceStatus(t)}this.region=t.cursor.region,this.startSubscribeLoop()}setState(e){const{state:t,channels:s,channelGroups:n}=e;null==s||s.forEach((e=>e in this.channels&&(this.presenceState[e]=t))),null==n||n.forEach((e=>e in this.channelGroups&&(this.presenceState[e]=t)))}changePresence(e){const{connected:t,channels:s,channelGroups:n}=e;t?(null==s||s.forEach((e=>this.heartbeatChannels[e]={})),null==n||n.forEach((e=>this.heartbeatChannelGroups[e]={}))):(null==s||s.forEach((e=>{e in this.heartbeatChannels&&delete this.heartbeatChannels[e]})),null==n||n.forEach((e=>{e in this.heartbeatChannelGroups&&delete this.heartbeatChannelGroups[e]})),!1===this.configuration.suppressLeaveEvents&&this.leaveCall({channels:s,channelGroups:n},(e=>this.listenerManager.announceStatus(e)))),this.reconnect()}startHeartbeatTimer(){this.stopHeartbeatTimer();const e=this.configuration.getHeartbeatInterval();e&&0!==e&&(this.sendHeartbeat(),this.heartbeatTimer=setInterval((()=>this.sendHeartbeat()),1e3*e))}stopHeartbeatTimer(){this.heartbeatTimer&&(clearInterval(this.heartbeatTimer),this.heartbeatTimer=null)}sendHeartbeat(){const e=Object.keys(this.heartbeatChannelGroups),t=Object.keys(this.heartbeatChannels);0===t.length&&0===e.length||this.heartbeatCall({channels:t,channelGroups:e,heartbeat:this.configuration.getPresenceTimeout(),state:this.presenceState},(e=>{e.error&&this.configuration.announceFailedHeartbeats&&this.listenerManager.announceStatus(e),e.error&&this.configuration.autoNetworkDetection&&this.isOnline&&(this.isOnline=!1,this.disconnect(),this.listenerManager.announceNetworkDown(),this.reconnect()),!e.error&&this.configuration.announceSuccessfulHeartbeats&&this.listenerManager.announceStatus(e)}))}}class X{constructor(e,t,s){this._payload=e,this.setDefaultPayloadStructure(),this.title=t,this.body=s}get payload(){return this._payload}set title(e){this._title=e}set subtitle(e){this._subtitle=e}set body(e){this._body=e}set badge(e){this._badge=e}set sound(e){this._sound=e}setDefaultPayloadStructure(){}toObject(){return{}}}class Z extends X{constructor(){super(...arguments),this._apnsPushType="apns",this._isSilent=!1}get payload(){return this._payload}set configurations(e){e&&e.length&&(this._configurations=e)}get notification(){return this.payload.aps}get title(){return this._title}set title(e){e&&e.length&&(this.payload.aps.alert.title=e,this._title=e)}get subtitle(){return this._subtitle}set subtitle(e){e&&e.length&&(this.payload.aps.alert.subtitle=e,this._subtitle=e)}get body(){return this._body}set body(e){e&&e.length&&(this.payload.aps.alert.body=e,this._body=e)}get badge(){return this._badge}set badge(e){null!=e&&(this.payload.aps.badge=e,this._badge=e)}get sound(){return this._sound}set sound(e){e&&e.length&&(this.payload.aps.sound=e,this._sound=e)}set silent(e){this._isSilent=e}setDefaultPayloadStructure(){this.payload.aps={alert:{}}}toObject(){const e=Object.assign({},this.payload),{aps:t}=e;let{alert:s}=t;if(this._isSilent&&(t["content-available"]=1),"apns2"===this._apnsPushType){if(!this._configurations||!this._configurations.length)throw new ReferenceError("APNS2 configuration is missing");const t=[];this._configurations.forEach((e=>{t.push(this.objectFromAPNS2Configuration(e))})),t.length&&(e.pn_push=t)}return s&&Object.keys(s).length||delete t.alert,this._isSilent&&(delete t.alert,delete t.badge,delete t.sound,s={}),this._isSilent||s&&Object.keys(s).length?e:null}objectFromAPNS2Configuration(e){if(!e.targets||!e.targets.length)throw new ReferenceError("At least one APNS2 target should be provided");const{collapseId:t,expirationDate:s}=e,n={auth_method:"token",targets:e.targets.map((e=>this.objectFromAPNSTarget(e))),version:"v2"};return t&&t.length&&(n.collapse_id=t),s&&(n.expiration=s.toISOString()),n}objectFromAPNSTarget(e){if(!e.topic||!e.topic.length)throw new TypeError("Target 'topic' undefined.");const{topic:t,environment:s="development",excludedDevices:n=[]}=e,r={topic:t,environment:s};return n.length&&(r.excluded_devices=n),r}}class ee extends X{get payload(){return this._payload}get notification(){return this.payload.notification}get data(){return this.payload.data}get title(){return this._title}set title(e){e&&e.length&&(this.payload.notification.title=e,this._title=e)}get body(){return this._body}set body(e){e&&e.length&&(this.payload.notification.body=e,this._body=e)}get sound(){return this._sound}set sound(e){e&&e.length&&(this.payload.notification.sound=e,this._sound=e)}get icon(){return this._icon}set icon(e){e&&e.length&&(this.payload.notification.icon=e,this._icon=e)}get tag(){return this._tag}set tag(e){e&&e.length&&(this.payload.notification.tag=e,this._tag=e)}set silent(e){this._isSilent=e}setDefaultPayloadStructure(){this.payload.notification={},this.payload.data={}}toObject(){let e=Object.assign({},this.payload.data),t=null;const s={};if(Object.keys(this.payload).length>2){const t=r(this.payload,["notification","data"]);e=Object.assign(Object.assign({},e),t)}return this._isSilent?e.notification=this.payload.notification:t=this.payload.notification,Object.keys(e).length&&(s.data=e),t&&Object.keys(t).length&&(s.notification=t),Object.keys(s).length?s:null}}class te{constructor(e,t){this._payload={apns:{},fcm:{}},this._title=e,this._body=t,this.apns=new Z(this._payload.apns,e,t),this.fcm=new ee(this._payload.fcm,e,t)}set debugging(e){this._debugging=e}get title(){return this._title}get subtitle(){return this._subtitle}set subtitle(e){this._subtitle=e,this.apns.subtitle=e,this.fcm.subtitle=e}get body(){return this._body}get badge(){return this._badge}set badge(e){this._badge=e,this.apns.badge=e,this.fcm.badge=e}get sound(){return this._sound}set sound(e){this._sound=e,this.apns.sound=e,this.fcm.sound=e}buildPayload(e){const t={};if(e.includes("apns")||e.includes("apns2")){this.apns._apnsPushType=e.includes("apns")?"apns":"apns2";const s=this.apns.toObject();s&&Object.keys(s).length&&(t.pn_apns=s)}if(e.includes("fcm")){const e=this.fcm.toObject();e&&Object.keys(e).length&&(t.pn_gcm=e)}return Object.keys(t).length&&this._debugging&&(t.pn_debug=!0),t}}class se{constructor(e){this.params=e,this.requestIdentifier=G.createUUID(),this._cancellationController=null}get cancellationController(){return this._cancellationController}set cancellationController(e){this._cancellationController=e}abort(){this&&this.cancellationController&&this.cancellationController.abort()}operation(){throw Error("Should be implemented by subclass.")}validate(){}parse(e){return i(this,void 0,void 0,(function*(){throw Error("Should be implemented by subclass.")}))}request(){var e,t,s,n;const r={method:null!==(t=null===(e=this.params)||void 0===e?void 0:e.method)&&void 0!==t?t:B.GET,path:this.path,queryParameters:this.queryParameters,cancellable:null!==(n=null===(s=this.params)||void 0===s?void 0:s.cancellable)&&void 0!==n&&n,timeout:1e4,identifier:this.requestIdentifier},i=this.headers;if(i&&(r.headers=i),r.method===B.POST||r.method===B.PATCH){const[e,t]=[this.body,this.formData];t&&(r.formData=t),e&&(r.body=e)}return r}get headers(){}get path(){throw Error("`path` getter should be implemented by subclass.")}get queryParameters(){return{}}get formData(){}get body(){}deserializeResponse(e){const t=e.headers["content-type"];if(!t||-1===t.indexOf("javascript")&&-1===t.indexOf("json"))return;const s=se.decoder.decode(e.body);try{return JSON.parse(s)}catch(e){return void console.error("Error parsing JSON response:",e)}}}se.decoder=new TextDecoder,function(e){e.PNPublishOperation="PNPublishOperation",e.PNSignalOperation="PNSignalOperation",e.PNSubscribeOperation="PNSubscribeOperation",e.PNUnsubscribeOperation="PNUnsubscribeOperation",e.PNWhereNowOperation="PNWhereNowOperation",e.PNHereNowOperation="PNHereNowOperation",e.PNGlobalHereNowOperation="PNGlobalHereNowOperation",e.PNSetStateOperation="PNSetStateOperation",e.PNGetStateOperation="PNGetStateOperation",e.PNHeartbeatOperation="PNHeartbeatOperation",e.PNAddMessageActionOperation="PNAddActionOperation",e.PNRemoveMessageActionOperation="PNRemoveMessageActionOperation",e.PNGetMessageActionsOperation="PNGetMessageActionsOperation",e.PNTimeOperation="PNTimeOperation",e.PNHistoryOperation="PNHistoryOperation",e.PNDeleteMessagesOperation="PNDeleteMessagesOperation",e.PNFetchMessagesOperation="PNFetchMessagesOperation",e.PNMessageCounts="PNMessageCountsOperation",e.PNGetAllUUIDMetadataOperation="PNGetAllUUIDMetadataOperation",e.PNGetUUIDMetadataOperation="PNGetUUIDMetadataOperation",e.PNSetUUIDMetadataOperation="PNSetUUIDMetadataOperation",e.PNRemoveUUIDMetadataOperation="PNRemoveUUIDMetadataOperation",e.PNGetAllChannelMetadataOperation="PNGetAllChannelMetadataOperation",e.PNGetChannelMetadataOperation="PNGetChannelMetadataOperation",e.PNSetChannelMetadataOperation="PNSetChannelMetadataOperation",e.PNRemoveChannelMetadataOperation="PNRemoveChannelMetadataOperation",e.PNGetMembersOperation="PNGetMembersOperation",e.PNSetMembersOperation="PNSetMembersOperation",e.PNGetMembershipsOperation="PNGetMembershipsOperation",e.PNSetMembershipsOperation="PNSetMembershipsOperation",e.PNListFilesOperation="PNListFilesOperation",e.PNGenerateUploadUrlOperation="PNGenerateUploadUrlOperation",e.PNPublishFileOperation="PNPublishFileOperation",e.PNPublishFileMessageOperation="PNPublishFileMessageOperation",e.PNGetFileUrlOperation="PNGetFileUrlOperation",e.PNDownloadFileOperation="PNDownloadFileOperation",e.PNDeleteFileOperation="PNDeleteFileOperation",e.PNAddPushNotificationEnabledChannelsOperation="PNAddPushNotificationEnabledChannelsOperation",e.PNRemovePushNotificationEnabledChannelsOperation="PNRemovePushNotificationEnabledChannelsOperation",e.PNPushNotificationEnabledChannelsOperation="PNPushNotificationEnabledChannelsOperation",e.PNRemoveAllPushNotificationsOperation="PNRemoveAllPushNotificationsOperation",e.PNChannelGroupsOperation="PNChannelGroupsOperation",e.PNRemoveGroupOperation="PNRemoveGroupOperation",e.PNChannelsForGroupOperation="PNChannelsForGroupOperation",e.PNAddChannelsToGroupOperation="PNAddChannelsToGroupOperation",e.PNRemoveChannelsFromGroupOperation="PNRemoveChannelsFromGroupOperation",e.PNAccessManagerGrant="PNAccessManagerGrant",e.PNAccessManagerGrantToken="PNAccessManagerGrantToken",e.PNAccessManagerAudit="PNAccessManagerAudit",e.PNAccessManagerRevokeToken="PNAccessManagerRevokeToken",e.PNHandshakeOperation="PNHandshakeOperation",e.PNReceiveMessagesOperation="PNReceiveMessagesOperation"}(H||(H={}));var ne=H;var re;!function(e){e[e.Presence=-2]="Presence",e[e.Message=-1]="Message",e[e.Signal=1]="Signal",e[e.AppContext=2]="AppContext",e[e.MessageAction=3]="MessageAction",e[e.Files=4]="Files"}(re||(re={}));class ie extends se{constructor(e){var t,s,n,r,i,o;super({cancellable:!0}),this.parameters=e,null!==(t=(r=this.parameters).withPresence)&&void 0!==t||(r.withPresence=false),null!==(s=(i=this.parameters).channelGroups)&&void 0!==s||(i.channelGroups=[]),null!==(n=(o=this.parameters).channels)&&void 0!==n||(o.channels=[])}operation(){return ne.PNSubscribeOperation}validate(){const{keySet:{subscribeKey:e},channels:t,channelGroups:s}=this.parameters;return e?t||s?void 0:"`channels` and `channelGroups` both should not be empty":"Missing Subscribe Key"}parse(e){return i(this,void 0,void 0,(function*(){let t;try{const s=se.decoder.decode(e.body);t=JSON.parse(s)}catch(e){console.error("Error parsing JSON response:",e)}if(!t)throw new d("Service response error, check status for details",p("Unable to deserialize service response"));const s=t.m.filter((e=>{const t=void 0===e.b?e.c:e.b;return this.parameters.channels&&this.parameters.channels.includes(t)||this.parameters.channelGroups&&this.parameters.channelGroups.includes(t)})).map((e=>{let{e:t}=e;return null!=t||(t=e.c.endsWith("-pnpres")?re.Presence:re.Message),t!=re.Signal&&"string"==typeof e.d?t==re.Message?{type:re.Message,data:this.messageFromEnvelope(e)}:{type:re.Files,data:this.fileFromEnvelope(e)}:t==re.Message?{type:re.Message,data:this.messageFromEnvelope(e)}:t===re.Presence?{type:re.Presence,data:this.presenceEventFromEnvelope(e)}:t==re.Signal?{type:re.Signal,data:this.signalFromEnvelope(e)}:t===re.AppContext?{type:re.AppContext,data:this.appContextFromEnvelope(e)}:t===re.MessageAction?{type:re.MessageAction,data:this.messageActionFromEnvelope(e)}:{type:re.Files,data:this.fileFromEnvelope(e)}}));return{cursor:{timetoken:t.t.t,region:t.t.r},messages:s}}))}get headers(){return{accept:"text/javascript"}}presenceEventFromEnvelope(e){const{d:t}=e,[s,n]=this.subscriptionChannelFromEnvelope(e),r=s.replace("-pnpres",""),i=null!==n?r:null,o=null!==n?n:r;return"string"!=typeof t&&"data"in t&&(t.state=t.data,delete t.data),Object.assign({channel:r,subscription:n,actualChannel:i,subscribedChannel:o,timetoken:e.p.t},t)}messageFromEnvelope(e){const[t,s]=this.subscriptionChannelFromEnvelope(e),[n,r]=this.decryptedData(e.d),i={channel:t,subscription:s,actualChannel:null!==s?t:null,subscribedChannel:null!==s?s:t,timetoken:e.p.t,publisher:e.i,message:n};return e.u&&(i.userMetadata=e.u),r&&(i.error=r),i}signalFromEnvelope(e){const[t,s]=this.subscriptionChannelFromEnvelope(e),n={channel:t,subscription:s,timetoken:e.p.t,publisher:e.i,message:e.d};return e.u&&(n.userMetadata=e.u),n}messageActionFromEnvelope(e){const[t,s]=this.subscriptionChannelFromEnvelope(e),n=e.d;return{channel:t,subscription:s,timetoken:e.p.t,publisher:e.i,event:n.event,data:Object.assign(Object.assign({},n.data),{uuid:e.i})}}appContextFromEnvelope(e){const[t,s]=this.subscriptionChannelFromEnvelope(e),n=e.d;return{channel:t,subscription:s,timetoken:e.p.t,message:n}}fileFromEnvelope(e){const[t,s]=this.subscriptionChannelFromEnvelope(e),[n,r]=this.decryptedData(e.d);let i=r;const o={channel:t,subscription:s,timetoken:e.p.t,publisher:e.i};return e.u&&(o.userMetadata=e.u),n?"string"==typeof n?null!=i||(i="Unexpected file information payload data type."):(o.message=n.message,n.file&&(o.file={id:n.file.id,name:n.file.name,url:this.parameters.getFileUrl({id:n.file.id,name:n.file.name,channel:t})})):null!=i||(i="File information payload is missing."),i&&(o.error=i),o}subscriptionChannelFromEnvelope(e){return[e.c,void 0===e.b?e.c:e.b]}decryptedData(e){if(!this.parameters.crypto||"string"!=typeof e)return[e,void 0];let t,s;try{const s=this.parameters.crypto.decrypt(e);t=s instanceof ArrayBuffer?JSON.parse(oe.decoder.decode(s)):s}catch(e){t=null,s=`Error while decrypting message content: ${e.message}`}return[null!=t?t:e,s]}}class oe extends ie{get path(){var e;const{keySet:{subscribeKey:t},channels:s}=this.parameters;return`/v2/subscribe/${t}/${I(null!==(e=null==s?void 0:s.sort())&&void 0!==e?e:[],",")}/0`}get queryParameters(){const{channelGroups:e,filterExpression:t,heartbeat:s,state:n,timetoken:r,region:i}=this.parameters,o={};return e&&e.length>0&&(o["channel-group"]=e.sort().join(",")),t&&t.length>0&&(o["filter-expr"]=t),s&&(o.heartbeat=s),n&&Object.keys(n).length>0&&(o.state=JSON.stringify(n)),void 0!==r&&"string"==typeof r?r.length>0&&"0"!==r&&(o.tt=r):void 0!==r&&r>0&&(o.tt=r),i&&(o.tr=i),o}}class ae{constructor(e){this.listenerManager=e,this.channelListenerMap=new Map,this.groupListenerMap=new Map}emitEvent(e){if(e.type===re.Message)this.listenerManager.announceMessage(e.data),this.announce("message",e.data,e.data.channel,e.data.subscription);else if(e.type===re.Signal)this.listenerManager.announceSignal(e.data),this.announce("signal",e.data,e.data.channel,e.data.subscription);else if(e.type===re.Presence)this.listenerManager.announcePresence(e.data),this.announce("presence",e.data,e.data.channel,e.data.subscription);else if(e.type===re.AppContext){const{data:t}=e,{message:s}=t;if(this.listenerManager.announceObjects(t),this.announce("objects",t,t.channel,t.subscription),"uuid"===s.type){const{message:e,channel:n}=t,i=r(t,["message","channel"]),{event:o,type:a}=s,c=r(s,["event","type"]),u=Object.assign(Object.assign({},i),{spaceId:n,message:Object.assign(Object.assign({},c),{event:"set"===o?"updated":"removed",type:"user"})});this.listenerManager.announceUser(u),this.announce("user",u,u.spaceId,u.subscription)}else if("channel"===s.type){const{message:e,channel:n}=t,i=r(t,["message","channel"]),{event:o,type:a}=s,c=r(s,["event","type"]),u=Object.assign(Object.assign({},i),{spaceId:n,message:Object.assign(Object.assign({},c),{event:"set"===o?"updated":"removed",type:"space"})});this.listenerManager.announceSpace(u),this.announce("space",u,u.spaceId,u.subscription)}else if("membership"===s.type){const{message:e,channel:n}=t,i=r(t,["message","channel"]),{event:o,data:a}=s,c=r(s,["event","data"]),{uuid:u,channel:l}=a,h=r(a,["uuid","channel"]),d=Object.assign(Object.assign({},i),{spaceId:n,message:Object.assign(Object.assign({},c),{event:"set"===o?"updated":"removed",data:Object.assign(Object.assign({},h),{user:u,space:l})})});this.listenerManager.announceMembership(d),this.announce("membership",d,d.spaceId,d.subscription)}}else e.type===re.MessageAction?(this.listenerManager.announceMessageAction(e.data),this.announce("messageAction",e.data,e.data.channel,e.data.subscription)):e.type===re.Files&&(this.listenerManager.announceFile(e.data),this.announce("file",e.data,e.data.channel,e.data.subscription))}addListener(e,t,s){t&&s?(null==t||t.forEach((t=>{if(this.channelListenerMap.has(t)){const s=this.channelListenerMap.get(t);s.includes(e)||s.push(e)}else this.channelListenerMap.set(t,[e])})),null==s||s.forEach((t=>{if(this.groupListenerMap.has(t)){const s=this.groupListenerMap.get(t);s.includes(e)||s.push(e)}else this.groupListenerMap.set(t,[e])}))):this.listenerManager.addListener(e)}removeListener(e,t,s){t&&s?(null==t||t.forEach((t=>{this.channelListenerMap.has(t)&&this.channelListenerMap.set(t,this.channelListenerMap.get(t).filter((t=>t!==e)))})),null==s||s.forEach((t=>{this.groupListenerMap.has(t)&&this.groupListenerMap.set(t,this.groupListenerMap.get(t).filter((t=>t!==e)))}))):this.listenerManager.removeListener(e)}removeAllListeners(){this.listenerManager.removeAllListeners(),this.channelListenerMap.clear(),this.groupListenerMap.clear()}announce(e,t,s,n){t&&this.channelListenerMap.has(s)&&this.channelListenerMap.get(s).forEach((s=>{const n=s[e];n&&n(t)})),n&&this.groupListenerMap.has(n)&&this.groupListenerMap.get(n).forEach((s=>{const n=s[e];n&&n(t)}))}}class ce{constructor(e=!1){this.sync=e,this.listeners=new Set}subscribe(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}notify(e){const t=()=>{this.listeners.forEach((t=>{t(e)}))};this.sync?t():setTimeout(t,0)}}class ue{transition(e,t){var s;if(this.transitionMap.has(t.type))return null===(s=this.transitionMap.get(t.type))||void 0===s?void 0:s(e,t)}constructor(e){this.label=e,this.transitionMap=new Map,this.enterEffects=[],this.exitEffects=[]}on(e,t){return this.transitionMap.set(e,t),this}with(e,t){return[this,e,null!=t?t:[]]}onEnter(e){return this.enterEffects.push(e),this}onExit(e){return this.exitEffects.push(e),this}}class le extends ce{describe(e){return new ue(e)}start(e,t){this.currentState=e,this.currentContext=t,this.notify({type:"engineStarted",state:e,context:t})}transition(e){if(!this.currentState)throw new Error("Start the engine first");this.notify({type:"eventReceived",event:e});const t=this.currentState.transition(this.currentContext,e);if(t){const[s,n,r]=t;for(const e of this.currentState.exitEffects)this.notify({type:"invocationDispatched",invocation:e(this.currentContext)});const i=this.currentState;this.currentState=s;const o=this.currentContext;this.currentContext=n,this.notify({type:"transitionDone",fromState:i,fromContext:o,toState:s,toContext:n,event:e});for(const e of r)this.notify({type:"invocationDispatched",invocation:e});for(const e of this.currentState.enterEffects)this.notify({type:"invocationDispatched",invocation:e(this.currentContext)})}}}class he{constructor(e){this.dependencies=e,this.instances=new Map,this.handlers=new Map}on(e,t){this.handlers.set(e,t)}dispatch(e){if("CANCEL"===e.type){if(this.instances.has(e.payload)){const t=this.instances.get(e.payload);null==t||t.cancel(),this.instances.delete(e.payload)}return}const t=this.handlers.get(e.type);if(!t)throw new Error(`Unhandled invocation '${e.type}'`);const s=t(e.payload,this.dependencies);e.managed&&this.instances.set(e.type,s),s.start()}dispose(){for(const[e,t]of this.instances.entries())t.cancel(),this.instances.delete(e)}}function de(e,t){const s=function(...s){return{type:e,payload:null==t?void 0:t(...s)}};return s.type=e,s}function pe(e,t){const s=(...s)=>({type:e,payload:t(...s),managed:!1});return s.type=e,s}function ge(e,t){const s=(...s)=>({type:e,payload:t(...s),managed:!0});return s.type=e,s.cancel={type:"CANCEL",payload:e,managed:!1},s}class ye extends Error{constructor(){super("The operation was aborted."),this.name="AbortError",Object.setPrototypeOf(this,new.target.prototype)}}class fe extends ce{constructor(){super(...arguments),this._aborted=!1}get aborted(){return this._aborted}throwIfAborted(){if(this._aborted)throw new ye}abort(){this._aborted=!0,this.notify(new ye)}}class me{constructor(e,t){this.payload=e,this.dependencies=t}}class be extends me{constructor(e,t,s){super(e,t),this.asyncFunction=s,this.abortSignal=new fe}start(){this.asyncFunction(this.payload,this.abortSignal,this.dependencies).catch((e=>{}))}cancel(){this.abortSignal.abort()}}const ve=e=>(t,s)=>new be(t,s,e),we=de("RECONNECT",(()=>({}))),Se=de("DISCONNECT",(()=>({}))),ke=de("JOINED",((e,t)=>({channels:e,groups:t}))),Ee=de("LEFT",((e,t)=>({channels:e,groups:t}))),Oe=de("LEFT_ALL",(()=>({}))),Ce=de("HEARTBEAT_SUCCESS",(e=>({statusCode:e}))),Ne=de("HEARTBEAT_FAILURE",(e=>e)),Pe=de("HEARTBEAT_GIVEUP",(()=>({}))),Me=de("TIMES_UP",(()=>({}))),Ae=pe("HEARTBEAT",((e,t)=>({channels:e,groups:t}))),_e=pe("LEAVE",((e,t)=>({channels:e,groups:t}))),je=pe("EMIT_STATUS",(e=>e)),Ie=ge("WAIT",(()=>({}))),Re=ge("DELAYED_HEARTBEAT",(e=>e));class Ue extends he{constructor(e,t){super(t),this.on(Ae.type,ve(((t,s,n)=>i(this,[t,s,n],void 0,(function*(t,s,{heartbeat:n,presenceState:r,config:i}){try{yield n(Object.assign(Object.assign({channels:t.channels,channelGroups:t.groups},i.maintainPresenceState&&{state:r}),{heartbeat:i.presenceTimeout}));e.transition(Ce(200))}catch(t){if(t instanceof d){if(t.status&&t.status.category==h.PNCancelledCategory)return;return e.transition(Ne(t))}}}))))),this.on(_e.type,ve(((e,t,s)=>i(this,[e,t,s],void 0,(function*(e,t,{leave:s,config:n}){if(!n.suppressLeaveEvents)try{s({channels:e.channels,channelGroups:e.groups})}catch(e){}}))))),this.on(Ie.type,ve(((t,s,n)=>i(this,[t,s,n],void 0,(function*(t,s,{heartbeatDelay:n}){return s.throwIfAborted(),yield n(),s.throwIfAborted(),e.transition(Me())}))))),this.on(Re.type,ve(((t,s,n)=>i(this,[t,s,n],void 0,(function*(t,s,{heartbeat:n,retryDelay:r,presenceState:i,config:o}){if(!o.retryConfiguration||!o.retryConfiguration.shouldRetry(t.reason,t.attempts))return e.transition(Pe());s.throwIfAborted(),yield r(o.retryConfiguration.getDelay(t.attempts,t.reason)),s.throwIfAborted();try{yield n(Object.assign(Object.assign({channels:t.channels,channelGroups:t.groups},o.maintainPresenceState&&{state:i}),{heartbeat:o.presenceTimeout}));return e.transition(Ce(200))}catch(t){if(t instanceof d){if(t.status&&t.status.category==h.PNCancelledCategory)return;return e.transition(Ne(t))}}}))))),this.on(je.type,ve(((e,t,s)=>i(this,[e,t,s],void 0,(function*(e,t,{emitStatus:s,config:n}){var r;n.announceFailedHeartbeats&&!0===(null===(r=null==e?void 0:e.status)||void 0===r?void 0:r.error)?s(e.status):n.announceSuccessfulHeartbeats&&200===e.statusCode&&s(Object.assign(Object.assign({},e),{operation:ne.PNHeartbeatOperation,error:!1}))})))))}}const Te=new ue("HEARTBEAT_STOPPED");Te.on(ke.type,((e,t)=>Te.with({channels:[...e.channels,...t.payload.channels],groups:[...e.groups,...t.payload.groups]}))),Te.on(Ee.type,((e,t)=>Te.with({channels:e.channels.filter((e=>!t.payload.channels.includes(e))),groups:e.groups.filter((e=>!t.payload.groups.includes(e)))}))),Te.on(we.type,((e,t)=>qe.with({channels:e.channels,groups:e.groups}))),Te.on(Oe.type,((e,t)=>Ge.with(void 0)));const Fe=new ue("HEARTBEAT_COOLDOWN");Fe.onEnter((()=>Ie())),Fe.onExit((()=>Ie.cancel)),Fe.on(Me.type,((e,t)=>qe.with({channels:e.channels,groups:e.groups}))),Fe.on(ke.type,((e,t)=>qe.with({channels:[...e.channels,...t.payload.channels],groups:[...e.groups,...t.payload.groups]}))),Fe.on(Ee.type,((e,t)=>qe.with({channels:e.channels.filter((e=>!t.payload.channels.includes(e))),groups:e.groups.filter((e=>!t.payload.groups.includes(e)))},[_e(t.payload.channels,t.payload.groups)]))),Fe.on(Se.type,(e=>Te.with({channels:e.channels,groups:e.groups},[_e(e.channels,e.groups)]))),Fe.on(Oe.type,((e,t)=>Ge.with(void 0,[_e(e.channels,e.groups)])));const xe=new ue("HEARTBEAT_FAILED");xe.on(ke.type,((e,t)=>qe.with({channels:[...e.channels,...t.payload.channels],groups:[...e.groups,...t.payload.groups]}))),xe.on(Ee.type,((e,t)=>qe.with({channels:e.channels.filter((e=>!t.payload.channels.includes(e))),groups:e.groups.filter((e=>!t.payload.groups.includes(e)))},[_e(t.payload.channels,t.payload.groups)]))),xe.on(we.type,((e,t)=>qe.with({channels:e.channels,groups:e.groups}))),xe.on(Se.type,((e,t)=>Te.with({channels:e.channels,groups:e.groups},[_e(e.channels,e.groups)]))),xe.on(Oe.type,((e,t)=>Ge.with(void 0,[_e(e.channels,e.groups)])));const De=new ue("HEARBEAT_RECONNECTING");De.onEnter((e=>Re(e))),De.onExit((()=>Re.cancel)),De.on(ke.type,((e,t)=>qe.with({channels:[...e.channels,...t.payload.channels],groups:[...e.groups,...t.payload.groups]}))),De.on(Ee.type,((e,t)=>qe.with({channels:e.channels.filter((e=>!t.payload.channels.includes(e))),groups:e.groups.filter((e=>!t.payload.groups.includes(e)))},[_e(t.payload.channels,t.payload.groups)]))),De.on(Se.type,((e,t)=>{Te.with({channels:e.channels,groups:e.groups},[_e(e.channels,e.groups)])})),De.on(Ce.type,((e,t)=>Fe.with({channels:e.channels,groups:e.groups}))),De.on(Ne.type,((e,t)=>De.with(Object.assign(Object.assign({},e),{attempts:e.attempts+1,reason:t.payload})))),De.on(Pe.type,((e,t)=>xe.with({channels:e.channels,groups:e.groups}))),De.on(Oe.type,((e,t)=>Ge.with(void 0,[_e(e.channels,e.groups)])));const qe=new ue("HEARTBEATING");qe.onEnter((e=>Ae(e.channels,e.groups))),qe.on(Ce.type,((e,t)=>Fe.with({channels:e.channels,groups:e.groups}))),qe.on(ke.type,((e,t)=>qe.with({channels:[...e.channels,...t.payload.channels],groups:[...e.groups,...t.payload.groups]}))),qe.on(Ee.type,((e,t)=>qe.with({channels:e.channels.filter((e=>!t.payload.channels.includes(e))),groups:e.groups.filter((e=>!t.payload.groups.includes(e)))},[_e(t.payload.channels,t.payload.groups)]))),qe.on(Ne.type,((e,t)=>De.with(Object.assign(Object.assign({},e),{attempts:0,reason:t.payload})))),qe.on(Se.type,(e=>Te.with({channels:e.channels,groups:e.groups},[_e(e.channels,e.groups)]))),qe.on(Oe.type,((e,t)=>Ge.with(void 0,[_e(e.channels,e.groups)])));const Ge=new ue("HEARTBEAT_INACTIVE");Ge.on(ke.type,((e,t)=>qe.with({channels:t.payload.channels,groups:t.payload.groups})));class Ke{get _engine(){return this.engine}constructor(e){this.dependencies=e,this.engine=new le,this.channels=[],this.groups=[],this.dispatcher=new Ue(this.engine,e),this._unsubscribeEngine=this.engine.subscribe((e=>{"invocationDispatched"===e.type&&this.dispatcher.dispatch(e.invocation)})),this.engine.start(Ge,void 0)}join({channels:e,groups:t}){this.channels=[...this.channels,...null!=e?e:[]],this.groups=[...this.groups,...null!=t?t:[]],this.engine.transition(ke(this.channels.slice(0),this.groups.slice(0)))}leave({channels:e,groups:t}){this.dependencies.presenceState&&(null==e||e.forEach((e=>delete this.dependencies.presenceState[e])),null==t||t.forEach((e=>delete this.dependencies.presenceState[e]))),this.engine.transition(Ee(null!=e?e:[],null!=t?t:[]))}leaveAll(){this.engine.transition(Oe())}dispose(){this._unsubscribeEngine(),this.dispatcher.dispose()}}class $e{static LinearRetryPolicy(e){return{delay:e.delay,maximumRetry:e.maximumRetry,shouldRetry(e,t){var s;return 403!==(null===(s=null==e?void 0:e.status)||void 0===s?void 0:s.statusCode)&&this.maximumRetry>t},getDelay(e,t){var s;return 1e3*((null!==(s=t.retryAfter)&&void 0!==s?s:this.delay)+Math.random())},getGiveupReason(e,t){var s;return this.maximumRetry<=t?"retry attempts exhaused.":403===(null===(s=null==e?void 0:e.status)||void 0===s?void 0:s.statusCode)?"forbidden operation.":"unknown error"},validate(){if(this.maximumRetry>10)throw new Error("Maximum retry for linear retry policy can not be more than 10")}}}static ExponentialRetryPolicy(e){return{minimumDelay:e.minimumDelay,maximumDelay:e.maximumDelay,maximumRetry:e.maximumRetry,shouldRetry(e,t){var s;return 403!==(null===(s=null==e?void 0:e.status)||void 0===s?void 0:s.statusCode)&&this.maximumRetry>t},getDelay(e,t){var s;return 1e3*((null!==(s=t.retryAfter)&&void 0!==s?s:Math.min(Math.pow(2,e),this.maximumDelay))+Math.random())},getGiveupReason(e,t){var s;return this.maximumRetry<=t?"retry attempts exhausted.":403===(null===(s=null==e?void 0:e.status)||void 0===s?void 0:s.statusCode)?"forbidden operation.":"unknown error"},validate(){if(this.minimumDelay<2)throw new Error("Minimum delay can not be set less than 2 seconds for retry");if(this.maximumDelay)throw new Error("Maximum delay can not be set more than 150 seconds for retry");if(this.maximumRetry>6)throw new Error("Maximum retry for exponential retry policy can not be more than 6")}}}}const Le=ge("HANDSHAKE",((e,t)=>({channels:e,groups:t}))),Be=ge("RECEIVE_MESSAGES",((e,t,s)=>({channels:e,groups:t,cursor:s}))),He=pe("EMIT_MESSAGES",(e=>e)),ze=pe("EMIT_STATUS",(e=>e)),Ve=ge("RECEIVE_RECONNECT",(e=>e)),We=ge("HANDSHAKE_RECONNECT",(e=>e)),Je=de("SUBSCRIPTION_CHANGED",((e,t)=>({channels:e,groups:t}))),Qe=de("SUBSCRIPTION_RESTORED",((e,t,s,n)=>({channels:e,groups:t,cursor:{timetoken:s,region:null!=n?n:0}}))),Ye=de("HANDSHAKE_SUCCESS",(e=>e)),Xe=de("HANDSHAKE_FAILURE",(e=>e)),Ze=de("HANDSHAKE_RECONNECT_SUCCESS",(e=>({cursor:e}))),et=de("HANDSHAKE_RECONNECT_FAILURE",(e=>e)),tt=de("HANDSHAKE_RECONNECT_GIVEUP",(e=>e)),st=de("RECEIVE_SUCCESS",((e,t)=>({cursor:e,events:t}))),nt=de("RECEIVE_FAILURE",(e=>e)),rt=de("RECEIVE_RECONNECT_SUCCESS",((e,t)=>({cursor:e,events:t}))),it=de("RECEIVE_RECONNECT_FAILURE",(e=>e)),ot=de("RECEIVING_RECONNECT_GIVEUP",(e=>e)),at=de("DISCONNECT",(()=>({}))),ct=de("RECONNECT",((e,t)=>({cursor:{timetoken:null!=e?e:"",region:null!=t?t:0}}))),ut=de("UNSUBSCRIBE_ALL",(()=>({})));class lt extends he{constructor(e,t){super(t),this.on(Le.type,ve(((t,s,n)=>i(this,[t,s,n],void 0,(function*(t,s,{handshake:n,presenceState:r,config:i}){s.throwIfAborted();try{const o=yield n(Object.assign({abortSignal:s,channels:t.channels,channelGroups:t.groups,filterExpression:i.filterExpression},i.maintainPresenceState&&{state:r}));return e.transition(Ye(o))}catch(t){if(t instanceof d){if(t.status&&t.status.category==h.PNCancelledCategory)return;return e.transition(Xe(t))}}}))))),this.on(Be.type,ve(((t,s,n)=>i(this,[t,s,n],void 0,(function*(t,s,{receiveMessages:n,config:r}){s.throwIfAborted();try{const i=yield n({abortSignal:s,channels:t.channels,channelGroups:t.groups,timetoken:t.cursor.timetoken,region:t.cursor.region,filterExpression:r.filterExpression});e.transition(st(i.cursor,i.messages))}catch(t){if(t instanceof d){if(t.status&&t.status.category==h.PNCancelledCategory)return;if(!s.aborted)return e.transition(nt(t))}}}))))),this.on(He.type,ve(((e,t,s)=>i(this,[e,t,s],void 0,(function*(e,t,{emitMessages:s}){e.length>0&&s(e)}))))),this.on(ze.type,ve(((e,t,s)=>i(this,[e,t,s],void 0,(function*(e,t,{emitStatus:s}){s(e)}))))),this.on(Ve.type,ve(((t,s,n)=>i(this,[t,s,n],void 0,(function*(t,s,{receiveMessages:n,delay:r,config:i}){if(!i.retryConfiguration||!i.retryConfiguration.shouldRetry(t.reason,t.attempts))return e.transition(ot(new d(i.retryConfiguration?i.retryConfiguration.getGiveupReason(t.reason,t.attempts):"Unable to complete subscribe messages receive.")));s.throwIfAborted(),yield r(i.retryConfiguration.getDelay(t.attempts,t.reason)),s.throwIfAborted();try{const r=yield n({abortSignal:s,channels:t.channels,channelGroups:t.groups,timetoken:t.cursor.timetoken,region:t.cursor.region,filterExpression:i.filterExpression});return e.transition(rt(r.cursor,r.messages))}catch(t){if(t instanceof d){if(t.status&&t.status.category==h.PNCancelledCategory)return;return e.transition(it(t))}}}))))),this.on(We.type,ve(((t,s,n)=>i(this,[t,s,n],void 0,(function*(t,s,{handshake:n,delay:r,presenceState:i,config:o}){if(!o.retryConfiguration||!o.retryConfiguration.shouldRetry(t.reason,t.attempts))return e.transition(tt(new d(o.retryConfiguration?o.retryConfiguration.getGiveupReason(t.reason,t.attempts):"Unable to complete subscribe handshake")));s.throwIfAborted(),yield r(o.retryConfiguration.getDelay(t.attempts,t.reason)),s.throwIfAborted();try{const r=yield n(Object.assign({abortSignal:s,channels:t.channels,channelGroups:t.groups,filterExpression:o.filterExpression},o.maintainPresenceState&&{state:i}));return e.transition(Ze(r))}catch(t){if(t instanceof d){if(t.status&&t.status.category==h.PNCancelledCategory)return;return e.transition(et(t))}}})))))}}const ht=new ue("HANDSHAKE_FAILED");ht.on(Je.type,((e,t)=>bt.with({channels:t.payload.channels,groups:t.payload.groups,cursor:e.cursor}))),ht.on(ct.type,((e,t)=>bt.with({channels:e.channels,groups:e.groups,cursor:t.payload.cursor||e.cursor}))),ht.on(Qe.type,((e,t)=>{var s,n;return bt.with({channels:t.payload.channels,groups:t.payload.groups,cursor:{timetoken:t.payload.cursor.timetoken,region:t.payload.cursor.region?t.payload.cursor.region:null!==(n=null===(s=null==e?void 0:e.cursor)||void 0===s?void 0:s.region)&&void 0!==n?n:0}})})),ht.on(ut.type,(e=>vt.with()));const dt=new ue("HANDSHAKE_STOPPED");dt.on(Je.type,((e,t)=>dt.with({channels:t.payload.channels,groups:t.payload.groups,cursor:e.cursor}))),dt.on(ct.type,((e,t)=>bt.with(Object.assign(Object.assign({},e),{cursor:t.payload.cursor||e.cursor})))),dt.on(Qe.type,((e,t)=>{var s;return dt.with({channels:t.payload.channels,groups:t.payload.groups,cursor:{timetoken:t.payload.cursor.timetoken,region:t.payload.cursor.region||(null===(s=null==e?void 0:e.cursor)||void 0===s?void 0:s.region)||0}})})),dt.on(ut.type,(e=>vt.with()));const pt=new ue("RECEIVE_FAILED");pt.on(ct.type,((e,t)=>{var s;return bt.with({channels:e.channels,groups:e.groups,cursor:{timetoken:t.payload.cursor.timetoken?null===(s=t.payload.cursor)||void 0===s?void 0:s.timetoken:e.cursor.timetoken,region:t.payload.cursor.region||e.cursor.region}})})),pt.on(Je.type,((e,t)=>bt.with({channels:t.payload.channels,groups:t.payload.groups,cursor:e.cursor}))),pt.on(Qe.type,((e,t)=>bt.with({channels:t.payload.channels,groups:t.payload.groups,cursor:{timetoken:t.payload.cursor.timetoken,region:t.payload.cursor.region||e.cursor.region}}))),pt.on(ut.type,(e=>vt.with(void 0)));const gt=new ue("RECEIVE_STOPPED");gt.on(Je.type,((e,t)=>gt.with({channels:t.payload.channels,groups:t.payload.groups,cursor:e.cursor}))),gt.on(Qe.type,((e,t)=>gt.with({channels:t.payload.channels,groups:t.payload.groups,cursor:{timetoken:t.payload.cursor.timetoken,region:t.payload.cursor.region||e.cursor.region}}))),gt.on(ct.type,((e,t)=>{var s;return bt.with({channels:e.channels,groups:e.groups,cursor:{timetoken:t.payload.cursor.timetoken?null===(s=t.payload.cursor)||void 0===s?void 0:s.timetoken:e.cursor.timetoken,region:t.payload.cursor.region||e.cursor.region}})})),gt.on(ut.type,(()=>vt.with(void 0)));const yt=new ue("RECEIVE_RECONNECTING");yt.onEnter((e=>Ve(e))),yt.onExit((()=>Ve.cancel)),yt.on(rt.type,((e,t)=>ft.with({channels:e.channels,groups:e.groups,cursor:t.payload.cursor},[He(t.payload.events)]))),yt.on(it.type,((e,t)=>yt.with(Object.assign(Object.assign({},e),{attempts:e.attempts+1,reason:t.payload})))),yt.on(ot.type,((e,t)=>{var s;return pt.with({groups:e.groups,channels:e.channels,cursor:e.cursor,reason:t.payload},[ze({category:h.PNDisconnectedUnexpectedlyCategory,error:null===(s=t.payload)||void 0===s?void 0:s.message})])})),yt.on(at.type,(e=>gt.with({channels:e.channels,groups:e.groups,cursor:e.cursor},[ze({category:h.PNDisconnectedCategory})]))),yt.on(Qe.type,((e,t)=>ft.with({channels:t.payload.channels,groups:t.payload.groups,cursor:{timetoken:t.payload.cursor.timetoken,region:t.payload.cursor.region||e.cursor.region}}))),yt.on(Je.type,((e,t)=>ft.with({channels:t.payload.channels,groups:t.payload.groups,cursor:e.cursor}))),yt.on(ut.type,(e=>vt.with(void 0,[ze({category:h.PNDisconnectedCategory})])));const ft=new ue("RECEIVING");ft.onEnter((e=>Be(e.channels,e.groups,e.cursor))),ft.onExit((()=>Be.cancel)),ft.on(st.type,((e,t)=>ft.with({channels:e.channels,groups:e.groups,cursor:t.payload.cursor},[He(t.payload.events)]))),ft.on(Je.type,((e,t)=>0===t.payload.channels.length&&0===t.payload.groups.length?vt.with(void 0):ft.with({cursor:e.cursor,channels:t.payload.channels,groups:t.payload.groups}))),ft.on(Qe.type,((e,t)=>0===t.payload.channels.length&&0===t.payload.groups.length?vt.with(void 0):ft.with({channels:t.payload.channels,groups:t.payload.groups,cursor:{timetoken:t.payload.cursor.timetoken,region:t.payload.cursor.region||e.cursor.region}}))),ft.on(nt.type,((e,t)=>yt.with(Object.assign(Object.assign({},e),{attempts:0,reason:t.payload})))),ft.on(at.type,(e=>gt.with({channels:e.channels,groups:e.groups,cursor:e.cursor},[ze({category:h.PNDisconnectedCategory})]))),ft.on(ut.type,(e=>vt.with(void 0,[ze({category:h.PNDisconnectedCategory})])));const mt=new ue("HANDSHAKE_RECONNECTING");mt.onEnter((e=>We(e))),mt.onExit((()=>We.cancel)),mt.on(Ze.type,((e,t)=>{var s,n;const r={timetoken:(null===(s=e.cursor)||void 0===s?void 0:s.timetoken)?null===(n=e.cursor)||void 0===n?void 0:n.timetoken:t.payload.cursor.timetoken,region:t.payload.cursor.region};return ft.with({channels:e.channels,groups:e.groups,cursor:r},[ze({category:h.PNConnectedCategory})])})),mt.on(et.type,((e,t)=>mt.with(Object.assign(Object.assign({},e),{attempts:e.attempts+1,reason:t.payload})))),mt.on(tt.type,((e,t)=>{var s;return ht.with({groups:e.groups,channels:e.channels,cursor:e.cursor,reason:t.payload},[ze({category:h.PNConnectionErrorCategory,error:null===(s=t.payload)||void 0===s?void 0:s.message})])})),mt.on(at.type,(e=>dt.with({channels:e.channels,groups:e.groups,cursor:e.cursor}))),mt.on(Je.type,((e,t)=>bt.with({channels:t.payload.channels,groups:t.payload.groups,cursor:e.cursor}))),mt.on(Qe.type,((e,t)=>{var s,n;return bt.with({channels:t.payload.channels,groups:t.payload.groups,cursor:{timetoken:t.payload.cursor.timetoken,region:(null===(s=t.payload.cursor)||void 0===s?void 0:s.region)||(null===(n=null==e?void 0:e.cursor)||void 0===n?void 0:n.region)||0}})})),mt.on(ut.type,(e=>vt.with(void 0)));const bt=new ue("HANDSHAKING");bt.onEnter((e=>Le(e.channels,e.groups))),bt.onExit((()=>Le.cancel)),bt.on(Je.type,((e,t)=>0===t.payload.channels.length&&0===t.payload.groups.length?vt.with(void 0):bt.with({channels:t.payload.channels,groups:t.payload.groups,cursor:e.cursor}))),bt.on(Ye.type,((e,t)=>{var s,n;return ft.with({channels:e.channels,groups:e.groups,cursor:{timetoken:(null===(s=null==e?void 0:e.cursor)||void 0===s?void 0:s.timetoken)?null===(n=null==e?void 0:e.cursor)||void 0===n?void 0:n.timetoken:t.payload.timetoken,region:t.payload.region}},[ze({category:h.PNConnectedCategory})])})),bt.on(Xe.type,((e,t)=>mt.with({channels:e.channels,groups:e.groups,cursor:e.cursor,attempts:0,reason:t.payload}))),bt.on(at.type,(e=>dt.with({channels:e.channels,groups:e.groups,cursor:e.cursor}))),bt.on(Qe.type,((e,t)=>{var s;return bt.with({channels:t.payload.channels,groups:t.payload.groups,cursor:{timetoken:t.payload.cursor.timetoken,region:t.payload.cursor.region||(null===(s=null==e?void 0:e.cursor)||void 0===s?void 0:s.region)||0}})})),bt.on(ut.type,(e=>vt.with()));const vt=new ue("UNSUBSCRIBED");vt.on(Je.type,((e,t)=>bt.with({channels:t.payload.channels,groups:t.payload.groups}))),vt.on(Qe.type,((e,t)=>bt.with({channels:t.payload.channels,groups:t.payload.groups,cursor:t.payload.cursor})));class wt{get _engine(){return this.engine}constructor(e){this.engine=new le,this.channels=[],this.groups=[],this.dependencies=e,this.dispatcher=new lt(this.engine,e),this._unsubscribeEngine=this.engine.subscribe((e=>{"invocationDispatched"===e.type&&this.dispatcher.dispatch(e.invocation)})),this.engine.start(vt,void 0)}subscribe({channels:e,channelGroups:t,timetoken:s,withPresence:n}){this.channels=[...this.channels,...null!=e?e:[]],this.groups=[...this.groups,...null!=t?t:[]],n&&(this.channels.map((e=>this.channels.push(`${e}-pnpres`))),this.groups.map((e=>this.groups.push(`${e}-pnpres`)))),s?this.engine.transition(Qe(Array.from(new Set([...this.channels,...null!=e?e:[]])),Array.from(new Set([...this.groups,...null!=t?t:[]])),s)):this.engine.transition(Je(Array.from(new Set([...this.channels,...null!=e?e:[]])),Array.from(new Set([...this.groups,...null!=t?t:[]])))),this.dependencies.join&&this.dependencies.join({channels:Array.from(new Set(this.channels.filter((e=>!e.endsWith("-pnpres"))))),groups:Array.from(new Set(this.groups.filter((e=>!e.endsWith("-pnpres")))))})}unsubscribe({channels:e=[],channelGroups:t=[]}){const s=R(this.channels,[...e,...e.map((e=>`${e}-pnpres`))]),n=R(this.groups,[...t,...t.map((e=>`${e}-pnpres`))]);if(new Set(this.channels).size!==new Set(s).size||new Set(this.groups).size!==new Set(n).size){const r=U(this.channels,e),i=U(this.groups,t);this.dependencies.presenceState&&(null==r||r.forEach((e=>delete this.dependencies.presenceState[e])),null==i||i.forEach((e=>delete this.dependencies.presenceState[e]))),this.channels=s,this.groups=n,this.engine.transition(Je(Array.from(new Set(this.channels.slice(0))),Array.from(new Set(this.groups.slice(0))))),this.dependencies.leave&&this.dependencies.leave({channels:r.slice(0),groups:i.slice(0)})}}unsubscribeAll(){this.channels=[],this.groups=[],this.dependencies.presenceState&&Object.keys(this.dependencies.presenceState).forEach((e=>{delete this.dependencies.presenceState[e]})),this.engine.transition(Je(this.channels.slice(0),this.groups.slice(0))),this.dependencies.leaveAll&&this.dependencies.leaveAll()}reconnect({timetoken:e,region:t}){this.engine.transition(ct(e,t))}disconnect(){this.engine.transition(at()),this.dependencies.leaveAll&&this.dependencies.leaveAll()}getSubscribedChannels(){return Array.from(new Set(this.channels.slice(0)))}getSubscribedChannelGroups(){return Array.from(new Set(this.groups.slice(0)))}dispose(){this.disconnect(),this._unsubscribeEngine(),this.dispatcher.dispose()}}class St extends se{constructor(e){var t,s;super({method:e.sendByPost?B.POST:B.GET}),this.parameters=e,null!==(t=(s=this.parameters).sendByPost)&&void 0!==t||(s.sendByPost=false)}operation(){return ne.PNPublishOperation}validate(){const{message:e,channel:t,keySet:{publishKey:s}}=this.parameters;return t?e?s?void 0:"Missing 'publishKey'":"Missing 'message'":"Missing 'channel'"}parse(e){return i(this,void 0,void 0,(function*(){const t=this.deserializeResponse(e);if(!t)throw new d("Service response error, check status for details",p("Unable to deserialize service response"));return{timetoken:t[2]}}))}get path(){const{message:e,channel:t,keySet:s}=this.parameters,n=this.prepareMessagePayload(e);return`/publish/${s.publishKey}/${s.subscribeKey}/0/${j(t)}/0${this.parameters.sendByPost?"":`/${j(n)}`}`}get queryParameters(){const{meta:e,replicate:t,storeInHistory:s,ttl:n}=this.parameters,r={};return void 0!==s&&(r.store=s?"1":"0"),void 0!==n&&(r.ttl=n),void 0===t||t||(r.norep="true"),e&&"object"==typeof e&&(r.meta=JSON.stringify(e)),r}get headers(){return{"Content-Type":"application/json"}}get body(){return this.prepareMessagePayload(this.parameters.message)}prepareMessagePayload(e){const{crypto:t}=this.parameters;if(!t)return JSON.stringify(e)||"";const s=t.encrypt(JSON.stringify(e));return JSON.stringify("string"==typeof s?s:u(s))}}class kt extends se{constructor(e){super(),this.parameters=e}operation(){return ne.PNSignalOperation}validate(){const{message:e,channel:t,keySet:{publishKey:s}}=this.parameters;return t?e?s?void 0:"Missing 'publishKey'":"Missing 'message'":"Missing 'channel'"}parse(e){return i(this,void 0,void 0,(function*(){const t=this.deserializeResponse(e);if(!t)throw new d("Service response error, check status for details",p("Unable to deserialize service response"));return{timetoken:t[2]}}))}get path(){const{keySet:{publishKey:e,subscribeKey:t},channel:s,message:n}=this.parameters,r=JSON.stringify(n);return`/signal/${e}/${t}/0/${j(s)}/0/${j(r)}`}}class Et extends ie{operation(){return ne.PNReceiveMessagesOperation}validate(){const e=super.validate();return e||(this.parameters.timetoken?this.parameters.region?void 0:"region can not be empty":"timetoken can not be empty")}get path(){const{keySet:{subscribeKey:e},channels:t=[]}=this.parameters;return`/v2/subscribe/${e}/${I(t.sort(),",")}/0`}get queryParameters(){const{channelGroups:e,filterExpression:t,timetoken:s,region:n}=this.parameters,r={ee:""};return e&&e.length>0&&(r["channel-group"]=e.sort().join(",")),t&&t.length>0&&(r["filter-expr"]=t),"string"==typeof s?s&&s.length>0&&(r.tt=s):s&&s>0&&(r.tt=s),n&&(r.tr=n),r}}class Ot extends ie{operation(){return ne.PNHandshakeOperation}get path(){const{keySet:{subscribeKey:e},channels:t=[]}=this.parameters;return`/v2/subscribe/${e}/${I(t.sort(),",")}/0`}get queryParameters(){const{channelGroups:e,filterExpression:t,state:s}=this.parameters,n={tt:0,ee:""};return e&&e.length>0&&(n["channel-group"]=e.sort().join(",")),t&&t.length>0&&(n["filter-expr"]=t),s&&Object.keys(s).length>0&&(n.state=JSON.stringify(s)),n}}class Ct extends se{constructor(e){var t,s,n,r;super(),this.parameters=e,null!==(t=(n=this.parameters).channels)&&void 0!==t||(n.channels=[]),null!==(s=(r=this.parameters).channelGroups)&&void 0!==s||(r.channelGroups=[])}operation(){return ne.PNGetStateOperation}validate(){const{keySet:{subscribeKey:e},channels:t,channelGroups:s}=this.parameters;if(!e)return"Missing Subscribe Key"}parse(e){return i(this,void 0,void 0,(function*(){const t=this.deserializeResponse(e);if(!t)throw new d("Service response error, check status for details",p("Unable to deserialize service response"));if(t.status>=400)throw A.create(e);const{channels:s=[],channelGroups:n=[]}=this.parameters,r={channels:{}};return 1===s.length&&0===n.length?r.channels[s[0]]=t.payload:r.channels=t.payload,r}))}get path(){const{keySet:{subscribeKey:e},uuid:t,channels:s}=this.parameters;return`/v2/presence/sub-key/${e}/channel/${I(null!=s?s:[],",")}/uuid/${t}`}get queryParameters(){const{channelGroups:e}=this.parameters;return e&&0!==e.length?{"channel-group":e.join(",")}:{}}}class Nt extends se{constructor(e){super(),this.parameters=e}operation(){return ne.PNSetStateOperation}validate(){const{keySet:{subscribeKey:e},state:t,channels:s=[],channelGroups:n=[]}=this.parameters;return e?t?0===(null==s?void 0:s.length)&&0===(null==n?void 0:n.length)?"Please provide a list of channels and/or channel-groups":void 0:"Missing State":"Missing Subscribe Key"}parse(e){return i(this,void 0,void 0,(function*(){const t=this.deserializeResponse(e);if(!t)throw new d("Service response error, check status for details",p("Unable to deserialize service response"));if(t.status>=400)throw A.create(e);return{state:t.payload}}))}get path(){const{keySet:{subscribeKey:e},uuid:t,channels:s}=this.parameters;return`/v2/presence/sub-key/${e}/channel/${I(null!=s?s:[],",")}/uuid/${j(t)}/data`}get queryParameters(){const{channelGroups:e,state:t}=this.parameters,s={state:JSON.stringify(t)};return e&&0!==e.length&&(s["channel-group"]=e.join(",")),s}}class Pt extends se{constructor(e){super(),this.parameters=e}operation(){return ne.PNHeartbeatOperation}validate(){const{keySet:{subscribeKey:e},channels:t=[],channelGroups:s=[]}=this.parameters;return e?0===t.length&&0===s.length?"Please provide a list of channels and/or channel-groups":void 0:"Missing Subscribe Key"}parse(e){return i(this,void 0,void 0,(function*(){const t=this.deserializeResponse(e);if(!t)throw new d("Service response error, check status for details",p("Unable to deserialize service response"));if(t.status>=400)throw A.create(e);return{}}))}get path(){const{keySet:{subscribeKey:e},channels:t}=this.parameters;return`/v2/presence/sub-key/${e}/channel/${I(null!=t?t:[],",")}/heartbeat`}get queryParameters(){const{channelGroups:e,state:t,heartbeat:s}=this.parameters,n={heartbeat:`${s}`};return e&&0!==e.length&&(n["channel-group"]=e.join(",")),t&&(n.state=JSON.stringify(t)),n}}class Mt extends se{constructor(e){super(),this.parameters=e,this.parameters.channelGroups&&(this.parameters.channelGroups=Array.from(new Set(this.parameters.channelGroups))),this.parameters.channels&&(this.parameters.channels=Array.from(new Set(this.parameters.channels)))}operation(){return ne.PNUnsubscribeOperation}validate(){const{keySet:{subscribeKey:e},channels:t=[],channelGroups:s=[]}=this.parameters;return e?0===t.length&&0===s.length?"At least one `channel` or `channel group` should be provided.":void 0:"Missing Subscribe Key"}parse(e){return i(this,void 0,void 0,(function*(){const t=this.deserializeResponse(e);if(!t)throw new d("Service response error, check status for details",p("Unable to deserialize service response"));if(t.status>=400)throw A.create(e);return{}}))}get path(){var e;const{keySet:{subscribeKey:t},channels:s}=this.parameters;return`/v2/presence/sub-key/${t}/channel/${I(null!==(e=null==s?void 0:s.sort())&&void 0!==e?e:[],",")}/leave`}get queryParameters(){const{channelGroups:e}=this.parameters;return e&&0!==e.length?{"channel-group":e.sort().join(",")}:{}}}class At extends se{constructor(e){super(),this.parameters=e}operation(){return ne.PNWhereNowOperation}validate(){if(!this.parameters.keySet.subscribeKey)return"Missing Subscribe Key"}parse(e){return i(this,void 0,void 0,(function*(){const t=this.deserializeResponse(e);if(!t)throw new d("Service response error, check status for details",p("Unable to deserialize service response"));if(t.status>=400)throw A.create(e);return t.payload?{channels:t.payload.channels}:{channels:[]}}))}get path(){const{keySet:{subscribeKey:e},uuid:t}=this.parameters;return`/v2/presence/sub-key/${e}/uuid/${j(t)}`}}class _t extends se{constructor(e){var t,s,n,r,i,o;super(),this.parameters=e,null!==(t=(r=this.parameters).queryParameters)&&void 0!==t||(r.queryParameters={}),null!==(s=(i=this.parameters).includeUUIDs)&&void 0!==s||(i.includeUUIDs=true),null!==(n=(o=this.parameters).includeState)&&void 0!==n||(o.includeState=false)}operation(){const{channels:e=[],channelGroups:t=[]}=this.parameters;return 0===e.length&&0===t.length?ne.PNGlobalHereNowOperation:ne.PNHereNowOperation}validate(){if(!this.parameters.keySet.subscribeKey)return"Missing Subscribe Key"}parse(e){return i(this,void 0,void 0,(function*(){var t,s;const n=this.deserializeResponse(e);if(!n)throw new d("Service response error, check status for details",p("Unable to deserialize service response"));if(n.status>=400)throw A.create(e);const r="occupancy"in n?1:n.payload.total_channels,i="occupancy"in n?n.occupancy:n.payload.total_channels,o={};let a={};if("occupancy"in n){const e=this.parameters.channels[0];a[e]={uuids:null!==(t=n.uuids)&&void 0!==t?t:[],occupancy:i}}else a=null!==(s=n.payload.channels)&&void 0!==s?s:{};return Object.keys(a).forEach((e=>{const t=a[e];o[e]={occupants:this.parameters.includeUUIDs?t.uuids.map((e=>"string"==typeof e?{uuid:e,state:null}:e)):[],name:e,occupancy:t.occupancy}})),{totalChannels:r,totalOccupancy:i,channels:o}}))}get path(){const{keySet:{subscribeKey:e},channels:t,channelGroups:s}=this.parameters;let n=`/v2/presence/sub-key/${e}`;return(t&&t.length>0||s&&s.length>0)&&(n+=`/channel/${I(null!=t?t:[],",")}`),n}get queryParameters(){const{channelGroups:e,includeUUIDs:t,includeState:s,queryParameters:n}=this.parameters;return Object.assign(Object.assign(Object.assign(Object.assign({},t?{}:{disable_uuids:"1"}),null!=s&&s?{state:"1"}:{}),e&&e.length>0?{"channel-group":e.join(",")}:{}),n)}}class jt extends se{constructor(e){super({method:B.DELETE}),this.parameters=e}operation(){return ne.PNDeleteMessagesOperation}validate(){return this.parameters.keySet.subscribeKey?this.parameters.channel?void 0:"Missing channel":"Missing Subscribe Key"}parse(e){return i(this,void 0,void 0,(function*(){const t=this.deserializeResponse(e);if(!t)throw new d("Service response error, check status for details",p("Unable to deserialize service response"));if(t.status>=400)throw A.create(e);return{}}))}get path(){const{keySet:{subscribeKey:e},channel:t}=this.parameters;return`/v3/history/sub-key/${e}/channel/${j(t)}`}get queryParameters(){const{start:e,end:t}=this.parameters;return Object.assign(Object.assign({},e?{start:e}:{}),t?{end:t}:{})}}class It extends se{constructor(e){super(),this.parameters=e}operation(){return ne.PNMessageCounts}validate(){const{keySet:{subscribeKey:e},channels:t,timetoken:s,channelTimetokens:n}=this.parameters;return e?t?s&&n?"`timetoken` and `channelTimetokens` are incompatible together":s||n?n&&n.length>1&&n.length!==t.length?"Length of `channelTimetokens` and `channels` do not match":void 0:"`timetoken` or `channelTimetokens` need to be set":"Missing channels":"Missing Subscribe Key"}parse(e){return i(this,void 0,void 0,(function*(){const t=this.deserializeResponse(e);if(!t)throw new d("Service response error, check status for details",p("Unable to deserialize service response"));if(t.status>=400)throw A.create(e);return{channels:t.channels}}))}get path(){return`/v3/history/sub-key/${this.parameters.keySet.subscribeKey}/message-counts/${I(this.parameters.channels)}`}get queryParameters(){let{channelTimetokens:e}=this.parameters;return this.parameters.timetoken&&(e=[this.parameters.timetoken]),Object.assign(Object.assign({},1===e.length?{timetoken:e[0]}:{}),e.length>1?{channelsTimetoken:e.join(",")}:{})}}class Rt extends se{constructor(e){var t,s,n;super(),this.parameters=e,e.count?e.count=Math.min(e.count,100):e.count=100,null!==(t=e.stringifiedTimeToken)&&void 0!==t||(e.stringifiedTimeToken=false),null!==(s=e.includeMeta)&&void 0!==s||(e.includeMeta=false),null!==(n=e.logVerbosity)&&void 0!==n||(e.logVerbosity=false)}operation(){return ne.PNHistoryOperation}validate(){return this.parameters.keySet.subscribeKey?this.parameters.channel?void 0:"Missing channel":"Missing Subscribe Key"}parse(e){return i(this,void 0,void 0,(function*(){const t=this.deserializeResponse(e);if(!t)throw new d("Service response error, check status for details",p("Unable to deserialize service response"));const s=t[0],n=t[1],r=t[2];return Array.isArray(s)?{messages:s.map((e=>{const t=this.processPayload(e.message),s={entry:t.payload,timetoken:e.timetoken};return t.error&&(s.error=t.error),e.meta&&(s.meta=e.meta),s})),startTimeToken:n,endTimeToken:r}:{messages:[],startTimeToken:n,endTimeToken:r}}))}get path(){const{keySet:{subscribeKey:e},channel:t}=this.parameters;return`/v2/history/sub-key/${e}/channel/${j(t)}`}get queryParameters(){const{start:e,end:t,reverse:s,count:n,stringifiedTimeToken:r,includeMeta:i}=this.parameters;return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({count:n,include_token:"true"},e?{start:e}:{}),t?{end:t}:{}),r?{string_message_token:"true"}:{}),null!=s?{reverse:s.toString()}:{}),i?{include_meta:"true"}:{})}processPayload(e){const{crypto:t,logVerbosity:s}=this.parameters;if(!t||"string"!=typeof e)return{payload:e};let n,r;try{const s=t.decrypt(e);n=s instanceof ArrayBuffer?JSON.parse(Rt.decoder.decode(s)):s}catch(t){s&&console.log("decryption error",t.message),n=e,r=`Error while decrypting message content: ${t.message}`}return{payload:n,error:r}}}var Ut;!function(e){e[e.Message=-1]="Message",e[e.Files=4]="Files"}(Ut||(Ut={}));class Tt extends se{constructor(e){var t,s,n,r,i;super(),this.parameters=e;const o=null!==(t=e.includeMessageActions)&&void 0!==t&&t,a=e.channels.length>1||o?25:100;e.count?e.count=Math.min(e.count,a):e.count=a,e.includeUuid?e.includeUUID=e.includeUuid:null!==(s=e.includeUUID)&&void 0!==s||(e.includeUUID=true),null!==(n=e.stringifiedTimeToken)&&void 0!==n||(e.stringifiedTimeToken=false),null!==(r=e.includeMessageType)&&void 0!==r||(e.includeMessageType=true),null!==(i=e.logVerbosity)&&void 0!==i||(e.logVerbosity=false)}operation(){return ne.PNFetchMessagesOperation}validate(){const{keySet:{subscribeKey:e},channels:t,includeMessageActions:s}=this.parameters;return e?t?void 0!==s&&s&&t.length>1?"History can return actions data for a single channel only. Either pass a single channel or disable the includeMessageActions flag.":void 0:"Missing channels":"Missing Subscribe Key"}parse(e){return i(this,void 0,void 0,(function*(){var t;const s=this.deserializeResponse(e);if(!s)throw new d("Service response error, check status for details",p("Unable to deserialize service response"));if(s.status>=400)throw A.create(e);const n=null!==(t=s.channels)&&void 0!==t?t:{},r={};return Object.keys(n).forEach((e=>{r[e]=n[e].map((t=>{null===t.message_type&&(t.message_type=Ut.Message);const s=this.processPayload(e,t),n={channel:e,timetoken:t.timetoken,message:s.payload,messageType:t.message_type,uuid:t.uuid};if(t.actions){const e=n;e.actions=t.actions,e.data=t.actions}return t.meta&&(n.meta=t.meta),s.error&&(n.error=s.error),n}))})),s.more?{channels:r,more:s.more}:{channels:r}}))}get path(){const{keySet:{subscribeKey:e},channels:t,includeMessageActions:s}=this.parameters;return`/v3/${s?"history-with-actions":"history"}/sub-key/${e}/channel/${I(t)}`}get queryParameters(){const{start:e,end:t,count:s,includeMessageType:n,includeMeta:r,includeUUID:i,stringifiedTimeToken:o}=this.parameters;return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({max:s},e?{start:e}:{}),t?{end:t}:{}),o?{string_message_token:"true"}:{}),void 0!==r&&r?{include_meta:"true"}:{}),i?{include_uuid:"true"}:{}),n?{include_message_type:"true"}:{})}processPayload(e,t){const{crypto:s,logVerbosity:n}=this.parameters;if(!s||"string"!=typeof t.message)return{payload:t.message};let r,i;try{const e=s.decrypt(t.message);r=e instanceof ArrayBuffer?JSON.parse(Tt.decoder.decode(e)):e}catch(e){n&&console.log("decryption error",e.message),r=t.message,i=`Error while decrypting message content: ${e.message}`}if(!i&&r&&t.message_type==Ut.Files&&"object"==typeof r&&this.isFileMessage(r)){const t=r;return{payload:{message:t.message,file:Object.assign(Object.assign({},t.file),{url:this.parameters.getFileUrl({channel:e,id:t.file.id,name:t.file.name})})},error:i}}return{payload:r,error:i}}isFileMessage(e){return void 0!==e.file}}class Ft extends se{constructor(e){super(),this.parameters=e}operation(){return ne.PNGetMessageActionsOperation}validate(){return this.parameters.keySet.subscribeKey?this.parameters.channel?void 0:"Missing message channel":"Missing Subscribe Key"}parse(e){return i(this,void 0,void 0,(function*(){const t=this.deserializeResponse(e);if(!t)throw new d("Service response error, check status for details",p("Unable to deserialize service response"));if(t.status>=400)throw A.create(e);let s=null,n=null;return t.data.length>0&&(s=t.data[0].actionTimetoken,n=t.data[t.data.length-1].actionTimetoken),{data:t.data,more:t.more,start:s,end:n}}))}get path(){const{keySet:{subscribeKey:e},channel:t}=this.parameters;return`/v1/message-actions/${e}/channel/${j(t)}`}get queryParameters(){const{limit:e,start:t,end:s}=this.parameters;return Object.assign(Object.assign(Object.assign({},t?{start:t}:{}),s?{end:s}:{}),e?{limit:e}:{})}}class xt extends se{constructor(e){super({method:B.POST}),this.parameters=e}operation(){return ne.PNAddMessageActionOperation}validate(){const{keySet:{subscribeKey:e},action:t,channel:s,messageTimetoken:n}=this.parameters;return e?s?n?t?t.value?t.type?t.type.length>15?"Action.type value exceed maximum length of 15":void 0:"Missing Action.type":"Missing Action.value":"Missing Action":"Missing message timetoken":"Missing message channel":"Missing Subscribe Key"}parse(e){return i(this,void 0,void 0,(function*(){const t=this.deserializeResponse(e);if(!t)throw new d("Service response error, check status for details",p("Unable to deserialize service response"));if(t.status>=400)throw A.create(e);return{data:t.data}}))}get path(){const{keySet:{subscribeKey:e},channel:t,messageTimetoken:s}=this.parameters;return`/v1/message-actions/${e}/channel/${j(t)}/message/${s}`}get headers(){return{"Content-Type":"application/json"}}get body(){return JSON.stringify(this.parameters.action)}}class Dt extends se{constructor(e){super({method:B.DELETE}),this.parameters=e}operation(){return ne.PNRemoveMessageActionOperation}validate(){const{keySet:{subscribeKey:e},channel:t,messageTimetoken:s,actionTimetoken:n}=this.parameters;return e?t?s?n?void 0:"Missing action timetoken":"Missing message timetoken":"Missing message action channel":"Missing Subscribe Key"}parse(e){return i(this,void 0,void 0,(function*(){const t=this.deserializeResponse(e);if(!t)throw new d("Service response error, check status for details",p("Unable to deserialize service response"));if(t.status>=400)throw A.create(e);return{data:t.data}}))}get path(){const{keySet:{subscribeKey:e},channel:t,actionTimetoken:s,messageTimetoken:n}=this.parameters;return`/v1/message-actions/${e}/channel/${j(t)}/message/${n}/action/${s}`}}class qt extends se{constructor(e){var t,s;super(),this.parameters=e,null!==(t=(s=this.parameters).storeInHistory)&&void 0!==t||(s.storeInHistory=true)}operation(){return ne.PNPublishFileMessageOperation}validate(){const{channel:e,fileId:t,fileName:s}=this.parameters;return e?t?s?void 0:"file name can't be empty":"file id can't be empty":"channel can't be empty"}parse(e){return i(this,void 0,void 0,(function*(){const t=this.deserializeResponse(e);if(!t)throw new d("Service response error, check status for details",p("Unable to deserialize service response"));return{timetoken:t[2]}}))}get path(){const{message:e,channel:t,keySet:{publishKey:s,subscribeKey:n},fileId:r,fileName:i}=this.parameters,o=Object.assign({file:{name:i,id:r}},e?{message:e}:{});return`/v1/files/publish-file/${s}/${n}/0/${j(t)}/0/${j(this.prepareMessagePayload(o))}`}get queryParameters(){const{storeInHistory:e,ttl:t,meta:s}=this.parameters;return Object.assign(Object.assign({store:e?"1":"0"},t?{ttl:t}:{}),s&&"object"==typeof s?{meta:JSON.stringify(s)}:{})}prepareMessagePayload(e){const{crypto:t}=this.parameters;if(!t)return JSON.stringify(e)||"";const s=t.encrypt(JSON.stringify(e));return JSON.stringify("string"==typeof s?s:u(s))}}class Gt extends se{constructor(e){super({method:B.LOCAL}),this.parameters=e}operation(){return ne.PNGetFileUrlOperation}validate(){const{channel:e,id:t,name:s}=this.parameters;return e?t?s?void 0:"file name can't be empty":"file id can't be empty":"channel can't be empty"}parse(e){return i(this,void 0,void 0,(function*(){return e.url}))}get path(){const{channel:e,id:t,name:s,keySet:{subscribeKey:n}}=this.parameters;return`/v1/files/${n}/channels/${j(e)}/files/${t}/${s}`}}class Kt extends se{constructor(e){super({method:B.DELETE}),this.parameters=e}operation(){return ne.PNDeleteFileOperation}validate(){const{channel:e,id:t,name:s}=this.parameters;return e?t?s?void 0:"file name can't be empty":"file id can't be empty":"channel can't be empty"}parse(e){return i(this,void 0,void 0,(function*(){const t=this.deserializeResponse(e);if(!t)throw new d("Service response error, check status for details",p("Unable to deserialize service response"));if(t.status>=400)throw A.create(e);return t}))}get path(){const{keySet:{subscribeKey:e},id:t,channel:s,name:n}=this.parameters;return`/v1/files/${e}/channels/${j(s)}/files/${t}/${n}`}}class $t extends se{constructor(e){var t,s;super(),this.parameters=e,null!==(t=(s=this.parameters).limit)&&void 0!==t||(s.limit=100)}operation(){return ne.PNListFilesOperation}validate(){if(!this.parameters.channel)return"channel can't be empty"}parse(e){return i(this,void 0,void 0,(function*(){const t=this.deserializeResponse(e);if(!t)throw new d("Service response error, check status for details",p("Unable to deserialize service response"));if(t.status>=400)throw A.create(e);return t}))}get path(){const{keySet:{subscribeKey:e},channel:t}=this.parameters;return`/v1/files/${e}/channels/${j(t)}/files`}get queryParameters(){const{limit:e,next:t}=this.parameters;return Object.assign({limit:e},t?{next:t}:{})}}class Lt extends se{constructor(e){super({method:B.POST}),this.parameters=e}operation(){return ne.PNGenerateUploadUrlOperation}validate(){return this.parameters.channel?this.parameters.name?void 0:"'name' can't be empty":"channel can't be empty"}parse(e){return i(this,void 0,void 0,(function*(){const t=this.deserializeResponse(e);if(!t)throw new d("Service response error, check status for details",p("Unable to deserialize service response"));if(t.status>=400)throw A.create(e);return{id:t.data.id,name:t.data.name,url:t.file_upload_request.url,formFields:t.file_upload_request.form_fields}}))}get path(){const{keySet:{subscribeKey:e},channel:t}=this.parameters;return`/v1/files/${e}/channels/${j(t)}/generate-upload-url`}get headers(){return{"Content-Type":"application/json"}}get body(){return JSON.stringify({name:this.parameters.name})}}class Bt extends se{constructor(e){super({method:B.POST}),this.parameters=e;const t=e.file.mimeType;t&&(e.formFields=e.formFields.map((e=>"Content-Type"===e.name?{name:e.name,value:t}:e)))}operation(){return ne.PNPublishFileOperation}validate(){const{fileId:e,fileName:t,file:s,uploadUrl:n}=this.parameters;return e?t?s?n?void 0:"Validation failed: file upload 'url' can't be empty":"Validation failed: 'file' can't be empty":"Validation failed: file 'name' can't be empty":"Validation failed: file 'id' can't be empty"}parse(e){return i(this,void 0,void 0,(function*(){return{status:e.status,message:e.body?Bt.decoder.decode(e.body):"OK"}}))}request(){return Object.assign(Object.assign({},super.request()),{origin:new URL(this.parameters.uploadUrl).origin,timeout:300})}get path(){const{pathname:e,search:t}=new URL(this.parameters.uploadUrl);return`${e}${t}`}get body(){return this.parameters.file}get formData(){return this.parameters.formFields}}class Ht{constructor(e){var t;if(this.parameters=e,this.file=null===(t=this.parameters.PubNubFile)||void 0===t?void 0:t.create(e.file),!this.file)throw new Error("File upload error: unable to create File object.")}process(){return i(this,void 0,void 0,(function*(){let e,t;return this.generateFileUploadUrl().then((s=>(e=s.name,t=s.id,this.uploadFile(s)))).then((e=>{if(204!==e.status)throw new d("Upload to bucket was unsuccessful",{error:!0,statusCode:e.status,category:h.PNUnknownCategory,operation:ne.PNPublishFileOperation,errorData:{message:e.message}})})).then((()=>this.publishFileMessage(t,e))).catch((e=>{if(e instanceof d)throw e;const t=e instanceof A?e:A.create(e);throw new d("File upload error.",t.toStatus(ne.PNPublishFileOperation))}))}))}generateFileUploadUrl(){return i(this,void 0,void 0,(function*(){const e=new Lt(Object.assign(Object.assign({},this.parameters),{name:this.file.name,keySet:this.parameters.keySet}));return this.parameters.sendRequest(e)}))}uploadFile(e){return i(this,void 0,void 0,(function*(){const{cipherKey:t,PubNubFile:s,crypto:n,cryptography:r}=this.parameters,{id:i,name:o,url:a,formFields:c}=e;return this.parameters.PubNubFile.supportsEncryptFile&&(!t&&n?this.file=yield n.encryptFile(this.file,s):t&&r&&(this.file=yield r.encryptFile(t,this.file,s))),this.parameters.sendRequest(new Bt({fileId:i,fileName:o,file:this.file,uploadUrl:a,formFields:c}))}))}publishFileMessage(e,t){return i(this,void 0,void 0,(function*(){var s,n,r,i;let o,a={timetoken:"0"},c=this.parameters.fileUploadPublishRetryLimit,u=!1;do{try{a=yield this.parameters.publishFile(Object.assign(Object.assign({},this.parameters),{fileId:e,fileName:t})),u=!0}catch(e){e instanceof d&&(o=e),c-=1}}while(!u&&c>0);if(u)return{status:200,timetoken:a.timetoken,id:e,name:t};throw new d("Publish failed. You may want to execute that operation manually using pubnub.publishFile",{error:!0,category:null!==(n=null===(s=o.status)||void 0===s?void 0:s.category)&&void 0!==n?n:h.PNUnknownCategory,statusCode:null!==(i=null===(r=o.status)||void 0===r?void 0:r.statusCode)&&void 0!==i?i:0,channel:this.parameters.channel,id:e,name:t})}))}}class zt{subscribe(e){const t=null==e?void 0:e.timetoken;this.pubnub.subscribe(Object.assign({channels:this.channelNames,channelGroups:this.groupNames},null!==t&&""!==t&&{timetoken:t}))}unsubscribe(){this.pubnub.unsubscribe({channels:this.channelNames,channelGroups:this.groupNames})}set onMessage(e){this.listener.message=e}set onPresence(e){this.listener.presence=e}set onSignal(e){this.listener.signal=e}set onObjects(e){this.listener.objects=e}set onMessageAction(e){this.listener.messageAction=e}set onFile(e){this.listener.file=e}addListener(e){this.eventEmitter.addListener(e,this.channelNames.filter((e=>!e.endsWith("-pnpres"))),this.groupNames.filter((e=>!e.endsWith("-pnpres"))))}removeListener(e){this.eventEmitter.removeListener(e,this.channelNames,this.groupNames)}get channels(){return this.channelNames.slice(0)}get channelGroups(){return this.groupNames.slice(0)}}class Vt extends zt{constructor({channels:e=[],channelGroups:t=[],subscriptionOptions:s,eventEmitter:n,pubnub:r}){super(),this.channelNames=[],this.groupNames=[],this.subscriptionList=[],this.options=s,this.eventEmitter=n,this.pubnub=r,e.forEach((e=>{const t=this.pubnub.channel(e).subscription(this.options);this.channelNames=[...this.channelNames,...t.channels],this.subscriptionList.push(t)})),t.forEach((e=>{const t=this.pubnub.channelGroup(e).subscription(this.options);this.groupNames=[...this.groupNames,...t.channelGroups],this.subscriptionList.push(t)})),this.listener={},n.addListener(this.listener,this.channelNames.filter((e=>!e.endsWith("-pnpres"))),this.groupNames.filter((e=>!e.endsWith("-pnpres"))))}addSubscription(e){this.subscriptionList.push(e),this.channelNames=[...this.channelNames,...e.channels],this.groupNames=[...this.groupNames,...e.channelGroups],this.eventEmitter.addListener(this.listener,e.channels,e.channelGroups)}removeSubscription(e){const t=e.channels,s=e.channelGroups;this.channelNames=this.channelNames.filter((e=>!t.includes(e))),this.groupNames=this.groupNames.filter((e=>!s.includes(e))),this.subscriptionList=this.subscriptionList.filter((t=>t!==e)),this.eventEmitter.removeListener(this.listener,t,s)}addSubscriptionSet(e){this.subscriptionList=[...this.subscriptionList,...e.subscriptions],this.channelNames=[...this.channelNames,...e.channels],this.groupNames=[...this.groupNames,...e.channelGroups],this.eventEmitter.addListener(this.listener,e.channels,e.channelGroups)}removeSubscriptionSet(e){const t=e.channels,s=e.channelGroups;this.channelNames=this.channelNames.filter((e=>!t.includes(e))),this.groupNames=this.groupNames.filter((e=>!s.includes(e))),this.subscriptionList=this.subscriptionList.filter((t=>!e.subscriptions.includes(t))),this.eventEmitter.removeListener(this.listener,t,s)}get subscriptions(){return this.subscriptionList.slice(0)}}class Wt extends zt{constructor({channels:e,channelGroups:t,subscriptionOptions:s,eventEmitter:n,pubnub:r}){super(),this.channelNames=[],this.groupNames=[],this.channelNames=e,this.groupNames=t,this.options=s,this.pubnub=r,this.eventEmitter=n,this.listener={},n.addListener(this.listener,this.channelNames.filter((e=>!e.endsWith("-pnpres"))),this.groupNames.filter((e=>!e.endsWith("-pnpres"))))}addSubscription(e){return new Vt({channels:[...this.channelNames,...e.channels],channelGroups:[...this.groupNames,...e.channelGroups],subscriptionOptions:Object.assign(Object.assign({},this.options),null==e?void 0:e.options),eventEmitter:this.eventEmitter,pubnub:this.pubnub})}}class Jt{constructor(e,t,s){this.eventEmitter=t,this.pubnub=s,this.id=e}subscription(e){return new Wt({channels:[this.id],channelGroups:[],subscriptionOptions:e,eventEmitter:this.eventEmitter,pubnub:this.pubnub})}}class Qt{constructor(e,t,s){this.eventEmitter=t,this.pubnub=s,this.name=e}subscription(e){return new Wt({channels:[],channelGroups:(null==e?void 0:e.receivePresenceEvents)?[this.name,`${this.name}-pnpres`]:[this.name],subscriptionOptions:e,eventEmitter:this.eventEmitter,pubnub:this.pubnub})}}class Yt{constructor(e,t,s){this.eventEmitter=t,this.pubnub=s,this.id=e}subscription(e){return new Wt({channels:[this.id],channelGroups:[],subscriptionOptions:e,eventEmitter:this.eventEmitter,pubnub:this.pubnub})}}class Xt{constructor(e,t,s){this.eventEmitter=t,this.pubnub=s,this.name=e}subscription(e){return new Wt({channels:(null==e?void 0:e.receivePresenceEvents)?[this.name,`${this.name}-pnpres`]:[this.name],channelGroups:[],subscriptionOptions:e,eventEmitter:this.eventEmitter,pubnub:this.pubnub})}}class Zt extends se{constructor(e){super(),this.parameters=e}operation(){return ne.PNRemoveChannelsFromGroupOperation}validate(){const{keySet:{subscribeKey:e},channels:t,channelGroup:s}=this.parameters;return e?s?t?void 0:"Missing channels":"Missing Channel Group":"Missing Subscribe Key"}parse(e){return i(this,void 0,void 0,(function*(){const t=this.deserializeResponse(e);if(!t)throw new d("Service response error, check status for details",p("Unable to deserialize service response"));if(t.status>=400)throw A.create(e);return{}}))}get path(){const{keySet:{subscribeKey:e},channelGroup:t}=this.parameters;return`/v1/channel-registration/sub-key/${e}/channel-group/${j(t)}`}get queryParameters(){return{remove:this.parameters.channels.join(",")}}}class es extends se{constructor(e){super(),this.parameters=e}operation(){return ne.PNAddChannelsToGroupOperation}validate(){const{keySet:{subscribeKey:e},channels:t,channelGroup:s}=this.parameters;return e?s?t?void 0:"Missing channels":"Missing Channel Group":"Missing Subscribe Key"}parse(e){return i(this,void 0,void 0,(function*(){const t=this.deserializeResponse(e);if(!t)throw new d("Service response error, check status for details",p("Unable to deserialize service response"));if(t.status>=400)throw A.create(e);return{}}))}get path(){const{keySet:{subscribeKey:e},channelGroup:t}=this.parameters;return`/v1/channel-registration/sub-key/${e}/channel-group/${j(t)}`}get queryParameters(){return{add:this.parameters.channels.join(",")}}}class ts extends se{constructor(e){super(),this.parameters=e}operation(){return ne.PNChannelsForGroupOperation}validate(){return this.parameters.keySet.subscribeKey?this.parameters.channelGroup?void 0:"Missing Channel Group":"Missing Subscribe Key"}parse(e){return i(this,void 0,void 0,(function*(){const t=this.deserializeResponse(e);if(!t)throw new d("Service response error, check status for details",p("Unable to deserialize service response"));if(t.status>=400)throw A.create(e);return{channels:t.payload.channels}}))}get path(){const{keySet:{subscribeKey:e},channelGroup:t}=this.parameters;return`/v1/channel-registration/sub-key/${e}/channel-group/${j(t)}`}}class ss extends se{constructor(e){super(),this.parameters=e}operation(){return ne.PNRemoveGroupOperation}validate(){return this.parameters.keySet.subscribeKey?this.parameters.channelGroup?void 0:"Missing Channel Group":"Missing Subscribe Key"}parse(e){return i(this,void 0,void 0,(function*(){const t=this.deserializeResponse(e);if(!t)throw new d("Service response error, check status for details",p("Unable to deserialize service response"));if(t.status>=400)throw A.create(e);return{}}))}get path(){const{keySet:{subscribeKey:e},channelGroup:t}=this.parameters;return`/v1/channel-registration/sub-key/${e}/channel-group/${j(t)}/remove`}}class ns extends se{constructor(e){super(),this.parameters=e}operation(){return ne.PNChannelGroupsOperation}validate(){if(!this.parameters.keySet.subscribeKey)return"Missing Subscribe Key"}parse(e){return i(this,void 0,void 0,(function*(){const t=this.deserializeResponse(e);if(!t)throw new d("Service response error, check status for details",p("Unable to deserialize service response"));if(t.status>=400)throw A.create(e);return{groups:t.payload.groups}}))}get path(){return`/v1/channel-registration/sub-key/${this.parameters.keySet.subscribeKey}/channel-group`}}class rs{constructor(e,t){this.sendRequest=t,this.keySet=e}listChannels(e,t){return i(this,void 0,void 0,(function*(){const s=new ts(Object.assign(Object.assign({},e),{keySet:this.keySet}));return t?this.sendRequest(s,t):this.sendRequest(s)}))}listGroups(e){return i(this,void 0,void 0,(function*(){const t=new ns({keySet:this.keySet});return e?this.sendRequest(t,e):this.sendRequest(t)}))}addChannels(e,t){return i(this,void 0,void 0,(function*(){const s=new es(Object.assign(Object.assign({},e),{keySet:this.keySet}));return t?this.sendRequest(s,t):this.sendRequest(s)}))}removeChannels(e,t){return i(this,void 0,void 0,(function*(){const s=new Zt(Object.assign(Object.assign({},e),{keySet:this.keySet}));return t?this.sendRequest(s,t):this.sendRequest(s)}))}deleteGroup(e,t){return i(this,void 0,void 0,(function*(){const s=new ss(Object.assign(Object.assign({},e),{keySet:this.keySet}));return t?this.sendRequest(s,t):this.sendRequest(s)}))}}class is extends se{constructor(e){var t,s;super(),this.parameters=e,"apns2"===this.parameters.pushGateway&&(null!==(t=(s=this.parameters).environment)&&void 0!==t||(s.environment="development")),this.parameters.count&&this.parameters.count>1e3&&(this.parameters.count=1e3)}operation(){throw Error("Should be implemented in subclass.")}validate(){const{keySet:{subscribeKey:e},action:t,device:s,pushGateway:n}=this.parameters;return e?s?"add"!==t&&"remove"!==t||"channels"in this.parameters&&0!==this.parameters.channels.length?n?"apns2"!==this.parameters.pushGateway||this.parameters.topic?void 0:"Missing APNS2 topic":"Missing GW Type (pushGateway: gcm or apns2)":"Missing Channels":"Missing Device ID (device)":"Missing Subscribe Key"}parse(e){return i(this,void 0,void 0,(function*(){throw Error("Should be implemented in subclass.")}))}get path(){const{keySet:{subscribeKey:e},action:t,device:s,pushGateway:n}=this.parameters;let r="apns2"===n?`/v2/push/sub-key/${e}/devices-apns2/${s}`:`/v1/push/sub-key/${e}/devices/${s}`;return"remove-device"===t&&(r=`${r}/remove`),r}get queryParameters(){const{start:e,count:t}=this.parameters;let s=Object.assign(Object.assign({type:this.parameters.pushGateway},e?{start:e}:{}),t&&t>0?{count:t}:{});if("channels"in this.parameters&&(s[this.parameters.action]=this.parameters.channels.join(",")),"apns2"===this.parameters.pushGateway){const{environment:e,topic:t}=this.parameters;s=Object.assign(Object.assign({},s),{environment:e,topic:t})}return s}}class os extends is{constructor(e){super(Object.assign(Object.assign({},e),{action:"remove"}))}operation(){return ne.PNRemovePushNotificationEnabledChannelsOperation}parse(e){return i(this,void 0,void 0,(function*(){if(!this.deserializeResponse(e))throw new d("Service response error, check status for details",p("Unable to deserialize service response"));return{}}))}}class as extends is{constructor(e){super(Object.assign(Object.assign({},e),{action:"list"}))}operation(){return ne.PNPushNotificationEnabledChannelsOperation}parse(e){return i(this,void 0,void 0,(function*(){const t=this.deserializeResponse(e);if(!t)throw new d("Service response error, check status for details",p("Unable to deserialize service response"));return{channels:t}}))}}class cs extends is{constructor(e){super(Object.assign(Object.assign({},e),{action:"add"}))}operation(){return ne.PNAddPushNotificationEnabledChannelsOperation}parse(e){return i(this,void 0,void 0,(function*(){if(!this.deserializeResponse(e))throw new d("Service response error, check status for details",p("Unable to deserialize service response"));return{}}))}}class us extends is{constructor(e){super(Object.assign(Object.assign({},e),{action:"remove-device"}))}operation(){return ne.PNRemoveAllPushNotificationsOperation}parse(e){return i(this,void 0,void 0,(function*(){if(!this.deserializeResponse(e))throw new d("Service response error, check status for details",p("Unable to deserialize service response"));return{}}))}}class ls{constructor(e,t){this.sendRequest=t,this.keySet=e}listChannels(e,t){return i(this,void 0,void 0,(function*(){const s=new as(Object.assign(Object.assign({},e),{keySet:this.keySet}));return t?this.sendRequest(s,t):this.sendRequest(s)}))}addChannels(e,t){return i(this,void 0,void 0,(function*(){const s=new cs(Object.assign(Object.assign({},e),{keySet:this.keySet}));return t?this.sendRequest(s,t):this.sendRequest(s)}))}removeChannels(e,t){return i(this,void 0,void 0,(function*(){const s=new os(Object.assign(Object.assign({},e),{keySet:this.keySet}));return t?this.sendRequest(s,t):this.sendRequest(s)}))}deleteDevice(e,t){return i(this,void 0,void 0,(function*(){const s=new us(Object.assign(Object.assign({},e),{keySet:this.keySet}));return t?this.sendRequest(s,t):this.sendRequest(s)}))}}class hs extends se{constructor(e){var t,s,n,r,i,o;super(),this.parameters=e,null!==(t=e.include)&&void 0!==t||(e.include={}),null!==(s=(i=e.include).customFields)&&void 0!==s||(i.customFields=false),null!==(n=(o=e.include).totalCount)&&void 0!==n||(o.totalCount=false),null!==(r=e.limit)&&void 0!==r||(e.limit=100)}operation(){return ne.PNGetAllChannelMetadataOperation}parse(e){return i(this,void 0,void 0,(function*(){const t=this.deserializeResponse(e);if(!t)throw new d("Service response error, check status for details",p("Unable to deserialize service response"));if(t.status>=400)throw A.create(e);return t}))}get path(){return`/v2/objects/${this.parameters.keySet.subscribeKey}/channels`}get queryParameters(){const{include:e,page:t,filter:s,sort:n,limit:r}=this.parameters;let i="";return i="string"==typeof n?n:Object.entries(null!=n?n:{}).map((([e,t])=>null!==t?`${e}:${t}`:e)),Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({include:["status","type",...e.customFields?["custom"]:[]].join(","),count:`${e.totalCount}`},s?{filter:s}:{}),(null==t?void 0:t.next)?{start:t.next}:{}),(null==t?void 0:t.prev)?{end:t.prev}:{}),r?{limit:r}:{}),i.length?{sort:i}:{})}}class ds extends se{constructor(e){super({method:B.DELETE}),this.parameters=e}operation(){return ne.PNRemoveChannelMetadataOperation}validate(){if(!this.parameters.channel)return"Channel cannot be empty"}parse(e){return i(this,void 0,void 0,(function*(){const t=this.deserializeResponse(e);if(!t)throw new d("Service response error, check status for details",p("Unable to deserialize service response"));if(t.status>=400)throw A.create(e);return t}))}get path(){const{keySet:{subscribeKey:e},channel:t}=this.parameters;return`/v2/objects/${e}/channels/${j(t)}`}}class ps extends se{constructor(e){var t,s,n,r,i,o,a,c,u,l,h,d,p,g,y,f;super(),this.parameters=e,null!==(t=e.include)&&void 0!==t||(e.include={}),null!==(s=(l=e.include).customFields)&&void 0!==s||(l.customFields=false),null!==(n=(h=e.include).totalCount)&&void 0!==n||(h.totalCount=false),null!==(r=(d=e.include).statusField)&&void 0!==r||(d.statusField=false),null!==(i=(p=e.include).channelFields)&&void 0!==i||(p.channelFields=false),null!==(o=(g=e.include).customChannelFields)&&void 0!==o||(g.customChannelFields=false),null!==(a=(y=e.include).channelStatusField)&&void 0!==a||(y.channelStatusField=false),null!==(c=(f=e.include).channelTypeField)&&void 0!==c||(f.channelTypeField=false),null!==(u=e.limit)&&void 0!==u||(e.limit=100),this.parameters.userId&&(this.parameters.uuid=this.parameters.userId)}operation(){return ne.PNGetMembershipsOperation}validate(){if(!this.parameters.uuid)return"'uuid' cannot be empty"}parse(e){return i(this,void 0,void 0,(function*(){const t=this.deserializeResponse(e);if(!t)throw new d("Service response error, check status for details",p("Unable to deserialize service response"));if(t.status>=400)throw A.create(e);return t}))}get path(){const{keySet:{subscribeKey:e},uuid:t}=this.parameters;return`/v2/objects/${e}/uuids/${j(t)}/channels`}get queryParameters(){const{include:e,page:t,filter:s,sort:n,limit:r}=this.parameters;let i="";i="string"==typeof n?n:Object.entries(null!=n?n:{}).map((([e,t])=>null!==t?`${e}:${t}`:e));const o=[];return e.statusField&&o.push("status"),e.customFields&&o.push("custom"),e.channelFields&&o.push("channel"),e.channelStatusField&&o.push("channel.status"),e.channelTypeField&&o.push("channel.type"),e.customChannelFields&&o.push("channel.custom"),Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({count:`${e.totalCount}`},o.length>0?{include:o.join(",")}:{}),s?{filter:s}:{}),(null==t?void 0:t.next)?{start:t.next}:{}),(null==t?void 0:t.prev)?{end:t.prev}:{}),r?{limit:r}:{}),i.length?{sort:i}:{})}}class gs extends se{constructor(e){var t,s,n,r,i,o,a,c,u,l;super({method:B.PATCH}),this.parameters=e,null!==(t=e.include)&&void 0!==t||(e.include={}),null!==(s=(a=e.include).customFields)&&void 0!==s||(a.customFields=false),null!==(n=(c=e.include).totalCount)&&void 0!==n||(c.totalCount=false),null!==(r=(u=e.include).channelFields)&&void 0!==r||(u.channelFields=false),null!==(i=(l=e.include).customChannelFields)&&void 0!==i||(l.customChannelFields=false),null!==(o=e.limit)&&void 0!==o||(e.limit=100),this.parameters.userId&&(this.parameters.uuid=this.parameters.userId)}operation(){return ne.PNSetMembershipsOperation}validate(){const{uuid:e,channels:t}=this.parameters;return e?t&&0!==t.length?void 0:"Channels cannot be empty":"'uuid' cannot be empty"}parse(e){return i(this,void 0,void 0,(function*(){const t=this.deserializeResponse(e);if(!t)throw new d("Service response error, check status for details",p("Unable to deserialize service response"));if(t.status>=400)throw A.create(e);return t}))}get path(){const{keySet:{subscribeKey:e},uuid:t}=this.parameters;return`/v2/objects/${e}/uuids/${j(t)}/channels`}get queryParameters(){const{include:e,page:t,filter:s,sort:n,limit:r}=this.parameters;let i="";i="string"==typeof n?n:Object.entries(null!=n?n:{}).map((([e,t])=>null!==t?`${e}:${t}`:e));const o=["channel.status","channel.type","status"];return e.customFields&&o.push("custom"),e.channelFields&&o.push("channel"),e.customChannelFields&&o.push("channel.custom"),Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({count:`${e.totalCount}`},o.length>0?{include:o.join(",")}:{}),s?{filter:s}:{}),(null==t?void 0:t.next)?{start:t.next}:{}),(null==t?void 0:t.prev)?{end:t.prev}:{}),r?{limit:r}:{}),i.length?{sort:i}:{})}get body(){const{channels:e,type:t}=this.parameters;return JSON.stringify({[`${t}`]:e.map((e=>"string"==typeof e?{channel:{id:e}}:{channel:{id:e.id},status:e.status,custom:e.custom}))})}}class ys extends se{constructor(e){var t,s,n,r;super(),this.parameters=e,null!==(t=e.include)&&void 0!==t||(e.include={}),null!==(s=(r=e.include).customFields)&&void 0!==s||(r.customFields=false),null!==(n=e.limit)&&void 0!==n||(e.limit=100)}operation(){return ne.PNGetAllUUIDMetadataOperation}parse(e){return i(this,void 0,void 0,(function*(){const t=this.deserializeResponse(e);if(!t)throw new d("Service response error, check status for details",p("Unable to deserialize service response"));if(t.status>=400)throw A.create(e);return t}))}get path(){return`/v2/objects/${this.parameters.keySet.subscribeKey}/uuids`}get queryParameters(){const{include:e,page:t,filter:s,sort:n,limit:r}=this.parameters;let i="";return i="string"==typeof n?n:Object.entries(null!=n?n:{}).map((([e,t])=>null!==t?`${e}:${t}`:e)),Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({include:["status","type",...e.customFields?["custom"]:[]].join(",")},void 0!==e.totalCount?{count:`${e.totalCount}`}:{}),s?{filter:s}:{}),(null==t?void 0:t.next)?{start:t.next}:{}),(null==t?void 0:t.prev)?{end:t.prev}:{}),r?{limit:r}:{}),i.length?{sort:i}:{})}}class fs extends se{constructor(e){var t,s,n;super(),this.parameters=e,null!==(t=e.include)&&void 0!==t||(e.include={}),null!==(s=(n=e.include).customFields)&&void 0!==s||(n.customFields=true)}operation(){return ne.PNGetChannelMetadataOperation}validate(){if(!this.parameters.channel)return"Channel cannot be empty"}parse(e){return i(this,void 0,void 0,(function*(){const t=this.deserializeResponse(e);if(!t)throw new d("Service response error, check status for details",p("Unable to deserialize service response"));if(t.status>=400)throw A.create(e);return t}))}get path(){const{keySet:{subscribeKey:e},channel:t}=this.parameters;return`/v2/objects/${e}/channels/${j(t)}`}get queryParameters(){return{include:["status","type",...this.parameters.include.customFields?["custom"]:[]].join(",")}}}class ms extends se{constructor(e){var t,s,n;super({method:B.PATCH}),this.parameters=e,null!==(t=e.include)&&void 0!==t||(e.include={}),null!==(s=(n=e.include).customFields)&&void 0!==s||(n.customFields=true)}operation(){return ne.PNSetChannelMetadataOperation}validate(){return this.parameters.channel?this.parameters.data?void 0:"Data cannot be empty":"Channel cannot be empty"}parse(e){return i(this,void 0,void 0,(function*(){const t=this.deserializeResponse(e);if(!t)throw new d("Service response error, check status for details",p("Unable to deserialize service response"));if(t.status>=400)throw A.create(e);return t}))}get path(){const{keySet:{subscribeKey:e},channel:t}=this.parameters;return`/v2/objects/${e}/channels/${j(t)}`}get queryParameters(){return{include:["status","type",...this.parameters.include.customFields?["custom"]:[]].join(",")}}get body(){return JSON.stringify(this.parameters.data)}}class bs extends se{constructor(e){super({method:B.DELETE}),this.parameters=e,this.parameters.userId&&(this.parameters.uuid=this.parameters.userId)}operation(){return ne.PNRemoveUUIDMetadataOperation}validate(){if(!this.parameters.uuid)return"'uuid' cannot be empty"}parse(e){return i(this,void 0,void 0,(function*(){const t=this.deserializeResponse(e);if(!t)throw new d("Service response error, check status for details",p("Unable to deserialize service response"));if(t.status>=400)throw A.create(e);return t}))}get path(){const{keySet:{subscribeKey:e},uuid:t}=this.parameters;return`/v2/objects/${e}/uuids/${j(t)}`}}class vs extends se{constructor(e){var t,s,n,r,i,o,a,c,u,l,h,d,p,g,y,f;super(),this.parameters=e,null!==(t=e.include)&&void 0!==t||(e.include={}),null!==(s=(l=e.include).customFields)&&void 0!==s||(l.customFields=false),null!==(n=(h=e.include).totalCount)&&void 0!==n||(h.totalCount=false),null!==(r=(d=e.include).statusField)&&void 0!==r||(d.statusField=false),null!==(i=(p=e.include).UUIDFields)&&void 0!==i||(p.UUIDFields=false),null!==(o=(g=e.include).customUUIDFields)&&void 0!==o||(g.customUUIDFields=false),null!==(a=(y=e.include).UUIDStatusField)&&void 0!==a||(y.UUIDStatusField=false),null!==(c=(f=e.include).UUIDTypeField)&&void 0!==c||(f.UUIDTypeField=false),null!==(u=e.limit)&&void 0!==u||(e.limit=100)}operation(){return ne.PNSetMembersOperation}validate(){if(!this.parameters.channel)return"Channel cannot be empty"}parse(e){return i(this,void 0,void 0,(function*(){const t=this.deserializeResponse(e);if(!t)throw new d("Service response error, check status for details",p("Unable to deserialize service response"));if(t.status>=400)throw A.create(e);return t}))}get path(){const{keySet:{subscribeKey:e},channel:t}=this.parameters;return`/v2/objects/${e}/channels/${j(t)}/uuids`}get queryParameters(){const{include:e,page:t,filter:s,sort:n,limit:r}=this.parameters;let i="";i="string"==typeof n?n:Object.entries(null!=n?n:{}).map((([e,t])=>null!==t?`${e}:${t}`:e));const o=[];return e.statusField&&o.push("status"),e.customFields&&o.push("custom"),e.UUIDFields&&o.push("uuid"),e.UUIDStatusField&&o.push("uuid.status"),e.UUIDTypeField&&o.push("uuid.type"),e.customUUIDFields&&o.push("uuid.custom"),Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({count:`${e.totalCount}`},o.length>0?{include:o.join(",")}:{}),s?{filter:s}:{}),(null==t?void 0:t.next)?{start:t.next}:{}),(null==t?void 0:t.prev)?{end:t.prev}:{}),r?{limit:r}:{}),i.length?{sort:i}:{})}}class ws extends se{constructor(e){var t,s,n,r,i,o,a,c,u,l;super({method:B.PATCH}),this.parameters=e,null!==(t=e.include)&&void 0!==t||(e.include={}),null!==(s=(a=e.include).customFields)&&void 0!==s||(a.customFields=false),null!==(n=(c=e.include).totalCount)&&void 0!==n||(c.totalCount=false),null!==(r=(u=e.include).UUIDFields)&&void 0!==r||(u.UUIDFields=false),null!==(i=(l=e.include).customUUIDFields)&&void 0!==i||(l.customUUIDFields=false),null!==(o=e.limit)&&void 0!==o||(e.limit=100)}operation(){return ne.PNSetMembersOperation}validate(){const{channel:e,uuids:t}=this.parameters;return e?t&&0!==t.length?void 0:"UUIDs cannot be empty":"Channel cannot be empty"}parse(e){return i(this,void 0,void 0,(function*(){const t=this.deserializeResponse(e);if(!t)throw new d("Service response error, check status for details",p("Unable to deserialize service response"));if(t.status>=400)throw A.create(e);return t}))}get path(){const{keySet:{subscribeKey:e},channel:t}=this.parameters;return`/v2/objects/${e}/channels/${j(t)}/uuids`}get queryParameters(){const{include:e,page:t,filter:s,sort:n,limit:r}=this.parameters;let i="";i="string"==typeof n?n:Object.entries(null!=n?n:{}).map((([e,t])=>null!==t?`${e}:${t}`:e));const o=["uuid.status","uuid.type","type"];return e.customFields&&o.push("custom"),e.UUIDFields&&o.push("uuid"),e.customUUIDFields&&o.push("uuid.custom"),Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({count:`${e.totalCount}`},o.length>0?{include:o.join(",")}:{}),s?{filter:s}:{}),(null==t?void 0:t.next)?{start:t.next}:{}),(null==t?void 0:t.prev)?{end:t.prev}:{}),r?{limit:r}:{}),i.length?{sort:i}:{})}get body(){const{uuids:e,type:t}=this.parameters;return JSON.stringify({[`${t}`]:e.map((e=>"string"==typeof e?{uuid:{id:e}}:{uuid:{id:e.id},status:e.status,custom:e.custom}))})}}class Ss extends se{constructor(e){var t,s,n;super(),this.parameters=e,null!==(t=e.include)&&void 0!==t||(e.include={}),null!==(s=(n=e.include).customFields)&&void 0!==s||(n.customFields=true),this.parameters.userId&&(this.parameters.uuid=this.parameters.userId)}operation(){return ne.PNGetUUIDMetadataOperation}validate(){if(!this.parameters.uuid)return"'uuid' cannot be empty"}parse(e){return i(this,void 0,void 0,(function*(){const t=this.deserializeResponse(e);if(!t)throw new d("Service response error, check status for details",p("Unable to deserialize service response"));if(t.status>=400)throw A.create(e);return t}))}get path(){const{keySet:{subscribeKey:e},uuid:t}=this.parameters;return`/v2/objects/${e}/uuids/${j(t)}`}get queryParameters(){const{include:e}=this.parameters;return{include:["status","type",...e.customFields?["custom"]:[]].join(",")}}}class ks extends se{constructor(e){var t,s,n;super({method:B.PATCH}),this.parameters=e,null!==(t=e.include)&&void 0!==t||(e.include={}),null!==(s=(n=e.include).customFields)&&void 0!==s||(n.customFields=true),this.parameters.userId&&(this.parameters.uuid=this.parameters.userId)}operation(){return ne.PNSetUUIDMetadataOperation}validate(){return this.parameters.uuid?this.parameters.data?void 0:"Data cannot be empty":"'uuid' cannot be empty"}parse(e){return i(this,void 0,void 0,(function*(){const t=this.deserializeResponse(e);if(!t)throw new d("Service response error, check status for details",p("Unable to deserialize service response"));if(t.status>=400)throw A.create(e);return t}))}get path(){const{keySet:{subscribeKey:e},uuid:t}=this.parameters;return`/v2/objects/${e}/uuids/${j(t)}`}get queryParameters(){return{include:["status","type",...this.parameters.include.customFields?["custom"]:[]].join(",")}}get body(){return JSON.stringify(this.parameters.data)}}class Es{constructor(e,t){this.keySet=e.keySet,this.configuration=e,this.sendRequest=t}getAllUUIDMetadata(e,t){return i(this,void 0,void 0,(function*(){return this._getAllUUIDMetadata(e,t)}))}_getAllUUIDMetadata(e,t){return i(this,void 0,void 0,(function*(){const s=e&&"function"!=typeof e?e:{};null!=t||(t="function"==typeof e?e:void 0);const n=new ys(Object.assign(Object.assign({},s),{keySet:this.keySet}));return t?this.sendRequest(n,t):this.sendRequest(n)}))}getUUIDMetadata(e,t){return i(this,void 0,void 0,(function*(){return this._getUUIDMetadata(e,t)}))}_getUUIDMetadata(e,t){return i(this,void 0,void 0,(function*(){var s;const n=e&&"function"!=typeof e?e:{};null!=t||(t="function"==typeof e?e:void 0),n.userId&&(n.uuid=n.userId),null!==(s=n.uuid)&&void 0!==s||(n.uuid=this.configuration.userId);const r=new Ss(Object.assign(Object.assign({},n),{keySet:this.keySet}));return t?this.sendRequest(r,t):this.sendRequest(r)}))}setUUIDMetadata(e,t){return i(this,void 0,void 0,(function*(){return this._setUUIDMetadata(e,t)}))}_setUUIDMetadata(e,t){return i(this,void 0,void 0,(function*(){var s;e.userId&&(e.uuid=e.userId),null!==(s=e.uuid)&&void 0!==s||(e.uuid=this.configuration.userId);const n=new ks(Object.assign(Object.assign({},e),{keySet:this.keySet}));return t?this.sendRequest(n,t):this.sendRequest(n)}))}removeUUIDMetadata(e,t){return i(this,void 0,void 0,(function*(){return this._removeUUIDMetadata(e,t)}))}_removeUUIDMetadata(e,t){return i(this,void 0,void 0,(function*(){var s;const n=e&&"function"!=typeof e?e:{};null!=t||(t="function"==typeof e?e:void 0),n.userId&&(n.uuid=n.userId),null!==(s=n.uuid)&&void 0!==s||(n.uuid=this.configuration.userId);const r=new bs(Object.assign(Object.assign({},n),{keySet:this.keySet}));return t?this.sendRequest(r,t):this.sendRequest(r)}))}getAllChannelMetadata(e,t){return i(this,void 0,void 0,(function*(){return this._getAllChannelMetadata(e,t)}))}_getAllChannelMetadata(e,t){return i(this,void 0,void 0,(function*(){const s=e&&"function"!=typeof e?e:{};null!=t||(t="function"==typeof e?e:void 0);const n=new hs(Object.assign(Object.assign({},s),{keySet:this.keySet}));return t?this.sendRequest(n,t):this.sendRequest(n)}))}getChannelMetadata(e,t){return i(this,void 0,void 0,(function*(){return this._getChannelMetadata(e,t)}))}_getChannelMetadata(e,t){return i(this,void 0,void 0,(function*(){const s=new fs(Object.assign(Object.assign({},e),{keySet:this.keySet}));return t?this.sendRequest(s,t):this.sendRequest(s)}))}setChannelMetadata(e,t){return i(this,void 0,void 0,(function*(){return this._setChannelMetadata(e,t)}))}_setChannelMetadata(e,t){return i(this,void 0,void 0,(function*(){const s=new ms(Object.assign(Object.assign({},e),{keySet:this.keySet}));return t?this.sendRequest(s,t):this.sendRequest(s)}))}removeChannelMetadata(e,t){return i(this,void 0,void 0,(function*(){return this._removeChannelMetadata(e,t)}))}_removeChannelMetadata(e,t){return i(this,void 0,void 0,(function*(){const s=new ds(Object.assign(Object.assign({},e),{keySet:this.keySet}));return t?this.sendRequest(s,t):this.sendRequest(s)}))}getChannelMembers(e,t){return i(this,void 0,void 0,(function*(){const s=new vs(Object.assign(Object.assign({},e),{keySet:this.keySet}));return t?this.sendRequest(s,t):this.sendRequest(s)}))}setChannelMembers(e,t){return i(this,void 0,void 0,(function*(){const s=new ws(Object.assign(Object.assign({},e),{type:"set",keySet:this.keySet}));return t?this.sendRequest(s,t):this.sendRequest(s)}))}removeChannelMembers(e,t){return i(this,void 0,void 0,(function*(){const s=new ws(Object.assign(Object.assign({},e),{type:"delete",keySet:this.keySet}));return t?this.sendRequest(s,t):this.sendRequest(s)}))}getMemberships(e,t){return i(this,void 0,void 0,(function*(){var s;const n=e&&"function"!=typeof e?e:{};null!=t||(t="function"==typeof e?e:void 0),n.userId&&(n.uuid=n.userId),null!==(s=n.uuid)&&void 0!==s||(n.uuid=this.configuration.userId);const r=new ps(Object.assign(Object.assign({},n),{keySet:this.keySet}));return t?this.sendRequest(r,t):this.sendRequest(r)}))}setMemberships(e,t){return i(this,void 0,void 0,(function*(){var s;e.userId&&(e.uuid=e.userId),null!==(s=e.uuid)&&void 0!==s||(e.uuid=this.configuration.userId);const n=new gs(Object.assign(Object.assign({},e),{type:"set",keySet:this.keySet}));return t?this.sendRequest(n,t):this.sendRequest(n)}))}removeMemberships(e,t){return i(this,void 0,void 0,(function*(){var s;e.userId&&(e.uuid=e.userId),null!==(s=e.uuid)&&void 0!==s||(e.uuid=this.configuration.userId);const n=new gs(Object.assign(Object.assign({},e),{type:"delete",keySet:this.keySet}));return t?this.sendRequest(n,t):this.sendRequest(n)}))}fetchMemberships(e,t){return i(this,void 0,void 0,(function*(){var s,n;if("spaceId"in e){const n=e,r={channel:null!==(s=n.spaceId)&&void 0!==s?s:n.channel,filter:n.filter,limit:n.limit,page:n.page,include:Object.assign({},n.include),sort:n.sort?Object.fromEntries(Object.entries(n.sort).map((([e,t])=>[e.replace("user","uuid"),t]))):void 0},i=e=>({status:e.status,data:e.data.map((e=>({user:e.uuid,custom:e.custom,updated:e.updated,eTag:e.eTag}))),totalCount:e.totalCount,next:e.next,prev:e.prev});return t?this.getChannelMembers(r,((e,s)=>{t(e,s?i(s):s)})):this.getChannelMembers(r).then(i)}const r=e,i={uuid:null!==(n=r.userId)&&void 0!==n?n:r.uuid,filter:r.filter,limit:r.limit,page:r.page,include:Object.assign({},r.include),sort:r.sort?Object.fromEntries(Object.entries(r.sort).map((([e,t])=>[e.replace("space","channel"),t]))):void 0},o=e=>({status:e.status,data:e.data.map((e=>({space:e.channel,custom:e.custom,updated:e.updated,eTag:e.eTag}))),totalCount:e.totalCount,next:e.next,prev:e.prev});return t?this.getMemberships(i,((e,s)=>{t(e,s?o(s):s)})):this.getMemberships(i).then(o)}))}addMemberships(e,t){return i(this,void 0,void 0,(function*(){var s,n,r,i,o,a;if("spaceId"in e){const i=e,o={channel:null!==(s=i.spaceId)&&void 0!==s?s:i.channel,uuids:null!==(r=null===(n=i.users)||void 0===n?void 0:n.map((e=>"string"==typeof e?e:{id:e.userId,custom:e.custom})))&&void 0!==r?r:i.uuids,limit:0};return t?this.setChannelMembers(o,t):this.setChannelMembers(o)}const c=e,u={uuid:null!==(i=c.userId)&&void 0!==i?i:c.uuid,channels:null!==(a=null===(o=c.spaces)||void 0===o?void 0:o.map((e=>"string"==typeof e?e:{id:e.spaceId,custom:e.custom})))&&void 0!==a?a:c.channels,limit:0};return t?this.setMemberships(u,t):this.setMemberships(u)}))}}class Os extends se{constructor(){super()}operation(){return ne.PNTimeOperation}parse(e){return i(this,void 0,void 0,(function*(){const t=this.deserializeResponse(e);if(!t)throw new d("Service response error, check status for details",p("Unable to deserialize service response"));return{timetoken:t[0]}}))}get path(){return"/time/0"}}class Cs extends se{constructor(e){super(),this.parameters=e}operation(){return ne.PNDownloadFileOperation}validate(){const{channel:e,id:t,name:s}=this.parameters;return e?t?s?void 0:"file name can't be empty":"file id can't be empty":"channel can't be empty"}parse(e){return i(this,void 0,void 0,(function*(){const{cipherKey:t,crypto:s,cryptography:n,name:r,PubNubFile:i}=this.parameters,o=e.headers["content-type"];let a,c=e.body;return i.supportsEncryptFile&&(t||s)&&(t&&n?c=yield n.decrypt(t,c):!t&&s&&(a=yield s.decryptFile(i.create({data:c,name:r,mimeType:o}),i))),a||i.create({data:c,name:r,mimeType:o})}))}get path(){const{keySet:{subscribeKey:e},channel:t,id:s,name:n}=this.parameters;return`/v1/files/${e}/channels/${j(t)}/files/${s}/${n}`}}class Ns{static notificationPayload(e,t){return new te(e,t)}static generateUUID(){return G.createUUID()}constructor(e){if(this._configuration=e.configuration,this.cryptography=e.cryptography,this.tokenManager=e.tokenManager,this.transport=e.transport,this.crypto=e.crypto,this._objects=new Es(this._configuration,this.sendRequest.bind(this)),this._channelGroups=new rs(this._configuration.keySet,this.sendRequest.bind(this)),this._push=new ls(this._configuration.keySet,this.sendRequest.bind(this)),this.listenerManager=new W,this.eventEmitter=new ae(this.listenerManager),this._configuration.enableEventEngine){let e=this._configuration.getHeartbeatInterval();this.presenceState={},e&&(this.presenceEventEngine=new Ke({heartbeat:this.heartbeat.bind(this),leave:e=>this.makeUnsubscribe(e,(()=>{})),heartbeatDelay:()=>new Promise(((t,s)=>{e=this._configuration.getHeartbeatInterval(),e?setTimeout(t,1e3*e):s(new d("Heartbeat interval has been reset."))})),retryDelay:e=>new Promise((t=>setTimeout(t,e))),emitStatus:e=>this.listenerManager.announceStatus(e),config:this._configuration,presenceState:this.presenceState})),this.eventEngine=new wt({handshake:this.subscribeHandshake.bind(this),receiveMessages:this.subscribeReceiveMessages.bind(this),delay:e=>new Promise((t=>setTimeout(t,e))),join:this.join.bind(this),leave:this.leave.bind(this),leaveAll:this.leaveAll.bind(this),presenceState:this.presenceState,config:this._configuration,emitMessages:e=>{try{e.forEach((e=>this.eventEmitter.emitEvent(e)))}catch(e){const t={error:!0,category:h.PNUnknownCategory,errorData:e,statusCode:0};this.listenerManager.announceStatus(t)}},emitStatus:e=>this.listenerManager.announceStatus(e)})}else this.subscriptionManager=new Y(this._configuration,this.listenerManager,this.eventEmitter,this.makeSubscribe.bind(this),this.heartbeat.bind(this),this.makeUnsubscribe.bind(this),this.time.bind(this))}get configuration(){return this._configuration}get _config(){return this.configuration}get authKey(){var e;return null!==(e=this._configuration.authKey)&&void 0!==e?e:void 0}getAuthKey(){return this.authKey}setAuthKey(e){this._configuration.setAuthKey(e)}get userId(){return this._configuration.userId}set userId(e){if(!e||"string"!=typeof e||0===e.trim().length)throw new Error("Missing or invalid userId parameter. Provide a valid string userId");this._configuration.userId=e}getUserId(){return this._configuration.userId}setUserId(e){if(!e||"string"!=typeof e||0===e.trim().length)throw new Error("Missing or invalid userId parameter. Provide a valid string userId");this._configuration.userId=e}get filterExpression(){var e;return null!==(e=this._configuration.getFilterExpression())&&void 0!==e?e:void 0}getFilterExpression(){return this.filterExpression}set filterExpression(e){this._configuration.setFilterExpression(e)}setFilterExpression(e){this.filterExpression=e}get cipherKey(){return this._configuration.getCipherKey()}set cipherKey(e){this._configuration.setCipherKey(e)}setCipherKey(e){this.cipherKey=e}set heartbeatInterval(e){this._configuration.setHeartbeatInterval(e)}setHeartbeatInterval(e){this.heartbeatInterval=e}getVersion(){return this._configuration.getVersion()}_addPnsdkSuffix(e,t){this._configuration._addPnsdkSuffix(e,t)}getUUID(){return this.userId}setUUID(e){this.userId=e}get customEncrypt(){return this._configuration.getCustomEncrypt()}get customDecrypt(){return this._configuration.getCustomDecrypt()}channel(e){return new Xt(e,this.eventEmitter,this)}channelGroup(e){return new Qt(e,this.eventEmitter,this)}channelMetadata(e){return new Jt(e,this.eventEmitter,this)}userMetadata(e){return new Yt(e,this.eventEmitter,this)}subscriptionSet(e){return new Vt(Object.assign(Object.assign({},e),{eventEmitter:this.eventEmitter,pubnub:this}))}sendRequest(e,t){return i(this,void 0,void 0,(function*(){const s=e.validate();if(s){if(t)return t(p(s),null);throw new d("Validation failed, check status for details",p(s))}const n=e.request();n.formData&&n.formData.length>0?n.timeout=300:e.operation()===ne.PNSubscribeOperation?n.timeout=this._configuration.getSubscribeTimeout():n.timeout=this._configuration.getTransactionTimeout();const r={error:!1,operation:e.operation(),category:h.PNAcknowledgmentCategory,statusCode:0},[i,o]=this.transport.makeSendable(n);return e.cancellationController=o||null,i.then((t=>{if(r.statusCode=t.status,200!==t.status&&204!==t.status){const e=t.headers["content-type"];if(e||-1!==e.indexOf("javascript")||-1!==e.indexOf("json")){const e=JSON.parse(Ns.decoder.decode(t.body));"object"==typeof e&&"error"in e&&e.error&&"object"==typeof e.error&&(r.errorData=e.error)}}return e.parse(t)})).then((e=>t?t(r,e):e)).catch((s=>{const n=s instanceof A?s:A.create(s);if(t)return t(n.toStatus(e.operation()),null);throw n.toPubNubError(e.operation(),"REST API request processing error, check status for details")}))}))}destroy(e){this.subscriptionManager?(this.subscriptionManager.unsubscribeAll(e),this.subscriptionManager.disconnect()):this.eventEngine&&this.eventEngine.dispose()}stop(){this.destroy()}addListener(e){this.listenerManager.addListener(e)}removeListener(e){this.listenerManager.removeListener(e)}removeAllListeners(){this.listenerManager.removeAllListeners()}publish(e,t){return i(this,void 0,void 0,(function*(){{const s=new St(Object.assign(Object.assign({},e),{keySet:this._configuration.keySet,crypto:this._configuration.getCryptoModule()}));return t?this.sendRequest(s,t):this.sendRequest(s)}}))}signal(e,t){return i(this,void 0,void 0,(function*(){{const s=new kt(Object.assign(Object.assign({},e),{keySet:this._configuration.keySet}));return t?this.sendRequest(s,t):this.sendRequest(s)}}))}fire(e,t){return i(this,void 0,void 0,(function*(){return null!=t||(t=()=>{}),this.publish(Object.assign(Object.assign({},e),{replicate:!1,storeInHistory:!1}),t)}))}getSubscribedChannels(){return this.subscriptionManager?this.subscriptionManager.subscribedChannels:this.eventEngine?this.eventEngine.getSubscribedChannels():[]}getSubscribedChannelGroups(){return this.subscriptionManager?this.subscriptionManager.subscribedChannelGroups:this.eventEngine?this.eventEngine.getSubscribedChannelGroups():[]}subscribe(e){this.subscriptionManager?this.subscriptionManager.subscribe(e):this.eventEngine&&this.eventEngine.subscribe(e)}makeSubscribe(e,t){{const s=new oe(Object.assign(Object.assign({},e),{keySet:this._configuration.keySet,crypto:this._configuration.getCryptoModule(),getFileUrl:this.getFileUrl.bind(this)}));if(this.sendRequest(s,((e,n)=>{var r;this.subscriptionManager&&(null===(r=this.subscriptionManager.abort)||void 0===r?void 0:r.identifier)===s.requestIdentifier&&(this.subscriptionManager.abort=null),t(e,n)})),this.subscriptionManager){const e=()=>s.abort();e.identifier=s.requestIdentifier,this.subscriptionManager.abort=e}}}unsubscribe(e){this.subscriptionManager?this.subscriptionManager.unsubscribe(e):this.eventEngine&&this.eventEngine.unsubscribe(e)}makeUnsubscribe(e,t){this.sendRequest(new Mt(Object.assign(Object.assign({},e),{keySet:this._configuration.keySet})),t)}unsubscribeAll(){this.subscriptionManager?this.subscriptionManager.unsubscribeAll():this.eventEngine&&this.eventEngine.unsubscribeAll()}disconnect(){this.subscriptionManager?this.subscriptionManager.disconnect():this.eventEngine&&this.eventEngine.disconnect()}reconnect(e){this.subscriptionManager?this.subscriptionManager.reconnect():this.eventEngine&&this.eventEngine.reconnect(null!=e?e:{})}subscribeHandshake(e){return i(this,void 0,void 0,(function*(){{const t=new Ot(Object.assign(Object.assign({},e),{keySet:this._configuration.keySet,crypto:this._configuration.getCryptoModule(),getFileUrl:this.getFileUrl.bind(this)})),s=e.abortSignal.subscribe((e=>{t.abort()}));return this.sendRequest(t).then((e=>(s(),e.cursor)))}}))}subscribeReceiveMessages(e){return i(this,void 0,void 0,(function*(){{const t=new Et(Object.assign(Object.assign({},e),{keySet:this._configuration.keySet,crypto:this._configuration.getCryptoModule(),getFileUrl:this.getFileUrl.bind(this)})),s=e.abortSignal.subscribe((e=>{t.abort()}));return this.sendRequest(t).then((e=>(s(),e)))}}))}getMessageActions(e,t){return i(this,void 0,void 0,(function*(){{const s=new Ft(Object.assign(Object.assign({},e),{keySet:this._configuration.keySet}));return t?this.sendRequest(s,t):this.sendRequest(s)}}))}addMessageAction(e,t){return i(this,void 0,void 0,(function*(){{const s=new xt(Object.assign(Object.assign({},e),{keySet:this._configuration.keySet}));return t?this.sendRequest(s,t):this.sendRequest(s)}}))}removeMessageAction(e,t){return i(this,void 0,void 0,(function*(){{const s=new Dt(Object.assign(Object.assign({},e),{keySet:this._configuration.keySet}));return t?this.sendRequest(s,t):this.sendRequest(s)}}))}fetchMessages(e,t){return i(this,void 0,void 0,(function*(){{const s=new Tt(Object.assign(Object.assign({},e),{keySet:this._configuration.keySet,crypto:this._configuration.getCryptoModule(),getFileUrl:this.getFileUrl.bind(this)}));return t?this.sendRequest(s,t):this.sendRequest(s)}}))}deleteMessages(e,t){return i(this,void 0,void 0,(function*(){{const s=new jt(Object.assign(Object.assign({},e),{keySet:this._configuration.keySet}));return t?this.sendRequest(s,t):this.sendRequest(s)}}))}messageCounts(e,t){return i(this,void 0,void 0,(function*(){{const s=new It(Object.assign(Object.assign({},e),{keySet:this._configuration.keySet}));return t?this.sendRequest(s,t):this.sendRequest(s)}}))}history(e,t){return i(this,void 0,void 0,(function*(){{const s=new Rt(Object.assign(Object.assign({},e),{keySet:this._configuration.keySet,crypto:this._configuration.getCryptoModule()}));return t?this.sendRequest(s,t):this.sendRequest(s)}}))}hereNow(e,t){return i(this,void 0,void 0,(function*(){{const s=new _t(Object.assign(Object.assign({},e),{keySet:this._configuration.keySet}));return t?this.sendRequest(s,t):this.sendRequest(s)}}))}whereNow(e,t){return i(this,void 0,void 0,(function*(){var s;{const n=new At({uuid:null!==(s=e.uuid)&&void 0!==s?s:this._configuration.userId,keySet:this._configuration.keySet});return t?this.sendRequest(n,t):this.sendRequest(n)}}))}getState(e,t){return i(this,void 0,void 0,(function*(){var s;{const n=new Ct(Object.assign(Object.assign({},e),{uuid:null!==(s=e.uuid)&&void 0!==s?s:this._configuration.userId,keySet:this._configuration.keySet}));return t?this.sendRequest(n,t):this.sendRequest(n)}}))}setState(e,t){return i(this,void 0,void 0,(function*(){var s,n;{const{keySet:r,userId:i}=this._configuration,o=this._configuration.getPresenceTimeout();let a;if(this._configuration.enableEventEngine&&this.presenceState){const t=this.presenceState;null===(s=e.channels)||void 0===s||s.forEach((s=>t[s]=e.state)),"channelGroups"in e&&(null===(n=e.channelGroups)||void 0===n||n.forEach((s=>t[s]=e.state)))}return a="withHeartbeat"in e?new Pt(Object.assign(Object.assign({},e),{keySet:r,heartbeat:o})):new Nt(Object.assign(Object.assign({},e),{keySet:r,uuid:i})),this.subscriptionManager&&this.subscriptionManager.setState(e),t?this.sendRequest(a,t):this.sendRequest(a)}}))}presence(e){var t;null===(t=this.subscriptionManager)||void 0===t||t.changePresence(e)}heartbeat(e,t){return i(this,void 0,void 0,(function*(){{const s=new Pt(Object.assign(Object.assign({},e),{keySet:this._configuration.keySet}));return t?this.sendRequest(s,t):this.sendRequest(s)}}))}join(e){var t;null===(t=this.presenceEventEngine)||void 0===t||t.join(e)}leave(e){var t;null===(t=this.presenceEventEngine)||void 0===t||t.leave(e)}leaveAll(){var e;null===(e=this.presenceEventEngine)||void 0===e||e.leaveAll()}grantToken(e,t){return i(this,void 0,void 0,(function*(){throw new Error("Grant Token error: PAM module disabled")}))}revokeToken(e,t){return i(this,void 0,void 0,(function*(){throw new Error("Revoke Token error: PAM module disabled")}))}get token(){return this.tokenManager&&this.tokenManager.getToken()}getToken(){return this.token}set token(e){this.tokenManager&&this.tokenManager.setToken(e)}setToken(e){this.token=e}parseToken(e){return this.tokenManager&&this.tokenManager.parseToken(e)}grant(e,t){return i(this,void 0,void 0,(function*(){throw new Error("Grant error: PAM module disabled")}))}audit(e,t){return i(this,void 0,void 0,(function*(){throw new Error("Grant Permissions error: PAM module disabled")}))}get objects(){return this._objects}fetchUsers(e,t){return i(this,void 0,void 0,(function*(){return this.objects._getAllUUIDMetadata(e,t)}))}fetchUser(e,t){return i(this,void 0,void 0,(function*(){return this.objects._getUUIDMetadata(e,t)}))}createUser(e,t){return i(this,void 0,void 0,(function*(){return this.objects._setUUIDMetadata(e,t)}))}updateUser(e,t){return i(this,void 0,void 0,(function*(){return this.objects._setUUIDMetadata(e,t)}))}removeUser(e,t){return i(this,void 0,void 0,(function*(){return this.objects._removeUUIDMetadata(e,t)}))}fetchSpaces(e,t){return i(this,void 0,void 0,(function*(){return this.objects._getAllChannelMetadata(e,t)}))}fetchSpace(e,t){return i(this,void 0,void 0,(function*(){return this.objects._getChannelMetadata(e,t)}))}createSpace(e,t){return i(this,void 0,void 0,(function*(){return this.objects._setChannelMetadata(e,t)}))}updateSpace(e,t){return i(this,void 0,void 0,(function*(){return this.objects._setChannelMetadata(e,t)}))}removeSpace(e,t){return i(this,void 0,void 0,(function*(){return this.objects._removeChannelMetadata(e,t)}))}fetchMemberships(e,t){return i(this,void 0,void 0,(function*(){return this.objects.fetchMemberships(e,t)}))}addMemberships(e,t){return i(this,void 0,void 0,(function*(){return this.objects.addMemberships(e,t)}))}updateMemberships(e,t){return i(this,void 0,void 0,(function*(){return this.objects.addMemberships(e,t)}))}removeMemberships(e,t){return i(this,void 0,void 0,(function*(){var s,n,r;{if("spaceId"in e){const r=e,i={channel:null!==(s=r.spaceId)&&void 0!==s?s:r.channel,uuids:null!==(n=r.userIds)&&void 0!==n?n:r.uuids,limit:0};return t?this.objects.removeChannelMembers(i,t):this.objects.removeChannelMembers(i)}const i=e,o={uuid:i.userId,channels:null!==(r=i.spaceIds)&&void 0!==r?r:i.channels,limit:0};return t?this.objects.removeMemberships(o,t):this.objects.removeMemberships(o)}}))}get channelGroups(){return this._channelGroups}get push(){return this._push}sendFile(e,t){return i(this,void 0,void 0,(function*(){{if(!this._configuration.PubNubFile)throw new Error("Validation failed: 'PubNubFile' not configured or file upload not supported by the platform.");const s=new Ht(Object.assign(Object.assign({},e),{keySet:this._configuration.keySet,PubNubFile:this._configuration.PubNubFile,fileUploadPublishRetryLimit:this._configuration.fileUploadPublishRetryLimit,file:e.file,sendRequest:this.sendRequest.bind(this),publishFile:this.publishFile.bind(this),crypto:this._configuration.getCryptoModule(),cryptography:this.cryptography?this.cryptography:void 0})),n={error:!1,operation:ne.PNPublishFileOperation,category:h.PNAcknowledgmentCategory,statusCode:0};return s.process().then((e=>(n.statusCode=e.status,t?t(n,e):e))).catch((e=>{let s;throw e instanceof d?s=e.status:e instanceof A&&(s=e.toStatus(n.operation)),t&&s&&t(s,null),new d("REST API request processing error, check status for details",s)}))}}))}publishFile(e,t){return i(this,void 0,void 0,(function*(){{if(!this._configuration.PubNubFile)throw new Error("Validation failed: 'PubNubFile' not configured or file upload not supported by the platform.");const s=new qt(Object.assign(Object.assign({},e),{keySet:this._configuration.keySet,crypto:this._configuration.getCryptoModule()}));return t?this.sendRequest(s,t):this.sendRequest(s)}}))}listFiles(e,t){return i(this,void 0,void 0,(function*(){{const s=new $t(Object.assign(Object.assign({},e),{keySet:this._configuration.keySet}));return t?this.sendRequest(s,t):this.sendRequest(s)}}))}getFileUrl(e){var t;{const s=this.transport.request(new Gt(Object.assign(Object.assign({},e),{keySet:this._configuration.keySet})).request()),n=null!==(t=s.queryParameters)&&void 0!==t?t:{},r=Object.keys(n).map((e=>{const t=n[e];return Array.isArray(t)?t.map((t=>`${e}=${j(t)}`)).join("&"):`${e}=${j(t)}`})).join("&");return`${s.origin}${s.path}?${r}`}}downloadFile(e,t){return i(this,void 0,void 0,(function*(){{if(!this._configuration.PubNubFile)throw new Error("Validation failed: 'PubNubFile' not configured or file upload not supported by the platform.");const s=new Cs(Object.assign(Object.assign({},e),{keySet:this._configuration.keySet,PubNubFile:this._configuration.PubNubFile,cryptography:this.cryptography?this.cryptography:void 0,crypto:this._configuration.getCryptoModule()}));return t?this.sendRequest(s,t):yield this.sendRequest(s)}}))}deleteFile(e,t){return i(this,void 0,void 0,(function*(){{const s=new Kt(Object.assign(Object.assign({},e),{keySet:this._configuration.keySet}));return t?this.sendRequest(s,t):this.sendRequest(s)}}))}time(e){return i(this,void 0,void 0,(function*(){const t=new Os;return e?this.sendRequest(t,e):this.sendRequest(t)}))}encrypt(e,t){const s=this._configuration.getCryptoModule();if(!t&&s&&"string"==typeof e){const t=s.encrypt(e);return"string"==typeof t?t:u(t)}if(!this.crypto)throw new Error("Encryption error: cypher key not set");return this.crypto.encrypt(e,t)}decrypt(e,t){const s=this._configuration.getCryptoModule();if(!t&&s){const t=s.decrypt(e);return t instanceof ArrayBuffer?JSON.parse((new TextDecoder).decode(t)):t}if(!this.crypto)throw new Error("Decryption error: cypher key not set");return this.crypto.decrypt(e,t)}encryptFile(e,t){return i(this,void 0,void 0,(function*(){var s;if("string"!=typeof e&&(t=e),!t)throw new Error("File encryption error. Source file is missing.");if(!this._configuration.PubNubFile)throw new Error("File encryption error. File constructor not configured.");if("string"!=typeof e&&!this._configuration.getCryptoModule())throw new Error("File encryption error. Crypto module not configured.");if("string"==typeof e){if(!this.cryptography)throw new Error("File encryption error. File encryption not available");return this.cryptography.encryptFile(e,t,this._configuration.PubNubFile)}return null===(s=this._configuration.getCryptoModule())||void 0===s?void 0:s.encryptFile(t,this._configuration.PubNubFile)}))}decryptFile(e,t){return i(this,void 0,void 0,(function*(){var s;if("string"!=typeof e&&(t=e),!t)throw new Error("File encryption error. Source file is missing.");if(!this._configuration.PubNubFile)throw new Error("File decryption error. File constructor not configured.");if("string"==typeof e&&!this._configuration.getCryptoModule())throw new Error("File decryption error. Crypto module not configured.");if("string"==typeof e){if(!this.cryptography)throw new Error("File decryption error. File decryption not available");return this.cryptography.decryptFile(e,t,this._configuration.PubNubFile)}return null===(s=this._configuration.getCryptoModule())||void 0===s?void 0:s.decryptFile(t,this._configuration.PubNubFile)}))}}Ns.decoder=new TextDecoder,Ns.OPERATIONS=ne,Ns.CATEGORIES=h,Ns.ExponentialRetryPolicy=$e.ExponentialRetryPolicy,Ns.LinearRetryPolicy=$e.LinearRetryPolicy;class Ps{constructor(e,t){this.decode=e,this.base64ToBinary=t}decodeToken(e){let t="";e.length%4==3?t="=":e.length%4==2&&(t="==");const s=e.replace(/-/gi,"+").replace(/_/gi,"/")+t,n=this.decode(this.base64ToBinary(s));return"object"==typeof n?n:void 0}}class Ms extends Ns{constructor(e){var t;const s=x(e),r=Object.assign(Object.assign({},s),{sdkFamily:"Web"});r.PubNubFile=a;const i=K(r,(e=>{if(e.cipherKey)return new N({default:new C(Object.assign({},e)),cryptors:[new S({cipherKey:e.cipherKey})]})}));let o,u,l;o=new L(new Ps((e=>F(n.decode(e))),c)),(i.getCipherKey()||i.secretKey)&&(u=new E({secretKey:i.secretKey,cipherKey:i.getCipherKey(),useRandomIVs:i.getUseRandomIVs(),customEncrypt:i.getCustomEncrypt(),customDecrypt:i.getCustomDecrypt()})),l=new O;let h=new T(i.keepAlive,i.logVerbosity);s.subscriptionWorkerUrl&&(h=new _({clientIdentifier:i._instanceId,subscriptionKey:i.subscribeKey,userId:i.getUserId(),workerUrl:s.subscriptionWorkerUrl,sdkVersion:i.getVersion(),logVerbosity:i.logVerbosity,workerLogVerbosity:r.subscriptionWorkerLogVerbosity,transport:h}));super({configuration:i,transport:new V({clientConfiguration:i,tokenManager:o,transport:h}),cryptography:l,tokenManager:o,crypto:u}),(null===(t=e.listenToBrowserNetworkEvents)||void 0===t||t)&&(window.addEventListener("offline",(()=>{this.networkDownDetected()})),window.addEventListener("online",(()=>{this.networkUpDetected()})))}networkDownDetected(){this.listenerManager.announceNetworkDown(),this._configuration.restore?this.disconnect():this.destroy(!0)}networkUpDetected(){this.listenerManager.announceNetworkUp(),this.reconnect()}}return Ms.CryptoModule=N,Ms})); diff --git a/dist/web/pubnub.worker.js b/dist/web/pubnub.worker.js index abe7ea21d..3d8b4ec58 100644 --- a/dist/web/pubnub.worker.js +++ b/dist/web/pubnub.worker.js @@ -17,7 +17,7 @@ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** */ - /* global Reflect, Promise, SuppressedError, Symbol */ + /* global Reflect, Promise, SuppressedError, Symbol, Iterator */ function __awaiter(thisArg, _arguments, P, generator) { @@ -89,6 +89,12 @@ var uuidExports = uuid.exports; var uuidGenerator$1 = /*@__PURE__*/getDefaultExportFromCjs(uuidExports); + /** + * Random identifier generator helper module. + * + * @internal + */ + /** @internal */ var uuidGenerator = { createUUID() { if (uuidGenerator$1.uuid) { @@ -105,6 +111,8 @@ * * Service worker provides support for PubNub subscription feature to give better user experience across * multiple opened pages. + * + * @internal */ /** * How often PING request should be sent to the PubNub clients. diff --git a/lib/cbor/common.js b/lib/cbor/common.js index bd5b2e965..aa7418d26 100644 --- a/lib/cbor/common.js +++ b/lib/cbor/common.js @@ -1,6 +1,8 @@ "use strict"; /** * Cbor decoder module. + * + * @internal */ Object.defineProperty(exports, "__esModule", { value: true }); /** diff --git a/lib/core/components/abort_signal.js b/lib/core/components/abort_signal.js index 59ca4f8f3..24c7a8dea 100644 --- a/lib/core/components/abort_signal.js +++ b/lib/core/components/abort_signal.js @@ -1,4 +1,9 @@ "use strict"; +/** + * Event Engine managed effects terminate signal module. + * + * @internal + */ Object.defineProperty(exports, "__esModule", { value: true }); exports.AbortSignal = exports.AbortError = void 0; const subject_1 = require("./subject"); diff --git a/lib/core/components/base64_codec.js b/lib/core/components/base64_codec.js index aa22d1d64..817ce0e00 100644 --- a/lib/core/components/base64_codec.js +++ b/lib/core/components/base64_codec.js @@ -1,6 +1,12 @@ "use strict"; +/** + * Base64 support module. + * + * @internal + */ Object.defineProperty(exports, "__esModule", { value: true }); -exports.encode = exports.decode = void 0; +exports.decode = decode; +exports.encode = encode; const BASE64_CHARMAP = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/='; /** * Decode a Base64 encoded string. @@ -49,7 +55,6 @@ function decode(paddedInput) { } return data; } -exports.decode = decode; /** * Encode `ArrayBuffer` as a Base64 encoded string. * @@ -97,4 +102,3 @@ function encode(input) { } return base64; } -exports.encode = encode; diff --git a/lib/core/components/configuration.js b/lib/core/components/configuration.js index bd79ae66d..c0371ae2b 100644 --- a/lib/core/components/configuration.js +++ b/lib/core/components/configuration.js @@ -1,6 +1,8 @@ "use strict"; /** * {@link PubNub} client configuration module. + * + * @internal */ var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; @@ -22,7 +24,7 @@ const USE_RANDOM_INITIALIZATION_VECTOR = true; * Create {@link PubNub} client private configuration object. * * @param base - User- and platform-provided configuration. - * @param setupCryptoModule - Platform-provided {@link CryptoModule} configuration block. + * @param setupCryptoModule - Platform-provided {@link ICryptoModule} configuration block. * * @returns `PubNub` client private configuration. * @@ -110,7 +112,7 @@ const makeConfiguration = (base, setupCryptoModule) => { return base.PubNubFile; }, get version() { - return '8.2.9'; + return '8.2.10'; }, getVersion() { return this.version; diff --git a/lib/core/components/cryptography/hmac-sha256.js b/lib/core/components/cryptography/hmac-sha256.js index 4b8616de3..b22f461a1 100644 --- a/lib/core/components/cryptography/hmac-sha256.js +++ b/lib/core/components/cryptography/hmac-sha256.js @@ -1,4 +1,9 @@ "use strict"; +/** + * CryptoJS implementation. + * + * @internal + */ /*eslint-disable */ /* CryptoJS v3.1.2 diff --git a/lib/core/components/cryptography/index.js b/lib/core/components/cryptography/index.js index fad0763a5..bfe47507e 100644 --- a/lib/core/components/cryptography/index.js +++ b/lib/core/components/cryptography/index.js @@ -1,6 +1,8 @@ "use strict"; /** * Legacy cryptography module. + * + * @internal */ var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; @@ -14,6 +16,8 @@ const hmac_sha256_1 = __importDefault(require("./hmac-sha256")); * @param b - Bytes array (buffer) which should be converted. * * @returns Word sized array. + * + * @internal */ /* eslint-disable @typescript-eslint/no-explicit-any */ function bufferToWordArray(b) { @@ -25,6 +29,11 @@ function bufferToWordArray(b) { // @ts-expect-error Bundled library without types. return hmac_sha256_1.default.lib.WordArray.create(wa, b.length); } +/** + * Legacy cryptography module for files and signature. + * + * @internal + */ class default_1 { constructor(configuration) { this.configuration = configuration; diff --git a/lib/core/components/deduping_manager.js b/lib/core/components/deduping_manager.js index ae7904bb3..c7310bd03 100644 --- a/lib/core/components/deduping_manager.js +++ b/lib/core/components/deduping_manager.js @@ -1,43 +1,78 @@ "use strict"; -/* */ +/** + * Messages de-duplication manager module. + * + * @internal + */ Object.defineProperty(exports, "__esModule", { value: true }); -const hashCode = (payload) => { - let hash = 0; - if (payload.length === 0) - return hash; - for (let i = 0; i < payload.length; i += 1) { - const character = payload.charCodeAt(i); - hash = (hash << 5) - hash + character; // eslint-disable-line - hash = hash & hash; // eslint-disable-line - } - return hash; -}; +exports.DedupingManager = void 0; /** * Real-time events deduplication manager. * * @internal */ -class default_1 { - constructor({ config }) { +class DedupingManager { + /** + * Create and configure real-time events de-duplication manager. + * + * @param config - PubNub client configuration object. + */ + constructor({ maximumCacheSize }) { + this.maximumCacheSize = maximumCacheSize; this.hashHistory = []; - this._config = config; } + /** + * Compute unique real-time event payload key. + * + * @param message - Received real-time event payload for which unique key should be computed. + * @returns Unique real-time event payload key in messages cache. + */ getKey(message) { - const hashedPayload = hashCode(JSON.stringify(message.message)).toString(); - const timetoken = message.timetoken; - return `${timetoken}-${hashedPayload}`; + var _a; + return `${message.timetoken}-${this.hashCode(JSON.stringify((_a = message.message) !== null && _a !== void 0 ? _a : '')).toString()}`; } + /** + * Check whether there is similar message already received or not. + * + * @param message - Received real-time event payload which should be checked for duplicates. + * @returns `true` in case if similar payload already has been received before. + */ isDuplicate(message) { return this.hashHistory.includes(this.getKey(message)); } + /** + * Store received message to be used later for duplicate detection. + * + * @param message - Received real-time event payload. + */ addEntry(message) { - if (this.hashHistory.length >= this._config.maximumCacheSize) { + if (this.hashHistory.length >= this.maximumCacheSize) { this.hashHistory.shift(); } this.hashHistory.push(this.getKey(message)); } + /** + * Clean up cached messages. + */ clearHistory() { this.hashHistory = []; } + /** + * Compute message hash sum. + * + * @param payload - Received payload for which hash sum should be computed. + * @returns {number} - Resulting hash sum. + */ + hashCode(payload) { + let hash = 0; + if (payload.length === 0) + return hash; + for (let i = 0; i < payload.length; i += 1) { + const character = payload.charCodeAt(i); + hash = (hash << 5) - hash + character; // eslint-disable-line + hash = hash & hash; // eslint-disable-line + } + return hash; + } } -exports.default = default_1; +exports.DedupingManager = DedupingManager; diff --git a/lib/core/components/eventEmitter.js b/lib/core/components/eventEmitter.js index d995bd428..3a4146b7e 100644 --- a/lib/core/components/eventEmitter.js +++ b/lib/core/components/eventEmitter.js @@ -1,4 +1,9 @@ "use strict"; +/** + * Real-time events emitter module. + * + * @internal + */ var __rest = (this && this.__rest) || function (s, e) { var t = {}; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) diff --git a/lib/core/components/push_payload.js b/lib/core/components/push_payload.js index 005ffd348..2573a983c 100644 --- a/lib/core/components/push_payload.js +++ b/lib/core/components/push_payload.js @@ -22,6 +22,15 @@ exports.FCMNotificationPayload = exports.APNSNotificationPayload = void 0; * Base notification payload object. */ class BaseNotificationPayload { + /** + * Base notification provider payload object. + * + * @internal + * + * @param payload - Object which contains vendor-specific preformatted push notification payload. + * @param title - Notification main title. + * @param body - Notification body (main messages). + */ constructor(payload, title, body) { this._payload = payload; this.setDefaultPayloadStructure(); @@ -78,11 +87,15 @@ class BaseNotificationPayload { } /** * Platform-specific structure initialization. + * + * @internal */ setDefaultPayloadStructure() { } /** * Translate data object into PubNub push notification payload object. * + * @internal + * * @returns Preformatted push notification payload. */ toObject() { @@ -97,10 +110,14 @@ class APNSNotificationPayload extends BaseNotificationPayload { super(...arguments); /** * Type of push notification service for which payload will be created. + * + * @internal */ this._apnsPushType = 'apns'; /** * Whether resulting payload should trigger silent notification or not. + * + * @internal */ this._isSilent = false; } @@ -230,9 +247,21 @@ class APNSNotificationPayload extends BaseNotificationPayload { set silent(value) { this._isSilent = value; } + /** + * Setup push notification payload default content. + * + * @internal + */ setDefaultPayloadStructure() { this.payload.aps = { alert: {} }; } + /** + * Translate data object into PubNub push notification payload object. + * + * @internal + * + * @returns Preformatted push notification payload. + */ toObject() { const payload = Object.assign({}, this.payload); const { aps } = payload; @@ -262,6 +291,8 @@ class APNSNotificationPayload extends BaseNotificationPayload { /** * Create PubNub push notification service APNS2 configuration information object. * + * @internal + * * @param configuration - Source user-provided APNS2 configuration. * * @returns Preformatted for PubNub service APNS2 configuration information. @@ -284,6 +315,8 @@ class APNSNotificationPayload extends BaseNotificationPayload { /** * Create PubNub push notification service APNS2 target information object. * + * @internal + * * @param target - Source user-provided data. * * @returns Preformatted for PubNub service APNS2 target information. @@ -300,7 +333,7 @@ class APNSNotificationPayload extends BaseNotificationPayload { } exports.APNSNotificationPayload = APNSNotificationPayload; /** - * Message payload for Firebase Clouse Messaging service. + * Message payload for Firebase Cloud Messaging service. */ class FCMNotificationPayload extends BaseNotificationPayload { get payload() { @@ -398,9 +431,19 @@ class FCMNotificationPayload extends BaseNotificationPayload { this.payload.notification.icon = value; this._icon = value; } + /** + * Retrieve notifications grouping tag. + * + * @returns Notifications grouping tag. + */ get tag() { return this._tag; } + /** + * Update notifications grouping tag. + * + * @param value - String which will be used to group similar notifications in notification center. + */ set tag(value) { if (!value || !value.length) return; @@ -417,10 +460,22 @@ class FCMNotificationPayload extends BaseNotificationPayload { set silent(value) { this._isSilent = value; } + /** + * Setup push notification payload default content. + * + * @internal + */ setDefaultPayloadStructure() { this.payload.notification = {}; this.payload.data = {}; } + /** + * Translate data object into PubNub push notification payload object. + * + * @internal + * + * @returns Preformatted push notification payload. + */ toObject() { let data = Object.assign({}, this.payload.data); let notification = null; @@ -443,6 +498,14 @@ class FCMNotificationPayload extends BaseNotificationPayload { } exports.FCMNotificationPayload = FCMNotificationPayload; class NotificationsPayload { + /** + * Create push notification payload holder. + * + * @internal + * + * @param title - String which will be shown at the top of the notification (below app name). + * @param body - String with message which should be shown when user will check notification. + */ constructor(title, body) { this._payload = { apns: {}, fcm: {} }; this._title = title; @@ -450,6 +513,12 @@ class NotificationsPayload { this.apns = new APNSNotificationPayload(this._payload.apns, title, body); this.fcm = new FCMNotificationPayload(this._payload.fcm, title, body); } + /** + * Enable or disable push notification debugging message. + * + * @param value - Whether debug message from push notification scheduler should be published to the specific + * channel or not. + */ set debugging(value) { this._debugging = value; } @@ -527,7 +596,7 @@ class NotificationsPayload { * Build notifications platform for requested platforms. * * @param platforms - List of platforms for which payload should be added to final dictionary. Supported values: - * gcm, apns, and apns2. + * fcm, apns, and apns2. * * @returns Object with data, which can be sent with publish method call and trigger remote notifications for * specified platforms. diff --git a/lib/core/components/reconnection_manager.js b/lib/core/components/reconnection_manager.js index 731bd261e..5804ef9c4 100644 --- a/lib/core/components/reconnection_manager.js +++ b/lib/core/components/reconnection_manager.js @@ -3,6 +3,8 @@ * Subscription reconnection-manager. * * **Note:** Reconnection manger rely on legacy time-based availability check. + * + * @internal */ Object.defineProperty(exports, "__esModule", { value: true }); exports.ReconnectionManager = void 0; diff --git a/lib/core/components/request.js b/lib/core/components/request.js index 0a2e3af5a..e62ba202c 100644 --- a/lib/core/components/request.js +++ b/lib/core/components/request.js @@ -1,4 +1,9 @@ "use strict"; +/** + * Network request module. + * + * @internal + */ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } return new (P || (P = Promise))(function (resolve, reject) { diff --git a/lib/core/components/stringify_buffer_keys.js b/lib/core/components/stringify_buffer_keys.js index c9c405834..4aa394b29 100644 --- a/lib/core/components/stringify_buffer_keys.js +++ b/lib/core/components/stringify_buffer_keys.js @@ -1,6 +1,11 @@ "use strict"; +/** + * CBOR support module. + * + * @internal + */ Object.defineProperty(exports, "__esModule", { value: true }); -exports.stringifyBufferKeys = void 0; +exports.stringifyBufferKeys = stringifyBufferKeys; /** * Re-map CBOR object keys from potentially C buffer strings to actual strings. * @@ -34,4 +39,3 @@ function stringifyBufferKeys(obj) { }); return normalizedObject; } -exports.stringifyBufferKeys = stringifyBufferKeys; diff --git a/lib/core/components/subject.js b/lib/core/components/subject.js index e483d4954..950880fcb 100644 --- a/lib/core/components/subject.js +++ b/lib/core/components/subject.js @@ -1,4 +1,9 @@ "use strict"; +/** + * Event Engine terminate signal listener module. + * + * @internal + */ Object.defineProperty(exports, "__esModule", { value: true }); exports.Subject = void 0; /** diff --git a/lib/core/components/subscription-manager.js b/lib/core/components/subscription-manager.js index 1f5139485..e653bebae 100644 --- a/lib/core/components/subscription-manager.js +++ b/lib/core/components/subscription-manager.js @@ -1,6 +1,8 @@ "use strict"; /** * Subscription manager module. + * + * @internal */ var __rest = (this && this.__rest) || function (s, e) { var t = {}; @@ -20,8 +22,8 @@ Object.defineProperty(exports, "__esModule", { value: true }); exports.SubscriptionManager = void 0; const reconnection_manager_1 = require("./reconnection_manager"); const categories_1 = __importDefault(require("../constants/categories")); +const deduping_manager_1 = require("./deduping_manager"); const categories_2 = __importDefault(require("../constants/categories")); -const deduping_manager_1 = __importDefault(require("./deduping_manager")); /** * Subscription loop manager. * @@ -36,7 +38,7 @@ class SubscriptionManager { this.heartbeatCall = heartbeatCall; this.leaveCall = leaveCall; this.reconnectionManager = new reconnection_manager_1.ReconnectionManager(time); - this.dedupingManager = new deduping_manager_1.default({ config: this.configuration }); + this.dedupingManager = new deduping_manager_1.DedupingManager(this.configuration); this.heartbeatChannelGroups = {}; this.heartbeatChannels = {}; this.presenceChannelGroups = {}; @@ -290,7 +292,7 @@ class SubscriptionManager { } try { messages.forEach((message) => { - if (dedupeOnSubscribe) { + if (dedupeOnSubscribe && 'message' in message.data && 'timetoken' in message.data) { if (this.dedupingManager.isDuplicate(message.data)) return; this.dedupingManager.addEntry(message.data); diff --git a/lib/core/components/token_manager.js b/lib/core/components/token_manager.js index 422a7dd8c..91bac221a 100644 --- a/lib/core/components/token_manager.js +++ b/lib/core/components/token_manager.js @@ -1,6 +1,8 @@ "use strict"; /** * PubNub Access Token Manager module. + * + * @internal */ Object.defineProperty(exports, "__esModule", { value: true }); exports.TokenManager = void 0; diff --git a/lib/core/components/uuid.js b/lib/core/components/uuid.js index 4d1255653..3276fc346 100644 --- a/lib/core/components/uuid.js +++ b/lib/core/components/uuid.js @@ -1,9 +1,15 @@ "use strict"; +/** + * Random identifier generator helper module. + * + * @internal + */ var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); const lil_uuid_1 = __importDefault(require("lil-uuid")); +/** @internal */ exports.default = { createUUID() { if (lil_uuid_1.default.uuid) { diff --git a/lib/core/constants/operations.js b/lib/core/constants/operations.js index dc348150f..120c312a9 100644 --- a/lib/core/constants/operations.js +++ b/lib/core/constants/operations.js @@ -1,6 +1,8 @@ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -/* */ +/** + * Endpoint API operation types. + */ var RequestOperation; (function (RequestOperation) { // -------------------------------------------------------- @@ -235,7 +237,17 @@ var RequestOperation; // -------------------------------------------------------- // ---------------- Subscription Utility ------------------ // -------------------------------------------------------- + /** + * Initial event engine subscription handshake operation. + * + * @internal + */ RequestOperation["PNHandshakeOperation"] = "PNHandshakeOperation"; + /** + * Event engine subscription loop operation. + * + * @internal + */ RequestOperation["PNReceiveMessagesOperation"] = "PNReceiveMessagesOperation"; })(RequestOperation || (RequestOperation = {})); exports.default = RequestOperation; diff --git a/lib/core/endpoints/access_manager/audit.js b/lib/core/endpoints/access_manager/audit.js index a405e8010..e3a78d4bb 100644 --- a/lib/core/endpoints/access_manager/audit.js +++ b/lib/core/endpoints/access_manager/audit.js @@ -1,6 +1,8 @@ "use strict"; /** * PAM Audit REST API module. + * + * @internal */ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } diff --git a/lib/core/endpoints/access_manager/grant.js b/lib/core/endpoints/access_manager/grant.js index 9ed997fae..d1b0735f8 100644 --- a/lib/core/endpoints/access_manager/grant.js +++ b/lib/core/endpoints/access_manager/grant.js @@ -1,6 +1,8 @@ "use strict"; /** * PAM Grant REST API module. + * + * @internal */ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } diff --git a/lib/core/endpoints/access_manager/grant_token.js b/lib/core/endpoints/access_manager/grant_token.js index 8ed978a6d..5440ccc4e 100644 --- a/lib/core/endpoints/access_manager/grant_token.js +++ b/lib/core/endpoints/access_manager/grant_token.js @@ -1,6 +1,8 @@ "use strict"; /** * PAM Grant Token REST API module. + * + * @internal */ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } diff --git a/lib/core/endpoints/access_manager/revoke_token.js b/lib/core/endpoints/access_manager/revoke_token.js index 03b9e4111..270365fda 100644 --- a/lib/core/endpoints/access_manager/revoke_token.js +++ b/lib/core/endpoints/access_manager/revoke_token.js @@ -1,6 +1,8 @@ "use strict"; /** * PAM Revoke Token REST API module. + * + * @internal */ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } diff --git a/lib/core/endpoints/actions/add_message_action.js b/lib/core/endpoints/actions/add_message_action.js index 6003a9d7f..e9b368f9b 100644 --- a/lib/core/endpoints/actions/add_message_action.js +++ b/lib/core/endpoints/actions/add_message_action.js @@ -1,6 +1,8 @@ "use strict"; /** * Add Message Action REST API module. + * + * @internal */ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } diff --git a/lib/core/endpoints/actions/get_message_actions.js b/lib/core/endpoints/actions/get_message_actions.js index caad2356c..e4f0eb11e 100644 --- a/lib/core/endpoints/actions/get_message_actions.js +++ b/lib/core/endpoints/actions/get_message_actions.js @@ -1,6 +1,8 @@ "use strict"; /** * Get Message Actions REST API module. + * + * @internal */ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } diff --git a/lib/core/endpoints/actions/remove_message_action.js b/lib/core/endpoints/actions/remove_message_action.js index 9d3c94661..648d06159 100644 --- a/lib/core/endpoints/actions/remove_message_action.js +++ b/lib/core/endpoints/actions/remove_message_action.js @@ -1,6 +1,8 @@ "use strict"; /** * Remove Message Action REST API module. + * + * @internal */ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } diff --git a/lib/core/endpoints/channel_groups/add_channels.js b/lib/core/endpoints/channel_groups/add_channels.js index 32eedf351..23468abe8 100644 --- a/lib/core/endpoints/channel_groups/add_channels.js +++ b/lib/core/endpoints/channel_groups/add_channels.js @@ -1,6 +1,8 @@ "use strict"; /** * Add channel group channels REST API module. + * + * @internal */ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } diff --git a/lib/core/endpoints/channel_groups/delete_group.js b/lib/core/endpoints/channel_groups/delete_group.js index 618024148..adbb517f5 100644 --- a/lib/core/endpoints/channel_groups/delete_group.js +++ b/lib/core/endpoints/channel_groups/delete_group.js @@ -1,6 +1,8 @@ "use strict"; /** * Delete channel group REST API module. + * + * @internal */ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } diff --git a/lib/core/endpoints/channel_groups/list_channels.js b/lib/core/endpoints/channel_groups/list_channels.js index 83101c9e9..1b0450c9e 100644 --- a/lib/core/endpoints/channel_groups/list_channels.js +++ b/lib/core/endpoints/channel_groups/list_channels.js @@ -1,6 +1,8 @@ "use strict"; /** * List channel group channels REST API module. + * + * @internal */ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } diff --git a/lib/core/endpoints/channel_groups/list_groups.js b/lib/core/endpoints/channel_groups/list_groups.js index 06deb4a01..405a9a9aa 100644 --- a/lib/core/endpoints/channel_groups/list_groups.js +++ b/lib/core/endpoints/channel_groups/list_groups.js @@ -1,6 +1,8 @@ "use strict"; /** * List All Channel Groups REST API module. + * + * @internal */ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } diff --git a/lib/core/endpoints/channel_groups/remove_channels.js b/lib/core/endpoints/channel_groups/remove_channels.js index 2afed498b..b4472116b 100644 --- a/lib/core/endpoints/channel_groups/remove_channels.js +++ b/lib/core/endpoints/channel_groups/remove_channels.js @@ -1,6 +1,8 @@ "use strict"; /** * Remove channel group channels REST API module. + * + * @internal */ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } diff --git a/lib/core/endpoints/fetch_messages.js b/lib/core/endpoints/fetch_messages.js index dd94e6824..be7dc5327 100644 --- a/lib/core/endpoints/fetch_messages.js +++ b/lib/core/endpoints/fetch_messages.js @@ -1,6 +1,8 @@ "use strict"; /** * Fetch messages REST API module. + * + * @internal */ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; diff --git a/lib/core/endpoints/file_upload/delete_file.js b/lib/core/endpoints/file_upload/delete_file.js index 0721e6f0a..f916e6653 100644 --- a/lib/core/endpoints/file_upload/delete_file.js +++ b/lib/core/endpoints/file_upload/delete_file.js @@ -1,6 +1,8 @@ "use strict"; /** * Delete file REST API module. + * + * @internal */ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } diff --git a/lib/core/endpoints/file_upload/download_file.js b/lib/core/endpoints/file_upload/download_file.js index fb99ccc31..b1af54866 100644 --- a/lib/core/endpoints/file_upload/download_file.js +++ b/lib/core/endpoints/file_upload/download_file.js @@ -1,6 +1,8 @@ "use strict"; /** * Download File REST API module. + * + * @internal */ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } diff --git a/lib/core/endpoints/file_upload/generate_upload_url.js b/lib/core/endpoints/file_upload/generate_upload_url.js index 3a1756610..5c621f062 100644 --- a/lib/core/endpoints/file_upload/generate_upload_url.js +++ b/lib/core/endpoints/file_upload/generate_upload_url.js @@ -1,6 +1,8 @@ "use strict"; /** * Generate file upload URL REST API request. + * + * @internal */ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } diff --git a/lib/core/endpoints/file_upload/get_file_url.js b/lib/core/endpoints/file_upload/get_file_url.js index 5a17b3ab1..dd5a9646b 100644 --- a/lib/core/endpoints/file_upload/get_file_url.js +++ b/lib/core/endpoints/file_upload/get_file_url.js @@ -1,6 +1,8 @@ "use strict"; /** * File sharing REST API module. + * + * @internal */ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } diff --git a/lib/core/endpoints/file_upload/list_files.js b/lib/core/endpoints/file_upload/list_files.js index 513fe6525..614de6471 100644 --- a/lib/core/endpoints/file_upload/list_files.js +++ b/lib/core/endpoints/file_upload/list_files.js @@ -1,6 +1,8 @@ "use strict"; /** * List Files REST API module. + * + * @internal */ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } diff --git a/lib/core/endpoints/file_upload/publish_file.js b/lib/core/endpoints/file_upload/publish_file.js index 20c6d4c63..81e3e07fe 100644 --- a/lib/core/endpoints/file_upload/publish_file.js +++ b/lib/core/endpoints/file_upload/publish_file.js @@ -1,6 +1,8 @@ "use strict"; /** * Publish File Message REST API module. + * + * @internal */ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } diff --git a/lib/core/endpoints/file_upload/send_file.js b/lib/core/endpoints/file_upload/send_file.js index 5041464d5..2f4512ea6 100644 --- a/lib/core/endpoints/file_upload/send_file.js +++ b/lib/core/endpoints/file_upload/send_file.js @@ -1,4 +1,9 @@ "use strict"; +/** + * Share File API module. + * + * @internal + */ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } return new (P || (P = Promise))(function (resolve, reject) { diff --git a/lib/core/endpoints/file_upload/upload-file.js b/lib/core/endpoints/file_upload/upload-file.js index 15546c973..ec8604e23 100644 --- a/lib/core/endpoints/file_upload/upload-file.js +++ b/lib/core/endpoints/file_upload/upload-file.js @@ -1,6 +1,8 @@ "use strict"; /** * Upload file REST API request. + * + * @internal */ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } diff --git a/lib/core/endpoints/history/delete_messages.js b/lib/core/endpoints/history/delete_messages.js index 3c4814a80..2ded57b82 100644 --- a/lib/core/endpoints/history/delete_messages.js +++ b/lib/core/endpoints/history/delete_messages.js @@ -1,6 +1,8 @@ "use strict"; /** * Delete messages REST API module. + * + * @internal */ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } diff --git a/lib/core/endpoints/history/get_history.js b/lib/core/endpoints/history/get_history.js index ff6c28dd7..7a8ac874e 100644 --- a/lib/core/endpoints/history/get_history.js +++ b/lib/core/endpoints/history/get_history.js @@ -1,6 +1,8 @@ "use strict"; /** * Get history REST API module. + * + * @internal */ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } diff --git a/lib/core/endpoints/history/message_counts.js b/lib/core/endpoints/history/message_counts.js index d8641eede..07f236743 100644 --- a/lib/core/endpoints/history/message_counts.js +++ b/lib/core/endpoints/history/message_counts.js @@ -1,6 +1,8 @@ "use strict"; /** * Messages count REST API module. + * + * @internal */ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } diff --git a/lib/core/endpoints/objects/channel/get.js b/lib/core/endpoints/objects/channel/get.js index aa5b1830d..56caa61d1 100644 --- a/lib/core/endpoints/objects/channel/get.js +++ b/lib/core/endpoints/objects/channel/get.js @@ -1,6 +1,8 @@ "use strict"; /** * Get Channel Metadata REST API module. + * + * @internal */ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } diff --git a/lib/core/endpoints/objects/channel/get_all.js b/lib/core/endpoints/objects/channel/get_all.js index 133f31b88..d5decf2d9 100644 --- a/lib/core/endpoints/objects/channel/get_all.js +++ b/lib/core/endpoints/objects/channel/get_all.js @@ -1,6 +1,8 @@ "use strict"; /** * Get All Channel Metadata REST API module. + * + * @internal */ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } diff --git a/lib/core/endpoints/objects/channel/remove.js b/lib/core/endpoints/objects/channel/remove.js index 2b0db8890..3b5a3cdb3 100644 --- a/lib/core/endpoints/objects/channel/remove.js +++ b/lib/core/endpoints/objects/channel/remove.js @@ -1,6 +1,8 @@ "use strict"; /** * Remove Channel Metadata REST API module. + * + * @internal */ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } diff --git a/lib/core/endpoints/objects/channel/set.js b/lib/core/endpoints/objects/channel/set.js index b127ac4c1..676fffbb8 100644 --- a/lib/core/endpoints/objects/channel/set.js +++ b/lib/core/endpoints/objects/channel/set.js @@ -1,6 +1,8 @@ "use strict"; /** * Set Channel Metadata REST API module. + * + * @internal */ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } diff --git a/lib/core/endpoints/objects/member/get.js b/lib/core/endpoints/objects/member/get.js index b4bb3721d..b0c5c11e9 100644 --- a/lib/core/endpoints/objects/member/get.js +++ b/lib/core/endpoints/objects/member/get.js @@ -1,6 +1,8 @@ "use strict"; /** * Get Channel Members REST API module. + * + * @internal */ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } diff --git a/lib/core/endpoints/objects/member/set.js b/lib/core/endpoints/objects/member/set.js index d70f0c4d1..3578095c4 100644 --- a/lib/core/endpoints/objects/member/set.js +++ b/lib/core/endpoints/objects/member/set.js @@ -1,6 +1,8 @@ "use strict"; /** * Set Channel Members REST API module. + * + * @internal */ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } diff --git a/lib/core/endpoints/objects/membership/get.js b/lib/core/endpoints/objects/membership/get.js index 9173f4f39..76d1831e3 100644 --- a/lib/core/endpoints/objects/membership/get.js +++ b/lib/core/endpoints/objects/membership/get.js @@ -1,6 +1,8 @@ "use strict"; /** * Get UUID Memberships REST API module. + * + * @internal */ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } diff --git a/lib/core/endpoints/objects/membership/set.js b/lib/core/endpoints/objects/membership/set.js index 932cd8315..86643485e 100644 --- a/lib/core/endpoints/objects/membership/set.js +++ b/lib/core/endpoints/objects/membership/set.js @@ -1,6 +1,8 @@ "use strict"; /** * Set UUID Memberships REST API module. + * + * @internal */ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } diff --git a/lib/core/endpoints/objects/uuid/get.js b/lib/core/endpoints/objects/uuid/get.js index b0f5135c8..2f9705040 100644 --- a/lib/core/endpoints/objects/uuid/get.js +++ b/lib/core/endpoints/objects/uuid/get.js @@ -1,6 +1,8 @@ "use strict"; /** * Get UUID Metadata REST API module. + * + * @internal */ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } diff --git a/lib/core/endpoints/objects/uuid/get_all.js b/lib/core/endpoints/objects/uuid/get_all.js index 957225820..e95a18b9a 100644 --- a/lib/core/endpoints/objects/uuid/get_all.js +++ b/lib/core/endpoints/objects/uuid/get_all.js @@ -1,6 +1,8 @@ "use strict"; /** * Get All UUID Metadata REST API module. + * + * @internal */ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } diff --git a/lib/core/endpoints/objects/uuid/remove.js b/lib/core/endpoints/objects/uuid/remove.js index 09025de72..c97245691 100644 --- a/lib/core/endpoints/objects/uuid/remove.js +++ b/lib/core/endpoints/objects/uuid/remove.js @@ -1,6 +1,8 @@ "use strict"; /** * Remove UUID Metadata REST API module. + * + * @internal */ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } diff --git a/lib/core/endpoints/objects/uuid/set.js b/lib/core/endpoints/objects/uuid/set.js index cdc3252e0..01af971eb 100644 --- a/lib/core/endpoints/objects/uuid/set.js +++ b/lib/core/endpoints/objects/uuid/set.js @@ -1,6 +1,8 @@ "use strict"; /** * Set UUID Metadata REST API module. + * + * @internal */ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } diff --git a/lib/core/endpoints/presence/get_state.js b/lib/core/endpoints/presence/get_state.js index 76f447c62..ee37ee086 100644 --- a/lib/core/endpoints/presence/get_state.js +++ b/lib/core/endpoints/presence/get_state.js @@ -1,6 +1,8 @@ "use strict"; /** * Get Presence State REST API module. + * + * @internal */ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } diff --git a/lib/core/endpoints/presence/heartbeat.js b/lib/core/endpoints/presence/heartbeat.js index d5925a85c..51bd2497c 100644 --- a/lib/core/endpoints/presence/heartbeat.js +++ b/lib/core/endpoints/presence/heartbeat.js @@ -1,6 +1,8 @@ "use strict"; /** * Announce heartbeat REST API module. + * + * @internal */ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } diff --git a/lib/core/endpoints/presence/here_now.js b/lib/core/endpoints/presence/here_now.js index fd8319701..26db534af 100644 --- a/lib/core/endpoints/presence/here_now.js +++ b/lib/core/endpoints/presence/here_now.js @@ -1,6 +1,8 @@ "use strict"; /** * Channels / channel groups presence REST API module. + * + * @internal */ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } diff --git a/lib/core/endpoints/presence/leave.js b/lib/core/endpoints/presence/leave.js index fd06272b6..7ed6e2f62 100644 --- a/lib/core/endpoints/presence/leave.js +++ b/lib/core/endpoints/presence/leave.js @@ -1,6 +1,8 @@ "use strict"; /** * Announce leave REST API module. + * + * @internal */ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } diff --git a/lib/core/endpoints/presence/set_state.js b/lib/core/endpoints/presence/set_state.js index faba64205..eb7648474 100644 --- a/lib/core/endpoints/presence/set_state.js +++ b/lib/core/endpoints/presence/set_state.js @@ -1,6 +1,8 @@ "use strict"; /** * Set Presence State REST API module. + * + * @internal */ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } diff --git a/lib/core/endpoints/presence/where_now.js b/lib/core/endpoints/presence/where_now.js index daa44632f..f2f5a7724 100644 --- a/lib/core/endpoints/presence/where_now.js +++ b/lib/core/endpoints/presence/where_now.js @@ -1,6 +1,8 @@ "use strict"; /** * `uuid` presence REST API module. + * + * @internal */ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } diff --git a/lib/core/endpoints/push/add_push_channels.js b/lib/core/endpoints/push/add_push_channels.js index 9cc2257b0..8396d1d91 100644 --- a/lib/core/endpoints/push/add_push_channels.js +++ b/lib/core/endpoints/push/add_push_channels.js @@ -1,6 +1,8 @@ "use strict"; /** * Register Channels with Device push REST API module. + * + * @internal */ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } diff --git a/lib/core/endpoints/push/list_push_channels.js b/lib/core/endpoints/push/list_push_channels.js index 0f55b55c2..1f62c8ff4 100644 --- a/lib/core/endpoints/push/list_push_channels.js +++ b/lib/core/endpoints/push/list_push_channels.js @@ -1,6 +1,8 @@ "use strict"; /** * List Device push enabled channels REST API module. + * + * @internal */ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } diff --git a/lib/core/endpoints/push/push.js b/lib/core/endpoints/push/push.js index 5bd84beff..5d12c31c5 100644 --- a/lib/core/endpoints/push/push.js +++ b/lib/core/endpoints/push/push.js @@ -1,6 +1,8 @@ "use strict"; /** * Manage channels enabled for device push REST API module. + * + * @internal */ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } diff --git a/lib/core/endpoints/push/remove_device.js b/lib/core/endpoints/push/remove_device.js index d3857c1fa..563e091d6 100644 --- a/lib/core/endpoints/push/remove_device.js +++ b/lib/core/endpoints/push/remove_device.js @@ -1,6 +1,8 @@ "use strict"; /** * Unregister Device push REST API module. + * + * @internal */ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } diff --git a/lib/core/endpoints/push/remove_push_channels.js b/lib/core/endpoints/push/remove_push_channels.js index 7243bd2bd..8d7455b4a 100644 --- a/lib/core/endpoints/push/remove_push_channels.js +++ b/lib/core/endpoints/push/remove_push_channels.js @@ -1,6 +1,8 @@ "use strict"; /** * Unregister Channels from Device push REST API module. + * + * @internal */ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } diff --git a/lib/core/endpoints/subscribe.js b/lib/core/endpoints/subscribe.js index 1563ff9a8..bb2d2e4c7 100644 --- a/lib/core/endpoints/subscribe.js +++ b/lib/core/endpoints/subscribe.js @@ -35,8 +35,6 @@ const WITH_PRESENCE = false; // region Types /** * PubNub-defined event types by payload. - * - * @internal */ var PubNubEventType; (function (PubNubEventType) { diff --git a/lib/core/endpoints/subscriptionUtils/handshake.js b/lib/core/endpoints/subscriptionUtils/handshake.js index fc13544b4..82898ad08 100644 --- a/lib/core/endpoints/subscriptionUtils/handshake.js +++ b/lib/core/endpoints/subscriptionUtils/handshake.js @@ -1,6 +1,8 @@ "use strict"; /** * Handshake subscribe REST API module. + * + * @internal */ var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; diff --git a/lib/core/endpoints/subscriptionUtils/receiveMessages.js b/lib/core/endpoints/subscriptionUtils/receiveMessages.js index f597d82fd..6c87e9aa8 100644 --- a/lib/core/endpoints/subscriptionUtils/receiveMessages.js +++ b/lib/core/endpoints/subscriptionUtils/receiveMessages.js @@ -1,6 +1,8 @@ "use strict"; /** * Receive messages subscribe REST API module. + * + * @internal */ var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; diff --git a/lib/core/interfaces/configuration.js b/lib/core/interfaces/configuration.js index cc1b1d96d..c11ca0d07 100644 --- a/lib/core/interfaces/configuration.js +++ b/lib/core/interfaces/configuration.js @@ -138,7 +138,7 @@ const setDefaults = (configuration) => { let announceFailedHeartbeats = ANNOUNCE_HEARTBEAT_FAILURE; let fileUploadPublishRetryLimit = FILE_PUBLISH_RETRY_LIMIT; let dedupeOnSubscribe = DEDUPE_ON_SUBSCRIBE; - const maximumCacheSize = DEDUPE_CACHE_SIZE; + let maximumCacheSize = DEDUPE_CACHE_SIZE; let useRequestId = USE_REQUEST_ID; // @ts-expect-error Not documented legacy configuration options. if (configurationCopy.dedupeOnSubscribe !== undefined && typeof configurationCopy.dedupeOnSubscribe === 'boolean') { @@ -146,6 +146,11 @@ const setDefaults = (configuration) => { dedupeOnSubscribe = configurationCopy.dedupeOnSubscribe; } // @ts-expect-error Not documented legacy configuration options. + if (configurationCopy.maximumCacheSize !== undefined && typeof configurationCopy.maximumCacheSize === 'number') { + // @ts-expect-error Not documented legacy configuration options. + maximumCacheSize = configurationCopy.maximumCacheSize; + } + // @ts-expect-error Not documented legacy configuration options. if (configurationCopy.useRequestId !== undefined && typeof configurationCopy.useRequestId === 'boolean') { // @ts-expect-error Not documented legacy configuration options. useRequestId = configurationCopy.useRequestId; diff --git a/lib/core/interfaces/crypto-module.js b/lib/core/interfaces/crypto-module.js index d5efe74f4..934f0a868 100644 --- a/lib/core/interfaces/crypto-module.js +++ b/lib/core/interfaces/crypto-module.js @@ -48,6 +48,8 @@ class AbstractCryptoModule { // region Helpers /** * Retrieve list of module's cryptors. + * + * @internal */ getAllCryptors() { return [this.defaultCryptor, ...this.cryptors]; @@ -56,9 +58,13 @@ class AbstractCryptoModule { exports.AbstractCryptoModule = AbstractCryptoModule; /** * `String` to {@link ArrayBuffer} response decoder. + * + * @internal */ AbstractCryptoModule.encoder = new TextEncoder(); /** * {@link ArrayBuffer} to {@link string} decoder. + * + * @internal */ AbstractCryptoModule.decoder = new TextDecoder(); diff --git a/lib/core/pubnub-channel-groups.js b/lib/core/pubnub-channel-groups.js index 6a15691a5..61e882a89 100644 --- a/lib/core/pubnub-channel-groups.js +++ b/lib/core/pubnub-channel-groups.js @@ -17,12 +17,23 @@ const add_channels_1 = require("./endpoints/channel_groups/add_channels"); const list_channels_1 = require("./endpoints/channel_groups/list_channels"); const delete_group_1 = require("./endpoints/channel_groups/delete_group"); const list_groups_1 = require("./endpoints/channel_groups/list_groups"); -class PubnubChannelGroups { +/** + * PubNub Stream / Channel group API interface. + */ +class PubNubChannelGroups { + /** + * Create stream / channel group API access object. + * + * @param keySet - PubNub account keys set which should be used for REST API calls. + * @param sendRequest - Function which should be used to send REST API calls. + * + * @internal + */ constructor(keySet, /* eslint-disable @typescript-eslint/no-explicit-any */ sendRequest) { - this.keySet = keySet; this.sendRequest = sendRequest; + this.keySet = keySet; } /** * Fetch channel group channels. @@ -109,4 +120,4 @@ class PubnubChannelGroups { }); } } -exports.default = PubnubChannelGroups; +exports.default = PubNubChannelGroups; diff --git a/lib/core/pubnub-common.js b/lib/core/pubnub-common.js index 4bf9662d1..988a5a186 100644 --- a/lib/core/pubnub-common.js +++ b/lib/core/pubnub-common.js @@ -1,4 +1,7 @@ "use strict"; +/** + * Core PubNub API module. + */ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); @@ -143,6 +146,14 @@ class PubNubCore { return uuid_1.default.createUUID(); } // endregion + /** + * Create and configure PubNub client core. + * + * @param configuration - PubNub client core configuration. + * @returns Configured and ready to use PubNub client. + * + * @internal + */ constructor(configuration) { this._configuration = configuration.configuration; this.cryptography = configuration.cryptography; @@ -517,6 +528,8 @@ class PubNubCore { /** * Schedule request execution. * + * @internal + * * @param request - REST API request. * @param [callback] - Request completion handler callback. * @@ -762,6 +775,8 @@ class PubNubCore { * * **Note:** Method passed into managers to let them use it when required. * + * @internal + * * @param parameters - Request configuration parameters. * @param callback - Request completion handler callback. */ @@ -810,6 +825,8 @@ class PubNubCore { * * **Note:** Method passed into managers to let them use it when required. * + * @internal + * * @param parameters - Request configuration parameters. * @param callback - Request completion handler callback. */ @@ -865,6 +882,8 @@ class PubNubCore { /** * Event engine handshake subscribe. * + * @internal + * * @param parameters - Request configuration parameters. */ subscribeHandshake(parameters) { @@ -893,6 +912,8 @@ class PubNubCore { /** * Event engine receive messages subscribe. * + * @internal + * * @param parameters - Request configuration parameters. */ subscribeReceiveMessages(parameters) { @@ -1189,6 +1210,8 @@ class PubNubCore { /** * Announce user presence * + * @internal + * * @param parameters - Desired presence state for provided list of channels and groups. * @param callback - Request completion handler callback. */ @@ -1209,6 +1232,8 @@ class PubNubCore { /** * Announce user `join` on specified list of channels and groups. * + * @internal + * * @param parameters - List of channels and groups where `join` event should be sent. */ join(parameters) { @@ -1223,6 +1248,8 @@ class PubNubCore { /** * Announce user `leave` on specified list of channels and groups. * + * @internal + * * @param parameters - List of channels and groups where `leave` event should be sent. */ leave(parameters) { @@ -1234,6 +1261,8 @@ class PubNubCore { } /** * Announce user `leave` on all subscribed channels. + * + * @internal */ leaveAll() { var _a; @@ -1641,8 +1670,7 @@ class PubNubCore { * @returns Asynchronous memberships modification response or `void` in case if `callback` provided. * * @deprecated Use {@link PubNubCore#objects.removeMemberships} or {@link PubNubCore#objects.removeChannelMembers} - * methods instead - * from `objects` API group.. + * methods instead from `objects` API group. */ removeMemberships(parameters, callback) { return __awaiter(this, void 0, void 0, function* () { diff --git a/lib/core/pubnub-objects.js b/lib/core/pubnub-objects.js index 9948ee382..e269be75a 100644 --- a/lib/core/pubnub-objects.js +++ b/lib/core/pubnub-objects.js @@ -24,13 +24,24 @@ const get_3 = require("./endpoints/objects/member/get"); const set_3 = require("./endpoints/objects/member/set"); const get_4 = require("./endpoints/objects/uuid/get"); const set_4 = require("./endpoints/objects/uuid/set"); +/** + * PubNub App Context API interface. + */ class PubNubObjects { + /** + * Create app context API access object. + * + * @param configuration - Extended PubNub client configuration object. + * @param sendRequest - Function which should be used to send REST API calls. + * + * @internal + */ constructor(configuration, /* eslint-disable @typescript-eslint/no-explicit-any */ sendRequest) { + this.keySet = configuration.keySet; this.configuration = configuration; this.sendRequest = sendRequest; - this.keySet = configuration.keySet; } /** * Fetch a paginated list of UUID Metadata objects. @@ -48,11 +59,12 @@ class PubNubObjects { /** * Fetch a paginated list of UUID Metadata objects. * - * * @param [parametersOrCallback] - Request configuration parameters or callback from overload. * @param [callback] - Request completion handler callback. * * @returns Asynchronous get all UUID metadata response or `void` in case if `callback` provided. + * + * @internal */ _getAllUUIDMetadata(parametersOrCallback, callback) { return __awaiter(this, void 0, void 0, function* () { @@ -85,6 +97,8 @@ class PubNubObjects { * @param [callback] - Request completion handler callback. * * @returns Asynchronous get UUID metadata response or `void` in case if `callback` provided. + * + * @internal */ _getUUIDMetadata(parametersOrCallback, callback) { return __awaiter(this, void 0, void 0, function* () { @@ -118,6 +132,8 @@ class PubNubObjects { /** * Update specific UUID Metadata object. * + * @internal + * * @param parameters - Request configuration parameters. Will set UUID metadata for currently * configured PubNub client `uuid` if not set. * @param [callback] - Request completion handler callback. @@ -152,6 +168,8 @@ class PubNubObjects { /** * Remove a specific UUID Metadata object. * + * @internal + * * @param [parametersOrCallback] - Request configuration parameters or callback from overload. * @param [callback] - Request completion handler callback. * @@ -189,6 +207,8 @@ class PubNubObjects { /** * Fetch a paginated list of Channel Metadata objects. * + * @internal + * * @param [parametersOrCallback] - Request configuration parameters or callback from overload. * @param [callback] - Request completion handler callback. * @@ -222,6 +242,8 @@ class PubNubObjects { /** * Fetch Channel Metadata object. * + * @internal + * * @param parameters - Request configuration parameters. * @param [callback] - Request completion handler callback. * @@ -251,6 +273,8 @@ class PubNubObjects { /** * Update specific Channel Metadata object. * + * @internal + * * @param parameters - Request configuration parameters. * @param [callback] - Request completion handler callback. * @@ -281,6 +305,8 @@ class PubNubObjects { /** * Remove a specific Channel Metadata object. * + * @internal + * * @param parameters - Request configuration parameters. * @param [callback] - Request completion handler callback. * @@ -511,7 +537,6 @@ class PubNubObjects { uuids: (_c = (_b = spaceParameters.users) === null || _b === void 0 ? void 0 : _b.map((user) => { if (typeof user === 'string') return user; - user.userId; return { id: user.userId, custom: user.custom }; })) !== null && _c !== void 0 ? _c : spaceParameters.uuids, limit: 0, diff --git a/lib/core/pubnub-push.js b/lib/core/pubnub-push.js index 3fa4911f4..08c2a1b5e 100644 --- a/lib/core/pubnub-push.js +++ b/lib/core/pubnub-push.js @@ -16,12 +16,23 @@ const remove_push_channels_1 = require("./endpoints/push/remove_push_channels"); const list_push_channels_1 = require("./endpoints/push/list_push_channels"); const add_push_channels_1 = require("./endpoints/push/add_push_channels"); const remove_device_1 = require("./endpoints/push/remove_device"); +/** + * PubNub Push Notifications API interface. + */ class PubNubPushNotifications { + /** + * Create mobile push notifications API access object. + * + * @param keySet - PubNub account keys set which should be used for REST API calls. + * @param sendRequest - Function which should be used to send REST API calls. + * + * @internal + */ constructor(keySet, /* eslint-disable @typescript-eslint/no-explicit-any */ sendRequest) { - this.keySet = keySet; this.sendRequest = sendRequest; + this.keySet = keySet; } /** * Fetch device's push notification enabled channels. diff --git a/lib/core/utils.js b/lib/core/utils.js index bb200b5c0..d97cdc34b 100644 --- a/lib/core/utils.js +++ b/lib/core/utils.js @@ -1,4 +1,9 @@ "use strict"; +/** + * PubNub package utilities module. + * + * @internal + */ Object.defineProperty(exports, "__esModule", { value: true }); exports.queryStringFromObject = exports.findUniqueCommonElements = exports.removeSingleOccurrence = exports.encodeNames = exports.encodeString = void 0; /** @@ -9,6 +14,8 @@ exports.queryStringFromObject = exports.findUniqueCommonElements = exports.remov * @param input - Source string or number for encoding. * * @returns Percent-encoded string. + * + * @internal */ const encodeString = (input) => { return encodeURIComponent(input).replace(/[!~*'()]/g, (x) => `%${x.charCodeAt(0).toString(16).toUpperCase()}`); @@ -22,12 +29,17 @@ exports.encodeString = encodeString; * @param [defaultString] - String which should be used in case if {@link names} is empty. * * @returns String which contains encoded names joined by non-encoded `,`. + * + * @internal */ const encodeNames = (names, defaultString) => { const encodedNames = names.map((name) => (0, exports.encodeString)(name)); - return encodedNames.length ? encodedNames.join(',') : defaultString !== null && defaultString !== void 0 ? defaultString : ''; + return encodedNames.length ? encodedNames.join(',') : (defaultString !== null && defaultString !== void 0 ? defaultString : ''); }; exports.encodeNames = encodeNames; +/** + * @internal + */ const removeSingleOccurrence = (source, elementsToRemove) => { const removed = Object.fromEntries(elementsToRemove.map((prop) => [prop, false])); return source.filter((e) => { @@ -39,6 +51,9 @@ const removeSingleOccurrence = (source, elementsToRemove) => { }); }; exports.removeSingleOccurrence = removeSingleOccurrence; +/** + * @internal + */ const findUniqueCommonElements = (a, b) => { return [...a].filter((value) => b.includes(value) && a.indexOf(value) === a.lastIndexOf(value) && b.indexOf(value) === b.lastIndexOf(value)); }; @@ -49,6 +64,8 @@ exports.findUniqueCommonElements = findUniqueCommonElements; * @param query - Key / value pairs of the request query parameters. * * @returns Stringified query key / value pairs. + * + * @internal */ const queryStringFromObject = (query) => { return Object.keys(query) diff --git a/lib/crypto/modules/NodeCryptoModule/aesCbcCryptor.js b/lib/crypto/modules/NodeCryptoModule/aesCbcCryptor.js index b4f71ecd1..65b0093e3 100644 --- a/lib/crypto/modules/NodeCryptoModule/aesCbcCryptor.js +++ b/lib/crypto/modules/NodeCryptoModule/aesCbcCryptor.js @@ -1,6 +1,8 @@ "use strict"; /** * AES-CBC cryptor module. + * + * @internal */ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } @@ -18,6 +20,8 @@ const stream_1 = require("stream"); * AES-CBC cryptor. * * AES-CBC cryptor with enhanced cipher strength. + * + * @internal */ class AesCbcCryptor { constructor({ cipherKey }) { diff --git a/lib/crypto/modules/NodeCryptoModule/legacyCryptor.js b/lib/crypto/modules/NodeCryptoModule/legacyCryptor.js index a175eab75..0f0ac0fce 100644 --- a/lib/crypto/modules/NodeCryptoModule/legacyCryptor.js +++ b/lib/crypto/modules/NodeCryptoModule/legacyCryptor.js @@ -1,6 +1,8 @@ "use strict"; /** * Legacy cryptor module. + * + * @internal */ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } @@ -21,6 +23,8 @@ const pubnub_error_1 = require("../../../errors/pubnub-error"); const node_1 = __importDefault(require("../node")); /** * Legacy cryptor. + * + * @internal */ class LegacyCryptor { constructor(config) { diff --git a/lib/crypto/modules/NodeCryptoModule/nodeCryptoModule.js b/lib/crypto/modules/NodeCryptoModule/nodeCryptoModule.js index 90e155a27..0b12321b5 100644 --- a/lib/crypto/modules/NodeCryptoModule/nodeCryptoModule.js +++ b/lib/crypto/modules/NodeCryptoModule/nodeCryptoModule.js @@ -15,7 +15,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); -exports.CryptoModule = exports.AesCbcCryptor = exports.LegacyCryptor = void 0; +exports.NodeCryptoModule = exports.AesCbcCryptor = exports.LegacyCryptor = void 0; const stream_1 = require("stream"); const buffer_1 = require("buffer"); const crypto_module_1 = require("../../../core/interfaces/crypto-module"); @@ -28,7 +28,7 @@ exports.LegacyCryptor = legacyCryptor_1.default; /** * CryptoModule for Node.js platform. */ -class CryptoModule extends crypto_module_1.AbstractCryptoModule { +class NodeCryptoModule extends crypto_module_1.AbstractCryptoModule { // -------------------------------------------------------- // --------------- Convenience functions ------------------ // ------------------------------------------------------- @@ -70,15 +70,15 @@ class CryptoModule extends crypto_module_1.AbstractCryptoModule { // region Encryption encrypt(data) { // Encrypt data. - const encrypted = data instanceof ArrayBuffer && this.defaultCryptor.identifier === CryptoModule.LEGACY_IDENTIFIER - ? this.defaultCryptor.encrypt(CryptoModule.decoder.decode(data)) + const encrypted = data instanceof ArrayBuffer && this.defaultCryptor.identifier === NodeCryptoModule.LEGACY_IDENTIFIER + ? this.defaultCryptor.encrypt(NodeCryptoModule.decoder.decode(data)) : this.defaultCryptor.encrypt(data); if (!encrypted.metadata) return encrypted.data; const headerData = this.getHeaderData(encrypted); // Write encrypted data payload content. const encryptedData = typeof encrypted.data === 'string' - ? CryptoModule.encoder.encode(encrypted.data).buffer + ? NodeCryptoModule.encoder.encode(encrypted.data).buffer : encrypted.data.buffer.slice(encrypted.data.byteOffset, encrypted.data.byteOffset + encrypted.data.length); return this.concatArrayBuffer(headerData, encryptedData); } @@ -95,7 +95,7 @@ class CryptoModule extends crypto_module_1.AbstractCryptoModule { return File.create({ name: file.name, mimeType: 'application/octet-stream', - data: buffer_1.Buffer.from(typeof encryptedData === 'string' ? CryptoModule.encoder.encode(encryptedData) : encryptedData), + data: buffer_1.Buffer.from(typeof encryptedData === 'string' ? NodeCryptoModule.encoder.encode(encryptedData) : encryptedData), }); } if (file.data instanceof stream_1.Readable) { @@ -151,7 +151,7 @@ class CryptoModule extends crypto_module_1.AbstractCryptoModule { * If It's legacy one then redirect it. * (as long as we support legacy need to check on instance type) */ - if ((cryptor === null || cryptor === void 0 ? void 0 : cryptor.identifier) === CryptoModule.LEGACY_IDENTIFIER) + if ((cryptor === null || cryptor === void 0 ? void 0 : cryptor.identifier) === NodeCryptoModule.LEGACY_IDENTIFIER) return cryptor.decryptFile(file, File); return File.create({ name: file.name, @@ -177,9 +177,11 @@ class CryptoModule extends crypto_module_1.AbstractCryptoModule { * @returns Previously registered {@link ILegacyCryptor|legacy} cryptor. * * @throws Error if legacy cryptor not registered. + * + * @internal */ getLegacyCryptor() { - return this.getCryptorFromId(CryptoModule.LEGACY_IDENTIFIER); + return this.getCryptorFromId(NodeCryptoModule.LEGACY_IDENTIFIER); } /** * Retrieve registered cryptor by its identifier. @@ -189,6 +191,8 @@ class CryptoModule extends crypto_module_1.AbstractCryptoModule { * @returns Registered cryptor with specified identifier. * * @throws Error if cryptor with specified {@link id} can't be found. + * + * @internal */ getCryptorFromId(id) { const cryptor = this.getAllCryptors().find((cryptor) => id === cryptor.identifier); @@ -202,6 +206,8 @@ class CryptoModule extends crypto_module_1.AbstractCryptoModule { * @param header - Header with cryptor-defined data or raw cryptor identifier. * * @returns Cryptor which correspond to provided {@link header}. + * + * @internal */ getCryptor(header) { if (typeof header === 'string') { @@ -220,6 +226,8 @@ class CryptoModule extends crypto_module_1.AbstractCryptoModule { * @param encrypted - Encryption data object as source for header data. * * @returns Binary representation of the cryptor header data. + * + * @internal */ getHeaderData(encrypted) { if (!encrypted.metadata) @@ -239,6 +247,8 @@ class CryptoModule extends crypto_module_1.AbstractCryptoModule { * @param ab2 - Second {@link ArrayBuffer}. * * @returns Merged data as {@link ArrayBuffer}. + * + * @internal */ concatArrayBuffer(ab1, ab2) { const tmp = new Uint8Array(ab1.byteLength + ab2.byteLength); @@ -256,6 +266,8 @@ class CryptoModule extends crypto_module_1.AbstractCryptoModule { * @returns Decrypted data as {@link PubNub} File object. * * @throws Error if file is empty or contains unsupported data type. + * + * @internal */ onStreamReadable(stream, file, File) { return __awaiter(this, void 0, void 0, function* () { @@ -294,6 +306,8 @@ class CryptoModule extends crypto_module_1.AbstractCryptoModule { * @returns Decrypted data as {@link PubNub} File object. * * @throws Error if file is empty or contains unsupported data type. + * + * @internal */ decryptLegacyFileStream(stream, file, File) { return __awaiter(this, void 0, void 0, function* () { @@ -311,13 +325,15 @@ class CryptoModule extends crypto_module_1.AbstractCryptoModule { }); } } -exports.CryptoModule = CryptoModule; +exports.NodeCryptoModule = NodeCryptoModule; /** * {@link LegacyCryptor|Legacy} cryptor identifier. */ -CryptoModule.LEGACY_IDENTIFIER = ''; +NodeCryptoModule.LEGACY_IDENTIFIER = ''; /** * CryptorHeader Utility + * + * @internal */ class CryptorHeader { static from(id, metadata) { @@ -358,7 +374,7 @@ class CryptorHeader { if (encryptedData.byteLength >= 4) { sentinel = encryptedData.slice(0, 4); if (!this.isSentinel(sentinel)) - return CryptoModule.LEGACY_IDENTIFIER; + return NodeCryptoModule.LEGACY_IDENTIFIER; } if (encryptedData.byteLength >= 5) version = encryptedDataView.getInt8(4); @@ -393,6 +409,8 @@ CryptorHeader.MAX_VERSION = 1; CryptorHeader.MIN_HEADER_LENGTH = 10; /** * Cryptor header (v1). + * + * @internal */ class CryptorHeaderV1 { constructor(id, metadataLength) { diff --git a/lib/crypto/modules/node.js b/lib/crypto/modules/node.js index 55c7865c2..ac94318ba 100644 --- a/lib/crypto/modules/node.js +++ b/lib/crypto/modules/node.js @@ -1,6 +1,8 @@ "use strict"; /** * Legacy Node.js cryptography module. + * + * @internal */ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } @@ -17,6 +19,8 @@ const stream_1 = require("stream"); const buffer_1 = require("buffer"); /** * Legacy cryptography implementation for Node.js-based {@link PubNub} client. + * + * @internal */ class NodeCryptography { // -------------------------------------------------------- diff --git a/lib/entities/Channel.js b/lib/entities/Channel.js index 6b7958877..ceef481af 100644 --- a/lib/entities/Channel.js +++ b/lib/entities/Channel.js @@ -2,12 +2,36 @@ Object.defineProperty(exports, "__esModule", { value: true }); exports.Channel = void 0; const Subscription_1 = require("./Subscription"); +/** + * First-class objects which provides access to the channel-specific APIs. + */ class Channel { - constructor(channelName, eventEmitter, pubnub) { + /** + * Create simple channel entity. + * + * @param name - Name of the channel which will be used with subscription loop. + * @param eventEmitter - Event emitter, which will notify listeners about updates received on + * channel's subscription. + * @param pubnub - PubNub instance which will use this entity. + * + * @returns Ready to use channel entity. + * + * @internal + */ + constructor(name, eventEmitter, pubnub) { this.eventEmitter = eventEmitter; this.pubnub = pubnub; - this.name = channelName; + this.name = name; } + /** + * Create channel's subscription object for real-time updates. + * + * Create subscription object which can be used to subscribe to the real-time updates sent to the specific channel. + * + * @param [subscriptionOptions] - Channel's subscription object behavior customization options. + * + * @returns Configured and ready to use channel's subscription object. + */ subscription(subscriptionOptions) { if (process.env.SUBSCRIBE_EVENT_ENGINE_MODULE !== 'disabled') { return new Subscription_1.Subscription({ diff --git a/lib/entities/ChannelGroup.js b/lib/entities/ChannelGroup.js index 1245ca275..dfaa4dad8 100644 --- a/lib/entities/ChannelGroup.js +++ b/lib/entities/ChannelGroup.js @@ -2,12 +2,37 @@ Object.defineProperty(exports, "__esModule", { value: true }); exports.ChannelGroup = void 0; const Subscription_1 = require("./Subscription"); +/** + * First-class objects which provides access to the channel group-specific APIs. + */ class ChannelGroup { - constructor(channelGroup, eventEmitter, pubnub) { + /** + * Create simple channel entity. + * + * @param name - Name of the channel group which will be used with subscription loop. + * @param eventEmitter - Event emitter, which will notify listeners about updates received on + * channel group's subscription. + * @param pubnub - PubNub instance which will use this entity. + * + * @returns Ready to use channel group entity. + * + * @internal + */ + constructor(name, eventEmitter, pubnub) { this.eventEmitter = eventEmitter; this.pubnub = pubnub; - this.name = channelGroup; + this.name = name; } + /** + * Create channel group's subscription object for real-time updates. + * + * Create subscription object which can be used to subscribe to the real-time updates sent to the channels in + * specific channel group. + * + * @param [subscriptionOptions] - Channel group's subscription object behavior customization options. + * + * @returns Configured and ready to use channel group's subscription object. + */ subscription(subscriptionOptions) { if (process.env.SUBSCRIBE_EVENT_ENGINE_MODULE !== 'disabled') { return new Subscription_1.Subscription({ diff --git a/lib/entities/ChannelMetadata.js b/lib/entities/ChannelMetadata.js index f5ee7a639..6cf436908 100644 --- a/lib/entities/ChannelMetadata.js +++ b/lib/entities/ChannelMetadata.js @@ -2,12 +2,37 @@ Object.defineProperty(exports, "__esModule", { value: true }); exports.ChannelMetadata = void 0; const Subscription_1 = require("./Subscription"); +/** + * First-class objects which provides access to the channel app context object-specific APIs. + */ class ChannelMetadata { + /** + * Create channel app context object entity. + * + * @param id - Channel app context object identifier which will be used with subscription loop. + * @param eventEmitter - Event emitter, which will notify listeners about updates received on + * channel's subscription. + * @param pubnub - PubNub instance which will use this entity. + * + * @returns Ready to use channel app context object entity. + * + * @internal + */ constructor(id, eventEmitter, pubnub) { - this.id = id; this.eventEmitter = eventEmitter; this.pubnub = pubnub; + this.id = id; } + /** + * Create channel's app context subscription object for real-time updates. + * + * Create subscription object which can be used to subscribe to the real-time updates sent to the specific channel + * app context object. + * + * @param [subscriptionOptions] - Channel's app context subscription object behavior customization options. + * + * @returns Configured and ready to use channel's app context subscription object. + */ subscription(subscriptionOptions) { if (process.env.SUBSCRIBE_EVENT_ENGINE_MODULE !== 'disabled') { return new Subscription_1.Subscription({ diff --git a/lib/entities/SubscribeCapable.js b/lib/entities/SubscribeCapable.js index 26d1c379a..42766f015 100644 --- a/lib/entities/SubscribeCapable.js +++ b/lib/entities/SubscribeCapable.js @@ -2,43 +2,111 @@ Object.defineProperty(exports, "__esModule", { value: true }); exports.SubscribeCapable = void 0; class SubscribeCapable { + /** + * Start receiving real-time updates. + * + * @param subscribeParameters - Additional subscription configuration options which should be used + * for request. + */ subscribe(subscribeParameters) { const timetoken = subscribeParameters === null || subscribeParameters === void 0 ? void 0 : subscribeParameters.timetoken; this.pubnub.subscribe(Object.assign({ channels: this.channelNames, channelGroups: this.groupNames }, (timetoken !== null && timetoken !== '' && { timetoken: timetoken }))); } + /** + * Stop real-time events processing. + */ unsubscribe() { this.pubnub.unsubscribe({ channels: this.channelNames, channelGroups: this.groupNames, }); } + /** + * Set new message handler. + * + * @param onMessageListener - Listener function, which will be called each time when a new message + * is received from the real-time network. + */ set onMessage(onMessageListener) { this.listener.message = onMessageListener; } + /** + * Set new presence events handler. + * + * @param onPresenceListener - Listener function, which will be called each time when a new + * presence event is received from the real-time network. + */ set onPresence(onPresenceListener) { this.listener.presence = onPresenceListener; } + /** + * Set new signal handler. + * + * @param onSignalListener - Listener function, which will be called each time when a new signal + * is received from the real-time network. + */ set onSignal(onSignalListener) { this.listener.signal = onSignalListener; } + /** + * Set new app context event handler. + * + * @param onObjectsListener - Listener function, which will be called each time when a new + * app context event is received from the real-time network. + */ set onObjects(onObjectsListener) { this.listener.objects = onObjectsListener; } + /** + * Set new message reaction event handler. + * + * @param messageActionEventListener - Listener function, which will be called each time when a + * new message reaction event is received from the real-time network. + */ set onMessageAction(messageActionEventListener) { this.listener.messageAction = messageActionEventListener; } + /** + * Set new file handler. + * + * @param fileEventListener - Listener function, which will be called each time when a new file + * is received from the real-time network. + */ set onFile(fileEventListener) { this.listener.file = fileEventListener; } + /** + * Set events handler. + * + * @param listener - Events listener configuration object, which lets specify handlers for multiple + * types of events. + */ addListener(listener) { this.eventEmitter.addListener(listener, this.channelNames.filter((c) => !c.endsWith('-pnpres')), this.groupNames.filter((cg) => !cg.endsWith('-pnpres'))); } + /** + * Remove events handler. + * + * @param listener - Event listener configuration, which should be removed from the list of notified + * listeners. **Important:** Should be the same object which has been passed to the + * {@link addListener}. + */ removeListener(listener) { this.eventEmitter.removeListener(listener, this.channelNames, this.groupNames); } + /** + * Get list of channels which is used for subscription. + * + * @returns List of channel names. + */ get channels() { return this.channelNames.slice(0); } + /** + * Get list of channel groups which is used for subscription. + * + * @returns List of channel group names. + */ get channelGroups() { return this.groupNames.slice(0); } diff --git a/lib/entities/Subscription.js b/lib/entities/Subscription.js index e2aa6e8ba..8ce7ab186 100644 --- a/lib/entities/Subscription.js +++ b/lib/entities/Subscription.js @@ -3,10 +3,49 @@ Object.defineProperty(exports, "__esModule", { value: true }); exports.Subscription = void 0; const SubscribeCapable_1 = require("./SubscribeCapable"); const SubscriptionSet_1 = require("./SubscriptionSet"); +/** + * Single-entity subscription object which can be used to receive and handle real-time updates. + */ class Subscription extends SubscribeCapable_1.SubscribeCapable { + /** + * Create entity's subscription object. + * + * @param channels - List of channels which should be used in subscription loop. + * @param channelGroups - List of channel groups which should be used in subscription loop. + * @param subscriptionOptions - Per-entity subscription object configuration. + * @param eventEmitter - Event emitter, which will notify listeners about updates received for + * entity channels / groups. + * @param pubnub - PubNub instance which will perform subscribe / unsubscribe requests for entity. + * + * @returns Ready to use entity's subscription object. + * + * @internal + */ constructor({ channels, channelGroups, subscriptionOptions, eventEmitter, pubnub, }) { super(); + /** + * List of channel names for subscription loop. + * + * Entity may have few because of subscription configuration options. Presence events observing + * adds additional name to be used along with entity name. + * + * **Note:** Depending on from the entity type, it may provide a list of channels which are used + * to receive real-time updates for it. + * + * @internal + */ this.channelNames = []; + /** + * List of channel group names for subscription loop. + * + * Entity may have few because of subscription configuration options. Presence events observing + * adds additional name to be used along with entity name. + * + * **Note:** Depending on from the entity type, it may provide a list of channel groups which is + * sed to receive real-time updates for it. + * + * @internal + */ this.groupNames = []; this.channelNames = channels; this.groupNames = channelGroups; @@ -16,6 +55,12 @@ class Subscription extends SubscribeCapable_1.SubscribeCapable { this.listener = {}; eventEmitter.addListener(this.listener, this.channelNames.filter((c) => !c.endsWith('-pnpres')), this.groupNames.filter((cg) => !cg.endsWith('-pnpres'))); } + /** + * Merge entities' subscription objects into subscription set. + * + * @param subscription - Other entity's subscription object to be merged with receiver. + * @return Subscription set which contains both receiver and other entities' subscription objects. + */ addSubscription(subscription) { return new SubscriptionSet_1.SubscriptionSet({ channels: [...this.channelNames, ...subscription.channels], diff --git a/lib/entities/SubscriptionSet.js b/lib/entities/SubscriptionSet.js index 2f6c22efe..ac5816f8a 100644 --- a/lib/entities/SubscriptionSet.js +++ b/lib/entities/SubscriptionSet.js @@ -2,11 +2,63 @@ Object.defineProperty(exports, "__esModule", { value: true }); exports.SubscriptionSet = void 0; const SubscribeCapable_1 = require("./SubscribeCapable"); +/** + * Multiple entities subscription set object which can be used to receive and handle real-time + * updates. + * + * Subscription set object represent collection of per-entity subscription objects and allow + * processing them at once for subscription loop and events handling. + */ class SubscriptionSet extends SubscribeCapable_1.SubscribeCapable { + /** + * Create entities' subscription set object. + * + * Subscription set object represent collection of per-entity subscription objects and allow + * processing them at once for subscription loop and events handling. + * + * @param channels - List of channels which should be used in subscription loop. + * @param channelGroups - List of channel groups which should be used in subscription loop. + * @param subscriptionOptions - Entities' subscription object configuration. + * @param eventEmitter - Event emitter, which will notify listeners about updates received for + * entities' channels / groups. + * @param pubnub - PubNub instance which will perform subscribe / unsubscribe requests for + * entities. + * + * @returns Ready to use entities' subscription set object. + * + * @internal + */ constructor({ channels = [], channelGroups = [], subscriptionOptions, eventEmitter, pubnub, }) { super(); + /** + * List of channel names for subscription loop. + * + * List of entities' names which can have additional entries depending on from configuration + * options. Presence events observing adds additional name to be used along with entity name. + * + * **Note:** Depending on from the entities' type, they may provide a list of channels which are + * used to receive real-time updates for it. + * + * @internal + */ this.channelNames = []; + /** + * List of channel group names for subscription loop. + * + * List of entities' names which can have additional entries depending on from configuration + * options. Presence events observing adds additional name to be used along with entity name. + * + * **Note:** Depending on from the entities' type, they may provide a list of channels which are + * used to receive real-time updates for it. + * + * @internal + */ this.groupNames = []; + /** + * List of per-entity subscription objects. + * + * @internal + */ this.subscriptionList = []; this.options = subscriptionOptions; this.eventEmitter = eventEmitter; @@ -24,12 +76,28 @@ class SubscriptionSet extends SubscribeCapable_1.SubscribeCapable { this.listener = {}; eventEmitter.addListener(this.listener, this.channelNames.filter((c) => !c.endsWith('-pnpres')), this.groupNames.filter((cg) => !cg.endsWith('-pnpres'))); } + /** + * Add additional entity's subscription to the subscription set. + * + * **Important:** Changes will be effective only after {@link SubscribeCapable#subscribe} call or + * next subscription loop. + * + * @param subscription - Other entity's subscription object, which should be added. + */ addSubscription(subscription) { this.subscriptionList.push(subscription); this.channelNames = [...this.channelNames, ...subscription.channels]; this.groupNames = [...this.groupNames, ...subscription.channelGroups]; this.eventEmitter.addListener(this.listener, subscription.channels, subscription.channelGroups); } + /** + * Remove entity's subscription object from the set. + * + * **Important:** Changes will be effective only after {@link SubscribeCapable#unsubscribe} call or + * next subscription loop. + * + * @param subscription - Other entity's subscription object, which should be removed. + */ removeSubscription(subscription) { const channelsToRemove = subscription.channels; const groupsToRemove = subscription.channelGroups; @@ -38,12 +106,28 @@ class SubscriptionSet extends SubscribeCapable_1.SubscribeCapable { this.subscriptionList = this.subscriptionList.filter((s) => s !== subscription); this.eventEmitter.removeListener(this.listener, channelsToRemove, groupsToRemove); } + /** + * Merge with other subscription set object. + * + * **Important:** Changes will be effective only after {@link SubscribeCapable#subscribe} call or + * next subscription loop. + * + * @param subscriptionSet - Other entities' subscription set, which should be joined. + */ addSubscriptionSet(subscriptionSet) { this.subscriptionList = [...this.subscriptionList, ...subscriptionSet.subscriptions]; this.channelNames = [...this.channelNames, ...subscriptionSet.channels]; this.groupNames = [...this.groupNames, ...subscriptionSet.channelGroups]; this.eventEmitter.addListener(this.listener, subscriptionSet.channels, subscriptionSet.channelGroups); } + /** + * Subtract other subscription set object. + * + * **Important:** Changes will be effective only after {@link SubscribeCapable#unsubscribe} call or + * next subscription loop. + * + * @param subscriptionSet - Other entities' subscription set, which should be subtracted. + */ removeSubscriptionSet(subscriptionSet) { const channelsToRemove = subscriptionSet.channels; const groupsToRemove = subscriptionSet.channelGroups; @@ -52,6 +136,11 @@ class SubscriptionSet extends SubscribeCapable_1.SubscribeCapable { this.subscriptionList = this.subscriptionList.filter((s) => !subscriptionSet.subscriptions.includes(s)); this.eventEmitter.removeListener(this.listener, channelsToRemove, groupsToRemove); } + /** + * Get list of entities' subscription objects registered in subscription set. + * + * @returns Entities' subscription objects list. + */ get subscriptions() { return this.subscriptionList.slice(0); } diff --git a/lib/entities/UserMetadata.js b/lib/entities/UserMetadata.js index b740b04e9..2220983a3 100644 --- a/lib/entities/UserMetadata.js +++ b/lib/entities/UserMetadata.js @@ -2,12 +2,37 @@ Object.defineProperty(exports, "__esModule", { value: true }); exports.UserMetadata = void 0; const Subscription_1 = require("./Subscription"); +/** + * First-class objects which provides access to the user app context object-specific APIs. + */ class UserMetadata { + /** + * Create user app context object entity. + * + * @param id - User app context object identifier which will be used with subscription loop. + * @param eventEmitter - Event emitter, which will notify listeners about updates received on + * channel's subscription. + * @param pubnub - PubNub instance which will use this entity. + * + * @returns Ready to use user app context object entity. + * + * @internal + */ constructor(id, eventEmitter, pubnub) { - this.id = id; this.eventEmitter = eventEmitter; this.pubnub = pubnub; + this.id = id; } + /** + * Create user's app context subscription object for real-time updates. + * + * Create subscription object which can be used to subscribe to the real-time updates sent to the specific user + * app context object. + * + * @param [subscriptionOptions] - User's app context subscription object behavior customization options. + * + * @returns Configured and ready to use user's app context subscription object. + */ subscription(subscriptionOptions) { if (process.env.SUBSCRIBE_EVENT_ENGINE_MODULE !== 'disabled') { return new Subscription_1.Subscription({ diff --git a/lib/errors/pubnub-api-error.js b/lib/errors/pubnub-api-error.js index 1f09b98b7..7ca6c7446 100644 --- a/lib/errors/pubnub-api-error.js +++ b/lib/errors/pubnub-api-error.js @@ -1,6 +1,8 @@ "use strict"; /** * REST API endpoint use error module. + * + * @internal */ var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; @@ -11,6 +13,8 @@ const categories_1 = __importDefault(require("../core/constants/categories")); const pubnub_error_1 = require("./pubnub-error"); /** * PubNub REST API call error. + * + * @internal */ class PubNubAPIError extends Error { /** diff --git a/lib/errors/pubnub-error.js b/lib/errors/pubnub-error.js index 40c24f8df..97c5938c4 100644 --- a/lib/errors/pubnub-error.js +++ b/lib/errors/pubnub-error.js @@ -1,11 +1,30 @@ "use strict"; +/** + * PubNub operation error module. + */ var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); -exports.createValidationError = exports.PubNubError = void 0; +exports.PubNubError = void 0; +exports.createValidationError = createValidationError; const categories_1 = __importDefault(require("../core/constants/categories")); +/** + * PubNub operation error. + * + * When an operation can't be performed or there is an error from the server, this object will be returned. + */ class PubNubError extends Error { + /** + * Create PubNub operation error. + * + * @param message - Message with details about why operation failed. + * @param [status] - Additional information about performed operation. + * + * @returns Configured and ready to use PubNub operation error. + * + * @internal + */ constructor(message, status) { super(message); this.status = status; @@ -15,12 +34,30 @@ class PubNubError extends Error { } } exports.PubNubError = PubNubError; +/** + * Create error status object. + * + * @param errorPayload - Additional information which should be attached to the error status object. + * + * @returns Error status object. + * + * @internal + */ function createError(errorPayload) { var _a; (_a = errorPayload.statusCode) !== null && _a !== void 0 ? _a : (errorPayload.statusCode = 0); return Object.assign(Object.assign({}, errorPayload), { statusCode: errorPayload.statusCode, category: categories_1.default.PNValidationErrorCategory, error: true }); } +/** + * Create operation arguments validation error status object. + * + * @param message - Information about failed validation requirement. + * @param [statusCode] - Operation HTTP status code. + * + * @returns Operation validation error status object. + * + * @internal + */ function createValidationError(message, statusCode) { return createError(Object.assign({ message }, (statusCode !== undefined ? { statusCode } : {}))); } -exports.createValidationError = createValidationError; diff --git a/lib/event-engine/core/change.js b/lib/event-engine/core/change.js index 2b5963b5c..784342bb6 100644 --- a/lib/event-engine/core/change.js +++ b/lib/event-engine/core/change.js @@ -1,3 +1,7 @@ "use strict"; -/* eslint-disable @typescript-eslint/no-explicit-any */ +/** + * Event Engine Core state change module. + * + * @internal + */ Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/lib/event-engine/core/dispatcher.js b/lib/event-engine/core/dispatcher.js index 2be9c3fdf..f8bec4fff 100644 --- a/lib/event-engine/core/dispatcher.js +++ b/lib/event-engine/core/dispatcher.js @@ -1,7 +1,18 @@ "use strict"; -/* eslint-disable @typescript-eslint/no-explicit-any */ +/** + * Event Engine Core Effects dispatcher module. + * + * @internal + */ Object.defineProperty(exports, "__esModule", { value: true }); exports.Dispatcher = void 0; +/** + * Event Engine effects dispatcher. + * + * Dispatcher responsible for invocation enqueue and dequeue for processing. + * + * @internal + */ class Dispatcher { constructor(dependencies) { this.dependencies = dependencies; diff --git a/lib/event-engine/core/engine.js b/lib/event-engine/core/engine.js index d94c9c482..f179af77d 100644 --- a/lib/event-engine/core/engine.js +++ b/lib/event-engine/core/engine.js @@ -1,9 +1,19 @@ "use strict"; -/* eslint-disable @typescript-eslint/no-explicit-any */ +/** + * Event Engine Core module. + * + * @internal + */ Object.defineProperty(exports, "__esModule", { value: true }); exports.Engine = void 0; +/* eslint-disable @typescript-eslint/no-explicit-any */ const subject_1 = require("../../core/components/subject"); const state_1 = require("./state"); +/** + * Generic event engine. + * + * @internal + */ class Engine extends subject_1.Subject { describe(label) { return new state_1.State(label); diff --git a/lib/event-engine/core/handler.js b/lib/event-engine/core/handler.js index de66460b8..ef513bd1e 100644 --- a/lib/event-engine/core/handler.js +++ b/lib/event-engine/core/handler.js @@ -1,7 +1,19 @@ "use strict"; +/** + * Event Engine Core Effects handler module. + * + * @internal + */ Object.defineProperty(exports, "__esModule", { value: true }); exports.asyncHandler = exports.Handler = void 0; const abort_signal_1 = require("../../core/components/abort_signal"); +/** + * Synchronous (short-term) effect invocation handler. + * + * Handler manages effect execution on behalf of effect dispatcher. + * + * @internal + */ class Handler { constructor(payload, dependencies) { this.payload = payload; @@ -9,6 +21,13 @@ class Handler { } } exports.Handler = Handler; +/** + * Asynchronous (long-running) effect invocation handler. + * + * Handler manages effect execution on behalf of effect dispatcher. + * + * @internal + */ class AsyncHandler extends Handler { constructor(payload, dependencies, asyncFunction) { super(payload, dependencies); @@ -25,5 +44,12 @@ class AsyncHandler extends Handler { this.abortSignal.abort(); } } +/** + * Asynchronous effect invocation handler constructor. + * + * @param handlerFunction - Function which performs asynchronous action and should be called on `start`. + * + * @internal + */ const asyncHandler = (handlerFunction) => (payload, dependencies) => new AsyncHandler(payload, dependencies, handlerFunction); exports.asyncHandler = asyncHandler; diff --git a/lib/event-engine/core/index.js b/lib/event-engine/core/index.js index cfbd46c15..39a7e92f3 100644 --- a/lib/event-engine/core/index.js +++ b/lib/event-engine/core/index.js @@ -1,13 +1,22 @@ "use strict"; +/** + * Event Engine module. + * + * @internal + */ Object.defineProperty(exports, "__esModule", { value: true }); exports.asyncHandler = exports.createManagedEffect = exports.createEffect = exports.createEvent = exports.Dispatcher = exports.Engine = void 0; +/** @internal */ var engine_1 = require("./engine"); Object.defineProperty(exports, "Engine", { enumerable: true, get: function () { return engine_1.Engine; } }); +/** @internal */ var dispatcher_1 = require("./dispatcher"); Object.defineProperty(exports, "Dispatcher", { enumerable: true, get: function () { return dispatcher_1.Dispatcher; } }); +/** @internal */ var types_1 = require("./types"); Object.defineProperty(exports, "createEvent", { enumerable: true, get: function () { return types_1.createEvent; } }); Object.defineProperty(exports, "createEffect", { enumerable: true, get: function () { return types_1.createEffect; } }); Object.defineProperty(exports, "createManagedEffect", { enumerable: true, get: function () { return types_1.createManagedEffect; } }); +/** @internal */ var handler_1 = require("./handler"); Object.defineProperty(exports, "asyncHandler", { enumerable: true, get: function () { return handler_1.asyncHandler; } }); diff --git a/lib/event-engine/core/retryPolicy.js b/lib/event-engine/core/retryPolicy.js index f822b4979..28cc74b6f 100644 --- a/lib/event-engine/core/retryPolicy.js +++ b/lib/event-engine/core/retryPolicy.js @@ -1,6 +1,9 @@ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.RetryPolicy = void 0; +/** + * Failed request retry policy. + */ class RetryPolicy { static LinearRetryPolicy(configuration) { return { diff --git a/lib/event-engine/core/state.js b/lib/event-engine/core/state.js index 06d02193c..f873b0958 100644 --- a/lib/event-engine/core/state.js +++ b/lib/event-engine/core/state.js @@ -1,7 +1,18 @@ "use strict"; -/* eslint-disable @typescript-eslint/no-explicit-any */ +/** + * Event Engine Core state module. + * + * @internal + */ Object.defineProperty(exports, "__esModule", { value: true }); exports.State = void 0; +/** + * Event engine current state object. + * + * State contains current context and list of invocations which should be performed by the Event Engine. + * + * @internal + */ class State { transition(context, event) { var _a; diff --git a/lib/event-engine/core/types.js b/lib/event-engine/core/types.js index 8d5546c4b..f9953adf1 100644 --- a/lib/event-engine/core/types.js +++ b/lib/event-engine/core/types.js @@ -1,7 +1,18 @@ "use strict"; -/* eslint-disable @typescript-eslint/no-explicit-any */ +/** + * Event Engine Core types module. + * + * @internal + */ Object.defineProperty(exports, "__esModule", { value: true }); -exports.createManagedEffect = exports.createEffect = exports.createEvent = void 0; +exports.createEvent = createEvent; +exports.createEffect = createEffect; +exports.createManagedEffect = createManagedEffect; +/** + * Create and configure event engine event. + * + * @internal + */ function createEvent(type, fn) { const creator = function (...args) { return { @@ -12,7 +23,11 @@ function createEvent(type, fn) { creator.type = type; return creator; } -exports.createEvent = createEvent; +/** + * Create and configure short-term effect invocation. + * + * @internal + */ function createEffect(type, fn) { const creator = (...args) => { return { type, payload: fn(...args), managed: false }; @@ -20,7 +35,11 @@ function createEffect(type, fn) { creator.type = type; return creator; } -exports.createEffect = createEffect; +/** + * Create and configure long-running effect invocation. + * + * @internal + */ function createManagedEffect(type, fn) { const creator = (...args) => { return { type, payload: fn(...args), managed: true }; @@ -29,4 +48,3 @@ function createManagedEffect(type, fn) { creator.cancel = { type: 'CANCEL', payload: type, managed: false }; return creator; } -exports.createManagedEffect = createManagedEffect; diff --git a/lib/event-engine/dispatcher.js b/lib/event-engine/dispatcher.js index c8e3c2ddb..b09274532 100644 --- a/lib/event-engine/dispatcher.js +++ b/lib/event-engine/dispatcher.js @@ -1,4 +1,9 @@ "use strict"; +/** + * Subscribe Event Engine effects dispatcher. + * + * @internal + */ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); @@ -41,6 +46,13 @@ const core_1 = require("./core"); const effects = __importStar(require("./effects")); const events = __importStar(require("./events")); const categories_1 = __importDefault(require("../core/constants/categories")); +/** + * Subscribe Event Engine dispatcher. + * + * Dispatcher responsible for subscription events handling and corresponding effects execution. + * + * @internal + */ class EventEngineDispatcher extends core_1.Dispatcher { constructor(engine, dependencies) { super(dependencies); @@ -58,7 +70,7 @@ class EventEngineDispatcher extends core_1.Dispatcher { } } }))); - this.on(effects.receiveMessages.type, (0, core_1.asyncHandler)((payload_2, abortSignal_2, _b) => __awaiter(this, [payload_2, abortSignal_2, _b], void 0, function* (payload, abortSignal, { receiveMessages, config }) { + this.on(effects.receiveMessages.type, (0, core_1.asyncHandler)((payload_1, abortSignal_1, _a) => __awaiter(this, [payload_1, abortSignal_1, _a], void 0, function* (payload, abortSignal, { receiveMessages, config }) { abortSignal.throwIfAborted(); try { const result = yield receiveMessages({ @@ -80,15 +92,15 @@ class EventEngineDispatcher extends core_1.Dispatcher { } } }))); - this.on(effects.emitMessages.type, (0, core_1.asyncHandler)((payload_3, _1, _c) => __awaiter(this, [payload_3, _1, _c], void 0, function* (payload, _, { emitMessages }) { + this.on(effects.emitMessages.type, (0, core_1.asyncHandler)((payload_1, _1, _a) => __awaiter(this, [payload_1, _1, _a], void 0, function* (payload, _, { emitMessages }) { if (payload.length > 0) { emitMessages(payload); } }))); - this.on(effects.emitStatus.type, (0, core_1.asyncHandler)((payload_4, _2, _d) => __awaiter(this, [payload_4, _2, _d], void 0, function* (payload, _, { emitStatus }) { + this.on(effects.emitStatus.type, (0, core_1.asyncHandler)((payload_1, _1, _a) => __awaiter(this, [payload_1, _1, _a], void 0, function* (payload, _, { emitStatus }) { emitStatus(payload); }))); - this.on(effects.receiveReconnect.type, (0, core_1.asyncHandler)((payload_5, abortSignal_3, _e) => __awaiter(this, [payload_5, abortSignal_3, _e], void 0, function* (payload, abortSignal, { receiveMessages, delay, config }) { + this.on(effects.receiveReconnect.type, (0, core_1.asyncHandler)((payload_1, abortSignal_1, _a) => __awaiter(this, [payload_1, abortSignal_1, _a], void 0, function* (payload, abortSignal, { receiveMessages, delay, config }) { if (config.retryConfiguration && config.retryConfiguration.shouldRetry(payload.reason, payload.attempts)) { abortSignal.throwIfAborted(); yield delay(config.retryConfiguration.getDelay(payload.attempts, payload.reason)); @@ -118,7 +130,7 @@ class EventEngineDispatcher extends core_1.Dispatcher { : 'Unable to complete subscribe messages receive.'))); } }))); - this.on(effects.handshakeReconnect.type, (0, core_1.asyncHandler)((payload_6, abortSignal_4, _f) => __awaiter(this, [payload_6, abortSignal_4, _f], void 0, function* (payload, abortSignal, { handshake, delay, presenceState, config }) { + this.on(effects.handshakeReconnect.type, (0, core_1.asyncHandler)((payload_1, abortSignal_1, _a) => __awaiter(this, [payload_1, abortSignal_1, _a], void 0, function* (payload, abortSignal, { handshake, delay, presenceState, config }) { if (config.retryConfiguration && config.retryConfiguration.shouldRetry(payload.reason, payload.attempts)) { abortSignal.throwIfAborted(); yield delay(config.retryConfiguration.getDelay(payload.attempts, payload.reason)); diff --git a/lib/event-engine/effects.js b/lib/event-engine/effects.js index 2c788f77c..96078052c 100644 --- a/lib/event-engine/effects.js +++ b/lib/event-engine/effects.js @@ -1,13 +1,61 @@ "use strict"; +/** + * Subscribe Event Engine effects module. + * + * @internal + */ Object.defineProperty(exports, "__esModule", { value: true }); exports.handshakeReconnect = exports.receiveReconnect = exports.emitStatus = exports.emitMessages = exports.receiveMessages = exports.handshake = void 0; const core_1 = require("./core"); +/** + * Initial subscription effect. + * + * Performs subscribe REST API call with `tt=0`. + * + * @internal + */ exports.handshake = (0, core_1.createManagedEffect)('HANDSHAKE', (channels, groups) => ({ channels, groups, })); +/** + * Real-time updates receive effect. + * + * Performs sequential subscribe REST API call with `tt` set to the value received from the previous subscribe + * REST API call. + * + * @internal + */ exports.receiveMessages = (0, core_1.createManagedEffect)('RECEIVE_MESSAGES', (channels, groups, cursor) => ({ channels, groups, cursor })); +/** + * Emit real-time updates effect. + * + * Notify event listeners about updates for which listener handlers has been provided. + * + * @internal + */ exports.emitMessages = (0, core_1.createEffect)('EMIT_MESSAGES', (events) => events); +/** + * Emit subscription status change effect. + * + * Notify status change event listeners. + * + * @internal + */ exports.emitStatus = (0, core_1.createEffect)('EMIT_STATUS', (status) => status); +/** + * Real-time updates receive restore effect. + * + * Performs subscribe REST API call with `tt` which has been received before disconnection or error. + * + * @internal + */ exports.receiveReconnect = (0, core_1.createManagedEffect)('RECEIVE_RECONNECT', (context) => context); +/** + * Initial subscription restore effect. + * + * Performs subscribe REST API call with `tt=0` after error. + * + * @internal + */ exports.handshakeReconnect = (0, core_1.createManagedEffect)('HANDSHAKE_RECONNECT', (context) => context); diff --git a/lib/event-engine/events.js b/lib/event-engine/events.js index 3725ca704..499e064b0 100644 --- a/lib/event-engine/events.js +++ b/lib/event-engine/events.js @@ -1,11 +1,30 @@ "use strict"; +/** + * Subscribe Event Engine events module. + * + * @internal + */ Object.defineProperty(exports, "__esModule", { value: true }); exports.unsubscribeAll = exports.reconnect = exports.disconnect = exports.receiveReconnectGiveup = exports.receiveReconnectFailure = exports.receiveReconnectSuccess = exports.receiveFailure = exports.receiveSuccess = exports.handshakeReconnectGiveup = exports.handshakeReconnectFailure = exports.handshakeReconnectSuccess = exports.handshakeFailure = exports.handshakeSuccess = exports.restore = exports.subscriptionChange = void 0; const core_1 = require("./core"); +/** + * Subscription list change event. + * + * Event is sent each time when user would like to change list of active channels / groups. + * + * @internal + */ exports.subscriptionChange = (0, core_1.createEvent)('SUBSCRIPTION_CHANGED', (channels, groups) => ({ channels, groups, })); +/** + * Subscription loop restore. + * + * Event is sent when user would like to try catch up on missed updates by providing specific timetoken. + * + * @internal + */ exports.restore = (0, core_1.createEvent)('SUBSCRIPTION_RESTORED', (channels, groups, timetoken, region) => ({ channels, groups, @@ -14,29 +33,120 @@ exports.restore = (0, core_1.createEvent)('SUBSCRIPTION_RESTORED', (channels, gr region: region !== null && region !== void 0 ? region : 0, }, })); +/** + * Initial subscription handshake success event. + * + * Event is sent by corresponding effect handler if REST API call was successful. + * + * @internal + */ exports.handshakeSuccess = (0, core_1.createEvent)('HANDSHAKE_SUCCESS', (cursor) => cursor); +/** + * Initial subscription handshake did fail event. + * + * Event is sent by corresponding effect handler if REST API call failed. + * + * @internal + */ exports.handshakeFailure = (0, core_1.createEvent)('HANDSHAKE_FAILURE', (error) => error); +/** + * Initial subscription handshake reconnect success event. + * + * Event is sent by corresponding effect handler if REST API call was successful after transition to the failed state. + * + * @internal + */ exports.handshakeReconnectSuccess = (0, core_1.createEvent)('HANDSHAKE_RECONNECT_SUCCESS', (cursor) => ({ cursor, })); +/** + * Initial subscription handshake reconnect did fail event. + * + * Event is sent by corresponding effect handler if REST API call did fail while tried to enter to the success state. + * + * @internal + */ exports.handshakeReconnectFailure = (0, core_1.createEvent)('HANDSHAKE_RECONNECT_FAILURE', (error) => error); +/** + * Initial subscription handshake impossible event. + * + * Event is sent by corresponding effect handler if REST API call exhausted all retry attempt and won't try again. + * + * @internal + */ exports.handshakeReconnectGiveup = (0, core_1.createEvent)('HANDSHAKE_RECONNECT_GIVEUP', (error) => error); +/** + * Subscription successfully received real-time updates event. + * + * Event is sent by corresponding effect handler if REST API call was successful. + * + * @internal + */ exports.receiveSuccess = (0, core_1.createEvent)('RECEIVE_SUCCESS', (cursor, events) => ({ cursor, events, })); +/** + * Subscription did fail to receive real-time updates event. + * + * Event is sent by corresponding effect handler if REST API call failed. + * + * @internal + */ exports.receiveFailure = (0, core_1.createEvent)('RECEIVE_FAILURE', (error) => error); +/** + * Subscription successfully received real-time updates on reconnection attempt event. + * + * Event is sent by corresponding effect handler if REST API call was successful after transition to the failed state. + * + * @internal + */ exports.receiveReconnectSuccess = (0, core_1.createEvent)('RECEIVE_RECONNECT_SUCCESS', (cursor, events) => ({ cursor, events, })); +/** + * Subscription did fail to receive real-time updates on reconnection attempt event. + * + * Event is sent by corresponding effect handler if REST API call did fail while tried to enter to the success state. + * + * @internal + */ exports.receiveReconnectFailure = (0, core_1.createEvent)('RECEIVE_RECONNECT_FAILURE', (error) => error); +/** + * Subscription real-time updates received impossible event. + * + * Event is sent by corresponding effect handler if REST API call exhausted all retry attempt and won't try again. + * + * @internal + */ exports.receiveReconnectGiveup = (0, core_1.createEvent)('RECEIVING_RECONNECT_GIVEUP', (error) => error); +/** + * Client disconnect event. + * + * Event is sent when user wants to temporarily stop real-time updates receive. + * + * @internal + */ exports.disconnect = (0, core_1.createEvent)('DISCONNECT', () => ({})); +/** + * Client reconnect event. + * + * Event is sent when user wants to restore real-time updates receive. + * + * @internal + */ exports.reconnect = (0, core_1.createEvent)('RECONNECT', (timetoken, region) => ({ cursor: { timetoken: timetoken !== null && timetoken !== void 0 ? timetoken : '', region: region !== null && region !== void 0 ? region : 0, }, })); +/** + * Completely stop real-time updates receive event. + * + * Event is sent when user doesn't want to receive any real-time updates anymore. + * + * @internal + */ exports.unsubscribeAll = (0, core_1.createEvent)('UNSUBSCRIBE_ALL', () => ({})); diff --git a/lib/event-engine/index.js b/lib/event-engine/index.js index 697416481..255b7bfbd 100644 --- a/lib/event-engine/index.js +++ b/lib/event-engine/index.js @@ -1,4 +1,9 @@ "use strict"; +/** + * Subscribe Event Engine module. + * + * @internal + */ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); @@ -29,6 +34,11 @@ const dispatcher_1 = require("./dispatcher"); const events = __importStar(require("./events")); const unsubscribed_1 = require("./states/unsubscribed"); const utils = __importStar(require("../core/utils")); +/** + * Subscribe Event Engine Core. + * + * @internal + */ class EventEngine { get _engine() { return this.engine; diff --git a/lib/event-engine/presence/dispatcher.js b/lib/event-engine/presence/dispatcher.js index e38d0f967..c4f0ebef2 100644 --- a/lib/event-engine/presence/dispatcher.js +++ b/lib/event-engine/presence/dispatcher.js @@ -1,4 +1,9 @@ "use strict"; +/** + * Presence Event Engine effects dispatcher. + * + * @internal + */ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); @@ -42,6 +47,13 @@ const pubnub_error_1 = require("../../errors/pubnub-error"); const effects = __importStar(require("./effects")); const events = __importStar(require("./events")); const categories_1 = __importDefault(require("../../core/constants/categories")); +/** + * Presence Event Engine dispatcher. + * + * Dispatcher responsible for presence events handling and corresponding effects execution. + * + * @internal + */ class PresenceEventEngineDispatcher extends core_1.Dispatcher { constructor(engine, dependencies) { super(dependencies); @@ -58,7 +70,7 @@ class PresenceEventEngineDispatcher extends core_1.Dispatcher { } } }))); - this.on(effects.leave.type, (0, core_1.asyncHandler)((payload_2, _2, _b) => __awaiter(this, [payload_2, _2, _b], void 0, function* (payload, _, { leave, config }) { + this.on(effects.leave.type, (0, core_1.asyncHandler)((payload_1, _1, _a) => __awaiter(this, [payload_1, _1, _a], void 0, function* (payload, _, { leave, config }) { if (!config.suppressLeaveEvents) { try { leave({ @@ -69,13 +81,13 @@ class PresenceEventEngineDispatcher extends core_1.Dispatcher { catch (e) { } } }))); - this.on(effects.wait.type, (0, core_1.asyncHandler)((_3, abortSignal_1, _c) => __awaiter(this, [_3, abortSignal_1, _c], void 0, function* (_, abortSignal, { heartbeatDelay }) { + this.on(effects.wait.type, (0, core_1.asyncHandler)((_1, abortSignal_1, _a) => __awaiter(this, [_1, abortSignal_1, _a], void 0, function* (_, abortSignal, { heartbeatDelay }) { abortSignal.throwIfAborted(); yield heartbeatDelay(); abortSignal.throwIfAborted(); return engine.transition(events.timesUp()); }))); - this.on(effects.delayedHeartbeat.type, (0, core_1.asyncHandler)((payload_3, abortSignal_2, _d) => __awaiter(this, [payload_3, abortSignal_2, _d], void 0, function* (payload, abortSignal, { heartbeat, retryDelay, presenceState, config }) { + this.on(effects.delayedHeartbeat.type, (0, core_1.asyncHandler)((payload_1, abortSignal_1, _a) => __awaiter(this, [payload_1, abortSignal_1, _a], void 0, function* (payload, abortSignal, { heartbeat, retryDelay, presenceState, config }) { if (config.retryConfiguration && config.retryConfiguration.shouldRetry(payload.reason, payload.attempts)) { abortSignal.throwIfAborted(); yield retryDelay(config.retryConfiguration.getDelay(payload.attempts, payload.reason)); @@ -96,9 +108,9 @@ class PresenceEventEngineDispatcher extends core_1.Dispatcher { return engine.transition(events.heartbeatGiveup()); } }))); - this.on(effects.emitStatus.type, (0, core_1.asyncHandler)((payload_4, _4, _e) => __awaiter(this, [payload_4, _4, _e], void 0, function* (payload, _, { emitStatus, config }) { - var _f; - if (config.announceFailedHeartbeats && ((_f = payload === null || payload === void 0 ? void 0 : payload.status) === null || _f === void 0 ? void 0 : _f.error) === true) { + this.on(effects.emitStatus.type, (0, core_1.asyncHandler)((payload_1, _1, _a) => __awaiter(this, [payload_1, _1, _a], void 0, function* (payload, _, { emitStatus, config }) { + var _b; + if (config.announceFailedHeartbeats && ((_b = payload === null || payload === void 0 ? void 0 : payload.status) === null || _b === void 0 ? void 0 : _b.error) === true) { emitStatus(payload.status); } else if (config.announceSuccessfulHeartbeats && payload.statusCode === 200) { diff --git a/lib/event-engine/presence/effects.js b/lib/event-engine/presence/effects.js index d6f4d5671..16c0a43bb 100644 --- a/lib/event-engine/presence/effects.js +++ b/lib/event-engine/presence/effects.js @@ -1,16 +1,56 @@ "use strict"; +/** + * Presence Event Engine effects module. + * + * @internal + */ Object.defineProperty(exports, "__esModule", { value: true }); exports.delayedHeartbeat = exports.wait = exports.emitStatus = exports.leave = exports.heartbeat = void 0; const core_1 = require("../core"); +/** + * Presence heartbeat effect. + * + * Performs presence heartbeat REST API call. + * + * @internal + */ exports.heartbeat = (0, core_1.createEffect)('HEARTBEAT', (channels, groups) => ({ channels, groups, })); +/** + * Presence leave effect. + * + * Performs presence leave REST API call. + * + * @internal + */ exports.leave = (0, core_1.createEffect)('LEAVE', (channels, groups) => ({ channels, groups, })); +/** + * Emit presence heartbeat REST API call result status effect. + * + * Notify status change event listeners. + * + * @internal + */ /* eslint-disable @typescript-eslint/no-explicit-any */ exports.emitStatus = (0, core_1.createEffect)('EMIT_STATUS', (status) => status); +/** + * Heartbeat delay effect. + * + * Delay of configured length (heartbeat interval) before another heartbeat REST API call will be done. + * + * @internal + */ exports.wait = (0, core_1.createManagedEffect)('WAIT', () => ({})); +/** + * Delayed heartbeat effect. + * + * Similar to the {@link wait} effect but used in case if previous heartbeat call did fail. + * + * @internal + */ exports.delayedHeartbeat = (0, core_1.createManagedEffect)('DELAYED_HEARTBEAT', (context) => context); diff --git a/lib/event-engine/presence/events.js b/lib/event-engine/presence/events.js index 58bdd3e8c..625408642 100644 --- a/lib/event-engine/presence/events.js +++ b/lib/event-engine/presence/events.js @@ -1,19 +1,92 @@ "use strict"; +/** + * Presence Event Engine events module. + * + * @internal + */ Object.defineProperty(exports, "__esModule", { value: true }); exports.timesUp = exports.heartbeatGiveup = exports.heartbeatFailure = exports.heartbeatSuccess = exports.leftAll = exports.left = exports.joined = exports.disconnect = exports.reconnect = void 0; const core_1 = require("../core"); +/** + * Reconnect event. + * + * Event is sent each time when user restores real-time updates processing and notifies other present subscribers + * about joining back. + * + * @internal + */ exports.reconnect = (0, core_1.createEvent)('RECONNECT', () => ({})); +/** + * Disconnect event. + * + * Event is sent when user wants to temporarily stop real-time updates processing and notifies other present + * subscribers about leaving. + * + * @internal + */ exports.disconnect = (0, core_1.createEvent)('DISCONNECT', () => ({})); +/** + * Channel / group join event. + * + * Event is sent when user adds new channels / groups to the active channels / groups list and notifies other present + * subscribers about joining. + * + * @internal + */ exports.joined = (0, core_1.createEvent)('JOINED', (channels, groups) => ({ channels, groups, })); +/** + * Channel / group leave event. + * + * Event is sent when user removes channels / groups from the active channels / groups list and notifies other present + * subscribers about leaving. + * + * @internal + */ exports.left = (0, core_1.createEvent)('LEFT', (channels, groups) => ({ channels, groups, })); +/** + * Leave all event. + * + * Event is sent when user doesn't want to receive any real-time updates anymore and notifies other + * subscribers on previously active channels / groups about leaving. + * + * @internal + */ exports.leftAll = (0, core_1.createEvent)('LEFT_ALL', () => ({})); +/** + * Presence heartbeat success event. + * + * Event is sent by corresponding effect handler if REST API call was successful. + * + * @internal + */ exports.heartbeatSuccess = (0, core_1.createEvent)('HEARTBEAT_SUCCESS', (statusCode) => ({ statusCode })); +/** + * Presence heartbeat did fail event. + * + * Event is sent by corresponding effect handler if REST API call failed. + * + * @internal + */ exports.heartbeatFailure = (0, core_1.createEvent)('HEARTBEAT_FAILURE', (error) => error); +/** + * Presence heartbeat impossible event. + * + * Event is sent by corresponding effect handler if REST API call exhausted all retry attempt and won't try again. + * + * @internal + */ exports.heartbeatGiveup = (0, core_1.createEvent)('HEARTBEAT_GIVEUP', () => ({})); +/** + * Delayed presence heartbeat event. + * + * Event is sent by corresponding effect handler when delay timer between heartbeat calls fired. + * + * @internal + */ exports.timesUp = (0, core_1.createEvent)('TIMES_UP', () => ({})); diff --git a/lib/event-engine/presence/presence.js b/lib/event-engine/presence/presence.js index fbfa7c939..826929e72 100644 --- a/lib/event-engine/presence/presence.js +++ b/lib/event-engine/presence/presence.js @@ -1,4 +1,9 @@ "use strict"; +/** + * Presence Event Engine module. + * + * @internal + */ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); @@ -28,6 +33,11 @@ const core_1 = require("../core"); const events = __importStar(require("./events")); const dispatcher_1 = require("./dispatcher"); const heartbeat_inactive_1 = require("./states/heartbeat_inactive"); +/** + * Presence Event Engine Core. + * + * @internal + */ class PresenceEventEngine { get _engine() { return this.engine; diff --git a/lib/event-engine/presence/states/heartbeat_cooldown.js b/lib/event-engine/presence/states/heartbeat_cooldown.js index 5dd1a1b8d..061190231 100644 --- a/lib/event-engine/presence/states/heartbeat_cooldown.js +++ b/lib/event-engine/presence/states/heartbeat_cooldown.js @@ -1,4 +1,9 @@ "use strict"; +/** + * Waiting next heartbeat state module. + * + * @internal + */ Object.defineProperty(exports, "__esModule", { value: true }); exports.HeartbeatCooldownState = void 0; const state_1 = require("../../core/state"); @@ -7,6 +12,13 @@ const effects_1 = require("../effects"); const heartbeating_1 = require("./heartbeating"); const heartbeat_stopped_1 = require("./heartbeat_stopped"); const heartbeat_inactive_1 = require("./heartbeat_inactive"); +/** + * Waiting next heartbeat state. + * + * State in which Presence Event Engine is waiting when delay will run out and next heartbeat call should be done. + * + * @internal + */ exports.HeartbeatCooldownState = new state_1.State('HEARTBEAT_COOLDOWN'); exports.HeartbeatCooldownState.onEnter(() => (0, effects_1.wait)()); exports.HeartbeatCooldownState.onExit(() => effects_1.wait.cancel); diff --git a/lib/event-engine/presence/states/heartbeat_failed.js b/lib/event-engine/presence/states/heartbeat_failed.js index 4ea95efa8..a74c72fdf 100644 --- a/lib/event-engine/presence/states/heartbeat_failed.js +++ b/lib/event-engine/presence/states/heartbeat_failed.js @@ -1,4 +1,9 @@ "use strict"; +/** + * Failed to heartbeat state module. + * + * @internal + */ Object.defineProperty(exports, "__esModule", { value: true }); exports.HeartbeatFailedState = void 0; const state_1 = require("../../core/state"); @@ -7,6 +12,14 @@ const effects_1 = require("../effects"); const heartbeating_1 = require("./heartbeating"); const heartbeat_stopped_1 = require("./heartbeat_stopped"); const heartbeat_inactive_1 = require("./heartbeat_inactive"); +/** + * Failed to heartbeat state. + * + * State in which Subscription Event Engine waits for user to try to reconnect after all retry attempts has been + * exhausted. + * + * @internal + */ exports.HeartbeatFailedState = new state_1.State('HEARTBEAT_FAILED'); exports.HeartbeatFailedState.on(events_1.joined.type, (context, event) => heartbeating_1.HeartbeatingState.with({ channels: [...context.channels, ...event.payload.channels], diff --git a/lib/event-engine/presence/states/heartbeat_inactive.js b/lib/event-engine/presence/states/heartbeat_inactive.js index 7bbb964c7..046029fb2 100644 --- a/lib/event-engine/presence/states/heartbeat_inactive.js +++ b/lib/event-engine/presence/states/heartbeat_inactive.js @@ -1,9 +1,21 @@ "use strict"; +/** + * Inactive heratbeating state module. + * + * @internal + */ Object.defineProperty(exports, "__esModule", { value: true }); exports.HeartbeatInactiveState = void 0; const state_1 = require("../../core/state"); const events_1 = require("../events"); const heartbeating_1 = require("./heartbeating"); +/** + * Inactive heratbeating state + * + * State in which Presence Event Engine doesn't process any heartbeat requests (initial state). + * + * @internal + */ exports.HeartbeatInactiveState = new state_1.State('HEARTBEAT_INACTIVE'); exports.HeartbeatInactiveState.on(events_1.joined.type, (_, event) => heartbeating_1.HeartbeatingState.with({ channels: event.payload.channels, diff --git a/lib/event-engine/presence/states/heartbeat_reconnecting.js b/lib/event-engine/presence/states/heartbeat_reconnecting.js index d26321ccc..cc265a5c0 100644 --- a/lib/event-engine/presence/states/heartbeat_reconnecting.js +++ b/lib/event-engine/presence/states/heartbeat_reconnecting.js @@ -1,4 +1,9 @@ "use strict"; +/** + * Retry heartbeat state module. + * + * @internal + */ Object.defineProperty(exports, "__esModule", { value: true }); exports.HearbeatReconnectingState = void 0; const state_1 = require("../../core/state"); @@ -9,6 +14,13 @@ const heartbeat_stopped_1 = require("./heartbeat_stopped"); const heartbeat_cooldown_1 = require("./heartbeat_cooldown"); const heartbeat_inactive_1 = require("./heartbeat_inactive"); const heartbeat_failed_1 = require("./heartbeat_failed"); +/** + * Retry heartbeat state. + * + * State in which Presence Event Engine tries to recover after error which happened before. + * + * @internal + */ exports.HearbeatReconnectingState = new state_1.State('HEARBEAT_RECONNECTING'); exports.HearbeatReconnectingState.onEnter((context) => (0, effects_1.delayedHeartbeat)(context)); exports.HearbeatReconnectingState.onExit(() => effects_1.delayedHeartbeat.cancel); diff --git a/lib/event-engine/presence/states/heartbeat_stopped.js b/lib/event-engine/presence/states/heartbeat_stopped.js index 6c162f433..96f501270 100644 --- a/lib/event-engine/presence/states/heartbeat_stopped.js +++ b/lib/event-engine/presence/states/heartbeat_stopped.js @@ -1,10 +1,23 @@ "use strict"; +/** + * Heartbeat stopped state module. + * + * @internal + */ Object.defineProperty(exports, "__esModule", { value: true }); exports.HeartbeatStoppedState = void 0; const state_1 = require("../../core/state"); const events_1 = require("../events"); const heartbeat_inactive_1 = require("./heartbeat_inactive"); const heartbeating_1 = require("./heartbeating"); +/** + * Heartbeat stopped state. + * + * State in which Presence Event Engine still has information about active channels / groups, but doesn't wait for + * delayed heartbeat request sending. + * + * @internal + */ exports.HeartbeatStoppedState = new state_1.State('HEARTBEAT_STOPPED'); exports.HeartbeatStoppedState.on(events_1.joined.type, (context, event) => exports.HeartbeatStoppedState.with({ channels: [...context.channels, ...event.payload.channels], diff --git a/lib/event-engine/presence/states/heartbeating.js b/lib/event-engine/presence/states/heartbeating.js index 588b414ee..b93059d8e 100644 --- a/lib/event-engine/presence/states/heartbeating.js +++ b/lib/event-engine/presence/states/heartbeating.js @@ -1,4 +1,9 @@ "use strict"; +/** + * Heartbeating state module. + * + * @internal + */ Object.defineProperty(exports, "__esModule", { value: true }); exports.HeartbeatingState = void 0; const state_1 = require("../../core/state"); @@ -8,6 +13,13 @@ const heartbeat_cooldown_1 = require("./heartbeat_cooldown"); const heartbeat_reconnecting_1 = require("./heartbeat_reconnecting"); const heartbeat_stopped_1 = require("./heartbeat_stopped"); const heartbeat_inactive_1 = require("./heartbeat_inactive"); +/** + * Heartbeating state module. + * + * State in which Presence Event Engine send heartbeat REST API call. + * + * @internal + */ exports.HeartbeatingState = new state_1.State('HEARTBEATING'); exports.HeartbeatingState.onEnter((context) => (0, effects_1.heartbeat)(context.channels, context.groups)); exports.HeartbeatingState.on(events_1.heartbeatSuccess.type, (context, event) => { diff --git a/lib/event-engine/states/handshake_failed.js b/lib/event-engine/states/handshake_failed.js index ad658adb6..457940d56 100644 --- a/lib/event-engine/states/handshake_failed.js +++ b/lib/event-engine/states/handshake_failed.js @@ -1,10 +1,23 @@ "use strict"; +/** + * Failed initial subscription handshake (disconnected) state. + * + * @internal + */ Object.defineProperty(exports, "__esModule", { value: true }); exports.HandshakeFailedState = void 0; const state_1 = require("../core/state"); const events_1 = require("../events"); const handshaking_1 = require("./handshaking"); const unsubscribed_1 = require("./unsubscribed"); +/** + * Failed initial subscription handshake (disconnected) state. + * + * State in which Subscription Event Engine waits for user to try to reconnect after all retry attempts has been + * exhausted. + * + * @internal + */ exports.HandshakeFailedState = new state_1.State('HANDSHAKE_FAILED'); exports.HandshakeFailedState.on(events_1.subscriptionChange.type, (context, event) => handshaking_1.HandshakingState.with({ channels: event.payload.channels, @@ -23,7 +36,7 @@ exports.HandshakeFailedState.on(events_1.restore.type, (context, event) => { groups: event.payload.groups, cursor: { timetoken: event.payload.cursor.timetoken, - region: event.payload.cursor.region ? event.payload.cursor.region : (_b = (_a = context === null || context === void 0 ? void 0 : context.cursor) === null || _a === void 0 ? void 0 : _a.region) !== null && _b !== void 0 ? _b : 0, + region: event.payload.cursor.region ? event.payload.cursor.region : ((_b = (_a = context === null || context === void 0 ? void 0 : context.cursor) === null || _a === void 0 ? void 0 : _a.region) !== null && _b !== void 0 ? _b : 0), }, }); }); diff --git a/lib/event-engine/states/handshake_reconnecting.js b/lib/event-engine/states/handshake_reconnecting.js index 6c95593aa..9f8e61c9f 100644 --- a/lib/event-engine/states/handshake_reconnecting.js +++ b/lib/event-engine/states/handshake_reconnecting.js @@ -1,4 +1,9 @@ "use strict"; +/** + * Retry initial subscription handshake (disconnected) state. + * + * @internal + */ var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; @@ -13,6 +18,13 @@ const handshaking_1 = require("./handshaking"); const receiving_1 = require("./receiving"); const unsubscribed_1 = require("./unsubscribed"); const categories_1 = __importDefault(require("../../core/constants/categories")); +/** + * Retry initial subscription handshake (disconnected) state. + * + * State in which Subscription Event Engine tries to recover after error which happened before. + * + * @internal + */ exports.HandshakeReconnectingState = new state_1.State('HANDSHAKE_RECONNECTING'); exports.HandshakeReconnectingState.onEnter((context) => (0, effects_1.handshakeReconnect)(context)); exports.HandshakeReconnectingState.onExit(() => effects_1.handshakeReconnect.cancel); diff --git a/lib/event-engine/states/handshake_stopped.js b/lib/event-engine/states/handshake_stopped.js index 1cad18d75..d8af1cea1 100644 --- a/lib/event-engine/states/handshake_stopped.js +++ b/lib/event-engine/states/handshake_stopped.js @@ -1,10 +1,23 @@ "use strict"; +/** + * Stopped initial subscription handshake (disconnected) state. + * + * @internal + */ Object.defineProperty(exports, "__esModule", { value: true }); exports.HandshakeStoppedState = void 0; const state_1 = require("../core/state"); const events_1 = require("../events"); const handshaking_1 = require("./handshaking"); const unsubscribed_1 = require("./unsubscribed"); +/** + * Stopped initial subscription handshake (disconnected) state. + * + * State in which Subscription Event Engine still has information about subscription but doesn't have subscription + * cursor for next sequential subscribe REST API call. + * + * @internal + */ exports.HandshakeStoppedState = new state_1.State('HANDSHAKE_STOPPED'); exports.HandshakeStoppedState.on(events_1.subscriptionChange.type, (context, event) => exports.HandshakeStoppedState.with({ channels: event.payload.channels, diff --git a/lib/event-engine/states/handshaking.js b/lib/event-engine/states/handshaking.js index 13d3c1cca..b4cd08709 100644 --- a/lib/event-engine/states/handshaking.js +++ b/lib/event-engine/states/handshaking.js @@ -1,4 +1,9 @@ "use strict"; +/** + * Initial subscription handshake (disconnected) state. + * + * @internal + */ var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; @@ -12,6 +17,14 @@ const handshake_stopped_1 = require("./handshake_stopped"); const receiving_1 = require("./receiving"); const unsubscribed_1 = require("./unsubscribed"); const categories_1 = __importDefault(require("../../core/constants/categories")); +/** + * Initial subscription handshake (disconnected) state. + * + * State in which Subscription Event Engine tries to receive subscription cursor for next sequential subscribe REST + * API calls. + * + * @internal + */ exports.HandshakingState = new state_1.State('HANDSHAKING'); exports.HandshakingState.onEnter((context) => (0, effects_1.handshake)(context.channels, context.groups)); exports.HandshakingState.onExit(() => effects_1.handshake.cancel); diff --git a/lib/event-engine/states/receive_failed.js b/lib/event-engine/states/receive_failed.js index d6af9bfd3..3794a03b6 100644 --- a/lib/event-engine/states/receive_failed.js +++ b/lib/event-engine/states/receive_failed.js @@ -1,10 +1,23 @@ "use strict"; +/** + * Failed to receive real-time updates (disconnected) state. + * + * @internal + */ Object.defineProperty(exports, "__esModule", { value: true }); exports.ReceiveFailedState = void 0; const state_1 = require("../core/state"); const events_1 = require("../events"); const handshaking_1 = require("./handshaking"); const unsubscribed_1 = require("./unsubscribed"); +/** + * Failed to receive real-time updates (disconnected) state. + * + * State in which Subscription Event Engine waits for user to try to reconnect after all retry attempts has been + * exhausted. + * + * @internal + */ exports.ReceiveFailedState = new state_1.State('RECEIVE_FAILED'); exports.ReceiveFailedState.on(events_1.reconnect.type, (context, event) => { var _a; diff --git a/lib/event-engine/states/receive_reconnecting.js b/lib/event-engine/states/receive_reconnecting.js index 8f98426f1..428ffc028 100644 --- a/lib/event-engine/states/receive_reconnecting.js +++ b/lib/event-engine/states/receive_reconnecting.js @@ -1,4 +1,9 @@ "use strict"; +/** + * Reconnect to receive real-time updates (disconnected) state. + * + * @internal + */ var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; @@ -12,6 +17,13 @@ const receive_failed_1 = require("./receive_failed"); const receive_stopped_1 = require("./receive_stopped"); const unsubscribed_1 = require("./unsubscribed"); const categories_1 = __importDefault(require("../../core/constants/categories")); +/** + * Reconnect to receive real-time updates (disconnected) state. + * + * State in which Subscription Event Engine tries to recover after error which happened before. + * + * @internal + */ exports.ReceiveReconnectingState = new state_1.State('RECEIVE_RECONNECTING'); exports.ReceiveReconnectingState.onEnter((context) => (0, effects_1.receiveReconnect)(context)); exports.ReceiveReconnectingState.onExit(() => effects_1.receiveReconnect.cancel); diff --git a/lib/event-engine/states/receive_stopped.js b/lib/event-engine/states/receive_stopped.js index 1078a2e4b..e608078a5 100644 --- a/lib/event-engine/states/receive_stopped.js +++ b/lib/event-engine/states/receive_stopped.js @@ -1,10 +1,23 @@ "use strict"; +/** + * Stopped real-time updates (disconnected) state module. + * + * @internal + */ Object.defineProperty(exports, "__esModule", { value: true }); exports.ReceiveStoppedState = void 0; const state_1 = require("../core/state"); const events_1 = require("../events"); const handshaking_1 = require("./handshaking"); const unsubscribed_1 = require("./unsubscribed"); +/** + * Stopped real-time updates (disconnected) state. + * + * State in which Subscription Event Engine still has information about subscription but doesn't process real-time + * updates. + * + * @internal + */ exports.ReceiveStoppedState = new state_1.State('RECEIVE_STOPPED'); exports.ReceiveStoppedState.on(events_1.subscriptionChange.type, (context, event) => exports.ReceiveStoppedState.with({ channels: event.payload.channels, diff --git a/lib/event-engine/states/receiving.js b/lib/event-engine/states/receiving.js index 66f44e747..381c722fc 100644 --- a/lib/event-engine/states/receiving.js +++ b/lib/event-engine/states/receiving.js @@ -1,4 +1,9 @@ "use strict"; +/** + * Receiving real-time updates (connected) state module. + * + * @internal + */ var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; @@ -11,6 +16,13 @@ const unsubscribed_1 = require("./unsubscribed"); const receive_reconnecting_1 = require("./receive_reconnecting"); const receive_stopped_1 = require("./receive_stopped"); const categories_1 = __importDefault(require("../../core/constants/categories")); +/** + * Receiving real-time updates (connected) state. + * + * State in which Subscription Event Engine processes any real-time updates. + * + * @internal + */ exports.ReceivingState = new state_1.State('RECEIVING'); exports.ReceivingState.onEnter((context) => (0, effects_1.receiveMessages)(context.channels, context.groups, context.cursor)); exports.ReceivingState.onExit(() => effects_1.receiveMessages.cancel); diff --git a/lib/event-engine/states/unsubscribed.js b/lib/event-engine/states/unsubscribed.js index 10f3b2bad..29a2f7748 100644 --- a/lib/event-engine/states/unsubscribed.js +++ b/lib/event-engine/states/unsubscribed.js @@ -1,9 +1,21 @@ "use strict"; +/** + * Unsubscribed / disconnected state module. + * + * @internal + */ Object.defineProperty(exports, "__esModule", { value: true }); exports.UnsubscribedState = void 0; const state_1 = require("../core/state"); const events_1 = require("../events"); const handshaking_1 = require("./handshaking"); +/** + * Unsubscribed / disconnected state. + * + * State in which Subscription Event Engine doesn't process any real-time updates. + * + * @internal + */ exports.UnsubscribedState = new state_1.State('UNSUBSCRIBED'); exports.UnsubscribedState.on(events_1.subscriptionChange.type, (_, event) => handshaking_1.HandshakingState.with({ channels: event.payload.channels, diff --git a/lib/node/configuration.js b/lib/node/components/configuration.js similarity index 93% rename from lib/node/configuration.js rename to lib/node/components/configuration.js index f0dca5397..3a777742a 100644 --- a/lib/node/configuration.js +++ b/lib/node/components/configuration.js @@ -4,7 +4,7 @@ */ Object.defineProperty(exports, "__esModule", { value: true }); exports.setDefaults = void 0; -const configuration_1 = require("../core/interfaces/configuration"); +const configuration_1 = require("../../core/interfaces/configuration"); // -------------------------------------------------------- // ----------------------- Defaults ----------------------- // -------------------------------------------------------- diff --git a/lib/node/index.js b/lib/node/index.js index 41ebc06ee..bd2eb87c7 100644 --- a/lib/node/index.js +++ b/lib/node/index.js @@ -7,7 +7,7 @@ const buffer_1 = require("buffer"); const nodeCryptoModule_1 = require("../crypto/modules/NodeCryptoModule/nodeCryptoModule"); const node_1 = __importDefault(require("../file/modules/node")); const configuration_1 = require("../core/components/configuration"); -const configuration_2 = require("./configuration"); +const configuration_2 = require("./components/configuration"); const token_manager_1 = require("../core/components/token_manager"); const node_transport_1 = require("../transport/node-transport"); const middleware_1 = require("../transport/middleware"); @@ -21,6 +21,13 @@ const common_1 = __importDefault(require("../cbor/common")); * PubNub client for Node.js platform. */ class PubNub extends pubnub_common_1.PubNubCore { + /** + * Create and configure PubNub client core. + * + * @param configuration - User-provided PubNub client configuration. + * + * @returns Configured and ready to use PubNub client. + */ constructor(configuration) { const configurationCopy = (0, configuration_2.setDefaults)(configuration); const platformConfiguration = Object.assign(Object.assign({}, configurationCopy), { sdkFamily: 'Nodejs' }); @@ -31,7 +38,7 @@ class PubNub extends pubnub_common_1.PubNubCore { if (!cryptoConfiguration.cipherKey) return undefined; if (process.env.CRYPTO_MODULE !== 'disabled') { - return new nodeCryptoModule_1.CryptoModule({ + return new nodeCryptoModule_1.NodeCryptoModule({ default: new nodeCryptoModule_1.LegacyCryptor(Object.assign({}, cryptoConfiguration)), cryptors: [new nodeCryptoModule_1.AesCbcCryptor({ cipherKey: cryptoConfiguration.cipherKey })], }); @@ -99,5 +106,5 @@ class PubNub extends pubnub_common_1.PubNubCore { * Data encryption / decryption module constructor. */ // @ts-expect-error Allowed to simplify interface when module can be disabled. -PubNub.CryptoModule = process.env.CRYPTO_MODULE !== 'disabled' ? nodeCryptoModule_1.CryptoModule : undefined; +PubNub.CryptoModule = process.env.CRYPTO_MODULE !== 'disabled' ? nodeCryptoModule_1.NodeCryptoModule : undefined; module.exports = PubNub; diff --git a/lib/react_native/index.js b/lib/react_native/index.js index fb65ba063..0f89b88ba 100644 --- a/lib/react_native/index.js +++ b/lib/react_native/index.js @@ -26,6 +26,13 @@ global.Buffer = global.Buffer || buffer_1.Buffer; * PubNub client for React Native platform. */ class PubNub extends pubnub_common_1.PubNubCore { + /** + * Create and configure PubNub client core. + * + * @param configuration - User-provided PubNub client configuration. + * + * @returns Configured and ready to use PubNub client. + */ constructor(configuration) { const configurationCopy = (0, configuration_2.setDefaults)(configuration); const platformConfiguration = Object.assign(Object.assign({}, configurationCopy), { sdkFamily: 'ReactNative' }); diff --git a/lib/transport/middleware.js b/lib/transport/middleware.js index c7e60f30c..178534519 100644 --- a/lib/transport/middleware.js +++ b/lib/transport/middleware.js @@ -1,4 +1,9 @@ "use strict"; +/** + * Common PubNub Network Provider middleware module. + * + * @internal + */ Object.defineProperty(exports, "__esModule", { value: true }); exports.PubNubMiddleware = void 0; const transport_request_1 = require("../core/types/transport-request"); @@ -62,6 +67,11 @@ class RequestSignature { } } RequestSignature.textDecoder = new TextDecoder('utf-8'); +/** + * Common PubNub Network Provider middleware. + * + * @internal + */ class PubNubMiddleware { constructor(configuration) { this.configuration = configuration; diff --git a/lib/transport/node-transport.js b/lib/transport/node-transport.js index 95a8b911b..7778afd02 100644 --- a/lib/transport/node-transport.js +++ b/lib/transport/node-transport.js @@ -1,4 +1,9 @@ "use strict"; +/** + * Node.js Transport provider module. + * + * @internal + */ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); @@ -46,6 +51,8 @@ const pubnub_api_error_1 = require("../errors/pubnub-api-error"); const utils_1 = require("../core/utils"); /** * Class representing a fetch-based Node.js transport provider. + * + * @internal */ class NodeTransport { /** @@ -56,6 +63,8 @@ class NodeTransport { * @param [logVerbosity] - Whether verbose logging enabled or not. * * @returns Transport for performing network requests. + * + * @internal */ constructor(keepAlive = false, keepAliveSettings = { timeout: 30000 }, logVerbosity = false) { this.keepAlive = keepAlive; @@ -66,6 +75,8 @@ class NodeTransport { * Update request proxy configuration. * * @param configuration - New proxy configuration. + * + * @internal */ setProxy(configuration) { this.proxyConfiguration = configuration; @@ -123,6 +134,8 @@ class NodeTransport { * @param req - The {@link TransportRequest} object containing request information. * * @returns Request object generated from the {@link TransportRequest} object. + * + * @internal */ requestFromTransportRequest(req) { return __awaiter(this, void 0, void 0, function* () { @@ -165,6 +178,8 @@ class NodeTransport { * * @returns {HttpAgent | HttpsAgent | undefined} - The appropriate agent for the request, or * undefined if keep alive or proxy not requested. + * + * @internal */ agentForTransportRequest(req) { // Don't configure any agents if keep alive not requested. @@ -210,5 +225,7 @@ class NodeTransport { exports.NodeTransport = NodeTransport; /** * Service {@link ArrayBuffer} response decoder. + * + * @internal */ NodeTransport.decoder = new TextDecoder(); diff --git a/lib/transport/web-react-native-transport.js b/lib/transport/web-react-native-transport.js index 9c18341a2..53ce793f6 100644 --- a/lib/transport/web-react-native-transport.js +++ b/lib/transport/web-react-native-transport.js @@ -1,6 +1,8 @@ "use strict"; /** * Common browser and React Native Transport provider module. + * + * @internal */ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } @@ -17,8 +19,18 @@ const pubnub_api_error_1 = require("../errors/pubnub-api-error"); const utils_1 = require("../core/utils"); /** * Class representing a `fetch`-based browser and React Native transport provider. + * + * @internal */ class WebReactNativeTransport { + /** + * Create and configure transport provider for Web and Rect environments. + * + * @param [keepAlive] - Whether client should try to keep connections open for reuse or not. + * @param logVerbosity - Whether verbose logs should be printed or not. + * + * @internal + */ constructor(keepAlive = false, logVerbosity) { this.keepAlive = keepAlive; this.logVerbosity = logVerbosity; @@ -50,7 +62,10 @@ class WebReactNativeTransport { reject(new Error('Request timeout')); }, req.timeout * 1000); }); - return Promise.race([fetch(request, { signal: abortController === null || abortController === void 0 ? void 0 : abortController.signal }), requestTimeout]) + return Promise.race([ + fetch(request, { signal: abortController === null || abortController === void 0 ? void 0 : abortController.signal, credentials: 'omit', cache: 'no-cache' }), + requestTimeout, + ]) .then((response) => response.arrayBuffer().then((arrayBuffer) => [response, arrayBuffer])) .then((response) => { const responseBody = response[1].byteLength > 0 ? response[1] : undefined; @@ -85,6 +100,8 @@ class WebReactNativeTransport { * @param req - The {@link TransportRequest} object containing request information. * * @returns Request object generated from the {@link TransportRequest} object. + * + * @internal */ requestFromTransportRequest(req) { return __awaiter(this, void 0, void 0, function* () { @@ -131,6 +148,8 @@ class WebReactNativeTransport { * @param request - Platform-specific * @param [elapsed] - How many seconds passed since request processing started. * @param [body] - Service response (if available). + * + * @internal */ logRequestProcessProgress(request, elapsed, body) { if (!this.logVerbosity) @@ -153,5 +172,7 @@ class WebReactNativeTransport { exports.WebReactNativeTransport = WebReactNativeTransport; /** * Service {@link ArrayBuffer} response decoder. + * + * @internal */ WebReactNativeTransport.decoder = new TextDecoder(); diff --git a/lib/types/cbor/common.d.ts b/lib/types/cbor/common.d.ts deleted file mode 100644 index 4ccbdd2ba..000000000 --- a/lib/types/cbor/common.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -/** - * Cbor decoder module. - */ -export {}; diff --git a/lib/types/core/components/abort_signal.d.ts b/lib/types/core/components/abort_signal.d.ts deleted file mode 100644 index 926a042d3..000000000 --- a/lib/types/core/components/abort_signal.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export declare class AbortError extends Error { - name: string; - constructor(); -} diff --git a/lib/types/core/components/base64_codec.d.ts b/lib/types/core/components/base64_codec.d.ts deleted file mode 100644 index cb0ff5c3b..000000000 --- a/lib/types/core/components/base64_codec.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/lib/types/core/components/configuration.d.ts b/lib/types/core/components/configuration.d.ts deleted file mode 100644 index 2fb4a5f80..000000000 --- a/lib/types/core/components/configuration.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -/** - * {@link PubNub} client configuration module. - */ -export {}; diff --git a/lib/types/core/components/cryptography/hmac-sha256.d.ts b/lib/types/core/components/cryptography/hmac-sha256.d.ts deleted file mode 100644 index 112f25199..000000000 --- a/lib/types/core/components/cryptography/hmac-sha256.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export namespace mode { - let ECB: any; -} diff --git a/lib/types/core/components/cryptography/index.d.ts b/lib/types/core/components/cryptography/index.d.ts deleted file mode 100644 index b3f187c0b..000000000 --- a/lib/types/core/components/cryptography/index.d.ts +++ /dev/null @@ -1,143 +0,0 @@ -/** - * Legacy cryptography module. - */ -import { CryptorConfiguration } from '../../interfaces/crypto-module'; -import { Payload } from '../../types/api'; -/** - * Legacy cryptor configuration options. - */ -type CryptoConfiguration = { - encryptKey?: boolean; - keyEncoding?: 'hex' | 'utf8' | 'base64' | 'binary'; - keyLength?: 128 | 256; - mode?: 'ecb' | 'cbc'; -}; -export default class { - private readonly configuration; - /** - * Crypto initialization vector. - */ - private iv; - /** - * List os allowed cipher key encodings. - */ - private allowedKeyEncodings; - /** - * Allowed cipher key lengths. - */ - private allowedKeyLengths; - /** - * Allowed crypto modes. - */ - private allowedModes; - /** - * Default cryptor configuration options. - */ - private readonly defaultOptions; - constructor(configuration: CryptorConfiguration); - /** - * Generate HMAC-SHA256 hash from input data. - * - * @param data - Data from which hash should be generated. - * - * @returns HMAC-SHA256 hash from provided `data`. - */ - HMACSHA256(data: string): string; - /** - * Generate SHA256 hash from input data. - * - * @param data - Data from which hash should be generated. - * - * @returns SHA256 hash from provided `data`. - */ - SHA256(data: string): string; - /** - * Encrypt provided data. - * - * @param data - Source data which should be encrypted. - * @param [customCipherKey] - Custom cipher key (different from defined on client level). - * @param [options] - Specific crypto configuration options. - * - * @returns Encrypted `data`. - */ - encrypt(data: string | Payload, customCipherKey?: string, options?: CryptoConfiguration): string; - /** - * Decrypt provided data. - * - * @param data - Encrypted data which should be decrypted. - * @param [customCipherKey] - Custom cipher key (different from defined on client level). - * @param [options] - Specific crypto configuration options. - * - * @returns Decrypted `data`. - */ - decrypt(data: string, customCipherKey?: string, options?: CryptoConfiguration): Payload | null; - /** - * Encrypt provided data. - * - * @param data - Source data which should be encrypted. - * @param [customCipherKey] - Custom cipher key (different from defined on client level). - * @param [options] - Specific crypto configuration options. - * - * @returns Encrypted `data` as string. - */ - private pnEncrypt; - /** - * Decrypt provided data. - * - * @param data - Encrypted data which should be decrypted. - * @param [customCipherKey] - Custom cipher key (different from defined on client level). - * @param [options] - Specific crypto configuration options. - * - * @returns Decrypted `data`. - */ - private pnDecrypt; - /** - * Pre-process provided custom crypto configuration. - * - * @param incomingOptions - Configuration which should be pre-processed before use. - * - * @returns Normalized crypto configuration options. - */ - private parseOptions; - /** - * Decode provided cipher key. - * - * @param key - Key in `encoding` provided by `options`. - * @param options - Crypto configuration options with cipher key details. - * - * @returns Array buffer with decoded key. - */ - private decodeKey; - /** - * Add padding to the cipher key. - * - * @param key - Key which should be padded. - * @param options - Crypto configuration options with cipher key details. - * - * @returns Properly padded cipher key. - */ - private getPaddedKey; - /** - * Cipher mode. - * - * @param options - Crypto configuration with information about cipher mode. - * - * @returns Crypto cipher mode. - */ - private getMode; - /** - * Cipher initialization vector. - * - * @param options - Crypto configuration with information about cipher mode. - * - * @returns Initialization vector. - */ - private getIV; - /** - * Random initialization vector. - * - * @returns Generated random initialization vector. - */ - private getRandomIV; -} -export {}; diff --git a/lib/types/core/components/deduping_manager.d.ts b/lib/types/core/components/deduping_manager.d.ts deleted file mode 100644 index 8c072ad6d..000000000 --- a/lib/types/core/components/deduping_manager.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * Real-time events deduplication manager. - * - * @internal - */ -export default class _default { - constructor({ config }: { - config: any; - }); - _config: any; - hashHistory: any[]; - getKey(message: any): string; - isDuplicate(message: any): boolean; - addEntry(message: any): void; - clearHistory(): void; -} diff --git a/lib/types/core/components/eventEmitter.d.ts b/lib/types/core/components/eventEmitter.d.ts deleted file mode 100644 index cb0ff5c3b..000000000 --- a/lib/types/core/components/eventEmitter.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/lib/types/core/components/listener_manager.d.ts b/lib/types/core/components/listener_manager.d.ts deleted file mode 100644 index 054904377..000000000 --- a/lib/types/core/components/listener_manager.d.ts +++ /dev/null @@ -1,76 +0,0 @@ -/** - * Events listener manager module. - */ -import * as Subscription from '../types/api/subscription'; -import { Status, StatusEvent } from '../types/api'; -/** - * Real-time events listener. - */ -export type Listener = { - /** - * Real-time message events listener. - * - * @param message - Received message. - */ - message?: (message: Subscription.Message) => void; - /** - * Real-time message signal listener. - * - * @param signal - Received signal. - */ - signal?: (signal: Subscription.Signal) => void; - /** - * Real-time presence change events listener. - * - * @param presence - Received presence chane information. - */ - presence?: (presence: Subscription.Presence) => void; - /** - * Real-time App Context Objects change events listener. - * - * @param object - Changed App Context Object information. - */ - objects?: (object: Subscription.AppContextObject) => void; - /** - * Real-time message actions events listener. - * - * @param action - Message action information. - */ - messageAction?: (action: Subscription.MessageAction) => void; - /** - * Real-time file share events listener. - * - * @param file - Shared file information. - */ - file?: (file: Subscription.File) => void; - /** - * Real-time PubNub client status change event. - * - * @param status - PubNub client status information - */ - status?: (status: Status | StatusEvent) => void; - /** - * Real-time User App Context Objects change events listener. - * - * @param user - User App Context Object information. - * - * @deprecated Use {@link objects} listener callback instead. - */ - user?: (user: Subscription.UserAppContextObject) => void; - /** - * Real-time Space App Context Objects change events listener. - * - * @param space - Space App Context Object information. - * - * @deprecated Use {@link objects} listener callback instead. - */ - space?: (space: Subscription.SpaceAppContextObject) => void; - /** - * Real-time VSP Membership App Context Objects change events listener. - * - * @param membership - VSP Membership App Context Object information. - * - * @deprecated Use {@link objects} listener callback instead. - */ - membership?: (membership: Subscription.VSPMembershipAppContextObject) => void; -}; diff --git a/lib/types/core/components/push_payload.d.ts b/lib/types/core/components/push_payload.d.ts deleted file mode 100644 index 677843f48..000000000 --- a/lib/types/core/components/push_payload.d.ts +++ /dev/null @@ -1,636 +0,0 @@ -/** - * Payload for `pn_apns` field in published message. - */ -type APNSPayload = { - /** - * Payload for Apple Push Notification Service. - */ - aps: { - /** - * Configuration of visual notification representation. - */ - alert?: { - /** - * First line title. - * - * Title which is shown in bold on the first line of notification bubble. - */ - title?: string; - /** - * Second line title. - * - * Subtitle which is shown under main title with smaller font. - */ - subtitle?: string; - /** - * Notification body. - * - * Body which is shown to the user after interaction with notification. - */ - body?: string; - }; - /** - * Unread notifications count badge value. - */ - badge?: number | null; - /** - * Name of the file from resource bundle which should be played when notification received. - */ - sound?: string; - /** - * Silent notification flag. - */ - 'content-available'?: 1; - }; - /** - * APNS2 payload recipients information. - */ - pn_push: PubNubAPNS2Configuration[]; -}; -/** - * APNS2 configuration type. - */ -type APNS2Configuration = { - /** - * Notification group / collapse identifier. Value will be used in APNS POST request as `apns-collapse-id` header - * value. - */ - collapseId?: string; - /** - * Date till which APNS will try to deliver notification to target device. Value will be used in APNS POST request as - * `apns-expiration` header value. - */ - expirationDate?: Date; - /** - * List of topics which should receive this notification. - */ - targets: APNS2Target[]; -}; -/** - * Preformatted for PubNub service `APNS2` configuration type. - */ -type PubNubAPNS2Configuration = { - /** - * PubNub service authentication method for APNS. - */ - auth_method: 'token'; - /** - * Target entities which should receive notification. - */ - targets: PubNubAPNS2Target[]; - /** - * Notifications group collapse identifier. - */ - collapse_id?: string; - /** - * Notification receive expiration date. - * - * Date after which notification won't be delivered. - */ - expiration?: string; - /** - * APNS protocol version. - */ - version: 'v2'; -}; -/** - * APNS2 configuration target type. - */ -type APNS2Target = { - /** - * Notifications topic name (usually it is bundle identifier of application for Apple platform). - * - * **Important:** Required only if `pushGateway` is set to `apns2`. - */ - topic: string; - /** - * Environment within which registered devices to which notifications should be delivered. - * - * Available: - * - `development` - * - `production` - * - * @default `development` - */ - environment?: 'development' | 'production'; - /** - * List of devices (their push tokens) to which this notification shouldn't be delivered. - */ - excludedDevices?: string[]; -}; -/** - * Preformatted for PubNub service `APNS2` configuration target type. - */ -type PubNubAPNS2Target = Omit & { - /** - * List of devices (their push tokens) to which this notification shouldn't be delivered. - */ - excluded_devices?: string[]; -}; -/** - * Payload for `pn_gcm` field in published message. - */ -type FCMPayload = { - /** - * Configuration of visual notification representation. - */ - notification?: { - /** - * First line title. - * - * Title which is shown in bold on the first line of notification bubble. - */ - title?: string; - /** - * Notification body. - * - * Body which is shown to the user after interaction with notification. - */ - body?: string; - /** - * Name of the icon file from resource bundle which should be shown on notification. - */ - icon?: string; - /** - * Name of the file from resource bundle which should be played when notification received. - */ - sound?: string; - tag?: string; - }; - /** - * Configuration of data notification. - * - * Silent notification configuration. - */ - data?: { - notification?: FCMPayload['notification']; - }; -}; -/** - * Base notification payload object. - */ -declare class BaseNotificationPayload { - /** - * Notification main title. - */ - protected _title?: string; - /** - * Notification second-line title. - */ - protected _subtitle?: string; - /** - * Name of the sound which should be played for received notification. - */ - protected _sound?: string; - /** - * Value which should be placed on application badge (if required). - */ - protected _badge?: number | null; - /** - * Notification main body message. - */ - protected _body?: string; - /** - * Object in resulting message where notification payload should be added. - */ - protected _payload: unknown; - constructor(payload: unknown, title?: string, body?: string); - /** - * Retrieve resulting notification payload content for message. - * - * @returns Preformatted push notification payload data. - */ - get payload(): unknown; - /** - * Update notification title. - * - * @param value - New notification title. - */ - set title(value: string | undefined); - /** - * Update notification subtitle. - * - * @param value - New second-line notification title. - */ - set subtitle(value: string | undefined); - /** - * Update notification body. - * - * @param value - Update main notification message (shown when expanded). - */ - set body(value: string | undefined); - /** - * Update application badge number. - * - * @param value - Number which should be shown in application badge upon receiving notification. - */ - set badge(value: number | null | undefined); - /** - * Update notification sound. - * - * @param value - Name of the sound file which should be played upon notification receive. - */ - set sound(value: string | undefined); - /** - * Platform-specific structure initialization. - */ - protected setDefaultPayloadStructure(): void; - /** - * Translate data object into PubNub push notification payload object. - * - * @returns Preformatted push notification payload. - */ - toObject(): unknown; -} -/** - * Message payload for Apple Push Notification Service. - */ -export declare class APNSNotificationPayload extends BaseNotificationPayload { - /** - * List with notification receivers information. - */ - private _configurations?; - /** - * Type of push notification service for which payload will be created. - */ - private _apnsPushType; - /** - * Whether resulting payload should trigger silent notification or not. - */ - private _isSilent; - get payload(): APNSPayload; - /** - * Update notification receivers configuration. - * - * @param value - New APNS2 configurations. - */ - set configurations(value: APNS2Configuration[]); - /** - * Notification payload. - * - * @returns Platform-specific part of PubNub notification payload. - */ - get notification(): { - /** - * Configuration of visual notification representation. - */ - alert?: { - /** - * First line title. - * - * Title which is shown in bold on the first line of notification bubble. - */ - title?: string | undefined; - /** - * Second line title. - * - * Subtitle which is shown under main title with smaller font. - */ - subtitle?: string | undefined; - /** - * Notification body. - * - * Body which is shown to the user after interaction with notification. - */ - body?: string | undefined; - } | undefined; - /** - * Unread notifications count badge value. - */ - badge?: number | null | undefined; - /** - * Name of the file from resource bundle which should be played when notification received. - */ - sound?: string | undefined; - /** - * Silent notification flag. - */ - 'content-available'?: 1 | undefined; - }; - /** - * Notification title. - * - * @returns Main notification title. - */ - get title(): string | undefined; - /** - * Update notification title. - * - * @param value - New notification title. - */ - set title(value: string | undefined); - /** - * Notification subtitle. - * - * @returns Second-line notification title. - */ - get subtitle(): string | undefined; - /** - * Update notification subtitle. - * - * @param value - New second-line notification title. - */ - set subtitle(value: string | undefined); - /** - * Notification body. - * - * @returns Main notification message (shown when expanded). - */ - get body(): string | undefined; - /** - * Update notification body. - * - * @param value - Update main notification message (shown when expanded). - */ - set body(value: string | undefined); - /** - * Retrieve unread notifications number. - * - * @returns Number of unread notifications which should be shown on application badge. - */ - get badge(): number | null | undefined; - /** - * Update application badge number. - * - * @param value - Number which should be shown in application badge upon receiving notification. - */ - set badge(value: number | null | undefined); - /** - * Retrieve notification sound file. - * - * @returns Notification sound file name from resource bundle. - */ - get sound(): string | undefined; - /** - * Update notification sound. - * - * @param value - Name of the sound file which should be played upon notification receive. - */ - set sound(value: string | undefined); - /** - * Set whether notification should be silent or not. - * - * `content-available` notification type will be used to deliver silent notification if set to `true`. - * - * @param value - Whether notification should be sent as silent or not. - */ - set silent(value: boolean); - protected setDefaultPayloadStructure(): void; - toObject(): APNSPayload | null; - /** - * Create PubNub push notification service APNS2 configuration information object. - * - * @param configuration - Source user-provided APNS2 configuration. - * - * @returns Preformatted for PubNub service APNS2 configuration information. - */ - private objectFromAPNS2Configuration; - /** - * Create PubNub push notification service APNS2 target information object. - * - * @param target - Source user-provided data. - * - * @returns Preformatted for PubNub service APNS2 target information. - */ - private objectFromAPNSTarget; -} -/** - * Message payload for Firebase Clouse Messaging service. - */ -export declare class FCMNotificationPayload extends BaseNotificationPayload { - /** - * Whether resulting payload should trigger silent notification or not. - */ - private _isSilent?; - /** - * Name of the icon file from resource bundle which should be shown on notification. - */ - private _icon?; - private _tag?; - get payload(): FCMPayload; - /** - * Notification payload. - * - * @returns Platform-specific part of PubNub notification payload. - */ - get notification(): { - /** - * First line title. - * - * Title which is shown in bold on the first line of notification bubble. - */ - title?: string | undefined; - /** - * Notification body. - * - * Body which is shown to the user after interaction with notification. - */ - body?: string | undefined; - /** - * Name of the icon file from resource bundle which should be shown on notification. - */ - icon?: string | undefined; - /** - * Name of the file from resource bundle which should be played when notification received. - */ - sound?: string | undefined; - tag?: string | undefined; - } | undefined; - /** - * Silent notification payload. - * - * @returns Silent notification payload (data notification). - */ - get data(): { - notification?: { - /** - * First line title. - * - * Title which is shown in bold on the first line of notification bubble. - */ - title?: string | undefined; - /** - * Notification body. - * - * Body which is shown to the user after interaction with notification. - */ - body?: string | undefined; - /** - * Name of the icon file from resource bundle which should be shown on notification. - */ - icon?: string | undefined; - /** - * Name of the file from resource bundle which should be played when notification received. - */ - sound?: string | undefined; - tag?: string | undefined; - } | undefined; - } | undefined; - /** - * Notification title. - * - * @returns Main notification title. - */ - get title(): string | undefined; - /** - * Update notification title. - * - * @param value - New notification title. - */ - set title(value: string | undefined); - /** - * Notification body. - * - * @returns Main notification message (shown when expanded). - */ - get body(): string | undefined; - /** - * Update notification body. - * - * @param value - Update main notification message (shown when expanded). - */ - set body(value: string | undefined); - /** - * Retrieve notification sound file. - * - * @returns Notification sound file name from resource bundle. - */ - get sound(): string | undefined; - /** - * Update notification sound. - * - * @param value - Name of the sound file which should be played upon notification receive. - */ - set sound(value: string | undefined); - /** - * Retrieve notification icon file. - * - * @returns Notification icon file name from resource bundle. - */ - get icon(): string | undefined; - /** - * Update notification icon. - * - * @param value - Name of the icon file which should be shown on notification. - */ - set icon(value: string | undefined); - get tag(): string | undefined; - set tag(value: string | undefined); - /** - * Set whether notification should be silent or not. - * - * All notification data will be sent under `data` field if set to `true`. - * - * @param value - Whether notification should be sent as silent or not. - */ - set silent(value: boolean); - protected setDefaultPayloadStructure(): void; - toObject(): FCMPayload | null; -} -declare class NotificationsPayload { - /** - * Resulting message payload for notification services. - */ - private readonly _payload; - /** - * Whether notifications debugging session should be used or not. - */ - private _debugging?; - /** - * First line title. - * - * Title which is shown in bold on the first line of notification bubble. - */ - private readonly _title; - /** - * Second line title. - * - * Subtitle which is shown under main title with smaller font. - */ - private _subtitle?; - /** - * Notification main body message. - */ - private readonly _body; - /** - * Value which should be placed on application badge (if required). - */ - private _badge?; - /** - * Name of the file from resource bundle which should be played when notification received. - */ - private _sound?; - /** - * APNS-specific message payload. - */ - apns: APNSNotificationPayload; - /** - * FCM-specific message payload. - */ - fcm: FCMNotificationPayload; - constructor(title: string, body: string); - set debugging(value: boolean); - /** - * Notification title. - * - * @returns Main notification title. - */ - get title(): string; - /** - * Notification subtitle. - * - * @returns Second-line notification title. - */ - get subtitle(): string | undefined; - /** - * Update notification subtitle. - * - * @param value - New second-line notification title. - */ - set subtitle(value: string | undefined); - /** - * Notification body. - * - * @returns Main notification message (shown when expanded). - */ - get body(): string; - /** - * Retrieve unread notifications number. - * - * @returns Number of unread notifications which should be shown on application badge. - */ - get badge(): number | undefined; - /** - * Update application badge number. - * - * @param value - Number which should be shown in application badge upon receiving notification. - */ - set badge(value: number | undefined); - /** - * Retrieve notification sound file. - * - * @returns Notification sound file name from resource bundle. - */ - get sound(): string | undefined; - /** - * Update notification sound. - * - * @param value - Name of the sound file which should be played upon notification receive. - */ - set sound(value: string | undefined); - /** - * Build notifications platform for requested platforms. - * - * @param platforms - List of platforms for which payload should be added to final dictionary. Supported values: - * gcm, apns, and apns2. - * - * @returns Object with data, which can be sent with publish method call and trigger remote notifications for - * specified platforms. - */ - buildPayload(platforms: string[]): { - pn_apns?: APNSPayload | undefined; - pn_gcm?: FCMPayload | undefined; - pn_debug?: boolean | undefined; - }; -} -export default NotificationsPayload; diff --git a/lib/types/core/components/reconnection_manager.d.ts b/lib/types/core/components/reconnection_manager.d.ts deleted file mode 100644 index 2b32dd6da..000000000 --- a/lib/types/core/components/reconnection_manager.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -/** - * Subscription reconnection-manager. - * - * **Note:** Reconnection manger rely on legacy time-based availability check. - */ -export {}; diff --git a/lib/types/core/components/request.d.ts b/lib/types/core/components/request.d.ts deleted file mode 100644 index cb0ff5c3b..000000000 --- a/lib/types/core/components/request.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/lib/types/core/components/stringify_buffer_keys.d.ts b/lib/types/core/components/stringify_buffer_keys.d.ts deleted file mode 100644 index cb0ff5c3b..000000000 --- a/lib/types/core/components/stringify_buffer_keys.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/lib/types/core/components/subject.d.ts b/lib/types/core/components/subject.d.ts deleted file mode 100644 index cb0ff5c3b..000000000 --- a/lib/types/core/components/subject.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/lib/types/core/components/subscription-manager.d.ts b/lib/types/core/components/subscription-manager.d.ts deleted file mode 100644 index 6807d1c06..000000000 --- a/lib/types/core/components/subscription-manager.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -/** - * Subscription manager module. - */ -export {}; diff --git a/lib/types/core/components/token_manager.d.ts b/lib/types/core/components/token_manager.d.ts deleted file mode 100644 index ca862c226..000000000 --- a/lib/types/core/components/token_manager.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -/** - * PubNub Access Token Manager module. - */ -export {}; diff --git a/lib/types/core/components/uuid.d.ts b/lib/types/core/components/uuid.d.ts deleted file mode 100644 index 0131316e7..000000000 --- a/lib/types/core/components/uuid.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -declare const _default: { - createUUID(): any; -}; -export default _default; diff --git a/lib/types/core/constants/categories.d.ts b/lib/types/core/constants/categories.d.ts deleted file mode 100644 index bc372ba22..000000000 --- a/lib/types/core/constants/categories.d.ts +++ /dev/null @@ -1,75 +0,0 @@ -/** - * Request processing status categories. - */ -declare enum StatusCategory { - /** - * Call failed when network was unable to complete the call. - */ - PNNetworkIssuesCategory = "PNNetworkIssuesCategory", - /** - * Network call timed out. - */ - PNTimeoutCategory = "PNTimeoutCategory", - /** - * Request has been cancelled. - */ - PNCancelledCategory = "PNCancelledCategory", - /** - * Server responded with bad response. - */ - PNBadRequestCategory = "PNBadRequestCategory", - /** - * Server responded with access denied. - */ - PNAccessDeniedCategory = "PNAccessDeniedCategory", - /** - * Incomplete parameters provided for used endpoint. - */ - PNValidationErrorCategory = "PNValidationErrorCategory", - /** - * PubNub request acknowledgment status. - * - * Some API endpoints respond with request processing status w/o useful data. - */ - PNAcknowledgmentCategory = "PNAcknowledgmentCategory", - /** - * Something strange happened; please check the logs. - */ - PNUnknownCategory = "PNUnknownCategory", - /** - * SDK will announce when the network appears to be connected again. - */ - PNNetworkUpCategory = "PNNetworkUpCategory", - /** - * SDK will announce when the network appears to down. - */ - PNNetworkDownCategory = "PNNetworkDownCategory", - /** - * PubNub client reconnected to the real-time updates stream. - */ - PNReconnectedCategory = "PNReconnectedCategory", - /** - * PubNub client connected to the real-time updates stream. - */ - PNConnectedCategory = "PNConnectedCategory", - /** - * Received real-time updates exceed specified threshold. - * - * After temporary disconnection and catchup, this category means that potentially some - * real-time updates have been pushed into `storage` and need to be requested separately. - */ - PNRequestMessageCountExceededCategory = "PNRequestMessageCountExceededCategory", - /** - * PubNub client disconnected from the real-time updates streams. - */ - PNDisconnectedCategory = "PNDisconnectedCategory", - /** - * PubNub client wasn't able to connect to the real-time updates streams. - */ - PNConnectionErrorCategory = "PNConnectionErrorCategory", - /** - * PubNub client unexpectedly disconnected from the real-time updates streams. - */ - PNDisconnectedUnexpectedlyCategory = "PNDisconnectedUnexpectedlyCategory" -} -export default StatusCategory; diff --git a/lib/types/core/constants/operations.d.ts b/lib/types/core/constants/operations.d.ts deleted file mode 100644 index 2684a4880..000000000 --- a/lib/types/core/constants/operations.d.ts +++ /dev/null @@ -1,203 +0,0 @@ -declare enum RequestOperation { - /** - * Data publish REST API operation. - */ - PNPublishOperation = "PNPublishOperation", - /** - * Signal sending REST API operation. - */ - PNSignalOperation = "PNSignalOperation", - /** - * Subscribe for real-time updates REST API operation. - * - * User's presence change on specified entities will trigger `join` event. - */ - PNSubscribeOperation = "PNSubscribeOperation", - /** - * Unsubscribe from real-time updates REST API operation. - * - * User's presence change on specified entities will trigger `leave` event. - */ - PNUnsubscribeOperation = "PNUnsubscribeOperation", - /** - * Fetch user's presence information REST API operation. - */ - PNWhereNowOperation = "PNWhereNowOperation", - /** - * Fetch channel's presence information REST API operation. - */ - PNHereNowOperation = "PNHereNowOperation", - /** - * Fetch global presence information REST API operation. - */ - PNGlobalHereNowOperation = "PNGlobalHereNowOperation", - /** - * Update user's information associated with specified channel REST API operation. - */ - PNSetStateOperation = "PNSetStateOperation", - /** - * Fetch user's information associated with the specified channel REST API operation. - */ - PNGetStateOperation = "PNGetStateOperation", - /** - * Announce presence on managed channels REST API operation. - */ - PNHeartbeatOperation = "PNHeartbeatOperation", - /** - * Add a reaction to the specified message REST API operation. - */ - PNAddMessageActionOperation = "PNAddActionOperation", - /** - * Remove reaction from the specified message REST API operation. - */ - PNRemoveMessageActionOperation = "PNRemoveMessageActionOperation", - /** - * Fetch reactions for specific message REST API operation. - */ - PNGetMessageActionsOperation = "PNGetMessageActionsOperation", - PNTimeOperation = "PNTimeOperation", - /** - * Channel history REST API operation. - */ - PNHistoryOperation = "PNHistoryOperation", - /** - * Delete messages from channel history REST API operation. - */ - PNDeleteMessagesOperation = "PNDeleteMessagesOperation", - /** - * History for channels REST API operation. - */ - PNFetchMessagesOperation = "PNFetchMessagesOperation", - /** - * Number of messages for channels in specified time frame REST API operation. - */ - PNMessageCounts = "PNMessageCountsOperation", - /** - * Fetch users metadata REST API operation. - */ - PNGetAllUUIDMetadataOperation = "PNGetAllUUIDMetadataOperation", - /** - * Fetch user metadata REST API operation. - */ - PNGetUUIDMetadataOperation = "PNGetUUIDMetadataOperation", - /** - * Set user metadata REST API operation. - */ - PNSetUUIDMetadataOperation = "PNSetUUIDMetadataOperation", - /** - * Remove user metadata REST API operation. - */ - PNRemoveUUIDMetadataOperation = "PNRemoveUUIDMetadataOperation", - /** - * Fetch channels metadata REST API operation. - */ - PNGetAllChannelMetadataOperation = "PNGetAllChannelMetadataOperation", - /** - * Fetch channel metadata REST API operation. - */ - PNGetChannelMetadataOperation = "PNGetChannelMetadataOperation", - /** - * Set channel metadata REST API operation. - */ - PNSetChannelMetadataOperation = "PNSetChannelMetadataOperation", - /** - * Remove channel metadata REST API operation. - */ - PNRemoveChannelMetadataOperation = "PNRemoveChannelMetadataOperation", - /** - * Fetch channel members REST API operation. - */ - PNGetMembersOperation = "PNGetMembersOperation", - /** - * Update channel members REST API operation. - */ - PNSetMembersOperation = "PNSetMembersOperation", - /** - * Fetch channel memberships REST API operation. - */ - PNGetMembershipsOperation = "PNGetMembershipsOperation", - /** - * Update channel memberships REST API operation. - */ - PNSetMembershipsOperation = "PNSetMembershipsOperation", - /** - * Fetch list of files sent to the channel REST API operation. - */ - PNListFilesOperation = "PNListFilesOperation", - /** - * Retrieve file upload URL REST API operation. - */ - PNGenerateUploadUrlOperation = "PNGenerateUploadUrlOperation", - /** - * Upload file to the channel REST API operation. - */ - PNPublishFileOperation = "PNPublishFileOperation", - /** - * Publish File Message to the channel REST API operation. - */ - PNPublishFileMessageOperation = "PNPublishFileMessageOperation", - /** - * Retrieve file download URL REST API operation. - */ - PNGetFileUrlOperation = "PNGetFileUrlOperation", - /** - * Download file from the channel REST API operation. - */ - PNDownloadFileOperation = "PNDownloadFileOperation", - /** - * Delete file sent to the channel REST API operation. - */ - PNDeleteFileOperation = "PNDeleteFileOperation", - /** - * Register channels with device push notifications REST API operation. - */ - PNAddPushNotificationEnabledChannelsOperation = "PNAddPushNotificationEnabledChannelsOperation", - /** - * Unregister channels with device push notifications REST API operation. - */ - PNRemovePushNotificationEnabledChannelsOperation = "PNRemovePushNotificationEnabledChannelsOperation", - /** - * Fetch list of channels with enabled push notifications for device REST API operation. - */ - PNPushNotificationEnabledChannelsOperation = "PNPushNotificationEnabledChannelsOperation", - /** - * Disable push notifications for device REST API operation. - */ - PNRemoveAllPushNotificationsOperation = "PNRemoveAllPushNotificationsOperation", - /** - * Fetch channels groups list REST API operation. - */ - PNChannelGroupsOperation = "PNChannelGroupsOperation", - /** - * Remove specified channel group REST API operation. - */ - PNRemoveGroupOperation = "PNRemoveGroupOperation", - /** - * Fetch list of channels for the specified channel group REST API operation. - */ - PNChannelsForGroupOperation = "PNChannelsForGroupOperation", - /** - * Add list of channels to the specified channel group REST API operation. - */ - PNAddChannelsToGroupOperation = "PNAddChannelsToGroupOperation", - /** - * Remove list of channels from the specified channel group REST API operation. - */ - PNRemoveChannelsFromGroupOperation = "PNRemoveChannelsFromGroupOperation", - /** - * Generate authorized token REST API operation. - */ - PNAccessManagerGrant = "PNAccessManagerGrant", - /** - * Generate authorized token REST API operation. - */ - PNAccessManagerGrantToken = "PNAccessManagerGrantToken", - PNAccessManagerAudit = "PNAccessManagerAudit", - /** - * Revoke authorized token REST API operation. - */ - PNAccessManagerRevokeToken = "PNAccessManagerRevokeToken", - PNHandshakeOperation = "PNHandshakeOperation", - PNReceiveMessagesOperation = "PNReceiveMessagesOperation" -} -export default RequestOperation; diff --git a/lib/types/core/endpoints/access_manager/audit.d.ts b/lib/types/core/endpoints/access_manager/audit.d.ts deleted file mode 100644 index 78b5769e2..000000000 --- a/lib/types/core/endpoints/access_manager/audit.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -/** - * PAM Audit REST API module. - */ -export {}; diff --git a/lib/types/core/endpoints/access_manager/grant.d.ts b/lib/types/core/endpoints/access_manager/grant.d.ts deleted file mode 100644 index 0e51654bd..000000000 --- a/lib/types/core/endpoints/access_manager/grant.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -/** - * PAM Grant REST API module. - */ -export {}; diff --git a/lib/types/core/endpoints/access_manager/grant_token.d.ts b/lib/types/core/endpoints/access_manager/grant_token.d.ts deleted file mode 100644 index 6895635ff..000000000 --- a/lib/types/core/endpoints/access_manager/grant_token.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -/** - * PAM Grant Token REST API module. - */ -export {}; diff --git a/lib/types/core/endpoints/access_manager/revoke_token.d.ts b/lib/types/core/endpoints/access_manager/revoke_token.d.ts deleted file mode 100644 index 207f87cba..000000000 --- a/lib/types/core/endpoints/access_manager/revoke_token.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -/** - * PAM Revoke Token REST API module. - */ -export {}; diff --git a/lib/types/core/endpoints/actions/add_message_action.d.ts b/lib/types/core/endpoints/actions/add_message_action.d.ts deleted file mode 100644 index e80c018b0..000000000 --- a/lib/types/core/endpoints/actions/add_message_action.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -/** - * Add Message Action REST API module. - */ -export {}; diff --git a/lib/types/core/endpoints/actions/get_message_actions.d.ts b/lib/types/core/endpoints/actions/get_message_actions.d.ts deleted file mode 100644 index 6206ec73f..000000000 --- a/lib/types/core/endpoints/actions/get_message_actions.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -/** - * Get Message Actions REST API module. - */ -export {}; diff --git a/lib/types/core/endpoints/actions/remove_message_action.d.ts b/lib/types/core/endpoints/actions/remove_message_action.d.ts deleted file mode 100644 index 51aa42da6..000000000 --- a/lib/types/core/endpoints/actions/remove_message_action.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -/** - * Remove Message Action REST API module. - */ -export {}; diff --git a/lib/types/core/endpoints/channel_groups/add_channels.d.ts b/lib/types/core/endpoints/channel_groups/add_channels.d.ts deleted file mode 100644 index 4d3dfefd8..000000000 --- a/lib/types/core/endpoints/channel_groups/add_channels.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -/** - * Add channel group channels REST API module. - */ -export {}; diff --git a/lib/types/core/endpoints/channel_groups/delete_group.d.ts b/lib/types/core/endpoints/channel_groups/delete_group.d.ts deleted file mode 100644 index 873f58775..000000000 --- a/lib/types/core/endpoints/channel_groups/delete_group.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -/** - * Delete channel group REST API module. - */ -export {}; diff --git a/lib/types/core/endpoints/channel_groups/list_channels.d.ts b/lib/types/core/endpoints/channel_groups/list_channels.d.ts deleted file mode 100644 index 1688a1d49..000000000 --- a/lib/types/core/endpoints/channel_groups/list_channels.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -/** - * List channel group channels REST API module. - */ -export {}; diff --git a/lib/types/core/endpoints/channel_groups/list_groups.d.ts b/lib/types/core/endpoints/channel_groups/list_groups.d.ts deleted file mode 100644 index 2aa05098f..000000000 --- a/lib/types/core/endpoints/channel_groups/list_groups.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -/** - * List All Channel Groups REST API module. - */ -export {}; diff --git a/lib/types/core/endpoints/channel_groups/remove_channels.d.ts b/lib/types/core/endpoints/channel_groups/remove_channels.d.ts deleted file mode 100644 index f46a8e049..000000000 --- a/lib/types/core/endpoints/channel_groups/remove_channels.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -/** - * Remove channel group channels REST API module. - */ -export {}; diff --git a/lib/types/core/endpoints/fetch_messages.d.ts b/lib/types/core/endpoints/fetch_messages.d.ts deleted file mode 100644 index a58cec3cc..000000000 --- a/lib/types/core/endpoints/fetch_messages.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -/** - * Fetch messages REST API module. - */ -export {}; diff --git a/lib/types/core/endpoints/file_upload/delete_file.d.ts b/lib/types/core/endpoints/file_upload/delete_file.d.ts deleted file mode 100644 index 87204dacd..000000000 --- a/lib/types/core/endpoints/file_upload/delete_file.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -/** - * Delete file REST API module. - */ -export {}; diff --git a/lib/types/core/endpoints/file_upload/download_file.d.ts b/lib/types/core/endpoints/file_upload/download_file.d.ts deleted file mode 100644 index 8591c0b12..000000000 --- a/lib/types/core/endpoints/file_upload/download_file.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -/** - * Download File REST API module. - */ -export {}; diff --git a/lib/types/core/endpoints/file_upload/generate_upload_url.d.ts b/lib/types/core/endpoints/file_upload/generate_upload_url.d.ts deleted file mode 100644 index 24d09f51a..000000000 --- a/lib/types/core/endpoints/file_upload/generate_upload_url.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -/** - * Generate file upload URL REST API request. - */ -export {}; diff --git a/lib/types/core/endpoints/file_upload/get_file_url.d.ts b/lib/types/core/endpoints/file_upload/get_file_url.d.ts deleted file mode 100644 index 925eee0d8..000000000 --- a/lib/types/core/endpoints/file_upload/get_file_url.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -/** - * File sharing REST API module. - */ -export {}; diff --git a/lib/types/core/endpoints/file_upload/list_files.d.ts b/lib/types/core/endpoints/file_upload/list_files.d.ts deleted file mode 100644 index a85d9abf5..000000000 --- a/lib/types/core/endpoints/file_upload/list_files.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -/** - * List Files REST API module. - */ -export {}; diff --git a/lib/types/core/endpoints/file_upload/publish_file.d.ts b/lib/types/core/endpoints/file_upload/publish_file.d.ts deleted file mode 100644 index 3bf7b9ebd..000000000 --- a/lib/types/core/endpoints/file_upload/publish_file.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -/** - * Publish File Message REST API module. - */ -export {}; diff --git a/lib/types/core/endpoints/file_upload/send_file.d.ts b/lib/types/core/endpoints/file_upload/send_file.d.ts deleted file mode 100644 index cb0ff5c3b..000000000 --- a/lib/types/core/endpoints/file_upload/send_file.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/lib/types/core/endpoints/file_upload/upload-file.d.ts b/lib/types/core/endpoints/file_upload/upload-file.d.ts deleted file mode 100644 index 6959033bd..000000000 --- a/lib/types/core/endpoints/file_upload/upload-file.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -/** - * Upload file REST API request. - */ -export {}; diff --git a/lib/types/core/endpoints/history/delete_messages.d.ts b/lib/types/core/endpoints/history/delete_messages.d.ts deleted file mode 100644 index c189fd470..000000000 --- a/lib/types/core/endpoints/history/delete_messages.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -/** - * Delete messages REST API module. - */ -export {}; diff --git a/lib/types/core/endpoints/history/get_history.d.ts b/lib/types/core/endpoints/history/get_history.d.ts deleted file mode 100644 index 485ad476b..000000000 --- a/lib/types/core/endpoints/history/get_history.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -/** - * Get history REST API module. - */ -export {}; diff --git a/lib/types/core/endpoints/history/message_counts.d.ts b/lib/types/core/endpoints/history/message_counts.d.ts deleted file mode 100644 index 7985a94f9..000000000 --- a/lib/types/core/endpoints/history/message_counts.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -/** - * Messages count REST API module. - */ -export {}; diff --git a/lib/types/core/endpoints/objects/channel/get.d.ts b/lib/types/core/endpoints/objects/channel/get.d.ts deleted file mode 100644 index c56a41184..000000000 --- a/lib/types/core/endpoints/objects/channel/get.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -/** - * Get Channel Metadata REST API module. - */ -export {}; diff --git a/lib/types/core/endpoints/objects/channel/get_all.d.ts b/lib/types/core/endpoints/objects/channel/get_all.d.ts deleted file mode 100644 index 777c4ab1c..000000000 --- a/lib/types/core/endpoints/objects/channel/get_all.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -/** - * Get All Channel Metadata REST API module. - */ -export {}; diff --git a/lib/types/core/endpoints/objects/channel/remove.d.ts b/lib/types/core/endpoints/objects/channel/remove.d.ts deleted file mode 100644 index 0779bb2c8..000000000 --- a/lib/types/core/endpoints/objects/channel/remove.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -/** - * Remove Channel Metadata REST API module. - */ -export {}; diff --git a/lib/types/core/endpoints/objects/channel/set.d.ts b/lib/types/core/endpoints/objects/channel/set.d.ts deleted file mode 100644 index e12e2fb2b..000000000 --- a/lib/types/core/endpoints/objects/channel/set.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -/** - * Set Channel Metadata REST API module. - */ -export {}; diff --git a/lib/types/core/endpoints/objects/member/get.d.ts b/lib/types/core/endpoints/objects/member/get.d.ts deleted file mode 100644 index db192f3b6..000000000 --- a/lib/types/core/endpoints/objects/member/get.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -/** - * Get Channel Members REST API module. - */ -export {}; diff --git a/lib/types/core/endpoints/objects/member/set.d.ts b/lib/types/core/endpoints/objects/member/set.d.ts deleted file mode 100644 index 67d6a5133..000000000 --- a/lib/types/core/endpoints/objects/member/set.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -/** - * Set Channel Members REST API module. - */ -export {}; diff --git a/lib/types/core/endpoints/objects/membership/get.d.ts b/lib/types/core/endpoints/objects/membership/get.d.ts deleted file mode 100644 index 3db81e283..000000000 --- a/lib/types/core/endpoints/objects/membership/get.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -/** - * Get UUID Memberships REST API module. - */ -export {}; diff --git a/lib/types/core/endpoints/objects/membership/set.d.ts b/lib/types/core/endpoints/objects/membership/set.d.ts deleted file mode 100644 index 61cb530a7..000000000 --- a/lib/types/core/endpoints/objects/membership/set.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -/** - * Set UUID Memberships REST API module. - */ -export {}; diff --git a/lib/types/core/endpoints/objects/uuid/get.d.ts b/lib/types/core/endpoints/objects/uuid/get.d.ts deleted file mode 100644 index 40e5f4817..000000000 --- a/lib/types/core/endpoints/objects/uuid/get.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -/** - * Get UUID Metadata REST API module. - */ -export {}; diff --git a/lib/types/core/endpoints/objects/uuid/get_all.d.ts b/lib/types/core/endpoints/objects/uuid/get_all.d.ts deleted file mode 100644 index 33e8a18dc..000000000 --- a/lib/types/core/endpoints/objects/uuid/get_all.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -/** - * Get All UUID Metadata REST API module. - */ -export {}; diff --git a/lib/types/core/endpoints/objects/uuid/remove.d.ts b/lib/types/core/endpoints/objects/uuid/remove.d.ts deleted file mode 100644 index 74edbb159..000000000 --- a/lib/types/core/endpoints/objects/uuid/remove.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -/** - * Remove UUID Metadata REST API module. - */ -export {}; diff --git a/lib/types/core/endpoints/objects/uuid/set.d.ts b/lib/types/core/endpoints/objects/uuid/set.d.ts deleted file mode 100644 index d4b96bdf7..000000000 --- a/lib/types/core/endpoints/objects/uuid/set.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -/** - * Set UUID Metadata REST API module. - */ -export {}; diff --git a/lib/types/core/endpoints/presence/get_state.d.ts b/lib/types/core/endpoints/presence/get_state.d.ts deleted file mode 100644 index dff42db68..000000000 --- a/lib/types/core/endpoints/presence/get_state.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -/** - * Get Presence State REST API module. - */ -export {}; diff --git a/lib/types/core/endpoints/presence/heartbeat.d.ts b/lib/types/core/endpoints/presence/heartbeat.d.ts deleted file mode 100644 index 52b3c35c2..000000000 --- a/lib/types/core/endpoints/presence/heartbeat.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -/** - * Announce heartbeat REST API module. - */ -export {}; diff --git a/lib/types/core/endpoints/presence/here_now.d.ts b/lib/types/core/endpoints/presence/here_now.d.ts deleted file mode 100644 index 7f077a5e2..000000000 --- a/lib/types/core/endpoints/presence/here_now.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -/** - * Channels / channel groups presence REST API module. - */ -export {}; diff --git a/lib/types/core/endpoints/presence/leave.d.ts b/lib/types/core/endpoints/presence/leave.d.ts deleted file mode 100644 index d6ba4460c..000000000 --- a/lib/types/core/endpoints/presence/leave.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -/** - * Announce leave REST API module. - */ -export {}; diff --git a/lib/types/core/endpoints/presence/set_state.d.ts b/lib/types/core/endpoints/presence/set_state.d.ts deleted file mode 100644 index d18769ae2..000000000 --- a/lib/types/core/endpoints/presence/set_state.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -/** - * Set Presence State REST API module. - */ -export {}; diff --git a/lib/types/core/endpoints/presence/where_now.d.ts b/lib/types/core/endpoints/presence/where_now.d.ts deleted file mode 100644 index 2c4ddd3c0..000000000 --- a/lib/types/core/endpoints/presence/where_now.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -/** - * `uuid` presence REST API module. - */ -export {}; diff --git a/lib/types/core/endpoints/publish.d.ts b/lib/types/core/endpoints/publish.d.ts deleted file mode 100644 index f313eb4c5..000000000 --- a/lib/types/core/endpoints/publish.d.ts +++ /dev/null @@ -1,69 +0,0 @@ -/** - * Publish REST API module. - */ -import { CryptoModule } from '../interfaces/crypto-module'; -import { Payload } from '../types/api'; -/** - * Request configuration parameters. - */ -export type PublishParameters = { - /** - * Channel name to publish messages to. - */ - channel: string; - /** - * Data which should be sent to the `channel`. - * - * The message may be any valid JSON type including objects, arrays, strings, and numbers. - */ - message: Payload; - /** - * Whether published data should be available with `Storage API` later or not. - * - * @default `true` - */ - storeInHistory?: boolean; - /** - * Whether message should be sent as part of request POST body or not. - * - * @default `false` - */ - sendByPost?: boolean; - /** - * Metadata, which should be associated with published data. - * - * Associated metadata can be utilized by message filtering feature. - */ - meta?: Payload; - /** - * Specify duration during which data will be available with `Storage API`. - * - * - If `storeInHistory` = `true`, and `ttl` = `0`, the `message` is stored with no expiry time. - * - If `storeInHistory` = `true` and `ttl` = `X` (`X` is an Integer value), the `message` is - * stored with an expiry time of `X` hours. - * - If `storeInHistory` = `false`, the `ttl` parameter is ignored. - * - If `ttl` is not specified, then expiration of the `message` defaults back to the expiry value - * for the key. - */ - ttl?: number; - /** - * Whether published data should be replicated across all data centers or not. - * - * @default `true` - * @deprecated - */ - replicate?: boolean; - /** - * Indexed signature for deprecated parameters. - */ - [key: string]: string | number | boolean | undefined | Payload | CryptoModule; -}; -/** - * Service success response. - */ -export type PublishResponse = { - /** - * High-precision time when published data has been received by the PubNub service. - */ - timetoken: string; -}; diff --git a/lib/types/core/endpoints/push/add_push_channels.d.ts b/lib/types/core/endpoints/push/add_push_channels.d.ts deleted file mode 100644 index ba565c462..000000000 --- a/lib/types/core/endpoints/push/add_push_channels.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -/** - * Register Channels with Device push REST API module. - */ -export {}; diff --git a/lib/types/core/endpoints/push/list_push_channels.d.ts b/lib/types/core/endpoints/push/list_push_channels.d.ts deleted file mode 100644 index cb340e6c5..000000000 --- a/lib/types/core/endpoints/push/list_push_channels.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -/** - * List Device push enabled channels REST API module. - */ -export {}; diff --git a/lib/types/core/endpoints/push/push.d.ts b/lib/types/core/endpoints/push/push.d.ts deleted file mode 100644 index c9f462716..000000000 --- a/lib/types/core/endpoints/push/push.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -/** - * Manage channels enabled for device push REST API module. - */ -export {}; diff --git a/lib/types/core/endpoints/push/remove_device.d.ts b/lib/types/core/endpoints/push/remove_device.d.ts deleted file mode 100644 index ba3047e70..000000000 --- a/lib/types/core/endpoints/push/remove_device.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -/** - * Unregister Device push REST API module. - */ -export {}; diff --git a/lib/types/core/endpoints/push/remove_push_channels.d.ts b/lib/types/core/endpoints/push/remove_push_channels.d.ts deleted file mode 100644 index d1343dbc7..000000000 --- a/lib/types/core/endpoints/push/remove_push_channels.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -/** - * Unregister Channels from Device push REST API module. - */ -export {}; diff --git a/lib/types/core/endpoints/signal.d.ts b/lib/types/core/endpoints/signal.d.ts deleted file mode 100644 index 9238bd206..000000000 --- a/lib/types/core/endpoints/signal.d.ts +++ /dev/null @@ -1,28 +0,0 @@ -/** - * Signal REST API module. - */ -import { Payload } from '../types/api'; -/** - * Request configuration parameters. - */ -export type SignalParameters = { - /** - * Channel name to publish signal to. - */ - channel: string; - /** - * Data which should be sent to the `channel`. - * - * The message may be any valid JSON type including objects, arrays, strings, and numbers. - */ - message: Payload; -}; -/** - * Service success response. - */ -export type SignalResponse = { - /** - * High-precision time when published data has been received by the PubNub service. - */ - timetoken: string; -}; diff --git a/lib/types/core/endpoints/subscribe.d.ts b/lib/types/core/endpoints/subscribe.d.ts deleted file mode 100644 index a7be65799..000000000 --- a/lib/types/core/endpoints/subscribe.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -/** - * Subscription REST API module. - */ -export {}; diff --git a/lib/types/core/endpoints/subscriptionUtils/handshake.d.ts b/lib/types/core/endpoints/subscriptionUtils/handshake.d.ts deleted file mode 100644 index 2a942a579..000000000 --- a/lib/types/core/endpoints/subscriptionUtils/handshake.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -/** - * Handshake subscribe REST API module. - */ -export {}; diff --git a/lib/types/core/endpoints/subscriptionUtils/receiveMessages.d.ts b/lib/types/core/endpoints/subscriptionUtils/receiveMessages.d.ts deleted file mode 100644 index 640df8780..000000000 --- a/lib/types/core/endpoints/subscriptionUtils/receiveMessages.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -/** - * Receive messages subscribe REST API module. - */ -export {}; diff --git a/lib/types/core/endpoints/time.d.ts b/lib/types/core/endpoints/time.d.ts deleted file mode 100644 index cda43e5ea..000000000 --- a/lib/types/core/endpoints/time.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -/** - * Time REST API module. - */ -/** - * Service success response. - */ -export type TimeResponse = { - /** - * High-precision time when published data has been received by the PubNub service. - */ - timetoken: string; -}; diff --git a/lib/types/core/interfaces/configuration.d.ts b/lib/types/core/interfaces/configuration.d.ts deleted file mode 100644 index 63ce7b036..000000000 --- a/lib/types/core/interfaces/configuration.d.ts +++ /dev/null @@ -1,276 +0,0 @@ -/** - * {@link PubNub} client configuration module. - */ -import { RequestRetryPolicy } from '../../event-engine/core/retryPolicy'; -/** - * Base user-provided PubNub client configuration. - */ -export type UserConfiguration = { - /** - * Specifies the `subscribeKey` to be used for subscribing to a channel and message publishing. - */ - subscribeKey: string; - /** - * Specifies the `subscribe_key` to be used for subscribing to a channel and message publishing. - * - * @deprecated Use the {@link subscribeKey} instead. - */ - subscribe_key?: string; - /** - * Specifies the `publishKey` to be used for publishing messages to a channel. - */ - publishKey?: string; - /** - * Specifies the `publish_key` to be used for publishing messages to a channel. - * - * @deprecated Use the {@link publishKey} instead. - */ - publish_key?: string; - /** - * Specifies the `secretKey` to be used for request signatures computation. - */ - secretKey?: string; - /** - * Specifies the `secret_key` to be used for request signatures computation. - * - * @deprecated Use the {@link secretKey} instead. - */ - secret_key?: string; - /** - * Unique PubNub client user identifier. - * - * Unique `userId` to identify the user or the device that connects to PubNub. - * It's a UTF-8 encoded string of up to 64 alphanumeric characters. - * - * If you don't set the `userId`, you won't be able to connect to PubNub. - */ - userId?: string; - /** - * If Access Manager enabled, this key will be used on all requests. - */ - authKey?: string | null; - /** - * Log HTTP information. - * - * @default `false` - */ - logVerbosity?: boolean; - /** - * If set to true, requests will be made over HTTPS. - * - * @default `true` for v4.20.0 onwards, `false` before v4.20.0 - */ - ssl?: boolean; - /** - * If a custom domain is required, SDK accepts it here. - * - * @default `ps.pndsn.com` - */ - origin?: string | string[]; - /** - * How long the server will consider the client alive for presence.The value is in seconds. - * - * @default `300` - */ - presenceTimeout?: number; - /** - * How often the client will announce itself to server.The value is in seconds. - * - * @default `not set` - */ - heartbeatInterval?: number; - /** - * Transactional requests timeout in milliseconds. - * - * Maximum duration for which PubNub client should wait for transactional request completion. - * - * @default `15` seconds - */ - transactionalRequestTimeout?: number; - /** - * Subscription requests timeout in milliseconds. - * - * Maximum duration for which PubNub client should wait for subscription request completion. - * - * @default `310` seconds - */ - subscribeRequestTimeout?: number; - /** - * `true` to allow catch up on the front-end applications. - * - * @default `false` - */ - restore?: boolean; - /** - * Whether to include the PubNub object instance ID in outgoing requests. - * - * @default `false` - */ - useInstanceId?: boolean; - /** - * When `true` the SDK doesn't send out the leave requests. - * - * @default `false` - */ - suppressLeaveEvents?: boolean; - /** - * `PNRequestMessageCountExceededCategory` is thrown when the number of messages into the - * payload is above of `requestMessageCountThreshold`. - * - * @default `100` - */ - requestMessageCountThreshold?: number; - /** - * This flag announces when the network is down or up using the states `PNNetworkDownCategory` - * and `PNNetworkUpCategory`. - * - * @default `false` - */ - autoNetworkDetection?: boolean; - /** - * Whether to use the standardized workflows for subscribe and presence. - * - * Note that the `maintainPresenceState` parameter is set to true by default, so make sure to - * disable it if you don't need to maintain presence state. For more information, refer to the - * param description in this table. - * - * - * @default `false` - */ - enableEventEngine?: boolean; - /** - * Custom reconnection configuration parameters. - * - * `retryConfiguration: policy` is the type of policy to be used. - * - * Available values: - * - `PubNub.LinearRetryPolicy({ delay, maximumRetry })` - * - `PubNub.ExponentialRetryPolicy({ minimumDelay, maximumDelay, maximumRetry })` - * - * For more information, refer to - * {@link /docs/general/setup/connection-management#reconnection-policy|Reconnection Policy}. JavaScript doesn't - * support excluding endpoints. - * - * @default `not set` - */ - retryConfiguration?: RequestRetryPolicy; - /** - * Whether the `state` set using `setState()` should be maintained for the current `userId`. - * This option works only when `enableEventEngine` is set to `true`. - * - * @default `true` - */ - maintainPresenceState?: boolean; - /** - * `UUID` to use. You should set a unique `UUID` to identify the user or the device that - * connects to PubNub. - * If you don't set the `UUID`, you won't be able to connect to PubNub. - * - * @deprecated Use {@link userId} instead. - */ - uuid?: string; - /** - * If set to `true`, SDK will use the same TCP connection for each HTTP request, instead of - * opening a new one for each new request. - * - * @default `false` - */ - keepAlive?: boolean; - /** - * If the SDK is running as part of another SDK built atop of it, allow a custom `pnsdk` with - * name and version. - */ - sdkName?: string; - /** - * If the SDK is operated by a partner, allow a custom `pnsdk` item for them. - */ - partnerId?: string; -}; -/** - * User-provided configuration object interface. - * - * Interface contains limited set of settings manipulation and access. - */ -export interface ClientConfiguration { - /** - * Get a PubNub client user identifier. - * - * @returns Current PubNub client user identifier. - */ - getUserId(): string; - /** - * Change the current PubNub client user identifier. - * - * **Important:** Change won't affect ongoing REST API calls. - * - * @param value - New PubNub client user identifier. - * - * @throws Error empty user identifier has been provided. - */ - setUserId(value: string): void; - /** - * Change REST API endpoint access authorization key. - * - * @param authKey - New authorization key which should be used with new requests. - */ - setAuthKey(authKey: string | null): void; - /** - * Real-time updates filtering expression. - * - * @returns Filtering expression. - */ - getFilterExpression(): string | undefined | null; - /** - * Update real-time updates filtering expression. - * - * @param expression - New expression which should be used or `undefined` to disable filtering. - */ - setFilterExpression(expression: string | null | undefined): void; - /** - * Change data encryption / decryption key. - * - * @param key - New key which should be used for data encryption / decryption. - */ - setCipherKey(key: string | undefined): void; - /** - * Get PubNub SDK version. - * - * @returns Current SDK version. - */ - get version(): string; - /** - * Get PubNub SDK version. - * - * @returns Current SDK version. - */ - getVersion(): string; - /** - * Add framework's prefix. - * - * @param name - Name of the framework which would want to add own data into `pnsdk` suffix. - * @param suffix - Suffix with information about framework. - */ - _addPnsdkSuffix(name: string, suffix: string | number): void; - /** - * Get a PubNub client user identifier. - * - * @returns Current PubNub client user identifier. - * - * @deprecated Use the {@link getUserId} or {@link userId} getter instead. - */ - getUUID(): string; - /** - * Change the current PubNub client user identifier. - * - * **Important:** Change won't affect ongoing REST API calls. - * - * @param value - New PubNub client user identifier. - * - * @returns {Configuration} Reference to the configuration instance for easier chaining. - * - * @throws Error empty user identifier has been provided. - * - * @deprecated Use the {@link setUserId} or {@link userId} setter instead. - */ - setUUID(value: string): void; -} diff --git a/lib/types/core/interfaces/crypto-module.d.ts b/lib/types/core/interfaces/crypto-module.d.ts deleted file mode 100644 index 621df079a..000000000 --- a/lib/types/core/interfaces/crypto-module.d.ts +++ /dev/null @@ -1,152 +0,0 @@ -/** - * Crypto module. - */ -import { PubNubFileConstructor, PubNubFileInterface } from '../types/file'; -import { Payload } from '../types/api'; -/** - * Crypto module configuration. - */ -export type CryptoModuleConfiguration = { - default: C; - cryptors?: C[]; -}; -export type CryptorConfiguration = { - /** - * Data encryption / decryption key. - */ - cipherKey?: string; - /** - * Request sign secret key. - */ - secretKey?: string; - /** - * Whether random initialization vector should be used or not. - * - * @default `true` - */ - useRandomIVs?: boolean; - /** - * Custom data encryption method. - * - * @deprecated Instead use {@link cryptoModule} for data encryption. - */ - customEncrypt?: (data: string | Payload) => string; - /** - * Custom data decryption method. - * - * @deprecated Instead use {@link cryptoModule} for data decryption. - */ - customDecrypt?: (data: string) => string; -}; -/** - * Base crypto module interface. - */ -export interface CryptoModule { - /** - * Encrypt data. - * - * @param data - Data which should be encrypted using `CryptoModule`. - * - * @returns Data encryption result. - */ - encrypt(data: ArrayBuffer | string): ArrayBuffer | string; - /** - * Encrypt file object. - * - * @param file - File object with data for encryption. - * @param File - File object constructor to create instance for encrypted data representation. - * - * @returns Asynchronous file encryption result. - */ - encryptFile(file: PubNubFileInterface, File: PubNubFileConstructor): Promise; - /** - * Encrypt data. - * - * @param data - Dta which should be encrypted using `CryptoModule`. - * - * @returns Data decryption result. - */ - decrypt(data: ArrayBuffer | string): ArrayBuffer | Payload | null; - /** - * Decrypt file object. - * - * @param file - Encrypted file object with data for decryption. - * @param File - File object constructor to create instance for decrypted data representation. - * - * @returns Asynchronous file decryption result. - */ - decryptFile(file: PubNubFileInterface, File: PubNubFileConstructor): Promise; -} -export declare abstract class AbstractCryptoModule implements CryptoModule { - /** - * `String` to {@link ArrayBuffer} response decoder. - */ - protected static encoder: TextEncoder; - /** - * {@link ArrayBuffer} to {@link string} decoder. - */ - protected static decoder: TextDecoder; - defaultCryptor: C; - cryptors: C[]; - /** - * Construct crypto module with legacy cryptor for encryption and both legacy and AES-CBC - * cryptors for decryption. - * - * @param config Cryptors configuration options. - * - * @returns Crypto module which encrypts data using legacy cryptor. - * - * @throws Error if `config.cipherKey` not set. - */ - static legacyCryptoModule(config: CryptorConfiguration): CryptoModule; - /** - * Construct crypto module with AES-CBC cryptor for encryption and both AES-CBC and legacy - * cryptors for decryption. - * - * @param config Cryptors configuration options. - * - * @returns Crypto module which encrypts data using AES-CBC cryptor. - * - * @throws Error if `config.cipherKey` not set. - */ - static aesCbcCryptoModule(config: CryptorConfiguration): CryptoModule; - constructor(configuration: CryptoModuleConfiguration); - /** - * Encrypt data. - * - * @param data - Data which should be encrypted using {@link CryptoModule}. - * - * @returns Data encryption result. - */ - abstract encrypt(data: ArrayBuffer | string): ArrayBuffer | string; - /** - * Encrypt file object. - * - * @param file - File object with data for encryption. - * @param File - File object constructor to create instance for encrypted data representation. - * - * @returns Asynchronous file encryption result. - */ - abstract encryptFile(file: PubNubFileInterface, File: PubNubFileConstructor): Promise; - /** - * Encrypt data. - * - * @param data - Dta which should be encrypted using `CryptoModule`. - * - * @returns Data decryption result. - */ - abstract decrypt(data: ArrayBuffer | string): ArrayBuffer | Payload | null; - /** - * Decrypt file object. - * - * @param file - Encrypted file object with data for decryption. - * @param File - File object constructor to create instance for decrypted data representation. - * - * @returns Asynchronous file decryption result. - */ - abstract decryptFile(file: PubNubFileInterface, File: PubNubFileConstructor): Promise; - /** - * Retrieve list of module's cryptors. - */ - protected getAllCryptors(): C[]; -} diff --git a/lib/types/core/interfaces/cryptography.d.ts b/lib/types/core/interfaces/cryptography.d.ts deleted file mode 100644 index 9b73050a5..000000000 --- a/lib/types/core/interfaces/cryptography.d.ts +++ /dev/null @@ -1,54 +0,0 @@ -/** - * Legacy Cryptography module interface. - */ -import { PubNubFileConstructor, PubNubFileInterface } from '../types/file'; -export interface Cryptography { - /** - * Encrypt provided source data using specific encryption {@link key}. - * - * @param key - Data encryption key.
**Note:** Same key should be used to `decrypt` data. - * @param input - Source data for encryption. - * - * @returns Encrypted data as object or stream (depending on from source data type). - * - * @throws Error if unknown data type has been passed. - */ - encrypt(key: string, input: Types): Promise; - /** - * Decrypt provided encrypted data using specific decryption {@link key}. - * - * @param key - Data decryption key.
**Note:** Should be the same as used to `encrypt` data. - * @param input - Encrypted data for decryption. - * - * @returns Decrypted data as object or stream (depending on from encrypted data type). - * - * @throws Error if unknown data type has been passed. - */ - decrypt(key: string, input: Types): Promise; - /** - * Encrypt provided `PubNub` File object using specific encryption {@link key}. - * - * @param key - Key for `PubNub` File object encryption.
**Note:** Same key should be - * used to `decrypt` data. - * @param file - Source `PubNub` File object for encryption. - * @param File - Class constructor for `PubNub` File object. - * - * @returns Encrypted data as `PubNub` File object. - * - * @throws Error if file is empty or contains unsupported data type. - */ - encryptFile(key: string, file: PubNubFileInterface, File: PubNubFileConstructor): Promise; - /** - * Decrypt provided `PubNub` File object using specific decryption {@link key}. - * - * @param key - Key for `PubNub` File object decryption.
**Note:** Should be the same - * as used to `encrypt` data. - * @param file - Encrypted `PubNub` File object for decryption. - * @param File - Class constructor for `PubNub` File object. - * - * @returns Decrypted data as `PubNub` File object. - * - * @throws Error if file is empty or contains unsupported data type. - */ - decryptFile(key: string, file: PubNubFileInterface, File: PubNubFileConstructor): Promise; -} diff --git a/lib/types/core/interfaces/request.d.ts b/lib/types/core/interfaces/request.d.ts deleted file mode 100644 index cb0ff5c3b..000000000 --- a/lib/types/core/interfaces/request.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/lib/types/core/interfaces/transport.d.ts b/lib/types/core/interfaces/transport.d.ts deleted file mode 100644 index 82ec357eb..000000000 --- a/lib/types/core/interfaces/transport.d.ts +++ /dev/null @@ -1,61 +0,0 @@ -import { CancellationController, TransportRequest } from '../types/transport-request'; -import { TransportResponse } from '../types/transport-response'; -/** - * Represents the configuration options for keeping the transport connection alive. - */ -export type TransportKeepAlive = { - /** - * The time interval in milliseconds for keeping the connection alive. - * - * @default 1000 - */ - keepAliveMsecs?: number; - /** - * The maximum number of sockets allowed per host. - * - * @default Infinity - */ - maxSockets?: number; - /** - * The maximum number of open and free sockets in the pool per host. - * - * @default 256 - */ - maxFreeSockets?: number; - /** - * Timeout in milliseconds, after which the `idle` socket will be closed. - * - * @default 30000 - */ - timeout?: number; -}; -/** - * This interface is used to send requests to the PubNub API. - * - * You can implement this interface for your types, or use one of the provided modules to use a - * transport library. - * - * @interface - */ -export interface Transport { - /** - * Make request sendable. - * - * @param req - The transport request to be processed. - * - * @returns - A promise that resolves to a transport response and request cancellation - * controller (if required). - */ - makeSendable(req: TransportRequest): [Promise, CancellationController | undefined]; - /** - * Pre-processed request. - * - * Transport implementation may pre-process original transport requests before making - * platform-specific request objects from it. - * - * @param req - Transport request provided by the PubNub client. - * - * @returns Transport request with updated properties (if it was required). - */ - request(req: TransportRequest): TransportRequest; -} diff --git a/lib/types/core/pubnub-channel-groups.d.ts b/lib/types/core/pubnub-channel-groups.d.ts deleted file mode 100644 index f9c0dc604..000000000 --- a/lib/types/core/pubnub-channel-groups.d.ts +++ /dev/null @@ -1,86 +0,0 @@ -/** - * PubNub Channel Groups API module. - */ -import { KeySet, ResultCallback, SendRequestFunction, StatusCallback } from './types/api'; -import * as ChannelGroups from './types/api/channel-groups'; -export default class PubnubChannelGroups { - private readonly keySet; - private readonly sendRequest; - constructor(keySet: KeySet, sendRequest: SendRequestFunction); - /** - * Fetch channel group channels. - * - * @param parameters - Request configuration parameters. - * @param callback - Request completion handler callback. - */ - listChannels(parameters: ChannelGroups.ListChannelGroupChannelsParameters, callback: ResultCallback): void; - /** - * Fetch channel group channels. - * - * @param parameters - Request configuration parameters. - * - * @returns Asynchronous get channel group channels response. - */ - listChannels(parameters: ChannelGroups.ListChannelGroupChannelsParameters): Promise; - /** - * Fetch all channel groups. - * - * @param callback - Request completion handler callback. - * - * @deprecated - */ - listGroups(callback: ResultCallback): void; - /** - * Fetch all channel groups. - * - * @returns Asynchronous get all channel groups response. - * - * @deprecated - */ - listGroups(): Promise; - /** - * Add channels to the channel group. - * - * @param parameters - Request configuration parameters. - * @param callback - Request completion handler callback. - */ - addChannels(parameters: ChannelGroups.ManageChannelGroupChannelsParameters, callback: StatusCallback): void; - /** - * Add channels to the channel group. - * - * @param parameters - Request configuration parameters. - * - * @returns Asynchronous add channels to the channel group response. - */ - addChannels(parameters: ChannelGroups.ManageChannelGroupChannelsParameters): Promise>; - /** - * Remove channels from the channel group. - * - * @param parameters - Request configuration parameters. - * @param callback - Request completion handler callback. - */ - removeChannels(parameters: ChannelGroups.ManageChannelGroupChannelsParameters, callback: StatusCallback): void; - /** - * Remove channels from the channel group. - * - * @param parameters - Request configuration parameters. - * - * @returns Asynchronous remove channels from the channel group response. - */ - removeChannels(parameters: ChannelGroups.ManageChannelGroupChannelsParameters): Promise>; - /** - * Remove channel group. - * - * @param parameters - Request configuration parameters. - * @param callback - Request completion handler callback. - */ - deleteGroup(parameters: ChannelGroups.DeleteChannelGroupParameters, callback: StatusCallback): void; - /** - * Remove channel group. - * - * @param parameters - Request configuration parameters. - * - * @returns Asynchronous remove channel group response. - */ - deleteGroup(parameters: ChannelGroups.DeleteChannelGroupParameters): Promise>; -} diff --git a/lib/types/core/pubnub-common.d.ts b/lib/types/core/pubnub-common.d.ts deleted file mode 100644 index f9bb4df1c..000000000 --- a/lib/types/core/pubnub-common.d.ts +++ /dev/null @@ -1,1300 +0,0 @@ -import { Listener } from './components/listener_manager'; -import NotificationsPayload from './components/push_payload'; -import { TokenManager } from './components/token_manager'; -import Crypto from './components/cryptography/index'; -import { Payload, ResultCallback } from './types/api'; -import { ClientConfiguration, PrivateClientConfiguration } from './interfaces/configuration'; -import { Cryptography } from './interfaces/cryptography'; -import { Transport } from './interfaces/transport'; -import RequestOperation from './constants/operations'; -import StatusCategory from './constants/categories'; -import { RetryPolicy } from '../event-engine/core/retryPolicy'; -import * as Publish from './endpoints/publish'; -import * as Signal from './endpoints/signal'; -import * as Subscription from './types/api/subscription'; -import * as Presence from './types/api/presence'; -import * as History from './types/api/history'; -import * as MessageAction from './types/api/message-action'; -import * as FileSharing from './types/api/file-sharing'; -import { PubNubFileInterface } from './types/file'; -import * as PAM from './types/api/access-manager'; -import { SubscriptionOptions } from '../entities/commonTypes'; -import { ChannelMetadata } from '../entities/ChannelMetadata'; -import { SubscriptionSet } from '../entities/SubscriptionSet'; -import { ChannelGroup } from '../entities/ChannelGroup'; -import { UserMetadata } from '../entities/UserMetadata'; -import { Channel } from '../entities/Channel'; -import PubNubChannelGroups from './pubnub-channel-groups'; -import PubNubPushNotifications from './pubnub-push'; -import * as AppContext from './types/api/app-context'; -import PubNubObjects from './pubnub-objects'; -import * as Time from './endpoints/time'; -type ClientInstanceConfiguration = { - /** - * Client-provided configuration. - */ - configuration: PrivateClientConfiguration; - /** - * Transport provider for requests execution. - */ - transport: Transport; - /** - * REST API endpoints access tokens manager. - */ - tokenManager?: TokenManager; - /** - * Legacy crypto module implementation. - */ - cryptography?: Cryptography; - /** - * Legacy crypto (legacy data encryption / decryption and request signature support). - */ - crypto?: Crypto; -}; -/** - * Platform-agnostic PubNub client core. - */ -export declare class PubNubCore = Record> { - /** - * Type of REST API endpoint which reported status. - */ - static OPERATIONS: typeof RequestOperation; - /** - * API call status category. - */ - static CATEGORIES: typeof StatusCategory; - /** - * Exponential retry policy constructor. - */ - static ExponentialRetryPolicy: typeof RetryPolicy.ExponentialRetryPolicy; - /** - * Linear retry policy constructor. - */ - static LinearRetryPolicy: typeof RetryPolicy.LinearRetryPolicy; - /** - * Construct notification payload which will trigger push notification. - * - * @param title - Title which will be shown on notification. - * @param body - Payload which will be sent as part of notification. - * - * @returns Pre-formatted message payload which will trigger push notification. - */ - static notificationPayload(title: string, body: string): NotificationsPayload; - /** - * Generate unique identifier. - * - * @returns Unique identifier. - */ - static generateUUID(): any; - constructor(configuration: ClientInstanceConfiguration); - /** - * PubNub client configuration. - * - * @returns Currently user PubNub client configuration. - */ - get configuration(): ClientConfiguration; - /** - * Current PubNub client configuration. - * - * @returns Currently user PubNub client configuration. - * - * @deprecated Use {@link configuration} getter instead. - */ - get _config(): ClientConfiguration; - /** - * REST API endpoint access authorization key. - * - * It is required to have `authorization key` with required permissions to access REST API - * endpoints when `PAM` enabled for user key set. - */ - get authKey(): string | undefined; - /** - * REST API endpoint access authorization key. - * - * It is required to have `authorization key` with required permissions to access REST API - * endpoints when `PAM` enabled for user key set. - */ - getAuthKey(): string | undefined; - /** - * Change REST API endpoint access authorization key. - * - * @param authKey - New authorization key which should be used with new requests. - */ - setAuthKey(authKey: string): void; - /** - * Get a PubNub client user identifier. - * - * @returns Current PubNub client user identifier. - */ - get userId(): string; - /** - * Change the current PubNub client user identifier. - * - * **Important:** Change won't affect ongoing REST API calls. - * - * @param value - New PubNub client user identifier. - * - * @throws Error empty user identifier has been provided. - */ - set userId(value: string); - /** - * Get a PubNub client user identifier. - * - * @returns Current PubNub client user identifier. - */ - getUserId(): string; - /** - * Change the current PubNub client user identifier. - * - * **Important:** Change won't affect ongoing REST API calls. - * - * @param value - New PubNub client user identifier. - * - * @throws Error empty user identifier has been provided. - */ - setUserId(value: string): void; - /** - * Real-time updates filtering expression. - * - * @returns Filtering expression. - */ - get filterExpression(): string | undefined; - /** - * Real-time updates filtering expression. - * - * @returns Filtering expression. - */ - getFilterExpression(): string | undefined; - /** - * Update real-time updates filtering expression. - * - * @param expression - New expression which should be used or `undefined` to disable filtering. - */ - set filterExpression(expression: string | null | undefined); - /** - * Update real-time updates filtering expression. - * - * @param expression - New expression which should be used or `undefined` to disable filtering. - */ - setFilterExpression(expression: string | null): void; - /** - * Dta encryption / decryption key. - * - * @returns Currently used key for data encryption / decryption. - */ - get cipherKey(): string | undefined; - /** - * Change data encryption / decryption key. - * - * @param key - New key which should be used for data encryption / decryption. - */ - set cipherKey(key: string | undefined); - /** - * Change data encryption / decryption key. - * - * @param key - New key which should be used for data encryption / decryption. - */ - setCipherKey(key: string): void; - /** - * Change heartbeat requests interval. - * - * @param interval - New presence request heartbeat intervals. - */ - set heartbeatInterval(interval: number); - /** - * Change heartbeat requests interval. - * - * @param interval - New presence request heartbeat intervals. - */ - setHeartbeatInterval(interval: number): void; - /** - * Get PubNub SDK version. - * - * @returns Current SDK version. - */ - getVersion(): string; - /** - * Add framework's prefix. - * - * @param name - Name of the framework which would want to add own data into `pnsdk` suffix. - * @param suffix - Suffix with information about framework. - */ - _addPnsdkSuffix(name: string, suffix: string | number): void; - /** - * Get a PubNub client user identifier. - * - * @returns Current PubNub client user identifier. - * - * @deprecated Use the {@link getUserId} or {@link userId} getter instead. - */ - getUUID(): string; - /** - * Change the current PubNub client user identifier. - * - * **Important:** Change won't affect ongoing REST API calls. - * - * @param value - New PubNub client user identifier. - * - * @throws Error empty user identifier has been provided. - * - * @deprecated Use the {@link PubNubCore#setUserId} or {@link PubNubCore#userId} setter instead. - */ - setUUID(value: string): void; - /** - * Custom data encryption method. - * - * @deprecated Instead use {@link cryptoModule} for data encryption. - */ - get customEncrypt(): ((data: string) => string) | undefined; - /** - * Custom data decryption method. - * - * @deprecated Instead use {@link cryptoModule} for data decryption. - */ - get customDecrypt(): ((data: string) => string) | undefined; - /** - * Create a `Channel` entity. - * - * Entity can be used for the interaction with the following API: - * - `subscribe` - * - * @param name - Unique channel name. - * @returns `Channel` entity. - */ - channel(name: string): Channel; - /** - * Create a `ChannelGroup` entity. - * - * Entity can be used for the interaction with the following API: - * - `subscribe` - * - * @param name - Unique channel group name. - * @returns `ChannelGroup` entity. - */ - channelGroup(name: string): ChannelGroup; - /** - * Create a `ChannelMetadata` entity. - * - * Entity can be used for the interaction with the following API: - * - `subscribe` - * - * @param id - Unique channel metadata object identifier. - * @returns `ChannelMetadata` entity. - */ - channelMetadata(id: string): ChannelMetadata; - /** - * Create a `UserMetadata` entity. - * - * Entity can be used for the interaction with the following API: - * - `subscribe` - * - * @param id - Unique user metadata object identifier. - * @returns `UserMetadata` entity. - */ - userMetadata(id: string): UserMetadata; - /** - * Create subscriptions set object. - * - * @param parameters - Subscriptions set configuration parameters. - */ - subscriptionSet(parameters: { - channels?: string[]; - channelGroups?: string[]; - subscriptionOptions?: SubscriptionOptions; - }): SubscriptionSet; - /** - * Schedule request execution. - * - * @param request - REST API request. - * @param callback - Request completion handler callback. - * - * @returns Asynchronous request execution and response parsing result. - */ - private sendRequest; - /** - * Unsubscribe from all channels and groups. - * - * @param [isOffline] - Whether `offline` presence should be notified or not. - */ - destroy(isOffline?: boolean): void; - /** - * Unsubscribe from all channels and groups. - * - * @deprecated Use {@link destroy} method instead. - */ - stop(): void; - /** - * Register real-time events listener. - * - * @param listener - Listener with event callbacks to handle different types of events. - */ - addListener(listener: Listener): void; - /** - * Remove real-time event listener. - * - * @param listener - Event listeners which should be removed. - */ - removeListener(listener: Listener): void; - /** - * Clear all real-time event listeners. - */ - removeAllListeners(): void; - /** - * Publish data to a specific channel. - * - * @param parameters - Request configuration parameters. - * @param callback - Request completion handler callback. - */ - publish(parameters: Publish.PublishParameters, callback: ResultCallback): void; - /** - * Publish data to a specific channel. - * - * @param parameters - Request configuration parameters. - * - * @returns Asynchronous publish data response. - */ - publish(parameters: Publish.PublishParameters): Promise; - /** - * Signal data to a specific channel. - * - * @param parameters - Request configuration parameters. - * @param callback - Request completion handler callback. - */ - signal(parameters: Signal.SignalParameters, callback: ResultCallback): void; - /** - * Signal data to a specific channel. - * - * @param parameters - Request configuration parameters. - * - * @returns Asynchronous signal data response. - */ - signal(parameters: Signal.SignalParameters): Promise; - /** - * `Fire` a data to a specific channel. - * - * @param parameters - Request configuration parameters. - * @param callback - Request completion handler callback. - * - * @deprecated Use {@link publish} method instead. - */ - fire(parameters: Publish.PublishParameters, callback: ResultCallback): void; - /** - * `Fire` a data to a specific channel. - * - * @param parameters - Request configuration parameters. - * - * @returns Asynchronous signal data response. - * - * @deprecated Use {@link publish} method instead. - */ - fire(parameters: Publish.PublishParameters): Promise; - /** - * Get list of channels on which PubNub client currently subscribed. - * - * @returns List of active channels. - */ - getSubscribedChannels(): string[]; - /** - * Get list of channel groups on which PubNub client currently subscribed. - * - * @returns List of active channel groups. - */ - getSubscribedChannelGroups(): string[]; - /** - * Subscribe to specified channels and groups real-time events. - * - * @param parameters - Request configuration parameters. - */ - subscribe(parameters: Subscription.SubscribeParameters): void; - /** - * Perform subscribe request. - * - * **Note:** Method passed into managers to let them use it when required. - * - * @param parameters - Request configuration parameters. - * @param callback - Request completion handler callback. - */ - private makeSubscribe; - /** - * Unsubscribe from specified channels and groups real-time events. - * - * @param parameters - Request configuration parameters. - */ - unsubscribe(parameters: Presence.PresenceLeaveParameters): void; - /** - * Perform unsubscribe request. - * - * **Note:** Method passed into managers to let them use it when required. - * - * @param parameters - Request configuration parameters. - * @param callback - Request completion handler callback. - */ - private makeUnsubscribe; - /** - * Unsubscribe from all channels and groups. - */ - unsubscribeAll(): void; - /** - * Temporarily disconnect from real-time events stream. - */ - disconnect(): void; - /** - * Restore connection to the real-time events stream. - * - * @param parameters - Reconnection catch up configuration. **Note:** available only with - * enabled event engine. - */ - reconnect(parameters?: { - timetoken?: string; - region?: number; - }): void; - /** - * Event engine handshake subscribe. - * - * @param parameters - Request configuration parameters. - */ - private subscribeHandshake; - /** - * Event engine receive messages subscribe. - * - * @param parameters - Request configuration parameters. - */ - private subscribeReceiveMessages; - /** - * Get reactions to a specific message. - * - * @param parameters - Request configuration parameters. - * @param callback - Request completion handler callback. - */ - getMessageActions(parameters: MessageAction.GetMessageActionsParameters, callback: ResultCallback): void; - /** - * Get reactions to a specific message. - * - * @param parameters - Request configuration parameters. - * - * @returns Asynchronous get reactions response. - */ - getMessageActions(parameters: MessageAction.GetMessageActionsParameters): Promise; - /** - * Add a reaction to a specific message. - * - * @param parameters - Request configuration parameters. - * @param callback - Request completion handler callback. - */ - addMessageAction(parameters: MessageAction.AddMessageActionParameters, callback: ResultCallback): void; - /** - * Add a reaction to a specific message. - * - * @param parameters - Request configuration parameters. - * - * @returns Asynchronous add a reaction response. - */ - addMessageAction(parameters: MessageAction.AddMessageActionParameters): Promise; - /** - * Remove a reaction from a specific message. - * - * @param parameters - Request configuration parameters. - * @param callback - Request completion handler callback. - */ - removeMessageAction(parameters: MessageAction.RemoveMessageActionParameters, callback: ResultCallback): void; - /** - * Remove a reaction from a specific message. - * - * @param parameters - Request configuration parameters. - * - * @returns Asynchronous remove a reaction response. - */ - removeMessageAction(parameters: MessageAction.RemoveMessageActionParameters): Promise; - /** - * Fetch messages history for channels. - * - * @param parameters - Request configuration parameters. - * @param callback - Request completion handler callback. - */ - fetchMessages(parameters: History.FetchMessagesParameters, callback: ResultCallback): void; - /** - * Fetch messages history for channels. - * - * @param parameters - Request configuration parameters. - * - * @returns Asynchronous fetch messages response. - */ - fetchMessages(parameters: History.FetchMessagesParameters): Promise; - /** - * Delete messages from the channel history. - * - * @param parameters - Request configuration parameters. - * @param callback - Request completion handler callback. - * - * @deprecated - */ - deleteMessages(parameters: History.DeleteMessagesParameters, callback: ResultCallback): void; - /** - * Delete messages from the channel history. - * - * @param parameters - Request configuration parameters. - * - * @returns Asynchronous delete messages response. - * - * @deprecated - */ - deleteMessages(parameters: History.DeleteMessagesParameters): Promise; - /** - * Count messages from the channels' history. - * - * @param parameters - Request configuration parameters. - * @param callback - Request completion handler callback. - */ - messageCounts(parameters: History.MessageCountParameters, callback: ResultCallback): void; - /** - * Count messages from the channels' history. - * - * @param parameters - Request configuration parameters. - * - * @returns Asynchronous count messages response. - */ - messageCounts(parameters: History.MessageCountParameters): Promise; - /** - * Fetch single channel history. - * - * @param parameters - Request configuration parameters. - * @param callback - Request completion handler callback. - * - * @deprecated - */ - history(parameters: History.GetHistoryParameters, callback: ResultCallback): void; - /** - * Fetch single channel history. - * - * @param parameters - Request configuration parameters. - * - * @returns Asynchronous fetch channel history response. - * - * @deprecated - */ - history(parameters: History.GetHistoryParameters): Promise; - /** - * Get channel's presence information. - * - * @param parameters - Request configuration parameters. - * @param callback - Request completion handler callback. - */ - hereNow(parameters: Presence.HereNowParameters, callback: ResultCallback): void; - /** - * Get channel presence information. - * - * @param parameters - Request configuration parameters. - * - * @returns Asynchronous get channel's presence response. - */ - hereNow(parameters: Presence.HereNowParameters): Promise; - /** - * Get user's presence information. - * - * Get list of channels to which `uuid` currently subscribed. - * - * @param parameters - Request configuration parameters. - * @param callback - Request completion handler callback. - */ - whereNow(parameters: Presence.WhereNowParameters, callback: ResultCallback): void; - /** - * Get user's presence information. - * - * Get list of channels to which `uuid` currently subscribed. - * - * @param parameters - Request configuration parameters. - * - * @returns Asynchronous get user's presence response. - */ - whereNow(parameters: Presence.WhereNowParameters): Promise; - /** - * Get associated user's data for channels and groups. - * - * @param parameters - Request configuration parameters. - * @param callback - Request completion handler callback. - */ - getState(parameters: Presence.GetPresenceStateParameters, callback: ResultCallback): void; - /** - * Get associated user's data for channels and groups. - * - * @param parameters - Request configuration parameters. - * - * @returns Asynchronous get associated user's data response. - */ - getState(parameters: Presence.GetPresenceStateParameters): Promise; - /** - * Set associated user's data for channels and groups. - * - * @param parameters - Request configuration parameters. - * @param callback - Request completion handler callback. - */ - setState(parameters: Presence.SetPresenceStateParameters | Presence.SetPresenceStateWithHeartbeatParameters, callback: ResultCallback): void; - /** - * Set associated user's data for channels and groups. - * - * @param parameters - Request configuration parameters. - * - * @returns Asynchronous set associated user's data response. - */ - setState(parameters: Presence.SetPresenceStateParameters | Presence.SetPresenceStateWithHeartbeatParameters): Promise; - /** - * Manual presence management. - * - * @param parameters - Desired presence state for provided list of channels and groups. - */ - presence(parameters: { - connected: boolean; - channels?: string[]; - channelGroups?: string[]; - }): void; - /** - * Announce user presence - * - * @param parameters - Desired presence state for provided list of channels and groups. - * @param callback - Request completion handler callback. - */ - private heartbeat; - /** - * Announce user `join` on specified list of channels and groups. - * - * @param parameters - List of channels and groups where `join` event should be sent. - */ - private join; - /** - * Announce user `leave` on specified list of channels and groups. - * - * @param parameters - List of channels and groups where `leave` event should be sent. - */ - private leave; - /** - * Announce user `leave` on all subscribed channels. - */ - private leaveAll; - /** - * Grant token permission. - * - * Generate access token with requested permissions. - * - * @param parameters - Request configuration parameters. - * @param callback - Request completion handler callback. - */ - grantToken(parameters: PAM.GrantTokenParameters, callback: ResultCallback): void; - /** - * Grant token permission. - * - * Generate access token with requested permissions. - * - * @param parameters - Request configuration parameters. - * - * @returns Asynchronous grant token response. - */ - grantToken(parameters: PAM.GrantTokenParameters): Promise; - /** - * Revoke token permission. - * - * @param token - Access token for which permissions should be revoked. - * @param callback - Request completion handler callback. - */ - revokeToken(token: PAM.RevokeParameters, callback: ResultCallback): void; - /** - * Revoke token permission. - * - * @param token - Access token for which permissions should be revoked. - * - * @returns Asynchronous revoke token response. - */ - revokeToken(token: PAM.RevokeParameters): Promise; - /** - * Get current access token. - * - * @returns Previously configured access token using {@link setToken} method. - */ - get token(): string | undefined; - /** - * Get current access token. - * - * @returns Previously configured access token using {@link setToken} method. - */ - getToken(): string | undefined; - /** - * Set current access token. - * - * @param token - New access token which should be used with next REST API endpoint calls. - */ - set token(token: string | undefined); - /** - * Set current access token. - * - * @param token - New access token which should be used with next REST API endpoint calls. - */ - setToken(token: string | undefined): void; - /** - * Parse access token. - * - * Parse token to see what permissions token owner has. - * - * @param token - Token which should be parsed. - * - * @returns Token's permissions information for the resources. - */ - parseToken(token: string): { - version: number; - timestamp: number; - ttl: number; - resources?: Partial>> | undefined; - patterns?: Partial>> | undefined; - authorized_uuid?: string | undefined; - signature: ArrayBuffer; - meta?: Payload | undefined; - } | undefined; - /** - * Grant auth key(s) permission. - * - * @param parameters - Request configuration parameters. - * @param callback - Request completion handler callback. - * - * @deprecated Use {@link grantToken} and {@link setToken} methods instead. - */ - grant(parameters: PAM.GrantParameters, callback: ResultCallback): void; - /** - * Grant auth key(s) permission. - * - * @param parameters - Request configuration parameters. - * - * @returns Asynchronous grant auth key(s) permissions response. - * - * @deprecated Use {@link grantToken} and {@link setToken} methods instead. - */ - grant(parameters: PAM.GrantParameters): Promise; - /** - * Audit auth key(s) permission. - * - * @param parameters - Request configuration parameters. - * @param callback - Request completion handler callback. - * - * @deprecated - */ - audit(parameters: PAM.AuditParameters, callback: ResultCallback): void; - /** - * Audit auth key(s) permission. - * - * @param parameters - Request configuration parameters. - * - * @returns Asynchronous audit auth key(s) permissions response. - * - * @deprecated - */ - audit(parameters: PAM.AuditParameters): Promise; - /** - * PubNub App Context API group. - */ - get objects(): PubNubObjects; - /** - * Fetch a paginated list of User objects. - * - * @param callback - Request completion handler callback. - * - * @deprecated Use {@link PubNubCore#objects.getAllUUIDMetadata} method instead. - */ - fetchUsers(callback: ResultCallback>): void; - /** - * Fetch a paginated list of User objects. - * - * @param parameters - Request configuration parameters. - * @param callback - Request completion handler callback. - * - * @deprecated Use {@link PubNubCore#objects.getAllUUIDMetadata} method instead. - */ - fetchUsers(parameters: AppContext.GetAllMetadataParameters>, callback: ResultCallback>): void; - /** - * Fetch a paginated list of User objects. - * - * @param [parameters] - Request configuration parameters. - * - * @returns Asynchronous get all User objects response. - * - * @deprecated Use {@link PubNubCore#objects.getAllUUIDMetadata} method instead. - */ - fetchUsers(parameters?: AppContext.GetAllMetadataParameters>): Promise>; - /** - * Fetch User object for currently configured PubNub client `uuid`. - * - * @param callback - Request completion handler callback. - * - * @deprecated Use {@link PubNubCore#objects.getUUIDMetadata} method instead. - */ - fetchUser(callback: ResultCallback>): void; - /** - * Fetch User object for currently configured PubNub client `uuid`. - * - * @param parameters - Request configuration parameters. Will fetch User object for currently - * configured PubNub client `uuid` if not set. - * @param callback - Request completion handler callback. - * - * @deprecated Use {@link PubNubCore#objects.getUUIDMetadata} method instead. - */ - fetchUser(parameters: AppContext.GetUUIDMetadataParameters, callback: ResultCallback>): void; - /** - * Fetch User object for currently configured PubNub client `uuid`. - * - * @param [parameters] - Request configuration parameters. Will fetch User object for currently - * configured PubNub client `uuid` if not set. - * - * @returns Asynchronous get User object response. - * - * @deprecated Use {@link PubNubCore#objects.getUUIDMetadata} method instead. - */ - fetchUser(parameters?: AppContext.GetUUIDMetadataParameters): Promise>; - /** - * Create User object. - * - * @param parameters - Request configuration parameters. Will create User object for currently - * configured PubNub client `uuid` if not set. - * @param callback - Request completion handler callback. - * - * @deprecated Use {@link PubNubCore#objects.setUUIDMetadata} method instead. - */ - createUser(parameters: AppContext.SetUUIDMetadataParameters, callback: ResultCallback>): void; - /** - * Create User object. - * - * @param parameters - Request configuration parameters. Will create User object for currently - * configured PubNub client `uuid` if not set. - * - * @returns Asynchronous create User object response. - * - * @deprecated Use {@link PubNubCore#objects.setUUIDMetadata} method instead. - */ - createUser(parameters: AppContext.SetUUIDMetadataParameters): Promise>; - /** - * Update User object. - * - * @param parameters - Request configuration parameters. Will update User object for currently - * configured PubNub client `uuid` if not set. - * @param callback - Request completion handler callback. - * - * @deprecated Use {@link PubNubCore#objects.setUUIDMetadata} method instead. - */ - updateUser(parameters: AppContext.SetUUIDMetadataParameters, callback: ResultCallback>): void; - /** - * Update User object. - * - * @param parameters - Request configuration parameters. Will update User object for currently - * configured PubNub client `uuid` if not set. - * - * @returns Asynchronous update User object response. - * - * @deprecated Use {@link PubNubCore#objects.setUUIDMetadata} method instead. - */ - updateUser(parameters: AppContext.SetUUIDMetadataParameters): Promise>; - /** - * Remove a specific User object. - * - * @param callback - Request completion handler callback. Will remove User object for currently - * configured PubNub client `uuid` if not set. - * - * @deprecated Use {@link PubNubCore#objects.removeUUIDMetadata} method instead. - */ - removeUser(callback: ResultCallback): void; - /** - * Remove a specific User object. - * - * @param parameters - Request configuration parameters. Will remove User object for currently - * configured PubNub client `uuid` if not set. - * @param callback - Request completion handler callback. - * - * @deprecated Use {@link PubNubCore#objects.removeUUIDMetadata} method instead. - */ - removeUser(parameters: AppContext.RemoveUUIDMetadataParameters, callback: ResultCallback): void; - /** - * Remove a specific User object. - * - * @param [parameters] - Request configuration parameters. Will remove User object for currently - * configured PubNub client `uuid` if not set. - * - * @returns Asynchronous User object remove response. - * - * @deprecated Use {@link PubNubCore#objects.removeUUIDMetadata} method instead. - */ - removeUser(parameters?: AppContext.RemoveUUIDMetadataParameters): Promise; - /** - * Fetch a paginated list of Space objects. - * - * @param callback - Request completion handler callback. - * - * @deprecated Use {@link PubNubCore#objects.getAllChannelMetadata} method instead. - */ - fetchSpaces(callback: ResultCallback>): void; - /** - * Fetch a paginated list of Space objects. - * - * @param parameters - Request configuration parameters. - * @param callback - Request completion handler callback. - * - * @deprecated Use {@link PubNubCore#objects.getAllChannelMetadata} method instead. - */ - fetchSpaces(parameters: AppContext.GetAllMetadataParameters>, callback: ResultCallback>): void; - /** - * Fetch a paginated list of Space objects. - * - * @param [parameters] - Request configuration parameters. - * - * @returns Asynchronous get all Space objects response. - * - * @deprecated Use {@link PubNubCore#objects.getAllChannelMetadata} method instead. - */ - fetchSpaces(parameters?: AppContext.GetAllMetadataParameters>): Promise>; - /** - * Fetch a specific Space object. - * - * @param parameters - Request configuration parameters. - * @param callback - Request completion handler callback. - * - * @deprecated Use {@link PubNubCore#objects.getChannelMetadata} method instead. - */ - fetchSpace(parameters: AppContext.GetChannelMetadataParameters, callback: ResultCallback>): void; - /** - * Fetch a specific Space object. - * - * @param parameters - Request configuration parameters. - * - * @returns Asynchronous get Channel metadata response. - * - * @deprecated Use {@link PubNubCore#objects.getChannelMetadata} method instead. - */ - fetchSpace(parameters: AppContext.GetChannelMetadataParameters): Promise>; - /** - * Create specific Space object. - * - * @param parameters - Request configuration parameters. - * @param callback - Request completion handler callback. - * - * @deprecated Use {@link PubNubCore#objects.setChannelMetadata} method instead. - */ - createSpace(parameters: AppContext.SetChannelMetadataParameters, callback: ResultCallback>): void; - /** - * Create specific Space object. - * - * @param parameters - Request configuration parameters. - * - * @returns Asynchronous create Space object response. - * - * @deprecated Use {@link PubNubCore#objects.setChannelMetadata} method instead. - */ - createSpace(parameters: AppContext.SetChannelMetadataParameters): Promise>; - /** - * Update specific Space object. - * - * @param parameters - Request configuration parameters. - * @param callback - Request completion handler callback. - * - * @deprecated Use {@link PubNubCore#objects.setChannelMetadata} method instead. - */ - updateSpace(parameters: AppContext.SetChannelMetadataParameters, callback: ResultCallback>): void; - /** - * Update specific Space object. - * - * @param parameters - Request configuration parameters. - * - * @returns Asynchronous update Space object response. - * - * @deprecated Use {@link PubNubCore#objects.setChannelMetadata} method instead. - */ - updateSpace(parameters: AppContext.SetChannelMetadataParameters): Promise>; - /** - * Remove Space object. - * - * @param parameters - Request configuration parameters. - * @param callback - Request completion handler callback. - * - * @deprecated Use {@link PubNubCore#objects.removeChannelMetadata} method instead. - */ - removeSpace(parameters: AppContext.RemoveChannelMetadataParameters, callback: ResultCallback): void; - /** - * Remove a specific Space object. - * - * @param parameters - Request configuration parameters. - * - * @returns Asynchronous Space object remove response. - * - * @deprecated Use {@link PubNubCore#objects.removeChannelMetadata} method instead. - */ - removeSpace(parameters: AppContext.RemoveChannelMetadataParameters): Promise; - /** - * Fetch paginated list of specific Space members or specific User memberships. - * - * @param parameters - Request configuration parameters. - * @param callback - Request completion handler callback. - * - * @deprecated Use {@link PubNubCore#objects.getChannelMembers} or {@link PubNubCore#objects.getMemberships} - * methods instead. - */ - fetchMemberships(parameters: AppContext.GetMembershipsParameters | AppContext.GetMembersParameters, callback: ResultCallback | AppContext.UserMembersResponse>): void; - /** - * Fetch paginated list of specific Space members or specific User memberships. - * - * @param parameters - Request configuration parameters. - * - * @returns Asynchronous get specific Space members or specific User memberships response. - * - * @deprecated Use {@link PubNubCore#objects.getChannelMembers} or {@link PubNubCore#objects.getMemberships} - * methods instead. - */ - fetchMemberships(parameters: AppContext.GetMembershipsParameters | AppContext.GetMembersParameters): Promise | AppContext.UserMembersResponse>; - /** - * Add members to specific Space or memberships specific User. - * - * @param parameters - Request configuration parameters. - * @param callback - Request completion handler callback. - * - * @deprecated Use {@link PubNubCore#objects.setChannelMembers} or {@link PubNubCore#objects.setMemberships} - * methods instead. - */ - addMemberships(parameters: AppContext.SetMembershipsParameters | AppContext.SetChannelMembersParameters, callback: ResultCallback | AppContext.SetMembersResponse>): void; - /** - * Add members to specific Space or memberships specific User. - * - * @param parameters - Request configuration parameters. - * - * @returns Asynchronous add members to specific Space or memberships specific User response. - * - * @deprecated Use {@link PubNubCore#objects.setChannelMembers} or {@link PubNubCore#objects.setMemberships} - * methods instead. - */ - addMemberships(parameters: AppContext.SetMembershipsParameters | AppContext.SetChannelMembersParameters): Promise | AppContext.SetMembersResponse>; - /** - * Update specific Space members or User memberships. - * - * @param parameters - Request configuration parameters. - * @param callback - Request completion handler callback. - * - * @deprecated Use {@link PubNubCore#objects.setChannelMembers} or {@link PubNubCore#objects.setMemberships} - * methods instead. - */ - updateMemberships(parameters: AppContext.SetMembershipsParameters | AppContext.SetChannelMembersParameters, callback: ResultCallback | AppContext.SetMembersResponse>): void; - /** - * Update specific Space members or User memberships. - * - * @param parameters - Request configuration parameters. - * - * @returns Asynchronous update Space members or User memberships response. - * - * @deprecated Use {@link PubNubCore#objects.setChannelMembers} or {@link PubNubCore#objects.setMemberships} - * methods instead. - */ - updateMemberships(parameters: AppContext.SetMembershipsParameters | AppContext.SetChannelMembersParameters): Promise | AppContext.SetMembersResponse>; - /** - * Remove User membership. - * - * @param parameters - Request configuration parameters. - * @param callback - Request completion handler callback. - * - * @deprecated Use {@link PubNubCore#objects.removeMemberships} or {@link PubNubCore#objects.removeChannelMembers} - * methods instead - * from `objects` API group.. - */ - removeMemberships(parameters: AppContext.RemoveMembersParameters | AppContext.RemoveMembershipsParameters, callback: ResultCallback | AppContext.RemoveMembershipsResponse>): void; - /** - * Remove User membership. - * - * @param parameters - Request configuration parameters. - * - * @returns Asynchronous memberships modification response. - * - * @deprecated Use {@link PubNubCore#objects.removeMemberships} or {@link PubNubCore#objects.removeChannelMembers} - * methods instead - * from `objects` API group.. - */ - removeMemberships(parameters: AppContext.RemoveMembersParameters | AppContext.RemoveMembershipsParameters): Promise>; - /** - * PubNub Channel Groups API group. - */ - get channelGroups(): PubNubChannelGroups; - /** - * PubNub Push Notifications API group. - */ - get push(): PubNubPushNotifications; - /** - * Share file to a specific channel. - * - * @param parameters - Request configuration parameters. - * @param callback - Request completion handler callback. - */ - sendFile(parameters: FileSharing.SendFileParameters, callback: ResultCallback): void; - /** - * Share file to a specific channel. - * - * @param parameters - Request configuration parameters. - * - * @returns Asynchronous file sharing response. - */ - sendFile(parameters: FileSharing.SendFileParameters): Promise; - /** - * Publish file message to a specific channel. - * - * @param parameters - Request configuration parameters. - * @param callback - Request completion handler callback. - */ - publishFile(parameters: FileSharing.PublishFileMessageParameters, callback: ResultCallback): void; - /** - * Publish file message to a specific channel. - * - * @param parameters - Request configuration parameters. - * - * @returns Asynchronous publish file message response. - */ - publishFile(parameters: FileSharing.PublishFileMessageParameters): Promise; - /** - * Retrieve list of shared files in specific channel. - * - * @param parameters - Request configuration parameters. - * @param callback - Request completion handler callback. - */ - listFiles(parameters: FileSharing.ListFilesParameters, callback: ResultCallback): void; - /** - * Retrieve list of shared files in specific channel. - * - * @param parameters - Request configuration parameters. - * - * @returns Asynchronous shared files list response. - */ - listFiles(parameters: FileSharing.ListFilesParameters): Promise; - /** - * Get file download Url. - * - * @param parameters - Request configuration parameters. - * - * @returns File download Url. - */ - getFileUrl(parameters: FileSharing.FileUrlParameters): FileSharing.FileUrlResponse; - /** - * Download shared file from specific channel. - * - * @param parameters - Request configuration parameters. - * @param callback - Request completion handler callback. - */ - downloadFile(parameters: FileSharing.DownloadFileParameters, callback: ResultCallback): void; - /** - * Download shared file from specific channel. - * - * @param parameters - Request configuration parameters. - * - * @returns Asynchronous download shared file response. - */ - downloadFile(parameters: FileSharing.DownloadFileParameters): Promise; - /** - * Delete shared file from specific channel. - * - * @param parameters - Request configuration parameters. - * @param callback - Request completion handler callback. - */ - deleteFile(parameters: FileSharing.DeleteFileParameters, callback: ResultCallback): void; - /** - * Delete shared file from specific channel. - * - * @param parameters - Request configuration parameters. - * - * @returns Asynchronous delete shared file response. - */ - deleteFile(parameters: FileSharing.DeleteFileParameters): Promise; - /** - Get current high-precision timetoken. - * - * @param callback - Request completion handler callback. - */ - time(callback: ResultCallback): void; - /** - * Get current high-precision timetoken. - * - * @returns Asynchronous get current timetoken response. - */ - time(): Promise; - /** - * Encrypt data. - * - * @param data - Stringified data which should be encrypted using `CryptoModule`. - * @deprecated - * @param [customCipherKey] - Cipher key which should be used to encrypt data. **Deprecated:** - * use {@link Configuration#cryptoModule|cryptoModule} instead. - * - * @returns Data encryption result as a string. - */ - encrypt(data: string | Payload, customCipherKey?: string): string; - /** - * Decrypt data. - * - * @param data - Stringified data which should be encrypted using `CryptoModule`. - * @param [customCipherKey] - Cipher key which should be used to decrypt data. **Deprecated:** - * use {@link Configuration#cryptoModule|cryptoModule} instead. - * - * @returns Data decryption result as an object. - */ - decrypt(data: string, customCipherKey?: string): Payload | null; - /** - * Encrypt file content. - * - * @param file - File which should be encrypted using `CryptoModule`. - * - * @returns Asynchronous file encryption result. - * - * @throws Error if source file not provided. - * @throws File constructor not provided. - * @throws Crypto module is missing (if non-legacy flow used). - */ - encryptFile(file: PubNubFileInterface): Promise; - /** - * Encrypt file content. - * - * @param key - Cipher key which should be used to encrypt data. - * @param file - File which should be encrypted using legacy cryptography. - * - * @returns Asynchronous file encryption result. - * - * @throws Error if source file not provided. - * @throws File constructor not provided. - * @throws Crypto module is missing (if non-legacy flow used). - */ - encryptFile(key: string, file: PubNubFileInterface): Promise; - /** - * Decrypt file content. - * - * @param file - File which should be decrypted using legacy cryptography. - * - * @returns Asynchronous file decryption result. - * - * @throws Error if source file not provided. - * @throws File constructor not provided. - * @throws Crypto module is missing (if non-legacy flow used). - */ - decryptFile(file: PubNubFileInterface): Promise; - /** - * Decrypt file content. - * - * @param key - Cipher key which should be used to decrypt data. - * @param [file] - File which should be decrypted using legacy cryptography. - * - * @returns Asynchronous file decryption result. - * - * @throws Error if source file not provided. - * @throws File constructor not provided. - * @throws Crypto module is missing (if non-legacy flow used). - */ - decryptFile(key: string | PubNubFileInterface, file?: PubNubFileInterface): Promise; -} -export {}; diff --git a/lib/types/core/pubnub-objects.d.ts b/lib/types/core/pubnub-objects.d.ts deleted file mode 100644 index 75f4f1a7b..000000000 --- a/lib/types/core/pubnub-objects.d.ts +++ /dev/null @@ -1,364 +0,0 @@ -/** - * PubNub Objects API module. - */ -import { ResultCallback, SendRequestFunction } from './types/api'; -import { PrivateClientConfiguration } from './interfaces/configuration'; -import * as AppContext from './types/api/app-context'; -export default class PubNubObjects { - private readonly configuration; - private readonly sendRequest; - /** - * REST API endpoints access credentials. - */ - private readonly keySet; - constructor(configuration: PrivateClientConfiguration, sendRequest: SendRequestFunction); - /** - * Fetch a paginated list of UUID Metadata objects. - * - * @param callback - Request completion handler callback. - */ - getAllUUIDMetadata(callback: ResultCallback>): void; - /** - * Fetch a paginated list of UUID Metadata objects. - * - * @param parameters - Request configuration parameters. - * @param callback - Request completion handler callback. - */ - getAllUUIDMetadata(parameters: AppContext.GetAllMetadataParameters>, callback: ResultCallback>): void; - /** - * Fetch a paginated list of UUID Metadata objects. - * - * @param [parameters] - Request configuration parameters. - * - * @returns Asynchronous get all UUID metadata response. - */ - getAllUUIDMetadata(parameters?: AppContext.GetAllMetadataParameters>): Promise>; - /** - * Fetch a paginated list of UUID Metadata objects. - * - * - * @param [parametersOrCallback] - Request configuration parameters or callback from overload. - * @param [callback] - Request completion handler callback. - * - * @returns Asynchronous get all UUID metadata response or `void` in case if `callback` provided. - */ - _getAllUUIDMetadata(parametersOrCallback?: AppContext.GetAllMetadataParameters> | ResultCallback>, callback?: ResultCallback>): Promise | void>; - /** - * Fetch UUID Metadata object for currently configured PubNub client `uuid`. - * - * @param callback - Request completion handler callback. - */ - getUUIDMetadata(callback: ResultCallback>): void; - /** - * Fetch a specific UUID Metadata object. - * - * @param parameters - Request configuration parameters. Will fetch UUID metadata object for - * currently configured PubNub client `uuid` if not set. - * @param callback - Request completion handler callback. - */ - getUUIDMetadata(parameters: AppContext.GetUUIDMetadataParameters, callback: ResultCallback>): void; - /** - * Fetch a specific UUID Metadata object. - * - * @param [parameters] - Request configuration parameters. Will fetch UUID Metadata object for - * currently configured PubNub client `uuid` if not set. - * - * @returns Asynchronous get UUID metadata response. - */ - getUUIDMetadata(parameters?: AppContext.GetUUIDMetadataParameters): Promise>; - /** - * Fetch a specific UUID Metadata object. - * - * @param [parametersOrCallback] - Request configuration parameters or callback from overload. - * @param [callback] - Request completion handler callback. - * - * @returns Asynchronous get UUID metadata response or `void` in case if `callback` provided. - */ - _getUUIDMetadata(parametersOrCallback?: AppContext.GetUUIDMetadataParameters | ResultCallback>, callback?: ResultCallback>): Promise | void>; - /** - * Update specific UUID Metadata object. - * - * @param parameters - Request configuration parameters. Will set UUID metadata for currently - * configured PubNub client `uuid` if not set. - * @param callback - Request completion handler callback. - */ - setUUIDMetadata(parameters: AppContext.SetUUIDMetadataParameters, callback: ResultCallback>): void; - /** - * Update specific UUID Metadata object. - * - * @param parameters - Request configuration parameters. Will set UUID metadata for currently - * configured PubNub client `uuid` if not set. - * - * @returns Asynchronous set UUID metadata response. - */ - setUUIDMetadata(parameters: AppContext.SetUUIDMetadataParameters): Promise>; - /** - * Update specific UUID Metadata object. - * - * @param parameters - Request configuration parameters. Will set UUID metadata for currently - * configured PubNub client `uuid` if not set. - * @param [callback] - Request completion handler callback. - * - * @returns Asynchronous set UUID metadata response or `void` in case if `callback` provided. - */ - _setUUIDMetadata(parameters: AppContext.SetUUIDMetadataParameters, callback?: ResultCallback>): Promise | void>; - /** - * Remove UUID Metadata object for currently configured PubNub client `uuid`. - * - * @param callback - Request completion handler callback. - */ - removeUUIDMetadata(callback: ResultCallback): void; - /** - * Remove a specific UUID Metadata object. - * - * @param parameters - Request configuration parameters. Will remove UUID metadata for currently - * configured PubNub client `uuid` if not set. - * @param callback - Request completion handler callback. - */ - removeUUIDMetadata(parameters: AppContext.RemoveUUIDMetadataParameters, callback: ResultCallback): void; - /** - * Remove a specific UUID Metadata object. - * - * @param [parameters] - Request configuration parameters. Will remove UUID metadata for currently - * configured PubNub client `uuid` if not set. - * - * @returns Asynchronous UUID metadata remove response. - */ - removeUUIDMetadata(parameters?: AppContext.RemoveUUIDMetadataParameters): Promise; - /** - * Remove a specific UUID Metadata object. - * - * @param [parametersOrCallback] - Request configuration parameters or callback from overload. - * @param [callback] - Request completion handler callback. - * - * @returns Asynchronous UUID metadata remove response or `void` in case if `callback` provided. - */ - _removeUUIDMetadata(parametersOrCallback?: AppContext.RemoveUUIDMetadataParameters | ResultCallback, callback?: ResultCallback): Promise; - /** - * Fetch a paginated list of Channel Metadata objects. - * - * @param callback - Request completion handler callback. - */ - getAllChannelMetadata(callback: ResultCallback>): void; - /** - * Fetch a paginated list of Channel Metadata objects. - * - * @param parameters - Request configuration parameters. - * @param callback - Request completion handler callback. - */ - getAllChannelMetadata(parameters: AppContext.GetAllMetadataParameters>, callback: ResultCallback>): void; - /** - * Fetch a paginated list of Channel Metadata objects. - * - * @param [parameters] - Request configuration parameters. - * - * @returns Asynchronous get all Channel metadata response. - */ - getAllChannelMetadata(parameters?: AppContext.GetAllMetadataParameters>): Promise>; - /** - * Fetch a paginated list of Channel Metadata objects. - * - * @param [parametersOrCallback] - Request configuration parameters or callback from overload. - * @param [callback] - Request completion handler callback. - * - * @returns Asynchronous get all Channel metadata response or `void` in case if `callback` - * provided. - */ - _getAllChannelMetadata(parametersOrCallback?: AppContext.GetAllMetadataParameters> | ResultCallback>, callback?: ResultCallback>): Promise | void>; - /** - * Fetch Channel Metadata object. - * - * @param parameters - Request configuration parameters. - * @param callback - Request completion handler callback. - */ - getChannelMetadata(parameters: AppContext.GetChannelMetadataParameters, callback: ResultCallback>): void; - /** - * Fetch a specific Channel Metadata object. - * - * @param parameters - Request configuration parameters. - * - * @returns Asynchronous get Channel metadata response. - */ - getChannelMetadata(parameters: AppContext.GetChannelMetadataParameters): Promise>; - /** - * Fetch Channel Metadata object. - * - * @param parameters - Request configuration parameters. - * @param [callback] - Request completion handler callback. - * - * @returns Asynchronous get Channel metadata response or `void` in case if `callback` provided. - */ - _getChannelMetadata(parameters: AppContext.GetChannelMetadataParameters, callback?: ResultCallback>): Promise | void>; - /** - * Update specific Channel Metadata object. - * - * @param parameters - Request configuration parameters. - * @param callback - Request completion handler callback. - */ - setChannelMetadata(parameters: AppContext.SetChannelMetadataParameters, callback: ResultCallback>): void; - /** - * Update specific Channel Metadata object. - * - * @param parameters - Request configuration parameters. - * - * @returns Asynchronous set Channel metadata response. - */ - setChannelMetadata(parameters: AppContext.SetChannelMetadataParameters): Promise>; - /** - * Update specific Channel Metadata object. - * - * @param parameters - Request configuration parameters. - * @param [callback] - Request completion handler callback. - * - * @returns Asynchronous set Channel metadata response or `void` in case if `callback` provided. - */ - _setChannelMetadata(parameters: AppContext.SetChannelMetadataParameters, callback?: ResultCallback>): Promise | void>; - /** - * Remove Channel Metadata object. - * - * @param parameters - Request configuration parameters. - * @param callback - Request completion handler callback. - */ - removeChannelMetadata(parameters: AppContext.RemoveChannelMetadataParameters, callback: ResultCallback): void; - /** - * Remove a specific Channel Metadata object. - * - * @param parameters - Request configuration parameters. - * - * @returns Asynchronous Channel metadata remove response. - */ - removeChannelMetadata(parameters: AppContext.RemoveChannelMetadataParameters): Promise; - /** - * Remove a specific Channel Metadata object. - * - * @param parameters - Request configuration parameters. - * @param [callback] - Request completion handler callback. - * - * @returns Asynchronous Channel metadata remove response or `void` in case if `callback` - * provided. - */ - _removeChannelMetadata(parameters: AppContext.RemoveChannelMetadataParameters, callback?: ResultCallback): Promise; - /** - * Fetch a paginated list of Channel Member objects. - * - * @param parameters - Request configuration parameters. - * @param callback - Request completion handler callback. - */ - getChannelMembers(parameters: AppContext.GetMembersParameters, callback: ResultCallback>): void; - /** - * Fetch a paginated list of Channel Member objects. - * - * @param parameters - Request configuration parameters. - * - * @returns Asynchronous get Channel Members response. - */ - getChannelMembers(parameters: AppContext.GetMembersParameters): Promise>; - /** - * Update specific Channel Members list. - * - * @param parameters - Request configuration parameters. - * @param callback - Request completion handler callback. - */ - setChannelMembers(parameters: AppContext.SetChannelMembersParameters, callback: ResultCallback>): void; - /** - * Update specific Channel Members list. - * - * @param parameters - Request configuration parameters. - * - * @returns Asynchronous update Channel Members list response. - */ - setChannelMembers(parameters: AppContext.SetChannelMembersParameters): Promise>; - /** - * Remove Members from the Channel. - * - * @param parameters - Request configuration parameters. - * @param callback - Request completion handler callback. - */ - removeChannelMembers(parameters: AppContext.RemoveMembersParameters, callback: ResultCallback>): void; - /** - * Remove Members from the Channel. - * - * @param parameters - Request configuration parameters. - * - * @returns Asynchronous Channel Members remove response. - */ - removeChannelMembers(parameters: AppContext.RemoveMembersParameters): Promise>; - /** - * Fetch a specific UUID Memberships list for currently configured PubNub client `uuid`. - * - * @param callback - Request completion handler callback. - * - * @returns Asynchronous get UUID Memberships list response or `void` in case if `callback` - * provided. - */ - getMemberships(callback: ResultCallback>): void; - /** - * Fetch a specific UUID Memberships list. - * - * @param parameters - Request configuration parameters. - * @param callback - Request completion handler callback. - */ - getMemberships(parameters: AppContext.GetMembershipsParameters, callback: ResultCallback>): void; - /** - * Fetch a specific UUID Memberships list. - * - * @param [parameters] - Request configuration parameters. Will fetch UUID Memberships list for - * currently configured PubNub client `uuid` if not set. - * - * @returns Asynchronous get UUID Memberships list response. - */ - getMemberships(parameters?: AppContext.GetMembershipsParameters): Promise>; - /** - * Update specific UUID Memberships list. - * - * @param parameters - Request configuration parameters. - * @param callback - Request completion handler callback. - */ - setMemberships(parameters: AppContext.SetMembershipsParameters, callback: ResultCallback>): void; - /** - * Update specific UUID Memberships list. - * - * @param parameters - Request configuration parameters or callback from overload. - * - * @returns Asynchronous update UUID Memberships list response. - */ - setMemberships(parameters: AppContext.SetMembershipsParameters): Promise>; - /** - * Remove a specific UUID Memberships. - * - * @param parameters - Request configuration parameters. - * @param callback - Request completion handler callback. - */ - removeMemberships(parameters: AppContext.RemoveMembershipsParameters, callback: ResultCallback>): void; - /** - * Remove a specific UUID Memberships. - * - * @param parameters - Request configuration parameters. - * - * @returns Asynchronous UUID Memberships remove response. - */ - removeMemberships(parameters: AppContext.RemoveMembershipsParameters): Promise>; - /** - * Fetch paginated list of specific Space members or specific User memberships. - * - * @param parameters - Request configuration parameters. - * @param [callback] - Request completion handler callback. - * - * @returns Asynchronous get specific Space members or specific User memberships response. - * - * @deprecated Use {@link PubNubObjects#getChannelMembers} or {@link PubNubObjects#getMemberships} methods instead. - */ - fetchMemberships(parameters: AppContext.GetMembershipsParameters | AppContext.GetMembersParameters, callback?: ResultCallback | AppContext.UserMembersResponse>): Promise | AppContext.UserMembersResponse | void>; - /** - * Add members to specific Space or memberships specific User. - * - * @param parameters - Request configuration parameters. - * @param [callback] - Request completion handler callback. - * - * @returns Asynchronous add members to specific Space or memberships specific User response or - * `void` in case if `callback` provided. - * - * @deprecated Use {@link PubNubObjects#setChannelMembers} or {@link PubNubObjects#setMemberships} methods instead. - */ - addMemberships(parameters: AppContext.SetMembershipsParameters | AppContext.SetChannelMembersParameters, callback?: ResultCallback | AppContext.SetMembersResponse>): Promise | AppContext.SetMembersResponse | void>; -} diff --git a/lib/types/core/pubnub-push.d.ts b/lib/types/core/pubnub-push.d.ts deleted file mode 100644 index 33d8c02ea..000000000 --- a/lib/types/core/pubnub-push.d.ts +++ /dev/null @@ -1,64 +0,0 @@ -/** - * PubNub Push Notifications API module. - */ -import { KeySet, ResultCallback, SendRequestFunction, StatusCallback } from './types/api'; -import * as Push from './types/api/push'; -export default class PubNubPushNotifications { - private readonly keySet; - private readonly sendRequest; - constructor(keySet: KeySet, sendRequest: SendRequestFunction); - /** - * Fetch device's push notification enabled channels. - * - * @param parameters - Request configuration parameters. - * @param callback - Request completion handler callback. - */ - listChannels(parameters: Push.ListDeviceChannelsParameters, callback: ResultCallback): void; - /** - * Fetch device's push notification enabled channels. - * - * @param parameters - Request configuration parameters. - * - * @returns Asynchronous get device channels response. - */ - listChannels(parameters: Push.ListDeviceChannelsParameters): Promise; - /** - * Enable push notifications on channels for device. - * - * @param parameters - Request configuration parameters. - * @param callback - Request completion handler callback. - */ - addChannels(parameters: Push.ManageDeviceChannelsParameters, callback: StatusCallback): void; - /** - * Enable push notifications on channels for device. - * - * @param parameters - Request configuration parameters. - */ - addChannels(parameters: Push.ManageDeviceChannelsParameters): Promise; - /** - * Disable push notifications on channels for device. - * - * @param parameters - Request configuration parameters. - * @param callback - Request completion handler callback. - */ - removeChannels(parameters: Push.ManageDeviceChannelsParameters, callback: StatusCallback): void; - /** - * Disable push notifications on channels for device. - * - * @param parameters - Request configuration parameters. - */ - removeChannels(parameters: Push.ManageDeviceChannelsParameters): Promise; - /** - * Disable push notifications for device. - * - * @param parameters - Request configuration parameters. - * @param callback - Request completion handler callback. - */ - deleteDevice(parameters: Push.RemoveDeviceParameters, callback: StatusCallback): void; - /** - * Disable push notifications for device. - * - * @param parameters - Request configuration parameters. - */ - deleteDevice(parameters: Push.RemoveDeviceParameters): Promise; -} diff --git a/lib/types/core/types/api/access-manager.d.ts b/lib/types/core/types/api/access-manager.d.ts deleted file mode 100644 index bf85bda51..000000000 --- a/lib/types/core/types/api/access-manager.d.ts +++ /dev/null @@ -1,464 +0,0 @@ -/** - * Metadata which will be associated with access token. - */ -export type Metadata = Record; -/** - * Channel-specific token permissions. - */ -export type ChannelTokenPermissions = { - /** - * Whether `read` operations are permitted for corresponding level or not. - */ - read?: boolean; - /** - * Whether `write` operations are permitted for corresponding level or not. - */ - write?: boolean; - /** - * Whether `get` operations are permitted for corresponding level or not. - */ - get?: boolean; - /** - * Whether `manage` operations are permitted for corresponding level or not. - */ - manage?: boolean; - /** - * Whether `update` operations are permitted for corresponding level or not. - */ - update?: boolean; - /** - * Whether `join` operations are permitted for corresponding level or not. - */ - join?: boolean; - /** - * Whether `delete` operations are permitted for corresponding level or not. - */ - delete?: boolean; -}; -/** - * Space-specific token permissions. - */ -type SpaceTokenPermissions = ChannelTokenPermissions; -/** - * Channel group-specific token permissions. - */ -export type ChannelGroupTokenPermissions = { - /** - * Whether `read` operations are permitted for corresponding level or not. - */ - read?: boolean; - /** - * Whether `manage` operations are permitted for corresponding level or not. - */ - manage?: boolean; -}; -/** - * Uuid-specific token permissions. - */ -export type UuidTokenPermissions = { - /** - * Whether `get` operations are permitted for corresponding level or not. - */ - get?: boolean; - /** - * Whether `update` operations are permitted for corresponding level or not. - */ - update?: boolean; - /** - * Whether `delete` operations are permitted for corresponding level or not. - */ - delete?: boolean; -}; -/** - * User-specific token permissions. - */ -type UserTokenPermissions = UuidTokenPermissions; -/** - * Generate access token with permissions. - * - * Generate time-limited access token with required permissions for App Context objects. - */ -export type ObjectsGrantTokenParameters = { - /** - * Total number of minutes for which the token is valid. - * - * The minimum allowed value is `1`. - * The maximum is `43,200` minutes (`30` days). - */ - ttl: number; - /** - * Object containing resource permissions. - */ - resources?: { - /** - * Object containing `spaces` metadata permissions. - */ - spaces?: Record; - /** - * Object containing `users` permissions. - */ - users?: Record; - }; - /** - * Object containing permissions to multiple resources specified by a RegEx pattern. - */ - patterns?: { - /** - * Object containing `spaces` metadata permissions. - */ - spaces?: Record; - /** - * Object containing `users` permissions. - */ - users?: Record; - }; - /** - * Extra metadata to be published with the request. - * - * **Important:** Values must be scalar only; `arrays` or `objects` aren't supported. - */ - meta?: Metadata; - /** - * Single `userId` which is authorized to use the token to make API requests to PubNub. - */ - authorizedUserId?: string; -}; -/** - * Generate token with permissions. - * - * Generate time-limited access token with required permissions for resources. - */ -export type GrantTokenParameters = { - /** - * Total number of minutes for which the token is valid. - * - * The minimum allowed value is `1`. - * The maximum is `43,200` minutes (`30` days). - */ - ttl: number; - /** - * Object containing resource permissions. - */ - resources?: { - /** - * Object containing `uuid` metadata permissions. - */ - uuids?: Record; - /** - * Object containing `channel` permissions. - */ - channels?: Record; - /** - * Object containing `channel group` permissions. - */ - groups?: Record; - }; - /** - * Object containing permissions to multiple resources specified by a RegEx pattern. - */ - patterns?: { - /** - * Object containing `uuid` metadata permissions to apply to all `uuids` matching the RegEx - * pattern. - */ - uuids?: Record; - /** - * Object containing `channel` permissions to apply to all `channels` matching the RegEx - * pattern. - */ - channels?: Record; - /** - * Object containing `channel group` permissions to apply to all `channel groups` matching the - * RegEx pattern. - */ - groups?: Record; - }; - /** - * Extra metadata to be published with the request. - * - * **Important:** Values must be scalar only; `arrays` or `objects` aren't supported. - */ - meta?: Metadata; - /** - * Single `uuid` which is authorized to use the token to make API requests to PubNub. - */ - authorized_uuid?: string; -}; -/** - * Response with generated access token. - */ -export type GrantTokenResponse = string; -/** - * Access token for which permissions should be revoked. - */ -export type RevokeParameters = string; -/** - * Response with revoked access token. - */ -export type RevokeTokenResponse = Record; -/** - * Channel-specific permissions. - * - * Permissions include objects to the App Context Channel object as well. - */ -type ChannelPermissions = { - /** - * Whether `read` operations are permitted for corresponding level or not. - */ - r?: 0 | 1; - /** - * Whether `write` operations are permitted for corresponding level or not. - */ - w?: 0 | 1; - /** - * Whether `delete` operations are permitted for corresponding level or not. - */ - d?: 0 | 1; - /** - * Whether `get` operations are permitted for corresponding level or not. - */ - g?: 0 | 1; - /** - * Whether `update` operations are permitted for corresponding level or not. - */ - u?: 0 | 1; - /** - * Whether `manage` operations are permitted for corresponding level or not. - */ - m?: 0 | 1; - /** - * Whether `join` operations are permitted for corresponding level or not. - */ - j?: 0 | 1; - /** - * Duration for which permissions has been granted. - */ - ttl?: number; -}; -/** - * Channel group-specific permissions. - */ -type ChannelGroupPermissions = { - /** - * Whether `read` operations are permitted for corresponding level or not. - */ - r?: 0 | 1; - /** - * Whether `manage` operations are permitted for corresponding level or not. - */ - m?: 0 | 1; - /** - * Duration for which permissions has been granted. - */ - ttl?: number; -}; -/** - * App Context User-specific permissions. - */ -type UserPermissions = { - /** - * Whether `get` operations are permitted for corresponding level or not. - */ - g?: 0 | 1; - /** - * Whether `update` operations are permitted for corresponding level or not. - */ - u?: 0 | 1; - /** - * Whether `delete` operations are permitted for corresponding level or not. - */ - d?: 0 | 1; - /** - * Duration for which permissions has been granted. - */ - ttl?: number; -}; -/** - * Common permissions audit response content. - */ -type BaseAuditResponse = { - /** - * Permissions level. - */ - level: Level; - /** - * Subscription key at which permissions has been granted. - */ - subscribe_key: string; - /** - * Duration for which permissions has been granted. - */ - ttl?: number; -}; -/** - * Auth keys permissions for specified `level`. - */ -type AuthKeysPermissions = { - /** - * Auth keys-based permissions for specified `level` permission. - */ - auths: Record; -}; -/** - * Single channel permissions audit result. - */ -type ChannelPermissionsResponse = BaseAuditResponse<'channel+auth'> & { - /** - * Name of channel for which permissions audited. - */ - channel: string; -} & AuthKeysPermissions; -/** - * Multiple channels permissions audit result. - */ -type ChannelsPermissionsResponse = BaseAuditResponse<'channel'> & { - /** - * Per-channel permissions. - */ - channels: Record>; -}; -/** - * Single channel group permissions result. - */ -type ChannelGroupPermissionsResponse = BaseAuditResponse<'channel-group+auth'> & { - /** - * Name of channel group for which permissions audited. - */ - 'channel-group': string; -} & AuthKeysPermissions; -/** - * Multiple channel groups permissions audit result. - */ -type ChannelGroupsPermissionsResponse = BaseAuditResponse<'channel'> & { - /** - * Per-channel group permissions. - */ - 'channel-groups': Record>; -}; -/** - * App Context User permissions audit result. - */ -type UserPermissionsResponse = BaseAuditResponse<'user'> & { - /** - * Name of channel for which `user` permissions audited. - */ - channel: string; -} & AuthKeysPermissions; -/** - * Global sub-key level permissions audit result. - */ -type SubKeyPermissionsResponse = BaseAuditResponse<'subkey'> & { - /** - * Per-channel permissions. - */ - channels: Record>; - /** - * Per-channel group permissions. - */ - 'channel-groups': Record>; - /** - * Per-object permissions. - */ - objects: Record>; -}; -/** - * Response with permission information. - */ -export type PermissionsResponse = ChannelPermissionsResponse | ChannelsPermissionsResponse | ChannelGroupPermissionsResponse | ChannelGroupsPermissionsResponse | UserPermissionsResponse | SubKeyPermissionsResponse; -/** - * Audit permissions for provided auth keys / global permissions. - * - * Audit permissions on specific channel and / or channel group for the set of auth keys. - */ -export type AuditParameters = { - /** - * Name of channel for which channel-based permissions should be checked for {@link authKeys}. - */ - channel?: string; - /** - * Name of channel group for which channel group-based permissions should be checked for {@link authKeys}. - */ - channelGroup?: string; - /** - * List of auth keys for which permissions should be checked. - * - * Leave this empty to check channel / group -based permissions or global permissions. - * - * @default `[]` - */ - authKeys?: string[]; -}; -/** - * Grant permissions for provided auth keys / global permissions. - * - * Grant permissions on specific channel and / or channel group for the set of auth keys. - */ -export type GrantParameters = { - /** - * List of channels for which permissions should be granted. - */ - channels?: string[]; - /** - * List of channel groups for which permissions should be granted. - */ - channelGroups?: string[]; - /** - * List of App Context UUID for which permissions should be granted. - */ - uuids?: string[]; - /** - * List of auth keys for which permissions should be granted on specified objects. - * - * Leave this empty to grant channel / group -based permissions or global permissions. - */ - authKeys?: string[]; - /** - * Whether `read` operations are permitted for corresponding level or not. - * - * @default `false` - */ - read?: boolean; - /** - * Whether `write` operations are permitted for corresponding level or not. - * - * @default `false` - */ - write?: boolean; - /** - * Whether `delete` operations are permitted for corresponding level or not. - * - * @default `false` - */ - delete?: boolean; - /** - * Whether `get` operations are permitted for corresponding level or not. - * - * @default `false` - */ - get?: boolean; - /** - * Whether `update` operations are permitted for corresponding level or not. - * - * @default `false` - */ - update?: boolean; - /** - * Whether `manage` operations are permitted for corresponding level or not. - * - * @default `false` - */ - manage?: boolean; - /** - * Whether `join` operations are permitted for corresponding level or not. - * - * @default `false` - */ - join?: boolean; - /** - * For how long permissions should be effective (in minutes). - * - * @default `1440` - */ - ttl?: number; -}; -export {}; diff --git a/lib/types/core/types/api/app-context.d.ts b/lib/types/core/types/api/app-context.d.ts deleted file mode 100644 index 2017fdcf7..000000000 --- a/lib/types/core/types/api/app-context.d.ts +++ /dev/null @@ -1,875 +0,0 @@ -/** - * Partial nullability helper type. - */ -type PartialNullable = { - [P in keyof T]?: T[P] | null; -}; -/** - * Custom data which should be associated with metadata objects or their relation. - */ -export type CustomData = { - [key: string]: string | number | boolean | null; -}; -/** - * Type provides shape of App Context parameters which is common to the all objects types to - * be updated. - */ -type ObjectParameters = { - custom?: Custom; -}; -/** - * Type provides shape of App Context object which is common to the all objects types received - * from the PubNub service. - */ -export type ObjectData = { - /** - * Unique App Context object identifier. - * - * **Important:** For channel it is different from the channel metadata object name. - */ - id: string; - /** - * Last date and time when App Context object has been updated. - * - * String built from date using ISO 8601. - */ - updated: string; - /** - * App Context version hash. - */ - eTag: string; - /** - * Additional data associated with App Context object. - * - * **Important:** Values must be scalars; only arrays or objects are supported. - * {@link /docs/sdks/javascript/api-reference/objects#app-context-filtering-language-definition|App Context - * filtering language} doesn’t support filtering by custom properties. - */ - custom?: Custom | null; -}; -/** - * Type provides shape of object which let establish relation between metadata objects. - */ -type ObjectsRelation = { - /** - * App Context object unique identifier. - */ - id: string; - /** - * App Context objects relation status. - */ - status?: string; - /** - * Additional data associated with App Context object relation (membership or members). - * - * **Important:** Values must be scalars; only arrays or objects are supported. - * {@link /docs/sdks/javascript/api-reference/objects#app-context-filtering-language-definition|App Context - * filtering language} doesn’t support filtering by custom properties. - */ - custom?: Custom; -}; -/** - * Response page cursor. - */ -type Page = { - /** - * Random string returned from the server, indicating a specific position in a data set. - * - * Used for forward pagination, it fetches the next page, allowing you to continue from where - * you left off. - */ - next?: string; - /** - * Random string returned from the server, indicating a specific position in a data set. - * - * Used for backward pagination, it fetches the previous page, enabling access to earlier - * data. - * - * **Important:** Ignored if the `next` parameter is supplied. - */ - prev?: string; -}; -/** - * Metadata objects include options. - * - * Allows to configure what additional information should be included into service response. - */ -type IncludeOptions = { - /** - * Whether to include total number of App Context objects in the response. - * - * @default `false` - */ - totalCount?: boolean; - /** - * Whether to include App Context object `custom` field in the response. - * - * @default `false` - */ - customFields?: boolean; -}; -/** - * Membership objects include options. - * - * Allows to configure what additional information should be included into service response. - */ -type MembershipsIncludeOptions = IncludeOptions & { - /** - * Whether to include all {@link ChannelMetadata} fields in the response. - * - * @default `false` - */ - channelFields?: boolean; - /** - * Whether to include {@link ChannelMetadata} `custom` field in the response. - * - * @default `false` - */ - customChannelFields?: boolean; - /** - * Whether to include the membership's status field in the response. - * - * @default `false` - */ - statusField?: boolean; - /** - * Whether to include the channel's status field in the response. - * - * @default `false` - */ - channelStatusField?: boolean; - /** - * Whether to include channel's type fields in the response. - * - * @default `false` - */ - channelTypeField?: boolean; -}; -/** - * Members objects include options. - * - * Allows to configure what additional information should be included into service response. - */ -type MembersIncludeOptions = IncludeOptions & { - /** - * Whether to include all {@link UUIMetadata} fields in the response. - * - * @default `false` - */ - UUIDFields?: boolean; - /** - * Whether to include {@link UUIMetadata} `custom` field in the response. - * - * @default `false` - */ - customUUIDFields?: boolean; - /** - * Whether to include the members's status field in the response. - * - * @default `false` - */ - statusField?: boolean; - /** - * Whether to include the user's status field in the response. - * - * @default `false` - */ - UUIDStatusField?: boolean; - /** - * Whether to include user's type fields in the response. - * - * @default `false` - */ - UUIDTypeField?: boolean; -}; -/** - * Type provides shape of App Context parameters which is common to the all objects types to - * fetch them by pages. - */ -type PagedRequestParameters = { - /** - * Fields which can be additionally included into response. - */ - include?: Include; - /** - * Expression used to filter the results. - * - * Only objects whose properties satisfy the given expression are returned. The filter language is - * {@link /docs/sdks/javascript/api-reference/objects#app-context-filtering-language-definition|defined here}. - */ - filter?: string; - /** - * Fetched App Context objects sorting options. - */ - sort?: Sort; - /** - * Number of objects to return in response. - * - * **Important:** Maximum for this API is `100` objects per-response. - * - * @default `100` - */ - limit?: number; - /** - * Response pagination configuration. - */ - page?: Page; -}; -/** - * Type provides shape of App Context object fetch response which is common to the all objects - * types received from the PubNub service. - */ -type ObjectResponse = { - /** - * App Context objects list fetch result status code. - */ - status: number; - /** - * Received App Context object information. - */ - data: ObjectType; -}; -/** - * Type provides shape of App Context objects fetch response which is common to the all - * objects types received from the PubNub service. - */ -type PagedResponse = ObjectResponse & { - /** - * Total number of App Context objects in the response. - */ - totalCount?: number; - /** - * Random string returned from the server, indicating a specific position in a data set. - * - * Used for forward pagination, it fetches the next page, allowing you to continue from where - * you left off. - */ - next?: string; - /** - * Random string returned from the server, indicating a specific position in a data set. - * - * Used for backward pagination, it fetches the previous page, enabling access to earlier - * data. - * - * **Important:** Ignored if the `next` parameter is supplied. - */ - prev?: string; -}; -/** - * Key-value pair of a property to sort by, and a sort direction. - */ -type MetadataSortingOptions = keyof Omit | ({ - [K in keyof Omit]?: 'asc' | 'desc' | null; -} & { - [key: `custom.${string}`]: 'asc' | 'desc' | null; -}); -/** - * Key-value pair of a property to sort by, and a sort direction. - */ -type MembershipsSortingOptions = 'channel.id' | 'channel.name' | 'channel.description' | 'channel.updated' | 'space.id' | 'space.name' | 'space.description' | 'space.updated' | 'updated' | { - /** - * Sort results by channel's `id` in ascending (`asc`) or descending (`desc`) order. - * - * Specify `null` for default sorting direction (ascending). - */ - 'channel.id'?: 'asc' | 'desc' | null; - /** - * Sort results by channel's `name` in ascending (`asc`) or descending (`desc`) order. - * - * Specify `null` for default sorting direction (ascending). - */ - 'channel.name'?: 'asc' | 'desc' | null; - /** - * Sort results by channel's `description` in ascending (`asc`) or descending (`desc`) order. - * - * Specify `null` for default sorting direction (ascending). - */ - 'channel.description'?: 'asc' | 'desc' | null; - /** - * Sort results by channel's `update` in ascending (`asc`) or descending (`desc`) order. - * - * Specify `null` for default sorting direction (ascending). - */ - 'channel.updated'?: 'asc' | 'desc' | null; - /** - * Sort results by channel's `id` in ascending (`asc`) or descending (`desc`) order. - * - * Specify `null` for default sorting direction (ascending). - * - * @deprecated Use `channel.id` instead. - */ - 'space.id'?: 'asc' | 'desc' | null; - /** - * Sort results by channel's `name` in ascending (`asc`) or descending (`desc`) order. - * - * Specify `null` for default sorting direction (ascending). - * - * @deprecated Use `channel.name` instead. - */ - 'space.name'?: 'asc' | 'desc' | null; - /** - * Sort results by channel's `description` in ascending (`asc`) or descending (`desc`) order. - * - * Specify `null` for default sorting direction (ascending). - * - * @deprecated Use `channel.name` instead. - */ - 'space.description'?: 'asc' | 'desc' | null; - /** - * Sort results by channel's `update` in ascending (`asc`) or descending (`desc`) order. - * - * Specify `null` for default sorting direction (ascending). - * - * @deprecated Use `channel.updated` instead. - */ - 'space.updated'?: 'asc' | 'desc' | null; - /** - * Sort results by `updated` in ascending (`asc`) or descending (`desc`) order. - * - * Specify `null` for default sorting direction (ascending). - */ - updated?: 'asc' | 'desc' | null; -}; -/** - * Key-value pair of a property to sort by, and a sort direction. - */ -type MembersSortingOptions = 'uuid.id' | 'uuid.name' | 'uuid.updated' | 'user.id' | 'user.name' | 'user.updated' | 'updated' | { - /** - * Sort results by user's `id` in ascending (`asc`) or descending (`desc`) order. - * - * Specify `null` for default sorting direction (ascending). - */ - 'uuid.id'?: 'asc' | 'desc' | null; - /** - * Sort results by user's `name` in ascending (`asc`) or descending (`desc`) order. - * - * Specify `null` for default sorting direction (ascending). - */ - 'uuid.name'?: 'asc' | 'desc' | null; - /** - * Sort results by user's `update` in ascending (`asc`) or descending (`desc`) order. - * - * Specify `null` for default sorting direction (ascending). - */ - 'uuid.updated'?: 'asc' | 'desc' | null; - /** - * Sort results by user's `id` in ascending (`asc`) or descending (`desc`) order. - * - * Specify `null` for default sorting direction (ascending). - * - * @deprecated Use `uuid.id` instead. - */ - 'user.id'?: 'asc' | 'desc' | null; - /** - * Sort results by user's `name` in ascending (`asc`) or descending (`desc`) order. - * - * Specify `null` for default sorting direction (ascending). - * - * @deprecated Use `uuid.name` instead. - */ - 'user.name'?: 'asc' | 'desc' | null; - /** - * Sort results by user's `update` in ascending (`asc`) or descending (`desc`) order. - * - * Specify `null` for default sorting direction (ascending). - * - * @deprecated Use `uuid.updated` instead. - */ - 'user.updated'?: 'asc' | 'desc' | null; - /** - * Sort results by `updated` in ascending (`asc`) or descending (`desc`) order. - * - * Specify `null` for default sorting direction (ascending). - */ - updated?: 'asc' | 'desc' | null; -}; -/** - * Fetch All UUID or Channel Metadata request parameters. - */ -export type GetAllMetadataParameters = PagedRequestParameters>; -/** - * Type which describes own UUID metadata object fields. - */ -type UUIDMetadataFields = { - /** - * Display name for the user. - */ - name?: string; - /** - * The user's email address. - */ - email?: string; - /** - * User's identifier in an external system. - */ - externalId?: string; - /** - * The URL of the user's profile picture. - */ - profileUrl?: string; - /** - * User's object type information. - */ - type?: string; - /** - * User's object status. - */ - status?: string; -}; -/** - * Updated UUID metadata object. - * - * Type represents updated UUID metadata object which will be pushed to the PubNub service. - */ -type UUIDMetadata = ObjectParameters & Partial; -/** - * Received UUID metadata object. - * - * Type represents UUID metadata retrieved from the PubNub service. - */ -export type UUIDMetadataObject = ObjectData & PartialNullable; -/** - * Response with fetched page of UUID metadata objects. - */ -export type GetAllUUIDMetadataResponse = PagedResponse>; -/** - * Fetch UUID Metadata request parameters. - */ -export type GetUUIDMetadataParameters = { - /** - * Unique user identifier. - * - * **Important:** If not supplied then current user's uuid is used. - * - * @default Current `uuid`. - */ - uuid?: string; - /** - * Unique user identifier. - * - * **Important:** If not supplied then current user's uuid is used. - * - * @default Current `userId`. - * - * @deprecated Use `getUUIDMetadata()` method instead. - */ - userId?: string; - /** - * Fields which can be additionally included into response. - */ - include?: Omit; -}; -/** - * Response with requested UUID metadata object. - */ -export type GetUUIDMetadataResponse = ObjectResponse>; -/** - * Update UUID Metadata request parameters. - */ -export type SetUUIDMetadataParameters = { - /** - * Unique user identifier. - * - * **Important:** If not supplied then current user's uuid is used. - * - * @default Current `uuid`. - */ - uuid?: string; - /** - * Unique user identifier. - * - * **Important:** If not supplied then current user's uuid is used. - * - * @default Current `userId`. - * - * @deprecated Use `setUUIDMetadata()` method instead. - */ - userId?: string; - /** - * Metadata, which should be associated with UUID. - */ - data: UUIDMetadata; - /** - * Fields which can be additionally included into response. - */ - include?: Omit; -}; -/** - * Response with result of the UUID metadata object update. - */ -export type SetUUIDMetadataResponse = ObjectResponse>; -/** - * Remove UUID Metadata request parameters. - */ -export type RemoveUUIDMetadataParameters = { - /** - * Unique user identifier. - * - * **Important:** If not supplied then current user's uuid is used. - * - * @default Current `uuid`. - */ - uuid?: string; - /** - * Unique user identifier. - * - * **Important:** If not supplied then current user's uuid is used. - * - * @default Current `userId`. - * - * @deprecated Use `removeUUIDMetadata()` method instead. - */ - userId?: string; -}; -/** - * Response with result of the UUID metadata removal. - */ -export type RemoveUUIDMetadataResponse = ObjectResponse>; -/** - * Type which describes own Channel metadata object fields. - */ -type ChannelMetadataFields = { - /** - * Name of a channel. - */ - name?: string; - /** - * Description of a channel. - */ - description?: string; - /** - * Channel's object type information. - */ - type?: string; - /** - * Channel's object status. - */ - status?: string; -}; -/** - * Updated channel metadata object. - * - * Type represents updated channel metadata object which will be pushed to the PubNub service. - */ -type ChannelMetadata = ObjectParameters & Partial; -/** - * Received channel metadata object. - * - * Type represents chanel metadata retrieved from the PubNub service. - */ -export type ChannelMetadataObject = ObjectData & PartialNullable; -/** - * Response with fetched page of channel metadata objects. - */ -export type GetAllChannelMetadataResponse = PagedResponse>; -/** - * Fetch Channel Metadata request parameters. - */ -export type GetChannelMetadataParameters = { - /** - * Channel name. - */ - channel: string; - /** - * Space identifier. - * - * @deprecated Use `getChannelMetadata()` method instead. - */ - spaceId?: string; - /** - * Fields which can be additionally included into response. - */ - include?: Omit; -}; -/** - * Response with requested channel metadata object. - */ -export type GetChannelMetadataResponse = ObjectResponse>; -/** - * Update Channel Metadata request parameters. - */ -export type SetChannelMetadataParameters = { - /** - * Channel name. - */ - channel: string; - /** - * Space identifier. - * - * @deprecated Use `setChannelMetadata()` method instead. - */ - spaceId?: string; - /** - * Metadata, which should be associated with UUID. - */ - data: ChannelMetadata; - /** - * Fields which can be additionally included into response. - */ - include?: Omit; -}; -/** - * Response with result of the channel metadata object update. - */ -export type SetChannelMetadataResponse = ObjectResponse>; -/** - * Remove Channel Metadata request parameters. - */ -export type RemoveChannelMetadataParameters = { - /** - * Channel name. - */ - channel: string; - /** - * Space identifier. - * - * @deprecated Use `removeChannelMetadata()` method instead. - */ - spaceId?: string; -}; -/** - * Response with result of the channel metadata removal. - */ -export type RemoveChannelMetadataResponse = ObjectResponse>; -/** - * Related channel metadata object. - * - * Type represents chanel metadata which has been used to create membership relation with UUID. - */ -type MembershipsObject = Omit, 'id'> & { - channel: ChannelMetadataObject | { - id: string; - }; -}; -/** - * Response with fetched page of UUID membership objects. - */ -type MembershipsResponse = PagedResponse>; -/** - * Fetch Memberships request parameters. - */ -export type GetMembershipsParameters = PagedRequestParameters & { - /** - * Unique user identifier. - * - * **Important:** If not supplied then current user's uuid is used. - * - * @default Current `uuid`. - */ - uuid?: string; - /** - * Unique user identifier. - * - * **Important:** If not supplied then current user's uuid is used. - * - * @default Current `uuidId`. - * - * @deprecated Use `uuid` field instead. - */ - userId?: string; -}; -/** - * Response with requested channel memberships information. - */ -export type GetMembershipsResponse = MembershipsResponse; -/** - * Update Memberships request parameters. - */ -export type SetMembershipsParameters = PagedRequestParameters, MembershipsSortingOptions> & { - /** - * Unique user identifier. - * - * **Important:** If not supplied then current user's uuid is used. - * - * @default Current `uuid`. - */ - uuid?: string; - /** - * Unique user identifier. - * - * **Important:** If not supplied then current user's uuid is used. - * - * @default Current `userId`. - * - * @deprecated Use `uuid` field instead. - */ - userId?: string; - /** - * List of channels with which UUID membership should be established. - */ - channels: Array>; - /** - * List of channels with which UUID membership should be established. - * - * @deprecated Use `channels` field instead. - */ - spaces?: Array, 'id'> & { - /** - * Unique Space object identifier. - */ - spaceId: string; - })>; -}; -/** - * Response with requested channel memberships information change. - */ -export type SetMembershipsResponse = MembershipsResponse; -/** - * Remove Memberships request parameters. - */ -export type RemoveMembershipsParameters = PagedRequestParameters & { - /** - * Unique user identifier. - * - * **Important:** If not supplied then current user's uuid is used. - * - * @default Current `uuid`. - */ - uuid?: string; - /** - * Unique user identifier. - * - * **Important:** If not supplied then current user's uuid is used. - * - * @default Current `userId`. - * - * @deprecated Use {@link uuid} field instead. - */ - userId?: string; - /** - * List of channels for which membership which UUID should be removed. - */ - channels: string[]; - /** - * List of space names for which membership which UUID should be removed. - * - * @deprecated Use {@link channels} field instead. - */ - spaceIds?: string[]; -}; -/** - * Response with remaining memberships. - */ -export type RemoveMembershipsResponse = MembershipsResponse; -/** - * Related UUID metadata object. - * - * Type represents UUID metadata which has been used to when added members to the channel. - */ -type MembersObject = Omit, 'id'> & { - uuid: UUIDMetadataObject | { - id: string; - }; -}; -/** - * Response with fetched page of channel member objects. - */ -type MembersResponse = PagedResponse>; -/** - * Fetch Members request parameters. - */ -export type GetMembersParameters = PagedRequestParameters & { - /** - * Channel name. - */ - channel: string; - /** - * Space identifier. - * - * @deprecated Use `channel` field instead. - */ - spaceId?: string; -}; -/** - * Response with requested channel memberships information. - */ -export type GetMembersResponse = MembersResponse; -/** - * Update Members request parameters. - */ -export type SetChannelMembersParameters = PagedRequestParameters, MembersSortingOptions> & { - /** - * Channel name. - */ - channel: string; - /** - * Space identifier. - * - * @deprecated Use `channel` field instead. - */ - spaceId?: string; - /** - * List of UUIDs which should be added as `channel` members. - */ - uuids: Array>; - /** - * List of UUIDs which should be added as `channel` members. - * - * @deprecated Use `uuids` field instead. - */ - users?: Array, 'id'> & { - /** - * Unique User object identifier. - */ - userId: string; - })>; -}; -/** - * Response with requested channel members information change. - */ -export type SetMembersResponse = MembersResponse; -/** - * Remove Members request parameters. - */ -export type RemoveMembersParameters = PagedRequestParameters & { - /** - * Channel name. - */ - channel: string; - /** - * Space identifier. - * - * @deprecated Use {@link channel} field instead. - */ - spaceId?: string; - /** - * List of UUIDs which should be removed from the `channel` members list. - * removed. - */ - uuids: string[]; - /** - * List of user identifiers which should be removed from the `channel` members list. - * removed. - * - * @deprecated Use {@link uuids} field instead. - */ - userIds?: string[]; -}; -/** - * Response with remaining members. - */ -export type RemoveMembersResponse = MembersResponse; -/** - * Related User metadata object. - * - * Type represents User metadata which has been used to when added members to the Space. - */ -type UserMembersObject = Omit, 'id'> & { - user: UUIDMetadataObject | { - id: string; - }; -}; -/** - * Response with fetched page of Space member objects. - */ -export type UserMembersResponse = PagedResponse>; -type SpaceMembershipObject = Omit, 'id'> & { - space: ChannelMetadataObject | { - id: string; - }; -}; -/** - * Response with fetched page of User membership objects. - */ -export type SpaceMembershipsResponse = PagedResponse>; -export {}; diff --git a/lib/types/core/types/api/channel-groups.d.ts b/lib/types/core/types/api/channel-groups.d.ts deleted file mode 100644 index 80cd4717a..000000000 --- a/lib/types/core/types/api/channel-groups.d.ts +++ /dev/null @@ -1,57 +0,0 @@ -/** - * Add or remove Channels to the channel group request parameters. - */ -export type ManageChannelGroupChannelsParameters = { - /** - * Name of the channel group for which channels list should be changed. - */ - channelGroup: string; - /** - * List of channels to be added or removed. - */ - channels: string[]; -}; -/** - * Channel group channels list manage response. - */ -export type ManageChannelGroupChannelsResponse = Record; -/** - * Response with result of the all channel groups list. - */ -export type ListAllChannelGroupsResponse = { - /** - * All channel groups with channels. - */ - groups: string[]; -}; -/** - * List Channel Group Channels request parameters. - */ -export type ListChannelGroupChannelsParameters = { - /** - * Name of the channel group for which list of channels should be retrieved. - */ - channelGroup: string; -}; -/** - * Response with result of the list channel group channels. - */ -export type ListChannelGroupChannelsResponse = { - /** - * List of the channels registered withing specified channel group. - */ - channels: string[]; -}; -/** - * Delete Channel Group request parameters. - */ -export type DeleteChannelGroupParameters = { - /** - * Name of the channel group which should be removed. - */ - channelGroup: string; -}; -/** - * Delete channel group response. - */ -export type DeleteChannelGroupResponse = Record; diff --git a/lib/types/core/types/api/file-sharing.d.ts b/lib/types/core/types/api/file-sharing.d.ts deleted file mode 100644 index 5bc19beee..000000000 --- a/lib/types/core/types/api/file-sharing.d.ts +++ /dev/null @@ -1,357 +0,0 @@ -/** - * File Sharing REST API module. - */ -import { PubNubFileInterface } from '../file'; -import { Payload } from './index'; -/** - * Shared file object. - */ -export type SharedFile = { - /** - * Name with which file has been stored. - */ - name: string; - /** - * Unique service-assigned file identifier. - */ - id: string; - /** - * Shared file size. - */ - size: number; - /** - * ISO 8601 time string when file has been shared. - */ - created: string; -}; -/** - * List Files request parameters. - */ -export type ListFilesParameters = { - /** - * Name of channel for which list of files should be requested. - */ - channel: string; - /** - * How many entries return with single response. - */ - limit?: number; - /** - * Next files list page token. - */ - next?: string; -}; -/** - * List Files request response. - */ -export type ListFilesResponse = { - /** - * Files list fetch result status code. - */ - status: number; - /** - * List of fetched file objects. - */ - data: SharedFile[]; - /** - * Next files list page token. - */ - next: string; - /** - * Number of retrieved files. - */ - count: number; -}; -/** - * Send File request parameters. - */ -export type SendFileParameters = Omit & { - /** - * Channel to send the file to. - */ - channel: string; - /** - * File to send. - */ - file: FileParameters; -}; -/** - * Send File request response. - */ -export type SendFileResponse = PublishFileMessageResponse & { - /** - * Send file request processing status code. - */ - status: number; - /** - * Actual file name under which file has been stored. - * - * File name and unique {@link id} can be used to download file from the channel later. - * - * **Important:** Actual file name may be different from the one which has been used during file - * upload. - */ - name: string; - /** - * Unique file identifier. - * - * Unique file identifier and it's {@link name} can be used to download file from the channel - * later. - */ - id: string; -}; -/** - * Upload File request parameters. - */ -export type UploadFileParameters = { - /** - * Unique file identifier. - * - * Unique file identifier, and it's {@link fileName} can be used to download file from the channel - * later. - */ - fileId: string; - /** - * Actual file name under which file has been stored. - * - * File name and unique {@link fileId} can be used to download file from the channel later. - * - * **Note:** Actual file name may be different from the one which has been used during file - * upload. - */ - fileName: string; - /** - * File which should be uploaded. - */ - file: PubNubFileInterface; - /** - * Pre-signed file upload Url. - */ - uploadUrl: string; - /** - * An array of form fields to be used in the pre-signed POST request. - * - * **Important:** Form data fields should be passed in exact same order as received from - * the PubNub service. - */ - formFields: { - /** - * Form data field name. - */ - name: string; - /** - * Form data field value. - */ - value: string; - }[]; -}; -/** - * Upload File request response. - */ -export type UploadFileResponse = { - /** - * Upload File request processing status code. - */ - status: number; - /** - * Service processing result response. - */ - message: Payload; -}; -/** - * Generate File Upload URL request parameters. - */ -export type GenerateFileUploadUrlParameters = { - /** - * Name of channel to which file should be uploaded. - */ - channel: string; - /** - * Actual name of the file which should be uploaded. - */ - name: string; -}; -/** - * Generation File Upload URL request response. - */ -export type GenerateFileUploadUrlResponse = { - /** - * Unique file identifier. - * - * Unique file identifier, and it's {@link name} can be used to download file from the channel - * later. - */ - id: string; - /** - * Actual file name under which file has been stored. - * - * File name and unique {@link id} can be used to download file from the channel later. - * - * **Note:** Actual file name may be different from the one which has been used during file - * upload. - */ - name: string; - /** - * Pre-signed URL for file upload. - */ - url: string; - /** - * An array of form fields to be used in the pre-signed POST request. - * - * **Important:** Form data fields should be passed in exact same order as received from - * the PubNub service. - */ - formFields: { - /** - * Form data field name. - */ - name: string; - /** - * Form data field value. - */ - value: string; - }[]; -}; -/** - * Publish File Message request parameters. - */ -export type PublishFileMessageParameters = { - /** - * Name of channel to which file has been sent. - */ - channel: string; - /** - * File annotation message. - */ - message?: Payload; - /** - * Custom file and message encryption key. - * - * @deprecated Use {@link Configuration#cryptoModule|cryptoModule} configured for PubNub client - * instance or encrypt file prior {@link PubNub#sendFile|sendFile} method call. - */ - cipherKey?: string; - /** - * Unique file identifier. - * - * Unique file identifier, and it's {@link fileName} can be used to download file from the channel - * later. - */ - fileId: string; - /** - * Actual file name under which file has been stored. - * - * File name and unique {@link fileId} can be used to download file from the channel later. - * - * **Note:** Actual file name may be different from the one which has been used during file - * upload. - */ - fileName: string; - /** - * Whether published file messages should be stored in the channel's history. - * - * **Note:** If `storeInHistory` not specified, then the history configuration on the key is - * used. - * - * @default `true` - */ - storeInHistory?: boolean; - /** - * How long the message should be stored in the channel's history. - * - * **Note:** If not specified, defaults to the key set's retention value. - * - * @default `0` - */ - ttl?: number; - /** - * Metadata, which should be associated with published file. - * - * Associated metadata can be utilized by message filtering feature. - */ - meta?: Payload; -}; -/** - * Publish File Message request response. - */ -export type PublishFileMessageResponse = { - /** - * High-precision time when published file message has been received by the PubNub service. - */ - timetoken: string; -}; -/** - * Download File request parameters. - */ -export type DownloadFileParameters = FileUrlParameters & { - /** - * Custom file and message encryption key. - * - * @deprecated Use {@link Configuration#cryptoModule|cryptoModule} configured for PubNub client - * instance or encrypt file prior {@link PubNub#sendFile|sendFile} method call. - */ - cipherKey?: string; -}; -/** - * Generate File download Url request parameters. - */ -export type FileUrlParameters = { - /** - * Name of channel where file has been sent. - */ - channel: string; - /** - * Unique file identifier. - * - * Unique file identifier and it's {@link name} can be used to download file from the channel - * later. - */ - id: string; - /** - * Actual file name under which file has been stored. - * - * File name and unique {@link id} can be used to download file from the channel later. - * - * **Important:** Actual file name may be different from the one which has been used during file - * upload. - */ - name: string; -}; -/** - * Generate File Download Url response. - */ -export type FileUrlResponse = string; -/** - * Delete File request parameters. - */ -export type DeleteFileParameters = { - /** - * Name of channel where file has been sent. - */ - channel: string; - /** - * Unique file identifier. - * - * Unique file identifier and it's {@link name} can be used to download file from the channel - * later. - */ - id: string; - /** - * Actual file name under which file has been stored. - * - * File name and unique {@link id} can be used to download file from the channel later. - * - * **Important:** Actual file name may be different from the one which has been used during file - * upload. - */ - name: string; -}; -/** - * Delete File request response. - */ -export type DeleteFileResponse = { - /** - * Delete File request processing status code. - */ - status: number; -}; diff --git a/lib/types/core/types/api/history.d.ts b/lib/types/core/types/api/history.d.ts deleted file mode 100644 index 9ae00f1c2..000000000 --- a/lib/types/core/types/api/history.d.ts +++ /dev/null @@ -1,395 +0,0 @@ -import { Payload } from './index'; -/** - * Get history request parameters. - */ -export type GetHistoryParameters = { - /** - * Channel to return history messages from. - */ - channel: string; - /** - * Specifies the number of historical messages to return. - * - * **Note:** Maximum `100` messages can be returned in single response. - * - * @default `100` - */ - count?: number; - /** - * Whether message `meta` information should be fetched or not. - * - * @default `false` - */ - includeMeta?: boolean; - /** - * Timetoken delimiting the `start` of `time` slice (exclusive) to pull messages from. - */ - start?: string; - /** - * Timetoken delimiting the `end` of `time` slice (inclusive) to pull messages from. - */ - end?: string; - /** - * Whether timeline should traverse in reverse starting with the oldest message first or not. - * - * If both `start` and `end` arguments are provided, `reverse` is ignored and messages are - * returned starting with the newest message. - */ - reverse?: boolean; - /** - * Whether message timetokens should be stringified or not. - * - * @default `false` - */ - stringifiedTimeToken?: boolean; -}; -/** - * Get history response. - */ -export type GetHistoryResponse = { - /** - * List of previously published messages. - */ - messages: { - /** - * Message payload (decrypted). - */ - entry: Payload; - /** - * When message has been received by PubNub service. - */ - timetoken: string | number; - /** - * Additional data which has been published along with message to be used with real-time - * events filter expression. - */ - meta?: Payload; - /** - * Message decryption error (if attempt has been done). - */ - error?: string; - }[]; - /** - * Received messages timeline start. - */ - startTimeToken: string | number; - /** - * Received messages timeline end. - */ - endTimeToken: string | number; -}; -/** - * PubNub-defined message type. - * - * Types of messages which can be retrieved with fetch messages REST API. - */ -export declare enum PubNubMessageType { - /** - * Regular message. - */ - Message = -1, - /** - * File message. - */ - Files = 4 -} -/** - * Per-message actions information. - */ -export type Actions = { - /** - * Message action type. - */ - [t: string]: { - /** - * Message action value. - */ - [v: string]: { - /** - * Unique identifier of the user which reacted on message. - */ - uuid: string; - /** - * High-precision PubNub timetoken with time when {@link uuid} reacted on message. - */ - actionTimetoken: string; - }; - }; -}; -/** - * Additional message actions fetch information. - */ -export type MoreActions = { - /** - * Prepared fetch messages with actions REST API URL. - */ - url: string; - /** - * Next page time offset. - */ - start: string; - /** - * Number of messages to retrieve with next page. - */ - max: number; -}; -/** - * Common content of the fetched message. - */ -type BaseFetchedMessage = { - /** - * Name of channel for which message has been retrieved. - */ - channel: string; - /** - * When message has been received by PubNub service. - */ - timetoken: string | number; - /** - * Message publisher unique identifier. - */ - uuid?: string; - /** - * Additional data which has been published along with message to be used with real-time - * events filter expression. - */ - meta?: Payload; - /** - * Message decryption error (if attempt has been done). - */ - error?: string; -}; -/** - * Regular message published to the channel. - */ -export type RegularMessage = BaseFetchedMessage & { - /** - * Message payload (decrypted). - */ - message: Payload; - /** - * PubNub-defined message type. - */ - messageType?: PubNubMessageType.Message; -}; -/** - * File message published to the channel. - */ -export type FileMessage = BaseFetchedMessage & { - /** - * Message payload (decrypted). - */ - message: { - /** - * File annotation message. - */ - message?: Payload; - /** - * File information. - */ - file: { - /** - * Unique file identifier. - */ - id: string; - /** - * Name with which file has been stored. - */ - name: string; - /** - * File's content mime-type. - */ - 'mime-type': string; - /** - * Stored file size. - */ - size: number; - /** - * Pre-computed file download Url. - */ - url: string; - }; - }; - /** - * PubNub-defined message type. - */ - messageType?: PubNubMessageType.Files; -}; -/** - * Fetched message entry in channel messages list. - */ -export type FetchedMessage = RegularMessage | FileMessage; -/** - * Fetched with actions message entry in channel messages list. - */ -export type FetchedMessageWithActions = FetchedMessage & { - /** - * List of message reactions. - */ - actions?: Actions; - /** - * List of message reactions. - * - * @deprecated Use {@link actions} field instead. - */ - data?: Actions; -}; -/** - * Fetch messages request parameters. - */ -export type FetchMessagesParameters = { - /** - * Specifies channels to return history messages from. - * - * **Note:** Maximum of `500` channels are allowed. - */ - channels: string[]; - /** - * Specifies the number of historical messages to return per channel. - * - * **Note:** Default is `100` per single channel and `25` per multiple channels or per - * single channel if {@link includeMessageActions} is used. - * - * @default `100` or `25` - */ - count?: number; - /** - * Whether message type should be returned with each history message or not. - * - * @default `true` - */ - includeMessageType?: boolean; - /** - * Whether publisher `uuid` should be returned with each history message or not. - * - * @default `true` - */ - includeUUID?: boolean; - /** - * Whether publisher `uuid` should be returned with each history message or not. - * - * @deprecated Use {@link includeUUID} property instead. - */ - includeUuid?: boolean; - /** - * Whether message `meta` information should be fetched or not. - * - * @default `false` - */ - includeMeta?: boolean; - /** - * Whether message-added message actions should be fetched or not. - * - * If used, the limit of messages retrieved will be `25` per single channel. - * - * Each message can have a maximum of `25000` actions attached to it. Consider the example of - * querying for 10 messages. The first five messages have 5000 actions attached to each of - * them. The API will return the first 5 messages and all their 25000 actions. The response - * will also include a `more` link to get the remaining 5 messages. - * - * **Important:** Truncation will happen if the number of actions on the messages returned - * is > 25000. - * - * @default `false` - * - * @throws Exception if API is called with more than one channel. - */ - includeMessageActions?: boolean; - /** - * Timetoken delimiting the `start` of `time` slice (exclusive) to pull messages from. - */ - start?: string; - /** - * Timetoken delimiting the `end` of `time` slice (inclusive) to pull messages from. - */ - end?: string; - /** - * Whether message timetokens should be stringified or not. - * - * @default `false` - */ - stringifiedTimeToken?: boolean; -}; -/** - * Fetch messages response. - */ -export type FetchMessagesForChannelsResponse = { - /** - * List of previously published messages per requested channel. - */ - channels: { - [p: string]: FetchedMessage[]; - }; -}; -/** - * Fetch messages with reactions response. - */ -export type FetchMessagesWithActionsResponse = { - channels: { - [p: string]: FetchedMessageWithActions[]; - }; - /** - * Additional message actions fetch information. - */ - more: MoreActions; -}; -/** - * Fetch messages response. - */ -export type FetchMessagesResponse = FetchMessagesForChannelsResponse | FetchMessagesWithActionsResponse; -/** - * Message count request parameters. - */ -export type MessageCountParameters = { - /** - * The channels to fetch the message count. - */ - channels: string[]; - /** - * List of timetokens, in order of the {@link channels} list. - * - * Specify a single timetoken to apply it to all channels. Otherwise, the list of timetokens - * must be the same length as the list of {@link channels}, or the function returns an error - * flag. - */ - channelTimetokens?: string[]; - /** - * High-precision PubNub timetoken starting from which number of messages should be counted. - * - * Same timetoken will be used to count messages for each passed {@link channels}. - * - * @deprecated Use {@link channelTimetokens} field instead. - */ - timetoken?: string; -}; -/** - * Message count response. - */ -export type MessageCountResponse = { - /** - * Map of channel names to the number of counted messages. - */ - channels: Record; -}; -/** - * Delete messages from channel parameters. - */ -export type DeleteMessagesParameters = { - /** - * Specifies channel messages to be deleted from history. - */ - channel: string; - /** - * Timetoken delimiting the start of time slice (exclusive) to delete messages from. - */ - start?: string; - /** - * Timetoken delimiting the end of time slice (inclusive) to delete messages from. - */ - end?: string; -}; -/** - * Delete messages from channel response. - */ -export type DeleteMessagesResponse = Record; -export {}; diff --git a/lib/types/core/types/api/index.d.ts b/lib/types/core/types/api/index.d.ts deleted file mode 100644 index a27191168..000000000 --- a/lib/types/core/types/api/index.d.ts +++ /dev/null @@ -1,121 +0,0 @@ -import { AbstractRequest } from '../../components/request'; -import RequestOperation from '../../constants/operations'; -import StatusCategory from '../../constants/categories'; -/** - * PubNub account keyset. - */ -export type KeySet = { - /** - * Specifies the `subscribeKey` to be used for subscribing to a channel and message publishing. - */ - subscribeKey: string; - /** - * Specifies the `publishKey` to be used for publishing messages to a channel. - */ - publishKey?: string; - /** - * Specifies the `secretKey` to be used for request signatures computation. - */ - secretKey?: string; -}; -/** - * REST API request processing function. - */ -export type SendRequestFunction = (request: AbstractRequest, callback?: ResultCallback) => Promise; -/** - * Endpoint call completion block with result. - * - * **Note:** Endpoints which return consumable data use this callback. - */ -export type ResultCallback = (status: Status, response: ResponseType | null) => void; -/** - * Endpoint acknowledgment completion block. - * - * **Note:** Endpoints which return only acknowledgment or error status use this callback. - */ -export type StatusCallback = (status: Status) => void; -/** - * REST API endpoint processing status. - * - * **Note:** Used as {@link ResultCallback} and {@link StatusCallback} callbacks first argument type and - * {@link PubNubError} instance `status` field value type. - */ -export type Status = { - /** - * Whether status represent error or not. - */ - error: boolean; - /** - * API call status category. - */ - category: StatusCategory; - /** - * Type of REST API endpoint which reported status. - */ - operation?: RequestOperation; - /** - * REST API response status code. - */ - statusCode: number; - /** - * Error data provided by REST API. - */ - errorData?: Error | Payload; - /** - * Additional status information. - */ - [p: string]: Payload | Error | undefined; -}; -/** - * Real-time PubNub client status change event. - */ -export type StatusEvent = { - /** - * API call status category. - */ - category: StatusCategory; - /** - * Type of REST API endpoint which reported status. - */ - operation?: RequestOperation; - /** - * Information about error. - */ - error?: string | boolean; - /** - * List of channels for which status update announced. - */ - affectedChannels?: string[]; - /** - * List of currently subscribed channels. - * - * List of channels from which PubNub client receives real-time updates. - */ - subscribedChannels?: string[]; - /** - * List of channel groups for which status update announced. - */ - affectedChannelGroups?: string[]; - /** - * High-precision timetoken which has been used with previous subscription loop. - */ - lastTimetoken?: number | string; - /** - * High-precision timetoken which is used for current subscription loop. - */ - currentTimetoken?: number | string; -}; -/** - * {@link TransportRequest} query parameter type. - */ -export type Query = Record; -/** - * General payload type. - * - * Type should be used for: - * * generic messages and signals content, - * * published message metadata. - */ -export type Payload = string | number | boolean | { - [key: string]: Payload | null; -} | Payload[]; diff --git a/lib/types/core/types/api/message-action.d.ts b/lib/types/core/types/api/message-action.d.ts deleted file mode 100644 index 7ad1941a8..000000000 --- a/lib/types/core/types/api/message-action.d.ts +++ /dev/null @@ -1,153 +0,0 @@ -/** - * Message reaction object type. - */ -export type MessageAction = { - /** - * What feature this message action represents. - */ - type: string; - /** - * Value which should be stored along with message action. - */ - value: string; - /** - * Unique identifier of the user which added message action. - */ - uuid: string; - /** - * Timetoken of when message reaction has been added. - * - * **Note:** This token required when it will be required to remove raction. - */ - actionTimetoken: string; - /** - * Timetoken of message to which `action` has been added. - */ - messageTimetoken: string; -}; -/** - * More message actions fetch information. - */ -export type MoreMessageActions = { - /** - * Prepared REST API url to fetch next page with message actions. - */ - url: string; - /** - * Message action timetoken denoting the start of the range requested with next page. - * - * **Note:** Return values will be less than {@link start}. - */ - start: string; - /** - * Message action timetoken denoting the end of the range requested with next page. - * - * **Note:** Return values will be greater than or equal to {@link end}. - */ - end: string; - /** - * Number of message actions to return in next response. - */ - limit: number; -}; -/** - * Add Message Action request parameters. - */ -export type AddMessageActionParameters = { - /** - * Name of channel which stores the message for which {@link action} should be added. - */ - channel: string; - /** - * Timetoken of message for which {@link action} should be added. - */ - messageTimetoken: string; - /** - * Message `action` information. - */ - action: { - /** - * What feature this message action represents. - */ - type: string; - /** - * Value which should be stored along with message action. - */ - value: string; - }; -}; -/** - * Response with added message action object. - */ -export type AddMessageActionResponse = { - data: MessageAction; -}; -/** - * Get Message Actions request parameters. - */ -export type GetMessageActionsParameters = { - /** - * Name of channel from which list of messages `actions` should be retrieved. - */ - channel: string; - /** - * Message action timetoken denoting the start of the range requested. - * - * **Note:** Return values will be less than {@link start}. - */ - start?: string; - /** - * Message action timetoken denoting the end of the range requested. - * - * **Note:** Return values will be greater than or equal to {@link end}. - */ - end?: string; - /** - * Number of message actions to return in response. - */ - limit?: number; -}; -/** - * Response with message actions in specific `channel`. - */ -export type GetMessageActionsResponse = { - /** - * Retrieved list of message actions. - */ - data: MessageAction[]; - /** - * Received message actions time frame start. - */ - start: string | null; - /** - * Received message actions time frame end. - */ - end: string | null; - /** - * More message actions fetch information. - */ - more?: MoreMessageActions; -}; -/** - * Remove Message Action request parameters. - */ -export type RemoveMessageActionParameters = { - /** - * Name of channel which store message for which `action` should be removed. - */ - channel: string; - /** - * Timetoken of message for which `action` should be removed. - */ - messageTimetoken: string; - /** - * Action addition timetoken. - */ - actionTimetoken: string; -}; -/** - * Response with message remove result. - */ -export type RemoveMessageActionResponse = { - data: Record; -}; diff --git a/lib/types/core/types/api/presence.d.ts b/lib/types/core/types/api/presence.d.ts deleted file mode 100644 index 28519378d..000000000 --- a/lib/types/core/types/api/presence.d.ts +++ /dev/null @@ -1,210 +0,0 @@ -import { Payload } from './index'; -/** - * Associated presence state fetch parameters. - */ -export type GetPresenceStateParameters = { - /** - * The subscriber uuid to get the current state. - * - * @default `current uuid` - */ - uuid?: string; - /** - * List of channels for which state associated with {@link uuid} should be retrieved. - * - * **Important:** Either {@link channels} or {@link channelGroups} should be provided; - */ - channels?: string[]; - /** - * List of channel groups for which state associated with {@link uuid} should be retrieved. - * - * **Important:** Either {@link channels} or {@link channelGroups} should be provided; - */ - channelGroups?: string[]; -}; -/** - * Associated presence state fetch response. - */ -export type GetPresenceStateResponse = { - /** - * Channels map to state which `uuid` has associated with them. - */ - channels: Record; -}; -/** - * Associate presence state parameters. - */ -export type SetPresenceStateParameters = { - /** - * List of channels for which state should be associated with {@link uuid}. - */ - channels?: string[]; - /** - * List of channel groups for which state should be associated with {@link uuid}. - */ - channelGroups?: string[]; - /** - * State which should be associated with `uuid` on provided list of {@link channels} and {@link channelGroups}. - */ - state: Payload; -}; -/** - * Associate presence state parameters using heartbeat. - */ -export type SetPresenceStateWithHeartbeatParameters = { - /** - * List of channels for which state should be associated with {@link uuid}. - */ - channels?: string[]; - /** - * State which should be associated with `uuid` on provided list of {@link channels}. - */ - state: Payload; - /** - * Whether `presence/heartbeat` REST API should be used to manage state or not. - * - * @default `false` - */ - withHeartbeat: boolean; -}; -/** - * Associate presence state response. - */ -export type SetPresenceStateResponse = { - /** - * State which has been associated with `uuid` on provided list of channels and groups. - */ - state: Payload; -}; -/** - * Announce heartbeat parameters. - */ -export type PresenceHeartbeatParameters = { - /** - * How long the server will consider the client alive for presence.The value is in seconds. - */ - heartbeat: number; - /** - * List of channels for which heartbeat should be announced for {@link uuid}. - */ - channels?: string[]; - /** - * List of channel groups for which heartbeat should be announced for {@link uuid}. - */ - channelGroups?: string[]; - /** - * State which should be associated with `uuid` on provided list of {@link channels} and {@link channelGroups}. - */ - state?: Payload; -}; -/** - * Announce heartbeat response. - */ -export type PresenceHeartbeatResponse = Record; -/** - * Presence leave parameters. - */ -export type PresenceLeaveParameters = { - /** - * List of channels for which `uuid` should be marked as `offline`. - */ - channels?: string[]; - /** - /** - * List of channel groups for which `uuid` should be marked as `offline`. - */ - channelGroups?: string[]; -}; -/** - * Presence leave response. - */ -export type PresenceLeaveResponse = Record; -/** - * Channel / channel group presence fetch parameters.. - */ -export type HereNowParameters = { - /** - * List of channels for which presence should be retrieved. - */ - channels?: string[]; - /** - * List of channel groups for which presence should be retrieved. - */ - channelGroups?: string[]; - /** - * Whether `uuid` information should be included in response or not. - * - * **Note:** Only occupancy information will be returned if both {@link includeUUIDs} and {@link includeState} is - * set to `false`. - * - * @default `true` - */ - includeUUIDs?: boolean; - /** - * Whether state associated with `uuid` should be included in response or not. - * - * @default `false`. - */ - includeState?: boolean; - /** - * Additional query parameters. - */ - queryParameters?: Record; -}; -/** - * `uuid` where now response. - */ -export type HereNowResponse = { - /** - * Total number of channels for which presence information received. - */ - totalChannels: number; - /** - * Total occupancy for all retrieved channels. - */ - totalOccupancy: number; - /** - * List of channels to which `uuid` currently subscribed. - */ - channels: { - [p: string]: { - /** - * List of received channel subscribers. - * - * **Note:** Field is missing if `uuid` and `state` not included. - */ - occupants: { - uuid: string; - state?: Payload | null; - }[]; - /** - * Name of channel for which presence information retrieved. - */ - name: string; - /** - * Total number of active subscribers in single channel. - */ - occupancy: number; - }; - }; -}; -/** - * `uuid` where now parameters. - */ -export type WhereNowParameters = { - /** - * The subscriber uuid to get the current state. - * - * @default `current uuid` - */ - uuid?: string; -}; -/** - * `uuid` where now response. - */ -export type WhereNowResponse = { - /** - * Channels map to state which `uuid` has associated with them. - */ - channels: string[]; -}; diff --git a/lib/types/core/types/api/push-notifications.d.ts b/lib/types/core/types/api/push-notifications.d.ts deleted file mode 100644 index 57ab65076..000000000 --- a/lib/types/core/types/api/push-notifications.d.ts +++ /dev/null @@ -1,48 +0,0 @@ -/** - * Type of Push Notifications gateway which should be used with Push Notifications REST API. - */ -type PushGateway = 'apns2' | 'gcm'; -/** - * Basic information required by Push Notifications REST API about device. - */ -type DevicePush = { - /** - * Device ID for which list of registered channel push notifications will be changed. - */ - device: string; - /** - * Push Notifications gateway to use. - * - * **Important:** Depends from the source of `device` token and can be `apns2` (for token - * provided during device registration using Apple's framework) or `gcm` (when used Firebase - * or similar framework to receive token). - */ - pushGateway: PushGateway; -}; -/** - * Register and unregister push notifications for device request parameters. - */ -export type ManageDeviceChannelsParameters = { - /** - * List of channels to be added or removed. - */ - channels: string[]; -} & DevicePush; -/** - * List Device Channels request parameters. - */ -export type ListDeviceChannelsParameters = DevicePush; -/** - * Response with result of the list device channels. - */ -export type ListDeviceChannelsResponse = { - /** - * List of the channels for which `device` will receive push notifications. - */ - channels: string[]; -}; -/** - * Delete Push Notification for device request parameters. - */ -export type DeleteDeviceParameters = DevicePush; -export {}; diff --git a/lib/types/core/types/api/push.d.ts b/lib/types/core/types/api/push.d.ts deleted file mode 100644 index 6d67ed8cf..000000000 --- a/lib/types/core/types/api/push.d.ts +++ /dev/null @@ -1,122 +0,0 @@ -/** - * Common managed channels push notification parameters. - */ -type ManagedDeviceChannels = { - /** - * Channels to register or unregister with mobile push notifications. - */ - channels: string[]; - /** - * The device ID to associate with mobile push notifications. - */ - device: string; - /** - * Starting channel for pagination. - * - * **Note:** Use the last channel from the previous page request. - */ - start?: string; - /** - * Number of channels to return for pagination. - * - * **Note:** maximum of 1000 tokens at a time. - * - * @default `500` - */ - count?: number; -}; -/** - * List all FCM device push notification enabled channels parameters. - */ -type ListFCMDeviceChannelsParameters = Omit; -/** - * List all APNS device push notification enabled channels parameters. - * - * @deprecated Use `APNS2`-based endpoints. - */ -type ListAPNSDeviceChannelsParameters = Omit; -/** - * List all APNS2 device push notification enabled channels parameters. - */ -type ListAPNS2DeviceChannelsParameters = Omit; -/** - * List all device push notification enabled channels parameters. - */ -export type ListDeviceChannelsParameters = ListFCMDeviceChannelsParameters | ListAPNSDeviceChannelsParameters | ListAPNS2DeviceChannelsParameters; -/** - * List all device push notification enabled channels response. - */ -export type ListDeviceChannelsResponse = { - /** - * List of channels registered for device push notifications. - */ - channels: string[]; -}; -/** - * Manage FCM device push notification enabled channels parameters. - */ -type ManageFCMDeviceChannelsParameters = ManagedDeviceChannels & { - /** - * Push Notifications gateway type. - */ - pushGateway: 'gcm'; -}; -/** - * Manage APNS device push notification enabled channels parameters. - * - * @deprecated Use `APNS2`-based endpoints. - */ -type ManageAPNSDeviceChannelsParameters = ManagedDeviceChannels & { - /** - * Push Notifications gateway type. - */ - pushGateway: 'apns'; -}; -/** - * Manage APNS2 device push notification enabled channels parameters. - */ -type ManageAPNS2DeviceChannelsParameters = ManagedDeviceChannels & { - /** - * Push Notifications gateway type. - */ - pushGateway: 'apns2'; - /** - * Environment within which device should manage list of channels with enabled notifications. - */ - environment?: 'development' | 'production'; - /** - * Notifications topic name (usually it is bundle identifier of application for Apple platform). - */ - topic: string; -}; -/** - * Manage device push notification enabled channels parameters. - */ -export type ManageDeviceChannelsParameters = ManageFCMDeviceChannelsParameters | ManageAPNSDeviceChannelsParameters | ManageAPNS2DeviceChannelsParameters; -/** - * Manage device push notification enabled channels response. - */ -export type ManageDeviceChannelsResponse = Record; -/** - * Remove all FCM device push notification enabled channels parameters. - */ -type RemoveFCMDeviceParameters = Omit; -/** - * Manage APNS device push notification enabled channels parameters. - * - * @deprecated Use `APNS2`-based endpoints. - */ -type RemoveAPNSDeviceParameters = Omit; -/** - * Manage APNS2 device push notification enabled channels parameters. - */ -type RemoveAPNS2DeviceParameters = Omit; -/** - * Remove all device push notification enabled channels parameters. - */ -export type RemoveDeviceParameters = RemoveFCMDeviceParameters | RemoveAPNSDeviceParameters | RemoveAPNS2DeviceParameters; -/** - * Remove all device push notification enabled channels response. - */ -export type RemoveDeviceResponse = Record; -export {}; diff --git a/lib/types/core/types/api/subscription.d.ts b/lib/types/core/types/api/subscription.d.ts deleted file mode 100644 index 0c8e1e19e..000000000 --- a/lib/types/core/types/api/subscription.d.ts +++ /dev/null @@ -1,296 +0,0 @@ -import { RequestParameters as SubscribeRequestParameters, VSPMembershipObjectData, AppContextObjectData, MessageActionData, PubNubEventType, SpaceObjectData, UserObjectData, PresenceData, FileData } from '../../endpoints/subscribe'; -import { AbortSignal } from '../../components/abort_signal'; -import { Payload } from './index'; -/** - * Time cursor. - * - * Cursor used by subscription loop to identify point in time after which updates will be - * delivered. - */ -export type SubscriptionCursor = { - /** - * PubNub high-precision timestamp. - * - * Aside of specifying exact time of receiving data / event this token used to catchup / - * follow on real-time updates. - */ - timetoken: string | number; - /** - * Data center region for which `timetoken` has been generated. - */ - region?: number; -}; -/** - * Common real-time event. - */ -type Event = { - /** - * Channel to which real-time event has been sent. - */ - channel: string; - /** - * Actual subscription at which real-time event has been received. - * - * PubNub client provide various ways to subscribe to the real-time stream: channel groups, - * wildcard subscription, and spaces. - * - * **Note:** Value will be `null` if it is the same as {@link channel}. - */ - subscription: string | null; - /** - * High-precision PubNub timetoken with time when event has been received by PubNub services. - */ - timetoken: string; -}; -/** - * Common legacy real-time event for backward compatibility. - */ -type LegacyEvent = Event & { - /** - * Channel to which real-time event has been sent. - * - * @deprecated Use {@link channel} field instead. - */ - actualChannel?: string | null; - /** - * Actual subscription at which real-time event has been received. - * - * @deprecated Use {@link subscription} field instead. - */ - subscribedChannel?: string; -}; -/** - * Presence change real-time event. - */ -export type Presence = LegacyEvent & PresenceData; -/** - * Extended presence real-time event. - * - * Type extended for listener manager support. - */ -type PresenceEvent = { - type: PubNubEventType.Presence; - data: Presence; -}; -/** - * Common published data information. - */ -type PublishedData = { - /** - * Unique identifier of the user which sent data. - */ - publisher?: string; - /** - * Additional user-provided metadata which can be used with real-time filtering expression. - */ - userMetadata?: { - [p: string]: Payload; - }; - /** - * Sent data. - */ - message: Payload; -}; -/** - * Real-time message event. - */ -export type Message = LegacyEvent & PublishedData & { - /** - * Decryption error message in case of failure. - */ - error?: string; -}; -/** - * Extended real-time message event. - * - * Type extended for listener manager support. - */ -type MessageEvent = { - type: PubNubEventType.Message; - data: Message; -}; -/** - * Real-time signal event. - */ -export type Signal = Event & PublishedData; -/** - * Extended real-time signal event. - * - * Type extended for listener manager support. - */ -type SignalEvent = { - type: PubNubEventType.Signal; - data: Signal; -}; -/** - * Message action real-time event. - */ -export type MessageAction = Event & Omit & { - /** - * Unique identifier of the user which added message reaction. - * - * @deprecated Use `data.uuid` field instead. - */ - publisher?: string; - data: MessageActionData['data'] & { - /** - * Unique identifier of the user which added message reaction. - */ - uuid: string; - }; -}; -/** - * Extended message action real-time event. - * - * Type extended for listener manager support. - */ -type MessageActionEvent = { - type: PubNubEventType.MessageAction; - data: MessageAction; -}; -/** - * App Context Object change real-time event. - */ -export type AppContextObject = Event & { - /** - * Information about App Context object for which event received. - */ - message: AppContextObjectData; -}; -/** - * `User` App Context Object change real-time event. - */ -export type UserAppContextObject = Omit & { - /** - * Space to which real-time event has been sent. - */ - spaceId: string; - /** - * Information about User Object for which event received. - */ - message: UserObjectData; -}; -/** - * `Space` App Context Object change real-time event. - */ -export type SpaceAppContextObject = Omit & { - /** - * Space to which real-time event has been sent. - */ - spaceId: string; - /** - * Information about `Space` Object for which event received. - */ - message: SpaceObjectData; -}; -/** - * VSP `Membership` App Context Object change real-time event. - */ -export type VSPMembershipAppContextObject = Omit & { - /** - * Space to which real-time event has been sent. - */ - spaceId: string; - /** - * Information about `Membership` Object for which event received. - */ - message: VSPMembershipObjectData; -}; -/** - * Extended App Context Object change real-time event. - * - * Type extended for listener manager support. - */ -type AppContextEvent = { - type: PubNubEventType.AppContext; - data: AppContextObject; -}; -/** - * File real-time event. - */ -export type File = Event & Omit & Omit & { - /** - * Message which has been associated with uploaded file. - */ - message?: Payload; - /** - * Information about uploaded file. - */ - file?: FileData['file'] & { - /** - * File download url. - */ - url: string; - }; - /** - * Decryption error message in case of failure. - */ - error?: string; -}; -/** - * Extended File real-time event. - * - * Type extended for listener manager support. - */ -type FileEvent = { - type: PubNubEventType.Files; - data: File; -}; -/** - * Cancelable subscribe request parameters. - */ -export type CancelableSubscribeParameters = Omit & { - /** - * Long-poll request termination signal. - */ - abortSignal: AbortSignal; -}; -/** - * Subscribe request parameters. - */ -export type SubscribeParameters = { - /** - * List of channels from which real-time events should be delivered. - * - * @default `,` if {@link channelGroups} is set. - */ - channels?: string[]; - /** - * List of channel groups from which real-time events should be retrieved. - */ - channelGroups?: string[]; - /** - * Next subscription loop timetoken. - */ - timetoken?: string | number; - /** - * Whether should subscribe to channels / groups presence announcements or not. - * - * @default `false` - */ - withPresence?: boolean; - /** - * Presence information which should be associated with `userId`. - * - * `state` information will be associated with `userId` on channels mentioned as keys in - * this object. - * - * @deprecated Use set state methods to specify associated user's data instead of passing to - * subscribe. - */ - state?: Record; - /** - * Whether should subscribe to channels / groups presence announcements or not. - * - * @default `false` - */ - withHeartbeats?: boolean; -}; -/** - * Service success response. - */ -export type SubscriptionResponse = { - cursor: SubscriptionCursor; - messages: (PresenceEvent | MessageEvent | SignalEvent | MessageActionEvent | AppContextEvent | FileEvent)[]; -}; -export {}; diff --git a/lib/types/core/types/file.d.ts b/lib/types/core/types/file.d.ts deleted file mode 100644 index 774a161da..000000000 --- a/lib/types/core/types/file.d.ts +++ /dev/null @@ -1,104 +0,0 @@ -/** - * {@link PubNub} File object interface module. - */ -/** - * Base file constructor parameters. - * - * Minimum set of parameters which can be p - */ -export type PubNubBasicFileParameters = { - data: string | ArrayBuffer; - name: string; - mimeType?: string; -}; -/** - * Platform-agnostic {@link PubNub} File object. - * - * Interface describes share of {@link PubNub} File which is required by {@link PubNub} core to - * perform required actions. - */ -export interface PubNubFileInterface { - /** - * Actual file name. - */ - name: string; - /** - * File mime-type. - */ - mimeType?: string; - /** - * File content length. - */ - contentLength?: number; - /** - * Convert {@link PubNub} file object content to {@link ArrayBuffer}. - * - * @returns Asynchronous results of conversion to the {@link ArrayBuffer}. - * - * @throws Error if provided {@link PubNub} File object content is not supported for this - * operation. - */ - toArrayBuffer(): Promise; - /** - * Convert {@link PubNub} File object content to file `Uri`. - * - * @returns Asynchronous results of conversion to file `Uri`. - * - * @throws Error if provided {@link PubNub} File object content is not supported for this - * operation. - */ - toFileUri(): Promise>; -} -/** - * {@link PubNub} File object class interface. - */ -export interface PubNubFileConstructor { - /** - * Whether {@link Blob} data supported by platform or not. - */ - supportsBlob: boolean; - /** - * Whether {@link File} data supported by platform or not. - */ - supportsFile: boolean; - /** - * Whether {@link Buffer} data supported by platform or not. - */ - supportsBuffer: boolean; - /** - * Whether {@link Stream} data supported by platform or not. - */ - supportsStream: boolean; - /** - * Whether {@link String} data supported by platform or not. - */ - supportsString: boolean; - /** - * Whether {@link ArrayBuffer} supported by platform or not. - */ - supportsArrayBuffer: boolean; - /** - * Whether {@link PubNub} File object encryption supported or not. - */ - supportsEncryptFile: boolean; - /** - * Whether `File Uri` data supported by platform or not. - */ - supportsFileUri: boolean; - /** - * {@link PubNub} File object constructor. - * - * @param file - File instantiation parameters (can be raw data or structured object). - * - * @returns Constructed platform-specific {@link PubNub} File object. - */ - create(file: ConstructorParameters): File; - /** - * {@link PubNub} File object constructor. - * - * @param file - File instantiation parameters (can be raw data or structured object). - * - * @returns Constructed platform-specific {@link PubNub} File object. - */ - new (file: ConstructorParameters): File; -} diff --git a/lib/types/core/types/transport-request.d.ts b/lib/types/core/types/transport-request.d.ts deleted file mode 100644 index 09ddc24f4..000000000 --- a/lib/types/core/types/transport-request.d.ts +++ /dev/null @@ -1,97 +0,0 @@ -import { PubNubFileInterface } from './file'; -import { Query } from './api'; -/** - * Enum representing possible transport methods for HTTP requests. - * - * @enum {number} - */ -export declare enum TransportMethod { - /** - * Request will be sent using `GET` method. - */ - GET = "GET", - /** - * Request will be sent using `POST` method. - */ - POST = "POST", - /** - * Request will be sent using `PATCH` method. - */ - PATCH = "PATCH", - /** - * Request will be sent using `DELETE` method. - */ - DELETE = "DELETE", - /** - * Local request. - * - * Request won't be sent to the service and probably used to compute URL. - */ - LOCAL = "LOCAL" -} -/** - * Request cancellation controller. - */ -export type CancellationController = { - /** - * Request cancellation / abort function. - */ - abort: () => void; -}; -/** - * This object represents a request to be sent to the PubNub API. - * - * This struct represents a request to be sent to the PubNub API. It is used by the transport - * provider which implements {@link Transport} interface. - * - * All fields are representing certain parts of the request that can be used to prepare one. - */ -export type TransportRequest = { - /** - * Remote host name. - */ - origin?: string; - /** - * Remote resource path. - */ - path: string; - /** - * Query parameters to be sent with the request. - */ - queryParameters?: Query; - /** - * Transport request HTTP method. - */ - method: TransportMethod; - /** - * Headers to be sent with the request. - */ - headers?: Record; - /** - * Multipart form data fields. - * - * **Important:** `Content-Type` header should be sent the {@link body} data type when - * `multipart/form-data` should request should be sent. - */ - formData?: Record[]; - /** - * Body to be sent with the request. - */ - body?: ArrayBuffer | PubNubFileInterface | string; - /** - * For how long request should wait response from the server. - * - * @default `10` seconds. - */ - timeout: number; - /** - * Whether request can be cancelled or not. - * - * @default `false`. - */ - cancellable: boolean; - /** - * Unique request identifier. - */ - identifier: string; -}; diff --git a/lib/types/core/types/transport-response.d.ts b/lib/types/core/types/transport-response.d.ts deleted file mode 100644 index 359aa8712..000000000 --- a/lib/types/core/types/transport-response.d.ts +++ /dev/null @@ -1,23 +0,0 @@ -/** - * Represents a transport response from a service. - */ -export type TransportResponse = { - /** - * Full remote resource URL used to retrieve response. - */ - url: string; - /** - * Service response status code. - */ - status: number; - /** - * Service response headers. - * - * **Important:** Header names are in lowercase. - */ - headers: Record; - /** - * Service response body. - */ - body?: ArrayBuffer; -}; diff --git a/lib/types/core/utils.d.ts b/lib/types/core/utils.d.ts deleted file mode 100644 index 8f9ab9d64..000000000 --- a/lib/types/core/utils.d.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { Query } from './types/api'; -/** - * Percent-encode input string. - * - * **Note:** Encode content in accordance of the `PubNub` service requirements. - * - * @param input - Source string or number for encoding. - * - * @returns Percent-encoded string. - */ -export declare const encodeString: (input: string | number) => string; -/** - * Percent-encode list of names (channels). - * - * @param names - List of names which should be encoded. - * - * @param [defaultString] - String which should be used in case if {@link names} is empty. - * - * @returns String which contains encoded names joined by non-encoded `,`. - */ -export declare const encodeNames: (names: string[], defaultString?: string) => string; -export declare const removeSingleOccurrence: (source: string[], elementsToRemove: string[]) => string[]; -export declare const findUniqueCommonElements: (a: string[], b: string[]) => string[]; -/** - * Transform query key / value pairs to the string. - * - * @param query - Key / value pairs of the request query parameters. - * - * @returns Stringified query key / value pairs. - */ -export declare const queryStringFromObject: (query: Query) => string; diff --git a/lib/types/crypto/index.d.ts b/lib/types/crypto/index.d.ts deleted file mode 100644 index e69de29bb..000000000 diff --git a/lib/types/crypto/modules/NodeCryptoModule/ICryptor.d.ts b/lib/types/crypto/modules/NodeCryptoModule/ICryptor.d.ts deleted file mode 100644 index 30a6c7bee..000000000 --- a/lib/types/crypto/modules/NodeCryptoModule/ICryptor.d.ts +++ /dev/null @@ -1,86 +0,0 @@ -/** - * Cryptor module. - */ -/// -/// -/** - * Data encrypted by {@link CryptoModule}. - */ -export type EncryptedDataType = { - /** - * Encrypted data. - */ - data: Buffer | string; - /** - * Used cryptor's metadata. - */ - metadata: Buffer | null; -}; -/** - * {@link Readable} stream encrypted by {@link CryptoModule}. - */ -export type EncryptedStream = { - /** - * Stream with encrypted content. - */ - stream: NodeJS.ReadableStream; - /** - * Length of encrypted data in {@link Readable} stream. - */ - metadataLength: number; - /** - * Used cryptor's metadata. - */ - metadata?: Buffer | undefined; -}; -/** - * Cryptor algorithm interface. - */ -export interface ICryptor { - /** - * Cryptor unique identifier. - * - * @returns Cryptor identifier. - */ - get identifier(): string; - /** - * Encrypt provided source data. - * - * @param data - Source data for encryption. - * - * @returns Encrypted data object. - * - * @throws Error if unknown data type has been passed. - */ - encrypt(data: BufferSource | string): EncryptedDataType; - /** - * Encrypt provided source {@link Readable} stream. - * - * @param stream - Stream for encryption. - * - * @returns Encrypted stream object. - * - * @throws Error if unknown data type has been passed. - */ - encryptStream(stream: NodeJS.ReadableStream): Promise; - /** - * Decrypt provided encrypted data object. - * - * @param data - Encrypted data object for decryption. - * - * @returns Decrypted data. - * - * @throws Error if unknown data type has been passed. - */ - decrypt(data: EncryptedDataType): ArrayBuffer; - /** - * Decrypt provided encrypted stream object. - * - * @param stream - Encrypted stream object for decryption. - * - * @returns Decrypted data as {@link Readable} stream. - * - * @throws Error if unknown data type has been passed. - */ - decryptStream(stream: EncryptedStream): Promise; -} diff --git a/lib/types/crypto/modules/NodeCryptoModule/ILegacyCryptor.d.ts b/lib/types/crypto/modules/NodeCryptoModule/ILegacyCryptor.d.ts deleted file mode 100644 index 5b3ea2f2f..000000000 --- a/lib/types/crypto/modules/NodeCryptoModule/ILegacyCryptor.d.ts +++ /dev/null @@ -1,60 +0,0 @@ -/** - * Legacy cryptor module. - */ -import PubNubFile, { PubNubFileParameters } from '../../../file/modules/node'; -import { PubNubFileConstructor } from '../../../core/types/file'; -import { Payload } from '../../../core/types/api'; -import { EncryptedDataType } from './ICryptor'; -/** - * Legacy cryptor algorithm interface. - */ -export interface ILegacyCryptor { - /** - * Cryptor unique identifier. - */ - get identifier(): string; - /** - * Encrypt provided source data. - * - * @param data - Source data for encryption. - * - * @returns Encrypted data object. - * - * @throws Error if unknown data type has been passed. - */ - encrypt(data: string): EncryptedDataType; - /** - * Encrypt provided source {@link PubNub} File object. - * - * @param file - Source {@link PubNub} File object for encryption. - * @param File - Class constructor for {@link PubNub} File object. - * - * @returns Encrypted data as {@link PubNub} File object. - * - * @throws Error if file is empty or contains unsupported data type. - * @throws Error if cipher key not set. - */ - encryptFile(file: PubNubFile, File: PubNubFileConstructor): Promise; - /** - * Decrypt provided encrypted data object. - * - * @param data - Encrypted data object for decryption. - * - * @returns Decrypted data. - * - * @throws Error if unknown data type has been passed. - */ - decrypt(data: EncryptedDataType): Payload | null; - /** - * Decrypt provided encrypted {@link PubNub} File object. - * - * @param file - Encrypted {@link PubNub} File object for decryption. - * @param File - Class constructor for {@link PubNub} File object. - * - * @returns Decrypted data as {@link PubNub} File object. - * - * @throws Error if file is empty or contains unsupported data type. - * @throws Error if cipher key not set. - */ - decryptFile(file: PubNubFile, File: PubNubFileConstructor): Promise; -} diff --git a/lib/types/crypto/modules/NodeCryptoModule/aesCbcCryptor.d.ts b/lib/types/crypto/modules/NodeCryptoModule/aesCbcCryptor.d.ts deleted file mode 100644 index 875bd5d8f..000000000 --- a/lib/types/crypto/modules/NodeCryptoModule/aesCbcCryptor.d.ts +++ /dev/null @@ -1,57 +0,0 @@ -/** - * AES-CBC cryptor module. - */ -/// -/// -/// -import { PassThrough } from 'stream'; -import { ICryptor, EncryptedDataType, EncryptedStream } from './ICryptor'; -/** - * AES-CBC cryptor. - * - * AES-CBC cryptor with enhanced cipher strength. - */ -export default class AesCbcCryptor implements ICryptor { - /** - * Cryptor block size. - */ - static BLOCK_SIZE: number; - /** - * {@link string|String} to {@link ArrayBuffer} response decoder. - */ - static encoder: TextEncoder; - /** - * Data encryption / decryption cipher key. - */ - cipherKey: string; - constructor({ cipherKey }: { - cipherKey: string; - }); - encrypt(data: ArrayBuffer | string): EncryptedDataType; - encryptStream(stream: NodeJS.ReadableStream): Promise<{ - stream: PassThrough; - metadata: Buffer; - metadataLength: number; - }>; - decrypt(input: EncryptedDataType): ArrayBuffer; - decryptStream(stream: EncryptedStream): Promise; - get identifier(): string; - /** - * Cryptor algorithm. - * - * @returns Cryptor module algorithm. - */ - private get algo(); - /** - * Generate random initialization vector. - * - * @returns Random initialization vector. - */ - private getIv; - /** - * Convert cipher key to the {@link Buffer}. - * - * @returns SHA256 encoded cipher key {@link Buffer}. - */ - private getKey; -} diff --git a/lib/types/crypto/modules/NodeCryptoModule/legacyCryptor.d.ts b/lib/types/crypto/modules/NodeCryptoModule/legacyCryptor.d.ts deleted file mode 100644 index 006900d93..000000000 --- a/lib/types/crypto/modules/NodeCryptoModule/legacyCryptor.d.ts +++ /dev/null @@ -1,33 +0,0 @@ -/** - * Legacy cryptor module. - */ -import PubNubFile, { PubNubFileParameters } from '../../../file/modules/node'; -import { CryptorConfiguration } from '../../../core/interfaces/crypto-module'; -import Crypto from '../../../core/components/cryptography/index'; -import { PubNubFileConstructor } from '../../../core/types/file'; -import { ILegacyCryptor } from './ILegacyCryptor'; -import { EncryptedDataType } from './ICryptor'; -import FileCryptor from '../node'; -/** - * Legacy cryptor. - */ -export default class LegacyCryptor implements ILegacyCryptor { - /** - * Legacy cryptor configuration. - */ - config: CryptorConfiguration; - /** - * Configured file cryptor. - */ - fileCryptor: FileCryptor; - /** - * Configured legacy cryptor. - */ - cryptor: Crypto; - constructor(config: CryptorConfiguration); - encrypt(data: string): EncryptedDataType; - encryptFile(file: PubNubFile, File: PubNubFileConstructor): Promise; - decrypt(encryptedData: EncryptedDataType): import("../../../core/types/api").Payload | null; - decryptFile(file: PubNubFile, File: PubNubFileConstructor): Promise; - get identifier(): string; -} diff --git a/lib/types/crypto/modules/NodeCryptoModule/nodeCryptoModule.d.ts b/lib/types/crypto/modules/NodeCryptoModule/nodeCryptoModule.d.ts deleted file mode 100644 index 53f627cad..000000000 --- a/lib/types/crypto/modules/NodeCryptoModule/nodeCryptoModule.d.ts +++ /dev/null @@ -1,108 +0,0 @@ -/** - * Node.js crypto module. - */ -import { AbstractCryptoModule, CryptorConfiguration } from '../../../core/interfaces/crypto-module'; -import PubNubFile, { PubNubFileParameters } from '../../../file/modules/node'; -import { PubNubFileConstructor } from '../../../core/types/file'; -import { ICryptor } from './ICryptor'; -import { ILegacyCryptor } from './ILegacyCryptor'; -import AesCbcCryptor from './aesCbcCryptor'; -import LegacyCryptor from './legacyCryptor'; -/** - * Re-export bundled cryptors. - */ -export { LegacyCryptor, AesCbcCryptor }; -/** - * Crypto module cryptors interface. - */ -type CryptorType = ICryptor | ILegacyCryptor; -/** - * CryptoModule for Node.js platform. - */ -export declare class CryptoModule extends AbstractCryptoModule { - /** - * {@link LegacyCryptor|Legacy} cryptor identifier. - */ - static LEGACY_IDENTIFIER: string; - static legacyCryptoModule(config: CryptorConfiguration): CryptoModule; - static aesCbcCryptoModule(config: CryptorConfiguration): CryptoModule; - /** - * Construct crypto module with `cryptor` as default for data encryption and decryption. - * - * @param defaultCryptor - Default cryptor for data encryption and decryption. - * - * @returns Crypto module with pre-configured default cryptor. - */ - static withDefaultCryptor(defaultCryptor: CryptorType): CryptoModule; - encrypt(data: ArrayBuffer | string): string | ArrayBuffer; - encryptFile(file: PubNubFile, File: PubNubFileConstructor): Promise; - decrypt(data: ArrayBuffer | string): ArrayBuffer | import("../../../core/types/api").Payload | null; - decryptFile(file: PubNubFile, File: PubNubFileConstructor): Promise; - /** - * Retrieve registered legacy cryptor. - * - * @returns Previously registered {@link ILegacyCryptor|legacy} cryptor. - * - * @throws Error if legacy cryptor not registered. - */ - private getLegacyCryptor; - /** - * Retrieve registered cryptor by its identifier. - * - * @param id - Unique cryptor identifier. - * - * @returns Registered cryptor with specified identifier. - * - * @throws Error if cryptor with specified {@link id} can't be found. - */ - private getCryptorFromId; - /** - * Retrieve cryptor by its identifier. - * - * @param header - Header with cryptor-defined data or raw cryptor identifier. - * - * @returns Cryptor which correspond to provided {@link header}. - */ - private getCryptor; - /** - * Create cryptor header data. - * - * @param encrypted - Encryption data object as source for header data. - * - * @returns Binary representation of the cryptor header data. - */ - private getHeaderData; - /** - * Merge two {@link ArrayBuffer} instances. - * - * @param ab1 - First {@link ArrayBuffer}. - * @param ab2 - Second {@link ArrayBuffer}. - * - * @returns Merged data as {@link ArrayBuffer}. - */ - private concatArrayBuffer; - /** - * {@link Readable} stream event handler. - * - * @param stream - Stream which can be used to read data for decryption. - * @param file - File object which has been created with {@link stream}. - * @param File - Class constructor for {@link PubNub} File object. - * - * @returns Decrypted data as {@link PubNub} File object. - * - * @throws Error if file is empty or contains unsupported data type. - */ - private onStreamReadable; - /** - * Decrypt {@link Readable} stream using legacy cryptor. - * - * @param stream - Stream which can be used to read data for decryption. - * @param file - File object which has been created with {@link stream}. - * @param File - Class constructor for {@link PubNub} File object. - * - * @returns Decrypted data as {@link PubNub} File object. - * - * @throws Error if file is empty or contains unsupported data type. - */ - private decryptLegacyFileStream; -} diff --git a/lib/types/crypto/modules/node.d.ts b/lib/types/crypto/modules/node.d.ts deleted file mode 100644 index 37384f2dc..000000000 --- a/lib/types/crypto/modules/node.d.ts +++ /dev/null @@ -1,97 +0,0 @@ -/** - * Legacy Node.js cryptography module. - */ -/// -/// -import { Readable, PassThrough, Transform } from 'stream'; -import { Buffer } from 'buffer'; -import PubNubFile, { PubNubFileParameters } from '../../file/modules/node'; -import { Cryptography } from '../../core/interfaces/cryptography'; -import { PubNubFileConstructor } from '../../core/types/file'; -/** - * Legacy cryptography implementation for Node.js-based {@link PubNub} client. - */ -export default class NodeCryptography implements Cryptography { - /** - * Random initialization vector size. - */ - static IV_LENGTH: number; - encrypt(key: string, input: string | ArrayBuffer | Buffer | Readable): Promise; - /** - * Encrypt provided source {@link Buffer} using specific encryption {@link key}. - * - * @param key - Data encryption key.
**Note:** Same key should be used to `decrypt` {@link Buffer}. - * @param buffer - Source {@link Buffer} for encryption. - * - * @returns Encrypted data as {@link Buffer} object. - */ - private encryptBuffer; - /** - * Encrypt provided source {@link Readable} stream using specific encryption {@link key}. - * - * @param key - Data encryption key.
**Note:** Same key should be used to `decrypt` {@link Readable} stream. - * @param stream - Source {@link Readable} stream for encryption. - * - * @returns Encrypted data as {@link Transform} object. - */ - private encryptStream; - /** - * Encrypt provided source {@link string} using specific encryption {@link key}. - * - * @param key - Data encryption key.
**Note:** Same key should be used to `decrypt` {@link string}. - * @param text - Source {@link string} for encryption. - * - * @returns Encrypted data as byte {@link string}. - */ - private encryptString; - encryptFile(key: string, file: PubNubFile, File: PubNubFileConstructor): Promise; - decrypt(key: string, input: string | ArrayBuffer | Buffer | Readable): Promise; - /** - * Decrypt provided encrypted {@link Buffer} using specific decryption {@link key}. - * - * @param key - Data decryption key.
**Note:** Should be the same as used to `encrypt` {@link Buffer}. - * @param buffer - Encrypted {@link Buffer} for decryption. - * - * @returns Decrypted data as {@link Buffer} object. - */ - private decryptBuffer; - /** - * Decrypt provided encrypted {@link Readable} stream using specific decryption {@link key}. - * - * @param key - Data decryption key.
**Note:** Should be the same as used to `encrypt` {@link Readable} stream. - * @param stream - Encrypted {@link Readable} stream for decryption. - * - * @returns Decrypted data as {@link Readable} object. - */ - private decryptStream; - /** - * Decrypt provided encrypted {@link string} using specific decryption {@link key}. - * - * @param key - Data decryption key.
**Note:** Should be the same as used to `encrypt` {@link string}. - * @param text - Encrypted {@link string} for decryption. - * - * @returns Decrypted data as byte {@link string}. - */ - private decryptString; - decryptFile(key: string, file: PubNubFile, File: PubNubFileConstructor): Promise; - /** - * Cryptography algorithm. - * - * @returns Cryptography module algorithm. - */ - private get algo(); - /** - * Convert cipher key to the {@link Buffer}. - * - * @param key - String cipher key. - * - * @returns SHA256 HEX encoded cipher key {@link Buffer}. - */ - private getKey; - /** - * Generate random initialization vector. - * - * @returns Random initialization vector. - */ - private getIv; -} diff --git a/lib/types/entities/Channel.d.ts b/lib/types/entities/Channel.d.ts deleted file mode 100644 index fdeb23a76..000000000 --- a/lib/types/entities/Channel.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -import type { PubNubCore as PubNub } from '../core/pubnub-common'; -import EventEmitter from '../core/components/eventEmitter'; -import { SubscriptionOptions } from './commonTypes'; -import { Subscription } from './Subscription'; -export declare class Channel { - private readonly eventEmitter; - private readonly pubnub; - private readonly name; - constructor(channelName: string, eventEmitter: EventEmitter, pubnub: PubNub); - subscription(subscriptionOptions?: SubscriptionOptions): Subscription; -} diff --git a/lib/types/entities/ChannelGroup.d.ts b/lib/types/entities/ChannelGroup.d.ts deleted file mode 100644 index a1c383d59..000000000 --- a/lib/types/entities/ChannelGroup.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -import type { PubNubCore as PubNub } from '../core/pubnub-common'; -import EventEmitter from '../core/components/eventEmitter'; -import { SubscriptionOptions } from './commonTypes'; -import { Subscription } from './Subscription'; -export declare class ChannelGroup { - private readonly eventEmitter; - private readonly pubnub; - private readonly name; - constructor(channelGroup: string, eventEmitter: EventEmitter, pubnub: PubNub); - subscription(subscriptionOptions?: SubscriptionOptions): Subscription; -} diff --git a/lib/types/entities/ChannelMetadata.d.ts b/lib/types/entities/ChannelMetadata.d.ts deleted file mode 100644 index 101562ad0..000000000 --- a/lib/types/entities/ChannelMetadata.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -import type { PubNubCore as PubNub } from '../core/pubnub-common'; -import EventEmitter from '../core/components/eventEmitter'; -import { SubscriptionOptions } from './commonTypes'; -import { Subscription } from './Subscription'; -export declare class ChannelMetadata { - private readonly id; - private readonly eventEmitter; - private readonly pubnub; - constructor(id: string, eventEmitter: EventEmitter, pubnub: PubNub); - subscription(subscriptionOptions?: SubscriptionOptions): Subscription; -} diff --git a/lib/types/entities/SubscribeCapable.d.ts b/lib/types/entities/SubscribeCapable.d.ts deleted file mode 100644 index 31229e1b2..000000000 --- a/lib/types/entities/SubscribeCapable.d.ts +++ /dev/null @@ -1,27 +0,0 @@ -import type { PubNubCore as PubNub } from '../core/pubnub-common'; -import { Listener } from '../core/components/listener_manager'; -import * as Subscription from '../core/types/api/subscription'; -import EventEmitter from '../core/components/eventEmitter'; -import { SubscriptionOptions } from './commonTypes'; -export declare abstract class SubscribeCapable { - protected abstract channelNames: string[]; - protected abstract groupNames: string[]; - protected abstract listener: Listener; - protected abstract eventEmitter: EventEmitter; - protected abstract pubnub: PubNub; - protected abstract options?: SubscriptionOptions; - subscribe(subscribeParameters?: { - timetoken?: string; - }): void; - unsubscribe(): void; - set onMessage(onMessageListener: (messageEvent: Subscription.Message) => void); - set onPresence(onPresenceListener: (presenceEvent: Subscription.Presence) => void); - set onSignal(onSignalListener: (signalEvent: Subscription.Signal) => void); - set onObjects(onObjectsListener: (objectsEvent: Subscription.AppContextObject) => void); - set onMessageAction(messageActionEventListener: (messageActionEvent: Subscription.MessageAction) => void); - set onFile(fileEventListener: (fileEvent: Subscription.File) => void); - addListener(listener: Listener): void; - removeListener(listener: Listener): void; - get channels(): string[]; - get channelGroups(): string[]; -} diff --git a/lib/types/entities/Subscription.d.ts b/lib/types/entities/Subscription.d.ts deleted file mode 100644 index ca7002a27..000000000 --- a/lib/types/entities/Subscription.d.ts +++ /dev/null @@ -1,22 +0,0 @@ -import type { PubNubCore as PubNub } from '../core/pubnub-common'; -import { Listener } from '../core/components/listener_manager'; -import EventEmitter from '../core/components/eventEmitter'; -import { SubscribeCapable } from './SubscribeCapable'; -import { SubscriptionOptions } from './commonTypes'; -import { SubscriptionSet } from './SubscriptionSet'; -export declare class Subscription extends SubscribeCapable { - protected channelNames: string[]; - protected groupNames: string[]; - protected options?: SubscriptionOptions; - protected pubnub: PubNub; - protected eventEmitter: EventEmitter; - protected listener: Listener; - constructor({ channels, channelGroups, subscriptionOptions, eventEmitter, pubnub, }: { - channels: string[]; - channelGroups: string[]; - subscriptionOptions?: SubscriptionOptions; - eventEmitter: EventEmitter; - pubnub: PubNub; - }); - addSubscription(subscription: Subscription): SubscriptionSet; -} diff --git a/lib/types/entities/SubscriptionSet.d.ts b/lib/types/entities/SubscriptionSet.d.ts deleted file mode 100644 index a7e0c2465..000000000 --- a/lib/types/entities/SubscriptionSet.d.ts +++ /dev/null @@ -1,27 +0,0 @@ -import type { PubNubCore as PubNub } from '../core/pubnub-common'; -import { Listener } from '../core/components/listener_manager'; -import EventEmitter from '../core/components/eventEmitter'; -import { SubscribeCapable } from './SubscribeCapable'; -import { SubscriptionOptions } from './commonTypes'; -import { Subscription } from './Subscription'; -export declare class SubscriptionSet extends SubscribeCapable { - protected channelNames: string[]; - protected groupNames: string[]; - protected options?: SubscriptionOptions; - protected pubnub: PubNub; - protected eventEmitter: EventEmitter; - protected subscriptionList: Subscription[]; - protected listener: Listener; - constructor({ channels, channelGroups, subscriptionOptions, eventEmitter, pubnub, }: { - channels?: string[]; - channelGroups?: string[]; - subscriptionOptions?: SubscriptionOptions; - eventEmitter: EventEmitter; - pubnub: PubNub; - }); - addSubscription(subscription: Subscription): void; - removeSubscription(subscription: Subscription): void; - addSubscriptionSet(subscriptionSet: SubscriptionSet): void; - removeSubscriptionSet(subscriptionSet: SubscriptionSet): void; - get subscriptions(): Subscription[]; -} diff --git a/lib/types/entities/UserMetadata.d.ts b/lib/types/entities/UserMetadata.d.ts deleted file mode 100644 index 354ef437d..000000000 --- a/lib/types/entities/UserMetadata.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -import type { PubNubCore as PubNub } from '../core/pubnub-common'; -import EventEmitter from '../core/components/eventEmitter'; -import { SubscriptionOptions } from './commonTypes'; -import { Subscription } from './Subscription'; -export declare class UserMetadata { - private readonly id; - private readonly eventEmitter; - private readonly pubnub; - constructor(id: string, eventEmitter: EventEmitter, pubnub: PubNub); - subscription(subscriptionOptions?: SubscriptionOptions): Subscription; -} diff --git a/lib/types/entities/commonTypes.d.ts b/lib/types/entities/commonTypes.d.ts deleted file mode 100644 index c26e12f07..000000000 --- a/lib/types/entities/commonTypes.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export type SubscriptionOptions = { - receivePresenceEvents?: boolean; -}; diff --git a/lib/types/errors/pubnub-api-error.d.ts b/lib/types/errors/pubnub-api-error.d.ts deleted file mode 100644 index 1b75e3be8..000000000 --- a/lib/types/errors/pubnub-api-error.d.ts +++ /dev/null @@ -1,73 +0,0 @@ -/** - * REST API endpoint use error module. - */ -import { TransportResponse } from '../core/types/transport-response'; -import RequestOperation from '../core/constants/operations'; -import StatusCategory from '../core/constants/categories'; -import { Payload, Status } from '../core/types/api'; -import { PubNubError } from './pubnub-error'; -/** - * PubNub REST API call error. - */ -export declare class PubNubAPIError extends Error { - readonly category: StatusCategory; - readonly statusCode: number; - readonly errorData?: Error | Payload | undefined; - /** - * Construct API from known error object or {@link PubNub} service error response. - * - * @param errorOrResponse - `Error` or service error response object from which error information - * should be extracted. - * @param data - Preprocessed service error response. - * - * @returns `PubNubAPIError` object with known error category and additional information (if - * available). - */ - static create(errorOrResponse: Error | TransportResponse, data?: ArrayBuffer): PubNubAPIError; - /** - * Create API error instance from other error object. - * - * @param error - `Error` object provided by network provider (mostly) or other {@link PubNub} client components. - * - * @returns `PubNubAPIError` object with known error category and additional information (if - * available). - */ - private static createFromError; - /** - * Construct API from known {@link PubNub} service error response. - * - * @param response - Service error response object from which error information should be - * extracted. - * @param data - Preprocessed service error response. - * - * @returns `PubNubAPIError` object with known error category and additional information (if - * available). - */ - private static createFromServiceResponse; - /** - * Construct PubNub endpoint error. - * - * @param message - Short API call error description. - * @param category - Error category. - * @param statusCode - Response HTTP status code. - * @param errorData - Error information. - */ - constructor(message: string, category: StatusCategory, statusCode: number, errorData?: Error | Payload | undefined); - /** - * Convert API error object to API callback status object. - * - * @param operation - Request operation during which error happened. - * - * @returns Pre-formatted API callback status object. - */ - toStatus(operation: RequestOperation): Status; - /** - * Convert API error object to PubNub client error object. - * - * @param operation - Request operation during which error happened. - * @param message - Custom error message. - * - * @returns Client-facing pre-formatted endpoint call error. - */ - toPubNubError(operation: RequestOperation, message?: string): PubNubError; -} diff --git a/lib/types/errors/pubnub-error.d.ts b/lib/types/errors/pubnub-error.d.ts deleted file mode 100644 index 549b195f9..000000000 --- a/lib/types/errors/pubnub-error.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { Status } from '../core/types/api'; -export declare class PubNubError extends Error { - status?: Status | undefined; - constructor(message: string, status?: Status | undefined); -} -export declare function createValidationError(message: string, statusCode?: number): Status; diff --git a/lib/types/event-engine/core/change.d.ts b/lib/types/event-engine/core/change.d.ts deleted file mode 100644 index 7aaf7a029..000000000 --- a/lib/types/event-engine/core/change.d.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { State } from './state'; -import { EventTypeFromMap, GenericMap, InvocationTypeFromMap } from './types'; -export type EngineStarted = { - type: 'engineStarted'; - state: State; - context: any; -}; -export type EventReceived = { - type: 'eventReceived'; - event: EventTypeFromMap; -}; -export type TransitionDone = { - type: 'transitionDone'; - event: EventTypeFromMap; - fromState: State; - toState: State; - fromContext: any; - toContext: any; -}; -export type InvocationDispatched = { - type: 'invocationDispatched'; - invocation: InvocationTypeFromMap; -}; -export type Change = TransitionDone | InvocationDispatched | EngineStarted | EventReceived; diff --git a/lib/types/event-engine/core/dispatcher.d.ts b/lib/types/event-engine/core/dispatcher.d.ts deleted file mode 100644 index d70bc9359..000000000 --- a/lib/types/event-engine/core/dispatcher.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { Handler } from './handler'; -import { GenericInvocation, GenericMap, InvocationTypeFromMap } from './types'; -type HandlerCreator = (payload: Payload, dependencies: Dependencies) => Handler; -export declare class Dispatcher> { - private readonly dependencies; - constructor(dependencies: Dependencies); - private instances; - private handlers; - on(type: K, handlerCreator: HandlerCreator): void; - dispatch(invocation: Invocation): void; - dispose(): void; -} -export {}; diff --git a/lib/types/event-engine/core/engine.d.ts b/lib/types/event-engine/core/engine.d.ts deleted file mode 100644 index ba108d423..000000000 --- a/lib/types/event-engine/core/engine.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { Subject } from '../../core/components/subject'; -import { Change } from './change'; -import { State } from './state'; -import { GenericMap, Event } from './types'; -export declare class Engine extends Subject> { - describe(label: string): State; - private currentState?; - private currentContext?; - start(initialState: State, initialContext: Context): void; - transition(event: Event): void; -} diff --git a/lib/types/event-engine/core/handler.d.ts b/lib/types/event-engine/core/handler.d.ts deleted file mode 100644 index c8a53c875..000000000 --- a/lib/types/event-engine/core/handler.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { AbortSignal } from '../../core/components/abort_signal'; -export declare abstract class Handler { - protected payload: Payload; - protected readonly dependencies: Dependencies; - constructor(payload: Payload, dependencies: Dependencies); - abstract start(): void; - abstract cancel(): void; -} -type AsyncHandlerFunction = (payload: Payload, abortSignal: AbortSignal, dependencies: Dependencies) => Promise; -declare class AsyncHandler extends Handler { - private asyncFunction; - abortSignal: AbortSignal; - constructor(payload: Payload, dependencies: Dependencies, asyncFunction: AsyncHandlerFunction); - start(): void; - cancel(): void; -} -export declare const asyncHandler: (handlerFunction: AsyncHandlerFunction) => (payload: Payload, dependencies: Dependencies) => AsyncHandler; -export {}; diff --git a/lib/types/event-engine/core/index.d.ts b/lib/types/event-engine/core/index.d.ts deleted file mode 100644 index b8eab6782..000000000 --- a/lib/types/event-engine/core/index.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export { Engine } from './engine'; -export { Dispatcher } from './dispatcher'; -export { MapOf, createEvent, createEffect, createManagedEffect } from './types'; -export { asyncHandler } from './handler'; diff --git a/lib/types/event-engine/core/retryPolicy.d.ts b/lib/types/event-engine/core/retryPolicy.d.ts deleted file mode 100644 index 5aed5de37..000000000 --- a/lib/types/event-engine/core/retryPolicy.d.ts +++ /dev/null @@ -1,58 +0,0 @@ -import { PubNubError } from '../../errors/pubnub-error'; -export declare class RetryPolicy { - static LinearRetryPolicy(configuration: LinearRetryPolicyConfiguration): RequestRetryPolicy & LinearRetryPolicyConfiguration; - static ExponentialRetryPolicy(configuration: ExponentialRetryPolicyConfiguration): RequestRetryPolicy & ExponentialRetryPolicyConfiguration; -} -export type RequestRetryPolicy = { - /** - * Check whether failed request can be retried. - * - * @param reason - Request processing failure reason. - * @param attempt - Number of consequent failure. - * - * @returns `true` if another request retry attempt can be done. - */ - shouldRetry(reason: PubNubError & { - retryAfter?: number; - }, attempt: number): boolean; - /** - * Computed delay for next request retry attempt. - * - * @param attempt - Number of consequent failure. - * @param reason - Request processing failure reason. - * - * @returns Delay before next request retry attempt in milliseconds. - */ - getDelay(attempt: number, reason: PubNubError & { - retryAfter?: number; - }): number; - /** - * Identify reason why another retry attempt can't be made. - * - * @param reason - Request processing failure reason. - * @param attempt - Number of consequent failure. - * - * @returns Give up reason. - */ - getGiveupReason(reason: PubNubError & { - retryAfter?: number; - }, attempt: number): string; - /** - * Validate retry policy parameters. - * - * @throws Error if `minimum` delay is smaller than 2 seconds for `exponential` retry policy. - * @throws Error if `maximum` delay is larger than 150 seconds for `exponential` retry policy. - * @throws Error if `maximumRetry` attempts is larger than 6 for `exponential` retry policy. - * @throws Error if `maximumRetry` attempts is larger than 10 for `linear` retry policy. - */ - validate(): void; -}; -export type LinearRetryPolicyConfiguration = { - delay: number; - maximumRetry: number; -}; -export type ExponentialRetryPolicyConfiguration = { - minimumDelay: number; - maximumDelay: number; - maximumRetry: number; -}; diff --git a/lib/types/event-engine/core/state.d.ts b/lib/types/event-engine/core/state.d.ts deleted file mode 100644 index 59b3bb534..000000000 --- a/lib/types/event-engine/core/state.d.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { Event, EventOfType, GenericInvocation, GenericMap, InvocationTypeFromMap } from './types'; -export type TransitionFunction> = { - (context: Context, event: EventType): Transition | void; -}; -export type Transition = [ - State, - Context, - InvocationTypeFromMap[] -]; -export declare class State { - label: string; - private transitionMap; - transition(context: Context, event: EventOfType): void | Transition; - constructor(label: string); - on(eventType: K, transition: TransitionFunction>): this; - with(context: Context, effects?: InvocationTypeFromMap[]): Transition; - enterEffects: ((context: Context) => InvocationTypeFromMap)[]; - exitEffects: ((context: Context) => InvocationTypeFromMap)[]; - onEnter(effect: (context: Context) => GenericInvocation): this; - onExit(effect: (context: Context) => GenericInvocation): this; -} diff --git a/lib/types/event-engine/core/types.d.ts b/lib/types/event-engine/core/types.d.ts deleted file mode 100644 index 14524f0ec..000000000 --- a/lib/types/event-engine/core/types.d.ts +++ /dev/null @@ -1,45 +0,0 @@ -export type Event = { - type: T; - payload: P; -}; -export type Invocation = { - type: T; - payload: P; - managed: boolean; -}; -export type GenericEvent = Event; -export type GenericInvocation = Invocation; -export type GenericMap = Record; -export type EventTypeFromMap = { - [T in keyof Map & string]: Event; -}[keyof Map & string]; -export type InvocationTypeFromMap = { - [T in keyof Map & string]: Invocation; -}[keyof Map & string]; -export type EventOfType = Event; -export type InvocationOfType = Invocation; -type EventCreator = { - (...args: S): Event; - type: K; -}; -export declare function createEvent(type: K, fn: (...args: S) => P): EventCreator; -export type MapOf { - type: string | number | symbol; - payload: any; -}> = { - [K in ReturnType['type']]: (ReturnType & { - type: K; - })['payload']; -}; -type EffectCreator = { - (...args: S): Invocation; - type: K; -}; -type ManagedEffectCreator = { - (...args: S): Invocation; - type: K; - cancel: Invocation<'CANCEL', K>; -}; -export declare function createEffect(type: K, fn: (...args: S) => P): EffectCreator; -export declare function createManagedEffect(type: K, fn: (...args: S) => P): ManagedEffectCreator; -export {}; diff --git a/lib/types/event-engine/dispatcher.d.ts b/lib/types/event-engine/dispatcher.d.ts deleted file mode 100644 index b2afbeb72..000000000 --- a/lib/types/event-engine/dispatcher.d.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { PrivateClientConfiguration } from '../core/interfaces/configuration'; -import * as Subscription from '../core/types/api/subscription'; -import { Dispatcher, Engine } from './core'; -import * as effects from './effects'; -import * as events from './events'; -import { Payload, StatusEvent } from '../core/types/api'; -export type Dependencies = { - handshake: (parameters: Subscription.CancelableSubscribeParameters) => Promise; - receiveMessages: (parameters: Subscription.CancelableSubscribeParameters) => Promise; - join?: (parameters: { - channels?: string[]; - groups?: string[]; - }) => void; - leave?: (parameters: { - channels?: string[]; - groups?: string[]; - }) => void; - leaveAll?: () => void; - presenceState: Record; - config: PrivateClientConfiguration; - delay: (milliseconds: number) => Promise; - emitMessages: (events: Subscription.SubscriptionResponse['messages']) => void; - emitStatus: (status: StatusEvent) => void; -}; -export declare class EventEngineDispatcher extends Dispatcher { - constructor(engine: Engine, dependencies: Dependencies); -} diff --git a/lib/types/event-engine/effects.d.ts b/lib/types/event-engine/effects.d.ts deleted file mode 100644 index 803ce383b..000000000 --- a/lib/types/event-engine/effects.d.ts +++ /dev/null @@ -1,77 +0,0 @@ -import { MapOf } from './core'; -import { HandshakeReconnectingStateContext } from './states/handshake_reconnecting'; -import { ReceiveReconnectingStateContext } from './states/receive_reconnecting'; -import * as Subscription from '../core/types/api/subscription'; -import { StatusEvent } from '../core/types/api'; -export declare const handshake: { - (channels: string[], groups: string[]): import("./core/types").Invocation<"HANDSHAKE", { - channels: string[]; - groups: string[]; - }>; - type: "HANDSHAKE"; - cancel: import("./core/types").Invocation<"CANCEL", "HANDSHAKE">; -}; -export declare const receiveMessages: { - (channels: string[], groups: string[], cursor: Subscription.SubscriptionCursor): import("./core/types").Invocation<"RECEIVE_MESSAGES", { - channels: string[]; - groups: string[]; - cursor: Subscription.SubscriptionCursor; - }>; - type: "RECEIVE_MESSAGES"; - cancel: import("./core/types").Invocation<"CANCEL", "RECEIVE_MESSAGES">; -}; -export declare const emitMessages: { - (events: ({ - type: import("../core/endpoints/subscribe").PubNubEventType.Presence; - data: Subscription.Presence; - } | { - type: import("../core/endpoints/subscribe").PubNubEventType.Message; - data: Subscription.Message; - } | { - type: import("../core/endpoints/subscribe").PubNubEventType.Signal; - data: Subscription.Signal; - } | { - type: import("../core/endpoints/subscribe").PubNubEventType.MessageAction; - data: Subscription.MessageAction; - } | { - type: import("../core/endpoints/subscribe").PubNubEventType.AppContext; - data: Subscription.AppContextObject; - } | { - type: import("../core/endpoints/subscribe").PubNubEventType.Files; - data: Subscription.File; - })[]): import("./core/types").Invocation<"EMIT_MESSAGES", ({ - type: import("../core/endpoints/subscribe").PubNubEventType.Presence; - data: Subscription.Presence; - } | { - type: import("../core/endpoints/subscribe").PubNubEventType.Message; - data: Subscription.Message; - } | { - type: import("../core/endpoints/subscribe").PubNubEventType.Signal; - data: Subscription.Signal; - } | { - type: import("../core/endpoints/subscribe").PubNubEventType.MessageAction; - data: Subscription.MessageAction; - } | { - type: import("../core/endpoints/subscribe").PubNubEventType.AppContext; - data: Subscription.AppContextObject; - } | { - type: import("../core/endpoints/subscribe").PubNubEventType.Files; - data: Subscription.File; - })[]>; - type: "EMIT_MESSAGES"; -}; -export declare const emitStatus: { - (status: StatusEvent): import("./core/types").Invocation<"EMIT_STATUS", StatusEvent>; - type: "EMIT_STATUS"; -}; -export declare const receiveReconnect: { - (context: ReceiveReconnectingStateContext): import("./core/types").Invocation<"RECEIVE_RECONNECT", ReceiveReconnectingStateContext>; - type: "RECEIVE_RECONNECT"; - cancel: import("./core/types").Invocation<"CANCEL", "RECEIVE_RECONNECT">; -}; -export declare const handshakeReconnect: { - (context: HandshakeReconnectingStateContext): import("./core/types").Invocation<"HANDSHAKE_RECONNECT", HandshakeReconnectingStateContext>; - type: "HANDSHAKE_RECONNECT"; - cancel: import("./core/types").Invocation<"CANCEL", "HANDSHAKE_RECONNECT">; -}; -export type Effects = MapOf; diff --git a/lib/types/event-engine/events.d.ts b/lib/types/event-engine/events.d.ts deleted file mode 100644 index 98418cab9..000000000 --- a/lib/types/event-engine/events.d.ts +++ /dev/null @@ -1,159 +0,0 @@ -import * as Subscription from '../core/types/api/subscription'; -import { PubNubError } from '../errors/pubnub-error'; -import { MapOf } from './core'; -export declare const subscriptionChange: { - (channels: string[], groups: string[]): import("./core/types").Event<"SUBSCRIPTION_CHANGED", { - channels: string[]; - groups: string[]; - }>; - type: "SUBSCRIPTION_CHANGED"; -}; -export declare const restore: { - (channels: string[], groups: string[], timetoken: string | number, region?: number | undefined): import("./core/types").Event<"SUBSCRIPTION_RESTORED", { - channels: string[]; - groups: string[]; - cursor: { - timetoken: string | number; - region: number; - }; - }>; - type: "SUBSCRIPTION_RESTORED"; -}; -export declare const handshakeSuccess: { - (cursor: Subscription.SubscriptionCursor): import("./core/types").Event<"HANDSHAKE_SUCCESS", Subscription.SubscriptionCursor>; - type: "HANDSHAKE_SUCCESS"; -}; -export declare const handshakeFailure: { - (error: PubNubError): import("./core/types").Event<"HANDSHAKE_FAILURE", PubNubError>; - type: "HANDSHAKE_FAILURE"; -}; -export declare const handshakeReconnectSuccess: { - (cursor: Subscription.SubscriptionCursor): import("./core/types").Event<"HANDSHAKE_RECONNECT_SUCCESS", { - cursor: Subscription.SubscriptionCursor; - }>; - type: "HANDSHAKE_RECONNECT_SUCCESS"; -}; -export declare const handshakeReconnectFailure: { - (error: PubNubError): import("./core/types").Event<"HANDSHAKE_RECONNECT_FAILURE", PubNubError>; - type: "HANDSHAKE_RECONNECT_FAILURE"; -}; -export declare const handshakeReconnectGiveup: { - (error: PubNubError): import("./core/types").Event<"HANDSHAKE_RECONNECT_GIVEUP", PubNubError>; - type: "HANDSHAKE_RECONNECT_GIVEUP"; -}; -export declare const receiveSuccess: { - (cursor: Subscription.SubscriptionCursor, events: ({ - type: import("../core/endpoints/subscribe").PubNubEventType.Presence; - data: Subscription.Presence; - } | { - type: import("../core/endpoints/subscribe").PubNubEventType.Message; - data: Subscription.Message; - } | { - type: import("../core/endpoints/subscribe").PubNubEventType.Signal; - data: Subscription.Signal; - } | { - type: import("../core/endpoints/subscribe").PubNubEventType.MessageAction; - data: Subscription.MessageAction; - } | { - type: import("../core/endpoints/subscribe").PubNubEventType.AppContext; - data: Subscription.AppContextObject; - } | { - type: import("../core/endpoints/subscribe").PubNubEventType.Files; - data: Subscription.File; - })[]): import("./core/types").Event<"RECEIVE_SUCCESS", { - cursor: Subscription.SubscriptionCursor; - events: ({ - type: import("../core/endpoints/subscribe").PubNubEventType.Presence; - data: Subscription.Presence; - } | { - type: import("../core/endpoints/subscribe").PubNubEventType.Message; - data: Subscription.Message; - } | { - type: import("../core/endpoints/subscribe").PubNubEventType.Signal; - data: Subscription.Signal; - } | { - type: import("../core/endpoints/subscribe").PubNubEventType.MessageAction; - data: Subscription.MessageAction; - } | { - type: import("../core/endpoints/subscribe").PubNubEventType.AppContext; - data: Subscription.AppContextObject; - } | { - type: import("../core/endpoints/subscribe").PubNubEventType.Files; - data: Subscription.File; - })[]; - }>; - type: "RECEIVE_SUCCESS"; -}; -export declare const receiveFailure: { - (error: PubNubError): import("./core/types").Event<"RECEIVE_FAILURE", PubNubError>; - type: "RECEIVE_FAILURE"; -}; -export declare const receiveReconnectSuccess: { - (cursor: Subscription.SubscriptionCursor, events: ({ - type: import("../core/endpoints/subscribe").PubNubEventType.Presence; - data: Subscription.Presence; - } | { - type: import("../core/endpoints/subscribe").PubNubEventType.Message; - data: Subscription.Message; - } | { - type: import("../core/endpoints/subscribe").PubNubEventType.Signal; - data: Subscription.Signal; - } | { - type: import("../core/endpoints/subscribe").PubNubEventType.MessageAction; - data: Subscription.MessageAction; - } | { - type: import("../core/endpoints/subscribe").PubNubEventType.AppContext; - data: Subscription.AppContextObject; - } | { - type: import("../core/endpoints/subscribe").PubNubEventType.Files; - data: Subscription.File; - })[]): import("./core/types").Event<"RECEIVE_RECONNECT_SUCCESS", { - cursor: Subscription.SubscriptionCursor; - events: ({ - type: import("../core/endpoints/subscribe").PubNubEventType.Presence; - data: Subscription.Presence; - } | { - type: import("../core/endpoints/subscribe").PubNubEventType.Message; - data: Subscription.Message; - } | { - type: import("../core/endpoints/subscribe").PubNubEventType.Signal; - data: Subscription.Signal; - } | { - type: import("../core/endpoints/subscribe").PubNubEventType.MessageAction; - data: Subscription.MessageAction; - } | { - type: import("../core/endpoints/subscribe").PubNubEventType.AppContext; - data: Subscription.AppContextObject; - } | { - type: import("../core/endpoints/subscribe").PubNubEventType.Files; - data: Subscription.File; - })[]; - }>; - type: "RECEIVE_RECONNECT_SUCCESS"; -}; -export declare const receiveReconnectFailure: { - (error: PubNubError): import("./core/types").Event<"RECEIVE_RECONNECT_FAILURE", PubNubError>; - type: "RECEIVE_RECONNECT_FAILURE"; -}; -export declare const receiveReconnectGiveup: { - (error: PubNubError): import("./core/types").Event<"RECEIVING_RECONNECT_GIVEUP", PubNubError>; - type: "RECEIVING_RECONNECT_GIVEUP"; -}; -export declare const disconnect: { - (): import("./core/types").Event<"DISCONNECT", {}>; - type: "DISCONNECT"; -}; -export declare const reconnect: { - (timetoken?: string | undefined, region?: number | undefined): import("./core/types").Event<"RECONNECT", { - cursor: { - timetoken: string; - region: number; - }; - }>; - type: "RECONNECT"; -}; -export declare const unsubscribeAll: { - (): import("./core/types").Event<"UNSUBSCRIBE_ALL", {}>; - type: "UNSUBSCRIBE_ALL"; -}; -export type Events = MapOf; diff --git a/lib/types/event-engine/index.d.ts b/lib/types/event-engine/index.d.ts deleted file mode 100644 index 2542bfa3b..000000000 --- a/lib/types/event-engine/index.d.ts +++ /dev/null @@ -1,33 +0,0 @@ -import { Engine } from './core'; -import { Dependencies } from './dispatcher'; -import * as effects from './effects'; -import * as events from './events'; -export declare class EventEngine { - private engine; - private dispatcher; - private dependencies; - get _engine(): Engine; - private readonly _unsubscribeEngine; - constructor(dependencies: Dependencies); - channels: string[]; - groups: string[]; - subscribe({ channels, channelGroups, timetoken, withPresence, }: { - channels?: string[]; - channelGroups?: string[]; - timetoken?: string | number; - withPresence?: boolean; - }): void; - unsubscribe({ channels, channelGroups }: { - channels?: string[]; - channelGroups?: string[]; - }): void; - unsubscribeAll(): void; - reconnect({ timetoken, region }: { - timetoken?: string; - region?: number; - }): void; - disconnect(): void; - getSubscribedChannels(): string[]; - getSubscribedChannelGroups(): string[]; - dispose(): void; -} diff --git a/lib/types/event-engine/presence/dispatcher.d.ts b/lib/types/event-engine/presence/dispatcher.d.ts deleted file mode 100644 index 9fdf3de45..000000000 --- a/lib/types/event-engine/presence/dispatcher.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { PrivateClientConfiguration } from '../../core/interfaces/configuration'; -import { Dispatcher, Engine } from '../core'; -import * as Presence from '../../core/types/api/presence'; -import { Payload, ResultCallback } from '../../core/types/api'; -import * as effects from './effects'; -import * as events from './events'; -export type Dependencies = { - heartbeat: (parameters: Presence.PresenceHeartbeatParameters, callback?: ResultCallback) => Promise; - leave: (parameters: Presence.PresenceLeaveParameters) => void; - heartbeatDelay: () => Promise; - retryDelay: (milliseconds: number) => Promise; - config: PrivateClientConfiguration; - presenceState: Record; - emitStatus: (status: any) => void; -}; -export declare class PresenceEventEngineDispatcher extends Dispatcher { - constructor(engine: Engine, dependencies: Dependencies); -} diff --git a/lib/types/event-engine/presence/effects.d.ts b/lib/types/event-engine/presence/effects.d.ts deleted file mode 100644 index a905c6835..000000000 --- a/lib/types/event-engine/presence/effects.d.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { MapOf } from '../core'; -import { HeartbeatReconnectingStateContext } from './states/heartbeat_reconnecting'; -export declare const heartbeat: { - (channels: string[], groups: string[]): import("../core/types").Invocation<"HEARTBEAT", { - channels: string[]; - groups: string[]; - }>; - type: "HEARTBEAT"; -}; -export declare const leave: { - (channels: string[], groups: string[]): import("../core/types").Invocation<"LEAVE", { - channels: string[]; - groups: string[]; - }>; - type: "LEAVE"; -}; -export declare const emitStatus: { - (status: any): import("../core/types").Invocation<"EMIT_STATUS", any>; - type: "EMIT_STATUS"; -}; -export declare const wait: { - (): import("../core/types").Invocation<"WAIT", {}>; - type: "WAIT"; - cancel: import("../core/types").Invocation<"CANCEL", "WAIT">; -}; -export declare const delayedHeartbeat: { - (context: HeartbeatReconnectingStateContext): import("../core/types").Invocation<"DELAYED_HEARTBEAT", HeartbeatReconnectingStateContext>; - type: "DELAYED_HEARTBEAT"; - cancel: import("../core/types").Invocation<"CANCEL", "DELAYED_HEARTBEAT">; -}; -export type Effects = MapOf; diff --git a/lib/types/event-engine/presence/events.d.ts b/lib/types/event-engine/presence/events.d.ts deleted file mode 100644 index cfceec153..000000000 --- a/lib/types/event-engine/presence/events.d.ts +++ /dev/null @@ -1,47 +0,0 @@ -import { PubNubError } from '../../errors/pubnub-error'; -import { MapOf } from '../core'; -export declare const reconnect: { - (): import("../core/types").Event<"RECONNECT", {}>; - type: "RECONNECT"; -}; -export declare const disconnect: { - (): import("../core/types").Event<"DISCONNECT", {}>; - type: "DISCONNECT"; -}; -export declare const joined: { - (channels: string[], groups: string[]): import("../core/types").Event<"JOINED", { - channels: string[]; - groups: string[]; - }>; - type: "JOINED"; -}; -export declare const left: { - (channels: string[], groups: string[]): import("../core/types").Event<"LEFT", { - channels: string[]; - groups: string[]; - }>; - type: "LEFT"; -}; -export declare const leftAll: { - (): import("../core/types").Event<"LEFT_ALL", {}>; - type: "LEFT_ALL"; -}; -export declare const heartbeatSuccess: { - (statusCode: number): import("../core/types").Event<"HEARTBEAT_SUCCESS", { - statusCode: number; - }>; - type: "HEARTBEAT_SUCCESS"; -}; -export declare const heartbeatFailure: { - (error: PubNubError): import("../core/types").Event<"HEARTBEAT_FAILURE", PubNubError>; - type: "HEARTBEAT_FAILURE"; -}; -export declare const heartbeatGiveup: { - (): import("../core/types").Event<"HEARTBEAT_GIVEUP", {}>; - type: "HEARTBEAT_GIVEUP"; -}; -export declare const timesUp: { - (): import("../core/types").Event<"TIMES_UP", {}>; - type: "TIMES_UP"; -}; -export type Events = MapOf; diff --git a/lib/types/event-engine/presence/presence.d.ts b/lib/types/event-engine/presence/presence.d.ts deleted file mode 100644 index 42f82e750..000000000 --- a/lib/types/event-engine/presence/presence.d.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { Engine } from '../core'; -import * as events from './events'; -import * as effects from './effects'; -import { Dependencies } from './dispatcher'; -export declare class PresenceEventEngine { - private dependencies; - private engine; - private dispatcher; - get _engine(): Engine; - private _unsubscribeEngine; - constructor(dependencies: Dependencies); - channels: string[]; - groups: string[]; - join({ channels, groups }: { - channels?: string[]; - groups?: string[]; - }): void; - leave({ channels, groups }: { - channels?: string[]; - groups?: string[]; - }): void; - leaveAll(): void; - dispose(): void; -} diff --git a/lib/types/event-engine/presence/states/heartbeat_cooldown.d.ts b/lib/types/event-engine/presence/states/heartbeat_cooldown.d.ts deleted file mode 100644 index 6b2273d2b..000000000 --- a/lib/types/event-engine/presence/states/heartbeat_cooldown.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { State } from '../../core/state'; -import { Events } from '../events'; -import { Effects } from '../effects'; -export type HeartbeatCooldownStateContext = { - channels: string[]; - groups: string[]; -}; -export declare const HeartbeatCooldownState: State; diff --git a/lib/types/event-engine/presence/states/heartbeat_failed.d.ts b/lib/types/event-engine/presence/states/heartbeat_failed.d.ts deleted file mode 100644 index dce365993..000000000 --- a/lib/types/event-engine/presence/states/heartbeat_failed.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { State } from '../../core/state'; -import { Events } from '../events'; -import { Effects } from '../effects'; -export type HeartbeatFailedStateContext = { - channels: string[]; - groups: string[]; -}; -export declare const HeartbeatFailedState: State; diff --git a/lib/types/event-engine/presence/states/heartbeat_inactive.d.ts b/lib/types/event-engine/presence/states/heartbeat_inactive.d.ts deleted file mode 100644 index d39ebfb4f..000000000 --- a/lib/types/event-engine/presence/states/heartbeat_inactive.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { State } from '../../core/state'; -import { Effects } from '../effects'; -import { Events } from '../events'; -export declare const HeartbeatInactiveState: State; diff --git a/lib/types/event-engine/presence/states/heartbeat_reconnecting.d.ts b/lib/types/event-engine/presence/states/heartbeat_reconnecting.d.ts deleted file mode 100644 index 3a3044a0b..000000000 --- a/lib/types/event-engine/presence/states/heartbeat_reconnecting.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { PubNubError } from '../../../errors/pubnub-error'; -import { State } from '../../core/state'; -import { Events } from '../events'; -import { Effects } from '../effects'; -export type HeartbeatReconnectingStateContext = { - channels: string[]; - groups: string[]; - attempts: number; - reason: PubNubError; -}; -export declare const HearbeatReconnectingState: State; diff --git a/lib/types/event-engine/presence/states/heartbeat_stopped.d.ts b/lib/types/event-engine/presence/states/heartbeat_stopped.d.ts deleted file mode 100644 index 9df101a87..000000000 --- a/lib/types/event-engine/presence/states/heartbeat_stopped.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { State } from '../../core/state'; -import { Effects } from '../effects'; -import { Events } from '../events'; -export type HeartbeatStoppedStateContext = { - channels: string[]; - groups: string[]; -}; -export declare const HeartbeatStoppedState: State; diff --git a/lib/types/event-engine/presence/states/heartbeating.d.ts b/lib/types/event-engine/presence/states/heartbeating.d.ts deleted file mode 100644 index 57bc59f8f..000000000 --- a/lib/types/event-engine/presence/states/heartbeating.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { State } from '../../core/state'; -import { Events } from '../events'; -import { Effects } from '../effects'; -export type HeartbeatingStateContext = { - channels: string[]; - groups: string[]; -}; -export declare const HeartbeatingState: State; diff --git a/lib/types/event-engine/states/handshake_failed.d.ts b/lib/types/event-engine/states/handshake_failed.d.ts deleted file mode 100644 index be8769ab6..000000000 --- a/lib/types/event-engine/states/handshake_failed.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { State } from '../core/state'; -import { Effects } from '../effects'; -import { Events } from '../events'; -import { PubNubError } from '../../errors/pubnub-error'; -import * as Subscription from '../../core/types/api/subscription'; -export type HandshakeFailedStateContext = { - channels: string[]; - groups: string[]; - cursor?: Subscription.SubscriptionCursor; - reason: PubNubError; -}; -export declare const HandshakeFailedState: State; diff --git a/lib/types/event-engine/states/handshake_reconnecting.d.ts b/lib/types/event-engine/states/handshake_reconnecting.d.ts deleted file mode 100644 index ed2817320..000000000 --- a/lib/types/event-engine/states/handshake_reconnecting.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { PubNubError } from '../../errors/pubnub-error'; -import { State } from '../core/state'; -import { Effects } from '../effects'; -import { Events } from '../events'; -import * as Subscription from '../../core/types/api/subscription'; -export type HandshakeReconnectingStateContext = { - channels: string[]; - groups: string[]; - cursor?: Subscription.SubscriptionCursor; - attempts: number; - reason: PubNubError; -}; -export declare const HandshakeReconnectingState: State; diff --git a/lib/types/event-engine/states/handshake_stopped.d.ts b/lib/types/event-engine/states/handshake_stopped.d.ts deleted file mode 100644 index 40ffa7c4c..000000000 --- a/lib/types/event-engine/states/handshake_stopped.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { State } from '../core/state'; -import { Effects } from '../effects'; -import { Events } from '../events'; -import * as Subscription from '../../core/types/api/subscription'; -type HandshakeStoppedStateContext = { - channels: string[]; - groups: string[]; - cursor?: Subscription.SubscriptionCursor; -}; -export declare const HandshakeStoppedState: State; -export {}; diff --git a/lib/types/event-engine/states/handshaking.d.ts b/lib/types/event-engine/states/handshaking.d.ts deleted file mode 100644 index cff30ca43..000000000 --- a/lib/types/event-engine/states/handshaking.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { State } from '../core/state'; -import { Effects } from '../effects'; -import { Events } from '../events'; -import * as Subscription from '../../core/types/api/subscription'; -export type HandshakingStateContext = { - channels: string[]; - groups: string[]; - cursor?: Subscription.SubscriptionCursor; -}; -export declare const HandshakingState: State; diff --git a/lib/types/event-engine/states/receive_failed.d.ts b/lib/types/event-engine/states/receive_failed.d.ts deleted file mode 100644 index 925a8f857..000000000 --- a/lib/types/event-engine/states/receive_failed.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { State } from '../core/state'; -import { Effects } from '../effects'; -import { Events } from '../events'; -import { PubNubError } from '../../errors/pubnub-error'; -import * as Subscription from '../../core/types/api/subscription'; -export type ReceiveFailedStateContext = { - channels: string[]; - groups: string[]; - cursor: Subscription.SubscriptionCursor; - reason: PubNubError; -}; -export declare const ReceiveFailedState: State; diff --git a/lib/types/event-engine/states/receive_reconnecting.d.ts b/lib/types/event-engine/states/receive_reconnecting.d.ts deleted file mode 100644 index 399e76ada..000000000 --- a/lib/types/event-engine/states/receive_reconnecting.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { PubNubError } from '../../errors/pubnub-error'; -import { State } from '../core/state'; -import { Effects } from '../effects'; -import { Events } from '../events'; -import * as Subscription from '../../core/types/api/subscription'; -export type ReceiveReconnectingStateContext = { - channels: string[]; - groups: string[]; - cursor: Subscription.SubscriptionCursor; - attempts: number; - reason: PubNubError; -}; -export declare const ReceiveReconnectingState: State; diff --git a/lib/types/event-engine/states/receive_stopped.d.ts b/lib/types/event-engine/states/receive_stopped.d.ts deleted file mode 100644 index 85a3986be..000000000 --- a/lib/types/event-engine/states/receive_stopped.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { State } from '../core/state'; -import { Effects } from '../effects'; -import { Events } from '../events'; -import * as Subscription from '../../core/types/api/subscription'; -type ReceiveStoppedStateContext = { - channels: string[]; - groups: string[]; - cursor: Subscription.SubscriptionCursor; -}; -export declare const ReceiveStoppedState: State; -export {}; diff --git a/lib/types/event-engine/states/receiving.d.ts b/lib/types/event-engine/states/receiving.d.ts deleted file mode 100644 index 221353f4f..000000000 --- a/lib/types/event-engine/states/receiving.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { State } from '../core/state'; -import { Effects } from '../effects'; -import { Events } from '../events'; -import * as Subscription from '../../core/types/api/subscription'; -export type ReceivingStateContext = { - channels: string[]; - groups: string[]; - cursor: Subscription.SubscriptionCursor; -}; -export declare const ReceivingState: State; diff --git a/lib/types/event-engine/states/unsubscribed.d.ts b/lib/types/event-engine/states/unsubscribed.d.ts deleted file mode 100644 index ad8a2f25a..000000000 --- a/lib/types/event-engine/states/unsubscribed.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { State } from '../core/state'; -import { Effects } from '../effects'; -import { Events } from '../events'; -export declare const UnsubscribedState: State; diff --git a/lib/types/file/modules/node.d.ts b/lib/types/file/modules/node.d.ts deleted file mode 100644 index 344f76fe5..000000000 --- a/lib/types/file/modules/node.d.ts +++ /dev/null @@ -1,134 +0,0 @@ -/** - * Node.js {@link PubNub} File object module. - */ -/// -/// -import { Readable, PassThrough } from 'stream'; -import { Buffer } from 'buffer'; -import { PubNubFileInterface } from '../../core/types/file'; -/** - * PubNub File instance creation parameters. - */ -export type PubNubFileParameters = { - /** - * Readable stream represents file object content. - */ - stream?: Readable; - /** - * Buffer or string represents file object content. - */ - data?: Buffer | ArrayBuffer | string; - /** - * String {@link PubNubFileParameters#data|data} encoding. - * - * @default `utf8` - */ - encoding?: StringEncoding; - /** - * File object name. - */ - name: string; - /** - * File object content type. - */ - mimeType?: string; -}; -/** - * Node.js implementation for {@link PubNub} File object. - * - * **Important:** Class should implement constructor and class fields from {@link PubNubFileConstructor}. - */ -export default class PubNubFile implements PubNubFileInterface { - /** - * Whether {@link Blob} data supported by platform or not. - */ - static supportsBlob: boolean; - /** - * Whether {@link File} data supported by platform or not. - */ - static supportsFile: boolean; - /** - * Whether {@link Buffer} data supported by platform or not. - */ - static supportsBuffer: boolean; - /** - * Whether {@link Stream} data supported by platform or not. - */ - static supportsStream: boolean; - /** - * Whether {@link String} data supported by platform or not. - */ - static supportsString: boolean; - /** - * Whether {@link ArrayBuffer} supported by platform or not. - */ - static supportsArrayBuffer: boolean; - /** - * Whether {@link PubNub} File object encryption supported or not. - */ - static supportsEncryptFile: boolean; - /** - * Whether `File Uri` data supported by platform or not. - */ - static supportsFileUri: boolean; - /** - * File object content source. - */ - readonly data: Readable | Buffer; - /** - * File object content length. - */ - contentLength?: number; - /** - * File object content type. - */ - mimeType: string; - /** - * File object name. - */ - name: string; - static create(file: PubNubFileParameters): PubNubFile; - constructor(file: PubNubFileParameters); - /** - * Convert {@link PubNub} File object content to {@link Buffer}. - * - * @returns Asynchronous results of conversion to the {@link Buffer}. - */ - toBuffer(): Promise; - /** - * Convert {@link PubNub} File object content to {@link ArrayBuffer}. - * - * @returns Asynchronous results of conversion to the {@link ArrayBuffer}. - */ - toArrayBuffer(): Promise; - /** - * Convert {@link PubNub} File object content to {@link string}. - * - * @returns Asynchronous results of conversion to the {@link string}. - */ - toString(encoding?: BufferEncoding): Promise; - /** - * Convert {@link PubNub} File object content to {@link Readable} stream. - * - * @returns Asynchronous results of conversion to the {@link Readable} stream. - */ - toStream(): Promise; - /** - * Convert {@link PubNub} File object content to {@link File}. - * - * @throws Error because {@link File} not available in Node.js environment. - */ - toFile(): Promise; - /** - * Convert {@link PubNub} File object content to file `Uri`. - * - * @throws Error because file `Uri` not available in Node.js environment. - */ - toFileUri(): Promise>; - /** - * Convert {@link PubNub} File object content to {@link Blob}. - * - * @throws Error because {@link Blob} not available in Node.js environment. - */ - toBlob(): Promise; -} diff --git a/lib/types/file/modules/react-native.d.ts b/lib/types/file/modules/react-native.d.ts deleted file mode 100644 index 51531b6ea..000000000 --- a/lib/types/file/modules/react-native.d.ts +++ /dev/null @@ -1,135 +0,0 @@ -/** - * React Native {@link PubNub} File object module. - */ -import { PubNubFileInterface } from '../../core/types/file'; -/** - * File path-based file. - */ -type FileUri = { - uri: string; - name: string; - mimeType?: string; -}; -/** - * Asynchronously fetched file content. - */ -type ReadableFile = { - arrayBuffer: () => Promise; - blob: () => Promise; - text: () => Promise; -}; -/** - * PubNub File instance creation parameters. - */ -export type PubNubFileParameters = File | FileUri | ReadableFile | { - data: string | Blob | ArrayBuffer | ArrayBufferView; - name: string; - mimeType?: string; -}; -export declare class PubNubFile implements PubNubFileInterface { - /** - * Whether {@link Blob} data supported by platform or not. - */ - static supportsBlob: boolean; - /** - * Whether {@link File} data supported by platform or not. - */ - static supportsFile: boolean; - /** - * Whether {@link Buffer} data supported by platform or not. - */ - static supportsBuffer: boolean; - /** - * Whether {@link Stream} data supported by platform or not. - */ - static supportsStream: boolean; - /** - * Whether {@link String} data supported by platform or not. - */ - static supportsString: boolean; - /** - * Whether {@link ArrayBuffer} supported by platform or not. - */ - static supportsArrayBuffer: boolean; - /** - * Whether {@link PubNub} File object encryption supported or not. - */ - static supportsEncryptFile: boolean; - /** - * Whether `File Uri` data supported by platform or not. - */ - static supportsFileUri: boolean; - /** - * File object content source. - */ - readonly data: File | FileUri | ReadableFile; - /** - * File object content length. - */ - contentLength?: number; - /** - * File object content type. - */ - mimeType: string; - /** - * File object name. - */ - name: string; - static create(file: PubNubFileParameters): PubNubFile; - constructor(file: PubNubFileParameters); - /** - * Convert {@link PubNub} File object content to {@link Buffer}. - * - * @throws Error because {@link Buffer} not available in React Native environment. - */ - toBuffer(): Promise; - /** - * Convert {@link PubNub} File object content to {@link ArrayBuffer}. - * - * @returns Asynchronous results of conversion to the {@link ArrayBuffer}. - * - * @throws Error if provided {@link PubNub} File object content is not supported for this - * operation. - */ - toArrayBuffer(): Promise; - /** - * Convert {@link PubNub} File object content to {@link string}. - * - * @returns Asynchronous results of conversion to the {@link string}. - */ - toString(): Promise; - /** - * Convert {@link PubNub} File object content to {@link Readable} stream. - * - * @throws Error because {@link Readable} stream not available in React Native environment. - */ - toStream(): Promise; - /** - * Convert {@link PubNub} File object content to {@link File}. - * - * @returns Asynchronous results of conversion to the {@link File}. - * - * @throws Error if provided {@link PubNub} File object content is not supported for this - * operation. - */ - toFile(): Promise; - /** - * Convert {@link PubNub} File object content to file `Uri`. - * - * @returns Asynchronous results of conversion to file `Uri`. - * - * @throws Error if provided {@link PubNub} File object content is not supported for this - * operation. - */ - toFileUri(): Promise; - /** - * Convert {@link PubNub} File object content to {@link Blob}. - * - * @returns Asynchronous results of conversion to the {@link Blob}. - * - * @throws Error if provided {@link PubNub} File object content is not supported for this - * operation. - */ - toBlob(): Promise; -} -export default PubNubFile; diff --git a/lib/types/index.d.ts b/lib/types/index.d.ts new file mode 100644 index 000000000..d8439d47a --- /dev/null +++ b/lib/types/index.d.ts @@ -0,0 +1,8115 @@ +import { Readable, PassThrough } from 'stream'; +import { Buffer } from 'buffer'; +import { ProxyAgentOptions } from 'proxy-agent'; + +/** + * PubNub client for Node.js platform. + */ +declare class PubNub extends PubNubCore< + string | ArrayBuffer | Buffer | Readable, + PubNub.PubNubFileParameters, + PubNub.PubNubFile +> { + /** + * Data encryption / decryption module constructor. + */ + static CryptoModule: typeof PubNub.CryptoModuleType; + /** + * PubNub File constructor. + */ + File: PubNub.PubNubFileConstructor; + /** + * Create and configure PubNub client core. + * + * @param configuration - User-provided PubNub client configuration. + * + * @returns Configured and ready to use PubNub client. + */ + constructor(configuration: PubNub.PubNubConfiguration); + /** + * Update request proxy configuration. + * + * @param configuration - Updated request proxy configuration. + * + * @throws An error if {@link PubNub} client already configured to use `keepAlive`. + * `keepAlive` and `proxy` can't be used simultaneously. + */ + setProxy(configuration?: ProxyAgentOptions): void; +} + +/** + * Platform-agnostic PubNub client core. + */ +declare class PubNubCore< + CryptographyTypes, + FileConstructorParameters, + PlatformFile extends Partial = Record, +> { + /** + * Type of REST API endpoint which reported status. + */ + static OPERATIONS: typeof PubNub.RequestOperation; + /** + * API call status category. + */ + static CATEGORIES: typeof PubNub.StatusCategory; + /** + * Exponential retry policy constructor. + */ + static ExponentialRetryPolicy: typeof PubNub.RetryPolicy.ExponentialRetryPolicy; + /** + * Linear retry policy constructor. + */ + static LinearRetryPolicy: typeof PubNub.RetryPolicy.LinearRetryPolicy; + /** + * Construct notification payload which will trigger push notification. + * + * @param title - Title which will be shown on notification. + * @param body - Payload which will be sent as part of notification. + * + * @returns Pre-formatted message payload which will trigger push notification. + */ + static notificationPayload(title: string, body: string): PubNub.NotificationsPayload; + /** + * Generate unique identifier. + * + * @returns Unique identifier. + */ + static generateUUID(): any; + /** + * PubNub client configuration. + * + * @returns Currently user PubNub client configuration. + */ + get configuration(): PubNub.ClientConfiguration; + /** + * Current PubNub client configuration. + * + * @returns Currently user PubNub client configuration. + * + * @deprecated Use {@link configuration} getter instead. + */ + get _config(): PubNub.ClientConfiguration; + /** + * REST API endpoint access authorization key. + * + * It is required to have `authorization key` with required permissions to access REST API + * endpoints when `PAM` enabled for user key set. + */ + get authKey(): string | undefined; + /** + * REST API endpoint access authorization key. + * + * It is required to have `authorization key` with required permissions to access REST API + * endpoints when `PAM` enabled for user key set. + */ + getAuthKey(): string | undefined; + /** + * Change REST API endpoint access authorization key. + * + * @param authKey - New authorization key which should be used with new requests. + */ + setAuthKey(authKey: string): void; + /** + * Get a PubNub client user identifier. + * + * @returns Current PubNub client user identifier. + */ + get userId(): string; + /** + * Change the current PubNub client user identifier. + * + * **Important:** Change won't affect ongoing REST API calls. + * + * @param value - New PubNub client user identifier. + * + * @throws Error empty user identifier has been provided. + */ + set userId(value: string); + /** + * Get a PubNub client user identifier. + * + * @returns Current PubNub client user identifier. + */ + getUserId(): string; + /** + * Change the current PubNub client user identifier. + * + * **Important:** Change won't affect ongoing REST API calls. + * + * @param value - New PubNub client user identifier. + * + * @throws Error empty user identifier has been provided. + */ + setUserId(value: string): void; + /** + * Real-time updates filtering expression. + * + * @returns Filtering expression. + */ + get filterExpression(): string | undefined; + /** + * Real-time updates filtering expression. + * + * @returns Filtering expression. + */ + getFilterExpression(): string | undefined; + /** + * Update real-time updates filtering expression. + * + * @param expression - New expression which should be used or `undefined` to disable filtering. + */ + set filterExpression(expression: string | null | undefined); + /** + * Update real-time updates filtering expression. + * + * @param expression - New expression which should be used or `undefined` to disable filtering. + */ + setFilterExpression(expression: string | null): void; + /** + * Dta encryption / decryption key. + * + * @returns Currently used key for data encryption / decryption. + */ + get cipherKey(): string | undefined; + /** + * Change data encryption / decryption key. + * + * @param key - New key which should be used for data encryption / decryption. + */ + set cipherKey(key: string | undefined); + /** + * Change data encryption / decryption key. + * + * @param key - New key which should be used for data encryption / decryption. + */ + setCipherKey(key: string): void; + /** + * Change heartbeat requests interval. + * + * @param interval - New presence request heartbeat intervals. + */ + set heartbeatInterval(interval: number); + /** + * Change heartbeat requests interval. + * + * @param interval - New presence request heartbeat intervals. + */ + setHeartbeatInterval(interval: number): void; + /** + * Get PubNub SDK version. + * + * @returns Current SDK version. + */ + getVersion(): string; + /** + * Add framework's prefix. + * + * @param name - Name of the framework which would want to add own data into `pnsdk` suffix. + * @param suffix - Suffix with information about framework. + */ + _addPnsdkSuffix(name: string, suffix: string | number): void; + /** + * Get a PubNub client user identifier. + * + * @returns Current PubNub client user identifier. + * + * @deprecated Use the {@link getUserId} or {@link userId} getter instead. + */ + getUUID(): string; + /** + * Change the current PubNub client user identifier. + * + * **Important:** Change won't affect ongoing REST API calls. + * + * @param value - New PubNub client user identifier. + * + * @throws Error empty user identifier has been provided. + * + * @deprecated Use the {@link PubNubCore#setUserId} or {@link PubNubCore#userId} setter instead. + */ + setUUID(value: string): void; + /** + * Custom data encryption method. + * + * @deprecated Instead use {@link cryptoModule} for data encryption. + */ + get customEncrypt(): ((data: string) => string) | undefined; + /** + * Custom data decryption method. + * + * @deprecated Instead use {@link cryptoModule} for data decryption. + */ + get customDecrypt(): ((data: string) => string) | undefined; + /** + * Create a `Channel` entity. + * + * Entity can be used for the interaction with the following API: + * - `subscribe` + * + * @param name - Unique channel name. + * @returns `Channel` entity. + */ + channel(name: string): PubNub.Channel; + /** + * Create a `ChannelGroup` entity. + * + * Entity can be used for the interaction with the following API: + * - `subscribe` + * + * @param name - Unique channel group name. + * @returns `ChannelGroup` entity. + */ + channelGroup(name: string): PubNub.ChannelGroup; + /** + * Create a `ChannelMetadata` entity. + * + * Entity can be used for the interaction with the following API: + * - `subscribe` + * + * @param id - Unique channel metadata object identifier. + * @returns `ChannelMetadata` entity. + */ + channelMetadata(id: string): PubNub.ChannelMetadata; + /** + * Create a `UserMetadata` entity. + * + * Entity can be used for the interaction with the following API: + * - `subscribe` + * + * @param id - Unique user metadata object identifier. + * @returns `UserMetadata` entity. + */ + userMetadata(id: string): PubNub.UserMetadata; + /** + * Create subscriptions set object. + * + * @param parameters - Subscriptions set configuration parameters. + */ + subscriptionSet(parameters: { + channels?: string[]; + channelGroups?: string[]; + subscriptionOptions?: PubNub.SubscriptionOptions; + }): PubNub.SubscriptionSet; + /** + * Unsubscribe from all channels and groups. + * + * @param [isOffline] - Whether `offline` presence should be notified or not. + */ + destroy(isOffline?: boolean): void; + /** + * Unsubscribe from all channels and groups. + * + * @deprecated Use {@link destroy} method instead. + */ + stop(): void; + /** + * Register real-time events listener. + * + * @param listener - Listener with event callbacks to handle different types of events. + */ + addListener(listener: PubNub.Listener): void; + /** + * Remove real-time event listener. + * + * @param listener - Event listeners which should be removed. + */ + removeListener(listener: PubNub.Listener): void; + /** + * Clear all real-time event listeners. + */ + removeAllListeners(): void; + /** + * Publish data to a specific channel. + * + * @param parameters - Request configuration parameters. + * @param callback - Request completion handler callback. + */ + publish( + parameters: PubNub.Publish.PublishParameters, + callback: PubNub.ResultCallback, + ): void; + /** + * Publish data to a specific channel. + * + * @param parameters - Request configuration parameters. + * + * @returns Asynchronous publish data response. + */ + publish(parameters: PubNub.Publish.PublishParameters): Promise; + /** + * Signal data to a specific channel. + * + * @param parameters - Request configuration parameters. + * @param callback - Request completion handler callback. + */ + signal( + parameters: PubNub.Signal.SignalParameters, + callback: PubNub.ResultCallback, + ): void; + /** + * Signal data to a specific channel. + * + * @param parameters - Request configuration parameters. + * + * @returns Asynchronous signal data response. + */ + signal(parameters: PubNub.Signal.SignalParameters): Promise; + /** + * `Fire` a data to a specific channel. + * + * @param parameters - Request configuration parameters. + * @param callback - Request completion handler callback. + * + * @deprecated Use {@link publish} method instead. + */ + fire( + parameters: PubNub.Publish.PublishParameters, + callback: PubNub.ResultCallback, + ): void; + /** + * `Fire` a data to a specific channel. + * + * @param parameters - Request configuration parameters. + * + * @returns Asynchronous signal data response. + * + * @deprecated Use {@link publish} method instead. + */ + fire(parameters: PubNub.Publish.PublishParameters): Promise; + /** + * Get list of channels on which PubNub client currently subscribed. + * + * @returns List of active channels. + */ + getSubscribedChannels(): string[]; + /** + * Get list of channel groups on which PubNub client currently subscribed. + * + * @returns List of active channel groups. + */ + getSubscribedChannelGroups(): string[]; + /** + * Subscribe to specified channels and groups real-time events. + * + * @param parameters - Request configuration parameters. + */ + subscribe(parameters: PubNub.Subscription.SubscribeParameters): void; + /** + * Unsubscribe from specified channels and groups real-time events. + * + * @param parameters - Request configuration parameters. + */ + unsubscribe(parameters: PubNub.Presence.PresenceLeaveParameters): void; + /** + * Unsubscribe from all channels and groups. + */ + unsubscribeAll(): void; + /** + * Temporarily disconnect from real-time events stream. + */ + disconnect(): void; + /** + * Restore connection to the real-time events stream. + * + * @param parameters - Reconnection catch up configuration. **Note:** available only with + * enabled event engine. + */ + reconnect(parameters?: { timetoken?: string; region?: number }): void; + /** + * Get reactions to a specific message. + * + * @param parameters - Request configuration parameters. + * @param callback - Request completion handler callback. + */ + getMessageActions( + parameters: PubNub.MessageAction.GetMessageActionsParameters, + callback: PubNub.ResultCallback, + ): void; + /** + * Get reactions to a specific message. + * + * @param parameters - Request configuration parameters. + * + * @returns Asynchronous get reactions response. + */ + getMessageActions( + parameters: PubNub.MessageAction.GetMessageActionsParameters, + ): Promise; + /** + * Add a reaction to a specific message. + * + * @param parameters - Request configuration parameters. + * @param callback - Request completion handler callback. + */ + addMessageAction( + parameters: PubNub.MessageAction.AddMessageActionParameters, + callback: PubNub.ResultCallback, + ): void; + /** + * Add a reaction to a specific message. + * + * @param parameters - Request configuration parameters. + * + * @returns Asynchronous add a reaction response. + */ + addMessageAction( + parameters: PubNub.MessageAction.AddMessageActionParameters, + ): Promise; + /** + * Remove a reaction from a specific message. + * + * @param parameters - Request configuration parameters. + * @param callback - Request completion handler callback. + */ + removeMessageAction( + parameters: PubNub.MessageAction.RemoveMessageActionParameters, + callback: PubNub.ResultCallback, + ): void; + /** + * Remove a reaction from a specific message. + * + * @param parameters - Request configuration parameters. + * + * @returns Asynchronous remove a reaction response. + */ + removeMessageAction( + parameters: PubNub.MessageAction.RemoveMessageActionParameters, + ): Promise; + /** + * Fetch messages history for channels. + * + * @param parameters - Request configuration parameters. + * @param callback - Request completion handler callback. + */ + fetchMessages( + parameters: PubNub.History.FetchMessagesParameters, + callback: PubNub.ResultCallback, + ): void; + /** + * Fetch messages history for channels. + * + * @param parameters - Request configuration parameters. + * + * @returns Asynchronous fetch messages response. + */ + fetchMessages(parameters: PubNub.History.FetchMessagesParameters): Promise; + /** + * Delete messages from the channel history. + * + * @param parameters - Request configuration parameters. + * @param callback - Request completion handler callback. + * + * @deprecated + */ + deleteMessages( + parameters: PubNub.History.DeleteMessagesParameters, + callback: PubNub.ResultCallback, + ): void; + /** + * Delete messages from the channel history. + * + * @param parameters - Request configuration parameters. + * + * @returns Asynchronous delete messages response. + * + * @deprecated + */ + deleteMessages(parameters: PubNub.History.DeleteMessagesParameters): Promise; + /** + * Count messages from the channels' history. + * + * @param parameters - Request configuration parameters. + * @param callback - Request completion handler callback. + */ + messageCounts( + parameters: PubNub.History.MessageCountParameters, + callback: PubNub.ResultCallback, + ): void; + /** + * Count messages from the channels' history. + * + * @param parameters - Request configuration parameters. + * + * @returns Asynchronous count messages response. + */ + messageCounts(parameters: PubNub.History.MessageCountParameters): Promise; + /** + * Fetch single channel history. + * + * @param parameters - Request configuration parameters. + * @param callback - Request completion handler callback. + * + * @deprecated + */ + history( + parameters: PubNub.History.GetHistoryParameters, + callback: PubNub.ResultCallback, + ): void; + /** + * Fetch single channel history. + * + * @param parameters - Request configuration parameters. + * + * @returns Asynchronous fetch channel history response. + * + * @deprecated + */ + history(parameters: PubNub.History.GetHistoryParameters): Promise; + /** + * Get channel's presence information. + * + * @param parameters - Request configuration parameters. + * @param callback - Request completion handler callback. + */ + hereNow( + parameters: PubNub.Presence.HereNowParameters, + callback: PubNub.ResultCallback, + ): void; + /** + * Get channel presence information. + * + * @param parameters - Request configuration parameters. + * + * @returns Asynchronous get channel's presence response. + */ + hereNow(parameters: PubNub.Presence.HereNowParameters): Promise; + /** + * Get user's presence information. + * + * Get list of channels to which `uuid` currently subscribed. + * + * @param parameters - Request configuration parameters. + * @param callback - Request completion handler callback. + */ + whereNow( + parameters: PubNub.Presence.WhereNowParameters, + callback: PubNub.ResultCallback, + ): void; + /** + * Get user's presence information. + * + * Get list of channels to which `uuid` currently subscribed. + * + * @param parameters - Request configuration parameters. + * + * @returns Asynchronous get user's presence response. + */ + whereNow(parameters: PubNub.Presence.WhereNowParameters): Promise; + /** + * Get associated user's data for channels and groups. + * + * @param parameters - Request configuration parameters. + * @param callback - Request completion handler callback. + */ + getState( + parameters: PubNub.Presence.GetPresenceStateParameters, + callback: PubNub.ResultCallback, + ): void; + /** + * Get associated user's data for channels and groups. + * + * @param parameters - Request configuration parameters. + * + * @returns Asynchronous get associated user's data response. + */ + getState(parameters: PubNub.Presence.GetPresenceStateParameters): Promise; + /** + * Set associated user's data for channels and groups. + * + * @param parameters - Request configuration parameters. + * @param callback - Request completion handler callback. + */ + setState( + parameters: PubNub.Presence.SetPresenceStateParameters | PubNub.Presence.SetPresenceStateWithHeartbeatParameters, + callback: PubNub.ResultCallback< + PubNub.Presence.SetPresenceStateResponse | PubNub.Presence.PresenceHeartbeatResponse + >, + ): void; + /** + * Set associated user's data for channels and groups. + * + * @param parameters - Request configuration parameters. + * + * @returns Asynchronous set associated user's data response. + */ + setState( + parameters: PubNub.Presence.SetPresenceStateParameters | PubNub.Presence.SetPresenceStateWithHeartbeatParameters, + ): Promise; + /** + * Manual presence management. + * + * @param parameters - Desired presence state for provided list of channels and groups. + */ + presence(parameters: { connected: boolean; channels?: string[]; channelGroups?: string[] }): void; + /** + * Grant token permission. + * + * Generate access token with requested permissions. + * + * @param parameters - Request configuration parameters. + * @param callback - Request completion handler callback. + */ + grantToken( + parameters: PubNub.PAM.GrantTokenParameters, + callback: PubNub.ResultCallback, + ): void; + /** + * Grant token permission. + * + * Generate access token with requested permissions. + * + * @param parameters - Request configuration parameters. + * + * @returns Asynchronous grant token response. + */ + grantToken(parameters: PubNub.PAM.GrantTokenParameters): Promise; + /** + * Revoke token permission. + * + * @param token - Access token for which permissions should be revoked. + * @param callback - Request completion handler callback. + */ + revokeToken( + token: PubNub.PAM.RevokeParameters, + callback: PubNub.ResultCallback, + ): void; + /** + * Revoke token permission. + * + * @param token - Access token for which permissions should be revoked. + * + * @returns Asynchronous revoke token response. + */ + revokeToken(token: PubNub.PAM.RevokeParameters): Promise; + /** + * Get current access token. + * + * @returns Previously configured access token using {@link setToken} method. + */ + get token(): string | undefined; + /** + * Get current access token. + * + * @returns Previously configured access token using {@link setToken} method. + */ + getToken(): string | undefined; + /** + * Set current access token. + * + * @param token - New access token which should be used with next REST API endpoint calls. + */ + set token(token: string | undefined); + /** + * Set current access token. + * + * @param token - New access token which should be used with next REST API endpoint calls. + */ + setToken(token: string | undefined): void; + /** + * Parse access token. + * + * Parse token to see what permissions token owner has. + * + * @param token - Token which should be parsed. + * + * @returns Token's permissions information for the resources. + */ + parseToken(token: string): PubNub.PAM.Token | undefined; + /** + * Grant auth key(s) permission. + * + * @param parameters - Request configuration parameters. + * @param callback - Request completion handler callback. + * + * @deprecated Use {@link grantToken} and {@link setToken} methods instead. + */ + grant(parameters: PubNub.PAM.GrantParameters, callback: PubNub.ResultCallback): void; + /** + * Grant auth key(s) permission. + * + * @param parameters - Request configuration parameters. + * + * @returns Asynchronous grant auth key(s) permissions response. + * + * @deprecated Use {@link grantToken} and {@link setToken} methods instead. + */ + grant(parameters: PubNub.PAM.GrantParameters): Promise; + /** + * Audit auth key(s) permission. + * + * @param parameters - Request configuration parameters. + * @param callback - Request completion handler callback. + * + * @deprecated + */ + audit(parameters: PubNub.PAM.AuditParameters, callback: PubNub.ResultCallback): void; + /** + * Audit auth key(s) permission. + * + * @param parameters - Request configuration parameters. + * + * @returns Asynchronous audit auth key(s) permissions response. + * + * @deprecated + */ + audit(parameters: PubNub.PAM.AuditParameters): Promise; + /** + * PubNub App Context API group. + */ + get objects(): PubNub.PubNubObjects; + /** + * Fetch a paginated list of User objects. + * + * @param callback - Request completion handler callback. + * + * @deprecated Use {@link PubNubCore#objects.getAllUUIDMetadata} method instead. + */ + fetchUsers( + callback: PubNub.ResultCallback>, + ): void; + /** + * Fetch a paginated list of User objects. + * + * @param parameters - Request configuration parameters. + * @param callback - Request completion handler callback. + * + * @deprecated Use {@link PubNubCore#objects.getAllUUIDMetadata} method instead. + */ + fetchUsers( + parameters: PubNub.AppContext.GetAllMetadataParameters>, + callback: PubNub.ResultCallback>, + ): void; + /** + * Fetch a paginated list of User objects. + * + * @param [parameters] - Request configuration parameters. + * + * @returns Asynchronous get all User objects response. + * + * @deprecated Use {@link PubNubCore#objects.getAllUUIDMetadata} method instead. + */ + fetchUsers( + parameters?: PubNub.AppContext.GetAllMetadataParameters>, + ): Promise>; + /** + * Fetch User object for currently configured PubNub client `uuid`. + * + * @param callback - Request completion handler callback. + * + * @deprecated Use {@link PubNubCore#objects.getUUIDMetadata} method instead. + */ + fetchUser( + callback: PubNub.ResultCallback>, + ): void; + /** + * Fetch User object for currently configured PubNub client `uuid`. + * + * @param parameters - Request configuration parameters. Will fetch User object for currently + * configured PubNub client `uuid` if not set. + * @param callback - Request completion handler callback. + * + * @deprecated Use {@link PubNubCore#objects.getUUIDMetadata} method instead. + */ + fetchUser( + parameters: PubNub.AppContext.GetUUIDMetadataParameters, + callback: PubNub.ResultCallback>, + ): void; + /** + * Fetch User object for currently configured PubNub client `uuid`. + * + * @param [parameters] - Request configuration parameters. Will fetch User object for currently + * configured PubNub client `uuid` if not set. + * + * @returns Asynchronous get User object response. + * + * @deprecated Use {@link PubNubCore#objects.getUUIDMetadata} method instead. + */ + fetchUser( + parameters?: PubNub.AppContext.GetUUIDMetadataParameters, + ): Promise>; + /** + * Create User object. + * + * @param parameters - Request configuration parameters. Will create User object for currently + * configured PubNub client `uuid` if not set. + * @param callback - Request completion handler callback. + * + * @deprecated Use {@link PubNubCore#objects.setUUIDMetadata} method instead. + */ + createUser( + parameters: PubNub.AppContext.SetUUIDMetadataParameters, + callback: PubNub.ResultCallback>, + ): void; + /** + * Create User object. + * + * @param parameters - Request configuration parameters. Will create User object for currently + * configured PubNub client `uuid` if not set. + * + * @returns Asynchronous create User object response. + * + * @deprecated Use {@link PubNubCore#objects.setUUIDMetadata} method instead. + */ + createUser( + parameters: PubNub.AppContext.SetUUIDMetadataParameters, + ): Promise>; + /** + * Update User object. + * + * @param parameters - Request configuration parameters. Will update User object for currently + * configured PubNub client `uuid` if not set. + * @param callback - Request completion handler callback. + * + * @deprecated Use {@link PubNubCore#objects.setUUIDMetadata} method instead. + */ + updateUser( + parameters: PubNub.AppContext.SetUUIDMetadataParameters, + callback: PubNub.ResultCallback>, + ): void; + /** + * Update User object. + * + * @param parameters - Request configuration parameters. Will update User object for currently + * configured PubNub client `uuid` if not set. + * + * @returns Asynchronous update User object response. + * + * @deprecated Use {@link PubNubCore#objects.setUUIDMetadata} method instead. + */ + updateUser( + parameters: PubNub.AppContext.SetUUIDMetadataParameters, + ): Promise>; + /** + * Remove a specific User object. + * + * @param callback - Request completion handler callback. Will remove User object for currently + * configured PubNub client `uuid` if not set. + * + * @deprecated Use {@link PubNubCore#objects.removeUUIDMetadata} method instead. + */ + removeUser(callback: PubNub.ResultCallback): void; + /** + * Remove a specific User object. + * + * @param parameters - Request configuration parameters. Will remove User object for currently + * configured PubNub client `uuid` if not set. + * @param callback - Request completion handler callback. + * + * @deprecated Use {@link PubNubCore#objects.removeUUIDMetadata} method instead. + */ + removeUser( + parameters: PubNub.AppContext.RemoveUUIDMetadataParameters, + callback: PubNub.ResultCallback, + ): void; + /** + * Remove a specific User object. + * + * @param [parameters] - Request configuration parameters. Will remove User object for currently + * configured PubNub client `uuid` if not set. + * + * @returns Asynchronous User object remove response. + * + * @deprecated Use {@link PubNubCore#objects.removeUUIDMetadata} method instead. + */ + removeUser( + parameters?: PubNub.AppContext.RemoveUUIDMetadataParameters, + ): Promise; + /** + * Fetch a paginated list of Space objects. + * + * @param callback - Request completion handler callback. + * + * @deprecated Use {@link PubNubCore#objects.getAllChannelMetadata} method instead. + */ + fetchSpaces( + callback: PubNub.ResultCallback>, + ): void; + /** + * Fetch a paginated list of Space objects. + * + * @param parameters - Request configuration parameters. + * @param callback - Request completion handler callback. + * + * @deprecated Use {@link PubNubCore#objects.getAllChannelMetadata} method instead. + */ + fetchSpaces( + parameters: PubNub.AppContext.GetAllMetadataParameters>, + callback: PubNub.ResultCallback>, + ): void; + /** + * Fetch a paginated list of Space objects. + * + * @param [parameters] - Request configuration parameters. + * + * @returns Asynchronous get all Space objects response. + * + * @deprecated Use {@link PubNubCore#objects.getAllChannelMetadata} method instead. + */ + fetchSpaces( + parameters?: PubNub.AppContext.GetAllMetadataParameters>, + ): Promise>; + /** + * Fetch a specific Space object. + * + * @param parameters - Request configuration parameters. + * @param callback - Request completion handler callback. + * + * @deprecated Use {@link PubNubCore#objects.getChannelMetadata} method instead. + */ + fetchSpace( + parameters: PubNub.AppContext.GetChannelMetadataParameters, + callback: PubNub.ResultCallback>, + ): void; + /** + * Fetch a specific Space object. + * + * @param parameters - Request configuration parameters. + * + * @returns Asynchronous get Channel metadata response. + * + * @deprecated Use {@link PubNubCore#objects.getChannelMetadata} method instead. + */ + fetchSpace( + parameters: PubNub.AppContext.GetChannelMetadataParameters, + ): Promise>; + /** + * Create specific Space object. + * + * @param parameters - Request configuration parameters. + * @param callback - Request completion handler callback. + * + * @deprecated Use {@link PubNubCore#objects.setChannelMetadata} method instead. + */ + createSpace( + parameters: PubNub.AppContext.SetChannelMetadataParameters, + callback: PubNub.ResultCallback>, + ): void; + /** + * Create specific Space object. + * + * @param parameters - Request configuration parameters. + * + * @returns Asynchronous create Space object response. + * + * @deprecated Use {@link PubNubCore#objects.setChannelMetadata} method instead. + */ + createSpace( + parameters: PubNub.AppContext.SetChannelMetadataParameters, + ): Promise>; + /** + * Update specific Space object. + * + * @param parameters - Request configuration parameters. + * @param callback - Request completion handler callback. + * + * @deprecated Use {@link PubNubCore#objects.setChannelMetadata} method instead. + */ + updateSpace( + parameters: PubNub.AppContext.SetChannelMetadataParameters, + callback: PubNub.ResultCallback>, + ): void; + /** + * Update specific Space object. + * + * @param parameters - Request configuration parameters. + * + * @returns Asynchronous update Space object response. + * + * @deprecated Use {@link PubNubCore#objects.setChannelMetadata} method instead. + */ + updateSpace( + parameters: PubNub.AppContext.SetChannelMetadataParameters, + ): Promise>; + /** + * Remove Space object. + * + * @param parameters - Request configuration parameters. + * @param callback - Request completion handler callback. + * + * @deprecated Use {@link PubNubCore#objects.removeChannelMetadata} method instead. + */ + removeSpace( + parameters: PubNub.AppContext.RemoveChannelMetadataParameters, + callback: PubNub.ResultCallback, + ): void; + /** + * Remove a specific Space object. + * + * @param parameters - Request configuration parameters. + * + * @returns Asynchronous Space object remove response. + * + * @deprecated Use {@link PubNubCore#objects.removeChannelMetadata} method instead. + */ + removeSpace( + parameters: PubNub.AppContext.RemoveChannelMetadataParameters, + ): Promise; + /** + * Fetch paginated list of specific Space members or specific User memberships. + * + * @param parameters - Request configuration parameters. + * @param callback - Request completion handler callback. + * + * @deprecated Use {@link PubNubCore#objects.getChannelMembers} or {@link PubNubCore#objects.getMemberships} + * methods instead. + */ + fetchMemberships< + RelationCustom extends PubNub.AppContext.CustomData = PubNub.AppContext.CustomData, + MetadataCustom extends PubNub.AppContext.CustomData = PubNub.AppContext.CustomData, + >( + parameters: PubNub.AppContext.GetMembershipsParameters | PubNub.AppContext.GetMembersParameters, + callback: PubNub.ResultCallback< + | PubNub.AppContext.SpaceMembershipsResponse + | PubNub.AppContext.UserMembersResponse + >, + ): void; + /** + * Fetch paginated list of specific Space members or specific User memberships. + * + * @param parameters - Request configuration parameters. + * + * @returns Asynchronous get specific Space members or specific User memberships response. + * + * @deprecated Use {@link PubNubCore#objects.getChannelMembers} or {@link PubNubCore#objects.getMemberships} + * methods instead. + */ + fetchMemberships< + RelationCustom extends PubNub.AppContext.CustomData = PubNub.AppContext.CustomData, + MetadataCustom extends PubNub.AppContext.CustomData = PubNub.AppContext.CustomData, + >( + parameters: PubNub.AppContext.GetMembershipsParameters | PubNub.AppContext.GetMembersParameters, + ): Promise< + | PubNub.AppContext.SpaceMembershipsResponse + | PubNub.AppContext.UserMembersResponse + >; + /** + * Add members to specific Space or memberships specific User. + * + * @param parameters - Request configuration parameters. + * @param callback - Request completion handler callback. + * + * @deprecated Use {@link PubNubCore#objects.setChannelMembers} or {@link PubNubCore#objects.setMemberships} + * methods instead. + */ + addMemberships< + Custom extends PubNub.AppContext.CustomData = PubNub.AppContext.CustomData, + MetadataCustom extends PubNub.AppContext.CustomData = PubNub.AppContext.CustomData, + >( + parameters: + | PubNub.AppContext.SetMembershipsParameters + | PubNub.AppContext.SetChannelMembersParameters, + callback: PubNub.ResultCallback< + | PubNub.AppContext.SetMembershipsResponse + | PubNub.AppContext.SetMembersResponse + >, + ): void; + /** + * Add members to specific Space or memberships specific User. + * + * @param parameters - Request configuration parameters. + * + * @returns Asynchronous add members to specific Space or memberships specific User response. + * + * @deprecated Use {@link PubNubCore#objects.setChannelMembers} or {@link PubNubCore#objects.setMemberships} + * methods instead. + */ + addMemberships< + Custom extends PubNub.AppContext.CustomData = PubNub.AppContext.CustomData, + MetadataCustom extends PubNub.AppContext.CustomData = PubNub.AppContext.CustomData, + >( + parameters: + | PubNub.AppContext.SetMembershipsParameters + | PubNub.AppContext.SetChannelMembersParameters, + ): Promise< + | PubNub.AppContext.SetMembershipsResponse + | PubNub.AppContext.SetMembersResponse + >; + /** + * Update specific Space members or User memberships. + * + * @param parameters - Request configuration parameters. + * @param callback - Request completion handler callback. + * + * @deprecated Use {@link PubNubCore#objects.setChannelMembers} or {@link PubNubCore#objects.setMemberships} + * methods instead. + */ + updateMemberships< + Custom extends PubNub.AppContext.CustomData = PubNub.AppContext.CustomData, + MetadataCustom extends PubNub.AppContext.CustomData = PubNub.AppContext.CustomData, + >( + parameters: + | PubNub.AppContext.SetMembershipsParameters + | PubNub.AppContext.SetChannelMembersParameters, + callback: PubNub.ResultCallback< + | PubNub.AppContext.SetMembershipsResponse + | PubNub.AppContext.SetMembersResponse + >, + ): void; + /** + * Update specific Space members or User memberships. + * + * @param parameters - Request configuration parameters. + * + * @returns Asynchronous update Space members or User memberships response. + * + * @deprecated Use {@link PubNubCore#objects.setChannelMembers} or {@link PubNubCore#objects.setMemberships} + * methods instead. + */ + updateMemberships< + Custom extends PubNub.AppContext.CustomData = PubNub.AppContext.CustomData, + MetadataCustom extends PubNub.AppContext.CustomData = PubNub.AppContext.CustomData, + >( + parameters: + | PubNub.AppContext.SetMembershipsParameters + | PubNub.AppContext.SetChannelMembersParameters, + ): Promise< + | PubNub.AppContext.SetMembershipsResponse + | PubNub.AppContext.SetMembersResponse + >; + /** + * Remove User membership. + * + * @param parameters - Request configuration parameters. + * @param callback - Request completion handler callback. + * + * @deprecated Use {@link PubNubCore#objects.removeMemberships} or {@link PubNubCore#objects.removeChannelMembers} + * methods instead from `objects` API group. + */ + removeMemberships< + RelationCustom extends PubNub.AppContext.CustomData = PubNub.AppContext.CustomData, + MetadataCustom extends PubNub.AppContext.CustomData = PubNub.AppContext.CustomData, + >( + parameters: PubNub.AppContext.RemoveMembersParameters | PubNub.AppContext.RemoveMembershipsParameters, + callback: PubNub.ResultCallback< + | PubNub.AppContext.RemoveMembersResponse + | PubNub.AppContext.RemoveMembershipsResponse + >, + ): void; + /** + * Remove User membership. + * + * @param parameters - Request configuration parameters. + * + * @returns Asynchronous memberships modification response. + * + * @deprecated Use {@link PubNubCore#objects.removeMemberships} or {@link PubNubCore#objects.removeChannelMembers} + * methods instead from `objects` API group. + */ + removeMemberships< + RelationCustom extends PubNub.AppContext.CustomData = PubNub.AppContext.CustomData, + MetadataCustom extends PubNub.AppContext.CustomData = PubNub.AppContext.CustomData, + >( + parameters: PubNub.AppContext.RemoveMembersParameters | PubNub.AppContext.RemoveMembershipsParameters, + ): Promise>; + /** + * PubNub Channel Groups API group. + */ + get channelGroups(): PubNub.PubNubChannelGroups; + /** + * PubNub Push Notifications API group. + */ + get push(): PubNub.PubNubPushNotifications; + /** + * Share file to a specific channel. + * + * @param parameters - Request configuration parameters. + * @param callback - Request completion handler callback. + */ + sendFile( + parameters: PubNub.FileSharing.SendFileParameters, + callback: PubNub.ResultCallback, + ): void; + /** + * Share file to a specific channel. + * + * @param parameters - Request configuration parameters. + * + * @returns Asynchronous file sharing response. + */ + sendFile( + parameters: PubNub.FileSharing.SendFileParameters, + ): Promise; + /** + * Publish file message to a specific channel. + * + * @param parameters - Request configuration parameters. + * @param callback - Request completion handler callback. + */ + publishFile( + parameters: PubNub.FileSharing.PublishFileMessageParameters, + callback: PubNub.ResultCallback, + ): void; + /** + * Publish file message to a specific channel. + * + * @param parameters - Request configuration parameters. + * + * @returns Asynchronous publish file message response. + */ + publishFile( + parameters: PubNub.FileSharing.PublishFileMessageParameters, + ): Promise; + /** + * Retrieve list of shared files in specific channel. + * + * @param parameters - Request configuration parameters. + * @param callback - Request completion handler callback. + */ + listFiles( + parameters: PubNub.FileSharing.ListFilesParameters, + callback: PubNub.ResultCallback, + ): void; + /** + * Retrieve list of shared files in specific channel. + * + * @param parameters - Request configuration parameters. + * + * @returns Asynchronous shared files list response. + */ + listFiles(parameters: PubNub.FileSharing.ListFilesParameters): Promise; + /** + * Get file download Url. + * + * @param parameters - Request configuration parameters. + * + * @returns File download Url. + */ + getFileUrl(parameters: PubNub.FileSharing.FileUrlParameters): PubNub.FileSharing.FileUrlResponse; + /** + * Download shared file from specific channel. + * + * @param parameters - Request configuration parameters. + * @param callback - Request completion handler callback. + */ + downloadFile( + parameters: PubNub.FileSharing.DownloadFileParameters, + callback: PubNub.ResultCallback, + ): void; + /** + * Download shared file from specific channel. + * + * @param parameters - Request configuration parameters. + * + * @returns Asynchronous download shared file response. + */ + downloadFile(parameters: PubNub.FileSharing.DownloadFileParameters): Promise; + /** + * Delete shared file from specific channel. + * + * @param parameters - Request configuration parameters. + * @param callback - Request completion handler callback. + */ + deleteFile( + parameters: PubNub.FileSharing.DeleteFileParameters, + callback: PubNub.ResultCallback, + ): void; + /** + * Delete shared file from specific channel. + * + * @param parameters - Request configuration parameters. + * + * @returns Asynchronous delete shared file response. + */ + deleteFile(parameters: PubNub.FileSharing.DeleteFileParameters): Promise; + /** + Get current high-precision timetoken. + * + * @param callback - Request completion handler callback. + */ + time(callback: PubNub.ResultCallback): void; + /** + * Get current high-precision timetoken. + * + * @returns Asynchronous get current timetoken response. + */ + time(): Promise; + /** + * Encrypt data. + * + * @param data - Stringified data which should be encrypted using `CryptoModule`. + * @deprecated + * @param [customCipherKey] - Cipher key which should be used to encrypt data. **Deprecated:** + * use {@link Configuration#cryptoModule|cryptoModule} instead. + * + * @returns Data encryption result as a string. + */ + encrypt(data: string | PubNub.Payload, customCipherKey?: string): string; + /** + * Decrypt data. + * + * @param data - Stringified data which should be encrypted using `CryptoModule`. + * @param [customCipherKey] - Cipher key which should be used to decrypt data. **Deprecated:** + * use {@link Configuration#cryptoModule|cryptoModule} instead. + * + * @returns Data decryption result as an object. + */ + decrypt(data: string, customCipherKey?: string): PubNub.Payload | null; + /** + * Encrypt file content. + * + * @param file - File which should be encrypted using `CryptoModule`. + * + * @returns Asynchronous file encryption result. + * + * @throws Error if source file not provided. + * @throws File constructor not provided. + * @throws Crypto module is missing (if non-legacy flow used). + */ + encryptFile(file: PubNub.PubNubFileInterface): Promise; + /** + * Encrypt file content. + * + * @param key - Cipher key which should be used to encrypt data. + * @param file - File which should be encrypted using legacy cryptography. + * + * @returns Asynchronous file encryption result. + * + * @throws Error if source file not provided. + * @throws File constructor not provided. + * @throws Crypto module is missing (if non-legacy flow used). + */ + encryptFile(key: string, file: PubNub.PubNubFileInterface): Promise; + /** + * Decrypt file content. + * + * @param file - File which should be decrypted using legacy cryptography. + * + * @returns Asynchronous file decryption result. + * + * @throws Error if source file not provided. + * @throws File constructor not provided. + * @throws Crypto module is missing (if non-legacy flow used). + */ + decryptFile(file: PubNub.PubNubFileInterface): Promise; + /** + * Decrypt file content. + * + * @param key - Cipher key which should be used to decrypt data. + * @param [file] - File which should be decrypted using legacy cryptography. + * + * @returns Asynchronous file decryption result. + * + * @throws Error if source file not provided. + * @throws File constructor not provided. + * @throws Crypto module is missing (if non-legacy flow used). + */ + decryptFile( + key: string | PubNub.PubNubFileInterface, + file?: PubNub.PubNubFileInterface, + ): Promise; +} + +declare namespace PubNub { + /** + * Crypto module cryptors interface. + */ + type CryptorType = ICryptor | ILegacyCryptor; + + /** + * CryptoModule for Node.js platform. + */ + export class NodeCryptoModule extends AbstractCryptoModule { + /** + * {@link LegacyCryptor|Legacy} cryptor identifier. + */ + static LEGACY_IDENTIFIER: string; + static legacyCryptoModule(config: CryptorConfiguration): NodeCryptoModule; + static aesCbcCryptoModule(config: CryptorConfiguration): NodeCryptoModule; + /** + * Construct crypto module with `cryptor` as default for data encryption and decryption. + * + * @param defaultCryptor - Default cryptor for data encryption and decryption. + * + * @returns Crypto module with pre-configured default cryptor. + */ + static withDefaultCryptor(defaultCryptor: CryptorType): NodeCryptoModule; + encrypt(data: ArrayBuffer | string): string | ArrayBuffer; + encryptFile( + file: PubNubFile, + File: PubNubFileConstructor, + ): Promise; + decrypt(data: ArrayBuffer | string): ArrayBuffer | Payload | null; + decryptFile( + file: PubNubFile, + File: PubNubFileConstructor, + ): Promise; + } + + /** Re-export aliased type. */ + export { NodeCryptoModule as CryptoModuleType }; + + /** + * Crypto module configuration. + */ + export type CryptoModuleConfiguration = { + default: C; + cryptors?: C[]; + }; + + export type CryptorConfiguration = { + /** + * Data encryption / decryption key. + */ + cipherKey?: string; + /** + * Request sign secret key. + */ + secretKey?: string; + /** + * Whether random initialization vector should be used or not. + * + * @default `true` + */ + useRandomIVs?: boolean; + /** + * Custom data encryption method. + * + * @deprecated Instead use {@link cryptoModule} for data encryption. + */ + customEncrypt?: (data: string | Payload) => string; + /** + * Custom data decryption method. + * + * @deprecated Instead use {@link cryptoModule} for data decryption. + */ + customDecrypt?: (data: string) => string; + }; + + /** + * Base crypto module interface. + */ + export interface ICryptoModule { + /** + * Encrypt data. + * + * @param data - Data which should be encrypted using `CryptoModule`. + * + * @returns Data encryption result. + */ + encrypt(data: ArrayBuffer | string): ArrayBuffer | string; + /** + * Encrypt file object. + * + * @param file - File object with data for encryption. + * @param File - File object constructor to create instance for encrypted data representation. + * + * @returns Asynchronous file encryption result. + */ + encryptFile( + file: PubNubFileInterface, + File: PubNubFileConstructor, + ): Promise; + /** + * Encrypt data. + * + * @param data - Dta which should be encrypted using `CryptoModule`. + * + * @returns Data decryption result. + */ + decrypt(data: ArrayBuffer | string): ArrayBuffer | Payload | null; + /** + * Decrypt file object. + * + * @param file - Encrypted file object with data for decryption. + * @param File - File object constructor to create instance for decrypted data representation. + * + * @returns Asynchronous file decryption result. + */ + decryptFile( + file: PubNubFileInterface, + File: PubNubFileConstructor, + ): Promise; + } + + export abstract class AbstractCryptoModule implements ICryptoModule { + defaultCryptor: C; + cryptors: C[]; + /** + * Construct crypto module with legacy cryptor for encryption and both legacy and AES-CBC + * cryptors for decryption. + * + * @param config Cryptors configuration options. + * + * @returns Crypto module which encrypts data using legacy cryptor. + * + * @throws Error if `config.cipherKey` not set. + */ + static legacyCryptoModule(config: CryptorConfiguration): ICryptoModule; + /** + * Construct crypto module with AES-CBC cryptor for encryption and both AES-CBC and legacy + * cryptors for decryption. + * + * @param config Cryptors configuration options. + * + * @returns Crypto module which encrypts data using AES-CBC cryptor. + * + * @throws Error if `config.cipherKey` not set. + */ + static aesCbcCryptoModule(config: CryptorConfiguration): ICryptoModule; + constructor(configuration: CryptoModuleConfiguration); + /** + * Encrypt data. + * + * @param data - Data which should be encrypted using {@link ICryptoModule}. + * + * @returns Data encryption result. + */ + abstract encrypt(data: ArrayBuffer | string): ArrayBuffer | string; + /** + * Encrypt file object. + * + * @param file - File object with data for encryption. + * @param File - File object constructor to create instance for encrypted data representation. + * + * @returns Asynchronous file encryption result. + */ + abstract encryptFile( + file: PubNubFileInterface, + File: PubNubFileConstructor, + ): Promise; + /** + * Encrypt data. + * + * @param data - Dta which should be encrypted using `ICryptoModule`. + * + * @returns Data decryption result. + */ + abstract decrypt(data: ArrayBuffer | string): ArrayBuffer | Payload | null; + /** + * Decrypt file object. + * + * @param file - Encrypted file object with data for decryption. + * @param File - File object constructor to create instance for decrypted data representation. + * + * @returns Asynchronous file decryption result. + */ + abstract decryptFile( + file: PubNubFileInterface, + File: PubNubFileConstructor, + ): Promise; + } + + /** + * Base file constructor parameters. + * + * Minimum set of parameters which can be p + */ + export type PubNubBasicFileParameters = { + data: string | ArrayBuffer; + name: string; + mimeType?: string; + }; + + /** + * Platform-agnostic {@link PubNub} File object. + * + * Interface describes share of {@link PubNub} File which is required by {@link PubNub} core to + * perform required actions. + */ + export interface PubNubFileInterface { + /** + * Actual file name. + */ + name: string; + /** + * File mime-type. + */ + mimeType?: string; + /** + * File content length. + */ + contentLength?: number; + /** + * Convert {@link PubNub} file object content to {@link ArrayBuffer}. + * + * @returns Asynchronous results of conversion to the {@link ArrayBuffer}. + * + * @throws Error if provided {@link PubNub} File object content is not supported for this + * operation. + */ + toArrayBuffer(): Promise; + /** + * Convert {@link PubNub} File object content to file `Uri`. + * + * @returns Asynchronous results of conversion to file `Uri`. + * + * @throws Error if provided {@link PubNub} File object content is not supported for this + * operation. + */ + toFileUri(): Promise>; + } + + /** + * {@link PubNub} File object class interface. + */ + export interface PubNubFileConstructor { + /** + * Whether {@link Blob} data supported by platform or not. + */ + supportsBlob: boolean; + /** + * Whether {@link File} data supported by platform or not. + */ + supportsFile: boolean; + /** + * Whether {@link Buffer} data supported by platform or not. + */ + supportsBuffer: boolean; + /** + * Whether {@link Stream} data supported by platform or not. + */ + supportsStream: boolean; + /** + * Whether {@link String} data supported by platform or not. + */ + supportsString: boolean; + /** + * Whether {@link ArrayBuffer} supported by platform or not. + */ + supportsArrayBuffer: boolean; + /** + * Whether {@link PubNub} File object encryption supported or not. + */ + supportsEncryptFile: boolean; + /** + * Whether `File Uri` data supported by platform or not. + */ + supportsFileUri: boolean; + /** + * {@link PubNub} File object constructor. + * + * @param file - File instantiation parameters (can be raw data or structured object). + * + * @returns Constructed platform-specific {@link PubNub} File object. + */ + create(file: ConstructorParameters): File; + /** + * {@link PubNub} File object constructor. + * + * @param file - File instantiation parameters (can be raw data or structured object). + * + * @returns Constructed platform-specific {@link PubNub} File object. + */ + new (file: ConstructorParameters): File; + } + + /** + * Endpoint call completion block with result. + * + * **Note:** Endpoints which return consumable data use this callback. + */ + export type ResultCallback = (status: Status, response: ResponseType | null) => void; + + /** + * Endpoint acknowledgment completion block. + * + * **Note:** Endpoints which return only acknowledgment or error status use this callback. + */ + export type StatusCallback = (status: Status) => void; + + /** + * REST API endpoint processing status. + * + * **Note:** Used as {@link ResultCallback} and {@link StatusCallback} callbacks first argument type and + * {@link PubNubError} instance `status` field value type. + */ + export type Status = { + /** + * Whether status represent error or not. + */ + error: boolean; + /** + * API call status category. + */ + category: StatusCategory; + /** + * Type of REST API endpoint which reported status. + */ + operation?: RequestOperation; + /** + * REST API response status code. + */ + statusCode: number; + /** + * Error data provided by REST API. + */ + errorData?: Error | Payload; + /** + * Additional status information. + */ + [p: string]: Payload | Error | undefined; + }; + + /** + * Real-time PubNub client status change event. + */ + export type StatusEvent = { + /** + * API call status category. + */ + category: StatusCategory; + /** + * Type of REST API endpoint which reported status. + */ + operation?: RequestOperation; + /** + * Information about error. + */ + error?: string | boolean; + /** + * List of channels for which status update announced. + */ + affectedChannels?: string[]; + /** + * List of currently subscribed channels. + * + * List of channels from which PubNub client receives real-time updates. + */ + subscribedChannels?: string[]; + /** + * List of channel groups for which status update announced. + */ + affectedChannelGroups?: string[]; + /** + * High-precision timetoken which has been used with previous subscription loop. + */ + lastTimetoken?: number | string; + /** + * High-precision timetoken which is used for current subscription loop. + */ + currentTimetoken?: number | string; + }; + + /** + * {@link TransportRequest} query parameter type. + */ + export type Query = Record; + + /** + * General payload type. + * + * Type should be used for: + * * generic messages and signals content, + * * published message metadata. + */ + export type Payload = + | string + | number + | boolean + | { + toJSON: () => Payload; + } + | { + [key: string]: Payload | null; + } + | Payload[]; + + /** + * Endpoint API operation types. + */ + export enum RequestOperation { + /** + * Data publish REST API operation. + */ + PNPublishOperation = 'PNPublishOperation', + /** + * Signal sending REST API operation. + */ + PNSignalOperation = 'PNSignalOperation', + /** + * Subscribe for real-time updates REST API operation. + * + * User's presence change on specified entities will trigger `join` event. + */ + PNSubscribeOperation = 'PNSubscribeOperation', + /** + * Unsubscribe from real-time updates REST API operation. + * + * User's presence change on specified entities will trigger `leave` event. + */ + PNUnsubscribeOperation = 'PNUnsubscribeOperation', + /** + * Fetch user's presence information REST API operation. + */ + PNWhereNowOperation = 'PNWhereNowOperation', + /** + * Fetch channel's presence information REST API operation. + */ + PNHereNowOperation = 'PNHereNowOperation', + /** + * Fetch global presence information REST API operation. + */ + PNGlobalHereNowOperation = 'PNGlobalHereNowOperation', + /** + * Update user's information associated with specified channel REST API operation. + */ + PNSetStateOperation = 'PNSetStateOperation', + /** + * Fetch user's information associated with the specified channel REST API operation. + */ + PNGetStateOperation = 'PNGetStateOperation', + /** + * Announce presence on managed channels REST API operation. + */ + PNHeartbeatOperation = 'PNHeartbeatOperation', + /** + * Add a reaction to the specified message REST API operation. + */ + PNAddMessageActionOperation = 'PNAddActionOperation', + /** + * Remove reaction from the specified message REST API operation. + */ + PNRemoveMessageActionOperation = 'PNRemoveMessageActionOperation', + /** + * Fetch reactions for specific message REST API operation. + */ + PNGetMessageActionsOperation = 'PNGetMessageActionsOperation', + PNTimeOperation = 'PNTimeOperation', + /** + * Channel history REST API operation. + */ + PNHistoryOperation = 'PNHistoryOperation', + /** + * Delete messages from channel history REST API operation. + */ + PNDeleteMessagesOperation = 'PNDeleteMessagesOperation', + /** + * History for channels REST API operation. + */ + PNFetchMessagesOperation = 'PNFetchMessagesOperation', + /** + * Number of messages for channels in specified time frame REST API operation. + */ + PNMessageCounts = 'PNMessageCountsOperation', + /** + * Fetch users metadata REST API operation. + */ + PNGetAllUUIDMetadataOperation = 'PNGetAllUUIDMetadataOperation', + /** + * Fetch user metadata REST API operation. + */ + PNGetUUIDMetadataOperation = 'PNGetUUIDMetadataOperation', + /** + * Set user metadata REST API operation. + */ + PNSetUUIDMetadataOperation = 'PNSetUUIDMetadataOperation', + /** + * Remove user metadata REST API operation. + */ + PNRemoveUUIDMetadataOperation = 'PNRemoveUUIDMetadataOperation', + /** + * Fetch channels metadata REST API operation. + */ + PNGetAllChannelMetadataOperation = 'PNGetAllChannelMetadataOperation', + /** + * Fetch channel metadata REST API operation. + */ + PNGetChannelMetadataOperation = 'PNGetChannelMetadataOperation', + /** + * Set channel metadata REST API operation. + */ + PNSetChannelMetadataOperation = 'PNSetChannelMetadataOperation', + /** + * Remove channel metadata REST API operation. + */ + PNRemoveChannelMetadataOperation = 'PNRemoveChannelMetadataOperation', + /** + * Fetch channel members REST API operation. + */ + PNGetMembersOperation = 'PNGetMembersOperation', + /** + * Update channel members REST API operation. + */ + PNSetMembersOperation = 'PNSetMembersOperation', + /** + * Fetch channel memberships REST API operation. + */ + PNGetMembershipsOperation = 'PNGetMembershipsOperation', + /** + * Update channel memberships REST API operation. + */ + PNSetMembershipsOperation = 'PNSetMembershipsOperation', + /** + * Fetch list of files sent to the channel REST API operation. + */ + PNListFilesOperation = 'PNListFilesOperation', + /** + * Retrieve file upload URL REST API operation. + */ + PNGenerateUploadUrlOperation = 'PNGenerateUploadUrlOperation', + /** + * Upload file to the channel REST API operation. + */ + PNPublishFileOperation = 'PNPublishFileOperation', + /** + * Publish File Message to the channel REST API operation. + */ + PNPublishFileMessageOperation = 'PNPublishFileMessageOperation', + /** + * Retrieve file download URL REST API operation. + */ + PNGetFileUrlOperation = 'PNGetFileUrlOperation', + /** + * Download file from the channel REST API operation. + */ + PNDownloadFileOperation = 'PNDownloadFileOperation', + /** + * Delete file sent to the channel REST API operation. + */ + PNDeleteFileOperation = 'PNDeleteFileOperation', + /** + * Register channels with device push notifications REST API operation. + */ + PNAddPushNotificationEnabledChannelsOperation = 'PNAddPushNotificationEnabledChannelsOperation', + /** + * Unregister channels with device push notifications REST API operation. + */ + PNRemovePushNotificationEnabledChannelsOperation = 'PNRemovePushNotificationEnabledChannelsOperation', + /** + * Fetch list of channels with enabled push notifications for device REST API operation. + */ + PNPushNotificationEnabledChannelsOperation = 'PNPushNotificationEnabledChannelsOperation', + /** + * Disable push notifications for device REST API operation. + */ + PNRemoveAllPushNotificationsOperation = 'PNRemoveAllPushNotificationsOperation', + /** + * Fetch channels groups list REST API operation. + */ + PNChannelGroupsOperation = 'PNChannelGroupsOperation', + /** + * Remove specified channel group REST API operation. + */ + PNRemoveGroupOperation = 'PNRemoveGroupOperation', + /** + * Fetch list of channels for the specified channel group REST API operation. + */ + PNChannelsForGroupOperation = 'PNChannelsForGroupOperation', + /** + * Add list of channels to the specified channel group REST API operation. + */ + PNAddChannelsToGroupOperation = 'PNAddChannelsToGroupOperation', + /** + * Remove list of channels from the specified channel group REST API operation. + */ + PNRemoveChannelsFromGroupOperation = 'PNRemoveChannelsFromGroupOperation', + /** + * Generate authorized token REST API operation. + */ + PNAccessManagerGrant = 'PNAccessManagerGrant', + /** + * Generate authorized token REST API operation. + */ + PNAccessManagerGrantToken = 'PNAccessManagerGrantToken', + PNAccessManagerAudit = 'PNAccessManagerAudit', + /** + * Revoke authorized token REST API operation. + */ + PNAccessManagerRevokeToken = 'PNAccessManagerRevokeToken', + } + + /** + * Request processing status categories. + */ + export enum StatusCategory { + /** + * Call failed when network was unable to complete the call. + */ + PNNetworkIssuesCategory = 'PNNetworkIssuesCategory', + /** + * Network call timed out. + */ + PNTimeoutCategory = 'PNTimeoutCategory', + /** + * Request has been cancelled. + */ + PNCancelledCategory = 'PNCancelledCategory', + /** + * Server responded with bad response. + */ + PNBadRequestCategory = 'PNBadRequestCategory', + /** + * Server responded with access denied. + */ + PNAccessDeniedCategory = 'PNAccessDeniedCategory', + /** + * Incomplete parameters provided for used endpoint. + */ + PNValidationErrorCategory = 'PNValidationErrorCategory', + /** + * PubNub request acknowledgment status. + * + * Some API endpoints respond with request processing status w/o useful data. + */ + PNAcknowledgmentCategory = 'PNAcknowledgmentCategory', + /** + * Something strange happened; please check the logs. + */ + PNUnknownCategory = 'PNUnknownCategory', + /** + * SDK will announce when the network appears to be connected again. + */ + PNNetworkUpCategory = 'PNNetworkUpCategory', + /** + * SDK will announce when the network appears to down. + */ + PNNetworkDownCategory = 'PNNetworkDownCategory', + /** + * PubNub client reconnected to the real-time updates stream. + */ + PNReconnectedCategory = 'PNReconnectedCategory', + /** + * PubNub client connected to the real-time updates stream. + */ + PNConnectedCategory = 'PNConnectedCategory', + /** + * Received real-time updates exceed specified threshold. + * + * After temporary disconnection and catchup, this category means that potentially some + * real-time updates have been pushed into `storage` and need to be requested separately. + */ + PNRequestMessageCountExceededCategory = 'PNRequestMessageCountExceededCategory', + /** + * PubNub client disconnected from the real-time updates streams. + */ + PNDisconnectedCategory = 'PNDisconnectedCategory', + /** + * PubNub client wasn't able to connect to the real-time updates streams. + */ + PNConnectionErrorCategory = 'PNConnectionErrorCategory', + /** + * PubNub client unexpectedly disconnected from the real-time updates streams. + */ + PNDisconnectedUnexpectedlyCategory = 'PNDisconnectedUnexpectedlyCategory', + } + + /** + * PubNub File instance creation parameters. + */ + export type PubNubFileParameters = { + /** + * Readable stream represents file object content. + */ + stream?: Readable; + /** + * Buffer or string represents file object content. + */ + data?: Buffer | ArrayBuffer | string; + /** + * String {@link PubNubFileParameters#data|data} encoding. + * + * @default `utf8` + */ + encoding?: StringEncoding; + /** + * File object name. + */ + name: string; + /** + * File object content type. + */ + mimeType?: string; + }; + + /** + * Node.js implementation for {@link PubNub} File object. + * + * **Important:** Class should implement constructor and class fields from {@link PubNubFileConstructor}. + */ + export class PubNubFile implements PubNubFileInterface { + /** + * Whether {@link Blob} data supported by platform or not. + */ + static supportsBlob: boolean; + /** + * Whether {@link File} data supported by platform or not. + */ + static supportsFile: boolean; + /** + * Whether {@link Buffer} data supported by platform or not. + */ + static supportsBuffer: boolean; + /** + * Whether {@link Stream} data supported by platform or not. + */ + static supportsStream: boolean; + /** + * Whether {@link String} data supported by platform or not. + */ + static supportsString: boolean; + /** + * Whether {@link ArrayBuffer} supported by platform or not. + */ + static supportsArrayBuffer: boolean; + /** + * Whether {@link PubNub} File object encryption supported or not. + */ + static supportsEncryptFile: boolean; + /** + * Whether `File Uri` data supported by platform or not. + */ + static supportsFileUri: boolean; + /** + * File object content source. + */ + readonly data: Readable | Buffer; + /** + * File object content length. + */ + contentLength?: number; + /** + * File object content type. + */ + mimeType: string; + /** + * File object name. + */ + name: string; + static create(file: PubNubFileParameters): PubNubFile; + constructor(file: PubNubFileParameters); + /** + * Convert {@link PubNub} File object content to {@link Buffer}. + * + * @returns Asynchronous results of conversion to the {@link Buffer}. + */ + toBuffer(): Promise; + /** + * Convert {@link PubNub} File object content to {@link ArrayBuffer}. + * + * @returns Asynchronous results of conversion to the {@link ArrayBuffer}. + */ + toArrayBuffer(): Promise; + /** + * Convert {@link PubNub} File object content to {@link string}. + * + * @returns Asynchronous results of conversion to the {@link string}. + */ + toString(encoding?: BufferEncoding): Promise; + /** + * Convert {@link PubNub} File object content to {@link Readable} stream. + * + * @returns Asynchronous results of conversion to the {@link Readable} stream. + */ + toStream(): Promise; + /** + * Convert {@link PubNub} File object content to {@link File}. + * + * @throws Error because {@link File} not available in Node.js environment. + */ + toFile(): Promise; + /** + * Convert {@link PubNub} File object content to file `Uri`. + * + * @throws Error because file `Uri` not available in Node.js environment. + */ + toFileUri(): Promise>; + /** + * Convert {@link PubNub} File object content to {@link Blob}. + * + * @throws Error because {@link Blob} not available in Node.js environment. + */ + toBlob(): Promise; + } + + /** + * Data encrypted by {@link NodeCryptoModule}. + */ + export type EncryptedDataType = { + /** + * Encrypted data. + */ + data: Buffer | string; + /** + * Used cryptor's metadata. + */ + metadata: Buffer | null; + }; + + /** + * {@link Readable} stream encrypted by {@link NodeCryptoModule}. + */ + export type EncryptedStream = { + /** + * Stream with encrypted content. + */ + stream: NodeJS.ReadableStream; + /** + * Length of encrypted data in {@link Readable} stream. + */ + metadataLength: number; + /** + * Used cryptor's metadata. + */ + metadata?: Buffer | undefined; + }; + + /** + * Cryptor algorithm interface. + */ + export interface ICryptor { + /** + * Cryptor unique identifier. + * + * @returns Cryptor identifier. + */ + get identifier(): string; + /** + * Encrypt provided source data. + * + * @param data - Source data for encryption. + * + * @returns Encrypted data object. + * + * @throws Error if unknown data type has been passed. + */ + encrypt(data: BufferSource | string): EncryptedDataType; + /** + * Encrypt provided source {@link Readable} stream. + * + * @param stream - Stream for encryption. + * + * @returns Encrypted stream object. + * + * @throws Error if unknown data type has been passed. + */ + encryptStream(stream: NodeJS.ReadableStream): Promise; + /** + * Decrypt provided encrypted data object. + * + * @param data - Encrypted data object for decryption. + * + * @returns Decrypted data. + * + * @throws Error if unknown data type has been passed. + */ + decrypt(data: EncryptedDataType): ArrayBuffer; + /** + * Decrypt provided encrypted stream object. + * + * @param stream - Encrypted stream object for decryption. + * + * @returns Decrypted data as {@link Readable} stream. + * + * @throws Error if unknown data type has been passed. + */ + decryptStream(stream: EncryptedStream): Promise; + } + + /** + * Legacy cryptor algorithm interface. + */ + export interface ILegacyCryptor { + /** + * Cryptor unique identifier. + */ + get identifier(): string; + /** + * Encrypt provided source data. + * + * @param data - Source data for encryption. + * + * @returns Encrypted data object. + * + * @throws Error if unknown data type has been passed. + */ + encrypt(data: string): EncryptedDataType; + /** + * Encrypt provided source {@link PubNub} File object. + * + * @param file - Source {@link PubNub} File object for encryption. + * @param File - Class constructor for {@link PubNub} File object. + * + * @returns Encrypted data as {@link PubNub} File object. + * + * @throws Error if file is empty or contains unsupported data type. + * @throws Error if cipher key not set. + */ + encryptFile( + file: PubNubFile, + File: PubNubFileConstructor, + ): Promise; + /** + * Decrypt provided encrypted data object. + * + * @param data - Encrypted data object for decryption. + * + * @returns Decrypted data. + * + * @throws Error if unknown data type has been passed. + */ + decrypt(data: EncryptedDataType): Payload | null; + /** + * Decrypt provided encrypted {@link PubNub} File object. + * + * @param file - Encrypted {@link PubNub} File object for decryption. + * @param File - Class constructor for {@link PubNub} File object. + * + * @returns Decrypted data as {@link PubNub} File object. + * + * @throws Error if file is empty or contains unsupported data type. + * @throws Error if cipher key not set. + */ + decryptFile( + file: PubNubFile, + File: PubNubFileConstructor, + ): Promise; + } + + /** + * NodeJS platform PubNub client configuration. + */ + export type PubNubConfiguration = UserConfiguration & { + /** + * Set a custom parameters for setting your connection `keepAlive` if this is set to `true`. + */ + keepAliveSettings?: TransportKeepAlive; + /** + * The cryptography module used for encryption and decryption of messages and files. Takes the + * {@link cipherKey} and {@link useRandomIVs} parameters as arguments. + * + * For more information, refer to the + * {@link /docs/sdks/javascript/api-reference/configuration#cryptomodule|cryptoModule} section. + * + * @default `not set` + */ + cryptoModule?: ICryptoModule; + /** + * If passed, will encrypt the payloads. + * + * @deprecated Pass it to {@link cryptoModule} instead. + */ + cipherKey?: string; + /** + * When `true` the initialization vector (IV) is random for all requests (not just for file + * upload). + * When `false` the IV is hard-coded for all requests except for file upload. + * + * @default `true` + * + * @deprecated Pass it to {@link cryptoModule} instead. + */ + useRandomIVs?: boolean; + /** + * Custom data encryption method. + * + * @deprecated Instead use {@link cryptoModule} for data encryption. + */ + customEncrypt?: (data: string | Payload) => string; + /** + * Custom data decryption method. + * + * @deprecated Instead use {@link cryptoModule} for data decryption. + */ + customDecrypt?: (data: string) => string; + }; + + /** + * Base user-provided PubNub client configuration. + */ + export type UserConfiguration = { + /** + * Specifies the `subscribeKey` to be used for subscribing to a channel and message publishing. + */ + subscribeKey: string; + /** + * Specifies the `subscribe_key` to be used for subscribing to a channel and message publishing. + * + * @deprecated Use the {@link subscribeKey} instead. + */ + subscribe_key?: string; + /** + * Specifies the `publishKey` to be used for publishing messages to a channel. + */ + publishKey?: string; + /** + * Specifies the `publish_key` to be used for publishing messages to a channel. + * + * @deprecated Use the {@link publishKey} instead. + */ + publish_key?: string; + /** + * Specifies the `secretKey` to be used for request signatures computation. + */ + secretKey?: string; + /** + * Specifies the `secret_key` to be used for request signatures computation. + * + * @deprecated Use the {@link secretKey} instead. + */ + secret_key?: string; + /** + * Unique PubNub client user identifier. + * + * Unique `userId` to identify the user or the device that connects to PubNub. + * It's a UTF-8 encoded string of up to 64 alphanumeric characters. + * + * If you don't set the `userId`, you won't be able to connect to PubNub. + */ + userId?: string; + /** + * If Access Manager enabled, this key will be used on all requests. + */ + authKey?: string | null; + /** + * Log HTTP information. + * + * @default `false` + */ + logVerbosity?: boolean; + /** + * If set to true, requests will be made over HTTPS. + * + * @default `true` for v4.20.0 onwards, `false` before v4.20.0 + */ + ssl?: boolean; + /** + * If a custom domain is required, SDK accepts it here. + * + * @default `ps.pndsn.com` + */ + origin?: string | string[]; + /** + * How long the server will consider the client alive for presence.The value is in seconds. + * + * @default `300` + */ + presenceTimeout?: number; + /** + * How often the client will announce itself to server.The value is in seconds. + * + * @default `not set` + */ + heartbeatInterval?: number; + /** + * Transactional requests timeout in milliseconds. + * + * Maximum duration for which PubNub client should wait for transactional request completion. + * + * @default `15` seconds + */ + transactionalRequestTimeout?: number; + /** + * Subscription requests timeout in milliseconds. + * + * Maximum duration for which PubNub client should wait for subscription request completion. + * + * @default `310` seconds + */ + subscribeRequestTimeout?: number; + /** + * `true` to allow catch up on the front-end applications. + * + * @default `false` + */ + restore?: boolean; + /** + * Whether to include the PubNub object instance ID in outgoing requests. + * + * @default `false` + */ + useInstanceId?: boolean; + /** + * When `true` the SDK doesn't send out the leave requests. + * + * @default `false` + */ + suppressLeaveEvents?: boolean; + /** + * `PNRequestMessageCountExceededCategory` is thrown when the number of messages into the + * payload is above of `requestMessageCountThreshold`. + * + * @default `100` + */ + requestMessageCountThreshold?: number; + /** + * This flag announces when the network is down or up using the states `PNNetworkDownCategory` + * and `PNNetworkUpCategory`. + * + * @default `false` + */ + autoNetworkDetection?: boolean; + /** + * Whether to use the standardized workflows for subscribe and presence. + * + * Note that the `maintainPresenceState` parameter is set to true by default, so make sure to + * disable it if you don't need to maintain presence state. For more information, refer to the + * param description in this table. + * + * + * @default `false` + */ + enableEventEngine?: boolean; + /** + * Custom reconnection configuration parameters. + * + * `retryConfiguration: policy` is the type of policy to be used. + * + * Available values: + * - `PubNub.LinearRetryPolicy({ delay, maximumRetry })` + * - `PubNub.ExponentialRetryPolicy({ minimumDelay, maximumDelay, maximumRetry })` + * + * For more information, refer to + * {@link /docs/general/setup/connection-management#reconnection-policy|Reconnection Policy}. JavaScript doesn't + * support excluding endpoints. + * + * @default `not set` + */ + retryConfiguration?: RequestRetryPolicy; + /** + * Whether the `state` set using `setState()` should be maintained for the current `userId`. + * This option works only when `enableEventEngine` is set to `true`. + * + * @default `true` + */ + maintainPresenceState?: boolean; + /** + * `UUID` to use. You should set a unique `UUID` to identify the user or the device that + * connects to PubNub. + * If you don't set the `UUID`, you won't be able to connect to PubNub. + * + * @deprecated Use {@link userId} instead. + */ + uuid?: string; + /** + * If set to `true`, SDK will use the same TCP connection for each HTTP request, instead of + * opening a new one for each new request. + * + * @default `false` + */ + keepAlive?: boolean; + /** + * If the SDK is running as part of another SDK built atop of it, allow a custom `pnsdk` with + * name and version. + */ + sdkName?: string; + /** + * If the SDK is operated by a partner, allow a custom `pnsdk` item for them. + */ + partnerId?: string; + }; + + /** + * User-provided configuration object interface. + * + * Interface contains limited set of settings manipulation and access. + */ + export interface ClientConfiguration { + /** + * Get a PubNub client user identifier. + * + * @returns Current PubNub client user identifier. + */ + getUserId(): string; + /** + * Change the current PubNub client user identifier. + * + * **Important:** Change won't affect ongoing REST API calls. + * + * @param value - New PubNub client user identifier. + * + * @throws Error empty user identifier has been provided. + */ + setUserId(value: string): void; + /** + * Change REST API endpoint access authorization key. + * + * @param authKey - New authorization key which should be used with new requests. + */ + setAuthKey(authKey: string | null): void; + /** + * Real-time updates filtering expression. + * + * @returns Filtering expression. + */ + getFilterExpression(): string | undefined | null; + /** + * Update real-time updates filtering expression. + * + * @param expression - New expression which should be used or `undefined` to disable filtering. + */ + setFilterExpression(expression: string | null | undefined): void; + /** + * Change data encryption / decryption key. + * + * @param key - New key which should be used for data encryption / decryption. + */ + setCipherKey(key: string | undefined): void; + /** + * Get PubNub SDK version. + * + * @returns Current SDK version. + */ + get version(): string; + /** + * Get PubNub SDK version. + * + * @returns Current SDK version. + */ + getVersion(): string; + /** + * Add framework's prefix. + * + * @param name - Name of the framework which would want to add own data into `pnsdk` suffix. + * @param suffix - Suffix with information about framework. + */ + _addPnsdkSuffix(name: string, suffix: string | number): void; + /** + * Get a PubNub client user identifier. + * + * @returns Current PubNub client user identifier. + * + * @deprecated Use the {@link getUserId} or {@link userId} getter instead. + */ + getUUID(): string; + /** + * Change the current PubNub client user identifier. + * + * **Important:** Change won't affect ongoing REST API calls. + * + * @param value - New PubNub client user identifier. + * + * @returns {Configuration} Reference to the configuration instance for easier chaining. + * + * @throws Error empty user identifier has been provided. + * + * @deprecated Use the {@link setUserId} or {@link userId} setter instead. + */ + setUUID(value: string): void; + } + + /** + * Failed request retry policy. + */ + export class RetryPolicy { + static LinearRetryPolicy( + configuration: LinearRetryPolicyConfiguration, + ): RequestRetryPolicy & LinearRetryPolicyConfiguration; + static ExponentialRetryPolicy( + configuration: ExponentialRetryPolicyConfiguration, + ): RequestRetryPolicy & ExponentialRetryPolicyConfiguration; + } + + export type RequestRetryPolicy = { + /** + * Check whether failed request can be retried. + * + * @param reason - Request processing failure reason. + * @param attempt - Number of sequential failure. + * + * @returns `true` if another request retry attempt can be done. + */ + shouldRetry( + reason: PubNubError & { + retryAfter?: number; + }, + attempt: number, + ): boolean; + /** + * Computed delay for next request retry attempt. + * + * @param attempt - Number of sequential failure. + * @param reason - Request processing failure reason. + * + * @returns Delay before next request retry attempt in milliseconds. + */ + getDelay( + attempt: number, + reason: PubNubError & { + retryAfter?: number; + }, + ): number; + /** + * Identify reason why another retry attempt can't be made. + * + * @param reason - Request processing failure reason. + * @param attempt - Number of sequential failure. + * + * @returns Give up reason. + */ + getGiveupReason( + reason: PubNubError & { + retryAfter?: number; + }, + attempt: number, + ): string; + /** + * Validate retry policy parameters. + * + * @throws Error if `minimum` delay is smaller than 2 seconds for `exponential` retry policy. + * @throws Error if `maximum` delay is larger than 150 seconds for `exponential` retry policy. + * @throws Error if `maximumRetry` attempts is larger than 6 for `exponential` retry policy. + * @throws Error if `maximumRetry` attempts is larger than 10 for `linear` retry policy. + */ + validate(): void; + }; + + export type LinearRetryPolicyConfiguration = { + delay: number; + maximumRetry: number; + }; + + export type ExponentialRetryPolicyConfiguration = { + minimumDelay: number; + maximumDelay: number; + maximumRetry: number; + }; + + /** + * PubNub operation error. + * + * When an operation can't be performed or there is an error from the server, this object will be returned. + */ + export class PubNubError extends Error { + status?: Status | undefined; + } + + /** + * Represents the configuration options for keeping the transport connection alive. + */ + export type TransportKeepAlive = { + /** + * The time interval in milliseconds for keeping the connection alive. + * + * @default 1000 + */ + keepAliveMsecs?: number; + /** + * The maximum number of sockets allowed per host. + * + * @default Infinity + */ + maxSockets?: number; + /** + * The maximum number of open and free sockets in the pool per host. + * + * @default 256 + */ + maxFreeSockets?: number; + /** + * Timeout in milliseconds, after which the `idle` socket will be closed. + * + * @default 30000 + */ + timeout?: number; + }; + + /** + * This interface is used to send requests to the PubNub API. + * + * You can implement this interface for your types, or use one of the provided modules to use a + * transport library. + * + * @interface + */ + export interface Transport { + /** + * Make request sendable. + * + * @param req - The transport request to be processed. + * + * @returns - A promise that resolves to a transport response and request cancellation + * controller (if required). + */ + makeSendable(req: TransportRequest): [Promise, CancellationController | undefined]; + /** + * Pre-processed request. + * + * Transport implementation may pre-process original transport requests before making + * platform-specific request objects from it. + * + * @param req - Transport request provided by the PubNub client. + * + * @returns Transport request with updated properties (if it was required). + */ + request(req: TransportRequest): TransportRequest; + } + + /** + * Enum representing possible transport methods for HTTP requests. + * + * @enum {number} + */ + export enum TransportMethod { + /** + * Request will be sent using `GET` method. + */ + GET = 'GET', + /** + * Request will be sent using `POST` method. + */ + POST = 'POST', + /** + * Request will be sent using `PATCH` method. + */ + PATCH = 'PATCH', + /** + * Request will be sent using `DELETE` method. + */ + DELETE = 'DELETE', + /** + * Local request. + * + * Request won't be sent to the service and probably used to compute URL. + */ + LOCAL = 'LOCAL', + } + + /** + * Request cancellation controller. + */ + export type CancellationController = { + /** + * Request cancellation / abort function. + */ + abort: () => void; + }; + + /** + * This object represents a request to be sent to the PubNub API. + * + * This struct represents a request to be sent to the PubNub API. It is used by the transport + * provider which implements {@link Transport} interface. + * + * All fields are representing certain parts of the request that can be used to prepare one. + */ + export type TransportRequest = { + /** + * Remote host name. + */ + origin?: string; + /** + * Remote resource path. + */ + path: string; + /** + * Query parameters to be sent with the request. + */ + queryParameters?: Query; + /** + * Transport request HTTP method. + */ + method: TransportMethod; + /** + * Headers to be sent with the request. + */ + headers?: Record; + /** + * Multipart form data fields. + * + * **Important:** `Content-Type` header should be sent the {@link body} data type when + * `multipart/form-data` should request should be sent. + */ + formData?: Record[]; + /** + * Body to be sent with the request. + */ + body?: ArrayBuffer | PubNubFileInterface | string; + /** + * For how long request should wait response from the server. + * + * @default `10` seconds. + */ + timeout: number; + /** + * Whether request can be cancelled or not. + * + * @default `false`. + */ + cancellable: boolean; + /** + * Unique request identifier. + */ + identifier: string; + }; + + /** + * Represents a transport response from a service. + */ + export type TransportResponse = { + /** + * Full remote resource URL used to retrieve response. + */ + url: string; + /** + * Service response status code. + */ + status: number; + /** + * Service response headers. + * + * **Important:** Header names are in lowercase. + */ + headers: Record; + /** + * Service response body. + */ + body?: ArrayBuffer; + }; + + /** + * Real-time events listener. + */ + export type Listener = { + /** + * Real-time message events listener. + * + * @param message - Received message. + */ + message?: (message: Subscription.Message) => void; + /** + * Real-time message signal listener. + * + * @param signal - Received signal. + */ + signal?: (signal: Subscription.Signal) => void; + /** + * Real-time presence change events listener. + * + * @param presence - Received presence chane information. + */ + presence?: (presence: Subscription.Presence) => void; + /** + * Real-time App Context Objects change events listener. + * + * @param object - Changed App Context Object information. + */ + objects?: (object: Subscription.AppContextObject) => void; + /** + * Real-time message actions events listener. + * + * @param action - Message action information. + */ + messageAction?: (action: Subscription.MessageAction) => void; + /** + * Real-time file share events listener. + * + * @param file - Shared file information. + */ + file?: (file: Subscription.File) => void; + /** + * Real-time PubNub client status change event. + * + * @param status - PubNub client status information + */ + status?: (status: Status | StatusEvent) => void; + /** + * Real-time User App Context Objects change events listener. + * + * @param user - User App Context Object information. + * + * @deprecated Use {@link objects} listener callback instead. + */ + user?: (user: Subscription.UserAppContextObject) => void; + /** + * Real-time Space App Context Objects change events listener. + * + * @param space - Space App Context Object information. + * + * @deprecated Use {@link objects} listener callback instead. + */ + space?: (space: Subscription.SpaceAppContextObject) => void; + /** + * Real-time VSP Membership App Context Objects change events listener. + * + * @param membership - VSP Membership App Context Object information. + * + * @deprecated Use {@link objects} listener callback instead. + */ + membership?: (membership: Subscription.VSPMembershipAppContextObject) => void; + }; + + /** + * PubNub-defined event types by payload. + */ + export enum PubNubEventType { + /** + * Presence change event. + */ + Presence = -2, + /** + * Regular message event. + * + * **Note:** This is default type assigned for non-presence events if `e` field is missing. + */ + Message = -1, + /** + * Signal data event. + */ + Signal = 1, + /** + * App Context object event. + */ + AppContext = 2, + /** + * Message reaction event. + */ + MessageAction = 3, + /** + * Files event. + */ + Files = 4, + } + + /** + * Periodical presence change service response. + */ + type PresenceIntervalData = { + /** + * Periodical subscribed channels and groups presence change announcement. + */ + action: 'interval'; + /** + * Unix timestamp when presence event has been triggered. + */ + timestamp: number; + /** + * The current occupancy after the presence change is updated. + */ + occupancy: number; + /** + * The list of unique user identifiers that `joined` the channel since the last interval + * presence update. + */ + join?: string[]; + /** + * The list of unique user identifiers that `left` the channel since the last interval + * presence update. + */ + leave?: string[]; + /** + * The list of unique user identifiers that `timeout` the channel since the last interval + * presence update. + */ + timeout?: string[]; + }; + + /** + * Subscribed user presence information change service response. + */ + type PresenceChangeData = { + /** + * Change if user's presence. + * + * User's presence may change between: `join`, `leave` and `timeout`. + */ + action: 'join' | 'leave' | 'timeout'; + /** + * Unix timestamp when presence event has been triggered. + */ + timestamp: number; + /** + * Unique identification of the user for whom presence information changed. + */ + uuid: string; + /** + * The current occupancy after the presence change is updated. + */ + occupancy: number; + /** + * The user's state associated with the channel has been updated. + * + * @deprecated Use set state methods to specify associated user's data instead of passing to + * subscribe. + */ + data?: { + [p: string]: Payload; + }; + }; + + /** + * Associated user presence state change service response. + */ + type PresenceStateChangeData = { + /** + * Subscribed user associated presence state change. + */ + action: 'state-change'; + /** + * Unix timestamp when presence event has been triggered. + */ + timestamp: number; + /** + * Unique identification of the user for whom associated presence state has been changed. + */ + uuid: string; + /** + * The user's state associated with the channel has been updated. + */ + state: { + [p: string]: Payload; + }; + }; + + /** + * Channel presence service response. + */ + export type PresenceData = PresenceIntervalData | PresenceChangeData | PresenceStateChangeData; + + /** + * Message reaction change service response. + */ + export type MessageActionData = { + /** + * The type of event that happened during the message action update. + * + * Possible values are: + * - `added` - action has been added to the message + * - `removed` - action has been removed from message + */ + event: 'added' | 'removed'; + /** + * Information about message action for which update has been generated. + */ + data: { + /** + * Timetoken of message for which action has been added / removed. + */ + messageTimetoken: string; + /** + * Timetoken of message action which has been added / removed. + */ + actionTimetoken: string; + /** + * Message action type. + */ + type: string; + /** + * Value associated with message action {@link type}. + */ + value: string; + }; + /** + * Name of service which generated update for message action. + */ + source: string; + /** + * Version of service which generated update for message action. + */ + version: string; + }; + + /** + * VSP Objects change events. + */ + type AppContextVSPEvents = 'updated' | 'removed'; + + /** + * App Context Objects change events. + */ + type AppContextEvents = 'set' | 'delete'; + + /** + * Common real-time App Context Object service response. + */ + type ObjectData = { + /** + * The type of event that happened during the object update. + */ + event: Event; + /** + * App Context object type. + */ + type: Type; + /** + * App Context object information. + * + * App Context object can be one of: + * - `channel` / `space` + * - `uuid` / `user` + * - `membership` + */ + data: AppContextObject; + /** + * Name of service which generated update for object. + */ + source: string; + /** + * Version of service which generated update for object. + */ + version: string; + }; + + /** + * `Channel` object change real-time service response. + */ + type ChannelObjectData = ObjectData< + AppContextEvents, + 'channel', + AppContext.ChannelMetadataObject + >; + + /** + * `Space` object change real-time service response. + */ + export type SpaceObjectData = ObjectData< + AppContextVSPEvents, + 'space', + AppContext.ChannelMetadataObject + >; + + /** + * `Uuid` object change real-time service response. + */ + type UuidObjectData = ObjectData>; + + /** + * `User` object change real-time service response. + */ + export type UserObjectData = ObjectData< + AppContextVSPEvents, + 'user', + AppContext.UUIDMetadataObject + >; + + /** + * `Membership` object change real-time service response. + */ + type MembershipObjectData = ObjectData< + AppContextEvents, + 'membership', + Omit, 'id'> & { + /** + * `Uuid` object which has been used to create relationship with `channel`. + */ + uuid: { + /** + * Unique `user` object identifier. + */ + id: string; + }; + /** + * `Channel` object which has been used to create relationship with `uuid`. + */ + channel: { + /** + * Unique `channel` object identifier. + */ + id: string; + }; + } + >; + + /** + * VSP `Membership` object change real-time service response. + */ + export type VSPMembershipObjectData = ObjectData< + AppContextVSPEvents, + 'membership', + Omit, 'id'> & { + /** + * `User` object which has been used to create relationship with `space`. + */ + user: { + /** + * Unique `user` object identifier. + */ + id: string; + }; + /** + * `Space` object which has been used to create relationship with `user`. + */ + space: { + /** + * Unique `channel` object identifier. + */ + id: string; + }; + } + >; + + /** + * App Context service response. + */ + export type AppContextObjectData = ChannelObjectData | UuidObjectData | MembershipObjectData; + + /** + * File service response. + */ + export type FileData = { + /** + * Message which has been associated with uploaded file. + */ + message?: Payload; + /** + * Information about uploaded file. + */ + file: { + /** + * Unique identifier of uploaded file. + */ + id: string; + /** + * Actual name with which file has been stored. + */ + name: string; + }; + }; + + /** + * Payload for `pn_apns` field in published message. + */ + type APNSPayload = { + /** + * Payload for Apple Push Notification Service. + */ + aps: { + /** + * Configuration of visual notification representation. + */ + alert?: { + /** + * First line title. + * + * Title which is shown in bold on the first line of notification bubble. + */ + title?: string; + /** + * Second line title. + * + * Subtitle which is shown under main title with smaller font. + */ + subtitle?: string; + /** + * Notification body. + * + * Body which is shown to the user after interaction with notification. + */ + body?: string; + }; + /** + * Unread notifications count badge value. + */ + badge?: number | null; + /** + * Name of the file from resource bundle which should be played when notification received. + */ + sound?: string; + /** + * Silent notification flag. + */ + 'content-available'?: 1; + }; + /** + * APNS2 payload recipients information. + */ + pn_push: PubNubAPNS2Configuration[]; + }; + + /** + * APNS2 configuration type. + */ + type APNS2Configuration = { + /** + * Notification group / collapse identifier. Value will be used in APNS POST request as `apns-collapse-id` header + * value. + */ + collapseId?: string; + /** + * Date till which APNS will try to deliver notification to target device. Value will be used in APNS POST request as + * `apns-expiration` header value. + */ + expirationDate?: Date; + /** + * List of topics which should receive this notification. + */ + targets: APNS2Target[]; + }; + + /** + * Preformatted for PubNub service `APNS2` configuration type. + */ + type PubNubAPNS2Configuration = { + /** + * PubNub service authentication method for APNS. + */ + auth_method: 'token'; + /** + * Target entities which should receive notification. + */ + targets: PubNubAPNS2Target[]; + /** + * Notifications group collapse identifier. + */ + collapse_id?: string; + /** + * Notification receive expiration date. + * + * Date after which notification won't be delivered. + */ + expiration?: string; + /** + * APNS protocol version. + */ + version: 'v2'; + }; + + /** + * APNS2 configuration target type. + */ + type APNS2Target = { + /** + * Notifications topic name (usually it is bundle identifier of application for Apple platform). + * + * **Important:** Required only if `pushGateway` is set to `apns2`. + */ + topic: string; + /** + * Environment within which registered devices to which notifications should be delivered. + * + * Available: + * - `development` + * - `production` + * + * @default `development` + */ + environment?: 'development' | 'production'; + /** + * List of devices (their push tokens) to which this notification shouldn't be delivered. + */ + excludedDevices?: string[]; + }; + + /** + * Preformatted for PubNub service `APNS2` configuration target type. + */ + type PubNubAPNS2Target = Omit & { + /** + * List of devices (their push tokens) to which this notification shouldn't be delivered. + */ + excluded_devices?: string[]; + }; + + /** + * Payload for `pn_gcm` field in published message. + */ + type FCMPayload = { + /** + * Configuration of visual notification representation. + */ + notification?: { + /** + * First line title. + * + * Title which is shown in bold on the first line of notification bubble. + */ + title?: string; + /** + * Notification body. + * + * Body which is shown to the user after interaction with notification. + */ + body?: string; + /** + * Name of the icon file from resource bundle which should be shown on notification. + */ + icon?: string; + /** + * Name of the file from resource bundle which should be played when notification received. + */ + sound?: string; + tag?: string; + }; + /** + * Configuration of data notification. + * + * Silent notification configuration. + */ + data?: { + notification?: FCMPayload['notification']; + }; + }; + + /** + * Base notification payload object. + */ + class BaseNotificationPayload { + /** + * Retrieve resulting notification payload content for message. + * + * @returns Preformatted push notification payload data. + */ + get payload(): unknown; + /** + * Update notification title. + * + * @param value - New notification title. + */ + set title(value: string | undefined); + /** + * Update notification subtitle. + * + * @param value - New second-line notification title. + */ + set subtitle(value: string | undefined); + /** + * Update notification body. + * + * @param value - Update main notification message (shown when expanded). + */ + set body(value: string | undefined); + /** + * Update application badge number. + * + * @param value - Number which should be shown in application badge upon receiving notification. + */ + set badge(value: number | null | undefined); + /** + * Update notification sound. + * + * @param value - Name of the sound file which should be played upon notification receive. + */ + set sound(value: string | undefined); + } + + /** + * Message payload for Apple Push Notification Service. + */ + export class APNSNotificationPayload extends BaseNotificationPayload { + get payload(): APNSPayload; + /** + * Update notification receivers configuration. + * + * @param value - New APNS2 configurations. + */ + set configurations(value: APNS2Configuration[]); + /** + * Notification payload. + * + * @returns Platform-specific part of PubNub notification payload. + */ + get notification(): { + /** + * Configuration of visual notification representation. + */ + alert?: { + /** + * First line title. + * + * Title which is shown in bold on the first line of notification bubble. + */ + title?: string; + /** + * Second line title. + * + * Subtitle which is shown under main title with smaller font. + */ + subtitle?: string; + /** + * Notification body. + * + * Body which is shown to the user after interaction with notification. + */ + body?: string; + }; + /** + * Unread notifications count badge value. + */ + badge?: number | null; + /** + * Name of the file from resource bundle which should be played when notification received. + */ + sound?: string; + /** + * Silent notification flag. + */ + 'content-available'?: 1; + }; + /** + * Notification title. + * + * @returns Main notification title. + */ + get title(): string | undefined; + /** + * Update notification title. + * + * @param value - New notification title. + */ + set title(value: string | undefined); + /** + * Notification subtitle. + * + * @returns Second-line notification title. + */ + get subtitle(): string | undefined; + /** + * Update notification subtitle. + * + * @param value - New second-line notification title. + */ + set subtitle(value: string | undefined); + /** + * Notification body. + * + * @returns Main notification message (shown when expanded). + */ + get body(): string | undefined; + /** + * Update notification body. + * + * @param value - Update main notification message (shown when expanded). + */ + set body(value: string | undefined); + /** + * Retrieve unread notifications number. + * + * @returns Number of unread notifications which should be shown on application badge. + */ + get badge(): number | null | undefined; + /** + * Update application badge number. + * + * @param value - Number which should be shown in application badge upon receiving notification. + */ + set badge(value: number | null | undefined); + /** + * Retrieve notification sound file. + * + * @returns Notification sound file name from resource bundle. + */ + get sound(): string | undefined; + /** + * Update notification sound. + * + * @param value - Name of the sound file which should be played upon notification receive. + */ + set sound(value: string | undefined); + /** + * Set whether notification should be silent or not. + * + * `content-available` notification type will be used to deliver silent notification if set to `true`. + * + * @param value - Whether notification should be sent as silent or not. + */ + set silent(value: boolean); + } + + /** + * Message payload for Firebase Cloud Messaging service. + */ + export class FCMNotificationPayload extends BaseNotificationPayload { + get payload(): FCMPayload; + /** + * Notification payload. + * + * @returns Platform-specific part of PubNub notification payload. + */ + get notification(): + | { + /** + * First line title. + * + * Title which is shown in bold on the first line of notification bubble. + */ + title?: string; + /** + * Notification body. + * + * Body which is shown to the user after interaction with notification. + */ + body?: string; + /** + * Name of the icon file from resource bundle which should be shown on notification. + */ + icon?: string; + /** + * Name of the file from resource bundle which should be played when notification received. + */ + sound?: string; + tag?: string; + } + | undefined; + /** + * Silent notification payload. + * + * @returns Silent notification payload (data notification). + */ + get data(): + | { + notification?: FCMPayload['notification']; + } + | undefined; + /** + * Notification title. + * + * @returns Main notification title. + */ + get title(): string | undefined; + /** + * Update notification title. + * + * @param value - New notification title. + */ + set title(value: string | undefined); + /** + * Notification body. + * + * @returns Main notification message (shown when expanded). + */ + get body(): string | undefined; + /** + * Update notification body. + * + * @param value - Update main notification message (shown when expanded). + */ + set body(value: string | undefined); + /** + * Retrieve notification sound file. + * + * @returns Notification sound file name from resource bundle. + */ + get sound(): string | undefined; + /** + * Update notification sound. + * + * @param value - Name of the sound file which should be played upon notification receive. + */ + set sound(value: string | undefined); + /** + * Retrieve notification icon file. + * + * @returns Notification icon file name from resource bundle. + */ + get icon(): string | undefined; + /** + * Update notification icon. + * + * @param value - Name of the icon file which should be shown on notification. + */ + set icon(value: string | undefined); + /** + * Retrieve notifications grouping tag. + * + * @returns Notifications grouping tag. + */ + get tag(): string | undefined; + /** + * Update notifications grouping tag. + * + * @param value - String which will be used to group similar notifications in notification center. + */ + set tag(value: string | undefined); + /** + * Set whether notification should be silent or not. + * + * All notification data will be sent under `data` field if set to `true`. + * + * @param value - Whether notification should be sent as silent or not. + */ + set silent(value: boolean); + } + + export class NotificationsPayload { + /** + * APNS-specific message payload. + */ + apns: APNSNotificationPayload; + /** + * FCM-specific message payload. + */ + fcm: FCMNotificationPayload; + /** + * Enable or disable push notification debugging message. + * + * @param value - Whether debug message from push notification scheduler should be published to the specific + * channel or not. + */ + set debugging(value: boolean); + /** + * Notification title. + * + * @returns Main notification title. + */ + get title(): string; + /** + * Notification subtitle. + * + * @returns Second-line notification title. + */ + get subtitle(): string | undefined; + /** + * Update notification subtitle. + * + * @param value - New second-line notification title. + */ + set subtitle(value: string | undefined); + /** + * Notification body. + * + * @returns Main notification message (shown when expanded). + */ + get body(): string; + /** + * Retrieve unread notifications number. + * + * @returns Number of unread notifications which should be shown on application badge. + */ + get badge(): number | undefined; + /** + * Update application badge number. + * + * @param value - Number which should be shown in application badge upon receiving notification. + */ + set badge(value: number | undefined); + /** + * Retrieve notification sound file. + * + * @returns Notification sound file name from resource bundle. + */ + get sound(): string | undefined; + /** + * Update notification sound. + * + * @param value - Name of the sound file which should be played upon notification receive. + */ + set sound(value: string | undefined); + /** + * Build notifications platform for requested platforms. + * + * @param platforms - List of platforms for which payload should be added to final dictionary. Supported values: + * fcm, apns, and apns2. + * + * @returns Object with data, which can be sent with publish method call and trigger remote notifications for + * specified platforms. + */ + buildPayload(platforms: ('apns' | 'apns2' | 'fcm')[]): { + pn_apns?: APNSPayload; + pn_gcm?: FCMPayload; + pn_debug?: boolean; + }; + } + + /** + * PubNub entity subscription configuration options. + */ + export type SubscriptionOptions = { + /** + * Whether presence events for entity should be received or not. + */ + receivePresenceEvents?: boolean; + }; + + /** + * First-class objects which provides access to the channel app context object-specific APIs. + */ + export class ChannelMetadata { + /** + * Create channel's app context subscription object for real-time updates. + * + * Create subscription object which can be used to subscribe to the real-time updates sent to the specific channel + * app context object. + * + * @param [subscriptionOptions] - Channel's app context subscription object behavior customization options. + * + * @returns Configured and ready to use channel's app context subscription object. + */ + subscription(subscriptionOptions?: SubscriptionOptions): Subscription; + } + + /** + * Single-entity subscription object which can be used to receive and handle real-time updates. + */ + export class Subscription extends SubscribeCapable { + /** + * Merge entities' subscription objects into subscription set. + * + * @param subscription - Other entity's subscription object to be merged with receiver. + * @return Subscription set which contains both receiver and other entities' subscription objects. + */ + addSubscription(subscription: Subscription): SubscriptionSet; + } + + export abstract class SubscribeCapable { + /** + * Start receiving real-time updates. + * + * @param subscribeParameters - Additional subscription configuration options which should be used + * for request. + */ + subscribe(subscribeParameters?: { timetoken?: string }): void; + /** + * Stop real-time events processing. + */ + unsubscribe(): void; + /** + * Set new message handler. + * + * @param onMessageListener - Listener function, which will be called each time when a new message + * is received from the real-time network. + */ + set onMessage(onMessageListener: (messageEvent: Subscription.Message) => void); + /** + * Set new presence events handler. + * + * @param onPresenceListener - Listener function, which will be called each time when a new + * presence event is received from the real-time network. + */ + set onPresence(onPresenceListener: (presenceEvent: Subscription.Presence) => void); + /** + * Set new signal handler. + * + * @param onSignalListener - Listener function, which will be called each time when a new signal + * is received from the real-time network. + */ + set onSignal(onSignalListener: (signalEvent: Subscription.Signal) => void); + /** + * Set new app context event handler. + * + * @param onObjectsListener - Listener function, which will be called each time when a new + * app context event is received from the real-time network. + */ + set onObjects(onObjectsListener: (objectsEvent: Subscription.AppContextObject) => void); + /** + * Set new message reaction event handler. + * + * @param messageActionEventListener - Listener function, which will be called each time when a + * new message reaction event is received from the real-time network. + */ + set onMessageAction(messageActionEventListener: (messageActionEvent: Subscription.MessageAction) => void); + /** + * Set new file handler. + * + * @param fileEventListener - Listener function, which will be called each time when a new file + * is received from the real-time network. + */ + set onFile(fileEventListener: (fileEvent: Subscription.File) => void); + /** + * Set events handler. + * + * @param listener - Events listener configuration object, which lets specify handlers for multiple + * types of events. + */ + addListener(listener: Listener): void; + /** + * Remove events handler. + * + * @param listener - Event listener configuration, which should be removed from the list of notified + * listeners. **Important:** Should be the same object which has been passed to the + * {@link addListener}. + */ + removeListener(listener: Listener): void; + /** + * Get list of channels which is used for subscription. + * + * @returns List of channel names. + */ + get channels(): string[]; + /** + * Get list of channel groups which is used for subscription. + * + * @returns List of channel group names. + */ + get channelGroups(): string[]; + } + + /** + * Multiple entities subscription set object which can be used to receive and handle real-time + * updates. + * + * Subscription set object represent collection of per-entity subscription objects and allow + * processing them at once for subscription loop and events handling. + */ + export class SubscriptionSet extends SubscribeCapable { + /** + * Add additional entity's subscription to the subscription set. + * + * **Important:** Changes will be effective only after {@link SubscribeCapable#subscribe} call or + * next subscription loop. + * + * @param subscription - Other entity's subscription object, which should be added. + */ + addSubscription(subscription: Subscription): void; + /** + * Remove entity's subscription object from the set. + * + * **Important:** Changes will be effective only after {@link SubscribeCapable#unsubscribe} call or + * next subscription loop. + * + * @param subscription - Other entity's subscription object, which should be removed. + */ + removeSubscription(subscription: Subscription): void; + /** + * Merge with other subscription set object. + * + * **Important:** Changes will be effective only after {@link SubscribeCapable#subscribe} call or + * next subscription loop. + * + * @param subscriptionSet - Other entities' subscription set, which should be joined. + */ + addSubscriptionSet(subscriptionSet: SubscriptionSet): void; + /** + * Subtract other subscription set object. + * + * **Important:** Changes will be effective only after {@link SubscribeCapable#unsubscribe} call or + * next subscription loop. + * + * @param subscriptionSet - Other entities' subscription set, which should be subtracted. + */ + removeSubscriptionSet(subscriptionSet: SubscriptionSet): void; + /** + * Get list of entities' subscription objects registered in subscription set. + * + * @returns Entities' subscription objects list. + */ + get subscriptions(): Subscription[]; + } + + /** + * First-class objects which provides access to the channel group-specific APIs. + */ + export class ChannelGroup { + /** + * Create channel group's subscription object for real-time updates. + * + * Create subscription object which can be used to subscribe to the real-time updates sent to the channels in + * specific channel group. + * + * @param [subscriptionOptions] - Channel group's subscription object behavior customization options. + * + * @returns Configured and ready to use channel group's subscription object. + */ + subscription(subscriptionOptions?: SubscriptionOptions): Subscription; + } + + /** + * First-class objects which provides access to the user app context object-specific APIs. + */ + export class UserMetadata { + /** + * Create user's app context subscription object for real-time updates. + * + * Create subscription object which can be used to subscribe to the real-time updates sent to the specific user + * app context object. + * + * @param [subscriptionOptions] - User's app context subscription object behavior customization options. + * + * @returns Configured and ready to use user's app context subscription object. + */ + subscription(subscriptionOptions?: SubscriptionOptions): Subscription; + } + + /** + * First-class objects which provides access to the channel-specific APIs. + */ + export class Channel { + /** + * Create channel's subscription object for real-time updates. + * + * Create subscription object which can be used to subscribe to the real-time updates sent to the specific channel. + * + * @param [subscriptionOptions] - Channel's subscription object behavior customization options. + * + * @returns Configured and ready to use channel's subscription object. + */ + subscription(subscriptionOptions?: SubscriptionOptions): Subscription; + } + + /** + * PubNub Stream / Channel group API interface. + */ + export class PubNubChannelGroups { + /** + * Fetch channel group channels. + * + * @param parameters - Request configuration parameters. + * @param callback - Request completion handler callback. + */ + listChannels( + parameters: ChannelGroups.ListChannelGroupChannelsParameters, + callback: ResultCallback, + ): void; + /** + * Fetch channel group channels. + * + * @param parameters - Request configuration parameters. + * + * @returns Asynchronous get channel group channels response. + */ + listChannels( + parameters: ChannelGroups.ListChannelGroupChannelsParameters, + ): Promise; + /** + * Fetch all channel groups. + * + * @param callback - Request completion handler callback. + * + * @deprecated + */ + listGroups(callback: ResultCallback): void; + /** + * Fetch all channel groups. + * + * @returns Asynchronous get all channel groups response. + * + * @deprecated + */ + listGroups(): Promise; + /** + * Add channels to the channel group. + * + * @param parameters - Request configuration parameters. + * @param callback - Request completion handler callback. + */ + addChannels(parameters: ChannelGroups.ManageChannelGroupChannelsParameters, callback: StatusCallback): void; + /** + * Add channels to the channel group. + * + * @param parameters - Request configuration parameters. + * + * @returns Asynchronous add channels to the channel group response. + */ + addChannels(parameters: ChannelGroups.ManageChannelGroupChannelsParameters): Promise>; + /** + * Remove channels from the channel group. + * + * @param parameters - Request configuration parameters. + * @param callback - Request completion handler callback. + */ + removeChannels(parameters: ChannelGroups.ManageChannelGroupChannelsParameters, callback: StatusCallback): void; + /** + * Remove channels from the channel group. + * + * @param parameters - Request configuration parameters. + * + * @returns Asynchronous remove channels from the channel group response. + */ + removeChannels(parameters: ChannelGroups.ManageChannelGroupChannelsParameters): Promise>; + /** + * Remove channel group. + * + * @param parameters - Request configuration parameters. + * @param callback - Request completion handler callback. + */ + deleteGroup(parameters: ChannelGroups.DeleteChannelGroupParameters, callback: StatusCallback): void; + /** + * Remove channel group. + * + * @param parameters - Request configuration parameters. + * + * @returns Asynchronous remove channel group response. + */ + deleteGroup(parameters: ChannelGroups.DeleteChannelGroupParameters): Promise>; + } + + /** + * PubNub Push Notifications API interface. + */ + export class PubNubPushNotifications { + /** + * Fetch device's push notification enabled channels. + * + * @param parameters - Request configuration parameters. + * @param callback - Request completion handler callback. + */ + listChannels( + parameters: Push.ListDeviceChannelsParameters, + callback: ResultCallback, + ): void; + /** + * Fetch device's push notification enabled channels. + * + * @param parameters - Request configuration parameters. + * + * @returns Asynchronous get device channels response. + */ + listChannels(parameters: Push.ListDeviceChannelsParameters): Promise; + /** + * Enable push notifications on channels for device. + * + * @param parameters - Request configuration parameters. + * @param callback - Request completion handler callback. + */ + addChannels(parameters: Push.ManageDeviceChannelsParameters, callback: StatusCallback): void; + /** + * Enable push notifications on channels for device. + * + * @param parameters - Request configuration parameters. + */ + addChannels(parameters: Push.ManageDeviceChannelsParameters): Promise; + /** + * Disable push notifications on channels for device. + * + * @param parameters - Request configuration parameters. + * @param callback - Request completion handler callback. + */ + removeChannels(parameters: Push.ManageDeviceChannelsParameters, callback: StatusCallback): void; + /** + * Disable push notifications on channels for device. + * + * @param parameters - Request configuration parameters. + */ + removeChannels(parameters: Push.ManageDeviceChannelsParameters): Promise; + /** + * Disable push notifications for device. + * + * @param parameters - Request configuration parameters. + * @param callback - Request completion handler callback. + */ + deleteDevice(parameters: Push.RemoveDeviceParameters, callback: StatusCallback): void; + /** + * Disable push notifications for device. + * + * @param parameters - Request configuration parameters. + */ + deleteDevice(parameters: Push.RemoveDeviceParameters): Promise; + } + + /** + * PubNub App Context API interface. + */ + export class PubNubObjects { + /** + * Fetch a paginated list of UUID Metadata objects. + * + * @param callback - Request completion handler callback. + */ + getAllUUIDMetadata( + callback: ResultCallback>, + ): void; + /** + * Fetch a paginated list of UUID Metadata objects. + * + * @param parameters - Request configuration parameters. + * @param callback - Request completion handler callback. + */ + getAllUUIDMetadata( + parameters: AppContext.GetAllMetadataParameters>, + callback: ResultCallback>, + ): void; + /** + * Fetch a paginated list of UUID Metadata objects. + * + * @param [parameters] - Request configuration parameters. + * + * @returns Asynchronous get all UUID metadata response. + */ + getAllUUIDMetadata( + parameters?: AppContext.GetAllMetadataParameters>, + ): Promise>; + /** + * Fetch UUID Metadata object for currently configured PubNub client `uuid`. + * + * @param callback - Request completion handler callback. + */ + getUUIDMetadata( + callback: ResultCallback>, + ): void; + /** + * Fetch a specific UUID Metadata object. + * + * @param parameters - Request configuration parameters. Will fetch UUID metadata object for + * currently configured PubNub client `uuid` if not set. + * @param callback - Request completion handler callback. + */ + getUUIDMetadata( + parameters: AppContext.GetUUIDMetadataParameters, + callback: ResultCallback>, + ): void; + /** + * Fetch a specific UUID Metadata object. + * + * @param [parameters] - Request configuration parameters. Will fetch UUID Metadata object for + * currently configured PubNub client `uuid` if not set. + * + * @returns Asynchronous get UUID metadata response. + */ + getUUIDMetadata( + parameters?: AppContext.GetUUIDMetadataParameters, + ): Promise>; + /** + * Update specific UUID Metadata object. + * + * @param parameters - Request configuration parameters. Will set UUID metadata for currently + * configured PubNub client `uuid` if not set. + * @param callback - Request completion handler callback. + */ + setUUIDMetadata( + parameters: AppContext.SetUUIDMetadataParameters, + callback: ResultCallback>, + ): void; + /** + * Update specific UUID Metadata object. + * + * @param parameters - Request configuration parameters. Will set UUID metadata for currently + * configured PubNub client `uuid` if not set. + * + * @returns Asynchronous set UUID metadata response. + */ + setUUIDMetadata( + parameters: AppContext.SetUUIDMetadataParameters, + ): Promise>; + /** + * Remove UUID Metadata object for currently configured PubNub client `uuid`. + * + * @param callback - Request completion handler callback. + */ + removeUUIDMetadata(callback: ResultCallback): void; + /** + * Remove a specific UUID Metadata object. + * + * @param parameters - Request configuration parameters. Will remove UUID metadata for currently + * configured PubNub client `uuid` if not set. + * @param callback - Request completion handler callback. + */ + removeUUIDMetadata( + parameters: AppContext.RemoveUUIDMetadataParameters, + callback: ResultCallback, + ): void; + /** + * Remove a specific UUID Metadata object. + * + * @param [parameters] - Request configuration parameters. Will remove UUID metadata for currently + * configured PubNub client `uuid` if not set. + * + * @returns Asynchronous UUID metadata remove response. + */ + removeUUIDMetadata( + parameters?: AppContext.RemoveUUIDMetadataParameters, + ): Promise; + /** + * Fetch a paginated list of Channel Metadata objects. + * + * @param callback - Request completion handler callback. + */ + getAllChannelMetadata( + callback: ResultCallback>, + ): void; + /** + * Fetch a paginated list of Channel Metadata objects. + * + * @param parameters - Request configuration parameters. + * @param callback - Request completion handler callback. + */ + getAllChannelMetadata( + parameters: AppContext.GetAllMetadataParameters>, + callback: ResultCallback>, + ): void; + /** + * Fetch a paginated list of Channel Metadata objects. + * + * @param [parameters] - Request configuration parameters. + * + * @returns Asynchronous get all Channel metadata response. + */ + getAllChannelMetadata( + parameters?: AppContext.GetAllMetadataParameters>, + ): Promise>; + /** + * Fetch Channel Metadata object. + * + * @param parameters - Request configuration parameters. + * @param callback - Request completion handler callback. + */ + getChannelMetadata( + parameters: AppContext.GetChannelMetadataParameters, + callback: ResultCallback>, + ): void; + /** + * Fetch a specific Channel Metadata object. + * + * @param parameters - Request configuration parameters. + * + * @returns Asynchronous get Channel metadata response. + */ + getChannelMetadata( + parameters: AppContext.GetChannelMetadataParameters, + ): Promise>; + /** + * Update specific Channel Metadata object. + * + * @param parameters - Request configuration parameters. + * @param callback - Request completion handler callback. + */ + setChannelMetadata( + parameters: AppContext.SetChannelMetadataParameters, + callback: ResultCallback>, + ): void; + /** + * Update specific Channel Metadata object. + * + * @param parameters - Request configuration parameters. + * + * @returns Asynchronous set Channel metadata response. + */ + setChannelMetadata( + parameters: AppContext.SetChannelMetadataParameters, + ): Promise>; + /** + * Remove Channel Metadata object. + * + * @param parameters - Request configuration parameters. + * @param callback - Request completion handler callback. + */ + removeChannelMetadata( + parameters: AppContext.RemoveChannelMetadataParameters, + callback: ResultCallback, + ): void; + /** + * Remove a specific Channel Metadata object. + * + * @param parameters - Request configuration parameters. + * + * @returns Asynchronous Channel metadata remove response. + */ + removeChannelMetadata( + parameters: AppContext.RemoveChannelMetadataParameters, + ): Promise; + /** + * Fetch a paginated list of Channel Member objects. + * + * @param parameters - Request configuration parameters. + * @param callback - Request completion handler callback. + */ + getChannelMembers< + MemberCustom extends AppContext.CustomData = AppContext.CustomData, + UUIDCustom extends AppContext.CustomData = AppContext.CustomData, + >( + parameters: AppContext.GetMembersParameters, + callback: ResultCallback>, + ): void; + /** + * Fetch a paginated list of Channel Member objects. + * + * @param parameters - Request configuration parameters. + * + * @returns Asynchronous get Channel Members response. + */ + getChannelMembers< + MemberCustom extends AppContext.CustomData = AppContext.CustomData, + UUIDCustom extends AppContext.CustomData = AppContext.CustomData, + >(parameters: AppContext.GetMembersParameters): Promise>; + /** + * Update specific Channel Members list. + * + * @param parameters - Request configuration parameters. + * @param callback - Request completion handler callback. + */ + setChannelMembers< + MemberCustom extends AppContext.CustomData = AppContext.CustomData, + UUIDCustom extends AppContext.CustomData = AppContext.CustomData, + >( + parameters: AppContext.SetChannelMembersParameters, + callback: ResultCallback>, + ): void; + /** + * Update specific Channel Members list. + * + * @param parameters - Request configuration parameters. + * + * @returns Asynchronous update Channel Members list response. + */ + setChannelMembers< + MemberCustom extends AppContext.CustomData = AppContext.CustomData, + UUIDCustom extends AppContext.CustomData = AppContext.CustomData, + >( + parameters: AppContext.SetChannelMembersParameters, + ): Promise>; + /** + * Remove Members from the Channel. + * + * @param parameters - Request configuration parameters. + * @param callback - Request completion handler callback. + */ + removeChannelMembers< + MemberCustom extends AppContext.CustomData = AppContext.CustomData, + UUIDCustom extends AppContext.CustomData = AppContext.CustomData, + >( + parameters: AppContext.RemoveMembersParameters, + callback: ResultCallback>, + ): void; + /** + * Remove Members from the Channel. + * + * @param parameters - Request configuration parameters. + * + * @returns Asynchronous Channel Members remove response. + */ + removeChannelMembers< + MemberCustom extends AppContext.CustomData = AppContext.CustomData, + UUIDCustom extends AppContext.CustomData = AppContext.CustomData, + >( + parameters: AppContext.RemoveMembersParameters, + ): Promise>; + /** + * Fetch a specific UUID Memberships list for currently configured PubNub client `uuid`. + * + * @param callback - Request completion handler callback. + * + * @returns Asynchronous get UUID Memberships list response or `void` in case if `callback` + * provided. + */ + getMemberships< + MembershipCustom extends AppContext.CustomData = AppContext.CustomData, + ChannelCustom extends AppContext.CustomData = AppContext.CustomData, + >(callback: ResultCallback>): void; + /** + * Fetch a specific UUID Memberships list. + * + * @param parameters - Request configuration parameters. + * @param callback - Request completion handler callback. + */ + getMemberships< + MembershipCustom extends AppContext.CustomData = AppContext.CustomData, + ChannelCustom extends AppContext.CustomData = AppContext.CustomData, + >( + parameters: AppContext.GetMembershipsParameters, + callback: ResultCallback>, + ): void; + /** + * Fetch a specific UUID Memberships list. + * + * @param [parameters] - Request configuration parameters. Will fetch UUID Memberships list for + * currently configured PubNub client `uuid` if not set. + * + * @returns Asynchronous get UUID Memberships list response. + */ + getMemberships< + MembershipCustom extends AppContext.CustomData = AppContext.CustomData, + ChannelCustom extends AppContext.CustomData = AppContext.CustomData, + >( + parameters?: AppContext.GetMembershipsParameters, + ): Promise>; + /** + * Update specific UUID Memberships list. + * + * @param parameters - Request configuration parameters. + * @param callback - Request completion handler callback. + */ + setMemberships< + MembershipCustom extends AppContext.CustomData = AppContext.CustomData, + ChannelCustom extends AppContext.CustomData = AppContext.CustomData, + >( + parameters: AppContext.SetMembershipsParameters, + callback: ResultCallback>, + ): void; + /** + * Update specific UUID Memberships list. + * + * @param parameters - Request configuration parameters or callback from overload. + * + * @returns Asynchronous update UUID Memberships list response. + */ + setMemberships< + MembershipCustom extends AppContext.CustomData = AppContext.CustomData, + ChannelCustom extends AppContext.CustomData = AppContext.CustomData, + >( + parameters: AppContext.SetMembershipsParameters, + ): Promise>; + /** + * Remove a specific UUID Memberships. + * + * @param parameters - Request configuration parameters. + * @param callback - Request completion handler callback. + */ + removeMemberships< + MembershipCustom extends AppContext.CustomData = AppContext.CustomData, + ChannelCustom extends AppContext.CustomData = AppContext.CustomData, + >( + parameters: AppContext.RemoveMembershipsParameters, + callback: ResultCallback>, + ): void; + /** + * Remove a specific UUID Memberships. + * + * @param parameters - Request configuration parameters. + * + * @returns Asynchronous UUID Memberships remove response. + */ + removeMemberships< + MembershipCustom extends AppContext.CustomData = AppContext.CustomData, + ChannelCustom extends AppContext.CustomData = AppContext.CustomData, + >( + parameters: AppContext.RemoveMembershipsParameters, + ): Promise>; + /** + * Fetch paginated list of specific Space members or specific User memberships. + * + * @param parameters - Request configuration parameters. + * @param [callback] - Request completion handler callback. + * + * @returns Asynchronous get specific Space members or specific User memberships response. + * + * @deprecated Use {@link PubNubObjects#getChannelMembers} or {@link PubNubObjects#getMemberships} methods instead. + */ + fetchMemberships< + RelationCustom extends AppContext.CustomData = AppContext.CustomData, + MetadataCustom extends AppContext.CustomData = AppContext.CustomData, + >( + parameters: AppContext.GetMembershipsParameters | AppContext.GetMembersParameters, + callback?: ResultCallback< + | AppContext.SpaceMembershipsResponse + | AppContext.UserMembersResponse + >, + ): Promise< + | AppContext.SpaceMembershipsResponse + | AppContext.UserMembersResponse + | void + >; + /** + * Add members to specific Space or memberships specific User. + * + * @param parameters - Request configuration parameters. + * @param [callback] - Request completion handler callback. + * + * @returns Asynchronous add members to specific Space or memberships specific User response or + * `void` in case if `callback` provided. + * + * @deprecated Use {@link PubNubObjects#setChannelMembers} or {@link PubNubObjects#setMemberships} methods instead. + */ + addMemberships< + Custom extends AppContext.CustomData = AppContext.CustomData, + MetadataCustom extends AppContext.CustomData = AppContext.CustomData, + >( + parameters: AppContext.SetMembershipsParameters | AppContext.SetChannelMembersParameters, + callback?: ResultCallback< + | AppContext.SetMembershipsResponse + | AppContext.SetMembersResponse + >, + ): Promise< + | AppContext.SetMembershipsResponse + | AppContext.SetMembersResponse + | void + >; + } + + export namespace Subscription { + /** + * Time cursor. + * + * Cursor used by subscription loop to identify point in time after which updates will be + * delivered. + */ + export type SubscriptionCursor = { + /** + * PubNub high-precision timestamp. + * + * Aside of specifying exact time of receiving data / event this token used to catchup / + * follow on real-time updates. + */ + timetoken: string | number; + /** + * Data center region for which `timetoken` has been generated. + */ + region?: number; + }; + + /** + * Common real-time event. + */ + type Event = { + /** + * Channel to which real-time event has been sent. + */ + channel: string; + /** + * Actual subscription at which real-time event has been received. + * + * PubNub client provide various ways to subscribe to the real-time stream: channel groups, + * wildcard subscription, and spaces. + * + * **Note:** Value will be `null` if it is the same as {@link channel}. + */ + subscription: string | null; + /** + * High-precision PubNub timetoken with time when event has been received by PubNub services. + */ + timetoken: string; + }; + + /** + * Common legacy real-time event for backward compatibility. + */ + type LegacyEvent = Event & { + /** + * Channel to which real-time event has been sent. + * + * @deprecated Use {@link channel} field instead. + */ + actualChannel?: string | null; + /** + * Actual subscription at which real-time event has been received. + * + * @deprecated Use {@link subscription} field instead. + */ + subscribedChannel?: string; + }; + + /** + * Presence change real-time event. + */ + export type Presence = LegacyEvent & PresenceData; + + /** + * Extended presence real-time event. + * + * Type extended for listener manager support. + */ + type PresenceEvent = { + type: PubNubEventType.Presence; + data: Presence; + }; + + /** + * Common published data information. + */ + type PublishedData = { + /** + * Unique identifier of the user which sent data. + */ + publisher?: string; + /** + * Additional user-provided metadata which can be used with real-time filtering expression. + */ + userMetadata?: { + [p: string]: Payload; + }; + /** + * Sent data. + */ + message: Payload; + }; + + /** + * Real-time message event. + */ + export type Message = LegacyEvent & + PublishedData & { + /** + * Decryption error message in case of failure. + */ + error?: string; + }; + + /** + * Extended real-time message event. + * + * Type extended for listener manager support. + */ + type MessageEvent = { + type: PubNubEventType.Message; + data: Message; + }; + + /** + * Real-time signal event. + */ + export type Signal = Event & PublishedData; + + /** + * Extended real-time signal event. + * + * Type extended for listener manager support. + */ + type SignalEvent = { + type: PubNubEventType.Signal; + data: Signal; + }; + + /** + * Message action real-time event. + */ + export type MessageAction = Event & + Omit & { + /** + * Unique identifier of the user which added message reaction. + * + * @deprecated Use `data.uuid` field instead. + */ + publisher?: string; + data: MessageActionData['data'] & { + /** + * Unique identifier of the user which added message reaction. + */ + uuid: string; + }; + }; + + /** + * Extended message action real-time event. + * + * Type extended for listener manager support. + */ + type MessageActionEvent = { + type: PubNubEventType.MessageAction; + data: MessageAction; + }; + + /** + * App Context Object change real-time event. + */ + export type AppContextObject = Event & { + /** + * Information about App Context object for which event received. + */ + message: AppContextObjectData; + }; + + /** + * `User` App Context Object change real-time event. + */ + export type UserAppContextObject = Omit & { + /** + * Space to which real-time event has been sent. + */ + spaceId: string; + /** + * Information about User Object for which event received. + */ + message: UserObjectData; + }; + + /** + * `Space` App Context Object change real-time event. + */ + export type SpaceAppContextObject = Omit & { + /** + * Space to which real-time event has been sent. + */ + spaceId: string; + /** + * Information about `Space` Object for which event received. + */ + message: SpaceObjectData; + }; + + /** + * VSP `Membership` App Context Object change real-time event. + */ + export type VSPMembershipAppContextObject = Omit & { + /** + * Space to which real-time event has been sent. + */ + spaceId: string; + /** + * Information about `Membership` Object for which event received. + */ + message: VSPMembershipObjectData; + }; + + /** + * Extended App Context Object change real-time event. + * + * Type extended for listener manager support. + */ + type AppContextEvent = { + type: PubNubEventType.AppContext; + data: AppContextObject; + }; + + /** + * File real-time event. + */ + export type File = Event & + Omit & + Omit & { + /** + * Message which has been associated with uploaded file. + */ + message?: Payload; + /** + * Information about uploaded file. + */ + file?: FileData['file'] & { + /** + * File download url. + */ + url: string; + }; + /** + * Decryption error message in case of failure. + */ + error?: string; + }; + + /** + * Extended File real-time event. + * + * Type extended for listener manager support. + */ + type FileEvent = { + type: PubNubEventType.Files; + data: File; + }; + + /** + * Subscribe request parameters. + */ + export type SubscribeParameters = { + /** + * List of channels from which real-time events should be delivered. + * + * @default `,` if {@link channelGroups} is set. + */ + channels?: string[]; + /** + * List of channel groups from which real-time events should be retrieved. + */ + channelGroups?: string[]; + /** + * Next subscription loop timetoken. + */ + timetoken?: string | number; + /** + * Whether should subscribe to channels / groups presence announcements or not. + * + * @default `false` + */ + withPresence?: boolean; + /** + * Presence information which should be associated with `userId`. + * + * `state` information will be associated with `userId` on channels mentioned as keys in + * this object. + * + * @deprecated Use set state methods to specify associated user's data instead of passing to + * subscribe. + */ + state?: Record; + /** + * Whether should subscribe to channels / groups presence announcements or not. + * + * @default `false` + */ + withHeartbeats?: boolean; + }; + + /** + * Service success response. + */ + export type SubscriptionResponse = { + cursor: SubscriptionCursor; + messages: (PresenceEvent | MessageEvent | SignalEvent | MessageActionEvent | AppContextEvent | FileEvent)[]; + }; + } + + export namespace AppContext { + /** + * Partial nullability helper type. + */ + type PartialNullable = { + [P in keyof T]?: T[P] | null; + }; + + /** + * Custom data which should be associated with metadata objects or their relation. + */ + export type CustomData = { + [key: string]: string | number | boolean | null; + }; + + /** + * Type provides shape of App Context parameters which is common to the all objects types to + * be updated. + */ + type ObjectParameters = { + custom?: Custom; + }; + + /** + * Type provides shape of App Context object which is common to the all objects types received + * from the PubNub service. + */ + export type ObjectData = { + /** + * Unique App Context object identifier. + * + * **Important:** For channel it is different from the channel metadata object name. + */ + id: string; + /** + * Last date and time when App Context object has been updated. + * + * String built from date using ISO 8601. + */ + updated: string; + /** + * App Context version hash. + */ + eTag: string; + /** + * Additional data associated with App Context object. + * + * **Important:** Values must be scalars; only arrays or objects are supported. + * {@link /docs/sdks/javascript/api-reference/objects#app-context-filtering-language-definition|App Context + * filtering language} doesn’t support filtering by custom properties. + */ + custom?: Custom | null; + }; + + /** + * Type provides shape of object which let establish relation between metadata objects. + */ + type ObjectsRelation = { + /** + * App Context object unique identifier. + */ + id: string; + /** + * App Context objects relation status. + */ + status?: string; + /** + * Additional data associated with App Context object relation (membership or members). + * + * **Important:** Values must be scalars; only arrays or objects are supported. + * {@link /docs/sdks/javascript/api-reference/objects#app-context-filtering-language-definition|App Context + * filtering language} doesn’t support filtering by custom properties. + */ + custom?: Custom; + }; + + /** + * Response page cursor. + */ + type Page = { + /** + * Random string returned from the server, indicating a specific position in a data set. + * + * Used for forward pagination, it fetches the next page, allowing you to continue from where + * you left off. + */ + next?: string; + /** + * Random string returned from the server, indicating a specific position in a data set. + * + * Used for backward pagination, it fetches the previous page, enabling access to earlier + * data. + * + * **Important:** Ignored if the `next` parameter is supplied. + */ + prev?: string; + }; + + /** + * Metadata objects include options. + * + * Allows to configure what additional information should be included into service response. + */ + type IncludeOptions = { + /** + * Whether to include total number of App Context objects in the response. + * + * @default `false` + */ + totalCount?: boolean; + /** + * Whether to include App Context object `custom` field in the response. + * + * @default `false` + */ + customFields?: boolean; + }; + + /** + * Membership objects include options. + * + * Allows to configure what additional information should be included into service response. + */ + type MembershipsIncludeOptions = IncludeOptions & { + /** + * Whether to include all {@link ChannelMetadata} fields in the response. + * + * @default `false` + */ + channelFields?: boolean; + /** + * Whether to include {@link ChannelMetadata} `custom` field in the response. + * + * @default `false` + */ + customChannelFields?: boolean; + /** + * Whether to include the membership's status field in the response. + * + * @default `false` + */ + statusField?: boolean; + /** + * Whether to include the channel's status field in the response. + * + * @default `false` + */ + channelStatusField?: boolean; + /** + * Whether to include channel's type fields in the response. + * + * @default `false` + */ + channelTypeField?: boolean; + }; + + /** + * Members objects include options. + * + * Allows to configure what additional information should be included into service response. + */ + type MembersIncludeOptions = IncludeOptions & { + /** + * Whether to include all {@link UUIMetadata} fields in the response. + * + * @default `false` + */ + UUIDFields?: boolean; + /** + * Whether to include {@link UUIMetadata} `custom` field in the response. + * + * @default `false` + */ + customUUIDFields?: boolean; + /** + * Whether to include the members's status field in the response. + * + * @default `false` + */ + statusField?: boolean; + /** + * Whether to include the user's status field in the response. + * + * @default `false` + */ + UUIDStatusField?: boolean; + /** + * Whether to include user's type fields in the response. + * + * @default `false` + */ + UUIDTypeField?: boolean; + }; + + /** + * Type provides shape of App Context parameters which is common to the all objects types to + * fetch them by pages. + */ + type PagedRequestParameters = { + /** + * Fields which can be additionally included into response. + */ + include?: Include; + /** + * Expression used to filter the results. + * + * Only objects whose properties satisfy the given expression are returned. The filter language is + * {@link /docs/sdks/javascript/api-reference/objects#app-context-filtering-language-definition|defined here}. + */ + filter?: string; + /** + * Fetched App Context objects sorting options. + */ + sort?: Sort; + /** + * Number of objects to return in response. + * + * **Important:** Maximum for this API is `100` objects per-response. + * + * @default `100` + */ + limit?: number; + /** + * Response pagination configuration. + */ + page?: Page; + }; + + /** + * Type provides shape of App Context object fetch response which is common to the all objects + * types received from the PubNub service. + */ + type ObjectResponse = { + /** + * App Context objects list fetch result status code. + */ + status: number; + /** + * Received App Context object information. + */ + data: ObjectType; + }; + + /** + * Type provides shape of App Context objects fetch response which is common to the all + * objects types received from the PubNub service. + */ + type PagedResponse = ObjectResponse & { + /** + * Total number of App Context objects in the response. + */ + totalCount?: number; + /** + * Random string returned from the server, indicating a specific position in a data set. + * + * Used for forward pagination, it fetches the next page, allowing you to continue from where + * you left off. + */ + next?: string; + /** + * Random string returned from the server, indicating a specific position in a data set. + * + * Used for backward pagination, it fetches the previous page, enabling access to earlier + * data. + * + * **Important:** Ignored if the `next` parameter is supplied. + */ + prev?: string; + }; + + /** + * Key-value pair of a property to sort by, and a sort direction. + */ + type MetadataSortingOptions = + | keyof Omit + | ({ + [K in keyof Omit]?: 'asc' | 'desc' | null; + } & { + [key: `custom.${string}`]: 'asc' | 'desc' | null; + }); + + /** + * Key-value pair of a property to sort by, and a sort direction. + */ + type MembershipsSortingOptions = + | 'channel.id' + | 'channel.name' + | 'channel.description' + | 'channel.updated' + | 'space.id' + | 'space.name' + | 'space.description' + | 'space.updated' + | 'updated' + | { + /** + * Sort results by channel's `id` in ascending (`asc`) or descending (`desc`) order. + * + * Specify `null` for default sorting direction (ascending). + */ + 'channel.id'?: 'asc' | 'desc' | null; + /** + * Sort results by channel's `name` in ascending (`asc`) or descending (`desc`) order. + * + * Specify `null` for default sorting direction (ascending). + */ + 'channel.name'?: 'asc' | 'desc' | null; + /** + * Sort results by channel's `description` in ascending (`asc`) or descending (`desc`) order. + * + * Specify `null` for default sorting direction (ascending). + */ + 'channel.description'?: 'asc' | 'desc' | null; + /** + * Sort results by channel's `update` in ascending (`asc`) or descending (`desc`) order. + * + * Specify `null` for default sorting direction (ascending). + */ + 'channel.updated'?: 'asc' | 'desc' | null; + /** + * Sort results by channel's `id` in ascending (`asc`) or descending (`desc`) order. + * + * Specify `null` for default sorting direction (ascending). + * + * @deprecated Use `channel.id` instead. + */ + 'space.id'?: 'asc' | 'desc' | null; + /** + * Sort results by channel's `name` in ascending (`asc`) or descending (`desc`) order. + * + * Specify `null` for default sorting direction (ascending). + * + * @deprecated Use `channel.name` instead. + */ + 'space.name'?: 'asc' | 'desc' | null; + /** + * Sort results by channel's `description` in ascending (`asc`) or descending (`desc`) order. + * + * Specify `null` for default sorting direction (ascending). + * + * @deprecated Use `channel.name` instead. + */ + 'space.description'?: 'asc' | 'desc' | null; + /** + * Sort results by channel's `update` in ascending (`asc`) or descending (`desc`) order. + * + * Specify `null` for default sorting direction (ascending). + * + * @deprecated Use `channel.updated` instead. + */ + 'space.updated'?: 'asc' | 'desc' | null; + /** + * Sort results by `updated` in ascending (`asc`) or descending (`desc`) order. + * + * Specify `null` for default sorting direction (ascending). + */ + updated?: 'asc' | 'desc' | null; + }; + + /** + * Key-value pair of a property to sort by, and a sort direction. + */ + type MembersSortingOptions = + | 'uuid.id' + | 'uuid.name' + | 'uuid.updated' + | 'user.id' + | 'user.name' + | 'user.updated' + | 'updated' + | { + /** + * Sort results by user's `id` in ascending (`asc`) or descending (`desc`) order. + * + * Specify `null` for default sorting direction (ascending). + */ + 'uuid.id'?: 'asc' | 'desc' | null; + /** + * Sort results by user's `name` in ascending (`asc`) or descending (`desc`) order. + * + * Specify `null` for default sorting direction (ascending). + */ + 'uuid.name'?: 'asc' | 'desc' | null; + /** + * Sort results by user's `update` in ascending (`asc`) or descending (`desc`) order. + * + * Specify `null` for default sorting direction (ascending). + */ + 'uuid.updated'?: 'asc' | 'desc' | null; + /** + * Sort results by user's `id` in ascending (`asc`) or descending (`desc`) order. + * + * Specify `null` for default sorting direction (ascending). + * + * @deprecated Use `uuid.id` instead. + */ + 'user.id'?: 'asc' | 'desc' | null; + /** + * Sort results by user's `name` in ascending (`asc`) or descending (`desc`) order. + * + * Specify `null` for default sorting direction (ascending). + * + * @deprecated Use `uuid.name` instead. + */ + 'user.name'?: 'asc' | 'desc' | null; + /** + * Sort results by user's `update` in ascending (`asc`) or descending (`desc`) order. + * + * Specify `null` for default sorting direction (ascending). + * + * @deprecated Use `uuid.updated` instead. + */ + 'user.updated'?: 'asc' | 'desc' | null; + /** + * Sort results by `updated` in ascending (`asc`) or descending (`desc`) order. + * + * Specify `null` for default sorting direction (ascending). + */ + updated?: 'asc' | 'desc' | null; + }; + + /** + * Fetch All UUID or Channel Metadata request parameters. + */ + export type GetAllMetadataParameters = PagedRequestParameters< + IncludeOptions, + MetadataSortingOptions + >; + + /** + * Type which describes own UUID metadata object fields. + */ + type UUIDMetadataFields = { + /** + * Display name for the user. + */ + name?: string; + /** + * The user's email address. + */ + email?: string; + /** + * User's identifier in an external system. + */ + externalId?: string; + /** + * The URL of the user's profile picture. + */ + profileUrl?: string; + /** + * User's object type information. + */ + type?: string; + /** + * User's object status. + */ + status?: string; + }; + + /** + * Updated UUID metadata object. + * + * Type represents updated UUID metadata object which will be pushed to the PubNub service. + */ + type UUIDMetadata = ObjectParameters & Partial; + + /** + * Received UUID metadata object. + * + * Type represents UUID metadata retrieved from the PubNub service. + */ + export type UUIDMetadataObject = ObjectData & + PartialNullable; + + /** + * Response with fetched page of UUID metadata objects. + */ + export type GetAllUUIDMetadataResponse = PagedResponse>; + + /** + * Fetch UUID Metadata request parameters. + */ + export type GetUUIDMetadataParameters = { + /** + * Unique user identifier. + * + * **Important:** If not supplied then current user's uuid is used. + * + * @default Current `uuid`. + */ + uuid?: string; + /** + * Unique user identifier. + * + * **Important:** If not supplied then current user's uuid is used. + * + * @default Current `userId`. + * + * @deprecated Use `getUUIDMetadata()` method instead. + */ + userId?: string; + /** + * Fields which can be additionally included into response. + */ + include?: Omit; + }; + + /** + * Response with requested UUID metadata object. + */ + export type GetUUIDMetadataResponse = ObjectResponse>; + + /** + * Update UUID Metadata request parameters. + */ + export type SetUUIDMetadataParameters = { + /** + * Unique user identifier. + * + * **Important:** If not supplied then current user's uuid is used. + * + * @default Current `uuid`. + */ + uuid?: string; + /** + * Unique user identifier. + * + * **Important:** If not supplied then current user's uuid is used. + * + * @default Current `userId`. + * + * @deprecated Use `setUUIDMetadata()` method instead. + */ + userId?: string; + /** + * Metadata, which should be associated with UUID. + */ + data: UUIDMetadata; + /** + * Fields which can be additionally included into response. + */ + include?: Omit; + }; + + /** + * Response with result of the UUID metadata object update. + */ + export type SetUUIDMetadataResponse = ObjectResponse>; + + /** + * Remove UUID Metadata request parameters. + */ + export type RemoveUUIDMetadataParameters = { + /** + * Unique user identifier. + * + * **Important:** If not supplied then current user's uuid is used. + * + * @default Current `uuid`. + */ + uuid?: string; + /** + * Unique user identifier. + * + * **Important:** If not supplied then current user's uuid is used. + * + * @default Current `userId`. + * + * @deprecated Use `removeUUIDMetadata()` method instead. + */ + userId?: string; + }; + + /** + * Response with result of the UUID metadata removal. + */ + export type RemoveUUIDMetadataResponse = ObjectResponse>; + + /** + * Type which describes own Channel metadata object fields. + */ + type ChannelMetadataFields = { + /** + * Name of a channel. + */ + name?: string; + /** + * Description of a channel. + */ + description?: string; + /** + * Channel's object type information. + */ + type?: string; + /** + * Channel's object status. + */ + status?: string; + }; + + /** + * Updated channel metadata object. + * + * Type represents updated channel metadata object which will be pushed to the PubNub service. + */ + type ChannelMetadata = ObjectParameters & Partial; + + /** + * Received channel metadata object. + * + * Type represents chanel metadata retrieved from the PubNub service. + */ + export type ChannelMetadataObject = ObjectData & + PartialNullable; + + /** + * Response with fetched page of channel metadata objects. + */ + export type GetAllChannelMetadataResponse = PagedResponse>; + + /** + * Fetch Channel Metadata request parameters. + */ + export type GetChannelMetadataParameters = { + /** + * Channel name. + */ + channel: string; + /** + * Space identifier. + * + * @deprecated Use `getChannelMetadata()` method instead. + */ + spaceId?: string; + /** + * Fields which can be additionally included into response. + */ + include?: Omit; + }; + + /** + * Response with requested channel metadata object. + */ + export type GetChannelMetadataResponse = ObjectResponse>; + + /** + * Update Channel Metadata request parameters. + */ + export type SetChannelMetadataParameters = { + /** + * Channel name. + */ + channel: string; + /** + * Space identifier. + * + * @deprecated Use `setChannelMetadata()` method instead. + */ + spaceId?: string; + /** + * Metadata, which should be associated with UUID. + */ + data: ChannelMetadata; + /** + * Fields which can be additionally included into response. + */ + include?: Omit; + }; + + /** + * Response with result of the channel metadata object update. + */ + export type SetChannelMetadataResponse = ObjectResponse>; + + /** + * Remove Channel Metadata request parameters. + */ + export type RemoveChannelMetadataParameters = { + /** + * Channel name. + */ + channel: string; + /** + * Space identifier. + * + * @deprecated Use `removeChannelMetadata()` method instead. + */ + spaceId?: string; + }; + + /** + * Response with result of the channel metadata removal. + */ + export type RemoveChannelMetadataResponse = ObjectResponse>; + + /** + * Related channel metadata object. + * + * Type represents chanel metadata which has been used to create membership relation with UUID. + */ + type MembershipsObject = Omit< + ObjectData, + 'id' + > & { + channel: + | ChannelMetadataObject + | { + id: string; + }; + }; + + /** + * Response with fetched page of UUID membership objects. + */ + type MembershipsResponse = PagedResponse< + MembershipsObject + >; + + /** + * Fetch Memberships request parameters. + */ + export type GetMembershipsParameters = PagedRequestParameters< + MembershipsIncludeOptions, + MembershipsSortingOptions + > & { + /** + * Unique user identifier. + * + * **Important:** If not supplied then current user's uuid is used. + * + * @default Current `uuid`. + */ + uuid?: string; + /** + * Unique user identifier. + * + * **Important:** If not supplied then current user's uuid is used. + * + * @default Current `uuidId`. + * + * @deprecated Use `uuid` field instead. + */ + userId?: string; + }; + + /** + * Response with requested channel memberships information. + */ + export type GetMembershipsResponse< + MembershipCustom extends CustomData, + ChannelCustom extends CustomData, + > = MembershipsResponse; + + /** + * Update Memberships request parameters. + */ + export type SetMembershipsParameters = PagedRequestParameters< + Omit, + MembershipsSortingOptions + > & { + /** + * Unique user identifier. + * + * **Important:** If not supplied then current user's uuid is used. + * + * @default Current `uuid`. + */ + uuid?: string; + /** + * Unique user identifier. + * + * **Important:** If not supplied then current user's uuid is used. + * + * @default Current `userId`. + * + * @deprecated Use `uuid` field instead. + */ + userId?: string; + /** + * List of channels with which UUID membership should be established. + */ + channels: Array>; + /** + * List of channels with which UUID membership should be established. + * + * @deprecated Use `channels` field instead. + */ + spaces?: Array< + | string + | (Omit, 'id'> & { + /** + * Unique Space object identifier. + */ + spaceId: string; + }) + >; + }; + + /** + * Response with requested channel memberships information change. + */ + export type SetMembershipsResponse< + MembershipCustom extends CustomData, + ChannelCustom extends CustomData, + > = MembershipsResponse; + + /** + * Remove Memberships request parameters. + */ + export type RemoveMembershipsParameters = PagedRequestParameters< + MembershipsIncludeOptions, + MembershipsSortingOptions + > & { + /** + * Unique user identifier. + * + * **Important:** If not supplied then current user's uuid is used. + * + * @default Current `uuid`. + */ + uuid?: string; + /** + * Unique user identifier. + * + * **Important:** If not supplied then current user's uuid is used. + * + * @default Current `userId`. + * + * @deprecated Use {@link uuid} field instead. + */ + userId?: string; + /** + * List of channels for which membership which UUID should be removed. + */ + channels: string[]; + /** + * List of space names for which membership which UUID should be removed. + * + * @deprecated Use {@link channels} field instead. + */ + spaceIds?: string[]; + }; + + /** + * Response with remaining memberships. + */ + export type RemoveMembershipsResponse< + MembershipCustom extends CustomData, + ChannelCustom extends CustomData, + > = MembershipsResponse; + + /** + * Related UUID metadata object. + * + * Type represents UUID metadata which has been used to when added members to the channel. + */ + type MembersObject = Omit< + ObjectData, + 'id' + > & { + uuid: + | UUIDMetadataObject + | { + id: string; + }; + }; + + /** + * Response with fetched page of channel member objects. + */ + type MembersResponse = PagedResponse< + MembersObject + >; + + /** + * Fetch Members request parameters. + */ + export type GetMembersParameters = PagedRequestParameters & { + /** + * Channel name. + */ + channel: string; + /** + * Space identifier. + * + * @deprecated Use `channel` field instead. + */ + spaceId?: string; + }; + + /** + * Response with requested channel memberships information. + */ + export type GetMembersResponse = MembersResponse< + MembersCustom, + UUIDCustom + >; + + /** + * Update Members request parameters. + */ + export type SetChannelMembersParameters = PagedRequestParameters< + Omit, + MembersSortingOptions + > & { + /** + * Channel name. + */ + channel: string; + /** + * Space identifier. + * + * @deprecated Use `channel` field instead. + */ + spaceId?: string; + /** + * List of UUIDs which should be added as `channel` members. + */ + uuids: Array>; + /** + * List of UUIDs which should be added as `channel` members. + * + * @deprecated Use `uuids` field instead. + */ + users?: Array< + | string + | (Omit, 'id'> & { + /** + * Unique User object identifier. + */ + userId: string; + }) + >; + }; + + /** + * Response with requested channel members information change. + */ + export type SetMembersResponse = MembersResponse< + MemberCustom, + UUIDCustom + >; + + /** + * Remove Members request parameters. + */ + export type RemoveMembersParameters = PagedRequestParameters & { + /** + * Channel name. + */ + channel: string; + /** + * Space identifier. + * + * @deprecated Use {@link channel} field instead. + */ + spaceId?: string; + /** + * List of UUIDs which should be removed from the `channel` members list. + * removed. + */ + uuids: string[]; + /** + * List of user identifiers which should be removed from the `channel` members list. + * removed. + * + * @deprecated Use {@link uuids} field instead. + */ + userIds?: string[]; + }; + + /** + * Response with remaining members. + */ + export type RemoveMembersResponse = MembersResponse< + MemberCustom, + UUIDCustom + >; + + /** + * Related User metadata object. + * + * Type represents User metadata which has been used to when added members to the Space. + */ + type UserMembersObject = Omit< + ObjectData, + 'id' + > & { + user: + | UUIDMetadataObject + | { + id: string; + }; + }; + + /** + * Response with fetched page of Space member objects. + */ + export type UserMembersResponse = PagedResponse< + UserMembersObject + >; + + type SpaceMembershipObject = Omit< + ObjectData, + 'id' + > & { + space: + | ChannelMetadataObject + | { + id: string; + }; + }; + + /** + * Response with fetched page of User membership objects. + */ + export type SpaceMembershipsResponse< + MembershipCustom extends CustomData, + ChannelCustom extends CustomData, + > = PagedResponse>; + } + + export namespace ChannelGroups { + /** + * Add or remove Channels to the channel group request parameters. + */ + export type ManageChannelGroupChannelsParameters = { + /** + * Name of the channel group for which channels list should be changed. + */ + channelGroup: string; + /** + * List of channels to be added or removed. + */ + channels: string[]; + }; + + /** + * Channel group channels list manage response. + */ + export type ManageChannelGroupChannelsResponse = Record; + + /** + * Response with result of the all channel groups list. + */ + export type ListAllChannelGroupsResponse = { + /** + * All channel groups with channels. + */ + groups: string[]; + }; + + /** + * List Channel Group Channels request parameters. + */ + export type ListChannelGroupChannelsParameters = { + /** + * Name of the channel group for which list of channels should be retrieved. + */ + channelGroup: string; + }; + + /** + * Response with result of the list channel group channels. + */ + export type ListChannelGroupChannelsResponse = { + /** + * List of the channels registered withing specified channel group. + */ + channels: string[]; + }; + + /** + * Delete Channel Group request parameters. + */ + export type DeleteChannelGroupParameters = { + /** + * Name of the channel group which should be removed. + */ + channelGroup: string; + }; + + /** + * Delete channel group response. + */ + export type DeleteChannelGroupResponse = Record; + } + + export namespace Publish { + /** + * Request configuration parameters. + */ + export type PublishParameters = { + /** + * Channel name to publish messages to. + */ + channel: string; + /** + * Data which should be sent to the `channel`. + * + * The message may be any valid JSON type including objects, arrays, strings, and numbers. + */ + message: Payload; + /** + * Whether published data should be available with `Storage API` later or not. + * + * @default `true` + */ + storeInHistory?: boolean; + /** + * Whether message should be sent as part of request POST body or not. + * + * @default `false` + */ + sendByPost?: boolean; + /** + * Metadata, which should be associated with published data. + * + * Associated metadata can be utilized by message filtering feature. + */ + meta?: Payload; + /** + * Specify duration during which data will be available with `Storage API`. + * + * - If `storeInHistory` = `true`, and `ttl` = `0`, the `message` is stored with no expiry time. + * - If `storeInHistory` = `true` and `ttl` = `X` (`X` is an Integer value), the `message` is + * stored with an expiry time of `X` hours. + * - If `storeInHistory` = `false`, the `ttl` parameter is ignored. + * - If `ttl` is not specified, then expiration of the `message` defaults back to the expiry value + * for the key. + */ + ttl?: number; + /** + * Whether published data should be replicated across all data centers or not. + * + * @default `true` + * @deprecated + */ + replicate?: boolean; + }; + + /** + * Service success response. + */ + export type PublishResponse = { + /** + * High-precision time when published data has been received by the PubNub service. + */ + timetoken: string; + }; + } + + export namespace Signal { + /** + * Request configuration parameters. + */ + export type SignalParameters = { + /** + * Channel name to publish signal to. + */ + channel: string; + /** + * Data which should be sent to the `channel`. + * + * The message may be any valid JSON type including objects, arrays, strings, and numbers. + */ + message: Payload; + }; + + /** + * Service success response. + */ + export type SignalResponse = { + /** + * High-precision time when published data has been received by the PubNub service. + */ + timetoken: string; + }; + } + + export namespace Presence { + /** + * Associated presence state fetch parameters. + */ + export type GetPresenceStateParameters = { + /** + * The subscriber uuid to get the current state. + * + * @default `current uuid` + */ + uuid?: string; + /** + * List of channels for which state associated with {@link uuid} should be retrieved. + * + * **Important:** Either {@link channels} or {@link channelGroups} should be provided; + */ + channels?: string[]; + /** + * List of channel groups for which state associated with {@link uuid} should be retrieved. + * + * **Important:** Either {@link channels} or {@link channelGroups} should be provided; + */ + channelGroups?: string[]; + }; + + /** + * Associated presence state fetch response. + */ + export type GetPresenceStateResponse = { + /** + * Channels map to state which `uuid` has associated with them. + */ + channels: Record; + }; + + /** + * Associate presence state parameters. + */ + export type SetPresenceStateParameters = { + /** + * List of channels for which state should be associated with {@link uuid}. + */ + channels?: string[]; + /** + * List of channel groups for which state should be associated with {@link uuid}. + */ + channelGroups?: string[]; + /** + * State which should be associated with `uuid` on provided list of {@link channels} and {@link channelGroups}. + */ + state: Payload; + }; + + /** + * Associate presence state parameters using heartbeat. + */ + export type SetPresenceStateWithHeartbeatParameters = { + /** + * List of channels for which state should be associated with {@link uuid}. + */ + channels?: string[]; + /** + * State which should be associated with `uuid` on provided list of {@link channels}. + */ + state: Payload; + /** + * Whether `presence/heartbeat` REST API should be used to manage state or not. + * + * @default `false` + */ + withHeartbeat: boolean; + }; + + /** + * Associate presence state response. + */ + export type SetPresenceStateResponse = { + /** + * State which has been associated with `uuid` on provided list of channels and groups. + */ + state: Payload; + }; + + /** + * Announce heartbeat parameters. + */ + export type PresenceHeartbeatParameters = { + /** + * How long the server will consider the client alive for presence.The value is in seconds. + */ + heartbeat: number; + /** + * List of channels for which heartbeat should be announced for {@link uuid}. + */ + channels?: string[]; + /** + * List of channel groups for which heartbeat should be announced for {@link uuid}. + */ + channelGroups?: string[]; + /** + * State which should be associated with `uuid` on provided list of {@link channels} and {@link channelGroups}. + */ + state?: Payload; + }; + + /** + * Announce heartbeat response. + */ + export type PresenceHeartbeatResponse = Record; + + /** + * Presence leave parameters. + */ + export type PresenceLeaveParameters = { + /** + * List of channels for which `uuid` should be marked as `offline`. + */ + channels?: string[]; + /** + /** + * List of channel groups for which `uuid` should be marked as `offline`. + */ + channelGroups?: string[]; + }; + + /** + * Presence leave response. + */ + export type PresenceLeaveResponse = Record; + + /** + * Channel / channel group presence fetch parameters.. + */ + export type HereNowParameters = { + /** + * List of channels for which presence should be retrieved. + */ + channels?: string[]; + /** + * List of channel groups for which presence should be retrieved. + */ + channelGroups?: string[]; + /** + * Whether `uuid` information should be included in response or not. + * + * **Note:** Only occupancy information will be returned if both {@link includeUUIDs} and {@link includeState} is + * set to `false`. + * + * @default `true` + */ + includeUUIDs?: boolean; + /** + * Whether state associated with `uuid` should be included in response or not. + * + * @default `false`. + */ + includeState?: boolean; + /** + * Additional query parameters. + */ + queryParameters?: Record; + }; + + /** + * `uuid` where now response. + */ + export type HereNowResponse = { + /** + * Total number of channels for which presence information received. + */ + totalChannels: number; + /** + * Total occupancy for all retrieved channels. + */ + totalOccupancy: number; + /** + * List of channels to which `uuid` currently subscribed. + */ + channels: { + [p: string]: { + /** + * List of received channel subscribers. + * + * **Note:** Field is missing if `uuid` and `state` not included. + */ + occupants: { + uuid: string; + state?: Payload | null; + }[]; + /** + * Name of channel for which presence information retrieved. + */ + name: string; + /** + * Total number of active subscribers in single channel. + */ + occupancy: number; + }; + }; + }; + + /** + * `uuid` where now parameters. + */ + export type WhereNowParameters = { + /** + * The subscriber uuid to get the current state. + * + * @default `current uuid` + */ + uuid?: string; + }; + + /** + * `uuid` where now response. + */ + export type WhereNowResponse = { + /** + * Channels map to state which `uuid` has associated with them. + */ + channels: string[]; + }; + } + + export namespace History { + /** + * Get history request parameters. + */ + export type GetHistoryParameters = { + /** + * Channel to return history messages from. + */ + channel: string; + /** + * Specifies the number of historical messages to return. + * + * **Note:** Maximum `100` messages can be returned in single response. + * + * @default `100` + */ + count?: number; + /** + * Whether message `meta` information should be fetched or not. + * + * @default `false` + */ + includeMeta?: boolean; + /** + * Timetoken delimiting the `start` of `time` slice (exclusive) to pull messages from. + */ + start?: string; + /** + * Timetoken delimiting the `end` of `time` slice (inclusive) to pull messages from. + */ + end?: string; + /** + * Whether timeline should traverse in reverse starting with the oldest message first or not. + * + * If both `start` and `end` arguments are provided, `reverse` is ignored and messages are + * returned starting with the newest message. + */ + reverse?: boolean; + /** + * Whether message timetokens should be stringified or not. + * + * @default `false` + */ + stringifiedTimeToken?: boolean; + }; + + /** + * Get history response. + */ + export type GetHistoryResponse = { + /** + * List of previously published messages. + */ + messages: { + /** + * Message payload (decrypted). + */ + entry: Payload; + /** + * When message has been received by PubNub service. + */ + timetoken: string | number; + /** + * Additional data which has been published along with message to be used with real-time + * events filter expression. + */ + meta?: Payload; + /** + * Message decryption error (if attempt has been done). + */ + error?: string; + }[]; + /** + * Received messages timeline start. + */ + startTimeToken: string | number; + /** + * Received messages timeline end. + */ + endTimeToken: string | number; + }; + + /** + * PubNub-defined message type. + * + * Types of messages which can be retrieved with fetch messages REST API. + */ + export enum PubNubMessageType { + /** + * Regular message. + */ + Message = -1, + /** + * File message. + */ + Files = 4, + } + + /** + * Per-message actions information. + */ + export type Actions = { + /** + * Message action type. + */ + [t: string]: { + /** + * Message action value. + */ + [v: string]: { + /** + * Unique identifier of the user which reacted on message. + */ + uuid: string; + /** + * High-precision PubNub timetoken with time when {@link uuid} reacted on message. + */ + actionTimetoken: string; + }[]; + }; + }; + + /** + * Additional message actions fetch information. + */ + export type MoreActions = { + /** + * Prepared fetch messages with actions REST API URL. + */ + url: string; + /** + * Next page time offset. + */ + start: string; + /** + * Number of messages to retrieve with next page. + */ + max: number; + }; + + /** + * Common content of the fetched message. + */ + type BaseFetchedMessage = { + /** + * Name of channel for which message has been retrieved. + */ + channel: string; + /** + * When message has been received by PubNub service. + */ + timetoken: string | number; + /** + * Message publisher unique identifier. + */ + uuid?: string; + /** + * Additional data which has been published along with message to be used with real-time + * events filter expression. + */ + meta?: Payload; + /** + * Message decryption error (if attempt has been done). + */ + error?: string; + }; + + /** + * Regular message published to the channel. + */ + export type RegularMessage = BaseFetchedMessage & { + /** + * Message payload (decrypted). + */ + message: Payload; + /** + * PubNub-defined message type. + */ + messageType?: PubNubMessageType.Message; + }; + + /** + * File message published to the channel. + */ + export type FileMessage = BaseFetchedMessage & { + /** + * Message payload (decrypted). + */ + message: { + /** + * File annotation message. + */ + message?: Payload; + /** + * File information. + */ + file: { + /** + * Unique file identifier. + */ + id: string; + /** + * Name with which file has been stored. + */ + name: string; + /** + * File's content mime-type. + */ + 'mime-type': string; + /** + * Stored file size. + */ + size: number; + /** + * Pre-computed file download Url. + */ + url: string; + }; + }; + /** + * PubNub-defined message type. + */ + messageType?: PubNubMessageType.Files; + }; + + /** + * Fetched message entry in channel messages list. + */ + export type FetchedMessage = RegularMessage | FileMessage; + + /** + * Fetched with actions message entry in channel messages list. + */ + export type FetchedMessageWithActions = FetchedMessage & { + /** + * List of message reactions. + */ + actions?: Actions; + /** + * List of message reactions. + * + * @deprecated Use {@link actions} field instead. + */ + data?: Actions; + }; + + /** + * Fetch messages request parameters. + */ + export type FetchMessagesParameters = { + /** + * Specifies channels to return history messages from. + * + * **Note:** Maximum of `500` channels are allowed. + */ + channels: string[]; + /** + * Specifies the number of historical messages to return per channel. + * + * **Note:** Default is `100` per single channel and `25` per multiple channels or per + * single channel if {@link includeMessageActions} is used. + * + * @default `100` or `25` + */ + count?: number; + /** + * Whether message type should be returned with each history message or not. + * + * @default `true` + */ + includeMessageType?: boolean; + /** + * Whether publisher `uuid` should be returned with each history message or not. + * + * @default `true` + */ + includeUUID?: boolean; + /** + * Whether publisher `uuid` should be returned with each history message or not. + * + * @deprecated Use {@link includeUUID} property instead. + */ + includeUuid?: boolean; + /** + * Whether message `meta` information should be fetched or not. + * + * @default `false` + */ + includeMeta?: boolean; + /** + * Whether message-added message actions should be fetched or not. + * + * If used, the limit of messages retrieved will be `25` per single channel. + * + * Each message can have a maximum of `25000` actions attached to it. Consider the example of + * querying for 10 messages. The first five messages have 5000 actions attached to each of + * them. The API will return the first 5 messages and all their 25000 actions. The response + * will also include a `more` link to get the remaining 5 messages. + * + * **Important:** Truncation will happen if the number of actions on the messages returned + * is > 25000. + * + * @default `false` + * + * @throws Exception if API is called with more than one channel. + */ + includeMessageActions?: boolean; + /** + * Timetoken delimiting the `start` of `time` slice (exclusive) to pull messages from. + */ + start?: string; + /** + * Timetoken delimiting the `end` of `time` slice (inclusive) to pull messages from. + */ + end?: string; + /** + * Whether message timetokens should be stringified or not. + * + * @default `false` + */ + stringifiedTimeToken?: boolean; + }; + + /** + * Fetch messages response. + */ + export type FetchMessagesForChannelsResponse = { + /** + * List of previously published messages per requested channel. + */ + channels: { + [p: string]: FetchedMessage[]; + }; + }; + + /** + * Fetch messages with reactions response. + */ + export type FetchMessagesWithActionsResponse = { + channels: { + [p: string]: FetchedMessageWithActions[]; + }; + /** + * Additional message actions fetch information. + */ + more: MoreActions; + }; + + /** + * Fetch messages response. + */ + export type FetchMessagesResponse = FetchMessagesForChannelsResponse | FetchMessagesWithActionsResponse; + + /** + * Message count request parameters. + */ + export type MessageCountParameters = { + /** + * The channels to fetch the message count. + */ + channels: string[]; + /** + * List of timetokens, in order of the {@link channels} list. + * + * Specify a single timetoken to apply it to all channels. Otherwise, the list of timetokens + * must be the same length as the list of {@link channels}, or the function returns an error + * flag. + */ + channelTimetokens?: string[]; + /** + * High-precision PubNub timetoken starting from which number of messages should be counted. + * + * Same timetoken will be used to count messages for each passed {@link channels}. + * + * @deprecated Use {@link channelTimetokens} field instead. + */ + timetoken?: string; + }; + + /** + * Message count response. + */ + export type MessageCountResponse = { + /** + * Map of channel names to the number of counted messages. + */ + channels: Record; + }; + + /** + * Delete messages from channel parameters. + */ + export type DeleteMessagesParameters = { + /** + * Specifies channel messages to be deleted from history. + */ + channel: string; + /** + * Timetoken delimiting the start of time slice (exclusive) to delete messages from. + */ + start?: string; + /** + * Timetoken delimiting the end of time slice (inclusive) to delete messages from. + */ + end?: string; + }; + + /** + * Delete messages from channel response. + */ + export type DeleteMessagesResponse = Record; + } + + export namespace MessageAction { + /** + * Message reaction object type. + */ + export type MessageAction = { + /** + * What feature this message action represents. + */ + type: string; + /** + * Value which should be stored along with message action. + */ + value: string; + /** + * Unique identifier of the user which added message action. + */ + uuid: string; + /** + * Timetoken of when message reaction has been added. + * + * **Note:** This token required when it will be required to remove reaction. + */ + actionTimetoken: string; + /** + * Timetoken of message to which `action` has been added. + */ + messageTimetoken: string; + }; + + /** + * More message actions fetch information. + */ + export type MoreMessageActions = { + /** + * Prepared REST API url to fetch next page with message actions. + */ + url: string; + /** + * Message action timetoken denoting the start of the range requested with next page. + * + * **Note:** Return values will be less than {@link start}. + */ + start: string; + /** + * Message action timetoken denoting the end of the range requested with next page. + * + * **Note:** Return values will be greater than or equal to {@link end}. + */ + end: string; + /** + * Number of message actions to return in next response. + */ + limit: number; + }; + + /** + * Add Message Action request parameters. + */ + export type AddMessageActionParameters = { + /** + * Name of channel which stores the message for which {@link action} should be added. + */ + channel: string; + /** + * Timetoken of message for which {@link action} should be added. + */ + messageTimetoken: string; + /** + * Message `action` information. + */ + action: { + /** + * What feature this message action represents. + */ + type: string; + /** + * Value which should be stored along with message action. + */ + value: string; + }; + }; + + /** + * Response with added message action object. + */ + export type AddMessageActionResponse = { + data: MessageAction; + }; + + /** + * Get Message Actions request parameters. + */ + export type GetMessageActionsParameters = { + /** + * Name of channel from which list of messages `actions` should be retrieved. + */ + channel: string; + /** + * Message action timetoken denoting the start of the range requested. + * + * **Note:** Return values will be less than {@link start}. + */ + start?: string; + /** + * Message action timetoken denoting the end of the range requested. + * + * **Note:** Return values will be greater than or equal to {@link end}. + */ + end?: string; + /** + * Number of message actions to return in response. + */ + limit?: number; + }; + + /** + * Response with message actions in specific `channel`. + */ + export type GetMessageActionsResponse = { + /** + * Retrieved list of message actions. + */ + data: MessageAction[]; + /** + * Received message actions time frame start. + */ + start: string | null; + /** + * Received message actions time frame end. + */ + end: string | null; + /** + * More message actions fetch information. + */ + more?: MoreMessageActions; + }; + + /** + * Remove Message Action request parameters. + */ + export type RemoveMessageActionParameters = { + /** + * Name of channel which store message for which `action` should be removed. + */ + channel: string; + /** + * Timetoken of message for which `action` should be removed. + */ + messageTimetoken: string; + /** + * Action addition timetoken. + */ + actionTimetoken: string; + }; + + /** + * Response with message remove result. + */ + export type RemoveMessageActionResponse = { + data: Record; + }; + } + + export namespace FileSharing { + /** + * Shared file object. + */ + export type SharedFile = { + /** + * Name with which file has been stored. + */ + name: string; + /** + * Unique service-assigned file identifier. + */ + id: string; + /** + * Shared file size. + */ + size: number; + /** + * ISO 8601 time string when file has been shared. + */ + created: string; + }; + + /** + * List Files request parameters. + */ + export type ListFilesParameters = { + /** + * Name of channel for which list of files should be requested. + */ + channel: string; + /** + * How many entries return with single response. + */ + limit?: number; + /** + * Next files list page token. + */ + next?: string; + }; + + /** + * List Files request response. + */ + export type ListFilesResponse = { + /** + * Files list fetch result status code. + */ + status: number; + /** + * List of fetched file objects. + */ + data: SharedFile[]; + /** + * Next files list page token. + */ + next: string; + /** + * Number of retrieved files. + */ + count: number; + }; + + /** + * Send File request parameters. + */ + export type SendFileParameters = Omit & { + /** + * Channel to send the file to. + */ + channel: string; + /** + * File to send. + */ + file: FileParameters; + }; + + /** + * Send File request response. + */ + export type SendFileResponse = PublishFileMessageResponse & { + /** + * Send file request processing status code. + */ + status: number; + /** + * Actual file name under which file has been stored. + * + * File name and unique {@link id} can be used to download file from the channel later. + * + * **Important:** Actual file name may be different from the one which has been used during file + * upload. + */ + name: string; + /** + * Unique file identifier. + * + * Unique file identifier, and it's {@link name} can be used to download file from the channel + * later. + */ + id: string; + }; + + /** + * Upload File request parameters. + */ + export type UploadFileParameters = { + /** + * Unique file identifier. + * + * Unique file identifier, and it's {@link fileName} can be used to download file from the channel + * later. + */ + fileId: string; + /** + * Actual file name under which file has been stored. + * + * File name and unique {@link fileId} can be used to download file from the channel later. + * + * **Note:** Actual file name may be different from the one which has been used during file + * upload. + */ + fileName: string; + /** + * File which should be uploaded. + */ + file: PubNubFileInterface; + /** + * Pre-signed file upload Url. + */ + uploadUrl: string; + /** + * An array of form fields to be used in the pre-signed POST request. + * + * **Important:** Form data fields should be passed in exact same order as received from + * the PubNub service. + */ + formFields: { + /** + * Form data field name. + */ + name: string; + /** + * Form data field value. + */ + value: string; + }[]; + }; + + /** + * Upload File request response. + */ + export type UploadFileResponse = { + /** + * Upload File request processing status code. + */ + status: number; + /** + * Service processing result response. + */ + message: Payload; + }; + + /** + * Generate File Upload URL request parameters. + */ + export type GenerateFileUploadUrlParameters = { + /** + * Name of channel to which file should be uploaded. + */ + channel: string; + /** + * Actual name of the file which should be uploaded. + */ + name: string; + }; + + /** + * Generation File Upload URL request response. + */ + export type GenerateFileUploadUrlResponse = { + /** + * Unique file identifier. + * + * Unique file identifier, and it's {@link name} can be used to download file from the channel + * later. + */ + id: string; + /** + * Actual file name under which file has been stored. + * + * File name and unique {@link id} can be used to download file from the channel later. + * + * **Note:** Actual file name may be different from the one which has been used during file + * upload. + */ + name: string; + /** + * Pre-signed URL for file upload. + */ + url: string; + /** + * An array of form fields to be used in the pre-signed POST request. + * + * **Important:** Form data fields should be passed in exact same order as received from + * the PubNub service. + */ + formFields: { + /** + * Form data field name. + */ + name: string; + /** + * Form data field value. + */ + value: string; + }[]; + }; + + /** + * Publish File Message request parameters. + */ + export type PublishFileMessageParameters = { + /** + * Name of channel to which file has been sent. + */ + channel: string; + /** + * File annotation message. + */ + message?: Payload; + /** + * Custom file and message encryption key. + * + * @deprecated Use {@link Configuration#cryptoModule|cryptoModule} configured for PubNub client + * instance or encrypt file prior {@link PubNub#sendFile|sendFile} method call. + */ + cipherKey?: string; + /** + * Unique file identifier. + * + * Unique file identifier, and it's {@link fileName} can be used to download file from the channel + * later. + */ + fileId: string; + /** + * Actual file name under which file has been stored. + * + * File name and unique {@link fileId} can be used to download file from the channel later. + * + * **Note:** Actual file name may be different from the one which has been used during file + * upload. + */ + fileName: string; + /** + * Whether published file messages should be stored in the channel's history. + * + * **Note:** If `storeInHistory` not specified, then the history configuration on the key is + * used. + * + * @default `true` + */ + storeInHistory?: boolean; + /** + * How long the message should be stored in the channel's history. + * + * **Note:** If not specified, defaults to the key set's retention value. + * + * @default `0` + */ + ttl?: number; + /** + * Metadata, which should be associated with published file. + * + * Associated metadata can be utilized by message filtering feature. + */ + meta?: Payload; + }; + + /** + * Publish File Message request response. + */ + export type PublishFileMessageResponse = { + /** + * High-precision time when published file message has been received by the PubNub service. + */ + timetoken: string; + }; + + /** + * Download File request parameters. + */ + export type DownloadFileParameters = FileUrlParameters & { + /** + * Custom file and message encryption key. + * + * @deprecated Use {@link Configuration#cryptoModule|cryptoModule} configured for PubNub client + * instance or encrypt file prior {@link PubNub#sendFile|sendFile} method call. + */ + cipherKey?: string; + }; + + /** + * Generate File download Url request parameters. + */ + export type FileUrlParameters = { + /** + * Name of channel where file has been sent. + */ + channel: string; + /** + * Unique file identifier. + * + * Unique file identifier, and it's {@link name} can be used to download file from the channel + * later. + */ + id: string; + /** + * Actual file name under which file has been stored. + * + * File name and unique {@link id} can be used to download file from the channel later. + * + * **Important:** Actual file name may be different from the one which has been used during file + * upload. + */ + name: string; + }; + + /** + * Generate File Download Url response. + */ + export type FileUrlResponse = string; + + /** + * Delete File request parameters. + */ + export type DeleteFileParameters = { + /** + * Name of channel where file has been sent. + */ + channel: string; + /** + * Unique file identifier. + * + * Unique file identifier, and it's {@link name} can be used to download file from the channel + * later. + */ + id: string; + /** + * Actual file name under which file has been stored. + * + * File name and unique {@link id} can be used to download file from the channel later. + * + * **Important:** Actual file name may be different from the one which has been used during file + * upload. + */ + name: string; + }; + + /** + * Delete File request response. + */ + export type DeleteFileResponse = { + /** + * Delete File request processing status code. + */ + status: number; + }; + } + + export namespace PAM { + /** + * Metadata which will be associated with access token. + */ + export type Metadata = Record; + + /** + * Channel-specific token permissions. + */ + export type ChannelTokenPermissions = { + /** + * Whether `read` operations are permitted for corresponding level or not. + */ + read?: boolean; + /** + * Whether `write` operations are permitted for corresponding level or not. + */ + write?: boolean; + /** + * Whether `get` operations are permitted for corresponding level or not. + */ + get?: boolean; + /** + * Whether `manage` operations are permitted for corresponding level or not. + */ + manage?: boolean; + /** + * Whether `update` operations are permitted for corresponding level or not. + */ + update?: boolean; + /** + * Whether `join` operations are permitted for corresponding level or not. + */ + join?: boolean; + /** + * Whether `delete` operations are permitted for corresponding level or not. + */ + delete?: boolean; + }; + + /** + * Space-specific token permissions. + */ + type SpaceTokenPermissions = ChannelTokenPermissions; + + /** + * Channel group-specific token permissions. + */ + export type ChannelGroupTokenPermissions = { + /** + * Whether `read` operations are permitted for corresponding level or not. + */ + read?: boolean; + /** + * Whether `manage` operations are permitted for corresponding level or not. + */ + manage?: boolean; + }; + + /** + * Uuid-specific token permissions. + */ + export type UuidTokenPermissions = { + /** + * Whether `get` operations are permitted for corresponding level or not. + */ + get?: boolean; + /** + * Whether `update` operations are permitted for corresponding level or not. + */ + update?: boolean; + /** + * Whether `delete` operations are permitted for corresponding level or not. + */ + delete?: boolean; + }; + + /** + * User-specific token permissions. + */ + type UserTokenPermissions = UuidTokenPermissions; + + /** + * Generate access token with permissions. + * + * Generate time-limited access token with required permissions for App Context objects. + */ + export type ObjectsGrantTokenParameters = { + /** + * Total number of minutes for which the token is valid. + * + * The minimum allowed value is `1`. + * The maximum is `43,200` minutes (`30` days). + */ + ttl: number; + /** + * Object containing resource permissions. + */ + resources?: { + /** + * Object containing `spaces` metadata permissions. + */ + spaces?: Record; + /** + * Object containing `users` permissions. + */ + users?: Record; + }; + /** + * Object containing permissions to multiple resources specified by a RegEx pattern. + */ + patterns?: { + /** + * Object containing `spaces` metadata permissions. + */ + spaces?: Record; + /** + * Object containing `users` permissions. + */ + users?: Record; + }; + /** + * Extra metadata to be published with the request. + * + * **Important:** Values must be scalar only; `arrays` or `objects` aren't supported. + */ + meta?: Metadata; + /** + * Single `userId` which is authorized to use the token to make API requests to PubNub. + */ + authorizedUserId?: string; + }; + + /** + * Generate token with permissions. + * + * Generate time-limited access token with required permissions for resources. + */ + export type GrantTokenParameters = { + /** + * Total number of minutes for which the token is valid. + * + * The minimum allowed value is `1`. + * The maximum is `43,200` minutes (`30` days). + */ + ttl: number; + /** + * Object containing resource permissions. + */ + resources?: { + /** + * Object containing `uuid` metadata permissions. + */ + uuids?: Record; + /** + * Object containing `channel` permissions. + */ + channels?: Record; + /** + * Object containing `channel group` permissions. + */ + groups?: Record; + }; + /** + * Object containing permissions to multiple resources specified by a RegEx pattern. + */ + patterns?: { + /** + * Object containing `uuid` metadata permissions to apply to all `uuids` matching the RegEx + * pattern. + */ + uuids?: Record; + /** + * Object containing `channel` permissions to apply to all `channels` matching the RegEx + * pattern. + */ + channels?: Record; + /** + * Object containing `channel group` permissions to apply to all `channel groups` matching the + * RegEx pattern. + */ + groups?: Record; + }; + /** + * Extra metadata to be published with the request. + * + * **Important:** Values must be scalar only; `arrays` or `objects` aren't supported. + */ + meta?: Metadata; + /** + * Single `uuid` which is authorized to use the token to make API requests to PubNub. + */ + authorized_uuid?: string; + }; + + /** + * Response with generated access token. + */ + export type GrantTokenResponse = string; + + /** + * Access token for which permissions should be revoked. + */ + export type RevokeParameters = string; + + /** + * Response with revoked access token. + */ + export type RevokeTokenResponse = Record; + + /** + * Decoded access token representation. + */ + export type Token = { + /** + * Token version. + */ + version: number; + /** + * Token generation date time. + */ + timestamp: number; + /** + * Maximum duration (in minutes) during which token will be valid. + */ + ttl: number; + /** + * Permissions granted to specific resources. + */ + resources?: Partial>>; + /** + * Permissions granted to resources which match specified regular expression. + */ + patterns?: Partial>>; + /** + * The uuid that is exclusively authorized to use this token to make API requests. + */ + authorized_uuid?: string; + /** + * PAM token content signature. + */ + signature: ArrayBuffer; + /** + * Additional information which has been added to the token. + */ + meta?: Payload; + }; + + /** + * Granted resource permissions. + * + * **Note:** Following operations doesn't require any permissions: + * - unsubscribe from channel / channel group + * - where now + */ + export type Permissions = { + /** + * Resource read permission. + * + * Read permission required for: + * - subscribe to channel / channel group (including presence versions `-pnpres`) + * - here now + * - get presence state + * - set presence state + * - fetch history + * - fetch messages count + * - list shared files + * - download shared file + * - enable / disable push notifications + * - get message actions + * - get history with message actions + */ + read: boolean; + /** + * Resource write permission. + * + * Write permission required for: + * - publish message / signal + * - share file + * - add message actions + */ + write: boolean; + /** + * Resource manage permission. + * + * Manage permission required for: + * - add / remove channels to / from the channel group + * - list channels in group + * - remove channel group + * - set / remove channel members + */ + manage: boolean; + /** + * Resource delete permission. + * + * Delete permission required for: + * - delete messages from history + * - delete shared file + * - delete user metadata + * - delete channel metadata + * - remove message action + */ + delete: boolean; + /** + * Resource get permission. + * + * Get permission required for: + * - get user metadata + * - get channel metadata + * - get channel members + */ + get: boolean; + /** + * Resource update permission. + * + * Update permissions required for: + * - set user metadata + * - set channel metadata + * - set / remove user membership + */ + update: boolean; + /** + * Resource `join` permission. + * + * `Join` permission required for: + * - set / remove channel members + */ + join: boolean; + }; + + /** + * Channel-specific permissions. + * + * Permissions include objects to the App Context Channel object as well. + */ + type ChannelPermissions = { + /** + * Whether `read` operations are permitted for corresponding level or not. + */ + r?: 0 | 1; + /** + * Whether `write` operations are permitted for corresponding level or not. + */ + w?: 0 | 1; + /** + * Whether `delete` operations are permitted for corresponding level or not. + */ + d?: 0 | 1; + /** + * Whether `get` operations are permitted for corresponding level or not. + */ + g?: 0 | 1; + /** + * Whether `update` operations are permitted for corresponding level or not. + */ + u?: 0 | 1; + /** + * Whether `manage` operations are permitted for corresponding level or not. + */ + m?: 0 | 1; + /** + * Whether `join` operations are permitted for corresponding level or not. + */ + j?: 0 | 1; + /** + * Duration for which permissions has been granted. + */ + ttl?: number; + }; + + /** + * Channel group-specific permissions. + */ + type ChannelGroupPermissions = { + /** + * Whether `read` operations are permitted for corresponding level or not. + */ + r?: 0 | 1; + /** + * Whether `manage` operations are permitted for corresponding level or not. + */ + m?: 0 | 1; + /** + * Duration for which permissions has been granted. + */ + ttl?: number; + }; + + /** + * App Context User-specific permissions. + */ + type UserPermissions = { + /** + * Whether `get` operations are permitted for corresponding level or not. + */ + g?: 0 | 1; + /** + * Whether `update` operations are permitted for corresponding level or not. + */ + u?: 0 | 1; + /** + * Whether `delete` operations are permitted for corresponding level or not. + */ + d?: 0 | 1; + /** + * Duration for which permissions has been granted. + */ + ttl?: number; + }; + + /** + * Common permissions audit response content. + */ + type BaseAuditResponse< + Level extends 'channel' | 'channel+auth' | 'channel-group' | 'channel-group+auth' | 'user' | 'subkey', + > = { + /** + * Permissions level. + */ + level: Level; + /** + * Subscription key at which permissions has been granted. + */ + subscribe_key: string; + /** + * Duration for which permissions has been granted. + */ + ttl?: number; + }; + + /** + * Auth keys permissions for specified `level`. + */ + type AuthKeysPermissions = { + /** + * Auth keys-based permissions for specified `level` permission. + */ + auths: Record; + }; + + /** + * Single channel permissions audit result. + */ + type ChannelPermissionsResponse = BaseAuditResponse<'channel+auth'> & { + /** + * Name of channel for which permissions audited. + */ + channel: string; + } & AuthKeysPermissions; + + /** + * Multiple channels permissions audit result. + */ + type ChannelsPermissionsResponse = BaseAuditResponse<'channel'> & { + /** + * Per-channel permissions. + */ + channels: Record>; + }; + + /** + * Single channel group permissions result. + */ + type ChannelGroupPermissionsResponse = BaseAuditResponse<'channel-group+auth'> & { + /** + * Name of channel group for which permissions audited. + */ + 'channel-group': string; + } & AuthKeysPermissions; + + /** + * Multiple channel groups permissions audit result. + */ + type ChannelGroupsPermissionsResponse = BaseAuditResponse<'channel'> & { + /** + * Per-channel group permissions. + */ + 'channel-groups': Record>; + }; + + /** + * App Context User permissions audit result. + */ + type UserPermissionsResponse = BaseAuditResponse<'user'> & { + /** + * Name of channel for which `user` permissions audited. + */ + channel: string; + } & AuthKeysPermissions; + + /** + * Global sub-key level permissions audit result. + */ + type SubKeyPermissionsResponse = BaseAuditResponse<'subkey'> & { + /** + * Per-channel permissions. + */ + channels: Record>; + /** + * Per-channel group permissions. + */ + 'channel-groups': Record>; + /** + * Per-object permissions. + */ + objects: Record>; + }; + + /** + * Response with permission information. + */ + export type PermissionsResponse = + | ChannelPermissionsResponse + | ChannelsPermissionsResponse + | ChannelGroupPermissionsResponse + | ChannelGroupsPermissionsResponse + | UserPermissionsResponse + | SubKeyPermissionsResponse; + + /** + * Audit permissions for provided auth keys / global permissions. + * + * Audit permissions on specific channel and / or channel group for the set of auth keys. + */ + export type AuditParameters = { + /** + * Name of channel for which channel-based permissions should be checked for {@link authKeys}. + */ + channel?: string; + /** + * Name of channel group for which channel group-based permissions should be checked for {@link authKeys}. + */ + channelGroup?: string; + /** + * List of auth keys for which permissions should be checked. + * + * Leave this empty to check channel / group -based permissions or global permissions. + * + * @default `[]` + */ + authKeys?: string[]; + }; + + /** + * Grant permissions for provided auth keys / global permissions. + * + * Grant permissions on specific channel and / or channel group for the set of auth keys. + */ + export type GrantParameters = { + /** + * List of channels for which permissions should be granted. + */ + channels?: string[]; + /** + * List of channel groups for which permissions should be granted. + */ + channelGroups?: string[]; + /** + * List of App Context UUID for which permissions should be granted. + */ + uuids?: string[]; + /** + * List of auth keys for which permissions should be granted on specified objects. + * + * Leave this empty to grant channel / group -based permissions or global permissions. + */ + authKeys?: string[]; + /** + * Whether `read` operations are permitted for corresponding level or not. + * + * @default `false` + */ + read?: boolean; + /** + * Whether `write` operations are permitted for corresponding level or not. + * + * @default `false` + */ + write?: boolean; + /** + * Whether `delete` operations are permitted for corresponding level or not. + * + * @default `false` + */ + delete?: boolean; + /** + * Whether `get` operations are permitted for corresponding level or not. + * + * @default `false` + */ + get?: boolean; + /** + * Whether `update` operations are permitted for corresponding level or not. + * + * @default `false` + */ + update?: boolean; + /** + * Whether `manage` operations are permitted for corresponding level or not. + * + * @default `false` + */ + manage?: boolean; + /** + * Whether `join` operations are permitted for corresponding level or not. + * + * @default `false` + */ + join?: boolean; + /** + * For how long permissions should be effective (in minutes). + * + * @default `1440` + */ + ttl?: number; + }; + } + + export namespace Time { + /** + * Service success response. + */ + export type TimeResponse = { + /** + * High-precision time when published data has been received by the PubNub service. + */ + timetoken: string; + }; + } + + export namespace Push { + /** + * Common managed channels push notification parameters. + */ + type ManagedDeviceChannels = { + /** + * Channels to register or unregister with mobile push notifications. + */ + channels: string[]; + /** + * The device ID to associate with mobile push notifications. + */ + device: string; + /** + * Starting channel for pagination. + * + * **Note:** Use the last channel from the previous page request. + */ + start?: string; + /** + * Number of channels to return for pagination. + * + * **Note:** maximum of 1000 tokens at a time. + * + * @default `500` + */ + count?: number; + }; + + /** + * List all FCM device push notification enabled channels parameters. + */ + type ListFCMDeviceChannelsParameters = Omit; + + /** + * List all APNS device push notification enabled channels parameters. + * + * @deprecated Use `APNS2`-based endpoints. + */ + type ListAPNSDeviceChannelsParameters = Omit; + + /** + * List all APNS2 device push notification enabled channels parameters. + */ + type ListAPNS2DeviceChannelsParameters = Omit; + + /** + * List all device push notification enabled channels parameters. + */ + export type ListDeviceChannelsParameters = + | ListFCMDeviceChannelsParameters + | ListAPNSDeviceChannelsParameters + | ListAPNS2DeviceChannelsParameters; + + /** + * List all device push notification enabled channels response. + */ + export type ListDeviceChannelsResponse = { + /** + * List of channels registered for device push notifications. + */ + channels: string[]; + }; + + /** + * Manage FCM device push notification enabled channels parameters. + */ + type ManageFCMDeviceChannelsParameters = ManagedDeviceChannels & { + /** + * Push Notifications gateway type. + */ + pushGateway: 'gcm'; + }; + + /** + * Manage APNS device push notification enabled channels parameters. + * + * @deprecated Use `APNS2`-based endpoints. + */ + type ManageAPNSDeviceChannelsParameters = ManagedDeviceChannels & { + /** + * Push Notifications gateway type. + */ + pushGateway: 'apns'; + }; + + /** + * Manage APNS2 device push notification enabled channels parameters. + */ + type ManageAPNS2DeviceChannelsParameters = ManagedDeviceChannels & { + /** + * Push Notifications gateway type. + */ + pushGateway: 'apns2'; + /** + * Environment within which device should manage list of channels with enabled notifications. + */ + environment?: 'development' | 'production'; + /** + * Notifications topic name (usually it is bundle identifier of application for Apple platform). + */ + topic: string; + }; + + /** + * Manage device push notification enabled channels parameters. + */ + export type ManageDeviceChannelsParameters = + | ManageFCMDeviceChannelsParameters + | ManageAPNSDeviceChannelsParameters + | ManageAPNS2DeviceChannelsParameters; + + /** + * Manage device push notification enabled channels response. + */ + export type ManageDeviceChannelsResponse = Record; + + /** + * Remove all FCM device push notification enabled channels parameters. + */ + type RemoveFCMDeviceParameters = Omit; + + /** + * Manage APNS device push notification enabled channels parameters. + * + * @deprecated Use `APNS2`-based endpoints. + */ + type RemoveAPNSDeviceParameters = Omit; + + /** + * Manage APNS2 device push notification enabled channels parameters. + */ + type RemoveAPNS2DeviceParameters = Omit; + + /** + * Remove all device push notification enabled channels parameters. + */ + export type RemoveDeviceParameters = + | RemoveFCMDeviceParameters + | RemoveAPNSDeviceParameters + | RemoveAPNS2DeviceParameters; + + /** + * Remove all device push notification enabled channels response. + */ + export type RemoveDeviceResponse = Record; + } +} + +export = PubNub; diff --git a/lib/types/models/Cursor.d.ts b/lib/types/models/Cursor.d.ts deleted file mode 100644 index 8ba000353..000000000 --- a/lib/types/models/Cursor.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export type Cursor = { - readonly timetoken: string; - readonly region: number; -}; diff --git a/lib/types/node/configuration.d.ts b/lib/types/node/configuration.d.ts deleted file mode 100644 index 1d31293bb..000000000 --- a/lib/types/node/configuration.d.ts +++ /dev/null @@ -1,54 +0,0 @@ -/** - * Node.js specific {@link PubNub} client configuration module. - */ -import { UserConfiguration } from '../core/interfaces/configuration'; -import { TransportKeepAlive } from '../core/interfaces/transport'; -import { Payload } from '../core/types/api'; -import { CryptoModule } from '../core/interfaces/crypto-module'; -/** - * NodeJS platform PubNub client configuration. - */ -export type PubNubConfiguration = UserConfiguration & { - /** - * Set a custom parameters for setting your connection `keepAlive` if this is set to `true`. - */ - keepAliveSettings?: TransportKeepAlive; - /** - * The cryptography module used for encryption and decryption of messages and files. Takes the - * {@link cipherKey} and {@link useRandomIVs} parameters as arguments. - * - * For more information, refer to the - * {@link /docs/sdks/javascript/api-reference/configuration#cryptomodule|cryptoModule} section. - * - * @default `not set` - */ - cryptoModule?: CryptoModule; - /** - * If passed, will encrypt the payloads. - * - * @deprecated Pass it to {@link cryptoModule} instead. - */ - cipherKey?: string; - /** - * When `true` the initialization vector (IV) is random for all requests (not just for file - * upload). - * When `false` the IV is hard-coded for all requests except for file upload. - * - * @default `true` - * - * @deprecated Pass it to {@link cryptoModule} instead. - */ - useRandomIVs?: boolean; - /** - * Custom data encryption method. - * - * @deprecated Instead use {@link cryptoModule} for data encryption. - */ - customEncrypt?: (data: string | Payload) => string; - /** - * Custom data decryption method. - * - * @deprecated Instead use {@link cryptoModule} for data decryption. - */ - customDecrypt?: (data: string) => string; -}; diff --git a/lib/types/node/index.d.ts b/lib/types/node/index.d.ts deleted file mode 100644 index b06546497..000000000 --- a/lib/types/node/index.d.ts +++ /dev/null @@ -1,38 +0,0 @@ -/// -/// -import { ProxyAgentOptions } from 'proxy-agent'; -import { Readable } from 'stream'; -import { Buffer } from 'buffer'; -import type { CryptoModule as CryptoModuleType } from '../crypto/modules/NodeCryptoModule/nodeCryptoModule'; -import PubNubFile, { PubNubFileParameters } from '../file/modules/node'; -import { PubNubConfiguration } from './configuration'; -import { PubNubFileConstructor } from '../core/types/file'; -import { PubNubCore } from '../core/pubnub-common'; -/** - * PubNub client for Node.js platform. - */ -declare class PubNub extends PubNubCore { - /** - * Data encryption / decryption module constructor. - */ - static CryptoModule: typeof CryptoModuleType; - /** - * PubNub File constructor. - */ - File: PubNubFileConstructor; - /** - * Actual underlying transport provider. - */ - private nodeTransport; - constructor(configuration: PubNubConfiguration); - /** - * Update request proxy configuration. - * - * @param configuration - Updated request proxy configuration. - * - * @throws An error if {@link PubNub} client already configured to use `keepAlive`. - * `keepAlive` and `proxy` can't be used simultaneously. - */ - setProxy(configuration?: ProxyAgentOptions): void; -} -export = PubNub; diff --git a/lib/types/react_native/configuration.d.ts b/lib/types/react_native/configuration.d.ts deleted file mode 100644 index a17ce3370..000000000 --- a/lib/types/react_native/configuration.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { UserConfiguration } from '../core/interfaces/configuration'; -/** - * React Native platform PubNub client configuration. - */ -export type PubNubConfiguration = UserConfiguration; diff --git a/lib/types/react_native/index.d.ts b/lib/types/react_native/index.d.ts deleted file mode 100644 index 3dcb30caf..000000000 --- a/lib/types/react_native/index.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -import 'react-native-url-polyfill/auto'; -import { PubNubFileParameters } from '../file/modules/react-native'; -import { PubNubConfiguration } from './configuration'; -import { PubNubCore } from '../core/pubnub-common'; -/** - * PubNub client for React Native platform. - */ -export default class PubNub extends PubNubCore { - constructor(configuration: PubNubConfiguration); -} diff --git a/lib/types/transport/middleware.d.ts b/lib/types/transport/middleware.d.ts deleted file mode 100644 index 5cdd75842..000000000 --- a/lib/types/transport/middleware.d.ts +++ /dev/null @@ -1,52 +0,0 @@ -import { TransportRequest } from '../core/types/transport-request'; -import { PrivateClientConfiguration } from '../core/interfaces/configuration'; -import { TokenManager } from '../core/components/token_manager'; -import { Transport } from '../core/interfaces/transport'; -/** - * Transport middleware configuration options. - */ -type PubNubMiddlewareConfiguration = { - /** - * Private client configuration. - */ - clientConfiguration: PrivateClientConfiguration; - /** - * REST API endpoints access tokens manager. - */ - tokenManager?: TokenManager; - /** - * HMAC-SHA256 hash generator from provided `data`. - */ - shaHMAC?: (data: string) => string; - /** - * Platform-specific transport for requests processing. - */ - transport: Transport; -}; -export declare class PubNubMiddleware implements Transport { - private configuration; - /** - * Request signature generator. - */ - signatureGenerator?: RequestSignature; - constructor(configuration: PubNubMiddlewareConfiguration); - makeSendable(req: TransportRequest): [Promise, import("../core/types/transport-request").CancellationController | undefined]; - request(req: TransportRequest): TransportRequest; - private authenticateRequest; - /** - * Compute and append request signature. - * - * @param req - Transport request with information which should be used to generate signature. - */ - private signRequest; - /** - * Compose `pnsdk` query parameter. - * - * SDK provides ability to set custom name or append vendor information to the `pnsdk` query - * parameter. - * - * @returns Finalized `pnsdk` query parameter value. - */ - private generatePNSDK; -} -export {}; diff --git a/lib/types/transport/node-transport.d.ts b/lib/types/transport/node-transport.d.ts deleted file mode 100644 index 1e2d7f5b9..000000000 --- a/lib/types/transport/node-transport.d.ts +++ /dev/null @@ -1,69 +0,0 @@ -import { Request } from 'node-fetch'; -import { ProxyAgentOptions } from 'proxy-agent'; -import { CancellationController, TransportRequest } from '../core/types/transport-request'; -import { Transport, TransportKeepAlive } from '../core/interfaces/transport'; -import { TransportResponse } from '../core/types/transport-response'; -/** - * Class representing a fetch-based Node.js transport provider. - */ -export declare class NodeTransport implements Transport { - private readonly keepAlive; - private readonly keepAliveSettings; - private readonly logVerbosity; - /** - * Service {@link ArrayBuffer} response decoder. - */ - protected static decoder: TextDecoder; - /** - * Request proxy configuration. - */ - private proxyConfiguration?; - private proxyAgent?; - private httpsAgent?; - private httpAgent?; - /** - * Creates a new `fetch`-based transport instance. - * - * @param keepAlive - Indicates whether keep-alive should be enabled. - * @param [keepAliveSettings] - Optional settings for keep-alive. - * @param [logVerbosity] - Whether verbose logging enabled or not. - * - * @returns Transport for performing network requests. - */ - constructor(keepAlive?: boolean, keepAliveSettings?: TransportKeepAlive, logVerbosity?: boolean); - /** - * Update request proxy configuration. - * - * @param configuration - New proxy configuration. - */ - setProxy(configuration?: ProxyAgentOptions): void; - makeSendable(req: TransportRequest): [Promise, CancellationController | undefined]; - request(req: TransportRequest): TransportRequest; - /** - * Creates a Request object from a given {@link TransportRequest} object. - * - * @param req - The {@link TransportRequest} object containing request information. - * - * @returns Request object generated from the {@link TransportRequest} object. - */ - private requestFromTransportRequest; - /** - * Determines and returns the appropriate agent for a given transport request. - * - * If keep alive is not requested, returns undefined. - * - * @param req - The transport request object. - * - * @returns {HttpAgent | HttpsAgent | undefined} - The appropriate agent for the request, or - * undefined if keep alive or proxy not requested. - */ - private agentForTransportRequest; - /** - * Log out request processing progress and result. - * - * @param request - Platform-specific request object. - * @param [elapsed] - How many times passed since request processing started. - * @param [body] - Service response (if available). - */ - protected logRequestProcessProgress(request: Request, elapsed?: number, body?: ArrayBuffer): void; -} diff --git a/lib/types/transport/web-react-native-transport.d.ts b/lib/types/transport/web-react-native-transport.d.ts deleted file mode 100644 index 753788bfd..000000000 --- a/lib/types/transport/web-react-native-transport.d.ts +++ /dev/null @@ -1,36 +0,0 @@ -/** - * Common browser and React Native Transport provider module. - */ -import { CancellationController, TransportRequest } from '../core/types/transport-request'; -import { TransportResponse } from '../core/types/transport-response'; -import { Transport } from '../core/interfaces/transport'; -/** - * Class representing a `fetch`-based browser and React Native transport provider. - */ -export declare class WebReactNativeTransport implements Transport { - private keepAlive; - private readonly logVerbosity; - /** - * Service {@link ArrayBuffer} response decoder. - */ - protected static decoder: TextDecoder; - constructor(keepAlive: boolean, logVerbosity: boolean); - makeSendable(req: TransportRequest): [Promise, CancellationController | undefined]; - request(req: TransportRequest): TransportRequest; - /** - * Creates a Request object from a given {@link TransportRequest} object. - * - * @param req - The {@link TransportRequest} object containing request information. - * - * @returns Request object generated from the {@link TransportRequest} object. - */ - private requestFromTransportRequest; - /** - * Log out request processing progress and result. - * - * @param request - Platform-specific - * @param [elapsed] - How many seconds passed since request processing started. - * @param [body] - Service response (if available). - */ - protected logRequestProcessProgress(request: Request, elapsed?: number, body?: ArrayBuffer): void; -} diff --git a/package-lock.json b/package-lock.json index e04f847d0..0602ecedf 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "pubnub", - "version": "8.2.7", + "version": "8.2.9", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "pubnub", - "version": "8.2.7", + "version": "8.2.9", "license": "SEE LICENSE IN LICENSE", "dependencies": { "agentkeepalive": "^3.5.2", @@ -21,8 +21,6 @@ "text-encoding": "^0.7.0" }, "devDependencies": { - "@cucumber/cucumber": "^10.4.0", - "@cucumber/pretty-formatter": "^1.0.0", "@rollup/plugin-commonjs": "^25.0.7", "@rollup/plugin-json": "^6.1.0", "@rollup/plugin-node-resolve": "^15.2.3", @@ -32,7 +30,6 @@ "@types/cbor-js": "^0.1.1", "@types/chai": "^4.3.14", "@types/chai-as-promised": "^7.1.8", - "@types/cucumber": "^7.0.0", "@types/expect": "^24.3.0", "@types/lil-uuid": "^0.1.3", "@types/mocha": "^9.1.0", @@ -41,12 +38,12 @@ "@types/sinon": "^17.0.3", "@types/text-encoding": "^0.0.39", "@types/underscore": "^1.11.15", - "@typescript-eslint/eslint-plugin": "^7.4.0", - "@typescript-eslint/parser": "^7.4.0", + "@typescript-eslint/eslint-plugin": "^8.12.2", + "@typescript-eslint/parser": "^8.12.2", "chai": "^4.4.1", "chai-as-promised": "^7.1.1", "chai-nock": "^1.2.0", - "cucumber-pretty": "^6.0.1", + "commander": "^12.1.0", "cucumber-tsflow": "^4.4.4", "es6-shim": "^0.35.8", "eslint": "^8.57.0", @@ -61,10 +58,10 @@ "karma-sourcemap-loader": "^0.3.7", "karma-spec-reporter": "0.0.32", "mocha": "10.4.0", - "nock": "^14.0.0-beta.5", + "nock": "^14.0.0-beta.15", "prettier": "^3.2.5", "rimraf": "^3.0.2", - "rollup": "^4.13.2", + "rollup": "4.22.4", "rollup-plugin-gzip": "^3.1.2", "rollup-plugin-string": "^3.0.0", "sinon": "^7.5.0", @@ -77,19 +74,11 @@ "underscore": "^1.9.2" } }, - "node_modules/@aashutoshrathi/word-wrap": { - "version": "1.2.6", - "resolved": "https://registry.npmjs.org/@aashutoshrathi/word-wrap/-/word-wrap-1.2.6.tgz", - "integrity": "sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/@ampproject/remapping": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.3.0.tgz", "integrity": "sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==", + "license": "Apache-2.0", "peer": true, "dependencies": { "@jridgewell/gen-mapping": "^0.3.5", @@ -100,11 +89,13 @@ } }, "node_modules/@babel/code-frame": { - "version": "7.24.2", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.24.2.tgz", - "integrity": "sha512-y5+tLQyV8pg3fsiln67BVLD1P13Eg4lh5RW9mF0zUuvLrv9uIQ4MCL+CRT+FTsBlBjcIan6PGsLcBN0m3ClUyQ==", + "version": "7.26.2", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.26.2.tgz", + "integrity": "sha512-RJlIHRueQgwWitWgF8OdFYGZX328Ax5BCemNGlqHfplnRT9ESi8JkFlvaVYbS+UubVY6dpv87Fs2u5M29iNFVQ==", + "license": "MIT", "dependencies": { - "@babel/highlight": "^7.24.2", + "@babel/helper-validator-identifier": "^7.25.9", + "js-tokens": "^4.0.0", "picocolors": "^1.0.0" }, "engines": { @@ -112,30 +103,32 @@ } }, "node_modules/@babel/compat-data": { - "version": "7.24.4", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.24.4.tgz", - "integrity": "sha512-vg8Gih2MLK+kOkHJp4gBEIkyaIi00jgWot2D9QOmmfLC8jINSOzmCLta6Bvz/JSBCqnegV0L80jhxkol5GWNfQ==", + "version": "7.26.2", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.26.2.tgz", + "integrity": "sha512-Z0WgzSEa+aUcdiJuCIqgujCshpMWgUpgOxXotrYPSA53hA3qopNaqcJpyr0hVb1FeWdnqFA35/fUtXgBK8srQg==", + "license": "MIT", "peer": true, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/core": { - "version": "7.24.4", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.24.4.tgz", - "integrity": "sha512-MBVlMXP+kkl5394RBLSxxk/iLTeVGuXTV3cIDXavPpMMqnSnt6apKgan/U8O3USWZCWZT/TbgfEpKa4uMgN4Dg==", + "version": "7.26.0", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.26.0.tgz", + "integrity": "sha512-i1SLeK+DzNnQ3LL/CswPCa/E5u4lh1k6IAEphON8F+cXt0t9euTshDru0q7/IqMa1PMPz5RnHuHscF8/ZJsStg==", + "license": "MIT", "peer": true, "dependencies": { "@ampproject/remapping": "^2.2.0", - "@babel/code-frame": "^7.24.2", - "@babel/generator": "^7.24.4", - "@babel/helper-compilation-targets": "^7.23.6", - "@babel/helper-module-transforms": "^7.23.3", - "@babel/helpers": "^7.24.4", - "@babel/parser": "^7.24.4", - "@babel/template": "^7.24.0", - "@babel/traverse": "^7.24.1", - "@babel/types": "^7.24.0", + "@babel/code-frame": "^7.26.0", + "@babel/generator": "^7.26.0", + "@babel/helper-compilation-targets": "^7.25.9", + "@babel/helper-module-transforms": "^7.26.0", + "@babel/helpers": "^7.26.0", + "@babel/parser": "^7.26.0", + "@babel/template": "^7.25.9", + "@babel/traverse": "^7.25.9", + "@babel/types": "^7.26.0", "convert-source-map": "^2.0.0", "debug": "^4.1.0", "gensync": "^1.0.0-beta.2", @@ -150,75 +143,70 @@ "url": "https://opencollective.com/babel" } }, - "node_modules/@babel/core/node_modules/json5": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", - "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", - "peer": true, - "bin": { - "json5": "lib/cli.js" - }, - "engines": { - "node": ">=6" - } - }, "node_modules/@babel/core/node_modules/semver": { "version": "6.3.1", "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "license": "ISC", "peer": true, "bin": { "semver": "bin/semver.js" } }, "node_modules/@babel/generator": { - "version": "7.24.4", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.24.4.tgz", - "integrity": "sha512-Xd6+v6SnjWVx/nus+y0l1sxMOTOMBkyL4+BIdbALyatQnAe/SRVjANeDPSCYaX+i1iJmuGSKf3Z+E+V/va1Hvw==", + "version": "7.26.2", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.26.2.tgz", + "integrity": "sha512-zevQbhbau95nkoxSq3f/DC/SC+EEOUZd3DYqfSkMhY2/wfSeaHV1Ew4vk8e+x8lja31IbyuUa2uQ3JONqKbysw==", + "license": "MIT", "peer": true, "dependencies": { - "@babel/types": "^7.24.0", + "@babel/parser": "^7.26.2", + "@babel/types": "^7.26.0", "@jridgewell/gen-mapping": "^0.3.5", "@jridgewell/trace-mapping": "^0.3.25", - "jsesc": "^2.5.1" + "jsesc": "^3.0.2" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-annotate-as-pure": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.22.5.tgz", - "integrity": "sha512-LvBTxu8bQSQkcyKOU+a1btnNFQ1dMAd0R6PyW3arXes06F6QLWLIrd681bxRPIXlrMGR3XYnW9JyML7dP3qgxg==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.25.9.tgz", + "integrity": "sha512-gv7320KBUFJz1RnylIg5WWYPRXKZ884AGkYpgpWW02TH66Dl+HaC1t1CKd0z3R4b6hdYEcmrNZHUmfCP+1u3/g==", + "license": "MIT", "peer": true, "dependencies": { - "@babel/types": "^7.22.5" + "@babel/types": "^7.25.9" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-builder-binary-assignment-operator-visitor": { - "version": "7.22.15", - "resolved": "https://registry.npmjs.org/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.22.15.tgz", - "integrity": "sha512-QkBXwGgaoC2GtGZRoma6kv7Szfv06khvhFav67ZExau2RaXzy8MpHSMO2PNoP2XtmQphJQRHFfg77Bq731Yizw==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.25.9.tgz", + "integrity": "sha512-C47lC7LIDCnz0h4vai/tpNOI95tCd5ZT3iBt/DBH5lXKHZsyNQv18yf1wIIg2ntiQNgmAvA+DgZ82iW8Qdym8g==", + "license": "MIT", "peer": true, "dependencies": { - "@babel/types": "^7.22.15" + "@babel/traverse": "^7.25.9", + "@babel/types": "^7.25.9" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-compilation-targets": { - "version": "7.23.6", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.23.6.tgz", - "integrity": "sha512-9JB548GZoQVmzrFgp8o7KxdgkTGm6xs9DW0o/Pim72UDjzr5ObUQ6ZzYPqA+g9OTS2bBQoctLJrky0RDCAWRgQ==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.25.9.tgz", + "integrity": "sha512-j9Db8Suy6yV/VHa4qzrj9yZfZxhLWQdVnRlXxmKLYlhWUVB1sB2G5sxuWYXk/whHD9iW76PmNzxZ4UCnTQTVEQ==", + "license": "MIT", "peer": true, "dependencies": { - "@babel/compat-data": "^7.23.5", - "@babel/helper-validator-option": "^7.23.5", - "browserslist": "^4.22.2", + "@babel/compat-data": "^7.25.9", + "@babel/helper-validator-option": "^7.25.9", + "browserslist": "^4.24.0", "lru-cache": "^5.1.1", "semver": "^6.3.1" }, @@ -230,6 +218,7 @@ "version": "5.1.1", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", + "license": "ISC", "peer": true, "dependencies": { "yallist": "^3.0.2" @@ -239,31 +228,25 @@ "version": "6.3.1", "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "license": "ISC", "peer": true, "bin": { "semver": "bin/semver.js" } }, - "node_modules/@babel/helper-compilation-targets/node_modules/yallist": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", - "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", - "peer": true - }, "node_modules/@babel/helper-create-class-features-plugin": { - "version": "7.24.4", - "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.24.4.tgz", - "integrity": "sha512-lG75yeuUSVu0pIcbhiYMXBXANHrpUPaOfu7ryAzskCgKUHuAxRQI5ssrtmF0X9UXldPlvT0XM/A4F44OXRt6iQ==", - "peer": true, - "dependencies": { - "@babel/helper-annotate-as-pure": "^7.22.5", - "@babel/helper-environment-visitor": "^7.22.20", - "@babel/helper-function-name": "^7.23.0", - "@babel/helper-member-expression-to-functions": "^7.23.0", - "@babel/helper-optimise-call-expression": "^7.22.5", - "@babel/helper-replace-supers": "^7.24.1", - "@babel/helper-skip-transparent-expression-wrappers": "^7.22.5", - "@babel/helper-split-export-declaration": "^7.22.6", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.25.9.tgz", + "integrity": "sha512-UTZQMvt0d/rSz6KI+qdu7GQze5TIajwTS++GUozlw8VBJDEOAqSXwm1WvmYEZwqdqSGQshRocPDqrt4HBZB3fQ==", + "license": "MIT", + "peer": true, + "dependencies": { + "@babel/helper-annotate-as-pure": "^7.25.9", + "@babel/helper-member-expression-to-functions": "^7.25.9", + "@babel/helper-optimise-call-expression": "^7.25.9", + "@babel/helper-replace-supers": "^7.25.9", + "@babel/helper-skip-transparent-expression-wrappers": "^7.25.9", + "@babel/traverse": "^7.25.9", "semver": "^6.3.1" }, "engines": { @@ -277,19 +260,21 @@ "version": "6.3.1", "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "license": "ISC", "peer": true, "bin": { "semver": "bin/semver.js" } }, "node_modules/@babel/helper-create-regexp-features-plugin": { - "version": "7.22.15", - "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.22.15.tgz", - "integrity": "sha512-29FkPLFjn4TPEa3RE7GpW+qbE8tlsu3jntNYNfcGsc49LphF1PQIiD+vMZ1z1xVOKt+93khA9tc2JBs3kBjA7w==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.25.9.tgz", + "integrity": "sha512-ORPNZ3h6ZRkOyAa/SaHU+XsLZr0UQzRwuDQ0cczIA17nAzZ+85G5cVkOJIj7QavLZGSe8QXUmNFxSZzjcZF9bw==", + "license": "MIT", "peer": true, "dependencies": { - "@babel/helper-annotate-as-pure": "^7.22.5", - "regexpu-core": "^5.3.1", + "@babel/helper-annotate-as-pure": "^7.25.9", + "regexpu-core": "^6.1.1", "semver": "^6.3.1" }, "engines": { @@ -303,15 +288,17 @@ "version": "6.3.1", "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "license": "ISC", "peer": true, "bin": { "semver": "bin/semver.js" } }, "node_modules/@babel/helper-define-polyfill-provider": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.6.1.tgz", - "integrity": "sha512-o7SDgTJuvx5vLKD6SFvkydkSMBvahDKGiNJzG22IZYXhiqoe9efY7zocICBgzHV4IRg5wdgl2nEL/tulKIEIbA==", + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.6.2.tgz", + "integrity": "sha512-LV76g+C502biUK6AyZ3LK10vDpDyCzZnhZFXkH1L75zHPj68+qc8Zfpx2th+gzwA2MzyK+1g/3EPl62yFnVttQ==", + "license": "MIT", "peer": true, "dependencies": { "@babel/helper-compilation-targets": "^7.22.6", @@ -324,75 +311,44 @@ "@babel/core": "^7.4.0 || ^8.0.0-0 <8.0.0" } }, - "node_modules/@babel/helper-environment-visitor": { - "version": "7.22.20", - "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.20.tgz", - "integrity": "sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA==", - "peer": true, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-function-name": { - "version": "7.23.0", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.23.0.tgz", - "integrity": "sha512-OErEqsrxjZTJciZ4Oo+eoZqeW9UIiOcuYKRJA4ZAgV9myA+pOXhhmpfNCKjEH/auVfEYVFJ6y1Tc4r0eIApqiw==", - "peer": true, - "dependencies": { - "@babel/template": "^7.22.15", - "@babel/types": "^7.23.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-hoist-variables": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.22.5.tgz", - "integrity": "sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw==", - "peer": true, - "dependencies": { - "@babel/types": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" - } - }, "node_modules/@babel/helper-member-expression-to-functions": { - "version": "7.23.0", - "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.23.0.tgz", - "integrity": "sha512-6gfrPwh7OuT6gZyJZvd6WbTfrqAo7vm4xCzAXOusKqq/vWdKXphTpj5klHKNmRUU6/QRGlBsyU9mAIPaWHlqJA==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.25.9.tgz", + "integrity": "sha512-wbfdZ9w5vk0C0oyHqAJbc62+vet5prjj01jjJ8sKn3j9h3MQQlflEdXYvuqRWjHnM12coDEqiC1IRCi0U/EKwQ==", + "license": "MIT", "peer": true, "dependencies": { - "@babel/types": "^7.23.0" + "@babel/traverse": "^7.25.9", + "@babel/types": "^7.25.9" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-module-imports": { - "version": "7.24.3", - "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.24.3.tgz", - "integrity": "sha512-viKb0F9f2s0BCS22QSF308z/+1YWKV/76mwt61NBzS5izMzDPwdq1pTrzf+Li3npBWX9KdQbkeCt1jSAM7lZqg==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.25.9.tgz", + "integrity": "sha512-tnUA4RsrmflIM6W6RFTLFSXITtl0wKjgpnLgXyowocVPrbYrLUXSBXDgTs8BlbmIzIdlBySRQjINYs2BAkiLtw==", + "license": "MIT", "peer": true, "dependencies": { - "@babel/types": "^7.24.0" + "@babel/traverse": "^7.25.9", + "@babel/types": "^7.25.9" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-module-transforms": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.23.3.tgz", - "integrity": "sha512-7bBs4ED9OmswdfDzpz4MpWgSrV7FXlc3zIagvLFjS5H+Mk7Snr21vQ6QwrsoCGMfNC4e4LQPdoULEt4ykz0SRQ==", + "version": "7.26.0", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.26.0.tgz", + "integrity": "sha512-xO+xu6B5K2czEnQye6BHA7DolFFmS3LB7stHZFaOLb1pAwO1HWLS8fXA+eh0A2yIvltPVmx3eNNDBJA2SLHXFw==", + "license": "MIT", "peer": true, "dependencies": { - "@babel/helper-environment-visitor": "^7.22.20", - "@babel/helper-module-imports": "^7.22.15", - "@babel/helper-simple-access": "^7.22.5", - "@babel/helper-split-export-declaration": "^7.22.6", - "@babel/helper-validator-identifier": "^7.22.20" + "@babel/helper-module-imports": "^7.25.9", + "@babel/helper-validator-identifier": "^7.25.9", + "@babel/traverse": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -402,35 +358,38 @@ } }, "node_modules/@babel/helper-optimise-call-expression": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.22.5.tgz", - "integrity": "sha512-HBwaojN0xFRx4yIvpwGqxiV2tUfl7401jlok564NgB9EHS1y6QT17FmKWm4ztqjeVdXLuC4fSvHc5ePpQjoTbw==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.25.9.tgz", + "integrity": "sha512-FIpuNaz5ow8VyrYcnXQTDRGvV6tTjkNtCK/RYNDXGSLlUD6cBuQTSw43CShGxjvfBTfcUA/r6UhUCbtYqkhcuQ==", + "license": "MIT", "peer": true, "dependencies": { - "@babel/types": "^7.22.5" + "@babel/types": "^7.25.9" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-plugin-utils": { - "version": "7.24.0", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.24.0.tgz", - "integrity": "sha512-9cUznXMG0+FxRuJfvL82QlTqIzhVW9sL0KjMPHhAOOvpQGL8QtdxnBKILjBqxlHyliz0yCa1G903ZXI/FuHy2w==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.25.9.tgz", + "integrity": "sha512-kSMlyUVdWe25rEsRGviIgOWnoT/nfABVWlqt9N19/dIPWViAOW2s9wznP5tURbs/IDuNk4gPy3YdYRgH3uxhBw==", + "license": "MIT", "peer": true, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-remap-async-to-generator": { - "version": "7.22.20", - "resolved": "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.22.20.tgz", - "integrity": "sha512-pBGyV4uBqOns+0UvhsTO8qgl8hO89PmiDYv+/COyp1aeMcmfrfruz+/nCMFiYyFF/Knn0yfrC85ZzNFjembFTw==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.25.9.tgz", + "integrity": "sha512-IZtukuUeBbhgOcaW2s06OXTzVNJR0ybm4W5xC1opWFFJMZbwRj5LCk+ByYH7WdZPZTt8KnFwA8pvjN2yqcPlgw==", + "license": "MIT", "peer": true, "dependencies": { - "@babel/helper-annotate-as-pure": "^7.22.5", - "@babel/helper-environment-visitor": "^7.22.20", - "@babel/helper-wrap-function": "^7.22.20" + "@babel/helper-annotate-as-pure": "^7.25.9", + "@babel/helper-wrap-function": "^7.25.9", + "@babel/traverse": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -440,14 +399,15 @@ } }, "node_modules/@babel/helper-replace-supers": { - "version": "7.24.1", - "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.24.1.tgz", - "integrity": "sha512-QCR1UqC9BzG5vZl8BMicmZ28RuUBnHhAMddD8yHFHDRH9lLTZ9uUPehX8ctVPT8l0TKblJidqcgUUKGVrePleQ==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.25.9.tgz", + "integrity": "sha512-IiDqTOTBQy0sWyeXyGSC5TBJpGFXBkRynjBeXsvbhQFKj2viwJC76Epz35YLU1fpe/Am6Vppb7W7zM4fPQzLsQ==", + "license": "MIT", "peer": true, "dependencies": { - "@babel/helper-environment-visitor": "^7.22.20", - "@babel/helper-member-expression-to-functions": "^7.23.0", - "@babel/helper-optimise-call-expression": "^7.22.5" + "@babel/helper-member-expression-to-functions": "^7.25.9", + "@babel/helper-optimise-call-expression": "^7.25.9", + "@babel/traverse": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -457,165 +417,100 @@ } }, "node_modules/@babel/helper-simple-access": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.22.5.tgz", - "integrity": "sha512-n0H99E/K+Bika3++WNL17POvo4rKWZ7lZEp1Q+fStVbUi8nxPQEBOlTmCOxW/0JsS56SKKQ+ojAe2pHKJHN35w==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.25.9.tgz", + "integrity": "sha512-c6WHXuiaRsJTyHYLJV75t9IqsmTbItYfdj99PnzYGQZkYKvan5/2jKJ7gu31J3/BJ/A18grImSPModuyG/Eo0Q==", + "license": "MIT", "peer": true, "dependencies": { - "@babel/types": "^7.22.5" + "@babel/traverse": "^7.25.9", + "@babel/types": "^7.25.9" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-skip-transparent-expression-wrappers": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.22.5.tgz", - "integrity": "sha512-tK14r66JZKiC43p8Ki33yLBVJKlQDFoA8GYN67lWCDCqoL6EMMSuM9b+Iff2jHaM/RRFYl7K+iiru7hbRqNx8Q==", - "peer": true, - "dependencies": { - "@babel/types": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-split-export-declaration": { - "version": "7.22.6", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.22.6.tgz", - "integrity": "sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.25.9.tgz", + "integrity": "sha512-K4Du3BFa3gvyhzgPcntrkDgZzQaq6uozzcpGbOO1OEJaI+EJdqWIMTLgFgQf6lrfiDFo5FU+BxKepI9RmZqahA==", + "license": "MIT", "peer": true, "dependencies": { - "@babel/types": "^7.22.5" + "@babel/traverse": "^7.25.9", + "@babel/types": "^7.25.9" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-string-parser": { - "version": "7.24.1", - "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.24.1.tgz", - "integrity": "sha512-2ofRCjnnA9y+wk8b9IAREroeUP02KHp431N2mhKniy2yKIDKpbrHv9eXwm8cBeWQYcJmzv5qKCu65P47eCF7CQ==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.25.9.tgz", + "integrity": "sha512-4A/SCr/2KLd5jrtOMFzaKjVtAei3+2r/NChoBNoZ3EyP/+GlhoaEGoWOZUmFmoITP7zOJyHIMm+DYRd8o3PvHA==", + "license": "MIT", "peer": true, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-validator-identifier": { - "version": "7.22.20", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz", - "integrity": "sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.25.9.tgz", + "integrity": "sha512-Ed61U6XJc3CVRfkERJWDz4dJwKe7iLmmJsbOGu9wSloNSFttHV0I8g6UAgb7qnK5ly5bGLPd4oXZlxCdANBOWQ==", + "license": "MIT", "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-validator-option": { - "version": "7.23.5", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.23.5.tgz", - "integrity": "sha512-85ttAOMLsr53VgXkTbkx8oA6YTfT4q7/HzXSLEYmjcSTJPMPQtvq1BD79Byep5xMUYbGRzEpDsjUf3dyp54IKw==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.25.9.tgz", + "integrity": "sha512-e/zv1co8pp55dNdEcCynfj9X7nyUKUXoUEwfXqaZt0omVOmDe9oOTdKStH4GmAw6zxMFs50ZayuMfHDKlO7Tfw==", + "license": "MIT", "peer": true, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-wrap-function": { - "version": "7.22.20", - "resolved": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.22.20.tgz", - "integrity": "sha512-pms/UwkOpnQe/PDAEdV/d7dVCoBbB+R4FvYoHGZz+4VPcg7RtYy2KP7S2lbuWM6FCSgob5wshfGESbC/hzNXZw==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.25.9.tgz", + "integrity": "sha512-ETzz9UTjQSTmw39GboatdymDq4XIQbR8ySgVrylRhPOFpsd+JrKHIuF0de7GCWmem+T4uC5z7EZguod7Wj4A4g==", + "license": "MIT", "peer": true, "dependencies": { - "@babel/helper-function-name": "^7.22.5", - "@babel/template": "^7.22.15", - "@babel/types": "^7.22.19" + "@babel/template": "^7.25.9", + "@babel/traverse": "^7.25.9", + "@babel/types": "^7.25.9" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helpers": { - "version": "7.24.4", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.24.4.tgz", - "integrity": "sha512-FewdlZbSiwaVGlgT1DPANDuCHaDMiOo+D/IDYRFYjHOuv66xMSJ7fQwwODwRNAPkADIO/z1EoF/l2BCWlWABDw==", + "version": "7.26.0", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.26.0.tgz", + "integrity": "sha512-tbhNuIxNcVb21pInl3ZSjksLCvgdZy9KwJ8brv993QtIVKJBBkYXz4q4ZbAv31GdnC+R90np23L5FbEBlthAEw==", + "license": "MIT", "peer": true, "dependencies": { - "@babel/template": "^7.24.0", - "@babel/traverse": "^7.24.1", - "@babel/types": "^7.24.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/highlight": { - "version": "7.24.2", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.24.2.tgz", - "integrity": "sha512-Yac1ao4flkTxTteCDZLEvdxg2fZfz1v8M4QpaGypq/WPDqg3ijHYbDfs+LG5hvzSoqaSZ9/Z9lKSP3CjZjv+pA==", - "dependencies": { - "@babel/helper-validator-identifier": "^7.22.20", - "chalk": "^2.4.2", - "js-tokens": "^4.0.0", - "picocolors": "^1.0.0" + "@babel/template": "^7.25.9", + "@babel/types": "^7.26.0" }, "engines": { "node": ">=6.9.0" } }, - "node_modules/@babel/highlight/node_modules/ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dependencies": { - "color-convert": "^1.9.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/highlight/node_modules/chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dependencies": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/highlight/node_modules/escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/@babel/highlight/node_modules/has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", - "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/highlight/node_modules/supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dependencies": { - "has-flag": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, "node_modules/@babel/parser": { - "version": "7.24.4", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.24.4.tgz", - "integrity": "sha512-zTvEBcghmeBma9QIGunWevvBAp4/Qu9Bdq+2k0Ot4fVMD6v3dsC9WOcRSKk7tRRyBM/53yKMJko9xOatGQAwSg==", + "version": "7.26.2", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.26.2.tgz", + "integrity": "sha512-DWMCZH9WA4Maitz2q21SRKHo9QXZxkDsbNZoVD62gusNtNBBqDg9i7uOhASfTfIGNzW+O+r7+jAlM8dwphcJKQ==", + "license": "MIT", "peer": true, + "dependencies": { + "@babel/types": "^7.26.0" + }, "bin": { "parser": "bin/babel-parser.js" }, @@ -624,13 +519,14 @@ } }, "node_modules/@babel/plugin-bugfix-firefox-class-in-computed-class-key": { - "version": "7.24.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-firefox-class-in-computed-class-key/-/plugin-bugfix-firefox-class-in-computed-class-key-7.24.4.tgz", - "integrity": "sha512-qpl6vOOEEzTLLcsuqYYo8yDtrTocmu2xkGvgNebvPjT9DTtfFYGmgDqY+rBYXNlqL4s9qLDn6xkrJv4RxAPiTA==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-firefox-class-in-computed-class-key/-/plugin-bugfix-firefox-class-in-computed-class-key-7.25.9.tgz", + "integrity": "sha512-ZkRyVkThtxQ/J6nv3JFYv1RYY+JT5BvU0y3k5bWrmuG4woXypRa4PXmm9RhOwodRkYFWqC0C0cqcJ4OqR7kW+g==", + "license": "MIT", "peer": true, "dependencies": { - "@babel/helper-environment-visitor": "^7.22.20", - "@babel/helper-plugin-utils": "^7.24.0" + "@babel/helper-plugin-utils": "^7.25.9", + "@babel/traverse": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -639,13 +535,14 @@ "@babel/core": "^7.0.0" } }, - "node_modules/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": { - "version": "7.24.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression/-/plugin-bugfix-safari-id-destructuring-collision-in-function-expression-7.24.1.tgz", - "integrity": "sha512-y4HqEnkelJIOQGd+3g1bTeKsA5c6qM7eOn7VggGVbBc0y8MLSKHacwcIE2PplNlQSj0PqS9rrXL/nkPVK+kUNg==", + "node_modules/@babel/plugin-bugfix-safari-class-field-initializer-scope": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-safari-class-field-initializer-scope/-/plugin-bugfix-safari-class-field-initializer-scope-7.25.9.tgz", + "integrity": "sha512-MrGRLZxLD/Zjj0gdU15dfs+HH/OXvnw/U4jJD8vpcP2CJQapPEv1IWwjc/qMg7ItBlPwSv1hRBbb7LeuANdcnw==", + "license": "MIT", "peer": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.24.0" + "@babel/helper-plugin-utils": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -654,56 +551,55 @@ "@babel/core": "^7.0.0" } }, - "node_modules/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": { - "version": "7.24.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining/-/plugin-bugfix-v8-spread-parameters-in-optional-chaining-7.24.1.tgz", - "integrity": "sha512-Hj791Ii4ci8HqnaKHAlLNs+zaLXb0EzSDhiAWp5VNlyvCNymYfacs64pxTxbH1znW/NcArSmwpmG9IKE/TUVVQ==", + "node_modules/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression/-/plugin-bugfix-safari-id-destructuring-collision-in-function-expression-7.25.9.tgz", + "integrity": "sha512-2qUwwfAFpJLZqxd02YW9btUCZHl+RFvdDkNfZwaIJrvB8Tesjsk8pEQkTvGwZXLqXUx/2oyY3ySRhm6HOXuCug==", + "license": "MIT", "peer": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.24.0", - "@babel/helper-skip-transparent-expression-wrappers": "^7.22.5", - "@babel/plugin-transform-optional-chaining": "^7.24.1" + "@babel/helper-plugin-utils": "^7.25.9" }, "engines": { "node": ">=6.9.0" }, "peerDependencies": { - "@babel/core": "^7.13.0" + "@babel/core": "^7.0.0" } }, - "node_modules/@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly": { - "version": "7.24.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly/-/plugin-bugfix-v8-static-class-fields-redefine-readonly-7.24.1.tgz", - "integrity": "sha512-m9m/fXsXLiHfwdgydIFnpk+7jlVbnvlK5B2EKiPdLUb6WX654ZaaEWJUjk8TftRbZpK0XibovlLWX4KIZhV6jw==", + "node_modules/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining/-/plugin-bugfix-v8-spread-parameters-in-optional-chaining-7.25.9.tgz", + "integrity": "sha512-6xWgLZTJXwilVjlnV7ospI3xi+sl8lN8rXXbBD6vYn3UYDlGsag8wrZkKcSI8G6KgqKP7vNFaDgeDnfAABq61g==", + "license": "MIT", "peer": true, "dependencies": { - "@babel/helper-environment-visitor": "^7.22.20", - "@babel/helper-plugin-utils": "^7.24.0" + "@babel/helper-plugin-utils": "^7.25.9", + "@babel/helper-skip-transparent-expression-wrappers": "^7.25.9", + "@babel/plugin-transform-optional-chaining": "^7.25.9" }, "engines": { "node": ">=6.9.0" }, "peerDependencies": { - "@babel/core": "^7.0.0" + "@babel/core": "^7.13.0" } }, - "node_modules/@babel/plugin-proposal-async-generator-functions": { - "version": "7.20.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.20.7.tgz", - "integrity": "sha512-xMbiLsn/8RK7Wq7VeVytytS2L6qE69bXPB10YCmMdDZbKF4okCqY74pI/jJQ/8U0b/F6NrT2+14b8/P9/3AMGA==", - "deprecated": "This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-async-generator-functions instead.", + "node_modules/@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly/-/plugin-bugfix-v8-static-class-fields-redefine-readonly-7.25.9.tgz", + "integrity": "sha512-aLnMXYPnzwwqhYSCyXfKkIkYgJ8zv9RK+roo9DkTXz38ynIhd9XCbN08s3MGvqL2MYGVUGdRQLL/JqBIeJhJBg==", + "license": "MIT", "peer": true, "dependencies": { - "@babel/helper-environment-visitor": "^7.18.9", - "@babel/helper-plugin-utils": "^7.20.2", - "@babel/helper-remap-async-to-generator": "^7.18.9", - "@babel/plugin-syntax-async-generators": "^7.8.4" + "@babel/helper-plugin-utils": "^7.25.9", + "@babel/traverse": "^7.25.9" }, "engines": { "node": ">=6.9.0" }, "peerDependencies": { - "@babel/core": "^7.0.0-0" + "@babel/core": "^7.0.0" } }, "node_modules/@babel/plugin-proposal-class-properties": { @@ -711,6 +607,7 @@ "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.18.6.tgz", "integrity": "sha512-cumfXOF0+nzZrrN8Rf0t7M+tF6sZc7vhQwYQck9q1/5w2OExlD+b4v4RpMJFaV1Z7WcDRgO6FqvxqxGlwo+RHQ==", "deprecated": "This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-class-properties instead.", + "license": "MIT", "peer": true, "dependencies": { "@babel/helper-create-class-features-plugin": "^7.18.6", @@ -724,13 +621,13 @@ } }, "node_modules/@babel/plugin-proposal-export-default-from": { - "version": "7.24.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-export-default-from/-/plugin-proposal-export-default-from-7.24.1.tgz", - "integrity": "sha512-+0hrgGGV3xyYIjOrD/bUZk/iUwOIGuoANfRfVg1cPhYBxF+TIXSEcc42DqzBICmWsnAQ+SfKedY0bj8QD+LuMg==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-export-default-from/-/plugin-proposal-export-default-from-7.25.9.tgz", + "integrity": "sha512-ykqgwNfSnNOB+C8fV5X4mG3AVmvu+WVxcaU9xHHtBb7PCrPeweMmPjGsn8eMaeJg6SJuoUuZENeeSWaarWqonQ==", + "license": "MIT", "peer": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.24.0", - "@babel/plugin-syntax-export-default-from": "^7.24.1" + "@babel/helper-plugin-utils": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -744,6 +641,7 @@ "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-nullish-coalescing-operator/-/plugin-proposal-nullish-coalescing-operator-7.18.6.tgz", "integrity": "sha512-wQxQzxYeJqHcfppzBDnm1yAY0jSRkUXR2z8RePZYrKwMKgMlE8+Z6LUno+bd6LvbGh8Gltvy74+9pIYkr+XkKA==", "deprecated": "This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-nullish-coalescing-operator instead.", + "license": "MIT", "peer": true, "dependencies": { "@babel/helper-plugin-utils": "^7.18.6", @@ -756,65 +654,12 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-proposal-numeric-separator": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-numeric-separator/-/plugin-proposal-numeric-separator-7.18.6.tgz", - "integrity": "sha512-ozlZFogPqoLm8WBr5Z8UckIoE4YQ5KESVcNudyXOR8uqIkliTEgJ3RoketfG6pmzLdeZF0H/wjE9/cCEitBl7Q==", - "deprecated": "This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-numeric-separator instead.", - "peer": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.18.6", - "@babel/plugin-syntax-numeric-separator": "^7.10.4" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-proposal-object-rest-spread": { - "version": "7.20.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.20.7.tgz", - "integrity": "sha512-d2S98yCiLxDVmBmE8UjGcfPvNEUbA1U5q5WxaWFUGRzJSVAZqm5W6MbPct0jxnegUZ0niLeNX+IOzEs7wYg9Dg==", - "deprecated": "This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-object-rest-spread instead.", - "peer": true, - "dependencies": { - "@babel/compat-data": "^7.20.5", - "@babel/helper-compilation-targets": "^7.20.7", - "@babel/helper-plugin-utils": "^7.20.2", - "@babel/plugin-syntax-object-rest-spread": "^7.8.3", - "@babel/plugin-transform-parameters": "^7.20.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-proposal-optional-catch-binding": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.18.6.tgz", - "integrity": "sha512-Q40HEhs9DJQyaZfUjjn6vE8Cv4GmMHCYuMGIWUnlxH6400VGxOuwWsPt4FxXxJkC/5eOzgn0z21M9gMT4MOhbw==", - "deprecated": "This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-optional-catch-binding instead.", - "peer": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.18.6", - "@babel/plugin-syntax-optional-catch-binding": "^7.8.3" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, "node_modules/@babel/plugin-proposal-optional-chaining": { "version": "7.21.0", "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.21.0.tgz", "integrity": "sha512-p4zeefM72gpmEe2fkUr/OnOXpWEf8nAgk7ZYVqqfFiyIG7oFfVZcCrU64hWn5xp4tQ9LkV4bTIa5rD0KANpKNA==", "deprecated": "This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-optional-chaining instead.", + "license": "MIT", "peer": true, "dependencies": { "@babel/helper-plugin-utils": "^7.20.2", @@ -832,6 +677,7 @@ "version": "7.21.0-placeholder-for-preset-env.2", "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-property-in-object/-/plugin-proposal-private-property-in-object-7.21.0-placeholder-for-preset-env.2.tgz", "integrity": "sha512-SOSkfJDddaM7mak6cPEpswyTRnuRltl429hMraQEglW+OkovnCzsiszTmsrlY//qLFjCpQDFRvjdm2wA5pPm9w==", + "license": "MIT", "peer": true, "engines": { "node": ">=6.9.0" @@ -844,6 +690,20 @@ "version": "7.8.4", "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz", "integrity": "sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==", + "license": "MIT", + "peer": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-bigint": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-bigint/-/plugin-syntax-bigint-7.8.3.tgz", + "integrity": "sha512-wnTnFlG+YxQm3vDxpGE57Pj0srRU4sHE/mDkt1qv2YJJSeUAec2ma4WLUnUPeKjyrfntVwe/N6dCXpU+zL3Npg==", + "license": "MIT", "peer": true, "dependencies": { "@babel/helper-plugin-utils": "^7.8.0" @@ -856,6 +716,7 @@ "version": "7.12.13", "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz", "integrity": "sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA==", + "license": "MIT", "peer": true, "dependencies": { "@babel/helper-plugin-utils": "^7.12.13" @@ -868,6 +729,7 @@ "version": "7.14.5", "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-static-block/-/plugin-syntax-class-static-block-7.14.5.tgz", "integrity": "sha512-b+YyPmr6ldyNnM6sqYeMWE+bgJcJpO6yS4QD7ymxgH34GBPNDM/THBh8iunyvKIZztiwLH4CJZ0RxTk9emgpjw==", + "license": "MIT", "peer": true, "dependencies": { "@babel/helper-plugin-utils": "^7.14.5" @@ -883,6 +745,7 @@ "version": "7.8.3", "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-dynamic-import/-/plugin-syntax-dynamic-import-7.8.3.tgz", "integrity": "sha512-5gdGbFon+PszYzqs83S3E5mpi7/y/8M9eC90MRTZfduQOYW76ig6SOSPNe41IG5LoP3FGBn2N0RjVDSQiS94kQ==", + "license": "MIT", "peer": true, "dependencies": { "@babel/helper-plugin-utils": "^7.8.0" @@ -892,12 +755,13 @@ } }, "node_modules/@babel/plugin-syntax-export-default-from": { - "version": "7.24.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-export-default-from/-/plugin-syntax-export-default-from-7.24.1.tgz", - "integrity": "sha512-cNXSxv9eTkGUtd0PsNMK8Yx5xeScxfpWOUAxE+ZPAXXEcAMOC3fk7LRdXq5fvpra2pLx2p1YtkAhpUbB2SwaRA==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-export-default-from/-/plugin-syntax-export-default-from-7.25.9.tgz", + "integrity": "sha512-9MhJ/SMTsVqsd69GyQg89lYR4o9T+oDGv5F6IsigxxqFVOyR/IflDLYP8WDI1l8fkhNGGktqkvL5qwNCtGEpgQ==", + "license": "MIT", "peer": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.24.0" + "@babel/helper-plugin-utils": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -906,25 +770,14 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-syntax-export-namespace-from": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-export-namespace-from/-/plugin-syntax-export-namespace-from-7.8.3.tgz", - "integrity": "sha512-MXf5laXo6c1IbEbegDmzGPwGNTsHZmEy6QGznu5Sh2UCWvueywb2ee+CCE4zQiZstxU9BMoQO9i6zUFSY0Kj0Q==", - "peer": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.3" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, "node_modules/@babel/plugin-syntax-flow": { - "version": "7.24.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-flow/-/plugin-syntax-flow-7.24.1.tgz", - "integrity": "sha512-sxi2kLTI5DeW5vDtMUsk4mTPwvlUDbjOnoWayhynCwrw4QXRld4QEYwqzY8JmQXaJUtgUuCIurtSRH5sn4c7mA==", + "version": "7.26.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-flow/-/plugin-syntax-flow-7.26.0.tgz", + "integrity": "sha512-B+O2DnPc0iG+YXFqOxv2WNuNU97ToWjOomUQ78DouOENWUaM5sVrmet9mcomUGQFwpJd//gvUagXBSdzO1fRKg==", + "license": "MIT", "peer": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.24.0" + "@babel/helper-plugin-utils": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -934,12 +787,13 @@ } }, "node_modules/@babel/plugin-syntax-import-assertions": { - "version": "7.24.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-assertions/-/plugin-syntax-import-assertions-7.24.1.tgz", - "integrity": "sha512-IuwnI5XnuF189t91XbxmXeCDz3qs6iDRO7GJ++wcfgeXNs/8FmIlKcpDSXNVyuLQxlwvskmI3Ct73wUODkJBlQ==", + "version": "7.26.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-assertions/-/plugin-syntax-import-assertions-7.26.0.tgz", + "integrity": "sha512-QCWT5Hh830hK5EQa7XzuqIkQU9tT/whqbDz7kuaZMHFl1inRRg7JnuAEOQ0Ur0QUl0NufCk1msK2BeY79Aj/eg==", + "license": "MIT", "peer": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.24.0" + "@babel/helper-plugin-utils": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -949,12 +803,13 @@ } }, "node_modules/@babel/plugin-syntax-import-attributes": { - "version": "7.24.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-attributes/-/plugin-syntax-import-attributes-7.24.1.tgz", - "integrity": "sha512-zhQTMH0X2nVLnb04tz+s7AMuasX8U0FnpE+nHTOhSOINjWMnopoZTxtIKsd45n4GQ/HIZLyfIpoul8e2m0DnRA==", + "version": "7.26.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-attributes/-/plugin-syntax-import-attributes-7.26.0.tgz", + "integrity": "sha512-e2dttdsJ1ZTpi3B9UYGLw41hifAubg19AtCu/2I/F1QNVclOBr1dYpTdmdyZ84Xiz43BS/tCUkMAZNLv12Pi+A==", + "license": "MIT", "peer": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.24.0" + "@babel/helper-plugin-utils": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -967,6 +822,7 @@ "version": "7.10.4", "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-meta/-/plugin-syntax-import-meta-7.10.4.tgz", "integrity": "sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g==", + "license": "MIT", "peer": true, "dependencies": { "@babel/helper-plugin-utils": "^7.10.4" @@ -979,6 +835,7 @@ "version": "7.8.3", "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz", "integrity": "sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==", + "license": "MIT", "peer": true, "dependencies": { "@babel/helper-plugin-utils": "^7.8.0" @@ -988,12 +845,13 @@ } }, "node_modules/@babel/plugin-syntax-jsx": { - "version": "7.24.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.24.1.tgz", - "integrity": "sha512-2eCtxZXf+kbkMIsXS4poTvT4Yu5rXiRa+9xGVT56raghjmBTKMpFNc9R4IDiB4emao9eO22Ox7CxuJG7BgExqA==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.25.9.tgz", + "integrity": "sha512-ld6oezHQMZsZfp6pWtbjaNDF2tiiCYYDqQszHt5VV437lewP9aSi2Of99CK0D0XB21k7FLgnLcmQKyKzynfeAA==", + "license": "MIT", "peer": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.24.0" + "@babel/helper-plugin-utils": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -1006,6 +864,7 @@ "version": "7.10.4", "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz", "integrity": "sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==", + "license": "MIT", "peer": true, "dependencies": { "@babel/helper-plugin-utils": "^7.10.4" @@ -1018,6 +877,7 @@ "version": "7.8.3", "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz", "integrity": "sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==", + "license": "MIT", "peer": true, "dependencies": { "@babel/helper-plugin-utils": "^7.8.0" @@ -1030,6 +890,7 @@ "version": "7.10.4", "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz", "integrity": "sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug==", + "license": "MIT", "peer": true, "dependencies": { "@babel/helper-plugin-utils": "^7.10.4" @@ -1042,6 +903,7 @@ "version": "7.8.3", "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz", "integrity": "sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==", + "license": "MIT", "peer": true, "dependencies": { "@babel/helper-plugin-utils": "^7.8.0" @@ -1054,6 +916,7 @@ "version": "7.8.3", "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz", "integrity": "sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==", + "license": "MIT", "peer": true, "dependencies": { "@babel/helper-plugin-utils": "^7.8.0" @@ -1066,6 +929,7 @@ "version": "7.8.3", "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz", "integrity": "sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==", + "license": "MIT", "peer": true, "dependencies": { "@babel/helper-plugin-utils": "^7.8.0" @@ -1078,6 +942,7 @@ "version": "7.14.5", "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-private-property-in-object/-/plugin-syntax-private-property-in-object-7.14.5.tgz", "integrity": "sha512-0wVnp9dxJ72ZUJDV27ZfbSj6iHLoytYZmh3rFcxNnvsJF3ktkzLDZPy/mA17HGsaQT3/DQsWYX1f1QGWkCoVUg==", + "license": "MIT", "peer": true, "dependencies": { "@babel/helper-plugin-utils": "^7.14.5" @@ -1093,6 +958,7 @@ "version": "7.14.5", "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.14.5.tgz", "integrity": "sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw==", + "license": "MIT", "peer": true, "dependencies": { "@babel/helper-plugin-utils": "^7.14.5" @@ -1105,12 +971,13 @@ } }, "node_modules/@babel/plugin-syntax-typescript": { - "version": "7.24.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.24.1.tgz", - "integrity": "sha512-Yhnmvy5HZEnHUty6i++gcfH1/l68AHnItFHnaCv6hn9dNh0hQvvQJsxpi4BMBFN5DLeHBuucT/0DgzXif/OyRw==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.25.9.tgz", + "integrity": "sha512-hjMgRy5hb8uJJjUcdWunWVcoi9bGpJp8p5Ol1229PoN6aytsLwNMgmdftO23wnCLMfVmTwZDWMPNq/D1SY60JQ==", + "license": "MIT", "peer": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.24.0" + "@babel/helper-plugin-utils": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -1123,6 +990,7 @@ "version": "7.18.6", "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-unicode-sets-regex/-/plugin-syntax-unicode-sets-regex-7.18.6.tgz", "integrity": "sha512-727YkEAPwSIQTv5im8QHz3upqp92JTWhidIC81Tdx4VJYIte/VndKf1qKrfnnhPLiPghStWfvC/iFaMCQu7Nqg==", + "license": "MIT", "peer": true, "dependencies": { "@babel/helper-create-regexp-features-plugin": "^7.18.6", @@ -1136,12 +1004,13 @@ } }, "node_modules/@babel/plugin-transform-arrow-functions": { - "version": "7.24.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.24.1.tgz", - "integrity": "sha512-ngT/3NkRhsaep9ck9uj2Xhv9+xB1zShY3tM3g6om4xxCELwCDN4g4Aq5dRn48+0hasAql7s2hdBOysCfNpr4fw==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.25.9.tgz", + "integrity": "sha512-6jmooXYIwn9ca5/RylZADJ+EnSxVUS5sjeJ9UPk6RWRzXCmOJCy6dqItPJFpw2cuCangPK4OYr5uhGKcmrm5Qg==", + "license": "MIT", "peer": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.24.0" + "@babel/helper-plugin-utils": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -1151,15 +1020,15 @@ } }, "node_modules/@babel/plugin-transform-async-generator-functions": { - "version": "7.24.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-generator-functions/-/plugin-transform-async-generator-functions-7.24.3.tgz", - "integrity": "sha512-Qe26CMYVjpQxJ8zxM1340JFNjZaF+ISWpr1Kt/jGo+ZTUzKkfw/pphEWbRCb+lmSM6k/TOgfYLvmbHkUQ0asIg==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-generator-functions/-/plugin-transform-async-generator-functions-7.25.9.tgz", + "integrity": "sha512-RXV6QAzTBbhDMO9fWwOmwwTuYaiPbggWQ9INdZqAYeSHyG7FzQ+nOZaUUjNwKv9pV3aE4WFqFm1Hnbci5tBCAw==", + "license": "MIT", "peer": true, "dependencies": { - "@babel/helper-environment-visitor": "^7.22.20", - "@babel/helper-plugin-utils": "^7.24.0", - "@babel/helper-remap-async-to-generator": "^7.22.20", - "@babel/plugin-syntax-async-generators": "^7.8.4" + "@babel/helper-plugin-utils": "^7.25.9", + "@babel/helper-remap-async-to-generator": "^7.25.9", + "@babel/traverse": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -1169,14 +1038,15 @@ } }, "node_modules/@babel/plugin-transform-async-to-generator": { - "version": "7.24.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.24.1.tgz", - "integrity": "sha512-AawPptitRXp1y0n4ilKcGbRYWfbbzFWz2NqNu7dacYDtFtz0CMjG64b3LQsb3KIgnf4/obcUL78hfaOS7iCUfw==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.25.9.tgz", + "integrity": "sha512-NT7Ejn7Z/LjUH0Gv5KsBCxh7BH3fbLTV0ptHvpeMvrt3cPThHfJfst9Wrb7S8EvJ7vRTFI7z+VAvFVEQn/m5zQ==", + "license": "MIT", "peer": true, "dependencies": { - "@babel/helper-module-imports": "^7.24.1", - "@babel/helper-plugin-utils": "^7.24.0", - "@babel/helper-remap-async-to-generator": "^7.22.20" + "@babel/helper-module-imports": "^7.25.9", + "@babel/helper-plugin-utils": "^7.25.9", + "@babel/helper-remap-async-to-generator": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -1186,12 +1056,13 @@ } }, "node_modules/@babel/plugin-transform-block-scoped-functions": { - "version": "7.24.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.24.1.tgz", - "integrity": "sha512-TWWC18OShZutrv9C6mye1xwtam+uNi2bnTOCBUd5sZxyHOiWbU6ztSROofIMrK84uweEZC219POICK/sTYwfgg==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.25.9.tgz", + "integrity": "sha512-toHc9fzab0ZfenFpsyYinOX0J/5dgJVA2fm64xPewu7CoYHWEivIWKxkK2rMi4r3yQqLnVmheMXRdG+k239CgA==", + "license": "MIT", "peer": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.24.0" + "@babel/helper-plugin-utils": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -1201,12 +1072,13 @@ } }, "node_modules/@babel/plugin-transform-block-scoping": { - "version": "7.24.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.24.4.tgz", - "integrity": "sha512-nIFUZIpGKDf9O9ttyRXpHFpKC+X3Y5mtshZONuEUYBomAKoM4y029Jr+uB1bHGPhNmK8YXHevDtKDOLmtRrp6g==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.25.9.tgz", + "integrity": "sha512-1F05O7AYjymAtqbsFETboN1NvBdcnzMerO+zlMyJBEz6WkMdejvGWw9p05iTSjC85RLlBseHHQpYaM4gzJkBGg==", + "license": "MIT", "peer": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.24.0" + "@babel/helper-plugin-utils": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -1216,13 +1088,14 @@ } }, "node_modules/@babel/plugin-transform-class-properties": { - "version": "7.24.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-class-properties/-/plugin-transform-class-properties-7.24.1.tgz", - "integrity": "sha512-OMLCXi0NqvJfORTaPQBwqLXHhb93wkBKZ4aNwMl6WtehO7ar+cmp+89iPEQPqxAnxsOKTaMcs3POz3rKayJ72g==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-class-properties/-/plugin-transform-class-properties-7.25.9.tgz", + "integrity": "sha512-bbMAII8GRSkcd0h0b4X+36GksxuheLFjP65ul9w6C3KgAamI3JqErNgSrosX6ZPj+Mpim5VvEbawXxJCyEUV3Q==", + "license": "MIT", "peer": true, "dependencies": { - "@babel/helper-create-class-features-plugin": "^7.24.1", - "@babel/helper-plugin-utils": "^7.24.0" + "@babel/helper-create-class-features-plugin": "^7.25.9", + "@babel/helper-plugin-utils": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -1232,14 +1105,14 @@ } }, "node_modules/@babel/plugin-transform-class-static-block": { - "version": "7.24.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-class-static-block/-/plugin-transform-class-static-block-7.24.4.tgz", - "integrity": "sha512-B8q7Pz870Hz/q9UgP8InNpY01CSLDSCyqX7zcRuv3FcPl87A2G17lASroHWaCtbdIcbYzOZ7kWmXFKbijMSmFg==", + "version": "7.26.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-class-static-block/-/plugin-transform-class-static-block-7.26.0.tgz", + "integrity": "sha512-6J2APTs7BDDm+UMqP1useWqhcRAXo0WIoVj26N7kPFB6S73Lgvyka4KTZYIxtgYXiN5HTyRObA72N2iu628iTQ==", + "license": "MIT", "peer": true, "dependencies": { - "@babel/helper-create-class-features-plugin": "^7.24.4", - "@babel/helper-plugin-utils": "^7.24.0", - "@babel/plugin-syntax-class-static-block": "^7.14.5" + "@babel/helper-create-class-features-plugin": "^7.25.9", + "@babel/helper-plugin-utils": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -1249,18 +1122,17 @@ } }, "node_modules/@babel/plugin-transform-classes": { - "version": "7.24.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.24.1.tgz", - "integrity": "sha512-ZTIe3W7UejJd3/3R4p7ScyyOoafetUShSf4kCqV0O7F/RiHxVj/wRaRnQlrGwflvcehNA8M42HkAiEDYZu2F1Q==", - "peer": true, - "dependencies": { - "@babel/helper-annotate-as-pure": "^7.22.5", - "@babel/helper-compilation-targets": "^7.23.6", - "@babel/helper-environment-visitor": "^7.22.20", - "@babel/helper-function-name": "^7.23.0", - "@babel/helper-plugin-utils": "^7.24.0", - "@babel/helper-replace-supers": "^7.24.1", - "@babel/helper-split-export-declaration": "^7.22.6", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.25.9.tgz", + "integrity": "sha512-mD8APIXmseE7oZvZgGABDyM34GUmK45Um2TXiBUt7PnuAxrgoSVf123qUzPxEr/+/BHrRn5NMZCdE2m/1F8DGg==", + "license": "MIT", + "peer": true, + "dependencies": { + "@babel/helper-annotate-as-pure": "^7.25.9", + "@babel/helper-compilation-targets": "^7.25.9", + "@babel/helper-plugin-utils": "^7.25.9", + "@babel/helper-replace-supers": "^7.25.9", + "@babel/traverse": "^7.25.9", "globals": "^11.1.0" }, "engines": { @@ -1274,19 +1146,21 @@ "version": "11.12.0", "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", + "license": "MIT", "peer": true, "engines": { "node": ">=4" } }, "node_modules/@babel/plugin-transform-computed-properties": { - "version": "7.24.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.24.1.tgz", - "integrity": "sha512-5pJGVIUfJpOS+pAqBQd+QMaTD2vCL/HcePooON6pDpHgRp4gNRmzyHTPIkXntwKsq3ayUFVfJaIKPw2pOkOcTw==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.25.9.tgz", + "integrity": "sha512-HnBegGqXZR12xbcTHlJ9HGxw1OniltT26J5YpfruGqtUHlz/xKf/G2ak9e+t0rVqrjXa9WOhvYPz1ERfMj23AA==", + "license": "MIT", "peer": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.24.0", - "@babel/template": "^7.24.0" + "@babel/helper-plugin-utils": "^7.25.9", + "@babel/template": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -1296,12 +1170,13 @@ } }, "node_modules/@babel/plugin-transform-destructuring": { - "version": "7.24.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.24.1.tgz", - "integrity": "sha512-ow8jciWqNxR3RYbSNVuF4U2Jx130nwnBnhRw6N6h1bOejNkABmcI5X5oz29K4alWX7vf1C+o6gtKXikzRKkVdw==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.25.9.tgz", + "integrity": "sha512-WkCGb/3ZxXepmMiX101nnGiU+1CAdut8oHyEOHxkKuS1qKpU2SMXE2uSvfz8PBuLd49V6LEsbtyPhWC7fnkgvQ==", + "license": "MIT", "peer": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.24.0" + "@babel/helper-plugin-utils": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -1311,13 +1186,14 @@ } }, "node_modules/@babel/plugin-transform-dotall-regex": { - "version": "7.24.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.24.1.tgz", - "integrity": "sha512-p7uUxgSoZwZ2lPNMzUkqCts3xlp8n+o05ikjy7gbtFJSt9gdU88jAmtfmOxHM14noQXBxfgzf2yRWECiNVhTCw==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.25.9.tgz", + "integrity": "sha512-t7ZQ7g5trIgSRYhI9pIJtRl64KHotutUJsh4Eze5l7olJv+mRSg4/MmbZ0tv1eeqRbdvo/+trvJD/Oc5DmW2cA==", + "license": "MIT", "peer": true, "dependencies": { - "@babel/helper-create-regexp-features-plugin": "^7.22.15", - "@babel/helper-plugin-utils": "^7.24.0" + "@babel/helper-create-regexp-features-plugin": "^7.25.9", + "@babel/helper-plugin-utils": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -1327,12 +1203,13 @@ } }, "node_modules/@babel/plugin-transform-duplicate-keys": { - "version": "7.24.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.24.1.tgz", - "integrity": "sha512-msyzuUnvsjsaSaocV6L7ErfNsa5nDWL1XKNnDePLgmz+WdU4w/J8+AxBMrWfi9m4IxfL5sZQKUPQKDQeeAT6lA==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.25.9.tgz", + "integrity": "sha512-LZxhJ6dvBb/f3x8xwWIuyiAHy56nrRG3PeYTpBkkzkYRRQ6tJLu68lEF5VIqMUZiAV7a8+Tb78nEoMCMcqjXBw==", + "license": "MIT", "peer": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.24.0" + "@babel/helper-plugin-utils": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -1341,14 +1218,31 @@ "@babel/core": "^7.0.0-0" } }, + "node_modules/@babel/plugin-transform-duplicate-named-capturing-groups-regex": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-duplicate-named-capturing-groups-regex/-/plugin-transform-duplicate-named-capturing-groups-regex-7.25.9.tgz", + "integrity": "sha512-0UfuJS0EsXbRvKnwcLjFtJy/Sxc5J5jhLHnFhy7u4zih97Hz6tJkLU+O+FMMrNZrosUPxDi6sYxJ/EA8jDiAog==", + "license": "MIT", + "peer": true, + "dependencies": { + "@babel/helper-create-regexp-features-plugin": "^7.25.9", + "@babel/helper-plugin-utils": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, "node_modules/@babel/plugin-transform-dynamic-import": { - "version": "7.24.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dynamic-import/-/plugin-transform-dynamic-import-7.24.1.tgz", - "integrity": "sha512-av2gdSTyXcJVdI+8aFZsCAtR29xJt0S5tas+Ef8NvBNmD1a+N/3ecMLeMBgfcK+xzsjdLDT6oHt+DFPyeqUbDA==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dynamic-import/-/plugin-transform-dynamic-import-7.25.9.tgz", + "integrity": "sha512-GCggjexbmSLaFhqsojeugBpeaRIgWNTcgKVq/0qIteFEqY2A+b9QidYadrWlnbWQUrW5fn+mCvf3tr7OeBFTyg==", + "license": "MIT", "peer": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.24.0", - "@babel/plugin-syntax-dynamic-import": "^7.8.3" + "@babel/helper-plugin-utils": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -1358,13 +1252,14 @@ } }, "node_modules/@babel/plugin-transform-exponentiation-operator": { - "version": "7.24.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.24.1.tgz", - "integrity": "sha512-U1yX13dVBSwS23DEAqU+Z/PkwE9/m7QQy8Y9/+Tdb8UWYaGNDYwTLi19wqIAiROr8sXVum9A/rtiH5H0boUcTw==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.25.9.tgz", + "integrity": "sha512-KRhdhlVk2nObA5AYa7QMgTMTVJdfHprfpAk4DjZVtllqRg9qarilstTKEhpVjyt+Npi8ThRyiV8176Am3CodPA==", + "license": "MIT", "peer": true, "dependencies": { - "@babel/helper-builder-binary-assignment-operator-visitor": "^7.22.15", - "@babel/helper-plugin-utils": "^7.24.0" + "@babel/helper-builder-binary-assignment-operator-visitor": "^7.25.9", + "@babel/helper-plugin-utils": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -1374,13 +1269,13 @@ } }, "node_modules/@babel/plugin-transform-export-namespace-from": { - "version": "7.24.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-export-namespace-from/-/plugin-transform-export-namespace-from-7.24.1.tgz", - "integrity": "sha512-Ft38m/KFOyzKw2UaJFkWG9QnHPG/Q/2SkOrRk4pNBPg5IPZ+dOxcmkK5IyuBcxiNPyyYowPGUReyBvrvZs7IlQ==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-export-namespace-from/-/plugin-transform-export-namespace-from-7.25.9.tgz", + "integrity": "sha512-2NsEz+CxzJIVOPx2o9UsW1rXLqtChtLoVnwYHHiB04wS5sgn7mrV45fWMBX0Kk+ub9uXytVYfNP2HjbVbCB3Ww==", + "license": "MIT", "peer": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.24.0", - "@babel/plugin-syntax-export-namespace-from": "^7.8.3" + "@babel/helper-plugin-utils": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -1390,13 +1285,14 @@ } }, "node_modules/@babel/plugin-transform-flow-strip-types": { - "version": "7.24.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-flow-strip-types/-/plugin-transform-flow-strip-types-7.24.1.tgz", - "integrity": "sha512-iIYPIWt3dUmUKKE10s3W+jsQ3icFkw0JyRVyY1B7G4yK/nngAOHLVx8xlhA6b/Jzl/Y0nis8gjqhqKtRDQqHWQ==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-flow-strip-types/-/plugin-transform-flow-strip-types-7.25.9.tgz", + "integrity": "sha512-/VVukELzPDdci7UUsWQaSkhgnjIWXnIyRpM02ldxaVoFK96c41So8JcKT3m0gYjyv7j5FNPGS5vfELrWalkbDA==", + "license": "MIT", "peer": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.24.0", - "@babel/plugin-syntax-flow": "^7.24.1" + "@babel/helper-plugin-utils": "^7.25.9", + "@babel/plugin-syntax-flow": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -1406,13 +1302,14 @@ } }, "node_modules/@babel/plugin-transform-for-of": { - "version": "7.24.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.24.1.tgz", - "integrity": "sha512-OxBdcnF04bpdQdR3i4giHZNZQn7cm8RQKcSwA17wAAqEELo1ZOwp5FFgeptWUQXFyT9kwHo10aqqauYkRZPCAg==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.25.9.tgz", + "integrity": "sha512-LqHxduHoaGELJl2uhImHwRQudhCM50pT46rIBNvtT/Oql3nqiS3wOwP+5ten7NpYSXrrVLgtZU3DZmPtWZo16A==", + "license": "MIT", "peer": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.24.0", - "@babel/helper-skip-transparent-expression-wrappers": "^7.22.5" + "@babel/helper-plugin-utils": "^7.25.9", + "@babel/helper-skip-transparent-expression-wrappers": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -1422,14 +1319,15 @@ } }, "node_modules/@babel/plugin-transform-function-name": { - "version": "7.24.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.24.1.tgz", - "integrity": "sha512-BXmDZpPlh7jwicKArQASrj8n22/w6iymRnvHYYd2zO30DbE277JO20/7yXJT3QxDPtiQiOxQBbZH4TpivNXIxA==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.25.9.tgz", + "integrity": "sha512-8lP+Yxjv14Vc5MuWBpJsoUCd3hD6V9DgBon2FVYL4jJgbnVQ9fTgYmonchzZJOVNgzEgbxp4OwAf6xz6M/14XA==", + "license": "MIT", "peer": true, "dependencies": { - "@babel/helper-compilation-targets": "^7.23.6", - "@babel/helper-function-name": "^7.23.0", - "@babel/helper-plugin-utils": "^7.24.0" + "@babel/helper-compilation-targets": "^7.25.9", + "@babel/helper-plugin-utils": "^7.25.9", + "@babel/traverse": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -1439,13 +1337,13 @@ } }, "node_modules/@babel/plugin-transform-json-strings": { - "version": "7.24.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-json-strings/-/plugin-transform-json-strings-7.24.1.tgz", - "integrity": "sha512-U7RMFmRvoasscrIFy5xA4gIp8iWnWubnKkKuUGJjsuOH7GfbMkB+XZzeslx2kLdEGdOJDamEmCqOks6e8nv8DQ==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-json-strings/-/plugin-transform-json-strings-7.25.9.tgz", + "integrity": "sha512-xoTMk0WXceiiIvsaquQQUaLLXSW1KJ159KP87VilruQm0LNNGxWzahxSS6T6i4Zg3ezp4vA4zuwiNUR53qmQAw==", + "license": "MIT", "peer": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.24.0", - "@babel/plugin-syntax-json-strings": "^7.8.3" + "@babel/helper-plugin-utils": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -1455,12 +1353,13 @@ } }, "node_modules/@babel/plugin-transform-literals": { - "version": "7.24.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-literals/-/plugin-transform-literals-7.24.1.tgz", - "integrity": "sha512-zn9pwz8U7nCqOYIiBaOxoQOtYmMODXTJnkxG4AtX8fPmnCRYWBOHD0qcpwS9e2VDSp1zNJYpdnFMIKb8jmwu6g==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-literals/-/plugin-transform-literals-7.25.9.tgz", + "integrity": "sha512-9N7+2lFziW8W9pBl2TzaNht3+pgMIRP74zizeCSrtnSKVdUl8mAjjOP2OOVQAfZ881P2cNjDj1uAMEdeD50nuQ==", + "license": "MIT", "peer": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.24.0" + "@babel/helper-plugin-utils": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -1470,13 +1369,13 @@ } }, "node_modules/@babel/plugin-transform-logical-assignment-operators": { - "version": "7.24.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-logical-assignment-operators/-/plugin-transform-logical-assignment-operators-7.24.1.tgz", - "integrity": "sha512-OhN6J4Bpz+hIBqItTeWJujDOfNP+unqv/NJgyhlpSqgBTPm37KkMmZV6SYcOj+pnDbdcl1qRGV/ZiIjX9Iy34w==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-logical-assignment-operators/-/plugin-transform-logical-assignment-operators-7.25.9.tgz", + "integrity": "sha512-wI4wRAzGko551Y8eVf6iOY9EouIDTtPb0ByZx+ktDGHwv6bHFimrgJM/2T021txPZ2s4c7bqvHbd+vXG6K948Q==", + "license": "MIT", "peer": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.24.0", - "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4" + "@babel/helper-plugin-utils": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -1486,12 +1385,13 @@ } }, "node_modules/@babel/plugin-transform-member-expression-literals": { - "version": "7.24.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.24.1.tgz", - "integrity": "sha512-4ojai0KysTWXzHseJKa1XPNXKRbuUrhkOPY4rEGeR+7ChlJVKxFa3H3Bz+7tWaGKgJAXUWKOGmltN+u9B3+CVg==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.25.9.tgz", + "integrity": "sha512-PYazBVfofCQkkMzh2P6IdIUaCEWni3iYEerAsRWuVd8+jlM1S9S9cz1dF9hIzyoZ8IA3+OwVYIp9v9e+GbgZhA==", + "license": "MIT", "peer": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.24.0" + "@babel/helper-plugin-utils": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -1501,13 +1401,14 @@ } }, "node_modules/@babel/plugin-transform-modules-amd": { - "version": "7.24.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.24.1.tgz", - "integrity": "sha512-lAxNHi4HVtjnHd5Rxg3D5t99Xm6H7b04hUS7EHIXcUl2EV4yl1gWdqZrNzXnSrHveL9qMdbODlLF55mvgjAfaQ==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.25.9.tgz", + "integrity": "sha512-g5T11tnI36jVClQlMlt4qKDLlWnG5pP9CSM4GhdRciTNMRgkfpo5cR6b4rGIOYPgRRuFAvwjPQ/Yk+ql4dyhbw==", + "license": "MIT", "peer": true, "dependencies": { - "@babel/helper-module-transforms": "^7.23.3", - "@babel/helper-plugin-utils": "^7.24.0" + "@babel/helper-module-transforms": "^7.25.9", + "@babel/helper-plugin-utils": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -1517,14 +1418,15 @@ } }, "node_modules/@babel/plugin-transform-modules-commonjs": { - "version": "7.24.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.24.1.tgz", - "integrity": "sha512-szog8fFTUxBfw0b98gEWPaEqF42ZUD/T3bkynW/wtgx2p/XCP55WEsb+VosKceRSd6njipdZvNogqdtI4Q0chw==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.25.9.tgz", + "integrity": "sha512-dwh2Ol1jWwL2MgkCzUSOvfmKElqQcuswAZypBSUsScMXvgdT8Ekq5YA6TtqpTVWH+4903NmboMuH1o9i8Rxlyg==", + "license": "MIT", "peer": true, "dependencies": { - "@babel/helper-module-transforms": "^7.23.3", - "@babel/helper-plugin-utils": "^7.24.0", - "@babel/helper-simple-access": "^7.22.5" + "@babel/helper-module-transforms": "^7.25.9", + "@babel/helper-plugin-utils": "^7.25.9", + "@babel/helper-simple-access": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -1534,15 +1436,16 @@ } }, "node_modules/@babel/plugin-transform-modules-systemjs": { - "version": "7.24.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.24.1.tgz", - "integrity": "sha512-mqQ3Zh9vFO1Tpmlt8QPnbwGHzNz3lpNEMxQb1kAemn/erstyqw1r9KeOlOfo3y6xAnFEcOv2tSyrXfmMk+/YZA==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.25.9.tgz", + "integrity": "sha512-hyss7iIlH/zLHaehT+xwiymtPOpsiwIIRlCAOwBB04ta5Tt+lNItADdlXw3jAWZ96VJ2jlhl/c+PNIQPKNfvcA==", + "license": "MIT", "peer": true, "dependencies": { - "@babel/helper-hoist-variables": "^7.22.5", - "@babel/helper-module-transforms": "^7.23.3", - "@babel/helper-plugin-utils": "^7.24.0", - "@babel/helper-validator-identifier": "^7.22.20" + "@babel/helper-module-transforms": "^7.25.9", + "@babel/helper-plugin-utils": "^7.25.9", + "@babel/helper-validator-identifier": "^7.25.9", + "@babel/traverse": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -1552,13 +1455,14 @@ } }, "node_modules/@babel/plugin-transform-modules-umd": { - "version": "7.24.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.24.1.tgz", - "integrity": "sha512-tuA3lpPj+5ITfcCluy6nWonSL7RvaG0AOTeAuvXqEKS34lnLzXpDb0dcP6K8jD0zWZFNDVly90AGFJPnm4fOYg==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.25.9.tgz", + "integrity": "sha512-bS9MVObUgE7ww36HEfwe6g9WakQ0KF07mQF74uuXdkoziUPfKyu/nIm663kz//e5O1nPInPFx36z7WJmJ4yNEw==", + "license": "MIT", "peer": true, "dependencies": { - "@babel/helper-module-transforms": "^7.23.3", - "@babel/helper-plugin-utils": "^7.24.0" + "@babel/helper-module-transforms": "^7.25.9", + "@babel/helper-plugin-utils": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -1568,13 +1472,14 @@ } }, "node_modules/@babel/plugin-transform-named-capturing-groups-regex": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.22.5.tgz", - "integrity": "sha512-YgLLKmS3aUBhHaxp5hi1WJTgOUb/NCuDHzGT9z9WTt3YG+CPRhJs6nprbStx6DnWM4dh6gt7SU3sZodbZ08adQ==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.25.9.tgz", + "integrity": "sha512-oqB6WHdKTGl3q/ItQhpLSnWWOpjUJLsOCLVyeFgeTktkBSCiurvPOsyt93gibI9CmuKvTUEtWmG5VhZD+5T/KA==", + "license": "MIT", "peer": true, "dependencies": { - "@babel/helper-create-regexp-features-plugin": "^7.22.5", - "@babel/helper-plugin-utils": "^7.22.5" + "@babel/helper-create-regexp-features-plugin": "^7.25.9", + "@babel/helper-plugin-utils": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -1584,12 +1489,13 @@ } }, "node_modules/@babel/plugin-transform-new-target": { - "version": "7.24.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.24.1.tgz", - "integrity": "sha512-/rurytBM34hYy0HKZQyA0nHbQgQNFm4Q/BOc9Hflxi2X3twRof7NaE5W46j4kQitm7SvACVRXsa6N/tSZxvPug==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.25.9.tgz", + "integrity": "sha512-U/3p8X1yCSoKyUj2eOBIx3FOn6pElFOKvAAGf8HTtItuPyB+ZeOqfn+mvTtg9ZlOAjsPdK3ayQEjqHjU/yLeVQ==", + "license": "MIT", "peer": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.24.0" + "@babel/helper-plugin-utils": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -1599,13 +1505,13 @@ } }, "node_modules/@babel/plugin-transform-nullish-coalescing-operator": { - "version": "7.24.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-nullish-coalescing-operator/-/plugin-transform-nullish-coalescing-operator-7.24.1.tgz", - "integrity": "sha512-iQ+caew8wRrhCikO5DrUYx0mrmdhkaELgFa+7baMcVuhxIkN7oxt06CZ51D65ugIb1UWRQ8oQe+HXAVM6qHFjw==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-nullish-coalescing-operator/-/plugin-transform-nullish-coalescing-operator-7.25.9.tgz", + "integrity": "sha512-ENfftpLZw5EItALAD4WsY/KUWvhUlZndm5GC7G3evUsVeSJB6p0pBeLQUnRnBCBx7zV0RKQjR9kCuwrsIrjWog==", + "license": "MIT", "peer": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.24.0", - "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3" + "@babel/helper-plugin-utils": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -1615,13 +1521,13 @@ } }, "node_modules/@babel/plugin-transform-numeric-separator": { - "version": "7.24.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-numeric-separator/-/plugin-transform-numeric-separator-7.24.1.tgz", - "integrity": "sha512-7GAsGlK4cNL2OExJH1DzmDeKnRv/LXq0eLUSvudrehVA5Rgg4bIrqEUW29FbKMBRT0ztSqisv7kjP+XIC4ZMNw==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-numeric-separator/-/plugin-transform-numeric-separator-7.25.9.tgz", + "integrity": "sha512-TlprrJ1GBZ3r6s96Yq8gEQv82s8/5HnCVHtEJScUj90thHQbwe+E5MLhi2bbNHBEJuzrvltXSru+BUxHDoog7Q==", + "license": "MIT", "peer": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.24.0", - "@babel/plugin-syntax-numeric-separator": "^7.10.4" + "@babel/helper-plugin-utils": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -1631,15 +1537,15 @@ } }, "node_modules/@babel/plugin-transform-object-rest-spread": { - "version": "7.24.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-rest-spread/-/plugin-transform-object-rest-spread-7.24.1.tgz", - "integrity": "sha512-XjD5f0YqOtebto4HGISLNfiNMTTs6tbkFf2TOqJlYKYmbo+mN9Dnpl4SRoofiziuOWMIyq3sZEUqLo3hLITFEA==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-rest-spread/-/plugin-transform-object-rest-spread-7.25.9.tgz", + "integrity": "sha512-fSaXafEE9CVHPweLYw4J0emp1t8zYTXyzN3UuG+lylqkvYd7RMrsOQ8TYx5RF231be0vqtFC6jnx3UmpJmKBYg==", + "license": "MIT", "peer": true, "dependencies": { - "@babel/helper-compilation-targets": "^7.23.6", - "@babel/helper-plugin-utils": "^7.24.0", - "@babel/plugin-syntax-object-rest-spread": "^7.8.3", - "@babel/plugin-transform-parameters": "^7.24.1" + "@babel/helper-compilation-targets": "^7.25.9", + "@babel/helper-plugin-utils": "^7.25.9", + "@babel/plugin-transform-parameters": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -1649,13 +1555,14 @@ } }, "node_modules/@babel/plugin-transform-object-super": { - "version": "7.24.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.24.1.tgz", - "integrity": "sha512-oKJqR3TeI5hSLRxudMjFQ9re9fBVUU0GICqM3J1mi8MqlhVr6hC/ZN4ttAyMuQR6EZZIY6h/exe5swqGNNIkWQ==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.25.9.tgz", + "integrity": "sha512-Kj/Gh+Rw2RNLbCK1VAWj2U48yxxqL2x0k10nPtSdRa0O2xnHXalD0s+o1A6a0W43gJ00ANo38jxkQreckOzv5A==", + "license": "MIT", "peer": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.24.0", - "@babel/helper-replace-supers": "^7.24.1" + "@babel/helper-plugin-utils": "^7.25.9", + "@babel/helper-replace-supers": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -1665,13 +1572,13 @@ } }, "node_modules/@babel/plugin-transform-optional-catch-binding": { - "version": "7.24.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-optional-catch-binding/-/plugin-transform-optional-catch-binding-7.24.1.tgz", - "integrity": "sha512-oBTH7oURV4Y+3EUrf6cWn1OHio3qG/PVwO5J03iSJmBg6m2EhKjkAu/xuaXaYwWW9miYtvbWv4LNf0AmR43LUA==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-optional-catch-binding/-/plugin-transform-optional-catch-binding-7.25.9.tgz", + "integrity": "sha512-qM/6m6hQZzDcZF3onzIhZeDHDO43bkNNlOX0i8n3lR6zLbu0GN2d8qfM/IERJZYauhAHSLHy39NF0Ctdvcid7g==", + "license": "MIT", "peer": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.24.0", - "@babel/plugin-syntax-optional-catch-binding": "^7.8.3" + "@babel/helper-plugin-utils": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -1681,14 +1588,14 @@ } }, "node_modules/@babel/plugin-transform-optional-chaining": { - "version": "7.24.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-optional-chaining/-/plugin-transform-optional-chaining-7.24.1.tgz", - "integrity": "sha512-n03wmDt+987qXwAgcBlnUUivrZBPZ8z1plL0YvgQalLm+ZE5BMhGm94jhxXtA1wzv1Cu2aaOv1BM9vbVttrzSg==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-optional-chaining/-/plugin-transform-optional-chaining-7.25.9.tgz", + "integrity": "sha512-6AvV0FsLULbpnXeBjrY4dmWF8F7gf8QnvTEoO/wX/5xm/xE1Xo8oPuD3MPS+KS9f9XBEAWN7X1aWr4z9HdOr7A==", + "license": "MIT", "peer": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.24.0", - "@babel/helper-skip-transparent-expression-wrappers": "^7.22.5", - "@babel/plugin-syntax-optional-chaining": "^7.8.3" + "@babel/helper-plugin-utils": "^7.25.9", + "@babel/helper-skip-transparent-expression-wrappers": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -1698,12 +1605,13 @@ } }, "node_modules/@babel/plugin-transform-parameters": { - "version": "7.24.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.24.1.tgz", - "integrity": "sha512-8Jl6V24g+Uw5OGPeWNKrKqXPDw2YDjLc53ojwfMcKwlEoETKU9rU0mHUtcg9JntWI/QYzGAXNWEcVHZ+fR+XXg==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.25.9.tgz", + "integrity": "sha512-wzz6MKwpnshBAiRmn4jR8LYz/g8Ksg0o80XmwZDlordjwEk9SxBzTWC7F5ef1jhbrbOW2DJ5J6ayRukrJmnr0g==", + "license": "MIT", "peer": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.24.0" + "@babel/helper-plugin-utils": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -1713,13 +1621,14 @@ } }, "node_modules/@babel/plugin-transform-private-methods": { - "version": "7.24.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-private-methods/-/plugin-transform-private-methods-7.24.1.tgz", - "integrity": "sha512-tGvisebwBO5em4PaYNqt4fkw56K2VALsAbAakY0FjTYqJp7gfdrgr7YX76Or8/cpik0W6+tj3rZ0uHU9Oil4tw==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-private-methods/-/plugin-transform-private-methods-7.25.9.tgz", + "integrity": "sha512-D/JUozNpQLAPUVusvqMxyvjzllRaF8/nSrP1s2YGQT/W4LHK4xxsMcHjhOGTS01mp9Hda8nswb+FblLdJornQw==", + "license": "MIT", "peer": true, "dependencies": { - "@babel/helper-create-class-features-plugin": "^7.24.1", - "@babel/helper-plugin-utils": "^7.24.0" + "@babel/helper-create-class-features-plugin": "^7.25.9", + "@babel/helper-plugin-utils": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -1729,15 +1638,15 @@ } }, "node_modules/@babel/plugin-transform-private-property-in-object": { - "version": "7.24.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-private-property-in-object/-/plugin-transform-private-property-in-object-7.24.1.tgz", - "integrity": "sha512-pTHxDVa0BpUbvAgX3Gat+7cSciXqUcY9j2VZKTbSB6+VQGpNgNO9ailxTGHSXlqOnX1Hcx1Enme2+yv7VqP9bg==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-private-property-in-object/-/plugin-transform-private-property-in-object-7.25.9.tgz", + "integrity": "sha512-Evf3kcMqzXA3xfYJmZ9Pg1OvKdtqsDMSWBDzZOPLvHiTt36E75jLDQo5w1gtRU95Q4E5PDttrTf25Fw8d/uWLw==", + "license": "MIT", "peer": true, "dependencies": { - "@babel/helper-annotate-as-pure": "^7.22.5", - "@babel/helper-create-class-features-plugin": "^7.24.1", - "@babel/helper-plugin-utils": "^7.24.0", - "@babel/plugin-syntax-private-property-in-object": "^7.14.5" + "@babel/helper-annotate-as-pure": "^7.25.9", + "@babel/helper-create-class-features-plugin": "^7.25.9", + "@babel/helper-plugin-utils": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -1747,12 +1656,13 @@ } }, "node_modules/@babel/plugin-transform-property-literals": { - "version": "7.24.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.24.1.tgz", - "integrity": "sha512-LetvD7CrHmEx0G442gOomRr66d7q8HzzGGr4PMHGr+5YIm6++Yke+jxj246rpvsbyhJwCLxcTn6zW1P1BSenqA==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.25.9.tgz", + "integrity": "sha512-IvIUeV5KrS/VPavfSM/Iu+RE6llrHrYIKY1yfCzyO/lMXHQ+p7uGhonmGVisv6tSBSVgWzMBohTcvkC9vQcQFA==", + "license": "MIT", "peer": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.24.0" + "@babel/helper-plugin-utils": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -1762,12 +1672,13 @@ } }, "node_modules/@babel/plugin-transform-react-display-name": { - "version": "7.24.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-display-name/-/plugin-transform-react-display-name-7.24.1.tgz", - "integrity": "sha512-mvoQg2f9p2qlpDQRBC7M3c3XTr0k7cp/0+kFKKO/7Gtu0LSw16eKB+Fabe2bDT/UpsyasTBBkAnbdsLrkD5XMw==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-display-name/-/plugin-transform-react-display-name-7.25.9.tgz", + "integrity": "sha512-KJfMlYIUxQB1CJfO3e0+h0ZHWOTLCPP115Awhaz8U0Zpq36Gl/cXlpoyMRnUWlhNUBAzldnCiAZNvCDj7CrKxQ==", + "license": "MIT", "peer": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.24.0" + "@babel/helper-plugin-utils": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -1777,16 +1688,17 @@ } }, "node_modules/@babel/plugin-transform-react-jsx": { - "version": "7.23.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx/-/plugin-transform-react-jsx-7.23.4.tgz", - "integrity": "sha512-5xOpoPguCZCRbo/JeHlloSkTA8Bld1J/E1/kLfD1nsuiW1m8tduTA1ERCgIZokDflX/IBzKcqR3l7VlRgiIfHA==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx/-/plugin-transform-react-jsx-7.25.9.tgz", + "integrity": "sha512-s5XwpQYCqGerXl+Pu6VDL3x0j2d82eiV77UJ8a2mDHAW7j9SWRqQ2y1fNo1Z74CdcYipl5Z41zvjj4Nfzq36rw==", + "license": "MIT", "peer": true, "dependencies": { - "@babel/helper-annotate-as-pure": "^7.22.5", - "@babel/helper-module-imports": "^7.22.15", - "@babel/helper-plugin-utils": "^7.22.5", - "@babel/plugin-syntax-jsx": "^7.23.3", - "@babel/types": "^7.23.4" + "@babel/helper-annotate-as-pure": "^7.25.9", + "@babel/helper-module-imports": "^7.25.9", + "@babel/helper-plugin-utils": "^7.25.9", + "@babel/plugin-syntax-jsx": "^7.25.9", + "@babel/types": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -1796,12 +1708,13 @@ } }, "node_modules/@babel/plugin-transform-react-jsx-self": { - "version": "7.24.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-self/-/plugin-transform-react-jsx-self-7.24.1.tgz", - "integrity": "sha512-kDJgnPujTmAZ/9q2CN4m2/lRsUUPDvsG3+tSHWUJIzMGTt5U/b/fwWd3RO3n+5mjLrsBrVa5eKFRVSQbi3dF1w==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-self/-/plugin-transform-react-jsx-self-7.25.9.tgz", + "integrity": "sha512-y8quW6p0WHkEhmErnfe58r7x0A70uKphQm8Sp8cV7tjNQwK56sNVK0M73LK3WuYmsuyrftut4xAkjjgU0twaMg==", + "license": "MIT", "peer": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.24.0" + "@babel/helper-plugin-utils": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -1811,12 +1724,13 @@ } }, "node_modules/@babel/plugin-transform-react-jsx-source": { - "version": "7.24.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-source/-/plugin-transform-react-jsx-source-7.24.1.tgz", - "integrity": "sha512-1v202n7aUq4uXAieRTKcwPzNyphlCuqHHDcdSNc+vdhoTEZcFMh+L5yZuCmGaIO7bs1nJUNfHB89TZyoL48xNA==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-source/-/plugin-transform-react-jsx-source-7.25.9.tgz", + "integrity": "sha512-+iqjT8xmXhhYv4/uiYd8FNQsraMFZIfxVSqxxVSZP0WbbSAWvBXAul0m/zu+7Vv4O/3WtApy9pmaTMiumEZgfg==", + "license": "MIT", "peer": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.24.0" + "@babel/helper-plugin-utils": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -1826,12 +1740,13 @@ } }, "node_modules/@babel/plugin-transform-regenerator": { - "version": "7.24.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.24.1.tgz", - "integrity": "sha512-sJwZBCzIBE4t+5Q4IGLaaun5ExVMRY0lYwos/jNecjMrVCygCdph3IKv0tkP5Fc87e/1+bebAmEAGBfnRD+cnw==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.25.9.tgz", + "integrity": "sha512-vwDcDNsgMPDGP0nMqzahDWE5/MLcX8sv96+wfX7as7LoF/kr97Bo/7fI00lXY4wUXYfVmwIIyG80fGZ1uvt2qg==", + "license": "MIT", "peer": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.24.0", + "@babel/helper-plugin-utils": "^7.25.9", "regenerator-transform": "^0.15.2" }, "engines": { @@ -1841,13 +1756,31 @@ "@babel/core": "^7.0.0-0" } }, + "node_modules/@babel/plugin-transform-regexp-modifiers": { + "version": "7.26.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regexp-modifiers/-/plugin-transform-regexp-modifiers-7.26.0.tgz", + "integrity": "sha512-vN6saax7lrA2yA/Pak3sCxuD6F5InBjn9IcrIKQPjpsLvuHYLVroTxjdlVRHjjBWxKOqIwpTXDkOssYT4BFdRw==", + "license": "MIT", + "peer": true, + "dependencies": { + "@babel/helper-create-regexp-features-plugin": "^7.25.9", + "@babel/helper-plugin-utils": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, "node_modules/@babel/plugin-transform-reserved-words": { - "version": "7.24.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.24.1.tgz", - "integrity": "sha512-JAclqStUfIwKN15HrsQADFgeZt+wexNQ0uLhuqvqAUFoqPMjEcFCYZBhq0LUdz6dZK/mD+rErhW71fbx8RYElg==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.25.9.tgz", + "integrity": "sha512-7DL7DKYjn5Su++4RXu8puKZm2XBPHyjWLUidaPEkCUBbE7IPcsrkRHggAOOKydH1dASWdcUBxrkOGNxUv5P3Jg==", + "license": "MIT", "peer": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.24.0" + "@babel/helper-plugin-utils": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -1857,15 +1790,16 @@ } }, "node_modules/@babel/plugin-transform-runtime": { - "version": "7.24.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.24.3.tgz", - "integrity": "sha512-J0BuRPNlNqlMTRJ72eVptpt9VcInbxO6iP3jaxr+1NPhC0UkKL+6oeX6VXMEYdADnuqmMmsBspt4d5w8Y/TCbQ==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.25.9.tgz", + "integrity": "sha512-nZp7GlEl+yULJrClz0SwHPqir3lc0zsPrDHQUcxGspSL7AKrexNSEfTbfqnDNJUO13bgKyfuOLMF8Xqtu8j3YQ==", + "license": "MIT", "peer": true, "dependencies": { - "@babel/helper-module-imports": "^7.24.3", - "@babel/helper-plugin-utils": "^7.24.0", + "@babel/helper-module-imports": "^7.25.9", + "@babel/helper-plugin-utils": "^7.25.9", "babel-plugin-polyfill-corejs2": "^0.4.10", - "babel-plugin-polyfill-corejs3": "^0.10.1", + "babel-plugin-polyfill-corejs3": "^0.10.6", "babel-plugin-polyfill-regenerator": "^0.6.1", "semver": "^6.3.1" }, @@ -1880,18 +1814,20 @@ "version": "6.3.1", "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "license": "ISC", "peer": true, "bin": { "semver": "bin/semver.js" } }, "node_modules/@babel/plugin-transform-shorthand-properties": { - "version": "7.24.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.24.1.tgz", - "integrity": "sha512-LyjVB1nsJ6gTTUKRjRWx9C1s9hE7dLfP/knKdrfeH9UPtAGjYGgxIbFfx7xyLIEWs7Xe1Gnf8EWiUqfjLhInZA==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.25.9.tgz", + "integrity": "sha512-MUv6t0FhO5qHnS/W8XCbHmiRWOphNufpE1IVxhK5kuN3Td9FT1x4rx4K42s3RYdMXCXpfWkGSbCSd0Z64xA7Ng==", + "license": "MIT", "peer": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.24.0" + "@babel/helper-plugin-utils": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -1901,13 +1837,14 @@ } }, "node_modules/@babel/plugin-transform-spread": { - "version": "7.24.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.24.1.tgz", - "integrity": "sha512-KjmcIM+fxgY+KxPVbjelJC6hrH1CgtPmTvdXAfn3/a9CnWGSTY7nH4zm5+cjmWJybdcPSsD0++QssDsjcpe47g==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.25.9.tgz", + "integrity": "sha512-oNknIB0TbURU5pqJFVbOOFspVlrpVwo2H1+HUIsVDvp5VauGGDP1ZEvO8Nn5xyMEs3dakajOxlmkNW7kNgSm6A==", + "license": "MIT", "peer": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.24.0", - "@babel/helper-skip-transparent-expression-wrappers": "^7.22.5" + "@babel/helper-plugin-utils": "^7.25.9", + "@babel/helper-skip-transparent-expression-wrappers": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -1917,12 +1854,13 @@ } }, "node_modules/@babel/plugin-transform-sticky-regex": { - "version": "7.24.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.24.1.tgz", - "integrity": "sha512-9v0f1bRXgPVcPrngOQvLXeGNNVLc8UjMVfebo9ka0WF3/7+aVUHmaJVT3sa0XCzEFioPfPHZiOcYG9qOsH63cw==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.25.9.tgz", + "integrity": "sha512-WqBUSgeVwucYDP9U/xNRQam7xV8W5Zf+6Eo7T2SRVUFlhRiMNFdFz58u0KZmCVVqs2i7SHgpRnAhzRNmKfi2uA==", + "license": "MIT", "peer": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.24.0" + "@babel/helper-plugin-utils": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -1932,12 +1870,13 @@ } }, "node_modules/@babel/plugin-transform-template-literals": { - "version": "7.24.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.24.1.tgz", - "integrity": "sha512-WRkhROsNzriarqECASCNu/nojeXCDTE/F2HmRgOzi7NGvyfYGq1NEjKBK3ckLfRgGc6/lPAqP0vDOSw3YtG34g==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.25.9.tgz", + "integrity": "sha512-o97AE4syN71M/lxrCtQByzphAdlYluKPDBzDVzMmfCobUjjhAryZV0AIpRPrxN0eAkxXO6ZLEScmt+PNhj2OTw==", + "license": "MIT", "peer": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.24.0" + "@babel/helper-plugin-utils": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -1947,12 +1886,13 @@ } }, "node_modules/@babel/plugin-transform-typeof-symbol": { - "version": "7.24.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.24.1.tgz", - "integrity": "sha512-CBfU4l/A+KruSUoW+vTQthwcAdwuqbpRNB8HQKlZABwHRhsdHZ9fezp4Sn18PeAlYxTNiLMlx4xUBV3AWfg1BA==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.25.9.tgz", + "integrity": "sha512-v61XqUMiueJROUv66BVIOi0Fv/CUuZuZMl5NkRoCVxLAnMexZ0A3kMe7vvZ0nulxMuMp0Mk6S5hNh48yki08ZA==", + "license": "MIT", "peer": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.24.0" + "@babel/helper-plugin-utils": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -1962,15 +1902,17 @@ } }, "node_modules/@babel/plugin-transform-typescript": { - "version": "7.24.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.24.4.tgz", - "integrity": "sha512-79t3CQ8+oBGk/80SQ8MN3Bs3obf83zJ0YZjDmDaEZN8MqhMI760apl5z6a20kFeMXBwJX99VpKT8CKxEBp5H1g==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.25.9.tgz", + "integrity": "sha512-7PbZQZP50tzv2KGGnhh82GSyMB01yKY9scIjf1a+GfZCtInOWqUH5+1EBU4t9fyR5Oykkkc9vFTs4OHrhHXljQ==", + "license": "MIT", "peer": true, "dependencies": { - "@babel/helper-annotate-as-pure": "^7.22.5", - "@babel/helper-create-class-features-plugin": "^7.24.4", - "@babel/helper-plugin-utils": "^7.24.0", - "@babel/plugin-syntax-typescript": "^7.24.1" + "@babel/helper-annotate-as-pure": "^7.25.9", + "@babel/helper-create-class-features-plugin": "^7.25.9", + "@babel/helper-plugin-utils": "^7.25.9", + "@babel/helper-skip-transparent-expression-wrappers": "^7.25.9", + "@babel/plugin-syntax-typescript": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -1980,12 +1922,13 @@ } }, "node_modules/@babel/plugin-transform-unicode-escapes": { - "version": "7.24.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.24.1.tgz", - "integrity": "sha512-RlkVIcWT4TLI96zM660S877E7beKlQw7Ig+wqkKBiWfj0zH5Q4h50q6er4wzZKRNSYpfo6ILJ+hrJAGSX2qcNw==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.25.9.tgz", + "integrity": "sha512-s5EDrE6bW97LtxOcGj1Khcx5AaXwiMmi4toFWRDP9/y0Woo6pXC+iyPu/KuhKtfSrNFd7jJB+/fkOtZy6aIC6Q==", + "license": "MIT", "peer": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.24.0" + "@babel/helper-plugin-utils": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -1995,13 +1938,14 @@ } }, "node_modules/@babel/plugin-transform-unicode-property-regex": { - "version": "7.24.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-property-regex/-/plugin-transform-unicode-property-regex-7.24.1.tgz", - "integrity": "sha512-Ss4VvlfYV5huWApFsF8/Sq0oXnGO+jB+rijFEFugTd3cwSObUSnUi88djgR5528Csl0uKlrI331kRqe56Ov2Ng==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-property-regex/-/plugin-transform-unicode-property-regex-7.25.9.tgz", + "integrity": "sha512-Jt2d8Ga+QwRluxRQ307Vlxa6dMrYEMZCgGxoPR8V52rxPyldHu3hdlHspxaqYmE7oID5+kB+UKUB/eWS+DkkWg==", + "license": "MIT", "peer": true, "dependencies": { - "@babel/helper-create-regexp-features-plugin": "^7.22.15", - "@babel/helper-plugin-utils": "^7.24.0" + "@babel/helper-create-regexp-features-plugin": "^7.25.9", + "@babel/helper-plugin-utils": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -2011,13 +1955,14 @@ } }, "node_modules/@babel/plugin-transform-unicode-regex": { - "version": "7.24.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.24.1.tgz", - "integrity": "sha512-2A/94wgZgxfTsiLaQ2E36XAOdcZmGAaEEgVmxQWwZXWkGhvoHbaqXcKnU8zny4ycpu3vNqg0L/PcCiYtHtA13g==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.25.9.tgz", + "integrity": "sha512-yoxstj7Rg9dlNn9UQxzk4fcNivwv4nUYz7fYXBaKxvw/lnmPuOm/ikoELygbYq68Bls3D/D+NBPHiLwZdZZ4HA==", + "license": "MIT", "peer": true, "dependencies": { - "@babel/helper-create-regexp-features-plugin": "^7.22.15", - "@babel/helper-plugin-utils": "^7.24.0" + "@babel/helper-create-regexp-features-plugin": "^7.25.9", + "@babel/helper-plugin-utils": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -2027,13 +1972,14 @@ } }, "node_modules/@babel/plugin-transform-unicode-sets-regex": { - "version": "7.24.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-sets-regex/-/plugin-transform-unicode-sets-regex-7.24.1.tgz", - "integrity": "sha512-fqj4WuzzS+ukpgerpAoOnMfQXwUHFxXUZUE84oL2Kao2N8uSlvcpnAidKASgsNgzZHBsHWvcm8s9FPWUhAb8fA==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-sets-regex/-/plugin-transform-unicode-sets-regex-7.25.9.tgz", + "integrity": "sha512-8BYqO3GeVNHtx69fdPshN3fnzUNLrWdHhk/icSwigksJGczKSizZ+Z6SBCxTs723Fr5VSNorTIK7a+R2tISvwQ==", + "license": "MIT", "peer": true, "dependencies": { - "@babel/helper-create-regexp-features-plugin": "^7.22.15", - "@babel/helper-plugin-utils": "^7.24.0" + "@babel/helper-create-regexp-features-plugin": "^7.25.9", + "@babel/helper-plugin-utils": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -2043,91 +1989,80 @@ } }, "node_modules/@babel/preset-env": { - "version": "7.24.4", - "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.24.4.tgz", - "integrity": "sha512-7Kl6cSmYkak0FK/FXjSEnLJ1N9T/WA2RkMhu17gZ/dsxKJUuTYNIylahPTzqpLyJN4WhDif8X0XK1R8Wsguo/A==", - "peer": true, - "dependencies": { - "@babel/compat-data": "^7.24.4", - "@babel/helper-compilation-targets": "^7.23.6", - "@babel/helper-plugin-utils": "^7.24.0", - "@babel/helper-validator-option": "^7.23.5", - "@babel/plugin-bugfix-firefox-class-in-computed-class-key": "^7.24.4", - "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": "^7.24.1", - "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": "^7.24.1", - "@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly": "^7.24.1", + "version": "7.26.0", + "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.26.0.tgz", + "integrity": "sha512-H84Fxq0CQJNdPFT2DrfnylZ3cf5K43rGfWK4LJGPpjKHiZlk0/RzwEus3PDDZZg+/Er7lCA03MVacueUuXdzfw==", + "license": "MIT", + "peer": true, + "dependencies": { + "@babel/compat-data": "^7.26.0", + "@babel/helper-compilation-targets": "^7.25.9", + "@babel/helper-plugin-utils": "^7.25.9", + "@babel/helper-validator-option": "^7.25.9", + "@babel/plugin-bugfix-firefox-class-in-computed-class-key": "^7.25.9", + "@babel/plugin-bugfix-safari-class-field-initializer-scope": "^7.25.9", + "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": "^7.25.9", + "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": "^7.25.9", + "@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly": "^7.25.9", "@babel/plugin-proposal-private-property-in-object": "7.21.0-placeholder-for-preset-env.2", - "@babel/plugin-syntax-async-generators": "^7.8.4", - "@babel/plugin-syntax-class-properties": "^7.12.13", - "@babel/plugin-syntax-class-static-block": "^7.14.5", - "@babel/plugin-syntax-dynamic-import": "^7.8.3", - "@babel/plugin-syntax-export-namespace-from": "^7.8.3", - "@babel/plugin-syntax-import-assertions": "^7.24.1", - "@babel/plugin-syntax-import-attributes": "^7.24.1", - "@babel/plugin-syntax-import-meta": "^7.10.4", - "@babel/plugin-syntax-json-strings": "^7.8.3", - "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4", - "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3", - "@babel/plugin-syntax-numeric-separator": "^7.10.4", - "@babel/plugin-syntax-object-rest-spread": "^7.8.3", - "@babel/plugin-syntax-optional-catch-binding": "^7.8.3", - "@babel/plugin-syntax-optional-chaining": "^7.8.3", - "@babel/plugin-syntax-private-property-in-object": "^7.14.5", - "@babel/plugin-syntax-top-level-await": "^7.14.5", + "@babel/plugin-syntax-import-assertions": "^7.26.0", + "@babel/plugin-syntax-import-attributes": "^7.26.0", "@babel/plugin-syntax-unicode-sets-regex": "^7.18.6", - "@babel/plugin-transform-arrow-functions": "^7.24.1", - "@babel/plugin-transform-async-generator-functions": "^7.24.3", - "@babel/plugin-transform-async-to-generator": "^7.24.1", - "@babel/plugin-transform-block-scoped-functions": "^7.24.1", - "@babel/plugin-transform-block-scoping": "^7.24.4", - "@babel/plugin-transform-class-properties": "^7.24.1", - "@babel/plugin-transform-class-static-block": "^7.24.4", - "@babel/plugin-transform-classes": "^7.24.1", - "@babel/plugin-transform-computed-properties": "^7.24.1", - "@babel/plugin-transform-destructuring": "^7.24.1", - "@babel/plugin-transform-dotall-regex": "^7.24.1", - "@babel/plugin-transform-duplicate-keys": "^7.24.1", - "@babel/plugin-transform-dynamic-import": "^7.24.1", - "@babel/plugin-transform-exponentiation-operator": "^7.24.1", - "@babel/plugin-transform-export-namespace-from": "^7.24.1", - "@babel/plugin-transform-for-of": "^7.24.1", - "@babel/plugin-transform-function-name": "^7.24.1", - "@babel/plugin-transform-json-strings": "^7.24.1", - "@babel/plugin-transform-literals": "^7.24.1", - "@babel/plugin-transform-logical-assignment-operators": "^7.24.1", - "@babel/plugin-transform-member-expression-literals": "^7.24.1", - "@babel/plugin-transform-modules-amd": "^7.24.1", - "@babel/plugin-transform-modules-commonjs": "^7.24.1", - "@babel/plugin-transform-modules-systemjs": "^7.24.1", - "@babel/plugin-transform-modules-umd": "^7.24.1", - "@babel/plugin-transform-named-capturing-groups-regex": "^7.22.5", - "@babel/plugin-transform-new-target": "^7.24.1", - "@babel/plugin-transform-nullish-coalescing-operator": "^7.24.1", - "@babel/plugin-transform-numeric-separator": "^7.24.1", - "@babel/plugin-transform-object-rest-spread": "^7.24.1", - "@babel/plugin-transform-object-super": "^7.24.1", - "@babel/plugin-transform-optional-catch-binding": "^7.24.1", - "@babel/plugin-transform-optional-chaining": "^7.24.1", - "@babel/plugin-transform-parameters": "^7.24.1", - "@babel/plugin-transform-private-methods": "^7.24.1", - "@babel/plugin-transform-private-property-in-object": "^7.24.1", - "@babel/plugin-transform-property-literals": "^7.24.1", - "@babel/plugin-transform-regenerator": "^7.24.1", - "@babel/plugin-transform-reserved-words": "^7.24.1", - "@babel/plugin-transform-shorthand-properties": "^7.24.1", - "@babel/plugin-transform-spread": "^7.24.1", - "@babel/plugin-transform-sticky-regex": "^7.24.1", - "@babel/plugin-transform-template-literals": "^7.24.1", - "@babel/plugin-transform-typeof-symbol": "^7.24.1", - "@babel/plugin-transform-unicode-escapes": "^7.24.1", - "@babel/plugin-transform-unicode-property-regex": "^7.24.1", - "@babel/plugin-transform-unicode-regex": "^7.24.1", - "@babel/plugin-transform-unicode-sets-regex": "^7.24.1", + "@babel/plugin-transform-arrow-functions": "^7.25.9", + "@babel/plugin-transform-async-generator-functions": "^7.25.9", + "@babel/plugin-transform-async-to-generator": "^7.25.9", + "@babel/plugin-transform-block-scoped-functions": "^7.25.9", + "@babel/plugin-transform-block-scoping": "^7.25.9", + "@babel/plugin-transform-class-properties": "^7.25.9", + "@babel/plugin-transform-class-static-block": "^7.26.0", + "@babel/plugin-transform-classes": "^7.25.9", + "@babel/plugin-transform-computed-properties": "^7.25.9", + "@babel/plugin-transform-destructuring": "^7.25.9", + "@babel/plugin-transform-dotall-regex": "^7.25.9", + "@babel/plugin-transform-duplicate-keys": "^7.25.9", + "@babel/plugin-transform-duplicate-named-capturing-groups-regex": "^7.25.9", + "@babel/plugin-transform-dynamic-import": "^7.25.9", + "@babel/plugin-transform-exponentiation-operator": "^7.25.9", + "@babel/plugin-transform-export-namespace-from": "^7.25.9", + "@babel/plugin-transform-for-of": "^7.25.9", + "@babel/plugin-transform-function-name": "^7.25.9", + "@babel/plugin-transform-json-strings": "^7.25.9", + "@babel/plugin-transform-literals": "^7.25.9", + "@babel/plugin-transform-logical-assignment-operators": "^7.25.9", + "@babel/plugin-transform-member-expression-literals": "^7.25.9", + "@babel/plugin-transform-modules-amd": "^7.25.9", + "@babel/plugin-transform-modules-commonjs": "^7.25.9", + "@babel/plugin-transform-modules-systemjs": "^7.25.9", + "@babel/plugin-transform-modules-umd": "^7.25.9", + "@babel/plugin-transform-named-capturing-groups-regex": "^7.25.9", + "@babel/plugin-transform-new-target": "^7.25.9", + "@babel/plugin-transform-nullish-coalescing-operator": "^7.25.9", + "@babel/plugin-transform-numeric-separator": "^7.25.9", + "@babel/plugin-transform-object-rest-spread": "^7.25.9", + "@babel/plugin-transform-object-super": "^7.25.9", + "@babel/plugin-transform-optional-catch-binding": "^7.25.9", + "@babel/plugin-transform-optional-chaining": "^7.25.9", + "@babel/plugin-transform-parameters": "^7.25.9", + "@babel/plugin-transform-private-methods": "^7.25.9", + "@babel/plugin-transform-private-property-in-object": "^7.25.9", + "@babel/plugin-transform-property-literals": "^7.25.9", + "@babel/plugin-transform-regenerator": "^7.25.9", + "@babel/plugin-transform-regexp-modifiers": "^7.26.0", + "@babel/plugin-transform-reserved-words": "^7.25.9", + "@babel/plugin-transform-shorthand-properties": "^7.25.9", + "@babel/plugin-transform-spread": "^7.25.9", + "@babel/plugin-transform-sticky-regex": "^7.25.9", + "@babel/plugin-transform-template-literals": "^7.25.9", + "@babel/plugin-transform-typeof-symbol": "^7.25.9", + "@babel/plugin-transform-unicode-escapes": "^7.25.9", + "@babel/plugin-transform-unicode-property-regex": "^7.25.9", + "@babel/plugin-transform-unicode-regex": "^7.25.9", + "@babel/plugin-transform-unicode-sets-regex": "^7.25.9", "@babel/preset-modules": "0.1.6-no-external-plugins", "babel-plugin-polyfill-corejs2": "^0.4.10", - "babel-plugin-polyfill-corejs3": "^0.10.4", + "babel-plugin-polyfill-corejs3": "^0.10.6", "babel-plugin-polyfill-regenerator": "^0.6.1", - "core-js-compat": "^3.31.0", + "core-js-compat": "^3.38.1", "semver": "^6.3.1" }, "engines": { @@ -2141,20 +2076,22 @@ "version": "6.3.1", "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "license": "ISC", "peer": true, "bin": { "semver": "bin/semver.js" } }, "node_modules/@babel/preset-flow": { - "version": "7.24.1", - "resolved": "https://registry.npmjs.org/@babel/preset-flow/-/preset-flow-7.24.1.tgz", - "integrity": "sha512-sWCV2G9pcqZf+JHyv/RyqEIpFypxdCSxWIxQjpdaQxenNog7cN1pr76hg8u0Fz8Qgg0H4ETkGcJnXL8d4j0PPA==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/preset-flow/-/preset-flow-7.25.9.tgz", + "integrity": "sha512-EASHsAhE+SSlEzJ4bzfusnXSHiU+JfAYzj+jbw2vgQKgq5HrUr8qs+vgtiEL5dOH6sEweI+PNt2D7AqrDSHyqQ==", + "license": "MIT", "peer": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.24.0", - "@babel/helper-validator-option": "^7.23.5", - "@babel/plugin-transform-flow-strip-types": "^7.24.1" + "@babel/helper-plugin-utils": "^7.25.9", + "@babel/helper-validator-option": "^7.25.9", + "@babel/plugin-transform-flow-strip-types": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -2167,6 +2104,7 @@ "version": "0.1.6-no-external-plugins", "resolved": "https://registry.npmjs.org/@babel/preset-modules/-/preset-modules-0.1.6-no-external-plugins.tgz", "integrity": "sha512-HrcgcIESLm9aIR842yhJ5RWan/gebQUJ6E/E5+rf0y9o6oj7w0Br+sWuL6kEQ/o/AdfvR1Je9jG18/gnpwjEyA==", + "license": "MIT", "peer": true, "dependencies": { "@babel/helper-plugin-utils": "^7.0.0", @@ -2178,16 +2116,17 @@ } }, "node_modules/@babel/preset-typescript": { - "version": "7.24.1", - "resolved": "https://registry.npmjs.org/@babel/preset-typescript/-/preset-typescript-7.24.1.tgz", - "integrity": "sha512-1DBaMmRDpuYQBPWD8Pf/WEwCrtgRHxsZnP4mIy9G/X+hFfbI47Q2G4t1Paakld84+qsk2fSsUPMKg71jkoOOaQ==", + "version": "7.26.0", + "resolved": "https://registry.npmjs.org/@babel/preset-typescript/-/preset-typescript-7.26.0.tgz", + "integrity": "sha512-NMk1IGZ5I/oHhoXEElcm+xUnL/szL6xflkFZmoEU9xj1qSJXpiS7rsspYo92B4DRCDvZn2erT5LdsCeXAKNCkg==", + "license": "MIT", "peer": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.24.0", - "@babel/helper-validator-option": "^7.23.5", - "@babel/plugin-syntax-jsx": "^7.24.1", - "@babel/plugin-transform-modules-commonjs": "^7.24.1", - "@babel/plugin-transform-typescript": "^7.24.1" + "@babel/helper-plugin-utils": "^7.25.9", + "@babel/helper-validator-option": "^7.25.9", + "@babel/plugin-syntax-jsx": "^7.25.9", + "@babel/plugin-transform-modules-commonjs": "^7.25.9", + "@babel/plugin-transform-typescript": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -2197,9 +2136,10 @@ } }, "node_modules/@babel/register": { - "version": "7.23.7", - "resolved": "https://registry.npmjs.org/@babel/register/-/register-7.23.7.tgz", - "integrity": "sha512-EjJeB6+kvpk+Y5DAkEAmbOBEFkh9OASx0huoEkqYTFxAZHzOAX2Oh5uwAUuL2rUddqfM0SA+KPXV2TbzoZ2kvQ==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/register/-/register-7.25.9.tgz", + "integrity": "sha512-8D43jXtGsYmEeDvm4MWHYUpWf8iiXgWYx3fW7E7Wb7Oe6FWqJPl5K6TuFW0dOwNZzEE5rjlaSJYH9JjrUKJszA==", + "license": "MIT", "peer": true, "dependencies": { "clone-deep": "^4.0.1", @@ -2215,16 +2155,11 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/regjsgen": { - "version": "0.8.0", - "resolved": "https://registry.npmjs.org/@babel/regjsgen/-/regjsgen-0.8.0.tgz", - "integrity": "sha512-x/rqGMdzj+fWZvCOYForTghzbtqPDZ5gPwaoNGHdgDfF2QA/XZbCBp4Moo5scrkAMPhB7z26XM/AaHuIJdgauA==", - "peer": true - }, "node_modules/@babel/runtime": { - "version": "7.24.4", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.24.4.tgz", - "integrity": "sha512-dkxf7+hn8mFBwKjs9bvBlArzLVxVbS8usaPUDd5p2a9JCL9tB8OaOVN1isD4+Xyk4ns89/xeOmbQvgdK7IIVdA==", + "version": "7.26.0", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.26.0.tgz", + "integrity": "sha512-FDSOghenHTiToteC/QRlv2q3DhPZ/oOXTBoirfWNx1Cx3TMVcGWQtMMmQcSvb/JjpNeGzx8Pq/b4fKEJuWm1sw==", + "license": "MIT", "peer": true, "dependencies": { "regenerator-runtime": "^0.14.0" @@ -2233,48 +2168,60 @@ "node": ">=6.9.0" } }, - "node_modules/@babel/runtime-corejs3": { - "version": "7.24.4", - "resolved": "https://registry.npmjs.org/@babel/runtime-corejs3/-/runtime-corejs3-7.24.4.tgz", - "integrity": "sha512-VOQOexSilscN24VEY810G/PqtpFvx/z6UqDIjIWbDe2368HhDLkYN5TYwaEz/+eRCUkhJ2WaNLLmQAlxzfWj4w==", - "dev": true, + "node_modules/@babel/runtime/node_modules/regenerator-runtime": { + "version": "0.14.1", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz", + "integrity": "sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==", + "license": "MIT", + "peer": true + }, + "node_modules/@babel/template": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.25.9.tgz", + "integrity": "sha512-9DGttpmPvIxBb/2uwpVo3dqJ+O6RooAFOS+lB+xDqoE2PVCE8nfoHMdZLpfCQRLwvohzXISPZcgxt80xLfsuwg==", + "license": "MIT", "peer": true, "dependencies": { - "core-js-pure": "^3.30.2", - "regenerator-runtime": "^0.14.0" + "@babel/code-frame": "^7.25.9", + "@babel/parser": "^7.25.9", + "@babel/types": "^7.25.9" }, "engines": { "node": ">=6.9.0" } }, - "node_modules/@babel/template": { - "version": "7.24.0", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.24.0.tgz", - "integrity": "sha512-Bkf2q8lMB0AFpX0NFEqSbx1OkTHf0f+0j82mkw+ZpzBnkk7e9Ql0891vlfgi+kHwOk8tQjiQHpqh4LaSa0fKEA==", + "node_modules/@babel/traverse": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.25.9.tgz", + "integrity": "sha512-ZCuvfwOwlz/bawvAuvcj8rrithP2/N55Tzz342AkTvq4qaWbGfmCk/tKhNaV2cthijKrPAA8SRJV5WWe7IBMJw==", + "license": "MIT", "peer": true, "dependencies": { - "@babel/code-frame": "^7.23.5", - "@babel/parser": "^7.24.0", - "@babel/types": "^7.24.0" + "@babel/code-frame": "^7.25.9", + "@babel/generator": "^7.25.9", + "@babel/parser": "^7.25.9", + "@babel/template": "^7.25.9", + "@babel/types": "^7.25.9", + "debug": "^4.3.1", + "globals": "^11.1.0" }, "engines": { "node": ">=6.9.0" } }, - "node_modules/@babel/traverse": { - "version": "7.24.1", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.24.1.tgz", - "integrity": "sha512-xuU6o9m68KeqZbQuDt2TcKSxUw/mrsvavlEqQ1leZ/B+C9tk6E4sRWy97WaXgvq5E+nU3cXMxv3WKOCanVMCmQ==", - "peer": true, - "dependencies": { - "@babel/code-frame": "^7.24.1", - "@babel/generator": "^7.24.1", - "@babel/helper-environment-visitor": "^7.22.20", - "@babel/helper-function-name": "^7.23.0", - "@babel/helper-hoist-variables": "^7.22.5", - "@babel/helper-split-export-declaration": "^7.22.6", - "@babel/parser": "^7.24.1", - "@babel/types": "^7.24.0", + "node_modules/@babel/traverse--for-generate-function-map": { + "name": "@babel/traverse", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.25.9.tgz", + "integrity": "sha512-ZCuvfwOwlz/bawvAuvcj8rrithP2/N55Tzz342AkTvq4qaWbGfmCk/tKhNaV2cthijKrPAA8SRJV5WWe7IBMJw==", + "license": "MIT", + "peer": true, + "dependencies": { + "@babel/code-frame": "^7.25.9", + "@babel/generator": "^7.25.9", + "@babel/parser": "^7.25.9", + "@babel/template": "^7.25.9", + "@babel/types": "^7.25.9", "debug": "^4.3.1", "globals": "^11.1.0" }, @@ -2282,24 +2229,35 @@ "node": ">=6.9.0" } }, + "node_modules/@babel/traverse--for-generate-function-map/node_modules/globals": { + "version": "11.12.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", + "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">=4" + } + }, "node_modules/@babel/traverse/node_modules/globals": { "version": "11.12.0", "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", + "license": "MIT", "peer": true, "engines": { "node": ">=4" } }, "node_modules/@babel/types": { - "version": "7.24.0", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.0.tgz", - "integrity": "sha512-+j7a5c253RfKh8iABBhywc8NSfP5LURe7Uh4qpsh6jc+aLJguvmIUBdjSdEMQv2bENrCR5MfRdjGo7vzS/ob7w==", + "version": "7.26.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.26.0.tgz", + "integrity": "sha512-Z/yiTPj+lDVnF7lWeKCIJzaIkI0vYO87dMpZ4bg4TDrFe4XXLFWL1TbXU27gBP3QccxV9mZICCrnjnYlJjXHOA==", + "license": "MIT", "peer": true, "dependencies": { - "@babel/helper-string-parser": "^7.23.4", - "@babel/helper-validator-identifier": "^7.22.20", - "to-fast-properties": "^2.0.0" + "@babel/helper-string-parser": "^7.25.9", + "@babel/helper-validator-identifier": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -2310,6 +2268,7 @@ "resolved": "https://registry.npmjs.org/@colors/colors/-/colors-1.5.0.tgz", "integrity": "sha512-ooWCrlZP11i8GImSjTHYHLkvFDP48nS4+204nGb1RiX/WXYHmJA2III9/e2DWVabCESdW7hBAEzHRqUn9OUVvQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=0.1.90" } @@ -2319,6 +2278,7 @@ "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==", "dev": true, + "license": "MIT", "dependencies": { "@jridgewell/trace-mapping": "0.3.9" }, @@ -2331,6 +2291,7 @@ "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz", "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==", "dev": true, + "license": "MIT", "dependencies": { "@jridgewell/resolve-uri": "^3.0.3", "@jridgewell/sourcemap-codec": "^1.4.10" @@ -2340,20 +2301,24 @@ "version": "10.0.1", "resolved": "https://registry.npmjs.org/@cucumber/ci-environment/-/ci-environment-10.0.1.tgz", "integrity": "sha512-/+ooDMPtKSmvcPMDYnMZt4LuoipfFfHaYspStI4shqw8FyKcfQAmekz6G+QKWjQQrvM+7Hkljwx58MEwPCwwzg==", - "dev": true + "dev": true, + "license": "MIT", + "peer": true }, "node_modules/@cucumber/cucumber": { - "version": "10.4.0", - "resolved": "https://registry.npmjs.org/@cucumber/cucumber/-/cucumber-10.4.0.tgz", - "integrity": "sha512-pFPu4tCzHJUm1S4GfWUlhJYYqfbVPCmYCADehuhNU+MR29mvy49DQE6WS6aVdwABPawzpBs0H8EuQYA8Vh9Yqw==", + "version": "10.9.0", + "resolved": "https://registry.npmjs.org/@cucumber/cucumber/-/cucumber-10.9.0.tgz", + "integrity": "sha512-7XHJ6nmr9IkIag0nv6or82HfelbSInrEe3H4aT6dMHyTehwFLUifG6eQQ+uE4LZIOXAnzLPH37YmqygEO67vCA==", "dev": true, + "license": "MIT", + "peer": true, "dependencies": { "@cucumber/ci-environment": "10.0.1", "@cucumber/cucumber-expressions": "17.1.0", "@cucumber/gherkin": "28.0.0", "@cucumber/gherkin-streams": "5.0.1", "@cucumber/gherkin-utils": "9.0.0", - "@cucumber/html-formatter": "21.3.1", + "@cucumber/html-formatter": "21.6.0", "@cucumber/message-streams": "4.0.1", "@cucumber/messages": "24.1.0", "@cucumber/tag-expressions": "6.1.0", @@ -2374,6 +2339,7 @@ "lodash.merge": "^4.6.2", "lodash.mergewith": "^4.6.2", "luxon": "3.2.1", + "mime": "^3.0.0", "mkdirp": "^2.1.5", "mz": "^2.7.0", "progress": "^2.0.3", @@ -2405,32 +2371,172 @@ "resolved": "https://registry.npmjs.org/@cucumber/cucumber-expressions/-/cucumber-expressions-17.1.0.tgz", "integrity": "sha512-PCv/ppsPynniKPWJr5v566daCVe+pbxQpHGrIu/Ev57cCH9Rv+X0F6lio4Id3Z64TaG7btCRLUGewIgLwmrwOA==", "dev": true, + "license": "MIT", + "peer": true, "dependencies": { "regexp-match-indices": "1.0.2" } }, - "node_modules/@cucumber/gherkin": { - "version": "28.0.0", - "resolved": "https://registry.npmjs.org/@cucumber/gherkin/-/gherkin-28.0.0.tgz", - "integrity": "sha512-Ee6zJQq0OmIUPdW0mSnsCsrWA2PZAELNDPICD2pLfs0Oz7RAPgj80UsD2UCtqyAhw2qAR62aqlktKUlai5zl/A==", + "node_modules/@cucumber/cucumber/node_modules/commander": { + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-10.0.1.tgz", + "integrity": "sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug==", "dev": true, - "dependencies": { - "@cucumber/messages": ">=19.1.4 <=24" + "license": "MIT", + "peer": true, + "engines": { + "node": ">=14" } }, - "node_modules/@cucumber/gherkin-streams": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/@cucumber/gherkin-streams/-/gherkin-streams-5.0.1.tgz", - "integrity": "sha512-/7VkIE/ASxIP/jd4Crlp4JHXqdNFxPGQokqWqsaCCiqBiu5qHoKMxcWNlp9njVL/n9yN4S08OmY3ZR8uC5x74Q==", + "node_modules/@cucumber/cucumber/node_modules/glob": { + "version": "10.4.5", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.4.5.tgz", + "integrity": "sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==", "dev": true, + "license": "ISC", + "peer": true, "dependencies": { - "commander": "9.1.0", - "source-map-support": "0.5.21" + "foreground-child": "^3.1.0", + "jackspeak": "^3.1.2", + "minimatch": "^9.0.4", + "minipass": "^7.1.2", + "package-json-from-dist": "^1.0.0", + "path-scurry": "^1.11.1" }, "bin": { - "gherkin-javascript": "bin/gherkin" + "glob": "dist/esm/bin.mjs" }, - "peerDependencies": { + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/@cucumber/cucumber/node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "license": "ISC", + "peer": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@cucumber/cucumber/node_modules/mime": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-3.0.0.tgz", + "integrity": "sha512-jSCU7/VB1loIWBZe14aEYHU/+1UMEHoaO7qxCOVJOw9GgH72VAWppxNcjU+x9a2k3GSIBXNKxXQFqRvvZ7vr3A==", + "dev": true, + "license": "MIT", + "peer": true, + "bin": { + "mime": "cli.js" + }, + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/@cucumber/cucumber/node_modules/mkdirp": { + "version": "2.1.6", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-2.1.6.tgz", + "integrity": "sha512-+hEnITedc8LAtIP9u3HJDFIdcLV2vXP33sqLLIzkv1Db1zO/1OxbvYf0Y1OC/S/Qo5dxHXepofhmxL02PsKe+A==", + "dev": true, + "license": "MIT", + "peer": true, + "bin": { + "mkdirp": "dist/cjs/src/bin.js" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/@cucumber/cucumber/node_modules/semver": { + "version": "7.5.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.3.tgz", + "integrity": "sha512-QBlUtyVk/5EeHbi7X0fw6liDZc7BBmEaSYn01fMU1OUYbf6GPsbTtd8WmnqbI20SeycoHSeiybkE/q1Q+qlThQ==", + "dev": true, + "license": "ISC", + "peer": true, + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@cucumber/cucumber/node_modules/supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" + } + }, + "node_modules/@cucumber/cucumber/node_modules/type-fest": { + "version": "4.26.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.26.1.tgz", + "integrity": "sha512-yOGpmOAL7CkKe/91I5O3gPICmJNLJ1G4zFYVAsRHg7M64biSnPtRj0WNQt++bRkjYOqjWXrhnUw1utzmVErAdg==", + "dev": true, + "license": "(MIT OR CC0-1.0)", + "peer": true, + "engines": { + "node": ">=16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@cucumber/cucumber/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true, + "license": "ISC", + "peer": true + }, + "node_modules/@cucumber/gherkin": { + "version": "28.0.0", + "resolved": "https://registry.npmjs.org/@cucumber/gherkin/-/gherkin-28.0.0.tgz", + "integrity": "sha512-Ee6zJQq0OmIUPdW0mSnsCsrWA2PZAELNDPICD2pLfs0Oz7RAPgj80UsD2UCtqyAhw2qAR62aqlktKUlai5zl/A==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "@cucumber/messages": ">=19.1.4 <=24" + } + }, + "node_modules/@cucumber/gherkin-streams": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/@cucumber/gherkin-streams/-/gherkin-streams-5.0.1.tgz", + "integrity": "sha512-/7VkIE/ASxIP/jd4Crlp4JHXqdNFxPGQokqWqsaCCiqBiu5qHoKMxcWNlp9njVL/n9yN4S08OmY3ZR8uC5x74Q==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "commander": "9.1.0", + "source-map-support": "0.5.21" + }, + "bin": { + "gherkin-javascript": "bin/gherkin" + }, + "peerDependencies": { "@cucumber/gherkin": ">=22.0.0", "@cucumber/message-streams": ">=4.0.0", "@cucumber/messages": ">=17.1.1" @@ -2441,6 +2547,8 @@ "resolved": "https://registry.npmjs.org/commander/-/commander-9.1.0.tgz", "integrity": "sha512-i0/MaqBtdbnJ4XQs4Pmyb+oFQl+q0lsAmokVUH92SlSw4fkeAcG3bVon+Qt7hmtF+u3Het6o4VgrcY3qAoEB6w==", "dev": true, + "license": "MIT", + "peer": true, "engines": { "node": "^12.20.0 || >=14" } @@ -2450,6 +2558,8 @@ "resolved": "https://registry.npmjs.org/@cucumber/gherkin-utils/-/gherkin-utils-9.0.0.tgz", "integrity": "sha512-clk4q39uj7pztZuZtyI54V8lRsCUz0Y/p8XRjIeHh7ExeEztpWkp4ca9q1FjUOPfQQ8E7OgqFbqoQQXZ1Bx7fw==", "dev": true, + "license": "MIT", + "peer": true, "dependencies": { "@cucumber/gherkin": "^28.0.0", "@cucumber/messages": "^24.0.0", @@ -2466,15 +2576,19 @@ "resolved": "https://registry.npmjs.org/commander/-/commander-12.0.0.tgz", "integrity": "sha512-MwVNWlYjDTtOjX5PiD7o5pK0UrFU/OYgcJfjjK4RaHZETNtjJqrZa9Y9ds88+A+f+d5lv+561eZ+yCKoS3gbAA==", "dev": true, + "license": "MIT", + "peer": true, "engines": { "node": ">=18" } }, "node_modules/@cucumber/html-formatter": { - "version": "21.3.1", - "resolved": "https://registry.npmjs.org/@cucumber/html-formatter/-/html-formatter-21.3.1.tgz", - "integrity": "sha512-M1zbre7e8MsecXheqNv62BKY5J06YJSv1LmsD7sJ3mu5t1jirLjj2It1HqPsX5CQAfg9n69xFRugPgLMSte9TA==", + "version": "21.6.0", + "resolved": "https://registry.npmjs.org/@cucumber/html-formatter/-/html-formatter-21.6.0.tgz", + "integrity": "sha512-Qw1tdObBJrgXgXwVjKVjB3hFhFPI8WhIFb+ULy8g5lDl5AdnKDiyDXAMvAWRX+pphnRMMNdkPCt6ZXEfWvUuAA==", "dev": true, + "license": "MIT", + "peer": true, "peerDependencies": { "@cucumber/messages": ">=18" } @@ -2484,6 +2598,8 @@ "resolved": "https://registry.npmjs.org/@cucumber/message-streams/-/message-streams-4.0.1.tgz", "integrity": "sha512-Kxap9uP5jD8tHUZVjTWgzxemi/0uOsbGjd4LBOSxcJoOCRbESFwemUzilJuzNTB8pcTQUh8D5oudUyxfkJOKmA==", "dev": true, + "license": "MIT", + "peer": true, "peerDependencies": { "@cucumber/messages": ">=17.1.1" } @@ -2493,6 +2609,8 @@ "resolved": "https://registry.npmjs.org/@cucumber/messages/-/messages-24.1.0.tgz", "integrity": "sha512-hxVHiBurORcobhVk80I9+JkaKaNXkW6YwGOEFIh/2aO+apAN+5XJgUUWjng9NwqaQrW1sCFuawLB1AuzmBaNdQ==", "dev": true, + "license": "MIT", + "peer": true, "dependencies": { "@types/uuid": "9.0.8", "class-transformer": "0.5.1", @@ -2500,416 +2618,447 @@ "uuid": "9.0.1" } }, - "node_modules/@cucumber/pretty-formatter": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@cucumber/pretty-formatter/-/pretty-formatter-1.0.1.tgz", - "integrity": "sha512-A1lU4VVP0aUWdOTmpdzvXOyEYuPtBDI0xYwYJnmoMDplzxMdhcHk86lyyvYDoMoPzzq6OkOE3isuosvUU4X7IQ==", - "dev": true, - "dependencies": { - "ansi-styles": "^5.0.0", - "cli-table3": "^0.6.0", - "figures": "^3.2.0", - "ts-dedent": "^2.0.0" - }, - "peerDependencies": { - "@cucumber/cucumber": ">=7.0.0", - "@cucumber/messages": "*" - } - }, "node_modules/@cucumber/tag-expressions": { "version": "6.1.0", "resolved": "https://registry.npmjs.org/@cucumber/tag-expressions/-/tag-expressions-6.1.0.tgz", "integrity": "sha512-+3DwRumrCJG27AtzCIL37A/X+A/gSfxOPLg8pZaruh5SLumsTmpvilwroVWBT2fPzmno/tGXypeK5a7NHU4RzA==", - "dev": true + "dev": true, + "license": "MIT", + "peer": true }, "node_modules/@esbuild/aix-ppc64": { - "version": "0.19.12", - "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.19.12.tgz", - "integrity": "sha512-bmoCYyWdEL3wDQIVbcyzRyeKLgk2WtWLTWz1ZIAZF/EGbNOwSA6ew3PftJ1PqMiOOGu0OyFMzG53L0zqIpPeNA==", + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.23.1.tgz", + "integrity": "sha512-6VhYk1diRqrhBAqpJEdjASR/+WVRtfjpqKuNw11cLiaWpAT/Uu+nokB+UJnevzy/P9C/ty6AOe0dwueMrGh/iQ==", "cpu": [ "ppc64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "aix" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/android-arm": { - "version": "0.19.12", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.19.12.tgz", - "integrity": "sha512-qg/Lj1mu3CdQlDEEiWrlC4eaPZ1KztwGJ9B6J+/6G+/4ewxJg7gqj8eVYWvao1bXrqGiW2rsBZFSX3q2lcW05w==", + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.23.1.tgz", + "integrity": "sha512-uz6/tEy2IFm9RYOyvKl88zdzZfwEfKZmnX9Cj1BHjeSGNuGLuMD1kR8y5bteYmwqKm1tj8m4cb/aKEorr6fHWQ==", "cpu": [ "arm" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "android" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/android-arm64": { - "version": "0.19.12", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.19.12.tgz", - "integrity": "sha512-P0UVNGIienjZv3f5zq0DP3Nt2IE/3plFzuaS96vihvD0Hd6H/q4WXUGpCxD/E8YrSXfNyRPbpTq+T8ZQioSuPA==", + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.23.1.tgz", + "integrity": "sha512-xw50ipykXcLstLeWH7WRdQuysJqejuAGPd30vd1i5zSyKK3WE+ijzHmLKxdiCMtH1pHz78rOg0BKSYOSB/2Khw==", "cpu": [ "arm64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "android" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/android-x64": { - "version": "0.19.12", - "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.19.12.tgz", - "integrity": "sha512-3k7ZoUW6Q6YqhdhIaq/WZ7HwBpnFBlW905Fa4s4qWJyiNOgT1dOqDiVAQFwBH7gBRZr17gLrlFCRzF6jFh7Kew==", + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.23.1.tgz", + "integrity": "sha512-nlN9B69St9BwUoB+jkyU090bru8L0NA3yFvAd7k8dNsVH8bi9a8cUAUSEcEEgTp2z3dbEDGJGfP6VUnkQnlReg==", "cpu": [ "x64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "android" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/darwin-arm64": { - "version": "0.19.12", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.19.12.tgz", - "integrity": "sha512-B6IeSgZgtEzGC42jsI+YYu9Z3HKRxp8ZT3cqhvliEHovq8HSX2YX8lNocDn79gCKJXOSaEot9MVYky7AKjCs8g==", + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.23.1.tgz", + "integrity": "sha512-YsS2e3Wtgnw7Wq53XXBLcV6JhRsEq8hkfg91ESVadIrzr9wO6jJDMZnCQbHm1Guc5t/CdDiFSSfWP58FNuvT3Q==", "cpu": [ "arm64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "darwin" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/darwin-x64": { - "version": "0.19.12", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.19.12.tgz", - "integrity": "sha512-hKoVkKzFiToTgn+41qGhsUJXFlIjxI/jSYeZf3ugemDYZldIXIxhvwN6erJGlX4t5h417iFuheZ7l+YVn05N3A==", + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.23.1.tgz", + "integrity": "sha512-aClqdgTDVPSEGgoCS8QDG37Gu8yc9lTHNAQlsztQ6ENetKEO//b8y31MMu2ZaPbn4kVsIABzVLXYLhCGekGDqw==", "cpu": [ "x64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "darwin" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/freebsd-arm64": { - "version": "0.19.12", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.19.12.tgz", - "integrity": "sha512-4aRvFIXmwAcDBw9AueDQ2YnGmz5L6obe5kmPT8Vd+/+x/JMVKCgdcRwH6APrbpNXsPz+K653Qg8HB/oXvXVukA==", + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.23.1.tgz", + "integrity": "sha512-h1k6yS8/pN/NHlMl5+v4XPfikhJulk4G+tKGFIOwURBSFzE8bixw1ebjluLOjfwtLqY0kewfjLSrO6tN2MgIhA==", "cpu": [ "arm64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "freebsd" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/freebsd-x64": { - "version": "0.19.12", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.19.12.tgz", - "integrity": "sha512-EYoXZ4d8xtBoVN7CEwWY2IN4ho76xjYXqSXMNccFSx2lgqOG/1TBPW0yPx1bJZk94qu3tX0fycJeeQsKovA8gg==", + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.23.1.tgz", + "integrity": "sha512-lK1eJeyk1ZX8UklqFd/3A60UuZ/6UVfGT2LuGo3Wp4/z7eRTRYY+0xOu2kpClP+vMTi9wKOfXi2vjUpO1Ro76g==", "cpu": [ "x64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "freebsd" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/linux-arm": { - "version": "0.19.12", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.19.12.tgz", - "integrity": "sha512-J5jPms//KhSNv+LO1S1TX1UWp1ucM6N6XuL6ITdKWElCu8wXP72l9MM0zDTzzeikVyqFE6U8YAV9/tFyj0ti+w==", + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.23.1.tgz", + "integrity": "sha512-CXXkzgn+dXAPs3WBwE+Kvnrf4WECwBdfjfeYHpMeVxWE0EceB6vhWGShs6wi0IYEqMSIzdOF1XjQ/Mkm5d7ZdQ==", "cpu": [ "arm" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/linux-arm64": { - "version": "0.19.12", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.19.12.tgz", - "integrity": "sha512-EoTjyYyLuVPfdPLsGVVVC8a0p1BFFvtpQDB/YLEhaXyf/5bczaGeN15QkR+O4S5LeJ92Tqotve7i1jn35qwvdA==", + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.23.1.tgz", + "integrity": "sha512-/93bf2yxencYDnItMYV/v116zff6UyTjo4EtEQjUBeGiVpMmffDNUyD9UN2zV+V3LRV3/on4xdZ26NKzn6754g==", "cpu": [ "arm64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/linux-ia32": { - "version": "0.19.12", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.19.12.tgz", - "integrity": "sha512-Thsa42rrP1+UIGaWz47uydHSBOgTUnwBwNq59khgIwktK6x60Hivfbux9iNR0eHCHzOLjLMLfUMLCypBkZXMHA==", + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.23.1.tgz", + "integrity": "sha512-VTN4EuOHwXEkXzX5nTvVY4s7E/Krz7COC8xkftbbKRYAl96vPiUssGkeMELQMOnLOJ8k3BY1+ZY52tttZnHcXQ==", "cpu": [ "ia32" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/linux-loong64": { - "version": "0.19.12", - "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.19.12.tgz", - "integrity": "sha512-LiXdXA0s3IqRRjm6rV6XaWATScKAXjI4R4LoDlvO7+yQqFdlr1Bax62sRwkVvRIrwXxvtYEHHI4dm50jAXkuAA==", + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.23.1.tgz", + "integrity": "sha512-Vx09LzEoBa5zDnieH8LSMRToj7ir/Jeq0Gu6qJ/1GcBq9GkfoEAoXvLiW1U9J1qE/Y/Oyaq33w5p2ZWrNNHNEw==", "cpu": [ "loong64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/linux-mips64el": { - "version": "0.19.12", - "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.19.12.tgz", - "integrity": "sha512-fEnAuj5VGTanfJ07ff0gOA6IPsvrVHLVb6Lyd1g2/ed67oU1eFzL0r9WL7ZzscD+/N6i3dWumGE1Un4f7Amf+w==", + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.23.1.tgz", + "integrity": "sha512-nrFzzMQ7W4WRLNUOU5dlWAqa6yVeI0P78WKGUo7lg2HShq/yx+UYkeNSE0SSfSure0SqgnsxPvmAUu/vu0E+3Q==", "cpu": [ "mips64el" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/linux-ppc64": { - "version": "0.19.12", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.19.12.tgz", - "integrity": "sha512-nYJA2/QPimDQOh1rKWedNOe3Gfc8PabU7HT3iXWtNUbRzXS9+vgB0Fjaqr//XNbd82mCxHzik2qotuI89cfixg==", + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.23.1.tgz", + "integrity": "sha512-dKN8fgVqd0vUIjxuJI6P/9SSSe/mB9rvA98CSH2sJnlZ/OCZWO1DJvxj8jvKTfYUdGfcq2dDxoKaC6bHuTlgcw==", "cpu": [ "ppc64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/linux-riscv64": { - "version": "0.19.12", - "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.19.12.tgz", - "integrity": "sha512-2MueBrlPQCw5dVJJpQdUYgeqIzDQgw3QtiAHUC4RBz9FXPrskyyU3VI1hw7C0BSKB9OduwSJ79FTCqtGMWqJHg==", + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.23.1.tgz", + "integrity": "sha512-5AV4Pzp80fhHL83JM6LoA6pTQVWgB1HovMBsLQ9OZWLDqVY8MVobBXNSmAJi//Csh6tcY7e7Lny2Hg1tElMjIA==", "cpu": [ "riscv64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/linux-s390x": { - "version": "0.19.12", - "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.19.12.tgz", - "integrity": "sha512-+Pil1Nv3Umes4m3AZKqA2anfhJiVmNCYkPchwFJNEJN5QxmTs1uzyy4TvmDrCRNT2ApwSari7ZIgrPeUx4UZDg==", + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.23.1.tgz", + "integrity": "sha512-9ygs73tuFCe6f6m/Tb+9LtYxWR4c9yg7zjt2cYkjDbDpV/xVn+68cQxMXCjUpYwEkze2RcU/rMnfIXNRFmSoDw==", "cpu": [ "s390x" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/linux-x64": { - "version": "0.19.12", - "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.19.12.tgz", - "integrity": "sha512-B71g1QpxfwBvNrfyJdVDexenDIt1CiDN1TIXLbhOw0KhJzE78KIFGX6OJ9MrtC0oOqMWf+0xop4qEU8JrJTwCg==", + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.23.1.tgz", + "integrity": "sha512-EV6+ovTsEXCPAp58g2dD68LxoP/wK5pRvgy0J/HxPGB009omFPv3Yet0HiaqvrIrgPTBuC6wCH1LTOY91EO5hQ==", "cpu": [ "x64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/netbsd-x64": { - "version": "0.19.12", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.19.12.tgz", - "integrity": "sha512-3ltjQ7n1owJgFbuC61Oj++XhtzmymoCihNFgT84UAmJnxJfm4sYCiSLTXZtE00VWYpPMYc+ZQmB6xbSdVh0JWA==", + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.23.1.tgz", + "integrity": "sha512-aevEkCNu7KlPRpYLjwmdcuNz6bDFiE7Z8XC4CPqExjTvrHugh28QzUXVOZtiYghciKUacNktqxdpymplil1beA==", "cpu": [ "x64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "netbsd" ], "engines": { - "node": ">=12" + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-arm64": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.23.1.tgz", + "integrity": "sha512-3x37szhLexNA4bXhLrCC/LImN/YtWis6WXr1VESlfVtVeoFJBRINPJ3f0a/6LV8zpikqoUg4hyXw0sFBt5Cr+Q==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" } }, "node_modules/@esbuild/openbsd-x64": { - "version": "0.19.12", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.19.12.tgz", - "integrity": "sha512-RbrfTB9SWsr0kWmb9srfF+L933uMDdu9BIzdA7os2t0TXhCRjrQyCeOt6wVxr79CKD4c+p+YhCj31HBkYcXebw==", + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.23.1.tgz", + "integrity": "sha512-aY2gMmKmPhxfU+0EdnN+XNtGbjfQgwZj43k8G3fyrDM/UdZww6xrWxmDkuz2eCZchqVeABjV5BpildOrUbBTqA==", "cpu": [ "x64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "openbsd" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/sunos-x64": { - "version": "0.19.12", - "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.19.12.tgz", - "integrity": "sha512-HKjJwRrW8uWtCQnQOz9qcU3mUZhTUQvi56Q8DPTLLB+DawoiQdjsYq+j+D3s9I8VFtDr+F9CjgXKKC4ss89IeA==", + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.23.1.tgz", + "integrity": "sha512-RBRT2gqEl0IKQABT4XTj78tpk9v7ehp+mazn2HbUeZl1YMdaGAQqhapjGTCe7uw7y0frDi4gS0uHzhvpFuI1sA==", "cpu": [ "x64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "sunos" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/win32-arm64": { - "version": "0.19.12", - "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.19.12.tgz", - "integrity": "sha512-URgtR1dJnmGvX864pn1B2YUYNzjmXkuJOIqG2HdU62MVS4EHpU2946OZoTMnRUHklGtJdJZ33QfzdjGACXhn1A==", + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.23.1.tgz", + "integrity": "sha512-4O+gPR5rEBe2FpKOVyiJ7wNDPA8nGzDuJ6gN4okSA1gEOYZ67N8JPk58tkWtdtPeLz7lBnY6I5L3jdsr3S+A6A==", "cpu": [ "arm64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "win32" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/win32-ia32": { - "version": "0.19.12", - "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.19.12.tgz", - "integrity": "sha512-+ZOE6pUkMOJfmxmBZElNOx72NKpIa/HFOMGzu8fqzQJ5kgf6aTGrcJaFsNiVMH4JKpMipyK+7k0n2UXN7a8YKQ==", + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.23.1.tgz", + "integrity": "sha512-BcaL0Vn6QwCwre3Y717nVHZbAa4UBEigzFm6VdsVdT/MbZ38xoj1X9HPkZhbmaBGUD1W8vxAfffbDe8bA6AKnQ==", "cpu": [ "ia32" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "win32" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/win32-x64": { - "version": "0.19.12", - "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.19.12.tgz", - "integrity": "sha512-T1QyPSDCyMXaO3pzBkF96E8xMkiRYbUEZADd29SyPGabqxMViNoii+NcK7eWJAEoU6RZyEm5lVSIjTmcdoB9HA==", + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.23.1.tgz", + "integrity": "sha512-BHpFFeslkWrXWyUPnbKm+xYYVYruCinGcftSBaa8zoF9hZO4BcSCFUvHVTtzpIY6YzUnYtuEhZ+C9iEXjxnasg==", "cpu": [ "x64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "win32" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@eslint-community/eslint-utils": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz", - "integrity": "sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==", + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.1.tgz", + "integrity": "sha512-s3O3waFUrMV8P/XaF/+ZTp1X9XBZW1a4B97ZnjQF2KYWaFD2A8KyFBsrsfSjEmjn3RGWAIuvlneuZm3CUK3jbA==", "dev": true, + "license": "MIT", "dependencies": { - "eslint-visitor-keys": "^3.3.0" + "eslint-visitor-keys": "^3.4.3" }, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, + "funding": { + "url": "https://opencollective.com/eslint" + }, "peerDependencies": { "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" } }, "node_modules/@eslint-community/regexpp": { - "version": "4.10.0", - "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.10.0.tgz", - "integrity": "sha512-Cu96Sd2By9mCNTx2iyKOmq10v22jUVQv0lQnlGNy16oE9589yE+QADPbrMGCkA51cKZSg3Pu/aTJVTGfL/qjUA==", + "version": "4.12.1", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.12.1.tgz", + "integrity": "sha512-CCZCDJuduB9OUkFkY2IgppNZMi2lBQgD2qzwXkEia16cge2pijY/aXi96CJMquDMn3nJdlPV1A5KrJEXwfLNzQ==", "dev": true, + "license": "MIT", "engines": { "node": "^12.0.0 || ^14.0.0 || >=16.0.0" } @@ -2919,6 +3068,7 @@ "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.4.tgz", "integrity": "sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==", "dev": true, + "license": "MIT", "dependencies": { "ajv": "^6.12.4", "debug": "^4.3.2", @@ -2941,13 +3091,15 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", - "dev": true + "dev": true, + "license": "Python-2.0" }, "node_modules/@eslint/eslintrc/node_modules/brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "dev": true, + "license": "MIT", "dependencies": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -2958,6 +3110,7 @@ "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", "dev": true, + "license": "MIT", "dependencies": { "argparse": "^2.0.1" }, @@ -2970,6 +3123,7 @@ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", "dev": true, + "license": "ISC", "dependencies": { "brace-expansion": "^1.1.7" }, @@ -2978,36 +3132,24 @@ } }, "node_modules/@eslint/js": { - "version": "8.57.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.57.0.tgz", - "integrity": "sha512-Ys+3g2TaW7gADOJzPt83SJtCDhMjndcDMFVQ/Tj9iA1BfJzFKD9mAUXT3OenpuPHbI6P/myECxRJrofUsDx/5g==", + "version": "8.57.1", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.57.1.tgz", + "integrity": "sha512-d9zaMRSTIKDLhctzH12MtXvJKSSUhaHcjV+2Z+GK+EEY7XKpP5yR4x+N3TAcHTcu963nIr+TMcCb4DBCYX1z6Q==", "dev": true, + "license": "MIT", "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } }, - "node_modules/@hapi/hoek": { - "version": "9.3.0", - "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-9.3.0.tgz", - "integrity": "sha512-/c6rf4UJlmHlC9b5BaNvzAcFv7HZ2QHaV0D4/HNlBdvFnvQq8RI4kYdhyPCl7Xj+oWvTWQ8ujhqS53LIgAe6KQ==", - "peer": true - }, - "node_modules/@hapi/topo": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/@hapi/topo/-/topo-5.1.0.tgz", - "integrity": "sha512-foQZKJig7Ob0BMAYBfcJk8d77QtOe7Wo4ox7ff1lQYoNNAb6jwcY1ncdoy2e9wQZzvNy7ODZCYJkK8kzmcAnAg==", - "peer": true, - "dependencies": { - "@hapi/hoek": "^9.0.0" - } - }, "node_modules/@humanwhocodes/config-array": { - "version": "0.11.14", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.14.tgz", - "integrity": "sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==", + "version": "0.13.0", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.13.0.tgz", + "integrity": "sha512-DZLEEqFWQFiyK6h5YIeynKx7JlvCYWL0cImfSRXZ9l4Sg2efkFGTuFf6vzXjK1cq6IYkU+Eg/JizXw+TD2vRNw==", + "deprecated": "Use @eslint/config-array instead", "dev": true, + "license": "Apache-2.0", "dependencies": { - "@humanwhocodes/object-schema": "^2.0.2", + "@humanwhocodes/object-schema": "^2.0.3", "debug": "^4.3.1", "minimatch": "^3.0.5" }, @@ -3020,6 +3162,7 @@ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "dev": true, + "license": "MIT", "dependencies": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -3030,6 +3173,7 @@ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", "dev": true, + "license": "ISC", "dependencies": { "brace-expansion": "^1.1.7" }, @@ -3042,6 +3186,7 @@ "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", "dev": true, + "license": "Apache-2.0", "engines": { "node": ">=12.22" }, @@ -3054,13 +3199,17 @@ "version": "2.0.3", "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.3.tgz", "integrity": "sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==", - "dev": true + "deprecated": "Use @eslint/object-schema instead", + "dev": true, + "license": "BSD-3-Clause" }, "node_modules/@isaacs/cliui": { "version": "8.0.2", "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", "integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==", "dev": true, + "license": "ISC", + "peer": true, "dependencies": { "string-width": "^5.1.2", "string-width-cjs": "npm:string-width@^4.2.0", @@ -3074,10 +3223,12 @@ } }, "node_modules/@isaacs/cliui/node_modules/ansi-regex": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", - "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.1.0.tgz", + "integrity": "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==", "dev": true, + "license": "MIT", + "peer": true, "engines": { "node": ">=12" }, @@ -3085,17 +3236,35 @@ "url": "https://github.com/chalk/ansi-regex?sponsor=1" } }, + "node_modules/@isaacs/cliui/node_modules/ansi-styles": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", + "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, "node_modules/@isaacs/cliui/node_modules/emoji-regex": { "version": "9.2.2", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", - "dev": true + "dev": true, + "license": "MIT", + "peer": true }, "node_modules/@isaacs/cliui/node_modules/string-width": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", "dev": true, + "license": "MIT", + "peer": true, "dependencies": { "eastasianwidth": "^0.2.0", "emoji-regex": "^9.2.2", @@ -3113,6 +3282,8 @@ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", "dev": true, + "license": "MIT", + "peer": true, "dependencies": { "ansi-regex": "^6.0.1" }, @@ -3123,37 +3294,152 @@ "url": "https://github.com/chalk/strip-ansi?sponsor=1" } }, + "node_modules/@isaacs/cliui/node_modules/wrap-ansi": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", + "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "ansi-styles": "^6.1.0", + "string-width": "^5.0.1", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, "node_modules/@isaacs/ttlcache": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/@isaacs/ttlcache/-/ttlcache-1.4.1.tgz", "integrity": "sha512-RQgQ4uQ+pLbqXfOmieB91ejmLwvSgv9nLx6sT6sD83s7umBypgg+OIBOBbEUiJXrfpnp9j0mRhYYdzp9uqq3lA==", + "license": "ISC", "peer": true, "engines": { "node": ">=12" } }, - "node_modules/@jest/create-cache-key-function": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/@jest/create-cache-key-function/-/create-cache-key-function-29.7.0.tgz", - "integrity": "sha512-4QqS3LY5PBmTRHj9sAg1HLoPzqAI0uOX6wI/TRqHIcOxlFidy6YEmCQJk6FSZjNLGCeubDMfmkWL+qaLKhSGQA==", + "node_modules/@istanbuljs/load-nyc-config": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz", + "integrity": "sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ==", + "license": "ISC", "peer": true, "dependencies": { - "@jest/types": "^29.6.3" + "camelcase": "^5.3.1", + "find-up": "^4.1.0", + "get-package-type": "^0.1.0", + "js-yaml": "^3.13.1", + "resolve-from": "^5.0.0" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": ">=8" } }, - "node_modules/@jest/environment": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-29.7.0.tgz", - "integrity": "sha512-aQIfHDq33ExsN4jP1NWGXhxgQ/wixs60gDiKO+XVMd8Mn0NWPWgc34ZQDTb2jKaUWQ7MuwoitXAsN2XVXNMpAw==", + "node_modules/@istanbuljs/load-nyc-config/node_modules/find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "license": "MIT", "peer": true, "dependencies": { - "@jest/fake-timers": "^29.7.0", - "@jest/types": "^29.6.3", - "@types/node": "*", - "jest-mock": "^29.7.0" + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@istanbuljs/load-nyc-config/node_modules/locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "license": "MIT", + "peer": true, + "dependencies": { + "p-locate": "^4.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@istanbuljs/load-nyc-config/node_modules/p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "license": "MIT", + "peer": true, + "dependencies": { + "p-try": "^2.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@istanbuljs/load-nyc-config/node_modules/p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "license": "MIT", + "peer": true, + "dependencies": { + "p-limit": "^2.2.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@istanbuljs/load-nyc-config/node_modules/resolve-from": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", + "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/@istanbuljs/schema": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.3.tgz", + "integrity": "sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/@jest/create-cache-key-function": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/create-cache-key-function/-/create-cache-key-function-29.7.0.tgz", + "integrity": "sha512-4QqS3LY5PBmTRHj9sAg1HLoPzqAI0uOX6wI/TRqHIcOxlFidy6YEmCQJk6FSZjNLGCeubDMfmkWL+qaLKhSGQA==", + "license": "MIT", + "peer": true, + "dependencies": { + "@jest/types": "^29.6.3" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/environment": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-29.7.0.tgz", + "integrity": "sha512-aQIfHDq33ExsN4jP1NWGXhxgQ/wixs60gDiKO+XVMd8Mn0NWPWgc34ZQDTb2jKaUWQ7MuwoitXAsN2XVXNMpAw==", + "license": "MIT", + "peer": true, + "dependencies": { + "@jest/fake-timers": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/node": "*", + "jest-mock": "^29.7.0" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" @@ -3164,6 +3450,7 @@ "resolved": "https://registry.npmjs.org/@jest/expect-utils/-/expect-utils-29.7.0.tgz", "integrity": "sha512-GlsNBWiFQFCVi9QVSx7f5AgMeLxe9YCCs5PuP2O2LdjDAA8Jh9eX7lA1Jq/xdXw3Wb3hyvlFNfZIfcRetSzYcA==", "dev": true, + "license": "MIT", "dependencies": { "jest-get-type": "^29.6.3" }, @@ -3175,6 +3462,7 @@ "version": "29.7.0", "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-29.7.0.tgz", "integrity": "sha512-q4DH1Ha4TTFPdxLsqDXK1d3+ioSL7yL5oCMJZgDYm6i+6CygW5E5xVr/D1HdsGxjt1ZWSfUAs9OxSB/BNelWrQ==", + "license": "MIT", "peer": true, "dependencies": { "@jest/types": "^29.6.3", @@ -3192,6 +3480,7 @@ "version": "29.6.3", "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.6.3.tgz", "integrity": "sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA==", + "license": "MIT", "dependencies": { "@sinclair/typebox": "^0.27.8" }, @@ -3199,10 +3488,38 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, + "node_modules/@jest/transform": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-29.7.0.tgz", + "integrity": "sha512-ok/BTPFzFKVMwO5eOHRrvnBVHdRy9IrsrW1GpMaQ9MCnilNLXQKmAX8s1YXDFaai9xJpac2ySzV0YeRRECr2Vw==", + "license": "MIT", + "peer": true, + "dependencies": { + "@babel/core": "^7.11.6", + "@jest/types": "^29.6.3", + "@jridgewell/trace-mapping": "^0.3.18", + "babel-plugin-istanbul": "^6.1.1", + "chalk": "^4.0.0", + "convert-source-map": "^2.0.0", + "fast-json-stable-stringify": "^2.1.0", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^29.7.0", + "jest-regex-util": "^29.6.3", + "jest-util": "^29.7.0", + "micromatch": "^4.0.4", + "pirates": "^4.0.4", + "slash": "^3.0.0", + "write-file-atomic": "^4.0.2" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, "node_modules/@jest/types": { "version": "29.6.3", "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.6.3.tgz", "integrity": "sha512-u3UPsIilWKOM3F9CXtrG8LEJmNxwoCQC/XVj4IKYXvvpx7QIi/Kg1LI5uDmDpKlac62NUtX7eLjRh+jVZcLOzw==", + "license": "MIT", "dependencies": { "@jest/schemas": "^29.6.3", "@types/istanbul-lib-coverage": "^2.0.0", @@ -3219,6 +3536,7 @@ "version": "0.3.5", "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz", "integrity": "sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==", + "license": "MIT", "dependencies": { "@jridgewell/set-array": "^1.2.1", "@jridgewell/sourcemap-codec": "^1.4.10", @@ -3232,6 +3550,7 @@ "version": "3.1.2", "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", + "license": "MIT", "engines": { "node": ">=6.0.0" } @@ -3240,6 +3559,7 @@ "version": "1.2.1", "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz", "integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==", + "license": "MIT", "engines": { "node": ">=6.0.0" } @@ -3248,30 +3568,52 @@ "version": "0.3.6", "resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.6.tgz", "integrity": "sha512-1ZJTZebgqllO79ue2bm3rIGud/bOe0pP5BjSRCRxxYkEZS8STV7zN84UBbiYu7jy+eCKSnVIUgoWWE/tt+shMQ==", + "license": "MIT", "dependencies": { "@jridgewell/gen-mapping": "^0.3.5", "@jridgewell/trace-mapping": "^0.3.25" } }, "node_modules/@jridgewell/sourcemap-codec": { - "version": "1.4.15", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", - "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==" + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz", + "integrity": "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==", + "license": "MIT" }, "node_modules/@jridgewell/trace-mapping": { "version": "0.3.25", "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz", "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==", + "license": "MIT", "dependencies": { "@jridgewell/resolve-uri": "^3.1.0", "@jridgewell/sourcemap-codec": "^1.4.14" } }, + "node_modules/@mswjs/interceptors": { + "version": "0.36.7", + "resolved": "https://registry.npmjs.org/@mswjs/interceptors/-/interceptors-0.36.7.tgz", + "integrity": "sha512-sdx02Wlus5hv6Bx7uUDb25gb0WGjCuSgnJB2LVERemoSGuqkZMe3QI6nEXhieFGtYwPrZbYrT2vPbsFN2XfbUw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@open-draft/deferred-promise": "^2.2.0", + "@open-draft/logger": "^0.3.0", + "@open-draft/until": "^2.0.0", + "is-node-process": "^1.2.0", + "outvariant": "^1.4.3", + "strict-event-emitter": "^0.5.1" + }, + "engines": { + "node": ">=18" + } + }, "node_modules/@nodelib/fs.scandir": { "version": "2.1.5", "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", "dev": true, + "license": "MIT", "dependencies": { "@nodelib/fs.stat": "2.0.5", "run-parallel": "^1.1.9" @@ -3285,6 +3627,7 @@ "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", "dev": true, + "license": "MIT", "engines": { "node": ">= 8" } @@ -3294,6 +3637,7 @@ "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", "dev": true, + "license": "MIT", "dependencies": { "@nodelib/fs.scandir": "2.1.5", "fastq": "^1.6.0" @@ -3302,12 +3646,39 @@ "node": ">= 8" } }, + "node_modules/@open-draft/deferred-promise": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@open-draft/deferred-promise/-/deferred-promise-2.2.0.tgz", + "integrity": "sha512-CecwLWx3rhxVQF6V4bAgPS5t+So2sTbPgAzafKkVizyi7tlwpcFpdFqq+wqF2OwNBmqFuu6tOyouTuxgpMfzmA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@open-draft/logger": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/@open-draft/logger/-/logger-0.3.0.tgz", + "integrity": "sha512-X2g45fzhxH238HKO4xbSr7+wBS8Fvw6ixhTDuvLd5mqh6bJJCFAPwU9mPDxbcrRtfxv4u5IHCEH77BmxvXmmxQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-node-process": "^1.2.0", + "outvariant": "^1.4.0" + } + }, + "node_modules/@open-draft/until": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@open-draft/until/-/until-2.1.0.tgz", + "integrity": "sha512-U69T3ItWHvLwGg5eJ0n3I62nWuE6ilHlmz7zM0npLBRvPRd7e6NYmg54vvRtP5mZG7kZqZCFVdsTWo7BPtBujg==", + "dev": true, + "license": "MIT" + }, "node_modules/@pkgjs/parseargs": { "version": "0.11.0", "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", "integrity": "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==", "dev": true, + "license": "MIT", "optional": true, + "peer": true, "engines": { "node": ">=14" } @@ -3317,6 +3688,7 @@ "resolved": "https://registry.npmjs.org/@pkgr/core/-/core-0.1.1.tgz", "integrity": "sha512-cq8o4cWH0ibXh9VGi5P20Tu9XF/0fFXl9EUinr9QfTM7a7p0oTA4iJRCQWppXR1Pg8dSM0UCItCkPwsk9qWWYA==", "dev": true, + "license": "MIT", "engines": { "node": "^12.20.0 || ^14.18.0 || >=16.0.0" }, @@ -3324,77 +3696,144 @@ "url": "https://opencollective.com/unts" } }, - "node_modules/@react-native-community/cli": { - "version": "12.3.6", - "resolved": "https://registry.npmjs.org/@react-native-community/cli/-/cli-12.3.6.tgz", - "integrity": "sha512-647OSi6xBb8FbwFqX9zsJxOzu685AWtrOUWHfOkbKD+5LOpGORw+GQo0F9rWZnB68rLQyfKUZWJeaD00pGv5fw==", + "node_modules/@react-native/assets-registry": { + "version": "0.76.1", + "resolved": "https://registry.npmjs.org/@react-native/assets-registry/-/assets-registry-0.76.1.tgz", + "integrity": "sha512-1mcDjyvC4Z+XYtY+Abl6pW9P49l/9HJmRChX7EHF1SoXe7zPAPBoAqeZsJNtf8dhJR3u/eGvapr1yJq8T/psEg==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">=18" + } + }, + "node_modules/@react-native/babel-plugin-codegen": { + "version": "0.76.1", + "resolved": "https://registry.npmjs.org/@react-native/babel-plugin-codegen/-/babel-plugin-codegen-0.76.1.tgz", + "integrity": "sha512-V9bGLyEdAF39nvn4L5gaJcPX1SvCHPJhaT3qfpVGvCnl7WPhdRyCq++WsN8HXlpo6WOAf6//oruLnLdl3RNM4Q==", + "license": "MIT", "peer": true, "dependencies": { - "@react-native-community/cli-clean": "12.3.6", - "@react-native-community/cli-config": "12.3.6", - "@react-native-community/cli-debugger-ui": "12.3.6", - "@react-native-community/cli-doctor": "12.3.6", - "@react-native-community/cli-hermes": "12.3.6", - "@react-native-community/cli-plugin-metro": "12.3.6", - "@react-native-community/cli-server-api": "12.3.6", - "@react-native-community/cli-tools": "12.3.6", - "@react-native-community/cli-types": "12.3.6", - "chalk": "^4.1.2", - "commander": "^9.4.1", - "deepmerge": "^4.3.0", - "execa": "^5.0.0", - "find-up": "^4.1.0", - "fs-extra": "^8.1.0", - "graceful-fs": "^4.1.3", - "prompts": "^2.4.2", - "semver": "^7.5.2" - }, - "bin": { - "react-native": "build/bin.js" + "@react-native/codegen": "0.76.1" }, "engines": { "node": ">=18" } }, - "node_modules/@react-native-community/cli-clean": { - "version": "12.3.6", - "resolved": "https://registry.npmjs.org/@react-native-community/cli-clean/-/cli-clean-12.3.6.tgz", - "integrity": "sha512-gUU29ep8xM0BbnZjwz9MyID74KKwutq9x5iv4BCr2im6nly4UMf1B1D+V225wR7VcDGzbgWjaezsJShLLhC5ig==", + "node_modules/@react-native/babel-preset": { + "version": "0.76.1", + "resolved": "https://registry.npmjs.org/@react-native/babel-preset/-/babel-preset-0.76.1.tgz", + "integrity": "sha512-b6YRmA13CmVuTQKHRen/Q0glHwmZFZoEDs+MJ1NL0UNHq9V5ytvdwTW1ntkmjtXuTnPMzkwYvumJBN9UTZjkBA==", + "license": "MIT", "peer": true, "dependencies": { - "@react-native-community/cli-tools": "12.3.6", - "chalk": "^4.1.2", - "execa": "^5.0.0" + "@babel/core": "^7.25.2", + "@babel/plugin-proposal-export-default-from": "^7.24.7", + "@babel/plugin-syntax-dynamic-import": "^7.8.3", + "@babel/plugin-syntax-export-default-from": "^7.24.7", + "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3", + "@babel/plugin-syntax-optional-chaining": "^7.8.3", + "@babel/plugin-transform-arrow-functions": "^7.24.7", + "@babel/plugin-transform-async-generator-functions": "^7.25.4", + "@babel/plugin-transform-async-to-generator": "^7.24.7", + "@babel/plugin-transform-block-scoping": "^7.25.0", + "@babel/plugin-transform-class-properties": "^7.25.4", + "@babel/plugin-transform-classes": "^7.25.4", + "@babel/plugin-transform-computed-properties": "^7.24.7", + "@babel/plugin-transform-destructuring": "^7.24.8", + "@babel/plugin-transform-flow-strip-types": "^7.25.2", + "@babel/plugin-transform-for-of": "^7.24.7", + "@babel/plugin-transform-function-name": "^7.25.1", + "@babel/plugin-transform-literals": "^7.25.2", + "@babel/plugin-transform-logical-assignment-operators": "^7.24.7", + "@babel/plugin-transform-modules-commonjs": "^7.24.8", + "@babel/plugin-transform-named-capturing-groups-regex": "^7.24.7", + "@babel/plugin-transform-nullish-coalescing-operator": "^7.24.7", + "@babel/plugin-transform-numeric-separator": "^7.24.7", + "@babel/plugin-transform-object-rest-spread": "^7.24.7", + "@babel/plugin-transform-optional-catch-binding": "^7.24.7", + "@babel/plugin-transform-optional-chaining": "^7.24.8", + "@babel/plugin-transform-parameters": "^7.24.7", + "@babel/plugin-transform-private-methods": "^7.24.7", + "@babel/plugin-transform-private-property-in-object": "^7.24.7", + "@babel/plugin-transform-react-display-name": "^7.24.7", + "@babel/plugin-transform-react-jsx": "^7.25.2", + "@babel/plugin-transform-react-jsx-self": "^7.24.7", + "@babel/plugin-transform-react-jsx-source": "^7.24.7", + "@babel/plugin-transform-regenerator": "^7.24.7", + "@babel/plugin-transform-runtime": "^7.24.7", + "@babel/plugin-transform-shorthand-properties": "^7.24.7", + "@babel/plugin-transform-spread": "^7.24.7", + "@babel/plugin-transform-sticky-regex": "^7.24.7", + "@babel/plugin-transform-typescript": "^7.25.2", + "@babel/plugin-transform-unicode-regex": "^7.24.7", + "@babel/template": "^7.25.0", + "@react-native/babel-plugin-codegen": "0.76.1", + "babel-plugin-syntax-hermes-parser": "^0.23.1", + "babel-plugin-transform-flow-enums": "^0.0.2", + "react-refresh": "^0.14.0" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@babel/core": "*" } }, - "node_modules/@react-native-community/cli-config": { - "version": "12.3.6", - "resolved": "https://registry.npmjs.org/@react-native-community/cli-config/-/cli-config-12.3.6.tgz", - "integrity": "sha512-JGWSYQ9EAK6m2v0abXwFLEfsqJ1zkhzZ4CV261QZF9MoUNB6h57a274h1MLQR9mG6Tsh38wBUuNfEPUvS1vYew==", + "node_modules/@react-native/codegen": { + "version": "0.76.1", + "resolved": "https://registry.npmjs.org/@react-native/codegen/-/codegen-0.76.1.tgz", + "integrity": "sha512-7lE0hk2qq27wVeK5eF654v7XsKoRa7ficrfSwIDEDZ1aLB2xgUzLrsq+glSAP9EuzT6ycHhtD3QyqI+TqnlS/A==", + "license": "MIT", "peer": true, "dependencies": { - "@react-native-community/cli-tools": "12.3.6", - "chalk": "^4.1.2", - "cosmiconfig": "^5.1.0", - "deepmerge": "^4.3.0", - "glob": "^7.1.3", - "joi": "^17.2.1" + "@babel/parser": "^7.25.3", + "glob": "^7.1.1", + "hermes-parser": "0.23.1", + "invariant": "^2.2.4", + "jscodeshift": "^0.14.0", + "mkdirp": "^0.5.1", + "nullthrows": "^1.1.1", + "yargs": "^17.6.2" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@babel/preset-env": "^7.1.6" } }, - "node_modules/@react-native-community/cli-config/node_modules/brace-expansion": { + "node_modules/@react-native/codegen/node_modules/brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "license": "MIT", "peer": true, "dependencies": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" } }, - "node_modules/@react-native-community/cli-config/node_modules/glob": { + "node_modules/@react-native/codegen/node_modules/cliui": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", + "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", + "license": "ISC", + "peer": true, + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@react-native/codegen/node_modules/glob": { "version": "7.2.3", "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "deprecated": "Glob versions prior to v9 are no longer supported", + "license": "ISC", "peer": true, "dependencies": { "fs.realpath": "^1.0.0", @@ -3411,10 +3850,11 @@ "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/@react-native-community/cli-config/node_modules/minimatch": { + "node_modules/@react-native/codegen/node_modules/minimatch": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "license": "ISC", "peer": true, "dependencies": { "brace-expansion": "^1.1.7" @@ -3423,699 +3863,145 @@ "node": "*" } }, - "node_modules/@react-native-community/cli-debugger-ui": { - "version": "12.3.6", - "resolved": "https://registry.npmjs.org/@react-native-community/cli-debugger-ui/-/cli-debugger-ui-12.3.6.tgz", - "integrity": "sha512-SjUKKsx5FmcK9G6Pb6UBFT0s9JexVStK5WInmANw75Hm7YokVvHEgtprQDz2Uvy5znX5g2ujzrkIU//T15KQzA==", - "peer": true, - "dependencies": { - "serve-static": "^1.13.1" - } - }, - "node_modules/@react-native-community/cli-doctor": { - "version": "12.3.6", - "resolved": "https://registry.npmjs.org/@react-native-community/cli-doctor/-/cli-doctor-12.3.6.tgz", - "integrity": "sha512-fvBDv2lTthfw4WOQKkdTop2PlE9GtfrlNnpjB818MhcdEnPjfQw5YaTUcnNEGsvGomdCs1MVRMgYXXwPSN6OvQ==", - "peer": true, - "dependencies": { - "@react-native-community/cli-config": "12.3.6", - "@react-native-community/cli-platform-android": "12.3.6", - "@react-native-community/cli-platform-ios": "12.3.6", - "@react-native-community/cli-tools": "12.3.6", - "chalk": "^4.1.2", - "command-exists": "^1.2.8", - "deepmerge": "^4.3.0", - "envinfo": "^7.10.0", - "execa": "^5.0.0", - "hermes-profile-transformer": "^0.0.6", - "node-stream-zip": "^1.9.1", - "ora": "^5.4.1", - "semver": "^7.5.2", - "strip-ansi": "^5.2.0", - "wcwidth": "^1.0.1", - "yaml": "^2.2.1" - } - }, - "node_modules/@react-native-community/cli-doctor/node_modules/strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "node_modules/@react-native/codegen/node_modules/yargs": { + "version": "17.7.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", + "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", + "license": "MIT", "peer": true, "dependencies": { - "ansi-regex": "^4.1.0" + "cliui": "^8.0.1", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.3", + "y18n": "^5.0.5", + "yargs-parser": "^21.1.1" }, "engines": { - "node": ">=6" + "node": ">=12" } }, - "node_modules/@react-native-community/cli-hermes": { - "version": "12.3.6", - "resolved": "https://registry.npmjs.org/@react-native-community/cli-hermes/-/cli-hermes-12.3.6.tgz", - "integrity": "sha512-sNGwfOCl8OAIjWCkwuLpP8NZbuO0dhDI/2W7NeOGDzIBsf4/c4MptTrULWtGIH9okVPLSPX0NnRyGQ+mSwWyuQ==", + "node_modules/@react-native/codegen/node_modules/yargs-parser": { + "version": "21.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", + "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", + "license": "ISC", "peer": true, - "dependencies": { - "@react-native-community/cli-platform-android": "12.3.6", - "@react-native-community/cli-tools": "12.3.6", - "chalk": "^4.1.2", - "hermes-profile-transformer": "^0.0.6" + "engines": { + "node": ">=12" } }, - "node_modules/@react-native-community/cli-platform-android": { - "version": "12.3.6", - "resolved": "https://registry.npmjs.org/@react-native-community/cli-platform-android/-/cli-platform-android-12.3.6.tgz", - "integrity": "sha512-DeDDAB8lHpuGIAPXeeD9Qu2+/wDTFPo99c8uSW49L0hkmZJixzvvvffbGQAYk32H0TmaI7rzvzH+qzu7z3891g==", + "node_modules/@react-native/community-cli-plugin": { + "version": "0.76.1", + "resolved": "https://registry.npmjs.org/@react-native/community-cli-plugin/-/community-cli-plugin-0.76.1.tgz", + "integrity": "sha512-dECc1LuleMQDX/WK2oJInrYCpHb3OFBJxYkhPOAXb9HiktMWRA9T93qqpTDshmtLdYqvxeO9AM5eeoSL412WnQ==", + "license": "MIT", "peer": true, "dependencies": { - "@react-native-community/cli-tools": "12.3.6", - "chalk": "^4.1.2", - "execa": "^5.0.0", - "fast-xml-parser": "^4.2.4", - "glob": "^7.1.3", - "logkitty": "^0.7.1" + "@react-native/dev-middleware": "0.76.1", + "@react-native/metro-babel-transformer": "0.76.1", + "chalk": "^4.0.0", + "execa": "^5.1.1", + "invariant": "^2.2.4", + "metro": "^0.81.0", + "metro-config": "^0.81.0", + "metro-core": "^0.81.0", + "node-fetch": "^2.2.0", + "readline": "^1.3.0" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@react-native-community/cli-server-api": "*" + }, + "peerDependenciesMeta": { + "@react-native-community/cli-server-api": { + "optional": true + } } }, - "node_modules/@react-native-community/cli-platform-android/node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "node_modules/@react-native/debugger-frontend": { + "version": "0.76.1", + "resolved": "https://registry.npmjs.org/@react-native/debugger-frontend/-/debugger-frontend-0.76.1.tgz", + "integrity": "sha512-0gExx7GR8o2ctGfjIZ9+x54iFbg0eP6+kMYzRA6AcgmFAmMGLADMmjtObCN0CqGeZyWtdVVqcv5mAwRwmMlNWA==", + "license": "BSD-3-Clause", "peer": true, - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" + "engines": { + "node": ">=18" } }, - "node_modules/@react-native-community/cli-platform-android/node_modules/glob": { - "version": "7.2.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", - "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "node_modules/@react-native/dev-middleware": { + "version": "0.76.1", + "resolved": "https://registry.npmjs.org/@react-native/dev-middleware/-/dev-middleware-0.76.1.tgz", + "integrity": "sha512-htaFSN2dwI0CinsMxjRuvIVdSDN6d6TDPeOJczM1bdAYalZX1M58knTKs5LJDComW5tleOCAg5lS5tIeFlM9+Q==", + "license": "MIT", "peer": true, "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.1.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" + "@isaacs/ttlcache": "^1.4.1", + "@react-native/debugger-frontend": "0.76.1", + "chrome-launcher": "^0.15.2", + "chromium-edge-launcher": "^0.2.0", + "connect": "^3.6.5", + "debug": "^2.2.0", + "nullthrows": "^1.1.1", + "open": "^7.0.3", + "selfsigned": "^2.4.1", + "serve-static": "^1.13.1", + "ws": "^6.2.3" }, "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" + "node": ">=18" } }, - "node_modules/@react-native-community/cli-platform-android/node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "node_modules/@react-native/dev-middleware/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "license": "MIT", "peer": true, "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "node_modules/@react-native-community/cli-platform-ios": { - "version": "12.3.6", - "resolved": "https://registry.npmjs.org/@react-native-community/cli-platform-ios/-/cli-platform-ios-12.3.6.tgz", - "integrity": "sha512-3eZ0jMCkKUO58wzPWlvAPRqezVKm9EPZyaPyHbRPWU8qw7JqkvnRlWIaYDGpjCJgVW4k2hKsEursLtYKb188tg==", - "peer": true, - "dependencies": { - "@react-native-community/cli-tools": "12.3.6", - "chalk": "^4.1.2", - "execa": "^5.0.0", - "fast-xml-parser": "^4.0.12", - "glob": "^7.1.3", - "ora": "^5.4.1" - } - }, - "node_modules/@react-native-community/cli-platform-ios/node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "peer": true, - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/@react-native-community/cli-platform-ios/node_modules/glob": { - "version": "7.2.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", - "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", - "peer": true, - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.1.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/@react-native-community/cli-platform-ios/node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "peer": true, - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "node_modules/@react-native-community/cli-plugin-metro": { - "version": "12.3.6", - "resolved": "https://registry.npmjs.org/@react-native-community/cli-plugin-metro/-/cli-plugin-metro-12.3.6.tgz", - "integrity": "sha512-3jxSBQt4fkS+KtHCPSyB5auIT+KKIrPCv9Dk14FbvOaEh9erUWEm/5PZWmtboW1z7CYeNbFMeXm9fM2xwtVOpg==", - "peer": true - }, - "node_modules/@react-native-community/cli-server-api": { - "version": "12.3.6", - "resolved": "https://registry.npmjs.org/@react-native-community/cli-server-api/-/cli-server-api-12.3.6.tgz", - "integrity": "sha512-80NIMzo8b2W+PL0Jd7NjiJW9mgaT8Y8wsIT/lh6mAvYH7mK0ecDJUYUTAAv79Tbo1iCGPAr3T295DlVtS8s4yQ==", - "peer": true, - "dependencies": { - "@react-native-community/cli-debugger-ui": "12.3.6", - "@react-native-community/cli-tools": "12.3.6", - "compression": "^1.7.1", - "connect": "^3.6.5", - "errorhandler": "^1.5.1", - "nocache": "^3.0.1", - "pretty-format": "^26.6.2", - "serve-static": "^1.13.1", - "ws": "^7.5.1" - } - }, - "node_modules/@react-native-community/cli-server-api/node_modules/@jest/types": { - "version": "26.6.2", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.6.2.tgz", - "integrity": "sha512-fC6QCp7Sc5sX6g8Tvbmj4XUTbyrik0akgRy03yjXbQaBWWNWGE7SGtJk98m0N8nzegD/7SggrUlivxo5ax4KWQ==", - "peer": true, - "dependencies": { - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^15.0.0", - "chalk": "^4.0.0" - }, - "engines": { - "node": ">= 10.14.2" - } - }, - "node_modules/@react-native-community/cli-server-api/node_modules/@types/yargs": { - "version": "15.0.19", - "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-15.0.19.tgz", - "integrity": "sha512-2XUaGVmyQjgyAZldf0D0c14vvo/yv0MhQBSTJcejMMaitsn3nxCB6TmH4G0ZQf+uxROOa9mpanoSm8h6SG/1ZA==", - "peer": true, - "dependencies": { - "@types/yargs-parser": "*" - } - }, - "node_modules/@react-native-community/cli-server-api/node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "peer": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/@react-native-community/cli-server-api/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "peer": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/@react-native-community/cli-server-api/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "peer": true, - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/@react-native-community/cli-server-api/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "peer": true - }, - "node_modules/@react-native-community/cli-server-api/node_modules/pretty-format": { - "version": "26.6.2", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-26.6.2.tgz", - "integrity": "sha512-7AeGuCYNGmycyQbCqd/3PWH4eOoX/OiCa0uphp57NVTeAGdJGaAliecxwBDHYQCIvrW7aDBZCYeNTP/WX69mkg==", - "peer": true, - "dependencies": { - "@jest/types": "^26.6.2", - "ansi-regex": "^5.0.0", - "ansi-styles": "^4.0.0", - "react-is": "^17.0.1" - }, - "engines": { - "node": ">= 10" - } - }, - "node_modules/@react-native-community/cli-server-api/node_modules/react-is": { - "version": "17.0.2", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz", - "integrity": "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==", - "peer": true - }, - "node_modules/@react-native-community/cli-server-api/node_modules/ws": { - "version": "7.5.9", - "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.9.tgz", - "integrity": "sha512-F+P9Jil7UiSKSkppIiD94dN07AwvFixvLIj1Og1Rl9GGMuNipJnV9JzjD6XuqmAeiswGvUmNLjr5cFuXwNS77Q==", - "peer": true, - "engines": { - "node": ">=8.3.0" - }, - "peerDependencies": { - "bufferutil": "^4.0.1", - "utf-8-validate": "^5.0.2" - }, - "peerDependenciesMeta": { - "bufferutil": { - "optional": true - }, - "utf-8-validate": { - "optional": true - } - } - }, - "node_modules/@react-native-community/cli-tools": { - "version": "12.3.6", - "resolved": "https://registry.npmjs.org/@react-native-community/cli-tools/-/cli-tools-12.3.6.tgz", - "integrity": "sha512-FPEvZn19UTMMXUp/piwKZSh8cMEfO8G3KDtOwo53O347GTcwNrKjgZGtLSPELBX2gr+YlzEft3CoRv2Qmo83fQ==", - "peer": true, - "dependencies": { - "appdirsjs": "^1.2.4", - "chalk": "^4.1.2", - "find-up": "^5.0.0", - "mime": "^2.4.1", - "node-fetch": "^2.6.0", - "open": "^6.2.0", - "ora": "^5.4.1", - "semver": "^7.5.2", - "shell-quote": "^1.7.3", - "sudo-prompt": "^9.0.0" - } - }, - "node_modules/@react-native-community/cli-types": { - "version": "12.3.6", - "resolved": "https://registry.npmjs.org/@react-native-community/cli-types/-/cli-types-12.3.6.tgz", - "integrity": "sha512-xPqTgcUtZowQ8WKOkI9TLGBwH2bGggOC4d2FFaIRST3gTcjrEeGRNeR5aXCzJFIgItIft8sd7p2oKEdy90+01Q==", - "peer": true, - "dependencies": { - "joi": "^17.2.1" - } - }, - "node_modules/@react-native-community/cli/node_modules/commander": { - "version": "9.5.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-9.5.0.tgz", - "integrity": "sha512-KRs7WVDKg86PWiuAqhDrAQnTXZKraVcCc6vFdL14qrZ/DcWwuRo7VoiYXalXO7S5GKpqYiVEwCbgFDfxNHKJBQ==", - "peer": true, - "engines": { - "node": "^12.20.0 || >=14" - } - }, - "node_modules/@react-native-community/cli/node_modules/find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", - "peer": true, - "dependencies": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/@react-native-community/cli/node_modules/fs-extra": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", - "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", - "peer": true, - "dependencies": { - "graceful-fs": "^4.2.0", - "jsonfile": "^4.0.0", - "universalify": "^0.1.0" - }, - "engines": { - "node": ">=6 <7 || >=8" - } - }, - "node_modules/@react-native-community/cli/node_modules/jsonfile": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", - "integrity": "sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==", - "peer": true, - "optionalDependencies": { - "graceful-fs": "^4.1.6" - } - }, - "node_modules/@react-native-community/cli/node_modules/locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", - "peer": true, - "dependencies": { - "p-locate": "^4.1.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/@react-native-community/cli/node_modules/p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "peer": true, - "dependencies": { - "p-try": "^2.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/@react-native-community/cli/node_modules/p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", - "peer": true, - "dependencies": { - "p-limit": "^2.2.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/@react-native-community/cli/node_modules/universalify": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", - "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", - "peer": true, - "engines": { - "node": ">= 4.0.0" - } - }, - "node_modules/@react-native/assets-registry": { - "version": "0.73.1", - "resolved": "https://registry.npmjs.org/@react-native/assets-registry/-/assets-registry-0.73.1.tgz", - "integrity": "sha512-2FgAbU7uKM5SbbW9QptPPZx8N9Ke2L7bsHb+EhAanZjFZunA9PaYtyjUQ1s7HD+zDVqOQIvjkpXSv7Kejd2tqg==", - "peer": true, - "engines": { - "node": ">=18" - } - }, - "node_modules/@react-native/babel-plugin-codegen": { - "version": "0.73.4", - "resolved": "https://registry.npmjs.org/@react-native/babel-plugin-codegen/-/babel-plugin-codegen-0.73.4.tgz", - "integrity": "sha512-XzRd8MJGo4Zc5KsphDHBYJzS1ryOHg8I2gOZDAUCGcwLFhdyGu1zBNDJYH2GFyDrInn9TzAbRIf3d4O+eltXQQ==", - "peer": true, - "dependencies": { - "@react-native/codegen": "0.73.3" - }, - "engines": { - "node": ">=18" - } - }, - "node_modules/@react-native/babel-preset": { - "version": "0.73.21", - "resolved": "https://registry.npmjs.org/@react-native/babel-preset/-/babel-preset-0.73.21.tgz", - "integrity": "sha512-WlFttNnySKQMeujN09fRmrdWqh46QyJluM5jdtDNrkl/2Hx6N4XeDUGhABvConeK95OidVO7sFFf7sNebVXogA==", - "peer": true, - "dependencies": { - "@babel/core": "^7.20.0", - "@babel/plugin-proposal-async-generator-functions": "^7.0.0", - "@babel/plugin-proposal-class-properties": "^7.18.0", - "@babel/plugin-proposal-export-default-from": "^7.0.0", - "@babel/plugin-proposal-nullish-coalescing-operator": "^7.18.0", - "@babel/plugin-proposal-numeric-separator": "^7.0.0", - "@babel/plugin-proposal-object-rest-spread": "^7.20.0", - "@babel/plugin-proposal-optional-catch-binding": "^7.0.0", - "@babel/plugin-proposal-optional-chaining": "^7.20.0", - "@babel/plugin-syntax-dynamic-import": "^7.8.0", - "@babel/plugin-syntax-export-default-from": "^7.0.0", - "@babel/plugin-syntax-flow": "^7.18.0", - "@babel/plugin-syntax-nullish-coalescing-operator": "^7.0.0", - "@babel/plugin-syntax-optional-chaining": "^7.0.0", - "@babel/plugin-transform-arrow-functions": "^7.0.0", - "@babel/plugin-transform-async-to-generator": "^7.20.0", - "@babel/plugin-transform-block-scoping": "^7.0.0", - "@babel/plugin-transform-classes": "^7.0.0", - "@babel/plugin-transform-computed-properties": "^7.0.0", - "@babel/plugin-transform-destructuring": "^7.20.0", - "@babel/plugin-transform-flow-strip-types": "^7.20.0", - "@babel/plugin-transform-function-name": "^7.0.0", - "@babel/plugin-transform-literals": "^7.0.0", - "@babel/plugin-transform-modules-commonjs": "^7.0.0", - "@babel/plugin-transform-named-capturing-groups-regex": "^7.0.0", - "@babel/plugin-transform-parameters": "^7.0.0", - "@babel/plugin-transform-private-methods": "^7.22.5", - "@babel/plugin-transform-private-property-in-object": "^7.22.11", - "@babel/plugin-transform-react-display-name": "^7.0.0", - "@babel/plugin-transform-react-jsx": "^7.0.0", - "@babel/plugin-transform-react-jsx-self": "^7.0.0", - "@babel/plugin-transform-react-jsx-source": "^7.0.0", - "@babel/plugin-transform-runtime": "^7.0.0", - "@babel/plugin-transform-shorthand-properties": "^7.0.0", - "@babel/plugin-transform-spread": "^7.0.0", - "@babel/plugin-transform-sticky-regex": "^7.0.0", - "@babel/plugin-transform-typescript": "^7.5.0", - "@babel/plugin-transform-unicode-regex": "^7.0.0", - "@babel/template": "^7.0.0", - "@react-native/babel-plugin-codegen": "0.73.4", - "babel-plugin-transform-flow-enums": "^0.0.2", - "react-refresh": "^0.14.0" - }, - "engines": { - "node": ">=18" - }, - "peerDependencies": { - "@babel/core": "*" - } - }, - "node_modules/@react-native/codegen": { - "version": "0.73.3", - "resolved": "https://registry.npmjs.org/@react-native/codegen/-/codegen-0.73.3.tgz", - "integrity": "sha512-sxslCAAb8kM06vGy9Jyh4TtvjhcP36k/rvj2QE2Jdhdm61KvfafCATSIsOfc0QvnduWFcpXUPvAVyYwuv7PYDg==", - "peer": true, - "dependencies": { - "@babel/parser": "^7.20.0", - "flow-parser": "^0.206.0", - "glob": "^7.1.1", - "invariant": "^2.2.4", - "jscodeshift": "^0.14.0", - "mkdirp": "^0.5.1", - "nullthrows": "^1.1.1" - }, - "engines": { - "node": ">=18" - }, - "peerDependencies": { - "@babel/preset-env": "^7.1.6" - } - }, - "node_modules/@react-native/codegen/node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "peer": true, - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/@react-native/codegen/node_modules/glob": { - "version": "7.2.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", - "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", - "peer": true, - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.1.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/@react-native/codegen/node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "peer": true, - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "node_modules/@react-native/codegen/node_modules/mkdirp": { - "version": "0.5.6", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz", - "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==", - "peer": true, - "dependencies": { - "minimist": "^1.2.6" - }, - "bin": { - "mkdirp": "bin/cmd.js" - } - }, - "node_modules/@react-native/community-cli-plugin": { - "version": "0.73.17", - "resolved": "https://registry.npmjs.org/@react-native/community-cli-plugin/-/community-cli-plugin-0.73.17.tgz", - "integrity": "sha512-F3PXZkcHg+1ARIr6FRQCQiB7ZAA+MQXGmq051metRscoLvgYJwj7dgC8pvgy0kexzUkHu5BNKrZeySzUft3xuQ==", - "peer": true, - "dependencies": { - "@react-native-community/cli-server-api": "12.3.6", - "@react-native-community/cli-tools": "12.3.6", - "@react-native/dev-middleware": "0.73.8", - "@react-native/metro-babel-transformer": "0.73.15", - "chalk": "^4.0.0", - "execa": "^5.1.1", - "metro": "^0.80.3", - "metro-config": "^0.80.3", - "metro-core": "^0.80.3", - "node-fetch": "^2.2.0", - "readline": "^1.3.0" - }, - "engines": { - "node": ">=18" - } - }, - "node_modules/@react-native/debugger-frontend": { - "version": "0.73.3", - "resolved": "https://registry.npmjs.org/@react-native/debugger-frontend/-/debugger-frontend-0.73.3.tgz", - "integrity": "sha512-RgEKnWuoo54dh7gQhV7kvzKhXZEhpF9LlMdZolyhGxHsBqZ2gXdibfDlfcARFFifPIiaZ3lXuOVVa4ei+uPgTw==", - "peer": true, - "engines": { - "node": ">=18" - } - }, - "node_modules/@react-native/dev-middleware": { - "version": "0.73.8", - "resolved": "https://registry.npmjs.org/@react-native/dev-middleware/-/dev-middleware-0.73.8.tgz", - "integrity": "sha512-oph4NamCIxkMfUL/fYtSsE+JbGOnrlawfQ0kKtDQ5xbOjPKotKoXqrs1eGwozNKv7FfQ393stk1by9a6DyASSg==", - "peer": true, - "dependencies": { - "@isaacs/ttlcache": "^1.4.1", - "@react-native/debugger-frontend": "0.73.3", - "chrome-launcher": "^0.15.2", - "chromium-edge-launcher": "^1.0.0", - "connect": "^3.6.5", - "debug": "^2.2.0", - "node-fetch": "^2.2.0", - "open": "^7.0.3", - "serve-static": "^1.13.1", - "temp-dir": "^2.0.0", - "ws": "^6.2.2" - }, - "engines": { - "node": ">=18" - } - }, - "node_modules/@react-native/dev-middleware/node_modules/debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "peer": true, - "dependencies": { - "ms": "2.0.0" + "ms": "2.0.0" } }, "node_modules/@react-native/dev-middleware/node_modules/ms": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "license": "MIT", "peer": true }, - "node_modules/@react-native/dev-middleware/node_modules/open": { - "version": "7.4.2", - "resolved": "https://registry.npmjs.org/open/-/open-7.4.2.tgz", - "integrity": "sha512-MVHddDVweXZF3awtlAS+6pgKLlm/JgxZ90+/NBurBoQctVOOB/zDdVjcyPzQ+0laDGbsWgrRkflI65sQeOgT9Q==", - "peer": true, - "dependencies": { - "is-docker": "^2.0.0", - "is-wsl": "^2.1.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/@react-native/dev-middleware/node_modules/ws": { - "version": "6.2.2", - "resolved": "https://registry.npmjs.org/ws/-/ws-6.2.2.tgz", - "integrity": "sha512-zmhltoSR8u1cnDsD43TX59mzoMZsLKqUweyYBAIvTngR3shc0W6aOZylZmq/7hqyVxPdi+5Ud2QInblgyE72fw==", - "peer": true, - "dependencies": { - "async-limiter": "~1.0.0" - } - }, "node_modules/@react-native/gradle-plugin": { - "version": "0.73.4", - "resolved": "https://registry.npmjs.org/@react-native/gradle-plugin/-/gradle-plugin-0.73.4.tgz", - "integrity": "sha512-PMDnbsZa+tD55Ug+W8CfqXiGoGneSSyrBZCMb5JfiB3AFST3Uj5e6lw8SgI/B6SKZF7lG0BhZ6YHZsRZ5MlXmg==", + "version": "0.76.1", + "resolved": "https://registry.npmjs.org/@react-native/gradle-plugin/-/gradle-plugin-0.76.1.tgz", + "integrity": "sha512-X7rNFltPa9QYxvYrQGaSCw7U57C+y+DwspXf4AnLZj0bQm9tL6UYpijh5vE3VmPcHn76/RNU2bpFjVvWg6gjqw==", + "license": "MIT", "peer": true, "engines": { "node": ">=18" } }, "node_modules/@react-native/js-polyfills": { - "version": "0.73.1", - "resolved": "https://registry.npmjs.org/@react-native/js-polyfills/-/js-polyfills-0.73.1.tgz", - "integrity": "sha512-ewMwGcumrilnF87H4jjrnvGZEaPFCAC4ebraEK+CurDDmwST/bIicI4hrOAv+0Z0F7DEK4O4H7r8q9vH7IbN4g==", + "version": "0.76.1", + "resolved": "https://registry.npmjs.org/@react-native/js-polyfills/-/js-polyfills-0.76.1.tgz", + "integrity": "sha512-HO3fzJ0FnrnQGmxdXxh2lcGGAMfaX9h1Pg1Zh38MkVw35/KnZHxHqxg6cruze6iWwZdfqSoIcQoalmMuAHby7Q==", + "license": "MIT", "peer": true, "engines": { "node": ">=18" } }, "node_modules/@react-native/metro-babel-transformer": { - "version": "0.73.15", - "resolved": "https://registry.npmjs.org/@react-native/metro-babel-transformer/-/metro-babel-transformer-0.73.15.tgz", - "integrity": "sha512-LlkSGaXCz+xdxc9819plmpsl4P4gZndoFtpjN3GMBIu6f7TBV0GVbyJAU4GE8fuAWPVSVL5ArOcdkWKSbI1klw==", + "version": "0.76.1", + "resolved": "https://registry.npmjs.org/@react-native/metro-babel-transformer/-/metro-babel-transformer-0.76.1.tgz", + "integrity": "sha512-LUAKqgsrioXS2a+pE0jak8sutTbLo3T34KWv7mdVUZ5lUACpqkIql1EFtIQlWjIcR4oZE480CkPbRHBI681tkQ==", + "license": "MIT", "peer": true, "dependencies": { - "@babel/core": "^7.20.0", - "@react-native/babel-preset": "0.73.21", - "hermes-parser": "0.15.0", + "@babel/core": "^7.25.2", + "@react-native/babel-preset": "0.76.1", + "hermes-parser": "0.23.1", "nullthrows": "^1.1.1" }, "engines": { @@ -4126,15 +4012,17 @@ } }, "node_modules/@react-native/normalize-colors": { - "version": "0.73.2", - "resolved": "https://registry.npmjs.org/@react-native/normalize-colors/-/normalize-colors-0.73.2.tgz", - "integrity": "sha512-bRBcb2T+I88aG74LMVHaKms2p/T8aQd8+BZ7LuuzXlRfog1bMWWn/C5i0HVuvW4RPtXQYgIlGiXVDy9Ir1So/w==", + "version": "0.76.1", + "resolved": "https://registry.npmjs.org/@react-native/normalize-colors/-/normalize-colors-0.76.1.tgz", + "integrity": "sha512-/+CUk/wGWIdXbJYVLw/q6Fs8Z0x91zzfXIbNiZUdSW1TNEDmytkF371H8a1/Nx3nWa1RqCMVsaZHCG4zqxeDvg==", + "license": "MIT", "peer": true }, "node_modules/@react-native/virtualized-lists": { - "version": "0.73.4", - "resolved": "https://registry.npmjs.org/@react-native/virtualized-lists/-/virtualized-lists-0.73.4.tgz", - "integrity": "sha512-HpmLg1FrEiDtrtAbXiwCgXFYyloK/dOIPIuWW3fsqukwJEWAiTzm1nXGJ7xPU5XTHiWZ4sKup5Ebaj8z7iyWog==", + "version": "0.76.1", + "resolved": "https://registry.npmjs.org/@react-native/virtualized-lists/-/virtualized-lists-0.76.1.tgz", + "integrity": "sha512-uWJfv0FC3zmlYORr0Sa17ngbAaw6K9yw4MAkBZyFeTM+W6AJRvTVyR1Mes/MU+vIyGFChnTcyaQrQz8jWqADOA==", + "license": "MIT", "peer": true, "dependencies": { "invariant": "^2.2.4", @@ -4144,14 +4032,22 @@ "node": ">=18" }, "peerDependencies": { + "@types/react": "^18.2.6", + "react": "*", "react-native": "*" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } } }, "node_modules/@rollup/plugin-commonjs": { - "version": "25.0.7", - "resolved": "https://registry.npmjs.org/@rollup/plugin-commonjs/-/plugin-commonjs-25.0.7.tgz", - "integrity": "sha512-nEvcR+LRjEjsaSsc4x3XZfCCvZIaSMenZu/OiwOKGN2UhQpAYI7ru7czFvyWbErlpoGjnSX3D5Ch5FcMA3kRWQ==", + "version": "25.0.8", + "resolved": "https://registry.npmjs.org/@rollup/plugin-commonjs/-/plugin-commonjs-25.0.8.tgz", + "integrity": "sha512-ZEZWTK5n6Qde0to4vS9Mr5x/0UZoqCxPVR9KRUjU4kA2sO7GEUn1fop0DAwpO6z0Nw/kJON9bDmSxdWxO/TT1A==", "dev": true, + "license": "MIT", "dependencies": { "@rollup/pluginutils": "^5.0.1", "commondir": "^1.0.1", @@ -4172,42 +4068,12 @@ } } }, - "node_modules/@rollup/plugin-commonjs/node_modules/glob": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz", - "integrity": "sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==", - "dev": true, - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^5.0.1", - "once": "^1.3.0" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/@rollup/plugin-commonjs/node_modules/minimatch": { - "version": "5.1.6", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", - "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", - "dev": true, - "dependencies": { - "brace-expansion": "^2.0.1" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/@rollup/plugin-json": { "version": "6.1.0", "resolved": "https://registry.npmjs.org/@rollup/plugin-json/-/plugin-json-6.1.0.tgz", "integrity": "sha512-EGI2te5ENk1coGeADSIwZ7G2Q8CJS2sF120T7jLw4xFw9n7wIOXHo+kIYRAoVpJAN+kmqZSoO3Fp4JtoNF4ReA==", "dev": true, + "license": "MIT", "dependencies": { "@rollup/pluginutils": "^5.1.0" }, @@ -4224,15 +4090,15 @@ } }, "node_modules/@rollup/plugin-node-resolve": { - "version": "15.2.3", - "resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-15.2.3.tgz", - "integrity": "sha512-j/lym8nf5E21LwBT4Df1VD6hRO2L2iwUeUmP7litikRsVp1H6NWx20NEp0Y7su+7XGc476GnXXc4kFeZNGmaSQ==", + "version": "15.3.0", + "resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-15.3.0.tgz", + "integrity": "sha512-9eO5McEICxMzJpDW9OnMYSv4Sta3hmt7VtBFz5zR9273suNOydOyq/FrGeGy+KsTRFm8w0SLVhzig2ILFT63Ag==", "dev": true, + "license": "MIT", "dependencies": { "@rollup/pluginutils": "^5.0.1", "@types/resolve": "1.20.2", "deepmerge": "^4.2.2", - "is-builtin-module": "^3.2.1", "is-module": "^1.0.0", "resolve": "^1.22.1" }, @@ -4249,10 +4115,11 @@ } }, "node_modules/@rollup/plugin-replace": { - "version": "5.0.5", - "resolved": "https://registry.npmjs.org/@rollup/plugin-replace/-/plugin-replace-5.0.5.tgz", - "integrity": "sha512-rYO4fOi8lMaTg/z5Jb+hKnrHHVn8j2lwkqwyS4kTRhKyWOLf2wST2sWXr4WzWiTcoHTp2sTjqUbqIj2E39slKQ==", + "version": "5.0.7", + "resolved": "https://registry.npmjs.org/@rollup/plugin-replace/-/plugin-replace-5.0.7.tgz", + "integrity": "sha512-PqxSfuorkHz/SPpyngLyg5GCEkOcee9M1bkxiVDr41Pd61mqP1PLOoDPbpl44SB2mQGKwV/In74gqQmGITOhEQ==", "dev": true, + "license": "MIT", "dependencies": { "@rollup/pluginutils": "^5.0.1", "magic-string": "^0.30.3" @@ -4274,6 +4141,7 @@ "resolved": "https://registry.npmjs.org/@rollup/plugin-terser/-/plugin-terser-0.4.4.tgz", "integrity": "sha512-XHeJC5Bgvs8LfukDwWZp7yeqin6ns8RTl2B9avbejt6tZqsqvVoWI7ZTQrcNsfKEDWBTnTxM8nMDkO2IFFbd0A==", "dev": true, + "license": "MIT", "dependencies": { "serialize-javascript": "^6.0.1", "smob": "^1.0.0", @@ -4296,6 +4164,7 @@ "resolved": "https://registry.npmjs.org/@rollup/plugin-typescript/-/plugin-typescript-11.1.6.tgz", "integrity": "sha512-R92yOmIACgYdJ7dJ97p4K69I8gg6IEHt8M7dUBxN3W6nrO8uUxX5ixl0yU/N3aZTi8WhPuICvOHXQvF6FaykAA==", "dev": true, + "license": "MIT", "dependencies": { "@rollup/pluginutils": "^5.1.0", "resolve": "^1.22.1" @@ -4318,14 +4187,15 @@ } }, "node_modules/@rollup/pluginutils": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-5.1.0.tgz", - "integrity": "sha512-XTIWOPPcpvyKI6L1NHo0lFlCyznUEyPmPY1mc3KpPVDYulHSTvyeLNVW00QTLIAFNhR3kYnJTQHeGqU4M3n09g==", + "version": "5.1.3", + "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-5.1.3.tgz", + "integrity": "sha512-Pnsb6f32CD2W3uCaLZIzDmeFyQ2b8UWMFI7xtwUezpcGBDVDW6y9XgAWIlARiGAo6eNF5FK5aQTr0LFyNyqq5A==", "dev": true, + "license": "MIT", "dependencies": { "@types/estree": "^1.0.0", "estree-walker": "^2.0.2", - "picomatch": "^2.3.1" + "picomatch": "^4.0.2" }, "engines": { "node": ">=14.0.0" @@ -4340,304 +4210,349 @@ } }, "node_modules/@rollup/rollup-android-arm-eabi": { - "version": "4.14.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.14.3.tgz", - "integrity": "sha512-X9alQ3XM6I9IlSlmC8ddAvMSyG1WuHk5oUnXGw+yUBs3BFoTizmG1La/Gr8fVJvDWAq+zlYTZ9DBgrlKRVY06g==", + "version": "4.22.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.22.4.tgz", + "integrity": "sha512-Fxamp4aEZnfPOcGA8KSNEohV8hX7zVHOemC8jVBoBUHu5zpJK/Eu3uJwt6BMgy9fkvzxDaurgj96F/NiLukF2w==", "cpu": [ "arm" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "android" ] }, "node_modules/@rollup/rollup-android-arm64": { - "version": "4.14.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.14.3.tgz", - "integrity": "sha512-eQK5JIi+POhFpzk+LnjKIy4Ks+pwJ+NXmPxOCSvOKSNRPONzKuUvWE+P9JxGZVxrtzm6BAYMaL50FFuPe0oWMQ==", + "version": "4.22.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.22.4.tgz", + "integrity": "sha512-VXoK5UMrgECLYaMuGuVTOx5kcuap1Jm8g/M83RnCHBKOqvPPmROFJGQaZhGccnsFtfXQ3XYa4/jMCJvZnbJBdA==", "cpu": [ "arm64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "android" ] }, "node_modules/@rollup/rollup-darwin-arm64": { - "version": "4.14.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.14.3.tgz", - "integrity": "sha512-Od4vE6f6CTT53yM1jgcLqNfItTsLt5zE46fdPaEmeFHvPs5SjZYlLpHrSiHEKR1+HdRfxuzXHjDOIxQyC3ptBA==", + "version": "4.22.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.22.4.tgz", + "integrity": "sha512-xMM9ORBqu81jyMKCDP+SZDhnX2QEVQzTcC6G18KlTQEzWK8r/oNZtKuZaCcHhnsa6fEeOBionoyl5JsAbE/36Q==", "cpu": [ "arm64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "darwin" ] }, "node_modules/@rollup/rollup-darwin-x64": { - "version": "4.14.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.14.3.tgz", - "integrity": "sha512-0IMAO21axJeNIrvS9lSe/PGthc8ZUS+zC53O0VhF5gMxfmcKAP4ESkKOCwEi6u2asUrt4mQv2rjY8QseIEb1aw==", + "version": "4.22.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.22.4.tgz", + "integrity": "sha512-aJJyYKQwbHuhTUrjWjxEvGnNNBCnmpHDvrb8JFDbeSH3m2XdHcxDd3jthAzvmoI8w/kSjd2y0udT+4okADsZIw==", "cpu": [ "x64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "darwin" ] }, "node_modules/@rollup/rollup-linux-arm-gnueabihf": { - "version": "4.14.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.14.3.tgz", - "integrity": "sha512-ge2DC7tHRHa3caVEoSbPRJpq7azhG+xYsd6u2MEnJ6XzPSzQsTKyXvh6iWjXRf7Rt9ykIUWHtl0Uz3T6yXPpKw==", + "version": "4.22.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.22.4.tgz", + "integrity": "sha512-j63YtCIRAzbO+gC2L9dWXRh5BFetsv0j0va0Wi9epXDgU/XUi5dJKo4USTttVyK7fGw2nPWK0PbAvyliz50SCQ==", "cpu": [ "arm" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" ] }, "node_modules/@rollup/rollup-linux-arm-musleabihf": { - "version": "4.14.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.14.3.tgz", - "integrity": "sha512-ljcuiDI4V3ySuc7eSk4lQ9wU8J8r8KrOUvB2U+TtK0TiW6OFDmJ+DdIjjwZHIw9CNxzbmXY39wwpzYuFDwNXuw==", + "version": "4.22.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.22.4.tgz", + "integrity": "sha512-dJnWUgwWBX1YBRsuKKMOlXCzh2Wu1mlHzv20TpqEsfdZLb3WoJW2kIEsGwLkroYf24IrPAvOT/ZQ2OYMV6vlrg==", "cpu": [ "arm" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" ] }, "node_modules/@rollup/rollup-linux-arm64-gnu": { - "version": "4.14.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.14.3.tgz", - "integrity": "sha512-Eci2us9VTHm1eSyn5/eEpaC7eP/mp5n46gTRB3Aar3BgSvDQGJZuicyq6TsH4HngNBgVqC5sDYxOzTExSU+NjA==", + "version": "4.22.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.22.4.tgz", + "integrity": "sha512-AdPRoNi3NKVLolCN/Sp4F4N1d98c4SBnHMKoLuiG6RXgoZ4sllseuGioszumnPGmPM2O7qaAX/IJdeDU8f26Aw==", "cpu": [ "arm64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" ] }, "node_modules/@rollup/rollup-linux-arm64-musl": { - "version": "4.14.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.14.3.tgz", - "integrity": "sha512-UrBoMLCq4E92/LCqlh+blpqMz5h1tJttPIniwUgOFJyjWI1qrtrDhhpHPuFxULlUmjFHfloWdixtDhSxJt5iKw==", + "version": "4.22.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.22.4.tgz", + "integrity": "sha512-Gl0AxBtDg8uoAn5CCqQDMqAx22Wx22pjDOjBdmG0VIWX3qUBHzYmOKh8KXHL4UpogfJ14G4wk16EQogF+v8hmA==", "cpu": [ "arm64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" ] }, "node_modules/@rollup/rollup-linux-powerpc64le-gnu": { - "version": "4.14.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.14.3.tgz", - "integrity": "sha512-5aRjvsS8q1nWN8AoRfrq5+9IflC3P1leMoy4r2WjXyFqf3qcqsxRCfxtZIV58tCxd+Yv7WELPcO9mY9aeQyAmw==", + "version": "4.22.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.22.4.tgz", + "integrity": "sha512-3aVCK9xfWW1oGQpTsYJJPF6bfpWfhbRnhdlyhak2ZiyFLDaayz0EP5j9V1RVLAAxlmWKTDfS9wyRyY3hvhPoOg==", "cpu": [ "ppc64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" ] }, "node_modules/@rollup/rollup-linux-riscv64-gnu": { - "version": "4.14.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.14.3.tgz", - "integrity": "sha512-sk/Qh1j2/RJSX7FhEpJn8n0ndxy/uf0kI/9Zc4b1ELhqULVdTfN6HL31CDaTChiBAOgLcsJ1sgVZjWv8XNEsAQ==", + "version": "4.22.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.22.4.tgz", + "integrity": "sha512-ePYIir6VYnhgv2C5Xe9u+ico4t8sZWXschR6fMgoPUK31yQu7hTEJb7bCqivHECwIClJfKgE7zYsh1qTP3WHUA==", "cpu": [ "riscv64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" ] }, "node_modules/@rollup/rollup-linux-s390x-gnu": { - "version": "4.14.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.14.3.tgz", - "integrity": "sha512-jOO/PEaDitOmY9TgkxF/TQIjXySQe5KVYB57H/8LRP/ux0ZoO8cSHCX17asMSv3ruwslXW/TLBcxyaUzGRHcqg==", + "version": "4.22.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.22.4.tgz", + "integrity": "sha512-GqFJ9wLlbB9daxhVlrTe61vJtEY99/xB3C8e4ULVsVfflcpmR6c8UZXjtkMA6FhNONhj2eA5Tk9uAVw5orEs4Q==", "cpu": [ "s390x" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" ] }, "node_modules/@rollup/rollup-linux-x64-gnu": { - "version": "4.14.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.14.3.tgz", - "integrity": "sha512-8ybV4Xjy59xLMyWo3GCfEGqtKV5M5gCSrZlxkPGvEPCGDLNla7v48S662HSGwRd6/2cSneMQWiv+QzcttLrrOA==", + "version": "4.22.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.22.4.tgz", + "integrity": "sha512-87v0ol2sH9GE3cLQLNEy0K/R0pz1nvg76o8M5nhMR0+Q+BBGLnb35P0fVz4CQxHYXaAOhE8HhlkaZfsdUOlHwg==", "cpu": [ "x64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" ] }, "node_modules/@rollup/rollup-linux-x64-musl": { - "version": "4.14.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.14.3.tgz", - "integrity": "sha512-s+xf1I46trOY10OqAtZ5Rm6lzHre/UiLA1J2uOhCFXWkbZrJRkYBPO6FhvGfHmdtQ3Bx793MNa7LvoWFAm93bg==", + "version": "4.22.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.22.4.tgz", + "integrity": "sha512-UV6FZMUgePDZrFjrNGIWzDo/vABebuXBhJEqrHxrGiU6HikPy0Z3LfdtciIttEUQfuDdCn8fqh7wiFJjCNwO+g==", "cpu": [ "x64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" ] }, "node_modules/@rollup/rollup-win32-arm64-msvc": { - "version": "4.14.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.14.3.tgz", - "integrity": "sha512-+4h2WrGOYsOumDQ5S2sYNyhVfrue+9tc9XcLWLh+Kw3UOxAvrfOrSMFon60KspcDdytkNDh7K2Vs6eMaYImAZg==", + "version": "4.22.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.22.4.tgz", + "integrity": "sha512-BjI+NVVEGAXjGWYHz/vv0pBqfGoUH0IGZ0cICTn7kB9PyjrATSkX+8WkguNjWoj2qSr1im/+tTGRaY+4/PdcQw==", "cpu": [ "arm64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "win32" ] }, "node_modules/@rollup/rollup-win32-ia32-msvc": { - "version": "4.14.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.14.3.tgz", - "integrity": "sha512-T1l7y/bCeL/kUwh9OD4PQT4aM7Bq43vX05htPJJ46RTI4r5KNt6qJRzAfNfM+OYMNEVBWQzR2Gyk+FXLZfogGw==", + "version": "4.22.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.22.4.tgz", + "integrity": "sha512-SiWG/1TuUdPvYmzmYnmd3IEifzR61Tragkbx9D3+R8mzQqDBz8v+BvZNDlkiTtI9T15KYZhP0ehn3Dld4n9J5g==", "cpu": [ "ia32" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "win32" ] }, "node_modules/@rollup/rollup-win32-x64-msvc": { - "version": "4.14.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.14.3.tgz", - "integrity": "sha512-/BypzV0H1y1HzgYpxqRaXGBRqfodgoBBCcsrujT6QRcakDQdfU+Lq9PENPh5jB4I44YWq+0C2eHsHya+nZY1sA==", + "version": "4.22.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.22.4.tgz", + "integrity": "sha512-j8pPKp53/lq9lMXN57S8cFz0MynJk8OWNuUnXct/9KCpKU7DgU3bYMJhwWmcqC0UU29p8Lr0/7KEVcaM6bf47Q==", "cpu": [ "x64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "win32" ] }, - "node_modules/@sideway/address": { - "version": "4.1.5", - "resolved": "https://registry.npmjs.org/@sideway/address/-/address-4.1.5.tgz", - "integrity": "sha512-IqO/DUQHUkPeixNQ8n0JA6102hT9CmaljNTPmQ1u8MEhBo/R4Q8eKLN/vGZxuebwOroDB4cbpjheD4+/sKFK4Q==", - "peer": true, - "dependencies": { - "@hapi/hoek": "^9.0.0" - } - }, - "node_modules/@sideway/formula": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/@sideway/formula/-/formula-3.0.1.tgz", - "integrity": "sha512-/poHZJJVjx3L+zVD6g9KgHfYnb443oi7wLu/XKojDviHy6HOEOA6z1Trk5aR1dGcmPenJEgb2sK2I80LeS3MIg==", - "peer": true - }, - "node_modules/@sideway/pinpoint": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@sideway/pinpoint/-/pinpoint-2.0.0.tgz", - "integrity": "sha512-RNiOoTPkptFtSVzQevY/yWtZwf/RxyVnPy/OcA9HBM3MlGDnBEYL5B41H0MTn0Uec8Hi+2qUtTfG2WWZBmMejQ==", - "peer": true - }, "node_modules/@sinclair/typebox": { "version": "0.27.8", "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.27.8.tgz", - "integrity": "sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==" + "integrity": "sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==", + "license": "MIT" }, "node_modules/@sinonjs/commons": { - "version": "1.8.6", - "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.8.6.tgz", - "integrity": "sha512-Ky+XkAkqPZSm3NLBeUng77EBQl3cmeJhITaGHdYH8kjVB+aun3S4XBRti2zt17mtt0mIUDiNxYeoJm6drVvBJQ==", - "dev": true, + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-3.0.1.tgz", + "integrity": "sha512-K3mCHKQ9sVh8o1C9cxkwxaOmXoAMlDxC1mYyHrjqOWEcBjYr76t96zL2zlj5dUGZ3HSw240X1qgH3Mjf1yJWpQ==", + "license": "BSD-3-Clause", + "peer": true, "dependencies": { "type-detect": "4.0.8" } }, + "node_modules/@sinonjs/commons/node_modules/type-detect": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", + "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">=4" + } + }, "node_modules/@sinonjs/fake-timers": { "version": "10.3.0", "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-10.3.0.tgz", "integrity": "sha512-V4BG07kuYSUkTCSBHG8G8TNhM+F19jXFWnQtzj+we8DrkpSBCee9Z3Ms8yiGer/dlmhe35/Xdgyo3/0rQKg7YA==", + "license": "BSD-3-Clause", "peer": true, "dependencies": { "@sinonjs/commons": "^3.0.0" } }, - "node_modules/@sinonjs/fake-timers/node_modules/@sinonjs/commons": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-3.0.1.tgz", - "integrity": "sha512-K3mCHKQ9sVh8o1C9cxkwxaOmXoAMlDxC1mYyHrjqOWEcBjYr76t96zL2zlj5dUGZ3HSw240X1qgH3Mjf1yJWpQ==", - "peer": true, - "dependencies": { - "type-detect": "4.0.8" - } - }, "node_modules/@sinonjs/formatio": { "version": "3.2.2", "resolved": "https://registry.npmjs.org/@sinonjs/formatio/-/formatio-3.2.2.tgz", "integrity": "sha512-B8SEsgd8gArBLMD6zpRw3juQ2FVSsmdd7qlevyDqzS9WTCtvF55/gAL+h6gue8ZvPYcdiPdvueM/qm//9XzyTQ==", "dev": true, + "license": "BSD-3-Clause", "dependencies": { "@sinonjs/commons": "^1", "@sinonjs/samsam": "^3.1.0" } }, + "node_modules/@sinonjs/formatio/node_modules/@sinonjs/commons": { + "version": "1.8.6", + "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.8.6.tgz", + "integrity": "sha512-Ky+XkAkqPZSm3NLBeUng77EBQl3cmeJhITaGHdYH8kjVB+aun3S4XBRti2zt17mtt0mIUDiNxYeoJm6drVvBJQ==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "type-detect": "4.0.8" + } + }, + "node_modules/@sinonjs/formatio/node_modules/type-detect": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", + "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, "node_modules/@sinonjs/samsam": { "version": "3.3.3", "resolved": "https://registry.npmjs.org/@sinonjs/samsam/-/samsam-3.3.3.tgz", "integrity": "sha512-bKCMKZvWIjYD0BLGnNrxVuw4dkWCYsLqFOUWw8VgKF/+5Y+mE7LfHWPIYoDXowH+3a9LsWDMo0uAP8YDosPvHQ==", "dev": true, + "license": "BSD-3-Clause", "dependencies": { "@sinonjs/commons": "^1.3.0", "array-from": "^2.1.1", "lodash": "^4.17.15" } }, + "node_modules/@sinonjs/samsam/node_modules/@sinonjs/commons": { + "version": "1.8.6", + "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.8.6.tgz", + "integrity": "sha512-Ky+XkAkqPZSm3NLBeUng77EBQl3cmeJhITaGHdYH8kjVB+aun3S4XBRti2zt17mtt0mIUDiNxYeoJm6drVvBJQ==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "type-detect": "4.0.8" + } + }, + "node_modules/@sinonjs/samsam/node_modules/type-detect": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", + "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, "node_modules/@sinonjs/text-encoding": { - "version": "0.7.2", - "resolved": "https://registry.npmjs.org/@sinonjs/text-encoding/-/text-encoding-0.7.2.tgz", - "integrity": "sha512-sXXKG+uL9IrKqViTtao2Ws6dy0znu9sOaP1di/jKGW1M6VssO8vlpXCQcpZ+jisQ1tTFAC5Jo/EOzFbggBagFQ==", - "dev": true + "version": "0.7.3", + "resolved": "https://registry.npmjs.org/@sinonjs/text-encoding/-/text-encoding-0.7.3.tgz", + "integrity": "sha512-DE427ROAphMQzU4ENbliGYrBSYPXF+TtLg9S8vzeA+OF4ZKzoDdzfL8sxuMUGS/lgRhM6j1URSk9ghf7Xo1tyA==", + "dev": true, + "license": "(Unlicense OR Apache-2.0)" }, "node_modules/@socket.io/component-emitter": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/@socket.io/component-emitter/-/component-emitter-3.1.1.tgz", - "integrity": "sha512-dzJtaDAAoXx4GCOJpbB2eG/Qj8VDpdwkLsWGzGm+0L7E8/434RyMbAHmk9ubXWVAb9nXmc44jUf8GKqVDiKezg==", - "dev": true + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@socket.io/component-emitter/-/component-emitter-3.1.2.tgz", + "integrity": "sha512-9BCxFwvbGg/RsZK9tjXd8s4UcwR0MWeFQ1XEKIQVVvAGJyINdrqKMcTRyLoK8Rse1GjzLV9cwjWV1olXRWEXVA==", + "dev": true, + "license": "MIT" }, "node_modules/@teppeis/multimaps": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/@teppeis/multimaps/-/multimaps-3.0.0.tgz", "integrity": "sha512-ID7fosbc50TbT0MK0EG12O+gAP3W3Aa/Pz4DaTtQtEvlc9Odaqi0de+xuZ7Li2GtK4HzEX7IuRWS/JmZLksR3Q==", "dev": true, + "license": "MIT", + "peer": true, "engines": { "node": ">=14" } @@ -4645,49 +4560,102 @@ "node_modules/@tootallnate/quickjs-emscripten": { "version": "0.23.0", "resolved": "https://registry.npmjs.org/@tootallnate/quickjs-emscripten/-/quickjs-emscripten-0.23.0.tgz", - "integrity": "sha512-C5Mc6rdnsaJDjO3UpGW/CQTHtCKaYlScZTly4JIu97Jxo/odCiH0ITnDXSJPTOrEKk/ycSZ0AOgTmkDtkOsvIA==" + "integrity": "sha512-C5Mc6rdnsaJDjO3UpGW/CQTHtCKaYlScZTly4JIu97Jxo/odCiH0ITnDXSJPTOrEKk/ycSZ0AOgTmkDtkOsvIA==", + "license": "MIT" }, "node_modules/@tsconfig/node10": { "version": "1.0.11", "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.11.tgz", "integrity": "sha512-DcRjDCujK/kCk/cUe8Xz8ZSpm8mS3mNNpta+jGCA6USEDfktlNvm1+IuZ9eTcDbNk41BHwpHHeW+N1lKCz4zOw==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/@tsconfig/node12": { "version": "1.0.11", "resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz", "integrity": "sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/@tsconfig/node14": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz", "integrity": "sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/@tsconfig/node16": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.4.tgz", "integrity": "sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==", - "dev": true + "dev": true, + "license": "MIT" + }, + "node_modules/@types/babel__core": { + "version": "7.20.5", + "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.5.tgz", + "integrity": "sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA==", + "license": "MIT", + "peer": true, + "dependencies": { + "@babel/parser": "^7.20.7", + "@babel/types": "^7.20.7", + "@types/babel__generator": "*", + "@types/babel__template": "*", + "@types/babel__traverse": "*" + } + }, + "node_modules/@types/babel__generator": { + "version": "7.6.8", + "resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.6.8.tgz", + "integrity": "sha512-ASsj+tpEDsEiFr1arWrlN6V3mdfjRMZt6LtK/Vp/kreFLnr5QH5+DhvD5nINYZXzwJvXeGq+05iUXcAzVrqWtw==", + "license": "MIT", + "peer": true, + "dependencies": { + "@babel/types": "^7.0.0" + } + }, + "node_modules/@types/babel__template": { + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.4.4.tgz", + "integrity": "sha512-h/NUaSyG5EyxBIp8YRxo4RMe2/qQgvyowRwVMzhYhBCONbW8PUsg4lkFMrhgZhUe5z3L3MiLDuvyJ/CaPa2A8A==", + "license": "MIT", + "peer": true, + "dependencies": { + "@babel/parser": "^7.1.0", + "@babel/types": "^7.0.0" + } + }, + "node_modules/@types/babel__traverse": { + "version": "7.20.6", + "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.20.6.tgz", + "integrity": "sha512-r1bzfrm0tomOI8g1SzvCaQHo6Lcv6zu0EA+W2kHrt8dyrHQxGzBBL4kdkzIS+jBMV+EYcMAEAqXqYaLJq5rOZg==", + "license": "MIT", + "peer": true, + "dependencies": { + "@babel/types": "^7.20.7" + } }, "node_modules/@types/cbor-js": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/@types/cbor-js/-/cbor-js-0.1.1.tgz", "integrity": "sha512-pfCx/EZC7VNBThwAQ0XvGPOXYm8BUk+gSVonaIGcEKBuqGJHTdcwAGW8WZkdRs/u9n9yOt1pBoPTCS1s8ZYpEQ==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/@types/chai": { - "version": "4.3.14", - "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.3.14.tgz", - "integrity": "sha512-Wj71sXE4Q4AkGdG9Tvq1u/fquNz9EdG4LIJMwVVII7ashjD/8cf8fyIfJAjRr6YcsXnSE8cOGQPq1gqeR8z+3w==", - "dev": true + "version": "4.3.20", + "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.3.20.tgz", + "integrity": "sha512-/pC9HAB5I/xMlc5FP77qjCnI16ChlJfW0tGa0IUcFn38VJrTV6DeZ60NU5KZBtaOZqjdpwTWohz5HU1RrhiYxQ==", + "dev": true, + "license": "MIT" }, "node_modules/@types/chai-as-promised": { "version": "7.1.8", "resolved": "https://registry.npmjs.org/@types/chai-as-promised/-/chai-as-promised-7.1.8.tgz", "integrity": "sha512-ThlRVIJhr69FLlh6IctTXFkmhtP3NpMZ2QGq69StYLyKZFp/HOp1VdKZj7RvfNWYYcJ1xlbLGLLWj1UvP5u/Gw==", "dev": true, + "license": "MIT", "dependencies": { "@types/chai": "*" } @@ -4696,52 +4664,58 @@ "version": "0.4.1", "resolved": "https://registry.npmjs.org/@types/cookie/-/cookie-0.4.1.tgz", "integrity": "sha512-XW/Aa8APYr6jSVVA1y/DEIZX0/GMKLEVekNG727R8cs56ahETkRAy/3DR7+fJyh7oUgGwNQaRfXCun0+KbWY7Q==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/@types/cors": { "version": "2.8.17", "resolved": "https://registry.npmjs.org/@types/cors/-/cors-2.8.17.tgz", "integrity": "sha512-8CGDvrBj1zgo2qE+oS3pOCyYNqCPryMWY2bGfwA0dcfopWGgxs+78df0Rs3rc9THP4JkOhLsAa+15VdpAqkcUA==", "dev": true, + "license": "MIT", "dependencies": { "@types/node": "*" } }, - "node_modules/@types/cucumber": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/@types/cucumber/-/cucumber-7.0.0.tgz", - "integrity": "sha512-cr5NN8/jmbw3vDKTQfGW0cSzDtkvxixu9bUD6po9U6OEF04XLuukTDldFG34ccDscLkA8bYnZ7VjxP79cIC7tg==", - "deprecated": "This is a stub types definition. @cucumber/cucumber provides its own type definitions, so you do not need this installed.", - "dev": true, - "dependencies": { - "@cucumber/cucumber": "*" - } - }, "node_modules/@types/estree": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.5.tgz", - "integrity": "sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==", - "dev": true + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.6.tgz", + "integrity": "sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==", + "dev": true, + "license": "MIT" }, "node_modules/@types/expect": { - "version": "24.3.0", - "resolved": "https://registry.npmjs.org/@types/expect/-/expect-24.3.0.tgz", - "integrity": "sha512-aq5Z+YFBz5o2b6Sp1jigx5nsmoZMK5Ceurjwy6PZmRv7dEi1jLtkARfvB1ME+OXJUG+7TZUDcv3WoCr/aor6dQ==", + "version": "24.3.2", + "resolved": "https://registry.npmjs.org/@types/expect/-/expect-24.3.2.tgz", + "integrity": "sha512-5ev4tL5eBuX9wyC/SFHku1Sizyerg457LiwMgde3sq61TMHbnKjikzwsBLxLpFMflvKuWXfWVW0w3hZg4qml9w==", "deprecated": "This is a stub types definition. expect provides its own type definitions, so you do not need this installed.", "dev": true, + "license": "MIT", "dependencies": { "expect": "*" } }, + "node_modules/@types/graceful-fs": { + "version": "4.1.9", + "resolved": "https://registry.npmjs.org/@types/graceful-fs/-/graceful-fs-4.1.9.tgz", + "integrity": "sha512-olP3sd1qOEe5dXTSaFvQG+02VdRXcdytWLAZsAq1PecU8uqQAhkrnbli7DagjtXKW/Bl7YJbUsa8MPcuc8LHEQ==", + "license": "MIT", + "peer": true, + "dependencies": { + "@types/node": "*" + } + }, "node_modules/@types/istanbul-lib-coverage": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.6.tgz", - "integrity": "sha512-2QF/t/auWm0lsy8XtKVPG19v3sSOQlJe/YHZgfjb/KBBHOGSV+J2q/S671rcq9uTBrLAXmZpqJiaQbMT+zNU1w==" + "integrity": "sha512-2QF/t/auWm0lsy8XtKVPG19v3sSOQlJe/YHZgfjb/KBBHOGSV+J2q/S671rcq9uTBrLAXmZpqJiaQbMT+zNU1w==", + "license": "MIT" }, "node_modules/@types/istanbul-lib-report": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/@types/istanbul-lib-report/-/istanbul-lib-report-3.0.3.tgz", "integrity": "sha512-NQn7AHQnk/RSLOxrBbGyJM/aVQ+pjj5HCgasFxc0K/KhoATfQ/47AyUl15I2yBUpihjmas+a+VJBOqecrFH+uA==", + "license": "MIT", "dependencies": { "@types/istanbul-lib-coverage": "*" } @@ -4750,50 +4724,50 @@ "version": "3.0.4", "resolved": "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-3.0.4.tgz", "integrity": "sha512-pk2B1NWalF9toCRu6gjBzR69syFjP4Od8WRAX+0mmf9lAjCRicLOWc+ZrxZHx/0XRjotgkF9t6iaMJ+aXcOdZQ==", + "license": "MIT", "dependencies": { "@types/istanbul-lib-report": "*" } }, - "node_modules/@types/json-schema": { - "version": "7.0.15", - "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", - "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", - "dev": true - }, "node_modules/@types/json5": { "version": "0.0.29", "resolved": "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz", "integrity": "sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==", "dev": true, + "license": "MIT", "optional": true }, "node_modules/@types/lil-uuid": { "version": "0.1.3", "resolved": "https://registry.npmjs.org/@types/lil-uuid/-/lil-uuid-0.1.3.tgz", "integrity": "sha512-UozexIWHw7bnQtbfdMqv1u82JmMl63t7lrCXpX6kByNH1F77j+Cdeqx28djuveoFvan9YUYrvK+ys1/hKIOgeA==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/@types/mocha": { "version": "9.1.1", "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-9.1.1.tgz", "integrity": "sha512-Z61JK7DKDtdKTWwLeElSEBcWGRLY8g95ic5FoQqI9CMx0ns/Ghep3B4DfcEimiKMvtamNVULVNKEsiwV3aQmXw==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/@types/nock": { "version": "9.3.1", "resolved": "https://registry.npmjs.org/@types/nock/-/nock-9.3.1.tgz", "integrity": "sha512-eOVHXS5RnWOjTVhu3deCM/ruy9E6JCgeix2g7wpFiekQh3AaEAK1cz43tZDukKmtSmQnwvSySq7ubijCA32I7Q==", "dev": true, + "license": "MIT", "dependencies": { "@types/node": "*" } }, "node_modules/@types/node": { - "version": "20.12.7", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.12.7.tgz", - "integrity": "sha512-wq0cICSkRLVaf3UGLMGItu/PtdY7oaXaI/RVU+xliKVOtRna3PRY57ZDfztpDL0n11vfymMUnXv8QwYCO7L1wg==", + "version": "22.8.5", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.8.5.tgz", + "integrity": "sha512-5iYk6AMPtsMbkZqCO1UGF9W5L38twq11S2pYWkybGHH2ogPUvXWNlQqJBzuEZWKj/WRH+QTeiv6ySWqJtvIEgA==", + "license": "MIT", "dependencies": { - "undici-types": "~5.26.4" + "undici-types": "~6.19.8" } }, "node_modules/@types/node-fetch": { @@ -4801,34 +4775,43 @@ "resolved": "https://registry.npmjs.org/@types/node-fetch/-/node-fetch-2.6.11.tgz", "integrity": "sha512-24xFj9R5+rfQJLRyM56qh+wnVSYhyXC2tkoBndtY0U+vubqNsYXGjufB2nn8Q6gt0LrARwL6UBtMCSVCwl4B1g==", "dev": true, + "license": "MIT", "dependencies": { "@types/node": "*", "form-data": "^4.0.0" } }, + "node_modules/@types/node-forge": { + "version": "1.3.11", + "resolved": "https://registry.npmjs.org/@types/node-forge/-/node-forge-1.3.11.tgz", + "integrity": "sha512-FQx220y22OKNTqaByeBGqHWYz4cl94tpcxeFdvBo3wjG6XPBuZ0BNgNZRV5J5TFmmcsJ4IzsLkmGRiQbnYsBEQ==", + "license": "MIT", + "peer": true, + "dependencies": { + "@types/node": "*" + } + }, "node_modules/@types/normalize-package-data": { "version": "2.4.4", "resolved": "https://registry.npmjs.org/@types/normalize-package-data/-/normalize-package-data-2.4.4.tgz", "integrity": "sha512-37i+OaWTh9qeK4LSHPsyRC7NahnGotNuZvjLSgcPzblpHB3rrCJxAOgI5gCdKm7coonsaX1Of0ILiTcnZjbfxA==", - "dev": true + "dev": true, + "license": "MIT", + "peer": true }, "node_modules/@types/resolve": { "version": "1.20.2", "resolved": "https://registry.npmjs.org/@types/resolve/-/resolve-1.20.2.tgz", "integrity": "sha512-60BCwRFOZCQhDncwQdxxeOEEkbc5dIMccYLwbxsS4TUNeVECQ/pBJ0j09mrHOl/JJvpRPGwO9SvE4nR2Nb/a4Q==", - "dev": true - }, - "node_modules/@types/semver": { - "version": "7.5.8", - "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.8.tgz", - "integrity": "sha512-I8EUhyrgfLrcTkzV3TSsGyl1tSuPrEDzr0yd5m90UgNxQkyDXULk3b6MlQqTCpZpNtWe1K0hzclnZkTcLBe2UQ==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/@types/sinon": { "version": "17.0.3", "resolved": "https://registry.npmjs.org/@types/sinon/-/sinon-17.0.3.tgz", "integrity": "sha512-j3uovdn8ewky9kRBG19bOwaZbexJu/XjtkHyjvUgt4xfPFz18dcORIMqnYh66Fx3Powhcr85NT5+er3+oViapw==", "dev": true, + "license": "MIT", "dependencies": { "@types/sinonjs__fake-timers": "*" } @@ -4837,35 +4820,42 @@ "version": "8.1.5", "resolved": "https://registry.npmjs.org/@types/sinonjs__fake-timers/-/sinonjs__fake-timers-8.1.5.tgz", "integrity": "sha512-mQkU2jY8jJEF7YHjHvsQO8+3ughTL1mcnn96igfhONmR+fUPSKIkefQYpSe8bsly2Ep7oQbn/6VG5/9/0qcArQ==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/@types/stack-utils": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-2.0.3.tgz", - "integrity": "sha512-9aEbYZ3TbYMznPdcdr3SmIrLXwC/AKZXQeCf9Pgao5CKb8CyHuEX5jzWPTkvregvhRJHcpRO6BFoGW9ycaOkYw==" + "integrity": "sha512-9aEbYZ3TbYMznPdcdr3SmIrLXwC/AKZXQeCf9Pgao5CKb8CyHuEX5jzWPTkvregvhRJHcpRO6BFoGW9ycaOkYw==", + "license": "MIT" }, "node_modules/@types/text-encoding": { "version": "0.0.39", "resolved": "https://registry.npmjs.org/@types/text-encoding/-/text-encoding-0.0.39.tgz", "integrity": "sha512-gRPvgL1aMgP6Pv92Rs310cJvVQ86DSF62E7K30g1FoGmmYWXoNuXT8PV835iAVeiAZkRwr2IW37KuyDn9ljmeA==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/@types/underscore": { - "version": "1.11.15", - "resolved": "https://registry.npmjs.org/@types/underscore/-/underscore-1.11.15.tgz", - "integrity": "sha512-HP38xE+GuWGlbSRq9WrZkousaQ7dragtZCruBVMi0oX1migFZavZ3OROKHSkNp/9ouq82zrWtZpg18jFnVN96g==", - "dev": true + "version": "1.13.0", + "resolved": "https://registry.npmjs.org/@types/underscore/-/underscore-1.13.0.tgz", + "integrity": "sha512-L6LBgy1f0EFQZ+7uSA57+n2g/s4Qs5r06Vwrwn0/nuK1de+adz00NWaztRQ30aEqw5qOaWbPI8u2cGQ52lj6VA==", + "dev": true, + "license": "MIT" }, "node_modules/@types/uuid": { "version": "9.0.8", "resolved": "https://registry.npmjs.org/@types/uuid/-/uuid-9.0.8.tgz", "integrity": "sha512-jg+97EGIcY9AGHJJRaaPVgetKDsrTgbRjQ5Msgjh/DQKEFl0DtyRr/VCOyD1T2R1MNeWPK/u7JoGhlDZnKBAfA==", - "dev": true + "dev": true, + "license": "MIT", + "peer": true }, "node_modules/@types/yargs": { - "version": "17.0.32", - "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.32.tgz", - "integrity": "sha512-xQ67Yc/laOG5uMfX/093MRlGGCIBzZMarVa+gfNKJxWAIgykYpVGkBdbqEzGDDfCrVUj6Hiff4mTZ5BA6TmAog==", + "version": "17.0.33", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.33.tgz", + "integrity": "sha512-WpxBCKWPLr4xSsHgz511rFJAM+wS28w2zEO1QDNY5zM/S8ok70NNfztH0xwhqKyaK0OHCbN98LDAZuy1ctxDkA==", + "license": "MIT", "dependencies": { "@types/yargs-parser": "*" } @@ -4873,36 +4863,36 @@ "node_modules/@types/yargs-parser": { "version": "21.0.3", "resolved": "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-21.0.3.tgz", - "integrity": "sha512-I4q9QU9MQv4oEOz4tAHJtNz1cwuLxn2F3xcc2iV5WdqLPpUnj30aUuxt1mAxYTG+oe8CZMV/+6rU4S4gRDzqtQ==" + "integrity": "sha512-I4q9QU9MQv4oEOz4tAHJtNz1cwuLxn2F3xcc2iV5WdqLPpUnj30aUuxt1mAxYTG+oe8CZMV/+6rU4S4gRDzqtQ==", + "license": "MIT" }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "7.7.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.7.0.tgz", - "integrity": "sha512-GJWR0YnfrKnsRoluVO3PRb9r5aMZriiMMM/RHj5nnTrBy1/wIgk76XCtCKcnXGjpZQJQRFtGV9/0JJ6n30uwpQ==", + "version": "8.12.2", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.12.2.tgz", + "integrity": "sha512-gQxbxM8mcxBwaEmWdtLCIGLfixBMHhQjBqR8sVWNTPpcj45WlYL2IObS/DNMLH1DBP0n8qz+aiiLTGfopPEebw==", "dev": true, + "license": "MIT", "dependencies": { "@eslint-community/regexpp": "^4.10.0", - "@typescript-eslint/scope-manager": "7.7.0", - "@typescript-eslint/type-utils": "7.7.0", - "@typescript-eslint/utils": "7.7.0", - "@typescript-eslint/visitor-keys": "7.7.0", - "debug": "^4.3.4", + "@typescript-eslint/scope-manager": "8.12.2", + "@typescript-eslint/type-utils": "8.12.2", + "@typescript-eslint/utils": "8.12.2", + "@typescript-eslint/visitor-keys": "8.12.2", "graphemer": "^1.4.0", "ignore": "^5.3.1", "natural-compare": "^1.4.0", - "semver": "^7.6.0", "ts-api-utils": "^1.3.0" }, "engines": { - "node": "^18.18.0 || >=20.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "@typescript-eslint/parser": "^7.0.0", - "eslint": "^8.56.0" + "@typescript-eslint/parser": "^8.0.0 || ^8.0.0-alpha.0", + "eslint": "^8.57.0 || ^9.0.0" }, "peerDependenciesMeta": { "typescript": { @@ -4910,54 +4900,28 @@ } } }, - "node_modules/@typescript-eslint/eslint-plugin/node_modules/lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "dev": true, - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/@typescript-eslint/eslint-plugin/node_modules/semver": { - "version": "7.6.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.0.tgz", - "integrity": "sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==", - "dev": true, - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/@typescript-eslint/parser": { - "version": "7.7.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-7.7.0.tgz", - "integrity": "sha512-fNcDm3wSwVM8QYL4HKVBggdIPAy9Q41vcvC/GtDobw3c4ndVT3K6cqudUmjHPw8EAp4ufax0o58/xvWaP2FmTg==", + "version": "8.12.2", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.12.2.tgz", + "integrity": "sha512-MrvlXNfGPLH3Z+r7Tk+Z5moZAc0dzdVjTgUgwsdGweH7lydysQsnSww3nAmsq8blFuRD5VRlAr9YdEFw3e6PBw==", "dev": true, + "license": "BSD-2-Clause", "dependencies": { - "@typescript-eslint/scope-manager": "7.7.0", - "@typescript-eslint/types": "7.7.0", - "@typescript-eslint/typescript-estree": "7.7.0", - "@typescript-eslint/visitor-keys": "7.7.0", + "@typescript-eslint/scope-manager": "8.12.2", + "@typescript-eslint/types": "8.12.2", + "@typescript-eslint/typescript-estree": "8.12.2", + "@typescript-eslint/visitor-keys": "8.12.2", "debug": "^4.3.4" }, "engines": { - "node": "^18.18.0 || >=20.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "eslint": "^8.56.0" + "eslint": "^8.57.0 || ^9.0.0" }, "peerDependenciesMeta": { "typescript": { @@ -4966,16 +4930,17 @@ } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "7.7.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.7.0.tgz", - "integrity": "sha512-/8INDn0YLInbe9Wt7dK4cXLDYp0fNHP5xKLHvZl3mOT5X17rK/YShXaiNmorl+/U4VKCVIjJnx4Ri5b0y+HClw==", + "version": "8.12.2", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.12.2.tgz", + "integrity": "sha512-gPLpLtrj9aMHOvxJkSbDBmbRuYdtiEbnvO25bCMza3DhMjTQw0u7Y1M+YR5JPbMsXXnSPuCf5hfq0nEkQDL/JQ==", "dev": true, + "license": "MIT", "dependencies": { - "@typescript-eslint/types": "7.7.0", - "@typescript-eslint/visitor-keys": "7.7.0" + "@typescript-eslint/types": "8.12.2", + "@typescript-eslint/visitor-keys": "8.12.2" }, "engines": { - "node": "^18.18.0 || >=20.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "type": "opencollective", @@ -4983,26 +4948,24 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "7.7.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-7.7.0.tgz", - "integrity": "sha512-bOp3ejoRYrhAlnT/bozNQi3nio9tIgv3U5C0mVDdZC7cpcQEDZXvq8inrHYghLVwuNABRqrMW5tzAv88Vy77Sg==", + "version": "8.12.2", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.12.2.tgz", + "integrity": "sha512-bwuU4TAogPI+1q/IJSKuD4shBLc/d2vGcRT588q+jzayQyjVK2X6v/fbR4InY2U2sgf8MEvVCqEWUzYzgBNcGQ==", "dev": true, + "license": "MIT", "dependencies": { - "@typescript-eslint/typescript-estree": "7.7.0", - "@typescript-eslint/utils": "7.7.0", + "@typescript-eslint/typescript-estree": "8.12.2", + "@typescript-eslint/utils": "8.12.2", "debug": "^4.3.4", "ts-api-utils": "^1.3.0" }, "engines": { - "node": "^18.18.0 || >=20.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" }, - "peerDependencies": { - "eslint": "^8.56.0" - }, "peerDependenciesMeta": { "typescript": { "optional": true @@ -5010,12 +4973,13 @@ } }, "node_modules/@typescript-eslint/types": { - "version": "7.7.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.7.0.tgz", - "integrity": "sha512-G01YPZ1Bd2hn+KPpIbrAhEWOn5lQBrjxkzHkWvP6NucMXFtfXoevK82hzQdpfuQYuhkvFDeQYbzXCjR1z9Z03w==", + "version": "8.12.2", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.12.2.tgz", + "integrity": "sha512-VwDwMF1SZ7wPBUZwmMdnDJ6sIFk4K4s+ALKLP6aIQsISkPv8jhiw65sAK6SuWODN/ix+m+HgbYDkH+zLjrzvOA==", "dev": true, + "license": "MIT", "engines": { - "node": "^18.18.0 || >=20.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "type": "opencollective", @@ -5023,22 +4987,23 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "7.7.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.7.0.tgz", - "integrity": "sha512-8p71HQPE6CbxIBy2kWHqM1KGrC07pk6RJn40n0DSc6bMOBBREZxSDJ+BmRzc8B5OdaMh1ty3mkuWRg4sCFiDQQ==", + "version": "8.12.2", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.12.2.tgz", + "integrity": "sha512-mME5MDwGe30Pq9zKPvyduyU86PH7aixwqYR2grTglAdB+AN8xXQ1vFGpYaUSJ5o5P/5znsSBeNcs5g5/2aQwow==", "dev": true, + "license": "BSD-2-Clause", "dependencies": { - "@typescript-eslint/types": "7.7.0", - "@typescript-eslint/visitor-keys": "7.7.0", + "@typescript-eslint/types": "8.12.2", + "@typescript-eslint/visitor-keys": "8.12.2", "debug": "^4.3.4", - "globby": "^11.1.0", + "fast-glob": "^3.3.2", "is-glob": "^4.0.3", "minimatch": "^9.0.4", "semver": "^7.6.0", "ts-api-utils": "^1.3.0" }, "engines": { - "node": "^18.18.0 || >=20.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "type": "opencollective", @@ -5050,96 +5015,41 @@ } } }, - "node_modules/@typescript-eslint/typescript-estree/node_modules/lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "dev": true, - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/@typescript-eslint/typescript-estree/node_modules/semver": { - "version": "7.6.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.0.tgz", - "integrity": "sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==", - "dev": true, - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/@typescript-eslint/utils": { - "version": "7.7.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-7.7.0.tgz", - "integrity": "sha512-LKGAXMPQs8U/zMRFXDZOzmMKgFv3COlxUQ+2NMPhbqgVm6R1w+nU1i4836Pmxu9jZAuIeyySNrN/6Rc657ggig==", + "version": "8.12.2", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.12.2.tgz", + "integrity": "sha512-UTTuDIX3fkfAz6iSVa5rTuSfWIYZ6ATtEocQ/umkRSyC9O919lbZ8dcH7mysshrCdrAM03skJOEYaBugxN+M6A==", "dev": true, + "license": "MIT", "dependencies": { "@eslint-community/eslint-utils": "^4.4.0", - "@types/json-schema": "^7.0.15", - "@types/semver": "^7.5.8", - "@typescript-eslint/scope-manager": "7.7.0", - "@typescript-eslint/types": "7.7.0", - "@typescript-eslint/typescript-estree": "7.7.0", - "semver": "^7.6.0" + "@typescript-eslint/scope-manager": "8.12.2", + "@typescript-eslint/types": "8.12.2", + "@typescript-eslint/typescript-estree": "8.12.2" }, "engines": { - "node": "^18.18.0 || >=20.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "eslint": "^8.56.0" - } - }, - "node_modules/@typescript-eslint/utils/node_modules/lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "dev": true, - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/@typescript-eslint/utils/node_modules/semver": { - "version": "7.6.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.0.tgz", - "integrity": "sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==", - "dev": true, - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" + "eslint": "^8.57.0 || ^9.0.0" } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "7.7.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.7.0.tgz", - "integrity": "sha512-h0WHOj8MhdhY8YWkzIF30R379y0NqyOHExI9N9KCzvmu05EgG4FumeYa3ccfKUSphyWkWQE1ybVrgz/Pbam6YA==", + "version": "8.12.2", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.12.2.tgz", + "integrity": "sha512-PChz8UaKQAVNHghsHcPyx1OMHoFRUEA7rJSK/mDhdq85bk+PLsUHUBqTQTFt18VJZbmxBovM65fezlheQRsSDA==", "dev": true, + "license": "MIT", "dependencies": { - "@typescript-eslint/types": "7.7.0", + "@typescript-eslint/types": "8.12.2", "eslint-visitor-keys": "^3.4.3" }, "engines": { - "node": "^18.18.0 || >=20.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "type": "opencollective", @@ -5150,12 +5060,14 @@ "version": "1.2.0", "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.2.0.tgz", "integrity": "sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==", - "dev": true + "dev": true, + "license": "ISC" }, "node_modules/abort-controller": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/abort-controller/-/abort-controller-3.0.0.tgz", "integrity": "sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==", + "license": "MIT", "peer": true, "dependencies": { "event-target-shim": "^5.0.0" @@ -5168,6 +5080,7 @@ "version": "1.3.8", "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==", + "license": "MIT", "dependencies": { "mime-types": "~2.1.34", "negotiator": "0.6.3" @@ -5177,9 +5090,10 @@ } }, "node_modules/acorn": { - "version": "8.11.3", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.3.tgz", - "integrity": "sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==", + "version": "8.14.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.14.0.tgz", + "integrity": "sha512-cl669nCJTZBsL97OF4kUQm5g5hC2uihk0NxY3WENAC0TYdILVkAyHymAntgxGkl7K+t0cXIrH5siy5S4XkFycA==", + "license": "MIT", "bin": { "acorn": "bin/acorn" }, @@ -5192,15 +5106,20 @@ "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", "dev": true, + "license": "MIT", "peerDependencies": { "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" } }, "node_modules/acorn-walk": { - "version": "8.3.2", - "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.2.tgz", - "integrity": "sha512-cjkyv4OtNCIeqhHrfS81QWXoCBPExR/J62oyEqepVw8WaQeSqpW2uhuLPh1m9eWhDuOo/jUXVTlifvesOWp/4A==", + "version": "8.3.4", + "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.4.tgz", + "integrity": "sha512-ueEepnujpqee2o5aIYnvHU6C0A42MNdsIDeqy5BydrkuC5R1ZuUFnm27EeFJGoEHJQgn3uleRvmTXaJgfXbt4g==", "dev": true, + "license": "MIT", + "dependencies": { + "acorn": "^8.11.0" + }, "engines": { "node": ">=0.4.0" } @@ -5209,6 +5128,7 @@ "version": "7.1.1", "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.1.tgz", "integrity": "sha512-H0TSyFNDMomMNJQBn8wFV5YC/2eJ+VXECwOadZJT554xP6cODZHPX3H9QMQECxvrgiSOP1pHjy1sMWQVYJOUOA==", + "license": "MIT", "dependencies": { "debug": "^4.3.4" }, @@ -5217,9 +5137,10 @@ } }, "node_modules/agentkeepalive": { - "version": "3.5.2", - "resolved": "https://registry.npmjs.org/agentkeepalive/-/agentkeepalive-3.5.2.tgz", - "integrity": "sha512-e0L/HNe6qkQ7H19kTlRRqUibEAwDK5AFk6y3PtMsuut2VAH6+Q4xZml1tNDJD7kSAyqmbG/K08K5WEJYtUrSlQ==", + "version": "3.5.3", + "resolved": "https://registry.npmjs.org/agentkeepalive/-/agentkeepalive-3.5.3.tgz", + "integrity": "sha512-yqXL+k5rr8+ZRpOAntkaaRgWgE5o8ESAj5DyRmVTCSoZxXmqemb9Dd7T4i5UzwuERdLAJUy6XzR9zFVuf0kzkw==", + "license": "MIT", "dependencies": { "humanize-ms": "^1.2.1" }, @@ -5232,6 +5153,7 @@ "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", "dev": true, + "license": "MIT", "dependencies": { "fast-deep-equal": "^3.1.1", "fast-json-stable-stringify": "^2.0.0", @@ -5247,6 +5169,7 @@ "version": "1.4.10", "resolved": "https://registry.npmjs.org/anser/-/anser-1.4.10.tgz", "integrity": "sha512-hCv9AqTQ8ycjpSd3upOJd7vFwW1JaoYQ7tpham03GJ1ca8/65rqn0RpaWpItOAd6ylW9wAw6luXYPJIyPFVOww==", + "license": "MIT", "peer": true }, "node_modules/ansi-colors": { @@ -5254,47 +5177,30 @@ "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/ansi-fragments": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/ansi-fragments/-/ansi-fragments-0.2.1.tgz", - "integrity": "sha512-DykbNHxuXQwUDRv5ibc2b0x7uw7wmwOGLBUd5RmaQ5z8Lhx19vwvKV+FAsM5rEA6dEcHxX+/Ad5s9eF2k2bB+w==", - "peer": true, - "dependencies": { - "colorette": "^1.0.7", - "slice-ansi": "^2.0.0", - "strip-ansi": "^5.0.0" - } - }, - "node_modules/ansi-fragments/node_modules/strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", - "peer": true, - "dependencies": { - "ansi-regex": "^4.1.0" - }, + "license": "MIT", "engines": { "node": ">=6" } }, "node_modules/ansi-regex": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.1.tgz", - "integrity": "sha512-ILlv4k/3f6vfQ4OoP2AGvirOktlQ98ZEL1k9FaQjxa3L1abBgbuTDAdPOpvbGncC0BTVQrl+OM8xZGK6tWXt7g==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "license": "MIT", "engines": { - "node": ">=6" + "node": ">=8" } }, "node_modules/ansi-styles": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", - "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, "engines": { - "node": ">=10" + "node": ">=8" }, "funding": { "url": "https://github.com/chalk/ansi-styles?sponsor=1" @@ -5304,12 +5210,15 @@ "version": "1.3.0", "resolved": "https://registry.npmjs.org/any-promise/-/any-promise-1.3.0.tgz", "integrity": "sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A==", - "dev": true + "dev": true, + "license": "MIT", + "peer": true }, "node_modules/anymatch": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", + "license": "ISC", "dependencies": { "normalize-path": "^3.0.0", "picomatch": "^2.0.4" @@ -5318,22 +5227,30 @@ "node": ">= 8" } }, - "node_modules/appdirsjs": { - "version": "1.2.7", - "resolved": "https://registry.npmjs.org/appdirsjs/-/appdirsjs-1.2.7.tgz", - "integrity": "sha512-Quji6+8kLBC3NnBeo14nPDq0+2jUs5s3/xEye+udFHumHhRk4M7aAMXp/PBJqkKYGuuyR9M/6Dq7d2AViiGmhw==", - "peer": true + "node_modules/anymatch/node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "license": "MIT", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } }, "node_modules/arg": { "version": "4.1.3", "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/argparse": { "version": "1.0.10", "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "license": "MIT", "dependencies": { "sprintf-js": "~1.0.2" } @@ -5342,22 +5259,15 @@ "version": "2.1.1", "resolved": "https://registry.npmjs.org/array-from/-/array-from-2.1.1.tgz", "integrity": "sha512-GQTc6Uupx1FCavi5mPzBvVT7nEOeWMmUA9P95wpfpW1XwMSKs+KaymD5C2Up7KAUKg/mYwbsUYzdZWcoajlNZg==", - "dev": true - }, - "node_modules/array-union": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", - "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", "dev": true, - "engines": { - "node": ">=8" - } + "license": "MIT" }, "node_modules/arrify": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", "integrity": "sha512-3CYzex9M9FGQjCGMGyi6/31c8GJbgb0qGyrx5HWxPd0aCwh4cB2YjMb2Xf9UuoogrMrlO9cTqnB5rI5GHZTcUA==", "dev": true, + "license": "MIT", "engines": { "node": ">=0.10.0" } @@ -5366,23 +5276,15 @@ "version": "2.0.6", "resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz", "integrity": "sha512-BSHWgDSAiKs50o2Re8ppvp3seVHXSRM44cdSsT9FfNEUUZLOGWVCsiWaRPWM1Znn+mqZ1OfVZ3z3DWEzSp7hRA==", + "license": "MIT", "peer": true }, - "node_modules/assert-plus": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha512-NfJ4UzBCcQGLDlQq7nHxH+tv3kyZ0hHQqF5BO6J7tNJeP5do1llPr8dZ8zHonfhAu0PHAdMkSo+8o0wxg9lZWw==", - "dev": true, - "peer": true, - "engines": { - "node": ">=0.8" - } - }, "node_modules/assertion-error": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz", "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==", "dev": true, + "license": "MIT", "engines": { "node": "*" } @@ -5392,16 +5294,30 @@ "resolved": "https://registry.npmjs.org/assertion-error-formatter/-/assertion-error-formatter-3.0.0.tgz", "integrity": "sha512-6YyAVLrEze0kQ7CmJfUgrLHb+Y7XghmL2Ie7ijVa2Y9ynP3LV+VDiwFk62Dn0qtqbmY0BT0ss6p1xxpiF2PYbQ==", "dev": true, + "license": "MIT", + "peer": true, "dependencies": { "diff": "^4.0.1", "pad-right": "^0.2.2", "repeat-string": "^1.6.1" } }, + "node_modules/assertion-error-formatter/node_modules/diff": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", + "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", + "dev": true, + "license": "BSD-3-Clause", + "peer": true, + "engines": { + "node": ">=0.3.1" + } + }, "node_modules/ast-types": { "version": "0.13.4", "resolved": "https://registry.npmjs.org/ast-types/-/ast-types-0.13.4.tgz", "integrity": "sha512-x1FCFnFifvYDDzTaLII71vG5uvDwgtmDTEVWAxrgeiR8VjMONcCXJx7E+USjDtHlwFmt9MysbqgF9b9Vjr6w+w==", + "license": "MIT", "dependencies": { "tslib": "^2.0.1" }, @@ -5409,43 +5325,93 @@ "node": ">=4" } }, - "node_modules/astral-regex": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-1.0.0.tgz", - "integrity": "sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg==", - "peer": true, - "engines": { - "node": ">=4" - } - }, "node_modules/async-limiter": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/async-limiter/-/async-limiter-1.0.1.tgz", "integrity": "sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ==", + "license": "MIT", "peer": true }, "node_modules/asynckit": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", + "license": "MIT" }, "node_modules/babel-core": { "version": "7.0.0-bridge.0", "resolved": "https://registry.npmjs.org/babel-core/-/babel-core-7.0.0-bridge.0.tgz", "integrity": "sha512-poPX9mZH/5CSanm50Q+1toVci6pv5KSRv/5TWCwtzQS5XEwn40BcCrgIeMFWP9CKKIniKXNxoIOnOq4VVlGXhg==", + "license": "MIT", + "peer": true, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/babel-jest": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-29.7.0.tgz", + "integrity": "sha512-BrvGY3xZSwEcCzKvKsCi2GgHqDqsYkOP4/by5xCgIwGXQxIEh+8ew3gmrE1y7XRR6LHZIj6yLYnUi/mm2KXKBg==", + "license": "MIT", + "peer": true, + "dependencies": { + "@jest/transform": "^29.7.0", + "@types/babel__core": "^7.1.14", + "babel-plugin-istanbul": "^6.1.1", + "babel-preset-jest": "^29.6.3", + "chalk": "^4.0.0", + "graceful-fs": "^4.2.9", + "slash": "^3.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "@babel/core": "^7.8.0" + } + }, + "node_modules/babel-plugin-istanbul": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/babel-plugin-istanbul/-/babel-plugin-istanbul-6.1.1.tgz", + "integrity": "sha512-Y1IQok9821cC9onCx5otgFfRm7Lm+I+wwxOx738M/WLPZ9Q42m4IG5W0FNX8WLL2gYMZo3JkuXIH2DOpWM+qwA==", + "license": "BSD-3-Clause", + "peer": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.0.0", + "@istanbuljs/load-nyc-config": "^1.0.0", + "@istanbuljs/schema": "^0.1.2", + "istanbul-lib-instrument": "^5.0.4", + "test-exclude": "^6.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/babel-plugin-jest-hoist": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-29.6.3.tgz", + "integrity": "sha512-ESAc/RJvGTFEzRwOTT4+lNDk/GNHMkKbNzsvT0qKRfDyyYTskxB5rnU2njIDYVxXCBHHEI1c0YwHob3WaYujOg==", + "license": "MIT", "peer": true, - "peerDependencies": { - "@babel/core": "^7.0.0-0" + "dependencies": { + "@babel/template": "^7.3.3", + "@babel/types": "^7.3.3", + "@types/babel__core": "^7.1.14", + "@types/babel__traverse": "^7.0.6" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/babel-plugin-polyfill-corejs2": { - "version": "0.4.10", - "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.4.10.tgz", - "integrity": "sha512-rpIuu//y5OX6jVU+a5BCn1R5RSZYWAl2Nar76iwaOdycqb6JPxediskWFMMl7stfwNJR4b7eiQvh5fB5TEQJTQ==", + "version": "0.4.11", + "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.4.11.tgz", + "integrity": "sha512-sMEJ27L0gRHShOh5G54uAAPaiCOygY/5ratXuiyb2G46FmlSpc9eFCzYVyDiPxfNbwzA7mYahmjQc5q+CZQ09Q==", + "license": "MIT", "peer": true, "dependencies": { "@babel/compat-data": "^7.22.6", - "@babel/helper-define-polyfill-provider": "^0.6.1", + "@babel/helper-define-polyfill-provider": "^0.6.2", "semver": "^6.3.1" }, "peerDependencies": { @@ -5456,49 +5422,108 @@ "version": "6.3.1", "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "license": "ISC", "peer": true, "bin": { "semver": "bin/semver.js" } }, "node_modules/babel-plugin-polyfill-corejs3": { - "version": "0.10.4", - "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.10.4.tgz", - "integrity": "sha512-25J6I8NGfa5YkCDogHRID3fVCadIR8/pGl1/spvCkzb6lVn6SR3ojpx9nOn9iEBcUsjY24AmdKm5khcfKdylcg==", + "version": "0.10.6", + "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.10.6.tgz", + "integrity": "sha512-b37+KR2i/khY5sKmWNVQAnitvquQbNdWy6lJdsr0kmquCKEEUgMKK4SboVM3HtfnZilfjr4MMQ7vY58FVWDtIA==", + "license": "MIT", "peer": true, "dependencies": { - "@babel/helper-define-polyfill-provider": "^0.6.1", - "core-js-compat": "^3.36.1" + "@babel/helper-define-polyfill-provider": "^0.6.2", + "core-js-compat": "^3.38.0" }, "peerDependencies": { "@babel/core": "^7.4.0 || ^8.0.0-0 <8.0.0" } }, "node_modules/babel-plugin-polyfill-regenerator": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-regenerator/-/babel-plugin-polyfill-regenerator-0.6.1.tgz", - "integrity": "sha512-JfTApdE++cgcTWjsiCQlLyFBMbTUft9ja17saCc93lgV33h4tuCVj7tlvu//qpLwaG+3yEz7/KhahGrUMkVq9g==", + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-regenerator/-/babel-plugin-polyfill-regenerator-0.6.2.tgz", + "integrity": "sha512-2R25rQZWP63nGwaAswvDazbPXfrM3HwVoBXK6HcqeKrSrL/JqcC/rDcf95l4r7LXLyxDXc8uQDa064GubtCABg==", + "license": "MIT", "peer": true, "dependencies": { - "@babel/helper-define-polyfill-provider": "^0.6.1" + "@babel/helper-define-polyfill-provider": "^0.6.2" }, "peerDependencies": { "@babel/core": "^7.4.0 || ^8.0.0-0 <8.0.0" } }, + "node_modules/babel-plugin-syntax-hermes-parser": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/babel-plugin-syntax-hermes-parser/-/babel-plugin-syntax-hermes-parser-0.23.1.tgz", + "integrity": "sha512-uNLD0tk2tLUjGFdmCk+u/3FEw2o+BAwW4g+z2QVlxJrzZYOOPADroEcNtTPt5lNiScctaUmnsTkVEnOwZUOLhA==", + "license": "MIT", + "peer": true, + "dependencies": { + "hermes-parser": "0.23.1" + } + }, "node_modules/babel-plugin-transform-flow-enums": { "version": "0.0.2", "resolved": "https://registry.npmjs.org/babel-plugin-transform-flow-enums/-/babel-plugin-transform-flow-enums-0.0.2.tgz", "integrity": "sha512-g4aaCrDDOsWjbm0PUUeVnkcVd6AKJsVc/MbnPhEotEpkeJQP6b8nzewohQi7+QS8UyPehOhGWn0nOwjvWpmMvQ==", + "license": "MIT", "peer": true, "dependencies": { "@babel/plugin-syntax-flow": "^7.12.1" } }, + "node_modules/babel-preset-current-node-syntax": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.1.0.tgz", + "integrity": "sha512-ldYss8SbBlWva1bs28q78Ju5Zq1F+8BrqBZZ0VFhLBvhh6lCpC2o3gDJi/5DRLs9FgYZCnmPYIVFU4lRXCkyUw==", + "license": "MIT", + "peer": true, + "dependencies": { + "@babel/plugin-syntax-async-generators": "^7.8.4", + "@babel/plugin-syntax-bigint": "^7.8.3", + "@babel/plugin-syntax-class-properties": "^7.12.13", + "@babel/plugin-syntax-class-static-block": "^7.14.5", + "@babel/plugin-syntax-import-attributes": "^7.24.7", + "@babel/plugin-syntax-import-meta": "^7.10.4", + "@babel/plugin-syntax-json-strings": "^7.8.3", + "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4", + "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3", + "@babel/plugin-syntax-numeric-separator": "^7.10.4", + "@babel/plugin-syntax-object-rest-spread": "^7.8.3", + "@babel/plugin-syntax-optional-catch-binding": "^7.8.3", + "@babel/plugin-syntax-optional-chaining": "^7.8.3", + "@babel/plugin-syntax-private-property-in-object": "^7.14.5", + "@babel/plugin-syntax-top-level-await": "^7.14.5" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/babel-preset-jest": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-29.6.3.tgz", + "integrity": "sha512-0B3bhxR6snWXJZtR/RliHTDPRgn1sNHOR0yVtq/IiQFyuOVjFS+wuio/R4gSNkyYmKmJB4wGZv2NZanmKmTnNA==", + "license": "MIT", + "peer": true, + "dependencies": { + "babel-plugin-jest-hoist": "^29.6.3", + "babel-preset-current-node-syntax": "^1.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, "node_modules/balanced-match": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "license": "MIT" }, "node_modules/base64-js": { "version": "1.5.1", @@ -5517,13 +5542,15 @@ "type": "consulting", "url": "https://feross.org/support" } - ] + ], + "license": "MIT" }, "node_modules/base64id": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/base64id/-/base64id-2.0.0.tgz", "integrity": "sha512-lGe34o6EHj9y3Kts9R4ZYs/Gr+6N7MCaMlIFA3F1R2O5/m7K06AxfSeO5530PEERE6/WyEg3lsuyw4GHlPZHog==", "dev": true, + "license": "MIT", "engines": { "node": "^4.5.0 || >= 5.9" } @@ -5532,22 +5559,17 @@ "version": "5.0.5", "resolved": "https://registry.npmjs.org/basic-ftp/-/basic-ftp-5.0.5.tgz", "integrity": "sha512-4Bcg1P8xhUuqcii/S0Z9wiHIrQVPMermM1any+MX5GeGD7faD3/msQUDGLol9wOcz4/jbg/WJnGqoJF6LiBdtg==", + "license": "MIT", "engines": { "node": ">=10.0.0" } }, - "node_modules/becke-ch--regex--s0-0-v1--base--pl--lib": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/becke-ch--regex--s0-0-v1--base--pl--lib/-/becke-ch--regex--s0-0-v1--base--pl--lib-1.4.0.tgz", - "integrity": "sha512-FnWonOyaw7Vivg5nIkrUll9HSS5TjFbyuURAiDssuL6VxrBe3ERzudRxOcWRhZYlP89UArMDikz7SapRPQpmZQ==", - "dev": true, - "peer": true - }, "node_modules/binary-extensions": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz", "integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" }, @@ -5555,67 +5577,12 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/bl": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", - "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==", - "peer": true, - "dependencies": { - "buffer": "^5.5.0", - "inherits": "^2.0.4", - "readable-stream": "^3.4.0" - } - }, - "node_modules/bl/node_modules/buffer": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", - "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "peer": true, - "dependencies": { - "base64-js": "^1.3.1", - "ieee754": "^1.1.13" - } - }, - "node_modules/bl/node_modules/readable-stream": { - "version": "3.6.2", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", - "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", - "peer": true, - "dependencies": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/bluebird": { - "version": "3.7.2", - "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz", - "integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==", - "dev": true, - "peer": true - }, "node_modules/body-parser": { "version": "1.20.3", "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.3.tgz", "integrity": "sha512-7rAxByjUMqQ3/bHJy7D6OGXvx/MMc4IqBn/X0fcM1QUcAItpZrBEYhWGem+tzXH90c+G01ypMcYJBO9Y30203g==", "dev": true, + "license": "MIT", "dependencies": { "bytes": "3.1.2", "content-type": "~1.0.5", @@ -5625,7 +5592,7 @@ "http-errors": "2.0.0", "iconv-lite": "0.4.24", "on-finished": "2.4.1", - "qs": "6.11.0", + "qs": "6.13.0", "raw-body": "2.5.2", "type-is": "~1.6.18", "unpipe": "1.0.0" @@ -5640,6 +5607,7 @@ "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", "dev": true, + "license": "MIT", "dependencies": { "ms": "2.0.0" } @@ -5648,29 +5616,15 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", - "dev": true - }, - "node_modules/body-parser/node_modules/qs": { - "version": "6.11.0", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz", - "integrity": "sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==", "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "side-channel": "^1.0.4" - }, - "engines": { - "node": ">=0.6" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } + "license": "MIT" }, "node_modules/brace-expansion": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", "dev": true, + "license": "MIT", "dependencies": { "balanced-match": "^1.0.0" } @@ -5679,6 +5633,7 @@ "version": "3.0.3", "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", + "license": "MIT", "dependencies": { "fill-range": "^7.1.1" }, @@ -5690,12 +5645,13 @@ "version": "1.3.1", "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", - "dev": true + "dev": true, + "license": "ISC" }, "node_modules/browserslist": { - "version": "4.23.0", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.23.0.tgz", - "integrity": "sha512-QW8HiM1shhT2GuzkvklfjcKDiWFXHOeFCIA/huJPwHsslwcydgk7X+z2zXpEijP98UCY7HbubZt5J2Zgvf0CaQ==", + "version": "4.24.2", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.24.2.tgz", + "integrity": "sha512-ZIc+Q62revdMcqC6aChtW4jz3My3klmCO1fEmINZY/8J3EpBg5/A/D0AKmBveUh6pgoeycoMkVMko84tuYS+Gg==", "funding": [ { "type": "opencollective", @@ -5710,12 +5666,13 @@ "url": "https://github.com/sponsors/ai" } ], + "license": "MIT", "peer": true, "dependencies": { - "caniuse-lite": "^1.0.30001587", - "electron-to-chromium": "^1.4.668", - "node-releases": "^2.0.14", - "update-browserslist-db": "^1.0.13" + "caniuse-lite": "^1.0.30001669", + "electron-to-chromium": "^1.5.41", + "node-releases": "^2.0.18", + "update-browserslist-db": "^1.1.1" }, "bin": { "browserslist": "cli.js" @@ -5728,6 +5685,7 @@ "version": "2.1.1", "resolved": "https://registry.npmjs.org/bser/-/bser-2.1.1.tgz", "integrity": "sha512-gQxTNE/GAfIIrmHLUE3oJyp5FO6HRBfhjnw4/wMmA63ZGDJnWBmgY/lyQBpnDUkGmAhbSe39tx2d/iTOAfglwQ==", + "license": "Apache-2.0", "peer": true, "dependencies": { "node-int64": "^0.4.0" @@ -5751,6 +5709,7 @@ "url": "https://feross.org/support" } ], + "license": "MIT", "dependencies": { "base64-js": "^1.3.1", "ieee754": "^1.2.1" @@ -5759,25 +5718,15 @@ "node_modules/buffer-from": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", - "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==" - }, - "node_modules/builtin-modules": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-3.3.0.tgz", - "integrity": "sha512-zhaCDicdLuWN5UbN5IMnFqNMhNfo919sH85y2/ea+5Yg9TsTkeZxpL+JLbp6cgYFS4sRLp3YV4S6yDuqVWHYOw==", - "dev": true, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } + "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", + "license": "MIT" }, "node_modules/bytes": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", "dev": true, + "license": "MIT", "engines": { "node": ">= 0.8" } @@ -5787,6 +5736,7 @@ "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.7.tgz", "integrity": "sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==", "dev": true, + "license": "MIT", "dependencies": { "es-define-property": "^1.0.0", "es-errors": "^1.3.0", @@ -5805,6 +5755,7 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/caller-callsite/-/caller-callsite-2.0.0.tgz", "integrity": "sha512-JuG3qI4QOftFsZyOn1qq87fq5grLIyk1JYd5lJmdA+fG7aQ9pA/i3JIJGcO3q0MrRcHlOt1U+ZeHW8Dq9axALQ==", + "license": "MIT", "peer": true, "dependencies": { "callsites": "^2.0.0" @@ -5817,6 +5768,7 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/callsites/-/callsites-2.0.0.tgz", "integrity": "sha512-ksWePWBloaWPxJYQ8TL0JHvtci6G5QTKwQ95RcWAa/lzoAKuAOflGdAK92hpHXjkwb8zLxoLNUoNYZgVsaJzvQ==", + "license": "MIT", "peer": true, "engines": { "node": ">=4" @@ -5826,6 +5778,7 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/caller-path/-/caller-path-2.0.0.tgz", "integrity": "sha512-MCL3sf6nCSXOwCTzvPKhN18TU7AHTvdtam8DAogxcrJ8Rjfbbg7Lgng64H9Iy+vUV6VGFClN/TyxBkAebLRR4A==", + "license": "MIT", "peer": true, "dependencies": { "caller-callsite": "^2.0.0" @@ -5839,25 +5792,25 @@ "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=6" } }, "node_modules/camelcase": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", - "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", + "license": "MIT", + "peer": true, "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": ">=6" } }, "node_modules/caniuse-lite": { - "version": "1.0.30001611", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001611.tgz", - "integrity": "sha512-19NuN1/3PjA3QI8Eki55N8my4LzfkMCRLgCVfrl/slbSAchQfV0+GwjPrK3rq37As4UCLlM/DHajbKkAqbv92Q==", + "version": "1.0.30001676", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001676.tgz", + "integrity": "sha512-Qz6zwGCiPghQXGJvgQAem79esjitvJ+CxSbSQkW9H/UX5hg8XM88d4lp2W+MEQ81j+Hip58Il+jGVdazk1z9cw==", "funding": [ { "type": "opencollective", @@ -5872,6 +5825,7 @@ "url": "https://github.com/sponsors/ai" } ], + "license": "CC-BY-4.0", "peer": true }, "node_modules/capital-case": { @@ -5879,6 +5833,8 @@ "resolved": "https://registry.npmjs.org/capital-case/-/capital-case-1.0.4.tgz", "integrity": "sha512-ds37W8CytHgwnhGGTi88pcPyR15qoNkOpYwmMMfnWqqWgESapLqvDx6huFjQ5vqWSn2Z06173XNA7LtMOeUh1A==", "dev": true, + "license": "MIT", + "peer": true, "dependencies": { "no-case": "^3.0.4", "tslib": "^2.0.3", @@ -5888,18 +5844,21 @@ "node_modules/cbor-js": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/cbor-js/-/cbor-js-0.1.0.tgz", - "integrity": "sha512-7sQ/TvDZPl7csT1Sif9G0+MA0I0JOVah8+wWlJVQdVEgIbCzlN/ab3x+uvMNsc34TUvO6osQTAmB2ls80JX6tw==" + "integrity": "sha512-7sQ/TvDZPl7csT1Sif9G0+MA0I0JOVah8+wWlJVQdVEgIbCzlN/ab3x+uvMNsc34TUvO6osQTAmB2ls80JX6tw==", + "license": "MIT" }, "node_modules/cbor-sync": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/cbor-sync/-/cbor-sync-1.0.4.tgz", - "integrity": "sha512-GWlXN4wiz0vdWWXBU71Dvc1q3aBo0HytqwAZnXF1wOwjqNnDWA1vZ1gDMFLlqohak31VQzmhiYfiCX5QSSfagA==" + "integrity": "sha512-GWlXN4wiz0vdWWXBU71Dvc1q3aBo0HytqwAZnXF1wOwjqNnDWA1vZ1gDMFLlqohak31VQzmhiYfiCX5QSSfagA==", + "license": "MIT" }, "node_modules/chai": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/chai/-/chai-4.4.1.tgz", - "integrity": "sha512-13sOfMv2+DWduEU+/xbun3LScLoqN17nBeTLUsmDfKdoiC1fr0n9PU4guu4AhRcOVFk/sW8LyZWHuhWtQZiF+g==", + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/chai/-/chai-4.5.0.tgz", + "integrity": "sha512-RITGBfijLkBddZvnn8jdqoTypxvqbOLYQkGGxXzeFjVHvudaPw0HNFD9x928/eUwYWd2dPCugVqspGALTZZQKw==", "dev": true, + "license": "MIT", "dependencies": { "assertion-error": "^1.1.0", "check-error": "^1.0.3", @@ -5907,22 +5866,23 @@ "get-func-name": "^2.0.2", "loupe": "^2.3.6", "pathval": "^1.1.1", - "type-detect": "^4.0.8" + "type-detect": "^4.1.0" }, "engines": { "node": ">=4" } }, "node_modules/chai-as-promised": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/chai-as-promised/-/chai-as-promised-7.1.1.tgz", - "integrity": "sha512-azL6xMoi+uxu6z4rhWQ1jbdUhOMhis2PvscD/xjLqNMkv3BPPp2JyyuTHOrf9BOosGpNQ11v6BKv/g57RXbiaA==", + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/chai-as-promised/-/chai-as-promised-7.1.2.tgz", + "integrity": "sha512-aBDHZxRzYnUYuIAIPBH2s511DjlKPzXNlXSGFC8CwmroWQLfrW0LtE1nK3MAwwNhJPa9raEjNCmRoFpG0Hurdw==", "dev": true, + "license": "WTFPL", "dependencies": { "check-error": "^1.0.2" }, "peerDependencies": { - "chai": ">= 2.1.2 < 5" + "chai": ">= 2.1.2 < 6" } }, "node_modules/chai-nock": { @@ -5930,6 +5890,7 @@ "resolved": "https://registry.npmjs.org/chai-nock/-/chai-nock-1.3.0.tgz", "integrity": "sha512-O3j1bW3ACoUu/sLGYSoX50c1p8dbTkCjw3/dereqzl9BL2XsQAUVC18sJpg3hVwpCk71rjWGumCmHy87t5W+Pg==", "dev": true, + "license": "MIT", "dependencies": { "chai": "^4.2.0", "deep-equal": "^1.0.1" @@ -5939,6 +5900,7 @@ "version": "4.1.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "license": "MIT", "dependencies": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" @@ -5950,52 +5912,12 @@ "url": "https://github.com/chalk/chalk?sponsor=1" } }, - "node_modules/chalk/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/chalk/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/chalk/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" - }, - "node_modules/chalk/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/check-error": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.3.tgz", "integrity": "sha512-iKEoDYaRmd1mxM90a2OEfWhjsjPpYPuQ+lMYsoxB126+t8fw7ySEO48nmDg5COTjxDI65/Y2OWpeEHk3ZOe8zg==", "dev": true, + "license": "MIT", "dependencies": { "get-func-name": "^2.0.2" }, @@ -6008,9 +5930,10 @@ "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz", "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==", "dev": true, + "license": "MIT", "dependencies": { "anymatch": "~3.1.2", - "braces": "~3.0.3", + "braces": "~3.0.2", "glob-parent": "~5.1.2", "is-binary-path": "~2.1.0", "is-glob": "~4.0.1", @@ -6032,6 +5955,7 @@ "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", "dev": true, + "license": "ISC", "dependencies": { "is-glob": "^4.0.1" }, @@ -6043,6 +5967,7 @@ "version": "0.15.2", "resolved": "https://registry.npmjs.org/chrome-launcher/-/chrome-launcher-0.15.2.tgz", "integrity": "sha512-zdLEwNo3aUVzIhKhTtXfxhdvZhUghrnmkvcAq2NoDd+LeOHKf03H5jwZ8T/STsAlzyALkBVK552iaG1fGf1xVQ==", + "license": "Apache-2.0", "peer": true, "dependencies": { "@types/node": "*", @@ -6057,22 +5982,11 @@ "node": ">=12.13.0" } }, - "node_modules/chrome-launcher/node_modules/escape-string-regexp": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", - "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", - "peer": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/chromium-edge-launcher": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/chromium-edge-launcher/-/chromium-edge-launcher-1.0.0.tgz", - "integrity": "sha512-pgtgjNKZ7i5U++1g1PWv75umkHvhVTDOQIZ+sjeUX9483S7Y6MUvO0lrd7ShGlQlFHMN4SwKTCq/X8hWrbv2KA==", + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/chromium-edge-launcher/-/chromium-edge-launcher-0.2.0.tgz", + "integrity": "sha512-JfJjUnq25y9yg4FABRRVPmBGWPZZi+AQXT4mxupb67766/0UlhG8PAZCz6xzEMXTbW3CsSoE8PcCWA49n35mKg==", + "license": "Apache-2.0", "peer": true, "dependencies": { "@types/node": "*", @@ -6083,22 +5997,11 @@ "rimraf": "^3.0.2" } }, - "node_modules/chromium-edge-launcher/node_modules/escape-string-regexp": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", - "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", - "peer": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/chromium-edge-launcher/node_modules/mkdirp": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", + "license": "MIT", "peer": true, "bin": { "mkdirp": "bin/cmd.js" @@ -6117,129 +6020,53 @@ "url": "https://github.com/sponsors/sibiraj-s" } ], + "license": "MIT", "engines": { "node": ">=8" } }, - "node_modules/class-transformer": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/class-transformer/-/class-transformer-0.5.1.tgz", - "integrity": "sha512-SQa1Ws6hUbfC98vKGxZH3KFY0Y1lm5Zm0SY8XX9zbK7FJCyVEac3ATW0RIpwzW+oOfmHE5PMPufDG9hCfoEOMw==", - "dev": true - }, - "node_modules/cli-cursor": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz", - "integrity": "sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==", - "peer": true, - "dependencies": { - "restore-cursor": "^3.1.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/cli-spinners": { - "version": "2.9.2", - "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.9.2.tgz", - "integrity": "sha512-ywqV+5MmyL4E7ybXgKys4DugZbX0FC6LnwrhjuykIjnK9k8OQacQ7axGKnjDXWNhns0xot3bZI5h55H8yo9cJg==", - "peer": true, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/cli-table3": { - "version": "0.6.3", - "resolved": "https://registry.npmjs.org/cli-table3/-/cli-table3-0.6.3.tgz", - "integrity": "sha512-w5Jac5SykAeZJKntOxJCrm63Eg5/4dhMWIcuTbo9rpE+brgaSZo0RuNJZeOyMgsUdhDeojvgyQLmjI+K50ZGyg==", - "dev": true, - "dependencies": { - "string-width": "^4.2.0" - }, - "engines": { - "node": "10.* || >= 12.*" - }, - "optionalDependencies": { - "@colors/colors": "1.5.0" - } - }, - "node_modules/cliui": { - "version": "7.0.4", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", - "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", - "dev": true, - "dependencies": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", - "wrap-ansi": "^7.0.0" - } - }, - "node_modules/cliui/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/cliui/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/cliui/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true + "node_modules/class-transformer": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/class-transformer/-/class-transformer-0.5.1.tgz", + "integrity": "sha512-SQa1Ws6hUbfC98vKGxZH3KFY0Y1lm5Zm0SY8XX9zbK7FJCyVEac3ATW0RIpwzW+oOfmHE5PMPufDG9hCfoEOMw==", + "dev": true, + "license": "MIT", + "peer": true }, - "node_modules/cliui/node_modules/wrap-ansi": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", - "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "node_modules/cli-table3": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/cli-table3/-/cli-table3-0.6.3.tgz", + "integrity": "sha512-w5Jac5SykAeZJKntOxJCrm63Eg5/4dhMWIcuTbo9rpE+brgaSZo0RuNJZeOyMgsUdhDeojvgyQLmjI+K50ZGyg==", "dev": true, + "license": "MIT", + "peer": true, "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" + "string-width": "^4.2.0" }, "engines": { - "node": ">=10" + "node": "10.* || >= 12.*" }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + "optionalDependencies": { + "@colors/colors": "1.5.0" } }, - "node_modules/clone": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz", - "integrity": "sha512-JQHZ2QMW6l3aH/j6xCqQThY/9OH4D/9ls34cgkUBiEeocRTU04tHfKPBsUK1PqZCUQM7GiA0IIXJSuXHI64Kbg==", - "peer": true, - "engines": { - "node": ">=0.8" + "node_modules/cliui": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", + "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", + "dev": true, + "license": "ISC", + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^7.0.0" } }, "node_modules/clone-deep": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/clone-deep/-/clone-deep-4.0.1.tgz", "integrity": "sha512-neHB9xuzh/wk0dIHweyAXv2aPGZIVk3pLMe+/RNzINf17fe0OG96QroktYAUm7SM1PBnzTabaLboqqxDyMU+SQ==", + "license": "MIT", "peer": true, "dependencies": { "is-plain-object": "^2.0.4", @@ -6251,29 +6078,29 @@ } }, "node_modules/color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "license": "MIT", "dependencies": { - "color-name": "1.1.3" + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" } }, "node_modules/color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==" - }, - "node_modules/colorette": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/colorette/-/colorette-1.4.0.tgz", - "integrity": "sha512-Y2oEozpomLn7Q3HFP7dpww7AtMJplbM9lGZP6RDfHqmbeRjiwRg4n6VM6j4KLmRke85uWEI7JqF17f3pqdRA0g==", - "peer": true + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "license": "MIT" }, "node_modules/colors": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/colors/-/colors-1.4.0.tgz", "integrity": "sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA==", "dev": true, + "license": "MIT", "engines": { "node": ">=0.1.90" } @@ -6282,6 +6109,7 @@ "version": "1.0.8", "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "license": "MIT", "dependencies": { "delayed-stream": "~1.0.0" }, @@ -6289,89 +6117,32 @@ "node": ">= 0.8" } }, - "node_modules/command-exists": { - "version": "1.2.9", - "resolved": "https://registry.npmjs.org/command-exists/-/command-exists-1.2.9.tgz", - "integrity": "sha512-LTQ/SGc+s0Xc0Fu5WaKnR0YiygZkm9eKFvyS+fRsU7/ZWFF8ykFM6Pc9aCVf1+xasOOZpO3BAVgVrKvsqKHV7w==", - "peer": true - }, "node_modules/commander": { - "version": "10.0.1", - "resolved": "https://registry.npmjs.org/commander/-/commander-10.0.1.tgz", - "integrity": "sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug==", - "dev": true, + "version": "12.1.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-12.1.0.tgz", + "integrity": "sha512-Vw8qHK3bZM9y/P10u3Vib8o/DdkvA2OtPtZvD871QKjy74Wj1WSKFILMPRPSdUSx5RFK1arlJzEtA4PkFgnbuA==", + "license": "MIT", "engines": { - "node": ">=14" + "node": ">=18" } }, "node_modules/commondir": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", - "integrity": "sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg==" - }, - "node_modules/compressible": { - "version": "2.0.18", - "resolved": "https://registry.npmjs.org/compressible/-/compressible-2.0.18.tgz", - "integrity": "sha512-AF3r7P5dWxL8MxyITRMlORQNaOA2IkAFaTr4k7BUumjPtRpGDTZpl0Pb1XCO6JeDCBdp126Cgs9sMxqSjgYyRg==", - "peer": true, - "dependencies": { - "mime-db": ">= 1.43.0 < 2" - }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/compression": { - "version": "1.7.4", - "resolved": "https://registry.npmjs.org/compression/-/compression-1.7.4.tgz", - "integrity": "sha512-jaSIDzP9pZVS4ZfQ+TzvtiWhdpFhE2RDHz8QJkpX9SIpLq88VueF5jJw6t+6CUQcAoA6t+x89MLrWAqpfDE8iQ==", - "peer": true, - "dependencies": { - "accepts": "~1.3.5", - "bytes": "3.0.0", - "compressible": "~2.0.16", - "debug": "2.6.9", - "on-headers": "~1.0.2", - "safe-buffer": "5.1.2", - "vary": "~1.1.2" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/compression/node_modules/bytes": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz", - "integrity": "sha512-pMhOfFDPiv9t5jjIXkHosWmkSyQbvsgEVNkz0ERHbuLh2T/7j4Mqqpz523Fe8MVY89KC6Sh/QfS2sM+SjgFDcw==", - "peer": true, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/compression/node_modules/debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "peer": true, - "dependencies": { - "ms": "2.0.0" - } - }, - "node_modules/compression/node_modules/ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", - "peer": true + "integrity": "sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg==", + "license": "MIT" }, "node_modules/concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==" + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "license": "MIT" }, "node_modules/connect": { "version": "3.7.0", "resolved": "https://registry.npmjs.org/connect/-/connect-3.7.0.tgz", "integrity": "sha512-ZqRXc+tZukToSNmh5C2iWMSoV3X1YUcPbqEM4DkEG5tNQXrQUZCNVGGv3IuicnkMtPfGf3Xtp8WCXs295iQ1pQ==", + "license": "MIT", "dependencies": { "debug": "2.6.9", "finalhandler": "1.1.2", @@ -6386,6 +6157,7 @@ "version": "2.6.9", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "license": "MIT", "dependencies": { "ms": "2.0.0" } @@ -6393,13 +6165,15 @@ "node_modules/connect/node_modules/ms": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "license": "MIT" }, "node_modules/content-type": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz", "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==", "dev": true, + "license": "MIT", "engines": { "node": ">= 0.6" } @@ -6408,46 +6182,38 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", + "license": "MIT", "peer": true }, "node_modules/cookie": { - "version": "0.4.2", - "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.2.tgz", - "integrity": "sha512-aSWTXFzaKWkvHO1Ny/s+ePFpvKsPnjc551iI41v3ny/ow6tBG5Vd+FuqGNhh1LxOmVzOlGUriIlOaokOvhaStA==", + "version": "0.7.2", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.7.2.tgz", + "integrity": "sha512-yki5XnKuf750l50uGTllt6kKILY4nQ1eNIQatoXEByZ5dWgnKqbnqmTrBE5B4N7lrMJKQ2ytWMiTO2o0v6Ew/w==", "dev": true, + "license": "MIT", "engines": { "node": ">= 0.6" } }, "node_modules/core-js-compat": { - "version": "3.37.0", - "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.37.0.tgz", - "integrity": "sha512-vYq4L+T8aS5UuFg4UwDhc7YNRWVeVZwltad9C/jV3R2LgVOpS9BDr7l/WL6BN0dbV3k1XejPTHqqEzJgsa0frA==", + "version": "3.39.0", + "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.39.0.tgz", + "integrity": "sha512-VgEUx3VwlExr5no0tXlBt+silBvhTryPwCXRI2Id1PN8WTKu7MreethvddqOubrYxkFdv/RnYrqlv1sFNAUelw==", + "license": "MIT", "peer": true, "dependencies": { - "browserslist": "^4.23.0" + "browserslist": "^4.24.2" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/core-js" } }, - "node_modules/core-js-pure": { - "version": "3.37.0", - "resolved": "https://registry.npmjs.org/core-js-pure/-/core-js-pure-3.37.0.tgz", - "integrity": "sha512-d3BrpyFr5eD4KcbRvQ3FTUx/KWmaDesr7+a3+1+P46IUnNoEt+oiLijPINZMEon7w9oGkIINWxrBAU9DEciwFQ==", - "dev": true, - "hasInstallScript": true, - "peer": true, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/core-js" - } - }, "node_modules/core-util-is": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==", + "license": "MIT", "peer": true }, "node_modules/cors": { @@ -6455,6 +6221,7 @@ "resolved": "https://registry.npmjs.org/cors/-/cors-2.8.5.tgz", "integrity": "sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==", "dev": true, + "license": "MIT", "dependencies": { "object-assign": "^4", "vary": "^1" @@ -6467,6 +6234,7 @@ "version": "5.2.1", "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-5.2.1.tgz", "integrity": "sha512-H65gsXo1SKjf8zmrJ67eJk8aIRKV5ff2D4uKZIBZShbhGSpEmsQOPW/SKMKYhSTrqR7ufy6RP69rPogdaPh/kA==", + "license": "MIT", "peer": true, "dependencies": { "import-fresh": "^2.0.0", @@ -6475,295 +6243,82 @@ "parse-json": "^4.0.0" }, "engines": { - "node": ">=4" - } - }, - "node_modules/cosmiconfig/node_modules/import-fresh": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-2.0.0.tgz", - "integrity": "sha512-eZ5H8rcgYazHbKC3PG4ClHNykCSxtAhxSSEM+2mb+7evD2CKF5V7c0dNum7AdpDh0ZdICwZY9sRSn8f+KH96sg==", - "peer": true, - "dependencies": { - "caller-path": "^2.0.0", - "resolve-from": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/cosmiconfig/node_modules/parse-json": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", - "integrity": "sha512-aOIos8bujGN93/8Ox/jPLh7RwVnPEysynVFE+fQZyg6jKELEHwzgKdLRFHUgXJL6kylijVSBC4BvN9OmsB48Rw==", - "peer": true, - "dependencies": { - "error-ex": "^1.3.1", - "json-parse-better-errors": "^1.0.1" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/cosmiconfig/node_modules/resolve-from": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-3.0.0.tgz", - "integrity": "sha512-GnlH6vxLymXJNMBo7XP1fJIzBFbdYt49CuTwmB/6N53t+kMPRMFKz783LlQ4tv28XoQfMWinAJX6WCGf2IlaIw==", - "peer": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/create-require": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", - "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==", - "dev": true - }, - "node_modules/cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", - "dependencies": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/cucumber": { - "version": "6.0.7", - "resolved": "https://registry.npmjs.org/cucumber/-/cucumber-6.0.7.tgz", - "integrity": "sha512-pN3AgWxHx8rOi+wOlqjASNETOjf3TgeyqhMNLQam7nSTXgQzju1oAmXkleRQRcXvpVvejcDHiZBLFSfBkqbYpA==", - "deprecated": "Cucumber is publishing new releases under @cucumber/cucumber", - "dev": true, - "peer": true, - "dependencies": { - "assertion-error-formatter": "^3.0.0", - "bluebird": "^3.4.1", - "cli-table3": "^0.5.1", - "colors": "^1.1.2", - "commander": "^3.0.1", - "cucumber-expressions": "^8.1.0", - "cucumber-tag-expressions": "^2.0.2", - "duration": "^0.2.1", - "escape-string-regexp": "^2.0.0", - "figures": "^3.0.0", - "gherkin": "5.0.0", - "glob": "^7.1.3", - "indent-string": "^4.0.0", - "is-generator": "^1.0.2", - "is-stream": "^2.0.0", - "knuth-shuffle-seeded": "^1.0.6", - "lodash": "^4.17.14", - "mz": "^2.4.0", - "progress": "^2.0.0", - "resolve": "^1.3.3", - "serialize-error": "^4.1.0", - "stack-chain": "^2.0.0", - "stacktrace-js": "^2.0.0", - "string-argv": "^0.3.0", - "title-case": "^2.1.1", - "util-arity": "^1.0.2", - "verror": "^1.9.0" - }, - "bin": { - "cucumber-js": "bin/cucumber-js" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/cucumber-expressions": { - "version": "8.3.0", - "resolved": "https://registry.npmjs.org/cucumber-expressions/-/cucumber-expressions-8.3.0.tgz", - "integrity": "sha512-cP2ya0EiorwXBC7Ll7Cj7NELYbasNv9Ty42L4u7sso9KruWemWG1ZiTq4PMqir3SNDSrbykoqI5wZgMbLEDjLQ==", - "deprecated": "This package is now published under @cucumber/cucumber-expressions", - "dev": true, - "peer": true, - "dependencies": { - "becke-ch--regex--s0-0-v1--base--pl--lib": "^1.4.0", - "xregexp": "^4.2.4" - } - }, - "node_modules/cucumber-pretty": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/cucumber-pretty/-/cucumber-pretty-6.0.1.tgz", - "integrity": "sha512-9uOIZ8x3lgCPROqYc7kqe2e7UrH5TZPZCdj5fVPze1XViG9yv8/8MnFsAnVINDYWVhiql8DJHb3UrZfIPHYH/A==", - "dev": true, - "dependencies": { - "cli-table3": "^0.6.0", - "colors": "^1.4.0", - "figures": "^3.2.0" - }, - "peerDependencies": { - "cucumber": ">=6.0.0 <7.0.0" - } - }, - "node_modules/cucumber-tag-expressions": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/cucumber-tag-expressions/-/cucumber-tag-expressions-2.0.3.tgz", - "integrity": "sha512-+x5j1IfZrBtbvYHuoUX0rl4nUGxaey6Do9sM0CABmZfDCcWXuuRm1fQeCaklIYQgOFHQ6xOHvDSdkMHHpni6tQ==", - "deprecated": "Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.", - "dev": true, - "peer": true - }, - "node_modules/cucumber-tsflow": { - "version": "4.4.4", - "resolved": "https://registry.npmjs.org/cucumber-tsflow/-/cucumber-tsflow-4.4.4.tgz", - "integrity": "sha512-oe2fPcAxWljZTc4+u0whbXIxZvjWzXfsieoY/TGuHY4aDLLOCFVLOVIxV8bKEI53PQhxJH809VugWHe2DB+nJg==", - "dev": true, - "dependencies": { - "callsites": "^3.1.0", - "log4js": "^6.3.0", - "source-map-support": "^0.5.19", - "underscore": "^1.8.3" - }, - "peerDependencies": { - "@cucumber/cucumber": "^7 || ^8 || ^9 || ^10" - } - }, - "node_modules/cucumber/node_modules/ansi-regex": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.1.tgz", - "integrity": "sha512-+O9Jct8wf++lXxxFc4hc8LsjaSq0HFzzL7cVsw8pRDIPdjKD2mT4ytDZlLuSBZ4cLKZFXIrMGO7DbQCtMJJMKw==", - "dev": true, - "peer": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/cucumber/node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, - "peer": true, - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/cucumber/node_modules/cli-table3": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/cli-table3/-/cli-table3-0.5.1.tgz", - "integrity": "sha512-7Qg2Jrep1S/+Q3EceiZtQcDPWxhAvBw+ERf1162v4sikJrvojMHFqXt8QIVha8UlH9rgU0BeWPytZ9/TzYqlUw==", - "dev": true, - "peer": true, - "dependencies": { - "object-assign": "^4.1.0", - "string-width": "^2.1.1" - }, - "engines": { - "node": ">=6" - }, - "optionalDependencies": { - "colors": "^1.1.2" - } - }, - "node_modules/cucumber/node_modules/commander": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/commander/-/commander-3.0.2.tgz", - "integrity": "sha512-Gar0ASD4BDyKC4hl4DwHqDrmvjoxWKZigVnAbn5H1owvm4CxCPdb0HQDehwNYMJpla5+M2tPmPARzhtYuwpHow==", - "dev": true, - "peer": true - }, - "node_modules/cucumber/node_modules/glob": { - "version": "7.2.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", - "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", - "dev": true, - "peer": true, - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.1.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" + "node": ">=4" } }, - "node_modules/cucumber/node_modules/is-fullwidth-code-point": { + "node_modules/cosmiconfig/node_modules/import-fresh": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha512-VHskAKYM8RfSFXwee5t5cbN5PZeq1Wrh6qd5bkyiXIf6UQcN6w/A0eXM9r6t8d+GYOh+o6ZhiEnb88LN/Y8m2w==", - "dev": true, + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-2.0.0.tgz", + "integrity": "sha512-eZ5H8rcgYazHbKC3PG4ClHNykCSxtAhxSSEM+2mb+7evD2CKF5V7c0dNum7AdpDh0ZdICwZY9sRSn8f+KH96sg==", + "license": "MIT", "peer": true, + "dependencies": { + "caller-path": "^2.0.0", + "resolve-from": "^3.0.0" + }, "engines": { "node": ">=4" } }, - "node_modules/cucumber/node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, + "node_modules/cosmiconfig/node_modules/resolve-from": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-3.0.0.tgz", + "integrity": "sha512-GnlH6vxLymXJNMBo7XP1fJIzBFbdYt49CuTwmB/6N53t+kMPRMFKz783LlQ4tv28XoQfMWinAJX6WCGf2IlaIw==", + "license": "MIT", "peer": true, - "dependencies": { - "brace-expansion": "^1.1.7" - }, "engines": { - "node": "*" + "node": ">=4" } }, - "node_modules/cucumber/node_modules/string-width": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", - "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "node_modules/create-require": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", + "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==", "dev": true, - "peer": true, + "license": "MIT" + }, + "node_modules/cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "license": "MIT", "dependencies": { - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^4.0.0" + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" }, "engines": { - "node": ">=4" + "node": ">= 8" } }, - "node_modules/cucumber/node_modules/strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha512-4XaJ2zQdCzROZDivEVIDPkcQn8LMFSa8kj8Gxb/Lnwzv9A8VctNZ+lfivC/sV3ivW8ElJTERXZoPBRrZKkNKow==", + "node_modules/cucumber-tsflow": { + "version": "4.4.4", + "resolved": "https://registry.npmjs.org/cucumber-tsflow/-/cucumber-tsflow-4.4.4.tgz", + "integrity": "sha512-oe2fPcAxWljZTc4+u0whbXIxZvjWzXfsieoY/TGuHY4aDLLOCFVLOVIxV8bKEI53PQhxJH809VugWHe2DB+nJg==", "dev": true, - "peer": true, + "license": "MIT", "dependencies": { - "ansi-regex": "^3.0.0" + "callsites": "^3.1.0", + "log4js": "^6.3.0", + "source-map-support": "^0.5.19", + "underscore": "^1.8.3" }, - "engines": { - "node": ">=4" + "peerDependencies": { + "@cucumber/cucumber": "^7 || ^8 || ^9 || ^10" } }, "node_modules/custom-event": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/custom-event/-/custom-event-1.0.1.tgz", "integrity": "sha512-GAj5FOq0Hd+RsCGVJxZuKaIDXDf3h6GQoNEjFgbLLI/trgtavwUbSnZ5pVfg27DVCaWjIohryS0JFwIJyT2cMg==", - "dev": true - }, - "node_modules/d": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/d/-/d-1.0.2.tgz", - "integrity": "sha512-MOqHvMWF9/9MX6nza0KgvFH4HpMU0EF5uUDXqX/BtxtU8NfB0QzRtJ8Oe/6SuS4kbhyzVJwjd97EA4PKrzJ8bw==", "dev": true, - "peer": true, - "dependencies": { - "es5-ext": "^0.10.64", - "type": "^2.7.2" - }, - "engines": { - "node": ">=0.12" - } + "license": "MIT" }, "node_modules/data-uri-to-buffer": { "version": "6.0.2", "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-6.0.2.tgz", "integrity": "sha512-7hvf7/GW8e86rW0ptuwS3OcBGDjIi6SZva7hCyWC0yYry2cOPmLIjXAUHI6DK2HsnwJd9ifmt57i8eV2n4YNpw==", + "license": "MIT", "engines": { "node": ">= 14" } @@ -6773,22 +6328,18 @@ "resolved": "https://registry.npmjs.org/date-format/-/date-format-4.0.14.tgz", "integrity": "sha512-39BOQLs9ZjKh0/patS9nrT8wc3ioX3/eA/zgbKNopnF2wCqJEoxywwwElATYvRsXdnOxA/OQeQoFZ3rFjVajhg==", "dev": true, + "license": "MIT", "engines": { "node": ">=4.0" } }, - "node_modules/dayjs": { - "version": "1.11.10", - "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.10.tgz", - "integrity": "sha512-vjAczensTgRcqDERK0SR2XMwsF/tSvnvlv6VcF2GIhg6Sx4yOIt/irsr1RDJsKiIyBzJDpCoXiWWq28MqH2cnQ==", - "peer": true - }, "node_modules/debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "version": "4.3.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz", + "integrity": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==", + "license": "MIT", "dependencies": { - "ms": "2.1.2" + "ms": "^2.1.3" }, "engines": { "node": ">=6.0" @@ -6804,6 +6355,7 @@ "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-4.0.0.tgz", "integrity": "sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=10" }, @@ -6812,10 +6364,11 @@ } }, "node_modules/deep-eql": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-4.1.3.tgz", - "integrity": "sha512-WaEtAOpRA1MQ0eohqZjpGD8zdI0Ovsm8mmFhaDN8dvDZzyoUMcYDnf5Y6iu7HTXxf8JDS23qWa4a+hKCDyOPzw==", + "version": "4.1.4", + "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-4.1.4.tgz", + "integrity": "sha512-SUwdGfqdKOwxCPeVYjwSyRpJ7Z+fhpwIAtmCUdZIWZ/YP5R9WAsyuSgpLVDi9bjWoN2LXHNss/dk3urXtdQxGg==", "dev": true, + "license": "MIT", "dependencies": { "type-detect": "^4.0.0" }, @@ -6828,6 +6381,7 @@ "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-1.1.2.tgz", "integrity": "sha512-5tdhKF6DbU7iIzrIOa1AOUt39ZRm13cmL1cGEh//aqR8x9+tNfbywRf0n5FD/18OKMdo7DNEtrX2t22ZAkI+eg==", "dev": true, + "license": "MIT", "dependencies": { "is-arguments": "^1.1.1", "is-date-object": "^1.0.5", @@ -6847,33 +6401,25 @@ "version": "0.1.4", "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/deepmerge": { "version": "4.3.1", "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.1.tgz", "integrity": "sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==", + "dev": true, + "license": "MIT", "engines": { "node": ">=0.10.0" } }, - "node_modules/defaults": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/defaults/-/defaults-1.0.4.tgz", - "integrity": "sha512-eFuaLoy/Rxalv2kr+lqMlUnrDWV+3j4pljOIJgLIhI058IQfWJ7vXhyEIHu+HtC738klGALYxOKDO0bQP3tg8A==", - "peer": true, - "dependencies": { - "clone": "^1.0.2" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/define-data-property": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==", "dev": true, + "license": "MIT", "dependencies": { "es-define-property": "^1.0.0", "es-errors": "^1.3.0", @@ -6891,6 +6437,7 @@ "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.1.tgz", "integrity": "sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==", "dev": true, + "license": "MIT", "dependencies": { "define-data-property": "^1.0.1", "has-property-descriptors": "^1.0.0", @@ -6907,6 +6454,7 @@ "version": "5.0.1", "resolved": "https://registry.npmjs.org/degenerator/-/degenerator-5.0.1.tgz", "integrity": "sha512-TllpMR/t0M5sqCXfj85i4XaAzxmS5tVA16dqvdkMwGmzI+dXLXnw3J+3Vdv7VKw+ThlTMboK6i9rnZ6Nntj5CQ==", + "license": "MIT", "dependencies": { "ast-types": "^0.13.4", "escodegen": "^2.1.0", @@ -6920,6 +6468,7 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", + "license": "MIT", "engines": { "node": ">=0.4.0" } @@ -6928,34 +6477,23 @@ "version": "1.2.1", "resolved": "https://registry.npmjs.org/denodeify/-/denodeify-1.2.1.tgz", "integrity": "sha512-KNTihKNmQENUZeKu5fzfpzRqR5S2VMp4gl9RFHiWzj9DfvYQPMJ6XHKNaQxaGCXwPk6y9yme3aUoaiAe+KX+vg==", + "license": "MIT", "peer": true }, "node_modules/depd": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", + "license": "MIT", "engines": { "node": ">= 0.8" } }, - "node_modules/deprecated-react-native-prop-types": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/deprecated-react-native-prop-types/-/deprecated-react-native-prop-types-5.0.0.tgz", - "integrity": "sha512-cIK8KYiiGVOFsKdPMmm1L3tA/Gl+JopXL6F5+C7x39MyPsQYnP57Im/D6bNUzcborD7fcMwiwZqcBdBXXZucYQ==", - "peer": true, - "dependencies": { - "@react-native/normalize-colors": "^0.73.0", - "invariant": "^2.2.4", - "prop-types": "^15.8.1" - }, - "engines": { - "node": ">=18" - } - }, "node_modules/destroy": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz", "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==", + "license": "MIT", "engines": { "node": ">= 0.8", "npm": "1.2.8000 || >= 1.4.16" @@ -6965,13 +6503,15 @@ "version": "0.0.1", "resolved": "https://registry.npmjs.org/di/-/di-0.0.1.tgz", "integrity": "sha512-uJaamHkagcZtHPqCIHZxnFrXlunQXgBOsZSUOWwFw31QJCAbyTBoHMW75YOTur5ZNx8pIeAKgf6GWIgaqqiLhA==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/diff": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", - "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-5.0.0.tgz", + "integrity": "sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w==", "dev": true, + "license": "BSD-3-Clause", "engines": { "node": ">=0.3.1" } @@ -6981,27 +6521,17 @@ "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-29.6.3.tgz", "integrity": "sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q==", "dev": true, + "license": "MIT", "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/dir-glob": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", - "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", - "dev": true, - "dependencies": { - "path-type": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/doctrine": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", "dev": true, + "license": "Apache-2.0", "dependencies": { "esutils": "^2.0.2" }, @@ -7014,6 +6544,7 @@ "resolved": "https://registry.npmjs.org/dom-serialize/-/dom-serialize-2.2.1.tgz", "integrity": "sha512-Yra4DbvoW7/Z6LBN560ZwXMjoNOSAN2wRsKFGc4iBeso+mpIA6qj1vfdf9HpMaKAqG6wXTy+1SYEzmNpKXOSsQ==", "dev": true, + "license": "MIT", "dependencies": { "custom-event": "~1.0.0", "ent": "~2.2.0", @@ -7021,99 +6552,115 @@ "void-elements": "^2.0.0" } }, - "node_modules/duration": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/duration/-/duration-0.2.2.tgz", - "integrity": "sha512-06kgtea+bGreF5eKYgI/36A6pLXggY7oR4p1pq4SmdFBn1ReOL5D8RhG64VrqfTTKNucqqtBAwEj8aB88mcqrg==", - "dev": true, - "peer": true, - "dependencies": { - "d": "1", - "es5-ext": "~0.10.46" - } - }, "node_modules/eastasianwidth": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", - "dev": true + "dev": true, + "license": "MIT", + "peer": true }, "node_modules/ee-first": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", - "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==" + "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==", + "license": "MIT" }, "node_modules/electron-to-chromium": { - "version": "1.4.740", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.740.tgz", - "integrity": "sha512-Yvg5i+iyv7Xm18BRdVPVm8lc7kgxM3r6iwqCH2zB7QZy1kZRNmd0Zqm0zcD9XoFREE5/5rwIuIAOT+/mzGcnZg==", + "version": "1.5.49", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.49.tgz", + "integrity": "sha512-ZXfs1Of8fDb6z7WEYZjXpgIRF6MEu8JdeGA0A40aZq6OQbS+eJpnnV49epZRna2DU/YsEjSQuGtQPPtvt6J65A==", + "license": "ISC", "peer": true }, "node_modules/emoji-regex": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "license": "MIT" }, "node_modules/encodeurl": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==", + "license": "MIT", "engines": { "node": ">= 0.8" } }, "node_modules/engine.io": { - "version": "6.5.4", - "resolved": "https://registry.npmjs.org/engine.io/-/engine.io-6.5.4.tgz", - "integrity": "sha512-KdVSDKhVKyOi+r5uEabrDLZw2qXStVvCsEB/LN3mw4WFi6Gx50jTyuxYVCwAAC0U46FdnzP/ScKRBTXb/NiEOg==", + "version": "6.6.2", + "resolved": "https://registry.npmjs.org/engine.io/-/engine.io-6.6.2.tgz", + "integrity": "sha512-gmNvsYi9C8iErnZdVcJnvCpSKbWTt1E8+JZo8b+daLninywUWi5NQ5STSHZ9rFjFO7imNcvb8Pc5pe/wMR5xEw==", "dev": true, + "license": "MIT", "dependencies": { "@types/cookie": "^0.4.1", "@types/cors": "^2.8.12", "@types/node": ">=10.0.0", "accepts": "~1.3.4", "base64id": "2.0.0", - "cookie": "~0.4.1", + "cookie": "~0.7.2", "cors": "~2.8.5", "debug": "~4.3.1", "engine.io-parser": "~5.2.1", - "ws": "~8.11.0" + "ws": "~8.17.1" }, "engines": { "node": ">=10.2.0" } }, "node_modules/engine.io-parser": { - "version": "5.2.2", - "resolved": "https://registry.npmjs.org/engine.io-parser/-/engine.io-parser-5.2.2.tgz", - "integrity": "sha512-RcyUFKA93/CXH20l4SoVvzZfrSDMOTUS3bWVpTt2FuFP+XYrL8i8oonHP7WInRyVHXh0n/ORtoeiE1os+8qkSw==", + "version": "5.2.3", + "resolved": "https://registry.npmjs.org/engine.io-parser/-/engine.io-parser-5.2.3.tgz", + "integrity": "sha512-HqD3yTBfnBxIrbnM1DoD6Pcq8NECnh8d4As1Qgh0z5Gg3jRRIqijury0CL3ghu/edArpUYiYqQiDUQBIs4np3Q==", "dev": true, + "license": "MIT", "engines": { "node": ">=10.0.0" } }, - "node_modules/ent": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/ent/-/ent-2.2.0.tgz", - "integrity": "sha512-GHrMyVZQWvTIdDtpiEXdHZnFQKzeO09apj8Cbl4pKWy4i0Oprcq17usfDt5aO63swf0JOeMWjWQE/LzgSRuWpA==", - "dev": true + "node_modules/engine.io/node_modules/ws": { + "version": "8.17.1", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.17.1.tgz", + "integrity": "sha512-6XQFvXTkbfUOZOKKILFG1PDK2NDQs4azKQl26T0YS5CxqWLgXajbPZ+h4gZekJyRqFU8pvnbAbbs/3TgRPy+GQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10.0.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": ">=5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } }, - "node_modules/envinfo": { - "version": "7.12.0", - "resolved": "https://registry.npmjs.org/envinfo/-/envinfo-7.12.0.tgz", - "integrity": "sha512-Iw9rQJBGpJRd3rwXm9ft/JiGoAZmLxxJZELYDQoPRZ4USVhkKtIcNBPw6U+/K2mBpaqM25JSV6Yl4Az9vO2wJg==", - "peer": true, - "bin": { - "envinfo": "dist/cli.js" + "node_modules/ent": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ent/-/ent-2.2.1.tgz", + "integrity": "sha512-QHuXVeZx9d+tIQAz/XztU0ZwZf2Agg9CcXcgE1rurqvdBeDBrpSwjl8/6XUqMg7tw2Y7uAdKb2sRv+bSEFqQ5A==", + "dev": true, + "license": "MIT", + "dependencies": { + "punycode": "^1.4.1" }, "engines": { - "node": ">=4" + "node": ">= 0.4" } }, "node_modules/error-ex": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", + "license": "MIT", + "peer": true, "dependencies": { "is-arrayish": "^0.2.1" } @@ -7122,21 +6669,10 @@ "version": "2.1.4", "resolved": "https://registry.npmjs.org/error-stack-parser/-/error-stack-parser-2.1.4.tgz", "integrity": "sha512-Sk5V6wVazPhq5MhpO+AUxJn5x7XSXGl1R93Vn7i+zS15KDVxQijejNCrz8340/2bgLBjR9GtEG8ZVKONDjcqGQ==", - "dependencies": { - "stackframe": "^1.3.4" - } - }, - "node_modules/errorhandler": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/errorhandler/-/errorhandler-1.5.1.tgz", - "integrity": "sha512-rcOwbfvP1WTViVoUjcfZicVzjhjTuhSMntHh6mW3IrEiyE6mJyXvsToJUJGlGlw/2xU9P5whlWNGlIDVeCiT4A==", + "license": "MIT", "peer": true, "dependencies": { - "accepts": "~1.3.7", - "escape-html": "~1.0.3" - }, - "engines": { - "node": ">= 0.8" + "stackframe": "^1.3.4" } }, "node_modules/es-define-property": { @@ -7144,6 +6680,7 @@ "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz", "integrity": "sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==", "dev": true, + "license": "MIT", "dependencies": { "get-intrinsic": "^1.2.4" }, @@ -7156,101 +6693,63 @@ "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", "dev": true, + "license": "MIT", "engines": { "node": ">= 0.4" } }, - "node_modules/es5-ext": { - "version": "0.10.64", - "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.64.tgz", - "integrity": "sha512-p2snDhiLaXe6dahss1LddxqEm+SkuDvV8dnIQG0MWjyHpcMNfXKPE+/Cc0y+PhxJX3A4xGNeFCj5oc0BUh6deg==", - "dev": true, - "hasInstallScript": true, - "peer": true, - "dependencies": { - "es6-iterator": "^2.0.3", - "es6-symbol": "^3.1.3", - "esniff": "^2.0.1", - "next-tick": "^1.1.0" - }, - "engines": { - "node": ">=0.10" - } - }, - "node_modules/es6-iterator": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.3.tgz", - "integrity": "sha512-zw4SRzoUkd+cl+ZoE15A9o1oQd920Bb0iOJMQkQhl3jNc03YqVjAhG7scf9C5KWRU/R13Orf588uCC6525o02g==", - "dev": true, - "peer": true, - "dependencies": { - "d": "1", - "es5-ext": "^0.10.35", - "es6-symbol": "^3.1.1" - } - }, "node_modules/es6-shim": { "version": "0.35.8", "resolved": "https://registry.npmjs.org/es6-shim/-/es6-shim-0.35.8.tgz", "integrity": "sha512-Twf7I2v4/1tLoIXMT8HlqaBSS5H2wQTs2wx3MNYCI8K1R1/clXyCazrcVCPm/FuO9cyV8+leEaZOWD5C253NDg==", - "dev": true - }, - "node_modules/es6-symbol": { - "version": "3.1.4", - "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.4.tgz", - "integrity": "sha512-U9bFFjX8tFiATgtkJ1zg25+KviIXpgRvRHS8sau3GfhVzThRQrOeksPeT0BWW2MNZs1OEWJ1DPXOQMn0KKRkvg==", "dev": true, - "peer": true, - "dependencies": { - "d": "^1.0.2", - "ext": "^1.7.0" - }, - "engines": { - "node": ">=0.12" - } + "license": "MIT" }, "node_modules/esbuild": { - "version": "0.19.12", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.19.12.tgz", - "integrity": "sha512-aARqgq8roFBj054KvQr5f1sFu0D65G+miZRCuJyJ0G13Zwx7vRar5Zhn2tkQNzIXcBrNVsv/8stehpj+GAjgbg==", + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.23.1.tgz", + "integrity": "sha512-VVNz/9Sa0bs5SELtn3f7qhJCDPCF5oMEl5cO9/SSinpE9hbPVvxbd572HH5AKiP7WD8INO53GgfDDhRjkylHEg==", "dev": true, "hasInstallScript": true, + "license": "MIT", "bin": { "esbuild": "bin/esbuild" }, "engines": { - "node": ">=12" + "node": ">=18" }, "optionalDependencies": { - "@esbuild/aix-ppc64": "0.19.12", - "@esbuild/android-arm": "0.19.12", - "@esbuild/android-arm64": "0.19.12", - "@esbuild/android-x64": "0.19.12", - "@esbuild/darwin-arm64": "0.19.12", - "@esbuild/darwin-x64": "0.19.12", - "@esbuild/freebsd-arm64": "0.19.12", - "@esbuild/freebsd-x64": "0.19.12", - "@esbuild/linux-arm": "0.19.12", - "@esbuild/linux-arm64": "0.19.12", - "@esbuild/linux-ia32": "0.19.12", - "@esbuild/linux-loong64": "0.19.12", - "@esbuild/linux-mips64el": "0.19.12", - "@esbuild/linux-ppc64": "0.19.12", - "@esbuild/linux-riscv64": "0.19.12", - "@esbuild/linux-s390x": "0.19.12", - "@esbuild/linux-x64": "0.19.12", - "@esbuild/netbsd-x64": "0.19.12", - "@esbuild/openbsd-x64": "0.19.12", - "@esbuild/sunos-x64": "0.19.12", - "@esbuild/win32-arm64": "0.19.12", - "@esbuild/win32-ia32": "0.19.12", - "@esbuild/win32-x64": "0.19.12" + "@esbuild/aix-ppc64": "0.23.1", + "@esbuild/android-arm": "0.23.1", + "@esbuild/android-arm64": "0.23.1", + "@esbuild/android-x64": "0.23.1", + "@esbuild/darwin-arm64": "0.23.1", + "@esbuild/darwin-x64": "0.23.1", + "@esbuild/freebsd-arm64": "0.23.1", + "@esbuild/freebsd-x64": "0.23.1", + "@esbuild/linux-arm": "0.23.1", + "@esbuild/linux-arm64": "0.23.1", + "@esbuild/linux-ia32": "0.23.1", + "@esbuild/linux-loong64": "0.23.1", + "@esbuild/linux-mips64el": "0.23.1", + "@esbuild/linux-ppc64": "0.23.1", + "@esbuild/linux-riscv64": "0.23.1", + "@esbuild/linux-s390x": "0.23.1", + "@esbuild/linux-x64": "0.23.1", + "@esbuild/netbsd-x64": "0.23.1", + "@esbuild/openbsd-arm64": "0.23.1", + "@esbuild/openbsd-x64": "0.23.1", + "@esbuild/sunos-x64": "0.23.1", + "@esbuild/win32-arm64": "0.23.1", + "@esbuild/win32-ia32": "0.23.1", + "@esbuild/win32-x64": "0.23.1" } }, "node_modules/escalade": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.2.tgz", - "integrity": "sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", + "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", + "license": "MIT", "engines": { "node": ">=6" } @@ -7258,20 +6757,26 @@ "node_modules/escape-html": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", - "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==" + "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==", + "license": "MIT" }, "node_modules/escape-string-regexp": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz", - "integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "license": "MIT", "engines": { - "node": ">=8" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/escodegen": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-2.1.0.tgz", "integrity": "sha512-2NlIDTwUWJN0mRPQOdtQBzbUHvdGY2P1VXSyU83Q3xKxM7WHX2Ql8dKq782Q9TgQUNOLEzEYu9bzLNj1q88I5w==", + "license": "BSD-2-Clause", "dependencies": { "esprima": "^4.0.1", "estraverse": "^5.2.0", @@ -7289,16 +6794,18 @@ } }, "node_modules/eslint": { - "version": "8.57.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.57.0.tgz", - "integrity": "sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ==", + "version": "8.57.1", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.57.1.tgz", + "integrity": "sha512-ypowyDxpVSYpkXr9WPv2PAZCtNip1Mv5KTW0SCurXv/9iOpcrH9PaqUElksqEB6pChqHGDRCFTyrZlGhnLNGiA==", + "deprecated": "This version is no longer supported. Please see https://eslint.org/version-support for other options.", "dev": true, + "license": "MIT", "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", "@eslint-community/regexpp": "^4.6.1", "@eslint/eslintrc": "^2.1.4", - "@eslint/js": "8.57.0", - "@humanwhocodes/config-array": "^0.11.14", + "@eslint/js": "8.57.1", + "@humanwhocodes/config-array": "^0.13.0", "@humanwhocodes/module-importer": "^1.0.1", "@nodelib/fs.walk": "^1.2.8", "@ungap/structured-clone": "^1.2.0", @@ -7344,10 +6851,11 @@ } }, "node_modules/eslint-plugin-mocha": { - "version": "10.4.2", - "resolved": "https://registry.npmjs.org/eslint-plugin-mocha/-/eslint-plugin-mocha-10.4.2.tgz", - "integrity": "sha512-cur4dVYnSEWTBwdqIBQFxa/9siAhesu0TX+lbJ4ClE9j0eNMNe6BSx3vkFFNz6tGoveyMyELFXa30f3fvuAVDg==", + "version": "10.5.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-mocha/-/eslint-plugin-mocha-10.5.0.tgz", + "integrity": "sha512-F2ALmQVPT1GoP27O1JTZGrV9Pqg8k79OeIuvw63UxMtQKREZtmkK1NFgkZQ2TW7L2JSSFKHFPTtHu5z8R9QNRw==", "dev": true, + "license": "MIT", "dependencies": { "eslint-utils": "^3.0.0", "globals": "^13.24.0", @@ -7361,13 +6869,14 @@ } }, "node_modules/eslint-plugin-prettier": { - "version": "5.1.3", - "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-5.1.3.tgz", - "integrity": "sha512-C9GCVAs4Eq7ZC/XFQHITLiHJxQngdtraXaM+LoUFoFp/lHNl2Zn8f3WQbe9HvTBBQ9YnKFB0/2Ajdqwo5D1EAw==", + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-5.2.1.tgz", + "integrity": "sha512-gH3iR3g4JfF+yYPaJYkN7jEl9QbweL/YfkoRlNnuIEHEz1vHVlCmWOS+eGGiRuzHQXdJFCOTxRgvju9b8VUmrw==", "dev": true, + "license": "MIT", "dependencies": { "prettier-linter-helpers": "^1.0.0", - "synckit": "^0.8.6" + "synckit": "^0.9.1" }, "engines": { "node": "^14.18.0 || >=16.0.0" @@ -7395,6 +6904,7 @@ "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz", "integrity": "sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==", "dev": true, + "license": "BSD-2-Clause", "dependencies": { "esrecurse": "^4.3.0", "estraverse": "^5.2.0" @@ -7411,6 +6921,7 @@ "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-3.0.0.tgz", "integrity": "sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==", "dev": true, + "license": "MIT", "dependencies": { "eslint-visitor-keys": "^2.0.0" }, @@ -7429,6 +6940,7 @@ "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz", "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==", "dev": true, + "license": "Apache-2.0", "engines": { "node": ">=10" } @@ -7438,6 +6950,7 @@ "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", "dev": true, + "license": "Apache-2.0", "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, @@ -7449,35 +6962,26 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", - "dev": true + "dev": true, + "license": "Python-2.0" }, "node_modules/eslint/node_modules/brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "dev": true, + "license": "MIT", "dependencies": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" } }, - "node_modules/eslint/node_modules/escape-string-regexp": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", - "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/eslint/node_modules/js-yaml": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", "dev": true, + "license": "MIT", "dependencies": { "argparse": "^2.0.1" }, @@ -7490,6 +6994,7 @@ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", "dev": true, + "license": "ISC", "dependencies": { "brace-expansion": "^1.1.7" }, @@ -7497,27 +7002,12 @@ "node": "*" } }, - "node_modules/esniff": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/esniff/-/esniff-2.0.1.tgz", - "integrity": "sha512-kTUIGKQ/mDPFoJ0oVfcmyJn4iBDRptjNVIzwIFR7tqWXdVI9xfA2RMwY/gbSpJG3lkdWNEjLap/NqVHZiJsdfg==", - "dev": true, - "peer": true, - "dependencies": { - "d": "^1.0.1", - "es5-ext": "^0.10.62", - "event-emitter": "^0.3.5", - "type": "^2.7.2" - }, - "engines": { - "node": ">=0.10" - } - }, "node_modules/espree": { "version": "9.6.1", "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==", "dev": true, + "license": "BSD-2-Clause", "dependencies": { "acorn": "^8.9.0", "acorn-jsx": "^5.3.2", @@ -7534,6 +7024,7 @@ "version": "4.0.1", "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "license": "BSD-2-Clause", "bin": { "esparse": "bin/esparse.js", "esvalidate": "bin/esvalidate.js" @@ -7543,10 +7034,11 @@ } }, "node_modules/esquery": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.5.0.tgz", - "integrity": "sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==", + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.6.0.tgz", + "integrity": "sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg==", "dev": true, + "license": "BSD-3-Clause", "dependencies": { "estraverse": "^5.1.0" }, @@ -7559,6 +7051,7 @@ "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", "dev": true, + "license": "BSD-2-Clause", "dependencies": { "estraverse": "^5.2.0" }, @@ -7570,6 +7063,7 @@ "version": "5.3.0", "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "license": "BSD-2-Clause", "engines": { "node": ">=4.0" } @@ -7578,12 +7072,14 @@ "version": "2.0.2", "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz", "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/esutils": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "license": "BSD-2-Clause", "engines": { "node": ">=0.10.0" } @@ -7592,26 +7088,17 @@ "version": "1.8.1", "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==", + "license": "MIT", "peer": true, "engines": { "node": ">= 0.6" } }, - "node_modules/event-emitter": { - "version": "0.3.5", - "resolved": "https://registry.npmjs.org/event-emitter/-/event-emitter-0.3.5.tgz", - "integrity": "sha512-D9rRn9y7kLPnJ+hMq7S/nhvoKwwvVJahBi2BPmx3bvbsEdK3W9ii8cBSGjP+72/LnM4n6fo3+dkCX5FeTQruXA==", - "dev": true, - "peer": true, - "dependencies": { - "d": "1", - "es5-ext": "~0.10.14" - } - }, "node_modules/event-target-shim": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/event-target-shim/-/event-target-shim-5.0.1.tgz", "integrity": "sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==", + "license": "MIT", "peer": true, "engines": { "node": ">=6" @@ -7621,12 +7108,14 @@ "version": "4.0.7", "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.7.tgz", "integrity": "sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/execa": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", + "license": "MIT", "peer": true, "dependencies": { "cross-spawn": "^7.0.3", @@ -7646,17 +7135,12 @@ "url": "https://github.com/sindresorhus/execa?sponsor=1" } }, - "node_modules/execa/node_modules/signal-exit": { - "version": "3.0.7", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", - "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", - "peer": true - }, "node_modules/expect": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/expect/-/expect-29.7.0.tgz", "integrity": "sha512-2Zks0hf1VLFYI1kbh0I5jP3KHHyCHpkfyHBzsSXRFgl/Bg9mWYfMW8oD+PdMPlEwy5HNsR9JutYy6pMeOh61nw==", "dev": true, + "license": "MIT", "dependencies": { "@jest/expect-utils": "^29.7.0", "jest-get-type": "^29.6.3", @@ -7668,49 +7152,40 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/ext": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/ext/-/ext-1.7.0.tgz", - "integrity": "sha512-6hxeJYaL110a9b5TEJSj0gojyHQAmA2ch5Os+ySCiA1QGdS697XWY1pzsrSjqA9LDEEgdB/KypIlR59RcLuHYw==", - "dev": true, - "peer": true, - "dependencies": { - "type": "^2.7.2" - } + "node_modules/exponential-backoff": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/exponential-backoff/-/exponential-backoff-3.1.1.tgz", + "integrity": "sha512-dX7e/LHVJ6W3DE1MHWi9S1EYzDESENfLrYohG2G++ovZrYOkm4Knwa0mc1cn84xJOR4KEU0WSchhLbd0UklbHw==", + "license": "Apache-2.0", + "peer": true }, "node_modules/extend": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", - "dev": true - }, - "node_modules/extsprintf": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", - "integrity": "sha512-11Ndz7Nv+mvAC1j0ktTa7fAb0vLyGGX+rMHNBYQviQDGU0Hw7lhctJANqbPhu9nV9/izT/IntTgZ7Im/9LJs9g==", "dev": true, - "engines": [ - "node >=0.6.0" - ], - "peer": true + "license": "MIT" }, "node_modules/fast-deep-equal": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/fast-diff": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/fast-diff/-/fast-diff-1.3.0.tgz", "integrity": "sha512-VxPP4NqbUjj6MaAOafWeUn2cXWLcCtljklUtZf0Ind4XQ+QPtmA0b18zZy0jIQx+ExRVCR/ZQpBmik5lXshNsw==", - "dev": true + "dev": true, + "license": "Apache-2.0" }, "node_modules/fast-glob": { "version": "3.3.2", "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.2.tgz", "integrity": "sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==", "dev": true, + "license": "MIT", "dependencies": { "@nodelib/fs.stat": "^2.0.2", "@nodelib/fs.walk": "^1.2.3", @@ -7727,6 +7202,7 @@ "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", "dev": true, + "license": "ISC", "dependencies": { "is-glob": "^4.0.1" }, @@ -7738,41 +7214,21 @@ "version": "2.1.0", "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", - "dev": true + "license": "MIT" }, "node_modules/fast-levenshtein": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", - "dev": true - }, - "node_modules/fast-xml-parser": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/fast-xml-parser/-/fast-xml-parser-4.4.1.tgz", - "integrity": "sha512-xkjOecfnKGkSsOwtZ5Pz7Us/T6mrbPQrq0nh+aCO5V9nk5NLWmasAHumTKjiPJPWANe+kAZ84Jc8ooJkzZ88Sw==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/NaturalIntelligence" - }, - { - "type": "paypal", - "url": "https://paypal.me/naturalintelligence" - } - ], - "peer": true, - "dependencies": { - "strnum": "^1.0.5" - }, - "bin": { - "fxparser": "src/cli/cli.js" - } + "dev": true, + "license": "MIT" }, "node_modules/fastq": { "version": "1.17.1", "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.17.1.tgz", "integrity": "sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==", "dev": true, + "license": "ISC", "dependencies": { "reusify": "^1.0.4" } @@ -7781,6 +7237,7 @@ "version": "2.0.2", "resolved": "https://registry.npmjs.org/fb-watchman/-/fb-watchman-2.0.2.tgz", "integrity": "sha512-p5161BqbuCaSnB8jIbzQHOlpgsPmK5rJVDfDKO91Axs5NC1uu3HRQm6wt9cd9/+GtQQIO53JdGXXoyDpTAsgYA==", + "license": "Apache-2.0", "peer": true, "dependencies": { "bser": "2.1.1" @@ -7791,6 +7248,8 @@ "resolved": "https://registry.npmjs.org/figures/-/figures-3.2.0.tgz", "integrity": "sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==", "dev": true, + "license": "MIT", + "peer": true, "dependencies": { "escape-string-regexp": "^1.0.5" }, @@ -7806,6 +7265,8 @@ "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", "dev": true, + "license": "MIT", + "peer": true, "engines": { "node": ">=0.8.0" } @@ -7815,6 +7276,7 @@ "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", "dev": true, + "license": "MIT", "dependencies": { "flat-cache": "^3.0.4" }, @@ -7826,6 +7288,7 @@ "version": "7.1.1", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", + "license": "MIT", "dependencies": { "to-regex-range": "^5.0.1" }, @@ -7837,6 +7300,7 @@ "version": "1.1.2", "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.2.tgz", "integrity": "sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA==", + "license": "MIT", "dependencies": { "debug": "2.6.9", "encodeurl": "~1.0.2", @@ -7854,6 +7318,7 @@ "version": "2.6.9", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "license": "MIT", "dependencies": { "ms": "2.0.0" } @@ -7861,12 +7326,14 @@ "node_modules/finalhandler/node_modules/ms": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "license": "MIT" }, "node_modules/finalhandler/node_modules/on-finished": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", "integrity": "sha512-ikqdkGAAyf/X/gPhXGvfgAytDZtDbr+bkNUJ0N9h5MI/dmdgCs3l6hoHrcUv41sRKew3jIwrp4qQDXiK99Utww==", + "license": "MIT", "dependencies": { "ee-first": "1.1.1" }, @@ -7878,6 +7345,7 @@ "version": "2.1.0", "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-2.1.0.tgz", "integrity": "sha512-Tq6PixE0w/VMFfCgbONnkiQIVol/JJL7nRMi20fqzA4NRs9AfeqMGeRdPi3wIhYkxjeBaWh2rxwapn5Tu3IqOQ==", + "license": "MIT", "peer": true, "dependencies": { "commondir": "^1.0.1", @@ -7892,6 +7360,8 @@ "version": "5.0.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "dev": true, + "license": "MIT", "dependencies": { "locate-path": "^6.0.0", "path-exists": "^4.0.0" @@ -7908,6 +7378,7 @@ "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz", "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==", "dev": true, + "license": "BSD-3-Clause", "bin": { "flat": "cli.js" } @@ -7917,6 +7388,7 @@ "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.2.0.tgz", "integrity": "sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==", "dev": true, + "license": "MIT", "dependencies": { "flatted": "^3.2.9", "keyv": "^4.5.3", @@ -7930,27 +7402,30 @@ "version": "3.3.1", "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.1.tgz", "integrity": "sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw==", - "dev": true + "dev": true, + "license": "ISC" }, "node_modules/flow-enums-runtime": { "version": "0.0.6", "resolved": "https://registry.npmjs.org/flow-enums-runtime/-/flow-enums-runtime-0.0.6.tgz", "integrity": "sha512-3PYnM29RFXwvAN6Pc/scUfkI7RwhQ/xqyLUyPNlXUp9S40zI8nup9tUSrTLSVnWGBN38FNiGWbwZOB6uR4OGdw==", + "license": "MIT", "peer": true }, "node_modules/flow-parser": { - "version": "0.206.0", - "resolved": "https://registry.npmjs.org/flow-parser/-/flow-parser-0.206.0.tgz", - "integrity": "sha512-HVzoK3r6Vsg+lKvlIZzaWNBVai+FXTX1wdYhz/wVlH13tb/gOdLXmlTqy6odmTBhT5UoWUbq0k8263Qhr9d88w==", + "version": "0.251.1", + "resolved": "https://registry.npmjs.org/flow-parser/-/flow-parser-0.251.1.tgz", + "integrity": "sha512-8ZuLqJPlL/T9K3zFdr1m88Lx8JOoJluTTdyvN4uH5NT9zoIIFqbCDoXVhkHh022k2lhuAyFF27cu0BYKh5SmDA==", + "license": "MIT", "peer": true, "engines": { "node": ">=0.4.0" } }, "node_modules/follow-redirects": { - "version": "1.15.6", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.6.tgz", - "integrity": "sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA==", + "version": "1.15.9", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.9.tgz", + "integrity": "sha512-gew4GsXizNgdoRyqmyfMHyAmXsZDk6mHkSxZFCzW9gwlbtOW44CDtYavM+y+72qD/Vq2l550kMF52DT8fOLJqQ==", "dev": true, "funding": [ { @@ -7958,6 +7433,7 @@ "url": "https://github.com/sponsors/RubenVerborgh" } ], + "license": "MIT", "engines": { "node": ">=4.0" }, @@ -7968,10 +7444,12 @@ } }, "node_modules/foreground-child": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.1.1.tgz", - "integrity": "sha512-TMKDUnIte6bfb5nWv7V/caI169OHgvwjb7V4WkeUvbQQdjr5rWKqHFiKWb/fcOwB+CzBT+qbWjvj+DVwRskpIg==", + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.3.0.tgz", + "integrity": "sha512-Ld2g8rrAyMYFXBhEqMz8ZAHBi4J4uS1i/CxGMDnjyFWddMXLVcDp051DZfu+t7+ab7Wv6SMqpWmyFIj5UbfFvg==", "dev": true, + "license": "ISC", + "peer": true, "dependencies": { "cross-spawn": "^7.0.0", "signal-exit": "^4.0.1" @@ -7983,10 +7461,25 @@ "url": "https://github.com/sponsors/isaacs" } }, + "node_modules/foreground-child/node_modules/signal-exit": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", + "dev": true, + "license": "ISC", + "peer": true, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/form-data": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", - "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.1.tgz", + "integrity": "sha512-tzN8e4TX8+kkxGPK8D5u0FNmjPUjw3lwC9lSLxxoB/+GtsJG91CO8bSWy73APlgAZzZbXEYZJuxjkHH2w+Ezhw==", + "license": "MIT", "dependencies": { "asynckit": "^0.4.0", "combined-stream": "^1.0.8", @@ -8000,21 +7493,38 @@ "version": "0.5.2", "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==", + "license": "MIT", "peer": true, "engines": { "node": ">= 0.6" } }, + "node_modules/fs-extra": { + "version": "11.2.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.2.0.tgz", + "integrity": "sha512-PmDi3uwK5nFuXh7XDTlVnS17xJS7vW36is2+w3xcv8SVxiB4NyATf4ctkVY5bkSjX0Y4nbvZCq1/EjtEyr9ktw==", + "license": "MIT", + "dependencies": { + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + }, + "engines": { + "node": ">=14.14" + } + }, "node_modules/fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==" + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", + "license": "ISC" }, "node_modules/fsevents": { "version": "2.3.3", "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", "hasInstallScript": true, + "license": "MIT", "optional": true, "os": [ "darwin" @@ -8027,6 +7537,7 @@ "version": "1.1.2", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "license": "MIT", "funding": { "url": "https://github.com/sponsors/ljharb" } @@ -8036,6 +7547,7 @@ "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz", "integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==", "dev": true, + "license": "MIT", "funding": { "url": "https://github.com/sponsors/ljharb" } @@ -8044,6 +7556,7 @@ "version": "1.0.0-beta.2", "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", + "license": "MIT", "peer": true, "engines": { "node": ">=6.9.0" @@ -8053,6 +7566,7 @@ "version": "2.0.5", "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "license": "ISC", "engines": { "node": "6.* || 8.* || >= 10.*" } @@ -8062,6 +7576,7 @@ "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.2.tgz", "integrity": "sha512-8vXOvuE167CtIc3OyItco7N/dpRtBbYOsPsXCz7X/PMnlGjYjSGuZJgM1Y7mmew7BKf9BqvLX2tnOVy1BBUsxQ==", "dev": true, + "license": "MIT", "engines": { "node": "*" } @@ -8071,6 +7586,7 @@ "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.4.tgz", "integrity": "sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==", "dev": true, + "license": "MIT", "dependencies": { "es-errors": "^1.3.0", "function-bind": "^1.1.2", @@ -8085,10 +7601,21 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/get-package-type": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/get-package-type/-/get-package-type-0.1.0.tgz", + "integrity": "sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">=8.0.0" + } + }, "node_modules/get-stream": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", + "license": "MIT", "peer": true, "engines": { "node": ">=10" @@ -8098,10 +7625,11 @@ } }, "node_modules/get-tsconfig": { - "version": "4.7.3", - "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.7.3.tgz", - "integrity": "sha512-ZvkrzoUA0PQZM6fy6+/Hce561s+faD1rsNwhnO5FelNjyy7EMGJ3Rz1AQ8GYDWjhRs/7dBLOEJvhK8MiEJOAFg==", + "version": "4.8.1", + "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.8.1.tgz", + "integrity": "sha512-k9PN+cFBmaLWtVz29SkUoqU5O0slLuHJXt/2P+tMVFT+phsSGXGkp9t3rQIqdz0e+06EHNGs3oM6ZX1s2zHxRg==", "dev": true, + "license": "MIT", "dependencies": { "resolve-pkg-maps": "^1.0.0" }, @@ -8113,6 +7641,7 @@ "version": "6.0.3", "resolved": "https://registry.npmjs.org/get-uri/-/get-uri-6.0.3.tgz", "integrity": "sha512-BzUrJBS9EcUb4cFol8r4W3v1cPsSyajLSthNkz5BxbpDcHN5tIrM10E2eNvfnvBn3DaT3DUgx0OpsBKkaOpanw==", + "license": "MIT", "dependencies": { "basic-ftp": "^5.0.2", "data-uri-to-buffer": "^6.0.2", @@ -8123,58 +7652,22 @@ "node": ">= 14" } }, - "node_modules/get-uri/node_modules/fs-extra": { - "version": "11.2.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.2.0.tgz", - "integrity": "sha512-PmDi3uwK5nFuXh7XDTlVnS17xJS7vW36is2+w3xcv8SVxiB4NyATf4ctkVY5bkSjX0Y4nbvZCq1/EjtEyr9ktw==", - "dependencies": { - "graceful-fs": "^4.2.0", - "jsonfile": "^6.0.1", - "universalify": "^2.0.0" - }, - "engines": { - "node": ">=14.14" - } - }, - "node_modules/get-uri/node_modules/jsonfile": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", - "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", - "dependencies": { - "universalify": "^2.0.0" - }, - "optionalDependencies": { - "graceful-fs": "^4.1.6" - } - }, - "node_modules/gherkin": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/gherkin/-/gherkin-5.0.0.tgz", - "integrity": "sha512-Y+93z2Nh+TNIKuKEf+6M0FQrX/z0Yv9C2LFfc5NlcGJWRrrTeI/jOg2374y1FOw6ZYQ3RgJBezRkli7CLDubDA==", - "deprecated": "This package is now published under @cucumber/gherkin", - "dev": true, - "peer": true, - "bin": { - "gherkin-javascript": "bin/gherkin" - } - }, "node_modules/glob": { - "version": "10.3.12", - "resolved": "https://registry.npmjs.org/glob/-/glob-10.3.12.tgz", - "integrity": "sha512-TCNv8vJ+xz4QiqTpfOJA7HvYv+tNIRHKfUWw/q+v2jdgN4ebz+KY9tGx5J4rHP0o84mNP+ApH66HRX8us3Khqg==", + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz", + "integrity": "sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==", + "deprecated": "Glob versions prior to v9 are no longer supported", "dev": true, + "license": "ISC", "dependencies": { - "foreground-child": "^3.1.0", - "jackspeak": "^2.3.6", - "minimatch": "^9.0.1", - "minipass": "^7.0.4", - "path-scurry": "^1.10.2" - }, - "bin": { - "glob": "dist/esm/bin.mjs" + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^5.0.1", + "once": "^1.3.0" }, "engines": { - "node": ">=16 || 14 >=14.17" + "node": ">=12" }, "funding": { "url": "https://github.com/sponsors/isaacs" @@ -8185,6 +7678,7 @@ "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", "dev": true, + "license": "ISC", "dependencies": { "is-glob": "^4.0.3" }, @@ -8192,11 +7686,26 @@ "node": ">=10.13.0" } }, + "node_modules/glob/node_modules/minimatch": { + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", + "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/global-dirs": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/global-dirs/-/global-dirs-3.0.1.tgz", "integrity": "sha512-NBcGGFbBA9s1VzD41QXDG+3++t9Mn5t1FpLdhESY6oKY4gYTFpX4wO3sqGUa0Srjtbfj3szX0RnemmrVRUdULA==", "dev": true, + "license": "MIT", + "peer": true, "dependencies": { "ini": "2.0.0" }, @@ -8212,6 +7721,7 @@ "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", "dev": true, + "license": "MIT", "dependencies": { "type-fest": "^0.20.2" }, @@ -8222,43 +7732,12 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/globals/node_modules/type-fest": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", - "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/globby": { - "version": "11.1.0", - "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", - "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", - "dev": true, - "dependencies": { - "array-union": "^2.1.0", - "dir-glob": "^3.0.1", - "fast-glob": "^3.2.9", - "ignore": "^5.2.0", - "merge2": "^1.4.1", - "slash": "^3.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/gopd": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", "dev": true, + "license": "MIT", "dependencies": { "get-intrinsic": "^1.1.3" }, @@ -8269,19 +7748,23 @@ "node_modules/graceful-fs": { "version": "4.2.11", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", - "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==" + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", + "license": "ISC" }, "node_modules/graphemer": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/has-ansi": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-4.0.1.tgz", "integrity": "sha512-Qr4RtTm30xvEdqUXbSBVWDu+PrTokJOwe/FU+VdfJPk+MXAPoeOzKpRyrDTnZIJwAkQ4oBLTU53nu0HrkF/Z2A==", "dev": true, + "license": "MIT", + "peer": true, "dependencies": { "ansi-regex": "^4.1.0" }, @@ -8289,10 +7772,22 @@ "node": ">=8" } }, + "node_modules/has-ansi/node_modules/ansi-regex": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.1.tgz", + "integrity": "sha512-ILlv4k/3f6vfQ4OoP2AGvirOktlQ98ZEL1k9FaQjxa3L1abBgbuTDAdPOpvbGncC0BTVQrl+OM8xZGK6tWXt7g==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=6" + } + }, "node_modules/has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "license": "MIT", "engines": { "node": ">=8" } @@ -8302,6 +7797,7 @@ "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==", "dev": true, + "license": "MIT", "dependencies": { "es-define-property": "^1.0.0" }, @@ -8314,6 +7810,7 @@ "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.3.tgz", "integrity": "sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==", "dev": true, + "license": "MIT", "engines": { "node": ">= 0.4" }, @@ -8326,6 +7823,7 @@ "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", "dev": true, + "license": "MIT", "engines": { "node": ">= 0.4" }, @@ -8338,6 +7836,7 @@ "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz", "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", "dev": true, + "license": "MIT", "dependencies": { "has-symbols": "^1.0.3" }, @@ -8352,6 +7851,7 @@ "version": "2.0.2", "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", + "license": "MIT", "dependencies": { "function-bind": "^1.1.2" }, @@ -8364,56 +7864,41 @@ "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", "dev": true, + "license": "MIT", "bin": { "he": "bin/he" } }, "node_modules/hermes-estree": { - "version": "0.15.0", - "resolved": "https://registry.npmjs.org/hermes-estree/-/hermes-estree-0.15.0.tgz", - "integrity": "sha512-lLYvAd+6BnOqWdnNbP/Q8xfl8LOGw4wVjfrNd9Gt8eoFzhNBRVD95n4l2ksfMVOoxuVyegs85g83KS9QOsxbVQ==", + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/hermes-estree/-/hermes-estree-0.23.1.tgz", + "integrity": "sha512-eT5MU3f5aVhTqsfIReZ6n41X5sYn4IdQL0nvz6yO+MMlPxw49aSARHLg/MSehQftyjnrE8X6bYregzSumqc6cg==", + "license": "MIT", "peer": true }, "node_modules/hermes-parser": { - "version": "0.15.0", - "resolved": "https://registry.npmjs.org/hermes-parser/-/hermes-parser-0.15.0.tgz", - "integrity": "sha512-Q1uks5rjZlE9RjMMjSUCkGrEIPI5pKJILeCtK1VmTj7U4pf3wVPoo+cxfu+s4cBAPy2JzikIIdCZgBoR6x7U1Q==", - "peer": true, - "dependencies": { - "hermes-estree": "0.15.0" - } - }, - "node_modules/hermes-profile-transformer": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/hermes-profile-transformer/-/hermes-profile-transformer-0.0.6.tgz", - "integrity": "sha512-cnN7bQUm65UWOy6cbGcCcZ3rpwW8Q/j4OP5aWRhEry4Z2t2aR1cjrbp0BS+KiBN0smvP1caBgAuxutvyvJILzQ==", + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/hermes-parser/-/hermes-parser-0.23.1.tgz", + "integrity": "sha512-oxl5h2DkFW83hT4DAUJorpah8ou4yvmweUzLJmmr6YV2cezduCdlil1AvU/a/xSsAFo4WUcNA4GoV5Bvq6JffA==", + "license": "MIT", "peer": true, "dependencies": { - "source-map": "^0.7.3" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/hermes-profile-transformer/node_modules/source-map": { - "version": "0.7.4", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.4.tgz", - "integrity": "sha512-l3BikUxvPOcn5E74dZiq5BGsTb5yEwhaTSzccU6t4sDOH8NWJCstKO5QT2CvtFoK6F0saL7p9xHAqHOlCPJygA==", - "peer": true, - "engines": { - "node": ">= 8" + "hermes-estree": "0.23.1" } }, "node_modules/hosted-git-info": { "version": "2.8.9", "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==", - "dev": true + "dev": true, + "license": "ISC", + "peer": true }, "node_modules/http-errors": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==", + "license": "MIT", "dependencies": { "depd": "2.0.0", "inherits": "2.0.4", @@ -8429,6 +7914,7 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", + "license": "MIT", "engines": { "node": ">= 0.8" } @@ -8438,6 +7924,7 @@ "resolved": "https://registry.npmjs.org/http-proxy/-/http-proxy-1.18.1.tgz", "integrity": "sha512-7mz/721AbnJwIVbnaSv1Cz3Am0ZLT/UBwkC92VlxhXv/k/BBQfM2fXElQNC27BVGr0uwUpplYPQM9LnaBMR5NQ==", "dev": true, + "license": "MIT", "dependencies": { "eventemitter3": "^4.0.0", "follow-redirects": "^1.0.0", @@ -8451,6 +7938,7 @@ "version": "7.0.2", "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-7.0.2.tgz", "integrity": "sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig==", + "license": "MIT", "dependencies": { "agent-base": "^7.1.0", "debug": "^4.3.4" @@ -8460,9 +7948,10 @@ } }, "node_modules/https-proxy-agent": { - "version": "7.0.4", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.4.tgz", - "integrity": "sha512-wlwpilI7YdjSkWaQ/7omYBMTliDcmCN8OLihO6I9B86g06lMyAoqgoDpV0XqoaPOKj+0DIdAvnsWfyAAhmimcg==", + "version": "7.0.5", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.5.tgz", + "integrity": "sha512-1e4Wqeblerz+tMKPIq2EMGiiWW1dIjZOksyHWSUm1rmuvw/how9hBHZ38lAGj5ID4Ik6EdkOw7NmWPy6LAwalw==", + "license": "MIT", "dependencies": { "agent-base": "^7.0.2", "debug": "4" @@ -8475,6 +7964,7 @@ "version": "2.1.0", "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==", + "license": "Apache-2.0", "peer": true, "engines": { "node": ">=10.17.0" @@ -8484,6 +7974,7 @@ "version": "1.2.1", "resolved": "https://registry.npmjs.org/humanize-ms/-/humanize-ms-1.2.1.tgz", "integrity": "sha512-Fl70vYtsAFb/C06PTS9dZBo7ihau+Tu/DNCk/OyHhea07S+aeMWpFFkUaXRa8fI+ScZbEI8dfSxwY7gxZ9SAVQ==", + "license": "MIT", "dependencies": { "ms": "^2.0.0" } @@ -8493,6 +7984,7 @@ "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", "dev": true, + "license": "MIT", "dependencies": { "safer-buffer": ">= 2.1.2 < 3" }, @@ -8517,13 +8009,15 @@ "type": "consulting", "url": "https://feross.org/support" } - ] + ], + "license": "BSD-3-Clause" }, "node_modules/ignore": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.1.tgz", - "integrity": "sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw==", + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", + "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", "dev": true, + "license": "MIT", "engines": { "node": ">= 4" } @@ -8532,6 +8026,7 @@ "version": "1.1.1", "resolved": "https://registry.npmjs.org/image-size/-/image-size-1.1.1.tgz", "integrity": "sha512-541xKlUw6jr/6gGuk92F+mYM5zaFAc5ahphvkqvNe2bQ6gVBkd6bfrmVJ2t4KDAfikAYZyIqTnktX3i6/aQDrQ==", + "license": "MIT", "peer": true, "dependencies": { "queue": "6.0.2" @@ -8548,6 +8043,7 @@ "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", "dev": true, + "license": "MIT", "dependencies": { "parent-module": "^1.0.0", "resolve-from": "^4.0.0" @@ -8563,6 +8059,7 @@ "version": "0.1.4", "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", + "license": "MIT", "engines": { "node": ">=0.8.19" } @@ -8572,6 +8069,8 @@ "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==", "dev": true, + "license": "MIT", + "peer": true, "engines": { "node": ">=8" } @@ -8580,6 +8079,8 @@ "version": "1.0.6", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "deprecated": "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.", + "license": "ISC", "dependencies": { "once": "^1.3.0", "wrappy": "1" @@ -8588,13 +8089,16 @@ "node_modules/inherits": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "license": "ISC" }, "node_modules/ini": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ini/-/ini-2.0.0.tgz", "integrity": "sha512-7PnF4oN3CvZF23ADhA5wRaYEQpJ8qygSkbtTXWBeXWXmEVRXK+1ITciHWwHhsjv1TmW0MgacIv6hEi5pX5NQdA==", "dev": true, + "license": "ISC", + "peer": true, "engines": { "node": ">=10" } @@ -8603,6 +8107,7 @@ "version": "2.2.4", "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz", "integrity": "sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==", + "license": "MIT", "peer": true, "dependencies": { "loose-envify": "^1.0.0" @@ -8612,6 +8117,7 @@ "version": "9.0.5", "resolved": "https://registry.npmjs.org/ip-address/-/ip-address-9.0.5.tgz", "integrity": "sha512-zHtQzGojZXTwZTHQqra+ETKd4Sn3vgi7uBmlPoXVWZqYvuKmtI0l/VZTjqGmJY9x88GGOaZ9+G9ES8hC4T4X8g==", + "license": "MIT", "dependencies": { "jsbn": "1.1.0", "sprintf-js": "^1.1.3" @@ -8623,13 +8129,15 @@ "node_modules/ip-address/node_modules/sprintf-js": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.1.3.tgz", - "integrity": "sha512-Oo+0REFV59/rz3gfJNKQiBlwfHaSESl1pcGyABQsnnIfWOFt6JNj5gCog2U6MLZ//IGYD+nA8nI+mTShREReaA==" + "integrity": "sha512-Oo+0REFV59/rz3gfJNKQiBlwfHaSESl1pcGyABQsnnIfWOFt6JNj5gCog2U6MLZ//IGYD+nA8nI+mTShREReaA==", + "license": "BSD-3-Clause" }, "node_modules/is-arguments": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.1.1.tgz", "integrity": "sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA==", "dev": true, + "license": "MIT", "dependencies": { "call-bind": "^1.0.2", "has-tostringtag": "^1.0.0" @@ -8644,13 +8152,16 @@ "node_modules/is-arrayish": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", - "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==" + "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==", + "license": "MIT", + "peer": true }, "node_modules/is-binary-path": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", "dev": true, + "license": "MIT", "dependencies": { "binary-extensions": "^2.0.0" }, @@ -8658,27 +8169,16 @@ "node": ">=8" } }, - "node_modules/is-builtin-module": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-3.2.1.tgz", - "integrity": "sha512-BSLE3HnV2syZ0FK0iMA/yUGplUeMmNz4AW5fnTunbCIqZi4vG3WjJT9FHMy5D69xmAYBHXQhJdALdpwVxV501A==", - "dev": true, + "node_modules/is-core-module": { + "version": "2.15.1", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.15.1.tgz", + "integrity": "sha512-z0vtXSwucUJtANQWldhbtbt7BnL0vxiFjIdDLAatwhDYty2bad6s+rijD6Ri4YuYJubLzIJLUidCh09e1djEVQ==", + "license": "MIT", "dependencies": { - "builtin-modules": "^3.3.0" + "hasown": "^2.0.2" }, "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/is-core-module": { - "version": "2.13.1", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.13.1.tgz", - "integrity": "sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw==", - "dependencies": { - "hasown": "^2.0.0" + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -8689,6 +8189,7 @@ "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.5.tgz", "integrity": "sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==", "dev": true, + "license": "MIT", "dependencies": { "has-tostringtag": "^1.0.0" }, @@ -8703,6 +8204,7 @@ "version": "0.3.1", "resolved": "https://registry.npmjs.org/is-directory/-/is-directory-0.3.1.tgz", "integrity": "sha512-yVChGzahRFvbkscn2MlwGismPO12i9+znNruC5gVEntG3qu0xQMzsGg/JFbrsqDOHtHFPci+V5aP5T9I+yeKqw==", + "license": "MIT", "peer": true, "engines": { "node": ">=0.10.0" @@ -8712,6 +8214,7 @@ "version": "2.2.1", "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-2.2.1.tgz", "integrity": "sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==", + "license": "MIT", "peer": true, "bin": { "is-docker": "cli.js" @@ -8728,6 +8231,7 @@ "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=0.10.0" } @@ -8736,22 +8240,17 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "license": "MIT", "engines": { "node": ">=8" } }, - "node_modules/is-generator": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/is-generator/-/is-generator-1.0.3.tgz", - "integrity": "sha512-G56jBpbJeg7ds83HW1LuShNs8J73Fv3CPz/bmROHOHlnKkN8sWb9ujiagjmxxMUywftgq48HlBZELKKqFLk0oA==", - "dev": true, - "peer": true - }, "node_modules/is-glob": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", "dev": true, + "license": "MIT", "dependencies": { "is-extglob": "^2.1.1" }, @@ -8764,6 +8263,8 @@ "resolved": "https://registry.npmjs.org/is-installed-globally/-/is-installed-globally-0.4.0.tgz", "integrity": "sha512-iwGqO3J21aaSkC7jWnHP/difazwS7SFeIqxv6wEtLU8Y5KlzFTjyqcSIT0d8s4+dDhKytsk9PJZ2BkS5eZwQRQ==", "dev": true, + "license": "MIT", + "peer": true, "dependencies": { "global-dirs": "^3.0.0", "is-path-inside": "^3.0.2" @@ -8775,25 +8276,25 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/is-interactive": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-interactive/-/is-interactive-1.0.0.tgz", - "integrity": "sha512-2HvIEKRoqS62guEC+qBjpvRubdX910WCMuJTZ+I9yvqKU2/12eSL549HMwtabb4oupdj2sMP50k+XJfB/8JE6w==", - "peer": true, - "engines": { - "node": ">=8" - } - }, "node_modules/is-module": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-module/-/is-module-1.0.0.tgz", "integrity": "sha512-51ypPSPCoTEIN9dy5Oy+h4pShgJmPCygKfyRCISBI+JoWT/2oJvK8QPxmwv7b/p239jXrm9M1mlQbyKJ5A152g==", - "dev": true + "dev": true, + "license": "MIT" + }, + "node_modules/is-node-process": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/is-node-process/-/is-node-process-1.2.0.tgz", + "integrity": "sha512-Vg4o6/fqPxIjtxgUH5QLJhwZ7gW5diGCVlXpuUfELC62CuxM1iHcRe51f2W1FDy04Ai4KJkagKjx3XaqyfRKXw==", + "dev": true, + "license": "MIT" }, "node_modules/is-number": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "license": "MIT", "engines": { "node": ">=0.12.0" } @@ -8803,6 +8304,7 @@ "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } @@ -8812,6 +8314,7 @@ "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } @@ -8820,6 +8323,7 @@ "version": "2.0.4", "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "license": "MIT", "peer": true, "dependencies": { "isobject": "^3.0.1" @@ -8833,6 +8337,7 @@ "resolved": "https://registry.npmjs.org/is-reference/-/is-reference-1.2.1.tgz", "integrity": "sha512-U82MsXXiFIrjCK4otLT+o2NA2Cd2g5MLoOVXUZjIOhLurrRxpEXzI8O0KZHr3IjLvlAH1kTPYSuqer5T9ZVBKQ==", "dev": true, + "license": "MIT", "dependencies": { "@types/estree": "*" } @@ -8842,6 +8347,7 @@ "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==", "dev": true, + "license": "MIT", "dependencies": { "call-bind": "^1.0.2", "has-tostringtag": "^1.0.0" @@ -8857,6 +8363,8 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", + "license": "MIT", + "peer": true, "engines": { "node": ">=8" }, @@ -8868,6 +8376,8 @@ "version": "0.1.0", "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", + "dev": true, + "license": "MIT", "engines": { "node": ">=10" }, @@ -8879,6 +8389,7 @@ "version": "2.2.0", "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz", "integrity": "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==", + "license": "MIT", "peer": true, "dependencies": { "is-docker": "^2.0.0" @@ -8888,16 +8399,18 @@ } }, "node_modules/isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==", - "peer": true + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha512-D2S+3GLxWH+uhrNEcoh/fnmYeP8E8/zHl644d/jdA0g2uyXvy3sb0qxotE+ne0LtccHknQzWwZEzhak7oJ0COQ==", + "dev": true, + "license": "MIT" }, "node_modules/isbinaryfile": { "version": "4.0.10", "resolved": "https://registry.npmjs.org/isbinaryfile/-/isbinaryfile-4.0.10.tgz", "integrity": "sha512-iHrqe5shvBUcFbmZq9zOQHBoeOhZJu6RQGrDpBgenUm/Am+F3JM2MgQj+rK3Z601fzrL5gLZWtAPH2OBaSVcyw==", "dev": true, + "license": "MIT", "engines": { "node": ">= 8.0.0" }, @@ -8908,28 +8421,66 @@ "node_modules/isexe": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==" + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "license": "ISC" }, "node_modules/isobject": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", "integrity": "sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg==", + "license": "MIT", "peer": true, "engines": { "node": ">=0.10.0" } }, + "node_modules/istanbul-lib-coverage": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.2.tgz", + "integrity": "sha512-O8dpsF+r0WV/8MNRKfnmrtCWhuKjxrq2w+jpzBL5UZKTi2LeVWnWOmWRxFlesJONmc+wLAGvKQZEOanko0LFTg==", + "license": "BSD-3-Clause", + "peer": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/istanbul-lib-instrument": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-5.2.1.tgz", + "integrity": "sha512-pzqtp31nLv/XFOzXGuvhCb8qhjmTVo5vjVk19XE4CRlSWz0KoeJ3bw9XsA7nOp9YBf4qHjwBxkDzKcME/J29Yg==", + "license": "BSD-3-Clause", + "peer": true, + "dependencies": { + "@babel/core": "^7.12.3", + "@babel/parser": "^7.14.7", + "@istanbuljs/schema": "^0.1.2", + "istanbul-lib-coverage": "^3.2.0", + "semver": "^6.3.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/istanbul-lib-instrument/node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "license": "ISC", + "peer": true, + "bin": { + "semver": "bin/semver.js" + } + }, "node_modules/jackspeak": { - "version": "2.3.6", - "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-2.3.6.tgz", - "integrity": "sha512-N3yCS/NegsOBokc8GAdM8UcmfsKiSS8cipheD/nivzr700H+nsMOxJjQnvwOcRYVuFkdH0wGUvW2WbXGmrZGbQ==", + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-3.4.3.tgz", + "integrity": "sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==", "dev": true, + "license": "BlueOak-1.0.0", + "peer": true, "dependencies": { "@isaacs/cliui": "^8.0.2" }, - "engines": { - "node": ">=14" - }, "funding": { "url": "https://github.com/sponsors/isaacs" }, @@ -8942,6 +8493,7 @@ "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-29.7.0.tgz", "integrity": "sha512-LMIgiIrhigmPrs03JHpxUh2yISK3vLFPkAodPeo0+BuF7wA2FoQbkEg1u8gBYBThncu7e1oEDUfIXVuTqLRUjw==", "dev": true, + "license": "MIT", "dependencies": { "chalk": "^4.0.0", "diff-sequences": "^29.6.3", @@ -8956,6 +8508,7 @@ "version": "29.7.0", "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-29.7.0.tgz", "integrity": "sha512-DOSwCRqXirTOyheM+4d5YZOrWcdu0LNZ87ewUoywbcb2XR4wKgqiG8vNeYwhjFMbEkfju7wx2GYH0P2gevGvFw==", + "license": "MIT", "peer": true, "dependencies": { "@jest/environment": "^29.7.0", @@ -8973,8 +8526,35 @@ "version": "29.6.3", "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-29.6.3.tgz", "integrity": "sha512-zrteXnqYxfQh7l5FHyL38jL39di8H8rHoecLH3JNxH3BwOrBsNeabdap5e0I23lD4HHI8W5VFBZqG4Eaq5LNcw==", + "license": "MIT", + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-haste-map": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-29.7.0.tgz", + "integrity": "sha512-fP8u2pyfqx0K1rGn1R9pyE0/KTn+G7PxktWidOBTqFPLYX0b9ksaMFkhK5vrS3DVun09pckLdlx90QthlW7AmA==", + "license": "MIT", + "peer": true, + "dependencies": { + "@jest/types": "^29.6.3", + "@types/graceful-fs": "^4.1.3", + "@types/node": "*", + "anymatch": "^3.0.3", + "fb-watchman": "^2.0.0", + "graceful-fs": "^4.2.9", + "jest-regex-util": "^29.6.3", + "jest-util": "^29.7.0", + "jest-worker": "^29.7.0", + "micromatch": "^4.0.4", + "walker": "^1.0.8" + }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "optionalDependencies": { + "fsevents": "^2.3.2" } }, "node_modules/jest-matcher-utils": { @@ -8982,6 +8562,7 @@ "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-29.7.0.tgz", "integrity": "sha512-sBkD+Xi9DtcChsI3L3u0+N0opgPYnCRPtGcQYrgXmR+hmt/fYfWAL0xRXYU8eWOdfuLgBe0YCW3AFtnRLagq/g==", "dev": true, + "license": "MIT", "dependencies": { "chalk": "^4.0.0", "jest-diff": "^29.7.0", @@ -8996,6 +8577,7 @@ "version": "29.7.0", "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-29.7.0.tgz", "integrity": "sha512-GBEV4GRADeP+qtB2+6u61stea8mGcOT4mCtrYISZwfu9/ISHFJ/5zOMXYbpBE9RsS5+Gb63DW4FgmnKJ79Kf6w==", + "license": "MIT", "dependencies": { "@babel/code-frame": "^7.12.13", "@jest/types": "^29.6.3", @@ -9015,6 +8597,7 @@ "version": "29.7.0", "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-29.7.0.tgz", "integrity": "sha512-ITOMZn+UkYS4ZFh83xYAOzWStloNzJFO2s8DWrE4lhtGD+AorgnbkiKERe4wQVBydIGPx059g6riW5Btp6Llnw==", + "license": "MIT", "peer": true, "dependencies": { "@jest/types": "^29.6.3", @@ -9025,10 +8608,21 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, + "node_modules/jest-regex-util": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-29.6.3.tgz", + "integrity": "sha512-KJJBsRCyyLNWCNBOvZyRDnAIfUiRJ8v+hOBQYGn8gDyF3UegwiP4gwRR3/SDa42g1YbVycTidUF3rKjyLFDWbg==", + "license": "MIT", + "peer": true, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, "node_modules/jest-util": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.7.0.tgz", "integrity": "sha512-z6EbKajIpqGKU56y5KBUgy1dt1ihhQJgWzUlZHArA/+X2ad7Cb5iF+AK1EWVL/Bo7Rz9uurpqw6SiBCefUbCGA==", + "license": "MIT", "dependencies": { "@jest/types": "^29.6.3", "@types/node": "*", @@ -9041,10 +8635,23 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, + "node_modules/jest-util/node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "license": "MIT", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, "node_modules/jest-validate": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-29.7.0.tgz", "integrity": "sha512-ZB7wHqaRGVw/9hST/OuFUReG7M8vKeq0/J2egIGLdvjHCmYqGARhzXmtgi+gVeZ5uXFF219aOc3Ls2yLg27tkw==", + "license": "MIT", "peer": true, "dependencies": { "@jest/types": "^29.6.3", @@ -9054,14 +8661,28 @@ "leven": "^3.1.0", "pretty-format": "^29.7.0" }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-validate/node_modules/camelcase": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", + "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/jest-worker": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-29.7.0.tgz", "integrity": "sha512-eIz2msL/EzL9UFTFFx7jBTkeZfku0yUAyZZZmJ93H2TYEiroIx2PQjEXcwYtYl8zXCxb+PAmA2hLIt/6ZEkPHw==", + "license": "MIT", "peer": true, "dependencies": { "@types/node": "*", @@ -9073,28 +8694,33 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/joi": { - "version": "17.12.3", - "resolved": "https://registry.npmjs.org/joi/-/joi-17.12.3.tgz", - "integrity": "sha512-2RRziagf555owrm9IRVtdKynOBeITiDpuZqIpgwqXShPncPKNiRQoiGsl/T8SQdq+8ugRzH2LqY67irr2y/d+g==", + "node_modules/jest-worker/node_modules/supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "license": "MIT", "peer": true, "dependencies": { - "@hapi/hoek": "^9.3.0", - "@hapi/topo": "^5.1.0", - "@sideway/address": "^4.1.5", - "@sideway/formula": "^3.0.1", - "@sideway/pinpoint": "^2.0.0" + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" } }, "node_modules/js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", - "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==" + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "license": "MIT" }, "node_modules/js-yaml": { "version": "3.14.1", "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", + "license": "MIT", "dependencies": { "argparse": "^1.0.7", "esprima": "^4.0.0" @@ -9106,24 +8732,28 @@ "node_modules/jsbn": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-1.1.0.tgz", - "integrity": "sha512-4bYVV3aAMtDTTu4+xsDYa6sy9GyJ69/amsu9sYF2zqjiEoZA5xJi3BrfX3uY+/IekIu7MwdObdbDWpoZdBv3/A==" + "integrity": "sha512-4bYVV3aAMtDTTu4+xsDYa6sy9GyJ69/amsu9sYF2zqjiEoZA5xJi3BrfX3uY+/IekIu7MwdObdbDWpoZdBv3/A==", + "license": "MIT" }, "node_modules/jsc-android": { "version": "250231.0.0", "resolved": "https://registry.npmjs.org/jsc-android/-/jsc-android-250231.0.0.tgz", "integrity": "sha512-rS46PvsjYmdmuz1OAWXY/1kCYG7pnf1TBqeTiOJr1iDz7s5DLxxC9n/ZMknLDxzYzNVfI7R95MH10emSSG1Wuw==", + "license": "BSD-2-Clause", "peer": true }, "node_modules/jsc-safe-url": { "version": "0.2.4", "resolved": "https://registry.npmjs.org/jsc-safe-url/-/jsc-safe-url-0.2.4.tgz", "integrity": "sha512-0wM3YBWtYePOjfyXQH5MWQ8H7sdk5EXSwZvmSLKk2RboVQ2Bu239jycHDz5J/8Blf3K0Qnoy2b6xD+z10MFB+Q==", + "license": "0BSD", "peer": true }, "node_modules/jscodeshift": { "version": "0.14.0", "resolved": "https://registry.npmjs.org/jscodeshift/-/jscodeshift-0.14.0.tgz", "integrity": "sha512-7eCC1knD7bLUPuSCwXsMZUH51O8jIcoVyKtI6P0XM0IVzlGjckPy3FIwQlorzbN0Sg79oK+RlohN32Mqf/lrYA==", + "license": "MIT", "peer": true, "dependencies": { "@babel/core": "^7.13.16", @@ -9153,82 +8783,116 @@ "@babel/preset-env": "^7.1.6" } }, + "node_modules/jscodeshift/node_modules/write-file-atomic": { + "version": "2.4.3", + "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-2.4.3.tgz", + "integrity": "sha512-GaETH5wwsX+GcnzhPgKcKjJ6M2Cq3/iZp1WyY/X1CSqrW+jVNM9Y7D8EC2sM4ZG/V8wZlSniJnCKWPmBYAucRQ==", + "license": "ISC", + "peer": true, + "dependencies": { + "graceful-fs": "^4.1.11", + "imurmurhash": "^0.1.4", + "signal-exit": "^3.0.2" + } + }, "node_modules/jsesc": { - "version": "2.5.2", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", - "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-3.0.2.tgz", + "integrity": "sha512-xKqzzWXDttJuOcawBt4KnKHHIf5oQ/Cxax+0PWFG+DFDgHNAdi+TXECADI+RYiFUMmx8792xsMbbgXj4CwnP4g==", + "license": "MIT", "peer": true, "bin": { "jsesc": "bin/jsesc" }, "engines": { - "node": ">=4" + "node": ">=6" } }, "node_modules/json-buffer": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/json-parse-better-errors": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==", + "license": "MIT", "peer": true }, "node_modules/json-parse-even-better-errors": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", - "dev": true + "dev": true, + "license": "MIT", + "peer": true }, "node_modules/json-schema-traverse": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/json-stable-stringify-without-jsonify": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/json-stringify-safe": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", "integrity": "sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==", - "dev": true + "dev": true, + "license": "ISC" }, "node_modules/json5": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.2.tgz", - "integrity": "sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==", - "dev": true, - "optional": true, - "dependencies": { - "minimist": "^1.2.0" - }, + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", + "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", + "license": "MIT", + "peer": true, "bin": { "json5": "lib/cli.js" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/jsonfile": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", + "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", + "license": "MIT", + "dependencies": { + "universalify": "^2.0.0" + }, + "optionalDependencies": { + "graceful-fs": "^4.1.6" } }, "node_modules/just-extend": { "version": "4.2.1", "resolved": "https://registry.npmjs.org/just-extend/-/just-extend-4.2.1.tgz", "integrity": "sha512-g3UB796vUFIY90VIv/WX3L2c8CS2MdWUww3CNrYmqza1Fg0DURc2K/O4YrnklBdQarSJ/y8JnJYDGc+1iumQjg==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/karma": { "version": "6.4.3", "resolved": "https://registry.npmjs.org/karma/-/karma-6.4.3.tgz", "integrity": "sha512-LuucC/RE92tJ8mlCwqEoRWXP38UMAqpnq98vktmS9SznSoUPPUJQbc91dHcxcunROvfQjdORVA/YFviH+Xci9Q==", "dev": true, + "license": "MIT", "dependencies": { "@colors/colors": "1.5.0", "body-parser": "^1.19.0", - "braces": "^3.0.3", + "braces": "^3.0.2", "chokidar": "^3.5.1", "connect": "^3.7.0", "di": "^0.0.1", @@ -9263,6 +8927,7 @@ "resolved": "https://registry.npmjs.org/karma-chai/-/karma-chai-0.1.0.tgz", "integrity": "sha512-mqKCkHwzPMhgTYca10S90aCEX9+HjVjjrBFAsw36Zj7BlQNbokXXCAe6Ji04VUMsxcY5RLP7YphpfO06XOubdg==", "dev": true, + "license": "MIT", "peerDependencies": { "chai": "*", "karma": ">=0.10.9" @@ -9273,6 +8938,7 @@ "resolved": "https://registry.npmjs.org/karma-chrome-launcher/-/karma-chrome-launcher-3.2.0.tgz", "integrity": "sha512-rE9RkUPI7I9mAxByQWkGJFXfFD6lE4gC5nPuZdobf/QdTEJI6EU4yIay/cfU/xV4ZxlM5JiTv7zWYgA64NpS5Q==", "dev": true, + "license": "MIT", "dependencies": { "which": "^1.2.1" } @@ -9282,6 +8948,7 @@ "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", "dev": true, + "license": "ISC", "dependencies": { "isexe": "^2.0.0" }, @@ -9294,6 +8961,7 @@ "resolved": "https://registry.npmjs.org/karma-mocha/-/karma-mocha-2.0.1.tgz", "integrity": "sha512-Tzd5HBjm8his2OA4bouAsATYEpZrp9vC7z5E5j4C5Of5Rrs1jY67RAwXNcVmd/Bnk1wgvQRou0zGVLey44G4tQ==", "dev": true, + "license": "MIT", "dependencies": { "minimist": "^1.2.3" } @@ -9303,6 +8971,7 @@ "resolved": "https://registry.npmjs.org/karma-sinon-chai/-/karma-sinon-chai-2.0.2.tgz", "integrity": "sha512-SDgh6V0CUd+7ruL1d3yG6lFzmJNGRNQuEuCYXLaorruNP9nwQfA7hpsp4clx4CbOo5Gsajh3qUOT7CrVStUKMw==", "dev": true, + "license": "MIT", "peerDependencies": { "chai": ">=3.5.0", "sinon": ">=2.1.0", @@ -9314,6 +8983,7 @@ "resolved": "https://registry.npmjs.org/karma-sourcemap-loader/-/karma-sourcemap-loader-0.3.8.tgz", "integrity": "sha512-zorxyAakYZuBcHRJE+vbrK2o2JXLFWK8VVjiT/6P+ltLBUGUvqTEkUiQ119MGdOrK7mrmxXHZF1/pfT6GgIZ6g==", "dev": true, + "license": "MIT", "dependencies": { "graceful-fs": "^4.1.2" } @@ -9323,6 +8993,7 @@ "resolved": "https://registry.npmjs.org/karma-spec-reporter/-/karma-spec-reporter-0.0.32.tgz", "integrity": "sha512-ZXsYERZJMTNRR2F3QN11OWF5kgnT/K2dzhM+oY3CDyMrDI3TjIWqYGG7c15rR9wjmy9lvdC+CCshqn3YZqnNrA==", "dev": true, + "license": "MIT", "dependencies": { "colors": "^1.1.2" }, @@ -9335,6 +9006,7 @@ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "dev": true, + "license": "MIT", "dependencies": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -9344,7 +9016,9 @@ "version": "7.2.3", "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "deprecated": "Glob versions prior to v9 are no longer supported", "dev": true, + "license": "ISC", "dependencies": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", @@ -9365,6 +9039,7 @@ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", "dev": true, + "license": "ISC", "dependencies": { "brace-expansion": "^1.1.7" }, @@ -9372,23 +9047,12 @@ "node": "*" } }, - "node_modules/karma/node_modules/mkdirp": { - "version": "0.5.6", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz", - "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==", - "dev": true, - "dependencies": { - "minimist": "^1.2.6" - }, - "bin": { - "mkdirp": "bin/cmd.js" - } - }, "node_modules/keyv": { "version": "4.5.4", "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==", "dev": true, + "license": "MIT", "dependencies": { "json-buffer": "3.0.1" } @@ -9397,25 +9061,19 @@ "version": "6.0.3", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", + "license": "MIT", "peer": true, "engines": { "node": ">=0.10.0" } }, - "node_modules/kleur": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/kleur/-/kleur-3.0.3.tgz", - "integrity": "sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==", - "peer": true, - "engines": { - "node": ">=6" - } - }, "node_modules/knuth-shuffle-seeded": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/knuth-shuffle-seeded/-/knuth-shuffle-seeded-1.0.6.tgz", "integrity": "sha512-9pFH0SplrfyKyojCLxZfMcvkhf5hH0d+UwR9nTVJ/DDQJGuzcXjTwB7TP7sDfehSudlGGaOLblmEWqv04ERVWg==", "dev": true, + "license": "Apache-2.0", + "peer": true, "dependencies": { "seed-random": "~2.2.0" } @@ -9424,6 +9082,7 @@ "version": "3.1.0", "resolved": "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz", "integrity": "sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==", + "license": "MIT", "peer": true, "engines": { "node": ">=6" @@ -9434,6 +9093,7 @@ "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", "dev": true, + "license": "MIT", "dependencies": { "prelude-ls": "^1.2.1", "type-check": "~0.4.0" @@ -9446,6 +9106,7 @@ "version": "1.4.2", "resolved": "https://registry.npmjs.org/lighthouse-logger/-/lighthouse-logger-1.4.2.tgz", "integrity": "sha512-gPWxznF6TKmUHrOQjlVo2UbaL2EJ71mb2CCeRs/2qBpi4L/g4LUVc9+3lKQ6DTUZwJswfM7ainGrLO1+fOqa2g==", + "license": "Apache-2.0", "peer": true, "dependencies": { "debug": "^2.6.9", @@ -9456,6 +9117,7 @@ "version": "2.6.9", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "license": "MIT", "peer": true, "dependencies": { "ms": "2.0.0" @@ -9465,287 +9127,121 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "license": "MIT", "peer": true }, "node_modules/lil-uuid": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/lil-uuid/-/lil-uuid-0.1.1.tgz", - "integrity": "sha512-GhWI8f61tBlMeqULZ1QWhFiiyFIFdPlg//S8Udq1wjq1FJhpFKTfnbduSxAQjueofeUtpr7UvQ/lIK/sKUF8dg==" + "integrity": "sha512-GhWI8f61tBlMeqULZ1QWhFiiyFIFdPlg//S8Udq1wjq1FJhpFKTfnbduSxAQjueofeUtpr7UvQ/lIK/sKUF8dg==", + "license": "MIT" }, "node_modules/lines-and-columns": { "version": "1.2.4", "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", - "dev": true - }, - "node_modules/locate-path": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", - "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", - "dependencies": { - "p-locate": "^5.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/lodash": { - "version": "4.17.21", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", - "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", - "dev": true - }, - "node_modules/lodash.debounce": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz", - "integrity": "sha512-FT1yDzDYEoYWhnSGnpE/4Kj1fLZkDFyqRb7fNt6FdYOSxlUWAtp42Eh6Wb0rGIv/m9Bgo7x4GhQbm5Ys4SG5ow==", - "peer": true - }, - "node_modules/lodash.merge": { - "version": "4.6.2", - "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", - "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", - "dev": true - }, - "node_modules/lodash.mergewith": { - "version": "4.6.2", - "resolved": "https://registry.npmjs.org/lodash.mergewith/-/lodash.mergewith-4.6.2.tgz", - "integrity": "sha512-GK3g5RPZWTRSeLSpgP8Xhra+pnjBC56q9FZYe1d5RN3TJ35dbkGy3YqBSMbyCrlbi+CM9Z3Jk5yTL7RCsqboyQ==", - "dev": true - }, - "node_modules/lodash.throttle": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/lodash.throttle/-/lodash.throttle-4.1.1.tgz", - "integrity": "sha512-wIkUCfVKpVsWo3JSZlc+8MB5it+2AN5W8J7YVMST30UrvcQNZ1Okbj+rbVniijTWE6FGYy4XJq/rHkas8qJMLQ==", - "peer": true - }, - "node_modules/log-symbols": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", - "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", - "dependencies": { - "chalk": "^4.1.0", - "is-unicode-supported": "^0.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/log4js": { - "version": "6.9.1", - "resolved": "https://registry.npmjs.org/log4js/-/log4js-6.9.1.tgz", - "integrity": "sha512-1somDdy9sChrr9/f4UlzhdaGfDR2c/SaD2a4T7qEkG4jTS57/B3qmnjLYePwQ8cqWnUHZI0iAKxMBpCZICiZ2g==", "dev": true, - "dependencies": { - "date-format": "^4.0.14", - "debug": "^4.3.4", - "flatted": "^3.2.7", - "rfdc": "^1.3.0", - "streamroller": "^3.1.5" - }, - "engines": { - "node": ">=8.0" - } - }, - "node_modules/logkitty": { - "version": "0.7.1", - "resolved": "https://registry.npmjs.org/logkitty/-/logkitty-0.7.1.tgz", - "integrity": "sha512-/3ER20CTTbahrCrpYfPn7Xavv9diBROZpoXGVZDWMw4b/X4uuUwAC0ki85tgsdMRONURyIJbcOvS94QsUBYPbQ==", - "peer": true, - "dependencies": { - "ansi-fragments": "^0.2.1", - "dayjs": "^1.8.15", - "yargs": "^15.1.0" - }, - "bin": { - "logkitty": "bin/logkitty.js" - } - }, - "node_modules/logkitty/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "peer": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/logkitty/node_modules/camelcase": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", - "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", - "peer": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/logkitty/node_modules/cliui": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz", - "integrity": "sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==", - "peer": true, - "dependencies": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", - "wrap-ansi": "^6.2.0" - } - }, - "node_modules/logkitty/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "peer": true, - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/logkitty/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "license": "MIT", "peer": true }, - "node_modules/logkitty/node_modules/decamelize": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", - "integrity": "sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==", - "peer": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/logkitty/node_modules/find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", - "peer": true, - "dependencies": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/logkitty/node_modules/locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", - "peer": true, - "dependencies": { - "p-locate": "^4.1.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/logkitty/node_modules/p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "peer": true, - "dependencies": { - "p-try": "^2.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/logkitty/node_modules/p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", - "peer": true, - "dependencies": { - "p-limit": "^2.2.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/logkitty/node_modules/wrap-ansi": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", - "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", - "peer": true, + "node_modules/locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "dev": true, + "license": "MIT", "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" + "p-locate": "^5.0.0" }, "engines": { - "node": ">=8" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/logkitty/node_modules/y18n": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz", - "integrity": "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==", + "node_modules/lodash": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", + "dev": true, + "license": "MIT" + }, + "node_modules/lodash.debounce": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz", + "integrity": "sha512-FT1yDzDYEoYWhnSGnpE/4Kj1fLZkDFyqRb7fNt6FdYOSxlUWAtp42Eh6Wb0rGIv/m9Bgo7x4GhQbm5Ys4SG5ow==", + "license": "MIT", "peer": true }, - "node_modules/logkitty/node_modules/yargs": { - "version": "15.4.1", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-15.4.1.tgz", - "integrity": "sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==", - "peer": true, + "node_modules/lodash.merge": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/lodash.mergewith": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/lodash.mergewith/-/lodash.mergewith-4.6.2.tgz", + "integrity": "sha512-GK3g5RPZWTRSeLSpgP8Xhra+pnjBC56q9FZYe1d5RN3TJ35dbkGy3YqBSMbyCrlbi+CM9Z3Jk5yTL7RCsqboyQ==", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/lodash.throttle": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/lodash.throttle/-/lodash.throttle-4.1.1.tgz", + "integrity": "sha512-wIkUCfVKpVsWo3JSZlc+8MB5it+2AN5W8J7YVMST30UrvcQNZ1Okbj+rbVniijTWE6FGYy4XJq/rHkas8qJMLQ==", + "license": "MIT", + "peer": true + }, + "node_modules/log-symbols": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", + "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", + "dev": true, + "license": "MIT", "dependencies": { - "cliui": "^6.0.0", - "decamelize": "^1.2.0", - "find-up": "^4.1.0", - "get-caller-file": "^2.0.1", - "require-directory": "^2.1.1", - "require-main-filename": "^2.0.0", - "set-blocking": "^2.0.0", - "string-width": "^4.2.0", - "which-module": "^2.0.0", - "y18n": "^4.0.0", - "yargs-parser": "^18.1.2" + "chalk": "^4.1.0", + "is-unicode-supported": "^0.1.0" }, "engines": { - "node": ">=8" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/logkitty/node_modules/yargs-parser": { - "version": "18.1.3", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-18.1.3.tgz", - "integrity": "sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==", - "peer": true, + "node_modules/log4js": { + "version": "6.9.1", + "resolved": "https://registry.npmjs.org/log4js/-/log4js-6.9.1.tgz", + "integrity": "sha512-1somDdy9sChrr9/f4UlzhdaGfDR2c/SaD2a4T7qEkG4jTS57/B3qmnjLYePwQ8cqWnUHZI0iAKxMBpCZICiZ2g==", + "dev": true, + "license": "Apache-2.0", "dependencies": { - "camelcase": "^5.0.0", - "decamelize": "^1.2.0" + "date-format": "^4.0.14", + "debug": "^4.3.4", + "flatted": "^3.2.7", + "rfdc": "^1.3.0", + "streamroller": "^3.1.5" }, "engines": { - "node": ">=6" + "node": ">=8.0" } }, "node_modules/lolex": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/lolex/-/lolex-4.2.0.tgz", "integrity": "sha512-gKO5uExCXvSm6zbF562EvM+rd1kQDnB9AZBbiQVzf1ZmdDpxUSvpnAaVOP83N/31mRK8Ml8/VE8DMvsAZQ+7wg==", - "dev": true + "dev": true, + "license": "BSD-3-Clause" }, "node_modules/loose-envify": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", + "license": "MIT", "peer": true, "dependencies": { "js-tokens": "^3.0.0 || ^4.0.0" @@ -9759,6 +9255,7 @@ "resolved": "https://registry.npmjs.org/loupe/-/loupe-2.3.7.tgz", "integrity": "sha512-zSMINGVYkdpYSOBmLi0D1Uo7JU9nVdQKrHxC8eYlV+9YKK9WePqAlL7lSlorG/U2Fw1w0hTBmaa/jrQ3UbPHtA==", "dev": true, + "license": "MIT", "dependencies": { "get-func-name": "^2.0.1" } @@ -9768,17 +9265,19 @@ "resolved": "https://registry.npmjs.org/lower-case/-/lower-case-2.0.2.tgz", "integrity": "sha512-7fm3l3NAF9WfN6W3JOmf5drwpVqX78JtoGJ3A6W0a6ZnldM41w2fV5D490psKFTpMds8TJse/eHLFFsNHHjHgg==", "dev": true, + "license": "MIT", + "peer": true, "dependencies": { "tslib": "^2.0.3" } }, "node_modules/lru-cache": { - "version": "10.2.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.2.0.tgz", - "integrity": "sha512-2bIM8x+VAf6JT4bKAljS1qUWgMsqZRPGJS6FSahIMPVvctcNhyVp7AJu7quxOW9jwkryBReKZY5tY5JYv2n/7Q==", - "dev": true, + "version": "7.18.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.18.3.tgz", + "integrity": "sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA==", + "license": "ISC", "engines": { - "node": "14 || >=16.14" + "node": ">=12" } }, "node_modules/luxon": { @@ -9786,23 +9285,27 @@ "resolved": "https://registry.npmjs.org/luxon/-/luxon-3.2.1.tgz", "integrity": "sha512-QrwPArQCNLAKGO/C+ZIilgIuDnEnKx5QYODdDtbFaxzsbZcc/a7WFq7MhsVYgRlwawLtvOUESTlfJ+hc/USqPg==", "dev": true, + "license": "MIT", + "peer": true, "engines": { "node": ">=12" } }, "node_modules/magic-string": { - "version": "0.30.10", - "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.10.tgz", - "integrity": "sha512-iIRwTIf0QKV3UAnYK4PU8uiEc4SRh5jX0mwpIwETPpHdhVM4f53RSwS/vXvN1JhGX+Cs7B8qIq3d6AH49O5fAQ==", + "version": "0.30.12", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.12.tgz", + "integrity": "sha512-Ea8I3sQMVXr8JhN4z+H/d8zwo+tYDgHE9+5G4Wnrwhs0gaK9fXTKx0Tw5Xwsd/bCPTTZNRAdpyzvoeORe9LYpw==", "dev": true, + "license": "MIT", "dependencies": { - "@jridgewell/sourcemap-codec": "^1.4.15" + "@jridgewell/sourcemap-codec": "^1.5.0" } }, "node_modules/make-dir": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz", "integrity": "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==", + "license": "MIT", "peer": true, "dependencies": { "pify": "^4.0.1", @@ -9816,6 +9319,7 @@ "version": "5.7.2", "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", + "license": "ISC", "peer": true, "bin": { "semver": "bin/semver" @@ -9825,12 +9329,14 @@ "version": "1.3.6", "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", - "dev": true + "dev": true, + "license": "ISC" }, "node_modules/makeerror": { "version": "1.0.12", "resolved": "https://registry.npmjs.org/makeerror/-/makeerror-1.0.12.tgz", "integrity": "sha512-JmqCvUhmt43madlpFzG4BQzG2Z3m6tvQDNKdClZnO3VbIudJYmxsT0FNJMeiB2+JTSlTQTSbU8QdesVmwJcmLg==", + "license": "BSD-3-Clause", "peer": true, "dependencies": { "tmpl": "1.0.5" @@ -9840,6 +9346,7 @@ "version": "1.2.5", "resolved": "https://registry.npmjs.org/marky/-/marky-1.2.5.tgz", "integrity": "sha512-q9JtQJKjpsVxCRVgQ+WapguSbKC3SQ5HEzFGPAJMStgh3QjCawp00UKv3MTTAArTmGmmPUvllHZoNbZ3gs0I+Q==", + "license": "Apache-2.0", "peer": true }, "node_modules/media-typer": { @@ -9847,6 +9354,7 @@ "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", "integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==", "dev": true, + "license": "MIT", "engines": { "node": ">= 0.6" } @@ -9855,12 +9363,14 @@ "version": "5.2.1", "resolved": "https://registry.npmjs.org/memoize-one/-/memoize-one-5.2.1.tgz", "integrity": "sha512-zYiwtZUcYyXKo/np96AGZAckk+FWWsUdJ3cHGGmld7+AhvcWmQyGCYUh1hc4Q/pkOhb65dQR/pqCyK0cOaHz4Q==", + "license": "MIT", "peer": true }, "node_modules/merge-stream": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", + "license": "MIT", "peer": true }, "node_modules/merge2": { @@ -9868,23 +9378,25 @@ "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", "dev": true, + "license": "MIT", "engines": { "node": ">= 8" } }, "node_modules/metro": { - "version": "0.80.8", - "resolved": "https://registry.npmjs.org/metro/-/metro-0.80.8.tgz", - "integrity": "sha512-in7S0W11mg+RNmcXw+2d9S3zBGmCARDxIwoXJAmLUQOQoYsRP3cpGzyJtc7WOw8+FXfpgXvceD0u+PZIHXEL7g==", - "peer": true, - "dependencies": { - "@babel/code-frame": "^7.0.0", - "@babel/core": "^7.20.0", - "@babel/generator": "^7.20.0", - "@babel/parser": "^7.20.0", - "@babel/template": "^7.0.0", - "@babel/traverse": "^7.20.0", - "@babel/types": "^7.20.0", + "version": "0.81.0", + "resolved": "https://registry.npmjs.org/metro/-/metro-0.81.0.tgz", + "integrity": "sha512-kzdzmpL0gKhEthZ9aOV7sTqvg6NuTxDV8SIm9pf9sO8VVEbKrQk5DNcwupOUjgPPFAuKUc2NkT0suyT62hm2xg==", + "license": "MIT", + "peer": true, + "dependencies": { + "@babel/code-frame": "^7.24.7", + "@babel/core": "^7.25.2", + "@babel/generator": "^7.25.0", + "@babel/parser": "^7.25.3", + "@babel/template": "^7.25.0", + "@babel/traverse": "^7.25.3", + "@babel/types": "^7.25.2", "accepts": "^1.3.7", "chalk": "^4.0.0", "ci-info": "^2.0.0", @@ -9892,134 +9404,149 @@ "debug": "^2.2.0", "denodeify": "^1.2.1", "error-stack-parser": "^2.0.6", + "flow-enums-runtime": "^0.0.6", "graceful-fs": "^4.2.4", - "hermes-parser": "0.20.1", + "hermes-parser": "0.24.0", "image-size": "^1.0.2", "invariant": "^2.2.4", "jest-worker": "^29.6.3", "jsc-safe-url": "^0.2.2", "lodash.throttle": "^4.1.1", - "metro-babel-transformer": "0.80.8", - "metro-cache": "0.80.8", - "metro-cache-key": "0.80.8", - "metro-config": "0.80.8", - "metro-core": "0.80.8", - "metro-file-map": "0.80.8", - "metro-resolver": "0.80.8", - "metro-runtime": "0.80.8", - "metro-source-map": "0.80.8", - "metro-symbolicate": "0.80.8", - "metro-transform-plugins": "0.80.8", - "metro-transform-worker": "0.80.8", + "metro-babel-transformer": "0.81.0", + "metro-cache": "0.81.0", + "metro-cache-key": "0.81.0", + "metro-config": "0.81.0", + "metro-core": "0.81.0", + "metro-file-map": "0.81.0", + "metro-resolver": "0.81.0", + "metro-runtime": "0.81.0", + "metro-source-map": "0.81.0", + "metro-symbolicate": "0.81.0", + "metro-transform-plugins": "0.81.0", + "metro-transform-worker": "0.81.0", "mime-types": "^2.1.27", - "node-fetch": "^2.2.0", "nullthrows": "^1.1.1", - "rimraf": "^3.0.2", "serialize-error": "^2.1.0", "source-map": "^0.5.6", "strip-ansi": "^6.0.0", "throat": "^5.0.0", - "ws": "^7.5.1", + "ws": "^7.5.10", "yargs": "^17.6.2" }, "bin": { "metro": "src/cli.js" }, "engines": { - "node": ">=18" + "node": ">=18.18" } }, "node_modules/metro-babel-transformer": { - "version": "0.80.8", - "resolved": "https://registry.npmjs.org/metro-babel-transformer/-/metro-babel-transformer-0.80.8.tgz", - "integrity": "sha512-TTzNwRZb2xxyv4J/+yqgtDAP2qVqH3sahsnFu6Xv4SkLqzrivtlnyUbaeTdJ9JjtADJUEjCbgbFgUVafrXdR9Q==", + "version": "0.81.0", + "resolved": "https://registry.npmjs.org/metro-babel-transformer/-/metro-babel-transformer-0.81.0.tgz", + "integrity": "sha512-Dc0QWK4wZIeHnyZ3sevWGTnnSkIDDn/SWyfrn99zbKbDOCoCYy71PAn9uCRrP/hduKLJQOy+tebd63Rr9D8tXg==", + "license": "MIT", "peer": true, "dependencies": { - "@babel/core": "^7.20.0", - "hermes-parser": "0.20.1", + "@babel/core": "^7.25.2", + "flow-enums-runtime": "^0.0.6", + "hermes-parser": "0.24.0", "nullthrows": "^1.1.1" }, "engines": { - "node": ">=18" + "node": ">=18.18" } }, "node_modules/metro-babel-transformer/node_modules/hermes-estree": { - "version": "0.20.1", - "resolved": "https://registry.npmjs.org/hermes-estree/-/hermes-estree-0.20.1.tgz", - "integrity": "sha512-SQpZK4BzR48kuOg0v4pb3EAGNclzIlqMj3Opu/mu7bbAoFw6oig6cEt/RAi0zTFW/iW6Iz9X9ggGuZTAZ/yZHg==", + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/hermes-estree/-/hermes-estree-0.24.0.tgz", + "integrity": "sha512-LyoXLB7IFzeZW0EvAbGZacbxBN7t6KKSDqFJPo3Ydow7wDlrDjXwsdiAHV6XOdvEN9MEuWXsSIFN4tzpyrXIHw==", + "license": "MIT", "peer": true }, "node_modules/metro-babel-transformer/node_modules/hermes-parser": { - "version": "0.20.1", - "resolved": "https://registry.npmjs.org/hermes-parser/-/hermes-parser-0.20.1.tgz", - "integrity": "sha512-BL5P83cwCogI8D7rrDCgsFY0tdYUtmFP9XaXtl2IQjC+2Xo+4okjfXintlTxcIwl4qeGddEl28Z11kbVIw0aNA==", + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/hermes-parser/-/hermes-parser-0.24.0.tgz", + "integrity": "sha512-IJooSvvu2qNRe7oo9Rb04sUT4omtZqZqf9uq9WM25Tb6v3usmvA93UqfnnoWs5V0uYjEl9Al6MNU10MCGKLwpg==", + "license": "MIT", "peer": true, "dependencies": { - "hermes-estree": "0.20.1" + "hermes-estree": "0.24.0" } }, "node_modules/metro-cache": { - "version": "0.80.8", - "resolved": "https://registry.npmjs.org/metro-cache/-/metro-cache-0.80.8.tgz", - "integrity": "sha512-5svz+89wSyLo7BxdiPDlwDTgcB9kwhNMfNhiBZPNQQs1vLFXxOkILwQiV5F2EwYT9DEr6OPZ0hnJkZfRQ8lDYQ==", + "version": "0.81.0", + "resolved": "https://registry.npmjs.org/metro-cache/-/metro-cache-0.81.0.tgz", + "integrity": "sha512-DyuqySicHXkHUDZFVJmh0ygxBSx6pCKUrTcSgb884oiscV/ROt1Vhye+x+OIHcsodyA10gzZtrVtxIFV4l9I4g==", + "license": "MIT", "peer": true, "dependencies": { - "metro-core": "0.80.8", - "rimraf": "^3.0.2" + "exponential-backoff": "^3.1.1", + "flow-enums-runtime": "^0.0.6", + "metro-core": "0.81.0" }, "engines": { - "node": ">=18" + "node": ">=18.18" } }, "node_modules/metro-cache-key": { - "version": "0.80.8", - "resolved": "https://registry.npmjs.org/metro-cache-key/-/metro-cache-key-0.80.8.tgz", - "integrity": "sha512-qWKzxrLsRQK5m3oH8ePecqCc+7PEhR03cJE6Z6AxAj0idi99dHOSitTmY0dclXVB9vP2tQIAE8uTd8xkYGk8fA==", + "version": "0.81.0", + "resolved": "https://registry.npmjs.org/metro-cache-key/-/metro-cache-key-0.81.0.tgz", + "integrity": "sha512-qX/IwtknP9bQZL78OK9xeSvLM/xlGfrs6SlUGgHvrxtmGTRSsxcyqxR+c+7ch1xr05n62Gin/O44QKg5V70rNQ==", + "license": "MIT", "peer": true, + "dependencies": { + "flow-enums-runtime": "^0.0.6" + }, "engines": { - "node": ">=18" + "node": ">=18.18" } }, "node_modules/metro-config": { - "version": "0.80.8", - "resolved": "https://registry.npmjs.org/metro-config/-/metro-config-0.80.8.tgz", - "integrity": "sha512-VGQJpfJawtwRzGzGXVUoohpIkB0iPom4DmSbAppKfumdhtLA8uVeEPp2GM61kL9hRvdbMhdWA7T+hZFDlo4mJA==", + "version": "0.81.0", + "resolved": "https://registry.npmjs.org/metro-config/-/metro-config-0.81.0.tgz", + "integrity": "sha512-6CinEaBe3WLpRlKlYXXu8r1UblJhbwD6Gtnoib5U8j6Pjp7XxMG9h/DGMeNp9aGLDu1OieUqiXpFo7O0/rR5Kg==", + "license": "MIT", "peer": true, "dependencies": { "connect": "^3.6.5", "cosmiconfig": "^5.0.5", + "flow-enums-runtime": "^0.0.6", "jest-validate": "^29.6.3", - "metro": "0.80.8", - "metro-cache": "0.80.8", - "metro-core": "0.80.8", - "metro-runtime": "0.80.8" + "metro": "0.81.0", + "metro-cache": "0.81.0", + "metro-core": "0.81.0", + "metro-runtime": "0.81.0" }, "engines": { - "node": ">=18" + "node": ">=18.18" } }, "node_modules/metro-core": { - "version": "0.80.8", - "resolved": "https://registry.npmjs.org/metro-core/-/metro-core-0.80.8.tgz", - "integrity": "sha512-g6lud55TXeISRTleW6SHuPFZHtYrpwNqbyFIVd9j9Ofrb5IReiHp9Zl8xkAfZQp8v6ZVgyXD7c130QTsCz+vBw==", + "version": "0.81.0", + "resolved": "https://registry.npmjs.org/metro-core/-/metro-core-0.81.0.tgz", + "integrity": "sha512-CVkM5YCOAFkNMvJai6KzA0RpztzfEKRX62/PFMOJ9J7K0uq/UkOFLxcgpcncMIrfy0PbfEj811b69tjULUQe1Q==", + "license": "MIT", "peer": true, "dependencies": { + "flow-enums-runtime": "^0.0.6", "lodash.throttle": "^4.1.1", - "metro-resolver": "0.80.8" + "metro-resolver": "0.81.0" }, "engines": { - "node": ">=18" + "node": ">=18.18" } }, "node_modules/metro-file-map": { - "version": "0.80.8", - "resolved": "https://registry.npmjs.org/metro-file-map/-/metro-file-map-0.80.8.tgz", - "integrity": "sha512-eQXMFM9ogTfDs2POq7DT2dnG7rayZcoEgRbHPXvhUWkVwiKkro2ngcBE++ck/7A36Cj5Ljo79SOkYwHaWUDYDw==", + "version": "0.81.0", + "resolved": "https://registry.npmjs.org/metro-file-map/-/metro-file-map-0.81.0.tgz", + "integrity": "sha512-zMDI5uYhQCyxbye/AuFx/pAbsz9K+vKL7h1ShUXdN2fz4VUPiyQYRsRqOoVG1DsiCgzd5B6LW0YW77NFpjDQeg==", + "license": "MIT", "peer": true, "dependencies": { "anymatch": "^3.0.3", "debug": "^2.2.0", "fb-watchman": "^2.0.0", + "flow-enums-runtime": "^0.0.6", "graceful-fs": "^4.2.4", "invariant": "^2.2.4", "jest-worker": "^29.6.3", @@ -10029,7 +9556,7 @@ "walker": "^1.0.7" }, "engines": { - "node": ">=18" + "node": ">=18.18" }, "optionalDependencies": { "fsevents": "^2.3.2" @@ -10039,6 +9566,7 @@ "version": "2.6.9", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "license": "MIT", "peer": true, "dependencies": { "ms": "2.0.0" @@ -10048,77 +9576,92 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "license": "MIT", "peer": true }, "node_modules/metro-minify-terser": { - "version": "0.80.8", - "resolved": "https://registry.npmjs.org/metro-minify-terser/-/metro-minify-terser-0.80.8.tgz", - "integrity": "sha512-y8sUFjVvdeUIINDuW1sejnIjkZfEF+7SmQo0EIpYbWmwh+kq/WMj74yVaBWuqNjirmUp1YNfi3alT67wlbBWBQ==", + "version": "0.81.0", + "resolved": "https://registry.npmjs.org/metro-minify-terser/-/metro-minify-terser-0.81.0.tgz", + "integrity": "sha512-U2ramh3W822ZR1nfXgIk+emxsf5eZSg10GbQrT0ZizImK8IZ5BmJY+BHRIkQgHzWFpExOVxC7kWbGL1bZALswA==", + "license": "MIT", "peer": true, "dependencies": { + "flow-enums-runtime": "^0.0.6", "terser": "^5.15.0" }, "engines": { - "node": ">=18" + "node": ">=18.18" } }, "node_modules/metro-resolver": { - "version": "0.80.8", - "resolved": "https://registry.npmjs.org/metro-resolver/-/metro-resolver-0.80.8.tgz", - "integrity": "sha512-JdtoJkP27GGoZ2HJlEsxs+zO7jnDUCRrmwXJozTlIuzLHMRrxgIRRby9fTCbMhaxq+iA9c+wzm3iFb4NhPmLbQ==", + "version": "0.81.0", + "resolved": "https://registry.npmjs.org/metro-resolver/-/metro-resolver-0.81.0.tgz", + "integrity": "sha512-Uu2Q+buHhm571cEwpPek8egMbdSTqmwT/5U7ZVNpK6Z2ElQBBCxd7HmFAslKXa7wgpTO2FAn6MqGeERbAtVDUA==", + "license": "MIT", "peer": true, + "dependencies": { + "flow-enums-runtime": "^0.0.6" + }, "engines": { - "node": ">=18" + "node": ">=18.18" } }, "node_modules/metro-runtime": { - "version": "0.80.8", - "resolved": "https://registry.npmjs.org/metro-runtime/-/metro-runtime-0.80.8.tgz", - "integrity": "sha512-2oScjfv6Yb79PelU1+p8SVrCMW9ZjgEiipxq7jMRn8mbbtWzyv3g8Mkwr+KwOoDFI/61hYPUbY8cUnu278+x1g==", + "version": "0.81.0", + "resolved": "https://registry.npmjs.org/metro-runtime/-/metro-runtime-0.81.0.tgz", + "integrity": "sha512-6oYB5HOt37RuGz2eV4A6yhcl+PUTwJYLDlY9vhT+aVjbUWI6MdBCf69vc4f5K5Vpt+yOkjy+2LDwLS0ykWFwYw==", + "license": "MIT", "peer": true, "dependencies": { - "@babel/runtime": "^7.0.0" + "@babel/runtime": "^7.25.0", + "flow-enums-runtime": "^0.0.6" }, "engines": { - "node": ">=18" + "node": ">=18.18" } }, "node_modules/metro-source-map": { - "version": "0.80.8", - "resolved": "https://registry.npmjs.org/metro-source-map/-/metro-source-map-0.80.8.tgz", - "integrity": "sha512-+OVISBkPNxjD4eEKhblRpBf463nTMk3KMEeYS8Z4xM/z3qujGJGSsWUGRtH27+c6zElaSGtZFiDMshEb8mMKQg==", + "version": "0.81.0", + "resolved": "https://registry.npmjs.org/metro-source-map/-/metro-source-map-0.81.0.tgz", + "integrity": "sha512-TzsVxhH83dyxg4A4+L1nzNO12I7ps5IHLjKGZH3Hrf549eiZivkdjYiq/S5lOB+p2HiQ+Ykcwtmcja95LIC62g==", + "license": "MIT", "peer": true, "dependencies": { - "@babel/traverse": "^7.20.0", - "@babel/types": "^7.20.0", + "@babel/traverse": "^7.25.3", + "@babel/traverse--for-generate-function-map": "npm:@babel/traverse@^7.25.3", + "@babel/types": "^7.25.2", + "flow-enums-runtime": "^0.0.6", "invariant": "^2.2.4", - "metro-symbolicate": "0.80.8", + "metro-symbolicate": "0.81.0", "nullthrows": "^1.1.1", - "ob1": "0.80.8", + "ob1": "0.81.0", "source-map": "^0.5.6", "vlq": "^1.0.0" }, "engines": { - "node": ">=18" + "node": ">=18.18" } }, "node_modules/metro-source-map/node_modules/source-map": { "version": "0.5.7", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", "integrity": "sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ==", + "license": "BSD-3-Clause", "peer": true, "engines": { "node": ">=0.10.0" } }, "node_modules/metro-symbolicate": { - "version": "0.80.8", - "resolved": "https://registry.npmjs.org/metro-symbolicate/-/metro-symbolicate-0.80.8.tgz", - "integrity": "sha512-nwhYySk79jQhwjL9QmOUo4wS+/0Au9joEryDWw7uj4kz2yvw1uBjwmlql3BprQCBzRdB3fcqOP8kO8Es+vE31g==", + "version": "0.81.0", + "resolved": "https://registry.npmjs.org/metro-symbolicate/-/metro-symbolicate-0.81.0.tgz", + "integrity": "sha512-C/1rWbNTPYp6yzID8IPuQPpVGzJ2rbWYBATxlvQ9dfK5lVNoxcwz77hjcY8ISLsRRR15hyd/zbjCNKPKeNgE1Q==", + "license": "MIT", "peer": true, "dependencies": { + "flow-enums-runtime": "^0.0.6", "invariant": "^2.2.4", - "metro-source-map": "0.80.8", + "metro-source-map": "0.81.0", "nullthrows": "^1.1.1", "source-map": "^0.5.6", "through2": "^2.0.1", @@ -10128,82 +9671,74 @@ "metro-symbolicate": "src/index.js" }, "engines": { - "node": ">=18" + "node": ">=18.18" } }, "node_modules/metro-symbolicate/node_modules/source-map": { "version": "0.5.7", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", "integrity": "sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ==", + "license": "BSD-3-Clause", "peer": true, "engines": { "node": ">=0.10.0" } }, "node_modules/metro-transform-plugins": { - "version": "0.80.8", - "resolved": "https://registry.npmjs.org/metro-transform-plugins/-/metro-transform-plugins-0.80.8.tgz", - "integrity": "sha512-sSu8VPL9Od7w98MftCOkQ1UDeySWbsIAS5I54rW22BVpPnI3fQ42srvqMLaJUQPjLehUanq8St6OMBCBgH/UWw==", + "version": "0.81.0", + "resolved": "https://registry.npmjs.org/metro-transform-plugins/-/metro-transform-plugins-0.81.0.tgz", + "integrity": "sha512-uErLAPBvttGCrmGSCa0dNHlOTk3uJFVEVWa5WDg6tQ79PRmuYRwzUgLhVzn/9/kyr75eUX3QWXN79Jvu4txt6Q==", + "license": "MIT", "peer": true, "dependencies": { - "@babel/core": "^7.20.0", - "@babel/generator": "^7.20.0", - "@babel/template": "^7.0.0", - "@babel/traverse": "^7.20.0", + "@babel/core": "^7.25.2", + "@babel/generator": "^7.25.0", + "@babel/template": "^7.25.0", + "@babel/traverse": "^7.25.3", + "flow-enums-runtime": "^0.0.6", "nullthrows": "^1.1.1" }, "engines": { - "node": ">=18" + "node": ">=18.18" } }, "node_modules/metro-transform-worker": { - "version": "0.80.8", - "resolved": "https://registry.npmjs.org/metro-transform-worker/-/metro-transform-worker-0.80.8.tgz", - "integrity": "sha512-+4FG3TQk3BTbNqGkFb2uCaxYTfsbuFOCKMMURbwu0ehCP8ZJuTUramkaNZoATS49NSAkRgUltgmBa4YaKZ5mqw==", - "peer": true, - "dependencies": { - "@babel/core": "^7.20.0", - "@babel/generator": "^7.20.0", - "@babel/parser": "^7.20.0", - "@babel/types": "^7.20.0", - "metro": "0.80.8", - "metro-babel-transformer": "0.80.8", - "metro-cache": "0.80.8", - "metro-cache-key": "0.80.8", - "metro-minify-terser": "0.80.8", - "metro-source-map": "0.80.8", - "metro-transform-plugins": "0.80.8", - "nullthrows": "^1.1.1" - }, - "engines": { - "node": ">=18" - } - }, - "node_modules/metro/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "version": "0.81.0", + "resolved": "https://registry.npmjs.org/metro-transform-worker/-/metro-transform-worker-0.81.0.tgz", + "integrity": "sha512-HrQ0twiruhKy0yA+9nK5bIe3WQXZcC66PXTvRIos61/EASLAP2DzEmW7IxN/MGsfZegN2UzqL2CG38+mOB45vg==", + "license": "MIT", "peer": true, "dependencies": { - "color-convert": "^2.0.1" + "@babel/core": "^7.25.2", + "@babel/generator": "^7.25.0", + "@babel/parser": "^7.25.3", + "@babel/types": "^7.25.2", + "flow-enums-runtime": "^0.0.6", + "metro": "0.81.0", + "metro-babel-transformer": "0.81.0", + "metro-cache": "0.81.0", + "metro-cache-key": "0.81.0", + "metro-minify-terser": "0.81.0", + "metro-source-map": "0.81.0", + "metro-transform-plugins": "0.81.0", + "nullthrows": "^1.1.1" }, "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" + "node": ">=18.18" } }, "node_modules/metro/node_modules/ci-info": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-2.0.0.tgz", "integrity": "sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ==", + "license": "MIT", "peer": true }, "node_modules/metro/node_modules/cliui": { "version": "8.0.1", "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", + "license": "ISC", "peer": true, "dependencies": { "string-width": "^4.2.0", @@ -10214,93 +9749,55 @@ "node": ">=12" } }, - "node_modules/metro/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "peer": true, - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/metro/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "peer": true - }, "node_modules/metro/node_modules/debug": { "version": "2.6.9", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "license": "MIT", "peer": true, "dependencies": { "ms": "2.0.0" } }, "node_modules/metro/node_modules/hermes-estree": { - "version": "0.20.1", - "resolved": "https://registry.npmjs.org/hermes-estree/-/hermes-estree-0.20.1.tgz", - "integrity": "sha512-SQpZK4BzR48kuOg0v4pb3EAGNclzIlqMj3Opu/mu7bbAoFw6oig6cEt/RAi0zTFW/iW6Iz9X9ggGuZTAZ/yZHg==", + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/hermes-estree/-/hermes-estree-0.24.0.tgz", + "integrity": "sha512-LyoXLB7IFzeZW0EvAbGZacbxBN7t6KKSDqFJPo3Ydow7wDlrDjXwsdiAHV6XOdvEN9MEuWXsSIFN4tzpyrXIHw==", + "license": "MIT", "peer": true }, "node_modules/metro/node_modules/hermes-parser": { - "version": "0.20.1", - "resolved": "https://registry.npmjs.org/hermes-parser/-/hermes-parser-0.20.1.tgz", - "integrity": "sha512-BL5P83cwCogI8D7rrDCgsFY0tdYUtmFP9XaXtl2IQjC+2Xo+4okjfXintlTxcIwl4qeGddEl28Z11kbVIw0aNA==", + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/hermes-parser/-/hermes-parser-0.24.0.tgz", + "integrity": "sha512-IJooSvvu2qNRe7oo9Rb04sUT4omtZqZqf9uq9WM25Tb6v3usmvA93UqfnnoWs5V0uYjEl9Al6MNU10MCGKLwpg==", + "license": "MIT", "peer": true, "dependencies": { - "hermes-estree": "0.20.1" + "hermes-estree": "0.24.0" } }, "node_modules/metro/node_modules/ms": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "license": "MIT", "peer": true }, - "node_modules/metro/node_modules/serialize-error": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/serialize-error/-/serialize-error-2.1.0.tgz", - "integrity": "sha512-ghgmKt5o4Tly5yEG/UJp8qTd0AN7Xalw4XBtDEKP655B699qMEtra1WlXeE6WIvdEG481JvRxULKsInq/iNysw==", - "peer": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/metro/node_modules/source-map": { "version": "0.5.7", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", "integrity": "sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ==", + "license": "BSD-3-Clause", "peer": true, "engines": { "node": ">=0.10.0" } }, - "node_modules/metro/node_modules/wrap-ansi": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", - "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", - "peer": true, - "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" - } - }, "node_modules/metro/node_modules/ws": { - "version": "7.5.9", - "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.9.tgz", - "integrity": "sha512-F+P9Jil7UiSKSkppIiD94dN07AwvFixvLIj1Og1Rl9GGMuNipJnV9JzjD6XuqmAeiswGvUmNLjr5cFuXwNS77Q==", + "version": "7.5.10", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.10.tgz", + "integrity": "sha512-+dbF1tHwZpXcbOJdVOkzLDxZP1ailvSxM6ZweXTegylPny803bFhA+vqBYw4s31NSAk4S2Qz+AKXK9a4wkdjcQ==", + "license": "MIT", "peer": true, "engines": { "node": ">=8.3.0" @@ -10322,6 +9819,7 @@ "version": "17.7.2", "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", + "license": "MIT", "peer": true, "dependencies": { "cliui": "^8.0.1", @@ -10340,6 +9838,7 @@ "version": "21.1.1", "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", + "license": "ISC", "peer": true, "engines": { "node": ">=12" @@ -10349,6 +9848,7 @@ "version": "4.0.8", "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", + "license": "MIT", "dependencies": { "braces": "^3.0.3", "picomatch": "^2.3.1" @@ -10357,10 +9857,24 @@ "node": ">=8.6" } }, + "node_modules/micromatch/node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "license": "MIT", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, "node_modules/mime": { "version": "2.6.0", "resolved": "https://registry.npmjs.org/mime/-/mime-2.6.0.tgz", "integrity": "sha512-USPkMeET31rOMiarsBNIHZKLGgvKc/LrjofAnBlOttf5ajRvqiRA8QsenbcooctK6d6Ts6aqZXBA+XbkKthiQg==", + "dev": true, + "license": "MIT", "bin": { "mime": "cli.js" }, @@ -10372,6 +9886,7 @@ "version": "1.52.0", "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "license": "MIT", "engines": { "node": ">= 0.6" } @@ -10380,6 +9895,7 @@ "version": "2.1.35", "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "license": "MIT", "dependencies": { "mime-db": "1.52.0" }, @@ -10391,16 +9907,18 @@ "version": "2.1.0", "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", + "license": "MIT", "peer": true, "engines": { "node": ">=6" } }, "node_modules/minimatch": { - "version": "9.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.4.tgz", - "integrity": "sha512-KqWh+VchfxcMNRAJjj2tnsSJdNbHsVgnkBhTNrW7AjVo6OvLtxw8zfT9oLw1JSohlFzJ8jCoTgaoXvJ+kHt6fw==", + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", "dev": true, + "license": "ISC", "dependencies": { "brace-expansion": "^2.0.1" }, @@ -10415,32 +9933,32 @@ "version": "1.2.8", "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", + "license": "MIT", "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/minipass": { - "version": "7.0.4", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.0.4.tgz", - "integrity": "sha512-jYofLM5Dam9279rdkWzqHozUo4ybjdZmCsDHePy5V/PbBcVMiSZR97gmAy45aqi8CK1lG2ECd356FU86avfwUQ==", + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", + "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==", "dev": true, + "license": "ISC", + "peer": true, "engines": { "node": ">=16 || 14 >=14.17" } }, "node_modules/mkdirp": { - "version": "2.1.6", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-2.1.6.tgz", - "integrity": "sha512-+hEnITedc8LAtIP9u3HJDFIdcLV2vXP33sqLLIzkv1Db1zO/1OxbvYf0Y1OC/S/Qo5dxHXepofhmxL02PsKe+A==", - "dev": true, - "bin": { - "mkdirp": "dist/cjs/src/bin.js" - }, - "engines": { - "node": ">=10" + "version": "0.5.6", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz", + "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==", + "license": "MIT", + "dependencies": { + "minimist": "^1.2.6" }, - "funding": { - "url": "https://github.com/sponsors/isaacs" + "bin": { + "mkdirp": "bin/cmd.js" } }, "node_modules/mocha": { @@ -10448,6 +9966,7 @@ "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.4.0.tgz", "integrity": "sha512-eqhGB8JKapEYcC4ytX/xrzKforgEc3j1pGlAXVy3eRwrtAy5/nIfT1SvgGzfN0XZZxeLq0aQWkOUAmqIJiv+bA==", "dev": true, + "license": "MIT", "dependencies": { "ansi-colors": "4.1.1", "browser-stdout": "1.3.1", @@ -10482,7 +10001,8 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", - "dev": true + "dev": true, + "license": "Python-2.0" }, "node_modules/mocha/node_modules/chokidar": { "version": "3.5.3", @@ -10495,9 +10015,10 @@ "url": "https://paulmillr.com/funding/" } ], + "license": "MIT", "dependencies": { "anymatch": "~3.1.2", - "braces": "~3.0.3", + "braces": "~3.0.2", "glob-parent": "~5.1.2", "is-binary-path": "~2.1.0", "is-glob": "~4.0.1", @@ -10511,51 +10032,37 @@ "fsevents": "~2.3.2" } }, - "node_modules/mocha/node_modules/diff": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-5.0.0.tgz", - "integrity": "sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w==", - "dev": true, - "engines": { - "node": ">=0.3.1" - } - }, - "node_modules/mocha/node_modules/escape-string-regexp": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", - "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/mocha/node_modules/glob": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz", - "integrity": "sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==", + "node_modules/mocha/node_modules/debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", "dev": true, + "license": "MIT", "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^5.0.1", - "once": "^1.3.0" + "ms": "2.1.2" }, "engines": { - "node": ">=12" + "node": ">=6.0" }, - "funding": { - "url": "https://github.com/sponsors/isaacs" + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } } }, + "node_modules/mocha/node_modules/debug/node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true, + "license": "MIT" + }, "node_modules/mocha/node_modules/glob-parent": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", "dev": true, + "license": "ISC", "dependencies": { "is-glob": "^4.0.1" }, @@ -10568,6 +10075,7 @@ "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", "dev": true, + "license": "MIT", "dependencies": { "argparse": "^2.0.1" }, @@ -10580,6 +10088,7 @@ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.0.1.tgz", "integrity": "sha512-nLDxIFRyhDblz3qMuq+SoRZED4+miJ/G+tdDrjkkkRnjAsBexeGpgjLEQ0blJy7rHhR2b93rhQY4SvyWu9v03g==", "dev": true, + "license": "ISC", "dependencies": { "brace-expansion": "^2.0.1" }, @@ -10587,31 +10096,45 @@ "node": ">=10" } }, - "node_modules/mocha/node_modules/ms": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", - "dev": true - }, "node_modules/mocha/node_modules/serialize-javascript": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.0.tgz", "integrity": "sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag==", "dev": true, + "license": "BSD-3-Clause", "dependencies": { "randombytes": "^2.1.0" } }, + "node_modules/mocha/node_modules/supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" + } + }, "node_modules/ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "license": "MIT" }, "node_modules/mz": { "version": "2.7.0", "resolved": "https://registry.npmjs.org/mz/-/mz-2.7.0.tgz", "integrity": "sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==", "dev": true, + "license": "MIT", + "peer": true, "dependencies": { "any-promise": "^1.0.0", "object-assign": "^4.0.1", @@ -10622,12 +10145,14 @@ "version": "1.4.0", "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/negotiator": { "version": "0.6.3", "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", + "license": "MIT", "engines": { "node": ">= 0.6" } @@ -10636,28 +10161,24 @@ "version": "2.6.2", "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==", + "license": "MIT", "peer": true }, "node_modules/netmask": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/netmask/-/netmask-2.0.2.tgz", "integrity": "sha512-dBpDMdxv9Irdq66304OLfEmQ9tbNRFnFTuZiLo+bD+r332bBmMJ8GBLXklIXXgxd3+v9+KUnZaUR5PJMa75Gsg==", + "license": "MIT", "engines": { "node": ">= 0.4.0" } }, - "node_modules/next-tick": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.1.0.tgz", - "integrity": "sha512-CXdUiJembsNjuToQvxayPZF9Vqht7hewsvy2sOWafLvi2awflj9mOC6bHIg50orX8IJvWKY9wYQ/zB2kogPslQ==", - "dev": true, - "peer": true - }, "node_modules/nise": { "version": "1.5.3", "resolved": "https://registry.npmjs.org/nise/-/nise-1.5.3.tgz", "integrity": "sha512-Ymbac/94xeIrMf59REBPOv0thr+CJVFMhrlAkW/gjCIE58BGQdCj0x7KRCb3yz+Ga2Rz3E9XXSvUyyxqqhjQAQ==", "dev": true, + "license": "BSD-3-Clause", "dependencies": { "@sinonjs/formatio": "^3.2.1", "@sinonjs/text-encoding": "^0.7.1", @@ -10666,40 +10187,56 @@ "path-to-regexp": "^1.7.0" } }, + "node_modules/nise/node_modules/@sinonjs/commons": { + "version": "1.8.6", + "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.8.6.tgz", + "integrity": "sha512-Ky+XkAkqPZSm3NLBeUng77EBQl3cmeJhITaGHdYH8kjVB+aun3S4XBRti2zt17mtt0mIUDiNxYeoJm6drVvBJQ==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "type-detect": "4.0.8" + } + }, "node_modules/nise/node_modules/lolex": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/lolex/-/lolex-5.1.2.tgz", "integrity": "sha512-h4hmjAvHTmd+25JSwrtTIuwbKdwg5NzZVRMLn9saij4SZaepCrTCxPr35H/3bjwfMJtN+t3CX8672UIkglz28A==", "dev": true, + "license": "BSD-3-Clause", "dependencies": { "@sinonjs/commons": "^1.7.0" } }, + "node_modules/nise/node_modules/type-detect": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", + "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, "node_modules/no-case": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/no-case/-/no-case-3.0.4.tgz", "integrity": "sha512-fgAN3jGAh+RoxUGZHTSOLJIqUc2wmoBwGR4tbpNAKmmovFoWq0OdRkb0VkldReO2a2iBT/OEulG9XSUc10r3zg==", "dev": true, + "license": "MIT", + "peer": true, "dependencies": { "lower-case": "^2.0.2", "tslib": "^2.0.3" } }, - "node_modules/nocache": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/nocache/-/nocache-3.0.4.tgz", - "integrity": "sha512-WDD0bdg9mbq6F4mRxEYcPWwfA1vxd0mrvKOyxI7Xj/atfRHVeutzuWByG//jfm4uPzp0y4Kj051EORCBSQMycw==", - "peer": true, - "engines": { - "node": ">=12.0.0" - } - }, "node_modules/nock": { - "version": "14.0.0-beta.5", - "resolved": "https://registry.npmjs.org/nock/-/nock-14.0.0-beta.5.tgz", - "integrity": "sha512-u255tf4DYvyErTlPZA9uTfXghiZZy+NflUOFONPVKZ5tP0yaHwKig28zyFOLhu8y5YcCRC+V5vDk4HHileh2iw==", + "version": "14.0.0-beta.15", + "resolved": "https://registry.npmjs.org/nock/-/nock-14.0.0-beta.15.tgz", + "integrity": "sha512-rp72chatxoZbR/2cYHwtb+IX6n6kkanYKGN2PKn4c12JBrj9n4xGUKFykuQHB+Gkz3fynlikFbMH2LI6VoebuQ==", "dev": true, + "license": "MIT", "dependencies": { + "@mswjs/interceptors": "^0.36.4", "json-stringify-safe": "^5.0.1", "propagate": "^2.0.0" }, @@ -10711,12 +10248,14 @@ "version": "3.1.1", "resolved": "https://registry.npmjs.org/node-abort-controller/-/node-abort-controller-3.1.1.tgz", "integrity": "sha512-AGK2yQKIjRuqnc6VkX2Xj5d+QW8xZ87pa1UK6yA6ouUyuxfHuMP6umE5QK7UmTeOAymo+Zx1Fxiuw9rVx8taHQ==", + "license": "MIT", "peer": true }, "node_modules/node-dir": { "version": "0.1.17", "resolved": "https://registry.npmjs.org/node-dir/-/node-dir-0.1.17.tgz", "integrity": "sha512-tmPX422rYgofd4epzrNoOXiE8XFZYOcCq1vD7MAXCDO+O+zndlA2ztdKKMa+EeuBG5tHETpr4ml4RGgpqDCCAg==", + "license": "MIT", "peer": true, "dependencies": { "minimatch": "^3.0.2" @@ -10729,6 +10268,7 @@ "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "license": "MIT", "peer": true, "dependencies": { "balanced-match": "^1.0.0", @@ -10739,6 +10279,7 @@ "version": "3.1.2", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "license": "ISC", "peer": true, "dependencies": { "brace-expansion": "^1.1.7" @@ -10751,6 +10292,7 @@ "version": "2.7.0", "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", + "license": "MIT", "dependencies": { "whatwg-url": "^5.0.0" }, @@ -10766,36 +10308,37 @@ } } }, + "node_modules/node-forge": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-1.3.1.tgz", + "integrity": "sha512-dPEtOeMvF9VMcYV/1Wb8CPoVAXtp6MKMlcbAt4ddqmGqUJ6fQZFXkNZNkNlfevtNkGtaSoXf/vNNNSvgrdXwtA==", + "license": "(BSD-3-Clause OR GPL-2.0)", + "peer": true, + "engines": { + "node": ">= 6.13.0" + } + }, "node_modules/node-int64": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/node-int64/-/node-int64-0.4.0.tgz", "integrity": "sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw==", + "license": "MIT", "peer": true }, "node_modules/node-releases": { - "version": "2.0.14", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.14.tgz", - "integrity": "sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw==", + "version": "2.0.18", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.18.tgz", + "integrity": "sha512-d9VeXT4SJ7ZeOqGX6R5EM022wpL+eWPooLI+5UpWn2jCT1aosUQEhQP214x33Wkwx3JQMvIm+tIoVOdodFS40g==", + "license": "MIT", "peer": true }, - "node_modules/node-stream-zip": { - "version": "1.15.0", - "resolved": "https://registry.npmjs.org/node-stream-zip/-/node-stream-zip-1.15.0.tgz", - "integrity": "sha512-LN4fydt9TqhZhThkZIVQnF9cwjU3qmUH9h78Mx/K7d3VvfRqqwthLwJEUOEL0QPZ0XQmNN7be5Ggit5+4dq3Bw==", - "peer": true, - "engines": { - "node": ">=0.12.0" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/antelle" - } - }, "node_modules/normalize-package-data": { "version": "2.5.0", "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", "dev": true, + "license": "BSD-2-Clause", + "peer": true, "dependencies": { "hosted-git-info": "^2.1.4", "resolve": "^1.10.0", @@ -10808,6 +10351,8 @@ "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", "dev": true, + "license": "ISC", + "peer": true, "bin": { "semver": "bin/semver" } @@ -10816,6 +10361,7 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "license": "MIT", "engines": { "node": ">=0.10.0" } @@ -10824,6 +10370,7 @@ "version": "4.0.1", "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", + "license": "MIT", "peer": true, "dependencies": { "path-key": "^3.0.0" @@ -10836,21 +10383,28 @@ "version": "1.1.1", "resolved": "https://registry.npmjs.org/nullthrows/-/nullthrows-1.1.1.tgz", "integrity": "sha512-2vPPEi+Z7WqML2jZYddDIfy5Dqb0r2fze2zTxNNknZaFpVHU3mFB3R+DWeJWGVx0ecvttSGlJTI+WG+8Z4cDWw==", + "license": "MIT", "peer": true }, "node_modules/ob1": { - "version": "0.80.8", - "resolved": "https://registry.npmjs.org/ob1/-/ob1-0.80.8.tgz", - "integrity": "sha512-QHJQk/lXMmAW8I7AIM3in1MSlwe1umR72Chhi8B7Xnq6mzjhBKkA6Fy/zAhQnGkA4S912EPCEvTij5yh+EQTAA==", + "version": "0.81.0", + "resolved": "https://registry.npmjs.org/ob1/-/ob1-0.81.0.tgz", + "integrity": "sha512-6Cvrkxt1tqaRdWqTAMcVYEiO5i1xcF9y7t06nFdjFqkfPsEloCf8WwhXdwBpNUkVYSQlSGS7cDgVQR86miBfBQ==", + "license": "MIT", "peer": true, + "dependencies": { + "flow-enums-runtime": "^0.0.6" + }, "engines": { - "node": ">=18" + "node": ">=18.18" } }, "node_modules/object-assign": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", + "dev": true, + "license": "MIT", "engines": { "node": ">=0.10.0" } @@ -10860,6 +10414,7 @@ "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.2.tgz", "integrity": "sha512-IRZSRuzJiynemAXPYtPe5BoI/RESNYR7TYm50MC5Mqbd3Jmw5y790sErYw3V6SryFJD64b74qQQs9wn5Bg/k3g==", "dev": true, + "license": "MIT", "engines": { "node": ">= 0.4" }, @@ -10872,6 +10427,7 @@ "resolved": "https://registry.npmjs.org/object-is/-/object-is-1.1.6.tgz", "integrity": "sha512-F8cZ+KfGlSGi09lJT7/Nd6KJZ9ygtvYC0/UYYLI9nmQKLMnydpB9yvbv9K1uSkEu7FU9vYPmVwLg328tX+ot3Q==", "dev": true, + "license": "MIT", "dependencies": { "call-bind": "^1.0.7", "define-properties": "^1.2.1" @@ -10888,6 +10444,7 @@ "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", "dev": true, + "license": "MIT", "engines": { "node": ">= 0.4" } @@ -10896,6 +10453,7 @@ "version": "2.4.1", "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", + "license": "MIT", "dependencies": { "ee-first": "1.1.1" }, @@ -10903,19 +10461,11 @@ "node": ">= 0.8" } }, - "node_modules/on-headers": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/on-headers/-/on-headers-1.0.2.tgz", - "integrity": "sha512-pZAE+FJLoyITytdqK0U5s+FIpjN0JP3OzFi/u8Rx+EV5/W+JTWGXG8xFzevE7AjBfDqHv/8vL8qQsIhHnqRkrA==", - "peer": true, - "engines": { - "node": ">= 0.8" - } - }, "node_modules/once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "license": "ISC", "dependencies": { "wrappy": "1" } @@ -10924,6 +10474,7 @@ "version": "5.1.2", "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", + "license": "MIT", "peer": true, "dependencies": { "mimic-fn": "^2.1.0" @@ -10936,70 +10487,53 @@ } }, "node_modules/open": { - "version": "6.4.0", - "resolved": "https://registry.npmjs.org/open/-/open-6.4.0.tgz", - "integrity": "sha512-IFenVPgF70fSm1keSd2iDBIDIBZkroLeuffXq+wKTzTJlBpesFWojV9lb8mzOfaAzM1sr7HQHuO0vtV0zYekGg==", + "version": "7.4.2", + "resolved": "https://registry.npmjs.org/open/-/open-7.4.2.tgz", + "integrity": "sha512-MVHddDVweXZF3awtlAS+6pgKLlm/JgxZ90+/NBurBoQctVOOB/zDdVjcyPzQ+0laDGbsWgrRkflI65sQeOgT9Q==", + "license": "MIT", "peer": true, "dependencies": { - "is-wsl": "^1.1.0" + "is-docker": "^2.0.0", + "is-wsl": "^2.1.1" }, "engines": { "node": ">=8" - } - }, - "node_modules/open/node_modules/is-wsl": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-1.1.0.tgz", - "integrity": "sha512-gfygJYZ2gLTDlmbWMI0CE2MwnFzSN/2SZfkMlItC4K/JBlsWVDB0bO6XhqcY13YXE7iMcAJnzTCJjPiTeJJ0Mw==", - "peer": true, - "engines": { - "node": ">=4" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/optionator": { - "version": "0.9.3", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.3.tgz", - "integrity": "sha512-JjCoypp+jKn1ttEFExxhetCKeJt9zhAgAve5FXHixTvFDW/5aEktX9bufBKLRRMdU7bNtpLfcGu94B3cdEJgjg==", + "version": "0.9.4", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz", + "integrity": "sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==", "dev": true, + "license": "MIT", "dependencies": { - "@aashutoshrathi/word-wrap": "^1.2.3", "deep-is": "^0.1.3", "fast-levenshtein": "^2.0.6", "levn": "^0.4.1", "prelude-ls": "^1.2.1", - "type-check": "^0.4.0" + "type-check": "^0.4.0", + "word-wrap": "^1.2.5" }, "engines": { "node": ">= 0.8.0" } }, - "node_modules/ora": { - "version": "5.4.1", - "resolved": "https://registry.npmjs.org/ora/-/ora-5.4.1.tgz", - "integrity": "sha512-5b6Y85tPxZZ7QytO+BQzysW31HJku27cRIlkbAXaNx+BdcVi+LlRFmVXzeF6a7JCwJpyw5c4b+YSVImQIrBpuQ==", - "peer": true, - "dependencies": { - "bl": "^4.1.0", - "chalk": "^4.1.0", - "cli-cursor": "^3.1.0", - "cli-spinners": "^2.5.0", - "is-interactive": "^1.0.0", - "is-unicode-supported": "^0.1.0", - "log-symbols": "^4.1.0", - "strip-ansi": "^6.0.0", - "wcwidth": "^1.0.1" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } + "node_modules/outvariant": { + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/outvariant/-/outvariant-1.4.3.tgz", + "integrity": "sha512-+Sl2UErvtsoajRDKCE5/dBz4DIvHXQQnAxtQTF04OJxY0+DyZXSo5P5Bb7XYWOh81syohlYL24hbDwxedPUJCA==", + "dev": true, + "license": "MIT" }, "node_modules/p-limit": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "license": "MIT", "dependencies": { "yocto-queue": "^0.1.0" }, @@ -11014,6 +10548,8 @@ "version": "5.0.0", "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "dev": true, + "license": "MIT", "dependencies": { "p-limit": "^3.0.2" }, @@ -11028,23 +10564,26 @@ "version": "2.2.0", "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "license": "MIT", + "peer": true, "engines": { "node": ">=6" } }, "node_modules/pac-proxy-agent": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/pac-proxy-agent/-/pac-proxy-agent-7.0.1.tgz", - "integrity": "sha512-ASV8yU4LLKBAjqIPMbrgtaKIvxQri/yh2OpI+S6hVa9JRkUI3Y3NPFbfngDtY7oFtSMD3w31Xns89mDa3Feo5A==", + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/pac-proxy-agent/-/pac-proxy-agent-7.0.2.tgz", + "integrity": "sha512-BFi3vZnO9X5Qt6NRz7ZOaPja3ic0PhlsmCRYLOpN11+mWBCR6XJDqW5RF3j8jm4WGGQZtBA+bTfxYzeKW73eHg==", + "license": "MIT", "dependencies": { "@tootallnate/quickjs-emscripten": "^0.23.0", "agent-base": "^7.0.2", "debug": "^4.3.4", "get-uri": "^6.0.1", "http-proxy-agent": "^7.0.0", - "https-proxy-agent": "^7.0.2", - "pac-resolver": "^7.0.0", - "socks-proxy-agent": "^8.0.2" + "https-proxy-agent": "^7.0.5", + "pac-resolver": "^7.0.1", + "socks-proxy-agent": "^8.0.4" }, "engines": { "node": ">= 14" @@ -11054,6 +10593,7 @@ "version": "7.0.1", "resolved": "https://registry.npmjs.org/pac-resolver/-/pac-resolver-7.0.1.tgz", "integrity": "sha512-5NPgf87AT2STgwa2ntRMr45jTKrYBGkVU36yT0ig/n/GMAa3oPqhZfIQ2kMEimReg0+t9kZViDVZ83qfVUlckg==", + "license": "MIT", "dependencies": { "degenerator": "^5.0.0", "netmask": "^2.0.2" @@ -11062,11 +10602,21 @@ "node": ">= 14" } }, + "node_modules/package-json-from-dist": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.1.tgz", + "integrity": "sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==", + "dev": true, + "license": "BlueOak-1.0.0", + "peer": true + }, "node_modules/pad-right": { "version": "0.2.2", "resolved": "https://registry.npmjs.org/pad-right/-/pad-right-0.2.2.tgz", "integrity": "sha512-4cy8M95ioIGolCoMmm2cMntGR1lPLEbOMzOKu8bzjuJP6JpzEMQcDHmh7hHLYGgob+nKe1YHFMaG4V59HQa89g==", "dev": true, + "license": "MIT", + "peer": true, "dependencies": { "repeat-string": "^1.5.2" }, @@ -11079,6 +10629,7 @@ "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", "dev": true, + "license": "MIT", "dependencies": { "callsites": "^3.0.0" }, @@ -11087,27 +10638,24 @@ } }, "node_modules/parse-json": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", - "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", - "dev": true, + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", + "integrity": "sha512-aOIos8bujGN93/8Ox/jPLh7RwVnPEysynVFE+fQZyg6jKELEHwzgKdLRFHUgXJL6kylijVSBC4BvN9OmsB48Rw==", + "license": "MIT", + "peer": true, "dependencies": { - "@babel/code-frame": "^7.0.0", "error-ex": "^1.3.1", - "json-parse-even-better-errors": "^2.3.0", - "lines-and-columns": "^1.1.6" + "json-parse-better-errors": "^1.0.1" }, "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": ">=4" } }, "node_modules/parseurl": { "version": "1.3.3", "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", + "license": "MIT", "engines": { "node": ">= 0.8" } @@ -11116,6 +10664,7 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "license": "MIT", "engines": { "node": ">=8" } @@ -11124,6 +10673,7 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", + "license": "MIT", "engines": { "node": ">=0.10.0" } @@ -11132,6 +10682,7 @@ "version": "3.1.1", "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "license": "MIT", "engines": { "node": ">=8" } @@ -11139,68 +10690,69 @@ "node_modules/path-parse": { "version": "1.0.7", "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", - "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==" + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", + "license": "MIT" }, "node_modules/path-scurry": { - "version": "1.10.2", - "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.10.2.tgz", - "integrity": "sha512-7xTavNy5RQXnsjANvVvMkEjvloOinkAjv/Z6Ildz9v2RinZ4SBKTWFOVRbaF8p0vpHnyjV/UwNDdKuUv6M5qcA==", + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.11.1.tgz", + "integrity": "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==", "dev": true, + "license": "BlueOak-1.0.0", + "peer": true, "dependencies": { "lru-cache": "^10.2.0", "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" }, "engines": { - "node": ">=16 || 14 >=14.17" + "node": ">=16 || 14 >=14.18" }, "funding": { "url": "https://github.com/sponsors/isaacs" } }, + "node_modules/path-scurry/node_modules/lru-cache": { + "version": "10.4.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", + "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==", + "dev": true, + "license": "ISC", + "peer": true + }, "node_modules/path-to-regexp": { "version": "1.9.0", "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-1.9.0.tgz", "integrity": "sha512-xIp7/apCFJuUHdDLWe8O1HIkb0kQrOMb/0u6FXQjemHn/ii5LrIzU6bdECnsiTF/GjZkMEKg1xdiZwNqDYlZ6g==", "dev": true, + "license": "MIT", "dependencies": { "isarray": "0.0.1" } }, - "node_modules/path-to-regexp/node_modules/isarray": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", - "integrity": "sha512-D2S+3GLxWH+uhrNEcoh/fnmYeP8E8/zHl644d/jdA0g2uyXvy3sb0qxotE+ne0LtccHknQzWwZEzhak7oJ0COQ==", - "dev": true - }, - "node_modules/path-type": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", - "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/pathval": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.1.tgz", "integrity": "sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==", "dev": true, + "license": "MIT", "engines": { "node": "*" } }, "node_modules/picocolors": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", - "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==" + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", + "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", + "license": "ISC" }, "node_modules/picomatch": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", - "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.2.tgz", + "integrity": "sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==", + "dev": true, + "license": "MIT", "engines": { - "node": ">=8.6" + "node": ">=12" }, "funding": { "url": "https://github.com/sponsors/jonschlinkert" @@ -11210,6 +10762,7 @@ "version": "4.0.1", "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", + "license": "MIT", "peer": true, "engines": { "node": ">=6" @@ -11219,6 +10772,7 @@ "version": "4.0.6", "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.6.tgz", "integrity": "sha512-saLsH7WeYYPiD25LDuLRRY/i+6HaPYr6G1OUlN39otzkSTxKnubR9RTxS3/Kk50s1g2JTgFwWQDQyplC5/SHZg==", + "license": "MIT", "peer": true, "engines": { "node": ">= 6" @@ -11228,6 +10782,7 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-3.0.0.tgz", "integrity": "sha512-/E57AYkoeQ25qkxMj5PBOVgF8Kiu/h7cYS30Z5+R7WaiCCBfLq58ZI/dSeaEKb9WVJV5n/03QwrN3IeWIFllvw==", + "license": "MIT", "peer": true, "dependencies": { "find-up": "^3.0.0" @@ -11240,6 +10795,7 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "license": "MIT", "peer": true, "dependencies": { "locate-path": "^3.0.0" @@ -11252,6 +10808,7 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "license": "MIT", "peer": true, "dependencies": { "p-locate": "^3.0.0", @@ -11265,6 +10822,7 @@ "version": "2.3.0", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "license": "MIT", "peer": true, "dependencies": { "p-try": "^2.0.0" @@ -11280,6 +10838,7 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "license": "MIT", "peer": true, "dependencies": { "p-limit": "^2.0.0" @@ -11292,6 +10851,7 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", "integrity": "sha512-bpC7GYwiDYQ4wYLe+FA8lhRjhQCMcQGuSgGGqDkg/QerRWw9CmGRT0iSOVRSZJ29NMLZgIzqaljJ63oaL4NIJQ==", + "license": "MIT", "peer": true, "engines": { "node": ">=4" @@ -11302,15 +10862,17 @@ "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", "dev": true, + "license": "MIT", "engines": { "node": ">= 0.8.0" } }, "node_modules/prettier": { - "version": "3.2.5", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.2.5.tgz", - "integrity": "sha512-3/GWa9aOC0YeD7LUfvOG2NiDyhOWRvt1k+rcKhOuYnMY24iiCphgneUfJDyFXd6rZCAnuLBv6UeAULtrhT/F4A==", + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.3.3.tgz", + "integrity": "sha512-i2tDNA0O5IrMO757lfrdQZCc2jPNDVntV0m/+4whiDfWaTKfMNgR7Qz0NAeGz/nRqF4m5/6CLzbP4/liHt12Ew==", "dev": true, + "license": "MIT", "bin": { "prettier": "bin/prettier.cjs" }, @@ -11326,6 +10888,7 @@ "resolved": "https://registry.npmjs.org/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz", "integrity": "sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w==", "dev": true, + "license": "MIT", "dependencies": { "fast-diff": "^1.1.2" }, @@ -11337,6 +10900,7 @@ "version": "29.7.0", "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.7.0.tgz", "integrity": "sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==", + "license": "MIT", "dependencies": { "@jest/schemas": "^29.6.3", "ansi-styles": "^5.0.0", @@ -11346,10 +10910,23 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, + "node_modules/pretty-format/node_modules/ansi-styles": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, "node_modules/process-nextick-args": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", + "license": "MIT", "peer": true }, "node_modules/progress": { @@ -11357,6 +10934,8 @@ "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", "dev": true, + "license": "MIT", + "peer": true, "engines": { "node": ">=0.4.0" } @@ -11365,46 +10944,18 @@ "version": "8.3.0", "resolved": "https://registry.npmjs.org/promise/-/promise-8.3.0.tgz", "integrity": "sha512-rZPNPKTOYVNEEKFaq1HqTgOwZD+4/YHS5ukLzQCypkj+OkYx7iv0mA91lJlpPPZ8vMau3IIGj5Qlwrx+8iiSmg==", + "license": "MIT", "peer": true, "dependencies": { "asap": "~2.0.6" } }, - "node_modules/prompts": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/prompts/-/prompts-2.4.2.tgz", - "integrity": "sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q==", - "peer": true, - "dependencies": { - "kleur": "^3.0.3", - "sisteransi": "^1.0.5" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/prop-types": { - "version": "15.8.1", - "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.8.1.tgz", - "integrity": "sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==", - "peer": true, - "dependencies": { - "loose-envify": "^1.4.0", - "object-assign": "^4.1.1", - "react-is": "^16.13.1" - } - }, - "node_modules/prop-types/node_modules/react-is": { - "version": "16.13.1", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", - "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==", - "peer": true - }, "node_modules/propagate": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/propagate/-/propagate-2.0.1.tgz", "integrity": "sha512-vGrhOavPSTz4QVNuBNdcNXePNdNMaO1xj9yBeH1ScQPjk/rhg9sSlCXPhMkFuaNNW/syTvYqsnbIJxMBfRbbag==", "dev": true, + "license": "MIT", "engines": { "node": ">= 8" } @@ -11413,12 +10964,15 @@ "version": "2.0.6", "resolved": "https://registry.npmjs.org/property-expr/-/property-expr-2.0.6.tgz", "integrity": "sha512-SVtmxhRE/CGkn3eZY1T6pC8Nln6Fr/lu1mKSgRud0eC73whjGfoAogbn78LkD8aFL0zz3bAFerKSnOl7NlErBA==", - "dev": true + "dev": true, + "license": "MIT", + "peer": true }, "node_modules/proxy-agent": { "version": "6.4.0", "resolved": "https://registry.npmjs.org/proxy-agent/-/proxy-agent-6.4.0.tgz", "integrity": "sha512-u0piLU+nCOHMgGjRbimiXmA9kM/L9EHh3zL81xCdp7m+Y2pHIsnmbdDoEDoAz5geaonNR6q6+yOPQs6n4T6sBQ==", + "license": "MIT", "dependencies": { "agent-base": "^7.0.2", "debug": "^4.3.4", @@ -11433,40 +10987,50 @@ "node": ">= 14" } }, - "node_modules/proxy-agent/node_modules/lru-cache": { - "version": "7.18.3", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.18.3.tgz", - "integrity": "sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA==", - "engines": { - "node": ">=12" - } - }, "node_modules/proxy-from-env": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", - "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==" + "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==", + "license": "MIT" }, "node_modules/punycode": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", - "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", - "engines": { - "node": ">=6" - } + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", + "integrity": "sha512-jmYNElW7yvO7TV33CjSmvSiE2yco3bV2czu/OzDKdMNVZQWfxCblURLhf+47syQRBntjfLdd/H0egrzIG+oaFQ==", + "dev": true, + "license": "MIT" }, "node_modules/qjobs": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/qjobs/-/qjobs-1.2.0.tgz", "integrity": "sha512-8YOJEHtxpySA3fFDyCRxA+UUV+fA+rTWnuWvylOK/NCjhY+b4ocCtmu8TtsWb+mYeU+GCHf/S66KZF/AsteKHg==", "dev": true, + "license": "MIT", "engines": { "node": ">=0.9" } }, + "node_modules/qs": { + "version": "6.13.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.13.0.tgz", + "integrity": "sha512-+38qI9SOr8tfZ4QmJNplMUxqjbe7LKvvZgWdExBOmd+egZTtjLB67Gu0HRX3u/XOq7UU2Nx6nsjvS16Z9uwfpg==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "side-channel": "^1.0.6" + }, + "engines": { + "node": ">=0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/queue": { "version": "6.0.2", "resolved": "https://registry.npmjs.org/queue/-/queue-6.0.2.tgz", "integrity": "sha512-iHZWu+q3IdFZFX36ro/lKBkSvfkztY5Y7HMiPlOUjhupPcG2JMfst2KKEpu5XndviX/3UhFbRngUPNKtgvtZiA==", + "license": "MIT", "peer": true, "dependencies": { "inherits": "~2.0.3" @@ -11490,19 +11054,22 @@ "type": "consulting", "url": "https://feross.org/support" } - ] + ], + "license": "MIT" }, "node_modules/rambda": { "version": "7.5.0", "resolved": "https://registry.npmjs.org/rambda/-/rambda-7.5.0.tgz", "integrity": "sha512-y/M9weqWAH4iopRd7EHDEQQvpFPHj1AA3oHozE9tfITHUtTR7Z9PSlIRRG2l1GuW7sefC1cXFfIcF+cgnShdBA==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/randombytes": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", "dev": true, + "license": "MIT", "dependencies": { "safe-buffer": "^5.1.0" } @@ -11511,6 +11078,7 @@ "version": "1.2.1", "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", + "license": "MIT", "engines": { "node": ">= 0.6" } @@ -11520,6 +11088,7 @@ "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.2.tgz", "integrity": "sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA==", "dev": true, + "license": "MIT", "dependencies": { "bytes": "3.1.2", "http-errors": "2.0.0", @@ -11531,9 +11100,10 @@ } }, "node_modules/react": { - "version": "18.2.0", - "resolved": "https://registry.npmjs.org/react/-/react-18.2.0.tgz", - "integrity": "sha512-/3IjMdb2L9QbBdWiW5e3P2/npwMBaU9mHCSCUzNln0ZCYbcfTsGbTJrU/kGemdH2IWmB2ioZ+zkxtmq6g09fGQ==", + "version": "18.3.1", + "resolved": "https://registry.npmjs.org/react/-/react-18.3.1.tgz", + "integrity": "sha512-wS+hAgJShR0KhEvPJArfuPVN1+Hz1t0Y6n5jLrGQbkb4urgPE/0Rve+1kMB1v/oWgHgm4WIcV+i7F2pTVj+2iQ==", + "license": "MIT", "peer": true, "dependencies": { "loose-envify": "^1.1.0" @@ -11543,9 +11113,10 @@ } }, "node_modules/react-devtools-core": { - "version": "4.28.5", - "resolved": "https://registry.npmjs.org/react-devtools-core/-/react-devtools-core-4.28.5.tgz", - "integrity": "sha512-cq/o30z9W2Wb4rzBefjv5fBalHU0rJGZCHAkf/RHSBWSSYwh8PlQTqqOJmgIIbBtpj27T6FIPXeomIjZtCNVqA==", + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/react-devtools-core/-/react-devtools-core-5.3.2.tgz", + "integrity": "sha512-crr9HkVrDiJ0A4zot89oS0Cgv0Oa4OG1Em4jit3P3ZxZSKPMYyMjfwMqgcJna9o625g8oN87rBm8SWWrSTBZxg==", + "license": "MIT", "peer": true, "dependencies": { "shell-quote": "^1.6.1", @@ -11553,9 +11124,10 @@ } }, "node_modules/react-devtools-core/node_modules/ws": { - "version": "7.5.9", - "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.9.tgz", - "integrity": "sha512-F+P9Jil7UiSKSkppIiD94dN07AwvFixvLIj1Og1Rl9GGMuNipJnV9JzjD6XuqmAeiswGvUmNLjr5cFuXwNS77Q==", + "version": "7.5.10", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.10.tgz", + "integrity": "sha512-+dbF1tHwZpXcbOJdVOkzLDxZP1ailvSxM6ZweXTegylPny803bFhA+vqBYw4s31NSAk4S2Qz+AKXK9a4wkdjcQ==", + "license": "MIT", "peer": true, "engines": { "node": ">=8.3.0" @@ -11574,53 +11146,55 @@ } }, "node_modules/react-is": { - "version": "18.2.0", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", - "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==" + "version": "18.3.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.3.1.tgz", + "integrity": "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==", + "license": "MIT" }, "node_modules/react-native": { - "version": "0.73.6", - "resolved": "https://registry.npmjs.org/react-native/-/react-native-0.73.6.tgz", - "integrity": "sha512-oqmZe8D2/VolIzSPZw+oUd6j/bEmeRHwsLn1xLA5wllEYsZ5zNuMsDus235ONOnCRwexqof/J3aztyQswSmiaA==", + "version": "0.76.1", + "resolved": "https://registry.npmjs.org/react-native/-/react-native-0.76.1.tgz", + "integrity": "sha512-z4KnbrnnAvloRs9NGnah3u6/LK3IbtNMrvByxa3ifigbMlsMY4WPRYV9lvt/hH4Mzt8bfuI+utnOxFyJTTq3lg==", + "license": "MIT", "peer": true, "dependencies": { "@jest/create-cache-key-function": "^29.6.3", - "@react-native-community/cli": "12.3.6", - "@react-native-community/cli-platform-android": "12.3.6", - "@react-native-community/cli-platform-ios": "12.3.6", - "@react-native/assets-registry": "0.73.1", - "@react-native/codegen": "0.73.3", - "@react-native/community-cli-plugin": "0.73.17", - "@react-native/gradle-plugin": "0.73.4", - "@react-native/js-polyfills": "0.73.1", - "@react-native/normalize-colors": "0.73.2", - "@react-native/virtualized-lists": "0.73.4", + "@react-native/assets-registry": "0.76.1", + "@react-native/codegen": "0.76.1", + "@react-native/community-cli-plugin": "0.76.1", + "@react-native/gradle-plugin": "0.76.1", + "@react-native/js-polyfills": "0.76.1", + "@react-native/normalize-colors": "0.76.1", + "@react-native/virtualized-lists": "0.76.1", "abort-controller": "^3.0.0", "anser": "^1.4.9", "ansi-regex": "^5.0.0", + "babel-jest": "^29.7.0", + "babel-plugin-syntax-hermes-parser": "^0.23.1", "base64-js": "^1.5.1", "chalk": "^4.0.0", - "deprecated-react-native-prop-types": "^5.0.0", + "commander": "^12.0.0", "event-target-shim": "^5.0.1", "flow-enums-runtime": "^0.0.6", + "glob": "^7.1.1", "invariant": "^2.2.4", "jest-environment-node": "^29.6.3", "jsc-android": "^250231.0.0", "memoize-one": "^5.0.0", - "metro-runtime": "^0.80.3", - "metro-source-map": "^0.80.3", + "metro-runtime": "^0.81.0", + "metro-source-map": "^0.81.0", "mkdirp": "^0.5.1", "nullthrows": "^1.1.1", - "pretty-format": "^26.5.2", + "pretty-format": "^29.7.0", "promise": "^8.3.0", - "react-devtools-core": "^4.27.7", + "react-devtools-core": "^5.3.1", "react-refresh": "^0.14.0", - "react-shallow-renderer": "^16.15.0", "regenerator-runtime": "^0.13.2", "scheduler": "0.24.0-canary-efb381bbf-20230505", + "semver": "^7.1.3", "stacktrace-parser": "^0.1.10", "whatwg-fetch": "^3.0.0", - "ws": "^6.2.2", + "ws": "^6.2.3", "yargs": "^17.6.2" }, "bin": { @@ -11630,13 +11204,20 @@ "node": ">=18" }, "peerDependencies": { - "react": "18.2.0" + "@types/react": "^18.2.6", + "react": "^18.2.0" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } } }, "node_modules/react-native-url-polyfill": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/react-native-url-polyfill/-/react-native-url-polyfill-2.0.0.tgz", "integrity": "sha512-My330Do7/DvKnEvwQc0WdcBnFPploYKp9CYlefDXzIdEaA+PAhDYllkvGeEroEzvc4Kzzj2O4yVdz8v6fjRvhA==", + "license": "MIT", "dependencies": { "whatwg-url-without-unicode": "8.0.0-3" }, @@ -11644,59 +11225,22 @@ "react-native": "*" } }, - "node_modules/react-native/node_modules/@jest/types": { - "version": "26.6.2", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.6.2.tgz", - "integrity": "sha512-fC6QCp7Sc5sX6g8Tvbmj4XUTbyrik0akgRy03yjXbQaBWWNWGE7SGtJk98m0N8nzegD/7SggrUlivxo5ax4KWQ==", - "peer": true, - "dependencies": { - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^15.0.0", - "chalk": "^4.0.0" - }, - "engines": { - "node": ">= 10.14.2" - } - }, - "node_modules/react-native/node_modules/@types/yargs": { - "version": "15.0.19", - "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-15.0.19.tgz", - "integrity": "sha512-2XUaGVmyQjgyAZldf0D0c14vvo/yv0MhQBSTJcejMMaitsn3nxCB6TmH4G0ZQf+uxROOa9mpanoSm8h6SG/1ZA==", - "peer": true, - "dependencies": { - "@types/yargs-parser": "*" - } - }, - "node_modules/react-native/node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "peer": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/react-native/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "node_modules/react-native/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "license": "MIT", "peer": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" } }, "node_modules/react-native/node_modules/cliui": { "version": "8.0.1", "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", + "license": "ISC", "peer": true, "dependencies": { "string-width": "^4.2.0", @@ -11707,93 +11251,46 @@ "node": ">=12" } }, - "node_modules/react-native/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "node_modules/react-native/node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "deprecated": "Glob versions prior to v9 are no longer supported", + "license": "ISC", "peer": true, "dependencies": { - "color-name": "~1.1.4" + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" }, "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/react-native/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "peer": true - }, - "node_modules/react-native/node_modules/mkdirp": { - "version": "0.5.6", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz", - "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==", - "peer": true, - "dependencies": { - "minimist": "^1.2.6" - }, - "bin": { - "mkdirp": "bin/cmd.js" - } - }, - "node_modules/react-native/node_modules/pretty-format": { - "version": "26.6.2", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-26.6.2.tgz", - "integrity": "sha512-7AeGuCYNGmycyQbCqd/3PWH4eOoX/OiCa0uphp57NVTeAGdJGaAliecxwBDHYQCIvrW7aDBZCYeNTP/WX69mkg==", - "peer": true, - "dependencies": { - "@jest/types": "^26.6.2", - "ansi-regex": "^5.0.0", - "ansi-styles": "^4.0.0", - "react-is": "^17.0.1" + "node": "*" }, - "engines": { - "node": ">= 10" + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/react-native/node_modules/react-is": { - "version": "17.0.2", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz", - "integrity": "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==", - "peer": true - }, - "node_modules/react-native/node_modules/regenerator-runtime": { - "version": "0.13.11", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.11.tgz", - "integrity": "sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg==", - "peer": true - }, - "node_modules/react-native/node_modules/wrap-ansi": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", - "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "node_modules/react-native/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "license": "ISC", "peer": true, "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" + "brace-expansion": "^1.1.7" }, "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" - } - }, - "node_modules/react-native/node_modules/ws": { - "version": "6.2.2", - "resolved": "https://registry.npmjs.org/ws/-/ws-6.2.2.tgz", - "integrity": "sha512-zmhltoSR8u1cnDsD43TX59mzoMZsLKqUweyYBAIvTngR3shc0W6aOZylZmq/7hqyVxPdi+5Ud2QInblgyE72fw==", - "peer": true, - "dependencies": { - "async-limiter": "~1.0.0" + "node": "*" } }, "node_modules/react-native/node_modules/yargs": { "version": "17.7.2", "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", + "license": "MIT", "peer": true, "dependencies": { "cliui": "^8.0.1", @@ -11812,38 +11309,29 @@ "version": "21.1.1", "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", + "license": "ISC", "peer": true, "engines": { "node": ">=12" } }, "node_modules/react-refresh": { - "version": "0.14.0", - "resolved": "https://registry.npmjs.org/react-refresh/-/react-refresh-0.14.0.tgz", - "integrity": "sha512-wViHqhAd8OHeLS/IRMJjTSDHF3U9eWi62F/MledQGPdJGDhodXJ9PBLNGr6WWL7qlH12Mt3TyTpbS+hGXMjCzQ==", + "version": "0.14.2", + "resolved": "https://registry.npmjs.org/react-refresh/-/react-refresh-0.14.2.tgz", + "integrity": "sha512-jCvmsr+1IUSMUyzOkRcvnVbX3ZYC6g9TDrDbFuFmRDq7PD4yaGbLKNQL6k2jnArV8hjYxh7hVhAZB6s9HDGpZA==", + "license": "MIT", "peer": true, "engines": { "node": ">=0.10.0" } }, - "node_modules/react-shallow-renderer": { - "version": "16.15.0", - "resolved": "https://registry.npmjs.org/react-shallow-renderer/-/react-shallow-renderer-16.15.0.tgz", - "integrity": "sha512-oScf2FqQ9LFVQgA73vr86xl2NaOIX73rh+YFqcOp68CWj56tSfgtGKrEbyhCj0rSijyG9M1CYprTh39fBi5hzA==", - "peer": true, - "dependencies": { - "object-assign": "^4.1.1", - "react-is": "^16.12.0 || ^17.0.0 || ^18.0.0" - }, - "peerDependencies": { - "react": "^16.0.0 || ^17.0.0 || ^18.0.0" - } - }, "node_modules/read-pkg": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-5.2.0.tgz", "integrity": "sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg==", "dev": true, + "license": "MIT", + "peer": true, "dependencies": { "@types/normalize-package-data": "^2.4.0", "normalize-package-data": "^2.5.0", @@ -11859,6 +11347,8 @@ "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-7.0.1.tgz", "integrity": "sha512-zK0TB7Xd6JpCLmlLmufqykGE+/TlOePD6qKClNW7hHDKFh/J7/7gCWGR7joEQEW1bKq3a3yUZSObOoWLFQ4ohg==", "dev": true, + "license": "MIT", + "peer": true, "dependencies": { "find-up": "^4.1.0", "read-pkg": "^5.2.0", @@ -11876,6 +11366,8 @@ "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", "dev": true, + "license": "MIT", + "peer": true, "dependencies": { "locate-path": "^5.0.0", "path-exists": "^4.0.0" @@ -11889,6 +11381,8 @@ "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", "dev": true, + "license": "MIT", + "peer": true, "dependencies": { "p-locate": "^4.1.0" }, @@ -11901,6 +11395,8 @@ "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", "dev": true, + "license": "MIT", + "peer": true, "dependencies": { "p-try": "^2.0.0" }, @@ -11916,6 +11412,8 @@ "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", "dev": true, + "license": "MIT", + "peer": true, "dependencies": { "p-limit": "^2.2.0" }, @@ -11928,8 +11426,30 @@ "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", "dev": true, + "license": "(MIT OR CC0-1.0)", + "peer": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/read-pkg/node_modules/parse-json": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", + "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "@babel/code-frame": "^7.0.0", + "error-ex": "^1.3.1", + "json-parse-even-better-errors": "^2.3.0", + "lines-and-columns": "^1.1.6" + }, "engines": { "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/read-pkg/node_modules/type-fest": { @@ -11937,6 +11457,8 @@ "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.6.0.tgz", "integrity": "sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg==", "dev": true, + "license": "(MIT OR CC0-1.0)", + "peer": true, "engines": { "node": ">=8" } @@ -11945,6 +11467,7 @@ "version": "2.3.8", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", + "license": "MIT", "peer": true, "dependencies": { "core-util-is": "~1.0.0", @@ -11956,11 +11479,26 @@ "util-deprecate": "~1.0.1" } }, + "node_modules/readable-stream/node_modules/isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==", + "license": "MIT", + "peer": true + }, + "node_modules/readable-stream/node_modules/safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "license": "MIT", + "peer": true + }, "node_modules/readdirp": { "version": "3.6.0", "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", "dev": true, + "license": "MIT", "dependencies": { "picomatch": "^2.2.1" }, @@ -11968,16 +11506,31 @@ "node": ">=8.10.0" } }, + "node_modules/readdirp/node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, "node_modules/readline": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/readline/-/readline-1.3.0.tgz", "integrity": "sha512-k2d6ACCkiNYz222Fs/iNze30rRJ1iIicW7JuX/7/cozvih6YCkFZH+J6mAFDVgv0dRBaAyr4jDqC95R2y4IADg==", + "license": "BSD", "peer": true }, "node_modules/recast": { "version": "0.21.5", "resolved": "https://registry.npmjs.org/recast/-/recast-0.21.5.tgz", "integrity": "sha512-hjMmLaUXAm1hIuTqOdeYObMslq/q+Xff6QE3Y2P+uoHAg2nmVlLBps2hzh1UJDdMtDTMXOFewK6ky51JQIeECg==", + "license": "MIT", "peer": true, "dependencies": { "ast-types": "0.15.2", @@ -11993,6 +11546,7 @@ "version": "0.15.2", "resolved": "https://registry.npmjs.org/ast-types/-/ast-types-0.15.2.tgz", "integrity": "sha512-c27loCv9QkZinsa5ProX751khO9DJl/AcB5c2KNtA6NRvHKS0PgLfcftz72KVq504vB0Gku5s2kUZzDBvQWvHg==", + "license": "MIT", "peer": true, "dependencies": { "tslib": "^2.0.1" @@ -12006,18 +11560,22 @@ "resolved": "https://registry.npmjs.org/reflect-metadata/-/reflect-metadata-0.2.1.tgz", "integrity": "sha512-i5lLI6iw9AU3Uu4szRNPPEkomnkjRTaVt9hy/bn5g/oSzekBSMeLZblcjP74AW0vBabqERLLIrz+gR8QYR54Tw==", "deprecated": "This version has a critical bug in fallback handling. Please upgrade to reflect-metadata@0.2.2 or newer.", - "dev": true + "dev": true, + "license": "Apache-2.0", + "peer": true }, "node_modules/regenerate": { "version": "1.4.2", "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.4.2.tgz", "integrity": "sha512-zrceR/XhGYU/d/opr2EKO7aRHUeiBI8qjtfHqADTwZd6Szfy16la6kqD0MIUs5z5hx6AaKa+PixpPrR289+I0A==", + "license": "MIT", "peer": true }, "node_modules/regenerate-unicode-properties": { - "version": "10.1.1", - "resolved": "https://registry.npmjs.org/regenerate-unicode-properties/-/regenerate-unicode-properties-10.1.1.tgz", - "integrity": "sha512-X007RyZLsCJVVrjgEFVpLUTZwyOZk3oiL75ZcuYjlIWd6rNJtOjkBwQc5AsRrpbKVkxN6sklw/k/9m2jJYOf8Q==", + "version": "10.2.0", + "resolved": "https://registry.npmjs.org/regenerate-unicode-properties/-/regenerate-unicode-properties-10.2.0.tgz", + "integrity": "sha512-DqHn3DwbmmPVzeKj9woBadqmXxLvQoQIwu7nopMc72ztvxVmVk2SBhSnx67zuye5TP+lJsb/TBQsjLKhnDf3MA==", + "license": "MIT", "peer": true, "dependencies": { "regenerate": "^1.4.2" @@ -12027,15 +11585,17 @@ } }, "node_modules/regenerator-runtime": { - "version": "0.14.1", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz", - "integrity": "sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==", + "version": "0.13.11", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.11.tgz", + "integrity": "sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg==", + "license": "MIT", "peer": true }, "node_modules/regenerator-transform": { "version": "0.15.2", "resolved": "https://registry.npmjs.org/regenerator-transform/-/regenerator-transform-0.15.2.tgz", "integrity": "sha512-hfMp2BoF0qOk3uc5V20ALGDS2ddjQaLrdl7xrGXvAIow7qeWRM2VA2HuCHkUKk9slq3VwEwLNK3DFBqDfPGYtg==", + "license": "MIT", "peer": true, "dependencies": { "@babel/runtime": "^7.8.4" @@ -12046,6 +11606,8 @@ "resolved": "https://registry.npmjs.org/regexp-match-indices/-/regexp-match-indices-1.0.2.tgz", "integrity": "sha512-DwZuAkt8NF5mKwGGER1EGh2PRqyvhRhhLviH+R8y8dIuaQROlUfXjt4s9ZTXstIsSkptf06BSvwcEmmfheJJWQ==", "dev": true, + "license": "Apache-2.0", + "peer": true, "dependencies": { "regexp-tree": "^0.1.11" } @@ -12055,20 +11617,23 @@ "resolved": "https://registry.npmjs.org/regexp-tree/-/regexp-tree-0.1.27.tgz", "integrity": "sha512-iETxpjK6YoRWJG5o6hXLwvjYAoW+FEZn9os0PD/b6AP6xQwsa/Y7lCVgIixBbUPMfhu+i2LtdeAqVTgGlQarfA==", "dev": true, + "license": "MIT", + "peer": true, "bin": { "regexp-tree": "bin/regexp-tree" } }, "node_modules/regexp.prototype.flags": { - "version": "1.5.2", - "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.2.tgz", - "integrity": "sha512-NcDiDkTLuPR+++OCKB0nWafEmhg/Da8aUPLPMQbK+bxKKCm1/S5he+AqYa4PlMCVBalb4/yxIRub6qkEx5yJbw==", + "version": "1.5.3", + "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.3.tgz", + "integrity": "sha512-vqlC04+RQoFalODCbCumG2xIOvapzVMHwsyIGM/SIE8fRhFFsXeH8/QQ+s0T0kDAhKc4k30s73/0ydkHQz6HlQ==", "dev": true, + "license": "MIT", "dependencies": { - "call-bind": "^1.0.6", + "call-bind": "^1.0.7", "define-properties": "^1.2.1", "es-errors": "^1.3.0", - "set-function-name": "^2.0.1" + "set-function-name": "^2.0.2" }, "engines": { "node": ">= 0.4" @@ -12078,15 +11643,16 @@ } }, "node_modules/regexpu-core": { - "version": "5.3.2", - "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-5.3.2.tgz", - "integrity": "sha512-RAM5FlZz+Lhmo7db9L298p2vHP5ZywrVXmVXpmAD9GuL5MPH6t9ROw1iA/wfHkQ76Qe7AaPF0nGuim96/IrQMQ==", + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-6.1.1.tgz", + "integrity": "sha512-k67Nb9jvwJcJmVpw0jPttR1/zVfnKf8Km0IPatrU/zJ5XeG3+Slx0xLXs9HByJSzXzrlz5EDvN6yLNMDc2qdnw==", + "license": "MIT", "peer": true, "dependencies": { - "@babel/regjsgen": "^0.8.0", "regenerate": "^1.4.2", - "regenerate-unicode-properties": "^10.1.0", - "regjsparser": "^0.9.1", + "regenerate-unicode-properties": "^10.2.0", + "regjsgen": "^0.8.0", + "regjsparser": "^0.11.0", "unicode-match-property-ecmascript": "^2.0.0", "unicode-match-property-value-ecmascript": "^2.1.0" }, @@ -12094,32 +11660,33 @@ "node": ">=4" } }, + "node_modules/regjsgen": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/regjsgen/-/regjsgen-0.8.0.tgz", + "integrity": "sha512-RvwtGe3d7LvWiDQXeQw8p5asZUmfU1G/l6WbUXeHta7Y2PEIvBTwH6E2EfmYUK8pxcxEdEmaomqyp0vZZ7C+3Q==", + "license": "MIT", + "peer": true + }, "node_modules/regjsparser": { - "version": "0.9.1", - "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.9.1.tgz", - "integrity": "sha512-dQUtn90WanSNl+7mQKcXAgZxvUe7Z0SqXlgzv0za4LwiUhyzBC58yQO3liFoUgu8GiJVInAhJjkj1N0EtQ5nkQ==", + "version": "0.11.2", + "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.11.2.tgz", + "integrity": "sha512-3OGZZ4HoLJkkAZx/48mTXJNlmqTGOzc0o9OWQPuWpkOlXXPbyN6OafCcoXUnBqE2D3f/T5L+pWc1kdEmnfnRsA==", + "license": "BSD-2-Clause", "peer": true, "dependencies": { - "jsesc": "~0.5.0" + "jsesc": "~3.0.2" }, "bin": { "regjsparser": "bin/parser" } }, - "node_modules/regjsparser/node_modules/jsesc": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz", - "integrity": "sha512-uZz5UnB7u4T9LvwmFqXii7pZSouaRPorGs5who1Ip7VO0wxanFvBL7GkM6dTHlgX+jhBApRetaWpnDabOeTcnA==", - "peer": true, - "bin": { - "jsesc": "bin/jsesc" - } - }, "node_modules/repeat-string": { "version": "1.6.1", "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", "integrity": "sha512-PV0dzCYDNfRi1jCDbJzpW7jNNDRuCOG/jI5ctQcGKt/clZD+YcPS3yIlWuTJMmESC8aevCFmWJy5wjAFgNqN6w==", "dev": true, + "license": "MIT", + "peer": true, "engines": { "node": ">=0.10" } @@ -12128,26 +11695,23 @@ "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", + "license": "MIT", "engines": { "node": ">=0.10.0" } }, - "node_modules/require-main-filename": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", - "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", - "peer": true - }, "node_modules/requires-port": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", "integrity": "sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/resolve": { "version": "1.22.8", "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz", "integrity": "sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==", + "license": "MIT", "dependencies": { "is-core-module": "^2.13.0", "path-parse": "^1.0.7", @@ -12165,6 +11729,7 @@ "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", "dev": true, + "license": "MIT", "engines": { "node": ">=4" } @@ -12174,6 +11739,8 @@ "resolved": "https://registry.npmjs.org/resolve-pkg/-/resolve-pkg-2.0.0.tgz", "integrity": "sha512-+1lzwXehGCXSeryaISr6WujZzowloigEofRB+dj75y9RRa/obVcYgbHJd53tdYw8pvZj8GojXaaENws8Ktw/hQ==", "dev": true, + "license": "MIT", + "peer": true, "dependencies": { "resolve-from": "^5.0.0" }, @@ -12186,6 +11753,7 @@ "resolved": "https://registry.npmjs.org/resolve-pkg-maps/-/resolve-pkg-maps-1.0.0.tgz", "integrity": "sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==", "dev": true, + "license": "MIT", "funding": { "url": "https://github.com/privatenumber/resolve-pkg-maps?sponsor=1" } @@ -12195,49 +11763,36 @@ "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/restore-cursor": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz", - "integrity": "sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==", + "license": "MIT", "peer": true, - "dependencies": { - "onetime": "^5.1.0", - "signal-exit": "^3.0.2" - }, "engines": { "node": ">=8" } }, - "node_modules/restore-cursor/node_modules/signal-exit": { - "version": "3.0.7", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", - "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", - "peer": true - }, "node_modules/reusify": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", "dev": true, + "license": "MIT", "engines": { "iojs": ">=1.0.0", "node": ">=0.10.0" } }, "node_modules/rfdc": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/rfdc/-/rfdc-1.3.1.tgz", - "integrity": "sha512-r5a3l5HzYlIC68TpmYKlxWjmOP6wiPJ1vWv2HeLhNsRZMrCkxeqxiHlQ21oXmQ4F3SiryXBHhAD7JZqvOJjFmg==", - "dev": true + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/rfdc/-/rfdc-1.4.1.tgz", + "integrity": "sha512-q1b3N5QkRUWUl7iyylaaj3kOpIT0N2i9MqIEQXP73GVsN9cw3fdx8X63cEmWhJGi2PPCF23Ijp7ktmd39rawIA==", + "dev": true, + "license": "MIT" }, "node_modules/rimraf": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "deprecated": "Rimraf versions prior to v4 are no longer supported", + "license": "ISC", "dependencies": { "glob": "^7.1.3" }, @@ -12252,6 +11807,7 @@ "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "license": "MIT", "dependencies": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -12261,6 +11817,8 @@ "version": "7.2.3", "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "deprecated": "Glob versions prior to v9 are no longer supported", + "license": "ISC", "dependencies": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", @@ -12280,6 +11838,7 @@ "version": "3.1.2", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "license": "ISC", "dependencies": { "brace-expansion": "^1.1.7" }, @@ -12288,10 +11847,11 @@ } }, "node_modules/rollup": { - "version": "4.14.3", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.14.3.tgz", - "integrity": "sha512-ag5tTQKYsj1bhrFC9+OEWqb5O6VYgtQDO9hPDBMmIbePwhfSr+ExlcU741t8Dhw5DkPCQf6noz0jb36D6W9/hw==", + "version": "4.22.4", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.22.4.tgz", + "integrity": "sha512-vD8HJ5raRcWOyymsR6Z3o6+RzfEPCnVLMFJ6vRslO1jt4LO6dUo5Qnpg7y4RkZFM2DMe3WUirkI5c16onjrc6A==", "dev": true, + "license": "MIT", "dependencies": { "@types/estree": "1.0.5" }, @@ -12303,22 +11863,22 @@ "npm": ">=8.0.0" }, "optionalDependencies": { - "@rollup/rollup-android-arm-eabi": "4.14.3", - "@rollup/rollup-android-arm64": "4.14.3", - "@rollup/rollup-darwin-arm64": "4.14.3", - "@rollup/rollup-darwin-x64": "4.14.3", - "@rollup/rollup-linux-arm-gnueabihf": "4.14.3", - "@rollup/rollup-linux-arm-musleabihf": "4.14.3", - "@rollup/rollup-linux-arm64-gnu": "4.14.3", - "@rollup/rollup-linux-arm64-musl": "4.14.3", - "@rollup/rollup-linux-powerpc64le-gnu": "4.14.3", - "@rollup/rollup-linux-riscv64-gnu": "4.14.3", - "@rollup/rollup-linux-s390x-gnu": "4.14.3", - "@rollup/rollup-linux-x64-gnu": "4.14.3", - "@rollup/rollup-linux-x64-musl": "4.14.3", - "@rollup/rollup-win32-arm64-msvc": "4.14.3", - "@rollup/rollup-win32-ia32-msvc": "4.14.3", - "@rollup/rollup-win32-x64-msvc": "4.14.3", + "@rollup/rollup-android-arm-eabi": "4.22.4", + "@rollup/rollup-android-arm64": "4.22.4", + "@rollup/rollup-darwin-arm64": "4.22.4", + "@rollup/rollup-darwin-x64": "4.22.4", + "@rollup/rollup-linux-arm-gnueabihf": "4.22.4", + "@rollup/rollup-linux-arm-musleabihf": "4.22.4", + "@rollup/rollup-linux-arm64-gnu": "4.22.4", + "@rollup/rollup-linux-arm64-musl": "4.22.4", + "@rollup/rollup-linux-powerpc64le-gnu": "4.22.4", + "@rollup/rollup-linux-riscv64-gnu": "4.22.4", + "@rollup/rollup-linux-s390x-gnu": "4.22.4", + "@rollup/rollup-linux-x64-gnu": "4.22.4", + "@rollup/rollup-linux-x64-musl": "4.22.4", + "@rollup/rollup-win32-arm64-msvc": "4.22.4", + "@rollup/rollup-win32-ia32-msvc": "4.22.4", + "@rollup/rollup-win32-x64-msvc": "4.22.4", "fsevents": "~2.3.2" } }, @@ -12327,6 +11887,7 @@ "resolved": "https://registry.npmjs.org/rollup-plugin-gzip/-/rollup-plugin-gzip-3.1.2.tgz", "integrity": "sha512-9xemMyvCjkklgNpu6jCYqQAbvCLJzA2nilkiOGzFuXTUX3cXEFMwIhsIBRF7kTKD/SnZ1tNPcxFm4m4zJ3VfNQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=10.0.0" }, @@ -12339,6 +11900,7 @@ "resolved": "https://registry.npmjs.org/rollup-plugin-string/-/rollup-plugin-string-3.0.0.tgz", "integrity": "sha512-vqyzgn9QefAgeKi+Y4A7jETeIAU1zQmS6VotH6bzm/zmUQEnYkpIGRaOBPY41oiWYV4JyBoGAaBjYMYuv+6wVw==", "dev": true, + "license": "MIT", "dependencies": { "rollup-pluginutils": "^2.4.1" } @@ -12348,6 +11910,7 @@ "resolved": "https://registry.npmjs.org/rollup-pluginutils/-/rollup-pluginutils-2.8.2.tgz", "integrity": "sha512-EEp9NhnUkwY8aif6bxgovPHMoMoNr2FulJziTndpt5H9RdwC47GSGuII9XxpSdzVGM0GWrNPHV6ie1LTNJPaLQ==", "dev": true, + "license": "MIT", "dependencies": { "estree-walker": "^0.6.1" } @@ -12356,7 +11919,15 @@ "version": "0.6.1", "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-0.6.1.tgz", "integrity": "sha512-SqmZANLWS0mnatqbSfRP5g8OXZC12Fgg1IwNtLsyHDzJizORW4khDfjPqJZsemPWBB2uqykUah5YpQ6epsqC/w==", - "dev": true + "dev": true, + "license": "MIT" + }, + "node_modules/rollup/node_modules/@types/estree": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.5.tgz", + "integrity": "sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==", + "dev": true, + "license": "MIT" }, "node_modules/run-parallel": { "version": "1.2.0", @@ -12377,25 +11948,44 @@ "url": "https://feross.org/support" } ], + "license": "MIT", "dependencies": { "queue-microtask": "^1.2.2" } }, "node_modules/safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" }, "node_modules/safer-buffer": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/scheduler": { "version": "0.24.0-canary-efb381bbf-20230505", "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.24.0-canary-efb381bbf-20230505.tgz", "integrity": "sha512-ABvovCDe/k9IluqSh4/ISoq8tIJnW8euVAWYt5j/bg6dRnqwQwiGO1F/V4AyK96NGF/FB04FhOUDuWj8IKfABA==", + "license": "MIT", "peer": true, "dependencies": { "loose-envify": "^1.1.0" @@ -12405,37 +11995,41 @@ "version": "2.2.0", "resolved": "https://registry.npmjs.org/seed-random/-/seed-random-2.2.0.tgz", "integrity": "sha512-34EQV6AAHQGhoc0tn/96a9Fsi6v2xdqe/dMUwljGRaFOzR3EgRmECvD0O8vi8X+/uQ50LGHfkNu/Eue5TPKZkQ==", - "dev": true + "dev": true, + "license": "MIT", + "peer": true }, - "node_modules/semver": { - "version": "7.5.3", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.3.tgz", - "integrity": "sha512-QBlUtyVk/5EeHbi7X0fw6liDZc7BBmEaSYn01fMU1OUYbf6GPsbTtd8WmnqbI20SeycoHSeiybkE/q1Q+qlThQ==", + "node_modules/selfsigned": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/selfsigned/-/selfsigned-2.4.1.tgz", + "integrity": "sha512-th5B4L2U+eGLq1TVh7zNRGBapioSORUeymIydxgFpwww9d2qyKvtuPU2jJuHvYAwwqi2Y596QBL3eEqcPEYL8Q==", + "license": "MIT", + "peer": true, "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" + "@types/node-forge": "^1.3.0", + "node-forge": "^1" }, "engines": { "node": ">=10" } }, - "node_modules/semver/node_modules/lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "dependencies": { - "yallist": "^4.0.0" + "node_modules/semver": { + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", + "license": "ISC", + "bin": { + "semver": "bin/semver.js" }, "engines": { "node": ">=10" } }, "node_modules/send": { - "version": "0.18.0", - "resolved": "https://registry.npmjs.org/send/-/send-0.18.0.tgz", - "integrity": "sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg==", + "version": "0.19.0", + "resolved": "https://registry.npmjs.org/send/-/send-0.19.0.tgz", + "integrity": "sha512-dW41u5VfLXu8SJh5bwRmyYUbAoSB3c9uQh6L8h/KtsFREPWpbX1lrljJo186Jc4nmci/sGUZ9a0a0J2zgfq2hw==", + "license": "MIT", "peer": true, "dependencies": { "debug": "2.6.9", @@ -12460,6 +12054,7 @@ "version": "2.6.9", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "license": "MIT", "peer": true, "dependencies": { "ms": "2.0.0" @@ -12469,12 +12064,14 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "license": "MIT", "peer": true }, "node_modules/send/node_modules/mime": { "version": "1.6.0", "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", + "license": "MIT", "peer": true, "bin": { "mime": "cli.js" @@ -12483,42 +12080,24 @@ "node": ">=4" } }, - "node_modules/send/node_modules/ms": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", - "peer": true - }, "node_modules/send/node_modules/statuses": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", + "license": "MIT", "peer": true, "engines": { "node": ">= 0.8" } }, "node_modules/serialize-error": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/serialize-error/-/serialize-error-4.1.0.tgz", - "integrity": "sha512-5j9GgyGsP9vV9Uj1S0lDCvlsd+gc2LEPVK7HHHte7IyPwOD4lVQFeaX143gx3U5AnoCi+wbcb3mvaxVysjpxEw==", - "dev": true, - "peer": true, - "dependencies": { - "type-fest": "^0.3.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/serialize-error/node_modules/type-fest": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.3.1.tgz", - "integrity": "sha512-cUGJnCdr4STbePCgqNFbpVNCepa+kAVohJs1sLhxzdH+gnEoOd8VhbYa7pD3zZYGiURWM2xzEII3fQcRizDkYQ==", - "dev": true, + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/serialize-error/-/serialize-error-2.1.0.tgz", + "integrity": "sha512-ghgmKt5o4Tly5yEG/UJp8qTd0AN7Xalw4XBtDEKP655B699qMEtra1WlXeE6WIvdEG481JvRxULKsInq/iNysw==", + "license": "MIT", "peer": true, "engines": { - "node": ">=6" + "node": ">=0.10.0" } }, "node_modules/serialize-javascript": { @@ -12526,36 +12105,43 @@ "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.2.tgz", "integrity": "sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g==", "dev": true, + "license": "BSD-3-Clause", "dependencies": { "randombytes": "^2.1.0" } }, "node_modules/serve-static": { - "version": "1.15.0", - "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.15.0.tgz", - "integrity": "sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g==", + "version": "1.16.2", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.16.2.tgz", + "integrity": "sha512-VqpjJZKadQB/PEbEwvFdO43Ax5dFBZ2UECszz8bQ7pi7wt//PWe1P6MN7eCnjsatYtBT6EuiClbjSWP2WrIoTw==", + "license": "MIT", "peer": true, "dependencies": { - "encodeurl": "~1.0.2", + "encodeurl": "~2.0.0", "escape-html": "~1.0.3", "parseurl": "~1.3.3", - "send": "0.18.0" + "send": "0.19.0" }, "engines": { "node": ">= 0.8.0" } }, - "node_modules/set-blocking": { + "node_modules/serve-static/node_modules/encodeurl": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", - "integrity": "sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==", - "peer": true + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-2.0.0.tgz", + "integrity": "sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">= 0.8" + } }, "node_modules/set-function-length": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", "integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==", "dev": true, + "license": "MIT", "dependencies": { "define-data-property": "^1.1.4", "es-errors": "^1.3.0", @@ -12573,6 +12159,7 @@ "resolved": "https://registry.npmjs.org/set-function-name/-/set-function-name-2.0.2.tgz", "integrity": "sha512-7PGFlmtwsEADb0WYyvCMa1t+yke6daIG4Wirafur5kcf+MhUnPms1UeR0CKQdTZD81yESwMHbtn+TR+dMviakQ==", "dev": true, + "license": "MIT", "dependencies": { "define-data-property": "^1.1.4", "es-errors": "^1.3.0", @@ -12586,12 +12173,14 @@ "node_modules/setprototypeof": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", - "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==" + "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==", + "license": "ISC" }, "node_modules/shallow-clone": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/shallow-clone/-/shallow-clone-3.0.1.tgz", "integrity": "sha512-/6KqX+GVUdqPuPPd2LxDDxzX6CAbjJehAAOKlNpqqUpAqPM6HeL8f+o3a+JsyGjn2lv0WY8UsTgUJjU9Ok55NA==", + "license": "MIT", "peer": true, "dependencies": { "kind-of": "^6.0.2" @@ -12604,6 +12193,7 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "license": "MIT", "dependencies": { "shebang-regex": "^3.0.0" }, @@ -12615,6 +12205,7 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "license": "MIT", "engines": { "node": ">=8" } @@ -12623,6 +12214,7 @@ "version": "1.8.1", "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.8.1.tgz", "integrity": "sha512-6j1W9l1iAs/4xYBI1SYOVZyFcCis9b4KCLQ8fgAGG07QvzaRLVVRQvAy85yNmmZSjYjg4MWh4gNvlPujU/5LpA==", + "license": "MIT", "peer": true, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -12633,37 +12225,34 @@ "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.6.tgz", "integrity": "sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==", "dev": true, + "license": "MIT", "dependencies": { "call-bind": "^1.0.7", "es-errors": "^1.3.0", - "get-intrinsic": "^1.2.4", - "object-inspect": "^1.13.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/signal-exit": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", - "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", - "dev": true, + "get-intrinsic": "^1.2.4", + "object-inspect": "^1.13.1" + }, "engines": { - "node": ">=14" + "node": ">= 0.4" }, "funding": { - "url": "https://github.com/sponsors/isaacs" + "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/signal-exit": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", + "license": "ISC", + "peer": true + }, "node_modules/sinon": { "version": "7.5.0", "resolved": "https://registry.npmjs.org/sinon/-/sinon-7.5.0.tgz", "integrity": "sha512-AoD0oJWerp0/rY9czP/D6hDTTUYGpObhZjMpd7Cl/A6+j0xBE+ayL/ldfggkBXUs0IkvIiM1ljM8+WkOc5k78Q==", "deprecated": "16.1.1", "dev": true, + "license": "BSD-3-Clause", "dependencies": { "@sinonjs/commons": "^1.4.0", "@sinonjs/formatio": "^3.2.1", @@ -12679,16 +12268,28 @@ "resolved": "https://registry.npmjs.org/sinon-chai/-/sinon-chai-3.7.0.tgz", "integrity": "sha512-mf5NURdUaSdnatJx3uhoBOrY9dtL19fiOtAdT1Azxg3+lNJFiuN0uzaU3xX1LeAfL17kHQhTAJgpsfhbMJMY2g==", "dev": true, + "license": "(BSD-2-Clause OR WTFPL)", "peerDependencies": { "chai": "^4.0.0", "sinon": ">=4.0.0" } }, + "node_modules/sinon/node_modules/@sinonjs/commons": { + "version": "1.8.6", + "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.8.6.tgz", + "integrity": "sha512-Ky+XkAkqPZSm3NLBeUng77EBQl3cmeJhITaGHdYH8kjVB+aun3S4XBRti2zt17mtt0mIUDiNxYeoJm6drVvBJQ==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "type-detect": "4.0.8" + } + }, "node_modules/sinon/node_modules/diff": { "version": "3.5.0", "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==", "dev": true, + "license": "BSD-3-Clause", "engines": { "node": ">=0.3.1" } @@ -12698,6 +12299,7 @@ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", "dev": true, + "license": "MIT", "engines": { "node": ">=4" } @@ -12707,6 +12309,7 @@ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", "dev": true, + "license": "MIT", "dependencies": { "has-flag": "^3.0.0" }, @@ -12714,59 +12317,30 @@ "node": ">=4" } }, - "node_modules/sisteransi": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz", - "integrity": "sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==", - "peer": true + "node_modules/sinon/node_modules/type-detect": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", + "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } }, "node_modules/slash": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", + "license": "MIT", "engines": { "node": ">=8" } }, - "node_modules/slice-ansi": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-2.1.0.tgz", - "integrity": "sha512-Qu+VC3EwYLldKa1fCxuuvULvSJOKEgk9pi8dZeCVK7TqBfUNTH4sFkk4joj8afVSfAYgJoSOetjx9QWOJ5mYoQ==", - "peer": true, - "dependencies": { - "ansi-styles": "^3.2.0", - "astral-regex": "^1.0.0", - "is-fullwidth-code-point": "^2.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/slice-ansi/node_modules/ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "peer": true, - "dependencies": { - "color-convert": "^1.9.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/slice-ansi/node_modules/is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha512-VHskAKYM8RfSFXwee5t5cbN5PZeq1Wrh6qd5bkyiXIf6UQcN6w/A0eXM9r6t8d+GYOh+o6ZhiEnb88LN/Y8m2w==", - "peer": true, - "engines": { - "node": ">=4" - } - }, "node_modules/smart-buffer": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.2.0.tgz", "integrity": "sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==", + "license": "MIT", "engines": { "node": ">= 6.0.0", "npm": ">= 3.0.0" @@ -12776,19 +12350,21 @@ "version": "1.5.0", "resolved": "https://registry.npmjs.org/smob/-/smob-1.5.0.tgz", "integrity": "sha512-g6T+p7QO8npa+/hNx9ohv1E5pVCmWrVCUzUXJyLdMmftX6ER0oiWY/w9knEonLpnOp6b6FenKnMfR8gqwWdwig==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/socket.io": { - "version": "4.7.5", - "resolved": "https://registry.npmjs.org/socket.io/-/socket.io-4.7.5.tgz", - "integrity": "sha512-DmeAkF6cwM9jSfmp6Dr/5/mfMwb5Z5qRrSXLpo3Fq5SqyU8CMF15jIN4ZhfSwu35ksM1qmHZDQ/DK5XTccSTvA==", + "version": "4.8.1", + "resolved": "https://registry.npmjs.org/socket.io/-/socket.io-4.8.1.tgz", + "integrity": "sha512-oZ7iUCxph8WYRHHcjBEc9unw3adt5CmSNlppj/5Q4k2RIrhl8Z5yY2Xr4j9zj0+wzVZ0bxmYoGSzKJnRl6A4yg==", "dev": true, + "license": "MIT", "dependencies": { "accepts": "~1.3.4", "base64id": "~2.0.0", "cors": "~2.8.5", "debug": "~4.3.2", - "engine.io": "~6.5.2", + "engine.io": "~6.6.0", "socket.io-adapter": "~2.5.2", "socket.io-parser": "~4.2.4" }, @@ -12797,13 +12373,36 @@ } }, "node_modules/socket.io-adapter": { - "version": "2.5.4", - "resolved": "https://registry.npmjs.org/socket.io-adapter/-/socket.io-adapter-2.5.4.tgz", - "integrity": "sha512-wDNHGXGewWAjQPt3pyeYBtpWSq9cLE5UW1ZUPL/2eGK9jtse/FpXib7epSTsz0Q0m+6sg6Y4KtcFTlah1bdOVg==", + "version": "2.5.5", + "resolved": "https://registry.npmjs.org/socket.io-adapter/-/socket.io-adapter-2.5.5.tgz", + "integrity": "sha512-eLDQas5dzPgOWCk9GuuJC2lBqItuhKI4uxGgo9aIV7MYbk2h9Q6uULEh8WBzThoI7l+qU9Ast9fVUmkqPP9wYg==", "dev": true, + "license": "MIT", "dependencies": { "debug": "~4.3.4", - "ws": "~8.11.0" + "ws": "~8.17.1" + } + }, + "node_modules/socket.io-adapter/node_modules/ws": { + "version": "8.17.1", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.17.1.tgz", + "integrity": "sha512-6XQFvXTkbfUOZOKKILFG1PDK2NDQs4azKQl26T0YS5CxqWLgXajbPZ+h4gZekJyRqFU8pvnbAbbs/3TgRPy+GQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10.0.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": ">=5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } } }, "node_modules/socket.io-parser": { @@ -12811,6 +12410,7 @@ "resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-4.2.4.tgz", "integrity": "sha512-/GbIKmo8ioc+NIWIhwdecY0ge+qVBSMdgxGygevmdHj24bsfgtCmcUUcQ5ZzcylGFHsN3k4HB4Cgkl96KVnuew==", "dev": true, + "license": "MIT", "dependencies": { "@socket.io/component-emitter": "~3.1.0", "debug": "~4.3.1" @@ -12823,6 +12423,7 @@ "version": "2.8.3", "resolved": "https://registry.npmjs.org/socks/-/socks-2.8.3.tgz", "integrity": "sha512-l5x7VUUWbjVFbafGLxPWkYsHIhEvmF85tbIeFZWc8ZPtoMyybuEhL7Jye/ooC4/d48FgOjSJXgsF/AJPYCW8Zw==", + "license": "MIT", "dependencies": { "ip-address": "^9.0.5", "smart-buffer": "^4.2.0" @@ -12833,13 +12434,14 @@ } }, "node_modules/socks-proxy-agent": { - "version": "8.0.3", - "resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-8.0.3.tgz", - "integrity": "sha512-VNegTZKhuGq5vSD6XNKlbqWhyt/40CgoEw8XxD6dhnm8Jq9IEa3nIa4HwnM8XOqU0CdB0BwWVXusqiFXfHB3+A==", + "version": "8.0.4", + "resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-8.0.4.tgz", + "integrity": "sha512-GNAq/eg8Udq2x0eNiFkr9gRg5bA7PXEWagQdeRX4cPSG+X/8V38v637gim9bjFptMk1QWsCTr0ttrJEiXbNnRw==", + "license": "MIT", "dependencies": { "agent-base": "^7.1.1", "debug": "^4.3.4", - "socks": "^2.7.1" + "socks": "^2.8.3" }, "engines": { "node": ">= 14" @@ -12849,6 +12451,7 @@ "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "license": "BSD-3-Clause", "engines": { "node": ">=0.10.0" } @@ -12857,6 +12460,7 @@ "version": "0.5.21", "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", + "license": "MIT", "dependencies": { "buffer-from": "^1.0.0", "source-map": "^0.6.0" @@ -12867,6 +12471,8 @@ "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.2.0.tgz", "integrity": "sha512-kN9dJbvnySHULIluDHy32WHRUu3Og7B9sbY7tsFLctQkIqnMh3hErYgdMjTYuqmcXX+lK5T1lnUt3G7zNswmZA==", "dev": true, + "license": "Apache-2.0", + "peer": true, "dependencies": { "spdx-expression-parse": "^3.0.0", "spdx-license-ids": "^3.0.0" @@ -12876,50 +12482,41 @@ "version": "2.5.0", "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.5.0.tgz", "integrity": "sha512-PiU42r+xO4UbUS1buo3LPJkjlO7430Xn5SVAhdpzzsPHsjbYVflnnFdATgabnLude+Cqu25p6N+g2lw/PFsa4w==", - "dev": true + "dev": true, + "license": "CC-BY-3.0", + "peer": true }, "node_modules/spdx-expression-parse": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz", "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==", "dev": true, + "license": "MIT", + "peer": true, "dependencies": { "spdx-exceptions": "^2.1.0", "spdx-license-ids": "^3.0.0" } }, "node_modules/spdx-license-ids": { - "version": "3.0.17", - "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.17.tgz", - "integrity": "sha512-sh8PWc/ftMqAAdFiBu6Fy6JUOYjqDJBJvIhpfDMyHrr0Rbp5liZqd4TjtQ/RgfLjKFZb+LMx5hpml5qOWy0qvg==", - "dev": true + "version": "3.0.20", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.20.tgz", + "integrity": "sha512-jg25NiDV/1fLtSgEgyvVyDunvaNHbuwF9lfNV17gSmPFAlYzdfNBlLtLzXTevwkPj7DhGbmN9VnmJIgLnhvaBw==", + "dev": true, + "license": "CC0-1.0", + "peer": true }, "node_modules/sprintf-js": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==" - }, - "node_modules/stack-chain": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/stack-chain/-/stack-chain-2.0.0.tgz", - "integrity": "sha512-GGrHXePi305aW7XQweYZZwiRwR7Js3MWoK/EHzzB9ROdc75nCnjSJVi21rdAGxFl+yCx2L2qdfl5y7NO4lTyqg==", - "dev": true, - "peer": true - }, - "node_modules/stack-generator": { - "version": "2.0.10", - "resolved": "https://registry.npmjs.org/stack-generator/-/stack-generator-2.0.10.tgz", - "integrity": "sha512-mwnua/hkqM6pF4k8SnmZ2zfETsRUpWXREfA/goT8SLCV4iOFa4bzOX2nDipWAZFPTjLvQB82f5yaodMVhK0yJQ==", - "dev": true, - "peer": true, - "dependencies": { - "stackframe": "^1.3.4" - } + "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", + "license": "BSD-3-Clause" }, "node_modules/stack-utils": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-2.0.6.tgz", "integrity": "sha512-XlkWvfIm6RmsWtNJx+uqtKLS8eqFbxUg0ZzLXqY0caEy9l7hruX8IpiDnjsLavoBgqCCR71TqWO8MaXYheJ3RQ==", + "license": "MIT", "dependencies": { "escape-string-regexp": "^2.0.0" }, @@ -12927,48 +12524,27 @@ "node": ">=10" } }, - "node_modules/stackframe": { - "version": "1.3.4", - "resolved": "https://registry.npmjs.org/stackframe/-/stackframe-1.3.4.tgz", - "integrity": "sha512-oeVtt7eWQS+Na6F//S4kJ2K2VbRlS9D43mAlMyVpVWovy9o+jfgH8O9agzANzaiLjclA0oYzUXEM4PurhSUChw==" - }, - "node_modules/stacktrace-gps": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/stacktrace-gps/-/stacktrace-gps-3.1.2.tgz", - "integrity": "sha512-GcUgbO4Jsqqg6RxfyTHFiPxdPqF+3LFmQhm7MgCuYQOYuWyqxo5pwRPz5d/u6/WYJdEnWfK4r+jGbyD8TSggXQ==", - "dev": true, - "peer": true, - "dependencies": { - "source-map": "0.5.6", - "stackframe": "^1.3.4" - } - }, - "node_modules/stacktrace-gps/node_modules/source-map": { - "version": "0.5.6", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.6.tgz", - "integrity": "sha512-MjZkVp0NHr5+TPihLcadqnlVoGIoWo4IBHptutGh9wI3ttUYvCG26HkSuDi+K6lsZ25syXJXcctwgyVCt//xqA==", - "dev": true, - "peer": true, + "node_modules/stack-utils/node_modules/escape-string-regexp": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz", + "integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==", + "license": "MIT", "engines": { - "node": ">=0.10.0" + "node": ">=8" } }, - "node_modules/stacktrace-js": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/stacktrace-js/-/stacktrace-js-2.0.2.tgz", - "integrity": "sha512-Je5vBeY4S1r/RnLydLl0TBTi3F2qdfWmYsGvtfZgEI+SCprPppaIhQf5nGcal4gI4cGpCV/duLcAzT1np6sQqg==", - "dev": true, - "peer": true, - "dependencies": { - "error-stack-parser": "^2.0.6", - "stack-generator": "^2.0.5", - "stacktrace-gps": "^3.0.4" - } + "node_modules/stackframe": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/stackframe/-/stackframe-1.3.4.tgz", + "integrity": "sha512-oeVtt7eWQS+Na6F//S4kJ2K2VbRlS9D43mAlMyVpVWovy9o+jfgH8O9agzANzaiLjclA0oYzUXEM4PurhSUChw==", + "license": "MIT", + "peer": true }, "node_modules/stacktrace-parser": { "version": "0.1.10", "resolved": "https://registry.npmjs.org/stacktrace-parser/-/stacktrace-parser-0.1.10.tgz", "integrity": "sha512-KJP1OCML99+8fhOHxwwzyWrlUuVX5GQ0ZpJTd1DFXhdkrvg1szxfHhawXUZ3g9TkXORQd4/WG68jMlQZ2p8wlg==", + "license": "MIT", "peer": true, "dependencies": { "type-fest": "^0.7.1" @@ -12981,6 +12557,7 @@ "version": "0.7.1", "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.7.1.tgz", "integrity": "sha512-Ne2YiiGN8bmrmJJEuTWTLJR32nh/JdL1+PSicowtNb0WFpn59GK8/lfD61bVtzguz7b3PBt74nxpv/Pw5po5Rg==", + "license": "(MIT OR CC0-1.0)", "peer": true, "engines": { "node": ">=8" @@ -12990,6 +12567,7 @@ "version": "1.5.0", "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", "integrity": "sha512-OpZ3zP+jT1PI7I8nemJX4AKmAX070ZkYPVWV/AaKTJl+tXCTGyVdC1a4SL8RUQYEwk/f34ZX8UTykN68FwrqAA==", + "license": "MIT", "engines": { "node": ">= 0.6" } @@ -12999,6 +12577,7 @@ "resolved": "https://registry.npmjs.org/streamroller/-/streamroller-3.1.5.tgz", "integrity": "sha512-KFxaM7XT+irxvdqSP1LGLgNWbYN7ay5owZ3r/8t77p+EtSUAfUgtl7be3xtqtOmGUl9K9YPO2ca8133RlTjvKw==", "dev": true, + "license": "MIT", "dependencies": { "date-format": "^4.0.14", "debug": "^4.3.4", @@ -13013,6 +12592,7 @@ "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", "dev": true, + "license": "MIT", "dependencies": { "graceful-fs": "^4.2.0", "jsonfile": "^4.0.0", @@ -13027,6 +12607,7 @@ "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", "integrity": "sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==", "dev": true, + "license": "MIT", "optionalDependencies": { "graceful-fs": "^4.1.6" } @@ -13036,24 +12617,42 @@ "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", "dev": true, + "license": "MIT", "engines": { "node": ">= 4.0.0" } }, + "node_modules/strict-event-emitter": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/strict-event-emitter/-/strict-event-emitter-0.5.1.tgz", + "integrity": "sha512-vMgjE/GGEPEFnhFub6pa4FmJBRBVOLpIII2hvCZ8Kzb7K0hlHo7mQv6xYrBvCL2LtAIBwFUK8wvuJgTVSQ5MFQ==", + "dev": true, + "license": "MIT" + }, "node_modules/string_decoder": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "license": "MIT", "peer": true, "dependencies": { "safe-buffer": "~5.1.0" } }, + "node_modules/string_decoder/node_modules/safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "license": "MIT", + "peer": true + }, "node_modules/string-argv": { "version": "0.3.1", "resolved": "https://registry.npmjs.org/string-argv/-/string-argv-0.3.1.tgz", "integrity": "sha512-a1uQGz7IyVy9YwhqjZIZu1c8JO8dNIe20xBmSS6qu9kv++k3JGzCVmprbNN5Kn+BgzD5E7YYwg1CcjuJMRNsvg==", "dev": true, + "license": "MIT", + "peer": true, "engines": { "node": ">=0.6.19" } @@ -13062,6 +12661,7 @@ "version": "4.2.3", "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "license": "MIT", "dependencies": { "emoji-regex": "^8.0.0", "is-fullwidth-code-point": "^3.0.0", @@ -13077,6 +12677,8 @@ "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", "dev": true, + "license": "MIT", + "peer": true, "dependencies": { "emoji-regex": "^8.0.0", "is-fullwidth-code-point": "^3.0.0", @@ -13090,6 +12692,7 @@ "version": "6.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "license": "MIT", "dependencies": { "ansi-regex": "^5.0.1" }, @@ -13103,6 +12706,8 @@ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", "dev": true, + "license": "MIT", + "peer": true, "dependencies": { "ansi-regex": "^5.0.1" }, @@ -13110,28 +12715,12 @@ "node": ">=8" } }, - "node_modules/strip-ansi-cjs/node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/strip-ansi/node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "engines": { - "node": ">=8" - } - }, "node_modules/strip-bom": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", "integrity": "sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==", "dev": true, + "license": "MIT", "optional": true, "engines": { "node": ">=4" @@ -13141,6 +12730,7 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", + "license": "MIT", "peer": true, "engines": { "node": ">=6" @@ -13151,6 +12741,7 @@ "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" }, @@ -13158,36 +12749,23 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/strnum": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/strnum/-/strnum-1.0.5.tgz", - "integrity": "sha512-J8bbNyKKXl5qYcR36TIO8W3mVGVHrmmxsd5PAItGkmyzwJvybiw2IVq5nqd0i4LSNSkB/sx9VHllbfFdr9k1JA==", - "peer": true - }, - "node_modules/sudo-prompt": { - "version": "9.2.1", - "resolved": "https://registry.npmjs.org/sudo-prompt/-/sudo-prompt-9.2.1.tgz", - "integrity": "sha512-Mu7R0g4ig9TUuGSxJavny5Rv0egCEtpZRNMrZaYS1vxkiIxGiGUwoezU3LazIQ+KE04hTrTfNPgxU5gzi7F5Pw==", - "peer": true - }, "node_modules/supports-color": { - "version": "8.1.1", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", - "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "license": "MIT", "dependencies": { "has-flag": "^4.0.0" }, "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/supports-color?sponsor=1" + "node": ">=8" } }, "node_modules/supports-preserve-symlinks-flag": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", + "license": "MIT", "engines": { "node": ">= 0.4" }, @@ -13196,10 +12774,11 @@ } }, "node_modules/synckit": { - "version": "0.8.8", - "resolved": "https://registry.npmjs.org/synckit/-/synckit-0.8.8.tgz", - "integrity": "sha512-HwOKAP7Wc5aRGYdKH+dw0PRRpbO841v2DENBtjnR5HFWoiNByAl7vrx3p0G/rCyYXQsrxqtX48TImFtPcIHSpQ==", + "version": "0.9.2", + "resolved": "https://registry.npmjs.org/synckit/-/synckit-0.9.2.tgz", + "integrity": "sha512-vrozgXDQwYO72vHjUb/HnFbQx1exDjoKzqx23aXEg2a9VIg2TSFZ8FmeZpTjUCFMYw7mpX4BE2SFu8wI7asYsw==", "dev": true, + "license": "MIT", "dependencies": { "@pkgr/core": "^0.1.0", "tslib": "^2.6.2" @@ -13215,6 +12794,7 @@ "version": "0.8.4", "resolved": "https://registry.npmjs.org/temp/-/temp-0.8.4.tgz", "integrity": "sha512-s0ZZzd0BzYv5tLSptZooSjK8oj6C+c19p7Vqta9+6NPOf7r+fxq0cJe6/oN4LTC79sy5NY8ucOJNgwsKCSbfqg==", + "license": "MIT", "peer": true, "dependencies": { "rimraf": "~2.6.2" @@ -13223,19 +12803,11 @@ "node": ">=6.0.0" } }, - "node_modules/temp-dir": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/temp-dir/-/temp-dir-2.0.0.tgz", - "integrity": "sha512-aoBAniQmmwtcKp/7BzsH8Cxzv8OL736p7v1ihGb5e9DJ9kTwGWHrQrVB5+lfVDzfGrdRzXch+ig7LHaY1JTOrg==", - "peer": true, - "engines": { - "node": ">=8" - } - }, "node_modules/temp/node_modules/brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "license": "MIT", "peer": true, "dependencies": { "balanced-match": "^1.0.0", @@ -13246,6 +12818,8 @@ "version": "7.2.3", "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "deprecated": "Glob versions prior to v9 are no longer supported", + "license": "ISC", "peer": true, "dependencies": { "fs.realpath": "^1.0.0", @@ -13266,6 +12840,7 @@ "version": "3.1.2", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "license": "ISC", "peer": true, "dependencies": { "brace-expansion": "^1.1.7" @@ -13278,6 +12853,8 @@ "version": "2.6.3", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==", + "deprecated": "Rimraf versions prior to v4 are no longer supported", + "license": "ISC", "peer": true, "dependencies": { "glob": "^7.1.3" @@ -13287,9 +12864,10 @@ } }, "node_modules/terser": { - "version": "5.30.3", - "resolved": "https://registry.npmjs.org/terser/-/terser-5.30.3.tgz", - "integrity": "sha512-STdUgOUx8rLbMGO9IOwHLpCqolkDITFFQSMYYwKE1N2lY6MVSaeoi10z/EhWxRc6ybqoVmKSkhKYH/XUpl7vSA==", + "version": "5.36.0", + "resolved": "https://registry.npmjs.org/terser/-/terser-5.36.0.tgz", + "integrity": "sha512-IYV9eNMuFAV4THUspIRXkLakHnV6XO7FEdtKjf/mDyrnqUg9LnlOn6/RwRvM9SZjR4GUq8Nk8zj67FzVARr74w==", + "license": "BSD-2-Clause", "dependencies": { "@jridgewell/source-map": "^0.3.3", "acorn": "^8.8.2", @@ -13306,25 +12884,91 @@ "node_modules/terser/node_modules/commander": { "version": "2.20.3", "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", - "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==" + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", + "license": "MIT" + }, + "node_modules/test-exclude": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz", + "integrity": "sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==", + "license": "ISC", + "peer": true, + "dependencies": { + "@istanbuljs/schema": "^0.1.2", + "glob": "^7.1.4", + "minimatch": "^3.0.4" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/test-exclude/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "license": "MIT", + "peer": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/test-exclude/node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "deprecated": "Glob versions prior to v9 are no longer supported", + "license": "ISC", + "peer": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/test-exclude/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "license": "ISC", + "peer": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } }, "node_modules/text-encoding": { "version": "0.7.0", "resolved": "https://registry.npmjs.org/text-encoding/-/text-encoding-0.7.0.tgz", "integrity": "sha512-oJQ3f1hrOnbRLOcwKz0Liq2IcrvDeZRHXhd9RgLrsT+DjWY/nty1Hi7v3dtkaEYbPYe0mUoOfzRrMwfXXwgPUA==", - "deprecated": "no longer maintained" + "deprecated": "no longer maintained", + "license": "(Unlicense OR Apache-2.0)" }, "node_modules/text-table": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/thenify": { "version": "3.3.1", "resolved": "https://registry.npmjs.org/thenify/-/thenify-3.3.1.tgz", "integrity": "sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw==", "dev": true, + "license": "MIT", + "peer": true, "dependencies": { "any-promise": "^1.0.0" } @@ -13334,6 +12978,8 @@ "resolved": "https://registry.npmjs.org/thenify-all/-/thenify-all-1.6.0.tgz", "integrity": "sha512-RNxQH/qI8/t3thXJDwcstUO4zeqo64+Uy/+sNVRBx4Xn2OX+OZ9oP+iJnNFqplFra2ZUVeKCSa2oVWi3T4uVmA==", "dev": true, + "license": "MIT", + "peer": true, "dependencies": { "thenify": ">= 3.1.0 < 4" }, @@ -13345,12 +12991,14 @@ "version": "5.0.0", "resolved": "https://registry.npmjs.org/throat/-/throat-5.0.0.tgz", "integrity": "sha512-fcwX4mndzpLQKBS1DVYhGAcYaYt7vsHNIvQV+WXMvnow5cgjPphq5CaayLaGsjRdSCKZFNGt7/GYAuXaNOiYCA==", + "license": "MIT", "peer": true }, "node_modules/through2": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", + "license": "MIT", "peer": true, "dependencies": { "readable-stream": "~2.3.6", @@ -13361,41 +13009,16 @@ "version": "1.0.3", "resolved": "https://registry.npmjs.org/tiny-case/-/tiny-case-1.0.3.tgz", "integrity": "sha512-Eet/eeMhkO6TX8mnUteS9zgPbUMQa4I6Kkp5ORiBD5476/m+PIRiumP5tmh5ioJpH7k51Kehawy2UDfsnxxY8Q==", - "dev": true - }, - "node_modules/title-case": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/title-case/-/title-case-2.1.1.tgz", - "integrity": "sha512-EkJoZ2O3zdCz3zJsYCsxyq2OC5hrxR9mfdd5I+w8h/tmFfeOxJ+vvkxsKxdmN0WtS9zLdHEgfgVOiMVgv+Po4Q==", - "dev": true, - "peer": true, - "dependencies": { - "no-case": "^2.2.0", - "upper-case": "^1.0.3" - } - }, - "node_modules/title-case/node_modules/lower-case": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/lower-case/-/lower-case-1.1.4.tgz", - "integrity": "sha512-2Fgx1Ycm599x+WGpIYwJOvsjmXFzTSc34IwDWALRA/8AopUKAVPwfJ+h5+f85BCp0PWmmJcWzEpxOpoXycMpdA==", "dev": true, + "license": "MIT", "peer": true }, - "node_modules/title-case/node_modules/no-case": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/no-case/-/no-case-2.3.2.tgz", - "integrity": "sha512-rmTZ9kz+f3rCvK2TD1Ue/oZlns7OGoIWP4fc3llxxRXlOkHKoWPPWJOfFYpITabSow43QJbRIoHQXtt10VldyQ==", - "dev": true, - "peer": true, - "dependencies": { - "lower-case": "^1.1.1" - } - }, "node_modules/tmp": { "version": "0.2.3", "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.2.3.tgz", "integrity": "sha512-nZD7m9iCPC5g0pYmcaxogYKggSfLsdxl8of3Q/oIbqCqLLIO9IAF0GWjX1z9NZRHPiXv8Wex4yDCaZsgEw0Y8w==", "dev": true, + "license": "MIT", "engines": { "node": ">=14.14" } @@ -13404,21 +13027,14 @@ "version": "1.0.5", "resolved": "https://registry.npmjs.org/tmpl/-/tmpl-1.0.5.tgz", "integrity": "sha512-3f0uOEAQwIqGuWW2MVzYg8fV/QNnc/IpuJNG837rLuczAaLVHslWHZQj4IGiEl5Hs3kkbhwL9Ab7Hrsmuj+Smw==", + "license": "BSD-3-Clause", "peer": true }, - "node_modules/to-fast-properties": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", - "integrity": "sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==", - "peer": true, - "engines": { - "node": ">=4" - } - }, "node_modules/to-regex-range": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "license": "MIT", "dependencies": { "is-number": "^7.0.0" }, @@ -13430,6 +13046,7 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==", + "license": "MIT", "engines": { "node": ">=0.6" } @@ -13438,18 +13055,22 @@ "version": "2.0.2", "resolved": "https://registry.npmjs.org/toposort/-/toposort-2.0.2.tgz", "integrity": "sha512-0a5EOkAUp8D4moMi2W8ZF8jcga7BgZd91O/yabJCFY8az+XSzeGyTKs0Aoo897iV1Nj6guFq8orWDS96z91oGg==", - "dev": true + "dev": true, + "license": "MIT", + "peer": true }, "node_modules/tr46": { "version": "0.0.3", "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", - "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==" + "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==", + "license": "MIT" }, "node_modules/ts-api-utils": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.3.0.tgz", - "integrity": "sha512-UQMIo7pb8WRomKR1/+MFVLTroIvDVtMX3K6OUir8ynLyzB8Jeriont2bTAtmNPa1ekAgN7YPDyf6V+ygrdU+eQ==", + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.4.0.tgz", + "integrity": "sha512-032cPxaEKwM+GT3vA5JXNzIaizx388rhsSW79vGRNGXfRRAdEAn2mvk36PvK5HnOchyWZ7afLEXqYCvPCrzuzQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=16" }, @@ -13457,20 +13078,12 @@ "typescript": ">=4.2.0" } }, - "node_modules/ts-dedent": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/ts-dedent/-/ts-dedent-2.2.0.tgz", - "integrity": "sha512-q5W7tVM71e2xjHZTlgfTDoPF/SmqKG5hddq9SzR49CH2hayqRKJtQ4mtRlSxKaJlR/+9rEM+mnBHf7I2/BQcpQ==", - "dev": true, - "engines": { - "node": ">=6.10" - } - }, "node_modules/ts-mocha": { "version": "10.0.0", "resolved": "https://registry.npmjs.org/ts-mocha/-/ts-mocha-10.0.0.tgz", "integrity": "sha512-VRfgDO+iiuJFlNB18tzOfypJ21xn2xbuZyDvJvqpTbWgkAgD17ONGr8t+Tl8rcBtOBdjXp5e/Rk+d39f7XBHRw==", "dev": true, + "license": "MIT", "dependencies": { "ts-node": "7.0.1" }, @@ -13492,27 +13105,17 @@ "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==", "dev": true, + "license": "BSD-3-Clause", "engines": { "node": ">=0.3.1" } }, - "node_modules/ts-mocha/node_modules/mkdirp": { - "version": "0.5.6", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz", - "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==", - "dev": true, - "dependencies": { - "minimist": "^1.2.6" - }, - "bin": { - "mkdirp": "bin/cmd.js" - } - }, "node_modules/ts-mocha/node_modules/ts-node": { "version": "7.0.1", "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-7.0.1.tgz", "integrity": "sha512-BVwVbPJRspzNh2yfslyT1PSbl5uIk03EZlb493RKHN4qej/D06n1cEhjlOJG69oFsE7OT8XjpTUcYf6pKTLMhw==", "dev": true, + "license": "MIT", "dependencies": { "arrify": "^1.0.0", "buffer-from": "^1.1.0", @@ -13535,6 +13138,7 @@ "resolved": "https://registry.npmjs.org/yn/-/yn-2.0.0.tgz", "integrity": "sha512-uTv8J/wiWTgUTg+9vLTi//leUl5vDQS6uii/emeTb2ssY7vl6QWf2fFbIIGjnhjvbdKlU0ed7QPgY1htTC86jQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=4" } @@ -13544,6 +13148,7 @@ "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.2.tgz", "integrity": "sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==", "dev": true, + "license": "MIT", "dependencies": { "@cspotcode/source-map-support": "^0.8.0", "@tsconfig/node10": "^1.0.7", @@ -13582,11 +13187,22 @@ } } }, + "node_modules/ts-node/node_modules/diff": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", + "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.3.1" + } + }, "node_modules/tsconfig-paths": { "version": "3.15.0", "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.15.0.tgz", "integrity": "sha512-2Ac2RgzDe/cn48GvOe3M+o82pEFewD3UPbyoUHHdKasHwJKjds4fLXWf/Ux5kATBKN20oaFGu+jbElp1pos0mg==", "dev": true, + "license": "MIT", "optional": true, "dependencies": { "@types/json5": "^0.0.29", @@ -13595,19 +13211,35 @@ "strip-bom": "^3.0.0" } }, + "node_modules/tsconfig-paths/node_modules/json5": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.2.tgz", + "integrity": "sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "minimist": "^1.2.0" + }, + "bin": { + "json5": "lib/cli.js" + } + }, "node_modules/tslib": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", - "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.0.tgz", + "integrity": "sha512-jWVzBLplnCmoaTr13V9dYbiQ99wvZRd0vNWaDRg+aVYRcjDF3nDksxFDE/+fkXnKhpnUUkmx5pK/v8mCtLVqZA==", + "license": "0BSD" }, "node_modules/tsx": { - "version": "4.7.2", - "resolved": "https://registry.npmjs.org/tsx/-/tsx-4.7.2.tgz", - "integrity": "sha512-BCNd4kz6fz12fyrgCTEdZHGJ9fWTGeUzXmQysh0RVocDY3h4frk05ZNCXSy4kIenF7y/QnrdiVpTsyNRn6vlAw==", + "version": "4.19.2", + "resolved": "https://registry.npmjs.org/tsx/-/tsx-4.19.2.tgz", + "integrity": "sha512-pOUl6Vo2LUq/bSa8S5q7b91cgNSjctn9ugq/+Mvow99qW6x/UZYwzxy/3NmqoT66eHYfCVvFvACC58UBPFf28g==", "dev": true, + "license": "MIT", "dependencies": { - "esbuild": "~0.19.10", - "get-tsconfig": "^4.7.2" + "esbuild": "~0.23.0", + "get-tsconfig": "^4.7.5" }, "bin": { "tsx": "dist/cli.mjs" @@ -13619,18 +13251,12 @@ "fsevents": "~2.3.3" } }, - "node_modules/type": { - "version": "2.7.2", - "resolved": "https://registry.npmjs.org/type/-/type-2.7.2.tgz", - "integrity": "sha512-dzlvlNlt6AXU7EBSfpAscydQ7gXB+pPGsPnfJnZpiNJBDj7IaJzQlBZYGdEi4R9HmPdBv2XmWJ6YUtoTa7lmCw==", - "dev": true, - "peer": true - }, "node_modules/type-check": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", "dev": true, + "license": "MIT", "dependencies": { "prelude-ls": "^1.2.1" }, @@ -13639,20 +13265,23 @@ } }, "node_modules/type-detect": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", - "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.1.0.tgz", + "integrity": "sha512-Acylog8/luQ8L7il+geoSxhEkazvkslg7PSNKOX59mbB9cOveP5aq9h74Y7YU8yDpJwetzQQrfIwtf4Wp4LKcw==", + "dev": true, + "license": "MIT", "engines": { "node": ">=4" } }, "node_modules/type-fest": { - "version": "4.15.0", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.15.0.tgz", - "integrity": "sha512-tB9lu0pQpX5KJq54g+oHOLumOx+pMep4RaM6liXh2PKmVRFF+/vAtUP0ZaJ0kOySfVNjF6doBWPHhBhISKdlIA==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", "dev": true, + "license": "(MIT OR CC0-1.0)", "engines": { - "node": ">=16" + "node": ">=10" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" @@ -13663,6 +13292,7 @@ "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", "dev": true, + "license": "MIT", "dependencies": { "media-typer": "0.3.0", "mime-types": "~2.1.24" @@ -13672,10 +13302,11 @@ } }, "node_modules/typescript": { - "version": "5.4.5", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.5.tgz", - "integrity": "sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ==", + "version": "5.6.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.6.3.tgz", + "integrity": "sha512-hjcS1mhfuyi4WW8IWtjP7brDrG2cuDZukyrYrSauoXGNgx0S7zceP07adYkJycEr56BOUTNPzbInooiN3fn1qw==", "dev": true, + "license": "Apache-2.0", "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" @@ -13685,9 +13316,9 @@ } }, "node_modules/ua-parser-js": { - "version": "0.7.37", - "resolved": "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-0.7.37.tgz", - "integrity": "sha512-xV8kqRKM+jhMvcHWUKthV9fNebIzrNy//2O9ZwWcfiBFR5f25XVZPLlEajk/sf3Ra15V92isyQqnIEXRDaZWEA==", + "version": "0.7.39", + "resolved": "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-0.7.39.tgz", + "integrity": "sha512-IZ6acm6RhQHNibSt7+c09hhvsKy9WUr4DVbeq9U8o71qxyYtJpQeDxQnMrVqnIFMLcQjHO0I9wgfO2vIahht4w==", "dev": true, "funding": [ { @@ -13703,25 +13334,32 @@ "url": "https://github.com/sponsors/faisalman" } ], + "license": "MIT", + "bin": { + "ua-parser-js": "script/cli.js" + }, "engines": { "node": "*" } }, "node_modules/underscore": { - "version": "1.13.6", - "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.13.6.tgz", - "integrity": "sha512-+A5Sja4HP1M08MaXya7p5LvjuM7K6q/2EaC0+iovj/wOcMsTzMvDFbasi/oSapiwOlt252IqsKqPjCl7huKS0A==", - "dev": true + "version": "1.13.7", + "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.13.7.tgz", + "integrity": "sha512-GMXzWtsc57XAtguZgaQViUOzs0KTkk8ojr3/xAxXLITqf/3EMwxC0inyETfDFjH/Krbhuep0HNbbjI9i/q3F3g==", + "dev": true, + "license": "MIT" }, "node_modules/undici-types": { - "version": "5.26.5", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", - "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==" + "version": "6.19.8", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.19.8.tgz", + "integrity": "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==", + "license": "MIT" }, "node_modules/unicode-canonical-property-names-ecmascript": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-2.0.0.tgz", - "integrity": "sha512-yY5PpDlfVIU5+y/BSCxAJRBIS1Zc2dDG3Ujq+sR0U+JjUevW2JhocOF+soROYDSaAezOzOKuyyixhD6mBknSmQ==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-2.0.1.tgz", + "integrity": "sha512-dA8WbNeb2a6oQzAQ55YlT5vQAWGV9WXOsi3SskE3bcCdM0P4SDd+24zS/OCacdRq5BkdsRj9q3Pg6YyQoxIGqg==", + "license": "MIT", "peer": true, "engines": { "node": ">=4" @@ -13731,6 +13369,7 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/unicode-match-property-ecmascript/-/unicode-match-property-ecmascript-2.0.0.tgz", "integrity": "sha512-5kaZCrbp5mmbz5ulBkDkbY0SsPOjKqVS35VpL9ulMPfSl0J0Xsm+9Evphv9CoIZFwre7aJoa94AY6seMKGVN5Q==", + "license": "MIT", "peer": true, "dependencies": { "unicode-canonical-property-names-ecmascript": "^2.0.0", @@ -13741,9 +13380,10 @@ } }, "node_modules/unicode-match-property-value-ecmascript": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-2.1.0.tgz", - "integrity": "sha512-qxkjQt6qjg/mYscYMC0XKRn3Rh0wFPlfxB0xkt9CfyTvpX1Ra0+rAmdX2QyAobptSEvuy4RtpPRui6XkV+8wjA==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-2.2.0.tgz", + "integrity": "sha512-4IehN3V/+kkr5YeSSDDQG8QLqO26XpL2XP3GQtqwlT/QYSECAwFztxVHjlbh0+gjJ3XmNLS0zDsbgs9jWKExLg==", + "license": "MIT", "peer": true, "engines": { "node": ">=4" @@ -13753,6 +13393,7 @@ "version": "2.1.0", "resolved": "https://registry.npmjs.org/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-2.1.0.tgz", "integrity": "sha512-6t3foTQI9qne+OZoVQB/8x8rk2k1eVy1gRXhV3oFQ5T6R1dqQ1xtin3XqSlx3+ATBkliTaR/hHyJBm+LVPNM8w==", + "license": "MIT", "peer": true, "engines": { "node": ">=4" @@ -13762,6 +13403,7 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz", "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==", + "license": "MIT", "engines": { "node": ">= 10.0.0" } @@ -13770,14 +13412,15 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==", + "license": "MIT", "engines": { "node": ">= 0.8" } }, "node_modules/update-browserslist-db": { - "version": "1.0.13", - "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.13.tgz", - "integrity": "sha512-xebP81SNcPuNpPP3uzeW1NYXxI3rxyJzF3pD6sH4jE7o/IX+WtSpwnVU+qIsDPyk0d3hmFQ7mjqc6AtV604hbg==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.1.1.tgz", + "integrity": "sha512-R8UzCaa9Az+38REPiJ1tXlImTJXlVfgHZsglwBD/k6nj76ctsH1E3q4doGrukiLQd3sGQYu56r5+lo5r94l29A==", "funding": [ { "type": "opencollective", @@ -13792,10 +13435,11 @@ "url": "https://github.com/sponsors/ai" } ], + "license": "MIT", "peer": true, "dependencies": { - "escalade": "^3.1.1", - "picocolors": "^1.0.0" + "escalade": "^3.2.0", + "picocolors": "^1.1.0" }, "bin": { "update-browserslist-db": "cli.js" @@ -13804,18 +13448,13 @@ "browserslist": ">= 4.21.0" } }, - "node_modules/upper-case": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/upper-case/-/upper-case-1.1.3.tgz", - "integrity": "sha512-WRbjgmYzgXkCV7zNVpy5YgrHgbBv126rMALQQMrmzOVC4GM2waQ9x7xtm8VU+1yF2kWyPzI9zbZ48n4vSxwfSA==", - "dev": true, - "peer": true - }, "node_modules/upper-case-first": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/upper-case-first/-/upper-case-first-2.0.2.tgz", "integrity": "sha512-514ppYHBaKwfJRK/pNC6c/OxfGa0obSnAl106u97Ed0I625Nin96KAjttZF6ZL3e1XLtphxnqrOi9iWgm+u+bg==", "dev": true, + "license": "MIT", + "peer": true, "dependencies": { "tslib": "^2.0.3" } @@ -13825,26 +13464,41 @@ "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", "dev": true, + "license": "BSD-2-Clause", "dependencies": { "punycode": "^2.1.0" } }, + "node_modules/uri-js/node_modules/punycode": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", + "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, "node_modules/util-arity": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/util-arity/-/util-arity-1.1.0.tgz", "integrity": "sha512-kkyIsXKwemfSy8ZEoaIz06ApApnWsk5hQO0vLjZS6UkBiGiW++Jsyb8vSBoc0WKlffGoGs5yYy/j5pp8zckrFA==", - "dev": true + "dev": true, + "license": "MIT", + "peer": true }, "node_modules/util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", + "license": "MIT", "peer": true }, "node_modules/utils-merge": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", "integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==", + "license": "MIT", "engines": { "node": ">= 0.4.0" } @@ -13858,6 +13512,8 @@ "https://github.com/sponsors/broofa", "https://github.com/sponsors/ctavan" ], + "license": "MIT", + "peer": true, "bin": { "uuid": "dist/bin/uuid" } @@ -13866,13 +13522,16 @@ "version": "3.0.1", "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", "integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/validate-npm-package-license": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", "dev": true, + "license": "Apache-2.0", + "peer": true, "dependencies": { "spdx-correct": "^3.0.0", "spdx-expression-parse": "^3.0.0" @@ -13882,36 +13541,17 @@ "version": "1.1.2", "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==", - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/verror": { - "version": "1.10.1", - "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.1.tgz", - "integrity": "sha512-veufcmxri4e3XSrT0xwfUR7kguIkaxBeosDg00yDWhk49wdwkSUrvvsm7nc75e1PUyvIeZj6nS8VQRYz2/S4Xg==", "dev": true, - "peer": true, - "dependencies": { - "assert-plus": "^1.0.0", - "core-util-is": "1.0.2", - "extsprintf": "^1.2.0" - }, + "license": "MIT", "engines": { - "node": ">=0.6.0" + "node": ">= 0.8" } }, - "node_modules/verror/node_modules/core-util-is": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "integrity": "sha512-3lqz5YjWTYnW6dlDa5TLaTCcShfar1e40rmcJVwCBJC6mWlFuj0eCHIElmG1g5kyuJ/GD+8Wn4FFCcz4gJPfaQ==", - "dev": true, - "peer": true - }, "node_modules/vlq": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/vlq/-/vlq-1.0.1.tgz", "integrity": "sha512-gQpnTgkubC6hQgdIcRdYGDSDc+SaujOdyesZQMv6JlfQee/9Mp0Qhnys6WxDWvQnL5WZdT7o2Ul187aSt0Rq+w==", + "license": "MIT", "peer": true }, "node_modules/void-elements": { @@ -13919,6 +13559,7 @@ "resolved": "https://registry.npmjs.org/void-elements/-/void-elements-2.0.1.tgz", "integrity": "sha512-qZKX4RnBzH2ugr8Lxa7x+0V6XD9Sb/ouARtiasEQCHB1EVU4NXtmHsDDrx1dO4ne5fc3J6EW05BP1Dl0z0iung==", "dev": true, + "license": "MIT", "engines": { "node": ">=0.10.0" } @@ -13927,35 +13568,30 @@ "version": "1.0.8", "resolved": "https://registry.npmjs.org/walker/-/walker-1.0.8.tgz", "integrity": "sha512-ts/8E8l5b7kY0vlWLewOkDXMmPdLcVV4GmOQLyxuSswIJsweeFZtAsMF7k1Nszz+TYBQrlYRmzOnr398y1JemQ==", + "license": "Apache-2.0", "peer": true, "dependencies": { "makeerror": "1.0.12" } }, - "node_modules/wcwidth": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/wcwidth/-/wcwidth-1.0.1.tgz", - "integrity": "sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg==", - "peer": true, - "dependencies": { - "defaults": "^1.0.3" - } - }, "node_modules/webidl-conversions": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", - "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==" + "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==", + "license": "BSD-2-Clause" }, "node_modules/whatwg-fetch": { "version": "3.6.20", "resolved": "https://registry.npmjs.org/whatwg-fetch/-/whatwg-fetch-3.6.20.tgz", "integrity": "sha512-EqhiFU6daOA8kpjOWTL0olhVOF3i7OrFzSYiGsEMB8GcXS+RrzauAERX65xMeNWVqxA6HXH2m69Z9LaKKdisfg==", + "license": "MIT", "peer": true }, "node_modules/whatwg-url": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", + "license": "MIT", "dependencies": { "tr46": "~0.0.3", "webidl-conversions": "^3.0.0" @@ -13965,6 +13601,7 @@ "version": "8.0.0-3", "resolved": "https://registry.npmjs.org/whatwg-url-without-unicode/-/whatwg-url-without-unicode-8.0.0-3.tgz", "integrity": "sha512-HoKuzZrUlgpz35YO27XgD28uh/WJH4B0+3ttFqRo//lmq+9T/mIOJ6kqmINI9HpUpz1imRC/nR/lxKpJiv0uig==", + "license": "MIT", "dependencies": { "buffer": "^5.4.3", "punycode": "^2.1.1", @@ -13992,15 +13629,26 @@ "url": "https://feross.org/support" } ], + "license": "MIT", "dependencies": { "base64-js": "^1.3.1", "ieee754": "^1.1.13" } }, + "node_modules/whatwg-url-without-unicode/node_modules/punycode": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", + "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, "node_modules/whatwg-url-without-unicode/node_modules/webidl-conversions": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-5.0.0.tgz", "integrity": "sha512-VlZwKPCkYKxQgeSbH5EyngOmRp7Ww7I9rQLERETtf5ofd9pGeswWiOtogpEO850jziPRarreGxn5QIiTqpb2wA==", + "license": "BSD-2-Clause", "engines": { "node": ">=8" } @@ -14009,6 +13657,7 @@ "version": "2.0.2", "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "license": "ISC", "dependencies": { "isexe": "^2.0.0" }, @@ -14019,30 +13668,35 @@ "node": ">= 8" } }, - "node_modules/which-module": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.1.tgz", - "integrity": "sha512-iBdZ57RDvnOR9AGBhML2vFZf7h8vmBjhoaZqODJBFWHVtKkDmKuHai3cx5PgVMrX5YDNp27AofYbAwctSS+vhQ==", - "peer": true + "node_modules/word-wrap": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", + "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } }, "node_modules/workerpool": { "version": "6.2.1", "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.2.1.tgz", "integrity": "sha512-ILEIE97kDZvF9Wb9f6h5aXK4swSlKGUcOEGiIYb2OOu/IrDU9iwj0fD//SsA6E5ibwJxpEvhullJY4Sl4GcpAw==", - "dev": true + "dev": true, + "license": "Apache-2.0" }, "node_modules/wrap-ansi": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", - "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", - "dev": true, + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "license": "MIT", "dependencies": { - "ansi-styles": "^6.1.0", - "string-width": "^5.0.1", - "strip-ansi": "^7.0.1" + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" }, "engines": { - "node": ">=12" + "node": ">=10" }, "funding": { "url": "https://github.com/chalk/wrap-ansi?sponsor=1" @@ -14054,6 +13708,8 @@ "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", "dev": true, + "license": "MIT", + "peer": true, "dependencies": { "ansi-styles": "^4.0.0", "string-width": "^4.1.0", @@ -14066,142 +13722,34 @@ "url": "https://github.com/chalk/wrap-ansi?sponsor=1" } }, - "node_modules/wrap-ansi-cjs/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/wrap-ansi-cjs/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/wrap-ansi-cjs/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "node_modules/wrap-ansi/node_modules/ansi-regex": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", - "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", - "dev": true, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-regex?sponsor=1" - } - }, - "node_modules/wrap-ansi/node_modules/ansi-styles": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", - "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", - "dev": true, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/wrap-ansi/node_modules/emoji-regex": { - "version": "9.2.2", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", - "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", - "dev": true - }, - "node_modules/wrap-ansi/node_modules/string-width": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", - "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", - "dev": true, - "dependencies": { - "eastasianwidth": "^0.2.0", - "emoji-regex": "^9.2.2", - "strip-ansi": "^7.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/wrap-ansi/node_modules/strip-ansi": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", - "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", - "dev": true, - "dependencies": { - "ansi-regex": "^6.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/strip-ansi?sponsor=1" - } - }, "node_modules/wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==" + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", + "license": "ISC" }, "node_modules/write-file-atomic": { - "version": "2.4.3", - "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-2.4.3.tgz", - "integrity": "sha512-GaETH5wwsX+GcnzhPgKcKjJ6M2Cq3/iZp1WyY/X1CSqrW+jVNM9Y7D8EC2sM4ZG/V8wZlSniJnCKWPmBYAucRQ==", + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-4.0.2.tgz", + "integrity": "sha512-7KxauUdBmSdWnmpaGFg+ppNjKF8uNLry8LyzjauQDOVONfFLNKrKvQOxZ/VuTIcS/gge/YNahf5RIIQWTSarlg==", + "license": "ISC", "peer": true, "dependencies": { - "graceful-fs": "^4.1.11", "imurmurhash": "^0.1.4", - "signal-exit": "^3.0.2" + "signal-exit": "^3.0.7" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" } }, - "node_modules/write-file-atomic/node_modules/signal-exit": { - "version": "3.0.7", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", - "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", - "peer": true - }, "node_modules/ws": { - "version": "8.11.0", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.11.0.tgz", - "integrity": "sha512-HPG3wQd9sNQoT9xHyNCXoDUa+Xw/VevmY9FoHyQ+g+rrMn4j6FB4np7Z0OhdTgjx6MgQLK7jwSy1YecU1+4Asg==", - "dev": true, - "engines": { - "node": ">=10.0.0" - }, - "peerDependencies": { - "bufferutil": "^4.0.1", - "utf-8-validate": "^5.0.2" - }, - "peerDependenciesMeta": { - "bufferutil": { - "optional": true - }, - "utf-8-validate": { - "optional": true - } + "version": "6.2.3", + "resolved": "https://registry.npmjs.org/ws/-/ws-6.2.3.tgz", + "integrity": "sha512-jmTjYU0j60B+vHey6TfR3Z7RD61z/hmxBS3VMSGIrroOWXQEneK1zNuotOUrGyBHQj0yrpsLHPWtigEFd13ndA==", + "license": "MIT", + "peer": true, + "dependencies": { + "async-limiter": "~1.0.0" } }, "node_modules/xmlbuilder": { @@ -14209,24 +13757,17 @@ "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-15.1.1.tgz", "integrity": "sha512-yMqGBqtXyeN1e3TGYvgNgDVZ3j84W4cwkOXQswghol6APgZWaff9lnbvN7MHYJOiXsvGPXtjTYJEiC9J2wv9Eg==", "dev": true, + "license": "MIT", + "peer": true, "engines": { "node": ">=8.0" } }, - "node_modules/xregexp": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/xregexp/-/xregexp-4.4.1.tgz", - "integrity": "sha512-2u9HwfadaJaY9zHtRRnH6BY6CQVNQKkYm3oLtC9gJXXzfsbACg5X5e4EZZGVAH+YIfa+QA9lsFQTTe3HURF3ag==", - "dev": true, - "peer": true, - "dependencies": { - "@babel/runtime-corejs3": "^7.12.1" - } - }, "node_modules/xtend": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", + "license": "MIT", "peer": true, "engines": { "node": ">=0.4" @@ -14236,19 +13777,25 @@ "version": "5.0.8", "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "license": "ISC", "engines": { "node": ">=10" } }, "node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", + "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", + "license": "ISC", + "peer": true }, "node_modules/yaml": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.4.1.tgz", - "integrity": "sha512-pIXzoImaqmfOrL7teGUBt/T7ZDnyeGBWyXQBvOVhLkWLN37GXv8NMLK406UY6dS51JfcQHsmcW5cJ441bHg6Lg==", + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.6.0.tgz", + "integrity": "sha512-a6ae//JvKDEra2kdi1qzCyrJW/WZCgFi8ydDV+eXExl95t+5R+ijnqHJbz9tmMh8FUjx3iv2fCQ4dclAQlO2UQ==", + "dev": true, + "license": "ISC", + "peer": true, "bin": { "yaml": "bin.mjs" }, @@ -14261,6 +13808,7 @@ "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", "dev": true, + "license": "MIT", "dependencies": { "cliui": "^7.0.2", "escalade": "^3.1.1", @@ -14279,6 +13827,7 @@ "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.4.tgz", "integrity": "sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==", "dev": true, + "license": "ISC", "engines": { "node": ">=10" } @@ -14288,6 +13837,7 @@ "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-2.0.0.tgz", "integrity": "sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA==", "dev": true, + "license": "MIT", "dependencies": { "camelcase": "^6.0.0", "decamelize": "^4.0.0", @@ -14298,11 +13848,25 @@ "node": ">=10" } }, + "node_modules/yargs-unparser/node_modules/camelcase": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", + "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/yn": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", "dev": true, + "license": "MIT", "engines": { "node": ">=6" } @@ -14311,6 +13875,8 @@ "version": "0.1.0", "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "dev": true, + "license": "MIT", "engines": { "node": ">=10" }, @@ -14323,6 +13889,8 @@ "resolved": "https://registry.npmjs.org/yup/-/yup-1.2.0.tgz", "integrity": "sha512-PPqYKSAXjpRCgLgLKVGPA33v5c/WgEx3wi6NFjIiegz90zSwyMpvTFp/uGcVnnbx6to28pgnzp/q8ih3QRjLMQ==", "dev": true, + "license": "MIT", + "peer": true, "dependencies": { "property-expr": "^2.0.5", "tiny-case": "^1.0.3", @@ -14335,6 +13903,8 @@ "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-2.19.0.tgz", "integrity": "sha512-RAH822pAdBgcNMAfWnCBU3CFZcfZ/i1eZjwFU/dsLKumyuuP3niueg2UAukXYF0E2AAoc82ZSSf9J0WQBinzHA==", "dev": true, + "license": "(MIT OR CC0-1.0)", + "peer": true, "engines": { "node": ">=12.20" }, diff --git a/package.json b/package.json index c3552a836..fa8f4ecaf 100644 --- a/package.json +++ b/package.json @@ -1,12 +1,13 @@ { "name": "pubnub", - "version": "8.2.9", + "version": "8.2.10", "author": "PubNub ", "description": "Publish & Subscribe Real-time Messaging with PubNub", "scripts": { "build": "npm run build:node && npm run build:web", "build:web": "rollup -c ./rollup.config.js --bundleConfigAsCjs", - "build:node": "tsc -p tsconfig.json", + "build:node": "tsc -p tsconfig.json && npm run build:node-types", + "build:node-types": "ts-node ./.scripts/types-aggregate.ts --ts-config=./tsconfig.json --package=PubNub --working-dir=./lib/types --input=./lib/types/node/index.d.ts --output=./lib/types", "test": "npm run test:web && npm run test:node", "test:web": "karma start karma/web.config.cjs", "test:node": "TS_NODE_PROJECT='./tsconfig.json' mocha --project tsconfig.mocha.json", @@ -32,7 +33,7 @@ "contract:test-access-beta": "cucumber-js --require dist/cucumber dist/contract/contract/features --tags '@featureSet=access and not @na=js and @beta'" }, "main": "./lib/node/index.js", - "types": "./lib/types/node/index.d.ts", + "types": "./lib/types/index.d.ts", "react-native": "./lib/react_native/index.js", "metro": "./lib/react_native/index.js", "nativescript": "./lib/nativescript/index.js", @@ -65,8 +66,6 @@ "text-encoding": "^0.7.0" }, "devDependencies": { - "@cucumber/cucumber": "^10.4.0", - "@cucumber/pretty-formatter": "^1.0.0", "@rollup/plugin-commonjs": "^25.0.7", "@rollup/plugin-json": "^6.1.0", "@rollup/plugin-node-resolve": "^15.2.3", @@ -76,7 +75,6 @@ "@types/cbor-js": "^0.1.1", "@types/chai": "^4.3.14", "@types/chai-as-promised": "^7.1.8", - "@types/cucumber": "^7.0.0", "@types/expect": "^24.3.0", "@types/lil-uuid": "^0.1.3", "@types/mocha": "^9.1.0", @@ -85,12 +83,12 @@ "@types/sinon": "^17.0.3", "@types/text-encoding": "^0.0.39", "@types/underscore": "^1.11.15", - "@typescript-eslint/eslint-plugin": "^7.4.0", - "@typescript-eslint/parser": "^7.4.0", + "@typescript-eslint/eslint-plugin": "^8.12.2", + "@typescript-eslint/parser": "^8.12.2", "chai": "^4.4.1", "chai-as-promised": "^7.1.1", "chai-nock": "^1.2.0", - "cucumber-pretty": "^6.0.1", + "commander": "^12.1.0", "cucumber-tsflow": "^4.4.4", "es6-shim": "^0.35.8", "eslint": "^8.57.0", @@ -105,10 +103,10 @@ "karma-sourcemap-loader": "^0.3.7", "karma-spec-reporter": "0.0.32", "mocha": "10.4.0", - "nock": "^14.0.0-beta.5", + "nock": "^14.0.0-beta.15", "prettier": "^3.2.5", "rimraf": "^3.0.2", - "rollup": "^4.13.2", + "rollup": "4.22.4", "rollup-plugin-gzip": "^3.1.2", "rollup-plugin-string": "^3.0.0", "sinon": "^7.5.0", diff --git a/src/cbor/common.ts b/src/cbor/common.ts index 26c0ba1dd..2dea3a529 100644 --- a/src/cbor/common.ts +++ b/src/cbor/common.ts @@ -1,5 +1,7 @@ /** * Cbor decoder module. + * + * @internal */ /** diff --git a/src/core/components/abort_signal.ts b/src/core/components/abort_signal.ts index caffb93c3..883ac86f7 100644 --- a/src/core/components/abort_signal.ts +++ b/src/core/components/abort_signal.ts @@ -1,3 +1,9 @@ +/** + * Event Engine managed effects terminate signal module. + * + * @internal + */ + import { Subject } from './subject'; export class AbortError extends Error { diff --git a/src/core/components/base64_codec.ts b/src/core/components/base64_codec.ts index c447673b7..d52871bf3 100644 --- a/src/core/components/base64_codec.ts +++ b/src/core/components/base64_codec.ts @@ -1,3 +1,9 @@ +/** + * Base64 support module. + * + * @internal + */ + const BASE64_CHARMAP = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/='; /** diff --git a/src/core/components/configuration.ts b/src/core/components/configuration.ts index 2feb65c1e..7e70f92ae 100644 --- a/src/core/components/configuration.ts +++ b/src/core/components/configuration.ts @@ -1,9 +1,11 @@ /** * {@link PubNub} client configuration module. + * + * @internal */ import { ExtendedConfiguration, PlatformConfiguration, PrivateClientConfiguration } from '../interfaces/configuration'; -import { CryptoModule, CryptorConfiguration } from '../interfaces/crypto-module'; +import { ICryptoModule, CryptorConfiguration } from '../interfaces/crypto-module'; import { PubNubFileConstructor, PubNubFileInterface } from '../types/file'; import uuidGenerator from './uuid'; import { Payload } from '../types/api'; @@ -28,7 +30,7 @@ const USE_RANDOM_INITIALIZATION_VECTOR = true; * * @internal */ -type SetupCryptoModule = (configuration: CryptorConfiguration) => CryptoModule | undefined; +type SetupCryptoModule = (configuration: CryptorConfiguration) => ICryptoModule | undefined; /** * Internal state of the {@link PrivateClientConfiguration} to store temporarily information. @@ -58,7 +60,7 @@ type PrivateConfigurationFields = { /** * Configured crypto module. */ - _cryptoModule?: CryptoModule; + _cryptoModule?: ICryptoModule; /** * Currently used data encryption / decryption key. @@ -70,7 +72,7 @@ type PrivateConfigurationFields = { * Create {@link PubNub} client private configuration object. * * @param base - User- and platform-provided configuration. - * @param setupCryptoModule - Platform-provided {@link CryptoModule} configuration block. + * @param setupCryptoModule - Platform-provided {@link ICryptoModule} configuration block. * * @returns `PubNub` client private configuration. * @@ -140,7 +142,7 @@ export const makeConfiguration = ( customDecrypt: this.getCustomDecrypt(), }); }, - getCryptoModule(): CryptoModule | undefined { + getCryptoModule(): ICryptoModule | undefined { return this._cryptoModule; }, getUseRandomIVs(): boolean | undefined { @@ -169,7 +171,7 @@ export const makeConfiguration = ( return base.PubNubFile; }, get version(): string { - return '8.2.9'; + return '8.2.10'; }, getVersion(): string { return this.version; diff --git a/src/core/components/cryptography/hmac-sha256.js b/src/core/components/cryptography/hmac-sha256.js index 2068b77cc..b0e785b15 100755 --- a/src/core/components/cryptography/hmac-sha256.js +++ b/src/core/components/cryptography/hmac-sha256.js @@ -1,3 +1,9 @@ +/** + * CryptoJS implementation. + * + * @internal + */ + /*eslint-disable */ /* diff --git a/src/core/components/cryptography/index.ts b/src/core/components/cryptography/index.ts index 98215f205..e73f95b59 100644 --- a/src/core/components/cryptography/index.ts +++ b/src/core/components/cryptography/index.ts @@ -1,5 +1,7 @@ /** * Legacy cryptography module. + * + * @internal */ import { CryptorConfiguration } from '../../interfaces/crypto-module'; @@ -13,6 +15,8 @@ import CryptoJS from './hmac-sha256'; * @param b - Bytes array (buffer) which should be converted. * * @returns Word sized array. + * + * @internal */ /* eslint-disable @typescript-eslint/no-explicit-any */ function bufferToWordArray(b: string | any[] | Uint8ClampedArray) { @@ -28,6 +32,8 @@ function bufferToWordArray(b: string | any[] | Uint8ClampedArray) { /** * Legacy cryptor configuration options. + * + * @internal */ type CryptoConfiguration = { encryptKey?: boolean; @@ -36,6 +42,11 @@ type CryptoConfiguration = { mode?: 'ecb' | 'cbc'; }; +/** + * Legacy cryptography module for files and signature. + * + * @internal + */ export default class { /** * Crypto initialization vector. diff --git a/src/core/components/deduping_manager.js b/src/core/components/deduping_manager.js deleted file mode 100644 index 7d1503ce8..000000000 --- a/src/core/components/deduping_manager.js +++ /dev/null @@ -1,50 +0,0 @@ -/* */ - -const hashCode = (payload) => { - let hash = 0; - if (payload.length === 0) return hash; - for (let i = 0; i < payload.length; i += 1) { - const character = payload.charCodeAt(i); - hash = (hash << 5) - hash + character; // eslint-disable-line - hash = hash & hash; // eslint-disable-line - } - return hash; -}; - -/** - * Real-time events deduplication manager. - * - * @internal - */ -export default class { - _config; - - hashHistory; - - constructor({ config }) { - this.hashHistory = []; - this._config = config; - } - - getKey(message) { - const hashedPayload = hashCode(JSON.stringify(message.message)).toString(); - const timetoken = message.timetoken; - return `${timetoken}-${hashedPayload}`; - } - - isDuplicate(message) { - return this.hashHistory.includes(this.getKey(message)); - } - - addEntry(message) { - if (this.hashHistory.length >= this._config.maximumCacheSize) { - this.hashHistory.shift(); - } - - this.hashHistory.push(this.getKey(message)); - } - - clearHistory() { - this.hashHistory = []; - } -} diff --git a/src/core/components/deduping_manager.ts b/src/core/components/deduping_manager.ts new file mode 100644 index 000000000..7fafb97a3 --- /dev/null +++ b/src/core/components/deduping_manager.ts @@ -0,0 +1,96 @@ +/** + * Messages de-duplication manager module. + * + * @internal + */ + +import { Payload } from '../types/api'; + +/** + * Base real-time event payload type required by the manager. + */ +type CachedMessagePayload = { message?: Payload | undefined; timetoken: string }; + +/** + * Real-time events deduplication manager. + * + * @internal + */ +export class DedupingManager { + /** + * Maximum number of caches generated for previously received real-time events. + */ + private readonly maximumCacheSize: number; + + /** + * Processed and cached real-time events' hashes. + */ + private hashHistory: string[]; + + /** + * Create and configure real-time events de-duplication manager. + * + * @param config - PubNub client configuration object. + */ + constructor({ maximumCacheSize }: { maximumCacheSize: number }) { + this.maximumCacheSize = maximumCacheSize; + this.hashHistory = []; + } + + /** + * Compute unique real-time event payload key. + * + * @param message - Received real-time event payload for which unique key should be computed. + * @returns Unique real-time event payload key in messages cache. + */ + getKey(message: CachedMessagePayload): string { + return `${message.timetoken}-${this.hashCode(JSON.stringify(message.message ?? '')).toString()}`; + } + + /** + * Check whether there is similar message already received or not. + * + * @param message - Received real-time event payload which should be checked for duplicates. + * @returns `true` in case if similar payload already has been received before. + */ + isDuplicate(message: CachedMessagePayload): boolean { + return this.hashHistory.includes(this.getKey(message)); + } + + /** + * Store received message to be used later for duplicate detection. + * + * @param message - Received real-time event payload. + */ + addEntry(message: CachedMessagePayload) { + if (this.hashHistory.length >= this.maximumCacheSize) { + this.hashHistory.shift(); + } + + this.hashHistory.push(this.getKey(message)); + } + + /** + * Clean up cached messages. + */ + clearHistory() { + this.hashHistory = []; + } + + /** + * Compute message hash sum. + * + * @param payload - Received payload for which hash sum should be computed. + * @returns {number} - Resulting hash sum. + */ + hashCode(payload: string): number { + let hash = 0; + if (payload.length === 0) return hash; + for (let i = 0; i < payload.length; i += 1) { + const character = payload.charCodeAt(i); + hash = (hash << 5) - hash + character; // eslint-disable-line + hash = hash & hash; // eslint-disable-line + } + return hash; + } +} diff --git a/src/core/components/eventEmitter.ts b/src/core/components/eventEmitter.ts index bedc98ac8..3cfee2220 100644 --- a/src/core/components/eventEmitter.ts +++ b/src/core/components/eventEmitter.ts @@ -1,3 +1,9 @@ +/** + * Real-time events emitter module. + * + * @internal + */ + import { Listener, ListenerManager } from './listener_manager'; import * as Subscription from '../types/api/subscription'; import { PubNubEventType } from '../endpoints/subscribe'; diff --git a/src/core/components/push_payload.ts b/src/core/components/push_payload.ts index 4f0cee394..e74f2ba23 100644 --- a/src/core/components/push_payload.ts +++ b/src/core/components/push_payload.ts @@ -205,34 +205,55 @@ type FCMPayload = { class BaseNotificationPayload { /** * Notification main title. + * + * @internal */ protected _title?: string; /** * Notification second-line title. + * + * @internal */ protected _subtitle?: string; /** * Name of the sound which should be played for received notification. + * + * @internal */ protected _sound?: string; /** * Value which should be placed on application badge (if required). + * + * @internal */ protected _badge?: number | null; /** * Notification main body message. + * + * @internal */ protected _body?: string; /** * Object in resulting message where notification payload should be added. + * + * @internal */ protected _payload: unknown; + /** + * Base notification provider payload object. + * + * @internal + * + * @param payload - Object which contains vendor-specific preformatted push notification payload. + * @param title - Notification main title. + * @param body - Notification body (main messages). + */ constructor(payload: unknown, title?: string, body?: string) { this._payload = payload; @@ -297,12 +318,16 @@ class BaseNotificationPayload { /** * Platform-specific structure initialization. + * + * @internal */ protected setDefaultPayloadStructure() {} /** * Translate data object into PubNub push notification payload object. * + * @internal + * * @returns Preformatted push notification payload. */ public toObject(): unknown { @@ -316,16 +341,22 @@ class BaseNotificationPayload { export class APNSNotificationPayload extends BaseNotificationPayload { /** * List with notification receivers information. + * + * @internal */ private _configurations?: APNS2Configuration[]; /** * Type of push notification service for which payload will be created. + * + * @internal */ private _apnsPushType: 'apns' | 'apns2' = 'apns'; /** * Whether resulting payload should trigger silent notification or not. + * + * @internal */ private _isSilent: boolean = false; @@ -469,10 +500,22 @@ export class APNSNotificationPayload extends BaseNotificationPayload { this._isSilent = value; } + /** + * Setup push notification payload default content. + * + * @internal + */ protected setDefaultPayloadStructure() { this.payload.aps = { alert: {} }; } + /** + * Translate data object into PubNub push notification payload object. + * + * @internal + * + * @returns Preformatted push notification payload. + */ public toObject(): APNSPayload | null { const payload = { ...this.payload }; const { aps } = payload; @@ -507,6 +550,8 @@ export class APNSNotificationPayload extends BaseNotificationPayload { /** * Create PubNub push notification service APNS2 configuration information object. * + * @internal + * * @param configuration - Source user-provided APNS2 configuration. * * @returns Preformatted for PubNub service APNS2 configuration information. @@ -531,6 +576,8 @@ export class APNSNotificationPayload extends BaseNotificationPayload { /** * Create PubNub push notification service APNS2 target information object. * + * @internal + * * @param target - Source user-provided data. * * @returns Preformatted for PubNub service APNS2 target information. @@ -548,19 +595,28 @@ export class APNSNotificationPayload extends BaseNotificationPayload { } /** - * Message payload for Firebase Clouse Messaging service. + * Message payload for Firebase Cloud Messaging service. */ export class FCMNotificationPayload extends BaseNotificationPayload { /** * Whether resulting payload should trigger silent notification or not. + * + * @internal */ private _isSilent?: boolean; /** * Name of the icon file from resource bundle which should be shown on notification. + * + * @internal */ private _icon?: string; + /** + * Notifications grouping tag. + * + * @internal + */ private _tag?: string; get payload(): FCMPayload { @@ -669,10 +725,20 @@ export class FCMNotificationPayload extends BaseNotificationPayload { this._icon = value; } + /** + * Retrieve notifications grouping tag. + * + * @returns Notifications grouping tag. + */ get tag() { return this._tag; } + /** + * Update notifications grouping tag. + * + * @param value - String which will be used to group similar notifications in notification center. + */ set tag(value) { if (!value || !value.length) return; @@ -691,11 +757,23 @@ export class FCMNotificationPayload extends BaseNotificationPayload { this._isSilent = value; } + /** + * Setup push notification payload default content. + * + * @internal + */ protected setDefaultPayloadStructure() { this.payload.notification = {}; this.payload.data = {}; } + /** + * Translate data object into PubNub push notification payload object. + * + * @internal + * + * @returns Preformatted push notification payload. + */ public toObject(): FCMPayload | null { let data = { ...this.payload.data }; let notification = null; @@ -721,17 +799,24 @@ export class FCMNotificationPayload extends BaseNotificationPayload { class NotificationsPayload { /** * Resulting message payload for notification services. + * + * @internal */ private readonly _payload; /** * Whether notifications debugging session should be used or not. + * + * @internal */ private _debugging?: boolean; + /** * First line title. * * Title which is shown in bold on the first line of notification bubble. + * + * @internal */ private readonly _title: string; @@ -739,21 +824,29 @@ class NotificationsPayload { * Second line title. * * Subtitle which is shown under main title with smaller font. + * + * @internal */ private _subtitle?: string; /** * Notification main body message. + * + * @internal */ private readonly _body: string; /** * Value which should be placed on application badge (if required). + * + * @internal */ private _badge?: number; /** * Name of the file from resource bundle which should be played when notification received. + * + * @internal */ private _sound?: string; @@ -767,6 +860,14 @@ class NotificationsPayload { */ public fcm; + /** + * Create push notification payload holder. + * + * @internal + * + * @param title - String which will be shown at the top of the notification (below app name). + * @param body - String with message which should be shown when user will check notification. + */ constructor(title: string, body: string) { this._payload = { apns: {}, fcm: {} }; this._title = title; @@ -776,6 +877,12 @@ class NotificationsPayload { this.fcm = new FCMNotificationPayload(this._payload.fcm, title, body); } + /** + * Enable or disable push notification debugging message. + * + * @param value - Whether debug message from push notification scheduler should be published to the specific + * channel or not. + */ set debugging(value: boolean) { this._debugging = value; } @@ -862,12 +969,12 @@ class NotificationsPayload { * Build notifications platform for requested platforms. * * @param platforms - List of platforms for which payload should be added to final dictionary. Supported values: - * gcm, apns, and apns2. + * fcm, apns, and apns2. * * @returns Object with data, which can be sent with publish method call and trigger remote notifications for * specified platforms. */ - buildPayload(platforms: string[]) { + buildPayload(platforms: ('apns' | 'apns2' | 'fcm')[]) { const payload: { pn_apns?: APNSPayload; pn_gcm?: FCMPayload; pn_debug?: boolean } = {}; if (platforms.includes('apns') || platforms.includes('apns2')) { diff --git a/src/core/components/reconnection_manager.ts b/src/core/components/reconnection_manager.ts index 2b3c18ba3..dbc055ada 100644 --- a/src/core/components/reconnection_manager.ts +++ b/src/core/components/reconnection_manager.ts @@ -2,6 +2,8 @@ * Subscription reconnection-manager. * * **Note:** Reconnection manger rely on legacy time-based availability check. + * + * @internal */ import { PubNubCore } from '../pubnub-common'; diff --git a/src/core/components/request.ts b/src/core/components/request.ts index f39499610..9600663dd 100644 --- a/src/core/components/request.ts +++ b/src/core/components/request.ts @@ -1,3 +1,9 @@ +/** + * Network request module. + * + * @internal + */ + import { CancellationController, TransportMethod, TransportRequest } from '../types/transport-request'; import { TransportResponse } from '../types/transport-response'; import RequestOperation from '../constants/operations'; diff --git a/src/core/components/stringify_buffer_keys.ts b/src/core/components/stringify_buffer_keys.ts index eff039140..32f49216e 100644 --- a/src/core/components/stringify_buffer_keys.ts +++ b/src/core/components/stringify_buffer_keys.ts @@ -1,3 +1,9 @@ +/** + * CBOR support module. + * + * @internal + */ + /** * Re-map CBOR object keys from potentially C buffer strings to actual strings. * diff --git a/src/core/components/subject.ts b/src/core/components/subject.ts index 67d53a77a..9585ef111 100644 --- a/src/core/components/subject.ts +++ b/src/core/components/subject.ts @@ -1,3 +1,9 @@ +/** + * Event Engine terminate signal listener module. + * + * @internal + */ + type Listener = (event: T) => void; /** diff --git a/src/core/components/subscription-manager.ts b/src/core/components/subscription-manager.ts index 19b74ffdc..dc9ee44bf 100644 --- a/src/core/components/subscription-manager.ts +++ b/src/core/components/subscription-manager.ts @@ -1,18 +1,20 @@ /** * Subscription manager module. + * + * @internal */ import { Payload, ResultCallback, Status, StatusCallback, StatusEvent } from '../types/api'; -import { RequestParameters as SubscribeRequestParameters } from '../endpoints/subscribe'; +import { SubscribeRequestParameters as SubscribeRequestParameters } from '../endpoints/subscribe'; import { PrivateClientConfiguration } from '../interfaces/configuration'; import { HeartbeatRequest } from '../endpoints/presence/heartbeat'; import { ReconnectionManager } from './reconnection_manager'; import * as Subscription from '../types/api/subscription'; import { ListenerManager } from './listener_manager'; import StatusCategory from '../constants/categories'; +import { DedupingManager } from './deduping_manager'; import Categories from '../constants/categories'; import * as Presence from '../types/api/presence'; -import DedupingManager from './deduping_manager'; import { PubNubCore } from '../pubnub-common'; import EventEmitter from './eventEmitter'; @@ -142,7 +144,7 @@ export class SubscriptionManager { time: typeof PubNubCore.prototype.time, ) { this.reconnectionManager = new ReconnectionManager(time); - this.dedupingManager = new DedupingManager({ config: this.configuration }); + this.dedupingManager = new DedupingManager(this.configuration); this.heartbeatChannelGroups = {}; this.heartbeatChannels = {}; this.presenceChannelGroups = {}; @@ -453,7 +455,7 @@ export class SubscriptionManager { try { messages.forEach((message) => { - if (dedupeOnSubscribe) { + if (dedupeOnSubscribe && 'message' in message.data && 'timetoken' in message.data) { if (this.dedupingManager.isDuplicate(message.data)) return; this.dedupingManager.addEntry(message.data); } diff --git a/src/core/components/token_manager.ts b/src/core/components/token_manager.ts index e60cf2a3f..d2a734c5f 100644 --- a/src/core/components/token_manager.ts +++ b/src/core/components/token_manager.ts @@ -1,8 +1,11 @@ /** * PubNub Access Token Manager module. + * + * @internal */ import Cbor from '../../cbor/common'; +import * as PAM from '../types/api/access-manager'; import { Payload } from '../types/api'; // -------------------------------------------------------- @@ -10,136 +13,6 @@ import { Payload } from '../types/api'; // -------------------------------------------------------- // region Types -type Token = { - /** - * Token version. - */ - version: number; - - /** - * Token generation date time. - */ - timestamp: number; - - /** - * Maximum duration (in minutes) during which token will be valid. - */ - ttl: number; - - /** - * Permissions granted to specific resources. - */ - resources?: Partial>>; - - /** - * Permissions granted to resources which match specified regular expression. - */ - patterns?: Partial>>; - - /** - * The uuid that is exclusively authorized to use this token to make API requests. - */ - authorized_uuid?: string; - - /** - * PAM token content signature. - */ - signature: ArrayBuffer; - - /** - * Additional information which has been added to the token. - */ - meta?: Payload; -}; - -/** - * Granted resource permissions. - * - * **Note:** Following operations doesn't require any permissions: - * - unsubscribe from channel / channel group - * - where now - */ -type Permissions = { - /** - * Resource read permission. - * - * Read permission required for: - * - subscribe to channel / channel group (including presence versions `-pnpres`) - * - here now - * - get presence state - * - set presence state - * - fetch history - * - fetch messages count - * - list shared files - * - download shared file - * - enable / disable push notifications - * - get message actions - * - get history with message actions - */ - read: boolean; - - /** - * Resource write permission. - * - * Write permission required for: - * - publish message / signal - * - share file - * - add message actions - */ - write: boolean; - - /** - * Resource manage permission. - * - * Manage permission required for: - * - add / remove channels to / from the channel group - * - list channels in group - * - remove channel group - * - set / remove channel members - */ - manage: boolean; - - /** - * Resource delete permission. - * - * Delete permission required for: - * - delete messages from history - * - delete shared file - * - delete user metadata - * - delete channel metadata - * - remove message action - */ - delete: boolean; - - /** - * Resource get permission. - * - * Get permission required for: - * - get user metadata - * - get channel metadata - * - get channel members - */ - get: boolean; - - /** - * Resource update permission. - * - * Update permissions required for: - * - set user metadata - * - set channel metadata - * - set / remove user membership - */ - update: boolean; - - /** - * Resource `join` permission. - * - * `Join` permission required for: - * - set / remove channel members - */ - join: boolean; -}; - /** * Raw parsed token. * @@ -242,7 +115,7 @@ export class TokenManager { const channelPatternPermissions = Object.keys(parsed.pat.chan); const groupPatternPermissions = Object.keys(parsed.pat.grp); - const result: Token = { + const result: PAM.Token = { version: parsed.v, timestamp: parsed.t, ttl: parsed.ttl, @@ -312,7 +185,7 @@ export class TokenManager { * @returns Human-readable resource permissions. */ private extractPermissions(permissions: number) { - const permissionsResult: Permissions = { + const permissionsResult: PAM.Permissions = { read: false, write: false, manage: false, diff --git a/src/core/components/uuid.ts b/src/core/components/uuid.ts index 023de232a..930a0f208 100644 --- a/src/core/components/uuid.ts +++ b/src/core/components/uuid.ts @@ -1,5 +1,12 @@ +/** + * Random identifier generator helper module. + * + * @internal + */ + import uuidGenerator from 'lil-uuid'; +/** @internal */ export default { createUUID() { if (uuidGenerator.uuid) { diff --git a/src/core/constants/operations.ts b/src/core/constants/operations.ts index 196dc98cd..b2167587e 100644 --- a/src/core/constants/operations.ts +++ b/src/core/constants/operations.ts @@ -1,4 +1,6 @@ -/* */ +/** + * Endpoint API operation types. + */ enum RequestOperation { // -------------------------------------------------------- // ---------------------- Publish API --------------------- @@ -291,7 +293,18 @@ enum RequestOperation { // ---------------- Subscription Utility ------------------ // -------------------------------------------------------- + /** + * Initial event engine subscription handshake operation. + * + * @internal + */ PNHandshakeOperation = 'PNHandshakeOperation', + + /** + * Event engine subscription loop operation. + * + * @internal + */ PNReceiveMessagesOperation = 'PNReceiveMessagesOperation', } diff --git a/src/core/endpoints/access_manager/audit.ts b/src/core/endpoints/access_manager/audit.ts index 7229a0e6f..30aef5bfc 100644 --- a/src/core/endpoints/access_manager/audit.ts +++ b/src/core/endpoints/access_manager/audit.ts @@ -1,5 +1,7 @@ /** * PAM Audit REST API module. + * + * @internal */ import { createValidationError, PubNubError } from '../../../errors/pubnub-error'; diff --git a/src/core/endpoints/access_manager/grant.ts b/src/core/endpoints/access_manager/grant.ts index 687ca08ce..a6eff8629 100644 --- a/src/core/endpoints/access_manager/grant.ts +++ b/src/core/endpoints/access_manager/grant.ts @@ -1,5 +1,7 @@ /** * PAM Grant REST API module. + * + * @internal */ import { createValidationError, PubNubError } from '../../../errors/pubnub-error'; diff --git a/src/core/endpoints/access_manager/grant_token.ts b/src/core/endpoints/access_manager/grant_token.ts index 44c9f0089..0a6fd0df9 100644 --- a/src/core/endpoints/access_manager/grant_token.ts +++ b/src/core/endpoints/access_manager/grant_token.ts @@ -1,5 +1,7 @@ /** * PAM Grant Token REST API module. + * + * @internal */ import { createValidationError, PubNubError } from '../../../errors/pubnub-error'; diff --git a/src/core/endpoints/access_manager/revoke_token.ts b/src/core/endpoints/access_manager/revoke_token.ts index 74b1d0f2d..600e350e8 100644 --- a/src/core/endpoints/access_manager/revoke_token.ts +++ b/src/core/endpoints/access_manager/revoke_token.ts @@ -1,5 +1,7 @@ /** * PAM Revoke Token REST API module. + * + * @internal */ import { createValidationError, PubNubError } from '../../../errors/pubnub-error'; diff --git a/src/core/endpoints/actions/add_message_action.ts b/src/core/endpoints/actions/add_message_action.ts index 355180abd..75d3488e2 100644 --- a/src/core/endpoints/actions/add_message_action.ts +++ b/src/core/endpoints/actions/add_message_action.ts @@ -1,5 +1,7 @@ /** * Add Message Action REST API module. + * + * @internal */ import { createValidationError, PubNubError } from '../../../errors/pubnub-error'; diff --git a/src/core/endpoints/actions/get_message_actions.ts b/src/core/endpoints/actions/get_message_actions.ts index 1bd8bb02b..5c72a63fc 100644 --- a/src/core/endpoints/actions/get_message_actions.ts +++ b/src/core/endpoints/actions/get_message_actions.ts @@ -1,5 +1,7 @@ /** * Get Message Actions REST API module. + * + * @internal */ import { createValidationError, PubNubError } from '../../../errors/pubnub-error'; diff --git a/src/core/endpoints/actions/remove_message_action.ts b/src/core/endpoints/actions/remove_message_action.ts index 8c2eed84e..f6d6ee8ca 100644 --- a/src/core/endpoints/actions/remove_message_action.ts +++ b/src/core/endpoints/actions/remove_message_action.ts @@ -1,5 +1,7 @@ /** * Remove Message Action REST API module. + * + * @internal */ import { createValidationError, PubNubError } from '../../../errors/pubnub-error'; diff --git a/src/core/endpoints/channel_groups/add_channels.ts b/src/core/endpoints/channel_groups/add_channels.ts index ad5e5473d..49be453f2 100644 --- a/src/core/endpoints/channel_groups/add_channels.ts +++ b/src/core/endpoints/channel_groups/add_channels.ts @@ -1,5 +1,7 @@ /** * Add channel group channels REST API module. + * + * @internal */ import { createValidationError, PubNubError } from '../../../errors/pubnub-error'; diff --git a/src/core/endpoints/channel_groups/delete_group.ts b/src/core/endpoints/channel_groups/delete_group.ts index 526e91098..6426177c9 100644 --- a/src/core/endpoints/channel_groups/delete_group.ts +++ b/src/core/endpoints/channel_groups/delete_group.ts @@ -1,5 +1,7 @@ /** * Delete channel group REST API module. + * + * @internal */ import { createValidationError, PubNubError } from '../../../errors/pubnub-error'; diff --git a/src/core/endpoints/channel_groups/list_channels.ts b/src/core/endpoints/channel_groups/list_channels.ts index a7d66308e..470594660 100644 --- a/src/core/endpoints/channel_groups/list_channels.ts +++ b/src/core/endpoints/channel_groups/list_channels.ts @@ -1,5 +1,7 @@ /** * List channel group channels REST API module. + * + * @internal */ import { createValidationError, PubNubError } from '../../../errors/pubnub-error'; diff --git a/src/core/endpoints/channel_groups/list_groups.ts b/src/core/endpoints/channel_groups/list_groups.ts index 531da6f4f..1b3659e23 100644 --- a/src/core/endpoints/channel_groups/list_groups.ts +++ b/src/core/endpoints/channel_groups/list_groups.ts @@ -1,5 +1,7 @@ /** * List All Channel Groups REST API module. + * + * @internal */ import { createValidationError, PubNubError } from '../../../errors/pubnub-error'; diff --git a/src/core/endpoints/channel_groups/remove_channels.ts b/src/core/endpoints/channel_groups/remove_channels.ts index d8f78d1c9..d960f9275 100644 --- a/src/core/endpoints/channel_groups/remove_channels.ts +++ b/src/core/endpoints/channel_groups/remove_channels.ts @@ -1,5 +1,7 @@ /** * Remove channel group channels REST API module. + * + * @internal */ import { createValidationError, PubNubError } from '../../../errors/pubnub-error'; diff --git a/src/core/endpoints/fetch_messages.ts b/src/core/endpoints/fetch_messages.ts index a8b0298b0..0b42fd62c 100644 --- a/src/core/endpoints/fetch_messages.ts +++ b/src/core/endpoints/fetch_messages.ts @@ -1,11 +1,13 @@ /** * Fetch messages REST API module. + * + * @internal */ import { createValidationError, PubNubError } from '../../errors/pubnub-error'; import { TransportResponse } from '../types/transport-response'; import { PubNubAPIError } from '../../errors/pubnub-api-error'; -import { CryptoModule } from '../interfaces/crypto-module'; +import { ICryptoModule } from '../interfaces/crypto-module'; import { AbstractRequest } from '../components/request'; import * as FileSharing from '../types/api/file-sharing'; import RequestOperation from '../constants/operations'; @@ -67,7 +69,7 @@ type RequestParameters = History.FetchMessagesParameters & { /** * Published data encryption module. */ - crypto?: CryptoModule; + crypto?: ICryptoModule; /** * File download Url generation function. diff --git a/src/core/endpoints/file_upload/delete_file.ts b/src/core/endpoints/file_upload/delete_file.ts index fc5dcc976..71617b36a 100644 --- a/src/core/endpoints/file_upload/delete_file.ts +++ b/src/core/endpoints/file_upload/delete_file.ts @@ -1,5 +1,7 @@ /** * Delete file REST API module. + * + * @internal */ import { createValidationError, PubNubError } from '../../../errors/pubnub-error'; diff --git a/src/core/endpoints/file_upload/download_file.ts b/src/core/endpoints/file_upload/download_file.ts index 9d1c9bade..90055d25d 100644 --- a/src/core/endpoints/file_upload/download_file.ts +++ b/src/core/endpoints/file_upload/download_file.ts @@ -1,10 +1,12 @@ /** * Download File REST API module. + * + * @internal */ import { PubNubBasicFileParameters, PubNubFileConstructor, PubNubFileInterface } from '../../types/file'; import { TransportResponse } from '../../types/transport-response'; -import { CryptoModule } from '../../interfaces/crypto-module'; +import { ICryptoModule } from '../../interfaces/crypto-module'; import { Cryptography } from '../../interfaces/cryptography'; import { AbstractRequest } from '../../components/request'; import * as FileSharing from '../../types/api/file-sharing'; @@ -34,7 +36,7 @@ type RequestParameters = FileSharing.DownloadFileParameters & { /** * Send file decryption module. */ - crypto?: CryptoModule; + crypto?: ICryptoModule; /** * Legacy cryptography module. diff --git a/src/core/endpoints/file_upload/generate_upload_url.ts b/src/core/endpoints/file_upload/generate_upload_url.ts index 1dde65f35..b71ebf798 100644 --- a/src/core/endpoints/file_upload/generate_upload_url.ts +++ b/src/core/endpoints/file_upload/generate_upload_url.ts @@ -1,5 +1,7 @@ /** * Generate file upload URL REST API request. + * + * @internal */ import { createValidationError, PubNubError } from '../../../errors/pubnub-error'; diff --git a/src/core/endpoints/file_upload/get_file_url.ts b/src/core/endpoints/file_upload/get_file_url.ts index 449284416..b81f4c91b 100644 --- a/src/core/endpoints/file_upload/get_file_url.ts +++ b/src/core/endpoints/file_upload/get_file_url.ts @@ -1,5 +1,7 @@ /** * File sharing REST API module. + * + * @internal */ import { TransportResponse } from '../../types/transport-response'; diff --git a/src/core/endpoints/file_upload/list_files.ts b/src/core/endpoints/file_upload/list_files.ts index 7f899f7ea..3949e05a4 100644 --- a/src/core/endpoints/file_upload/list_files.ts +++ b/src/core/endpoints/file_upload/list_files.ts @@ -1,5 +1,7 @@ /** * List Files REST API module. + * + * @internal */ import { createValidationError, PubNubError } from '../../../errors/pubnub-error'; diff --git a/src/core/endpoints/file_upload/publish_file.ts b/src/core/endpoints/file_upload/publish_file.ts index 0c9af86e6..ae2699445 100644 --- a/src/core/endpoints/file_upload/publish_file.ts +++ b/src/core/endpoints/file_upload/publish_file.ts @@ -1,10 +1,12 @@ /** * Publish File Message REST API module. + * + * @internal */ import { createValidationError, PubNubError } from '../../../errors/pubnub-error'; import { TransportResponse } from '../../types/transport-response'; -import { CryptoModule } from '../../interfaces/crypto-module'; +import { ICryptoModule } from '../../interfaces/crypto-module'; import { AbstractRequest } from '../../components/request'; import * as FileSharing from '../../types/api/file-sharing'; import RequestOperation from '../../constants/operations'; @@ -40,7 +42,7 @@ type RequestParameters = FileSharing.PublishFileMessageParameters & { /** * Published data encryption module. */ - crypto?: CryptoModule; + crypto?: ICryptoModule; }; /** diff --git a/src/core/endpoints/file_upload/send_file.ts b/src/core/endpoints/file_upload/send_file.ts index 97fad2f1c..177dcba73 100644 --- a/src/core/endpoints/file_upload/send_file.ts +++ b/src/core/endpoints/file_upload/send_file.ts @@ -1,6 +1,12 @@ +/** + * Share File API module. + * + * @internal + */ + import { PubNubFileConstructor, PubNubFileInterface } from '../../types/file'; import { GenerateFileUploadUrlRequest } from './generate_upload_url'; -import { CryptoModule } from '../../interfaces/crypto-module'; +import { ICryptoModule } from '../../interfaces/crypto-module'; import { Cryptography } from '../../interfaces/cryptography'; import { AbstractRequest } from '../../components/request'; import * as FileSharing from '../../types/api/file-sharing'; @@ -61,7 +67,7 @@ type RequestParameters = FileSharing.SendFileParameters { return { ...(!includeUUIDs! ? { disable_uuids: '1' } : {}), - ...(includeState ?? false ? { state: '1' } : {}), + ...((includeState ?? false) ? { state: '1' } : {}), ...(channelGroups && channelGroups.length > 0 ? { 'channel-group': channelGroups.join(',') } : {}), ...queryParameters!, }; diff --git a/src/core/endpoints/presence/leave.ts b/src/core/endpoints/presence/leave.ts index 36ff29c1f..471354028 100644 --- a/src/core/endpoints/presence/leave.ts +++ b/src/core/endpoints/presence/leave.ts @@ -1,5 +1,7 @@ /** * Announce leave REST API module. + * + * @internal */ import { createValidationError, PubNubError } from '../../../errors/pubnub-error'; diff --git a/src/core/endpoints/presence/set_state.ts b/src/core/endpoints/presence/set_state.ts index 9e0776bef..989ddbf1c 100644 --- a/src/core/endpoints/presence/set_state.ts +++ b/src/core/endpoints/presence/set_state.ts @@ -1,5 +1,7 @@ /** * Set Presence State REST API module. + * + * @internal */ import { createValidationError, PubNubError } from '../../../errors/pubnub-error'; diff --git a/src/core/endpoints/presence/where_now.ts b/src/core/endpoints/presence/where_now.ts index 533a3f73b..dfd12e8d8 100644 --- a/src/core/endpoints/presence/where_now.ts +++ b/src/core/endpoints/presence/where_now.ts @@ -1,5 +1,7 @@ /** * `uuid` presence REST API module. + * + * @internal */ import { createValidationError, PubNubError } from '../../../errors/pubnub-error'; diff --git a/src/core/endpoints/publish.ts b/src/core/endpoints/publish.ts index 47c9110e2..765d68afa 100644 --- a/src/core/endpoints/publish.ts +++ b/src/core/endpoints/publish.ts @@ -5,7 +5,7 @@ import { createValidationError, PubNubError } from '../../errors/pubnub-error'; import { TransportResponse } from '../types/transport-response'; import { TransportMethod } from '../types/transport-request'; -import { CryptoModule } from '../interfaces/crypto-module'; +import { ICryptoModule } from '../interfaces/crypto-module'; import { AbstractRequest } from '../components/request'; import RequestOperation from '../constants/operations'; import { KeySet, Payload, Query } from '../types/api'; @@ -84,11 +84,6 @@ export type PublishParameters = { * @deprecated */ replicate?: boolean; - - /** - * Indexed signature for deprecated parameters. - */ - [key: string]: string | number | boolean | undefined | Payload | CryptoModule; }; /** @@ -113,7 +108,7 @@ type RequestParameters = PublishParameters & { /** * Published data encryption module. */ - crypto?: CryptoModule; + crypto?: ICryptoModule; }; /** diff --git a/src/core/endpoints/push/add_push_channels.ts b/src/core/endpoints/push/add_push_channels.ts index 5265071d9..9f665b5b3 100644 --- a/src/core/endpoints/push/add_push_channels.ts +++ b/src/core/endpoints/push/add_push_channels.ts @@ -1,5 +1,7 @@ /** * Register Channels with Device push REST API module. + * + * @internal */ import { createValidationError, PubNubError } from '../../../errors/pubnub-error'; diff --git a/src/core/endpoints/push/list_push_channels.ts b/src/core/endpoints/push/list_push_channels.ts index 1892463a3..f1ad59b02 100644 --- a/src/core/endpoints/push/list_push_channels.ts +++ b/src/core/endpoints/push/list_push_channels.ts @@ -1,5 +1,7 @@ /** * List Device push enabled channels REST API module. + * + * @internal */ import { createValidationError, PubNubError } from '../../../errors/pubnub-error'; diff --git a/src/core/endpoints/push/push.ts b/src/core/endpoints/push/push.ts index 660435f30..fdbe36d3d 100644 --- a/src/core/endpoints/push/push.ts +++ b/src/core/endpoints/push/push.ts @@ -1,5 +1,7 @@ /** * Manage channels enabled for device push REST API module. + * + * @internal */ import { TransportResponse } from '../../types/transport-response'; diff --git a/src/core/endpoints/push/remove_device.ts b/src/core/endpoints/push/remove_device.ts index e0108d5fe..b1150eeea 100644 --- a/src/core/endpoints/push/remove_device.ts +++ b/src/core/endpoints/push/remove_device.ts @@ -1,5 +1,7 @@ /** * Unregister Device push REST API module. + * + * @internal */ import { createValidationError, PubNubError } from '../../../errors/pubnub-error'; diff --git a/src/core/endpoints/push/remove_push_channels.ts b/src/core/endpoints/push/remove_push_channels.ts index ce4fac47e..88648952b 100644 --- a/src/core/endpoints/push/remove_push_channels.ts +++ b/src/core/endpoints/push/remove_push_channels.ts @@ -1,5 +1,7 @@ /** * Unregister Channels from Device push REST API module. + * + * @internal */ import { createValidationError, PubNubError } from '../../../errors/pubnub-error'; diff --git a/src/core/endpoints/signal.ts b/src/core/endpoints/signal.ts index 5d1c84d05..942989251 100644 --- a/src/core/endpoints/signal.ts +++ b/src/core/endpoints/signal.ts @@ -6,7 +6,7 @@ import { createValidationError, PubNubError } from '../../errors/pubnub-error'; import { TransportResponse } from '../types/transport-response'; import { AbstractRequest } from '../components/request'; import RequestOperation from '../constants/operations'; -import { KeySet, Payload } from '../types/api'; +import { KeySet, Payload, Query } from '../types/api'; import { encodeString } from '../utils'; // -------------------------------------------------------- diff --git a/src/core/endpoints/subscribe.ts b/src/core/endpoints/subscribe.ts index 964657f7a..f01062176 100644 --- a/src/core/endpoints/subscribe.ts +++ b/src/core/endpoints/subscribe.ts @@ -4,7 +4,7 @@ import { createValidationError, PubNubError } from '../../errors/pubnub-error'; import { TransportResponse } from '../types/transport-response'; -import { CryptoModule } from '../interfaces/crypto-module'; +import { ICryptoModule } from '../interfaces/crypto-module'; import * as Subscription from '../types/api/subscription'; import { AbstractRequest } from '../components/request'; import * as FileSharing from '../types/api/file-sharing'; @@ -32,8 +32,6 @@ const WITH_PRESENCE = false; /** * PubNub-defined event types by payload. - * - * @internal */ export enum PubNubEventType { /** @@ -193,8 +191,6 @@ type PresenceStateChangeData = { /** * Channel presence service response. - * - * @internal */ export type PresenceData = PresenceIntervalData | PresenceChangeData | PresenceStateChangeData; // endregion @@ -202,8 +198,6 @@ export type PresenceData = PresenceIntervalData | PresenceChangeData | PresenceS // region Message Actions service response /** * Message reaction change service response. - * - * @internal */ export type MessageActionData = { /** @@ -309,8 +303,6 @@ type ChannelObjectData = ObjectData< /** * `Space` object change real-time service response. - * - * @internal */ export type SpaceObjectData = ObjectData< AppContextVSPEvents, @@ -325,8 +317,6 @@ type UuidObjectData = ObjectData { - constructor(protected readonly parameters: RequestParameters) { + constructor(protected readonly parameters: SubscribeRequestParameters) { super({ cancellable: true }); // Apply default request parameters. diff --git a/src/core/endpoints/subscriptionUtils/handshake.ts b/src/core/endpoints/subscriptionUtils/handshake.ts index 25ccfac2a..d5a258ff4 100644 --- a/src/core/endpoints/subscriptionUtils/handshake.ts +++ b/src/core/endpoints/subscriptionUtils/handshake.ts @@ -1,5 +1,7 @@ /** * Handshake subscribe REST API module. + * + * @internal */ import RequestOperation from '../../constants/operations'; diff --git a/src/core/endpoints/subscriptionUtils/receiveMessages.ts b/src/core/endpoints/subscriptionUtils/receiveMessages.ts index 382e55500..401734147 100644 --- a/src/core/endpoints/subscriptionUtils/receiveMessages.ts +++ b/src/core/endpoints/subscriptionUtils/receiveMessages.ts @@ -1,5 +1,7 @@ /** * Receive messages subscribe REST API module. + * + * @internal */ import RequestOperation from '../../constants/operations'; diff --git a/src/core/interfaces/configuration.ts b/src/core/interfaces/configuration.ts index a062b7a75..2acb0186f 100644 --- a/src/core/interfaces/configuration.ts +++ b/src/core/interfaces/configuration.ts @@ -4,7 +4,7 @@ import { PubNubFileConstructor, PubNubFileInterface } from '../types/file'; import { RequestRetryPolicy } from '../../event-engine/core/retryPolicy'; -import { CryptoModule } from './crypto-module'; +import { ICryptoModule } from './crypto-module'; import { KeySet, Payload } from '../types/api'; import { PubNubError } from '../../errors/pubnub-error'; @@ -402,7 +402,7 @@ export type PlatformConfiguration = { * * @default `not set` */ - cryptoModule?: CryptoModule; + cryptoModule?: ICryptoModule; /** * Platform-specific file representation @@ -571,7 +571,7 @@ export interface PrivateClientConfiguration * * @returns Data processing crypto module (if set). */ - getCryptoModule(): CryptoModule | undefined; + getCryptoModule(): ICryptoModule | undefined; /** * Retrieve user's presence timeout. @@ -741,7 +741,7 @@ export const setDefaults = (configuration: UserConfiguration): ExtendedConfigura let announceFailedHeartbeats = ANNOUNCE_HEARTBEAT_FAILURE; let fileUploadPublishRetryLimit = FILE_PUBLISH_RETRY_LIMIT; let dedupeOnSubscribe = DEDUPE_ON_SUBSCRIBE; - const maximumCacheSize = DEDUPE_CACHE_SIZE; + let maximumCacheSize = DEDUPE_CACHE_SIZE; let useRequestId = USE_REQUEST_ID; // @ts-expect-error Not documented legacy configuration options. @@ -750,6 +750,12 @@ export const setDefaults = (configuration: UserConfiguration): ExtendedConfigura dedupeOnSubscribe = configurationCopy.dedupeOnSubscribe; } + // @ts-expect-error Not documented legacy configuration options. + if (configurationCopy.maximumCacheSize !== undefined && typeof configurationCopy.maximumCacheSize === 'number') { + // @ts-expect-error Not documented legacy configuration options. + maximumCacheSize = configurationCopy.maximumCacheSize; + } + // @ts-expect-error Not documented legacy configuration options. if (configurationCopy.useRequestId !== undefined && typeof configurationCopy.useRequestId === 'boolean') { // @ts-expect-error Not documented legacy configuration options. diff --git a/src/core/interfaces/crypto-module.ts b/src/core/interfaces/crypto-module.ts index 29e173118..017a3d67d 100644 --- a/src/core/interfaces/crypto-module.ts +++ b/src/core/interfaces/crypto-module.ts @@ -49,7 +49,7 @@ export type CryptorConfiguration = { /** * Base crypto module interface. */ -export interface CryptoModule { +export interface ICryptoModule { // -------------------------------------------------------- // --------------------- Encryption ----------------------- // -------------------------------------------------------- @@ -109,14 +109,18 @@ export interface CryptoModule { // endregion } -export abstract class AbstractCryptoModule implements CryptoModule { +export abstract class AbstractCryptoModule implements ICryptoModule { /** * `String` to {@link ArrayBuffer} response decoder. + * + * @internal */ protected static encoder = new TextEncoder(); /** * {@link ArrayBuffer} to {@link string} decoder. + * + * @internal */ protected static decoder = new TextDecoder(); @@ -138,7 +142,7 @@ export abstract class AbstractCryptoModule implements CryptoModule { * * @throws Error if `config.cipherKey` not set. */ - static legacyCryptoModule(config: CryptorConfiguration): CryptoModule { + static legacyCryptoModule(config: CryptorConfiguration): ICryptoModule { throw new Error('Should be implemented by concrete crypto module implementation.'); } @@ -152,7 +156,7 @@ export abstract class AbstractCryptoModule implements CryptoModule { * * @throws Error if `config.cipherKey` not set. */ - static aesCbcCryptoModule(config: CryptorConfiguration): CryptoModule { + static aesCbcCryptoModule(config: CryptorConfiguration): ICryptoModule { throw new Error('Should be implemented by concrete crypto module implementation.'); } // endregion @@ -170,7 +174,7 @@ export abstract class AbstractCryptoModule implements CryptoModule { /** * Encrypt data. * - * @param data - Data which should be encrypted using {@link CryptoModule}. + * @param data - Data which should be encrypted using {@link ICryptoModule}. * * @returns Data encryption result. */ @@ -199,7 +203,7 @@ export abstract class AbstractCryptoModule implements CryptoModule { /** * Encrypt data. * - * @param data - Dta which should be encrypted using `CryptoModule`. + * @param data - Dta which should be encrypted using `ICryptoModule`. * * @returns Data decryption result. */ @@ -227,6 +231,8 @@ export abstract class AbstractCryptoModule implements CryptoModule { /** * Retrieve list of module's cryptors. + * + * @internal */ protected getAllCryptors() { return [this.defaultCryptor, ...this.cryptors]; diff --git a/src/core/pubnub-channel-groups.ts b/src/core/pubnub-channel-groups.ts index ea50e1ea1..908c60d54 100644 --- a/src/core/pubnub-channel-groups.ts +++ b/src/core/pubnub-channel-groups.ts @@ -10,12 +10,41 @@ import { DeleteChannelGroupRequest } from './endpoints/channel_groups/delete_gro import { ListChannelGroupsRequest } from './endpoints/channel_groups/list_groups'; import * as ChannelGroups from './types/api/channel-groups'; -export default class PubnubChannelGroups { +/** + * PubNub Stream / Channel group API interface. + */ +export default class PubNubChannelGroups { + /** + * PubNub account keys set which should be used for REST API calls. + * + * @internal + */ + private readonly keySet: KeySet; + + /* eslint-disable @typescript-eslint/no-explicit-any */ + /** + * Function which should be used to send REST API calls. + * + * @internal + */ + private readonly sendRequest: SendRequestFunction; + + /** + * Create stream / channel group API access object. + * + * @param keySet - PubNub account keys set which should be used for REST API calls. + * @param sendRequest - Function which should be used to send REST API calls. + * + * @internal + */ constructor( - private readonly keySet: KeySet, + keySet: KeySet, /* eslint-disable @typescript-eslint/no-explicit-any */ - private readonly sendRequest: SendRequestFunction, - ) {} + sendRequest: SendRequestFunction, + ) { + this.sendRequest = sendRequest; + this.keySet = keySet; + } // -------------------------------------------------------- // ---------------------- Audit API ----------------------- diff --git a/src/core/pubnub-common.ts b/src/core/pubnub-common.ts index 4ed0aad14..41615f1c4 100644 --- a/src/core/pubnub-common.ts +++ b/src/core/pubnub-common.ts @@ -1,3 +1,7 @@ +/** + * Core PubNub API module. + */ + // region Imports // region Components import { Listener, ListenerManager } from './components/listener_manager'; @@ -39,7 +43,7 @@ import * as Publish from './endpoints/publish'; import * as Signal from './endpoints/signal'; // endregion // region Subscription -import { RequestParameters as SubscribeRequestParameters, SubscribeRequest } from './endpoints/subscribe'; +import { SubscribeRequestParameters as SubscribeRequestParameters, SubscribeRequest } from './endpoints/subscribe'; import { ReceiveMessagesSubscribeRequest } from './endpoints/subscriptionUtils/receiveMessages'; import { HandshakeSubscribeRequest } from './endpoints/subscriptionUtils/handshake'; import * as Subscription from './types/api/subscription'; @@ -112,6 +116,11 @@ import { DownloadFileRequest } from './endpoints/file_upload/download_file'; // -------------------------------------------------------- // region Types +/** + * Core PubNub client configuration object. + * + * @internal + */ type ClientInstanceConfiguration = { /** * Client-provided configuration. @@ -309,6 +318,14 @@ export class PubNubCore< } // endregion + /** + * Create and configure PubNub client core. + * + * @param configuration - PubNub client core configuration. + * @returns Configured and ready to use PubNub client. + * + * @internal + */ constructor(configuration: ClientInstanceConfiguration) { this._configuration = configuration.configuration; this.cryptography = configuration.cryptography; @@ -732,6 +749,8 @@ export class PubNubCore< * @param callback - Request completion handler callback. * * @returns Asynchronous request execution and response parsing result. + * + * @internal */ private sendRequest( request: AbstractRequest, @@ -741,6 +760,8 @@ export class PubNubCore< /** * Schedule request execution. * + * @internal + * * @param request - REST API request. * * @returns Asynchronous request execution and response parsing result. @@ -750,6 +771,8 @@ export class PubNubCore< /** * Schedule request execution. * + * @internal + * * @param request - REST API request. * @param [callback] - Request completion handler callback. * @@ -1080,6 +1103,8 @@ export class PubNubCore< * * **Note:** Method passed into managers to let them use it when required. * + * @internal + * * @param parameters - Request configuration parameters. * @param callback - Request completion handler callback. */ @@ -1135,6 +1160,8 @@ export class PubNubCore< * * **Note:** Method passed into managers to let them use it when required. * + * @internal + * * @param parameters - Request configuration parameters. * @param callback - Request completion handler callback. */ @@ -1186,6 +1213,8 @@ export class PubNubCore< /** * Event engine handshake subscribe. * + * @internal + * * @param parameters - Request configuration parameters. */ private async subscribeHandshake(parameters: Subscription.CancelableSubscribeParameters) { @@ -1218,6 +1247,8 @@ export class PubNubCore< /** * Event engine receive messages subscribe. * + * @internal + * * @param parameters - Request configuration parameters. */ private async subscribeReceiveMessages(parameters: Subscription.CancelableSubscribeParameters) { @@ -1800,6 +1831,8 @@ export class PubNubCore< /** * Announce user presence * + * @internal + * * @param parameters - Desired presence state for provided list of channels and groups. * @param callback - Request completion handler callback. */ @@ -1823,6 +1856,8 @@ export class PubNubCore< /** * Announce user `join` on specified list of channels and groups. * + * @internal + * * @param parameters - List of channels and groups where `join` event should be sent. */ private join(parameters: { channels?: string[]; groups?: string[] }) { @@ -1835,6 +1870,8 @@ export class PubNubCore< /** * Announce user `leave` on specified list of channels and groups. * + * @internal + * * @param parameters - List of channels and groups where `leave` event should be sent. */ private leave(parameters: { channels?: string[]; groups?: string[] }) { @@ -1844,6 +1881,8 @@ export class PubNubCore< /** * Announce user `leave` on all subscribed channels. + * + * @internal */ private leaveAll() { if (process.env.PRESENCE_MODULE !== 'disabled') this.presenceEventEngine?.leaveAll(); @@ -1987,7 +2026,7 @@ export class PubNubCore< * * @returns Token's permissions information for the resources. */ - public parseToken(token: string) { + public parseToken(token: string): PAM.Token | undefined { return this.tokenManager && this.tokenManager.parseToken(token); } // endregion @@ -2808,8 +2847,7 @@ export class PubNubCore< * @param callback - Request completion handler callback. * * @deprecated Use {@link PubNubCore#objects.removeMemberships} or {@link PubNubCore#objects.removeChannelMembers} - * methods instead - * from `objects` API group.. + * methods instead from `objects` API group. */ public removeMemberships< RelationCustom extends AppContext.CustomData = AppContext.CustomData, @@ -2830,8 +2868,7 @@ export class PubNubCore< * @returns Asynchronous memberships modification response. * * @deprecated Use {@link PubNubCore#objects.removeMemberships} or {@link PubNubCore#objects.removeChannelMembers} - * methods instead - * from `objects` API group.. + * methods instead from `objects` API group. */ public async removeMemberships< RelationCustom extends AppContext.CustomData = AppContext.CustomData, @@ -2849,8 +2886,7 @@ export class PubNubCore< * @returns Asynchronous memberships modification response or `void` in case if `callback` provided. * * @deprecated Use {@link PubNubCore#objects.removeMemberships} or {@link PubNubCore#objects.removeChannelMembers} - * methods instead - * from `objects` API group.. + * methods instead from `objects` API group. */ public async removeMemberships< RelationCustom extends AppContext.CustomData = AppContext.CustomData, diff --git a/src/core/pubnub-objects.ts b/src/core/pubnub-objects.ts index 5d4a2152f..b4587f76f 100644 --- a/src/core/pubnub-objects.ts +++ b/src/core/pubnub-objects.ts @@ -19,17 +19,47 @@ import * as AppContext from './types/api/app-context'; import { ChannelMetadataObject } from './types/api/app-context'; import { SetUUIDMetadataRequest } from './endpoints/objects/uuid/set'; +/** + * PubNub App Context API interface. + */ export default class PubNubObjects { + /** + * Extended PubNub client configuration object. + * + * @internal + */ + private readonly configuration: PrivateClientConfiguration; + + /* eslint-disable @typescript-eslint/no-explicit-any */ + /** + * Function which should be used to send REST API calls. + * + * @internal + */ + private readonly sendRequest: SendRequestFunction; /** * REST API endpoints access credentials. + * + * @internal */ private readonly keySet: KeySet; + + /** + * Create app context API access object. + * + * @param configuration - Extended PubNub client configuration object. + * @param sendRequest - Function which should be used to send REST API calls. + * + * @internal + */ constructor( - private readonly configuration: PrivateClientConfiguration, + configuration: PrivateClientConfiguration, /* eslint-disable @typescript-eslint/no-explicit-any */ - private readonly sendRequest: SendRequestFunction, + sendRequest: SendRequestFunction, ) { this.keySet = configuration.keySet; + this.configuration = configuration; + this.sendRequest = sendRequest; } // -------------------------------------------------------- @@ -89,11 +119,12 @@ export default class PubNubObjects { /** * Fetch a paginated list of UUID Metadata objects. * - * * @param [parametersOrCallback] - Request configuration parameters or callback from overload. * @param [callback] - Request completion handler callback. * * @returns Asynchronous get all UUID metadata response or `void` in case if `callback` provided. + * + * @internal */ async _getAllUUIDMetadata( parametersOrCallback?: @@ -169,6 +200,8 @@ export default class PubNubObjects { * @param [callback] - Request completion handler callback. * * @returns Asynchronous get UUID metadata response or `void` in case if `callback` provided. + * + * @internal */ async _getUUIDMetadata( parametersOrCallback?: @@ -234,6 +267,8 @@ export default class PubNubObjects { /** * Update specific UUID Metadata object. * + * @internal + * * @param parameters - Request configuration parameters. Will set UUID metadata for currently * configured PubNub client `uuid` if not set. * @param [callback] - Request completion handler callback. @@ -306,6 +341,8 @@ export default class PubNubObjects { /** * Remove a specific UUID Metadata object. * + * @internal + * * @param [parametersOrCallback] - Request configuration parameters or callback from overload. * @param [callback] - Request completion handler callback. * @@ -390,6 +427,8 @@ export default class PubNubObjects { /** * Fetch a paginated list of Channel Metadata objects. * + * @internal + * * @param [parametersOrCallback] - Request configuration parameters or callback from overload. * @param [callback] - Request completion handler callback. * @@ -453,6 +492,8 @@ export default class PubNubObjects { /** * Fetch Channel Metadata object. * + * @internal + * * @param parameters - Request configuration parameters. * @param [callback] - Request completion handler callback. * @@ -510,6 +551,8 @@ export default class PubNubObjects { /** * Update specific Channel Metadata object. * + * @internal + * * @param parameters - Request configuration parameters. * @param [callback] - Request completion handler callback. * @@ -568,6 +611,8 @@ export default class PubNubObjects { /** * Remove a specific Channel Metadata object. * + * @internal + * * @param parameters - Request configuration parameters. * @param [callback] - Request completion handler callback. * @@ -1065,7 +1110,6 @@ export default class PubNubObjects { uuids: spaceParameters.users?.map((user) => { if (typeof user === 'string') return user; - user.userId; return { id: user.userId, custom: user.custom }; }) ?? spaceParameters.uuids, limit: 0, diff --git a/src/core/pubnub-push.ts b/src/core/pubnub-push.ts index cc8e37b06..c994533ac 100644 --- a/src/core/pubnub-push.ts +++ b/src/core/pubnub-push.ts @@ -10,12 +10,41 @@ import { RemoveDevicePushNotificationRequest } from './endpoints/push/remove_dev import * as PushNotifications from './types/api/push-notifications'; import * as Push from './types/api/push'; +/** + * PubNub Push Notifications API interface. + */ export default class PubNubPushNotifications { + /** + * PubNub account keys set which should be used for REST API calls. + * + * @internal + */ + private readonly keySet: KeySet; + + /* eslint-disable @typescript-eslint/no-explicit-any */ + /** + * Function which should be used to send REST API calls. + * + * @internal + */ + private readonly sendRequest: SendRequestFunction; + + /** + * Create mobile push notifications API access object. + * + * @param keySet - PubNub account keys set which should be used for REST API calls. + * @param sendRequest - Function which should be used to send REST API calls. + * + * @internal + */ constructor( - private readonly keySet: KeySet, + keySet: KeySet, /* eslint-disable @typescript-eslint/no-explicit-any */ - private readonly sendRequest: SendRequestFunction, - ) {} + sendRequest: SendRequestFunction, + ) { + this.sendRequest = sendRequest; + this.keySet = keySet; + } // -------------------------------------------------------- // ---------------------- Audit API ----------------------- diff --git a/src/core/types/api/access-manager.ts b/src/core/types/api/access-manager.ts index a93b77a32..991c1da3a 100644 --- a/src/core/types/api/access-manager.ts +++ b/src/core/types/api/access-manager.ts @@ -1,4 +1,6 @@ // region Grant token +import { Payload } from './index'; + /** * Metadata which will be associated with access token. */ @@ -234,6 +236,146 @@ export type RevokeParameters = string; export type RevokeTokenResponse = Record; // endregion +// -------------------------------------------------------- +// -------------------- Token parse ----------------------- +// -------------------------------------------------------- +// region Parsed token + +/** + * Decoded access token representation. + */ +export type Token = { + /** + * Token version. + */ + version: number; + + /** + * Token generation date time. + */ + timestamp: number; + + /** + * Maximum duration (in minutes) during which token will be valid. + */ + ttl: number; + + /** + * Permissions granted to specific resources. + */ + resources?: Partial>>; + + /** + * Permissions granted to resources which match specified regular expression. + */ + patterns?: Partial>>; + + /** + * The uuid that is exclusively authorized to use this token to make API requests. + */ + authorized_uuid?: string; + + /** + * PAM token content signature. + */ + signature: ArrayBuffer; + + /** + * Additional information which has been added to the token. + */ + meta?: Payload; +}; + +/** + * Granted resource permissions. + * + * **Note:** Following operations doesn't require any permissions: + * - unsubscribe from channel / channel group + * - where now + */ +export type Permissions = { + /** + * Resource read permission. + * + * Read permission required for: + * - subscribe to channel / channel group (including presence versions `-pnpres`) + * - here now + * - get presence state + * - set presence state + * - fetch history + * - fetch messages count + * - list shared files + * - download shared file + * - enable / disable push notifications + * - get message actions + * - get history with message actions + */ + read: boolean; + + /** + * Resource write permission. + * + * Write permission required for: + * - publish message / signal + * - share file + * - add message actions + */ + write: boolean; + + /** + * Resource manage permission. + * + * Manage permission required for: + * - add / remove channels to / from the channel group + * - list channels in group + * - remove channel group + * - set / remove channel members + */ + manage: boolean; + + /** + * Resource delete permission. + * + * Delete permission required for: + * - delete messages from history + * - delete shared file + * - delete user metadata + * - delete channel metadata + * - remove message action + */ + delete: boolean; + + /** + * Resource get permission. + * + * Get permission required for: + * - get user metadata + * - get channel metadata + * - get channel members + */ + get: boolean; + + /** + * Resource update permission. + * + * Update permissions required for: + * - set user metadata + * - set channel metadata + * - set / remove user membership + */ + update: boolean; + + /** + * Resource `join` permission. + * + * `Join` permission required for: + * - set / remove channel members + */ + join: boolean; +}; + +// endregion + // -------------------------------------------------------- // --------------------- Deprecated ----------------------- // -------------------------------------------------------- diff --git a/src/core/types/api/file-sharing.ts b/src/core/types/api/file-sharing.ts index 90200f69a..809da4934 100644 --- a/src/core/types/api/file-sharing.ts +++ b/src/core/types/api/file-sharing.ts @@ -129,7 +129,7 @@ export type SendFileResponse = PublishFileMessageResponse & { /** * Unique file identifier. * - * Unique file identifier and it's {@link name} can be used to download file from the channel + * Unique file identifier, and it's {@link name} can be used to download file from the channel * later. */ id: string; @@ -387,7 +387,7 @@ export type FileUrlParameters = { /** * Unique file identifier. * - * Unique file identifier and it's {@link name} can be used to download file from the channel + * Unique file identifier, and it's {@link name} can be used to download file from the channel * later. */ id: string; @@ -426,7 +426,7 @@ export type DeleteFileParameters = { /** * Unique file identifier. * - * Unique file identifier and it's {@link name} can be used to download file from the channel + * Unique file identifier, and it's {@link name} can be used to download file from the channel * later. */ id: string; diff --git a/src/core/types/api/history.ts b/src/core/types/api/history.ts index 6bea6b7eb..dac984183 100644 --- a/src/core/types/api/history.ts +++ b/src/core/types/api/history.ts @@ -141,7 +141,7 @@ export type Actions = { * High-precision PubNub timetoken with time when {@link uuid} reacted on message. */ actionTimetoken: string; - }; + }[]; }; }; diff --git a/src/core/types/api/index.ts b/src/core/types/api/index.ts index dd3a51e1f..0f85c95f8 100644 --- a/src/core/types/api/index.ts +++ b/src/core/types/api/index.ts @@ -6,6 +6,8 @@ import StatusCategory from '../../constants/categories'; /** * PubNub account keyset. + * + * @internal */ export type KeySet = { /** @@ -26,6 +28,8 @@ export type KeySet = { /** * REST API request processing function. + * + * @internal */ export type SendRequestFunction = ( request: AbstractRequest, @@ -142,4 +146,10 @@ export type Query = Record; * * generic messages and signals content, * * published message metadata. */ -export type Payload = string | number | boolean | { [key: string]: Payload | null } | Payload[]; +export type Payload = + | string + | number + | boolean + | { toJSON: () => Payload } + | { [key: string]: Payload | null } + | Payload[]; diff --git a/src/core/types/api/message-action.ts b/src/core/types/api/message-action.ts index 125d3a3e0..1eabc3d84 100644 --- a/src/core/types/api/message-action.ts +++ b/src/core/types/api/message-action.ts @@ -20,7 +20,7 @@ export type MessageAction = { /** * Timetoken of when message reaction has been added. * - * **Note:** This token required when it will be required to remove raction. + * **Note:** This token required when it will be required to remove reaction. */ actionTimetoken: string; diff --git a/src/core/types/api/push-notifications.ts b/src/core/types/api/push-notifications.ts index 8dd0dadcf..a0c1541e7 100644 --- a/src/core/types/api/push-notifications.ts +++ b/src/core/types/api/push-notifications.ts @@ -15,7 +15,7 @@ type DevicePush = { /** * Push Notifications gateway to use. * - * **Important:** Depends from the source of `device` token and can be `apns2` (for token + * **Important:** Depends on from the source of `device` token and can be `apns2` (for token * provided during device registration using Apple's framework) or `gcm` (when used Firebase * or similar framework to receive token). */ diff --git a/src/core/types/api/subscription.ts b/src/core/types/api/subscription.ts index 5cdab91fe..a7323ca96 100644 --- a/src/core/types/api/subscription.ts +++ b/src/core/types/api/subscription.ts @@ -1,5 +1,5 @@ import { - RequestParameters as SubscribeRequestParameters, + SubscribeRequestParameters, VSPMembershipObjectData, AppContextObjectData, MessageActionData, @@ -302,6 +302,8 @@ type FileEvent = { /** * Cancelable subscribe request parameters. + * + * @internal */ export type CancelableSubscribeParameters = Omit< SubscribeRequestParameters, diff --git a/src/core/utils.ts b/src/core/utils.ts index 5cee8bf45..017e7a1db 100644 --- a/src/core/utils.ts +++ b/src/core/utils.ts @@ -1,3 +1,9 @@ +/** + * PubNub package utilities module. + * + * @internal + */ + import { Query } from './types/api'; /** @@ -8,6 +14,8 @@ import { Query } from './types/api'; * @param input - Source string or number for encoding. * * @returns Percent-encoded string. + * + * @internal */ export const encodeString = (input: string | number) => { return encodeURIComponent(input).replace(/[!~*'()]/g, (x) => `%${x.charCodeAt(0).toString(16).toUpperCase()}`); @@ -21,12 +29,17 @@ export const encodeString = (input: string | number) => { * @param [defaultString] - String which should be used in case if {@link names} is empty. * * @returns String which contains encoded names joined by non-encoded `,`. + * + * @internal */ export const encodeNames = (names: string[], defaultString?: string) => { const encodedNames = names.map((name) => encodeString(name)); - return encodedNames.length ? encodedNames.join(',') : defaultString ?? ''; + return encodedNames.length ? encodedNames.join(',') : (defaultString ?? ''); }; +/** + * @internal + */ export const removeSingleOccurrence = (source: string[], elementsToRemove: string[]) => { const removed = Object.fromEntries(elementsToRemove.map((prop) => [prop, false])); @@ -39,6 +52,9 @@ export const removeSingleOccurrence = (source: string[], elementsToRemove: strin }); }; +/** + * @internal + */ export const findUniqueCommonElements = (a: string[], b: string[]) => { return [...a].filter( (value) => @@ -52,6 +68,8 @@ export const findUniqueCommonElements = (a: string[], b: string[]) => { * @param query - Key / value pairs of the request query parameters. * * @returns Stringified query key / value pairs. + * + * @internal */ export const queryStringFromObject = (query: Query) => { return Object.keys(query) diff --git a/src/crypto/modules/NodeCryptoModule/ICryptor.ts b/src/crypto/modules/NodeCryptoModule/ICryptor.ts index 63860b300..81cfde5b6 100644 --- a/src/crypto/modules/NodeCryptoModule/ICryptor.ts +++ b/src/crypto/modules/NodeCryptoModule/ICryptor.ts @@ -3,7 +3,7 @@ */ /** - * Data encrypted by {@link CryptoModule}. + * Data encrypted by {@link NodeCryptoModule}. */ export type EncryptedDataType = { /** @@ -18,7 +18,7 @@ export type EncryptedDataType = { }; /** - * {@link Readable} stream encrypted by {@link CryptoModule}. + * {@link Readable} stream encrypted by {@link NodeCryptoModule}. */ export type EncryptedStream = { /** diff --git a/src/crypto/modules/NodeCryptoModule/aesCbcCryptor.ts b/src/crypto/modules/NodeCryptoModule/aesCbcCryptor.ts index 024b4e188..934dccd75 100644 --- a/src/crypto/modules/NodeCryptoModule/aesCbcCryptor.ts +++ b/src/crypto/modules/NodeCryptoModule/aesCbcCryptor.ts @@ -1,5 +1,7 @@ /** * AES-CBC cryptor module. + * + * @internal */ import { createCipheriv, createDecipheriv, createHash, randomBytes } from 'crypto'; @@ -11,6 +13,8 @@ import { ICryptor, EncryptedDataType, EncryptedStream } from './ICryptor'; * AES-CBC cryptor. * * AES-CBC cryptor with enhanced cipher strength. + * + * @internal */ export default class AesCbcCryptor implements ICryptor { /** diff --git a/src/crypto/modules/NodeCryptoModule/legacyCryptor.ts b/src/crypto/modules/NodeCryptoModule/legacyCryptor.ts index 4aa44e4e4..1deddc2ed 100644 --- a/src/crypto/modules/NodeCryptoModule/legacyCryptor.ts +++ b/src/crypto/modules/NodeCryptoModule/legacyCryptor.ts @@ -1,5 +1,7 @@ /** * Legacy cryptor module. + * + * @internal */ import PubNubFile, { PubNubFileParameters } from '../../../file/modules/node'; @@ -14,6 +16,8 @@ import FileCryptor from '../node'; /** * Legacy cryptor. + * + * @internal */ export default class LegacyCryptor implements ILegacyCryptor { /** diff --git a/src/crypto/modules/NodeCryptoModule/nodeCryptoModule.ts b/src/crypto/modules/NodeCryptoModule/nodeCryptoModule.ts index a98176b5d..220dc590d 100644 --- a/src/crypto/modules/NodeCryptoModule/nodeCryptoModule.ts +++ b/src/crypto/modules/NodeCryptoModule/nodeCryptoModule.ts @@ -14,6 +14,7 @@ import { EncryptedDataType, ICryptor } from './ICryptor'; import { ILegacyCryptor } from './ILegacyCryptor'; import AesCbcCryptor from './aesCbcCryptor'; import LegacyCryptor from './legacyCryptor'; +import { Payload } from '../../../core/types/api'; /** * Re-export bundled cryptors. @@ -28,7 +29,7 @@ type CryptorType = ICryptor | ILegacyCryptor; /** * CryptoModule for Node.js platform. */ -export class CryptoModule extends AbstractCryptoModule { +export class NodeCryptoModule extends AbstractCryptoModule { /** * {@link LegacyCryptor|Legacy} cryptor identifier. */ @@ -85,8 +86,8 @@ export class CryptoModule extends AbstractCryptoModule { encrypt(data: ArrayBuffer | string) { // Encrypt data. const encrypted = - data instanceof ArrayBuffer && this.defaultCryptor.identifier === CryptoModule.LEGACY_IDENTIFIER - ? (this.defaultCryptor as ILegacyCryptor).encrypt(CryptoModule.decoder.decode(data)) + data instanceof ArrayBuffer && this.defaultCryptor.identifier === NodeCryptoModule.LEGACY_IDENTIFIER + ? (this.defaultCryptor as ILegacyCryptor).encrypt(NodeCryptoModule.decoder.decode(data)) : (this.defaultCryptor as ICryptor).encrypt(data); if (!encrypted.metadata) return encrypted.data; @@ -96,7 +97,7 @@ export class CryptoModule extends AbstractCryptoModule { // Write encrypted data payload content. const encryptedData = typeof encrypted.data === 'string' - ? CryptoModule.encoder.encode(encrypted.data).buffer + ? NodeCryptoModule.encoder.encode(encrypted.data).buffer : encrypted.data.buffer.slice(encrypted.data.byteOffset, encrypted.data.byteOffset + encrypted.data.length); return this.concatArrayBuffer(headerData, encryptedData); @@ -117,7 +118,7 @@ export class CryptoModule extends AbstractCryptoModule { name: file.name, mimeType: 'application/octet-stream', data: Buffer.from( - typeof encryptedData === 'string' ? CryptoModule.encoder.encode(encryptedData) : encryptedData, + typeof encryptedData === 'string' ? NodeCryptoModule.encoder.encode(encryptedData) : encryptedData, ), }); } @@ -156,7 +157,7 @@ export class CryptoModule extends AbstractCryptoModule { // -------------------------------------------------------- // region Decryption - decrypt(data: ArrayBuffer | string) { + decrypt(data: ArrayBuffer | string): ArrayBuffer | Payload | null { const encryptedData = Buffer.from(typeof data === 'string' ? decode(data) : data); const header = CryptorHeader.tryParse( encryptedData.buffer.slice(encryptedData.byteOffset, encryptedData.byteOffset + encryptedData.length), @@ -188,7 +189,7 @@ export class CryptoModule extends AbstractCryptoModule { * If It's legacy one then redirect it. * (as long as we support legacy need to check on instance type) */ - if (cryptor?.identifier === CryptoModule.LEGACY_IDENTIFIER) + if (cryptor?.identifier === NodeCryptoModule.LEGACY_IDENTIFIER) return (cryptor as ILegacyCryptor).decryptFile(file, File); return File.create({ @@ -217,9 +218,11 @@ export class CryptoModule extends AbstractCryptoModule { * @returns Previously registered {@link ILegacyCryptor|legacy} cryptor. * * @throws Error if legacy cryptor not registered. + * + * @internal */ private getLegacyCryptor(): ILegacyCryptor | undefined { - return this.getCryptorFromId(CryptoModule.LEGACY_IDENTIFIER) as ILegacyCryptor; + return this.getCryptorFromId(NodeCryptoModule.LEGACY_IDENTIFIER) as ILegacyCryptor; } /** @@ -230,6 +233,8 @@ export class CryptoModule extends AbstractCryptoModule { * @returns Registered cryptor with specified identifier. * * @throws Error if cryptor with specified {@link id} can't be found. + * + * @internal */ private getCryptorFromId(id: string) { const cryptor = this.getAllCryptors().find((cryptor) => id === cryptor.identifier); @@ -244,6 +249,8 @@ export class CryptoModule extends AbstractCryptoModule { * @param header - Header with cryptor-defined data or raw cryptor identifier. * * @returns Cryptor which correspond to provided {@link header}. + * + * @internal */ private getCryptor(header: CryptorHeader | string) { if (typeof header === 'string') { @@ -262,6 +269,8 @@ export class CryptoModule extends AbstractCryptoModule { * @param encrypted - Encryption data object as source for header data. * * @returns Binary representation of the cryptor header data. + * + * @internal */ private getHeaderData(encrypted: EncryptedDataType) { if (!encrypted.metadata) return; @@ -282,6 +291,8 @@ export class CryptoModule extends AbstractCryptoModule { * @param ab2 - Second {@link ArrayBuffer}. * * @returns Merged data as {@link ArrayBuffer}. + * + * @internal */ private concatArrayBuffer(ab1: ArrayBuffer, ab2: ArrayBuffer): ArrayBuffer { const tmp = new Uint8Array(ab1.byteLength + ab2.byteLength); @@ -302,6 +313,8 @@ export class CryptoModule extends AbstractCryptoModule { * @returns Decrypted data as {@link PubNub} File object. * * @throws Error if file is empty or contains unsupported data type. + * + * @internal */ private async onStreamReadable( stream: NodeJS.ReadableStream, @@ -347,6 +360,8 @@ export class CryptoModule extends AbstractCryptoModule { * @returns Decrypted data as {@link PubNub} File object. * * @throws Error if file is empty or contains unsupported data type. + * + * @internal */ private async decryptLegacyFileStream( stream: NodeJS.ReadableStream, @@ -372,6 +387,8 @@ export class CryptoModule extends AbstractCryptoModule { /** * CryptorHeader Utility + * + * @internal */ class CryptorHeader { static decoder = new TextDecoder(); @@ -422,7 +439,7 @@ class CryptorHeader { let version = null; if (encryptedData.byteLength >= 4) { sentinel = encryptedData.slice(0, 4); - if (!this.isSentinel(sentinel)) return CryptoModule.LEGACY_IDENTIFIER; + if (!this.isSentinel(sentinel)) return NodeCryptoModule.LEGACY_IDENTIFIER; } if (encryptedData.byteLength >= 5) version = encryptedDataView.getInt8(4); @@ -449,6 +466,8 @@ class CryptorHeader { /** * Cryptor header (v1). + * + * @internal */ class CryptorHeaderV1 { _identifier; diff --git a/src/crypto/modules/node.ts b/src/crypto/modules/node.ts index e0eacbd77..e0d484f31 100644 --- a/src/crypto/modules/node.ts +++ b/src/crypto/modules/node.ts @@ -1,5 +1,7 @@ /** * Legacy Node.js cryptography module. + * + * @internal */ import { createCipheriv, createDecipheriv, createHash, randomBytes } from 'crypto'; @@ -12,6 +14,8 @@ import { PubNubFileConstructor } from '../../core/types/file'; /** * Legacy cryptography implementation for Node.js-based {@link PubNub} client. + * + * @internal */ export default class NodeCryptography implements Cryptography { /** diff --git a/src/crypto/modules/web.ts b/src/crypto/modules/web.ts index e971fab6f..1ba8f0177 100644 --- a/src/crypto/modules/web.ts +++ b/src/crypto/modules/web.ts @@ -1,23 +1,18 @@ -/* global crypto */ /** * Legacy browser cryptography module. + * + * @internal */ +/* global crypto */ import { PubNubFile, PubNubFileParameters } from '../../file/modules/web'; import { Cryptography } from '../../core/interfaces/cryptography'; import { PubNubFileConstructor } from '../../core/types/file'; -function concatArrayBuffer(ab1: ArrayBuffer, ab2: ArrayBuffer) { - const tmp = new Uint8Array(ab1.byteLength + ab2.byteLength); - - tmp.set(new Uint8Array(ab1), 0); - tmp.set(new Uint8Array(ab2), ab1.byteLength); - - return tmp.buffer; -} - /** * Legacy cryptography implementation for browser-based {@link PubNub} client. + * + * @internal */ export default class WebCryptography implements Cryptography { /** @@ -70,7 +65,7 @@ export default class WebCryptography implements Cryptography; + + /** + * Channel entity name. + * + * @internal + */ private readonly name: string; - constructor( - channelName: string, - private readonly eventEmitter: EventEmitter, - private readonly pubnub: PubNub, - ) { - this.name = channelName; + /** + * Create simple channel entity. + * + * @param name - Name of the channel which will be used with subscription loop. + * @param eventEmitter - Event emitter, which will notify listeners about updates received on + * channel's subscription. + * @param pubnub - PubNub instance which will use this entity. + * + * @returns Ready to use channel entity. + * + * @internal + */ + constructor(name: string, eventEmitter: EventEmitter, pubnub: PubNub) { + this.eventEmitter = eventEmitter; + this.pubnub = pubnub; + this.name = name; } + /** + * Create channel's subscription object for real-time updates. + * + * Create subscription object which can be used to subscribe to the real-time updates sent to the specific channel. + * + * @param [subscriptionOptions] - Channel's subscription object behavior customization options. + * + * @returns Configured and ready to use channel's subscription object. + */ subscription(subscriptionOptions?: SubscriptionOptions) { if (process.env.SUBSCRIBE_EVENT_ENGINE_MODULE !== 'disabled') { return new Subscription({ diff --git a/src/entities/ChannelGroup.ts b/src/entities/ChannelGroup.ts index fa6cba92c..9b3355956 100644 --- a/src/entities/ChannelGroup.ts +++ b/src/entities/ChannelGroup.ts @@ -3,17 +3,60 @@ import EventEmitter from '../core/components/eventEmitter'; import { SubscriptionOptions } from './commonTypes'; import { Subscription } from './Subscription'; +/** + * First-class objects which provides access to the channel group-specific APIs. + */ export class ChannelGroup { + /** + * Event emitter, which will notify listeners about updates received on channel group's + * subscription. + * + * @internal + */ + private readonly eventEmitter: EventEmitter; + + /** + * PubNub instance which will use this entity. + * + * @internal + */ + private readonly pubnub: PubNub; + + /** + * Channel group entity name. + * + * @internal + */ private readonly name: string; - constructor( - channelGroup: string, - private readonly eventEmitter: EventEmitter, - private readonly pubnub: PubNub, - ) { - this.name = channelGroup; + /** + * Create simple channel entity. + * + * @param name - Name of the channel group which will be used with subscription loop. + * @param eventEmitter - Event emitter, which will notify listeners about updates received on + * channel group's subscription. + * @param pubnub - PubNub instance which will use this entity. + * + * @returns Ready to use channel group entity. + * + * @internal + */ + constructor(name: string, eventEmitter: EventEmitter, pubnub: PubNub) { + this.eventEmitter = eventEmitter; + this.pubnub = pubnub; + this.name = name; } + /** + * Create channel group's subscription object for real-time updates. + * + * Create subscription object which can be used to subscribe to the real-time updates sent to the channels in + * specific channel group. + * + * @param [subscriptionOptions] - Channel group's subscription object behavior customization options. + * + * @returns Configured and ready to use channel group's subscription object. + */ subscription(subscriptionOptions?: SubscriptionOptions) { if (process.env.SUBSCRIBE_EVENT_ENGINE_MODULE !== 'disabled') { return new Subscription({ diff --git a/src/entities/ChannelMetadata.ts b/src/entities/ChannelMetadata.ts index 14b78666d..cd7293714 100644 --- a/src/entities/ChannelMetadata.ts +++ b/src/entities/ChannelMetadata.ts @@ -3,13 +3,60 @@ import EventEmitter from '../core/components/eventEmitter'; import { SubscriptionOptions } from './commonTypes'; import { Subscription } from './Subscription'; +/** + * First-class objects which provides access to the channel app context object-specific APIs. + */ export class ChannelMetadata { - constructor( - private readonly id: string, - private readonly eventEmitter: EventEmitter, - private readonly pubnub: PubNub, - ) {} + /** + * Event emitter, which will notify listeners about updates received on channel app context object + * subscription. + * + * @internal + */ + private readonly eventEmitter: EventEmitter; + /** + * PubNub instance which will use this entity. + * + * @internal + */ + private readonly pubnub: PubNub; + + /** + * Channel app context object identifier. + * + * @internal + */ + private readonly id: string; + + /** + * Create channel app context object entity. + * + * @param id - Channel app context object identifier which will be used with subscription loop. + * @param eventEmitter - Event emitter, which will notify listeners about updates received on + * channel's subscription. + * @param pubnub - PubNub instance which will use this entity. + * + * @returns Ready to use channel app context object entity. + * + * @internal + */ + constructor(id: string, eventEmitter: EventEmitter, pubnub: PubNub) { + this.eventEmitter = eventEmitter; + this.pubnub = pubnub; + this.id = id; + } + + /** + * Create channel's app context subscription object for real-time updates. + * + * Create subscription object which can be used to subscribe to the real-time updates sent to the specific channel + * app context object. + * + * @param [subscriptionOptions] - Channel's app context subscription object behavior customization options. + * + * @returns Configured and ready to use channel's app context subscription object. + */ subscription(subscriptionOptions?: SubscriptionOptions) { if (process.env.SUBSCRIBE_EVENT_ENGINE_MODULE !== 'disabled') { return new Subscription({ diff --git a/src/entities/SubscribeCapable.ts b/src/entities/SubscribeCapable.ts index 0454a323a..38bbd6ead 100644 --- a/src/entities/SubscribeCapable.ts +++ b/src/entities/SubscribeCapable.ts @@ -5,13 +5,56 @@ import EventEmitter from '../core/components/eventEmitter'; import { SubscriptionOptions } from './commonTypes'; export abstract class SubscribeCapable { + /** + * List of channel names for subscription loop. + * + * @internal + */ protected abstract channelNames: string[]; + + /** + * List of channel group names for subscription loop. + * + * @internal + */ protected abstract groupNames: string[]; - protected abstract listener: Listener; + + /** + * Subscribable object configuration. + * + * @internal + */ + protected abstract options?: SubscriptionOptions; + + /** + * Event emitter, which will notify listeners about updates received for channels / groups. + * + * @internal + */ protected abstract eventEmitter: EventEmitter; + + /** + * Real-time events listener object associated with entity subscription object. + * + * Listener will be used to notify about updates received from the channels / groups. + * + * @internal + */ + protected abstract listener: Listener; + + /** + * PubNub instance which will perform subscribe / unsubscribe requests. + * + * @internal + */ protected abstract pubnub: PubNub; - protected abstract options?: SubscriptionOptions; + /** + * Start receiving real-time updates. + * + * @param subscribeParameters - Additional subscription configuration options which should be used + * for request. + */ subscribe(subscribeParameters?: { timetoken?: string }) { const timetoken = subscribeParameters?.timetoken; this.pubnub.subscribe({ @@ -20,6 +63,10 @@ export abstract class SubscribeCapable { ...(timetoken !== null && timetoken !== '' && { timetoken: timetoken }), }); } + + /** + * Stop real-time events processing. + */ unsubscribe() { this.pubnub.unsubscribe({ channels: this.channelNames, @@ -27,30 +74,72 @@ export abstract class SubscribeCapable { }); } + /** + * Set new message handler. + * + * @param onMessageListener - Listener function, which will be called each time when a new message + * is received from the real-time network. + */ set onMessage(onMessageListener: (messageEvent: Subscription.Message) => void) { this.listener.message = onMessageListener; } + /** + * Set new presence events handler. + * + * @param onPresenceListener - Listener function, which will be called each time when a new + * presence event is received from the real-time network. + */ set onPresence(onPresenceListener: (presenceEvent: Subscription.Presence) => void) { this.listener.presence = onPresenceListener; } + /** + * Set new signal handler. + * + * @param onSignalListener - Listener function, which will be called each time when a new signal + * is received from the real-time network. + */ set onSignal(onSignalListener: (signalEvent: Subscription.Signal) => void) { this.listener.signal = onSignalListener; } + /** + * Set new app context event handler. + * + * @param onObjectsListener - Listener function, which will be called each time when a new + * app context event is received from the real-time network. + */ set onObjects(onObjectsListener: (objectsEvent: Subscription.AppContextObject) => void) { this.listener.objects = onObjectsListener; } + /** + * Set new message reaction event handler. + * + * @param messageActionEventListener - Listener function, which will be called each time when a + * new message reaction event is received from the real-time network. + */ set onMessageAction(messageActionEventListener: (messageActionEvent: Subscription.MessageAction) => void) { this.listener.messageAction = messageActionEventListener; } + /** + * Set new file handler. + * + * @param fileEventListener - Listener function, which will be called each time when a new file + * is received from the real-time network. + */ set onFile(fileEventListener: (fileEvent: Subscription.File) => void) { this.listener.file = fileEventListener; } + /** + * Set events handler. + * + * @param listener - Events listener configuration object, which lets specify handlers for multiple + * types of events. + */ addListener(listener: Listener) { this.eventEmitter.addListener( listener, @@ -58,13 +147,32 @@ export abstract class SubscribeCapable { this.groupNames.filter((cg) => !cg.endsWith('-pnpres')), ); } + + /** + * Remove events handler. + * + * @param listener - Event listener configuration, which should be removed from the list of notified + * listeners. **Important:** Should be the same object which has been passed to the + * {@link addListener}. + */ removeListener(listener: Listener) { this.eventEmitter.removeListener(listener, this.channelNames, this.groupNames); } + /** + * Get list of channels which is used for subscription. + * + * @returns List of channel names. + */ get channels(): string[] { return this.channelNames.slice(0); } + + /** + * Get list of channel groups which is used for subscription. + * + * @returns List of channel group names. + */ get channelGroups(): string[] { return this.groupNames.slice(0); } diff --git a/src/entities/Subscription.ts b/src/entities/Subscription.ts index 2002313e5..2043c4607 100644 --- a/src/entities/Subscription.ts +++ b/src/entities/Subscription.ts @@ -5,14 +5,80 @@ import { SubscribeCapable } from './SubscribeCapable'; import { SubscriptionOptions } from './commonTypes'; import { SubscriptionSet } from './SubscriptionSet'; +/** + * Single-entity subscription object which can be used to receive and handle real-time updates. + */ export class Subscription extends SubscribeCapable { + /** + * List of channel names for subscription loop. + * + * Entity may have few because of subscription configuration options. Presence events observing + * adds additional name to be used along with entity name. + * + * **Note:** Depending on from the entity type, it may provide a list of channels which are used + * to receive real-time updates for it. + * + * @internal + */ protected channelNames: string[] = []; + + /** + * List of channel group names for subscription loop. + * + * Entity may have few because of subscription configuration options. Presence events observing + * adds additional name to be used along with entity name. + * + * **Note:** Depending on from the entity type, it may provide a list of channel groups which is + * sed to receive real-time updates for it. + * + * @internal + */ protected groupNames: string[] = []; + + /** + * Per-entity subscription object configuration. + * + * @internal + */ protected options?: SubscriptionOptions; + + /** + * PubNub instance which will perform subscribe / unsubscribe requests for entity. + * + * @internal + */ protected pubnub: PubNub; + + /** + * Event emitter, which will notify listeners about updates received for entity channels / groups. + * + * @internal + */ protected eventEmitter: EventEmitter; + + /** + * Real-time events listener object associated with entity subscription object. + * + * Listener will be used to notify about updates received from the entity channels / groups. + * + * @internal + */ protected listener: Listener; + /** + * Create entity's subscription object. + * + * @param channels - List of channels which should be used in subscription loop. + * @param channelGroups - List of channel groups which should be used in subscription loop. + * @param subscriptionOptions - Per-entity subscription object configuration. + * @param eventEmitter - Event emitter, which will notify listeners about updates received for + * entity channels / groups. + * @param pubnub - PubNub instance which will perform subscribe / unsubscribe requests for entity. + * + * @returns Ready to use entity's subscription object. + * + * @internal + */ constructor({ channels, channelGroups, @@ -39,6 +105,13 @@ export class Subscription extends SubscribeCapable { this.groupNames.filter((cg) => !cg.endsWith('-pnpres')), ); } + + /** + * Merge entities' subscription objects into subscription set. + * + * @param subscription - Other entity's subscription object to be merged with receiver. + * @return Subscription set which contains both receiver and other entities' subscription objects. + */ addSubscription(subscription: Subscription) { return new SubscriptionSet({ channels: [...this.channelNames, ...subscription.channels], diff --git a/src/entities/SubscriptionSet.ts b/src/entities/SubscriptionSet.ts index 1885d3bef..d1c4d20cf 100644 --- a/src/entities/SubscriptionSet.ts +++ b/src/entities/SubscriptionSet.ts @@ -5,15 +5,96 @@ import { SubscribeCapable } from './SubscribeCapable'; import { SubscriptionOptions } from './commonTypes'; import { Subscription } from './Subscription'; +/** + * Multiple entities subscription set object which can be used to receive and handle real-time + * updates. + * + * Subscription set object represent collection of per-entity subscription objects and allow + * processing them at once for subscription loop and events handling. + */ export class SubscriptionSet extends SubscribeCapable { + /** + * List of channel names for subscription loop. + * + * List of entities' names which can have additional entries depending on from configuration + * options. Presence events observing adds additional name to be used along with entity name. + * + * **Note:** Depending on from the entities' type, they may provide a list of channels which are + * used to receive real-time updates for it. + * + * @internal + */ protected channelNames: string[] = []; + + /** + * List of channel group names for subscription loop. + * + * List of entities' names which can have additional entries depending on from configuration + * options. Presence events observing adds additional name to be used along with entity name. + * + * **Note:** Depending on from the entities' type, they may provide a list of channels which are + * used to receive real-time updates for it. + * + * @internal + */ protected groupNames: string[] = []; + + /** + * Entities' subscription object configuration. + * + * @internal + */ protected options?: SubscriptionOptions; + + /** + * PubNub instance which will perform subscribe / unsubscribe requests for entities. + * + * @internal + */ protected pubnub: PubNub; + + /** + * Event emitter, which will notify listeners about updates received for entities + * channels / groups. + * + * @internal + */ protected eventEmitter: EventEmitter; + + /** + * List of per-entity subscription objects. + * + * @internal + */ protected subscriptionList: Subscription[] = []; + + /** + * Real-time events listener object associated with entities' subscription objects. + * + * Listener will be used to notify about updates received from the entities' channels / groups. + * + * @internal + */ protected listener: Listener; + /** + * Create entities' subscription set object. + * + * Subscription set object represent collection of per-entity subscription objects and allow + * processing them at once for subscription loop and events handling. + * + * @param channels - List of channels which should be used in subscription loop. + * @param channelGroups - List of channel groups which should be used in subscription loop. + * @param subscriptionOptions - Entities' subscription object configuration. + * @param eventEmitter - Event emitter, which will notify listeners about updates received for + * entities' channels / groups. + * @param pubnub - PubNub instance which will perform subscribe / unsubscribe requests for + * entities. + * + * @returns Ready to use entities' subscription set object. + * + * @internal + */ constructor({ channels = [], channelGroups = [], @@ -49,6 +130,14 @@ export class SubscriptionSet extends SubscribeCapable { ); } + /** + * Add additional entity's subscription to the subscription set. + * + * **Important:** Changes will be effective only after {@link SubscribeCapable#subscribe} call or + * next subscription loop. + * + * @param subscription - Other entity's subscription object, which should be added. + */ addSubscription(subscription: Subscription) { this.subscriptionList.push(subscription); this.channelNames = [...this.channelNames, ...subscription.channels]; @@ -56,6 +145,14 @@ export class SubscriptionSet extends SubscribeCapable { this.eventEmitter.addListener(this.listener, subscription.channels, subscription.channelGroups); } + /** + * Remove entity's subscription object from the set. + * + * **Important:** Changes will be effective only after {@link SubscribeCapable#unsubscribe} call or + * next subscription loop. + * + * @param subscription - Other entity's subscription object, which should be removed. + */ removeSubscription(subscription: Subscription) { const channelsToRemove = subscription.channels; const groupsToRemove = subscription.channelGroups; @@ -65,6 +162,14 @@ export class SubscriptionSet extends SubscribeCapable { this.eventEmitter.removeListener(this.listener, channelsToRemove, groupsToRemove); } + /** + * Merge with other subscription set object. + * + * **Important:** Changes will be effective only after {@link SubscribeCapable#subscribe} call or + * next subscription loop. + * + * @param subscriptionSet - Other entities' subscription set, which should be joined. + */ addSubscriptionSet(subscriptionSet: SubscriptionSet) { this.subscriptionList = [...this.subscriptionList, ...subscriptionSet.subscriptions]; this.channelNames = [...this.channelNames, ...subscriptionSet.channels]; @@ -72,6 +177,14 @@ export class SubscriptionSet extends SubscribeCapable { this.eventEmitter.addListener(this.listener, subscriptionSet.channels, subscriptionSet.channelGroups); } + /** + * Subtract other subscription set object. + * + * **Important:** Changes will be effective only after {@link SubscribeCapable#unsubscribe} call or + * next subscription loop. + * + * @param subscriptionSet - Other entities' subscription set, which should be subtracted. + */ removeSubscriptionSet(subscriptionSet: SubscriptionSet) { const channelsToRemove = subscriptionSet.channels; const groupsToRemove = subscriptionSet.channelGroups; @@ -81,6 +194,11 @@ export class SubscriptionSet extends SubscribeCapable { this.eventEmitter.removeListener(this.listener, channelsToRemove, groupsToRemove); } + /** + * Get list of entities' subscription objects registered in subscription set. + * + * @returns Entities' subscription objects list. + */ get subscriptions(): Subscription[] { return this.subscriptionList.slice(0); } diff --git a/src/entities/UserMetadata.ts b/src/entities/UserMetadata.ts index 256950823..1e7a3b161 100644 --- a/src/entities/UserMetadata.ts +++ b/src/entities/UserMetadata.ts @@ -3,13 +3,60 @@ import EventEmitter from '../core/components/eventEmitter'; import { SubscriptionOptions } from './commonTypes'; import { Subscription } from './Subscription'; +/** + * First-class objects which provides access to the user app context object-specific APIs. + */ export class UserMetadata { - constructor( - private readonly id: string, - private readonly eventEmitter: EventEmitter, - private readonly pubnub: PubNub, - ) {} + /** + * Event emitter, which will notify listeners about updates received on user app context object + * subscription. + * + * @internal + */ + private readonly eventEmitter: EventEmitter; + /** + * PubNub instance which will use this entity. + * + * @internal + */ + private readonly pubnub: PubNub; + + /** + * User app context object identifier. + * + * @internal + */ + private readonly id: string; + + /** + * Create user app context object entity. + * + * @param id - User app context object identifier which will be used with subscription loop. + * @param eventEmitter - Event emitter, which will notify listeners about updates received on + * channel's subscription. + * @param pubnub - PubNub instance which will use this entity. + * + * @returns Ready to use user app context object entity. + * + * @internal + */ + constructor(id: string, eventEmitter: EventEmitter, pubnub: PubNub) { + this.eventEmitter = eventEmitter; + this.pubnub = pubnub; + this.id = id; + } + + /** + * Create user's app context subscription object for real-time updates. + * + * Create subscription object which can be used to subscribe to the real-time updates sent to the specific user + * app context object. + * + * @param [subscriptionOptions] - User's app context subscription object behavior customization options. + * + * @returns Configured and ready to use user's app context subscription object. + */ subscription(subscriptionOptions?: SubscriptionOptions) { if (process.env.SUBSCRIBE_EVENT_ENGINE_MODULE !== 'disabled') { return new Subscription({ diff --git a/src/entities/commonTypes.ts b/src/entities/commonTypes.ts index fe7de30b4..33fbf29de 100644 --- a/src/entities/commonTypes.ts +++ b/src/entities/commonTypes.ts @@ -1,3 +1,9 @@ +/** + * PubNub entity subscription configuration options. + */ export type SubscriptionOptions = { + /** + * Whether presence events for entity should be received or not. + */ receivePresenceEvents?: boolean; }; diff --git a/src/errors/pubnub-api-error.ts b/src/errors/pubnub-api-error.ts index 793deb1bb..3c5c5572b 100644 --- a/src/errors/pubnub-api-error.ts +++ b/src/errors/pubnub-api-error.ts @@ -1,5 +1,7 @@ /** * REST API endpoint use error module. + * + * @internal */ import { TransportResponse } from '../core/types/transport-response'; @@ -10,6 +12,8 @@ import { PubNubError } from './pubnub-error'; /** * PubNub REST API call error. + * + * @internal */ export class PubNubAPIError extends Error { /** diff --git a/src/errors/pubnub-error.ts b/src/errors/pubnub-error.ts index 435352aa8..b3fee4d9b 100644 --- a/src/errors/pubnub-error.ts +++ b/src/errors/pubnub-error.ts @@ -1,7 +1,26 @@ +/** + * PubNub operation error module. + */ + import { Status } from '../core/types/api'; import StatusCategory from '../core/constants/categories'; +/** + * PubNub operation error. + * + * When an operation can't be performed or there is an error from the server, this object will be returned. + */ export class PubNubError extends Error { + /** + * Create PubNub operation error. + * + * @param message - Message with details about why operation failed. + * @param [status] - Additional information about performed operation. + * + * @returns Configured and ready to use PubNub operation error. + * + * @internal + */ constructor( message: string, public status?: Status, @@ -14,6 +33,15 @@ export class PubNubError extends Error { } } +/** + * Create error status object. + * + * @param errorPayload - Additional information which should be attached to the error status object. + * + * @returns Error status object. + * + * @internal + */ function createError(errorPayload: { message: string; statusCode?: number }): Status { errorPayload.statusCode ??= 0; @@ -25,6 +53,16 @@ function createError(errorPayload: { message: string; statusCode?: number }): St }; } +/** + * Create operation arguments validation error status object. + * + * @param message - Information about failed validation requirement. + * @param [statusCode] - Operation HTTP status code. + * + * @returns Operation validation error status object. + * + * @internal + */ export function createValidationError(message: string, statusCode?: number) { return createError({ message, ...(statusCode !== undefined ? { statusCode } : {}) }); } diff --git a/src/event-engine/core/change.ts b/src/event-engine/core/change.ts index dbacb32f6..7199af71e 100644 --- a/src/event-engine/core/change.ts +++ b/src/event-engine/core/change.ts @@ -1,8 +1,15 @@ +/** + * Event Engine Core state change module. + * + * @internal + */ + /* eslint-disable @typescript-eslint/no-explicit-any */ import { State } from './state'; import { EventTypeFromMap, GenericMap, InvocationTypeFromMap } from './types'; +/** @internal */ export type EngineStarted = { type: 'engineStarted'; @@ -10,12 +17,14 @@ export type EngineStarted context: any; }; +/** @internal */ export type EventReceived = { type: 'eventReceived'; event: EventTypeFromMap; }; +/** @internal */ export type TransitionDone = { type: 'transitionDone'; event: EventTypeFromMap; @@ -27,11 +36,13 @@ export type TransitionDone = { type: 'invocationDispatched'; invocation: InvocationTypeFromMap; }; +/** @internal */ export type Change = | TransitionDone | InvocationDispatched diff --git a/src/event-engine/core/dispatcher.ts b/src/event-engine/core/dispatcher.ts index 598295d83..637a7d67f 100644 --- a/src/event-engine/core/dispatcher.ts +++ b/src/event-engine/core/dispatcher.ts @@ -1,13 +1,31 @@ +/** + * Event Engine Core Effects dispatcher module. + * + * @internal + */ + /* eslint-disable @typescript-eslint/no-explicit-any */ import { Handler } from './handler'; import { GenericInvocation, GenericMap, InvocationTypeFromMap } from './types'; +/** + * Effects invocation processing handler function definition. + * + * @internal + */ type HandlerCreator = ( payload: Payload, dependencies: Dependencies, ) => Handler; +/** + * Event Engine effects dispatcher. + * + * Dispatcher responsible for invocation enqueue and dequeue for processing. + * + * @internal + */ export class Dispatcher< Effects extends GenericMap, Dependencies, diff --git a/src/event-engine/core/engine.ts b/src/event-engine/core/engine.ts index a2cf11acd..51fbd611d 100644 --- a/src/event-engine/core/engine.ts +++ b/src/event-engine/core/engine.ts @@ -1,3 +1,9 @@ +/** + * Event Engine Core module. + * + * @internal + */ + /* eslint-disable @typescript-eslint/no-explicit-any */ import { Subject } from '../../core/components/subject'; @@ -6,6 +12,11 @@ import { Change } from './change'; import { State } from './state'; import { GenericMap, Event } from './types'; +/** + * Generic event engine. + * + * @internal + */ export class Engine extends Subject> { describe(label: string): State { return new State(label); diff --git a/src/event-engine/core/handler.ts b/src/event-engine/core/handler.ts index 338a922f9..aa93e16da 100644 --- a/src/event-engine/core/handler.ts +++ b/src/event-engine/core/handler.ts @@ -1,5 +1,18 @@ +/** + * Event Engine Core Effects handler module. + * + * @internal + */ + import { AbortSignal } from '../../core/components/abort_signal'; +/** + * Synchronous (short-term) effect invocation handler. + * + * Handler manages effect execution on behalf of effect dispatcher. + * + * @internal + */ export abstract class Handler { constructor( protected payload: Payload, @@ -10,12 +23,24 @@ export abstract class Handler { abstract cancel(): void; } +/** + * Asynchronous effect execution function definition. + * + * @internal + */ type AsyncHandlerFunction = ( payload: Payload, abortSignal: AbortSignal, dependencies: Dependencies, ) => Promise; +/** + * Asynchronous (long-running) effect invocation handler. + * + * Handler manages effect execution on behalf of effect dispatcher. + * + * @internal + */ class AsyncHandler extends Handler { abortSignal = new AbortSignal(); @@ -39,6 +64,13 @@ class AsyncHandler extends Handler } } +/** + * Asynchronous effect invocation handler constructor. + * + * @param handlerFunction - Function which performs asynchronous action and should be called on `start`. + * + * @internal + */ export const asyncHandler = (handlerFunction: AsyncHandlerFunction) => (payload: Payload, dependencies: Dependencies) => diff --git a/src/event-engine/core/index.ts b/src/event-engine/core/index.ts index 3607d8892..75af8ca4f 100644 --- a/src/event-engine/core/index.ts +++ b/src/event-engine/core/index.ts @@ -1,5 +1,15 @@ +/** + * Event Engine module. + * + * @internal + */ + +/** @internal */ export { Engine } from './engine'; +/** @internal */ export { Dispatcher } from './dispatcher'; +/** @internal */ export { MapOf, createEvent, createEffect, createManagedEffect } from './types'; +/** @internal */ export { asyncHandler } from './handler'; diff --git a/src/event-engine/core/retryPolicy.ts b/src/event-engine/core/retryPolicy.ts index ebc515ad9..f47606f80 100644 --- a/src/event-engine/core/retryPolicy.ts +++ b/src/event-engine/core/retryPolicy.ts @@ -1,5 +1,11 @@ +/** + * Failed requests retry module. + */ import { PubNubError } from '../../errors/pubnub-error'; +/** + * Failed request retry policy. + */ export class RetryPolicy { static LinearRetryPolicy( configuration: LinearRetryPolicyConfiguration, @@ -79,7 +85,7 @@ export type RequestRetryPolicy = { * Check whether failed request can be retried. * * @param reason - Request processing failure reason. - * @param attempt - Number of consequent failure. + * @param attempt - Number of sequential failure. * * @returns `true` if another request retry attempt can be done. */ @@ -88,7 +94,7 @@ export type RequestRetryPolicy = { /** * Computed delay for next request retry attempt. * - * @param attempt - Number of consequent failure. + * @param attempt - Number of sequential failure. * @param reason - Request processing failure reason. * * @returns Delay before next request retry attempt in milliseconds. @@ -99,7 +105,7 @@ export type RequestRetryPolicy = { * Identify reason why another retry attempt can't be made. * * @param reason - Request processing failure reason. - * @param attempt - Number of consequent failure. + * @param attempt - Number of sequential failure. * * @returns Give up reason. */ diff --git a/src/event-engine/core/state.ts b/src/event-engine/core/state.ts index 5f32b5300..999f73e3c 100644 --- a/src/event-engine/core/state.ts +++ b/src/event-engine/core/state.ts @@ -1,7 +1,14 @@ +/** + * Event Engine Core state module. + * + * @internal + */ + /* eslint-disable @typescript-eslint/no-explicit-any */ import { Event, EventOfType, GenericInvocation, GenericMap, InvocationTypeFromMap } from './types'; +/** @internal */ export type TransitionFunction< Context, Events extends GenericMap, @@ -11,12 +18,20 @@ export type TransitionFunction< (context: Context, event: EventType): Transition | void; }; +/** @internal */ export type Transition = [ State, Context, InvocationTypeFromMap[], ]; +/** + * Event engine current state object. + * + * State contains current context and list of invocations which should be performed by the Event Engine. + * + * @internal + */ export class State { private transitionMap: Map> = new Map(); diff --git a/src/event-engine/core/types.ts b/src/event-engine/core/types.ts index a10f31336..a98cc1d83 100644 --- a/src/event-engine/core/types.ts +++ b/src/event-engine/core/types.ts @@ -1,30 +1,51 @@ +/** + * Event Engine Core types module. + * + * @internal + */ + /* eslint-disable @typescript-eslint/no-explicit-any */ +/** @internal */ export type Event = { type: T; payload: P }; +/** @internal */ export type Invocation = { type: T; payload: P; managed: boolean }; +/** @internal */ export type GenericEvent = Event; +/** @internal */ export type GenericInvocation = Invocation; +/** @internal */ export type GenericMap = Record; +/** @internal */ export type EventTypeFromMap = { [T in keyof Map & string]: Event; }[keyof Map & string]; +/** @internal */ export type InvocationTypeFromMap = { [T in keyof Map & string]: Invocation; }[keyof Map & string]; +/** @internal */ export type EventOfType = Event; +/** @internal */ export type InvocationOfType = Invocation; +/** @internal */ type EventCreator = { (...args: S): Event; type: K; }; +/** + * Create and configure event engine event. + * + * @internal + */ export function createEvent( type: K, fn: (...args: S) => P, @@ -41,16 +62,19 @@ export function createEvent { type: string | number | symbol; payload: any }> = { [K in ReturnType['type']]: (ReturnType & { type: K })['payload']; }; +/** @internal */ type EffectCreator = { (...args: S): Invocation; type: K; }; +/** @internal */ type ManagedEffectCreator = { (...args: S): Invocation; @@ -58,6 +82,11 @@ type ManagedEffectCreator = { cancel: Invocation<'CANCEL', K>; }; +/** + * Create and configure short-term effect invocation. + * + * @internal + */ export function createEffect( type: K, fn: (...args: S) => P, @@ -71,6 +100,11 @@ export function createEffect( type: K, fn: (...args: S) => P, diff --git a/src/event-engine/dispatcher.ts b/src/event-engine/dispatcher.ts index 5d9c7c064..989bb8ce1 100644 --- a/src/event-engine/dispatcher.ts +++ b/src/event-engine/dispatcher.ts @@ -1,3 +1,9 @@ +/** + * Subscribe Event Engine effects dispatcher. + * + * @internal + */ + import { PrivateClientConfiguration } from '../core/interfaces/configuration'; import * as Subscription from '../core/types/api/subscription'; import { PubNubError } from '../errors/pubnub-error'; @@ -7,6 +13,11 @@ import * as events from './events'; import { Payload, StatusEvent } from '../core/types/api'; import StatusCategory from '../core/constants/categories'; +/** + * Subscription Event Engine dependencies set (configuration). + * + * @internal + */ export type Dependencies = { handshake: (parameters: Subscription.CancelableSubscribeParameters) => Promise; receiveMessages: ( @@ -24,6 +35,13 @@ export type Dependencies = { emitStatus: (status: StatusEvent) => void; }; +/** + * Subscribe Event Engine dispatcher. + * + * Dispatcher responsible for subscription events handling and corresponding effects execution. + * + * @internal + */ export class EventEngineDispatcher extends Dispatcher { constructor(engine: Engine, dependencies: Dependencies) { super(dependencies); diff --git a/src/event-engine/effects.ts b/src/event-engine/effects.ts index 80dcc17f7..8aab8a20a 100644 --- a/src/event-engine/effects.ts +++ b/src/event-engine/effects.ts @@ -1,36 +1,90 @@ +/** + * Subscribe Event Engine effects module. + * + * @internal + */ + import { createEffect, createManagedEffect, MapOf } from './core'; import { HandshakeReconnectingStateContext } from './states/handshake_reconnecting'; import { ReceiveReconnectingStateContext } from './states/receive_reconnecting'; import * as Subscription from '../core/types/api/subscription'; import { StatusEvent } from '../core/types/api'; +/** + * Initial subscription effect. + * + * Performs subscribe REST API call with `tt=0`. + * + * @internal + */ export const handshake = createManagedEffect('HANDSHAKE', (channels: string[], groups: string[]) => ({ channels, groups, })); +/** + * Real-time updates receive effect. + * + * Performs sequential subscribe REST API call with `tt` set to the value received from the previous subscribe + * REST API call. + * + * @internal + */ export const receiveMessages = createManagedEffect( 'RECEIVE_MESSAGES', (channels: string[], groups: string[], cursor: Subscription.SubscriptionCursor) => ({ channels, groups, cursor }), ); +/** + * Emit real-time updates effect. + * + * Notify event listeners about updates for which listener handlers has been provided. + * + * @internal + */ export const emitMessages = createEffect( 'EMIT_MESSAGES', (events: Subscription.SubscriptionResponse['messages']) => events, ); +/** + * Emit subscription status change effect. + * + * Notify status change event listeners. + * + * @internal + */ export const emitStatus = createEffect('EMIT_STATUS', (status: StatusEvent) => status); +/** + * Real-time updates receive restore effect. + * + * Performs subscribe REST API call with `tt` which has been received before disconnection or error. + * + * @internal + */ export const receiveReconnect = createManagedEffect( 'RECEIVE_RECONNECT', (context: ReceiveReconnectingStateContext) => context, ); +/** + * Initial subscription restore effect. + * + * Performs subscribe REST API call with `tt=0` after error. + * + * @internal + */ export const handshakeReconnect = createManagedEffect( 'HANDSHAKE_RECONNECT', (context: HandshakeReconnectingStateContext) => context, ); +/** + * Subscribe Event Engine effects. + * + * @internal + */ export type Effects = MapOf< | typeof receiveMessages | typeof handshake diff --git a/src/event-engine/events.ts b/src/event-engine/events.ts index 70fa68b3b..afd2b7e56 100644 --- a/src/event-engine/events.ts +++ b/src/event-engine/events.ts @@ -1,12 +1,32 @@ +/** + * Subscribe Event Engine events module. + * + * @internal + */ + import * as Subscription from '../core/types/api/subscription'; import { PubNubError } from '../errors/pubnub-error'; import { createEvent, MapOf } from './core'; +/** + * Subscription list change event. + * + * Event is sent each time when user would like to change list of active channels / groups. + * + * @internal + */ export const subscriptionChange = createEvent('SUBSCRIPTION_CHANGED', (channels: string[], groups: string[]) => ({ channels, groups, })); +/** + * Subscription loop restore. + * + * Event is sent when user would like to try catch up on missed updates by providing specific timetoken. + * + * @internal + */ export const restore = createEvent( 'SUBSCRIPTION_RESTORED', (channels: string[], groups: string[], timetoken: string | number, region?: number) => ({ @@ -19,18 +39,61 @@ export const restore = createEvent( }), ); +/** + * Initial subscription handshake success event. + * + * Event is sent by corresponding effect handler if REST API call was successful. + * + * @internal + */ export const handshakeSuccess = createEvent('HANDSHAKE_SUCCESS', (cursor: Subscription.SubscriptionCursor) => cursor); + +/** + * Initial subscription handshake did fail event. + * + * Event is sent by corresponding effect handler if REST API call failed. + * + * @internal + */ export const handshakeFailure = createEvent('HANDSHAKE_FAILURE', (error: PubNubError) => error); +/** + * Initial subscription handshake reconnect success event. + * + * Event is sent by corresponding effect handler if REST API call was successful after transition to the failed state. + * + * @internal + */ export const handshakeReconnectSuccess = createEvent( 'HANDSHAKE_RECONNECT_SUCCESS', (cursor: Subscription.SubscriptionCursor) => ({ cursor, }), ); +/** + * Initial subscription handshake reconnect did fail event. + * + * Event is sent by corresponding effect handler if REST API call did fail while tried to enter to the success state. + * + * @internal + */ export const handshakeReconnectFailure = createEvent('HANDSHAKE_RECONNECT_FAILURE', (error: PubNubError) => error); +/** + * Initial subscription handshake impossible event. + * + * Event is sent by corresponding effect handler if REST API call exhausted all retry attempt and won't try again. + * + * @internal + */ export const handshakeReconnectGiveup = createEvent('HANDSHAKE_RECONNECT_GIVEUP', (error: PubNubError) => error); +/** + * Subscription successfully received real-time updates event. + * + * Event is sent by corresponding effect handler if REST API call was successful. + * + * @internal + */ export const receiveSuccess = createEvent( 'RECEIVE_SUCCESS', (cursor: Subscription.SubscriptionCursor, events: Subscription.SubscriptionResponse['messages']) => ({ @@ -38,8 +101,22 @@ export const receiveSuccess = createEvent( events, }), ); +/** + * Subscription did fail to receive real-time updates event. + * + * Event is sent by corresponding effect handler if REST API call failed. + * + * @internal + */ export const receiveFailure = createEvent('RECEIVE_FAILURE', (error: PubNubError) => error); +/** + * Subscription successfully received real-time updates on reconnection attempt event. + * + * Event is sent by corresponding effect handler if REST API call was successful after transition to the failed state. + * + * @internal + */ export const receiveReconnectSuccess = createEvent( 'RECEIVE_RECONNECT_SUCCESS', (cursor: Subscription.SubscriptionCursor, events: Subscription.SubscriptionResponse['messages']) => ({ @@ -47,18 +124,59 @@ export const receiveReconnectSuccess = createEvent( events, }), ); +/** + * Subscription did fail to receive real-time updates on reconnection attempt event. + * + * Event is sent by corresponding effect handler if REST API call did fail while tried to enter to the success state. + * + * @internal + */ export const receiveReconnectFailure = createEvent('RECEIVE_RECONNECT_FAILURE', (error: PubNubError) => error); +/** + * Subscription real-time updates received impossible event. + * + * Event is sent by corresponding effect handler if REST API call exhausted all retry attempt and won't try again. + * + * @internal + */ export const receiveReconnectGiveup = createEvent('RECEIVING_RECONNECT_GIVEUP', (error: PubNubError) => error); +/** + * Client disconnect event. + * + * Event is sent when user wants to temporarily stop real-time updates receive. + * + * @internal + */ export const disconnect = createEvent('DISCONNECT', () => ({})); +/** + * Client reconnect event. + * + * Event is sent when user wants to restore real-time updates receive. + * + * @internal + */ export const reconnect = createEvent('RECONNECT', (timetoken?: string, region?: number) => ({ cursor: { timetoken: timetoken ?? '', region: region ?? 0, }, })); + +/** + * Completely stop real-time updates receive event. + * + * Event is sent when user doesn't want to receive any real-time updates anymore. + * + * @internal + */ export const unsubscribeAll = createEvent('UNSUBSCRIBE_ALL', () => ({})); +/** + * Subscribe Event Engine events. + * + * @internal + */ export type Events = MapOf< | typeof subscriptionChange | typeof restore diff --git a/src/event-engine/index.ts b/src/event-engine/index.ts index 983a659c5..0dc1dedbe 100644 --- a/src/event-engine/index.ts +++ b/src/event-engine/index.ts @@ -1,3 +1,9 @@ +/** + * Subscribe Event Engine module. + * + * @internal + */ + import { Dispatcher, Engine } from './core'; import { Dependencies, EventEngineDispatcher } from './dispatcher'; import * as effects from './effects'; @@ -6,6 +12,11 @@ import { UnsubscribedState } from './states/unsubscribed'; import * as utils from '../core/utils'; +/** + * Subscribe Event Engine Core. + * + * @internal + */ export class EventEngine { private engine: Engine = new Engine(); private dispatcher: Dispatcher; diff --git a/src/event-engine/presence/dispatcher.ts b/src/event-engine/presence/dispatcher.ts index f2dfa0571..e6d12ba63 100644 --- a/src/event-engine/presence/dispatcher.ts +++ b/src/event-engine/presence/dispatcher.ts @@ -1,3 +1,9 @@ +/** + * Presence Event Engine effects dispatcher. + * + * @internal + */ + import { PrivateClientConfiguration } from '../../core/interfaces/configuration'; import { asyncHandler, Dispatcher, Engine } from '../core'; import PNOperations from '../../core/constants/operations'; @@ -8,6 +14,11 @@ import * as effects from './effects'; import * as events from './events'; import StatusCategory from '../../core/constants/categories'; +/** + * Presence Event Engine dependencies set (configuration). + * + * @internal + */ export type Dependencies = { heartbeat: ( parameters: Presence.PresenceHeartbeatParameters, @@ -24,6 +35,13 @@ export type Dependencies = { emitStatus: (status: any) => void; }; +/** + * Presence Event Engine dispatcher. + * + * Dispatcher responsible for presence events handling and corresponding effects execution. + * + * @internal + */ export class PresenceEventEngineDispatcher extends Dispatcher { constructor(engine: Engine, dependencies: Dependencies) { super(dependencies); diff --git a/src/event-engine/presence/effects.ts b/src/event-engine/presence/effects.ts index 0eddde4d5..1bcfa5c87 100644 --- a/src/event-engine/presence/effects.ts +++ b/src/event-engine/presence/effects.ts @@ -1,27 +1,73 @@ +/** + * Presence Event Engine effects module. + * + * @internal + */ + import { createEffect, createManagedEffect, MapOf } from '../core'; import { HeartbeatReconnectingStateContext } from './states/heartbeat_reconnecting'; import { Status } from '../../core/types/api'; +/** + * Presence heartbeat effect. + * + * Performs presence heartbeat REST API call. + * + * @internal + */ export const heartbeat = createEffect('HEARTBEAT', (channels: string[], groups: string[]) => ({ channels, groups, })); +/** + * Presence leave effect. + * + * Performs presence leave REST API call. + * + * @internal + */ export const leave = createEffect('LEAVE', (channels: string[], groups: string[]) => ({ channels, groups, })); +/** + * Emit presence heartbeat REST API call result status effect. + * + * Notify status change event listeners. + * + * @internal + */ /* eslint-disable @typescript-eslint/no-explicit-any */ export const emitStatus = createEffect('EMIT_STATUS', (status: any) => status); +/** + * Heartbeat delay effect. + * + * Delay of configured length (heartbeat interval) before another heartbeat REST API call will be done. + * + * @internal + */ export const wait = createManagedEffect('WAIT', () => ({})); +/** + * Delayed heartbeat effect. + * + * Similar to the {@link wait} effect but used in case if previous heartbeat call did fail. + * + * @internal + */ export const delayedHeartbeat = createManagedEffect( 'DELAYED_HEARTBEAT', (context: HeartbeatReconnectingStateContext) => context, ); +/** + * Presence Event Engine effects. + * + * @internal + */ export type Effects = MapOf< typeof heartbeat | typeof leave | typeof emitStatus | typeof wait | typeof delayedHeartbeat >; diff --git a/src/event-engine/presence/events.ts b/src/event-engine/presence/events.ts index 9607a44d7..0b3b67a12 100644 --- a/src/event-engine/presence/events.ts +++ b/src/event-engine/presence/events.ts @@ -1,29 +1,108 @@ +/** + * Presence Event Engine events module. + * + * @internal + */ + import { PubNubError } from '../../errors/pubnub-error'; import { createEvent, MapOf } from '../core'; +/** + * Reconnect event. + * + * Event is sent each time when user restores real-time updates processing and notifies other present subscribers + * about joining back. + * + * @internal + */ export const reconnect = createEvent('RECONNECT', () => ({})); +/** + * Disconnect event. + * + * Event is sent when user wants to temporarily stop real-time updates processing and notifies other present + * subscribers about leaving. + * + * @internal + */ export const disconnect = createEvent('DISCONNECT', () => ({})); +/** + * Channel / group join event. + * + * Event is sent when user adds new channels / groups to the active channels / groups list and notifies other present + * subscribers about joining. + * + * @internal + */ export const joined = createEvent('JOINED', (channels: string[], groups: string[]) => ({ channels, groups, })); +/** + * Channel / group leave event. + * + * Event is sent when user removes channels / groups from the active channels / groups list and notifies other present + * subscribers about leaving. + * + * @internal + */ export const left = createEvent('LEFT', (channels: string[], groups: string[]) => ({ channels, groups, })); +/** + * Leave all event. + * + * Event is sent when user doesn't want to receive any real-time updates anymore and notifies other + * subscribers on previously active channels / groups about leaving. + * + * @internal + */ export const leftAll = createEvent('LEFT_ALL', () => ({})); +/** + * Presence heartbeat success event. + * + * Event is sent by corresponding effect handler if REST API call was successful. + * + * @internal + */ export const heartbeatSuccess = createEvent('HEARTBEAT_SUCCESS', (statusCode: number) => ({ statusCode })); +/** + * Presence heartbeat did fail event. + * + * Event is sent by corresponding effect handler if REST API call failed. + * + * @internal + */ export const heartbeatFailure = createEvent('HEARTBEAT_FAILURE', (error: PubNubError) => error); +/** + * Presence heartbeat impossible event. + * + * Event is sent by corresponding effect handler if REST API call exhausted all retry attempt and won't try again. + * + * @internal + */ export const heartbeatGiveup = createEvent('HEARTBEAT_GIVEUP', () => ({})); +/** + * Delayed presence heartbeat event. + * + * Event is sent by corresponding effect handler when delay timer between heartbeat calls fired. + * + * @internal + */ export const timesUp = createEvent('TIMES_UP', () => ({})); +/** + * Presence Event Engine events. + * + * @internal + */ export type Events = MapOf< | typeof reconnect | typeof disconnect diff --git a/src/event-engine/presence/presence.ts b/src/event-engine/presence/presence.ts index 768fbed1e..408a2f329 100644 --- a/src/event-engine/presence/presence.ts +++ b/src/event-engine/presence/presence.ts @@ -1,3 +1,9 @@ +/** + * Presence Event Engine module. + * + * @internal + */ + import { Dispatcher, Engine } from '../core'; import * as events from './events'; import * as effects from './effects'; @@ -5,6 +11,11 @@ import { Dependencies, PresenceEventEngineDispatcher } from './dispatcher'; import { HeartbeatInactiveState } from './states/heartbeat_inactive'; +/** + * Presence Event Engine Core. + * + * @internal + */ export class PresenceEventEngine { private engine: Engine = new Engine(); private dispatcher: Dispatcher; diff --git a/src/event-engine/presence/states/heartbeat_cooldown.ts b/src/event-engine/presence/states/heartbeat_cooldown.ts index 21e0563f3..97faebd7e 100644 --- a/src/event-engine/presence/states/heartbeat_cooldown.ts +++ b/src/event-engine/presence/states/heartbeat_cooldown.ts @@ -1,3 +1,9 @@ +/** + * Waiting next heartbeat state module. + * + * @internal + */ + import { State } from '../../core/state'; import { Events, disconnect, joined, left, leftAll, timesUp } from '../events'; import { Effects, leave, wait } from '../effects'; @@ -5,11 +11,23 @@ import { HeartbeatingState } from './heartbeating'; import { HeartbeatStoppedState } from './heartbeat_stopped'; import { HeartbeatInactiveState } from './heartbeat_inactive'; +/** + * Context which represent current Presence Event Engine data state. + * + * @internal + */ export type HeartbeatCooldownStateContext = { channels: string[]; groups: string[]; }; +/** + * Waiting next heartbeat state. + * + * State in which Presence Event Engine is waiting when delay will run out and next heartbeat call should be done. + * + * @internal + */ export const HeartbeatCooldownState = new State('HEARTBEAT_COOLDOWN'); HeartbeatCooldownState.onEnter(() => wait()); diff --git a/src/event-engine/presence/states/heartbeat_failed.ts b/src/event-engine/presence/states/heartbeat_failed.ts index 14fadf591..b82042d6d 100644 --- a/src/event-engine/presence/states/heartbeat_failed.ts +++ b/src/event-engine/presence/states/heartbeat_failed.ts @@ -1,3 +1,9 @@ +/** + * Failed to heartbeat state module. + * + * @internal + */ + import { State } from '../../core/state'; import { Events, disconnect, heartbeatFailure, heartbeatSuccess, joined, left, leftAll, reconnect } from '../events'; import { Effects, heartbeat, leave } from '../effects'; @@ -5,11 +11,24 @@ import { HeartbeatingState } from './heartbeating'; import { HeartbeatStoppedState } from './heartbeat_stopped'; import { HeartbeatInactiveState } from './heartbeat_inactive'; +/** + * Context which represent current Presence Event Engine data state. + * + * @internal + */ export type HeartbeatFailedStateContext = { channels: string[]; groups: string[]; }; +/** + * Failed to heartbeat state. + * + * State in which Subscription Event Engine waits for user to try to reconnect after all retry attempts has been + * exhausted. + * + * @internal + */ export const HeartbeatFailedState = new State('HEARTBEAT_FAILED'); HeartbeatFailedState.on(joined.type, (context, event) => diff --git a/src/event-engine/presence/states/heartbeat_inactive.ts b/src/event-engine/presence/states/heartbeat_inactive.ts index a095a3215..397e87e3b 100644 --- a/src/event-engine/presence/states/heartbeat_inactive.ts +++ b/src/event-engine/presence/states/heartbeat_inactive.ts @@ -1,8 +1,21 @@ +/** + * Inactive heratbeating state module. + * + * @internal + */ + import { State } from '../../core/state'; import { Effects } from '../effects'; import { Events, joined } from '../events'; import { HeartbeatingState } from './heartbeating'; +/** + * Inactive heratbeating state + * + * State in which Presence Event Engine doesn't process any heartbeat requests (initial state). + * + * @internal + */ export const HeartbeatInactiveState = new State('HEARTBEAT_INACTIVE'); HeartbeatInactiveState.on(joined.type, (_, event) => diff --git a/src/event-engine/presence/states/heartbeat_reconnecting.ts b/src/event-engine/presence/states/heartbeat_reconnecting.ts index a665004ab..26f3e84e5 100644 --- a/src/event-engine/presence/states/heartbeat_reconnecting.ts +++ b/src/event-engine/presence/states/heartbeat_reconnecting.ts @@ -1,3 +1,9 @@ +/** + * Retry heartbeat state module. + * + * @internal + */ + import { PubNubError } from '../../../errors/pubnub-error'; import { State } from '../../core/state'; import { @@ -17,6 +23,11 @@ import { HeartbeatCooldownState } from './heartbeat_cooldown'; import { HeartbeatInactiveState } from './heartbeat_inactive'; import { HeartbeatFailedState } from './heartbeat_failed'; +/** + * Context which represent current Subscription Event Engine data state. + * + * @internal + */ export type HeartbeatReconnectingStateContext = { channels: string[]; groups: string[]; @@ -25,6 +36,13 @@ export type HeartbeatReconnectingStateContext = { reason: PubNubError; }; +/** + * Retry heartbeat state. + * + * State in which Presence Event Engine tries to recover after error which happened before. + * + * @internal + */ export const HearbeatReconnectingState = new State( 'HEARBEAT_RECONNECTING', ); diff --git a/src/event-engine/presence/states/heartbeat_stopped.ts b/src/event-engine/presence/states/heartbeat_stopped.ts index ea8e85df0..3891f49a6 100644 --- a/src/event-engine/presence/states/heartbeat_stopped.ts +++ b/src/event-engine/presence/states/heartbeat_stopped.ts @@ -1,14 +1,33 @@ +/** + * Heartbeat stopped state module. + * + * @internal + */ + import { State } from '../../core/state'; import { Effects } from '../effects'; import { Events, joined, left, reconnect, leftAll } from '../events'; import { HeartbeatInactiveState } from './heartbeat_inactive'; import { HeartbeatingState } from './heartbeating'; +/** + * Context which represent current Presence Event Engine data state. + * + * @internal + */ export type HeartbeatStoppedStateContext = { channels: string[]; groups: string[]; }; +/** + * Heartbeat stopped state. + * + * State in which Presence Event Engine still has information about active channels / groups, but doesn't wait for + * delayed heartbeat request sending. + * + * @internal + */ export const HeartbeatStoppedState = new State('HEARTBEAT_STOPPED'); HeartbeatStoppedState.on(joined.type, (context, event) => diff --git a/src/event-engine/presence/states/heartbeating.ts b/src/event-engine/presence/states/heartbeating.ts index 1b45b9796..f2e4a1c6b 100644 --- a/src/event-engine/presence/states/heartbeating.ts +++ b/src/event-engine/presence/states/heartbeating.ts @@ -1,3 +1,9 @@ +/** + * Heartbeating state module. + * + * @internal + */ + import { State } from '../../core/state'; import { Events, disconnect, heartbeatFailure, heartbeatSuccess, joined, left, leftAll } from '../events'; import { Effects, emitStatus, heartbeat, leave } from '../effects'; @@ -6,11 +12,23 @@ import { HearbeatReconnectingState } from './heartbeat_reconnecting'; import { HeartbeatStoppedState } from './heartbeat_stopped'; import { HeartbeatInactiveState } from './heartbeat_inactive'; +/** + * Context which represent current Presence Event Engine data state. + * + * @internal + */ export type HeartbeatingStateContext = { channels: string[]; groups: string[]; }; +/** + * Heartbeating state module. + * + * State in which Presence Event Engine send heartbeat REST API call. + * + * @internal + */ export const HeartbeatingState = new State('HEARTBEATING'); HeartbeatingState.onEnter((context) => heartbeat(context.channels, context.groups)); diff --git a/src/event-engine/states/handshake_failed.ts b/src/event-engine/states/handshake_failed.ts index 7b86933a4..5ca187877 100644 --- a/src/event-engine/states/handshake_failed.ts +++ b/src/event-engine/states/handshake_failed.ts @@ -1,3 +1,9 @@ +/** + * Failed initial subscription handshake (disconnected) state. + * + * @internal + */ + import { State } from '../core/state'; import { Effects } from '../effects'; import { Events, reconnect, restore, subscriptionChange, unsubscribeAll } from '../events'; @@ -6,6 +12,11 @@ import { HandshakingState } from './handshaking'; import { UnsubscribedState } from './unsubscribed'; import * as Subscription from '../../core/types/api/subscription'; +/** + * Context which represent current Subscription Event Engine data state. + * + * @internal + */ export type HandshakeFailedStateContext = { channels: string[]; groups: string[]; @@ -14,6 +25,14 @@ export type HandshakeFailedStateContext = { reason: PubNubError; }; +/** + * Failed initial subscription handshake (disconnected) state. + * + * State in which Subscription Event Engine waits for user to try to reconnect after all retry attempts has been + * exhausted. + * + * @internal + */ export const HandshakeFailedState = new State('HANDSHAKE_FAILED'); HandshakeFailedState.on(subscriptionChange.type, (context, event) => @@ -38,7 +57,7 @@ HandshakeFailedState.on(restore.type, (context, event) => groups: event.payload.groups, cursor: { timetoken: event.payload.cursor.timetoken, - region: event.payload.cursor.region ? event.payload.cursor.region : context?.cursor?.region ?? 0, + region: event.payload.cursor.region ? event.payload.cursor.region : (context?.cursor?.region ?? 0), }, }), ); diff --git a/src/event-engine/states/handshake_reconnecting.ts b/src/event-engine/states/handshake_reconnecting.ts index 6c82a348d..aece709c3 100644 --- a/src/event-engine/states/handshake_reconnecting.ts +++ b/src/event-engine/states/handshake_reconnecting.ts @@ -1,3 +1,9 @@ +/** + * Retry initial subscription handshake (disconnected) state. + * + * @internal + */ + import { PubNubError } from '../../errors/pubnub-error'; import { State } from '../core/state'; import { Effects, emitStatus, handshakeReconnect } from '../effects'; @@ -19,6 +25,11 @@ import { UnsubscribedState } from './unsubscribed'; import categoryConstants from '../../core/constants/categories'; import * as Subscription from '../../core/types/api/subscription'; +/** + * Context which represent current Subscription Event Engine data state. + * + * @internal + */ export type HandshakeReconnectingStateContext = { channels: string[]; groups: string[]; @@ -28,6 +39,13 @@ export type HandshakeReconnectingStateContext = { reason: PubNubError; }; +/** + * Retry initial subscription handshake (disconnected) state. + * + * State in which Subscription Event Engine tries to recover after error which happened before. + * + * @internal + */ export const HandshakeReconnectingState = new State( 'HANDSHAKE_RECONNECTING', ); diff --git a/src/event-engine/states/handshake_stopped.ts b/src/event-engine/states/handshake_stopped.ts index e7040c417..a902dda9e 100644 --- a/src/event-engine/states/handshake_stopped.ts +++ b/src/event-engine/states/handshake_stopped.ts @@ -1,3 +1,9 @@ +/** + * Stopped initial subscription handshake (disconnected) state. + * + * @internal + */ + import { State } from '../core/state'; import { Effects } from '../effects'; import { Events, reconnect, restore, subscriptionChange, unsubscribeAll } from '../events'; @@ -5,12 +11,25 @@ import { HandshakingState } from './handshaking'; import { UnsubscribedState } from './unsubscribed'; import * as Subscription from '../../core/types/api/subscription'; +/** + * Context which represent current Subscription Event Engine data state. + * + * @internal + */ type HandshakeStoppedStateContext = { channels: string[]; groups: string[]; cursor?: Subscription.SubscriptionCursor; }; +/** + * Stopped initial subscription handshake (disconnected) state. + * + * State in which Subscription Event Engine still has information about subscription but doesn't have subscription + * cursor for next sequential subscribe REST API call. + * + * @internal + */ export const HandshakeStoppedState = new State('HANDSHAKE_STOPPED'); HandshakeStoppedState.on(subscriptionChange.type, (context, event) => diff --git a/src/event-engine/states/handshaking.ts b/src/event-engine/states/handshaking.ts index c2dcdb7b5..d856b7e20 100644 --- a/src/event-engine/states/handshaking.ts +++ b/src/event-engine/states/handshaking.ts @@ -1,3 +1,9 @@ +/** + * Initial subscription handshake (disconnected) state. + * + * @internal + */ + import { State } from '../core/state'; import { Effects, handshake, emitStatus } from '../effects'; import { @@ -16,12 +22,25 @@ import { UnsubscribedState } from './unsubscribed'; import categoryConstants from '../../core/constants/categories'; import * as Subscription from '../../core/types/api/subscription'; +/** + * Context which represent current Subscription Event Engine data state. + * + * @internal + */ export type HandshakingStateContext = { channels: string[]; groups: string[]; cursor?: Subscription.SubscriptionCursor; }; +/** + * Initial subscription handshake (disconnected) state. + * + * State in which Subscription Event Engine tries to receive subscription cursor for next sequential subscribe REST + * API calls. + * + * @internal + */ export const HandshakingState = new State('HANDSHAKING'); HandshakingState.onEnter((context) => handshake(context.channels, context.groups)); diff --git a/src/event-engine/states/receive_failed.ts b/src/event-engine/states/receive_failed.ts index 5b3db90be..34d46ed71 100644 --- a/src/event-engine/states/receive_failed.ts +++ b/src/event-engine/states/receive_failed.ts @@ -1,3 +1,9 @@ +/** + * Failed to receive real-time updates (disconnected) state. + * + * @internal + */ + import { State } from '../core/state'; import { Effects } from '../effects'; import { Events, reconnect, restore, subscriptionChange, unsubscribeAll } from '../events'; @@ -6,6 +12,11 @@ import { HandshakingState } from './handshaking'; import { UnsubscribedState } from './unsubscribed'; import * as Subscription from '../../core/types/api/subscription'; +/** + * Context which represent current Subscription Event Engine data state. + * + * @internal + */ export type ReceiveFailedStateContext = { channels: string[]; groups: string[]; @@ -14,6 +25,14 @@ export type ReceiveFailedStateContext = { reason: PubNubError; }; +/** + * Failed to receive real-time updates (disconnected) state. + * + * State in which Subscription Event Engine waits for user to try to reconnect after all retry attempts has been + * exhausted. + * + * @internal + */ export const ReceiveFailedState = new State('RECEIVE_FAILED'); ReceiveFailedState.on(reconnect.type, (context, event) => diff --git a/src/event-engine/states/receive_reconnecting.ts b/src/event-engine/states/receive_reconnecting.ts index 133a44bfe..91854e2b6 100644 --- a/src/event-engine/states/receive_reconnecting.ts +++ b/src/event-engine/states/receive_reconnecting.ts @@ -1,3 +1,9 @@ +/** + * Reconnect to receive real-time updates (disconnected) state. + * + * @internal + */ + import { PubNubError } from '../../errors/pubnub-error'; import { State } from '../core/state'; import { Effects, emitMessages, receiveReconnect, emitStatus } from '../effects'; @@ -18,6 +24,11 @@ import { UnsubscribedState } from './unsubscribed'; import categoryConstants from '../../core/constants/categories'; import * as Subscription from '../../core/types/api/subscription'; +/** + * Context which represent current Subscription Event Engine data state. + * + * @internal + */ export type ReceiveReconnectingStateContext = { channels: string[]; groups: string[]; @@ -27,6 +38,13 @@ export type ReceiveReconnectingStateContext = { reason: PubNubError; }; +/** + * Reconnect to receive real-time updates (disconnected) state. + * + * State in which Subscription Event Engine tries to recover after error which happened before. + * + * @internal + */ export const ReceiveReconnectingState = new State( 'RECEIVE_RECONNECTING', ); diff --git a/src/event-engine/states/receive_stopped.ts b/src/event-engine/states/receive_stopped.ts index 49027d275..39e13e1d4 100644 --- a/src/event-engine/states/receive_stopped.ts +++ b/src/event-engine/states/receive_stopped.ts @@ -1,3 +1,9 @@ +/** + * Stopped real-time updates (disconnected) state module. + * + * @internal + */ + import { State } from '../core/state'; import { Effects } from '../effects'; import { Events, reconnect, restore, subscriptionChange, unsubscribeAll } from '../events'; @@ -5,12 +11,25 @@ import { HandshakingState } from './handshaking'; import { UnsubscribedState } from './unsubscribed'; import * as Subscription from '../../core/types/api/subscription'; +/** + * Context which represent current Subscription Event Engine data state. + * + * @internal + */ type ReceiveStoppedStateContext = { channels: string[]; groups: string[]; cursor: Subscription.SubscriptionCursor; }; +/** + * Stopped real-time updates (disconnected) state. + * + * State in which Subscription Event Engine still has information about subscription but doesn't process real-time + * updates. + * + * @internal + */ export const ReceiveStoppedState = new State('RECEIVE_STOPPED'); ReceiveStoppedState.on(subscriptionChange.type, (context, event) => diff --git a/src/event-engine/states/receiving.ts b/src/event-engine/states/receiving.ts index 7219f0bf3..84362a694 100644 --- a/src/event-engine/states/receiving.ts +++ b/src/event-engine/states/receiving.ts @@ -1,3 +1,9 @@ +/** + * Receiving real-time updates (connected) state module. + * + * @internal + */ + import { State } from '../core/state'; import { Effects, emitMessages, emitStatus, receiveMessages } from '../effects'; import { @@ -15,12 +21,24 @@ import { ReceiveStoppedState } from './receive_stopped'; import categoryConstants from '../../core/constants/categories'; import * as Subscription from '../../core/types/api/subscription'; +/** + * Context which represent current Subscription Event Engine data state. + * + * @internal + */ export type ReceivingStateContext = { channels: string[]; groups: string[]; cursor: Subscription.SubscriptionCursor; }; +/** + * Receiving real-time updates (connected) state. + * + * State in which Subscription Event Engine processes any real-time updates. + * + * @internal + */ export const ReceivingState = new State('RECEIVING'); ReceivingState.onEnter((context) => receiveMessages(context.channels, context.groups, context.cursor)); diff --git a/src/event-engine/states/unsubscribed.ts b/src/event-engine/states/unsubscribed.ts index 70794694e..8d62499b1 100644 --- a/src/event-engine/states/unsubscribed.ts +++ b/src/event-engine/states/unsubscribed.ts @@ -1,8 +1,21 @@ +/** + * Unsubscribed / disconnected state module. + * + * @internal + */ + import { State } from '../core/state'; import { Effects } from '../effects'; import { Events, subscriptionChange, restore } from '../events'; import { HandshakingState } from './handshaking'; +/** + * Unsubscribed / disconnected state. + * + * State in which Subscription Event Engine doesn't process any real-time updates. + * + * @internal + */ export const UnsubscribedState = new State('UNSUBSCRIBED'); UnsubscribedState.on(subscriptionChange.type, (_, event) => diff --git a/src/models/Cursor.ts b/src/models/Cursor.ts index 60eca78f3..84ab64bac 100644 --- a/src/models/Cursor.ts +++ b/src/models/Cursor.ts @@ -1,4 +1,18 @@ +/** + * Subscription cursor. + * + * Cursor used by {@link PubNub} client as reference point in time after which new real-time events should be + * received and processed. + */ export type Cursor = { + /** + * PubNub high-precision timestamp. + */ readonly timetoken: string; - readonly region: number; + /** + * Data center region for which `timetoken` has been generated. + * + * **Note:** This is an _optional_ value and can be set to `0` if not needed. + */ + readonly region?: number; }; diff --git a/src/node/configuration.ts b/src/node/components/configuration.ts similarity index 90% rename from src/node/configuration.ts rename to src/node/components/configuration.ts index 38a2eabc4..ee6f8731c 100644 --- a/src/node/configuration.ts +++ b/src/node/components/configuration.ts @@ -6,10 +6,10 @@ import { UserConfiguration, ExtendedConfiguration, setDefaults as setBaseDefaults, -} from '../core/interfaces/configuration'; -import { TransportKeepAlive } from '../core/interfaces/transport'; -import { Payload } from '../core/types/api'; -import { CryptoModule } from '../core/interfaces/crypto-module'; +} from '../../core/interfaces/configuration'; +import { TransportKeepAlive } from '../../core/interfaces/transport'; +import { Payload } from '../../core/types/api'; +import { ICryptoModule } from '../../core/interfaces/crypto-module'; // -------------------------------------------------------- // ----------------------- Defaults ----------------------- @@ -40,7 +40,7 @@ export type PubNubConfiguration = UserConfiguration & { * * @default `not set` */ - cryptoModule?: CryptoModule; + cryptoModule?: ICryptoModule; // region Deprecated parameters /** diff --git a/src/node/index.ts b/src/node/index.ts index bd988cabe..1ba9a65a2 100755 --- a/src/node/index.ts +++ b/src/node/index.ts @@ -3,13 +3,13 @@ import CborReader from 'cbor-sync'; import { Readable } from 'stream'; import { Buffer } from 'buffer'; -import { CryptoModule, LegacyCryptor, AesCbcCryptor } from '../crypto/modules/NodeCryptoModule/nodeCryptoModule'; -import type { CryptoModule as CryptoModuleType } from '../crypto/modules/NodeCryptoModule/nodeCryptoModule'; +import { NodeCryptoModule, LegacyCryptor, AesCbcCryptor } from '../crypto/modules/NodeCryptoModule/nodeCryptoModule'; +import type { NodeCryptoModule as CryptoModuleType } from '../crypto/modules/NodeCryptoModule/nodeCryptoModule'; import PubNubFile, { PubNubFileParameters } from '../file/modules/node'; import { CryptorConfiguration } from '../core/interfaces/crypto-module'; import { makeConfiguration } from '../core/components/configuration'; -import { PubNubConfiguration, setDefaults } from './configuration'; +import { PubNubConfiguration, setDefaults } from './components/configuration'; import { TokenManager } from '../core/components/token_manager'; import { NodeTransport } from '../transport/node-transport'; import { PubNubMiddleware } from '../transport/middleware'; @@ -31,7 +31,8 @@ class PubNub extends PubNubCore { + /** + * Create and configure PubNub client core. + * + * @param configuration - User-provided PubNub client configuration. + * + * @returns Configured and ready to use PubNub client. + */ constructor(configuration: PubNubConfiguration) { const configurationCopy = setDefaults(configuration); const platformConfiguration: ExtendedConfiguration & PlatformConfiguration = { diff --git a/src/titanium/index.ts b/src/titanium/index.ts index 008a82735..7742ae512 100644 --- a/src/titanium/index.ts +++ b/src/titanium/index.ts @@ -12,6 +12,13 @@ import Cbor from '../cbor/common'; * PubNub client for Titanium. */ export class PubNub extends PubNubCore { + /** + * Create and configure PubNub client core. + * + * @param configuration - User-provided PubNub client configuration. + * + * @returns Configured and ready to use PubNub client. + */ constructor(configuration: PubNubConfiguration) { const configurationCopy = setDefaults(configuration); const platformConfiguration = { ...configurationCopy, sdkFamily: 'TitaniumSDK' }; diff --git a/src/transport/middleware.ts b/src/transport/middleware.ts index 88114e3f8..8e67bfdc6 100644 --- a/src/transport/middleware.ts +++ b/src/transport/middleware.ts @@ -1,3 +1,9 @@ +/** + * Common PubNub Network Provider middleware module. + * + * @internal + */ + import { TransportMethod, TransportRequest } from '../core/types/transport-request'; import { PrivateClientConfiguration } from '../core/interfaces/configuration'; import { TokenManager } from '../core/components/token_manager'; @@ -7,6 +13,8 @@ import { Query } from '../core/types/api'; /** * Transport middleware configuration options. + * + * @internal */ type PubNubMiddlewareConfiguration = { /** @@ -94,6 +102,11 @@ class RequestSignature { } } +/** + * Common PubNub Network Provider middleware. + * + * @internal + */ export class PubNubMiddleware implements Transport { /** * Request signature generator. diff --git a/src/transport/node-transport.ts b/src/transport/node-transport.ts index ed6de5a44..a77a6fe7e 100644 --- a/src/transport/node-transport.ts +++ b/src/transport/node-transport.ts @@ -1,3 +1,9 @@ +/** + * Node.js Transport provider module. + * + * @internal + */ + import fetch, { Request, Response, RequestInit } from 'node-fetch'; import { ProxyAgent, ProxyAgentOptions } from 'proxy-agent'; import { Agent as HttpsAgent } from 'https'; @@ -14,20 +20,29 @@ import { queryStringFromObject } from '../core/utils'; /** * Class representing a fetch-based Node.js transport provider. + * + * @internal */ export class NodeTransport implements Transport { /** * Service {@link ArrayBuffer} response decoder. + * + * @internal */ protected static decoder = new TextDecoder(); /** * Request proxy configuration. + * + * @internal */ private proxyConfiguration?: ProxyAgentOptions; + /** @internal */ private proxyAgent?: ProxyAgent; + /** @internal */ private httpsAgent?: HttpsAgent; + /** @internal */ private httpAgent?: HttpAgent; /** @@ -38,6 +53,8 @@ export class NodeTransport implements Transport { * @param [logVerbosity] - Whether verbose logging enabled or not. * * @returns Transport for performing network requests. + * + * @internal */ constructor( private readonly keepAlive: boolean = false, @@ -49,6 +66,8 @@ export class NodeTransport implements Transport { * Update request proxy configuration. * * @param configuration - New proxy configuration. + * + * @internal */ public setProxy(configuration?: ProxyAgentOptions) { this.proxyConfiguration = configuration; @@ -119,6 +138,8 @@ export class NodeTransport implements Transport { * @param req - The {@link TransportRequest} object containing request information. * * @returns Request object generated from the {@link TransportRequest} object. + * + * @internal */ private async requestFromTransportRequest(req: TransportRequest): Promise { let headers: Record | undefined = req.headers; @@ -164,6 +185,8 @@ export class NodeTransport implements Transport { * * @returns {HttpAgent | HttpsAgent | undefined} - The appropriate agent for the request, or * undefined if keep alive or proxy not requested. + * + * @internal */ private agentForTransportRequest(req: TransportRequest): HttpAgent | HttpsAgent | undefined { // Don't configure any agents if keep alive not requested. diff --git a/src/transport/subscription-worker/subscription-worker-middleware.ts b/src/transport/subscription-worker/subscription-worker-middleware.ts index b1a08e3ec..0508adacb 100644 --- a/src/transport/subscription-worker/subscription-worker-middleware.ts +++ b/src/transport/subscription-worker/subscription-worker-middleware.ts @@ -3,6 +3,8 @@ * * Middleware optimize subscription feature requests utilizing `Subscription Worker` if available and not disabled * by user. + * + * @internal */ import { CancellationController, TransportRequest } from '../../core/types/transport-request'; diff --git a/src/transport/subscription-worker/subscription-worker.ts b/src/transport/subscription-worker/subscription-worker.ts index d520e1770..8816de9de 100644 --- a/src/transport/subscription-worker/subscription-worker.ts +++ b/src/transport/subscription-worker/subscription-worker.ts @@ -4,6 +4,8 @@ * * Service worker provides support for PubNub subscription feature to give better user experience across * multiple opened pages. + * + * @internal */ import { TransportRequest } from '../../core/types/transport-request'; diff --git a/src/transport/web-react-native-transport.ts b/src/transport/web-react-native-transport.ts index 39b8dc686..aa25688fe 100644 --- a/src/transport/web-react-native-transport.ts +++ b/src/transport/web-react-native-transport.ts @@ -1,5 +1,7 @@ /** * Common browser and React Native Transport provider module. + * + * @internal */ import { CancellationController, TransportRequest } from '../core/types/transport-request'; @@ -11,13 +13,25 @@ import { queryStringFromObject } from '../core/utils'; /** * Class representing a `fetch`-based browser and React Native transport provider. + * + * @internal */ export class WebReactNativeTransport implements Transport { /** * Service {@link ArrayBuffer} response decoder. + * + * @internal */ protected static decoder = new TextDecoder(); + /** + * Create and configure transport provider for Web and Rect environments. + * + * @param [keepAlive] - Whether client should try to keep connections open for reuse or not. + * @param logVerbosity - Whether verbose logs should be printed or not. + * + * @internal + */ constructor( private keepAlive: boolean = false, private readonly logVerbosity: boolean, @@ -56,7 +70,10 @@ export class WebReactNativeTransport implements Transport { }, req.timeout * 1000); }); - return Promise.race([fetch(request, { signal: abortController?.signal }), requestTimeout]) + return Promise.race([ + fetch(request, { signal: abortController?.signal, credentials: 'omit', cache: 'no-cache' }), + requestTimeout, + ]) .then((response): Promise<[Response, ArrayBuffer]> | [Response, ArrayBuffer] => response.arrayBuffer().then((arrayBuffer) => [response, arrayBuffer]), ) @@ -99,6 +116,8 @@ export class WebReactNativeTransport implements Transport { * @param req - The {@link TransportRequest} object containing request information. * * @returns Request object generated from the {@link TransportRequest} object. + * + * @internal */ private async requestFromTransportRequest(req: TransportRequest): Promise { let body: string | ArrayBuffer | FormData | undefined; @@ -145,6 +164,8 @@ export class WebReactNativeTransport implements Transport { * @param request - Platform-specific * @param [elapsed] - How many seconds passed since request processing started. * @param [body] - Service response (if available). + * + * @internal */ protected logRequestProcessProgress(request: Request, elapsed?: number, body?: ArrayBuffer) { if (!this.logVerbosity) return; diff --git a/src/web/components/configuration.ts b/src/web/components/configuration.ts index 06e65c335..4f0709836 100644 --- a/src/web/components/configuration.ts +++ b/src/web/components/configuration.ts @@ -3,7 +3,7 @@ import { ExtendedConfiguration, setDefaults as setBaseDefaults, } from '../../core/interfaces/configuration'; -import { CryptoModule } from '../../core/interfaces/crypto-module'; +import { ICryptoModule } from '../../core/interfaces/crypto-module'; // -------------------------------------------------------- // ----------------------- Defaults ----------------------- @@ -77,7 +77,7 @@ export type PubNubConfiguration = UserConfiguration & { * * @default `not set` */ - cryptoModule?: CryptoModule; + cryptoModule?: ICryptoModule; // region Deprecated parameters /** diff --git a/src/web/index.ts b/src/web/index.ts index 68993eee4..4a0c33cd4 100644 --- a/src/web/index.ts +++ b/src/web/index.ts @@ -35,6 +35,13 @@ export default class PubNub extends PubNubCore) { switch (changelog.type) { @@ -30,9 +32,9 @@ function logChangelog(changelog: Change) { class EventEngineSteps { private pubnub?: PubNub; - private messagePromise?: Promise; + private messagePromise?: Promise; private statusPromise?: Promise; - private presencePromise?: Promise; + private presencePromise?: Promise; private changelog: Change[] = []; private configuration: any = {}; @@ -89,7 +91,7 @@ class EventEngineSteps { }); this.statusPromise = new Promise((resolveStatus) => { - this.presencePromise = new Promise((resolvePresence) => { + this.presencePromise = new Promise((resolvePresence) => { this.pubnub?.addListener({ presence(presenceEvent) { resolvePresence(presenceEvent); @@ -170,7 +172,7 @@ class EventEngineSteps { @when('I subscribe') async whenISubscribe() { this.statusPromise = new Promise((resolveStatus) => { - this.messagePromise = new Promise((resolveMessage) => { + this.messagePromise = new Promise((resolveMessage) => { this.pubnub?.addListener({ message(messageEvent) { setTimeout(() => resolveMessage(messageEvent), 100); @@ -188,7 +190,7 @@ class EventEngineSteps { @when(/I subscribe with timetoken (\d*)/) async whenISubscribeWithTimetoken(timetoken: number) { this.statusPromise = new Promise((resolveStatus) => { - this.messagePromise = new Promise((resolveMessage) => { + this.messagePromise = new Promise((resolveMessage) => { this.pubnub?.addListener({ message(messageEvent) { setTimeout(() => resolveMessage(messageEvent), 100); diff --git a/test/contract/definitions/grant.ts b/test/contract/definitions/grant.ts index a0a655f0f..daa690422 100644 --- a/test/contract/definitions/grant.ts +++ b/test/contract/definitions/grant.ts @@ -11,17 +11,17 @@ import { } from '../shared/fixtures'; import { ResourceType, AccessPermission } from '../shared/enums'; -import { ParsedGrantToken, GrantTokenParameters } from 'pubnub'; import { exists } from '../shared/helpers'; +import { PAM } from '../../../lib/types'; @binding([PubNubManager, AccessManagerKeyset]) class GrantTokenSteps { private pubnub?: PubNub; private token?: string; - private parsedToken?: ParsedGrantToken; + private parsedToken?: PAM.Token; - private grantParams: Partial = {}; + private grantParams: Partial = {}; private resourceName?: string; private resourceType?: ResourceType; @@ -133,7 +133,7 @@ class GrantTokenSteps { public async grantToken() { exists(this.grantParams); - const params = this.grantParams as GrantTokenParameters; + const params = this.grantParams as PAM.GrantTokenParameters; const token = await this.pubnub?.grantToken(params); diff --git a/test/integration/components/crypto.test.ts b/test/integration/components/crypto.test.ts index d7373805c..073558bd8 100644 --- a/test/integration/components/crypto.test.ts +++ b/test/integration/components/crypto.test.ts @@ -25,7 +25,7 @@ describe('components/crypto useRandomIVs', () => { expect(decrypted).to.deep.equal(data, JSON.stringify(decrypted)); }); - it('should be able to encrypt and decrypt a message with CryptoModule', () => { + it('should be able to encrypt and decrypt a message with ICryptoModule', () => { const pubnub = new PubNub({ subscribeKey: 'demo-36', publishKey: 'demo-36', diff --git a/test/integration/components/reconnection_manager.test.ts b/test/integration/components/reconnection_manager.test.ts index fcf02cfbb..8dd2ca5ef 100644 --- a/test/integration/components/reconnection_manager.test.ts +++ b/test/integration/components/reconnection_manager.test.ts @@ -40,7 +40,8 @@ describe('#components/reconnection_manger', () => { clock.restore(); }); - it('reports when the network is unreachable', (done) => { + // TODO: Nock doesn't work properly with `fetch` and automated retries. + it.skip('reports when the network is unreachable', (done) => { utils .createNock() .get('/v2/subscribe/mySubKey/ch1,ch1-pnpres,ch2,ch2-pnpres/0') @@ -85,7 +86,8 @@ describe('#components/reconnection_manger', () => { pubnub.subscribe({ channels: ['ch1', 'ch2'], withPresence: true }); }); - it('begins polling and reports reconnects when subscribe is again successful', (done) => { + // TODO: Nock doesn't work properly with `fetch` and automated retries. + it.skip('begins polling and reports reconnects when subscribe is again successful', (done) => { utils .createNock() .get('/v2/subscribe/mySubKey/ch1,ch1-pnpres,ch2,ch2-pnpres/0') diff --git a/test/integration/components/subscription_manager.test.ts b/test/integration/components/subscription_manager.test.ts index d68c554f5..802690bf6 100644 --- a/test/integration/components/subscription_manager.test.ts +++ b/test/integration/components/subscription_manager.test.ts @@ -10,6 +10,7 @@ import utils from '../../utils'; describe('#components/subscription_manager', () => { let pubnub: PubNub; + let pubnubWithLimitedDeduplicationQueue: PubNub; let pubnubWithPassingHeartbeats: PubNub; let pubnubWithLimitedQueue: PubNub; let pubnubWithCrypto: PubNub; @@ -34,6 +35,18 @@ describe('#components/subscription_manager', () => { autoNetworkDetection: false, heartbeatInterval: 149, }); + pubnubWithLimitedDeduplicationQueue = new PubNub({ + subscribeKey: 'mySubKey', + publishKey: 'myPublishKey', + origin: 'ps.pndsn.com', + uuid: 'myUUID', + // @ts-expect-error Force override default value. + useRequestId: false, + autoNetworkDetection: false, + maximumCacheSize: 1, + dedupeOnSubscribe: true, + heartbeatInterval: 149, + }); pubnubWithPassingHeartbeats = new PubNub({ subscribeKey: 'mySubKey', publishKey: 'myPublishKey', @@ -69,6 +82,7 @@ describe('#components/subscription_manager', () => { afterEach(() => { pubnub.stop(); + pubnubWithLimitedDeduplicationQueue.stop(); pubnubWithPassingHeartbeats.stop(); pubnubWithLimitedQueue.stop(); }); @@ -703,10 +717,6 @@ describe('#components/subscription_manager', () => { }); it('supports deduping on shallow queue', (done) => { - // @ts-expect-error: This configuration option normally is hidden. - pubnub._config.dedupeOnSubscribe = true; - // @ts-expect-error: This configuration option normally is hidden. - pubnub._config.maximumCacheSize = 1; let messageCount = 0; utils @@ -739,13 +749,13 @@ describe('#components/subscription_manager', () => { { 'content-type': 'text/javascript' }, ); - pubnub.addListener({ + pubnubWithLimitedDeduplicationQueue.addListener({ message() { messageCount += 1; }, }); - pubnub.subscribe({ channels: ['ch1', 'ch2'], withPresence: true }); + pubnubWithLimitedDeduplicationQueue.subscribe({ channels: ['ch1', 'ch2'], withPresence: true }); setTimeout(() => { if (messageCount === 4) { diff --git a/test/utils.ts b/test/utils.ts index cce634f9f..34f6bb475 100644 --- a/test/utils.ts +++ b/test/utils.ts @@ -47,8 +47,8 @@ export default { let promisesResult = Promise.resolve(); for (let delayIdx = 0; delayIdx < delays.length; delayIdx += 1) { - let previousDelay = delayIdx > 0 ? delays[delayIdx - 1] : 0; - let delay = delays[delayIdx]; + const previousDelay = delayIdx > 0 ? delays[delayIdx - 1] : 0; + const delay = delays[delayIdx]; promisesResult = promisesResult.then(() => callAPIWithDelayedResponse(previousDelay, delay)) as Promise; } diff --git a/tsconfig.json b/tsconfig.json index 2d6f18753..a8cf9e0c7 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -12,7 +12,7 @@ "downlevelIteration": true, "declaration": true, "declarationDir": "./lib/types", - "stripInternal": true + "stripInternal": true, }, "include": [ "src/**/*" @@ -22,10 +22,10 @@ "src/crypto/modules/WebCryptoModule/**/*", "src/crypto/modules/web.ts", "src/file/modules/web.ts", - "src/nativescript/**/*", - "src/titanium/**/*", "src/transport/subscription-worker/**/*", "src/transport/titanium-transport.ts", + "src/nativescript/**/*", + "src/titanium/**/*", "src/web/**/*" ] } \ No newline at end of file