UNPKG

2.8 kBTypeScriptView Raw
1/**
2 * Action types used within actions dispatched internally. These action types
3 * can be manually dispatched to update state.
4 */
5export const actionTypes: {
6 START: string;
7 ERROR: string;
8 CLEAR_DATA: string;
9 CLEAR_ERROR: string;
10 CLEAR_ERRORS: string;
11 SET_LISTENER: string;
12 UNSET_LISTENER: string;
13 GET_REQUEST: string;
14 GET_SUCCESS: string;
15 GET_FAILURE: string;
16 SET_REQUEST: string;
17 SET_SUCCESS: string;
18 SET_FAILURE: string;
19 ADD_REQUEST: string;
20 ADD_SUCCESS: string;
21 ADD_FAILURE: string;
22 UPDATE_REQUEST: string;
23 UPDATE_SUCCESS: string;
24 UPDATE_FAILURE: string;
25 DELETE_REQUEST: string;
26 DELETE_SUCCESS: string;
27 DELETE_FAILURE: string;
28 ATTACH_LISTENER: string;
29 LISTENER_RESPONSE: string;
30 LISTENER_ERROR: string;
31 ON_SNAPSHOT_REQUEST: string;
32 ON_SNAPSHOT_SUCCESS: string;
33 ON_SNAPSHOT_FAILURE: string;
34};
35
36/**
37 * Constants used within redux-firetore. Includes actionTypes, actionsPrefix,
38 * and default config.
39 */
40export const constants: {
41 actionTypes: {
42 START: string;
43 ERROR: string;
44 CLEAR_DATA: string;
45 CLEAR_ERROR: string;
46 CLEAR_ERRORS: string;
47 SET_LISTENER: string;
48 UNSET_LISTENER: string;
49 GET_REQUEST: string;
50 GET_SUCCESS: string;
51 GET_FAILURE: string;
52 SET_REQUEST: string;
53 SET_SUCCESS: string;
54 SET_FAILURE: string;
55 ADD_REQUEST: string;
56 ADD_SUCCESS: string;
57 ADD_FAILURE: string;
58 UPDATE_REQUEST: string;
59 UPDATE_SUCCESS: string;
60 UPDATE_FAILURE: string;
61 DELETE_REQUEST: string;
62 DELETE_SUCCESS: string;
63 DELETE_FAILURE: string;
64 ATTACH_LISTENER: string;
65 LISTENER_RESPONSE: string;
66 LISTENER_ERROR: string;
67 ON_SNAPSHOT_REQUEST: string;
68 ON_SNAPSHOT_SUCCESS: string;
69 ON_SNAPSHOT_FAILURE: string;
70 };
71 actionsPrefix: string;
72 defaultConfig: {
73 enableLogging: boolean;
74 enhancerNamespace: string;
75 helpersNamespace: string;
76 preserveOnListenerError: object;
77 preserveOnDelete: object;
78 logListenerError: boolean;
79 allowMultipleListeners: any;
80 onAttemptCollectionDelete: any;
81 };
82};
83
84/**
85 * A redux store enhancer that adds store.firebase (passed to React component
86 * context through react-redux's <Provider>).
87 */
88export function reduxFirestore(firebaseInstance: object, otherConfig?: object): any;
89
90/**
91 * Get extended firestore instance (attached to store.firestore)
92 */
93export function getFirestore(firebaseInstance: object, otherConfig?: object): any;
94
95/**
96 * A redux store reducer for Firestore state
97 */
98export function firestoreReducer(state: object, action: object): any;
99
100/**
101 * A redux store reducer for Firestore state
102 */
103export namespace firestoreReducer {
104 const prototype: {
105 };
106}
107
108/**
109 * A redux store reducer for Firestore state
110 */
111export namespace reduxFirestore {
112 const prototype: {
113 };
114}