UNPKG

3.7 kBJavaScriptView Raw
1"use strict";
2
3Object.defineProperty(exports, "__esModule", {
4 value: true
5});
6exports.methodsToAddFromFirestore = exports.defaultConfig = exports.default = exports.actionsPrefix = exports.actionTypes = void 0;
7var actionsPrefix = '@@reduxFirestore';
8exports.actionsPrefix = actionsPrefix;
9var actionTypes = {
10 START: "".concat(actionsPrefix, "/START"),
11 ERROR: "".concat(actionsPrefix, "/ERROR"),
12 CLEAR_DATA: "".concat(actionsPrefix, "/CLEAR_DATA"),
13 CLEAR_ERROR: "".concat(actionsPrefix, "/CLEAR_ERROR"),
14 CLEAR_ERRORS: "".concat(actionsPrefix, "/CLEAR_ERRORS"),
15 SET_LISTENER: "".concat(actionsPrefix, "/SET_LISTENER"),
16 UNSET_LISTENER: "".concat(actionsPrefix, "/UNSET_LISTENER"),
17 GET_REQUEST: "".concat(actionsPrefix, "/GET_REQUEST"),
18 GET_SUCCESS: "".concat(actionsPrefix, "/GET_SUCCESS"),
19 GET_FAILURE: "".concat(actionsPrefix, "/GET_FAILURE"),
20 SET_REQUEST: "".concat(actionsPrefix, "/SET_REQUEST"),
21 SET_SUCCESS: "".concat(actionsPrefix, "/SET_SUCCESS"),
22 SET_FAILURE: "".concat(actionsPrefix, "/SET_FAILURE"),
23 ADD_REQUEST: "".concat(actionsPrefix, "/ADD_REQUEST"),
24 ADD_SUCCESS: "".concat(actionsPrefix, "/ADD_SUCCESS"),
25 ADD_FAILURE: "".concat(actionsPrefix, "/ADD_FAILURE"),
26 UPDATE_REQUEST: "".concat(actionsPrefix, "/UPDATE_REQUEST"),
27 UPDATE_SUCCESS: "".concat(actionsPrefix, "/UPDATE_SUCCESS"),
28 UPDATE_FAILURE: "".concat(actionsPrefix, "/UPDATE_FAILURE"),
29 DELETE_REQUEST: "".concat(actionsPrefix, "/DELETE_REQUEST"),
30 DELETE_SUCCESS: "".concat(actionsPrefix, "/DELETE_SUCCESS"),
31 DELETE_FAILURE: "".concat(actionsPrefix, "/DELETE_FAILURE"),
32 ATTACH_LISTENER: "".concat(actionsPrefix, "/ATTACH_LISTENER"),
33 LISTENER_RESPONSE: "".concat(actionsPrefix, "/LISTENER_RESPONSE"),
34 LISTENER_ERROR: "".concat(actionsPrefix, "/LISTENER_ERROR"),
35 ON_SNAPSHOT_REQUEST: "".concat(actionsPrefix, "/ON_SNAPSHOT_REQUEST"),
36 ON_SNAPSHOT_SUCCESS: "".concat(actionsPrefix, "/ON_SNAPSHOT_SUCCESS"),
37 ON_SNAPSHOT_FAILURE: "".concat(actionsPrefix, "/ON_SNAPSHOT_FAILURE"),
38 DOCUMENT_ADDED: "".concat(actionsPrefix, "/DOCUMENT_ADDED"),
39 DOCUMENT_MODIFIED: "".concat(actionsPrefix, "/DOCUMENT_MODIFIED"),
40 DOCUMENT_REMOVED: "".concat(actionsPrefix, "/DOCUMENT_REMOVED"),
41 TRANSACTION_START: "".concat(actionsPrefix, "/TRANSACTION_START"),
42 TRANSACTION_SUCCESS: "".concat(actionsPrefix, "/TRANSACTION_SUCCESS"),
43 TRANSACTION_FAILURE: "".concat(actionsPrefix, "/TRANSACTION_FAILURE"),
44 OPTIMISTIC_ADDED: "".concat(actionsPrefix, "/OPTIMISTIC_ADDED"),
45 OPTIMISTIC_MODIFIED: "".concat(actionsPrefix, "/OPTIMISTIC_MODIFIED"),
46 OPTIMISTIC_REMOVED: "".concat(actionsPrefix, "/OPTIMISTIC_REMOVED"),
47 MUTATE_START: "".concat(actionsPrefix, "/MUTATE_START"),
48 MUTATE_SUCCESS: "".concat(actionsPrefix, "/MUTATE_SUCCESS"),
49 MUTATE_FAILURE: "".concat(actionsPrefix, "/MUTATE_FAILURE")
50};
51exports.actionTypes = actionTypes;
52var defaultConfig = {
53 logListenerError: true,
54 enhancerNamespace: 'firestore',
55 helpersNamespace: null,
56 allowMultipleListeners: false,
57 preserveOnDelete: null,
58 preserveOnListenerError: null,
59 preserveCacheAfterUnset: true,
60 onAttemptCollectionDelete: null,
61 mergeOrdered: true,
62 mergeOrderedDocUpdates: true,
63 mergeOrderedCollectionUpdates: true,
64 globalDataConverter: null
65};
66exports.defaultConfig = defaultConfig;
67var methodsToAddFromFirestore = ['collection', 'collectionGroup', 'configureClient', 'doc', 'batch', 'disableNetwork', 'enableNetwork', 'enablePersistence', 'ensureClientConfigured', 'setLogLevel', 'settings', 'mutate'];
68exports.methodsToAddFromFirestore = methodsToAddFromFirestore;
69var _default = {
70 actionsPrefix: actionsPrefix,
71 actionTypes: actionTypes,
72 defaultConfig: defaultConfig
73};
74exports.default = _default;
\No newline at end of file