@mxpicture/gcp-functions-common 1.1.21 → 1.1.23
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.api.js","sourceRoot":"","sources":["../../src/config/config.api.ts"],"names":[],"mappings":"AAGA,MAAM,UAAU,
|
|
1
|
+
{"version":3,"file":"config.api.js","sourceRoot":"","sources":["../../src/config/config.api.ts"],"names":[],"mappings":"AAGA,MAAM,UAAU,GAAiC;IAC/C,MAAM,EAAE,SAAU;IAClB,MAAM,EAAE,SAAU;IAClB,MAAM,EAAE,SAAU;IAClB,GAAG,EAAE,SAAU;IACf,KAAK,EAAE,SAAU;IACjB,KAAK,EAAE,SAAU;IACjB,MAAM,EAAE,SAAU;CACnB,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;AAEnD;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG;IACzB,QAAQ,EAAE,GAAG;IACb,UAAU,EAAE,IAAI;IAChB,MAAM,EAAE,IAAI;IACZ,SAAS,EAAE,IAAI;IACf,aAAa,EAAE,IAAI;IACnB,WAAW,EAAE,GAAG;IAChB,aAAa,EAAE,gBAAgB;IAC/B,EAAE,EAAE,IAAI;IACR,KAAK,EAAE,QAAQ;IACf,gBAAgB,EAAE,oBAAoB;CAC9B,CAAC"}
|
|
@@ -29,12 +29,6 @@ export interface DocumentAdmin {
|
|
|
29
29
|
* representing all Firestore administrative fields.
|
|
30
30
|
*/
|
|
31
31
|
export type DocumentKeyAdmin = DocumentKey & DocumentAdmin;
|
|
32
|
-
/**
|
|
33
|
-
* Augments a DTO with Firestore administrative fields (`id`, `createTime`, `updateTime`).
|
|
34
|
-
*
|
|
35
|
-
* @typeParam DTO - The base document data type.
|
|
36
|
-
*/
|
|
37
|
-
export type WithKey<DTO extends DocumentData> = DocumentKey & DocumentAdmin & DTO;
|
|
38
32
|
/**
|
|
39
33
|
* Input payload for create operations.
|
|
40
34
|
*
|
|
@@ -42,7 +36,7 @@ export type WithKey<DTO extends DocumentData> = DocumentKey & DocumentAdmin & DT
|
|
|
42
36
|
*
|
|
43
37
|
* @typeParam DTO - The base document data type.
|
|
44
38
|
*/
|
|
45
|
-
export type CreateInput<DTO extends
|
|
39
|
+
export type CreateInput<DTO extends DocumentKeyAdmin> = Omit<DTO, keyof DocumentKeyAdmin>;
|
|
46
40
|
/**
|
|
47
41
|
* Input payload for update operations.
|
|
48
42
|
*
|
|
@@ -51,9 +45,5 @@ export type CreateInput<DTO extends DocumentData> = Omit<DTO, keyof DocumentKeyA
|
|
|
51
45
|
*
|
|
52
46
|
* @typeParam DTO - The base document data type.
|
|
53
47
|
*/
|
|
54
|
-
export type UpdateInput<DTO extends
|
|
55
|
-
/**
|
|
56
|
-
* @deprecated Use {@link CreateInput} instead.
|
|
57
|
-
*/
|
|
58
|
-
export type WithoutKey<DTO extends DocumentData> = CreateInput<DTO>;
|
|
48
|
+
export type UpdateInput<DTO extends DocumentKeyAdmin> = DocumentKey & Partial<CreateInput<DTO>>;
|
|
59
49
|
//# sourceMappingURL=types.document.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.document.d.ts","sourceRoot":"","sources":["../../src/types/types.document.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,MAAM,MAAM,kBAAkB,GAAG,GAAG,CAAC;AAErC;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG;IAAE,CAAC,KAAK,EAAE,MAAM,GAAG,kBAAkB,CAAA;CAAE,CAAC;AAEnE;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,kCAAkC;IAClC,EAAE,EAAE,MAAM,CAAC;CACZ;AAED;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,+CAA+C;IAC/C,UAAU,CAAC,EAAE,IAAI,CAAC;IAClB,2CAA2C;IAC3C,UAAU,CAAC,EAAE,IAAI,CAAC;CACnB;AAED;;;GAGG;AACH,MAAM,MAAM,gBAAgB,GAAG,WAAW,GAAG,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"types.document.d.ts","sourceRoot":"","sources":["../../src/types/types.document.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,MAAM,MAAM,kBAAkB,GAAG,GAAG,CAAC;AAErC;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG;IAAE,CAAC,KAAK,EAAE,MAAM,GAAG,kBAAkB,CAAA;CAAE,CAAC;AAEnE;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,kCAAkC;IAClC,EAAE,EAAE,MAAM,CAAC;CACZ;AAED;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,+CAA+C;IAC/C,UAAU,CAAC,EAAE,IAAI,CAAC;IAClB,2CAA2C;IAC3C,UAAU,CAAC,EAAE,IAAI,CAAC;CACnB;AAED;;;GAGG;AACH,MAAM,MAAM,gBAAgB,GAAG,WAAW,GAAG,aAAa,CAAC;AAW3D;;;;;;GAMG;AACH,MAAM,MAAM,WAAW,CAAC,GAAG,SAAS,gBAAgB,IAAI,IAAI,CAC1D,GAAG,EACH,MAAM,gBAAgB,CACvB,CAAC;AAEF;;;;;;;GAOG;AACH,MAAM,MAAM,WAAW,CAAC,GAAG,SAAS,gBAAgB,IAAI,WAAW,GACjE,OAAO,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { CreateInput, DocumentKey, DocumentKeyAdmin, UpdateInput } from "./types.document.js";
|
|
2
2
|
import { ApiFilter } from "./types.filter.js";
|
|
3
3
|
/**
|
|
4
4
|
* Defines the request and response types for a single API route.
|
|
@@ -31,14 +31,14 @@ export type WithRoutes<R extends RoutesMap> = R;
|
|
|
31
31
|
*
|
|
32
32
|
* @typeParam DTO - The base document data type.
|
|
33
33
|
*/
|
|
34
|
-
export type CrudRoutes<DTO extends
|
|
35
|
-
create: RouteDef<CreateInput<DTO>,
|
|
36
|
-
update: RouteDef<UpdateInput<DTO>,
|
|
34
|
+
export type CrudRoutes<DTO extends DocumentKeyAdmin> = WithRoutes<{
|
|
35
|
+
create: RouteDef<CreateInput<DTO>, DTO>;
|
|
36
|
+
update: RouteDef<UpdateInput<DTO>, DTO>;
|
|
37
37
|
delete: RouteDef<DocumentKey, {
|
|
38
38
|
deleted: true;
|
|
39
39
|
}>;
|
|
40
|
-
get: RouteDef<DocumentKey,
|
|
41
|
-
query: RouteDef<ApiFilter | undefined | null | never,
|
|
40
|
+
get: RouteDef<DocumentKey, DTO>;
|
|
41
|
+
query: RouteDef<ApiFilter | undefined | null | never, DTO[]>;
|
|
42
42
|
count: RouteDef<ApiFilter | undefined | null | never, {
|
|
43
43
|
count: number;
|
|
44
44
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.routes.d.ts","sourceRoot":"","sources":["../../src/types/types.routes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,
|
|
1
|
+
{"version":3,"file":"types.routes.d.ts","sourceRoot":"","sources":["../../src/types/types.routes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,WAAW,EACX,WAAW,EACX,gBAAgB,EAChB,WAAW,EACZ,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAE9C;;;;;GAKG;AACH,MAAM,MAAM,QAAQ,CAAC,GAAG,EAAE,GAAG,IAAI;IAC/B,OAAO,EAAE,GAAG,CAAC;IACb,QAAQ,EAAE,GAAG,CAAC;CACf,CAAC;AAEF;;;;GAIG;AAEH,MAAM,MAAM,SAAS,CAAC,GAAG,GAAG,QAAQ,CAAC,GAAG,EAAE,GAAG,CAAC,IAAI,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;AAEtE;;;;GAIG;AACH,MAAM,MAAM,U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