@dereekb/firebase-server 13.11.14 → 13.11.16

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.
Files changed (102) hide show
  1. package/index.cjs.js +229 -199
  2. package/index.esm.js +230 -200
  3. package/mailgun/package.json +9 -9
  4. package/model/index.cjs.js +259 -270
  5. package/model/index.esm.js +259 -270
  6. package/model/package.json +9 -9
  7. package/model/src/lib/mailgun/notification.send.service.mailgun.d.ts +3 -3
  8. package/model/src/lib/notification/notification.action.server.d.ts +34 -34
  9. package/model/src/lib/notification/notification.action.server.init.d.ts +17 -17
  10. package/model/src/lib/notification/notification.config.service.d.ts +7 -7
  11. package/model/src/lib/notification/notification.create.run.d.ts +3 -3
  12. package/model/src/lib/notification/notification.error.d.ts +14 -14
  13. package/model/src/lib/notification/notification.expedite.service.d.ts +7 -7
  14. package/model/src/lib/notification/notification.module.d.ts +13 -13
  15. package/model/src/lib/notification/notification.send.service.notificationsummary.d.ts +2 -2
  16. package/model/src/lib/notification/notification.send.service.text.d.ts +1 -1
  17. package/model/src/lib/notification/notification.task.service.handler.d.ts +2 -2
  18. package/model/src/lib/notification/notification.task.service.util.d.ts +3 -3
  19. package/model/src/lib/notification/notification.task.subtask.handler.d.ts +3 -3
  20. package/model/src/lib/notification/notification.util.d.ts +8 -8
  21. package/model/src/lib/storagefile/storagefile.action.server.d.ts +43 -44
  22. package/model/src/lib/storagefile/storagefile.action.server.init.d.ts +11 -11
  23. package/model/src/lib/storagefile/storagefile.error.d.ts +15 -15
  24. package/model/src/lib/storagefile/storagefile.module.d.ts +10 -10
  25. package/model/src/lib/storagefile/storagefile.task.service.handler.d.ts +6 -6
  26. package/model/src/lib/storagefile/storagefile.upload.service.initializer.d.ts +5 -5
  27. package/model/src/lib/storagefile/storagefile.util.d.ts +2 -2
  28. package/oidc/index.cjs.js +225 -219
  29. package/oidc/index.esm.js +225 -219
  30. package/oidc/package.json +10 -10
  31. package/oidc/src/lib/controller/oidc.interaction.controller.d.ts +44 -25
  32. package/oidc/src/lib/controller/oidc.provider.controller.d.ts +1 -1
  33. package/oidc/src/lib/controller/oidc.wellknown.controller.d.ts +3 -3
  34. package/oidc/src/lib/middleware/oauth-cors.module.d.ts +1 -1
  35. package/oidc/src/lib/model/jwks/jwks.d.ts +6 -6
  36. package/oidc/src/lib/model/jwks/jwks.query.d.ts +11 -5
  37. package/oidc/src/lib/model/oidc/oidcmodel.action.server.d.ts +12 -12
  38. package/oidc/src/lib/model/oidc/oidcmodel.module.d.ts +5 -5
  39. package/oidc/src/lib/oidc.config.d.ts +1 -1
  40. package/oidc/src/lib/oidc.module.d.ts +8 -8
  41. package/oidc/src/lib/service/oidc.account.service.d.ts +4 -4
  42. package/oidc/src/lib/service/oidc.adapter.service.d.ts +4 -4
  43. package/oidc/src/lib/service/oidc.client.service.d.ts +3 -3
  44. package/oidc/src/lib/service/oidc.config.service.d.ts +1 -1
  45. package/oidc/src/lib/service/oidc.encryption.service.d.ts +4 -4
  46. package/oidc/src/lib/service/oidc.interaction.service.d.ts +14 -14
  47. package/oidc/src/lib/service/oidc.jwks.service.d.ts +6 -6
  48. package/oidc/src/lib/service/oidc.service.d.ts +5 -5
  49. package/package.json +10 -10
  50. package/src/lib/auth/auth.service.d.ts +8 -8
  51. package/src/lib/auth/auth.util.d.ts +1 -1
  52. package/src/lib/env/env.config.d.ts +5 -4
  53. package/src/lib/firestore/driver.accessor.batch.d.ts +2 -1
  54. package/src/lib/firestore/driver.accessor.d.ts +1 -1
  55. package/src/lib/firestore/driver.accessor.default.d.ts +2 -1
  56. package/src/lib/firestore/driver.accessor.transaction.d.ts +2 -1
  57. package/src/lib/firestore/snapshot/snapshot.field.encrypt.d.ts +10 -6
  58. package/src/lib/function/type.d.ts +4 -4
  59. package/src/lib/nest/analytics/analytics.module.d.ts +6 -5
  60. package/src/lib/nest/app.d.ts +4 -4
  61. package/src/lib/nest/app.module.d.ts +3 -2
  62. package/src/lib/nest/auth/auth.module.d.ts +4 -3
  63. package/src/lib/nest/controller/model/model.api.controller.d.ts +1 -0
  64. package/src/lib/nest/controller/model/model.api.get.service.d.ts +1 -1
  65. package/src/lib/nest/controller/model/model.api.module.d.ts +4 -3
  66. package/src/lib/nest/development/development.function.d.ts +1 -1
  67. package/src/lib/nest/development/development.schedule.function.error.d.ts +2 -2
  68. package/src/lib/nest/env/env.util.d.ts +2 -2
  69. package/src/lib/nest/firestore/firestore.module.d.ts +16 -15
  70. package/src/lib/nest/function/call.d.ts +6 -6
  71. package/src/lib/nest/function/context.d.ts +7 -6
  72. package/src/lib/nest/function/v2/blocking.d.ts +8 -6
  73. package/src/lib/nest/function/v2/call.d.ts +7 -5
  74. package/src/lib/nest/function/v2/event.d.ts +3 -2
  75. package/src/lib/nest/function/v2/schedule.d.ts +3 -2
  76. package/src/lib/nest/function/v2/taskqueue.d.ts +2 -1
  77. package/src/lib/nest/model/analytics.emit.d.ts +5 -5
  78. package/src/lib/nest/model/api.details.d.ts +4 -4
  79. package/src/lib/nest/model/query.model.function.d.ts +3 -3
  80. package/src/lib/nest/nest.provider.d.ts +7 -7
  81. package/src/lib/nest/storage/storage.module.d.ts +6 -5
  82. package/src/lib/storage/driver.accessor.d.ts +10 -10
  83. package/test/index.cjs.js +48 -57
  84. package/test/index.esm.js +48 -57
  85. package/test/package.json +11 -11
  86. package/test/src/lib/firebase/firebase.admin.auth.d.ts +18 -18
  87. package/test/src/lib/firebase/firebase.admin.collection.d.ts +7 -7
  88. package/test/src/lib/firebase/firebase.admin.d.ts +2 -2
  89. package/test/src/lib/firebase/firebase.admin.function.d.ts +2 -2
  90. package/test/src/lib/firebase/firebase.admin.nest.function.callable.context.d.ts +1 -1
  91. package/test/src/lib/firebase/firebase.admin.nest.function.cloud.context.d.ts +3 -3
  92. package/test/src/lib/firebase/firebase.d.ts +6 -5
  93. package/test/src/lib/firebase/firebase.function.d.ts +31 -31
  94. package/test/src/lib/firestore/firestore.d.ts +2 -2
  95. package/test/src/lib/oidc/oidc.test.fixture.d.ts +1 -1
  96. package/test/src/lib/oidc/oidc.test.flow.d.ts +1 -1
  97. package/test/src/lib/storage/storage.d.ts +2 -2
  98. package/zoho/index.cjs.js +2 -2
  99. package/zoho/index.esm.js +2 -2
  100. package/zoho/package.json +9 -9
  101. package/zoho/src/lib/zoho.accounts.firebase.d.ts +1 -1
  102. package/zoho/src/lib/zoho.accounts.firebase.system.d.ts +1 -1
package/index.cjs.js CHANGED
@@ -580,7 +580,7 @@ function _ts_generator$h(thisArg, body) {
580
580
  *
581
581
  * Any error other than {@link FIREBASE_AUTH_USER_NOT_FOUND_ERROR} is re-thrown.
582
582
  *
583
- * @param promise - A promise resolving to a UserRecord (e.g., from `auth.getUser(uid)`).
583
+ * @param promise - Promise resolving to a UserRecord (e.g., from `auth.getUser(uid)`).
584
584
  * @returns The user record, or `undefined` if the user does not exist.
585
585
  *
586
586
  * @example
@@ -592,7 +592,7 @@ function _ts_generator$h(thisArg, body) {
592
592
  * ```
593
593
  */ function getAuthUserOrUndefined(promise) {
594
594
  return _async_to_generator$h(function() {
595
- var error;
595
+ var result, error;
596
596
  return _ts_generator$h(this, function(_state) {
597
597
  switch(_state.label){
598
598
  case 0:
@@ -607,22 +607,24 @@ function _ts_generator$h(thisArg, body) {
607
607
  promise
608
608
  ];
609
609
  case 1:
610
+ result = _state.sent();
610
611
  return [
611
- 2,
612
- _state.sent()
612
+ 3,
613
+ 3
613
614
  ];
614
615
  case 2:
615
616
  error = _state.sent();
616
- if (error.code === firebase.FIREBASE_AUTH_USER_NOT_FOUND_ERROR) {
617
- return [
618
- 2,
619
- undefined
620
- ];
617
+ if (error.code !== firebase.FIREBASE_AUTH_USER_NOT_FOUND_ERROR) {
618
+ throw error;
621
619
  }
622
- throw error;
620
+ return [
621
+ 3,
622
+ 3
623
+ ];
623
624
  case 3:
624
625
  return [
625
- 2
626
+ 2,
627
+ result
626
628
  ];
627
629
  }
628
630
  });
@@ -1486,7 +1488,7 @@ function _ts_generator$g(thisArg, body) {
1486
1488
  key: "setClaims",
1487
1489
  value: function setClaims(claims) {
1488
1490
  var _this = this;
1489
- return this.service.auth.setCustomUserClaims(this.uid, claims).then(function() {
1491
+ return this.service.auth.setCustomUserClaims(this.uid, claims !== null && claims !== void 0 ? claims : null).then(function() {
1490
1492
  _this._loadRecord.reset(); // reset the cache
1491
1493
  });
1492
1494
  }
@@ -1987,7 +1989,7 @@ function _ts_generator$g(thisArg, body) {
1987
1989
  *
1988
1990
  * @param input - The initialization configuration for the new user.
1989
1991
  * @returns The created user record and the setup password used.
1990
- * @throws Throws if the Firebase Admin SDK rejects the user creation.
1992
+ * @throws {Error} Throws if the Firebase Admin SDK rejects the user creation.
1991
1993
  */ function createNewUser(input) {
1992
1994
  return _async_to_generator$g(function() {
1993
1995
  var uid, displayName, email, phoneNumber, inputPassword, password, user, e, firebaseError, errorCode;
@@ -3149,15 +3151,16 @@ function _ts_generator$e(thisArg, body) {
3149
3151
  * Use this when the NestJS app needs the config accessible via either token.
3150
3152
  *
3151
3153
  * @param env - The Firebase server environment configuration.
3152
- * @returns An array of providers binding the config to both Firebase and base server env tokens.
3154
+ * @returns The providers binding the config to both Firebase and base server env tokens.
3153
3155
  *
3154
- * @example
3155
- * ```typescript
3156
- * @Module({
3156
+ * @Module ({
3157
3157
  * providers: [...firebaseServerEnvTokenProviders(myEnvConfig)]
3158
3158
  * })
3159
3159
  * export class AppModule {}
3160
3160
  * ```
3161
+ *
3162
+ * @example
3163
+ * ```typescript
3161
3164
  */ function firebaseServerEnvTokenProviders(env) {
3162
3165
  return [
3163
3166
  firebaseServerEnvTokenProvider(env),
@@ -4004,7 +4007,7 @@ function _ts_generator$d(thisArg, body) {
4004
4007
  * @param path - The initial collection path.
4005
4008
  * @param pathSegments - Optional pairs of [docId, collectionName] for subcollection traversal.
4006
4009
  * @returns The resolved {@link CollectionReference} at the given path.
4007
- * @throws Error if pathSegments length is odd (segments must come in pairs).
4010
+ * @throws {Error} If pathSegments length is odd (segments must come in pairs).
4008
4011
  *
4009
4012
  * @example
4010
4013
  * ```typescript
@@ -4319,6 +4322,11 @@ var _obj;
4319
4322
  * The encryption key is resolved from the configured secret source on each read/write,
4320
4323
  * allowing for key rotation via environment variable changes.
4321
4324
  *
4325
+ * @param config - Encryption field configuration.
4326
+ * @returns A field mapping configuration for encrypted values.
4327
+ *
4328
+ * @template T - The JSON-serializable value type.
4329
+ *
4322
4330
  * @example
4323
4331
  * ```typescript
4324
4332
  * const jwksField = firestoreEncryptedField<JWKSet>({
@@ -4327,9 +4335,6 @@ var _obj;
4327
4335
  * });
4328
4336
  * ```
4329
4337
  *
4330
- * @template T - The JSON-serializable value type.
4331
- * @param config - Encryption field configuration.
4332
- * @returns A field mapping configuration for encrypted values.
4333
4338
  * @__NO_SIDE_EFFECTS__
4334
4339
  */ function firestoreEncryptedField(config) {
4335
4340
  var secret = config.secret, defaultValue = config.default;
@@ -4350,6 +4355,11 @@ var _obj;
4350
4355
  * When the value is null/undefined, it is stored/read as null. When present, it is
4351
4356
  * encrypted/decrypted using AES-256-GCM.
4352
4357
  *
4358
+ * @param config - Encryption field configuration.
4359
+ * @returns A field mapping configuration for optional encrypted values.
4360
+ *
4361
+ * @template T - The JSON-serializable value type.
4362
+ *
4353
4363
  * @example
4354
4364
  * ```typescript
4355
4365
  * const optionalSecretField = optionalFirestoreEncryptedField<OAuthClientSecret>({
@@ -4357,9 +4367,6 @@ var _obj;
4357
4367
  * });
4358
4368
  * ```
4359
4369
  *
4360
- * @template T - The JSON-serializable value type.
4361
- * @param config - Encryption field configuration.
4362
- * @returns A field mapping configuration for optional encrypted values.
4363
4370
  * @__NO_SIDE_EFFECTS__
4364
4371
  */ function optionalFirestoreEncryptedField(config) {
4365
4372
  var secret = config.secret;
@@ -4751,15 +4758,15 @@ function _ts_generator$c(thisArg, body) {
4751
4758
  * Creates an {@link OnCallAnalyticsEmitterInstance} that produces {@link OnCallAnalyticsEmitter} instances
4752
4759
  * for each lifecycle stage, pre-bound to the given service and context.
4753
4760
  *
4761
+ * @param config - The service and context to bind to the emitter factory.
4762
+ * @returns A factory function that creates lifecycle-stage-specific emitters.
4763
+ *
4754
4764
  * @example
4755
4765
  * ```typescript
4756
4766
  * const emitter = onCallAnalyticsEmitterInstance({ service, context });
4757
4767
  * emitter('triggered').sendEventType('Handler Starting');
4758
4768
  * emitter('success').sendEvent('Widget Created', { id: result.id });
4759
4769
  * ```
4760
- *
4761
- * @param config - The service and context to bind to the emitter factory.
4762
- * @returns A factory function that creates lifecycle-stage-specific emitters.
4763
4770
  */ function onCallAnalyticsEmitterInstance(config) {
4764
4771
  var service = config.service, context = config.context;
4765
4772
  return function(lifecycle) {
@@ -4796,8 +4803,8 @@ function _ts_generator$c(thisArg, body) {
4796
4803
  * Analytics callback errors are caught and logged but never propagate — the handler result
4797
4804
  * or error is always returned/thrown unmodified.
4798
4805
  *
4799
- * @param config - the handler, analytics details, service, and context
4800
- * @returns the handler's return value
4806
+ * @param config - The handler, analytics details, service, and context.
4807
+ * @returns The handler's return value.
4801
4808
  *
4802
4809
  * @example
4803
4810
  * ```ts
@@ -5008,6 +5015,9 @@ function _unsupported_iterable_to_array$a(o, minLen) {
5008
5015
  * (same effect as optionalAuthContext). This avoids the composition issue where
5009
5016
  * optionalAuthContext(withApiDetails(...)) would lose the _apiDetails.
5010
5017
  *
5018
+ * @param config - The API details configuration including the handler function.
5019
+ * @returns The handler function with _apiDetails attached.
5020
+ *
5011
5021
  * @example
5012
5022
  * ```typescript
5013
5023
  * // Handler with api details (auth required by default)
@@ -5026,9 +5036,6 @@ function _unsupported_iterable_to_array$a(o, minLen) {
5026
5036
  * fn: async (request) => { ... }
5027
5037
  * });
5028
5038
  * ```
5029
- *
5030
- * @param config - The API details configuration including the handler function.
5031
- * @returns The handler function with _apiDetails attached.
5032
5039
  */ function withApiDetails(config) {
5033
5040
  var optionalAuth = config.optionalAuth, fn = config.fn, apiDetails = _object_without_properties(config, [
5034
5041
  "optionalAuth",
@@ -5181,7 +5188,7 @@ function _unsupported_iterable_to_array$a(o, minLen) {
5181
5188
  * pivots it to modelType → CRUD, which is the natural shape for MCP tool generation
5182
5189
  * and schema introspection.
5183
5190
  *
5184
- * @param callModelFn The function returned by onCallModel(), or any object with _apiDetails.
5191
+ * @param callModelFn - The function returned by onCallModel(), or any object with _apiDetails.
5185
5192
  * @returns Model-first API details, or undefined if no _apiDetails are present.
5186
5193
  *
5187
5194
  * @example
@@ -5192,64 +5199,67 @@ function _unsupported_iterable_to_array$a(o, minLen) {
5192
5199
  * ```
5193
5200
  */ function getModelApiDetails(callModelFn) {
5194
5201
  var topDetails = readApiDetails(callModelFn);
5195
- if (topDetails == null) {
5196
- return undefined;
5197
- }
5198
- var models = {};
5199
- var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
5200
- try {
5201
- // Pivot: iterate CRUD types, then model types within each
5202
- for(var _iterator = Object.entries(topDetails)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
5203
- var _step_value = _sliced_to_array$2(_step.value, 2), callType = _step_value[0], crudDetails = _step_value[1];
5204
- if (crudDetails == null) {
5205
- continue;
5206
- }
5207
- var _iteratorNormalCompletion1 = true, _didIteratorError1 = false, _iteratorError1 = undefined;
5208
- try {
5209
- for(var _iterator1 = Object.entries(crudDetails.modelTypes)[Symbol.iterator](), _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = true){
5210
- var _step_value1 = _sliced_to_array$2(_step1.value, 2), modelType = _step_value1[0], modelDetails = _step_value1[1];
5211
- if (modelDetails == null) {
5212
- continue;
5213
- }
5214
- if (!(modelType in models)) {
5215
- models[modelType] = {
5216
- calls: {}
5217
- };
5218
- }
5219
- models[modelType].calls[callType] = modelDetails;
5202
+ var result;
5203
+ if (topDetails != null) {
5204
+ var models = {};
5205
+ var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
5206
+ try {
5207
+ // Pivot: iterate CRUD types, then model types within each
5208
+ for(var _iterator = Object.entries(topDetails)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
5209
+ var _step_value = _sliced_to_array$2(_step.value, 2), callType = _step_value[0], crudDetails = _step_value[1];
5210
+ if (crudDetails == null) {
5211
+ continue;
5220
5212
  }
5221
- } catch (err) {
5222
- _didIteratorError1 = true;
5223
- _iteratorError1 = err;
5224
- } finally{
5213
+ var _iteratorNormalCompletion1 = true, _didIteratorError1 = false, _iteratorError1 = undefined;
5225
5214
  try {
5226
- if (!_iteratorNormalCompletion1 && _iterator1.return != null) {
5227
- _iterator1.return();
5215
+ for(var _iterator1 = Object.entries(crudDetails.modelTypes)[Symbol.iterator](), _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = true){
5216
+ var _step_value1 = _sliced_to_array$2(_step1.value, 2), modelType = _step_value1[0], modelDetails = _step_value1[1];
5217
+ if (modelDetails == null) {
5218
+ continue;
5219
+ }
5220
+ if (!(modelType in models)) {
5221
+ models[modelType] = {
5222
+ calls: {}
5223
+ };
5224
+ }
5225
+ models[modelType].calls[callType] = modelDetails;
5228
5226
  }
5227
+ } catch (err) {
5228
+ _didIteratorError1 = true;
5229
+ _iteratorError1 = err;
5229
5230
  } finally{
5230
- if (_didIteratorError1) {
5231
- throw _iteratorError1;
5231
+ try {
5232
+ if (!_iteratorNormalCompletion1 && _iterator1.return != null) {
5233
+ _iterator1.return();
5234
+ }
5235
+ } finally{
5236
+ if (_didIteratorError1) {
5237
+ throw _iteratorError1;
5238
+ }
5232
5239
  }
5233
5240
  }
5234
5241
  }
5235
- }
5236
- } catch (err) {
5237
- _didIteratorError = true;
5238
- _iteratorError = err;
5239
- } finally{
5240
- try {
5241
- if (!_iteratorNormalCompletion && _iterator.return != null) {
5242
- _iterator.return();
5243
- }
5242
+ } catch (err) {
5243
+ _didIteratorError = true;
5244
+ _iteratorError = err;
5244
5245
  } finally{
5245
- if (_didIteratorError) {
5246
- throw _iteratorError;
5246
+ try {
5247
+ if (!_iteratorNormalCompletion && _iterator.return != null) {
5248
+ _iterator.return();
5249
+ }
5250
+ } finally{
5251
+ if (_didIteratorError) {
5252
+ throw _iteratorError;
5253
+ }
5247
5254
  }
5248
5255
  }
5256
+ if (Object.keys(models).length > 0) {
5257
+ result = {
5258
+ models: models
5259
+ };
5260
+ }
5249
5261
  }
5250
- return Object.keys(models).length > 0 ? {
5251
- models: models
5252
- } : undefined;
5262
+ return result;
5253
5263
  }
5254
5264
  // MARK: Analytics Resolution
5255
5265
  /**
@@ -5267,14 +5277,15 @@ function _unsupported_iterable_to_array$a(o, minLen) {
5267
5277
  function resolveAnalyticsFromApiDetails(apiDetails, call, modelType, specifier) {
5268
5278
  var _apiDetails_call;
5269
5279
  var modelDetails = (_apiDetails_call = apiDetails[call]) === null || _apiDetails_call === void 0 ? void 0 : _apiDetails_call.modelTypes[modelType];
5280
+ var result;
5270
5281
  if (modelDetails) {
5271
5282
  var _modelDetails_specifiers_key;
5272
5283
  // All entries are now OnCallModelTypeApiDetails. For non-specifier handlers,
5273
5284
  // the details are under the `_` key.
5274
5285
  var key = specifier !== null && specifier !== void 0 ? specifier : '_';
5275
- return (_modelDetails_specifiers_key = modelDetails.specifiers[key]) === null || _modelDetails_specifiers_key === void 0 ? void 0 : _modelDetails_specifiers_key.analytics;
5286
+ result = (_modelDetails_specifiers_key = modelDetails.specifiers[key]) === null || _modelDetails_specifiers_key === void 0 ? void 0 : _modelDetails_specifiers_key.analytics;
5276
5287
  }
5277
- return undefined;
5288
+ return result;
5278
5289
  }
5279
5290
  /**
5280
5291
  * @deprecated Use {@link isOnCallModelTypeApiDetails} instead.
@@ -5339,6 +5350,9 @@ function resolveAnalyticsFromApiDetails(apiDetails, call, modelType, specifier)
5339
5350
  * By default, callable functions with auth-aware nest context require auth. Use this wrapper to
5340
5351
  * explicitly opt out of that requirement for endpoints that should be publicly accessible.
5341
5352
  *
5353
+ * @param fn - The callable function handler to wrap.
5354
+ * @returns A new handler flagged with `_requireAuth: false`.
5355
+ *
5342
5356
  * @example
5343
5357
  * ```ts
5344
5358
  * const handler = optionalAuthContext<MyContext, Input, Output>((request) => {
@@ -5346,9 +5360,6 @@ function resolveAnalyticsFromApiDetails(apiDetails, call, modelType, specifier)
5346
5360
  * return doSomething(request);
5347
5361
  * });
5348
5362
  * ```
5349
- *
5350
- * @param fn - The callable function handler to wrap.
5351
- * @returns A new handler flagged with `_requireAuth: false`.
5352
5363
  */ function optionalAuthContext(fn) {
5353
5364
  var fnWithOptionalAuth = function fnWithOptionalAuth(request) {
5354
5365
  return fn(request);
@@ -5373,6 +5384,9 @@ function resolveAnalyticsFromApiDetails(apiDetails, call, modelType, specifier)
5373
5384
  * The wrapper calls {@link assertIsContextWithAuthData} before invoking the handler, ensuring that
5374
5385
  * unauthenticated requests are rejected with an appropriate error before reaching handler logic.
5375
5386
  *
5387
+ * @param fn - The authorized handler to wrap with auth assertion.
5388
+ * @returns A general {@link OnCallWithNestContext} handler that asserts auth before delegating.
5389
+ *
5376
5390
  * @example
5377
5391
  * ```ts
5378
5392
  * const secureHandler = inAuthContext<MyContext, Input, Output>((request) => {
@@ -5380,9 +5394,6 @@ function resolveAnalyticsFromApiDetails(apiDetails, call, modelType, specifier)
5380
5394
  * return processAuthenticatedRequest(request);
5381
5395
  * });
5382
5396
  * ```
5383
- *
5384
- * @param fn - The authorized handler to wrap with auth assertion.
5385
- * @returns A general {@link OnCallWithNestContext} handler that asserts auth before delegating.
5386
5397
  */ function inAuthContext(fn) {
5387
5398
  return function(request) {
5388
5399
  assertIsContextWithAuthData(request);
@@ -5415,7 +5426,7 @@ function resolveAnalyticsFromApiDetails(apiDetails, call, modelType, specifier)
5415
5426
  */ function onCallSpecifierHandler(config) {
5416
5427
  var map = util.objectToMap(config);
5417
5428
  var fn = function fn(request) {
5418
- var _request_specifier = request.specifier, specifier = _request_specifier === void 0 ? firebase.MODEL_FUNCTION_FIREBASE_CRUD_FUNCTION_SPECIFIER_DEFAULT : _request_specifier;
5429
+ var _request_specifier = request.specifier, specifier = _request_specifier === void 0 ? firebase.DEFAULT_MODEL_FUNCTION_FIREBASE_CRUD_FUNCTION_SPECIFIER : _request_specifier;
5419
5430
  var handler = map.get(specifier);
5420
5431
  if (handler != null) {
5421
5432
  return handler(request);
@@ -5534,13 +5545,15 @@ function _object_spread_props$c(target, source) {
5534
5545
  function getAnalyticsService(request) {
5535
5546
  var token = analyticsToken !== null && analyticsToken !== void 0 ? analyticsToken : ON_CALL_MODEL_ANALYTICS_SERVICE;
5536
5547
  var moduleRef = request.nestApplication.get(core.ModuleRef);
5548
+ var result;
5537
5549
  try {
5538
- return moduleRef.get(token, {
5550
+ result = moduleRef.get(token, {
5539
5551
  strict: false
5540
5552
  });
5541
5553
  } catch (unused) {
5542
- return noopOnCallModelAnalyticsService();
5554
+ result = noopOnCallModelAnalyticsService();
5543
5555
  }
5556
+ return result;
5544
5557
  }
5545
5558
  var fn = function fn(request) {
5546
5559
  var call = request.data.call;
@@ -6056,6 +6069,9 @@ function _ts_generator$b(thisArg, body) {
6056
6069
  * - Fetching one extra document to detect whether more results exist
6057
6070
  * - Building the {@link OnCallQueryModelResult} with cursorDocumentKey and hasMore
6058
6071
  *
6072
+ * @param config - Query configuration including collection, constraints, and pagination params.
6073
+ * @returns Paginated query result with cursor for the next page.
6074
+ *
6059
6075
  * @example
6060
6076
  * ```typescript
6061
6077
  * export const queryGuestbooks: DemoQueryModelFunction<QueryGuestbooksParams, OnCallQueryModelResult<Guestbook>> = async (request) => {
@@ -6078,9 +6094,6 @@ function _ts_generator$b(thisArg, body) {
6078
6094
  * });
6079
6095
  * };
6080
6096
  * ```
6081
- *
6082
- * @param config - Query configuration including collection, constraints, and pagination params.
6083
- * @returns Paginated query result with cursor for the next page.
6084
6097
  */ function executeOnCallQuery(config) {
6085
6098
  return _async_to_generator$b(function() {
6086
6099
  var _collection, _params_limit, _resultDocs_at, params, collection, loadCursorDocument, buildConstraints, _config_maxLimit, maxLimit, mapResult, requestedLimit, effectiveLimit, constraints, cursorSnapshot, e, errorInfo, executableQuery, querySnapshot, docs, hasMore, resultDocs, results, keys, cursorDocumentKey;
@@ -6201,16 +6214,17 @@ function _unsupported_iterable_to_array$8(o, minLen) {
6201
6214
  * Provides {@link FirebaseServerAnalyticsService} and registers it as the
6202
6215
  * {@link ON_CALL_MODEL_ANALYTICS_SERVICE} token for the onCall dispatch chain.
6203
6216
  *
6204
- * @param config - the configuration including an optional dependency module and additional providers
6205
- * @returns module metadata ready for use with `@Module()`
6217
+ * @param config - The configuration including an optional dependency module and additional providers.
6218
+ * @returns Module metadata ready for use with `@Module()`
6206
6219
  *
6207
- * @example
6208
- * ```ts
6209
- * @Module(appAnalyticsModuleMetadata({
6220
+ * @Module (appAnalyticsModuleMetadata({
6210
6221
  * dependencyModule: FirebaseServerAnalyticsSegmentModule
6211
6222
  * }))
6212
6223
  * export class AppAnalyticsModule {}
6213
6224
  * ```
6225
+ *
6226
+ * @example
6227
+ * ```ts
6214
6228
  */ function appAnalyticsModuleMetadata(config) {
6215
6229
  var dependencyModule = config.dependencyModule, imports = config.imports, exports$1 = config.exports, providers = config.providers;
6216
6230
  var dependencyModuleImport = dependencyModule ? [
@@ -6602,13 +6616,14 @@ exports.FirebaseServerAuthModule = __decorate([
6602
6616
  * @param config - The module metadata configuration including the service provider.
6603
6617
  * @returns The merged NestJS module metadata.
6604
6618
  *
6605
- * @example
6606
- * ```typescript
6607
- * @Module(firebaseServerAuthModuleMetadata({
6619
+ * @Module (firebaseServerAuthModuleMetadata({
6608
6620
  * serviceProvider: { provide: MyAuthService, useFactory: (auth) => new MyAuthService(auth) }
6609
6621
  * }))
6610
6622
  * export class AppAuthModule {}
6611
6623
  * ```
6624
+ *
6625
+ * @example
6626
+ * ```typescript
6612
6627
  */ function firebaseServerAuthModuleMetadata(config) {
6613
6628
  return nestjs.mergeModuleMetadata({
6614
6629
  imports: [
@@ -7329,7 +7344,7 @@ function _ts_generator$9(thisArg, body) {
7329
7344
  * @param key - The full Firestore model key (e.g., 'pr/abc123').
7330
7345
  * @param auth - The authenticated user's auth data from the request.
7331
7346
  * @returns The document key and data.
7332
- * @throws Permission or not-found errors from useModel.
7347
+ * @throws {Error} Permission or not-found errors from useModel.
7333
7348
  */ function readDocument(modelType, key, auth) {
7334
7349
  return _async_to_generator$9(function() {
7335
7350
  var authRef, doc, snapshot;
@@ -7889,6 +7904,7 @@ function _ts_generator$8(thisArg, body) {
7889
7904
  *
7890
7905
  * @param req - The Express request containing wildcard path params.
7891
7906
  * @returns Parsed path components with modelType, call, and specifier (defaults to '_').
7907
+ * @throws {HttpException} `400 BAD_REQUEST` when `modelType` or `call` is missing from the path.
7892
7908
  */ key: "_parsePath",
7893
7909
  value: function _parsePath(req) {
7894
7910
  var _ref, _req_params_path, _pathSegments_;
@@ -7960,18 +7976,21 @@ function _ts_generator$8(thisArg, body) {
7960
7976
  {
7961
7977
  key: "_toHttpException",
7962
7978
  value: function _toHttpException(error) {
7963
- var _ref, _ref1, _ref2;
7964
- var _error_httpErrorCode;
7979
+ var result;
7965
7980
  if (_instanceof$1(error, common.HttpException)) {
7966
- return error;
7981
+ result = error;
7982
+ } else {
7983
+ var _ref, _ref1, _ref2;
7984
+ var _error_httpErrorCode;
7985
+ var status = (_ref = (_ref1 = error === null || error === void 0 ? void 0 : error.status) !== null && _ref1 !== void 0 ? _ref1 : error === null || error === void 0 ? void 0 : (_error_httpErrorCode = error.httpErrorCode) === null || _error_httpErrorCode === void 0 ? void 0 : _error_httpErrorCode.status) !== null && _ref !== void 0 ? _ref : common.HttpStatus.INTERNAL_SERVER_ERROR;
7986
+ var message = (_ref2 = error === null || error === void 0 ? void 0 : error.message) !== null && _ref2 !== void 0 ? _ref2 : 'Internal server error';
7987
+ result = new common.HttpException({
7988
+ statusCode: status,
7989
+ message: message,
7990
+ code: error === null || error === void 0 ? void 0 : error.code
7991
+ }, status);
7967
7992
  }
7968
- var status = (_ref = (_ref1 = error === null || error === void 0 ? void 0 : error.status) !== null && _ref1 !== void 0 ? _ref1 : error === null || error === void 0 ? void 0 : (_error_httpErrorCode = error.httpErrorCode) === null || _error_httpErrorCode === void 0 ? void 0 : _error_httpErrorCode.status) !== null && _ref !== void 0 ? _ref : common.HttpStatus.INTERNAL_SERVER_ERROR;
7969
- var message = (_ref2 = error === null || error === void 0 ? void 0 : error.message) !== null && _ref2 !== void 0 ? _ref2 : 'Internal server error';
7970
- return new common.HttpException({
7971
- statusCode: status,
7972
- message: message,
7973
- code: error === null || error === void 0 ? void 0 : error.code
7974
- }, status);
7993
+ return result;
7975
7994
  }
7976
7995
  }
7977
7996
  ]);
@@ -8067,13 +8086,14 @@ function _unsupported_iterable_to_array$7(o, minLen) {
8067
8086
  * @param metadataConfig - Configuration including the dependency module.
8068
8087
  * @returns NestJS module metadata with the Model API controller, dispatch service, and app context provider.
8069
8088
  *
8070
- * @example
8071
- * ```typescript
8072
- * @Module(modelApiModuleMetadata({
8089
+ * @Module (modelApiModuleMetadata({
8073
8090
  * dependencyModule: DemoModelApiDependencyModule
8074
8091
  * }))
8075
8092
  * export class DemoModelApiModule {}
8076
8093
  * ```
8094
+ *
8095
+ * @example
8096
+ * ```typescript
8077
8097
  */ function modelApiModuleMetadata(metadataConfig) {
8078
8098
  var dependencyModule = metadataConfig.dependencyModule, imports = metadataConfig.imports, exports$1 = metadataConfig.exports, providers = metadataConfig.providers;
8079
8099
  return {
@@ -8201,7 +8221,7 @@ function _object_spread_props$8(target, source) {
8201
8221
  /**
8202
8222
  * Creates a bad-request error indicating the provided development function specifier is not recognized.
8203
8223
  *
8204
- * @param specifier - the unrecognized specifier string from the client request.
8224
+ * @param specifier - The unrecognized specifier string from the client request.
8205
8225
  * @returns A bad-request error with the unknown specifier details.
8206
8226
  */ function developmentUnknownSpecifierError(specifier) {
8207
8227
  return badRequestError(util.serverError({
@@ -8236,7 +8256,7 @@ function _object_spread_props$8(target, source) {
8236
8256
  * Creates a bad-request error for when the requested scheduled function name
8237
8257
  * is not found in the registered function map.
8238
8258
  *
8239
- * @param name - the unrecognized function name from the client request.
8259
+ * @param name - The unrecognized function name from the client request.
8240
8260
  * @returns A bad-request error with the unknown function name details.
8241
8261
  */ function unknownScheduledFunctionDevelopmentFunctionName(name) {
8242
8262
  return badRequestError({
@@ -8254,7 +8274,7 @@ function _object_spread_props$8(target, source) {
8254
8274
  * Creates a bad-request error for when the request `type` field does not match
8255
8275
  * any supported operation ('run' or 'list').
8256
8276
  *
8257
- * @param type - the unrecognized type value from the client request.
8277
+ * @param type - The unrecognized type value from the client request.
8258
8278
  * @returns A bad-request error with the unknown type details.
8259
8279
  */ function unknownScheduledFunctionDevelopmentFunctionType(type) {
8260
8280
  return badRequestError({
@@ -8481,7 +8501,7 @@ function _ts_generator$7(thisArg, body) {
8481
8501
  });
8482
8502
  return function(request) {
8483
8503
  return _async_to_generator$7(function() {
8484
- var data, type, targetRunName, targetFunction, e;
8504
+ var data, type, result, targetRunName, targetFunction, e;
8485
8505
  return _ts_generator$7(this, function(_state) {
8486
8506
  switch(_state.label){
8487
8507
  case 0:
@@ -8535,24 +8555,27 @@ function _ts_generator$7(thisArg, body) {
8535
8555
  console.error('Failed manually running task "'.concat(targetRunName, '".'), e);
8536
8556
  throw e;
8537
8557
  case 5:
8558
+ result = {
8559
+ type: 'run',
8560
+ success: true
8561
+ };
8538
8562
  return [
8539
- 2,
8540
- {
8541
- type: 'run',
8542
- success: true
8543
- }
8563
+ 3,
8564
+ 7
8544
8565
  ];
8545
8566
  case 6:
8567
+ result = {
8568
+ type: 'list',
8569
+ list: getListValues()
8570
+ };
8546
8571
  return [
8547
- 2,
8548
- {
8549
- type: 'list',
8550
- list: getListValues()
8551
- }
8572
+ 3,
8573
+ 7
8552
8574
  ];
8553
8575
  case 7:
8554
8576
  return [
8555
- 2
8577
+ 2,
8578
+ result
8556
8579
  ];
8557
8580
  }
8558
8581
  });
@@ -8918,7 +8941,7 @@ exports.DefaultFirebaseServerEnvService = __decorate([
8918
8941
  *
8919
8942
  * Useful for conditionally enabling production-only Cloud Functions (e.g., scheduled tasks).
8920
8943
  *
8921
- * @param nest - getter for the NestJS application context promise.
8944
+ * @param nest - Getter for the NestJS application context promise.
8922
8945
  * @returns An async decision function that resolves to `true` in production.
8923
8946
  *
8924
8947
  * @example
@@ -8938,7 +8961,7 @@ exports.DefaultFirebaseServerEnvService = __decorate([
8938
8961
  *
8939
8962
  * The development scheduler is enabled in non-production, non-testing environments.
8940
8963
  *
8941
- * @param nest - getter for the NestJS application context promise.
8964
+ * @param nest - Getter for the NestJS application context promise.
8942
8965
  * @returns An async decision function that resolves to `true` when the development scheduler is enabled.
8943
8966
  */ function nestAppHasDevelopmentSchedulerEnabled(nest) {
8944
8967
  return function() {
@@ -9041,16 +9064,17 @@ exports.FirebaseServerFirestoreContextModule = __decorate([
9041
9064
  *
9042
9065
  * If caching is not needed, use {@link FirebaseServerFirestoreContextModule} directly instead.
9043
9066
  *
9044
- * @param config - Configuration including the cache factory
9045
- * @returns Module metadata ready for the `@Module()` decorator
9067
+ * @param config - Configuration including the cache factory.
9068
+ * @returns Module metadata ready for the `@Module()` decorator.
9046
9069
  *
9047
- * @example
9048
- * ```typescript
9049
- * @Module(firebaseServerFirestoreContextModuleMetadata({
9070
+ * @Module (firebaseServerFirestoreContextModuleMetadata({
9050
9071
  * firestoreContextCacheFactory: inMemoryFirestoreContextCacheFactory()
9051
9072
  * }))
9052
9073
  * export class AppFirestoreContextModule {}
9053
9074
  * ```
9075
+ *
9076
+ * @example
9077
+ * ```typescript
9054
9078
  */ function firebaseServerFirestoreContextModuleMetadata(config) {
9055
9079
  var params = {
9056
9080
  firestoreContextCacheFactory: config.firestoreContextCacheFactory
@@ -9115,25 +9139,25 @@ exports.FirebaseServerFirestoreContextModule = __decorate([
9115
9139
  * @param config - The Firestore collections config plus optional additional module metadata.
9116
9140
  * @returns NestJS module metadata ready to be passed to the `@Module()` decorator.
9117
9141
  *
9118
- * @example
9119
- * ```typescript
9120
- * @Module(appFirestoreModuleMetadata({
9142
+ * @Module (appFirestoreModuleMetadata({
9121
9143
  * provide: DemoFirestoreCollections,
9122
9144
  * useFactory: (context) => new DemoFirestoreCollections(context)
9123
9145
  * }))
9124
9146
  * export class AppFirestoreModule {}
9125
9147
  * ```
9126
- *
9127
- * @example
9128
- * ```typescript
9129
- * // With caching
9130
- * @Module(appFirestoreModuleMetadata({
9148
+ * @Module (appFirestoreModuleMetadata({
9131
9149
  * provide: DemoFirestoreCollections,
9132
9150
  * useFactory: (context) => new DemoFirestoreCollections(context),
9133
9151
  * firestoreContextCacheFactory: inMemoryFirestoreContextCacheFactory()
9134
9152
  * }))
9135
9153
  * export class AppFirestoreModule {}
9136
9154
  * ```
9155
+ *
9156
+ * @example
9157
+ * ```typescript
9158
+ * @example
9159
+ * ```typescript
9160
+ * // With caching
9137
9161
  */ function appFirestoreModuleMetadata(config) {
9138
9162
  var _contextModuleMetadata_imports, _config_imports, _contextModuleMetadata_exports, _config_exports, _contextModuleMetadata_providers, _config_providers;
9139
9163
  var contextModuleMetadata = config.firestoreContextCacheFactory ? firebaseServerFirestoreContextModuleMetadata({
@@ -9208,6 +9232,11 @@ function _object_spread_props$7(target, source) {
9208
9232
  * The attached `__handler` enables direct handler invocation in tests without triggering
9209
9233
  * the full Firebase blocking function infrastructure.
9210
9234
  *
9235
+ * @param blockingFunctionBuilder - The Firebase blocking function constructor (e.g., `beforeUserCreated`).
9236
+ * @param handler - The handler logic to execute on each event.
9237
+ * @param opts - Optional {@link BlockingOptions} passed to the builder.
9238
+ * @returns A {@link BlockingFunctionWithHandler} with the handler accessible via `__handler`.
9239
+ *
9211
9240
  * @example
9212
9241
  * ```ts
9213
9242
  * const fn = makeBlockingFunctionWithHandler(
@@ -9218,10 +9247,6 @@ function _object_spread_props$7(target, source) {
9218
9247
  * // In tests: fn.__handler(mockEvent)
9219
9248
  * ```
9220
9249
  *
9221
- * @param blockingFunctionBuilder - The Firebase blocking function constructor (e.g., `beforeUserCreated`).
9222
- * @param handler - The handler logic to execute on each event.
9223
- * @param opts - Optional {@link BlockingOptions} passed to the builder.
9224
- * @returns A {@link BlockingFunctionWithHandler} with the handler accessible via `__handler`.
9225
9250
  * @__NO_SIDE_EFFECTS__
9226
9251
  */ function makeBlockingFunctionWithHandler(blockingFunctionBuilder, handler, opts) {
9227
9252
  var blockingFn = opts != null ? blockingFunctionBuilder(opts, handler) : blockingFunctionBuilder(handler);
@@ -9235,6 +9260,9 @@ function _object_spread_props$7(target, source) {
9235
9260
  * The returned factory lazily resolves the NestJS application on each invocation, injects the
9236
9261
  * typed context into the event, and delegates to the handler.
9237
9262
  *
9263
+ * @param makeNestContext - Factory that creates the typed context from the NestJS application context.
9264
+ * @returns A factory for creating nest-context-aware blocking function handlers.
9265
+ *
9238
9266
  * @example
9239
9267
  * ```ts
9240
9268
  * const factory = blockingFunctionHandlerWithNestContextFactory(makeMyContext);
@@ -9246,8 +9274,6 @@ function _object_spread_props$7(target, source) {
9246
9274
  * );
9247
9275
  * ```
9248
9276
  *
9249
- * @param makeNestContext - Factory that creates the typed context from the NestJS application context.
9250
- * @returns A factory for creating nest-context-aware blocking function handlers.
9251
9277
  * @__NO_SIDE_EFFECTS__
9252
9278
  */ function blockingFunctionHandlerWithNestContextFactory(makeNestContext) {
9253
9279
  return function(fn) {
@@ -9322,6 +9348,9 @@ function _object_spread_props$6(target, source) {
9322
9348
  * The `defaultOpts` are merged with per-function options, allowing shared configuration (e.g., CORS settings,
9323
9349
  * memory allocation) to be set once at the factory level.
9324
9350
  *
9351
+ * @param defaultOpts - Default {@link https.CallableOptions} applied to all functions created by this factory.
9352
+ * @returns A factory that creates nest-application-aware callable functions.
9353
+ *
9325
9354
  * @example
9326
9355
  * ```ts
9327
9356
  * const callFactory = onCallHandlerWithNestApplicationFactory({ cors: true });
@@ -9331,8 +9360,6 @@ function _object_spread_props$6(target, source) {
9331
9360
  * );
9332
9361
  * ```
9333
9362
  *
9334
- * @param defaultOpts - Default {@link https.CallableOptions} applied to all functions created by this factory.
9335
- * @returns A factory that creates nest-application-aware callable functions.
9336
9363
  * @__NO_SIDE_EFFECTS__
9337
9364
  */ function onCallHandlerWithNestApplicationFactory() {
9338
9365
  var defaultOpts = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
@@ -9355,6 +9382,10 @@ function _object_spread_props$6(target, source) {
9355
9382
  * This is the standard way to create callable functions that receive a domain-specific context
9356
9383
  * (e.g., `MyApiNestContext`) rather than the raw NestJS application context.
9357
9384
  *
9385
+ * @param appFactory - The base application-level callable factory.
9386
+ * @param makeNestContext - Factory that creates the typed context from the application context.
9387
+ * @returns A factory that creates typed-context-aware callable functions.
9388
+ *
9358
9389
  * @example
9359
9390
  * ```ts
9360
9391
  * const appFactory = onCallHandlerWithNestApplicationFactory();
@@ -9365,9 +9396,6 @@ function _object_spread_props$6(target, source) {
9365
9396
  * });
9366
9397
  * ```
9367
9398
  *
9368
- * @param appFactory - The base application-level callable factory.
9369
- * @param makeNestContext - Factory that creates the typed context from the application context.
9370
- * @returns A factory that creates typed-context-aware callable functions.
9371
9399
  * @__NO_SIDE_EFFECTS__
9372
9400
  */ function onCallHandlerWithNestContextFactory(appFactory, makeNestContext) {
9373
9401
  return function(fn, opts) {
@@ -9432,6 +9460,9 @@ function _object_spread_props$5(target, source) {
9432
9460
  * context, and delegates to the handler. This is the event-triggered equivalent of
9433
9461
  * {@link onCallHandlerWithNestContextFactory} for callable functions.
9434
9462
  *
9463
+ * @param makeNestContext - Factory that creates the typed context from the NestJS application context.
9464
+ * @returns A factory for creating nest-context-aware event function handlers.
9465
+ *
9435
9466
  * @example
9436
9467
  * ```ts
9437
9468
  * const factory = cloudEventHandlerWithNestContextFactory(makeMyContext);
@@ -9443,8 +9474,6 @@ function _object_spread_props$5(target, source) {
9443
9474
  * );
9444
9475
  * ```
9445
9476
  *
9446
- * @param makeNestContext - Factory that creates the typed context from the NestJS application context.
9447
- * @returns A factory for creating nest-context-aware event function handlers.
9448
9477
  * @__NO_SIDE_EFFECTS__
9449
9478
  */ function cloudEventHandlerWithNestContextFactory(makeNestContext) {
9450
9479
  return function(fn) {
@@ -9500,6 +9529,9 @@ function _object_spread_props$5(target, source) {
9500
9529
  * merges base and per-function schedule options, and attaches `_runNow` and `_schedule` metadata
9501
9530
  * to the resulting function for testing and introspection.
9502
9531
  *
9532
+ * @param baseScheduleConfig - Optional default schedule options merged into every function created by this factory.
9533
+ * @returns A factory for creating nest-application-aware scheduled functions.
9534
+ *
9503
9535
  * @example
9504
9536
  * ```ts
9505
9537
  * const scheduleFactory = onScheduleHandlerWithNestApplicationFactory({ timeoutSeconds: 60 });
@@ -9509,8 +9541,6 @@ function _object_spread_props$5(target, source) {
9509
9541
  * );
9510
9542
  * ```
9511
9543
  *
9512
- * @param baseScheduleConfig - Optional default schedule options merged into every function created by this factory.
9513
- * @returns A factory for creating nest-application-aware scheduled functions.
9514
9544
  * @__NO_SIDE_EFFECTS__
9515
9545
  */ function onScheduleHandlerWithNestApplicationFactory(baseScheduleConfig) {
9516
9546
  return function(inputSchedule, fn) {
@@ -9607,9 +9637,10 @@ function _object_spread_props$4(target, source) {
9607
9637
  /**
9608
9638
  * Creates a TaskQueueFunctionHandlerWithNestContextFactory.
9609
9639
  *
9610
- * @param appFactory
9611
9640
  * @param makeNestContext
9641
+ * @param appFactory
9612
9642
  * @returns
9643
+ *
9613
9644
  * @__NO_SIDE_EFFECTS__
9614
9645
  */ function taskQueueFunctionHandlerWithNestContextFactory(makeNestContext) {
9615
9646
  return function(fn) {
@@ -9802,13 +9833,13 @@ function _ts_generator$5(thisArg, body) {
9802
9833
  /**
9803
9834
  * Creates a {@link FirebaseServerActionsContext} with the default transform and validation factories.
9804
9835
  *
9836
+ * @param options - Optional configuration for error logging behavior.
9837
+ * @returns A fully configured actions context.
9838
+ *
9805
9839
  * @example
9806
9840
  * ```ts
9807
9841
  * const context = firebaseServerActionsContext({ logError: true });
9808
9842
  * ```
9809
- *
9810
- * @param options - Optional configuration for error logging behavior.
9811
- * @returns A fully configured actions context.
9812
9843
  */ function firebaseServerActionsContext(options) {
9813
9844
  return _object_spread$4({}, firebaseServerActionsTransformContext(options));
9814
9845
  }
@@ -9816,7 +9847,7 @@ function _ts_generator$5(thisArg, body) {
9816
9847
  * Default error logger that writes validation error details to the console.
9817
9848
  * Used when `logError` is `true` or omitted in the factory options.
9818
9849
  *
9819
- * @param details - the validation error details to log.
9850
+ * @param details - The validation error details to log.
9820
9851
  */ var defaultFirebaseServerActionsTransformFactoryLogErrorFunction = function defaultFirebaseServerActionsTransformFactoryLogErrorFunction(details) {
9821
9852
  console.log('firebaseServerActionsTransformFactory() encountered validation error: ', details);
9822
9853
  };
@@ -9872,6 +9903,9 @@ function _ts_generator$5(thisArg, body) {
9872
9903
  *
9873
9904
  * Validation errors are optionally logged before the error is thrown, controlled by the `logError` option.
9874
9905
  *
9906
+ * @param options - Optional configuration for error logging behavior.
9907
+ * @returns A factory that creates type-safe transform functions from ArkType schemas.
9908
+ *
9875
9909
  * @example
9876
9910
  * ```ts
9877
9911
  * const transformFactory = firebaseServerActionsTransformFactory({ logError: true });
@@ -9879,8 +9913,6 @@ function _ts_generator$5(thisArg, body) {
9879
9913
  * const validated = await transform(rawInput);
9880
9914
  * ```
9881
9915
  *
9882
- * @param options - Optional configuration for error logging behavior.
9883
- * @returns A factory that creates type-safe transform functions from ArkType schemas.
9884
9916
  * @__NO_SIDE_EFFECTS__
9885
9917
  */ function firebaseServerActionsTransformFactory(options) {
9886
9918
  var logError = (options !== null && options !== void 0 ? options : {}).logError;
@@ -10807,8 +10839,8 @@ function _ts_generator$2(thisArg, body) {
10807
10839
  /**
10808
10840
  * Resolves a Google Cloud Storage {@link Bucket} from a {@link StoragePath}.
10809
10841
  *
10810
- * @param storage - the Google Cloud Storage client instance.
10811
- * @param path - the storage path containing the bucket ID.
10842
+ * @param storage - The Google Cloud Storage client instance.
10843
+ * @param path - The storage path containing the bucket ID.
10812
10844
  * @returns The resolved Google Cloud Storage bucket.
10813
10845
  */ function googleCloudStorageBucketForStorageFilePath(storage, path) {
10814
10846
  return storage.bucket(path.bucketId);
@@ -10816,8 +10848,8 @@ function _ts_generator$2(thisArg, body) {
10816
10848
  /**
10817
10849
  * Resolves a Google Cloud Storage {@link GoogleCloudFile} from a {@link StoragePath}.
10818
10850
  *
10819
- * @param storage - the Google Cloud Storage client instance.
10820
- * @param path - the storage path containing bucket ID and file path.
10851
+ * @param storage - The Google Cloud Storage client instance.
10852
+ * @param path - The storage path containing bucket ID and file path.
10821
10853
  * @returns The resolved Google Cloud Storage file reference.
10822
10854
  */ function googleCloudStorageFileForStorageFilePath(storage, path) {
10823
10855
  return googleCloudStorageBucketForStorageFilePath(storage, path).file(path.pathString);
@@ -10825,8 +10857,8 @@ function _ts_generator$2(thisArg, body) {
10825
10857
  /**
10826
10858
  * Converts Google Cloud Storage {@link FileMetadata} into the normalized {@link StorageMetadata} format.
10827
10859
  *
10828
- * @param file - the Google Cloud Storage file reference.
10829
- * @param metadata - the raw file metadata from the Google Cloud SDK.
10860
+ * @param file - The Google Cloud Storage file reference.
10861
+ * @param metadata - The raw file metadata from the Google Cloud SDK.
10830
10862
  * @returns Normalized storage metadata.
10831
10863
  */ function googleCloudFileMetadataToStorageMetadata(file, metadata) {
10832
10864
  var _metadata_generation;
@@ -10859,8 +10891,8 @@ function _ts_generator$2(thisArg, body) {
10859
10891
  *
10860
10892
  * Handles emulator-specific edge cases (e.g., signing errors, atomic move fallback).
10861
10893
  *
10862
- * @param storage - the Google Cloud Storage client instance.
10863
- * @param storagePath - the storage path identifying the file's bucket and path.
10894
+ * @param storage - The Google Cloud Storage client instance.
10895
+ * @param storagePath - The storage path identifying the file's bucket and path.
10864
10896
  * @returns A file accessor with CRUD, streaming, and ACL operations.
10865
10897
  */ function googleCloudStorageAccessorFile(storage$1, storagePath) {
10866
10898
  var file = googleCloudStorageFileForStorageFilePath(storage$1, storagePath);
@@ -11219,8 +11251,8 @@ var googleCloudStorageListFilesResultFactory = firebase.storageListFilesResultFa
11219
11251
  * Creates a {@link GoogleCloudStorageAccessorFolder} that supports checking folder existence
11220
11252
  * and listing files/subfolders with pagination.
11221
11253
  *
11222
- * @param storage - the Google Cloud Storage client instance.
11223
- * @param storagePath - the storage path identifying the folder's bucket and prefix.
11254
+ * @param storage - The Google Cloud Storage client instance.
11255
+ * @param storagePath - The storage path identifying the folder's bucket and prefix.
11224
11256
  * @returns A folder accessor with existence checking and listing operations.
11225
11257
  */ function googleCloudStorageAccessorFolder(storage, storagePath) {
11226
11258
  var bucket = googleCloudStorageBucketForStorageFilePath(storage, storagePath);
@@ -11556,7 +11588,7 @@ exports.FirebaseServerStorageContextModule = __decorate([
11556
11588
  *
11557
11589
  * @param input - A bucket ID string or full factory config object.
11558
11590
  * @returns A NestJS provider for the storage context factory config token.
11559
- * @throws Error if `defaultBucketId` is empty.
11591
+ * @throws {Error} If `defaultBucketId` is empty.
11560
11592
  *
11561
11593
  * @example
11562
11594
  * ```typescript
@@ -11593,7 +11625,7 @@ exports.FirebaseServerStorageContextModule = __decorate([
11593
11625
  * so the service can also be injected by the abstract type.
11594
11626
  *
11595
11627
  * @param provider - The storage service provider configuration.
11596
- * @returns An array of NestJS providers for the storage service.
11628
+ * @returns Array of NestJS providers for the storage service.
11597
11629
  * @__NO_SIDE_EFFECTS__
11598
11630
  */ function provideFirebaseServerStorageService(provider) {
11599
11631
  var _provider_inject;
@@ -11619,11 +11651,12 @@ exports.FirebaseServerStorageContextModule = __decorate([
11619
11651
  * @param config - Optional configuration including a custom service provider and additional module metadata.
11620
11652
  * @returns NestJS module metadata ready to be passed to the `@Module()` decorator.
11621
11653
  *
11622
- * @example
11623
- * ```typescript
11624
- * @Module(firebaseServerStorageModuleMetadata())
11654
+ * @Module (firebaseServerStorageModuleMetadata())
11625
11655
  * export class AppStorageModule {}
11626
11656
  * ```
11657
+ *
11658
+ * @example
11659
+ * ```typescript
11627
11660
  */ function firebaseServerStorageModuleMetadata(config) {
11628
11661
  var _ref;
11629
11662
  var serviceProvider = (_ref = config === null || config === void 0 ? void 0 : config.serviceProvider) !== null && _ref !== void 0 ? _ref : defaultProvideFirebaseServerStorageServiceSimple();
@@ -11737,8 +11770,9 @@ var FirebaseNestServerRootModule = function FirebaseNestServerRootModule() {
11737
11770
  * - `GlobalRoutePrefixConfig` token
11738
11771
  * - Optional webhook and AppCheck middleware modules
11739
11772
  *
11740
- * @param config - Shared configuration
11741
- * @returns The root module and resolved prefix config
11773
+ * @param config - Shared configuration.
11774
+ * @returns The root module and resolved prefix config.
11775
+ *
11742
11776
  * @__NO_SIDE_EFFECTS__
11743
11777
  */ function buildNestServerRootModule(config) {
11744
11778
  var _ref, _ref1;
@@ -12040,6 +12074,7 @@ function _ts_generator$1(thisArg, body) {
12040
12074
  };
12041
12075
  }
12042
12076
  }
12077
+ // COMPAT: Deprecated alias for NestFirebaseServerEnvironmentConfig.
12043
12078
  /**
12044
12079
  * Creates a {@link NestServerInstance} that manages NestJS server lifecycle within Firebase Cloud Functions.
12045
12080
  *
@@ -12420,8 +12455,9 @@ function _ts_generator(thisArg, body) {
12420
12455
  get: /**
12421
12456
  * Returns the NestJS application context.
12422
12457
  *
12423
- * @deprecated use nestApplication instead.
12424
12458
  * @returns The NestJS application context.
12459
+ *
12460
+ * @deprecated use nestApplication instead.
12425
12461
  */ function get() {
12426
12462
  return this._nestApplication;
12427
12463
  }
@@ -12549,9 +12585,9 @@ function _ts_generator(thisArg, body) {
12549
12585
  * {@link nestFirebaseForbiddenPermissionError}. These errors are captured per-key
12550
12586
  * and passed to the `use` function via the failure array (unless `throwOnFirstError` is true).
12551
12587
  *
12552
- * @param type - the model type to load
12553
- * @param select - selection params including keys array, roles, and use function
12554
- * @returns the result of the use function
12588
+ * @param type - The model type to load.
12589
+ * @param select - Selection params including keys array, roles, and use function.
12590
+ * @returns The result of the use function.
12555
12591
  *
12556
12592
  * @example
12557
12593
  * ```ts
@@ -12618,18 +12654,12 @@ function _ts_generator(thisArg, body) {
12618
12654
  throw errors[0].error;
12619
12655
  }
12620
12656
  // useOnFirstError: call use() with empty successes and abortedEarly: true on first error
12621
- if (hasErrors && useOnFirstError) {
12622
- return [
12623
- 2,
12624
- use([], {
12625
- errors: errors,
12626
- abortedEarly: true
12627
- })
12628
- ];
12629
- }
12630
12657
  return [
12631
12658
  2,
12632
- use(successful, {
12659
+ hasErrors && useOnFirstError ? use([], {
12660
+ errors: errors,
12661
+ abortedEarly: true
12662
+ }) : use(successful, {
12633
12663
  errors: errors,
12634
12664
  abortedEarly: false
12635
12665
  })