@mxpicture/gcp-functions-backend 0.1.83 → 0.1.85

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.
@@ -7,7 +7,9 @@ export declare abstract class IBackendFunction<DTO extends DocumentData, API ext
7
7
  protected _routes?: string[];
8
8
  constructor(name: string);
9
9
  useApi(api: API): void;
10
- useRoutes(routes: string[]): void;
10
+ useRoutes(routes: {
11
+ [key: string]: string;
12
+ } | string[]): void;
11
13
  protected api(): API;
12
14
  protected routes(): string[];
13
15
  ingress<REQ, RES extends DocumentData>(request: FunctionRequest<REQ>): Promise<FunctionResponse<RES>>;
@@ -10,7 +10,7 @@ export class IBackendFunction {
10
10
  this._api = api;
11
11
  }
12
12
  useRoutes(routes) {
13
- this._routes = routes;
13
+ this._routes = Array.isArray(routes) ? routes : Object.values(routes);
14
14
  }
15
15
  api() {
16
16
  if (!this._api)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mxpicture/gcp-functions-backend",
3
- "version": "0.1.83",
3
+ "version": "0.1.85",
4
4
  "description": "Utils for google cloud functions, publishing both CommonJS and ESM builds",
5
5
  "type": "module",
6
6
  "author": "MXPicture",
@@ -38,7 +38,7 @@
38
38
  "access": "public"
39
39
  },
40
40
  "dependencies": {
41
- "@mxpicture/gcp-functions-common": "^0.1.83",
41
+ "@mxpicture/gcp-functions-common": "^0.1.85",
42
42
  "firebase-admin": "^13.6.0",
43
43
  "firebase-functions": "^7.0.5",
44
44
  "short-uuid": "^6.0.3",