ps99-api 2.4.0 → 2.6.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.
Files changed (92) hide show
  1. package/.github/workflows/release-on-main.yml +1 -2
  2. package/.idea/runConfigurations/test_changing.xml +1 -1
  3. package/debug_currency.json +57 -0
  4. package/debug_goals.json +271 -0
  5. package/dist/ps99-api.d.ts +2 -0
  6. package/dist/ps99-api.js +4 -1
  7. package/dist/ps99-api.js.map +1 -1
  8. package/dist/request-client/axios.js +6 -1
  9. package/dist/request-client/axios.js.map +1 -1
  10. package/dist/responses/collection/index.d.ts +1 -0
  11. package/dist/responses/collection/index.js +15 -0
  12. package/dist/responses/collection/index.js.map +1 -1
  13. package/dist/responses/collection/rarity.d.ts +1 -0
  14. package/example-web/react/package-lock.json +1504 -1470
  15. package/example-web/react2/package-lock.json +3089 -2766
  16. package/example-web/react2/package.json +6 -1
  17. package/example-web/react2/public/assets/gold_variant_icon.png +0 -0
  18. package/example-web/react2/public/assets/hot_cocoa_egg.png +0 -0
  19. package/example-web/react2/public/index.html +34 -31
  20. package/example-web/react2/src/App.tsx +15 -15
  21. package/example-web/react2/src/assets/guild_placeholder.png +0 -0
  22. package/example-web/react2/src/components/AchievementsComponent.tsx +74 -19
  23. package/example-web/react2/src/components/AutoSizer.tsx +49 -0
  24. package/example-web/react2/src/components/BoostsComponent.tsx +16 -5
  25. package/example-web/react2/src/components/BoothsComponent.tsx +22 -52
  26. package/example-web/react2/src/components/BoxesComponent.tsx +48 -16
  27. package/example-web/react2/src/components/BuffsComponent.tsx +82 -34
  28. package/example-web/react2/src/components/CharmsComponent.tsx +84 -24
  29. package/example-web/react2/src/components/CollectionConfigIndex.tsx +867 -33
  30. package/example-web/react2/src/components/CollectionsIndex.tsx +380 -27
  31. package/example-web/react2/src/components/CollectionsLayout.tsx +60 -0
  32. package/example-web/react2/src/components/CurrencyComponent.tsx +57 -39
  33. package/example-web/react2/src/components/DynamicCollectionConfigData.tsx +172 -15
  34. package/example-web/react2/src/components/EggsComponent.tsx +50 -12
  35. package/example-web/react2/src/components/EnchantsComponent.tsx +88 -42
  36. package/example-web/react2/src/components/FishingRodsComponent.tsx +36 -22
  37. package/example-web/react2/src/components/Footer.tsx +18 -8
  38. package/example-web/react2/src/components/FruitsComponent.tsx +40 -17
  39. package/example-web/react2/src/components/GenericFetchComponent.tsx +9 -1
  40. package/example-web/react2/src/components/GuildBattlesComponent.tsx +41 -34
  41. package/example-web/react2/src/components/Header.tsx +39 -52
  42. package/example-web/react2/src/components/HomePage.tsx +15 -17
  43. package/example-web/react2/src/components/HoverboardsComponent.tsx +23 -99
  44. package/example-web/react2/src/components/ImageComponent.tsx +255 -45
  45. package/example-web/react2/src/components/ItemCard.tsx +240 -0
  46. package/example-web/react2/src/components/LootboxesComponent.tsx +22 -7
  47. package/example-web/react2/src/components/MasteryComponent.tsx +165 -30
  48. package/example-web/react2/src/components/MerchantsComponent.tsx +41 -16
  49. package/example-web/react2/src/components/MiscItemsComponent.tsx +26 -31
  50. package/example-web/react2/src/components/PetsComponent.tsx +100 -61
  51. package/example-web/react2/src/components/PotionsComponent.tsx +121 -27
  52. package/example-web/react2/src/components/RandomEventsComponent.tsx +32 -23
  53. package/example-web/react2/src/components/RanksComponent.tsx +187 -62
  54. package/example-web/react2/src/components/RarityComponent.tsx +123 -5
  55. package/example-web/react2/src/components/ReactWindowMock.tsx +73 -0
  56. package/example-web/react2/src/components/RebirthsComponent.tsx +36 -19
  57. package/example-web/react2/src/components/SecretRoomsComponent.tsx +5 -4
  58. package/example-web/react2/src/components/SeedsComponent.tsx +41 -21
  59. package/example-web/react2/src/components/ShovelsComponent.tsx +21 -9
  60. package/example-web/react2/src/components/Sidebar.tsx +105 -0
  61. package/example-web/react2/src/components/SprinklersComponent.tsx +25 -10
  62. package/example-web/react2/src/components/Tooltip.tsx +36 -0
  63. package/example-web/react2/src/components/UltimatesComponent.tsx +28 -16
  64. package/example-web/react2/src/components/UpgradesComponent.tsx +97 -47
  65. package/example-web/react2/src/components/WateringCansComponent.tsx +20 -14
  66. package/example-web/react2/src/components/WorldsComponent.tsx +21 -11
  67. package/example-web/react2/src/components/XPPotionsComponent.tsx +28 -11
  68. package/example-web/react2/src/components/ZoneFlagsComponent.tsx +25 -14
  69. package/example-web/react2/src/components/ZonesComponent.tsx +43 -60
  70. package/example-web/react2/src/constants/collectionIcons.ts +29 -0
  71. package/example-web/react2/src/context/CollectionDataContext.tsx +62 -0
  72. package/example-web/react2/src/context/ScrollContext.tsx +35 -0
  73. package/example-web/react2/src/hooks/useCollapsibleHeader.ts +69 -0
  74. package/example-web/react2/src/hooks/useExpandableList.ts +38 -0
  75. package/example-web/react2/src/hooks/useItemResolution.ts +351 -0
  76. package/example-web/react2/src/index.css +257 -0
  77. package/example-web/react2/src/index.tsx +2 -1
  78. package/example-web/react2/src/utils/gigantix.ts +40 -0
  79. package/example-web/react2/temp_model.rbxm +0 -0
  80. package/example-web/react2/webpack.config.js +103 -47
  81. package/package.json +11 -11
  82. package/ranks.json +1 -0
  83. package/repro_collection_fetch.ts +33 -0
  84. package/repro_image_fetch.ts +50 -0
  85. package/src/__tests__/__snapshots__/ps99-api-changes.ts.snap +34841 -10439
  86. package/src/__tests__/__snapshots__/ps99-api-live.ts.snap +160667 -67217
  87. package/src/ps99-api.ts +9 -5
  88. package/src/request-client/axios.ts +6 -2
  89. package/src/responses/collection/index.ts +1 -0
  90. package/src/responses/collection/rarity.ts +1 -0
  91. package/tsconfig.json +1 -1
  92. package/example-web/react2/public/service-worker.js +0 -63
@@ -32,12 +32,11 @@ jobs:
32
32
  - name: Release
33
33
  env:
34
34
  GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
35
- NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
36
35
  run: npx semantic-release
37
36
  - name: Setup Pages
38
37
  uses: actions/configure-pages@v5
39
38
  - name: Upload artifact
40
- uses: actions/upload-pages-artifact@v3
39
+ uses: actions/upload-pages-artifact@v4
41
40
  with:
42
41
  path: "example-web/react2/dist"
43
42
  - name: Deploy to GitHub Pages
@@ -5,7 +5,7 @@
5
5
  <working-dir value="$PROJECT_DIR$" />
6
6
  <envs />
7
7
  <scope-kind value="TEST_FILE" />
8
- <test-file value="src/__tests__/ps99-api-changes.ts" />
8
+ <test-file value="$PROJECT_DIR$/src/__tests__/ps99-api-changes.ts" />
9
9
  <method v="2" />
10
10
  </configuration>
11
11
  </component>
@@ -0,0 +1,57 @@
1
+ {
2
+ "configName": "Currency | Diamonds",
3
+ "category": "Currency",
4
+ "configData": {
5
+ "Rarity": {
6
+ "RarityNumber": 2,
7
+ "Lootbag": null,
8
+ "_id": "Rare",
9
+ "Color": null,
10
+ "DisplayName": "Rare",
11
+ "Message": null,
12
+ "ItemSlot": null,
13
+ "Gradient": null,
14
+ "Announce": false,
15
+ "_script": null
16
+ },
17
+ "Tradable": true,
18
+ "StaticValue": 1,
19
+ "Tiers": [
20
+ {
21
+ "orbImage": "rbxassetid://15466421090",
22
+ "imageOutline": "rbxassetid://14867116353",
23
+ "isBottom": true,
24
+ "Order": 1,
25
+ "rainData": {
26
+ "LightEmission": 0.2
27
+ },
28
+ "value": 1,
29
+ "tinyImage": "rbxassetid://15258327857",
30
+ "tierName": "Diamonds",
31
+ "textColor": null
32
+ }
33
+ ],
34
+ "DisplayName": "Diamonds",
35
+ "_index": 10,
36
+ "Desc": "Diamonds!",
37
+ "BagTiers": [
38
+ {
39
+ "value": 0,
40
+ "image": "rbxassetid://15058306297"
41
+ },
42
+ {
43
+ "value": 1000,
44
+ "image": "rbxassetid://15058306546"
45
+ },
46
+ {
47
+ "value": 10000,
48
+ "image": "rbxassetid://15058306840"
49
+ }
50
+ ],
51
+ "MaxAmount": 1000000000000
52
+ },
53
+ "dateCreated": null,
54
+ "dateModified": "2025-07-12T16:08:43.657Z",
55
+ "collection": "Currency",
56
+ "hashShort": "dcaa4bfe1497be92"
57
+ }
@@ -0,0 +1,271 @@
1
+ [
2
+ [
3
+ {
4
+ "Type": 21,
5
+ "Amount": 1350,
6
+ "Weight": 1
7
+ },
8
+ {
9
+ "Type": 21,
10
+ "Amount": 1350,
11
+ "Weight": 1
12
+ },
13
+ {
14
+ "Type": 21,
15
+ "Amount": 1350,
16
+ "Weight": 1
17
+ },
18
+ {
19
+ "Type": 14,
20
+ "Amount": 32,
21
+ "Weight": 1
22
+ },
23
+ {
24
+ "Type": 15,
25
+ "Amount": 32,
26
+ "Weight": 1
27
+ },
28
+ {
29
+ "Type": 9,
30
+ "Amount": 25,
31
+ "Weight": 1
32
+ }
33
+ ],
34
+ [
35
+ {
36
+ "Type": 21,
37
+ "Amount": 1900,
38
+ "Weight": 1
39
+ },
40
+ {
41
+ "Type": 21,
42
+ "Amount": 1900,
43
+ "Weight": 1
44
+ },
45
+ {
46
+ "Type": 21,
47
+ "Amount": 1900,
48
+ "Weight": 1
49
+ },
50
+ {
51
+ "Type": 14,
52
+ "Amount": 37,
53
+ "Weight": 1
54
+ },
55
+ {
56
+ "Type": 15,
57
+ "Amount": 37,
58
+ "Weight": 1
59
+ },
60
+ {
61
+ "Amount": 8,
62
+ "Type": 34,
63
+ "PotionTier": 4,
64
+ "Weight": 1
65
+ },
66
+ {
67
+ "Type": 38,
68
+ "Amount": 3,
69
+ "Weight": 1
70
+ },
71
+ {
72
+ "Type": 37,
73
+ "Amount": 3,
74
+ "Weight": 1
75
+ },
76
+ {
77
+ "Type": 39,
78
+ "Amount": 3,
79
+ "Weight": 1
80
+ },
81
+ {
82
+ "Type": 76,
83
+ "Amount": 1,
84
+ "Weight": 1
85
+ },
86
+ {
87
+ "Type": 20,
88
+ "Amount": 1400,
89
+ "Weight": 1
90
+ },
91
+ {
92
+ "Type": 20,
93
+ "Amount": 1400,
94
+ "Weight": 1
95
+ },
96
+ {
97
+ "Type": 40,
98
+ "Amount": 290,
99
+ "Weight": 1
100
+ },
101
+ {
102
+ "Type": 41,
103
+ "Amount": 30,
104
+ "Weight": 1
105
+ },
106
+ {
107
+ "Type": 26,
108
+ "Amount": 34,
109
+ "Weight": 1
110
+ },
111
+ {
112
+ "Type": 25,
113
+ "Amount": 32,
114
+ "Weight": 1
115
+ }
116
+ ],
117
+ [
118
+ {
119
+ "Type": 21,
120
+ "Amount": 2100,
121
+ "Weight": 1
122
+ },
123
+ {
124
+ "Type": 21,
125
+ "Amount": 2100,
126
+ "Weight": 1
127
+ },
128
+ {
129
+ "Type": 21,
130
+ "Amount": 2100,
131
+ "Weight": 1
132
+ },
133
+ {
134
+ "Type": 9,
135
+ "Amount": 350,
136
+ "Weight": 1
137
+ },
138
+ {
139
+ "Amount": 2500,
140
+ "Type": 7,
141
+ "CurrencyID": "Diamonds",
142
+ "Weight": 1
143
+ },
144
+ {
145
+ "Amount": 14,
146
+ "Type": 12,
147
+ "PotionTier": 3,
148
+ "Weight": 1
149
+ },
150
+ {
151
+ "Amount": 14,
152
+ "Type": 13,
153
+ "EnchantTier": 3,
154
+ "Weight": 1
155
+ },
156
+ {
157
+ "Amount": 14,
158
+ "Type": 34,
159
+ "PotionTier": 4,
160
+ "Weight": 1
161
+ },
162
+ {
163
+ "Type": 38,
164
+ "Amount": 4,
165
+ "Weight": 1
166
+ },
167
+ {
168
+ "Type": 37,
169
+ "Amount": 4,
170
+ "Weight": 1
171
+ },
172
+ {
173
+ "Type": 39,
174
+ "Amount": 4,
175
+ "Weight": 1
176
+ },
177
+ {
178
+ "Type": 76,
179
+ "Amount": 1,
180
+ "Weight": 1
181
+ },
182
+ {
183
+ "Type": 20,
184
+ "Amount": 2000,
185
+ "Weight": 1
186
+ },
187
+ {
188
+ "Type": 20,
189
+ "Amount": 2000,
190
+ "Weight": 1
191
+ },
192
+ {
193
+ "Type": 40,
194
+ "Amount": 400,
195
+ "Weight": 1
196
+ },
197
+ {
198
+ "Type": 41,
199
+ "Amount": 38,
200
+ "Weight": 1
201
+ },
202
+ {
203
+ "Type": 6,
204
+ "Amount": 1,
205
+ "Weight": 1
206
+ },
207
+ {
208
+ "Type": 6,
209
+ "Amount": 1,
210
+ "Weight": 1
211
+ },
212
+ {
213
+ "Type": 6,
214
+ "Amount": 1,
215
+ "Weight": 1
216
+ }
217
+ ],
218
+ [
219
+ {
220
+ "Type": 21,
221
+ "Amount": 2400,
222
+ "Weight": 1
223
+ },
224
+ {
225
+ "Type": 21,
226
+ "Amount": 2400,
227
+ "Weight": 1
228
+ },
229
+ {
230
+ "Type": 21,
231
+ "Amount": 2400,
232
+ "Weight": 1
233
+ },
234
+ {
235
+ "Type": 9,
236
+ "Amount": 450,
237
+ "Weight": 1
238
+ },
239
+ {
240
+ "Amount": 3000,
241
+ "Type": 7,
242
+ "CurrencyID": "Diamonds",
243
+ "Weight": 1
244
+ },
245
+ {
246
+ "Type": 42,
247
+ "Amount": 5,
248
+ "Weight": 1
249
+ },
250
+ {
251
+ "Type": 38,
252
+ "Amount": 5,
253
+ "Weight": 1
254
+ },
255
+ {
256
+ "Type": 37,
257
+ "Amount": 5,
258
+ "Weight": 1
259
+ },
260
+ {
261
+ "Type": 39,
262
+ "Amount": 5,
263
+ "Weight": 1
264
+ },
265
+ {
266
+ "Type": 76,
267
+ "Amount": 1,
268
+ "Weight": 1
269
+ }
270
+ ]
271
+ ]
@@ -8,6 +8,7 @@ import { RAPResponseBody } from "./responses/rap";
8
8
  import { ActiveClanBattleResponseBody } from "./responses/activeClanBattle";
9
9
  export type PetSimulator99APIOptions = {
10
10
  requestClient?: RequestClient;
11
+ baseUrl?: string;
11
12
  };
12
13
  export type ApiResponseBody<T> = {
13
14
  status: "ok";
@@ -21,6 +22,7 @@ export type ApiResponseBody<T> = {
21
22
  };
22
23
  export declare class PetSimulator99API {
23
24
  requestClient: RequestClient;
25
+ baseUrl: string;
24
26
  constructor(params?: PetSimulator99APIOptions);
25
27
  private request;
26
28
  getCollections(): Promise<ApiResponseBody<("Achievements" | "Boosts" | "Booths" | "Boxes" | "Buffs" | "Charms" | "Currency" | "Eggs" | "Enchants" | "FishingRods" | "Fruits" | "GuildBattles" | "Hoverboards" | "Lootboxes" | "Mastery" | "Merchants" | "MiscItems" | "Pets" | "Potions" | "RandomEvents" | "Ranks" | "Rarity" | "Rebirths" | "Seeds" | "SecretRooms" | "Shovels" | "Sprinklers" | "Ultimates" | "Upgrades" | "WateringCans" | "Worlds" | "XPPotions" | "ZoneFlags" | "Zones")[]>>;
package/dist/ps99-api.js CHANGED
@@ -4,9 +4,11 @@ exports.PetSimulator99API = void 0;
4
4
  const axios_1 = require("./request-client/axios");
5
5
  class PetSimulator99API {
6
6
  requestClient;
7
+ baseUrl;
7
8
  constructor(params) {
8
9
  this.requestClient =
9
10
  params && params.requestClient ? params.requestClient : (0, axios_1.getAxiosRequest)();
11
+ this.baseUrl = params?.baseUrl || "https://biggamesapi.io";
10
12
  }
11
13
  request(path, { params, responseType, responseEncoding, } = {
12
14
  params: {},
@@ -18,7 +20,7 @@ class PetSimulator99API {
18
20
  responseEncoding = responseEncoding || "utf8";
19
21
  return this.requestClient.send({
20
22
  method: "GET",
21
- url: `https://biggamesapi.io${path}`,
23
+ url: `${this.baseUrl}${path}`,
22
24
  params,
23
25
  responseType,
24
26
  responseEncoding,
@@ -65,6 +67,7 @@ class PetSimulator99API {
65
67
  if (rbxassetid.startsWith("rbxassetid://")) {
66
68
  rbxassetid = rbxassetid.slice(13);
67
69
  }
70
+ console.log(`[ps99-api] getImage calling: /image/${rbxassetid}`);
68
71
  return this.request(`/image/${rbxassetid}`, {
69
72
  responseType: "arraybuffer",
70
73
  responseEncoding: "BINARY",
@@ -1 +1 @@
1
- {"version":3,"file":"ps99-api.js","sourceRoot":"","sources":["../src/ps99-api.ts"],"names":[],"mappings":";;;AACA,kDAAyD;AAiBzD,MAAa,iBAAiB;IACrB,aAAa,CAAgB;IAEpC,YAAY,MAAiC;QAC3C,IAAI,CAAC,aAAa;YAChB,MAAM,IAAI,MAAM,CAAC,aAAa,CAAC,CAAC,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC,CAAC,IAAA,uBAAe,GAAE,CAAC;I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D,CAAC;IAED,mBAAmB;QACjB,OAAO,IAAI,CAAC,OAAO,CACjB,uBAAuB,CACxB,CAAC;IACJ,CAAC;IAED,oDAAoD;IACpD,QAAQ,CAAC,UAAkB;QACzB,IAAI,UAAU,CAAC,UAAU,CAAC,eAAe,CAAC,EAAE,CAAC;YAC3C,UAAU,GAAG,UAAU,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;QACpC,CAAC;QACD,OAAO,CAAC,GAAG,CAAC,uCAAuC,UAAU,EAAE,CAAC,CAAC;QACjE,OAAO,IAAI,CAAC,OAAO,CAAO,UAAU,UAAU,EAAE,EAAE;YAChD,YAAY,EAAE,aAAa;YAC3B,gBAAgB,EAAE,QAAQ;SAC3B,CAAC,CAAC;IACL,CAAC;CACF;AAhGD,8CAgGC"}
@@ -10,12 +10,17 @@ function getAxiosRequest(instance) {
10
10
  async send(options) {
11
11
  try {
12
12
  const { data } = await (instance ? instance(options) : (0, axios_1.default)(options));
13
+ console.log(`[ps99-api] Axios response for ${options.url}:`, data, "Type:", typeof data, "IsArrayBuffer:", data instanceof ArrayBuffer);
13
14
  return data;
14
15
  }
15
16
  catch (e) {
16
17
  if (isAxiosError(e)) {
17
18
  const message = e?.response?.data?.message || e.message;
18
- throw new Error(`${options.method} ${options.url}: ${message}`);
19
+ const newError = new Error(`${options.method} ${options.url}: ${message}`);
20
+ // Attach original response/status for consumers
21
+ newError.response = e.response;
22
+ newError.status = e.response?.status;
23
+ throw newError;
19
24
  }
20
25
  throw e;
21
26
  }
@@ -1 +1 @@
1
- {"version":3,"file":"axios.js","sourceRoot":"","sources":["../../src/request-client/axios.ts"],"names":[],"mappings":";;;;;AAGA,0CAiBC;AApBD,kDAAyD;AAGzD,SAAgB,eAAe,CAAC,QAAwB;IACtD,OAAO;QACL,KAAK,CAAC,IAAI,CAAI,OAAyB;YACrC,IAAI,CAAC;gBACH,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,QAAQ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CAAuB,CAAC,CAAC,EAAE,CAAC;oBAC1C,MAAM,OAAO,GAAW,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,IAAI,CAAC,CAAC,OAAO,CAAC;oBAChE,MAAM,QAAQ,GAAG,IAAI,KAAK,CAAC,GAAG,OAAO,CAAC,MAAM,IAAI,OAAO,CAAC,GAAG,KAAK,OAAO,EAAE,CAAC,CAAC;oBAC3E,gDAAgD;oBAC/C,QAAgB,CAAC,QAAQ,GAAG,CAAC,CAAC,QAAQ,CAAC;oBACvC,QAAgB,CAAC,MAAM,GAAG,CAAC,CAAC,QAAQ,EAAE,MAAM,CAAC;oBAC9C,MAAM,QAAQ,CAAC;gBACjB,CAAC;gBAED,MAAM,CAAC,CAAC;YACV,CAAC;QACH,CAAC;KACF,CAAC;AACJ,CAAC;AAED,SAAS,YAAY,CACnB,GAAoC;IAEpC,OAAO,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,GAAG,EAAE,cAAc,CAAC,CAAC;AACnE,CAAC"}
@@ -1,4 +1,5 @@
1
1
  import { AchievementData } from "./achievement";
2
+ export * from "./collection-data";
2
3
  import { BoostData } from "./boost";
3
4
  import { BoothData } from "./booth";
4
5
  import { BoxData } from "./box";
@@ -1,3 +1,18 @@
1
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
+ };
2
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./collection-data"), exports);
3
18
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/responses/collection/index.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/responses/collection/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AACA,oDAAkC"}
@@ -9,4 +9,5 @@ export type RarityConfigData = {
9
9
  Lootbag: unknown;
10
10
  Message: unknown;
11
11
  RarityNumber: number;
12
+ _id: string;
12
13
  };