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.
Files changed (30) hide show
  1. package/dist/index.d.ts +1 -0
  2. package/dist/index.js +1 -0
  3. package/dist/index.js.map +1 -1
  4. package/dist/ps99-api.d.ts +1 -1
  5. package/dist/responses/collection/index.d.ts +2 -1
  6. package/dist/responses/collection/xp-potion.d.ts +23 -0
  7. package/dist/responses/collection/xp-potion.js +3 -0
  8. package/dist/responses/collection/xp-potion.js.map +1 -0
  9. package/example-web/react2/package-lock.json +4954 -72
  10. package/example-web/react2/package.json +6 -1
  11. package/example-web/react2/public/manifest.json +1 -0
  12. package/example-web/react2/src/App.tsx +5 -13
  13. package/example-web/react2/src/components/CollectionConfigIndex.tsx +0 -3
  14. package/example-web/react2/src/components/DynamicCollectionConfigData.tsx +5 -78
  15. package/example-web/react2/src/components/Footer.tsx +60 -0
  16. package/example-web/react2/src/components/GenericFetchComponent.tsx +6 -9
  17. package/example-web/react2/src/components/ImageComponent.tsx +17 -19
  18. package/example-web/react2/src/components/XPPotionsComponent.tsx +30 -0
  19. package/example-web/react2/src/hooks/useOnlineStatus.ts +20 -0
  20. package/example-web/react2/src/index.tsx +4 -0
  21. package/example-web/react2/src/serviceWorkerRegistration.ts +110 -0
  22. package/example-web/react2/webpack.config.js +2 -2
  23. package/package.json +1 -1
  24. package/src/__tests__/__snapshots__/ps99-api-changes.ts.snap +23301 -20362
  25. package/src/__tests__/__snapshots__/ps99-api-live.ts.snap +1291 -581
  26. package/src/__tests__/ps99-api-live.ts +5 -0
  27. package/src/index.ts +1 -0
  28. package/src/ps99-api.ts +1 -1
  29. package/src/responses/collection/index.ts +2 -0
  30. 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"}
@@ -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,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=xp-potion.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"xp-potion.js","sourceRoot":"","sources":["../../../src/responses/collection/xp-potion.ts"],"names":[],"mappings":""}