@tsed/json-mapper 7.46.0 → 7.47.1
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/lib/browser/json-mapper.umd.min.js +1 -1
- package/lib/browser/json-mapper.umd.min.js.map +1 -1
- package/lib/cjs/domain/JsonMapperCompiler.js +8 -8
- package/lib/cjs/domain/JsonMapperCompiler.js.map +1 -1
- package/lib/cjs/domain/JsonSerializer.js +33 -5
- package/lib/cjs/domain/JsonSerializer.js.map +1 -1
- package/lib/esm/domain/JsonMapperCompiler.js +9 -9
- package/lib/esm/domain/JsonMapperCompiler.js.map +1 -1
- package/lib/esm/domain/JsonSerializer.js +33 -5
- package/lib/esm/domain/JsonSerializer.js.map +1 -1
- package/lib/tsconfig.esm.tsbuildinfo +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/lib/types/domain/JsonMapperCompiler.d.ts +5 -3
- package/lib/types/domain/JsonSerializer.d.ts +2 -1
- package/package.json +5 -5
|
@@ -38,13 +38,15 @@ export declare abstract class JsonMapperCompiler<Options extends Record<string,
|
|
|
38
38
|
addGlobal(key: string, value: any): this;
|
|
39
39
|
eval(mapper: string, { id, groupsId, model }: {
|
|
40
40
|
id: string;
|
|
41
|
-
model: Type<any
|
|
41
|
+
model: Type<any> | string;
|
|
42
42
|
groupsId: string;
|
|
43
43
|
}): CachedJsonMapper<Options>;
|
|
44
44
|
createContext(options: Options): Options & {
|
|
45
45
|
cache: Map<string | Type<any>, CachedGroupsJsonMapper<Options>>;
|
|
46
46
|
};
|
|
47
|
-
compile(model: Type<any
|
|
47
|
+
compile(model: Type<any> | string, groups: false | string[], opts?: {
|
|
48
|
+
mapper?: any;
|
|
49
|
+
}): CachedJsonMapper<Options>;
|
|
48
50
|
protected execMapper(id: string, value: any, options: Options): any;
|
|
49
51
|
protected abstract map(input: any, options: Options): any;
|
|
50
52
|
protected abstract alterValue(schemaId: string, value: any, options: Options): any;
|
|
@@ -53,6 +55,6 @@ export declare abstract class JsonMapperCompiler<Options extends Record<string,
|
|
|
53
55
|
protected alterIgnore(id: string, options: Options): any;
|
|
54
56
|
protected alterGroups(schema: JsonSchema, groups: false | string[]): boolean;
|
|
55
57
|
protected getGroupsId(groups: false | string[]): string;
|
|
56
|
-
protected getId(model: Type<any
|
|
58
|
+
protected getId(model: Type<any> | string, groupsId: string): string;
|
|
57
59
|
protected getSchemaId(id: string, propertyKey: string): string;
|
|
58
60
|
}
|
|
@@ -9,8 +9,9 @@ export declare class JsonSerializer extends JsonMapperCompiler<JsonSerializerOpt
|
|
|
9
9
|
private mapOptions;
|
|
10
10
|
private mapProperty;
|
|
11
11
|
private getPropertyFiller;
|
|
12
|
+
private createDiscriminatorMapper;
|
|
12
13
|
private mapPrecondition;
|
|
13
|
-
private
|
|
14
|
+
private mapDiscriminatorKeyValue;
|
|
14
15
|
private mapAdditionalProperties;
|
|
15
16
|
private mapObject;
|
|
16
17
|
private mapSet;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tsed/json-mapper",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.47.1",
|
|
4
4
|
"description": "Json mapper module for Ts.ED Framework",
|
|
5
5
|
"private": false,
|
|
6
6
|
"source": "./src/index.ts",
|
|
@@ -41,15 +41,15 @@
|
|
|
41
41
|
"tslib": "2.5.0"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
|
-
"@tsed/core": "7.
|
|
44
|
+
"@tsed/core": "7.47.1",
|
|
45
45
|
"@tsed/eslint": "7.44.1",
|
|
46
|
-
"@tsed/schema": "7.
|
|
46
|
+
"@tsed/schema": "7.47.1",
|
|
47
47
|
"@tsed/typescript": "7.44.1",
|
|
48
48
|
"eslint": "^8.12.0"
|
|
49
49
|
},
|
|
50
50
|
"peerDependencies": {
|
|
51
|
-
"@tsed/core": "^7.
|
|
52
|
-
"@tsed/schema": "^7.
|
|
51
|
+
"@tsed/core": "^7.47.1",
|
|
52
|
+
"@tsed/schema": "^7.47.1"
|
|
53
53
|
},
|
|
54
54
|
"peerDependenciesMeta": {
|
|
55
55
|
"@tsed/core": {
|