@solid-nestjs/common 0.2.6 → 0.2.9
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/adapters/index.d.ts +7 -0
- package/dist/adapters/index.d.ts.map +1 -0
- package/dist/adapters/index.js +23 -0
- package/dist/adapters/index.js.map +1 -0
- package/dist/adapters/validation.adapter.d.ts +20 -0
- package/dist/adapters/validation.adapter.d.ts.map +1 -0
- package/dist/adapters/validation.adapter.js +309 -0
- package/dist/adapters/validation.adapter.js.map +1 -0
- package/dist/decorator-registry/decorator-registry.d.ts +54 -0
- package/dist/decorator-registry/decorator-registry.d.ts.map +1 -0
- package/dist/decorator-registry/decorator-registry.js +161 -0
- package/dist/decorator-registry/decorator-registry.js.map +1 -0
- package/dist/decorator-registry/index.d.ts +2 -0
- package/dist/decorator-registry/index.d.ts.map +1 -0
- package/dist/decorator-registry/index.js +18 -0
- package/dist/decorator-registry/index.js.map +1 -0
- package/dist/decorators/index.d.ts +6 -0
- package/dist/decorators/index.d.ts.map +1 -1
- package/dist/decorators/index.js +6 -0
- package/dist/decorators/index.js.map +1 -1
- package/dist/decorators/solid-entity.decorator.d.ts +6 -0
- package/dist/decorators/solid-entity.decorator.d.ts.map +1 -0
- package/dist/decorators/solid-entity.decorator.js +23 -0
- package/dist/decorators/solid-entity.decorator.js.map +1 -0
- package/dist/decorators/solid-field.decorator.d.ts +7 -0
- package/dist/decorators/solid-field.decorator.d.ts.map +1 -0
- package/dist/decorators/solid-field.decorator.js +51 -0
- package/dist/decorators/solid-field.decorator.js.map +1 -0
- package/dist/decorators/solid-id.decorator.d.ts +9 -0
- package/dist/decorators/solid-id.decorator.d.ts.map +1 -0
- package/dist/decorators/solid-id.decorator.js +27 -0
- package/dist/decorators/solid-id.decorator.js.map +1 -0
- package/dist/decorators/solid-input.decorator.d.ts +6 -0
- package/dist/decorators/solid-input.decorator.d.ts.map +1 -0
- package/dist/decorators/solid-input.decorator.js +35 -0
- package/dist/decorators/solid-input.decorator.js.map +1 -0
- package/dist/decorators/solid-relation.decorator.d.ts +19 -0
- package/dist/decorators/solid-relation.decorator.d.ts.map +1 -0
- package/dist/decorators/solid-relation.decorator.js +66 -0
- package/dist/decorators/solid-relation.decorator.js.map +1 -0
- package/dist/decorators/solid-timestamp.decorator.d.ts +13 -0
- package/dist/decorators/solid-timestamp.decorator.d.ts.map +1 -0
- package/dist/decorators/solid-timestamp.decorator.js +49 -0
- package/dist/decorators/solid-timestamp.decorator.js.map +1 -0
- package/dist/enums/aggregate-function.enum.d.ts +42 -0
- package/dist/enums/aggregate-function.enum.d.ts.map +1 -0
- package/dist/enums/aggregate-function.enum.js +46 -0
- package/dist/enums/aggregate-function.enum.js.map +1 -0
- package/dist/enums/index.d.ts +1 -0
- package/dist/enums/index.d.ts.map +1 -1
- package/dist/enums/index.js +1 -0
- package/dist/enums/index.js.map +1 -1
- package/dist/helpers/args-helpers/class-generator.helper.d.ts +143 -0
- package/dist/helpers/args-helpers/class-generator.helper.d.ts.map +1 -0
- package/dist/helpers/args-helpers/class-generator.helper.js +221 -0
- package/dist/helpers/args-helpers/class-generator.helper.js.map +1 -0
- package/dist/helpers/args-helpers/create-groupby-request.helper.d.ts +83 -0
- package/dist/helpers/args-helpers/create-groupby-request.helper.d.ts.map +1 -0
- package/dist/helpers/args-helpers/create-groupby-request.helper.js +119 -0
- package/dist/helpers/args-helpers/create-groupby-request.helper.js.map +1 -0
- package/dist/helpers/args-helpers/decorator-builder.helper.d.ts +160 -0
- package/dist/helpers/args-helpers/decorator-builder.helper.d.ts.map +1 -0
- package/dist/helpers/args-helpers/decorator-builder.helper.js +161 -0
- package/dist/helpers/args-helpers/decorator-builder.helper.js.map +1 -0
- package/dist/helpers/args-helpers/field-config.helper.d.ts +98 -0
- package/dist/helpers/args-helpers/field-config.helper.d.ts.map +1 -0
- package/dist/helpers/args-helpers/field-config.helper.js +143 -0
- package/dist/helpers/args-helpers/field-config.helper.js.map +1 -0
- package/dist/helpers/args-helpers/groupby-args-from.helper.d.ts +87 -0
- package/dist/helpers/args-helpers/groupby-args-from.helper.d.ts.map +1 -0
- package/dist/helpers/args-helpers/groupby-args-from.helper.js +185 -0
- package/dist/helpers/args-helpers/groupby-args-from.helper.js.map +1 -0
- package/dist/helpers/args-helpers/index.d.ts +15 -0
- package/dist/helpers/args-helpers/index.d.ts.map +1 -0
- package/dist/helpers/args-helpers/index.js +58 -0
- package/dist/helpers/args-helpers/index.js.map +1 -0
- package/dist/helpers/args-helpers/type-inference.helper.d.ts +191 -0
- package/dist/helpers/args-helpers/type-inference.helper.d.ts.map +1 -0
- package/dist/helpers/args-helpers/type-inference.helper.js +330 -0
- package/dist/helpers/args-helpers/type-inference.helper.js.map +1 -0
- package/dist/helpers/class-generation/dynamic-class.helper.d.ts +101 -0
- package/dist/helpers/class-generation/dynamic-class.helper.d.ts.map +1 -0
- package/dist/helpers/class-generation/dynamic-class.helper.js +180 -0
- package/dist/helpers/class-generation/dynamic-class.helper.js.map +1 -0
- package/dist/helpers/class-generation/index.d.ts +9 -0
- package/dist/helpers/class-generation/index.d.ts.map +1 -0
- package/dist/helpers/class-generation/index.js +18 -0
- package/dist/helpers/class-generation/index.js.map +1 -0
- package/dist/helpers/decorators/decorator-utils.helper.d.ts +75 -0
- package/dist/helpers/decorators/decorator-utils.helper.d.ts.map +1 -0
- package/dist/helpers/decorators/decorator-utils.helper.js +92 -0
- package/dist/helpers/decorators/decorator-utils.helper.js.map +1 -0
- package/dist/helpers/decorators/index.d.ts +9 -0
- package/dist/helpers/decorators/index.d.ts.map +1 -0
- package/dist/helpers/decorators/index.js +16 -0
- package/dist/helpers/decorators/index.js.map +1 -0
- package/dist/helpers/dto-generator-base.helper.d.ts +19 -0
- package/dist/helpers/dto-generator-base.helper.d.ts.map +1 -0
- package/dist/helpers/dto-generator-base.helper.js +72 -0
- package/dist/helpers/dto-generator-base.helper.js.map +1 -0
- package/dist/helpers/index.d.ts +9 -0
- package/dist/helpers/index.d.ts.map +1 -1
- package/dist/helpers/index.js +9 -0
- package/dist/helpers/index.js.map +1 -1
- package/dist/helpers/metadata-extractor.helper.d.ts +26 -0
- package/dist/helpers/metadata-extractor.helper.d.ts.map +1 -0
- package/dist/helpers/metadata-extractor.helper.js +67 -0
- package/dist/helpers/metadata-extractor.helper.js.map +1 -0
- package/dist/helpers/package-detector.helper.d.ts +33 -0
- package/dist/helpers/package-detector.helper.d.ts.map +1 -0
- package/dist/helpers/package-detector.helper.js +82 -0
- package/dist/helpers/package-detector.helper.js.map +1 -0
- package/dist/helpers/property-filter.helper.d.ts +15 -0
- package/dist/helpers/property-filter.helper.d.ts.map +1 -0
- package/dist/helpers/property-filter.helper.js +44 -0
- package/dist/helpers/property-filter.helper.js.map +1 -0
- package/dist/helpers/type-inference.helper.d.ts +76 -0
- package/dist/helpers/type-inference.helper.d.ts.map +1 -0
- package/dist/helpers/type-inference.helper.js +205 -0
- package/dist/helpers/type-inference.helper.js.map +1 -0
- package/dist/helpers/validation-inference.helper.d.ts +18 -0
- package/dist/helpers/validation-inference.helper.d.ts.map +1 -0
- package/dist/helpers/validation-inference.helper.js +100 -0
- package/dist/helpers/validation-inference.helper.js.map +1 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -1
- package/dist/interfaces/adapters/decorator-adapter.interface.d.ts +8 -0
- package/dist/interfaces/adapters/decorator-adapter.interface.d.ts.map +1 -0
- package/dist/interfaces/adapters/decorator-adapter.interface.js +3 -0
- package/dist/interfaces/adapters/decorator-adapter.interface.js.map +1 -0
- package/dist/interfaces/decorators/solid-field-options.interface.d.ts +55 -0
- package/dist/interfaces/decorators/solid-field-options.interface.d.ts.map +1 -0
- package/dist/interfaces/decorators/solid-field-options.interface.js +3 -0
- package/dist/interfaces/decorators/solid-field-options.interface.js.map +1 -0
- package/dist/interfaces/index.d.ts +5 -0
- package/dist/interfaces/index.d.ts.map +1 -1
- package/dist/interfaces/index.js +5 -0
- package/dist/interfaces/index.js.map +1 -1
- package/dist/interfaces/inputs/filters.interfaces.d.ts +36 -0
- package/dist/interfaces/inputs/filters.interfaces.d.ts.map +1 -0
- package/dist/interfaces/inputs/filters.interfaces.js +3 -0
- package/dist/interfaces/inputs/filters.interfaces.js.map +1 -0
- package/dist/interfaces/inputs/find-args.interface.d.ts +8 -0
- package/dist/interfaces/inputs/find-args.interface.d.ts.map +1 -0
- package/dist/interfaces/inputs/find-args.interface.js +3 -0
- package/dist/interfaces/inputs/find-args.interface.js.map +1 -0
- package/dist/interfaces/inputs/group-by-args.interface.d.ts +33 -0
- package/dist/interfaces/inputs/group-by-args.interface.d.ts.map +1 -0
- package/dist/interfaces/inputs/group-by-args.interface.js +3 -0
- package/dist/interfaces/inputs/group-by-args.interface.js.map +1 -0
- package/dist/interfaces/inputs/group-by-request.interface.d.ts +63 -0
- package/dist/interfaces/inputs/group-by-request.interface.d.ts.map +1 -0
- package/dist/interfaces/inputs/group-by-request.interface.js +3 -0
- package/dist/interfaces/inputs/group-by-request.interface.js.map +1 -0
- package/dist/interfaces/inputs/index.d.ts +6 -0
- package/dist/interfaces/inputs/index.d.ts.map +1 -0
- package/dist/interfaces/inputs/index.js +22 -0
- package/dist/interfaces/inputs/index.js.map +1 -0
- package/dist/interfaces/inputs/pagination-request.interface.d.ts +7 -0
- package/dist/interfaces/inputs/pagination-request.interface.d.ts.map +1 -0
- package/dist/interfaces/inputs/pagination-request.interface.js +3 -0
- package/dist/interfaces/inputs/pagination-request.interface.js.map +1 -0
- package/dist/interfaces/metadata/field-metadata.interface.d.ts +29 -0
- package/dist/interfaces/metadata/field-metadata.interface.d.ts.map +1 -0
- package/dist/interfaces/metadata/field-metadata.interface.js +3 -0
- package/dist/interfaces/metadata/field-metadata.interface.js.map +1 -0
- package/dist/interfaces/misc/group-by-args.interface.d.ts +33 -0
- package/dist/interfaces/misc/group-by-args.interface.d.ts.map +1 -0
- package/dist/interfaces/misc/group-by-args.interface.js +3 -0
- package/dist/interfaces/misc/group-by-args.interface.js.map +1 -0
- package/dist/interfaces/misc/group-by-request.interface.d.ts +63 -0
- package/dist/interfaces/misc/group-by-request.interface.d.ts.map +1 -0
- package/dist/interfaces/misc/group-by-request.interface.js +3 -0
- package/dist/interfaces/misc/group-by-request.interface.js.map +1 -0
- package/dist/interfaces/misc/group-by-response.interface.d.ts +59 -0
- package/dist/interfaces/misc/group-by-response.interface.d.ts.map +1 -0
- package/dist/interfaces/misc/group-by-response.interface.js +3 -0
- package/dist/interfaces/misc/group-by-response.interface.js.map +1 -0
- package/dist/interfaces/misc/group-by.interface.d.ts +145 -0
- package/dist/interfaces/misc/group-by.interface.d.ts.map +1 -0
- package/dist/interfaces/misc/group-by.interface.js +3 -0
- package/dist/interfaces/misc/group-by.interface.js.map +1 -0
- package/dist/interfaces/misc/index.d.ts +0 -4
- package/dist/interfaces/misc/index.d.ts.map +1 -1
- package/dist/interfaces/misc/index.js +0 -4
- package/dist/interfaces/misc/index.js.map +1 -1
- package/dist/interfaces/outputs/group-by-response.interface.d.ts +59 -0
- package/dist/interfaces/outputs/group-by-response.interface.d.ts.map +1 -0
- package/dist/interfaces/outputs/group-by-response.interface.js +3 -0
- package/dist/interfaces/outputs/group-by-response.interface.js.map +1 -0
- package/dist/interfaces/outputs/index.d.ts +3 -0
- package/dist/interfaces/outputs/index.d.ts.map +1 -0
- package/dist/interfaces/outputs/index.js +19 -0
- package/dist/interfaces/outputs/index.js.map +1 -0
- package/dist/interfaces/outputs/pagination-result.interface.d.ts +10 -0
- package/dist/interfaces/outputs/pagination-result.interface.d.ts.map +1 -0
- package/dist/interfaces/outputs/pagination-result.interface.js +3 -0
- package/dist/interfaces/outputs/pagination-result.interface.js.map +1 -0
- package/dist/interfaces/services/crud-service.interface.d.ts +2 -1
- package/dist/interfaces/services/crud-service.interface.d.ts.map +1 -1
- package/dist/interfaces/services/crud-service.interface.js.map +1 -1
- package/dist/interfaces/services/data-service.interface.d.ts +3 -1
- package/dist/interfaces/services/data-service.interface.d.ts.map +1 -1
- package/dist/interfaces/structures/common-services.index.d.ts +1 -0
- package/dist/interfaces/structures/common-services.index.d.ts.map +1 -0
- package/dist/interfaces/structures/common-services.index.js +2 -0
- package/dist/interfaces/structures/common-services.index.js.map +1 -0
- package/dist/interfaces/structures/crud-service-structure.interface.d.ts +2 -1
- package/dist/interfaces/structures/crud-service-structure.interface.d.ts.map +1 -1
- package/dist/interfaces/structures/data-service-structure.interface.d.ts +2 -1
- package/dist/interfaces/structures/data-service-structure.interface.d.ts.map +1 -1
- package/dist/interfaces/structures/entity-provider-structure.interface.d.ts +2 -1
- package/dist/interfaces/structures/entity-provider-structure.interface.d.ts.map +1 -1
- package/dist/interfaces/structures/entity-provider-structure.interface.js.map +1 -1
- package/dist/interfaces/structures/service-plugins.interface.d.ts +2 -1
- package/dist/interfaces/structures/service-plugins.interface.d.ts.map +1 -1
- package/dist/metadata/index.d.ts +2 -0
- package/dist/metadata/index.d.ts.map +1 -0
- package/dist/metadata/index.js +18 -0
- package/dist/metadata/index.js.map +1 -0
- package/dist/metadata/metadata-storage.d.ts +54 -0
- package/dist/metadata/metadata-storage.d.ts.map +1 -0
- package/dist/metadata/metadata-storage.js +106 -0
- package/dist/metadata/metadata-storage.js.map +1 -0
- package/dist/registry/index.d.ts +2 -0
- package/dist/registry/index.d.ts.map +1 -0
- package/dist/registry/index.js +18 -0
- package/dist/registry/index.js.map +1 -0
- package/dist/registry/relation-adapter-registry.d.ts +11 -0
- package/dist/registry/relation-adapter-registry.d.ts.map +1 -0
- package/dist/registry/relation-adapter-registry.js +30 -0
- package/dist/registry/relation-adapter-registry.js.map +1 -0
- package/dist/types/dto-generation.types.d.ts +46 -0
- package/dist/types/dto-generation.types.d.ts.map +1 -0
- package/dist/types/dto-generation.types.js +6 -0
- package/dist/types/dto-generation.types.js.map +1 -0
- package/dist/types/find-args.type.d.ts +9 -7
- package/dist/types/find-args.type.d.ts.map +1 -1
- package/dist/types/group-by.type.d.ts +41 -0
- package/dist/types/group-by.type.d.ts.map +1 -0
- package/dist/types/group-by.type.js +3 -0
- package/dist/types/group-by.type.js.map +1 -0
- package/dist/types/index.d.ts +2 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +2 -0
- package/dist/types/index.js.map +1 -1
- package/package.json +2 -2
- package/dist/utils/object.utils.d.ts +0 -8
- package/dist/utils/object.utils.d.ts.map +0 -1
- package/dist/utils/object.utils.js +0 -11
- package/dist/utils/object.utils.js.map +0 -1
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { PaginationResult } from './pagination-result.interface';
|
|
2
|
+
/**
|
|
3
|
+
* Represents a single group result.
|
|
4
|
+
*
|
|
5
|
+
* @interface GroupResult
|
|
6
|
+
* @template T - The entity type being grouped
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```typescript
|
|
10
|
+
* const groupResult: GroupResult<Product> = {
|
|
11
|
+
* key: { category: 'Electronics', supplierName: 'TechCorp' },
|
|
12
|
+
* aggregates: { avgPrice: 1250.50, totalProducts: 15 }
|
|
13
|
+
* };
|
|
14
|
+
* ```
|
|
15
|
+
*/
|
|
16
|
+
export interface GroupResult<T = any> {
|
|
17
|
+
/**
|
|
18
|
+
* The grouped key values as an object
|
|
19
|
+
*/
|
|
20
|
+
key: Record<string, any>;
|
|
21
|
+
/**
|
|
22
|
+
* The computed aggregate values as an object
|
|
23
|
+
*/
|
|
24
|
+
aggregates: Record<string, any>;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Represents the result of a grouped query with pagination.
|
|
28
|
+
* Extends PaginationResult to reuse existing pagination properties.
|
|
29
|
+
*
|
|
30
|
+
* @interface GroupedPaginationResult
|
|
31
|
+
* @template T - The entity type being grouped
|
|
32
|
+
*
|
|
33
|
+
* @example
|
|
34
|
+
* ```typescript
|
|
35
|
+
* const result: GroupedPaginationResult<Product> = {
|
|
36
|
+
* groups: [groupResult1, groupResult2, ...],
|
|
37
|
+
* pagination: {
|
|
38
|
+
* total: 25,
|
|
39
|
+
* count: 10,
|
|
40
|
+
* limit: 10,
|
|
41
|
+
* page: 1,
|
|
42
|
+
* pageCount: 3,
|
|
43
|
+
* hasNextPage: true,
|
|
44
|
+
* hasPreviousPage: false
|
|
45
|
+
* }
|
|
46
|
+
* };
|
|
47
|
+
* ```
|
|
48
|
+
*/
|
|
49
|
+
export interface GroupedPaginationResult<T = any> {
|
|
50
|
+
/**
|
|
51
|
+
* Array of group results
|
|
52
|
+
*/
|
|
53
|
+
groups: GroupResult<T>[];
|
|
54
|
+
/**
|
|
55
|
+
* Pagination information for the groups
|
|
56
|
+
*/
|
|
57
|
+
pagination: PaginationResult;
|
|
58
|
+
}
|
|
59
|
+
//# sourceMappingURL=group-by-response.interface.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"group-by-response.interface.d.ts","sourceRoot":"","sources":["../../../src/interfaces/outputs/group-by-response.interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAEjE;;;;;;;;;;;;;GAaG;AACH,MAAM,WAAW,WAAW,CAAC,CAAC,GAAG,GAAG;IAClC;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAEzB;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CACjC;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,WAAW,uBAAuB,CAAC,CAAC,GAAG,GAAG;IAC9C;;OAEG;IACH,MAAM,EAAE,WAAW,CAAC,CAAC,CAAC,EAAE,CAAC;IAEzB;;OAEG;IACH,UAAU,EAAE,gBAAgB,CAAC;CAC9B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"group-by-response.interface.js","sourceRoot":"","sources":["../../../src/interfaces/outputs/group-by-response.interface.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/interfaces/outputs/index.ts"],"names":[],"mappings":"AAAA,cAAc,+BAA+B,CAAC;AAC9C,cAAc,+BAA+B,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./group-by-response.interface"), exports);
|
|
18
|
+
__exportStar(require("./pagination-result.interface"), exports);
|
|
19
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/interfaces/outputs/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,gEAA8C;AAC9C,gEAA8C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pagination-result.interface.d.ts","sourceRoot":"","sources":["../../../src/interfaces/outputs/pagination-result.interface.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,OAAO,CAAC;IACrB,eAAe,EAAE,OAAO,CAAC;CAC1B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pagination-result.interface.js","sourceRoot":"","sources":["../../../src/interfaces/outputs/pagination-result.interface.ts"],"names":[],"mappings":""}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { DeepPartial } from '../../types';
|
|
2
|
-
import { Context, IdTypeFrom, Entity
|
|
2
|
+
import { Context, IdTypeFrom, Entity } from '../misc';
|
|
3
|
+
import { FindArgs } from '../inputs';
|
|
3
4
|
import { DataService } from './data-service.interface';
|
|
4
5
|
/**
|
|
5
6
|
* Interface for Create, Update, and Delete operations without soft deletion support.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"crud-service.interface.d.ts","sourceRoot":"","sources":["../../../src/interfaces/services/crud-service.interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"crud-service.interface.d.ts","sourceRoot":"","sources":["../../../src/interfaces/services/crud-service.interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACtD,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AACrC,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAEvD;;;;;;;;GAQG;AACH,MAAM,WAAW,UAAU,CACzB,MAAM,SAAS,UAAU,CAAC,UAAU,CAAC,EACrC,UAAU,SAAS,MAAM,CAA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AS,WAAW,CAAC,UAAU,CAAC,EAC/C,eAAe,SAAS,WAAW,CAAC,UAAU,CAAC,EAC/C,YAAY,SAAS,QAAQ,CAAC,UAAU,CAAC,GAAG,QAAQ,CAAC,UAAU,CAAC,EAChE,WAAW,SAAS,OAAO,GAAG,OAAO,EAErC,OAAO,EAAE,WAAW,CAClB,MAAM,EACN,UAAU,EACV,eAAe,EACf,eAAe,EACf,YAAY,EACZ,WAAW,CACZ,GACA,OAAO,IAAI,wBAAwB,CACpC,MAAM,EACN,UAAU,EACV,eAAe,EACf,eAAe,EACf,YAAY,EACZ,WAAW,CACZ,CAEA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"crud-service.interface.js","sourceRoot":"","sources":["../../../src/interfaces/services/crud-service.interface.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"crud-service.interface.js","sourceRoot":"","sources":["../../../src/interfaces/services/crud-service.interface.ts"],"names":[],"mappings":";;AA8KA,gEAyBC;AA1BD,kEAAkE;AAClE,SAAgB,0BAA0B,CAQxC,OAOC;IASD,OAAO,OAAO,IAAI,OAAQ,OAAe,CAAC,UAAU,KAAK,UAAU,CAAC;AACtE,CAAC"}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { BooleanType, NotNullableIf, If } from '../../types';
|
|
2
|
-
import { Context, IdTypeFrom, Entity
|
|
2
|
+
import { Context, IdTypeFrom, Entity } from '../misc';
|
|
3
|
+
import { FindArgs } from '../inputs';
|
|
4
|
+
import { PaginationResult } from '../outputs';
|
|
3
5
|
import { Where } from '../../types/find-args.type';
|
|
4
6
|
/**
|
|
5
7
|
* Generic interface for a data service that provides CRUD-like operations and transactional support.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"data-service.interface.d.ts","sourceRoot":"","sources":["../../../src/interfaces/services/data-service.interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;AAC7D,OAAO,
|
|
1
|
+
{"version":3,"file":"data-service.interface.d.ts","sourceRoot":"","sources":["../../../src/interfaces/services/data-service.interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;AAC7D,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACtD,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AACrC,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAC9C,OAAO,EAAE,KAAK,EAAE,MAAM,4BAA4B,CAAC;AAEnD;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,WAAW,WAAW,CAC1B,MAAM,SAAS,UAAU,CAAC,UAAU,CAAC,EACrC,UAAU,SAAS,MAAM,CAAC,OAAO,CAAC,EAClC,YAAY,SAAS,QAAQ,CAAC,UAAU,CAAC,GAAG,QAAQ,CAAC,UAAU,CAAC,EAChE,WAAW,SAAS,OAAO,GAAG,OAAO;IAErC,OAAO,CAAC,KAAK,SAAS,WAAW,GAAG,KAAK,EACvC,OAAO,EAAE,WAAW,EACpB,IAAI,CAAC,EAAE,YAAY,EACnB,cAAc,CAAC,EAAE,KAAK,GACrB,OAAO,CACR,EAAE,CACA,KAAK,EACL;QAAE,IAAI,EAAE,UAAU,EAAE,CAAC;QAAC,UAAU,EAAE,gBAAgB,CAAA;KAAE,EACpD,UAAU,EAAE,CACb,CACF,CAAC;IAEF,UAAU,CACR,OAAO,EAAE,WAAW,EACpB,IAAI,CAAC,EAAE,YAAY,GAClB,OAAO,CAAC,gBAAgB,CAAC,CAAC;IAE7B,OAAO,CAAC,KAAK,SAAS,WAAW,GAAG,KAAK,EACvC,OAAO,EAAE,WAAW,EACpB,EAAE,EAAE,MAAM,EACV,MAAM,CAAC,EAAE,KAAK,GACb,OAAO,CAAC,aAAa,CAAC,KAAK,EAAE,UAAU,CAAC,CAAC,CAAC;IAE7C,SAAS,CAAC,KAAK,SAAS,WAAW,GAAG,KAAK,EACzC,OAAO,EAAE,WAAW,EACpB,KAAK,EAAE,KAAK,CAAC,UAAU,CAAC,EACxB,MAAM,CAAC,EAAE,KAAK,GACb,OAAO,CAAC,aAAa,CAAC,KAAK,EAAE,UAAU,CAAC,CAAC,CAAC;IAE7C,gBAAgB,CAAC,UAAU,EACzB,OAAO,EAAE,WAAW,EACpB,EAAE,EAAE,CAAC,OAAO,EAAE,WAAW,KAAK,OAAO,CAAC,UAAU,CAAC,GAChD,OAAO,CAAC,UAAU,CAAC,CAAC;IAEvB,KAAK,CACH,OAAO,EAAE,WAAW,EACpB,MAAM,EAAE,MAAM,EACd,QAAQ,CAAC,EAAE,MAAM,EACjB,WAAW,CAAC,EAAE,MAAM,EACpB,UAAU,CAAC,EAAE,MAAM,GAClB,OAAO,CAAC,IAAI,CAAC,CAAC;CAClB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=common-services.index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"common-services.index.d.ts","sourceRoot":"","sources":["../../../src/interfaces/structures/common-services.index.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"common-services.index.js","sourceRoot":"","sources":["../../../src/interfaces/structures/common-services.index.ts"],"names":[],"mappings":""}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Constructable, DeepPartial } from '../../types';
|
|
2
|
-
import { Context, Entity,
|
|
2
|
+
import { Context, Entity, IdTypeFrom } from '../misc';
|
|
3
|
+
import { FindArgs } from '../inputs';
|
|
3
4
|
import { DataServiceFunctions, DataServiceStructure } from './data-service-structure.interface';
|
|
4
5
|
/**
|
|
5
6
|
* Configuration structure for individual CRUD service functions.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"crud-service-structure.interface.d.ts","sourceRoot":"","sources":["../../../src/interfaces/structures/crud-service-structure.interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AACzD,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,
|
|
1
|
+
{"version":3,"file":"crud-service-structure.interface.d.ts","sourceRoot":"","sources":["../../../src/interfaces/structures/crud-service-structure.interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AACzD,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACtD,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AACrC,OAAO,EACL,oBAAoB,EACpB,oBAAoB,EACrB,MAAM,oCAAoC,CAAC;AAE5C;;;;;GAKG;AACH,MAAM,WAAW,4BAA4B,CAAC,UAAU;IACtD,0DAA0D;IAC1D,UAAU,CAAC,EAAE,CAAC,MAAM,eAAe,CAAC,EAAE,CAAC;CACxC;AAED;;;;;GAKG;AACH,MAAM,WAAW,oBAAoB,CAAC,UAAU,CAC9C,SAAQ,oBAAoB,CAAC,UAAU,CAAC;IACxC,6CAA6C;IAC7C,MAAM,CAAC,EAAE,4BAA4B,CAAC,UAAU,CAAC,CAAC;IAClD,6CAA6C;IAC7C,MAAM,CAAC,EAAE,4BAA4B,CAAC,UAAU,CAAC,CAAC;IAClD,sEAAsE;IACtE,MAAM,CAAC,EAAE,4BAA4B,CAAC,UAAU,CAAC,CAAC;IAClD,yEAAyE;IACzE,UAAU,CAAC,EAAE,4BAA4B,CAAC,UAAU,CAAC,CAAC;IACtD,qEAAqE;IACrE,UAAU,CAAC,EAAE,4BAA4B,CAAC,UAAU,CAAC,CAAC;IACtD,8EAA8E;IAC9E,OAAO,CAAC,EAAE,4BAA4B,CAAC,UAAU,CAAC,CAAC;CACpD;AAED;;;;;;;;;;GAUG;AACH,MAAM,WAAW,oBAAoB,CACnC,MAAM,SAAS,UAAU,CAAC,UAAU,CAAC,EACrC,UAAU,SAAS,MAAM,CAAC,OAAO,CAAC,EAClC,eAAe,SAAS,WAAW,CAAC,UAAU,CAAC,EAC/C,eAAe,SAAS,WAAW,CAAC,UAAU,CAAC,EAC/C,YAAY,SAAS,QAAQ,CAAC,UAAU,CAAC,GAAG,QAAQ,CAAC,UAAU,CAAC,EAChE,WAAW,SAAS,OAAO,GAAG,OAAO,CACrC,SAAQ,oBAAoB,CAAC,MAAM,EAAE,UAAU,EAAE,YAAY,EAAE,WAAW,CAAC;IAC3E,4CAA4C;IAC5C,eAAe,EAAE,aAAa,CAAC,eAAe,CAAC,CAAC;IAChD,4CAA4C;IAC5C,eAAe,EAAE,aAAa,CAAC,eAAe,CAAC,CAAC;IAChD,wDAAwD;IACxD,SAAS,CAAC,EAAE,oBAAoB,CAAC,UAAU,CAAC,CAAC;CAC9C"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Constructable } from '../../types';
|
|
2
|
-
import { Context, Entity,
|
|
2
|
+
import { Context, Entity, IdTypeFrom } from '../misc';
|
|
3
|
+
import { FindArgs } from '../inputs';
|
|
3
4
|
import { EntityProviderStructure } from './entity-provider-structure.interface';
|
|
4
5
|
/**
|
|
5
6
|
* Configuration structure for individual data service functions.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"data-service-structure.interface.d.ts","sourceRoot":"","sources":["../../../src/interfaces/structures/data-service-structure.interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,
|
|
1
|
+
{"version":3,"file":"data-service-structure.interface.d.ts","sourceRoot":"","sources":["../../../src/interfaces/structures/data-service-structure.interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACtD,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AACrC,OAAO,EAAE,uBAAuB,EAAE,MAAM,uCAAuC,CAAC;AAEhF;;;;GAIG;AACH,MAAM,WAAW,4BAA4B,CAAC,UAAU;IACtD,0DAA0D;IAC1D,UAAU,CAAC,EAAE,CAAC,MAAM,eAAe,CAAC,EAAE,CAAC;CACxC;AAED;;;;;GAKG;AACH,MAAM,WAAW,oBAAoB,CAAC,UAAU;IAC9C,8CAA8C;IAC9C,OAAO,CAAC,EAAE,4BAA4B,CAAC,UAAU,CAAC,CAAC;IACnD,8CAA8C;IAC9C,OAAO,CAAC,EAAE,4BAA4B,CAAC,UAAU,CAAC,CAAC;IACnD,iDAAiD;IACjD,UAAU,CAAC,EAAE,4BAA4B,CAAC,UAAU,CAAC,CAAC;CACvD;AAED;;;;;;;;GAQG;AACH,MAAM,WAAW,oBAAoB,CACnC,MAAM,SAAS,UAAU,CAAC,UAAU,CAAC,EACrC,UAAU,SAAS,MAAM,CAAC,OAAO,CAAC,EAClC,YAAY,SAAS,QAAQ,CAAC,UAAU,CAAC,GAAG,QAAQ,CAAC,UAAU,CAAC,EAChE,WAAW,SAAS,OAAO,GAAG,OAAO,CACrC,SAAQ,uBAAuB,CAAC,MAAM,EAAE,UAAU,CAAC;IACnD,uDAAuD;IACvD,YAAY,CAAC,EAAE,aAAa,CAAC,YAAY,CAAC,CAAC;IAC3C,gDAAgD;IAChD,WAAW,CAAC,EAAE,aAAa,CAAC,WAAW,CAAC,CAAC;IACzC,wDAAwD;IACxD,SAAS,CAAC,EAAE,oBAAoB,CAAC,UAAU,CAAC,CAAC;CAC9C"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { PipeTransform, Type } from '@nestjs/common';
|
|
2
2
|
import { Constructable, DeepPartial } from '../../types';
|
|
3
|
-
import { Context, Entity,
|
|
3
|
+
import { Context, Entity, IdTypeFrom } from '../misc';
|
|
4
|
+
import { FindArgs } from '../inputs';
|
|
4
5
|
export interface IdStructure<IdType> {
|
|
5
6
|
type: Constructable<IdType>;
|
|
6
7
|
pipeTransforms?: Type<PipeTransform>[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"entity-provider-structure.interface.d.ts","sourceRoot":"","sources":["../../../src/interfaces/structures/entity-provider-structure.interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AAErD,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AACzD,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,
|
|
1
|
+
{"version":3,"file":"entity-provider-structure.interface.d.ts","sourceRoot":"","sources":["../../../src/interfaces/structures/entity-provider-structure.interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AAErD,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AACzD,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACtD,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAErC,MAAM,WAAW,WAAW,CAAC,MAAM;IACjC,IAAI,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;IAC5B,cAAc,CAAC,EAAE,IAAI,CAAC,aAAa,CAAC,EAAE,CAAC;CACxC;AAED,MAAM,WAAW,uBAAuB,CACtC,MAAM,SAAS,UAAU,CAAC,UAAU,CAAC,EACrC,UAAU,SAAS,MAAM,CAAC,OAAO,CAAC;IAElC,UAAU,EAAE,aAAa,CAAC,UAAU,CAAC,CAAC;IACtC,QAAQ,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;CAChC;AAED,wBAAgB,YAAY,CAC1B,MAAM,SAAS,UAAU,CAAC,UAAU,CAAC,EACrC,UAAU,SAAS,MAAM,CAAC,OAAO,CAAC,EAClC,cAAc,EAAE,uBA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AC,MAAM,EAAE,UAAU,EAAE,YAAY,EAAE,WAAW,CAAC,CAEtE;AAED,wBAAgB,qBAAqB,CACnC,MAAM,SAAS,UAAU,CAAC,UAAU,CAAC,EACrC,UAAU,SAAS,MAAM,CAAC,OAAO,CAAC,EAClC,eAAe,SAAS,WAAW,CAAC,UAAU,CAAC,EAC/C,eAAe,SAAS,WAAW,CAAC,UAAU,CAAC,EAC/C,YAAY,SAAS,QAAQ,CAAC,UAAU,CAAC,GAAG,QAAQ,CAAC,UAAU,CAAC,EAChE,WAAW,SAAS,OAAO,GAAG,OAAO,EAErC,KAAK,EAAE,qBAAqB,CAC1B,MAAM,EACN,UAAU,EACV,eAAe,EACf,eAAe,EACf,YAAY,EACZ,WAAW,CACZ,GACA,qBAAqB,CACtB,MAAM,EACN,UAAU,EACV,eAAe,EACf,eAAe,EACf,YAAY,EACZ,WAAW,CACZ,CAEA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"entity-provider-structure.interface.js","sourceRoot":"","sources":["../../../src/interfaces/structures/entity-provider-structure.interface.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"entity-provider-structure.interface.js","sourceRoot":"","sources":["../../../src/interfaces/structures/entity-provider-structure.interface.ts"],"names":[],"mappings":";;AAmBA,oCAaC;AAwBD,sDASC;AAED,sDAyBC;AA3FD,2CAAyE;AAkBzE,SAAgB,YAAY,CAG1B,cAA2D;IAC3D,IAAI,cAAc,CAAC,QAAQ;QAAE,OAAO;IAEpC,MAAM,MAAM,GAAG,IAAA,yBAAe,EAAC,cAAc,CAAC,UAAU,EAAE,IAAI,CAAC,CAAC;IAChE,MAAM,eAAe,GAAG,IAAA,iCAAuB,EAAC,MAAM,CAAC,CAAC;IAExD,cAAc,CAAC,QAAQ,GAAG;QACxB,IAAI,EAAE,MAAM;QACZ,cAAc,EAAE,eAAe,CAAC,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,EAAE;KACzD,CAAC;AACJ,CAAC;AAwBD,SAAgB,qBAAqB,CAMnC,KAA2E;IAE3E,OAAO,KAAK,CAAC;AACf,CAAC;AAED,SAAgB,qBAAqB,CAQnC,KAOC;IASD,OAAO,KAAK,CAAC;AACf,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Type } from '@nestjs/common';
|
|
2
2
|
import { Constructable, DeepPartial, UnionToIntersection } from '../../types';
|
|
3
|
-
import { Context, Entity,
|
|
3
|
+
import { Context, Entity, IdTypeFrom } from '../misc';
|
|
4
|
+
import { FindArgs } from '../inputs';
|
|
4
5
|
import { DataService, CrudService } from '../services';
|
|
5
6
|
import { CrudServiceStructure } from './crud-service-structure.interface';
|
|
6
7
|
import { DataServiceStructure } from './data-service-structure.interface';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"service-plugins.interface.d.ts","sourceRoot":"","sources":["../../../src/interfaces/structures/service-plugins.interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AACtC,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAC9E,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,
|
|
1
|
+
{"version":3,"file":"service-plugins.interface.d.ts","sourceRoot":"","sources":["../../../src/interfaces/structures/service-plugins.interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AACtC,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAC9E,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACtD,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AACrC,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AACvD,OAAO,EAAE,oBAAoB,EAAE,MAAM,oCAAoC,CAAC;AAC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,EACH,GAAG,EACH,GAAG,EACH,GAAG,EACH,GAAG,EACH,MAAM,QAAQ,EACd,GAAG,EACH,GAAG,CACJ,GACG,QAAQ,GACR,KAAK,CACV,CAAC;AAEF;;;;;;;;;;;;;;GAcG;AACH,MAAM,MAAM,oCAAoC,CAC9C,sBAAsB,SAAS,SAAS,aAAa,CACnD,GAAG,EACH,GAAG,EACH,GAAG,EACH,GAAG,EACH,GAAG,EACH,GAAG,EACH,GAAG,EACH,GAAG,EACH,GAAG,EACH,GAAG,CACJ,EAAE,IACD,wCAAwC,CAAC,sBAAsB,CAAC,GAClE,wCAAwC,CAAC,sBAAsB,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/metadata/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./metadata-storage"), exports);
|
|
18
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/metadata/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,qDAAmC"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { FieldMetadata, EntityMetadata } from '../interfaces';
|
|
2
|
+
export declare class MetadataStorage {
|
|
3
|
+
private static fieldMetadata;
|
|
4
|
+
private static entityMetadata;
|
|
5
|
+
/**
|
|
6
|
+
* Adds field metadata for a specific class property
|
|
7
|
+
*/
|
|
8
|
+
static addFieldMetadata(metadata: FieldMetadata): void;
|
|
9
|
+
/**
|
|
10
|
+
* Gets field metadata for a class or specific property
|
|
11
|
+
*/
|
|
12
|
+
static getFieldMetadata(target: Function, propertyKey?: string | symbol): FieldMetadata[];
|
|
13
|
+
/**
|
|
14
|
+
* Gets all field metadata for a class including inherited fields
|
|
15
|
+
*/
|
|
16
|
+
static getAllFieldMetadata(target: Function): FieldMetadata[];
|
|
17
|
+
/**
|
|
18
|
+
* Adds entity metadata for a class
|
|
19
|
+
*/
|
|
20
|
+
static addEntityMetadata(metadata: EntityMetadata): void;
|
|
21
|
+
/**
|
|
22
|
+
* Gets entity metadata for a class
|
|
23
|
+
*/
|
|
24
|
+
static getEntityMetadata(target: Function): EntityMetadata | undefined;
|
|
25
|
+
/**
|
|
26
|
+
* Gets all entity metadata
|
|
27
|
+
*/
|
|
28
|
+
static getAllEntityMetadata(): EntityMetadata[];
|
|
29
|
+
/**
|
|
30
|
+
* Checks if a class has field metadata
|
|
31
|
+
*/
|
|
32
|
+
static hasFieldMetadata(target: Function): boolean;
|
|
33
|
+
/**
|
|
34
|
+
* Checks if a class has entity metadata
|
|
35
|
+
*/
|
|
36
|
+
static hasEntityMetadata(target: Function): boolean;
|
|
37
|
+
/**
|
|
38
|
+
* Removes all metadata for a specific class
|
|
39
|
+
*/
|
|
40
|
+
static removeMetadata(target: Function): void;
|
|
41
|
+
/**
|
|
42
|
+
* Clears all metadata (useful for testing)
|
|
43
|
+
*/
|
|
44
|
+
static clearMetadata(): void;
|
|
45
|
+
/**
|
|
46
|
+
* Gets statistics about stored metadata
|
|
47
|
+
*/
|
|
48
|
+
static getStats(): {
|
|
49
|
+
totalClasses: number;
|
|
50
|
+
totalFields: number;
|
|
51
|
+
totalEntities: number;
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
//# sourceMappingURL=metadata-storage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"metadata-storage.d.ts","sourceRoot":"","sources":["../../src/metadata/metadata-storage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAE9D,qBAAa,eAAe;IAC1B,OAAO,CAAC,MAAM,CAAC,aAAa,CAA4D;IACxF,OAAO,CAAC,MAAM,CAAC,cAAc,CAAuC;IAEpE;;OAEG;IACH,MAAM,CAAC,gBAAgB,CAAC,QAAQ,EAAE,aAAa,GAAG,IAAI;IAStD;;OAEG;IACH,MAAM,CAAC,gBAAgB,CACrB,MAAM,EAAE,QAAQ,EAChB,WAAW,CAAC,EAAE,MAAM,GAAG,MAAM,GAC5B,aAAa,EAAE;IAclB;;OAEG;IACH,MAAM,CAAC,mBAAmB,CAAC,MAAM,EAAE,QAAQ,GAAG,aAAa,EAAE;IAc7D;;OAEG;IACH,MAAM,CAAC,iBAAiB,CAAC,QAAQ,EAAE,cAAc,GAAG,IAAI;IAIxD;;OAEG;IACH,MAAM,CAAC,iBAAiB,CAAC,MAAM,EAAE,QAAQ,GAAG,cAAc,GAAG,SAAS;IAItE;;OAEG;IACH,MAAM,CAAC,oBAAoB,IAAI,cAAc,EAAE;IAI/C;;OAEG;IACH,MAAM,CAAC,gBAAgB,CAAC,MAAM,EAAE,QAAQ,GAAG,OAAO;IAIlD;;OAEG;IACH,MAAM,CAAC,iBAAiB,CAAC,MAAM,EAAE,QAAQ,GAAG,OAAO;IAInD;;OAEG;IACH,MAAM,CAAC,cAAc,CAAC,MAAM,EAAE,QAAQ,GAAG,IAAI;IAK7C;;OAEG;IACH,MAAM,CAAC,aAAa,IAAI,IAAI;IAK5B;;OAEG;IACH,MAAM,CAAC,QAAQ,IAAI;QACjB,YAAY,EAAE,MAAM,CAAC;QACrB,WAAW,EAAE,MAAM,CAAC;QACpB,aAAa,EAAE,MAAM,CAAC;KACvB;CAYF"}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MetadataStorage = void 0;
|
|
4
|
+
class MetadataStorage {
|
|
5
|
+
/**
|
|
6
|
+
* Adds field metadata for a specific class property
|
|
7
|
+
*/
|
|
8
|
+
static addFieldMetadata(metadata) {
|
|
9
|
+
let classMetadata = this.fieldMetadata.get(metadata.target);
|
|
10
|
+
if (!classMetadata) {
|
|
11
|
+
classMetadata = new Map();
|
|
12
|
+
this.fieldMetadata.set(metadata.target, classMetadata);
|
|
13
|
+
}
|
|
14
|
+
classMetadata.set(metadata.propertyKey, metadata);
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Gets field metadata for a class or specific property
|
|
18
|
+
*/
|
|
19
|
+
static getFieldMetadata(target, propertyKey) {
|
|
20
|
+
const classMetadata = this.fieldMetadata.get(target);
|
|
21
|
+
if (!classMetadata) {
|
|
22
|
+
return [];
|
|
23
|
+
}
|
|
24
|
+
if (propertyKey !== undefined) {
|
|
25
|
+
const fieldMetadata = classMetadata.get(propertyKey);
|
|
26
|
+
return fieldMetadata ? [fieldMetadata] : [];
|
|
27
|
+
}
|
|
28
|
+
return Array.from(classMetadata.values());
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Gets all field metadata for a class including inherited fields
|
|
32
|
+
*/
|
|
33
|
+
static getAllFieldMetadata(target) {
|
|
34
|
+
const allMetadata = [];
|
|
35
|
+
let currentTarget = target;
|
|
36
|
+
// Walk up the prototype chain to collect metadata from parent classes
|
|
37
|
+
while (currentTarget && currentTarget !== Object) {
|
|
38
|
+
const metadata = this.getFieldMetadata(currentTarget);
|
|
39
|
+
allMetadata.push(...metadata);
|
|
40
|
+
currentTarget = Object.getPrototypeOf(currentTarget);
|
|
41
|
+
}
|
|
42
|
+
return allMetadata;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Adds entity metadata for a class
|
|
46
|
+
*/
|
|
47
|
+
static addEntityMetadata(metadata) {
|
|
48
|
+
this.entityMetadata.set(metadata.target, metadata);
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Gets entity metadata for a class
|
|
52
|
+
*/
|
|
53
|
+
static getEntityMetadata(target) {
|
|
54
|
+
return this.entityMetadata.get(target);
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Gets all entity metadata
|
|
58
|
+
*/
|
|
59
|
+
static getAllEntityMetadata() {
|
|
60
|
+
return Array.from(this.entityMetadata.values());
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Checks if a class has field metadata
|
|
64
|
+
*/
|
|
65
|
+
static hasFieldMetadata(target) {
|
|
66
|
+
return this.fieldMetadata.has(target);
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Checks if a class has entity metadata
|
|
70
|
+
*/
|
|
71
|
+
static hasEntityMetadata(target) {
|
|
72
|
+
return this.entityMetadata.has(target);
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Removes all metadata for a specific class
|
|
76
|
+
*/
|
|
77
|
+
static removeMetadata(target) {
|
|
78
|
+
this.fieldMetadata.delete(target);
|
|
79
|
+
this.entityMetadata.delete(target);
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Clears all metadata (useful for testing)
|
|
83
|
+
*/
|
|
84
|
+
static clearMetadata() {
|
|
85
|
+
this.fieldMetadata.clear();
|
|
86
|
+
this.entityMetadata.clear();
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* Gets statistics about stored metadata
|
|
90
|
+
*/
|
|
91
|
+
static getStats() {
|
|
92
|
+
let totalFields = 0;
|
|
93
|
+
this.fieldMetadata.forEach(classMetadata => {
|
|
94
|
+
totalFields += classMetadata.size;
|
|
95
|
+
});
|
|
96
|
+
return {
|
|
97
|
+
totalClasses: this.fieldMetadata.size,
|
|
98
|
+
totalFields,
|
|
99
|
+
totalEntities: this.entityMetadata.size,
|
|
100
|
+
};
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
exports.MetadataStorage = MetadataStorage;
|
|
104
|
+
MetadataStorage.fieldMetadata = new Map();
|
|
105
|
+
MetadataStorage.entityMetadata = new Map();
|
|
106
|
+
//# sourceMappingURL=metadata-storage.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"metadata-storage.js","sourceRoot":"","sources":["../../src/metadata/metadata-storage.ts"],"names":[],"mappings":";;;AAEA,MAAa,eAAe;IAI1B;;OAEG;IACH,MAAM,CAAC,gBAAgB,CAAC,QAAuB;QAC7C,IAAI,aAAa,GAAG,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;QAC5D,IAAI,CAAC,aAAa,EAAE,CAAC;YACnB,aAAa,GAAG,IAAI,GAAG,EAAE,CAAC;YAC1B,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,QAAQ,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;QACzD,CAAC;QACD,aAAa,CAAC,GAAG,CAAC,QAAQ,CAAC,WAAW,EAAE,QAAQ,CAAC,CAAC;IACpD,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,gBAAgB,CACrB,MAAgB,EAChB,WAA6B;QAE7B,MAAM,aAAa,GAAG,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;QACrD,IAAI,CAAC,aAAa,EAAE,CAAC;YACnB,OAAO,EAAE,CAAC;QACZ,CAAC;QAED,IAAI,WAAW,K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C,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,iBAAiB,CAAC,MAAgB;QACvC,OAAO,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACzC,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,cAAc,CAAC,MAAgB;QACpC,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;QAClC,IAAI,CAAC,cAAc,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IACrC,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,aAAa;QAClB,IAAI,CAAC,aAAa,CAAC,KAAK,EAAE,CAAC;QAC3B,IAAI,CAAC,cAAc,CAAC,KAAK,EAAE,CAAC;IAC9B,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,QAAQ;QAKb,IAAI,WAAW,GAAG,CAAC,CAAC;QACpB,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,aAAa,CAAC,EAAE;YACzC,WAAW,IAAI,aAAa,CAAC,IAAI,CAAC;QACpC,CAAC,CAAC,CAAC;QAEH,OAAO;YACL,YAAY,EAAE,IAAI,CAAC,aAAa,CAAC,IAAI;YACrC,WAAW;YACX,aAAa,EAAE,IAAI,CAAC,cAAc,CAAC,IAAI;SACxC,CAAC;IACJ,CAAC;;AA1HH,0CA2HC;AA1HgB,6BAAa,GAAG,IAAI,GAAG,EAAiD,CAAC;AACzE,8BAAc,GAAG,IAAI,GAAG,EAA4B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/registry/index.ts"],"names":[],"mappings":"AAAA,cAAc,6BAA6B,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./relation-adapter-registry"), exports);
|
|
18
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/registry/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8DAA4C"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export interface RelationAdapterHelper {
|
|
2
|
+
getRelationAdapterOptions(type: string, targetFn: () => Function, inverseSide: any, options: any): any;
|
|
3
|
+
}
|
|
4
|
+
export declare class RelationAdapterRegistry {
|
|
5
|
+
private static adapters;
|
|
6
|
+
static registerAdapter(name: string, adapter: RelationAdapterHelper): void;
|
|
7
|
+
static getAdapterOptions(name: string, type: string, targetFn: () => Function, inverseSide: any, options: any): any;
|
|
8
|
+
static getRegisteredAdapters(): string[];
|
|
9
|
+
static hasAdapter(name: string): boolean;
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=relation-adapter-registry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"relation-adapter-registry.d.ts","sourceRoot":"","sources":["../../src/registry/relation-adapter-registry.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,qBAAqB;IACpC,yBAAyB,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,QAAQ,EAAE,WAAW,EAAE,GAAG,EAAE,OAAO,EAAE,GAAG,GAAG,GAAG,CAAC;CACxG;AAED,qBAAa,uBAAuB;IAClC,OAAO,CAAC,MAAM,CAAC,QAAQ,CAA4C;IAEnE,MAAM,CAAC,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,qBAAqB,GAAG,IAAI;IAI1E,MAAM,CAAC,iBAAiB,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,QAAQ,EAAE,WAAW,EAAE,GAAG,EAAE,OAAO,EAAE,GAAG,GAAG,GAAG;IAcnH,MAAM,CAAC,qBAAqB,IAAI,MAAM,EAAE;IAIxC,MAAM,CAAC,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO;CAGzC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RelationAdapterRegistry = void 0;
|
|
4
|
+
class RelationAdapterRegistry {
|
|
5
|
+
static registerAdapter(name, adapter) {
|
|
6
|
+
this.adapters.set(name, adapter);
|
|
7
|
+
}
|
|
8
|
+
static getAdapterOptions(name, type, targetFn, inverseSide, options) {
|
|
9
|
+
const adapter = this.adapters.get(name);
|
|
10
|
+
if (!adapter) {
|
|
11
|
+
return {};
|
|
12
|
+
}
|
|
13
|
+
try {
|
|
14
|
+
return adapter.getRelationAdapterOptions(type, targetFn, inverseSide, options);
|
|
15
|
+
}
|
|
16
|
+
catch (error) {
|
|
17
|
+
console.warn(`[SolidNestJS] Failed to get adapter options for ${name}:`, error);
|
|
18
|
+
return {};
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
static getRegisteredAdapters() {
|
|
22
|
+
return Array.from(this.adapters.keys());
|
|
23
|
+
}
|
|
24
|
+
static hasAdapter(name) {
|
|
25
|
+
return this.adapters.has(name);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
exports.RelationAdapterRegistry = RelationAdapterRegistry;
|
|
29
|
+
RelationAdapterRegistry.adapters = new Map();
|
|
30
|
+
//# sourceMappingURL=relation-adapter-registry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"relation-adapter-registry.js","sourceRoot":"","sources":["../../src/registry/relation-adapter-registry.ts"],"names":[],"mappings":";;;AAIA,MAAa,uBAAuB;IAGlC,MAAM,CAAC,eAAe,CAAC,IAAY,EAAE,OAA8B;QACjE,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IACnC,CAAC;IAED,MAAM,CAAC,iBAAiB,CAAC,IAAY,EAAE,IAAY,EAAE,QAAwB,EAAE,WAAgB,EAAE,OAAY;QAC3G,MAAM,OAAO,GAAG,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QACxC,IAAI,CAAC,OAAO,EAAE,CAAC;YACb,OAAO,EAAE,CAAC;QACZ,CAAC;QAED,IAAI,CAAC;YACH,OAAO,OAAO,CAAC,yBAAyB,CAAC,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,OAAO,CAAC,CAAC;QACjF,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO,CAAC,IAAI,CAAC,mDAAmD,IAAI,GAAG,EAAE,KAAK,CAAC,CAAC;YAChF,OAAO,EAAE,CAAC;QACZ,CAAC;IACH,CAAC;IAED,MAAM,CAAC,qBAAqB;QAC1B,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC,CAAC;IAC1C,CAAC;IAED,MAAM,CAAC,UAAU,CAAC,IAAY;QAC5B,OAAO,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IACjC,CAAC;;AA3BH,0DA4BC;AA3BgB,gCAAQ,GAAG,IAAI,GAAG,EAAiC,CAAC"}
|