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
package/dist/index.d.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/dist/index.js
CHANGED
|
@@ -55,6 +55,7 @@ __exportStar(require("./responses/collection/ultimate"), exports);
|
|
|
55
55
|
__exportStar(require("./responses/collection/upgrade"), exports);
|
|
56
56
|
__exportStar(require("./responses/collection/watering-can"), exports);
|
|
57
57
|
__exportStar(require("./responses/collection/world"), exports);
|
|
58
|
+
__exportStar(require("./responses/collection/xp-potion"), exports);
|
|
58
59
|
__exportStar(require("./responses/collection/zone-flag"), exports);
|
|
59
60
|
__exportStar(require("./responses/collection/zone"), exports);
|
|
60
61
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,6CAA2B;AAC3B,0DAAwC;AACxC,yDAAuC;AACvC,mDAAiC;AACjC,oDAAkC;AAClC,iDAA+B;AAC/B,qDAAmC;AACnC,kDAAgC;AAChC,+DAA6C;AAC7C,yDAAuC;AACvC,qEAAmD;AACnD,+DAA6C;AAC7C,+DAA6C;AAC7C,6DAA2C;AAC3C,8DAA4C;AAC5C,+DAA6C;AAC7C,kEAAgD;AAChD,6DAA2C;AAC3C,qEAAmD;AACnD,qEAAmD;AACnD,+DAA6C;AAC7C,sEAAoD;AACpD,oEAAkD;AAClD,iEAA+C;AAC/C,iEAA+C;AAC/C,kEAAgD;AAChD,mEAAiD;AACjD,6DAA2C;AAC3C,gEAA8C;AAC9C,sEAAoD;AACpD,8DAA4C;AAC5C,gEAA8C;AAC9C,iEAA+C;AAC/C,qEAAmD;AACnD,8DAA4C;AAC5C,gEAA8C;AAC9C,mEAAiD;AACjD,kEAAgD;AAChD,iEAA+C;AAC/C,sEAAoD;AACpD,+DAA6C;AAC7C,mEAAiD;AACjD,8DAA4C"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,6CAA2B;AAC3B,0DAAwC;AACxC,yDAAuC;AACvC,mDAAiC;AACjC,oDAAkC;AAClC,iDAA+B;AAC/B,qDAAmC;AACnC,kDAAgC;AAChC,+DAA6C;AAC7C,yDAAuC;AACvC,qEAAmD;AACnD,+DAA6C;AAC7C,+DAA6C;AAC7C,6DAA2C;AAC3C,8DAA4C;AAC5C,+DAA6C;AAC7C,kEAAgD;AAChD,6DAA2C;AAC3C,qEAAmD;AACnD,qEAAmD;AACnD,+DAA6C;AAC7C,sEAAoD;AACpD,oEAAkD;AAClD,iEAA+C;AAC/C,iEAA+C;AAC/C,kEAAgD;AAChD,mEAAiD;AACjD,6DAA2C;AAC3C,gEAA8C;AAC9C,sEAAoD;AACpD,8DAA4C;AAC5C,gEAA8C;AAC9C,iEAA+C;AAC/C,qEAAmD;AACnD,8DAA4C;AAC5C,gEAA8C;AAC9C,mEAAiD;AACjD,kEAAgD;AAChD,iEAA+C;AAC/C,sEAAoD;AACpD,+DAA6C;AAC7C,mEAAiD;AACjD,mEAAiD;AACjD,8DAA4C"}
|
package/dist/ps99-api.d.ts
CHANGED
|
@@ -24,7 +24,7 @@ export declare class PetSimulator99API {
|
|
|
24
24
|
requestClient: RequestClient;
|
|
25
25
|
constructor(params?: PetSimulator99APIOptions);
|
|
26
26
|
private request;
|
|
27
|
-
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" | "ZoneFlags" | "Zones")[]>>;
|
|
27
|
+
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")[]>>;
|
|
28
28
|
getCollection<C extends CollectionName>(collectionName: C): Promise<ApiResponseBody<Collection<C>[]>>;
|
|
29
29
|
getClans(params?: GetClansParams): Promise<ApiResponseBody<ClansResponseBody>>;
|
|
30
30
|
getClan(name: string): Promise<ApiResponseBody<ClanResponseBody>>;
|
|
@@ -29,9 +29,10 @@ 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
|
-
export type Collections = AchievementData | BoostData | BoothData | BoxData | BuffData | CharmData | CurrencyData | EggData | EnchantmentData | FishingRodData | FruitData | GuildBattleData | HoverboardData | LootboxData | MasteryData | MerchantData | MiscItemData | PetData | PotionData | RandomEventData | RankData | RarityData | RebirthData | SecretRoomData | SeedData | ShovelData | SprinklerData | UltimateData | UpgradeData | WateringCanData | WorldData | ZoneFlagData | ZoneData;
|
|
35
|
+
export type Collections = AchievementData | BoostData | BoothData | BoxData | BuffData | CharmData | CurrencyData | EggData | EnchantmentData | FishingRodData | FruitData | GuildBattleData | HoverboardData | LootboxData | MasteryData | MerchantData | MiscItemData | PetData | PotionData | RandomEventData | RankData | RarityData | RebirthData | SecretRoomData | SeedData | ShovelData | SprinklerData | UltimateData | UpgradeData | WateringCanData | WorldData | XPPotionData | ZoneFlagData | ZoneData;
|
|
35
36
|
export type CollectionName = Collections["collection"];
|
|
36
37
|
export type Collection<C extends CollectionName> = Extract<Collections, {
|
|
37
38
|
collection: C;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { CollectionData } from "./collection-data";
|
|
2
|
+
export type XPPotionData = CollectionData<"XPPotions", XPPotionConfigData>;
|
|
3
|
+
export type XPPotionConfigData = {
|
|
4
|
+
Rarity: XPPotionRarity;
|
|
5
|
+
DisplayName: string;
|
|
6
|
+
Amount: number;
|
|
7
|
+
Desc: string;
|
|
8
|
+
Recipe: unknown;
|
|
9
|
+
Icon: string;
|
|
10
|
+
ItemId: string;
|
|
11
|
+
};
|
|
12
|
+
export type XPPotionRarity = {
|
|
13
|
+
RarityNumber: number;
|
|
14
|
+
Lootbag: unknown;
|
|
15
|
+
_id: string;
|
|
16
|
+
Color: unknown;
|
|
17
|
+
DisplayName: string;
|
|
18
|
+
Message: unknown;
|
|
19
|
+
ItemSlot: unknown;
|
|
20
|
+
Gradient: unknown;
|
|
21
|
+
Announce: boolean;
|
|
22
|
+
_script: unknown;
|
|
23
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"xp-potion.js","sourceRoot":"","sources":["../../../src/responses/collection/xp-potion.ts"],"names":[],"mappings":""}
|