ps99-api 1.0.0 → 1.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.
Files changed (60) hide show
  1. package/.github/actions/test/action.yml +27 -0
  2. package/.github/workflows/release-on-main.yml +7 -7
  3. package/.github/workflows/test-on-branch.yml +18 -0
  4. package/.idea/jsLibraryMappings.xml +6 -0
  5. package/README.md +1 -0
  6. package/dist/index.d.ts +11 -0
  7. package/dist/index.js +11 -0
  8. package/dist/index.js.map +1 -0
  9. package/dist/params/clans.d.ts +8 -0
  10. package/dist/params/clans.js +1 -0
  11. package/dist/params/clans.js.map +1 -0
  12. package/dist/ps99-api.d.ts +26 -0
  13. package/dist/ps99-api.js +1 -0
  14. package/dist/ps99-api.js.map +1 -0
  15. package/dist/request-client/axios.d.ts +3 -0
  16. package/dist/request-client/axios.js +1 -0
  17. package/dist/request-client/axios.js.map +1 -0
  18. package/dist/request-client/common.d.ts +18 -0
  19. package/dist/request-client/common.js +1 -0
  20. package/dist/request-client/common.js.map +1 -0
  21. package/dist/responses/activeClanBattle.d.ts +37 -0
  22. package/dist/responses/activeClanBattle.js +1 -0
  23. package/dist/responses/activeClanBattle.js.map +1 -0
  24. package/dist/responses/clan.d.ts +83 -0
  25. package/dist/responses/clan.js +1 -0
  26. package/dist/responses/clan.js.map +1 -0
  27. package/dist/responses/clans.d.ts +14 -0
  28. package/dist/responses/clans.js +1 -0
  29. package/dist/responses/clans.js.map +1 -0
  30. package/dist/responses/collection.d.ts +1357 -0
  31. package/dist/responses/collection.js +1 -0
  32. package/dist/responses/collection.js.map +1 -0
  33. package/dist/responses/collections.d.ts +5 -0
  34. package/dist/responses/collections.js +1 -0
  35. package/dist/responses/collections.js.map +1 -0
  36. package/dist/responses/exists.d.ts +14 -0
  37. package/dist/responses/exists.js +1 -0
  38. package/dist/responses/exists.js.map +1 -0
  39. package/dist/responses/rap.d.ts +15 -0
  40. package/dist/responses/rap.js +1 -0
  41. package/dist/responses/rap.js.map +1 -0
  42. package/dump-result.js +9 -0
  43. package/package.json +3 -3
  44. package/src/__tests__/__snapshots__/ps99-api-live.ts.snap +98822 -0
  45. package/src/__tests__/ps99-api-changes.ts +36 -0
  46. package/src/__tests__/ps99-api-live.ts +177 -0
  47. package/src/index.ts +10 -0
  48. package/src/ps99-api.ts +3 -4
  49. package/src/responses/activeClanBattle.ts +42 -19
  50. package/src/responses/clan.ts +90 -64
  51. package/src/responses/clans.ts +11 -21
  52. package/src/responses/collection.ts +1543 -1261
  53. package/src/responses/collections.ts +1 -1
  54. package/src/responses/exists.ts +13 -18
  55. package/src/responses/rap.ts +14 -27
  56. package/tsconfig.json +5 -2
  57. package/dist/__tests__/ps99-api.js +0 -150
  58. package/dist/common.js +0 -2
  59. package/src/common.ts +0 -2
  60. package/tsconfig.build.json +0 -10
@@ -1,2 +1,3 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=collection.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"collection.js","sourceRoot":"","sources":["../../src/responses/collection.ts"],"names":[],"mappings":""}
@@ -0,0 +1,5 @@
1
+ import { Collection } from "./collection";
2
+ export type CollectionsResponseBody = {
3
+ status: string;
4
+ data: Collection[];
5
+ };
@@ -1,2 +1,3 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=collections.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"collections.js","sourceRoot":"","sources":["../../src/responses/collections.ts"],"names":[],"mappings":""}
@@ -0,0 +1,14 @@
1
+ export type ExistsData = {
2
+ category: string;
3
+ configData: ExistsConfigData;
4
+ value: number;
5
+ };
6
+ export type ExistsConfigData = {
7
+ id: string;
8
+ pt?: number;
9
+ sh?: boolean;
10
+ };
11
+ export type ExistsResponseBody = {
12
+ status: string;
13
+ data: ExistsData[];
14
+ };
@@ -1,2 +1,3 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=exists.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"exists.js","sourceRoot":"","sources":["../../src/responses/exists.ts"],"names":[],"mappings":""}
@@ -0,0 +1,15 @@
1
+ export type RapData = {
2
+ category: string;
3
+ configData: RapConfigData;
4
+ value: number;
5
+ };
6
+ export type RapConfigData = {
7
+ id: string;
8
+ pt?: number;
9
+ sh?: boolean;
10
+ tn?: number;
11
+ };
12
+ export type RAPResponseBody = {
13
+ status: string;
14
+ data: RapData[];
15
+ };
@@ -1,2 +1,3 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=rap.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rap.js","sourceRoot":"","sources":["../../src/responses/rap.ts"],"names":[],"mappings":""}
package/dump-result.js ADDED
@@ -0,0 +1,9 @@
1
+ /**
2
+ * convert a snapshot result to friendly json and then update interface via
3
+ * https://transform.tools/json-to-typescript
4
+ */
5
+ let dumpResult =
6
+ []
7
+
8
+ const fs = require('fs');
9
+ fs.writeFileSync('out.json', JSON.stringify(dumpResult, null, 2));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ps99-api",
3
- "version": "1.0.0",
3
+ "version": "1.1.0",
4
4
  "description": "Pet Simulator Public API wrapper written in Typescript.",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -8,7 +8,7 @@
8
8
  "license": "MIT",
9
9
  "scripts": {
10
10
  "test": "npx jest",
11
- "build": "npx tsc --project tsconfig.build.json",
11
+ "build": "npx tsc",
12
12
  "semantic-release": "npx semantic-release",
13
13
  "format": "npx prettier --write \"src/**/*.ts\""
14
14
  },
@@ -33,7 +33,7 @@
33
33
  },
34
34
  "repository": {
35
35
  "type": "git",
36
- "url": "https://github.com/joekiller/node-ps99-api.git"
36
+ "url": "git+https://github.com/joekiller/node-ps99-api.git"
37
37
  },
38
38
  "config": {
39
39
  "commitizen": {