@mxpicture/gcp-functions-backend 2.1.2 → 2.1.3

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.
@@ -0,0 +1,10 @@
1
+ import type { DocumentData } from "@mxpicture/gcp-functions-common/types";
2
+ import type { Validation } from "../validation/Validation.js";
3
+ import type { BackendBaseApi } from "../api/BackendBaseApi.js";
4
+ export declare abstract class IApiFactory<DTO extends DocumentData, API extends BackendBaseApi<DTO, SIDE_EFFECTS, VAL>, SIDE_EFFECTS extends DocumentData = DocumentData, VAL extends Validation<DTO> = Validation<DTO>> {
5
+ constructor();
6
+ create(): API;
7
+ protected abstract _createApi(): API;
8
+ protected abstract _createValidation(): VAL;
9
+ }
10
+ //# sourceMappingURL=IApiFactory.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IApiFactory.d.ts","sourceRoot":"","sources":["../../src/factory/IApiFactory.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uCAAuC,CAAC;AAC1E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAC9D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAE/D,8BAAsB,WAAW,CAC/B,GAAG,SAAS,YAAY,EACxB,GAAG,SAAS,cAAc,CAAC,GAAG,EAAE,YAAY,EAAE,GAAG,CAAC,EAClD,YAAY,SAAS,YAAY,GAAG,YAAY,EAChD,GAAG,SAAS,UAAU,CAAC,GAAG,CAAC,GAAG,UAAU,CAAC,GAAG,CAAC;;IAItC,MAAM,IAAI,GAAG;IAMpB,SAAS,CAAC,QAAQ,CAAC,UAAU,IAAI,GAAG;IACpC,SAAS,CAAC,QAAQ,CAAC,iBAAiB,IAAI,GAAG;CAC5C"}
@@ -0,0 +1,9 @@
1
+ export class IApiFactory {
2
+ constructor() { }
3
+ create() {
4
+ const api = this._createApi();
5
+ api.useValidation(this._createValidation());
6
+ return api;
7
+ }
8
+ }
9
+ //# sourceMappingURL=IApiFactory.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IApiFactory.js","sourceRoot":"","sources":["../../src/factory/IApiFactory.ts"],"names":[],"mappings":"AAIA,MAAM,OAAgB,WAAW;IAM/B,gBAAsB,CAAC;IAEhB,MAAM;QACX,MAAM,GAAG,GAAG,IAAI,CAAC,UAAU,EAAE,CAAC;QAC9B,GAAG,CAAC,aAAa,CAAC,IAAI,CAAC,iBAAiB,EAAE,CAAC,CAAC;QAC5C,OAAO,GAAG,CAAC;IACb,CAAC;CAIF"}
@@ -0,0 +1,10 @@
1
+ import type { DocumentData, DocumentKeyAdmin } from "@mxpicture/gcp-functions-common/types";
2
+ import type { Store } from "../store/Store.js";
3
+ import type { Validation } from "../validation/Validation.js";
4
+ import type { BackendStoreApi } from "../api/BackendStoreApi.js";
5
+ import { IApiFactory } from "./IApiFactory.js";
6
+ export declare abstract class IApiStoreFactory<STORE_DOC extends DocumentKeyAdmin, DTO extends STORE_DOC, API extends BackendStoreApi<STORE_DOC, DTO, SIDE_EFFECTS, STORE, VAL>, SIDE_EFFECTS extends DocumentData = DocumentData, STORE extends Store<STORE_DOC> = Store<STORE_DOC>, VAL extends Validation<DTO> = Validation<DTO>> extends IApiFactory<DTO, API, SIDE_EFFECTS, VAL> {
7
+ create(): API;
8
+ protected abstract _createStore(): STORE;
9
+ }
10
+ //# sourceMappingURL=IApiStoreFactory.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IApiStoreFactory.d.ts","sourceRoot":"","sources":["../../src/factory/IApiStoreFactory.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,YAAY,EACZ,gBAAgB,EACjB,MAAM,uCAAuC,CAAC;AAC/C,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAC9D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAE/C,8BAAsB,gBAAgB,CACpC,SAAS,SAAS,gBAAgB,EAClC,GAAG,SAAS,SAAS,EACrB,GAAG,SAAS,eAAe,CAAC,SAAS,EAAE,GAAG,EAAE,YAAY,EAAE,KAAK,EAAE,GAAG,CAAC,EACrE,YAAY,SAAS,YAAY,GAAG,YAAY,EAChD,KAAK,SAAS,KAAK,CAAC,SAAS,CAAC,GAAG,KAAK,CAAC,SAAS,CAAC,EACjD,GAAG,SAAS,UAAU,CAAC,GAAG,CAAC,GAAG,UAAU,CAAC,GAAG,CAAC,CAC7C,SAAQ,WAAW,CAAC,GAAG,EAAE,GAAG,EAAE,YAAY,EAAE,GAAG,CAAC;IAChC,MAAM,IAAI,GAAG;IAO7B,SAAS,CAAC,QAAQ,CAAC,YAAY,IAAI,KAAK;CACzC"}
@@ -0,0 +1,10 @@
1
+ import { IApiFactory } from "./IApiFactory.js";
2
+ export class IApiStoreFactory extends IApiFactory {
3
+ create() {
4
+ const api = this._createApi();
5
+ api.useStore(this._createStore());
6
+ api.useValidation(this._createValidation());
7
+ return api;
8
+ }
9
+ }
10
+ //# sourceMappingURL=IApiStoreFactory.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IApiStoreFactory.js","sourceRoot":"","sources":["../../src/factory/IApiStoreFactory.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAE/C,MAAM,OAAgB,gBAOpB,SAAQ,WAAwC;IAChC,MAAM;QACpB,MAAM,GAAG,GAAG,IAAI,CAAC,UAAU,EAAE,CAAC;QAC9B,GAAG,CAAC,QAAQ,CAAC,IAAI,CAAC,YAAY,EAAE,CAAC,CAAC;QAClC,GAAG,CAAC,aAAa,CAAC,IAAI,CAAC,iBAAiB,EAAE,CAAC,CAAC;QAC5C,OAAO,GAAG,CAAC;IACb,CAAC;CAGF"}
@@ -0,0 +1,3 @@
1
+ export * from "./IApiFactory.js";
2
+ export * from "./IApiStoreFactory.js";
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/factory/index.ts"],"names":[],"mappings":"AACA,cAAc,kBAAkB,CAAC;AACjC,cAAc,uBAAuB,CAAC"}
@@ -0,0 +1,4 @@
1
+ // This file is auto-generated by build-cli. Do not edit manually.
2
+ export * from "./IApiFactory.js";
3
+ export * from "./IApiStoreFactory.js";
4
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/factory/index.ts"],"names":[],"mappings":"AAAA,kEAAkE;AAClE,cAAc,kBAAkB,CAAC;AACjC,cAAc,uBAAuB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mxpicture/gcp-functions-backend",
3
- "version": "2.1.2",
3
+ "version": "2.1.3",
4
4
  "description": "Utils for google cloud functions, publishing both CommonJS and ESM builds",
5
5
  "type": "module",
6
6
  "author": "MXPicture",
@@ -15,6 +15,10 @@
15
15
  "default": "./dist/api/index.js"
16
16
  },
17
17
  "./package.json": "./package.json",
18
+ "./factory": {
19
+ "types": "./src/factory/index.ts",
20
+ "default": "./dist/factory/index.js"
21
+ },
18
22
  "./firebase": {
19
23
  "types": "./src/firebase/index.ts",
20
24
  "default": "./dist/firebase/index.js"
@@ -54,7 +58,7 @@
54
58
  },
55
59
  "dependencies": {
56
60
  "@google-cloud/tasks": "^6.2.1",
57
- "@mxpicture/gcp-functions-common": "^2.1.2",
61
+ "@mxpicture/gcp-functions-common": "^2.1.3",
58
62
  "express": "^5.2.1",
59
63
  "firebase-admin": "^13.7.0",
60
64
  "firebase-functions": "^7.0.6",