@dereekb/firebase 12.3.12 → 12.4.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.
- package/index.cjs.js +228 -94
- package/index.esm.js +223 -95
- package/package.json +1 -1
- package/src/lib/model/notification/notification.api.d.ts +9 -0
- package/src/lib/model/notification/notification.api.error.d.ts +1 -0
- package/src/lib/model/notification/notification.config.d.ts +8 -2
- package/src/lib/model/notification/notification.d.ts +13 -1
- package/src/lib/model/notification/notification.id.d.ts +13 -1
- package/src/lib/model/notification/notification.message.d.ts +2 -2
- package/src/lib/model/notification/notification.query.d.ts +9 -0
- package/src/lib/model/notification/notification.util.d.ts +29 -2
- package/test/CHANGELOG.md +8 -0
- package/test/package.json +1 -1
package/index.cjs.js
CHANGED
|
@@ -939,19 +939,19 @@ var tryToString$2 = tryToString$3;
|
|
|
939
939
|
var $TypeError$b = TypeError;
|
|
940
940
|
|
|
941
941
|
// `Assert: IsCallable(argument) is true`
|
|
942
|
-
var aCallable$
|
|
942
|
+
var aCallable$9 = function (argument) {
|
|
943
943
|
if (isCallable$a(argument)) return argument;
|
|
944
944
|
throw new $TypeError$b(tryToString$2(argument) + ' is not a function');
|
|
945
945
|
};
|
|
946
946
|
|
|
947
|
-
var aCallable$
|
|
947
|
+
var aCallable$8 = aCallable$9;
|
|
948
948
|
var isNullOrUndefined$1 = isNullOrUndefined$3;
|
|
949
949
|
|
|
950
950
|
// `GetMethod` abstract operation
|
|
951
951
|
// https://tc39.es/ecma262/#sec-getmethod
|
|
952
952
|
var getMethod$4 = function (V, P) {
|
|
953
953
|
var func = V[P];
|
|
954
|
-
return isNullOrUndefined$1(func) ? undefined : aCallable$
|
|
954
|
+
return isNullOrUndefined$1(func) ? undefined : aCallable$8(func);
|
|
955
955
|
};
|
|
956
956
|
|
|
957
957
|
var call$a = functionCall;
|
|
@@ -1163,7 +1163,7 @@ var $String$1 = String;
|
|
|
1163
1163
|
var $TypeError$8 = TypeError;
|
|
1164
1164
|
|
|
1165
1165
|
// `Assert: Type(argument) is Object`
|
|
1166
|
-
var anObject$
|
|
1166
|
+
var anObject$e = function (argument) {
|
|
1167
1167
|
if (isObject$2(argument)) return argument;
|
|
1168
1168
|
throw new $TypeError$8($String$1(argument) + ' is not an object');
|
|
1169
1169
|
};
|
|
@@ -1171,7 +1171,7 @@ var anObject$d = function (argument) {
|
|
|
1171
1171
|
var DESCRIPTORS$7 = descriptors;
|
|
1172
1172
|
var IE8_DOM_DEFINE = ie8DomDefine;
|
|
1173
1173
|
var V8_PROTOTYPE_DEFINE_BUG$1 = v8PrototypeDefineBug;
|
|
1174
|
-
var anObject$
|
|
1174
|
+
var anObject$d = anObject$e;
|
|
1175
1175
|
var toPropertyKey = toPropertyKey$2;
|
|
1176
1176
|
|
|
1177
1177
|
var $TypeError$7 = TypeError;
|
|
@@ -1186,9 +1186,9 @@ var WRITABLE = 'writable';
|
|
|
1186
1186
|
// `Object.defineProperty` method
|
|
1187
1187
|
// https://tc39.es/ecma262/#sec-object.defineproperty
|
|
1188
1188
|
objectDefineProperty.f = DESCRIPTORS$7 ? V8_PROTOTYPE_DEFINE_BUG$1 ? function defineProperty(O, P, Attributes) {
|
|
1189
|
-
anObject$
|
|
1189
|
+
anObject$d(O);
|
|
1190
1190
|
P = toPropertyKey(P);
|
|
1191
|
-
anObject$
|
|
1191
|
+
anObject$d(Attributes);
|
|
1192
1192
|
if (typeof O === 'function' && P === 'prototype' && 'value' in Attributes && WRITABLE in Attributes && !Attributes[WRITABLE]) {
|
|
1193
1193
|
var current = $getOwnPropertyDescriptor(O, P);
|
|
1194
1194
|
if (current && current[WRITABLE]) {
|
|
@@ -1201,9 +1201,9 @@ objectDefineProperty.f = DESCRIPTORS$7 ? V8_PROTOTYPE_DEFINE_BUG$1 ? function de
|
|
|
1201
1201
|
}
|
|
1202
1202
|
} return $defineProperty(O, P, Attributes);
|
|
1203
1203
|
} : $defineProperty : function defineProperty(O, P, Attributes) {
|
|
1204
|
-
anObject$
|
|
1204
|
+
anObject$d(O);
|
|
1205
1205
|
P = toPropertyKey(P);
|
|
1206
|
-
anObject$
|
|
1206
|
+
anObject$d(Attributes);
|
|
1207
1207
|
if (IE8_DOM_DEFINE) try {
|
|
1208
1208
|
return $defineProperty(O, P, Attributes);
|
|
1209
1209
|
} catch (error) { /* empty */ }
|
|
@@ -1574,13 +1574,13 @@ var getBuiltIn$2 = getBuiltIn$4;
|
|
|
1574
1574
|
var uncurryThis$5 = functionUncurryThis;
|
|
1575
1575
|
var getOwnPropertyNamesModule = objectGetOwnPropertyNames;
|
|
1576
1576
|
var getOwnPropertySymbolsModule = objectGetOwnPropertySymbols;
|
|
1577
|
-
var anObject$
|
|
1577
|
+
var anObject$c = anObject$e;
|
|
1578
1578
|
|
|
1579
1579
|
var concat = uncurryThis$5([].concat);
|
|
1580
1580
|
|
|
1581
1581
|
// all object keys, includes non-enumerable and symbols
|
|
1582
1582
|
var ownKeys$1 = getBuiltIn$2('Reflect', 'ownKeys') || function ownKeys(it) {
|
|
1583
|
-
var keys = getOwnPropertyNamesModule.f(anObject$
|
|
1583
|
+
var keys = getOwnPropertyNamesModule.f(anObject$c(it));
|
|
1584
1584
|
var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
|
|
1585
1585
|
return getOwnPropertySymbols ? concat(keys, getOwnPropertySymbols(it)) : keys;
|
|
1586
1586
|
};
|
|
@@ -1753,7 +1753,7 @@ var objectKeys$1 = Object.keys || function keys(O) {
|
|
|
1753
1753
|
var DESCRIPTORS$2 = descriptors;
|
|
1754
1754
|
var V8_PROTOTYPE_DEFINE_BUG = v8PrototypeDefineBug;
|
|
1755
1755
|
var definePropertyModule = objectDefineProperty;
|
|
1756
|
-
var anObject$
|
|
1756
|
+
var anObject$b = anObject$e;
|
|
1757
1757
|
var toIndexedObject = toIndexedObject$4;
|
|
1758
1758
|
var objectKeys = objectKeys$1;
|
|
1759
1759
|
|
|
@@ -1761,7 +1761,7 @@ var objectKeys = objectKeys$1;
|
|
|
1761
1761
|
// https://tc39.es/ecma262/#sec-object.defineproperties
|
|
1762
1762
|
// eslint-disable-next-line es/no-object-defineproperties -- safe
|
|
1763
1763
|
objectDefineProperties.f = DESCRIPTORS$2 && !V8_PROTOTYPE_DEFINE_BUG ? Object.defineProperties : function defineProperties(O, Properties) {
|
|
1764
|
-
anObject$
|
|
1764
|
+
anObject$b(O);
|
|
1765
1765
|
var props = toIndexedObject(Properties);
|
|
1766
1766
|
var keys = objectKeys(Properties);
|
|
1767
1767
|
var length = keys.length;
|
|
@@ -1776,7 +1776,7 @@ var getBuiltIn$1 = getBuiltIn$4;
|
|
|
1776
1776
|
var html$1 = getBuiltIn$1('document', 'documentElement');
|
|
1777
1777
|
|
|
1778
1778
|
/* global ActiveXObject -- old IE, WSH */
|
|
1779
|
-
var anObject$
|
|
1779
|
+
var anObject$a = anObject$e;
|
|
1780
1780
|
var definePropertiesModule = objectDefineProperties;
|
|
1781
1781
|
var enumBugKeys = enumBugKeys$3;
|
|
1782
1782
|
var hiddenKeys = hiddenKeys$4;
|
|
@@ -1850,7 +1850,7 @@ hiddenKeys[IE_PROTO] = true;
|
|
|
1850
1850
|
var objectCreate = Object.create || function create(O, Properties) {
|
|
1851
1851
|
var result;
|
|
1852
1852
|
if (O !== null) {
|
|
1853
|
-
EmptyConstructor[PROTOTYPE] = anObject$
|
|
1853
|
+
EmptyConstructor[PROTOTYPE] = anObject$a(O);
|
|
1854
1854
|
result = new EmptyConstructor();
|
|
1855
1855
|
EmptyConstructor[PROTOTYPE] = null;
|
|
1856
1856
|
// add "__proto__" for Object.getPrototypeOf polyfill
|
|
@@ -1905,10 +1905,10 @@ var iteratorsCore = {
|
|
|
1905
1905
|
BUGGY_SAFARI_ITERATORS: BUGGY_SAFARI_ITERATORS
|
|
1906
1906
|
};
|
|
1907
1907
|
|
|
1908
|
-
var $$
|
|
1908
|
+
var $$c = _export;
|
|
1909
1909
|
var global$1 = global$b;
|
|
1910
1910
|
var anInstance = anInstance$1;
|
|
1911
|
-
var anObject$
|
|
1911
|
+
var anObject$9 = anObject$e;
|
|
1912
1912
|
var isCallable$1 = isCallable$e;
|
|
1913
1913
|
var getPrototypeOf = objectGetPrototypeOf;
|
|
1914
1914
|
var defineBuiltInAccessor = defineBuiltInAccessor$1;
|
|
@@ -1945,7 +1945,7 @@ var defineIteratorPrototypeAccessor = function (key, value) {
|
|
|
1945
1945
|
return value;
|
|
1946
1946
|
},
|
|
1947
1947
|
set: function (replacement) {
|
|
1948
|
-
anObject$
|
|
1948
|
+
anObject$9(this);
|
|
1949
1949
|
if (this === IteratorPrototype$1) throw new $TypeError$5("You can't redefine this property");
|
|
1950
1950
|
if (hasOwn(this, key)) this[key] = replacement;
|
|
1951
1951
|
else createProperty(this, key, replacement);
|
|
@@ -1964,13 +1964,13 @@ IteratorConstructor.prototype = IteratorPrototype$1;
|
|
|
1964
1964
|
|
|
1965
1965
|
// `Iterator` constructor
|
|
1966
1966
|
// https://github.com/tc39/proposal-iterator-helpers
|
|
1967
|
-
$$
|
|
1967
|
+
$$c({ global: true, constructor: true, forced: FORCED$1 }, {
|
|
1968
1968
|
Iterator: IteratorConstructor
|
|
1969
1969
|
});
|
|
1970
1970
|
|
|
1971
1971
|
// `GetIteratorDirect(obj)` abstract operation
|
|
1972
1972
|
// https://tc39.es/proposal-iterator-helpers/#sec-getiteratordirect
|
|
1973
|
-
var getIteratorDirect$
|
|
1973
|
+
var getIteratorDirect$5 = function (obj) {
|
|
1974
1974
|
return {
|
|
1975
1975
|
iterator: obj,
|
|
1976
1976
|
next: obj.next,
|
|
@@ -1992,12 +1992,12 @@ var createIterResultObject$1 = function (value, done) {
|
|
|
1992
1992
|
};
|
|
1993
1993
|
|
|
1994
1994
|
var call$7 = functionCall;
|
|
1995
|
-
var anObject$
|
|
1995
|
+
var anObject$8 = anObject$e;
|
|
1996
1996
|
var getMethod$2 = getMethod$4;
|
|
1997
1997
|
|
|
1998
1998
|
var iteratorClose$5 = function (iterator, kind, value) {
|
|
1999
1999
|
var innerResult, innerError;
|
|
2000
|
-
anObject$
|
|
2000
|
+
anObject$8(iterator);
|
|
2001
2001
|
try {
|
|
2002
2002
|
innerResult = getMethod$2(iterator, 'return');
|
|
2003
2003
|
if (!innerResult) {
|
|
@@ -2011,7 +2011,7 @@ var iteratorClose$5 = function (iterator, kind, value) {
|
|
|
2011
2011
|
}
|
|
2012
2012
|
if (kind === 'throw') throw value;
|
|
2013
2013
|
if (innerError) throw innerResult;
|
|
2014
|
-
anObject$
|
|
2014
|
+
anObject$8(innerResult);
|
|
2015
2015
|
return value;
|
|
2016
2016
|
};
|
|
2017
2017
|
|
|
@@ -2091,23 +2091,23 @@ var iteratorCreateProxy = function (nextHandler, IS_ITERATOR) {
|
|
|
2091
2091
|
return IteratorProxy;
|
|
2092
2092
|
};
|
|
2093
2093
|
|
|
2094
|
-
var anObject$
|
|
2094
|
+
var anObject$7 = anObject$e;
|
|
2095
2095
|
var iteratorClose$3 = iteratorClose$5;
|
|
2096
2096
|
|
|
2097
2097
|
// call something on iterator step with safe closing on error
|
|
2098
2098
|
var callWithSafeIterationClosing$2 = function (iterator, fn, value, ENTRIES) {
|
|
2099
2099
|
try {
|
|
2100
|
-
return ENTRIES ? fn(anObject$
|
|
2100
|
+
return ENTRIES ? fn(anObject$7(value)[0], value[1]) : fn(value);
|
|
2101
2101
|
} catch (error) {
|
|
2102
2102
|
iteratorClose$3(iterator, 'throw', error);
|
|
2103
2103
|
}
|
|
2104
2104
|
};
|
|
2105
2105
|
|
|
2106
|
-
var $$
|
|
2106
|
+
var $$b = _export;
|
|
2107
2107
|
var call$5 = functionCall;
|
|
2108
|
-
var aCallable$
|
|
2109
|
-
var anObject$
|
|
2110
|
-
var getIteratorDirect$
|
|
2108
|
+
var aCallable$7 = aCallable$9;
|
|
2109
|
+
var anObject$6 = anObject$e;
|
|
2110
|
+
var getIteratorDirect$4 = getIteratorDirect$5;
|
|
2111
2111
|
var createIteratorProxy$1 = iteratorCreateProxy;
|
|
2112
2112
|
var callWithSafeIterationClosing$1 = callWithSafeIterationClosing$2;
|
|
2113
2113
|
var IS_PURE$1 = isPure;
|
|
@@ -2118,7 +2118,7 @@ var IteratorProxy$1 = createIteratorProxy$1(function () {
|
|
|
2118
2118
|
var next = this.next;
|
|
2119
2119
|
var result, done, value;
|
|
2120
2120
|
while (true) {
|
|
2121
|
-
result = anObject$
|
|
2121
|
+
result = anObject$6(call$5(next, iterator));
|
|
2122
2122
|
done = this.done = !!result.done;
|
|
2123
2123
|
if (done) return;
|
|
2124
2124
|
value = result.value;
|
|
@@ -2128,26 +2128,26 @@ var IteratorProxy$1 = createIteratorProxy$1(function () {
|
|
|
2128
2128
|
|
|
2129
2129
|
// `Iterator.prototype.filter` method
|
|
2130
2130
|
// https://github.com/tc39/proposal-iterator-helpers
|
|
2131
|
-
$$
|
|
2131
|
+
$$b({ target: 'Iterator', proto: true, real: true, forced: IS_PURE$1 }, {
|
|
2132
2132
|
filter: function filter(predicate) {
|
|
2133
|
-
anObject$
|
|
2134
|
-
aCallable$
|
|
2135
|
-
return new IteratorProxy$1(getIteratorDirect$
|
|
2133
|
+
anObject$6(this);
|
|
2134
|
+
aCallable$7(predicate);
|
|
2135
|
+
return new IteratorProxy$1(getIteratorDirect$4(this), {
|
|
2136
2136
|
predicate: predicate
|
|
2137
2137
|
});
|
|
2138
2138
|
}
|
|
2139
2139
|
});
|
|
2140
2140
|
|
|
2141
2141
|
var call$4 = functionCall;
|
|
2142
|
-
var aCallable$
|
|
2143
|
-
var anObject$
|
|
2144
|
-
var getIteratorDirect$
|
|
2142
|
+
var aCallable$6 = aCallable$9;
|
|
2143
|
+
var anObject$5 = anObject$e;
|
|
2144
|
+
var getIteratorDirect$3 = getIteratorDirect$5;
|
|
2145
2145
|
var createIteratorProxy = iteratorCreateProxy;
|
|
2146
2146
|
var callWithSafeIterationClosing = callWithSafeIterationClosing$2;
|
|
2147
2147
|
|
|
2148
2148
|
var IteratorProxy = createIteratorProxy(function () {
|
|
2149
2149
|
var iterator = this.iterator;
|
|
2150
|
-
var result = anObject$
|
|
2150
|
+
var result = anObject$5(call$4(this.next, iterator));
|
|
2151
2151
|
var done = this.done = !!result.done;
|
|
2152
2152
|
if (!done) return callWithSafeIterationClosing(iterator, this.mapper, [result.value, this.counter++], true);
|
|
2153
2153
|
});
|
|
@@ -2155,20 +2155,20 @@ var IteratorProxy = createIteratorProxy(function () {
|
|
|
2155
2155
|
// `Iterator.prototype.map` method
|
|
2156
2156
|
// https://github.com/tc39/proposal-iterator-helpers
|
|
2157
2157
|
var iteratorMap = function map(mapper) {
|
|
2158
|
-
anObject$
|
|
2159
|
-
aCallable$
|
|
2160
|
-
return new IteratorProxy(getIteratorDirect$
|
|
2158
|
+
anObject$5(this);
|
|
2159
|
+
aCallable$6(mapper);
|
|
2160
|
+
return new IteratorProxy(getIteratorDirect$3(this), {
|
|
2161
2161
|
mapper: mapper
|
|
2162
2162
|
});
|
|
2163
2163
|
};
|
|
2164
2164
|
|
|
2165
|
-
var $$
|
|
2165
|
+
var $$a = _export;
|
|
2166
2166
|
var map = iteratorMap;
|
|
2167
2167
|
var IS_PURE = isPure;
|
|
2168
2168
|
|
|
2169
2169
|
// `Iterator.prototype.map` method
|
|
2170
2170
|
// https://github.com/tc39/proposal-iterator-helpers
|
|
2171
|
-
$$
|
|
2171
|
+
$$a({ target: 'Iterator', proto: true, real: true, forced: IS_PURE }, {
|
|
2172
2172
|
map: map
|
|
2173
2173
|
});
|
|
2174
2174
|
|
|
@@ -2685,26 +2685,26 @@ var setIterate = function (set, fn, interruptible) {
|
|
|
2685
2685
|
};
|
|
2686
2686
|
|
|
2687
2687
|
var SetHelpers$4 = setHelpers;
|
|
2688
|
-
var iterate$
|
|
2688
|
+
var iterate$4 = setIterate;
|
|
2689
2689
|
|
|
2690
2690
|
var Set$2 = SetHelpers$4.Set;
|
|
2691
2691
|
var add$3 = SetHelpers$4.add;
|
|
2692
2692
|
|
|
2693
2693
|
var setClone = function (set) {
|
|
2694
2694
|
var result = new Set$2();
|
|
2695
|
-
iterate$
|
|
2695
|
+
iterate$4(set, function (it) {
|
|
2696
2696
|
add$3(result, it);
|
|
2697
2697
|
});
|
|
2698
2698
|
return result;
|
|
2699
2699
|
};
|
|
2700
2700
|
|
|
2701
2701
|
var uncurryThis$2 = functionUncurryThis;
|
|
2702
|
-
var aCallable$
|
|
2702
|
+
var aCallable$5 = aCallable$9;
|
|
2703
2703
|
|
|
2704
2704
|
var functionUncurryThisAccessor = function (object, key, method) {
|
|
2705
2705
|
try {
|
|
2706
2706
|
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
|
2707
|
-
return uncurryThis$2(aCallable$
|
|
2707
|
+
return uncurryThis$2(aCallable$5(Object.getOwnPropertyDescriptor(object, key)[method]));
|
|
2708
2708
|
} catch (error) { /* empty */ }
|
|
2709
2709
|
};
|
|
2710
2710
|
|
|
@@ -2715,11 +2715,11 @@ var setSize = uncurryThisAccessor(SetHelpers$3.proto, 'size', 'get') || function
|
|
|
2715
2715
|
return set.size;
|
|
2716
2716
|
};
|
|
2717
2717
|
|
|
2718
|
-
var aCallable$
|
|
2719
|
-
var anObject$
|
|
2718
|
+
var aCallable$4 = aCallable$9;
|
|
2719
|
+
var anObject$4 = anObject$e;
|
|
2720
2720
|
var call$2 = functionCall;
|
|
2721
2721
|
var toIntegerOrInfinity = toIntegerOrInfinity$3;
|
|
2722
|
-
var getIteratorDirect$
|
|
2722
|
+
var getIteratorDirect$2 = getIteratorDirect$5;
|
|
2723
2723
|
|
|
2724
2724
|
var INVALID_SIZE = 'Invalid size';
|
|
2725
2725
|
var $RangeError = RangeError;
|
|
@@ -2729,13 +2729,13 @@ var max = Math.max;
|
|
|
2729
2729
|
var SetRecord = function (set, intSize) {
|
|
2730
2730
|
this.set = set;
|
|
2731
2731
|
this.size = max(intSize, 0);
|
|
2732
|
-
this.has = aCallable$
|
|
2733
|
-
this.keys = aCallable$
|
|
2732
|
+
this.has = aCallable$4(set.has);
|
|
2733
|
+
this.keys = aCallable$4(set.keys);
|
|
2734
2734
|
};
|
|
2735
2735
|
|
|
2736
2736
|
SetRecord.prototype = {
|
|
2737
2737
|
getIterator: function () {
|
|
2738
|
-
return getIteratorDirect$
|
|
2738
|
+
return getIteratorDirect$2(anObject$4(call$2(this.keys, this.set)));
|
|
2739
2739
|
},
|
|
2740
2740
|
includes: function (it) {
|
|
2741
2741
|
return call$2(this.has, this.set, it);
|
|
@@ -2745,7 +2745,7 @@ SetRecord.prototype = {
|
|
|
2745
2745
|
// `GetSetRecord` abstract operation
|
|
2746
2746
|
// https://tc39.es/proposal-set-methods/#sec-getsetrecord
|
|
2747
2747
|
var getSetRecord$7 = function (obj) {
|
|
2748
|
-
anObject$
|
|
2748
|
+
anObject$4(obj);
|
|
2749
2749
|
var numSize = +obj.size;
|
|
2750
2750
|
// NOTE: If size is undefined, then numSize will be NaN
|
|
2751
2751
|
// eslint-disable-next-line no-self-compare -- NaN check
|
|
@@ -2816,13 +2816,13 @@ var setMethodAcceptSetLike$7 = function (name) {
|
|
|
2816
2816
|
}
|
|
2817
2817
|
};
|
|
2818
2818
|
|
|
2819
|
-
var $$
|
|
2819
|
+
var $$9 = _export;
|
|
2820
2820
|
var difference = setDifference;
|
|
2821
2821
|
var setMethodAcceptSetLike$6 = setMethodAcceptSetLike$7;
|
|
2822
2822
|
|
|
2823
2823
|
// `Set.prototype.difference` method
|
|
2824
2824
|
// https://github.com/tc39/proposal-set-methods
|
|
2825
|
-
$$
|
|
2825
|
+
$$9({ target: 'Set', proto: true, real: true, forced: !setMethodAcceptSetLike$6('difference') }, {
|
|
2826
2826
|
difference: difference
|
|
2827
2827
|
});
|
|
2828
2828
|
|
|
@@ -2857,7 +2857,7 @@ var setIntersection = function intersection(other) {
|
|
|
2857
2857
|
return result;
|
|
2858
2858
|
};
|
|
2859
2859
|
|
|
2860
|
-
var $$
|
|
2860
|
+
var $$8 = _export;
|
|
2861
2861
|
var fails$1 = fails$d;
|
|
2862
2862
|
var intersection = setIntersection;
|
|
2863
2863
|
var setMethodAcceptSetLike$5 = setMethodAcceptSetLike$7;
|
|
@@ -2869,7 +2869,7 @@ var INCORRECT = !setMethodAcceptSetLike$5('intersection') || fails$1(function ()
|
|
|
2869
2869
|
|
|
2870
2870
|
// `Set.prototype.intersection` method
|
|
2871
2871
|
// https://github.com/tc39/proposal-set-methods
|
|
2872
|
-
$$
|
|
2872
|
+
$$8({ target: 'Set', proto: true, real: true, forced: INCORRECT }, {
|
|
2873
2873
|
intersection: intersection
|
|
2874
2874
|
});
|
|
2875
2875
|
|
|
@@ -2895,19 +2895,19 @@ var setIsDisjointFrom = function isDisjointFrom(other) {
|
|
|
2895
2895
|
}) !== false;
|
|
2896
2896
|
};
|
|
2897
2897
|
|
|
2898
|
-
var $$
|
|
2898
|
+
var $$7 = _export;
|
|
2899
2899
|
var isDisjointFrom = setIsDisjointFrom;
|
|
2900
2900
|
var setMethodAcceptSetLike$4 = setMethodAcceptSetLike$7;
|
|
2901
2901
|
|
|
2902
2902
|
// `Set.prototype.isDisjointFrom` method
|
|
2903
2903
|
// https://github.com/tc39/proposal-set-methods
|
|
2904
|
-
$$
|
|
2904
|
+
$$7({ target: 'Set', proto: true, real: true, forced: !setMethodAcceptSetLike$4('isDisjointFrom') }, {
|
|
2905
2905
|
isDisjointFrom: isDisjointFrom
|
|
2906
2906
|
});
|
|
2907
2907
|
|
|
2908
2908
|
var aSet$3 = aSet$7;
|
|
2909
2909
|
var size$1 = setSize;
|
|
2910
|
-
var iterate$
|
|
2910
|
+
var iterate$3 = setIterate;
|
|
2911
2911
|
var getSetRecord$3 = getSetRecord$7;
|
|
2912
2912
|
|
|
2913
2913
|
// `Set.prototype.isSubsetOf` method
|
|
@@ -2916,18 +2916,18 @@ var setIsSubsetOf = function isSubsetOf(other) {
|
|
|
2916
2916
|
var O = aSet$3(this);
|
|
2917
2917
|
var otherRec = getSetRecord$3(other);
|
|
2918
2918
|
if (size$1(O) > otherRec.size) return false;
|
|
2919
|
-
return iterate$
|
|
2919
|
+
return iterate$3(O, function (e) {
|
|
2920
2920
|
if (!otherRec.includes(e)) return false;
|
|
2921
2921
|
}, true) !== false;
|
|
2922
2922
|
};
|
|
2923
2923
|
|
|
2924
|
-
var $$
|
|
2924
|
+
var $$6 = _export;
|
|
2925
2925
|
var isSubsetOf = setIsSubsetOf;
|
|
2926
2926
|
var setMethodAcceptSetLike$3 = setMethodAcceptSetLike$7;
|
|
2927
2927
|
|
|
2928
2928
|
// `Set.prototype.isSubsetOf` method
|
|
2929
2929
|
// https://github.com/tc39/proposal-set-methods
|
|
2930
|
-
$$
|
|
2930
|
+
$$6({ target: 'Set', proto: true, real: true, forced: !setMethodAcceptSetLike$3('isSubsetOf') }, {
|
|
2931
2931
|
isSubsetOf: isSubsetOf
|
|
2932
2932
|
});
|
|
2933
2933
|
|
|
@@ -2950,13 +2950,13 @@ var setIsSupersetOf = function isSupersetOf(other) {
|
|
|
2950
2950
|
}) !== false;
|
|
2951
2951
|
};
|
|
2952
2952
|
|
|
2953
|
-
var $$
|
|
2953
|
+
var $$5 = _export;
|
|
2954
2954
|
var isSupersetOf = setIsSupersetOf;
|
|
2955
2955
|
var setMethodAcceptSetLike$2 = setMethodAcceptSetLike$7;
|
|
2956
2956
|
|
|
2957
2957
|
// `Set.prototype.isSupersetOf` method
|
|
2958
2958
|
// https://github.com/tc39/proposal-set-methods
|
|
2959
|
-
$$
|
|
2959
|
+
$$5({ target: 'Set', proto: true, real: true, forced: !setMethodAcceptSetLike$2('isSupersetOf') }, {
|
|
2960
2960
|
isSupersetOf: isSupersetOf
|
|
2961
2961
|
});
|
|
2962
2962
|
|
|
@@ -2983,13 +2983,13 @@ var setSymmetricDifference = function symmetricDifference(other) {
|
|
|
2983
2983
|
return result;
|
|
2984
2984
|
};
|
|
2985
2985
|
|
|
2986
|
-
var $$
|
|
2986
|
+
var $$4 = _export;
|
|
2987
2987
|
var symmetricDifference = setSymmetricDifference;
|
|
2988
2988
|
var setMethodAcceptSetLike$1 = setMethodAcceptSetLike$7;
|
|
2989
2989
|
|
|
2990
2990
|
// `Set.prototype.symmetricDifference` method
|
|
2991
2991
|
// https://github.com/tc39/proposal-set-methods
|
|
2992
|
-
$$
|
|
2992
|
+
$$4({ target: 'Set', proto: true, real: true, forced: !setMethodAcceptSetLike$1('symmetricDifference') }, {
|
|
2993
2993
|
symmetricDifference: symmetricDifference
|
|
2994
2994
|
});
|
|
2995
2995
|
|
|
@@ -3011,13 +3011,13 @@ var setUnion = function union(other) {
|
|
|
3011
3011
|
return result;
|
|
3012
3012
|
};
|
|
3013
3013
|
|
|
3014
|
-
var $$
|
|
3014
|
+
var $$3 = _export;
|
|
3015
3015
|
var union = setUnion;
|
|
3016
3016
|
var setMethodAcceptSetLike = setMethodAcceptSetLike$7;
|
|
3017
3017
|
|
|
3018
3018
|
// `Set.prototype.union` method
|
|
3019
3019
|
// https://github.com/tc39/proposal-set-methods
|
|
3020
|
-
$$
|
|
3020
|
+
$$3({ target: 'Set', proto: true, real: true, forced: !setMethodAcceptSetLike('union') }, {
|
|
3021
3021
|
union: union
|
|
3022
3022
|
});
|
|
3023
3023
|
|
|
@@ -4639,7 +4639,7 @@ var doesNotExceedSafeInteger$1 = function (it) {
|
|
|
4639
4639
|
return it;
|
|
4640
4640
|
};
|
|
4641
4641
|
|
|
4642
|
-
var $$
|
|
4642
|
+
var $$2 = _export;
|
|
4643
4643
|
var toObject = toObject$3;
|
|
4644
4644
|
var lengthOfArrayLike$1 = lengthOfArrayLike$3;
|
|
4645
4645
|
var setArrayLength = arraySetLength;
|
|
@@ -4665,7 +4665,7 @@ var FORCED = INCORRECT_TO_LENGTH || !properErrorOnNonWritableLength();
|
|
|
4665
4665
|
|
|
4666
4666
|
// `Array.prototype.push` method
|
|
4667
4667
|
// https://tc39.es/ecma262/#sec-array.prototype.push
|
|
4668
|
-
$$
|
|
4668
|
+
$$2({ target: 'Array', proto: true, arity: 1, forced: FORCED }, {
|
|
4669
4669
|
// eslint-disable-next-line no-unused-vars -- required for `.length`
|
|
4670
4670
|
push: function push(item) {
|
|
4671
4671
|
var O = toObject(this);
|
|
@@ -6263,14 +6263,14 @@ var functionUncurryThisClause = function (fn) {
|
|
|
6263
6263
|
};
|
|
6264
6264
|
|
|
6265
6265
|
var uncurryThis = functionUncurryThisClause;
|
|
6266
|
-
var aCallable$
|
|
6266
|
+
var aCallable$3 = aCallable$9;
|
|
6267
6267
|
var NATIVE_BIND = functionBindNative;
|
|
6268
6268
|
|
|
6269
6269
|
var bind$1 = uncurryThis(uncurryThis.bind);
|
|
6270
6270
|
|
|
6271
6271
|
// optional / simple context binding
|
|
6272
6272
|
var functionBindContext = function (fn, that) {
|
|
6273
|
-
aCallable$
|
|
6273
|
+
aCallable$3(fn);
|
|
6274
6274
|
return that === undefined ? fn : NATIVE_BIND ? bind$1(fn, that) : function (/* ...args */) {
|
|
6275
6275
|
return fn.apply(that, arguments);
|
|
6276
6276
|
};
|
|
@@ -6343,8 +6343,8 @@ var getIteratorMethod$2 = function (it) {
|
|
|
6343
6343
|
};
|
|
6344
6344
|
|
|
6345
6345
|
var call$1 = functionCall;
|
|
6346
|
-
var aCallable$
|
|
6347
|
-
var anObject$
|
|
6346
|
+
var aCallable$2 = aCallable$9;
|
|
6347
|
+
var anObject$3 = anObject$e;
|
|
6348
6348
|
var tryToString$1 = tryToString$3;
|
|
6349
6349
|
var getIteratorMethod$1 = getIteratorMethod$2;
|
|
6350
6350
|
|
|
@@ -6352,13 +6352,13 @@ var $TypeError$1 = TypeError;
|
|
|
6352
6352
|
|
|
6353
6353
|
var getIterator$1 = function (argument, usingIterator) {
|
|
6354
6354
|
var iteratorMethod = arguments.length < 2 ? getIteratorMethod$1(argument) : usingIterator;
|
|
6355
|
-
if (aCallable$
|
|
6355
|
+
if (aCallable$2(iteratorMethod)) return anObject$3(call$1(iteratorMethod, argument));
|
|
6356
6356
|
throw new $TypeError$1(tryToString$1(argument) + ' is not iterable');
|
|
6357
6357
|
};
|
|
6358
6358
|
|
|
6359
6359
|
var bind = functionBindContext;
|
|
6360
6360
|
var call = functionCall;
|
|
6361
|
-
var anObject$
|
|
6361
|
+
var anObject$2 = anObject$e;
|
|
6362
6362
|
var tryToString = tryToString$3;
|
|
6363
6363
|
var isArrayIteratorMethod = isArrayIteratorMethod$1;
|
|
6364
6364
|
var lengthOfArrayLike = lengthOfArrayLike$3;
|
|
@@ -6376,7 +6376,7 @@ var Result = function (stopped, result) {
|
|
|
6376
6376
|
|
|
6377
6377
|
var ResultPrototype = Result.prototype;
|
|
6378
6378
|
|
|
6379
|
-
var iterate$
|
|
6379
|
+
var iterate$2 = function (iterable, unboundFunction, options) {
|
|
6380
6380
|
var that = options && options.that;
|
|
6381
6381
|
var AS_ENTRIES = !!(options && options.AS_ENTRIES);
|
|
6382
6382
|
var IS_RECORD = !!(options && options.IS_RECORD);
|
|
@@ -6392,7 +6392,7 @@ var iterate$1 = function (iterable, unboundFunction, options) {
|
|
|
6392
6392
|
|
|
6393
6393
|
var callFn = function (value) {
|
|
6394
6394
|
if (AS_ENTRIES) {
|
|
6395
|
-
anObject$
|
|
6395
|
+
anObject$2(value);
|
|
6396
6396
|
return INTERRUPTED ? fn(value[0], value[1], stop) : fn(value[0], value[1]);
|
|
6397
6397
|
} return INTERRUPTED ? fn(value, stop) : fn(value);
|
|
6398
6398
|
};
|
|
@@ -6425,21 +6425,21 @@ var iterate$1 = function (iterable, unboundFunction, options) {
|
|
|
6425
6425
|
} return new Result(false);
|
|
6426
6426
|
};
|
|
6427
6427
|
|
|
6428
|
-
var
|
|
6429
|
-
var iterate = iterate$
|
|
6430
|
-
var aCallable = aCallable$
|
|
6431
|
-
var anObject = anObject$
|
|
6432
|
-
var getIteratorDirect = getIteratorDirect$
|
|
6428
|
+
var $$1 = _export;
|
|
6429
|
+
var iterate$1 = iterate$2;
|
|
6430
|
+
var aCallable$1 = aCallable$9;
|
|
6431
|
+
var anObject$1 = anObject$e;
|
|
6432
|
+
var getIteratorDirect$1 = getIteratorDirect$5;
|
|
6433
6433
|
|
|
6434
6434
|
// `Iterator.prototype.forEach` method
|
|
6435
6435
|
// https://github.com/tc39/proposal-iterator-helpers
|
|
6436
|
-
|
|
6436
|
+
$$1({ target: 'Iterator', proto: true, real: true }, {
|
|
6437
6437
|
forEach: function forEach(fn) {
|
|
6438
|
-
anObject(this);
|
|
6439
|
-
aCallable(fn);
|
|
6440
|
-
var record = getIteratorDirect(this);
|
|
6438
|
+
anObject$1(this);
|
|
6439
|
+
aCallable$1(fn);
|
|
6440
|
+
var record = getIteratorDirect$1(this);
|
|
6441
6441
|
var counter = 0;
|
|
6442
|
-
iterate(record, function (value) {
|
|
6442
|
+
iterate$1(record, function (value) {
|
|
6443
6443
|
fn(value, counter++);
|
|
6444
6444
|
}, { IS_RECORD: true });
|
|
6445
6445
|
}
|
|
@@ -8045,7 +8045,7 @@ const DEFAULT_NOTIFICATION_TEMPLATE_TYPE = 'D';
|
|
|
8045
8045
|
*
|
|
8046
8046
|
* Task notifications are not required to specify a notification model since notification tasks do not interact with NotificationBoxes.
|
|
8047
8047
|
*/
|
|
8048
|
-
const DEFAULT_NOTIFICATION_TASK_NOTIFICATION_MODEL_KEY = '
|
|
8048
|
+
const DEFAULT_NOTIFICATION_TASK_NOTIFICATION_MODEL_KEY = 'not/not';
|
|
8049
8049
|
/**
|
|
8050
8050
|
* Creates a NotificationTaskUniqueId from the input model id and task type.
|
|
8051
8051
|
*
|
|
@@ -8080,14 +8080,14 @@ function mergeNotificationBoxRecipientTemplateConfigs(a, b) {
|
|
|
8080
8080
|
sn: sn ?? snb
|
|
8081
8081
|
};
|
|
8082
8082
|
}
|
|
8083
|
-
function effectiveNotificationBoxRecipientTemplateConfig(
|
|
8083
|
+
function effectiveNotificationBoxRecipientTemplateConfig(a) {
|
|
8084
8084
|
const {
|
|
8085
8085
|
sd,
|
|
8086
8086
|
se,
|
|
8087
8087
|
st,
|
|
8088
8088
|
sp,
|
|
8089
8089
|
sn
|
|
8090
|
-
} =
|
|
8090
|
+
} = a;
|
|
8091
8091
|
return {
|
|
8092
8092
|
sd,
|
|
8093
8093
|
se: se ?? sd,
|
|
@@ -8252,6 +8252,9 @@ const firestoreNotificationBoxRecipient = firestoreSubObject({
|
|
|
8252
8252
|
c: firestoreNotificationBoxRecipientTemplateConfigRecord(),
|
|
8253
8253
|
lk: optionalFirestoreBoolean({
|
|
8254
8254
|
dontStoreValueIf: false
|
|
8255
|
+
}),
|
|
8256
|
+
x: optionalFirestoreBoolean({
|
|
8257
|
+
dontStoreValueIf: false
|
|
8255
8258
|
})
|
|
8256
8259
|
}
|
|
8257
8260
|
}
|
|
@@ -8293,6 +8296,9 @@ const firestoreNotificationUserNotificationBoxRecipientConfig = firestoreSubObje
|
|
|
8293
8296
|
i: firestoreNumber({
|
|
8294
8297
|
default: util.UNSET_INDEX_NUMBER
|
|
8295
8298
|
}),
|
|
8299
|
+
x: optionalFirestoreBoolean({
|
|
8300
|
+
dontStoreValueIf: false
|
|
8301
|
+
}),
|
|
8296
8302
|
n: optionalFirestoreString(),
|
|
8297
8303
|
t: optionalFirestoreString(),
|
|
8298
8304
|
e: optionalFirestoreString(),
|
|
@@ -8379,6 +8385,7 @@ const notificationUserConverter = snapshotConverterFunctions({
|
|
|
8379
8385
|
fields: {
|
|
8380
8386
|
uid: firestoreUID(),
|
|
8381
8387
|
b: firestoreModelIdArrayField,
|
|
8388
|
+
x: firestoreModelIdArrayField,
|
|
8382
8389
|
dc: firestoreNotificationUserDefaultNotificationBoxRecipientConfig,
|
|
8383
8390
|
gc: firestoreNotificationUserDefaultNotificationBoxRecipientConfig,
|
|
8384
8391
|
bc: firestoreObjectArray({
|
|
@@ -8948,6 +8955,15 @@ class UpdateNotificationBoxRecipientParams extends UpdateNotificationBoxRecipien
|
|
|
8948
8955
|
* Whether or not to remove the user if they exist. Defaults to false.
|
|
8949
8956
|
*/
|
|
8950
8957
|
this.remove = void 0;
|
|
8958
|
+
/**
|
|
8959
|
+
* If true, the target recipient will have this NotificationBox added to their exclusion list.
|
|
8960
|
+
* If false, the target recipient will have this NotificationBox removed from their exclusion list.
|
|
8961
|
+
*
|
|
8962
|
+
* If set, the other functions are ignored.
|
|
8963
|
+
*
|
|
8964
|
+
* If targeting the user by the index, the NotificationBox must exist, and the user must have a uid, otherwise an error will be thrown.
|
|
8965
|
+
*/
|
|
8966
|
+
this.setExclusion = void 0;
|
|
8951
8967
|
}
|
|
8952
8968
|
}
|
|
8953
8969
|
__decorate([classTransformer.Expose(), classValidator.IsNotEmpty(), IsFirestoreModelKey(), __metadata("design:type", String)], UpdateNotificationBoxRecipientParams.prototype, "key", void 0);
|
|
@@ -8956,6 +8972,7 @@ __decorate([classTransformer.Expose(), classValidator.IsOptional(), IsFirestoreM
|
|
|
8956
8972
|
__decorate([classTransformer.Expose(), classValidator.IsOptional(), classValidator.IsBoolean(), __metadata("design:type", Object)], UpdateNotificationBoxRecipientParams.prototype, "insert", void 0);
|
|
8957
8973
|
__decorate([classTransformer.Expose(), classValidator.IsOptional(), classValidator.IsBoolean(), __metadata("design:type", Object)], UpdateNotificationBoxRecipientParams.prototype, "enabled", void 0);
|
|
8958
8974
|
__decorate([classTransformer.Expose(), classValidator.IsOptional(), classValidator.IsBoolean(), __metadata("design:type", Object)], UpdateNotificationBoxRecipientParams.prototype, "remove", void 0);
|
|
8975
|
+
__decorate([classTransformer.Expose(), classValidator.IsOptional(), classValidator.IsBoolean(), __metadata("design:type", Object)], UpdateNotificationBoxRecipientParams.prototype, "setExclusion", void 0);
|
|
8959
8976
|
class NotificationRecipientParams {
|
|
8960
8977
|
constructor() {
|
|
8961
8978
|
/**
|
|
@@ -9043,6 +9060,7 @@ const NOTIFICATION_MODEL_ALREADY_INITIALIZED_ERROR_CODE = 'NOTIFICATION_MODEL_AL
|
|
|
9043
9060
|
const NOTIFICATION_BOX_DOES_NOT_EXIST_ERROR_CODE = 'NOTIFICATION_BOX_DOES_NOT_EXIST';
|
|
9044
9061
|
const NOTIFICATION_BOX_EXISTS_FOR_MODEL_ERROR_CODE = 'NOTIFICATION_BOX_EXISTS_FOR_MODEL';
|
|
9045
9062
|
const NOTIFICATION_BOX_RECIPIENT_DOES_NOT_EXIST_ERROR_CODE = 'NOTIFICATION_BOX_RECIPIENT_DOES_NOT_EXIST';
|
|
9063
|
+
const NOTIFICATION_BOX_EXCLUSION_TARGET_INVALID_ERROR_CODE = 'NOTIFICATION_BOX_EXCLUSION_TARGET_INVALID';
|
|
9046
9064
|
const NOTIFICATION_USER_INVALID_UID_FOR_CREATE_ERROR_CODE = 'NOTIFICATION_USER_INVALID_UID_FOR_CREATE';
|
|
9047
9065
|
const NOTIFICATION_USER_BLOCKED_FROM_BEING_ADD_TO_RECIPIENTS_ERROR_CODE = 'NOTIFICATION_USER_BLOCKED_FROM_BEING_ADD_TO_RECIPIENTS';
|
|
9048
9066
|
const NOTIFICATION_USER_LOCKED_CONFIG_FROM_BEING_UPDATED_ERROR_CODE = 'NOTIFICATION_USER_LOCKED_CONFIG_FROM_BEING_UPDATED';
|
|
@@ -9562,6 +9580,15 @@ function noContentNotificationMessageFunctionFactory() {
|
|
|
9562
9580
|
function notificationUsersFlaggedForNeedsSyncQuery() {
|
|
9563
9581
|
return [where('ns', '==', true)];
|
|
9564
9582
|
}
|
|
9583
|
+
/**
|
|
9584
|
+
* Query for notificationUsers that have excluded any of the input notification box ids.
|
|
9585
|
+
*
|
|
9586
|
+
* @param now
|
|
9587
|
+
* @returns
|
|
9588
|
+
*/
|
|
9589
|
+
function notificationUserHasExclusionQuery(exclusionId) {
|
|
9590
|
+
return [where('x', 'array-contains-any', exclusionId)];
|
|
9591
|
+
}
|
|
9565
9592
|
// MARK: NotificationSummary
|
|
9566
9593
|
/**
|
|
9567
9594
|
* Query for notificationSummaries that are flagged for initialization.
|
|
@@ -9655,6 +9682,26 @@ function notificationTaskFailed(updateMetadata) {
|
|
|
9655
9682
|
};
|
|
9656
9683
|
}
|
|
9657
9684
|
|
|
9685
|
+
var $ = _export;
|
|
9686
|
+
var iterate = iterate$2;
|
|
9687
|
+
var aCallable = aCallable$9;
|
|
9688
|
+
var anObject = anObject$e;
|
|
9689
|
+
var getIteratorDirect = getIteratorDirect$5;
|
|
9690
|
+
|
|
9691
|
+
// `Iterator.prototype.some` method
|
|
9692
|
+
// https://github.com/tc39/proposal-iterator-helpers
|
|
9693
|
+
$({ target: 'Iterator', proto: true, real: true }, {
|
|
9694
|
+
some: function some(predicate) {
|
|
9695
|
+
anObject(this);
|
|
9696
|
+
aCallable(predicate);
|
|
9697
|
+
var record = getIteratorDirect(this);
|
|
9698
|
+
var counter = 0;
|
|
9699
|
+
return iterate(record, function (value, stop) {
|
|
9700
|
+
if (predicate(value, counter++)) return stop();
|
|
9701
|
+
}, { IS_RECORD: true, INTERRUPTED: true }).stopped;
|
|
9702
|
+
}
|
|
9703
|
+
});
|
|
9704
|
+
|
|
9658
9705
|
function effectiveNotificationBoxRecipientConfig(input) {
|
|
9659
9706
|
const {
|
|
9660
9707
|
uid,
|
|
@@ -9688,10 +9735,91 @@ function effectiveNotificationBoxRecipientConfig(input) {
|
|
|
9688
9735
|
t: gc.t ?? notificationUserNotificationBoxConfig.t,
|
|
9689
9736
|
// no custom name or notification summary allowed
|
|
9690
9737
|
n: undefined,
|
|
9691
|
-
s: undefined
|
|
9738
|
+
s: undefined,
|
|
9739
|
+
// should never be defined since uid is defined
|
|
9740
|
+
// always resync x
|
|
9741
|
+
x: notificationUserNotificationBoxConfig.x
|
|
9692
9742
|
};
|
|
9693
9743
|
return nextRecipient;
|
|
9694
9744
|
}
|
|
9745
|
+
function updateNotificationUserNotificationSendExclusions(input) {
|
|
9746
|
+
const {
|
|
9747
|
+
notificationUser,
|
|
9748
|
+
addExclusions: inputAddExclusions,
|
|
9749
|
+
removeExclusions: inputRemoveExclusions
|
|
9750
|
+
} = input;
|
|
9751
|
+
const {
|
|
9752
|
+
b: associatedNotificationBoxes,
|
|
9753
|
+
x: currentExclusions,
|
|
9754
|
+
bc: notificationBoxConfigs
|
|
9755
|
+
} = notificationUser;
|
|
9756
|
+
let addExclusions = [];
|
|
9757
|
+
let removeExclusions = [];
|
|
9758
|
+
if (inputAddExclusions) {
|
|
9759
|
+
addExclusions = util.asArray(inputAddExclusions);
|
|
9760
|
+
}
|
|
9761
|
+
if (inputRemoveExclusions) {
|
|
9762
|
+
removeExclusions = util.asArray(inputRemoveExclusions);
|
|
9763
|
+
}
|
|
9764
|
+
const removeExclusionsSet = new Set(removeExclusions);
|
|
9765
|
+
const initialNextExclusions = [...addExclusions, ...currentExclusions].filter(x => !removeExclusionsSet.has(x));
|
|
9766
|
+
// verify each exclusion is related to atleast one notification box
|
|
9767
|
+
const nextExclusions = initialNextExclusions.filter(exclusion => {
|
|
9768
|
+
const firstMatch = associatedNotificationBoxes.findIndex(x => x.startsWith(exclusion));
|
|
9769
|
+
return firstMatch !== -1;
|
|
9770
|
+
});
|
|
9771
|
+
const update = applyExclusionsToNotificationUserNotificationBoxRecipientConfigs({
|
|
9772
|
+
x: nextExclusions,
|
|
9773
|
+
bc: notificationBoxConfigs,
|
|
9774
|
+
notificationUser,
|
|
9775
|
+
recalculateNs: true
|
|
9776
|
+
});
|
|
9777
|
+
update.x = nextExclusions;
|
|
9778
|
+
return {
|
|
9779
|
+
nextExclusions,
|
|
9780
|
+
update
|
|
9781
|
+
};
|
|
9782
|
+
}
|
|
9783
|
+
function applyExclusionsToNotificationUserNotificationBoxRecipientConfigs(params) {
|
|
9784
|
+
const {
|
|
9785
|
+
x: inputX,
|
|
9786
|
+
bc: inputBc,
|
|
9787
|
+
notificationUser,
|
|
9788
|
+
recalculateNs
|
|
9789
|
+
} = params;
|
|
9790
|
+
const x = inputX ?? notificationUser?.x ?? [];
|
|
9791
|
+
const currentBc = inputBc ?? notificationUser?.bc ?? [];
|
|
9792
|
+
// test the new configs and update the exclusion and ns flags
|
|
9793
|
+
const canSendToNotificationBoxFunction = notificationSendExclusionCanSendFunction(x);
|
|
9794
|
+
const nextBc = currentBc.map(x => {
|
|
9795
|
+
const currentNotificationBoxExcluded = Boolean(x.x);
|
|
9796
|
+
const isExcluded = !canSendToNotificationBoxFunction(x.nb); // excluded if cannot send
|
|
9797
|
+
let updatedConfig = x;
|
|
9798
|
+
if (currentNotificationBoxExcluded !== isExcluded) {
|
|
9799
|
+
updatedConfig = {
|
|
9800
|
+
...x,
|
|
9801
|
+
x: isExcluded,
|
|
9802
|
+
ns: true
|
|
9803
|
+
};
|
|
9804
|
+
}
|
|
9805
|
+
return updatedConfig;
|
|
9806
|
+
});
|
|
9807
|
+
const update = {
|
|
9808
|
+
bc: nextBc,
|
|
9809
|
+
ns: recalculateNs ? calculateNsForNotificationUserNotificationBoxRecipientConfigs(nextBc) : undefined
|
|
9810
|
+
};
|
|
9811
|
+
return update;
|
|
9812
|
+
}
|
|
9813
|
+
function calculateNsForNotificationUserNotificationBoxRecipientConfigs(configs) {
|
|
9814
|
+
return configs.some(x => x.ns);
|
|
9815
|
+
}
|
|
9816
|
+
const notificationSendExclusionCanSendFunction = exclusions => {
|
|
9817
|
+
const fn = notification => {
|
|
9818
|
+
return exclusions.findIndex(x => notification.startsWith(x)) === -1;
|
|
9819
|
+
};
|
|
9820
|
+
fn._exclusions = exclusions;
|
|
9821
|
+
return fn;
|
|
9822
|
+
};
|
|
9695
9823
|
// MARK: Notification
|
|
9696
9824
|
/**
|
|
9697
9825
|
* Returns true if the notification's send types are all marked as sent.
|
|
@@ -9936,6 +10064,7 @@ exports.MODEL_FUNCTION_FIREBASE_CRUD_FUNCTION_SPECIFIER_SPLITTER = MODEL_FUNCTIO
|
|
|
9936
10064
|
exports.MODEL_STORAGE_FILE_SLASH_PATH_FACTORY = MODEL_STORAGE_FILE_SLASH_PATH_FACTORY;
|
|
9937
10065
|
exports.ModifyBeforeSetFirestoreDocumentDataAccessorWrapper = ModifyBeforeSetFirestoreDocumentDataAccessorWrapper;
|
|
9938
10066
|
exports.NOTIFICATION_BOX_DOES_NOT_EXIST_ERROR_CODE = NOTIFICATION_BOX_DOES_NOT_EXIST_ERROR_CODE;
|
|
10067
|
+
exports.NOTIFICATION_BOX_EXCLUSION_TARGET_INVALID_ERROR_CODE = NOTIFICATION_BOX_EXCLUSION_TARGET_INVALID_ERROR_CODE;
|
|
9939
10068
|
exports.NOTIFICATION_BOX_EXISTS_FOR_MODEL_ERROR_CODE = NOTIFICATION_BOX_EXISTS_FOR_MODEL_ERROR_CODE;
|
|
9940
10069
|
exports.NOTIFICATION_BOX_RECIPIENT_DOES_NOT_EXIST_ERROR_CODE = NOTIFICATION_BOX_RECIPIENT_DOES_NOT_EXIST_ERROR_CODE;
|
|
9941
10070
|
exports.NOTIFICATION_MESSAGE_MAX_LENGTH = NOTIFICATION_MESSAGE_MAX_LENGTH;
|
|
@@ -9988,6 +10117,7 @@ exports.allChildDocumentsUnderRelativePath = allChildDocumentsUnderRelativePath;
|
|
|
9988
10117
|
exports.allowDocumentSnapshotWithPathOnceFilter = allowDocumentSnapshotWithPathOnceFilter;
|
|
9989
10118
|
exports.allowedNotificationRecipients = allowedNotificationRecipients;
|
|
9990
10119
|
exports.appNotificationTemplateTypeInfoRecordService = appNotificationTemplateTypeInfoRecordService;
|
|
10120
|
+
exports.applyExclusionsToNotificationUserNotificationBoxRecipientConfigs = applyExclusionsToNotificationUserNotificationBoxRecipientConfigs;
|
|
9991
10121
|
exports.arrayUpdateWithAccessorFunction = arrayUpdateWithAccessorFunction;
|
|
9992
10122
|
exports.asTopLevelFieldPath = asTopLevelFieldPath;
|
|
9993
10123
|
exports.asTopLevelFieldPaths = asTopLevelFieldPaths;
|
|
@@ -9999,6 +10129,7 @@ exports.assignUnitedStatesAddressFunction = assignUnitedStatesAddressFunction;
|
|
|
9999
10129
|
exports.assignWebsiteFileLinkFunction = assignWebsiteFileLinkFunction;
|
|
10000
10130
|
exports.assignWebsiteLinkFunction = assignWebsiteLinkFunction;
|
|
10001
10131
|
exports.buildFirebaseCollectionTypeModelTypeMap = buildFirebaseCollectionTypeModelTypeMap;
|
|
10132
|
+
exports.calculateNsForNotificationUserNotificationBoxRecipientConfigs = calculateNsForNotificationUserNotificationBoxRecipientConfigs;
|
|
10002
10133
|
exports.callModelFirebaseFunctionMapFactory = callModelFirebaseFunctionMapFactory;
|
|
10003
10134
|
exports.childFirestoreModelKey = childFirestoreModelKey;
|
|
10004
10135
|
exports.childFirestoreModelKeyPath = childFirestoreModelKeyPath;
|
|
@@ -10267,6 +10398,7 @@ exports.notificationFunctionMap = notificationFunctionMap;
|
|
|
10267
10398
|
exports.notificationFunctionTypeConfigMap = notificationFunctionTypeConfigMap;
|
|
10268
10399
|
exports.notificationIdentity = notificationIdentity;
|
|
10269
10400
|
exports.notificationMessageFunction = notificationMessageFunction;
|
|
10401
|
+
exports.notificationSendExclusionCanSendFunction = notificationSendExclusionCanSendFunction;
|
|
10270
10402
|
exports.notificationSendFlagsImplyIsComplete = notificationSendFlagsImplyIsComplete;
|
|
10271
10403
|
exports.notificationSummariesFlaggedForNeedsInitializationQuery = notificationSummariesFlaggedForNeedsInitializationQuery;
|
|
10272
10404
|
exports.notificationSummaryCollectionReference = notificationSummaryCollectionReference;
|
|
@@ -10284,6 +10416,7 @@ exports.notificationTemplateTypeInfoRecord = notificationTemplateTypeInfoRecord;
|
|
|
10284
10416
|
exports.notificationUserCollectionReference = notificationUserCollectionReference;
|
|
10285
10417
|
exports.notificationUserConverter = notificationUserConverter;
|
|
10286
10418
|
exports.notificationUserFirestoreCollection = notificationUserFirestoreCollection;
|
|
10419
|
+
exports.notificationUserHasExclusionQuery = notificationUserHasExclusionQuery;
|
|
10287
10420
|
exports.notificationUserIdentity = notificationUserIdentity;
|
|
10288
10421
|
exports.notificationUsersFlaggedForNeedsSyncQuery = notificationUsersFlaggedForNeedsSyncQuery;
|
|
10289
10422
|
exports.notificationWeekCollectionReference = notificationWeekCollectionReference;
|
|
@@ -10347,6 +10480,7 @@ exports.updateNotificationRecipient = updateNotificationRecipient;
|
|
|
10347
10480
|
exports.updateNotificationUserDefaultNotificationBoxRecipientConfig = updateNotificationUserDefaultNotificationBoxRecipientConfig;
|
|
10348
10481
|
exports.updateNotificationUserNotificationBoxRecipientConfigIfChanged = updateNotificationUserNotificationBoxRecipientConfigIfChanged;
|
|
10349
10482
|
exports.updateNotificationUserNotificationBoxRecipientConfigs = updateNotificationUserNotificationBoxRecipientConfigs;
|
|
10483
|
+
exports.updateNotificationUserNotificationSendExclusions = updateNotificationUserNotificationSendExclusions;
|
|
10350
10484
|
exports.updateWithAccessorUpdateAndConverterFunction = updateWithAccessorUpdateAndConverterFunction;
|
|
10351
10485
|
exports.useContextAuth = useContextAuth;
|
|
10352
10486
|
exports.useContextAuthUid = useContextAuthUid;
|