@dereekb/firebase 13.12.3 → 13.12.5
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/eslint/index.cjs.js +1586 -50
- package/eslint/index.esm.js +1540 -7
- package/eslint/package.json +3 -3
- package/eslint/src/lib/index.d.ts +2 -0
- package/eslint/src/lib/plugin.d.ts +4 -0
- package/eslint/src/lib/require-api-crud-spec-for-group.rule.d.ts +47 -0
- package/eslint/src/lib/require-canonical-api-spec-filename.rule.d.ts +55 -0
- package/eslint/src/lib/require-complete-crud-function-config-map.rule.d.ts +1 -1
- package/index.cjs.js +304 -85
- package/index.esm.js +299 -87
- package/package.json +5 -5
- package/src/lib/client/error/error.d.ts +6 -0
- package/src/lib/client/function/error.d.ts +6 -0
- package/src/lib/client/function/function.callable.d.ts +6 -0
- package/src/lib/common/auth/auth.d.ts +70 -0
- package/src/lib/common/auth/auth.error.d.ts +6 -0
- package/src/lib/model/oidcmodel/oidcmodel.api.d.ts +4 -2
- package/src/lib/model/oidcmodel/oidcmodel.interaction.d.ts +106 -2
- package/test/package.json +6 -6
package/index.cjs.js
CHANGED
|
@@ -27,6 +27,12 @@ function _type_of$c(obj) {
|
|
|
27
27
|
* @param error - The value to check.
|
|
28
28
|
* @returns `true` if the input matches the shape of a client-side `FirebaseError`
|
|
29
29
|
*
|
|
30
|
+
* @dbxUtil
|
|
31
|
+
* @dbxUtilCategory firebase-error
|
|
32
|
+
* @dbxUtilKind function
|
|
33
|
+
* @dbxUtilTags firebase, client, error, type-guard, callable
|
|
34
|
+
* @dbxUtilRelated convert-https-callable-error-to-readable-error, firebase-server-error
|
|
35
|
+
*
|
|
30
36
|
* @example
|
|
31
37
|
* ```ts
|
|
32
38
|
* try {
|
|
@@ -1742,12 +1748,12 @@ var AbstractFirestoreDocumentWithParent = /*#__PURE__*/ function(AbstractFiresto
|
|
|
1742
1748
|
x.loadDocumentForWriteBatch = singleAccessor.loadDocumentForWriteBatch;
|
|
1743
1749
|
}
|
|
1744
1750
|
|
|
1745
|
-
function _array_like_to_array$
|
|
1751
|
+
function _array_like_to_array$h(arr, len) {
|
|
1746
1752
|
if (len == null || len > arr.length) len = arr.length;
|
|
1747
1753
|
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
1748
1754
|
return arr2;
|
|
1749
1755
|
}
|
|
1750
|
-
function _array_with_holes$
|
|
1756
|
+
function _array_with_holes$5(arr) {
|
|
1751
1757
|
if (Array.isArray(arr)) return arr;
|
|
1752
1758
|
}
|
|
1753
1759
|
function asyncGeneratorStep$k(gen, resolve, reject, _next, _throw, key, arg) {
|
|
@@ -1779,7 +1785,7 @@ function _async_to_generator$k(fn) {
|
|
|
1779
1785
|
});
|
|
1780
1786
|
};
|
|
1781
1787
|
}
|
|
1782
|
-
function _iterable_to_array_limit$
|
|
1788
|
+
function _iterable_to_array_limit$5(arr, i) {
|
|
1783
1789
|
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
1784
1790
|
if (_i == null) return;
|
|
1785
1791
|
var _arr = [];
|
|
@@ -1803,19 +1809,19 @@ function _iterable_to_array_limit$4(arr, i) {
|
|
|
1803
1809
|
}
|
|
1804
1810
|
return _arr;
|
|
1805
1811
|
}
|
|
1806
|
-
function _non_iterable_rest$
|
|
1812
|
+
function _non_iterable_rest$5() {
|
|
1807
1813
|
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
1808
1814
|
}
|
|
1809
|
-
function _sliced_to_array$
|
|
1810
|
-
return _array_with_holes$
|
|
1815
|
+
function _sliced_to_array$5(arr, i) {
|
|
1816
|
+
return _array_with_holes$5(arr) || _iterable_to_array_limit$5(arr, i) || _unsupported_iterable_to_array$h(arr, i) || _non_iterable_rest$5();
|
|
1811
1817
|
}
|
|
1812
|
-
function _unsupported_iterable_to_array$
|
|
1818
|
+
function _unsupported_iterable_to_array$h(o, minLen) {
|
|
1813
1819
|
if (!o) return;
|
|
1814
|
-
if (typeof o === "string") return _array_like_to_array$
|
|
1820
|
+
if (typeof o === "string") return _array_like_to_array$h(o, minLen);
|
|
1815
1821
|
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
1816
1822
|
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
1817
1823
|
if (n === "Map" || n === "Set") return Array.from(n);
|
|
1818
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$
|
|
1824
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$h(o, minLen);
|
|
1819
1825
|
}
|
|
1820
1826
|
function _ts_generator$k(thisArg, body) {
|
|
1821
1827
|
var f, y, t, _ = {
|
|
@@ -1971,7 +1977,7 @@ function _ts_generator$k(thisArg, body) {
|
|
|
1971
1977
|
var _iteratorNormalCompletion1 = true, _didIteratorError1 = false, _iteratorError1 = undefined;
|
|
1972
1978
|
try {
|
|
1973
1979
|
for(var _iterator1 = pageBuckets[Symbol.iterator](), _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = true){
|
|
1974
|
-
var _step_value = _sliced_to_array$
|
|
1980
|
+
var _step_value = _sliced_to_array$5(_step1.value, 2), pageId2 = _step_value[0], pageItems = _step_value[1];
|
|
1975
1981
|
if (pageItems.length === 0) {
|
|
1976
1982
|
continue;
|
|
1977
1983
|
}
|
|
@@ -5678,13 +5684,13 @@ function firebaseQueryItemAccumulator(iteration, mapItem) {
|
|
|
5678
5684
|
return firebaseQuerySnapshotAccumulator(iteration, mapFn);
|
|
5679
5685
|
}
|
|
5680
5686
|
|
|
5681
|
-
function _array_like_to_array$
|
|
5687
|
+
function _array_like_to_array$g(arr, len) {
|
|
5682
5688
|
if (len == null || len > arr.length) len = arr.length;
|
|
5683
5689
|
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
5684
5690
|
return arr2;
|
|
5685
5691
|
}
|
|
5686
5692
|
function _array_without_holes$b(arr) {
|
|
5687
|
-
if (Array.isArray(arr)) return _array_like_to_array$
|
|
5693
|
+
if (Array.isArray(arr)) return _array_like_to_array$g(arr);
|
|
5688
5694
|
}
|
|
5689
5695
|
function _iterable_to_array$b(iter) {
|
|
5690
5696
|
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
@@ -5693,15 +5699,15 @@ function _non_iterable_spread$b() {
|
|
|
5693
5699
|
throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
5694
5700
|
}
|
|
5695
5701
|
function _to_consumable_array$b(arr) {
|
|
5696
|
-
return _array_without_holes$b(arr) || _iterable_to_array$b(arr) || _unsupported_iterable_to_array$
|
|
5702
|
+
return _array_without_holes$b(arr) || _iterable_to_array$b(arr) || _unsupported_iterable_to_array$g(arr) || _non_iterable_spread$b();
|
|
5697
5703
|
}
|
|
5698
|
-
function _unsupported_iterable_to_array$
|
|
5704
|
+
function _unsupported_iterable_to_array$g(o, minLen) {
|
|
5699
5705
|
if (!o) return;
|
|
5700
|
-
if (typeof o === "string") return _array_like_to_array$
|
|
5706
|
+
if (typeof o === "string") return _array_like_to_array$g(o, minLen);
|
|
5701
5707
|
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
5702
5708
|
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
5703
5709
|
if (n === "Map" || n === "Set") return Array.from(n);
|
|
5704
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$
|
|
5710
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$g(o, minLen);
|
|
5705
5711
|
}
|
|
5706
5712
|
/**
|
|
5707
5713
|
* Creates a {@link FirestoreQueryConstraint} with the given type identifier and data.
|
|
@@ -6277,13 +6283,13 @@ function whereDateIsBeforeWithSort(fieldPath) {
|
|
|
6277
6283
|
];
|
|
6278
6284
|
}
|
|
6279
6285
|
|
|
6280
|
-
function _array_like_to_array$
|
|
6286
|
+
function _array_like_to_array$f(arr, len) {
|
|
6281
6287
|
if (len == null || len > arr.length) len = arr.length;
|
|
6282
6288
|
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
6283
6289
|
return arr2;
|
|
6284
6290
|
}
|
|
6285
6291
|
function _array_without_holes$a(arr) {
|
|
6286
|
-
if (Array.isArray(arr)) return _array_like_to_array$
|
|
6292
|
+
if (Array.isArray(arr)) return _array_like_to_array$f(arr);
|
|
6287
6293
|
}
|
|
6288
6294
|
function _define_property$t(obj, key, value) {
|
|
6289
6295
|
if (key in obj) {
|
|
@@ -6339,15 +6345,15 @@ function _object_spread_props$j(target, source) {
|
|
|
6339
6345
|
return target;
|
|
6340
6346
|
}
|
|
6341
6347
|
function _to_consumable_array$a(arr) {
|
|
6342
|
-
return _array_without_holes$a(arr) || _iterable_to_array$a(arr) || _unsupported_iterable_to_array$
|
|
6348
|
+
return _array_without_holes$a(arr) || _iterable_to_array$a(arr) || _unsupported_iterable_to_array$f(arr) || _non_iterable_spread$a();
|
|
6343
6349
|
}
|
|
6344
|
-
function _unsupported_iterable_to_array$
|
|
6350
|
+
function _unsupported_iterable_to_array$f(o, minLen) {
|
|
6345
6351
|
if (!o) return;
|
|
6346
|
-
if (typeof o === "string") return _array_like_to_array$
|
|
6352
|
+
if (typeof o === "string") return _array_like_to_array$f(o, minLen);
|
|
6347
6353
|
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
6348
6354
|
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
6349
6355
|
if (n === "Map" || n === "Set") return Array.from(n);
|
|
6350
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$
|
|
6356
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$f(o, minLen);
|
|
6351
6357
|
}
|
|
6352
6358
|
/**
|
|
6353
6359
|
* Filters out constraints that should not be directly specified in pagination queries.
|
|
@@ -6689,13 +6695,13 @@ function _firestoreItemPageIterationWithSnapshotIteration(snapshotIteration) {
|
|
|
6689
6695
|
return _firestoreItemPageIterationWithSnapshotIteration(snapshotIteration);
|
|
6690
6696
|
}
|
|
6691
6697
|
|
|
6692
|
-
function _array_like_to_array$
|
|
6698
|
+
function _array_like_to_array$e(arr, len) {
|
|
6693
6699
|
if (len == null || len > arr.length) len = arr.length;
|
|
6694
6700
|
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
6695
6701
|
return arr2;
|
|
6696
6702
|
}
|
|
6697
6703
|
function _array_without_holes$9(arr) {
|
|
6698
|
-
if (Array.isArray(arr)) return _array_like_to_array$
|
|
6704
|
+
if (Array.isArray(arr)) return _array_like_to_array$e(arr);
|
|
6699
6705
|
}
|
|
6700
6706
|
function asyncGeneratorStep$h(gen, resolve, reject, _next, _throw, key, arg) {
|
|
6701
6707
|
try {
|
|
@@ -6733,15 +6739,15 @@ function _non_iterable_spread$9() {
|
|
|
6733
6739
|
throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
6734
6740
|
}
|
|
6735
6741
|
function _to_consumable_array$9(arr) {
|
|
6736
|
-
return _array_without_holes$9(arr) || _iterable_to_array$9(arr) || _unsupported_iterable_to_array$
|
|
6742
|
+
return _array_without_holes$9(arr) || _iterable_to_array$9(arr) || _unsupported_iterable_to_array$e(arr) || _non_iterable_spread$9();
|
|
6737
6743
|
}
|
|
6738
|
-
function _unsupported_iterable_to_array$
|
|
6744
|
+
function _unsupported_iterable_to_array$e(o, minLen) {
|
|
6739
6745
|
if (!o) return;
|
|
6740
|
-
if (typeof o === "string") return _array_like_to_array$
|
|
6746
|
+
if (typeof o === "string") return _array_like_to_array$e(o, minLen);
|
|
6741
6747
|
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
6742
6748
|
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
6743
6749
|
if (n === "Map" || n === "Set") return Array.from(n);
|
|
6744
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$
|
|
6750
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$e(o, minLen);
|
|
6745
6751
|
}
|
|
6746
6752
|
function _ts_generator$h(thisArg, body) {
|
|
6747
6753
|
var f, y, t, _ = {
|
|
@@ -7012,12 +7018,12 @@ function _ts_generator$h(thisArg, body) {
|
|
|
7012
7018
|
return snapshot.ref.path;
|
|
7013
7019
|
}
|
|
7014
7020
|
|
|
7015
|
-
function _array_like_to_array$
|
|
7021
|
+
function _array_like_to_array$d(arr, len) {
|
|
7016
7022
|
if (len == null || len > arr.length) len = arr.length;
|
|
7017
7023
|
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
7018
7024
|
return arr2;
|
|
7019
7025
|
}
|
|
7020
|
-
function _array_with_holes$
|
|
7026
|
+
function _array_with_holes$4(arr) {
|
|
7021
7027
|
if (Array.isArray(arr)) return arr;
|
|
7022
7028
|
}
|
|
7023
7029
|
function asyncGeneratorStep$g(gen, resolve, reject, _next, _throw, key, arg) {
|
|
@@ -7062,7 +7068,7 @@ function _define_property$s(obj, key, value) {
|
|
|
7062
7068
|
}
|
|
7063
7069
|
return obj;
|
|
7064
7070
|
}
|
|
7065
|
-
function _iterable_to_array_limit$
|
|
7071
|
+
function _iterable_to_array_limit$4(arr, i) {
|
|
7066
7072
|
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
7067
7073
|
if (_i == null) return;
|
|
7068
7074
|
var _arr = [];
|
|
@@ -7086,7 +7092,7 @@ function _iterable_to_array_limit$3(arr, i) {
|
|
|
7086
7092
|
}
|
|
7087
7093
|
return _arr;
|
|
7088
7094
|
}
|
|
7089
|
-
function _non_iterable_rest$
|
|
7095
|
+
function _non_iterable_rest$4() {
|
|
7090
7096
|
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
7091
7097
|
}
|
|
7092
7098
|
function _object_spread$m(target) {
|
|
@@ -7123,16 +7129,16 @@ function _object_spread_props$i(target, source) {
|
|
|
7123
7129
|
}
|
|
7124
7130
|
return target;
|
|
7125
7131
|
}
|
|
7126
|
-
function _sliced_to_array$
|
|
7127
|
-
return _array_with_holes$
|
|
7132
|
+
function _sliced_to_array$4(arr, i) {
|
|
7133
|
+
return _array_with_holes$4(arr) || _iterable_to_array_limit$4(arr, i) || _unsupported_iterable_to_array$d(arr, i) || _non_iterable_rest$4();
|
|
7128
7134
|
}
|
|
7129
|
-
function _unsupported_iterable_to_array$
|
|
7135
|
+
function _unsupported_iterable_to_array$d(o, minLen) {
|
|
7130
7136
|
if (!o) return;
|
|
7131
|
-
if (typeof o === "string") return _array_like_to_array$
|
|
7137
|
+
if (typeof o === "string") return _array_like_to_array$d(o, minLen);
|
|
7132
7138
|
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
7133
7139
|
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
7134
7140
|
if (n === "Map" || n === "Set") return Array.from(n);
|
|
7135
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$
|
|
7141
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$d(o, minLen);
|
|
7136
7142
|
}
|
|
7137
7143
|
function _ts_generator$g(thisArg, body) {
|
|
7138
7144
|
var f, y, t, _ = {
|
|
@@ -7466,7 +7472,7 @@ function _ts_generator$g(thisArg, body) {
|
|
|
7466
7472
|
case 1:
|
|
7467
7473
|
performTasksResult = _state.sent();
|
|
7468
7474
|
result = performTasksResult.results.map(function(param, i) {
|
|
7469
|
-
var _param = _sliced_to_array$
|
|
7475
|
+
var _param = _sliced_to_array$4(param, 2), snapshots = _param[0], batchResult = _param[1];
|
|
7470
7476
|
return {
|
|
7471
7477
|
snapshots: snapshots,
|
|
7472
7478
|
result: batchResult,
|
|
@@ -8196,13 +8202,13 @@ function _ts_generator$f(thisArg, body) {
|
|
|
8196
8202
|
return type;
|
|
8197
8203
|
}
|
|
8198
8204
|
|
|
8199
|
-
function _array_like_to_array$
|
|
8205
|
+
function _array_like_to_array$c(arr, len) {
|
|
8200
8206
|
if (len == null || len > arr.length) len = arr.length;
|
|
8201
8207
|
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
8202
8208
|
return arr2;
|
|
8203
8209
|
}
|
|
8204
8210
|
function _array_without_holes$8(arr) {
|
|
8205
|
-
if (Array.isArray(arr)) return _array_like_to_array$
|
|
8211
|
+
if (Array.isArray(arr)) return _array_like_to_array$c(arr);
|
|
8206
8212
|
}
|
|
8207
8213
|
function asyncGeneratorStep$e(gen, resolve, reject, _next, _throw, key, arg) {
|
|
8208
8214
|
try {
|
|
@@ -8240,15 +8246,15 @@ function _non_iterable_spread$8() {
|
|
|
8240
8246
|
throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
8241
8247
|
}
|
|
8242
8248
|
function _to_consumable_array$8(arr) {
|
|
8243
|
-
return _array_without_holes$8(arr) || _iterable_to_array$8(arr) || _unsupported_iterable_to_array$
|
|
8249
|
+
return _array_without_holes$8(arr) || _iterable_to_array$8(arr) || _unsupported_iterable_to_array$c(arr) || _non_iterable_spread$8();
|
|
8244
8250
|
}
|
|
8245
|
-
function _unsupported_iterable_to_array$
|
|
8251
|
+
function _unsupported_iterable_to_array$c(o, minLen) {
|
|
8246
8252
|
if (!o) return;
|
|
8247
|
-
if (typeof o === "string") return _array_like_to_array$
|
|
8253
|
+
if (typeof o === "string") return _array_like_to_array$c(o, minLen);
|
|
8248
8254
|
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
8249
8255
|
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
8250
8256
|
if (n === "Map" || n === "Set") return Array.from(n);
|
|
8251
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$
|
|
8257
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$c(o, minLen);
|
|
8252
8258
|
}
|
|
8253
8259
|
function _ts_generator$e(thisArg, body) {
|
|
8254
8260
|
var f, y, t, _ = {
|
|
@@ -8485,13 +8491,13 @@ function _ts_generator$e(thisArg, body) {
|
|
|
8485
8491
|
};
|
|
8486
8492
|
}
|
|
8487
8493
|
|
|
8488
|
-
function _array_like_to_array$
|
|
8494
|
+
function _array_like_to_array$b(arr, len) {
|
|
8489
8495
|
if (len == null || len > arr.length) len = arr.length;
|
|
8490
8496
|
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
8491
8497
|
return arr2;
|
|
8492
8498
|
}
|
|
8493
8499
|
function _array_without_holes$7(arr) {
|
|
8494
|
-
if (Array.isArray(arr)) return _array_like_to_array$
|
|
8500
|
+
if (Array.isArray(arr)) return _array_like_to_array$b(arr);
|
|
8495
8501
|
}
|
|
8496
8502
|
function _define_property$r(obj, key, value) {
|
|
8497
8503
|
if (key in obj) {
|
|
@@ -8547,19 +8553,19 @@ function _object_spread_props$h(target, source) {
|
|
|
8547
8553
|
return target;
|
|
8548
8554
|
}
|
|
8549
8555
|
function _to_consumable_array$7(arr) {
|
|
8550
|
-
return _array_without_holes$7(arr) || _iterable_to_array$7(arr) || _unsupported_iterable_to_array$
|
|
8556
|
+
return _array_without_holes$7(arr) || _iterable_to_array$7(arr) || _unsupported_iterable_to_array$b(arr) || _non_iterable_spread$7();
|
|
8551
8557
|
}
|
|
8552
8558
|
function _type_of$9(obj) {
|
|
8553
8559
|
"@swc/helpers - typeof";
|
|
8554
8560
|
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
8555
8561
|
}
|
|
8556
|
-
function _unsupported_iterable_to_array$
|
|
8562
|
+
function _unsupported_iterable_to_array$b(o, minLen) {
|
|
8557
8563
|
if (!o) return;
|
|
8558
|
-
if (typeof o === "string") return _array_like_to_array$
|
|
8564
|
+
if (typeof o === "string") return _array_like_to_array$b(o, minLen);
|
|
8559
8565
|
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
8560
8566
|
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
8561
8567
|
if (n === "Map" || n === "Set") return Array.from(n);
|
|
8562
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$
|
|
8568
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$b(o, minLen);
|
|
8563
8569
|
}
|
|
8564
8570
|
/**
|
|
8565
8571
|
* Separator used in Firestore paths to separate collection and document IDs.
|
|
@@ -9422,13 +9428,13 @@ function _object_spread_props$f(target, source) {
|
|
|
9422
9428
|
});
|
|
9423
9429
|
}
|
|
9424
9430
|
|
|
9425
|
-
function _array_like_to_array$
|
|
9431
|
+
function _array_like_to_array$a(arr, len) {
|
|
9426
9432
|
if (len == null || len > arr.length) len = arr.length;
|
|
9427
9433
|
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
9428
9434
|
return arr2;
|
|
9429
9435
|
}
|
|
9430
9436
|
function _array_without_holes$6(arr) {
|
|
9431
|
-
if (Array.isArray(arr)) return _array_like_to_array$
|
|
9437
|
+
if (Array.isArray(arr)) return _array_like_to_array$a(arr);
|
|
9432
9438
|
}
|
|
9433
9439
|
function _define_property$o(obj, key, value) {
|
|
9434
9440
|
if (key in obj) {
|
|
@@ -9484,15 +9490,15 @@ function _object_spread_props$e(target, source) {
|
|
|
9484
9490
|
return target;
|
|
9485
9491
|
}
|
|
9486
9492
|
function _to_consumable_array$6(arr) {
|
|
9487
|
-
return _array_without_holes$6(arr) || _iterable_to_array$6(arr) || _unsupported_iterable_to_array$
|
|
9493
|
+
return _array_without_holes$6(arr) || _iterable_to_array$6(arr) || _unsupported_iterable_to_array$a(arr) || _non_iterable_spread$6();
|
|
9488
9494
|
}
|
|
9489
|
-
function _unsupported_iterable_to_array$
|
|
9495
|
+
function _unsupported_iterable_to_array$a(o, minLen) {
|
|
9490
9496
|
if (!o) return;
|
|
9491
|
-
if (typeof o === "string") return _array_like_to_array$
|
|
9497
|
+
if (typeof o === "string") return _array_like_to_array$a(o, minLen);
|
|
9492
9498
|
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
9493
9499
|
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
9494
9500
|
if (n === "Map" || n === "Set") return Array.from(n);
|
|
9495
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$
|
|
9501
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$a(o, minLen);
|
|
9496
9502
|
}
|
|
9497
9503
|
/**
|
|
9498
9504
|
* Creates a factory function for generating FirestoreContext instances.
|
|
@@ -9860,13 +9866,13 @@ function _ts_generator$d(thisArg, body) {
|
|
|
9860
9866
|
});
|
|
9861
9867
|
}
|
|
9862
9868
|
|
|
9863
|
-
function _array_like_to_array$
|
|
9869
|
+
function _array_like_to_array$9(arr, len) {
|
|
9864
9870
|
if (len == null || len > arr.length) len = arr.length;
|
|
9865
9871
|
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
9866
9872
|
return arr2;
|
|
9867
9873
|
}
|
|
9868
9874
|
function _array_without_holes$5(arr) {
|
|
9869
|
-
if (Array.isArray(arr)) return _array_like_to_array$
|
|
9875
|
+
if (Array.isArray(arr)) return _array_like_to_array$9(arr);
|
|
9870
9876
|
}
|
|
9871
9877
|
function _define_property$n(obj, key, value) {
|
|
9872
9878
|
if (key in obj) {
|
|
@@ -9903,15 +9909,15 @@ function _object_spread$h(target) {
|
|
|
9903
9909
|
return target;
|
|
9904
9910
|
}
|
|
9905
9911
|
function _to_consumable_array$5(arr) {
|
|
9906
|
-
return _array_without_holes$5(arr) || _iterable_to_array$5(arr) || _unsupported_iterable_to_array$
|
|
9912
|
+
return _array_without_holes$5(arr) || _iterable_to_array$5(arr) || _unsupported_iterable_to_array$9(arr) || _non_iterable_spread$5();
|
|
9907
9913
|
}
|
|
9908
|
-
function _unsupported_iterable_to_array$
|
|
9914
|
+
function _unsupported_iterable_to_array$9(o, minLen) {
|
|
9909
9915
|
if (!o) return;
|
|
9910
|
-
if (typeof o === "string") return _array_like_to_array$
|
|
9916
|
+
if (typeof o === "string") return _array_like_to_array$9(o, minLen);
|
|
9911
9917
|
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
9912
9918
|
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
9913
9919
|
if (n === "Map" || n === "Set") return Array.from(n);
|
|
9914
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$
|
|
9920
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$9(o, minLen);
|
|
9915
9921
|
}
|
|
9916
9922
|
/**
|
|
9917
9923
|
* Converts a {@link FirestoreAccessorArrayUpdate} into Firestore `UpdateData` using the
|
|
@@ -10689,13 +10695,13 @@ function _ts_generator$c(thisArg, body) {
|
|
|
10689
10695
|
};
|
|
10690
10696
|
}
|
|
10691
10697
|
|
|
10692
|
-
function _array_like_to_array$
|
|
10698
|
+
function _array_like_to_array$8(arr, len) {
|
|
10693
10699
|
if (len == null || len > arr.length) len = arr.length;
|
|
10694
10700
|
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
10695
10701
|
return arr2;
|
|
10696
10702
|
}
|
|
10697
10703
|
function _array_without_holes$4(arr) {
|
|
10698
|
-
if (Array.isArray(arr)) return _array_like_to_array$
|
|
10704
|
+
if (Array.isArray(arr)) return _array_like_to_array$8(arr);
|
|
10699
10705
|
}
|
|
10700
10706
|
function _define_property$j(obj, key, value) {
|
|
10701
10707
|
if (key in obj) {
|
|
@@ -10751,15 +10757,15 @@ function _object_spread_props$d(target, source) {
|
|
|
10751
10757
|
return target;
|
|
10752
10758
|
}
|
|
10753
10759
|
function _to_consumable_array$4(arr) {
|
|
10754
|
-
return _array_without_holes$4(arr) || _iterable_to_array$4(arr) || _unsupported_iterable_to_array$
|
|
10760
|
+
return _array_without_holes$4(arr) || _iterable_to_array$4(arr) || _unsupported_iterable_to_array$8(arr) || _non_iterable_spread$4();
|
|
10755
10761
|
}
|
|
10756
|
-
function _unsupported_iterable_to_array$
|
|
10762
|
+
function _unsupported_iterable_to_array$8(o, minLen) {
|
|
10757
10763
|
if (!o) return;
|
|
10758
|
-
if (typeof o === "string") return _array_like_to_array$
|
|
10764
|
+
if (typeof o === "string") return _array_like_to_array$8(o, minLen);
|
|
10759
10765
|
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
10760
10766
|
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
10761
10767
|
if (n === "Map" || n === "Set") return Array.from(n);
|
|
10762
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$
|
|
10768
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$8(o, minLen);
|
|
10763
10769
|
}
|
|
10764
10770
|
/**
|
|
10765
10771
|
* Appends one or more `QueryConstraint` values to the builder, returning a new builder instance.
|
|
@@ -11025,6 +11031,12 @@ function _is_native_reflect_construct$6() {
|
|
|
11025
11031
|
* Typically created via {@link convertHttpsCallableErrorToReadableError} when an `HttpsCallable`
|
|
11026
11032
|
* invocation fails with a server-side error that includes structured details.
|
|
11027
11033
|
*
|
|
11034
|
+
* @dbxUtil
|
|
11035
|
+
* @dbxUtilCategory firebase-error
|
|
11036
|
+
* @dbxUtilKind class
|
|
11037
|
+
* @dbxUtilTags firebase, https, callable, error, server-error, client, response, details
|
|
11038
|
+
* @dbxUtilRelated convert-https-callable-error-to-readable-error, is-client-firebase-error
|
|
11039
|
+
*
|
|
11028
11040
|
* @example
|
|
11029
11041
|
* ```ts
|
|
11030
11042
|
* try {
|
|
@@ -11344,6 +11356,12 @@ function mapHttpsCallable(callable, wrap) {
|
|
|
11344
11356
|
*
|
|
11345
11357
|
* @param error - The caught error from an `HttpsCallable` invocation.
|
|
11346
11358
|
* @returns A {@link FirebaseServerError} if the error has structured details, or a generic readable error otherwise.
|
|
11359
|
+
*
|
|
11360
|
+
* @dbxUtil
|
|
11361
|
+
* @dbxUtilCategory firebase-error
|
|
11362
|
+
* @dbxUtilKind function
|
|
11363
|
+
* @dbxUtilTags firebase, https, callable, error, decode, convert, readable, client, server
|
|
11364
|
+
* @dbxUtilRelated firebase-server-error, is-client-firebase-error, firebase-auth-error-to-readable-error
|
|
11347
11365
|
*/ function convertHttpsCallableErrorToReadableError(error) {
|
|
11348
11366
|
var result;
|
|
11349
11367
|
if ((typeof error === "undefined" ? "undefined" : _type_of$6(error)) === 'object') {
|
|
@@ -11535,15 +11553,15 @@ function onCallTypedModelParams(modelTypeInput, data, specifier, call) {
|
|
|
11535
11553
|
return onCallTypedModelParamsFunction(call)(modelTypeInput, data, specifier);
|
|
11536
11554
|
}
|
|
11537
11555
|
|
|
11538
|
-
function _array_like_to_array$
|
|
11556
|
+
function _array_like_to_array$7(arr, len) {
|
|
11539
11557
|
if (len == null || len > arr.length) len = arr.length;
|
|
11540
11558
|
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
11541
11559
|
return arr2;
|
|
11542
11560
|
}
|
|
11543
|
-
function _array_with_holes$
|
|
11561
|
+
function _array_with_holes$3(arr) {
|
|
11544
11562
|
if (Array.isArray(arr)) return arr;
|
|
11545
11563
|
}
|
|
11546
|
-
function _iterable_to_array_limit$
|
|
11564
|
+
function _iterable_to_array_limit$3(arr, i) {
|
|
11547
11565
|
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
11548
11566
|
if (_i == null) return;
|
|
11549
11567
|
var _arr = [];
|
|
@@ -11567,19 +11585,19 @@ function _iterable_to_array_limit$2(arr, i) {
|
|
|
11567
11585
|
}
|
|
11568
11586
|
return _arr;
|
|
11569
11587
|
}
|
|
11570
|
-
function _non_iterable_rest$
|
|
11588
|
+
function _non_iterable_rest$3() {
|
|
11571
11589
|
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
11572
11590
|
}
|
|
11573
|
-
function _sliced_to_array$
|
|
11574
|
-
return _array_with_holes$
|
|
11591
|
+
function _sliced_to_array$3(arr, i) {
|
|
11592
|
+
return _array_with_holes$3(arr) || _iterable_to_array_limit$3(arr, i) || _unsupported_iterable_to_array$7(arr, i) || _non_iterable_rest$3();
|
|
11575
11593
|
}
|
|
11576
|
-
function _unsupported_iterable_to_array$
|
|
11594
|
+
function _unsupported_iterable_to_array$7(o, minLen) {
|
|
11577
11595
|
if (!o) return;
|
|
11578
|
-
if (typeof o === "string") return _array_like_to_array$
|
|
11596
|
+
if (typeof o === "string") return _array_like_to_array$7(o, minLen);
|
|
11579
11597
|
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
11580
11598
|
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
11581
11599
|
if (n === "Map" || n === "Set") return Array.from(n);
|
|
11582
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$
|
|
11600
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$7(o, minLen);
|
|
11583
11601
|
}
|
|
11584
11602
|
/**
|
|
11585
11603
|
* Default specifier string (`'_'`) used when a CRUD operation has specifiers but one
|
|
@@ -11647,7 +11665,7 @@ function _unsupported_iterable_to_array$6(o, minLen) {
|
|
|
11647
11665
|
base: functionMap,
|
|
11648
11666
|
build: function build(x) {
|
|
11649
11667
|
Object.entries(crudConfigMap).forEach(function(param) {
|
|
11650
|
-
var _param = _sliced_to_array$
|
|
11668
|
+
var _param = _sliced_to_array$3(param, 2), modelType = _param[0], config = _param[1];
|
|
11651
11669
|
var assertCallKeyNotEncountered = function assertCallKeyNotEncountered(crud) {
|
|
11652
11670
|
if (encounteredCalls.has(crud)) {
|
|
11653
11671
|
throw new Error("Cannot have multiple declarations of the same crud. Found repeat for crud: ".concat(crud));
|
|
@@ -11676,7 +11694,7 @@ function _unsupported_iterable_to_array$6(o, minLen) {
|
|
|
11676
11694
|
}), crudFunctionKeys = _separateValues.included, specifiedCallFunctionKeys = _separateValues.excluded;
|
|
11677
11695
|
var crudFunctions = new Set(crudFunctionKeys);
|
|
11678
11696
|
var specifiedCallFunctionTuples = specifiedCallFunctionKeys.map(function(x) {
|
|
11679
|
-
var _x_split = _sliced_to_array$
|
|
11697
|
+
var _x_split = _sliced_to_array$3(x.split(':', 2), 2), crud = _x_split[0], functionsSplit = _x_split[1];
|
|
11680
11698
|
var functions = functionsSplit.split(MODEL_FUNCTION_FIREBASE_CRUD_FUNCTION_SPECIFIER_SPLITTER);
|
|
11681
11699
|
return [
|
|
11682
11700
|
crud,
|
|
@@ -11687,7 +11705,7 @@ function _unsupported_iterable_to_array$6(o, minLen) {
|
|
|
11687
11705
|
var encounteredCalls = new Set();
|
|
11688
11706
|
crudFunctions.forEach(assertCallKeyNotEncountered);
|
|
11689
11707
|
specifiedCallFunctionTuples.forEach(function(param) {
|
|
11690
|
-
var _param = _sliced_to_array$
|
|
11708
|
+
var _param = _sliced_to_array$3(param, 1), crud = _param[0];
|
|
11691
11709
|
return assertCallKeyNotEncountered(crud);
|
|
11692
11710
|
});
|
|
11693
11711
|
// build and add the functions
|
|
@@ -12033,6 +12051,52 @@ var OFFLINE_ACCESS_OIDC_SCOPE_DETAILS = {
|
|
|
12033
12051
|
OFFLINE_ACCESS_OIDC_SCOPE_DETAILS
|
|
12034
12052
|
];
|
|
12035
12053
|
|
|
12054
|
+
function _array_like_to_array$6(arr, len) {
|
|
12055
|
+
if (len == null || len > arr.length) len = arr.length;
|
|
12056
|
+
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
12057
|
+
return arr2;
|
|
12058
|
+
}
|
|
12059
|
+
function _array_with_holes$2(arr) {
|
|
12060
|
+
if (Array.isArray(arr)) return arr;
|
|
12061
|
+
}
|
|
12062
|
+
function _iterable_to_array_limit$2(arr, i) {
|
|
12063
|
+
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
12064
|
+
if (_i == null) return;
|
|
12065
|
+
var _arr = [];
|
|
12066
|
+
var _n = true;
|
|
12067
|
+
var _d = false;
|
|
12068
|
+
var _s, _e;
|
|
12069
|
+
try {
|
|
12070
|
+
for(_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true){
|
|
12071
|
+
_arr.push(_s.value);
|
|
12072
|
+
if (i && _arr.length === i) break;
|
|
12073
|
+
}
|
|
12074
|
+
} catch (err) {
|
|
12075
|
+
_d = true;
|
|
12076
|
+
_e = err;
|
|
12077
|
+
} finally{
|
|
12078
|
+
try {
|
|
12079
|
+
if (!_n && _i["return"] != null) _i["return"]();
|
|
12080
|
+
} finally{
|
|
12081
|
+
if (_d) throw _e;
|
|
12082
|
+
}
|
|
12083
|
+
}
|
|
12084
|
+
return _arr;
|
|
12085
|
+
}
|
|
12086
|
+
function _non_iterable_rest$2() {
|
|
12087
|
+
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
12088
|
+
}
|
|
12089
|
+
function _sliced_to_array$2(arr, i) {
|
|
12090
|
+
return _array_with_holes$2(arr) || _iterable_to_array_limit$2(arr, i) || _unsupported_iterable_to_array$6(arr, i) || _non_iterable_rest$2();
|
|
12091
|
+
}
|
|
12092
|
+
function _unsupported_iterable_to_array$6(o, minLen) {
|
|
12093
|
+
if (!o) return;
|
|
12094
|
+
if (typeof o === "string") return _array_like_to_array$6(o, minLen);
|
|
12095
|
+
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
12096
|
+
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
12097
|
+
if (n === "Map" || n === "Set") return Array.from(n);
|
|
12098
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$6(o, minLen);
|
|
12099
|
+
}
|
|
12036
12100
|
/**
|
|
12037
12101
|
* Minimum password length enforced by Firebase Authentication.
|
|
12038
12102
|
*
|
|
@@ -12043,6 +12107,63 @@ var OFFLINE_ACCESS_OIDC_SCOPE_DETAILS = {
|
|
|
12043
12107
|
*
|
|
12044
12108
|
* Firebase has no posted upper limit, but passwords beyond 128 characters provide diminishing security value.
|
|
12045
12109
|
*/ var FIREBASE_AUTH_PASSWORD_MAX_LENGTH = 128;
|
|
12110
|
+
/**
|
|
12111
|
+
* Delimiter used when encoding a {@link FirebaseAuthOobCodeDataPair} into a {@link FirebaseAuthOobCode}.
|
|
12112
|
+
*
|
|
12113
|
+
* The encoded form is `${code}-${uid}` and splitting happens on the first delimiter occurrence,
|
|
12114
|
+
* so this only requires that the generated code/password not contain `-`. The uid is unrestricted
|
|
12115
|
+
* and may itself contain `-`.
|
|
12116
|
+
*
|
|
12117
|
+
* @dbxUtil
|
|
12118
|
+
* @dbxUtilCategory firebase-auth
|
|
12119
|
+
* @dbxUtilTags firebase, auth, oob, code, delimiter, constant
|
|
12120
|
+
* @dbxUtilRelated encode-firebase-auth-oob-code, decode-firebase-auth-oob-code
|
|
12121
|
+
*/ var FIREBASE_AUTH_OOB_CODE_DATA_PAIR_DELIMITER = '-';
|
|
12122
|
+
/**
|
|
12123
|
+
* Encodes a {@link FirebaseAuthOobCodeDataPair} into a URL-safe {@link FirebaseAuthOobCode}.
|
|
12124
|
+
*
|
|
12125
|
+
* The encoded form is `${code}-${uid}` — code first so that splitting on the first delimiter
|
|
12126
|
+
* still works even when the uid itself contains `-` (Firebase uids occasionally do).
|
|
12127
|
+
*
|
|
12128
|
+
* @dbxUtil
|
|
12129
|
+
* @dbxUtilCategory firebase-auth
|
|
12130
|
+
* @dbxUtilTags firebase, auth, oob, code, encode, uid, password, reset, setup, serialize
|
|
12131
|
+
* @dbxUtilRelated decode-firebase-auth-oob-code, firebase-auth-oob-code-data-pair-delimiter
|
|
12132
|
+
*
|
|
12133
|
+
* @example
|
|
12134
|
+
* ```ts
|
|
12135
|
+
* encodeFirebaseAuthOobCode({ uid: 'abc-123', code: 'xyz789' }); // 'xyz789-abc-123'
|
|
12136
|
+
* ```
|
|
12137
|
+
*/ function encodeFirebaseAuthOobCode(pair) {
|
|
12138
|
+
return "".concat(pair.code).concat(FIREBASE_AUTH_OOB_CODE_DATA_PAIR_DELIMITER).concat(pair.uid);
|
|
12139
|
+
}
|
|
12140
|
+
/**
|
|
12141
|
+
* Decodes a {@link FirebaseAuthOobCode} back into its {@link FirebaseAuthOobCodeDataPair}.
|
|
12142
|
+
*
|
|
12143
|
+
* Splits on the first `-` so uids containing additional `-` characters survive the round-trip
|
|
12144
|
+
* intact. Returns null when the input is missing the delimiter or has empty parts.
|
|
12145
|
+
*
|
|
12146
|
+
* @dbxUtil
|
|
12147
|
+
* @dbxUtilCategory firebase-auth
|
|
12148
|
+
* @dbxUtilTags firebase, auth, oob, code, decode, parse, uid, password, reset, setup, deserialize
|
|
12149
|
+
* @dbxUtilRelated encode-firebase-auth-oob-code, firebase-auth-oob-code-data-pair-delimiter
|
|
12150
|
+
*
|
|
12151
|
+
* @example
|
|
12152
|
+
* ```ts
|
|
12153
|
+
* decodeFirebaseAuthOobCode('xyz789-abc-123'); // { uid: 'abc-123', code: 'xyz789' }
|
|
12154
|
+
* decodeFirebaseAuthOobCode('invalid'); // null
|
|
12155
|
+
* ```
|
|
12156
|
+
*/ function decodeFirebaseAuthOobCode(oobCode) {
|
|
12157
|
+
var _splitStringAtFirstCharacterOccurence = _sliced_to_array$2(util.splitStringAtFirstCharacterOccurence(oobCode, FIREBASE_AUTH_OOB_CODE_DATA_PAIR_DELIMITER), 2), code = _splitStringAtFirstCharacterOccurence[0], uid = _splitStringAtFirstCharacterOccurence[1];
|
|
12158
|
+
var result = null;
|
|
12159
|
+
if (uid && code) {
|
|
12160
|
+
result = {
|
|
12161
|
+
uid: uid,
|
|
12162
|
+
code: code
|
|
12163
|
+
};
|
|
12164
|
+
}
|
|
12165
|
+
return result;
|
|
12166
|
+
}
|
|
12046
12167
|
var FIREBASE_SERVER_AUTH_CLAIMS_SETUP_PASSWORD_KEY = 'setupPassword';
|
|
12047
12168
|
var FIREBASE_SERVER_AUTH_CLAIMS_SETUP_LAST_COM_DATE_KEY = 'setupCommunicationAt';
|
|
12048
12169
|
var FIREBASE_SERVER_AUTH_CLAIMS_RESET_PASSWORD_KEY = 'resetPassword';
|
|
@@ -12106,6 +12227,12 @@ var FIREBASE_SERVER_AUTH_CLAIMS_RESET_EXPIRES_AT_KEY = 'resetExpiresAt';
|
|
|
12106
12227
|
* @param inputError - The Firebase Auth error to convert.
|
|
12107
12228
|
* @returns A {@link ReadableError} with a human-readable message suitable for display.
|
|
12108
12229
|
*
|
|
12230
|
+
* @dbxUtil
|
|
12231
|
+
* @dbxUtilCategory firebase-auth
|
|
12232
|
+
* @dbxUtilKind function
|
|
12233
|
+
* @dbxUtilTags firebase, auth, error, readable, convert, decode, message, login, signin
|
|
12234
|
+
* @dbxUtilRelated convert-https-callable-error-to-readable-error, firebase-server-error
|
|
12235
|
+
*
|
|
12109
12236
|
* @example
|
|
12110
12237
|
* ```ts
|
|
12111
12238
|
* try {
|
|
@@ -18674,7 +18801,7 @@ var updateOidcClientFieldParamsType = /* @__PURE__ */ arktype.type({
|
|
|
18674
18801
|
'dbx_max_session_ttl?': model.clearable('number')
|
|
18675
18802
|
});
|
|
18676
18803
|
var createOidcClientFieldParamsType = updateOidcClientFieldParamsType.merge(arktype.type({
|
|
18677
|
-
token_endpoint_auth_method: "'client_secret_basic' | 'client_secret_post' | 'client_secret_jwt' | 'private_key_jwt'"
|
|
18804
|
+
token_endpoint_auth_method: "'client_secret_basic' | 'client_secret_post' | 'client_secret_jwt' | 'private_key_jwt' | 'none'"
|
|
18678
18805
|
}));
|
|
18679
18806
|
var createOidcClientParamsType = inferredTargetModelParamsType.merge(createOidcClientFieldParamsType);
|
|
18680
18807
|
var updateOidcClientParamsType = targetModelParamsType.merge(updateOidcClientFieldParamsType);
|
|
@@ -18706,25 +18833,110 @@ var OIDC_MODEL_CRUD_FUNCTIONS_CONFIG = {
|
|
|
18706
18833
|
* ```
|
|
18707
18834
|
*/ var oidcModelFunctionMap = callModelFirebaseFunctionMapFactory(OIDC_FUNCTION_TYPE_CONFIG_MAP, OIDC_MODEL_CRUD_FUNCTIONS_CONFIG);
|
|
18708
18835
|
|
|
18709
|
-
|
|
18836
|
+
/**
|
|
18837
|
+
* The `client_secret_basic` confidential-client auth method (RFC 6749 §2.3.1, the
|
|
18838
|
+
* OAuth 2.0 default): the client sends its `client_id` and `client_secret` in the
|
|
18839
|
+
* `Authorization: Basic` header on token-endpoint requests. Standard pick for
|
|
18840
|
+
* server-side confidential clients.
|
|
18841
|
+
*
|
|
18842
|
+
* @example
|
|
18843
|
+
* ```ts
|
|
18844
|
+
* await oidcClientService.createClient({
|
|
18845
|
+
* token_endpoint_auth_method: CLIENT_SECRET_BASIC_TOKEN_ENDPOINT_AUTH_METHOD,
|
|
18846
|
+
* // ...
|
|
18847
|
+
* });
|
|
18848
|
+
* ```
|
|
18849
|
+
*/ var CLIENT_SECRET_BASIC_TOKEN_ENDPOINT_AUTH_METHOD = 'client_secret_basic';
|
|
18850
|
+
/**
|
|
18851
|
+
* The `client_secret_post` confidential-client auth method (RFC 6749 §2.3.1, the
|
|
18852
|
+
* form-body variant): the client sends `client_id` and `client_secret` as form-encoded
|
|
18853
|
+
* parameters in the token-endpoint request body. Equivalent in security to
|
|
18854
|
+
* {@link CLIENT_SECRET_BASIC_TOKEN_ENDPOINT_AUTH_METHOD}; pick it for clients that
|
|
18855
|
+
* cannot set the `Authorization` header (some older HTTP stacks).
|
|
18856
|
+
*
|
|
18857
|
+
* @example
|
|
18858
|
+
* ```ts
|
|
18859
|
+
* await oidcClientService.createClient({
|
|
18860
|
+
* token_endpoint_auth_method: CLIENT_SECRET_POST_TOKEN_ENDPOINT_AUTH_METHOD,
|
|
18861
|
+
* // ...
|
|
18862
|
+
* });
|
|
18863
|
+
* ```
|
|
18864
|
+
*/ var CLIENT_SECRET_POST_TOKEN_ENDPOINT_AUTH_METHOD = 'client_secret_post';
|
|
18865
|
+
/**
|
|
18866
|
+
* The `client_secret_jwt` confidential-client auth method (OIDC Core §9): the client
|
|
18867
|
+
* signs a JWT client assertion using its `client_secret` as the HMAC key (HS256/HS384/HS512)
|
|
18868
|
+
* and sends it as `client_assertion` on token-endpoint requests. The secret never goes on
|
|
18869
|
+
* the wire — only the signed assertion — which is the upgrade over the plain
|
|
18870
|
+
* `client_secret_*` methods, without requiring asymmetric keys like
|
|
18871
|
+
* {@link PRIVATE_KEY_JWT_TOKEN_ENDPOINT_AUTH_METHOD}.
|
|
18872
|
+
*
|
|
18873
|
+
* @example
|
|
18874
|
+
* ```ts
|
|
18875
|
+
* await oidcClientService.createClient({
|
|
18876
|
+
* token_endpoint_auth_method: CLIENT_SECRET_JWT_TOKEN_ENDPOINT_AUTH_METHOD,
|
|
18877
|
+
* // ...
|
|
18878
|
+
* });
|
|
18879
|
+
* ```
|
|
18880
|
+
*/ var CLIENT_SECRET_JWT_TOKEN_ENDPOINT_AUTH_METHOD = 'client_secret_jwt';
|
|
18881
|
+
/**
|
|
18882
|
+
* The `private_key_jwt` confidential-client auth method (OIDC Core §9): the client signs
|
|
18883
|
+
* a JWT client assertion with its private key (RS256/ES256/PS256) and sends it as
|
|
18884
|
+
* `client_assertion`; the server verifies via the client's published `jwks` / `jwks_uri`.
|
|
18885
|
+
* Strongest of the confidential-client methods — no shared secret is ever held by the
|
|
18886
|
+
* server — and the canonical pick for high-trust server-to-server integrations.
|
|
18887
|
+
*
|
|
18888
|
+
* @example
|
|
18889
|
+
* ```ts
|
|
18890
|
+
* await oidcClientService.createClient({
|
|
18891
|
+
* token_endpoint_auth_method: PRIVATE_KEY_JWT_TOKEN_ENDPOINT_AUTH_METHOD,
|
|
18892
|
+
* jwks: { keys: [publicJwk] },
|
|
18893
|
+
* // ...
|
|
18894
|
+
* });
|
|
18895
|
+
* ```
|
|
18896
|
+
*/ var PRIVATE_KEY_JWT_TOKEN_ENDPOINT_AUTH_METHOD = 'private_key_jwt';
|
|
18897
|
+
/**
|
|
18898
|
+
* The public-client auth method (`'none'`): no client secret, PKCE-only. The client
|
|
18899
|
+
* authenticates the `authorization_code` flow with PKCE (RFC 7636) alone — there is no
|
|
18900
|
+
* shared secret and no client assertion. Canonical pick for clients that cannot keep a
|
|
18901
|
+
* secret (native apps, SPAs, CLIs) and what the MCP / Claude connector ecosystem
|
|
18902
|
+
* (claude.ai connector, Claude Code CLI, mcp-inspector via DCR) registers as.
|
|
18903
|
+
*
|
|
18904
|
+
* Mirrors {@link PRIVATE_KEY_JWT_TOKEN_ENDPOINT_AUTH_METHOD}. `oidc-provider` still
|
|
18905
|
+
* enforces PKCE on the `authorization_code` flow for every client regardless of auth
|
|
18906
|
+
* method, so `'none'` simply unlocks the secret-less variant rather than disabling any
|
|
18907
|
+
* client authentication.
|
|
18908
|
+
*
|
|
18909
|
+
* @example
|
|
18910
|
+
* ```ts
|
|
18911
|
+
* await oidcClientService.createClient({
|
|
18912
|
+
* token_endpoint_auth_method: PUBLIC_PKCE_TOKEN_ENDPOINT_AUTH_METHOD,
|
|
18913
|
+
* // no client_secret — public PKCE client
|
|
18914
|
+
* // ...
|
|
18915
|
+
* });
|
|
18916
|
+
* ```
|
|
18917
|
+
*/ var PUBLIC_PKCE_TOKEN_ENDPOINT_AUTH_METHOD = 'none';
|
|
18710
18918
|
/**
|
|
18711
18919
|
* All available token endpoint auth method options with display labels.
|
|
18712
18920
|
*/ var ALL_OIDC_TOKEN_ENDPOINT_AUTH_METHOD_OPTIONS = [
|
|
18713
18921
|
{
|
|
18714
18922
|
label: 'Client Secret Basic',
|
|
18715
|
-
value:
|
|
18923
|
+
value: CLIENT_SECRET_BASIC_TOKEN_ENDPOINT_AUTH_METHOD
|
|
18716
18924
|
},
|
|
18717
18925
|
{
|
|
18718
18926
|
label: 'Client Secret Post',
|
|
18719
|
-
value:
|
|
18927
|
+
value: CLIENT_SECRET_POST_TOKEN_ENDPOINT_AUTH_METHOD
|
|
18720
18928
|
},
|
|
18721
18929
|
{
|
|
18722
18930
|
label: 'Client Secret JWT',
|
|
18723
|
-
value:
|
|
18931
|
+
value: CLIENT_SECRET_JWT_TOKEN_ENDPOINT_AUTH_METHOD
|
|
18724
18932
|
},
|
|
18725
18933
|
{
|
|
18726
18934
|
label: 'Private Key JWT',
|
|
18727
18935
|
value: PRIVATE_KEY_JWT_TOKEN_ENDPOINT_AUTH_METHOD
|
|
18936
|
+
},
|
|
18937
|
+
{
|
|
18938
|
+
label: 'None (Public PKCE)',
|
|
18939
|
+
value: PUBLIC_PKCE_TOKEN_ENDPOINT_AUTH_METHOD
|
|
18728
18940
|
}
|
|
18729
18941
|
];
|
|
18730
18942
|
/**
|
|
@@ -21288,6 +21500,9 @@ exports.CALL_MODEL_OIDC_SCOPES = CALL_MODEL_OIDC_SCOPES;
|
|
|
21288
21500
|
exports.CALL_MODEL_OIDC_SCOPE_DETAILS = CALL_MODEL_OIDC_SCOPE_DETAILS;
|
|
21289
21501
|
exports.CALL_MODEL_OIDC_SCOPE_FOR_CALL_TYPE = CALL_MODEL_OIDC_SCOPE_FOR_CALL_TYPE;
|
|
21290
21502
|
exports.CALL_MODEL_OIDC_SCOPE_PREFIX = CALL_MODEL_OIDC_SCOPE_PREFIX;
|
|
21503
|
+
exports.CLIENT_SECRET_BASIC_TOKEN_ENDPOINT_AUTH_METHOD = CLIENT_SECRET_BASIC_TOKEN_ENDPOINT_AUTH_METHOD;
|
|
21504
|
+
exports.CLIENT_SECRET_JWT_TOKEN_ENDPOINT_AUTH_METHOD = CLIENT_SECRET_JWT_TOKEN_ENDPOINT_AUTH_METHOD;
|
|
21505
|
+
exports.CLIENT_SECRET_POST_TOKEN_ENDPOINT_AUTH_METHOD = CLIENT_SECRET_POST_TOKEN_ENDPOINT_AUTH_METHOD;
|
|
21291
21506
|
exports.CONFLICT_ERROR_CODE = CONFLICT_ERROR_CODE;
|
|
21292
21507
|
exports.COPY_USER_RELATED_DATA_ACCESSOR_FACTORY_FUNCTION = COPY_USER_RELATED_DATA_ACCESSOR_FACTORY_FUNCTION;
|
|
21293
21508
|
exports.CREATE_MODEL_OIDC_SCOPE = CREATE_MODEL_OIDC_SCOPE;
|
|
@@ -21336,6 +21551,7 @@ exports.FIREBASE_AUTH_EMAIL_ALREADY_IN_USE_ERROR = FIREBASE_AUTH_EMAIL_ALREADY_I
|
|
|
21336
21551
|
exports.FIREBASE_AUTH_INVALID_PHONE_NUMBER_ERROR = FIREBASE_AUTH_INVALID_PHONE_NUMBER_ERROR;
|
|
21337
21552
|
exports.FIREBASE_AUTH_NETWORK_REQUEST_ERROR = FIREBASE_AUTH_NETWORK_REQUEST_ERROR;
|
|
21338
21553
|
exports.FIREBASE_AUTH_NETWORK_REQUEST_FAILED = FIREBASE_AUTH_NETWORK_REQUEST_FAILED;
|
|
21554
|
+
exports.FIREBASE_AUTH_OOB_CODE_DATA_PAIR_DELIMITER = FIREBASE_AUTH_OOB_CODE_DATA_PAIR_DELIMITER;
|
|
21339
21555
|
exports.FIREBASE_AUTH_PASSWORD_MAX_LENGTH = FIREBASE_AUTH_PASSWORD_MAX_LENGTH;
|
|
21340
21556
|
exports.FIREBASE_AUTH_PASSWORD_MIN_LENGTH = FIREBASE_AUTH_PASSWORD_MIN_LENGTH;
|
|
21341
21557
|
exports.FIREBASE_AUTH_PHONE_NUMBER_ALREADY_EXISTS_ERROR = FIREBASE_AUTH_PHONE_NUMBER_ALREADY_EXISTS_ERROR;
|
|
@@ -21436,6 +21652,7 @@ exports.PERMISSION_DENIED_ERROR_CODE = PERMISSION_DENIED_ERROR_CODE;
|
|
|
21436
21652
|
exports.PRIVATE_KEY_JWT_TOKEN_ENDPOINT_AUTH_METHOD = PRIVATE_KEY_JWT_TOKEN_ENDPOINT_AUTH_METHOD;
|
|
21437
21653
|
exports.PROFILE_OIDC_SCOPE = PROFILE_OIDC_SCOPE;
|
|
21438
21654
|
exports.PROFILE_OIDC_SCOPE_DETAILS = PROFILE_OIDC_SCOPE_DETAILS;
|
|
21655
|
+
exports.PUBLIC_PKCE_TOKEN_ENDPOINT_AUTH_METHOD = PUBLIC_PKCE_TOKEN_ENDPOINT_AUTH_METHOD;
|
|
21439
21656
|
exports.QUERY_MODEL_OIDC_SCOPE = QUERY_MODEL_OIDC_SCOPE;
|
|
21440
21657
|
exports.READ_MODEL_OIDC_SCOPE = READ_MODEL_OIDC_SCOPE;
|
|
21441
21658
|
exports.RUN_DEV_FUNCTION_APP_FUNCTION_KEY = RUN_DEV_FUNCTION_APP_FUNCTION_KEY;
|
|
@@ -21547,6 +21764,7 @@ exports.createStorageFileParamsType = createStorageFileParamsType;
|
|
|
21547
21764
|
exports.createStorageFileSignedUploadUrlParamsType = createStorageFileSignedUploadUrlParamsType;
|
|
21548
21765
|
exports.dataFromDocumentSnapshots = dataFromDocumentSnapshots;
|
|
21549
21766
|
exports.dataFromSnapshotStream = dataFromSnapshotStream;
|
|
21767
|
+
exports.decodeFirebaseAuthOobCode = decodeFirebaseAuthOobCode;
|
|
21550
21768
|
exports.defaultPagedItemPageDataConverter = defaultPagedItemPageDataConverter;
|
|
21551
21769
|
exports.delayCompletion = delayCompletion;
|
|
21552
21770
|
exports.deleteAllQueuedStorageFilesParamsType = deleteAllQueuedStorageFilesParamsType;
|
|
@@ -21572,6 +21790,7 @@ exports.downloadMultipleStorageFilesParamsType = downloadMultipleStorageFilesPar
|
|
|
21572
21790
|
exports.downloadStorageFileParamsType = downloadStorageFileParamsType;
|
|
21573
21791
|
exports.effectiveNotificationBoxRecipientConfig = effectiveNotificationBoxRecipientConfig;
|
|
21574
21792
|
exports.effectiveNotificationBoxRecipientTemplateConfig = effectiveNotificationBoxRecipientTemplateConfig;
|
|
21793
|
+
exports.encodeFirebaseAuthOobCode = encodeFirebaseAuthOobCode;
|
|
21575
21794
|
exports.endAt = endAt;
|
|
21576
21795
|
exports.endAtValue = endAtValue;
|
|
21577
21796
|
exports.endBefore = endBefore;
|