@mxpicture/gcp-functions-common 2.1.34 → 2.1.35
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.
- package/dist/annotation/anno.property.d.ts +34 -3
- package/dist/annotation/anno.property.d.ts.map +1 -1
- package/dist/annotation/anno.property.js +34 -3
- package/dist/annotation/anno.property.js.map +1 -1
- package/dist/decorator/DecoDate.d.ts +5 -2
- package/dist/decorator/DecoDate.d.ts.map +1 -1
- package/dist/decorator/DecoDate.js +3 -2
- package/dist/decorator/DecoDate.js.map +1 -1
- package/dist/decorator/DecoEnum.d.ts +19 -3
- package/dist/decorator/DecoEnum.d.ts.map +1 -1
- package/dist/decorator/DecoEnum.js +15 -2
- package/dist/decorator/DecoEnum.js.map +1 -1
- package/dist/decorator/DecoProperty.d.ts +8 -4
- package/dist/decorator/DecoProperty.d.ts.map +1 -1
- package/dist/decorator/DecoProperty.js +8 -4
- package/dist/decorator/DecoProperty.js.map +1 -1
- package/dist/decorator/Decorator.d.ts +20 -0
- package/dist/decorator/Decorator.d.ts.map +1 -1
- package/dist/decorator/Decorator.js +20 -0
- package/dist/decorator/Decorator.js.map +1 -1
- package/dist/decorator/deco.browser.d.ts +20 -4
- package/dist/decorator/deco.browser.d.ts.map +1 -1
- package/dist/decorator/deco.browser.js +20 -4
- package/dist/decorator/deco.browser.js.map +1 -1
- package/dist/decorator/deco.enum.d.ts +66 -12
- package/dist/decorator/deco.enum.d.ts.map +1 -1
- package/dist/decorator/deco.enum.js +66 -12
- package/dist/decorator/deco.enum.js.map +1 -1
- package/dist/decorator/deco.names.d.ts +4 -0
- package/dist/decorator/deco.names.d.ts.map +1 -1
- package/dist/decorator/deco.names.js +1 -0
- package/dist/decorator/deco.names.js.map +1 -1
- package/dist/decorator/deco.routes.d.ts +8 -3
- package/dist/decorator/deco.routes.d.ts.map +1 -1
- package/dist/decorator/deco.routes.js +8 -3
- package/dist/decorator/deco.routes.js.map +1 -1
- package/dist/helper/EnumRegistry.d.ts +7 -2
- package/dist/helper/EnumRegistry.d.ts.map +1 -1
- package/dist/helper/EnumRegistry.js +7 -2
- package/dist/helper/EnumRegistry.js.map +1 -1
- package/dist/helper/FirebaseTimestamp.d.ts +5 -5
- package/dist/helper/FirebaseTimestamp.d.ts.map +1 -1
- package/dist/helper/FirebaseTimestamp.js +5 -5
- package/dist/helper/FirebaseTimestamp.js.map +1 -1
- package/dist/helper/helper.date.d.ts +15 -6
- package/dist/helper/helper.date.d.ts.map +1 -1
- package/dist/helper/helper.date.js +15 -6
- package/dist/helper/helper.date.js.map +1 -1
- package/dist/helper/helper.object.d.ts +23 -3
- package/dist/helper/helper.object.d.ts.map +1 -1
- package/dist/helper/helper.object.js +23 -3
- package/dist/helper/helper.object.js.map +1 -1
- package/dist/helper/helper.string.d.ts +17 -0
- package/dist/helper/helper.string.d.ts.map +1 -1
- package/dist/helper/helper.string.js +17 -0
- package/dist/helper/helper.string.js.map +1 -1
- package/dist/types/types.deco.common.d.ts +28 -1
- package/dist/types/types.deco.common.d.ts.map +1 -1
- package/dist/types/types.deco.property.d.ts +31 -3
- package/dist/types/types.deco.property.d.ts.map +1 -1
- package/dist/types/types.deco.property.js +6 -1
- package/dist/types/types.deco.property.js.map +1 -1
- package/dist/types/types.enum.registry.d.ts +12 -0
- package/dist/types/types.enum.registry.d.ts.map +1 -1
- package/dist/types/types.routes.d.ts +11 -4
- package/dist/types/types.routes.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -7,13 +7,33 @@ import type { DocumentData } from "../types/types.document.js";
|
|
|
7
7
|
* @returns A new object containing only the allowed keys that exist on `route`.
|
|
8
8
|
*/
|
|
9
9
|
export declare const stripObject: <T extends object>(route: T, allowedKeys: (keyof T)[]) => T;
|
|
10
|
+
/**
|
|
11
|
+
* Returns a deep clone of an object with all top-level `undefined` properties removed.
|
|
12
|
+
*
|
|
13
|
+
* @typeParam T - The document data shape.
|
|
14
|
+
* @param obj - The source object to clone and strip.
|
|
15
|
+
* @returns A `structuredClone` of `obj` with any keys whose value is `undefined` removed.
|
|
16
|
+
*/
|
|
10
17
|
export declare const stripUndefined: <T extends DocumentData>(obj: T) => T;
|
|
18
|
+
/**
|
|
19
|
+
* Type guard that narrows an unknown value to a plain object (not array, not null).
|
|
20
|
+
*
|
|
21
|
+
* @param value - The value to inspect.
|
|
22
|
+
* @returns `true` if `value` is a non-null, non-array object; `false` otherwise.
|
|
23
|
+
*/
|
|
11
24
|
export declare const compareIsObject: (value: unknown) => value is Record<string, unknown>;
|
|
12
25
|
/**
|
|
26
|
+
* Recursively compares two objects and returns the set of dot-delimited paths that differ.
|
|
27
|
+
*
|
|
28
|
+
* @remarks
|
|
29
|
+
* - Primitives are compared by strict equality (`NaN === NaN` is treated as equal).
|
|
30
|
+
* - Arrays are compared by JSON serialization at their location; the array's path is
|
|
31
|
+
* reported once when they differ rather than per-element.
|
|
32
|
+
* - Nested objects are walked recursively, producing paths such as `address.city`.
|
|
13
33
|
*
|
|
14
|
-
* @param a -
|
|
15
|
-
* @param b -
|
|
16
|
-
* @returns
|
|
34
|
+
* @param a - The first object to compare.
|
|
35
|
+
* @param b - The second object to compare.
|
|
36
|
+
* @returns An array of dot-delimited paths where `a` and `b` differ.
|
|
17
37
|
*/
|
|
18
38
|
export declare const compare: (a: Record<string, unknown>, b: Record<string, unknown>) => string[];
|
|
19
39
|
//# sourceMappingURL=helper.object.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helper.object.d.ts","sourceRoot":"","sources":["../../src/helper/helper.object.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAE/D;;;;;;GAMG;AACH,eAAO,MAAM,WAAW,GAAI,CAAC,SAAS,MAAM,EAC1C,OAAO,CAAC,EACR,aAAa,CAAC,MAAM,CAAC,CAAC,EAAE,KACvB,CAKF,CAAC;AAEF,eAAO,MAAM,cAAc,GAAI,CAAC,SAAS,YAAY,EAAE,KAAK,CAAC,KAAG,CAM/D,CAAC;AAEF,eAAO,MAAM,eAAe,GAC1B,OAAO,OAAO,KACb,KAAK,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CACoC,CAAC;AAEvE
|
|
1
|
+
{"version":3,"file":"helper.object.d.ts","sourceRoot":"","sources":["../../src/helper/helper.object.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAE/D;;;;;;GAMG;AACH,eAAO,MAAM,WAAW,GAAI,CAAC,SAAS,MAAM,EAC1C,OAAO,CAAC,EACR,aAAa,CAAC,MAAM,CAAC,CAAC,EAAE,KACvB,CAKF,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,cAAc,GAAI,CAAC,SAAS,YAAY,EAAE,KAAK,CAAC,KAAG,CAM/D,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,eAAe,GAC1B,OAAO,OAAO,KACb,KAAK,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CACoC,CAAC;AAEvE;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,OAAO,GAClB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC1B,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KACzB,MAAM,EA8BR,CAAC"}
|
|
@@ -12,17 +12,37 @@ export const stripObject = (route, allowedKeys) => {
|
|
|
12
12
|
result[allowedKey] = route[allowedKey];
|
|
13
13
|
return result;
|
|
14
14
|
};
|
|
15
|
+
/**
|
|
16
|
+
* Returns a deep clone of an object with all top-level `undefined` properties removed.
|
|
17
|
+
*
|
|
18
|
+
* @typeParam T - The document data shape.
|
|
19
|
+
* @param obj - The source object to clone and strip.
|
|
20
|
+
* @returns A `structuredClone` of `obj` with any keys whose value is `undefined` removed.
|
|
21
|
+
*/
|
|
15
22
|
export const stripUndefined = (obj) => {
|
|
16
23
|
const clone = structuredClone(obj);
|
|
17
24
|
Object.keys(clone).forEach((key) => clone[key] === undefined && delete clone[key]);
|
|
18
25
|
return clone;
|
|
19
26
|
};
|
|
27
|
+
/**
|
|
28
|
+
* Type guard that narrows an unknown value to a plain object (not array, not null).
|
|
29
|
+
*
|
|
30
|
+
* @param value - The value to inspect.
|
|
31
|
+
* @returns `true` if `value` is a non-null, non-array object; `false` otherwise.
|
|
32
|
+
*/
|
|
20
33
|
export const compareIsObject = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
|
|
21
34
|
/**
|
|
35
|
+
* Recursively compares two objects and returns the set of dot-delimited paths that differ.
|
|
36
|
+
*
|
|
37
|
+
* @remarks
|
|
38
|
+
* - Primitives are compared by strict equality (`NaN === NaN` is treated as equal).
|
|
39
|
+
* - Arrays are compared by JSON serialization at their location; the array's path is
|
|
40
|
+
* reported once when they differ rather than per-element.
|
|
41
|
+
* - Nested objects are walked recursively, producing paths such as `address.city`.
|
|
22
42
|
*
|
|
23
|
-
* @param a -
|
|
24
|
-
* @param b -
|
|
25
|
-
* @returns
|
|
43
|
+
* @param a - The first object to compare.
|
|
44
|
+
* @param b - The second object to compare.
|
|
45
|
+
* @returns An array of dot-delimited paths where `a` and `b` differ.
|
|
26
46
|
*/
|
|
27
47
|
export const compare = (a, b) => {
|
|
28
48
|
const changes = [];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helper.object.js","sourceRoot":"","sources":["../../src/helper/helper.object.ts"],"names":[],"mappings":"AAEA;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,CACzB,KAAQ,EACR,WAAwB,EACrB,EAAE;IACL,MAAM,MAAM,GAAe,EAAE,CAAC;IAC9B,KAAK,MAAM,UAAU,IAAI,WAAW;QAClC,IAAI,UAAU,IAAI,KAAK;YAAE,MAAM,CAAC,UAAU,CAAC,GAAG,KAAK,CAAC,UAAU,CAAC,CAAC;IAClE,OAAO,MAAW,CAAC;AACrB,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,cAAc,GAAG,CAAyB,GA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C,CAAC,GAAG,CAAC,CAAC;YAE7D,OAAO;QACT,CAAC;QAED,6BAA6B;QAC7B,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACrB,CAAC,CAAC;IAEF,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IAEX,OAAO,OAAO,CAAC;AACjB,CAAC,CAAC"}
|
|
@@ -12,6 +12,23 @@ export declare const lowerFirstLetter: (val: string) => string;
|
|
|
12
12
|
* @returns The string with its first character upper-cased.
|
|
13
13
|
*/
|
|
14
14
|
export declare const upperFirstLetter: (val: string) => string;
|
|
15
|
+
/**
|
|
16
|
+
* Converts a string to kebab-case.
|
|
17
|
+
*
|
|
18
|
+
* @remarks
|
|
19
|
+
* Inserts hyphens at camelCase boundaries (both `aB` and `AB`) and replaces
|
|
20
|
+
* whitespace and underscores with hyphens. Case is preserved; use
|
|
21
|
+
* {@link kebabCaseLower} for an all-lowercase result.
|
|
22
|
+
*
|
|
23
|
+
* @param str - The input string.
|
|
24
|
+
* @returns The kebab-cased string.
|
|
25
|
+
*/
|
|
15
26
|
export declare const kebabCase: (str: string) => string;
|
|
27
|
+
/**
|
|
28
|
+
* Converts a string to lowercase kebab-case via {@link kebabCase}.
|
|
29
|
+
*
|
|
30
|
+
* @param str - The input string.
|
|
31
|
+
* @returns The kebab-cased string, lower-cased.
|
|
32
|
+
*/
|
|
16
33
|
export declare const kebabCaseLower: (str: string) => string;
|
|
17
34
|
//# sourceMappingURL=helper.string.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helper.string.d.ts","sourceRoot":"","sources":["../../src/helper/helper.string.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB,GAAI,KAAK,MAAM,WAGf,CAAC;AAE9B;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB,GAAI,KAAK,MAAM,WAGrB,CAAC;AAExB,eAAO,MAAM,SAAS,GAAI,KAAK,MAAM,KAAG,MAIZ,CAAC;AAE7B,eAAO,MAAM,cAAc,GAAI,KAAK,MAAM,KAAG,MACf,CAAC"}
|
|
1
|
+
{"version":3,"file":"helper.string.d.ts","sourceRoot":"","sources":["../../src/helper/helper.string.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB,GAAI,KAAK,MAAM,WAGf,CAAC;AAE9B;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB,GAAI,KAAK,MAAM,WAGrB,CAAC;AAExB;;;;;;;;;;GAUG;AACH,eAAO,MAAM,SAAS,GAAI,KAAK,MAAM,KAAG,MAIZ,CAAC;AAE7B;;;;;GAKG;AACH,eAAO,MAAM,cAAc,GAAI,KAAK,MAAM,KAAG,MACf,CAAC"}
|
|
@@ -16,9 +16,26 @@ export const lowerFirstLetter = (val) => val.length > 1
|
|
|
16
16
|
export const upperFirstLetter = (val) => val.length > 1
|
|
17
17
|
? val.charAt(0).toUpperCase() + val.slice(1)
|
|
18
18
|
: val.toUpperCase();
|
|
19
|
+
/**
|
|
20
|
+
* Converts a string to kebab-case.
|
|
21
|
+
*
|
|
22
|
+
* @remarks
|
|
23
|
+
* Inserts hyphens at camelCase boundaries (both `aB` and `AB`) and replaces
|
|
24
|
+
* whitespace and underscores with hyphens. Case is preserved; use
|
|
25
|
+
* {@link kebabCaseLower} for an all-lowercase result.
|
|
26
|
+
*
|
|
27
|
+
* @param str - The input string.
|
|
28
|
+
* @returns The kebab-cased string.
|
|
29
|
+
*/
|
|
19
30
|
export const kebabCase = (str) => str
|
|
20
31
|
.replace(/([A-Z])([A-Z])/g, "$1-$2")
|
|
21
32
|
.replace(/([a-z])([A-Z])/g, "$1-$2")
|
|
22
33
|
.replace(/[\s_]+/g, "-");
|
|
34
|
+
/**
|
|
35
|
+
* Converts a string to lowercase kebab-case via {@link kebabCase}.
|
|
36
|
+
*
|
|
37
|
+
* @param str - The input string.
|
|
38
|
+
* @returns The kebab-cased string, lower-cased.
|
|
39
|
+
*/
|
|
23
40
|
export const kebabCaseLower = (str) => kebabCase(str).toLowerCase();
|
|
24
41
|
//# sourceMappingURL=helper.string.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helper.string.js","sourceRoot":"","sources":["../../src/helper/helper.string.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,GAAW,EAAE,EAAE,CAC9C,GAAG,CAAC,MAAM,GAAG,CAAC;IACZ,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,iBAAiB,EAAE,GAAG,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC;IAClD,CAAC,CAAC,GAAG,CAAC,iBAAiB,EAAE,CAAC;AAE9B;;;;;GAKG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,GAAW,EAAE,EAAE,CAC9C,GAAG,CAAC,MAAM,GAAG,CAAC;IACZ,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC;IAC5C,CAAC,CAAC,GAAG,CAAC,WAAW,EAAE,CAAC;AAExB,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,GAAW,EAAU,EAAE,CAC/C,GAAG;KACA,OAAO,CAAC,iBAAiB,EAAE,OAAO,CAAC;KACnC,OAAO,CAAC,iBAAiB,EAAE,OAAO,CAAC;KACnC,OAAO,CAAC,SAAS,EAAE,GAAG,CAAC,CAAC;AAE7B,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,GAAW,EAAU,EAAE,CACpD,SAAS,CAAC,GAAG,CAAC,CAAC,WAAW,EAAE,CAAC"}
|
|
1
|
+
{"version":3,"file":"helper.string.js","sourceRoot":"","sources":["../../src/helper/helper.string.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,GAAW,EAAE,EAAE,CAC9C,GAAG,CAAC,MAAM,GAAG,CAAC;IACZ,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,iBAAiB,EAAE,GAAG,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC;IAClD,CAAC,CAAC,GAAG,CAAC,iBAAiB,EAAE,CAAC;AAE9B;;;;;GAKG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,GAAW,EAAE,EAAE,CAC9C,GAAG,CAAC,MAAM,GAAG,CAAC;IACZ,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC;IAC5C,CAAC,CAAC,GAAG,CAAC,WAAW,EAAE,CAAC;AAExB;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,GAAW,EAAU,EAAE,CAC/C,GAAG;KACA,OAAO,CAAC,iBAAiB,EAAE,OAAO,CAAC;KACnC,OAAO,CAAC,iBAAiB,EAAE,OAAO,CAAC;KACnC,OAAO,CAAC,SAAS,EAAE,GAAG,CAAC,CAAC;AAE7B;;;;;GAKG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,GAAW,EAAU,EAAE,CACpD,SAAS,CAAC,GAAG,CAAC,CAAC,WAAW,EAAE,CAAC"}
|
|
@@ -29,6 +29,10 @@ export interface DecoRouteParams {
|
|
|
29
29
|
requestType: string;
|
|
30
30
|
/** Fully-qualified type name of the response payload. */
|
|
31
31
|
responseType: string;
|
|
32
|
+
/**
|
|
33
|
+
* Internal marker set by {@link crudRoutes} so {@link isCrudRoute} / {@link isCustomCrudRoute}
|
|
34
|
+
* can later classify the route. Not intended for direct use.
|
|
35
|
+
*/
|
|
32
36
|
_internalCrudType?: CrudType;
|
|
33
37
|
}
|
|
34
38
|
/**
|
|
@@ -39,22 +43,45 @@ export type DecoRoutes = Record<string, DecoRouteParams>;
|
|
|
39
43
|
* Represents a single import statement required by generated code.
|
|
40
44
|
*/
|
|
41
45
|
export interface DecoImport {
|
|
42
|
-
/** Named exports to import. */
|
|
46
|
+
/** Named value exports to import. */
|
|
43
47
|
valueProps: string[];
|
|
48
|
+
/** Named type-only exports to import (emitted as `import type`). */
|
|
44
49
|
typeProps: string[];
|
|
45
50
|
/** Module specifier / path to import from. */
|
|
46
51
|
path: string;
|
|
47
52
|
}
|
|
53
|
+
/**
|
|
54
|
+
* A single named import grouped under a shared module specifier.
|
|
55
|
+
*/
|
|
48
56
|
export interface DecoSingleImport {
|
|
57
|
+
/** The imported binding name. */
|
|
49
58
|
prop: string;
|
|
50
59
|
}
|
|
60
|
+
/**
|
|
61
|
+
* Resolution strategy for a single import — how the path is written and which file it targets.
|
|
62
|
+
*/
|
|
51
63
|
export interface DecoResolveItem {
|
|
64
|
+
/** Whether to emit a relative or package-qualified path. */
|
|
52
65
|
mode: DecoResolveMode;
|
|
66
|
+
/** Whether to point at the source file directly or its barrel re-export. */
|
|
53
67
|
target: DecoResolveTarget;
|
|
54
68
|
}
|
|
69
|
+
/**
|
|
70
|
+
* Resolution policy applied during code generation.
|
|
71
|
+
*
|
|
72
|
+
* @remarks
|
|
73
|
+
* `default` is used for cross-package imports; when `samePkg` is supplied, it
|
|
74
|
+
* overrides the policy for imports that resolve to the same workspace package
|
|
75
|
+
* as the emitting file.
|
|
76
|
+
*/
|
|
55
77
|
export interface DecoResolve {
|
|
78
|
+
/** Overriding policy used when both modules belong to the same package. */
|
|
56
79
|
samePkg?: DecoResolveItem;
|
|
80
|
+
/** Fallback policy used when no more specific rule matches. */
|
|
57
81
|
default: DecoResolveItem;
|
|
58
82
|
}
|
|
83
|
+
/**
|
|
84
|
+
* Map of enum key to human-readable label, accepted by {@link Decorator.registerEnum}.
|
|
85
|
+
*/
|
|
59
86
|
export type DecoEnumEntries = Record<string, string>;
|
|
60
87
|
//# sourceMappingURL=types.deco.common.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.deco.common.d.ts","sourceRoot":"","sources":["../../src/types/types.deco.common.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,QAAQ,EACR,eAAe,EACf,iBAAiB,EAClB,MAAM,2BAA2B,CAAC;AACnC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAE3D;;;;;GAKG;AACH,MAAM,MAAM,cAAc,CAAC,CAAC,IACxB;IACE,KAAK,CAAC,EAAE,CAAC,CAAC;IACV,IAAI,CAAC,EAAE,CAAC,CAAC;CACV,GACD,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"types.deco.common.d.ts","sourceRoot":"","sources":["../../src/types/types.deco.common.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,QAAQ,EACR,eAAe,EACf,iBAAiB,EAClB,MAAM,2BAA2B,CAAC;AACnC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAE3D;;;;;GAKG;AACH,MAAM,MAAM,cAAc,CAAC,CAAC,IACxB;IACE,KAAK,CAAC,EAAE,CAAC,CAAC;IACV,IAAI,CAAC,EAAE,CAAC,CAAC;CACV,GACD,CAAC,CAAC;AAEN;;GAEG;AACH,MAAM,WAAW,QAAQ;IACvB,kDAAkD;IAClD,gBAAgB,EAAE,MAAM,CAAC;IACzB,qDAAqD;IACrD,oBAAoB,EAAE,MAAM,CAAC;IAC7B,kDAAkD;IAClD,UAAU,EAAE,SAAS,EAAE,CAAC;CACzB;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,wDAAwD;IACxD,WAAW,EAAE,MAAM,CAAC;IACpB,yDAAyD;IACzD,YAAY,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,iBAAiB,CAAC,EAAE,QAAQ,CAAC;CAC9B;AAED;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC;AAEzD;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,qCAAqC;IACrC,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,oEAAoE;IACpE,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,8CAA8C;IAC9C,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,iCAAiC;IACjC,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,4DAA4D;IAC5D,IAAI,EAAE,eAAe,CAAC;IACtB,4EAA4E;IAC5E,MAAM,EAAE,iBAAiB,CAAC;CAC3B;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,WAAW;IAC1B,2EAA2E;IAC3E,OAAO,CAAC,EAAE,eAAe,CAAC;IAC1B,+DAA+D;IAC/D,OAAO,EAAE,eAAe,CAAC;CAC1B;AAED;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC"}
|
|
@@ -15,6 +15,8 @@ export interface DecoPropertyBase {
|
|
|
15
15
|
/** Allows additional, type-specific options. */
|
|
16
16
|
[key: string]: unknown;
|
|
17
17
|
}
|
|
18
|
+
/** Direction in which a virtual (non-stored) field flows. */
|
|
19
|
+
export type DecoVirtualDirection = "input" | "output" | "both";
|
|
18
20
|
/**
|
|
19
21
|
* Shared presentational and behavioural options applicable to any decorator property.
|
|
20
22
|
*/
|
|
@@ -31,8 +33,17 @@ export interface DecoPropertyCommon {
|
|
|
31
33
|
sortable?: boolean;
|
|
32
34
|
/** Whether the property supports filtering. */
|
|
33
35
|
filterable?: boolean;
|
|
34
|
-
/**
|
|
35
|
-
|
|
36
|
+
/**
|
|
37
|
+
* Direction in which a non-stored field flows.
|
|
38
|
+
*
|
|
39
|
+
* - `'output'` — computed server-side on read, never present in input.
|
|
40
|
+
* - `'input'` — client-supplied to trigger behaviour, validated, stripped before storage.
|
|
41
|
+
* - `'both'` — accepted on input AND populated on output.
|
|
42
|
+
*
|
|
43
|
+
* Use {@link isOutputVirtual} / {@link isInputVirtual} / {@link isAnyVirtual}
|
|
44
|
+
* to query this field — do not compare strings directly at call sites.
|
|
45
|
+
*/
|
|
46
|
+
virtual?: DecoVirtualDirection;
|
|
36
47
|
/** Whether the property change triggers side effects. */
|
|
37
48
|
sideEffects?: boolean;
|
|
38
49
|
/** Whether the property should be hidden from the UI. */
|
|
@@ -44,6 +55,12 @@ export interface DecoPropertyCommon {
|
|
|
44
55
|
/** Display order for the property. */
|
|
45
56
|
order?: DecoParamsKind<number>;
|
|
46
57
|
}
|
|
58
|
+
/** True if the field is populated on read (computed server-side). */
|
|
59
|
+
export declare const isOutputVirtual: (common: DecoPropertyCommon) => boolean;
|
|
60
|
+
/** True if the field is accepted on input (validated, stripped before storage). */
|
|
61
|
+
export declare const isInputVirtual: (common: DecoPropertyCommon) => boolean;
|
|
62
|
+
/** True if the field is virtual in any direction. */
|
|
63
|
+
export declare const isAnyVirtual: (common: DecoPropertyCommon) => boolean;
|
|
47
64
|
/**
|
|
48
65
|
* Wraps a decorator property's shared and type-specific options.
|
|
49
66
|
*
|
|
@@ -55,8 +72,13 @@ export interface DecoPropertyRaw<T extends DecoPropertyBase> {
|
|
|
55
72
|
/** Type-specific decorator options. */
|
|
56
73
|
data: T;
|
|
57
74
|
}
|
|
75
|
+
/**
|
|
76
|
+
* Descriptor for a virtual (non-stored) property contributed by a decorator.
|
|
77
|
+
*/
|
|
58
78
|
export interface DecoPropertyVirtual {
|
|
79
|
+
/** Property key on the document. */
|
|
59
80
|
key: string;
|
|
81
|
+
/** Whether the property is optional. */
|
|
60
82
|
optional?: boolean;
|
|
61
83
|
}
|
|
62
84
|
/**
|
|
@@ -96,15 +118,19 @@ export interface DecoStringOptions extends DecoPropertyBase {
|
|
|
96
118
|
regex?: string;
|
|
97
119
|
/** Whether this string property acts as a unique key. */
|
|
98
120
|
isKey?: boolean;
|
|
121
|
+
/** Whether this string represents a password value (hides input in UIs). */
|
|
99
122
|
password?: boolean;
|
|
100
123
|
}
|
|
101
124
|
/**
|
|
102
|
-
* Decorator options for
|
|
125
|
+
* Decorator options for an enum property.
|
|
103
126
|
*/
|
|
104
127
|
export interface DecoEnumOptions extends DecoPropertyBase {
|
|
105
128
|
type: DecoPropertyType.enum;
|
|
129
|
+
/** Map of enum key to human-readable label. */
|
|
106
130
|
keys: EnumRegistryKeys;
|
|
131
|
+
/** When set, the generated enum reuses the enum defined for this decorator basename. */
|
|
107
132
|
linkBasename?: string;
|
|
133
|
+
/** When set, the generated enum reuses the enum defined for this property key. */
|
|
108
134
|
linkKey?: string;
|
|
109
135
|
}
|
|
110
136
|
/**
|
|
@@ -136,7 +162,9 @@ export interface DecoDateOptions extends DecoPropertyBase {
|
|
|
136
162
|
type: DecoPropertyType.date;
|
|
137
163
|
/** Display / serialization format for the date. */
|
|
138
164
|
dateFormat: DecoDateFormat;
|
|
165
|
+
/** Initial date strategy (e.g. `now`, `today`, `date1970`); `null` when no default applies. */
|
|
139
166
|
dateType: DecoDateType | null;
|
|
167
|
+
/** Day offset added to the initial date computed from {@link DecoDateOptions.dateType}. */
|
|
140
168
|
dateOffsetDays: number | null;
|
|
141
169
|
}
|
|
142
170
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.deco.property.d.ts","sourceRoot":"","sources":["../../src/types/types.deco.property.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,gBAAgB,EAChB,cAAc,EACd,YAAY,EACb,MAAM,2BAA2B,CAAC;AACnC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAC7D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAEjE;;;;;;GAMG;AACH,MAAM,WAAW,gBAAgB;IAC/B,kDAAkD;IAClD,IAAI,EAAE,gBAAgB,CAAC;IACvB,gDAAgD;IAChD,CAAC,GAAG,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S,CAAC,EAAE,MAAM,CAAC;IACnB,yDAAyD;IACzD,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAGD;;GAEG;AACH,MAAM,WAAW,iBAAkB,SAAQ,gBAAgB;IACzD,IAAI,EAAE,gBAAgB,CAAC,MAAM,CAAC;IAC9B,mDAAmD;IACnD,GAAG,EAAE,SAAS,CAAC;CAChB;AAGD;;GAEG;AACH,MAAM,WAAW,eAAgB,SAAQ,gBAAgB;IACvD,IAAI,EAAE,gBAAgB,CAAC,IAAI,CAAC;IAC5B,mDAAmD;IACnD,UAAU,EAAE,cAAc,CAAC;IAC3B,+FAA+F;IAC/F,QAAQ,EAAE,YAAY,GAAG,IAAI,CAAC;IAC9B,2FAA2F;IAC3F,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;CAC/B;AAGD;;GAEG;AACH,MAAM,WAAW,kBAAmB,SAAQ,gBAAgB;IAC1D,IAAI,EAAE,gBAAgB,CAAC,OAAO,CAAC;IAC/B,6BAA6B;IAC7B,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB"}
|
|
@@ -1,2 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
/** True if the field is populated on read (computed server-side). */
|
|
2
|
+
export const isOutputVirtual = (common) => common.virtual === "output" || common.virtual === "both";
|
|
3
|
+
/** True if the field is accepted on input (validated, stripped before storage). */
|
|
4
|
+
export const isInputVirtual = (common) => common.virtual === "input" || common.virtual === "both";
|
|
5
|
+
/** True if the field is virtual in any direction. */
|
|
6
|
+
export const isAnyVirtual = (common) => !!common.virtual;
|
|
2
7
|
//# sourceMappingURL=types.deco.property.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.deco.property.js","sourceRoot":"","sources":["../../src/types/types.deco.property.ts"],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"types.deco.property.js","sourceRoot":"","sources":["../../src/types/types.deco.property.ts"],"names":[],"mappings":"AAiEA,qEAAqE;AACrE,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,MAA0B,EAAW,EAAE,CACrE,MAAM,CAAC,OAAO,KAAK,QAAQ,IAAI,MAAM,CAAC,OAAO,KAAK,MAAM,CAAC;AAE3D,mFAAmF;AACnF,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,MAA0B,EAAW,EAAE,CACpE,MAAM,CAAC,OAAO,KAAK,OAAO,IAAI,MAAM,CAAC,OAAO,KAAK,MAAM,CAAC;AAE1D,qDAAqD;AACrD,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,MAA0B,EAAW,EAAE,CAClE,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC"}
|
|
@@ -1,6 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Map of enum key to human-readable label.
|
|
3
|
+
*
|
|
4
|
+
* @remarks
|
|
5
|
+
* The shape used by {@link EnumRegistry}, {@link Decorator}, and the code
|
|
6
|
+
* generator to describe the entries of a generated enum.
|
|
7
|
+
*/
|
|
1
8
|
export type EnumRegistryKeys = Record<string, string>;
|
|
9
|
+
/**
|
|
10
|
+
* A single registered enum: its unique name and its key/label entries.
|
|
11
|
+
*/
|
|
2
12
|
export interface EnumRegistryItem {
|
|
13
|
+
/** Unique enum name, typically built via {@link buildEnumName}. */
|
|
3
14
|
name: string;
|
|
15
|
+
/** Map of enum key to human-readable label. */
|
|
4
16
|
keys: EnumRegistryKeys;
|
|
5
17
|
}
|
|
6
18
|
//# sourceMappingURL=types.enum.registry.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.enum.registry.d.ts","sourceRoot":"","sources":["../../src/types/types.enum.registry.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,gBAAgB,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAEtD,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,gBAAgB,CAAC;CACxB"}
|
|
1
|
+
{"version":3,"file":"types.enum.registry.d.ts","sourceRoot":"","sources":["../../src/types/types.enum.registry.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,MAAM,MAAM,gBAAgB,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAEtD;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,mEAAmE;IACnE,IAAI,EAAE,MAAM,CAAC;IACb,+CAA+C;IAC/C,IAAI,EAAE,gBAAgB,CAAC;CACxB"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { CreateInput, DocumentKey, DocumentKeyAdmin, UpdateInput } from "./types.document.js";
|
|
1
|
+
import type { CreateInput, DocumentData, DocumentKey, DocumentKeyAdmin, UpdateInput } from "./types.document.js";
|
|
2
2
|
import type { ApiFilter } from "./types.filter.js";
|
|
3
3
|
/**
|
|
4
4
|
* Defines the request and response types for a single API route.
|
|
@@ -31,9 +31,9 @@ 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 DocumentKeyAdmin> = WithRoutes<{
|
|
35
|
-
create: RouteDef<CreateInput<
|
|
36
|
-
update: RouteDef<UpdateInput<
|
|
34
|
+
export type CrudRoutes<DTO extends DocumentKeyAdmin, INPUT_DTO extends DocumentData = DTO> = WithRoutes<{
|
|
35
|
+
create: RouteDef<CreateInput<INPUT_DTO>, DTO>;
|
|
36
|
+
update: RouteDef<UpdateInput<INPUT_DTO>, DTO>;
|
|
37
37
|
delete: RouteDef<DocumentKey, {
|
|
38
38
|
deleted: true;
|
|
39
39
|
}>;
|
|
@@ -55,6 +55,13 @@ export type CrudRoutes<DTO extends DocumentKeyAdmin> = WithRoutes<{
|
|
|
55
55
|
export type ApiFromRoutes<R extends RoutesMap> = {
|
|
56
56
|
[K in keyof R]: (request: R[K]["request"]) => Promise<R[K]["response"]>;
|
|
57
57
|
};
|
|
58
|
+
/**
|
|
59
|
+
* Untyped route description accepted as raw input by the generator.
|
|
60
|
+
*
|
|
61
|
+
* @remarks
|
|
62
|
+
* Either a `name → handler-symbol` map, or an array of route names whose
|
|
63
|
+
* handler symbol matches the name 1:1.
|
|
64
|
+
*/
|
|
58
65
|
export type RoutesRaw = {
|
|
59
66
|
[key: string]: string;
|
|
60
67
|
} | string[];
|
|
@@ -1 +1 @@
|
|
|
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,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAEnD;;;;;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,UAAU,CAAC,CAAC,SAAS,SAAS,IAAI,CAAC,CAAC;AAEhD;;;;;;;;GAQG;AACH,MAAM,MAAM,UAAU,
|
|
1
|
+
{"version":3,"file":"types.routes.d.ts","sourceRoot":"","sources":["../../src/types/types.routes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,WAAW,EACX,YAAY,EACZ,WAAW,EACX,gBAAgB,EAChB,WAAW,EACZ,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAEnD;;;;;GAKG;AACH,MAAM,MAAM,QAAQ,CAAC,GAAG,EAAE,GAAG,IAAI;IAC/B,OAAO,EAAE,GAAG,CA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