@wppconnect/wa-js 3.23.4 → 4.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,55 @@
1
+ /*!
2
+ * Copyright 2021 WPPConnect Team
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import { EventEmitter } from './EventEmitter';
17
+ /** @whatsapp WAWebBackendEventBusTypes.flow */
18
+ export declare const BackendEvent: {
19
+ readonly APP_STATE_SYNC_COMPLETED: 'app_state_sync_completed';
20
+ readonly LOGOUT: 'logout';
21
+ readonly REFRESH_QR: 'refresh_qr';
22
+ readonly STARTING_LOGOUT: 'starting_logout';
23
+ readonly ON_INITIAL_CHAT_SYNCED: 'on_initial_chat_synced';
24
+ readonly ON_RECENT_CHAT_HISTORY_SYNCED: 'on_recent_chat_history_synced';
25
+ readonly ON_FULL_CHAT_HISTORY_SYNCED: 'on_full_chat_history_synced';
26
+ readonly ON_CRITICAL_SYNC_DONE: 'on_critical_sync_done';
27
+ readonly NEW_HISTORY_SYNC_CHUNK_PROCESSED: 'new_history_sync_chunk_processed';
28
+ readonly STORAGE_INITIALIZATION_ERROR: 'storage_initialization_error';
29
+ readonly SOCKET_STREAM_DISCONNECTED: 'socket_stream_disconnected';
30
+ readonly OPEN_SOCKET_STREAM: 'open_socket_stream';
31
+ readonly RECONNECT_SOCKET: 'reconnect_socket';
32
+ readonly SET_SOCKET_STATE: 'set_socket_state';
33
+ readonly UPDATE_STATUS_PRIVACY_SETTINGS: 'update_status_privacy_settings';
34
+ readonly ACCOUNT_TEMPORARILY_BANNED: 'account_temporarily_banned';
35
+ readonly ACCOUNT_SYNC_FOR_PRIVACY: 'account_sync_for_privacy';
36
+ readonly UNEXPECTED_LOGOUT_MODAL: 'unexpected_logout_modal';
37
+ readonly INITIAL_LOAD_READY: 'initial_load_ready';
38
+ readonly MAIN_STREAM_MODE_READY: 'main_stream_mode_ready';
39
+ readonly SERVICE_UNAVAILABLE_503: 'service_unavailable_503';
40
+ readonly OFFLINE_PROCESS_READY: 'offline_process_ready';
41
+ readonly OFFLINE_DELIVERY_END: 'offline_delivery_end';
42
+ readonly OFFLINE_DELIVERY_STATE_RESET: 'offline_delivery_state_reset';
43
+ readonly ON_AB_PROPS_UPDATE: 'on_ab_props_update';
44
+ readonly AB_PROPS_LOADED: 'ab_props_loaded';
45
+ };
46
+ export type BackendEventName = (typeof BackendEvent)[keyof typeof BackendEvent];
47
+ /** @whatsapp WAWebBackendEventBus */
48
+ export declare class BackendEventBusClass extends EventEmitter {
49
+ isMainStreamReadyMd: boolean;
50
+ isOfflineDeliveryEnd: boolean;
51
+ onStorageInitializationError(handler: () => void): this;
52
+ triggerStorageInitializationError(error?: any): void;
53
+ }
54
+ /** @whatsapp WAWebBackendEventBus */
55
+ export declare const BackendEventBus: BackendEventBusClass;
@@ -14,6 +14,7 @@
14
14
  * limitations under the License.
15
15
  */
16
16
  export * from './ApiContact';
17
+ export * from './BackendEventBus';
17
18
  export * from './Base64';
18
19
  export * from './Browser';
19
20
  export * from './ChatPresence';