@dchighs/dc-config 0.0.9 → 0.1.0

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/LICENSE CHANGED
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2025 Marcuth
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Marcuth
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
21
  SOFTWARE.
package/README.md CHANGED
@@ -10,13 +10,12 @@ Installation is straightforward—simply use your preferred package manager. Her
10
10
 
11
11
  ```cmd
12
12
  npm i @dchighs/dc-config
13
-
14
13
  ```
15
14
 
16
15
  ## 🚀 Usage
17
16
 
18
17
  <a href="https://www.buymeacoffee.com/marcuth">
19
-   <img src="https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png" alt="Buy Me A Coffee" width="200">
18
+ <img src="https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png" alt="Buy Me A Coffee" width="200">
20
19
  </a>
21
20
 
22
21
  ### Fetching configuration for specific parameters
@@ -27,24 +26,23 @@ To create a `Config` instance, you need to provide credentials or use the static
27
26
  import { Config, ConfigLanguage, ConfigPlatform, ConfigFilter } from "@dchighs/dc-config"
28
27
 
29
28
  ;(async () => {
30
- const userId = process.env.USER_ID
31
- const authToken = process.env.AUTH_TOKEN
32
- const url = process.env.URL
33
-
34
- const config = await Config.create({
35
- url: url,
36
- userId: userId,
37
- authToken: authToken,
38
- language: ConfigLanguage.Turkish, // optional - "en" is default
39
- platform: ConfigPlatform.Android, // optional - "ios" is default
40
- filter: [ConfigFilter.Items] // optional - undefined is default
41
- })
42
-
43
- const data = config.data
44
-
45
- console.log(data)
29
+ const userId = process.env.USER_ID
30
+ const authToken = process.env.AUTH_TOKEN
31
+ const url = process.env.URL
32
+
33
+ const config = await Config.create({
34
+ url: url,
35
+ userId: userId,
36
+ authToken: authToken,
37
+ language: ConfigLanguage.Turkish, // optional - "en" is default
38
+ platform: ConfigPlatform.Android, // optional - "ios" is default
39
+ filter: [ConfigFilter.Items] // optional - undefined is default
40
+ })
41
+
42
+ const data = config.data
43
+
44
+ console.log(data)
46
45
  })();
47
-
48
46
  ```
49
47
 
50
48
  ---
@@ -58,17 +56,43 @@ import { Config, ConfigLanguage, ConfigPlatform, GameConfigDto } from "@dchighs/
58
56
  import fs from "node:fs"
59
57
 
60
58
  ;(async () => {
61
- const filePath = "config.json"
62
- const contentString = await fs.promises.readFile(filePath, { encoding: "utf-8" })
63
- const data = JSON.parse(contentString) as GameConfigDto
64
-
65
- const config = new Config({
66
- language: ConfigLanguage.Turkish,
67
- platform: ConfigPlatform.Android,
68
- data: data
69
- })
59
+ const filePath = "config.json"
60
+ const contentString = await fs.promises.readFile(filePath, { encoding: "utf-8" })
61
+ const data = JSON.parse(contentString) as GameConfigDto
62
+
63
+ const config = new Config({
64
+ language: ConfigLanguage.Turkish,
65
+ platform: ConfigPlatform.Android,
66
+ data: data
67
+ })
70
68
  })();
69
+ ```
70
+
71
+ ---
72
+
73
+ ### Fetching a raw configuration from a URL
71
74
 
75
+ If you have a full raw JSON file and want to fetch it and filter specific keys:
76
+
77
+ ```ts
78
+ import { Config, ConfigFilter, ConfigLanguage } from "@dchighs/dc-config"
79
+
80
+ ;(async () => {
81
+ const rawUrl = "https://example.com/config.json"
82
+
83
+ // Using createRaw to get a Config instance
84
+ const config = await Config.createRaw({
85
+ url: rawUrl,
86
+ filter: [ConfigFilter.Items],
87
+ language: ConfigLanguage.English
88
+ })
89
+
90
+ // Or using fetchRaw to get just the data (GameConfigDto)
91
+ const data = await Config.fetchRaw({
92
+ url: rawUrl,
93
+ filter: [ConfigFilter.Items]
94
+ })
95
+ })();
72
96
  ```
73
97
 
74
98
  ---
@@ -13,13 +13,34 @@ export type CreateOptions = Omit<Omit<ConfigOptions, "platform" | "language"> &
13
13
  language?: ConfigLanguage | `${ConfigLanguage}`;
14
14
  platform?: ConfigPlatform | `${ConfigPlatform}`;
15
15
  }, "data">;
16
+ export type CreateRawOptions = {
17
+ url: string;
18
+ filter?: Array<ConfigFilter | `${ConfigFilter}`>;
19
+ language?: ConfigLanguage | `${ConfigLanguage}`;
20
+ platform?: ConfigPlatform | `${ConfigPlatform}`;
21
+ };
16
22
  export type FetchOptions = CreateOptions;
23
+ export type FetchRawOptions = Pick<CreateRawOptions, "url" | "filter">;
17
24
  export declare class Config {
18
25
  readonly platform: ConfigPlatform;
19
26
  readonly langauge: ConfigLanguage;
20
27
  readonly filter?: ConfigFilter[];
21
28
  readonly data: GameConfigDto;
22
29
  constructor({ data, language, platform, filter }: ConfigOptions);
30
+ /**
31
+ * Creates a new Config instance by fetching data from the API with authentication.
32
+ */
23
33
  static create({ authToken, userId, filter, language, platform, url }: CreateOptions): Promise<Config>;
34
+ /**
35
+ * Creates a new Config instance by fetching a raw JSON file from a URL.
36
+ */
37
+ static createRaw({ url, filter, language, platform }: CreateRawOptions): Promise<Config>;
38
+ /**
39
+ * Fetches configuration from the API with authentication.
40
+ */
24
41
  static fetch({ authToken, userId, filter, language, platform, url }: FetchOptions): Promise<GameConfigDto>;
42
+ /**
43
+ * Fetches a raw config file from a URL and filters its contents.
44
+ */
45
+ static fetchRaw({ url, filter }: FetchRawOptions): Promise<GameConfigDto>;
25
46
  }
package/dist/dc-config.js CHANGED
@@ -13,6 +13,9 @@ class Config {
13
13
  this.platform = platform;
14
14
  this.filter = filter ? filter : undefined;
15
15
  }
16
+ /**
17
+ * Creates a new Config instance by fetching data from the API with authentication.
18
+ */
16
19
  static async create({ authToken, userId, filter, language, platform, url }) {
17
20
  const data = await Config.fetch({
18
21
  authToken: authToken,
@@ -29,6 +32,21 @@ class Config {
29
32
  platform: platform !== null && platform !== void 0 ? platform : enums_1.ConfigPlatform.Default
30
33
  });
31
34
  }
35
+ /**
36
+ * Creates a new Config instance by fetching a raw JSON file from a URL.
37
+ */
38
+ static async createRaw({ url, filter, language, platform }) {
39
+ const data = await Config.fetchRaw({ url, filter });
40
+ return new Config({
41
+ data: data,
42
+ filter: filter,
43
+ language: language !== null && language !== void 0 ? language : enums_1.ConfigLanguage.Default,
44
+ platform: platform !== null && platform !== void 0 ? platform : enums_1.ConfigPlatform.Default
45
+ });
46
+ }
47
+ /**
48
+ * Fetches configuration from the API with authentication.
49
+ */
32
50
  static async fetch({ authToken, userId, filter, language, platform, url }) {
33
51
  const response = await axios_1.default.post(url, null, {
34
52
  params: {
@@ -42,5 +60,32 @@ class Config {
42
60
  const data = response.data;
43
61
  return data;
44
62
  }
63
+ /**
64
+ * Fetches a raw config file from a URL and filters its contents.
65
+ */
66
+ static async fetchRaw({ url, filter }) {
67
+ const response = await axios_1.default.get(url);
68
+ const fullData = response.data;
69
+ if (!filter || filter.length === 0) {
70
+ return {
71
+ game_data: {
72
+ config: fullData.game_data.config
73
+ }
74
+ };
75
+ }
76
+ const filteredData = {};
77
+ filter.forEach((key) => {
78
+ var _a, _b;
79
+ const value = (_b = (_a = fullData.game_data) === null || _a === void 0 ? void 0 : _a.config) === null || _b === void 0 ? void 0 : _b[key];
80
+ if (value !== undefined) {
81
+ filteredData[key] = value;
82
+ }
83
+ });
84
+ return {
85
+ game_data: {
86
+ config: filteredData
87
+ }
88
+ };
89
+ }
45
90
  }
46
91
  exports.Config = Config;
@@ -1188,7 +1188,7 @@ export interface FogIsland {
1188
1188
  export interface ActionElement {
1189
1189
  id: number;
1190
1190
  type: ActionType;
1191
- tid_name: TidName;
1191
+ tid_name: ActionTidName;
1192
1192
  image: Image;
1193
1193
  pool_percent: number;
1194
1194
  max_points: number;
@@ -1211,7 +1211,7 @@ export declare enum Image {
1211
1211
  ICInfoActionHatchLegendaryPNG = "ic-info-action-hatch-legendary.png",
1212
1212
  ICInfoActionPvpPNG = "ic-info-action-pvp.png"
1213
1213
  }
1214
- export declare enum TidName {
1214
+ export declare enum ActionTidName {
1215
1215
  TidGridIslandsBreedDragons = "tid_grid_islands_breed_dragons",
1216
1216
  TidGridIslandsCollectFarmFood = "tid_grid_islands_collect_farm_food",
1217
1217
  TidGridIslandsCollectGold = "tid_grid_islands_collect_gold",
@@ -1415,6 +1415,7 @@ export declare enum FightBackgroundID {
1415
1415
  BgBattleBackgroundMiMidsummerMisery = "bg_battle_background_mi_midsummer_misery",
1416
1416
  BgBattleBackgroundMiMysteryInParadise = "bg_battle_background_mi_mystery_in_paradise",
1417
1417
  BgBattleBackgroundMiRebornRetold = "bg_battle_background_mi_reborn_retold",
1418
+ BgBattleBackgroundMiSpringB = "bg_battle_background_mi_spring_b",
1418
1419
  BgBattleBackgroundMiValentinesVault = "bg_battle_background_mi_valentines_vault",
1419
1420
  BgBattleBackgroundMr101_MythicalElixir = "bg_battle_background_mr_101_mythical_elixir",
1420
1421
  BgBattleBackgroundMr102_MythicalCryogenic = "bg_battle_background_mr_102_mythical_cryogenic",
@@ -2088,7 +2089,7 @@ export interface Cloud {
2088
2089
  }
2089
2090
  export interface MazeIslandIsland {
2090
2091
  id: number;
2091
- tid_name: string;
2092
+ tid_name: IslandTidName;
2092
2093
  name: string;
2093
2094
  availability: TimerIntervalElement;
2094
2095
  paths: number[];
@@ -2111,7 +2112,13 @@ export interface MazeIslandIsland {
2111
2112
  mobile_building_position: number[];
2112
2113
  active_platforms: ValueClass;
2113
2114
  help_view_id: number;
2114
- sound_tag: string;
2115
+ sound_tag: FluffySoundTag;
2116
+ }
2117
+ export declare enum FluffySoundTag {
2118
+ Fantasy = "FANTASY"
2119
+ }
2120
+ export declare enum IslandTidName {
2121
+ TidMiGenericName = "tid_mi_generic_name"
2115
2122
  }
2116
2123
  export interface MazeIslandNode {
2117
2124
  id: number;
@@ -2138,6 +2145,9 @@ export interface NodeReward {
2138
2145
  "album_pack_aces.2"?: number;
2139
2146
  "album_pack_aces.4"?: number;
2140
2147
  egg?: number;
2148
+ "pet_food_pack.s"?: number;
2149
+ "pet_food_pack.m"?: number;
2150
+ "pet_food_pack.l"?: number;
2141
2151
  }
2142
2152
  export interface Path {
2143
2153
  id: number;
@@ -2159,36 +2169,39 @@ export interface MazeIslandReward {
2159
2169
  export interface News {
2160
2170
  "0": The0;
2161
2171
  "1": The1;
2162
- "2": The10;
2163
- "3": The12;
2164
- "4": The12;
2165
- "5": The10;
2166
- "6": The12;
2167
- "7": The10;
2168
- "8": The12;
2169
- "9": The12;
2172
+ "2": The11;
2173
+ "3": The3;
2174
+ "4": The1;
2175
+ "5": The3;
2176
+ "6": The1;
2177
+ "7": The3;
2178
+ "8": The3;
2179
+ "9": The1;
2170
2180
  "10": The10;
2171
2181
  "11": The11;
2172
- "12": The12;
2173
- "13": The10;
2174
- "14": The10;
2182
+ "12": The1;
2183
+ "13": The1;
2184
+ "14": The14;
2185
+ "15": The15;
2175
2186
  canvas: Canva[];
2176
2187
  }
2177
2188
  export interface The0 {
2178
2189
  active_platforms: ValueClass;
2179
2190
  allow_island_tutorial: number;
2180
2191
  assets_name: string;
2181
- direct_to_shop: number;
2182
2192
  end_ts: string;
2193
+ hud_button: The0_HudButton;
2183
2194
  id: number;
2184
2195
  min_level: number;
2185
- popup_frequency: string;
2186
- popup_is_critical: boolean;
2187
2196
  popup_type: string;
2188
2197
  show_on_startup: number;
2189
2198
  slides: The0_Slide[];
2190
2199
  start_ts: string;
2191
2200
  }
2201
+ export interface The0_HudButton {
2202
+ file: string;
2203
+ title: string;
2204
+ }
2192
2205
  export interface The0_Slide {
2193
2206
  content_localized_key: string;
2194
2207
  custom_title_localized_key: string;
@@ -2202,23 +2215,6 @@ export interface The0_Slide {
2202
2215
  times_to_show?: number;
2203
2216
  }
2204
2217
  export interface The1 {
2205
- active_platforms: ValueClass;
2206
- allow_island_tutorial: number;
2207
- assets_name: string;
2208
- end_ts: string;
2209
- hud_button: The1_HudButton;
2210
- id: number;
2211
- min_level: number;
2212
- popup_type: string;
2213
- show_on_startup: number;
2214
- slides: The0_Slide[];
2215
- start_ts: string;
2216
- }
2217
- export interface The1_HudButton {
2218
- file: string;
2219
- title: string;
2220
- }
2221
- export interface The10 {
2222
2218
  active_platforms: ValueClass;
2223
2219
  allow_island_tutorial: number;
2224
2220
  assets_name: string;
@@ -2232,10 +2228,10 @@ export interface The10 {
2232
2228
  popup_type: string;
2233
2229
  priority: number | null;
2234
2230
  show_on_startup: number;
2235
- slides: The10_Slide[];
2231
+ slides: The1_Slide[];
2236
2232
  start_ts: string;
2237
2233
  }
2238
- export interface The10_Slide {
2234
+ export interface The1_Slide {
2239
2235
  content_localized_key: string;
2240
2236
  custom_title_localized_key: string;
2241
2237
  header_localized_key: string;
@@ -2243,7 +2239,6 @@ export interface The10_Slide {
2243
2239
  multiple_buttons: MultipleButton[];
2244
2240
  times_to_show: number;
2245
2241
  type: SlideType;
2246
- forceClose?: boolean;
2247
2242
  }
2248
2243
  export interface MultipleButton {
2249
2244
  animation: AnimationNameEnum;
@@ -2284,14 +2279,14 @@ export declare enum Style {
2284
2279
  export declare enum SlideType {
2285
2280
  FullImage = "FullImage"
2286
2281
  }
2287
- export interface The11 {
2282
+ export interface The10 {
2288
2283
  active_platforms: ValueClass;
2289
2284
  allow_island_tutorial: number;
2290
2285
  assets_name: string;
2291
2286
  direct_to_shop: number;
2292
2287
  end_ts: string;
2293
2288
  filter_category: null;
2294
- hud_button: The11_HudButton;
2289
+ hud_button: The10_HudButton;
2295
2290
  id: number;
2296
2291
  label_text_tid: null;
2297
2292
  label_title_tid: null;
@@ -2303,12 +2298,68 @@ export interface The11 {
2303
2298
  slides: The10_Slide[];
2304
2299
  start_ts: string;
2305
2300
  }
2306
- export interface The11_HudButton {
2301
+ export interface The10_HudButton {
2307
2302
  file: string;
2308
2303
  title: string;
2309
2304
  viral_icon_tier: number;
2310
2305
  }
2311
- export interface The12 {
2306
+ export interface The10_Slide {
2307
+ content_localized_key: string;
2308
+ custom_title_localized_key: string;
2309
+ forceClose?: boolean;
2310
+ header_localized_key: string;
2311
+ image_url: string;
2312
+ multiple_buttons?: MultipleButton[];
2313
+ times_to_show: number;
2314
+ type: SlideType;
2315
+ }
2316
+ export interface The11 {
2317
+ active_platforms: ValueClass;
2318
+ allow_island_tutorial: number;
2319
+ assets_name: string;
2320
+ direct_to_shop: number;
2321
+ end_ts: string;
2322
+ id: number;
2323
+ min_level: number;
2324
+ popup_frequency: string;
2325
+ popup_type: string;
2326
+ show_on_startup: number;
2327
+ slides: The1_Slide[];
2328
+ start_ts: string;
2329
+ }
2330
+ export interface The14 {
2331
+ active_platforms: ValueClass;
2332
+ allow_island_tutorial: number;
2333
+ assets_name: string;
2334
+ direct_to_shop: number;
2335
+ end_ts: string;
2336
+ id: number;
2337
+ min_level: number;
2338
+ popup_frequency: string;
2339
+ popup_is_critical: boolean;
2340
+ popup_type: string;
2341
+ show_on_startup: number;
2342
+ slides: The0_Slide[];
2343
+ start_ts: string;
2344
+ }
2345
+ export interface The15 {
2346
+ active_platforms: ValueClass;
2347
+ allow_island_tutorial: number;
2348
+ assets_name: string;
2349
+ direct_to_shop: number;
2350
+ end_ts: string;
2351
+ filter_category: null;
2352
+ id: number;
2353
+ label_text_tid: null;
2354
+ label_title_tid: null;
2355
+ min_level: number;
2356
+ popup_type: string;
2357
+ priority: null;
2358
+ show_on_startup: number;
2359
+ slides: The10_Slide[];
2360
+ start_ts: string;
2361
+ }
2362
+ export interface The3 {
2312
2363
  active_platforms: ValueClass;
2313
2364
  allow_island_tutorial: number;
2314
2365
  assets_name: string;
@@ -2562,14 +2613,14 @@ export interface RunnerIslandIsland {
2562
2613
  zip_file: ZipFile;
2563
2614
  help_id: number;
2564
2615
  run_cost: number;
2565
- sound_tag: FluffySoundTag;
2616
+ sound_tag: TentacledSoundTag;
2566
2617
  mission_pool: number[];
2567
2618
  sections: number[];
2568
2619
  building_tooltip_position: number[];
2569
2620
  building_timer_position: number[];
2570
2621
  milestone_rewards: number[];
2571
2622
  }
2572
- export declare enum FluffySoundTag {
2623
+ export declare enum TentacledSoundTag {
2573
2624
  Aquatic = "AQUATIC"
2574
2625
  }
2575
2626
  export declare enum ZipFile {
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.File = exports.RewardType = exports.ActionType = exports.TidName = exports.Image = exports.UIAsset = exports.Behaviour = exports.ItemsUnitsAttributeModifierAttribute = exports.AchievementType = exports.DifficultyEnum = exports.TitleTid = exports.TaskType = exports.TaskIncrease = exports.DescTid = exports.Local = exports.CanvasBg = exports.DragonGroupType = exports.AttributeElement = exports.CategoryEnum = exports.ChestType = exports.AnimatedCanvas = exports.Background = exports.PremiumReward2_Tid = exports.PremiumPriceStyle = exports.PremiumDiscountPriceStyle = exports.PremiumDescriptionStyle = exports.PurchasePopupEliteMainTitleStyle = exports.EliteReward3_Tid = exports.EliteReward1_Tid = exports.ElitePriceStyle = exports.BadgeTid = exports.RightRewardsDescriptionTid = exports.QuantityLabelStyleEnum = exports.MoreTitleStyle = exports.PurchasePopupMainTitleStyle = exports.LeftRewardsDescriptionTid = exports.DescriptionElementsStyleEnum = exports.CollectibleActionType = exports.Rarity = exports.ElementType = exports.TypeElement = exports.BattlePassSoundTag = exports.IconID = exports.IapUid = exports.IapEliteUpgradeUid = exports.IapEliteUid = exports.IapEliteDiscountUidIap = exports.Dur = exports.IapDiscountUidIap = exports.Format = void 0;
4
- exports.StatusEffectDataEffectName = exports.EffectVfxEnum = exports.VfxTextEffectname = exports.Vfx = exports.TidDamageMultiplier = exports.PlayerEffectName = exports.FgVfxScreenEffectname = exports.FgVfxNodeName = exports.EffectTid = exports.PurpleEffectName = exports.DragonLife = exports.DragonAnimation = exports.DestroySkill = exports.CounterAttackEffectName = exports.BgVfxNodeName = exports.BenchTargetMode = exports.AvoidSkillElement = exports.AuraType = exports.Level1_EffectName = exports.AuraCenterMode = exports.AttackType = exports.Texture = exports.RewardEnum = exports.ZipFile = exports.FluffySoundTag = exports.ActivityType = exports.PerkType = exports.SlideType = exports.Style = exports.SpineAsset = exports.Key = exports.AnimationPlace = exports.CollectibleType = exports.ItemType = exports.Tag = exports.ItemGroupType = exports.SpinRewardType = exports.NodesPositionType = exports.MissionType = exports.RewardCellType = exports.PurpleSoundTag = exports.IslandTitleTid = exports.ContentLocalizedKey = exports.AnimationNameEnum = exports.PopupType = exports.WallSuffix = exports.Wall = exports.CanvasBackground = exports.ViewTypeEnum = exports.FightBackgroundID = void 0;
5
- exports.TreasureItemType = exports.Feature = exports.PurpleType = exports.FloorImage = exports.Name = exports.Target = void 0;
3
+ exports.File = exports.RewardType = exports.ActionType = exports.ActionTidName = exports.Image = exports.UIAsset = exports.Behaviour = exports.ItemsUnitsAttributeModifierAttribute = exports.AchievementType = exports.DifficultyEnum = exports.TitleTid = exports.TaskType = exports.TaskIncrease = exports.DescTid = exports.Local = exports.CanvasBg = exports.DragonGroupType = exports.AttributeElement = exports.CategoryEnum = exports.ChestType = exports.AnimatedCanvas = exports.Background = exports.PremiumReward2_Tid = exports.PremiumPriceStyle = exports.PremiumDiscountPriceStyle = exports.PremiumDescriptionStyle = exports.PurchasePopupEliteMainTitleStyle = exports.EliteReward3_Tid = exports.EliteReward1_Tid = exports.ElitePriceStyle = exports.BadgeTid = exports.RightRewardsDescriptionTid = exports.QuantityLabelStyleEnum = exports.MoreTitleStyle = exports.PurchasePopupMainTitleStyle = exports.LeftRewardsDescriptionTid = exports.DescriptionElementsStyleEnum = exports.CollectibleActionType = exports.Rarity = exports.ElementType = exports.TypeElement = exports.BattlePassSoundTag = exports.IconID = exports.IapUid = exports.IapEliteUpgradeUid = exports.IapEliteUid = exports.IapEliteDiscountUidIap = exports.Dur = exports.IapDiscountUidIap = exports.Format = void 0;
4
+ exports.VfxTextEffectname = exports.Vfx = exports.TidDamageMultiplier = exports.PlayerEffectName = exports.FgVfxScreenEffectname = exports.FgVfxNodeName = exports.EffectTid = exports.PurpleEffectName = exports.DragonLife = exports.DragonAnimation = exports.DestroySkill = exports.CounterAttackEffectName = exports.BgVfxNodeName = exports.BenchTargetMode = exports.AvoidSkillElement = exports.AuraType = exports.Level1_EffectName = exports.AuraCenterMode = exports.AttackType = exports.Texture = exports.RewardEnum = exports.ZipFile = exports.TentacledSoundTag = exports.ActivityType = exports.PerkType = exports.SlideType = exports.Style = exports.SpineAsset = exports.Key = exports.AnimationPlace = exports.IslandTidName = exports.FluffySoundTag = exports.CollectibleType = exports.ItemType = exports.Tag = exports.ItemGroupType = exports.SpinRewardType = exports.NodesPositionType = exports.MissionType = exports.RewardCellType = exports.PurpleSoundTag = exports.IslandTitleTid = exports.ContentLocalizedKey = exports.AnimationNameEnum = exports.PopupType = exports.WallSuffix = exports.Wall = exports.CanvasBackground = exports.ViewTypeEnum = exports.FightBackgroundID = void 0;
5
+ exports.TreasureItemType = exports.Feature = exports.PurpleType = exports.FloorImage = exports.Name = exports.Target = exports.StatusEffectDataEffectName = exports.EffectVfxEnum = void 0;
6
6
  var Format;
7
7
  (function (Format) {
8
8
  Format["Efk"] = "efk";
@@ -352,17 +352,17 @@ var Image;
352
352
  Image["ICInfoActionHatchLegendaryPNG"] = "ic-info-action-hatch-legendary.png";
353
353
  Image["ICInfoActionPvpPNG"] = "ic-info-action-pvp.png";
354
354
  })(Image || (exports.Image = Image = {}));
355
- var TidName;
356
- (function (TidName) {
357
- TidName["TidGridIslandsBreedDragons"] = "tid_grid_islands_breed_dragons";
358
- TidName["TidGridIslandsCollectFarmFood"] = "tid_grid_islands_collect_farm_food";
359
- TidName["TidGridIslandsCollectGold"] = "tid_grid_islands_collect_gold";
360
- TidName["TidGridIslandsFeedDragons"] = "tid_grid_islands_feed_dragons";
361
- TidName["TidGridIslandsHatching2_El"] = "tid_grid_islands_hatching_2_el";
362
- TidName["TidGridIslandsHatching3_El"] = "tid_grid_islands_hatching_3_el";
363
- TidName["TidGridIslandsHatchingLegendary"] = "tid_grid_islands_hatching_legendary";
364
- TidName["TidGridIslandsPvpBattle"] = "tid_grid_islands_pvp_battle";
365
- })(TidName || (exports.TidName = TidName = {}));
355
+ var ActionTidName;
356
+ (function (ActionTidName) {
357
+ ActionTidName["TidGridIslandsBreedDragons"] = "tid_grid_islands_breed_dragons";
358
+ ActionTidName["TidGridIslandsCollectFarmFood"] = "tid_grid_islands_collect_farm_food";
359
+ ActionTidName["TidGridIslandsCollectGold"] = "tid_grid_islands_collect_gold";
360
+ ActionTidName["TidGridIslandsFeedDragons"] = "tid_grid_islands_feed_dragons";
361
+ ActionTidName["TidGridIslandsHatching2_El"] = "tid_grid_islands_hatching_2_el";
362
+ ActionTidName["TidGridIslandsHatching3_El"] = "tid_grid_islands_hatching_3_el";
363
+ ActionTidName["TidGridIslandsHatchingLegendary"] = "tid_grid_islands_hatching_legendary";
364
+ ActionTidName["TidGridIslandsPvpBattle"] = "tid_grid_islands_pvp_battle";
365
+ })(ActionTidName || (exports.ActionTidName = ActionTidName = {}));
366
366
  var ActionType;
367
367
  (function (ActionType) {
368
368
  ActionType["BreedDragons"] = "BREED_DRAGONS";
@@ -398,6 +398,7 @@ var FightBackgroundID;
398
398
  FightBackgroundID["BgBattleBackgroundMiMidsummerMisery"] = "bg_battle_background_mi_midsummer_misery";
399
399
  FightBackgroundID["BgBattleBackgroundMiMysteryInParadise"] = "bg_battle_background_mi_mystery_in_paradise";
400
400
  FightBackgroundID["BgBattleBackgroundMiRebornRetold"] = "bg_battle_background_mi_reborn_retold";
401
+ FightBackgroundID["BgBattleBackgroundMiSpringB"] = "bg_battle_background_mi_spring_b";
401
402
  FightBackgroundID["BgBattleBackgroundMiValentinesVault"] = "bg_battle_background_mi_valentines_vault";
402
403
  FightBackgroundID["BgBattleBackgroundMr101_MythicalElixir"] = "bg_battle_background_mr_101_mythical_elixir";
403
404
  FightBackgroundID["BgBattleBackgroundMr102_MythicalCryogenic"] = "bg_battle_background_mr_102_mythical_cryogenic";
@@ -583,6 +584,14 @@ var CollectibleType;
583
584
  CollectibleType["Dragon"] = "DRAGON";
584
585
  CollectibleType["Item"] = "ITEM";
585
586
  })(CollectibleType || (exports.CollectibleType = CollectibleType = {}));
587
+ var FluffySoundTag;
588
+ (function (FluffySoundTag) {
589
+ FluffySoundTag["Fantasy"] = "FANTASY";
590
+ })(FluffySoundTag || (exports.FluffySoundTag = FluffySoundTag = {}));
591
+ var IslandTidName;
592
+ (function (IslandTidName) {
593
+ IslandTidName["TidMiGenericName"] = "tid_mi_generic_name";
594
+ })(IslandTidName || (exports.IslandTidName = IslandTidName = {}));
586
595
  var AnimationPlace;
587
596
  (function (AnimationPlace) {
588
597
  AnimationPlace["Foreground"] = "Foreground";
@@ -623,10 +632,10 @@ var ActivityType;
623
632
  ActivityType["PvpArenas"] = "PVP_ARENAS";
624
633
  ActivityType["TournamentMatch"] = "TOURNAMENT_MATCH";
625
634
  })(ActivityType || (exports.ActivityType = ActivityType = {}));
626
- var FluffySoundTag;
627
- (function (FluffySoundTag) {
628
- FluffySoundTag["Aquatic"] = "AQUATIC";
629
- })(FluffySoundTag || (exports.FluffySoundTag = FluffySoundTag = {}));
635
+ var TentacledSoundTag;
636
+ (function (TentacledSoundTag) {
637
+ TentacledSoundTag["Aquatic"] = "AQUATIC";
638
+ })(TentacledSoundTag || (exports.TentacledSoundTag = TentacledSoundTag = {}));
630
639
  var ZipFile;
631
640
  (function (ZipFile) {
632
641
  ZipFile["MobileUIRunnerIslandsOceanRunnerIslandBZip"] = "/mobile/ui/runner_islands/ocean-runner-island_b.zip";
package/package.json CHANGED
@@ -1,38 +1,38 @@
1
- {
2
- "name": "@dchighs/dc-config",
3
- "version": "0.0.9",
4
- "description": "A library to handle configuration for Dragon City.",
5
- "main": "./dist/index.js",
6
- "module": "./dist/index.js",
7
- "types": "./dist/index.d.ts",
8
- "files": [
9
- "dist/*",
10
- "!/**/__tests__"
11
- ],
12
- "keywords": [
13
- "dragon city",
14
- "dc",
15
- "configuration",
16
- "dc highs"
17
- ],
18
- "scripts": {
19
- "build": "tsc",
20
- "update-dto": "ts-node scripts/update-dto.ts"
21
- },
22
- "author": "Marcuth",
23
- "license": "MIT",
24
- "type": "commonjs",
25
- "devDependencies": {
26
- "@marcuth/env": "^0.0.1",
27
- "@types/node": "^25.0.3",
28
- "quicktype-core": "^23.2.6",
29
- "ts-node": "^10.9.2",
30
- "typescript": "^5.9.3"
31
- },
32
- "dependencies": {
33
- "axios": "^1.13.2"
34
- },
35
- "peerDependencies": {
36
- "@dchighs/dc-core": "^0.3.0"
37
- }
38
- }
1
+ {
2
+ "name": "@dchighs/dc-config",
3
+ "version": "0.1.0",
4
+ "description": "A library to handle configuration for Dragon City.",
5
+ "main": "./dist/index.js",
6
+ "module": "./dist/index.js",
7
+ "types": "./dist/index.d.ts",
8
+ "files": [
9
+ "dist/*",
10
+ "!/**/__tests__"
11
+ ],
12
+ "keywords": [
13
+ "dragon city",
14
+ "dc",
15
+ "configuration",
16
+ "dc highs"
17
+ ],
18
+ "scripts": {
19
+ "build": "tsc",
20
+ "update-dto": "ts-node scripts/update-dto.ts"
21
+ },
22
+ "author": "Marcuth",
23
+ "license": "MIT",
24
+ "type": "commonjs",
25
+ "devDependencies": {
26
+ "@marcuth/env": "^0.0.1",
27
+ "@types/node": "^25.0.3",
28
+ "quicktype-core": "^23.2.6",
29
+ "ts-node": "^10.9.2",
30
+ "typescript": "^5.9.3"
31
+ },
32
+ "dependencies": {
33
+ "axios": "^1.13.2"
34
+ },
35
+ "peerDependencies": {
36
+ "@dchighs/dc-core": "^0.3.0"
37
+ }
38
+ }