@dchighs/dc-config-mapper 0.2.1 → 0.2.2
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.
|
@@ -14,10 +14,12 @@ class TowerIslandsMapper {
|
|
|
14
14
|
islands: data.islands.map(island => {
|
|
15
15
|
const squareIds = data.squares.filter(square => square.island_id === island.id).map(square => square.id);
|
|
16
16
|
const floorIds = data.floors.filter(floor => floor.island_id === island.id).map(floor => floor.id);
|
|
17
|
+
const rewardIds = data.rewards.filter(reward => reward.island_id === island.id).map(reward => reward.id);
|
|
17
18
|
return this.localization.translate(island_schema_1.towerIslandSchema.parse({
|
|
18
19
|
...island,
|
|
19
20
|
square_ids: squareIds,
|
|
20
|
-
floor_ids: floorIds
|
|
21
|
+
floor_ids: floorIds,
|
|
22
|
+
reward_ids: rewardIds,
|
|
21
23
|
}));
|
|
22
24
|
}),
|
|
23
25
|
floors: data.floors.map(floor => this.localization.translate(floor_schema_1.towerIslandsFloorSchema.parse(floor))),
|
|
@@ -36,6 +36,7 @@ export declare const towerIslandSchema: z.ZodPipe<z.ZodObject<{
|
|
|
36
36
|
}, z.core.$strip>;
|
|
37
37
|
square_ids: z.ZodArray<z.ZodNumber>;
|
|
38
38
|
floor_ids: z.ZodArray<z.ZodNumber>;
|
|
39
|
+
reward_ids: z.ZodArray<z.ZodNumber>;
|
|
39
40
|
}, z.core.$strict>, z.ZodTransform<{
|
|
40
41
|
id: number;
|
|
41
42
|
name_key: string;
|
|
@@ -58,6 +59,7 @@ export declare const towerIslandSchema: z.ZodPipe<z.ZodObject<{
|
|
|
58
59
|
help_view_id: number;
|
|
59
60
|
square_ids: number[];
|
|
60
61
|
floor_ids: number[];
|
|
62
|
+
reward_ids: number[];
|
|
61
63
|
}, {
|
|
62
64
|
id: number;
|
|
63
65
|
analytics_id: string;
|
|
@@ -95,4 +97,5 @@ export declare const towerIslandSchema: z.ZodPipe<z.ZodObject<{
|
|
|
95
97
|
};
|
|
96
98
|
square_ids: number[];
|
|
97
99
|
floor_ids: number[];
|
|
100
|
+
reward_ids: number[];
|
|
98
101
|
}>>;
|
|
@@ -44,6 +44,7 @@ exports.towerIslandSchema = zod_1.z.object({
|
|
|
44
44
|
// injected properties
|
|
45
45
|
square_ids: zod_1.z.array(zod_1.z.number()),
|
|
46
46
|
floor_ids: zod_1.z.array(zod_1.z.number()),
|
|
47
|
+
reward_ids: zod_1.z.array(zod_1.z.number()),
|
|
47
48
|
}).strict().transform(data => {
|
|
48
49
|
return {
|
|
49
50
|
id: data.id,
|
|
@@ -67,5 +68,6 @@ exports.towerIslandSchema = zod_1.z.object({
|
|
|
67
68
|
help_view_id: data.help_view_id,
|
|
68
69
|
square_ids: data.square_ids,
|
|
69
70
|
floor_ids: data.floor_ids,
|
|
71
|
+
reward_ids: data.reward_ids,
|
|
70
72
|
};
|
|
71
73
|
});
|
package/package.json
CHANGED