ps99-api 2.0.0 → 2.2.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/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/ps99-api.d.ts +1 -1
- package/dist/responses/collection/index.d.ts +2 -1
- package/dist/responses/collection/xp-potion.d.ts +23 -0
- package/dist/responses/collection/xp-potion.js +3 -0
- package/dist/responses/collection/xp-potion.js.map +1 -0
- package/example-web/react2/package-lock.json +4954 -72
- package/example-web/react2/package.json +6 -1
- package/example-web/react2/public/manifest.json +1 -0
- package/example-web/react2/src/App.tsx +5 -13
- package/example-web/react2/src/components/CollectionConfigIndex.tsx +0 -3
- package/example-web/react2/src/components/DynamicCollectionConfigData.tsx +5 -78
- package/example-web/react2/src/components/Footer.tsx +60 -0
- package/example-web/react2/src/components/GenericFetchComponent.tsx +6 -9
- package/example-web/react2/src/components/ImageComponent.tsx +17 -19
- package/example-web/react2/src/components/XPPotionsComponent.tsx +30 -0
- package/example-web/react2/src/hooks/useOnlineStatus.ts +20 -0
- package/example-web/react2/src/index.tsx +4 -0
- package/example-web/react2/src/serviceWorkerRegistration.ts +110 -0
- package/example-web/react2/webpack.config.js +2 -2
- package/package.json +1 -1
- package/src/__tests__/__snapshots__/ps99-api-changes.ts.snap +23301 -20362
- package/src/__tests__/__snapshots__/ps99-api-live.ts.snap +1291 -581
- package/src/__tests__/ps99-api-live.ts +5 -0
- package/src/index.ts +1 -0
- package/src/ps99-api.ts +1 -1
- package/src/responses/collection/index.ts +2 -0
- package/src/responses/collection/xp-potion.ts +26 -0
|
@@ -173,4 +173,9 @@ describe("Pet Simulator Public Live API Test", () => {
|
|
|
173
173
|
const results = await api.getCollection("Merchants");
|
|
174
174
|
expect(results).toMatchSnapshot();
|
|
175
175
|
});
|
|
176
|
+
|
|
177
|
+
test("XPPotions shape", async () => {
|
|
178
|
+
const results = await api.getCollection("XPPotions");
|
|
179
|
+
expect(results).toMatchSnapshot();
|
|
180
|
+
});
|
|
176
181
|
});
|
package/src/index.ts
CHANGED
|
@@ -39,5 +39,6 @@ export * from "./responses/collection/ultimate";
|
|
|
39
39
|
export * from "./responses/collection/upgrade";
|
|
40
40
|
export * from "./responses/collection/watering-can";
|
|
41
41
|
export * from "./responses/collection/world";
|
|
42
|
+
export * from "./responses/collection/xp-potion";
|
|
42
43
|
export * from "./responses/collection/zone-flag";
|
|
43
44
|
export * from "./responses/collection/zone";
|
package/src/ps99-api.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ApiRequestParams, RequestClient } from "./request-client/common";
|
|
2
2
|
import { getAxiosRequest } from "./request-client/axios";
|
|
3
|
-
import {Collection, CollectionName} from "./responses/collection";
|
|
3
|
+
import { Collection, CollectionName } from "./responses/collection";
|
|
4
4
|
import { ClanResponseBody } from "./responses/clan";
|
|
5
5
|
import { ClansResponseBody } from "./responses/clans";
|
|
6
6
|
import { ClansSort, GetClansParams, SortOrder } from "./params/clans";
|
|
@@ -29,6 +29,7 @@ import { UltimateData } from "./ultimate";
|
|
|
29
29
|
import { UpgradeData } from "./upgrade";
|
|
30
30
|
import { WateringCanData } from "./watering-can";
|
|
31
31
|
import { WorldData } from "./world";
|
|
32
|
+
import { XPPotionData } from "./xp-potion";
|
|
32
33
|
import { ZoneFlagData } from "./zone-flag";
|
|
33
34
|
import { ZoneData } from "./zone";
|
|
34
35
|
|
|
@@ -64,6 +65,7 @@ export type Collections =
|
|
|
64
65
|
| UpgradeData
|
|
65
66
|
| WateringCanData
|
|
66
67
|
| WorldData
|
|
68
|
+
| XPPotionData
|
|
67
69
|
| ZoneFlagData
|
|
68
70
|
| ZoneData;
|
|
69
71
|
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { CollectionData } from "./collection-data";
|
|
2
|
+
|
|
3
|
+
export type XPPotionData = CollectionData<"XPPotions", XPPotionConfigData>;
|
|
4
|
+
|
|
5
|
+
export type XPPotionConfigData = {
|
|
6
|
+
Rarity: XPPotionRarity;
|
|
7
|
+
DisplayName: string;
|
|
8
|
+
Amount: number;
|
|
9
|
+
Desc: string;
|
|
10
|
+
Recipe: unknown;
|
|
11
|
+
Icon: string;
|
|
12
|
+
ItemId: string;
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export type XPPotionRarity = {
|
|
16
|
+
RarityNumber: number;
|
|
17
|
+
Lootbag: unknown;
|
|
18
|
+
_id: string;
|
|
19
|
+
Color: unknown;
|
|
20
|
+
DisplayName: string;
|
|
21
|
+
Message: unknown;
|
|
22
|
+
ItemSlot: unknown;
|
|
23
|
+
Gradient: unknown;
|
|
24
|
+
Announce: boolean;
|
|
25
|
+
_script: unknown;
|
|
26
|
+
};
|