artifacts-api-client 1.0.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 (41) hide show
  1. package/LICENSE.md +21 -0
  2. package/README.md +72 -0
  3. package/dist/api/artifacts-accounts.api.d.ts +8 -0
  4. package/dist/api/artifacts-accounts.api.js +16 -0
  5. package/dist/api/artifacts-characters.api.d.ts +12 -0
  6. package/dist/api/artifacts-characters.api.js +24 -0
  7. package/dist/api/artifacts-events.api.d.ts +8 -0
  8. package/dist/api/artifacts-events.api.js +16 -0
  9. package/dist/api/artifacts-grand-exchange.api.d.ts +10 -0
  10. package/dist/api/artifacts-grand-exchange.api.js +20 -0
  11. package/dist/api/artifacts-items.api.d.ts +10 -0
  12. package/dist/api/artifacts-items.api.js +20 -0
  13. package/dist/api/artifacts-maps.api.d.ts +10 -0
  14. package/dist/api/artifacts-maps.api.js +22 -0
  15. package/dist/api/artifacts-monsters.api.d.ts +10 -0
  16. package/dist/api/artifacts-monsters.api.js +20 -0
  17. package/dist/api/artifacts-my-account.api.d.ts +12 -0
  18. package/dist/api/artifacts-my-account.api.js +27 -0
  19. package/dist/api/artifacts-my-characters.api.d.ts +46 -0
  20. package/dist/api/artifacts-my-characters.api.js +98 -0
  21. package/dist/api/artifacts-resources.api.d.ts +10 -0
  22. package/dist/api/artifacts-resources.api.js +20 -0
  23. package/dist/api/artifacts-token.api.d.ts +11 -0
  24. package/dist/api/artifacts-token.api.js +23 -0
  25. package/dist/api/artifacts.api.d.ts +32 -0
  26. package/dist/api/artifacts.api.js +54 -0
  27. package/dist/errors/artifacts.error.d.ts +13 -0
  28. package/dist/errors/artifacts.error.js +16 -0
  29. package/dist/http-client/artifacts.http-client.d.ts +10 -0
  30. package/dist/http-client/artifacts.http-client.js +66 -0
  31. package/dist/index.d.ts +2 -0
  32. package/dist/index.js +7 -0
  33. package/dist/types/api-schema.types.d.ts +4442 -0
  34. package/dist/types/api-schema.types.js +6 -0
  35. package/dist/types/artifacts-api.types.d.ts +4 -0
  36. package/dist/types/artifacts-api.types.js +2 -0
  37. package/dist/types/artifacts-http-client.types.d.ts +17 -0
  38. package/dist/types/artifacts-http-client.types.js +2 -0
  39. package/dist/utils/toBase64.d.ts +1 -0
  40. package/dist/utils/toBase64.js +8 -0
  41. package/package.json +40 -0
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by openapi-typescript.
4
+ * Do not make direct changes to the file.
5
+ */
6
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,4 @@
1
+ export type ArtifactsApiParams = {
2
+ baseUrl?: string;
3
+ token?: string;
4
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,17 @@
1
+ export type RequestParams = {
2
+ method?: string;
3
+ path?: string;
4
+ query?: Record<string, any>;
5
+ body?: Record<string, any>;
6
+ isSecure?: boolean;
7
+ headers?: Record<string, any>;
8
+ };
9
+ export type GetRequestParams = {
10
+ isSecure?: boolean;
11
+ query?: Record<string, any>;
12
+ };
13
+ export type PostRequestParams = {
14
+ isSecure?: boolean;
15
+ body?: Record<string, any>;
16
+ headers?: Record<string, any>;
17
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1 @@
1
+ export declare function toBase64(str: string): string;
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.toBase64 = toBase64;
4
+ function toBase64(str) {
5
+ const bytes = new TextEncoder().encode(str);
6
+ const binString = Array.from(bytes, (byte) => String.fromCodePoint(byte)).join('');
7
+ return btoa(binString);
8
+ }
package/package.json ADDED
@@ -0,0 +1,40 @@
1
+ {
2
+ "name": "artifacts-api-client",
3
+ "version": "1.0.0",
4
+ "description": "Api client for https://artifactsmmo.com",
5
+ "main": "dist/index.js",
6
+ "repository": "https://github.com/siranweb/artifacts-api-client.git",
7
+ "keywords": [
8
+ "artifacts",
9
+ "api",
10
+ "client"
11
+ ],
12
+ "scripts": {
13
+ "test": "jest",
14
+ "build": "tsc",
15
+ "ts-check": "tsc --noEmit",
16
+ "lint": "eslint --max-warnings 0 --ext .ts lib",
17
+ "format": "prettier --log-level warn --write lib",
18
+ "generate-schema": "openapi-typescript https://api.artifactsmmo.com/openapi.json -o ./lib/types/api-schema.types.ts"
19
+ },
20
+ "author": "Kirill Gerasimenko <siranweb.public@tuta.io>",
21
+ "license": "MIT",
22
+ "engines": {
23
+ "node": ">=14.0.0"
24
+ },
25
+ "files": [
26
+ "dist",
27
+ "README.md",
28
+ "LICENSE.md"
29
+ ],
30
+ "devDependencies": {
31
+ "@types/node": "14.0.0",
32
+ "@typescript-eslint/eslint-plugin": "^6.21.0",
33
+ "@typescript-eslint/parser": "^6.21.0",
34
+ "eslint": "^8.57.0",
35
+ "eslint-config-prettier": "^8.10.0",
36
+ "openapi-typescript": "^7.3.0",
37
+ "prettier": "^3.2.5",
38
+ "typescript": "^5.4.3"
39
+ }
40
+ }