@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
@@ -76,6 +76,9 @@ export type CloudEventHandlerWithNestContextFactory<N> = <E extends CloudEvent<a
76
76
  * context, and delegates to the handler. This is the event-triggered equivalent of
77
77
  * {@link onCallHandlerWithNestContextFactory} for callable functions.
78
78
  *
79
+ * @param makeNestContext - Factory that creates the typed context from the NestJS application context.
80
+ * @returns A factory for creating nest-context-aware event function handlers.
81
+ *
79
82
  * @example
80
83
  * ```ts
81
84
  * const factory = cloudEventHandlerWithNestContextFactory(makeMyContext);
@@ -87,8 +90,6 @@ export type CloudEventHandlerWithNestContextFactory<N> = <E extends CloudEvent<a
87
90
  * );
88
91
  * ```
89
92
  *
90
- * @param makeNestContext - Factory that creates the typed context from the NestJS application context.
91
- * @returns A factory for creating nest-context-aware event function handlers.
92
93
  * @__NO_SIDE_EFFECTS__
93
94
  */
94
95
  export declare function cloudEventHandlerWithNestContextFactory<N>(makeNestContext: MakeNestContext<N>): CloudEventHandlerWithNestContextFactory<N>;
@@ -36,6 +36,9 @@ export type OnScheduleHandlerWithNestApplicationFactory = (schedule: OnScheduleC
36
36
  * merges base and per-function schedule options, and attaches `_runNow` and `_schedule` metadata
37
37
  * to the resulting function for testing and introspection.
38
38
  *
39
+ * @param baseScheduleConfig - Optional default schedule options merged into every function created by this factory.
40
+ * @returns A factory for creating nest-application-aware scheduled functions.
41
+ *
39
42
  * @example
40
43
  * ```ts
41
44
  * const scheduleFactory = onScheduleHandlerWithNestApplicationFactory({ timeoutSeconds: 60 });
@@ -45,8 +48,6 @@ export type OnScheduleHandlerWithNestApplicationFactory = (schedule: OnScheduleC
45
48
  * );
46
49
  * ```
47
50
  *
48
- * @param baseScheduleConfig - Optional default schedule options merged into every function created by this factory.
49
- * @returns A factory for creating nest-application-aware scheduled functions.
50
51
  * @__NO_SIDE_EFFECTS__
51
52
  */
52
53
  export declare function onScheduleHandlerWithNestApplicationFactory(baseScheduleConfig?: OnScheduleConfigWithGlobalOptions): OnScheduleHandlerWithNestApplicationFactory;
@@ -14,9 +14,10 @@ export type TaskQueueFunctionHandlerWithNestContextFactory<N> = <I = unknown>(fn
14
14
  /**
15
15
  * Creates a TaskQueueFunctionHandlerWithNestContextFactory.
16
16
  *
17
- * @param appFactory
18
17
  * @param makeNestContext
18
+ * @param appFactory
19
19
  * @returns
20
+ *
20
21
  * @__NO_SIDE_EFFECTS__
21
22
  */
22
23
  export declare function taskQueueFunctionHandlerWithNestContextFactory<N>(makeNestContext: MakeNestContext<N>): TaskQueueFunctionHandlerWithNestContextFactory<N>;
@@ -26,15 +26,15 @@ export type OnCallAnalyticsEmitterInstance = (lifecycle: OnCallModelAnalyticsEve
26
26
  * Creates an {@link OnCallAnalyticsEmitterInstance} that produces {@link OnCallAnalyticsEmitter} instances
27
27
  * for each lifecycle stage, pre-bound to the given service and context.
28
28
  *
29
+ * @param config - The service and context to bind to the emitter factory.
30
+ * @returns A factory function that creates lifecycle-stage-specific emitters.
31
+ *
29
32
  * @example
30
33
  * ```typescript
31
34
  * const emitter = onCallAnalyticsEmitterInstance({ service, context });
32
35
  * emitter('triggered').sendEventType('Handler Starting');
33
36
  * emitter('success').sendEvent('Widget Created', { id: result.id });
34
37
  * ```
35
- *
36
- * @param config - The service and context to bind to the emitter factory.
37
- * @returns A factory function that creates lifecycle-stage-specific emitters.
38
38
  */
39
39
  export declare function onCallAnalyticsEmitterInstance(config: OnCallAnalyticsEmitterInstanceConfig): OnCallAnalyticsEmitterInstance;
40
40
  /**
@@ -55,8 +55,8 @@ export interface CallWithAnalyticsConfig<O> {
55
55
  * Analytics callback errors are caught and logged but never propagate — the handler result
56
56
  * or error is always returned/thrown unmodified.
57
57
  *
58
- * @param config - the handler, analytics details, service, and context
59
- * @returns the handler's return value
58
+ * @param config - The handler, analytics details, service, and context.
59
+ * @returns The handler's return value.
60
60
  *
61
61
  * @example
62
62
  * ```ts
@@ -227,6 +227,9 @@ export interface WithApiDetailsConfig<F extends (...args: any[]) => any> extends
227
227
  * (same effect as optionalAuthContext). This avoids the composition issue where
228
228
  * optionalAuthContext(withApiDetails(...)) would lose the _apiDetails.
229
229
  *
230
+ * @param config - The API details configuration including the handler function.
231
+ * @returns The handler function with _apiDetails attached.
232
+ *
230
233
  * @example
231
234
  * ```typescript
232
235
  * // Handler with api details (auth required by default)
@@ -245,9 +248,6 @@ export interface WithApiDetailsConfig<F extends (...args: any[]) => any> extends
245
248
  * fn: async (request) => { ... }
246
249
  * });
247
250
  * ```
248
- *
249
- * @param config - The API details configuration including the handler function.
250
- * @returns The handler function with _apiDetails attached.
251
251
  */
252
252
  export declare function withApiDetails<F extends (...args: any[]) => any>(config: WithApiDetailsConfig<F>): F & OnCallModelFunctionApiDetailsRef;
253
253
  /**
@@ -344,7 +344,7 @@ export interface ModelApiDetailsModelEntry {
344
344
  * pivots it to modelType → CRUD, which is the natural shape for MCP tool generation
345
345
  * and schema introspection.
346
346
  *
347
- * @param callModelFn The function returned by onCallModel(), or any object with _apiDetails.
347
+ * @param callModelFn - The function returned by onCallModel(), or any object with _apiDetails.
348
348
  * @returns Model-first API details, or undefined if no _apiDetails are present.
349
349
  *
350
350
  * @example
@@ -178,6 +178,9 @@ export interface ExecuteOnCallQueryConfig<T, R = T> {
178
178
  * - Fetching one extra document to detect whether more results exist
179
179
  * - Building the {@link OnCallQueryModelResult} with cursorDocumentKey and hasMore
180
180
  *
181
+ * @param config - Query configuration including collection, constraints, and pagination params.
182
+ * @returns Paginated query result with cursor for the next page.
183
+ *
181
184
  * @example
182
185
  * ```typescript
183
186
  * export const queryGuestbooks: DemoQueryModelFunction<QueryGuestbooksParams, OnCallQueryModelResult<Guestbook>> = async (request) => {
@@ -200,8 +203,5 @@ export interface ExecuteOnCallQueryConfig<T, R = T> {
200
203
  * });
201
204
  * };
202
205
  * ```
203
- *
204
- * @param config - Query configuration including collection, constraints, and pagination params.
205
- * @returns Paginated query result with cursor for the next page.
206
206
  */
207
207
  export declare function executeOnCallQuery<T, R = T>(config: ExecuteOnCallQueryConfig<T, R>): Promise<OnCallQueryModelResult<R>>;
@@ -30,8 +30,9 @@ export declare abstract class AbstractNestContext {
30
30
  /**
31
31
  * Returns the NestJS application context.
32
32
  *
33
- * @deprecated use nestApplication instead.
34
33
  * @returns The NestJS application context.
34
+ *
35
+ * @deprecated use nestApplication instead.
35
36
  */
36
37
  get nest(): INestApplicationContext;
37
38
  /**
@@ -94,12 +95,11 @@ export declare abstract class AbstractFirebaseNestContext<A, Y extends FirebaseM
94
95
  * When called without a `use` function, returns the {@link ContextGrantedModelRolesReader}
95
96
  * which provides access to the document and its granted roles.
96
97
  *
97
- * @throws Throws {@link nestFirebaseDoesNotExistError} if the document does not exist.
98
- * @throws Throws {@link nestFirebaseForbiddenPermissionError} if the caller lacks the requested roles.
99
- *
100
98
  * @param type - The model type string (e.g., 'profile', 'guestbook').
101
99
  * @param select - Selection params including key, roles, and optional use function.
102
100
  * @returns The result of the `use` function, or the roles reader if no `use` function is provided.
101
+ * @throws {Error} Throws {@link nestFirebaseDoesNotExistError} if the document does not exist.
102
+ * @throws {Error} Throws {@link nestFirebaseForbiddenPermissionError} if the caller lacks the requested roles.
103
103
  */
104
104
  useModel<T extends FirebaseModelsServiceTypes<Y>, O>(type: T, select: UseModelInput<FirebaseAppModelContext<A>, Y, T, O>): Promise<O>;
105
105
  useModel<T extends FirebaseModelsServiceTypes<Y>>(type: T, select: UseModelInputForRolesReader<FirebaseAppModelContext<A>, Y, T>): Promise<FirebaseModelsServiceSelectionResultRolesReader<Y, T>>;
@@ -114,9 +114,9 @@ export declare abstract class AbstractFirebaseNestContext<A, Y extends FirebaseM
114
114
  * {@link nestFirebaseForbiddenPermissionError}. These errors are captured per-key
115
115
  * and passed to the `use` function via the failure array (unless `throwOnFirstError` is true).
116
116
  *
117
- * @param type - the model type to load
118
- * @param select - selection params including keys array, roles, and use function
119
- * @returns the result of the use function
117
+ * @param type - The model type to load.
118
+ * @param select - Selection params including keys array, roles, and use function.
119
+ * @returns The result of the use function.
120
120
  *
121
121
  * @example
122
122
  * ```ts
@@ -29,7 +29,7 @@ export declare class FirebaseServerStorageContextModule {
29
29
  *
30
30
  * @param input - A bucket ID string or full factory config object.
31
31
  * @returns A NestJS provider for the storage context factory config token.
32
- * @throws Error if `defaultBucketId` is empty.
32
+ * @throws {Error} If `defaultBucketId` is empty.
33
33
  *
34
34
  * @example
35
35
  * ```typescript
@@ -57,7 +57,7 @@ export type ProvideFirebaseServerStorageService<T extends FirebaseServerStorageS
57
57
  * so the service can also be injected by the abstract type.
58
58
  *
59
59
  * @param provider - The storage service provider configuration.
60
- * @returns An array of NestJS providers for the storage service.
60
+ * @returns Array of NestJS providers for the storage service.
61
61
  * @__NO_SIDE_EFFECTS__
62
62
  */
63
63
  export declare function provideFirebaseServerStorageService<T extends FirebaseServerStorageService = FirebaseServerStorageService>(provider: ProvideFirebaseServerStorageService<T>): Provider<T>[];
@@ -71,10 +71,11 @@ export interface FirebaseServerStorageModuleMetadataConfig<T extends FirebaseSer
71
71
  * @param config - Optional configuration including a custom service provider and additional module metadata.
72
72
  * @returns NestJS module metadata ready to be passed to the `@Module()` decorator.
73
73
  *
74
- * @example
75
- * ```typescript
76
- * @Module(firebaseServerStorageModuleMetadata())
74
+ * @Module (firebaseServerStorageModuleMetadata())
77
75
  * export class AppStorageModule {}
78
76
  * ```
77
+ *
78
+ * @example
79
+ * ```typescript
79
80
  */
80
81
  export declare function firebaseServerStorageModuleMetadata<T extends FirebaseServerStorageService = FirebaseServerStorageService>(config?: FirebaseServerStorageModuleMetadataConfig<T>): ModuleMetadata;
@@ -4,16 +4,16 @@ import { type GetFilesOptions, type Storage as GoogleCloudStorage, type File as
4
4
  /**
5
5
  * Resolves a Google Cloud Storage {@link Bucket} from a {@link StoragePath}.
6
6
  *
7
- * @param storage - the Google Cloud Storage client instance.
8
- * @param path - the storage path containing the bucket ID.
7
+ * @param storage - The Google Cloud Storage client instance.
8
+ * @param path - The storage path containing the bucket ID.
9
9
  * @returns The resolved Google Cloud Storage bucket.
10
10
  */
11
11
  export declare function googleCloudStorageBucketForStorageFilePath(storage: GoogleCloudStorage, path: StoragePath): Bucket;
12
12
  /**
13
13
  * Resolves a Google Cloud Storage {@link GoogleCloudFile} from a {@link StoragePath}.
14
14
  *
15
- * @param storage - the Google Cloud Storage client instance.
16
- * @param path - the storage path containing bucket ID and file path.
15
+ * @param storage - The Google Cloud Storage client instance.
16
+ * @param path - The storage path containing bucket ID and file path.
17
17
  * @returns The resolved Google Cloud Storage file reference.
18
18
  */
19
19
  export declare function googleCloudStorageFileForStorageFilePath(storage: GoogleCloudStorage, path: StoragePath): GoogleCloudFile;
@@ -24,8 +24,8 @@ export type GoogleCloudStorageAccessorFile = FirebaseStorageAccessorFile<GoogleC
24
24
  /**
25
25
  * Converts Google Cloud Storage {@link FileMetadata} into the normalized {@link StorageMetadata} format.
26
26
  *
27
- * @param file - the Google Cloud Storage file reference.
28
- * @param metadata - the raw file metadata from the Google Cloud SDK.
27
+ * @param file - The Google Cloud Storage file reference.
28
+ * @param metadata - The raw file metadata from the Google Cloud SDK.
29
29
  * @returns Normalized storage metadata.
30
30
  */
31
31
  export declare function googleCloudFileMetadataToStorageMetadata(file: GoogleCloudFile, metadata: FileMetadata): StorageMetadata;
@@ -35,8 +35,8 @@ export declare function googleCloudFileMetadataToStorageMetadata(file: GoogleClo
35
35
  *
36
36
  * Handles emulator-specific edge cases (e.g., signing errors, atomic move fallback).
37
37
  *
38
- * @param storage - the Google Cloud Storage client instance.
39
- * @param storagePath - the storage path identifying the file's bucket and path.
38
+ * @param storage - The Google Cloud Storage client instance.
39
+ * @param storagePath - The storage path identifying the file's bucket and path.
40
40
  * @returns A file accessor with CRUD, streaming, and ACL operations.
41
41
  */
42
42
  export declare function googleCloudStorageAccessorFile(storage: GoogleCloudStorage, storagePath: StoragePath): GoogleCloudStorageAccessorFile;
@@ -66,8 +66,8 @@ export declare const googleCloudStorageListFilesResultFactory: import("@dereekb/
66
66
  * Creates a {@link GoogleCloudStorageAccessorFolder} that supports checking folder existence
67
67
  * and listing files/subfolders with pagination.
68
68
  *
69
- * @param storage - the Google Cloud Storage client instance.
70
- * @param storagePath - the storage path identifying the folder's bucket and prefix.
69
+ * @param storage - The Google Cloud Storage client instance.
70
+ * @param storagePath - The storage path identifying the folder's bucket and prefix.
71
71
  * @returns A folder accessor with existence checking and listing operations.
72
72
  */
73
73
  export declare function googleCloudStorageAccessorFolder(storage: GoogleCloudStorage, storagePath: StoragePath): GoogleCloudStorageAccessorFolder;
package/test/index.cjs.js CHANGED
@@ -426,7 +426,7 @@ function _ts_generator$a(thisArg, body) {
426
426
  * @param fn - Wrapped gen 2 callable request to invoke.
427
427
  * @param params - Request payload to pass to the callable, simulating the JSON body of an HTTP call.
428
428
  * @param skipJsonConversion - When `true`, skip the JSON serialize/parse round-trip applied to `params` (default `false`).
429
- * @returns A promise resolving to the callable's return value.
429
+ * @returns Promise resolving to the callable's return value.
430
430
  */ key: "callWrappedFunction",
431
431
  value: function callWrappedFunction(fn, params, skipJsonConversion) {
432
432
  // Parse to JSON then back to simulate sending JSON to the server, and the server parsing it as a POJO.
@@ -462,7 +462,7 @@ function _ts_generator$a(thisArg, body) {
462
462
  * @param input.eventType - Discriminator for the auth event being simulated (`google.firebase.auth.user.create` or `google.firebase.auth.user.delete`).
463
463
  * @param input.eventOverride - Partial event fields used to override the default placeholder values (e.g., `ipAddress`, `userAgent`, `resource`).
464
464
  * @param input.skipJsonConversion - When `true`, skip the JSON serialize/parse round-trip applied to the event payload (default `false`).
465
- * @returns A promise that resolves once the blocking function has completed.
465
+ * @returns Resolves once the blocking function has completed.
466
466
  */ key: "callAuthBlockingFunction",
467
467
  value: function callAuthBlockingFunction(input) {
468
468
  var fn = input.fn, userRecord = input.userRecord, eventType = input.eventType, eventOverride = input.eventOverride, _input_skipJsonConversion = input.skipJsonConversion, skipJsonConversion = _input_skipJsonConversion === void 0 ? false : _input_skipJsonConversion;
@@ -486,13 +486,13 @@ function _ts_generator$a(thisArg, body) {
486
486
  },
487
487
  {
488
488
  /**
489
- * @deprecated gen 1
490
- *
491
489
  * @param fn
492
490
  * @param params
493
491
  * @param contextOptions
494
492
  * @param skipJsonConversion
495
493
  * @returns
494
+ *
495
+ * @deprecated gen 1
496
496
  */ // eslint-disable-next-line @typescript-eslint/max-params -- deprecated gen 1 signature kept for downstream compatibility
497
497
  key: "callEventCloudFunction",
498
498
  value: function callEventCloudFunction(fn, params, contextOptions) {
@@ -536,7 +536,7 @@ function _ts_generator$a(thisArg, body) {
536
536
  * custom claims, and post-create initialization) and tear it down afterward.
537
537
  *
538
538
  * @param config - Factory configuration: optional uid generator, custom fixture/instance constructors, user-detail builder, and `initUser` hook.
539
- * @returns A function that, given runtime params and a `buildTests` callback, wires the authorized-user fixture into the active test context.
539
+ * @returns Function that, given runtime params and a `buildTests` callback, wires the authorized-user fixture into the active test context.
540
540
  */ function authorizedUserContextFactory(config) {
541
541
  var uidGetter = config.uid, _config_makeInstance = config.makeInstance, makeInstance = _config_makeInstance === void 0 ? function(uid, testInstance) {
542
542
  return new AuthorizedUserTestContextInstance(uid, testInstance);
@@ -1147,7 +1147,7 @@ function _ts_generator$9(thisArg, body) {
1147
1147
  * build the test context instance, optionally initialize the document, and clean up after each test.
1148
1148
  *
1149
1149
  * @param config - Factory configuration that resolves the collection, optionally produces document refs, builds fixtures/instances, and tears down state.
1150
- * @returns A function that, given runtime params and a `buildTests` callback, registers the model fixture hooks against the active test context.
1150
+ * @returns Function that, given runtime params and a `buildTests` callback, registers the model fixture hooks against the active test context.
1151
1151
  *
1152
1152
  * @see {@link ModelTestContextFactoryParams} for configuration options
1153
1153
  */ function modelTestContextFactory(config) {
@@ -1309,7 +1309,7 @@ var adminEnvironmentInitialized = false;
1309
1309
  * so that each component can also
1310
1310
  *
1311
1311
  * @returns The test project ID that was re-applied to `FIREBASE_CONFIG`/`GCLOUD_PROJECT`.
1312
- * @throws Error when no test project ID is present in the environment (i.e., {@link initFirebaseAdminTestEnvironment} has not been called).
1312
+ * @throws {Error} When no test project ID is present in the environment (i.e., {@link initFirebaseAdminTestEnvironment} has not been called).
1313
1313
  */ function applyFirebaseGCloudTestProjectIdToFirebaseConfigEnv() {
1314
1314
  var _process_env_FIREBASE_CONFIG;
1315
1315
  // firebase-functions-test overwrites this each time.
@@ -2681,24 +2681,16 @@ function _ts_generator$5(thisArg, body) {
2681
2681
  return _async_to_generator$5(function() {
2682
2682
  var _ref, request;
2683
2683
  return _ts_generator$5(this, function(_state) {
2684
- switch(_state.label){
2685
- case 0:
2686
- request = _object_spread_props$2(_object_spread$3({}, context), {
2687
- data: data,
2688
- // NOTE: These will typically not be used/available as they are express.js properties that are not available or useful to the handlers
2689
- rawRequest: (_ref = context === null || context === void 0 ? void 0 : context.rawRequest) !== null && _ref !== void 0 ? _ref : {},
2690
- acceptsStreaming: false
2691
- });
2692
- return [
2693
- 4,
2694
- wrappedCloudFunction(request)
2695
- ];
2696
- case 1:
2697
- return [
2698
- 2,
2699
- _state.sent()
2700
- ];
2701
- }
2684
+ request = _object_spread_props$2(_object_spread$3({}, context), {
2685
+ data: data,
2686
+ // NOTE: These will typically not be used/available as they are express.js properties that are not available or useful to the handlers
2687
+ rawRequest: (_ref = context === null || context === void 0 ? void 0 : context.rawRequest) !== null && _ref !== void 0 ? _ref : {},
2688
+ acceptsStreaming: false
2689
+ });
2690
+ return [
2691
+ 2,
2692
+ wrappedCloudFunction(request)
2693
+ ];
2702
2694
  });
2703
2695
  })();
2704
2696
  };
@@ -2722,28 +2714,6 @@ function _ts_generator$5(thisArg, body) {
2722
2714
  };
2723
2715
  return wrapper;
2724
2716
  }
2725
- /**
2726
- * Creates a lazy getter that wraps a gen 1 cloud function for testing each time it is called.
2727
- *
2728
- * The returned getter re-wraps on every invocation, so it always reflects the latest function
2729
- * reference from the provided getter — useful when the function under test is re-created between tests.
2730
- *
2731
- * @param wrapper - The cloud function wrapper providing gen 1 wrap support.
2732
- * @param getter - Lazy accessor for the gen 1 cloud function under test; re-evaluated on every getter call.
2733
- * @returns A getter that, when invoked, returns a freshly wrapped gen 1 cloud function ready for invocation in tests.
2734
- *
2735
- * @example
2736
- * ```ts
2737
- * const getWrapped = wrapCloudFunctionV1ForTests(wrapper, () => myV1Function);
2738
- * const result = await getWrapped()({ /* event data *\/ });
2739
- * ```
2740
- *
2741
- * @deprecated Prefer gen 2 functions and {@link wrapCloudFunctionV2ForTests} or {@link wrapCloudFunctionTests}.
2742
- */ function wrapCloudFunctionV1ForTests(wrapper, getter) {
2743
- return function() {
2744
- return wrapper.wrapV1CloudFunction(getter());
2745
- };
2746
- }
2747
2717
  /**
2748
2718
  * Creates a lazy getter that wraps a {@link CallableHttpFunction} for testing each time it is called.
2749
2719
  *
@@ -2764,6 +2734,28 @@ function _ts_generator$5(thisArg, body) {
2764
2734
  return wrapper.wrapCallableRequest(getter());
2765
2735
  };
2766
2736
  }
2737
+ /**
2738
+ * Creates a lazy getter that wraps a gen 1 cloud function for testing each time it is called.
2739
+ *
2740
+ * The returned getter re-wraps on every invocation, so it always reflects the latest function
2741
+ * reference from the provided getter — useful when the function under test is re-created between tests.
2742
+ *
2743
+ * @param wrapper - The cloud function wrapper providing gen 1 wrap support.
2744
+ * @param getter - Lazy accessor for the gen 1 cloud function under test; re-evaluated on every getter call.
2745
+ * @returns A getter that, when invoked, returns a freshly wrapped gen 1 cloud function ready for invocation in tests.
2746
+ *
2747
+ * @deprecated Prefer gen 2 functions and {@link wrapCloudFunctionV2ForTests} or {@link wrapCloudFunctionTests}.
2748
+ *
2749
+ * @example
2750
+ * ```ts
2751
+ * const getWrapped = wrapCloudFunctionV1ForTests(wrapper, () => myV1Function);
2752
+ * const result = await getWrapped()({ /* event data *\/ });
2753
+ * ```
2754
+ */ function wrapCloudFunctionV1ForTests(wrapper, getter) {
2755
+ return function() {
2756
+ return wrapper.wrapV1CloudFunction(getter());
2757
+ };
2758
+ }
2767
2759
 
2768
2760
  function _assert_this_initialized$4(self) {
2769
2761
  if (self === void 0) {
@@ -3034,7 +3026,7 @@ var functionsInitialized = false;
3034
3026
  * @param reroll - When `true`, generates a new project ID instead of reusing the current one.
3035
3027
  * @returns The initialized {@link FeaturesList} singleton.
3036
3028
  *
3037
- * @throws Error if `initFirebaseAdminTestEnvironment()` has not been called.
3029
+ * @throws {Error} If `initFirebaseAdminTestEnvironment()` has not been called.
3038
3030
  *
3039
3031
  * @example
3040
3032
  * ```ts
@@ -4908,18 +4900,17 @@ function _ts_generator$1(thisArg, body) {
4908
4900
  * @returns The space-separated scope string to pass to the `/oidc/auth` endpoint.
4909
4901
  */ function resolveScopes(nestApp, config) {
4910
4902
  return _async_to_generator$1(function() {
4911
- var accountService;
4903
+ var result, accountService;
4912
4904
  return _ts_generator$1(this, function(_state) {
4913
4905
  if (config === null || config === void 0 ? void 0 : config.scopes) {
4914
- return [
4915
- 2,
4916
- config.scopes
4917
- ];
4906
+ result = config.scopes;
4907
+ } else {
4908
+ accountService = nestApp.get(oidc.OidcAccountService);
4909
+ result = Object.keys(accountService.providerConfig.claims).join(' ');
4918
4910
  }
4919
- accountService = nestApp.get(oidc.OidcAccountService);
4920
4911
  return [
4921
4912
  2,
4922
- Object.keys(accountService.providerConfig.claims).join(' ')
4913
+ result
4923
4914
  ];
4924
4915
  });
4925
4916
  })();
@@ -4936,7 +4927,7 @@ function _ts_generator$1(thisArg, body) {
4936
4927
  * @param input.uid - Firebase user ID for whom the test ID token is minted and the OAuth flow is authorized.
4937
4928
  * @param input.config - Optional flow overrides (scopes, redirect URI, client name, token endpoint auth method).
4938
4929
  * @returns The exchanged access token and ID token from the OIDC `/token` endpoint.
4939
- * @throws Error when the token exchange step fails (the response body and status are included in the message).
4930
+ * @throws {Error} When the token exchange step fails (the response body and status are included in the message).
4940
4931
  */ function performFullOAuthFlow(input) {
4941
4932
  return _async_to_generator$1(function() {
4942
4933
  var _ref, _ref1, _ref2, server, oidcClientService, nestApp, uid, config, _createCookieJar, collectCookies, cookieHeader, redirectUri, clientName, tokenEndpointAuthMethod, scopes, _ref3, client_id, client_secret, codeVerifier, codeChallenge, authRes, loginUid, idToken, loginRes, resumeAfterLoginPath, consentRedirectRes, consentUid, consentRes, resumeAfterConsentPath, callbackRedirectRes, callbackUrl, authorizationCode, tokenRes;
@@ -5471,7 +5462,7 @@ function _ts_generator(thisArg, body) {
5471
5462
  * and provides an authenticated supertest agent and helper methods.
5472
5463
  *
5473
5464
  * @param config - Optional flow overrides (scopes, redirect URI, client name, timeout) and custom fixture/instance constructors.
5474
- * @returns A function that, given parent fixtures and a `buildTests` callback, registers a `describe('(oauth)', ...)` block which performs the full OAuth flow and exposes the authenticated supertest fixture.
5465
+ * @returns Function that, given parent fixtures and a `buildTests` callback, registers a `describe('(oauth)', ...)` block which performs the full OAuth flow and exposes the authenticated supertest fixture.
5475
5466
  *
5476
5467
  * @example
5477
5468
  * ```typescript