@causa/runtime-google 0.32.1 → 0.33.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (69) hide show
  1. package/dist/app-check/guard.d.ts +1 -1
  2. package/dist/app-check/guard.js +1 -1
  3. package/dist/app-check/testing.d.ts +1 -1
  4. package/dist/firebase/app.d.ts +1 -1
  5. package/dist/firebase/lifecycle.service.d.ts +2 -2
  6. package/dist/firebase/module.d.ts +2 -2
  7. package/dist/firebase/testing.d.ts +1 -1
  8. package/dist/firestore/collection.decorator.d.ts +1 -1
  9. package/dist/firestore/collection.decorator.js +1 -0
  10. package/dist/firestore/collections.module.d.ts +1 -1
  11. package/dist/firestore/converter.d.ts +2 -2
  12. package/dist/firestore/converter.js +1 -1
  13. package/dist/firestore/healthcheck.d.ts +1 -1
  14. package/dist/firestore/inject-collection.decorator.d.ts +1 -1
  15. package/dist/firestore/testing.d.ts +2 -2
  16. package/dist/firestore/testing.js +1 -1
  17. package/dist/identity-platform/identity-platform.strategy.d.ts +1 -1
  18. package/dist/identity-platform/testing.d.ts +1 -1
  19. package/dist/identity-platform/testing.js +1 -1
  20. package/dist/logging/configuration.d.ts +1 -1
  21. package/dist/pubsub/healthcheck.d.ts +1 -1
  22. package/dist/pubsub/interceptor.d.ts +4 -4
  23. package/dist/pubsub/publisher.d.ts +4 -4
  24. package/dist/pubsub/publisher.js +1 -1
  25. package/dist/pubsub/publisher.module.d.ts +2 -2
  26. package/dist/pubsub/testing/fixture.d.ts +3 -3
  27. package/dist/pubsub/testing/fixture.js +1 -1
  28. package/dist/pubsub/testing/index.d.ts +4 -2
  29. package/dist/pubsub/testing/index.js +1 -1
  30. package/dist/pubsub/testing/requester.d.ts +2 -2
  31. package/dist/spanner/column.decorator.d.ts +1 -1
  32. package/dist/spanner/conversion.d.ts +2 -2
  33. package/dist/spanner/database.d.ts +2 -2
  34. package/dist/spanner/database.js +1 -1
  35. package/dist/spanner/entity-manager.d.ts +4 -4
  36. package/dist/spanner/entity-manager.js +1 -1
  37. package/dist/spanner/errors.d.ts +1 -1
  38. package/dist/spanner/healthcheck.d.ts +1 -1
  39. package/dist/spanner/index.d.ts +2 -1
  40. package/dist/spanner/index.js +1 -1
  41. package/dist/spanner/lifecycle.service.d.ts +1 -1
  42. package/dist/spanner/module.d.ts +2 -2
  43. package/dist/spanner/table-cache.d.ts +1 -1
  44. package/dist/spanner/table.decorator.d.ts +1 -1
  45. package/dist/spanner/testing.d.ts +1 -1
  46. package/dist/spanner/testing.js +1 -1
  47. package/dist/tasks/index.d.ts +2 -1
  48. package/dist/tasks/index.js +1 -1
  49. package/dist/tasks/module.d.ts +1 -1
  50. package/dist/tasks/scheduler.d.ts +3 -3
  51. package/dist/tasks/scheduler.js +2 -2
  52. package/dist/testing/google-app-fixture.d.ts +5 -5
  53. package/dist/testing/google-app-fixture.js +4 -2
  54. package/dist/transaction/firestore-pubsub/index.d.ts +2 -1
  55. package/dist/transaction/firestore-pubsub/index.js +1 -1
  56. package/dist/transaction/firestore-pubsub/module.d.ts +1 -1
  57. package/dist/transaction/firestore-pubsub/nestjs-collection-resolver.d.ts +2 -2
  58. package/dist/transaction/firestore-pubsub/nestjs-collection-resolver.js +2 -0
  59. package/dist/transaction/firestore-pubsub/runner.d.ts +1 -1
  60. package/dist/transaction/firestore-pubsub/soft-deleted-collection.decorator.d.ts +2 -2
  61. package/dist/transaction/firestore-pubsub/state-transaction.d.ts +3 -3
  62. package/dist/transaction/firestore-pubsub/state-transaction.js +1 -0
  63. package/dist/transaction/firestore-pubsub/transaction.js +3 -1
  64. package/dist/transaction/spanner-pubsub/module.d.ts +1 -1
  65. package/dist/transaction/spanner-pubsub/state-transaction.d.ts +2 -2
  66. package/dist/transaction/spanner-pubsub/state-transaction.js +2 -0
  67. package/dist/transaction/spanner-pubsub/transaction.js +4 -1
  68. package/dist/validation/is-valid-firestore-id.decorator.d.ts +1 -1
  69. package/package.json +22 -21
@@ -1,5 +1,5 @@
1
1
  import { Logger } from '@causa/runtime/nestjs';
2
- import { CanActivate, ExecutionContext } from '@nestjs/common';
2
+ import { type CanActivate, type ExecutionContext } from '@nestjs/common';
3
3
  import { Reflector } from '@nestjs/core';
4
4
  import { AppCheck } from 'firebase-admin/app-check';
5
5
  /**
@@ -8,7 +8,7 @@ var __metadata = (this && this.__metadata) || function (k, v) {
8
8
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
9
9
  };
10
10
  import { Logger, UnauthenticatedError } from '@causa/runtime/nestjs';
11
- import { Injectable } from '@nestjs/common';
11
+ import { Injectable, } from '@nestjs/common';
12
12
  import { Reflector } from '@nestjs/core';
13
13
  import { AppCheck } from 'firebase-admin/app-check';
14
14
  import { APP_CHECK_DISABLED_METADATA_KEY } from './app-check-disabled.decorator.js';
@@ -1,4 +1,4 @@
1
- import { NestJsModuleOverrider } from '@causa/runtime/nestjs/testing';
1
+ import type { NestJsModuleOverrider } from '@causa/runtime/nestjs/testing';
2
2
  /**
3
3
  * A {@link NestJsModuleOverrider} that disables the {@link AppCheckGuard}.
4
4
  *
@@ -1,4 +1,4 @@
1
- import { App } from 'firebase-admin/app';
1
+ import { type App } from 'firebase-admin/app';
2
2
  /**
3
3
  * Returns the default Firebase {@link App} that should be used when initializing Firebase clients.
4
4
  * In a NestJS application, prefer using the `FirebaseModule` instead.
@@ -1,5 +1,5 @@
1
- import { OnApplicationShutdown } from '@nestjs/common';
2
- import { App } from 'firebase-admin/app';
1
+ import { type OnApplicationShutdown } from '@nestjs/common';
2
+ import { type App } from 'firebase-admin/app';
3
3
  import { Firestore } from 'firebase-admin/firestore';
4
4
  import { FirestoreAdminClient } from './firestore-admin-client.type.js';
5
5
  /**
@@ -1,5 +1,5 @@
1
- import { DynamicModule } from '@nestjs/common';
2
- import { AppOptions } from 'firebase-admin/app';
1
+ import { type DynamicModule } from '@nestjs/common';
2
+ import { type AppOptions } from 'firebase-admin/app';
3
3
  /**
4
4
  * Options when configuring the {@link FirebaseModule}.
5
5
  */
@@ -1,4 +1,4 @@
1
- import { NestJsModuleOverrider } from '@causa/runtime/nestjs/testing';
1
+ import type { NestJsModuleOverrider } from '@causa/runtime/nestjs/testing';
2
2
  /**
3
3
  * A {@link NestJsModuleOverrider} that reuses {@link getDefaultFirebaseApp} and prevents the deletion of the Firebase
4
4
  * application upon shutdown.
@@ -1,4 +1,4 @@
1
- import { Type } from '@nestjs/common';
1
+ import type { Type } from '@nestjs/common';
2
2
  import { CollectionReference, DocumentReference } from 'firebase-admin/firestore';
3
3
  import 'reflect-metadata';
4
4
  /**
@@ -1,3 +1,4 @@
1
+ import { CollectionReference, DocumentReference, } from 'firebase-admin/firestore';
1
2
  import 'reflect-metadata';
2
3
  /**
3
4
  * The name of the metadata key used to store the Firestore collection metadata.
@@ -1,4 +1,4 @@
1
- import { DynamicModule, Type } from '@nestjs/common';
1
+ import type { DynamicModule, Type } from '@nestjs/common';
2
2
  /**
3
3
  * A module that provides Firestore collections that can be injected in services using `InjectFirestoreCollection`.
4
4
  * The `FirebaseModule` must be imported and accessible in the current context.
@@ -1,5 +1,5 @@
1
- import { Type } from '@nestjs/common';
2
- import { FirestoreDataConverter } from 'firebase-admin/firestore';
1
+ import type { Type } from '@nestjs/common';
2
+ import { type FirestoreDataConverter } from 'firebase-admin/firestore';
3
3
  /**
4
4
  * Makes a converter that transforms Firestore data from and to the given class type.
5
5
  *
@@ -1,5 +1,5 @@
1
1
  import { instanceToPlain, plainToInstance } from 'class-transformer';
2
- import { Timestamp, } from 'firebase-admin/firestore';
2
+ import { QueryDocumentSnapshot, Timestamp, } from 'firebase-admin/firestore';
3
3
  /**
4
4
  * Makes a converter that transforms Firestore data from and to the given class type.
5
5
  *
@@ -1,5 +1,5 @@
1
1
  import { BaseHealthIndicatorService } from '@causa/runtime/nestjs';
2
- import { HealthIndicatorResult } from '@nestjs/terminus';
2
+ import { type HealthIndicatorResult } from '@nestjs/terminus';
3
3
  import { Firestore } from 'firebase-admin/firestore';
4
4
  /**
5
5
  * A service testing the availability of the Firestore service.
@@ -1,4 +1,4 @@
1
- import { Type } from '@nestjs/common';
1
+ import { type Type } from '@nestjs/common';
2
2
  /**
3
3
  * Returns a unique key that references a Firestore collection that should be injected.
4
4
  *
@@ -1,5 +1,5 @@
1
- import { NestJsModuleOverrider } from '@causa/runtime/nestjs/testing';
2
- import { INestApplicationContext, Type } from '@nestjs/common';
1
+ import type { NestJsModuleOverrider } from '@causa/runtime/nestjs/testing';
2
+ import type { INestApplicationContext, Type } from '@nestjs/common';
3
3
  import { CollectionReference, Firestore } from 'firebase-admin/firestore';
4
4
  /**
5
5
  * Creates a new collection prefixed with a random ID.
@@ -1,4 +1,4 @@
1
- import { Firestore } from 'firebase-admin/firestore';
1
+ import { CollectionReference, Firestore } from 'firebase-admin/firestore';
2
2
  import * as uuid from 'uuid';
3
3
  import { getFirestoreCollectionMetadataForType } from './collection.decorator.js';
4
4
  import { makeFirestoreDataConverter } from './converter.js';
@@ -1,4 +1,4 @@
1
- import { User } from '@causa/runtime';
1
+ import type { User } from '@causa/runtime';
2
2
  import { Logger } from '@causa/runtime/nestjs';
3
3
  import { ConfigService } from '@nestjs/config';
4
4
  import { Auth } from 'firebase-admin/auth';
@@ -1,4 +1,4 @@
1
- import { User } from '@causa/runtime';
1
+ import type { User } from '@causa/runtime';
2
2
  import { Auth } from 'firebase-admin/auth';
3
3
  import jwt from 'jsonwebtoken';
4
4
  /**
@@ -1,4 +1,4 @@
1
- import { getAuth } from 'firebase-admin/auth';
1
+ import { Auth, getAuth } from 'firebase-admin/auth';
2
2
  import jwt from 'jsonwebtoken';
3
3
  import * as uuid from 'uuid';
4
4
  import { getDefaultFirebaseApp } from '../firebase/index.js';
@@ -1,4 +1,4 @@
1
- import { LoggerOptions } from 'pino';
1
+ import type { LoggerOptions } from 'pino';
2
2
  /**
3
3
  * Options that should be passed to `updatePinoConfiguration` when initializing a logger for a GCP environment.
4
4
  * Errors will be tagged with the Cloud Error Reporting-specific `@type` key, such that they are detected by the
@@ -1,6 +1,6 @@
1
1
  import { BaseHealthIndicatorService } from '@causa/runtime/nestjs';
2
2
  import { PubSub } from '@google-cloud/pubsub';
3
- import { HealthIndicatorResult } from '@nestjs/terminus';
3
+ import { type HealthIndicatorResult } from '@nestjs/terminus';
4
4
  /**
5
5
  * A service testing the availability of the Pub/Sub service.
6
6
  */
@@ -1,8 +1,8 @@
1
- import { ObjectSerializer } from '@causa/runtime';
2
- import { BaseEventHandlerInterceptor, ParsedEventRequest } from '@causa/runtime/nestjs';
3
- import { ExecutionContext, Type } from '@nestjs/common';
1
+ import { type ObjectSerializer } from '@causa/runtime';
2
+ import { BaseEventHandlerInterceptor, type ParsedEventRequest } from '@causa/runtime/nestjs';
3
+ import { type ExecutionContext, type Type } from '@nestjs/common';
4
4
  import { Reflector } from '@nestjs/core';
5
- import { Request } from 'express';
5
+ import type { Request } from 'express';
6
6
  import { PinoLogger } from 'nestjs-pino';
7
7
  /**
8
8
  * The ID of the Pub/Sub event handler interceptor, that can passed to the `UseEventHandler` decorator.
@@ -1,7 +1,7 @@
1
- import { EventPublisher, ObjectSerializer, PublishOptions } from '@causa/runtime';
2
- import { PubSub, PublishOptions as TopicPublishOptions } from '@google-cloud/pubsub';
3
- import { OnApplicationShutdown } from '@nestjs/common';
4
- import { Logger } from 'pino';
1
+ import { type EventPublisher, type ObjectSerializer, type PublishOptions } from '@causa/runtime';
2
+ import { PubSub, type PublishOptions as TopicPublishOptions } from '@google-cloud/pubsub';
3
+ import type { OnApplicationShutdown } from '@nestjs/common';
4
+ import type { Logger } from 'pino';
5
5
  /**
6
6
  * Options for the {@link PubSubPublisher}.
7
7
  */
@@ -1,5 +1,5 @@
1
1
  import { JsonObjectSerializer, getDefaultLogger, } from '@causa/runtime';
2
- import { PubSub, } from '@google-cloud/pubsub';
2
+ import { PubSub, Topic, } from '@google-cloud/pubsub';
3
3
  import { getConfigurationKeyForTopic } from './configuration.js';
4
4
  import { PubSubTopicNotConfiguredError } from './errors.js';
5
5
  /**
@@ -1,5 +1,5 @@
1
- import { DynamicModule } from '@nestjs/common';
2
- import { PubSubPublisherOptions } from './publisher.js';
1
+ import type { DynamicModule } from '@nestjs/common';
2
+ import { type PubSubPublisherOptions } from './publisher.js';
3
3
  /**
4
4
  * The name of the injection key used to provide the {@link PubSubPublisherOptions.configurationGetter}.
5
5
  */
@@ -1,7 +1,7 @@
1
- import { ObjectSerializer } from '@causa/runtime';
2
- import { NestJsModuleOverrider } from '@causa/runtime/nestjs/testing';
1
+ import { type ObjectSerializer } from '@causa/runtime';
2
+ import type { NestJsModuleOverrider } from '@causa/runtime/nestjs/testing';
3
3
  import { PubSub, Subscription, Topic } from '@google-cloud/pubsub';
4
- import { Type } from '@nestjs/common';
4
+ import type { Type } from '@nestjs/common';
5
5
  /**
6
6
  * A received Pub/Sub message that was deserialized.
7
7
  */
@@ -1,5 +1,5 @@
1
1
  import { JsonObjectSerializer } from '@causa/runtime';
2
- import { PubSub } from '@google-cloud/pubsub';
2
+ import { Message, PubSub, Subscription, Topic } from '@google-cloud/pubsub';
3
3
  import { setTimeout } from 'timers/promises';
4
4
  import * as uuid from 'uuid';
5
5
  import { getConfigurationKeyForTopic } from '../configuration.js';
@@ -1,2 +1,4 @@
1
- export { PubSubFixture, ReceivedPubSubEvent } from './fixture.js';
2
- export { EventRequester, EventRequesterOptions, makePubSubRequester, } from './requester.js';
1
+ export { PubSubFixture } from './fixture.js';
2
+ export type { ReceivedPubSubEvent } from './fixture.js';
3
+ export { makePubSubRequester } from './requester.js';
4
+ export type { EventRequester, EventRequesterOptions } from './requester.js';
@@ -1,2 +1,2 @@
1
1
  export { PubSubFixture } from './fixture.js';
2
- export { makePubSubRequester, } from './requester.js';
2
+ export { makePubSubRequester } from './requester.js';
@@ -1,5 +1,5 @@
1
- import { ObjectSerializer } from '@causa/runtime';
2
- import { INestApplication } from '@nestjs/common';
1
+ import { type ObjectSerializer } from '@causa/runtime';
2
+ import { type INestApplication } from '@nestjs/common';
3
3
  /**
4
4
  * Options when making a request to an endpoint handling Pub/Sub events using an {@link EventRequester}.
5
5
  */
@@ -1,4 +1,4 @@
1
- import { Type } from '@nestjs/common';
1
+ import type { Type } from '@nestjs/common';
2
2
  import 'reflect-metadata';
3
3
  /**
4
4
  * Metadata for a single column/property of a Spanner table.
@@ -1,5 +1,5 @@
1
- import { Type } from '@nestjs/common';
2
- import { RecursivePartialEntity } from './types.js';
1
+ import type { Type } from '@nestjs/common';
2
+ import type { RecursivePartialEntity } from './types.js';
3
3
  /**
4
4
  * Creates a typed class instance from an object returned by the Spanner API.
5
5
  *
@@ -1,6 +1,6 @@
1
1
  import { Database } from '@google-cloud/spanner';
2
- import { SessionPoolOptions } from '@google-cloud/spanner/build/src/session-pool.js';
3
- import { Logger } from 'pino';
2
+ import type { SessionPoolOptions } from '@google-cloud/spanner/build/src/session-pool.js';
3
+ import type { Logger } from 'pino';
4
4
  /**
5
5
  * The default pool options when instantiating a database object for use within a Cloud Function.
6
6
  */
@@ -1,5 +1,5 @@
1
1
  import { getDefaultLogger } from '@causa/runtime';
2
- import { Spanner } from '@google-cloud/spanner';
2
+ import { Database, Spanner } from '@google-cloud/spanner';
3
3
  /**
4
4
  * The default pool options when instantiating a database object for use within a Cloud Function.
5
5
  */
@@ -1,9 +1,9 @@
1
1
  import { Database, Snapshot, Transaction } from '@google-cloud/spanner';
2
- import { Type as ParamType } from '@google-cloud/spanner/build/src/codec.js';
3
- import { TimestampBounds } from '@google-cloud/spanner/build/src/transaction.js';
4
- import { Type } from '@nestjs/common';
2
+ import { type Type as ParamType } from '@google-cloud/spanner/build/src/codec.js';
3
+ import type { TimestampBounds } from '@google-cloud/spanner/build/src/transaction.js';
4
+ import { type Type } from '@nestjs/common';
5
5
  import { SpannerTableCache } from './table-cache.js';
6
- import { RecursivePartialEntity } from './types.js';
6
+ import type { RecursivePartialEntity } from './types.js';
7
7
  /**
8
8
  * Any Spanner transaction that can be used for reading.
9
9
  */
@@ -8,7 +8,7 @@ var __metadata = (this && this.__metadata) || function (k, v) {
8
8
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
9
9
  };
10
10
  import { EntityNotFoundError } from '@causa/runtime';
11
- import { Database } from '@google-cloud/spanner';
11
+ import { Database, Snapshot, Transaction } from '@google-cloud/spanner';
12
12
  import { Int, } from '@google-cloud/spanner/build/src/codec.js';
13
13
  import { Injectable } from '@nestjs/common';
14
14
  import { copyInstanceWithMissingColumnsToNull, instanceToSpannerObject, spannerObjectToInstance, updateInstanceByColumn, } from './conversion.js';
@@ -1,6 +1,6 @@
1
1
  import { RetryableError } from '@causa/runtime';
2
2
  import { status } from '@grpc/grpc-js';
3
- import { Type } from '@nestjs/common';
3
+ import type { Type } from '@nestjs/common';
4
4
  /**
5
5
  * Error raised when the class for a Spanner table is not correctly defined (e.g. a decorator is missing).
6
6
  */
@@ -1,6 +1,6 @@
1
1
  import { BaseHealthIndicatorService } from '@causa/runtime/nestjs';
2
2
  import { Database } from '@google-cloud/spanner';
3
- import { HealthIndicatorResult } from '@nestjs/terminus';
3
+ import { type HealthIndicatorResult } from '@nestjs/terminus';
4
4
  /**
5
5
  * A service testing the availability of the Spanner service.
6
6
  */
@@ -1,6 +1,7 @@
1
1
  export { SpannerColumn } from './column.decorator.js';
2
2
  export { SPANNER_SESSION_POOL_OPTIONS_FOR_CLOUD_FUNCTIONS, SPANNER_SESSION_POOL_OPTIONS_FOR_SERVICE, catchSpannerDatabaseErrors, getDefaultSpannerDatabaseForCloudFunction, } from './database.js';
3
- export { SpannerEntityManager, SpannerKey, SpannerReadOnlyTransaction, } from './entity-manager.js';
3
+ export { SpannerEntityManager } from './entity-manager.js';
4
+ export type { SpannerKey, SpannerReadOnlyTransaction, } from './entity-manager.js';
4
5
  export * from './errors.js';
5
6
  export { SpannerHealthIndicator } from './healthcheck.js';
6
7
  export { SpannerModule } from './module.js';
@@ -1,6 +1,6 @@
1
1
  export { SpannerColumn } from './column.decorator.js';
2
2
  export { SPANNER_SESSION_POOL_OPTIONS_FOR_CLOUD_FUNCTIONS, SPANNER_SESSION_POOL_OPTIONS_FOR_SERVICE, catchSpannerDatabaseErrors, getDefaultSpannerDatabaseForCloudFunction, } from './database.js';
3
- export { SpannerEntityManager, } from './entity-manager.js';
3
+ export { SpannerEntityManager } from './entity-manager.js';
4
4
  export * from './errors.js';
5
5
  export { SpannerHealthIndicator } from './healthcheck.js';
6
6
  export { SpannerModule } from './module.js';
@@ -1,5 +1,5 @@
1
1
  import { Database, Spanner } from '@google-cloud/spanner';
2
- import { OnApplicationShutdown } from '@nestjs/common';
2
+ import { type OnApplicationShutdown } from '@nestjs/common';
3
3
  /**
4
4
  * A private service that handles the graceful shutdown of the Spanner Database.
5
5
  * Should be imported in the `SpannerModule`.
@@ -1,5 +1,5 @@
1
- import { SessionPoolOptions } from '@google-cloud/spanner/build/src/session-pool.js';
2
- import { DynamicModule } from '@nestjs/common';
1
+ import type { SessionPoolOptions } from '@google-cloud/spanner/build/src/session-pool.js';
2
+ import type { DynamicModule } from '@nestjs/common';
3
3
  /**
4
4
  * Options when instantiating the Spanner {@link Database}.
5
5
  */
@@ -1,4 +1,4 @@
1
- import { Type } from '@nestjs/common';
1
+ import type { Type } from '@nestjs/common';
2
2
  /**
3
3
  * An object providing metadata about a Spanner table and its columns.
4
4
  */
@@ -1,4 +1,4 @@
1
- import { Type } from '@nestjs/common';
1
+ import type { Type } from '@nestjs/common';
2
2
  import 'reflect-metadata';
3
3
  /**
4
4
  * Metadata for a Spanner table.
@@ -1,4 +1,4 @@
1
- import { NestJsModuleOverrider } from '@causa/runtime/nestjs/testing';
1
+ import type { NestJsModuleOverrider } from '@causa/runtime/nestjs/testing';
2
2
  import { Database, Instance, Spanner } from '@google-cloud/spanner';
3
3
  /**
4
4
  * Creates a new database.
@@ -1,4 +1,4 @@
1
- import { Database, Spanner } from '@google-cloud/spanner';
1
+ import { Database, Instance, Spanner } from '@google-cloud/spanner';
2
2
  import * as uuid from 'uuid';
3
3
  /**
4
4
  * Creates a new database.
@@ -1,3 +1,4 @@
1
1
  export * from './errors.js';
2
2
  export { CloudTasksModule } from './module.js';
3
- export { CloudTasksScheduler, HttpMethod, HttpRequest, Task, } from './scheduler.js';
3
+ export { CloudTasksScheduler } from './scheduler.js';
4
+ export type { HttpMethod, HttpRequest, Task } from './scheduler.js';
@@ -1,3 +1,3 @@
1
1
  export * from './errors.js';
2
2
  export { CloudTasksModule } from './module.js';
3
- export { CloudTasksScheduler, HttpMethod, } from './scheduler.js';
3
+ export { CloudTasksScheduler } from './scheduler.js';
@@ -1,4 +1,4 @@
1
- import { DynamicModule } from '@nestjs/common';
1
+ import type { DynamicModule } from '@nestjs/common';
2
2
  /**
3
3
  * The module exposing the Cloud Tasks client and scheduler.
4
4
  */
@@ -1,9 +1,9 @@
1
1
  import { CloudTasksClient, protos } from '@google-cloud/tasks';
2
2
  import { ConfigService } from '@nestjs/config';
3
3
  import { RetryOptions } from 'google-gax';
4
- export import Task = protos.google.cloud.tasks.v2.ITask;
5
- export import HttpMethod = protos.google.cloud.tasks.v2.HttpMethod;
6
- export import HttpRequest = protos.google.cloud.tasks.v2.IHttpRequest;
4
+ export type Task = protos.google.cloud.tasks.v2.ITask;
5
+ export declare const HttpMethod: typeof protos.google.cloud.tasks.v2.HttpMethod;
6
+ export type HttpRequest = protos.google.cloud.tasks.v2.IHttpRequest;
7
7
  /**
8
8
  * Defines the HTTP request within a Cloud Tasks task.
9
9
  */
@@ -10,9 +10,9 @@ var __metadata = (this && this.__metadata) || function (k, v) {
10
10
  import { CloudTasksClient, protos } from '@google-cloud/tasks';
11
11
  import { Injectable } from '@nestjs/common';
12
12
  import { ConfigService } from '@nestjs/config';
13
- import { grpc } from 'google-gax';
13
+ import { RetryOptions, grpc } from 'google-gax';
14
14
  import { TemporaryCloudTasksError } from './errors.js';
15
- export var HttpMethod = protos.google.cloud.tasks.v2.HttpMethod;
15
+ export const HttpMethod = protos.google.cloud.tasks.v2.HttpMethod;
16
16
  /**
17
17
  * The default retry options when creating a Cloud Tasks using {@link scheduleCloudFunctionTask}.
18
18
  * The `createTask` method of the client does not retry creations by default. The parameters below are the default
@@ -1,13 +1,13 @@
1
- import { VersionedEntity } from '@causa/runtime';
2
- import { MakeTestAppFactoryOptions } from '@causa/runtime/nestjs/testing';
1
+ import type { VersionedEntity } from '@causa/runtime';
2
+ import { type MakeTestAppFactoryOptions } from '@causa/runtime/nestjs/testing';
3
3
  import { Database, Spanner } from '@google-cloud/spanner';
4
- import { INestApplication, Type } from '@nestjs/common';
4
+ import type { INestApplication, Type } from '@nestjs/common';
5
5
  import { CollectionReference } from 'firebase-admin/firestore';
6
6
  import { Test } from 'supertest';
7
7
  import TestAgent from 'supertest/lib/agent.js';
8
8
  import { AuthUsersFixture } from '../identity-platform/testing.js';
9
- import { EventRequester, PubSubFixture } from '../pubsub/testing/index.js';
10
- import { SpannerEntityManager, SpannerKey } from '../spanner/index.js';
9
+ import { type EventRequester, PubSubFixture } from '../pubsub/testing/index.js';
10
+ import { SpannerEntityManager, type SpannerKey } from '../spanner/index.js';
11
11
  /**
12
12
  * Describes an entity to fetch using the {@link SpannerEntityManager}.
13
13
  * Used by expect methods in {@link GoogleAppFixture}.
@@ -1,8 +1,10 @@
1
1
  import { createApp } from '@causa/runtime/nestjs';
2
2
  import { makeTestAppFactory, } from '@causa/runtime/nestjs/testing';
3
3
  import { serializeAsJavaScriptObject } from '@causa/runtime/testing';
4
- import { Spanner } from '@google-cloud/spanner';
5
- import supertest from 'supertest';
4
+ import { Database, Spanner } from '@google-cloud/spanner';
5
+ import { CollectionReference } from 'firebase-admin/firestore';
6
+ import supertest, { Test } from 'supertest';
7
+ import TestAgent from 'supertest/lib/agent.js';
6
8
  import { overrideAppCheck } from '../app-check/testing.js';
7
9
  import { overrideFirebaseApp } from '../firebase/testing.js';
8
10
  import { clearFirestoreCollection, getFirestoreCollectionFromModule, overrideFirestoreCollections, } from '../firestore/testing.js';
@@ -1,5 +1,6 @@
1
1
  export { FirestorePubSubTransactionModule } from './module.js';
2
2
  export { FirestorePubSubTransactionRunner } from './runner.js';
3
3
  export { SoftDeletedFirestoreCollection } from './soft-deleted-collection.decorator.js';
4
- export { FirestoreCollectionResolver, FirestoreCollectionsForDocumentType, FirestoreStateTransaction, } from './state-transaction.js';
4
+ export { FirestoreStateTransaction } from './state-transaction.js';
5
+ export type { FirestoreCollectionResolver, FirestoreCollectionsForDocumentType, } from './state-transaction.js';
5
6
  export { FirestorePubSubTransaction } from './transaction.js';
@@ -1,5 +1,5 @@
1
1
  export { FirestorePubSubTransactionModule } from './module.js';
2
2
  export { FirestorePubSubTransactionRunner } from './runner.js';
3
3
  export { SoftDeletedFirestoreCollection } from './soft-deleted-collection.decorator.js';
4
- export { FirestoreStateTransaction, } from './state-transaction.js';
4
+ export { FirestoreStateTransaction } from './state-transaction.js';
5
5
  export { FirestorePubSubTransaction } from './transaction.js';
@@ -1,4 +1,4 @@
1
- import { DynamicModule } from '@nestjs/common';
1
+ import type { DynamicModule } from '@nestjs/common';
2
2
  /**
3
3
  * The module exposing the {@link FirestorePubSubTransactionRunner}.
4
4
  * This modules assumes that the `FirebaseModule`, `FirestoreCollectionsModule` (for the relevant collections), and
@@ -1,6 +1,6 @@
1
- import { Type } from '@nestjs/common';
1
+ import { type Type } from '@nestjs/common';
2
2
  import { ModuleRef } from '@nestjs/core';
3
- import { FirestoreCollectionResolver, FirestoreCollectionsForDocumentType } from './state-transaction.js';
3
+ import { type FirestoreCollectionResolver, type FirestoreCollectionsForDocumentType } from './state-transaction.js';
4
4
  /**
5
5
  * A {@link FirestoreCollectionResolver} that uses NestJS dependency injection to resolve Firestore collections.
6
6
  */
@@ -9,9 +9,11 @@ var __metadata = (this && this.__metadata) || function (k, v) {
9
9
  };
10
10
  import { Injectable } from '@nestjs/common';
11
11
  import { ModuleRef } from '@nestjs/core';
12
+ import { CollectionReference } from 'firebase-admin/firestore';
12
13
  import { makeFirestoreDataConverter } from '../../firestore/index.js';
13
14
  import { getFirestoreCollectionInjectionName } from '../../firestore/inject-collection.decorator.js';
14
15
  import { getSoftDeletedFirestoreCollectionMetadataForType } from './soft-deleted-collection.decorator.js';
16
+ import {} from './state-transaction.js';
15
17
  /**
16
18
  * A {@link FirestoreCollectionResolver} that uses NestJS dependency injection to resolve Firestore collections.
17
19
  */
@@ -2,7 +2,7 @@ import { TransactionRunner } from '@causa/runtime';
2
2
  import { Logger } from '@causa/runtime/nestjs';
3
3
  import { Firestore } from '@google-cloud/firestore';
4
4
  import { PubSubPublisher } from '../../pubsub/index.js';
5
- import { FirestoreCollectionResolver } from './state-transaction.js';
5
+ import { type FirestoreCollectionResolver } from './state-transaction.js';
6
6
  import { FirestorePubSubTransaction } from './transaction.js';
7
7
  /**
8
8
  * A {@link TransactionRunner} that uses Firestore for state and Pub/Sub for events.
@@ -1,5 +1,5 @@
1
- import { VersionedEntity } from '@causa/runtime';
2
- import { Type } from '@nestjs/common';
1
+ import type { VersionedEntity } from '@causa/runtime';
2
+ import type { Type } from '@nestjs/common';
3
3
  import 'reflect-metadata';
4
4
  /**
5
5
  * The metadata for a Firestore collection in which the objects that are soft-deleted are moved to a separate
@@ -1,7 +1,7 @@
1
- import { FindReplaceStateTransaction } from '@causa/runtime';
2
- import { Type } from '@nestjs/common';
1
+ import type { FindReplaceStateTransaction } from '@causa/runtime';
2
+ import type { Type } from '@nestjs/common';
3
3
  import { CollectionReference, Transaction } from 'firebase-admin/firestore';
4
- import { SoftDeletedFirestoreCollectionMetadata } from './soft-deleted-collection.decorator.js';
4
+ import type { SoftDeletedFirestoreCollectionMetadata } from './soft-deleted-collection.decorator.js';
5
5
  /**
6
6
  * The Firestore collections that should be used to create document references for a given document type.
7
7
  */
@@ -1,4 +1,5 @@
1
1
  import { plainToInstance } from 'class-transformer';
2
+ import { CollectionReference, Transaction } from 'firebase-admin/firestore';
2
3
  import { getReferenceForFirestoreDocument } from '../../firestore/index.js';
3
4
  /**
4
5
  * A {@link FindReplaceStateTransaction} that uses Firestore for state storage.
@@ -1,4 +1,6 @@
1
- import { Transaction } from '@causa/runtime';
1
+ import { BufferEventTransaction, Transaction } from '@causa/runtime';
2
+ import { Transaction as FirestoreTransaction } from 'firebase-admin/firestore';
3
+ import { FirestoreStateTransaction } from './state-transaction.js';
2
4
  /**
3
5
  * A {@link Transaction} that uses Firestore for state storage and Pub/Sub for event publishing.
4
6
  */
@@ -1,4 +1,4 @@
1
- import { DynamicModule } from '@nestjs/common';
1
+ import type { DynamicModule } from '@nestjs/common';
2
2
  /**
3
3
  * The module exposing the {@link SpannerPubSubTransactionRunner}.
4
4
  * This modules assumes that the `SpannerModule` and `PubSubPublisherModule` are available.
@@ -1,6 +1,6 @@
1
- import { FindReplaceStateTransaction } from '@causa/runtime';
1
+ import type { FindReplaceStateTransaction } from '@causa/runtime';
2
2
  import { Transaction as SpannerTransaction } from '@google-cloud/spanner';
3
- import { Type } from '@nestjs/common';
3
+ import type { Type } from '@nestjs/common';
4
4
  import { SpannerEntityManager } from '../../spanner/index.js';
5
5
  /**
6
6
  * A {@link FindReplaceStateTransaction} that uses Spanner for state storage.
@@ -1,3 +1,5 @@
1
+ import { Transaction as SpannerTransaction } from '@google-cloud/spanner';
2
+ import { SpannerEntityManager } from '../../spanner/index.js';
1
3
  /**
2
4
  * A {@link FindReplaceStateTransaction} that uses Spanner for state storage.
3
5
  */
@@ -1,4 +1,7 @@
1
- import { Transaction } from '@causa/runtime';
1
+ import { BufferEventTransaction, Transaction } from '@causa/runtime';
2
+ import { Transaction as SpannerTransaction } from '@google-cloud/spanner';
3
+ import { SpannerEntityManager } from '../../spanner/index.js';
4
+ import { SpannerStateTransaction } from './state-transaction.js';
2
5
  /**
3
6
  * A {@link Transaction} that uses Spanner for state storage and Pub/Sub for event publishing.
4
7
  */
@@ -1,4 +1,4 @@
1
- import { ValidationOptions } from 'class-validator';
1
+ import { type ValidationOptions } from 'class-validator';
2
2
  /**
3
3
  * Checks whether the value is a valid Firestore document ID.
4
4
  * A document ID cannot be the literals `.` or `..`, and cannot contain forward slashes.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@causa/runtime-google",
3
- "version": "0.32.1",
3
+ "version": "0.33.0",
4
4
  "description": "An extension to the Causa runtime SDK (`@causa/runtime`), providing Google-specific features.",
5
5
  "repository": "github:causa-io/runtime-typescript-google",
6
6
  "license": "ISC",
@@ -29,39 +29,40 @@
29
29
  "test:cov": "npm run test -- --coverage"
30
30
  },
31
31
  "dependencies": {
32
- "@causa/runtime": ">= 0.22.0 < 1.0.0",
32
+ "@causa/runtime": ">= 0.23.0 < 1.0.0",
33
33
  "@google-cloud/precise-date": "^4.0.0",
34
- "@google-cloud/pubsub": "^4.7.2",
35
- "@google-cloud/spanner": "^7.14.0",
36
- "@google-cloud/tasks": "^5.5.0",
37
- "@grpc/grpc-js": "^1.11.3",
38
- "@nestjs/common": "^10.4.3",
39
- "@nestjs/config": "^3.2.3",
40
- "@nestjs/core": "^10.4.3",
34
+ "@google-cloud/pubsub": "^4.9.0",
35
+ "@google-cloud/spanner": "^7.16.0",
36
+ "@google-cloud/tasks": "^5.5.1",
37
+ "@grpc/grpc-js": "^1.12.2",
38
+ "@nestjs/common": "^10.4.7",
39
+ "@nestjs/config": "^3.3.0",
40
+ "@nestjs/core": "^10.4.7",
41
41
  "@nestjs/passport": "^10.0.3",
42
- "@nestjs/swagger": "^7.4.2",
43
42
  "@nestjs/terminus": "^10.2.3",
44
43
  "class-transformer": "^0.5.1",
45
44
  "class-validator": "^0.14.1",
46
- "express": "^4.21.0",
47
- "firebase-admin": "^12.5.0",
45
+ "express": "^4.21.1",
46
+ "firebase-admin": "^13.0.0",
48
47
  "jsonwebtoken": "^9.0.2",
49
48
  "nestjs-pino": "^4.1.0",
50
49
  "passport-http-bearer": "^1.0.1",
51
- "pino": "^9.4.0",
50
+ "pino": "^9.5.0",
52
51
  "reflect-metadata": "^0.2.2"
53
52
  },
54
53
  "devDependencies": {
55
- "@nestjs/testing": "^10.4.3",
56
- "@tsconfig/node18": "^18.2.4",
57
- "@types/jest": "^29.5.13",
54
+ "@nestjs/testing": "^10.4.7",
55
+ "@swc/core": "^1.9.2",
56
+ "@swc/jest": "^0.2.37",
57
+ "@tsconfig/node22": "^22.0.0",
58
+ "@types/jest": "^29.5.14",
58
59
  "@types/jsonwebtoken": "^9.0.7",
59
- "@types/node": "^18.19.50",
60
+ "@types/node": "^22.9.0",
60
61
  "@types/passport-http-bearer": "^1.0.41",
61
62
  "@types/supertest": "^6.0.2",
62
63
  "@types/uuid": "^10.0.0",
63
64
  "dotenv": "^16.4.5",
64
- "eslint": "^9.10.0",
65
+ "eslint": "^9.14.0",
65
66
  "eslint-config-prettier": "^9.1.0",
66
67
  "eslint-plugin-prettier": "^5.2.1",
67
68
  "jest": "^29.7.0",
@@ -70,8 +71,8 @@
70
71
  "supertest": "^7.0.0",
71
72
  "ts-jest": "^29.2.5",
72
73
  "ts-node": "^10.9.2",
73
- "typescript": "^5.5.4",
74
- "typescript-eslint": "^8.6.0",
75
- "uuid": "^10.0.0"
74
+ "typescript": "^5.6.3",
75
+ "typescript-eslint": "^8.14.0",
76
+ "uuid": "^11.0.3"
76
77
  }
77
78
  }