@alyvro/api-service 1.2.0 → 1.2.1

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/README.md CHANGED
@@ -17,6 +17,15 @@
17
17
  - ✅ Lightweight, fast, and production-ready
18
18
  - ✅ Typed Axios response
19
19
 
20
+ ---
21
+
22
+ ## Examples
23
+
24
+ - [Basic Express Usage](./examples/express-basic)
25
+ <!-- - [Express + Telegram Logging](./examples/express-with-telegram) -->
26
+
27
+ ---
28
+
20
29
  ### 📦 Installation
21
30
 
22
31
  ```bash
@@ -21,10 +21,6 @@ type ConfigMiddlewareType = {
21
21
  skip_routers: string[];
22
22
  powerd_by: string;
23
23
  };
24
- type ApiTypes = {
25
- prefix: string;
26
- data_returns: any;
27
- };
28
24
  type ConfigType = {
29
25
  url: string;
30
26
  logger?: boolean;
@@ -32,7 +28,6 @@ type ConfigType = {
32
28
  env?: ConfigEnvType;
33
29
  setting?: Partial<ConfigSettingType>;
34
30
  middleware?: Partial<ConfigMiddlewareType>;
35
- api_types?: ApiTypes[];
36
31
  };
37
32
 
38
- export type { ApiTypes as A, ConfigType as C, ConfigEnvType as a, ConfigSettingType as b, ConfigMiddlewareHeadersType as c, ConfigMiddlewareErrorsType as d, ConfigMiddlewareType as e };
33
+ export type { ConfigType as C, ConfigEnvType as a, ConfigSettingType as b, ConfigMiddlewareHeadersType as c, ConfigMiddlewareErrorsType as d, ConfigMiddlewareType as e };
@@ -21,10 +21,6 @@ type ConfigMiddlewareType = {
21
21
  skip_routers: string[];
22
22
  powerd_by: string;
23
23
  };
24
- type ApiTypes = {
25
- prefix: string;
26
- data_returns: any;
27
- };
28
24
  type ConfigType = {
29
25
  url: string;
30
26
  logger?: boolean;
@@ -32,7 +28,6 @@ type ConfigType = {
32
28
  env?: ConfigEnvType;
33
29
  setting?: Partial<ConfigSettingType>;
34
30
  middleware?: Partial<ConfigMiddlewareType>;
35
- api_types?: ApiTypes[];
36
31
  };
37
32
 
38
- export type { ApiTypes as A, ConfigType as C, ConfigEnvType as a, ConfigSettingType as b, ConfigMiddlewareHeadersType as c, ConfigMiddlewareErrorsType as d, ConfigMiddlewareType as e };
33
+ export type { ConfigType as C, ConfigEnvType as a, ConfigSettingType as b, ConfigMiddlewareHeadersType as c, ConfigMiddlewareErrorsType as d, ConfigMiddlewareType as e };
package/dist/index.d.mts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { R as ReturnFunction, C as CacheEntry } from './cache-BA2IH48s.mjs';
2
2
  import { A as ApiResponseMapDefault, a as AlyvroAxiosInstance } from './api-BD94m-ym.mjs';
3
3
  import { Request, Response as Response$1, NextFunction } from 'express';
4
- import { C as ConfigType } from './config-Bc2nkAbT.mjs';
4
+ import { C as ConfigType } from './config-D4K0a7Gt.mjs';
5
5
  import 'axios';
6
6
 
7
7
  interface RetryOptions {
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { R as ReturnFunction, C as CacheEntry } from './cache-BA2IH48s.js';
2
2
  import { A as ApiResponseMapDefault, a as AlyvroAxiosInstance } from './api-BD94m-ym.js';
3
3
  import { Request, Response as Response$1, NextFunction } from 'express';
4
- import { C as ConfigType } from './config-Bc2nkAbT.js';
4
+ import { C as ConfigType } from './config-D4K0a7Gt.js';
5
5
  import 'axios';
6
6
 
7
7
  interface RetryOptions {
package/dist/types.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- export { A as ApiTypes, a as ConfigEnvType, d as ConfigMiddlewareErrorsType, c as ConfigMiddlewareHeadersType, e as ConfigMiddlewareType, b as ConfigSettingType, C as ConfigType } from './config-Bc2nkAbT.mjs';
1
+ export { a as ConfigEnvType, d as ConfigMiddlewareErrorsType, c as ConfigMiddlewareHeadersType, e as ConfigMiddlewareType, b as ConfigSettingType, C as ConfigType } from './config-D4K0a7Gt.mjs';
2
2
  export { C as CacheEntry, R as ReturnFunction } from './cache-BA2IH48s.mjs';
3
3
  import 'axios';
4
4
 
package/dist/types.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export { A as ApiTypes, a as ConfigEnvType, d as ConfigMiddlewareErrorsType, c as ConfigMiddlewareHeadersType, e as ConfigMiddlewareType, b as ConfigSettingType, C as ConfigType } from './config-Bc2nkAbT.js';
1
+ export { a as ConfigEnvType, d as ConfigMiddlewareErrorsType, c as ConfigMiddlewareHeadersType, e as ConfigMiddlewareType, b as ConfigSettingType, C as ConfigType } from './config-D4K0a7Gt.js';
2
2
  export { C as CacheEntry, R as ReturnFunction } from './cache-BA2IH48s.js';
3
3
  import 'axios';
4
4
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alyvro/api-service",
3
- "version": "1.2.0",
3
+ "version": "1.2.1",
4
4
  "description": "A minimal yet powerful service for sending HTTP requests on the client and handling them gracefully on the server. No complicated setup. Just plug in your keys — and you're ready to go.",
5
5
  "types": "./dist/index.d.ts",
6
6
  "main": "./dist/index.js",
@@ -26,11 +26,22 @@
26
26
  "require": "./dist/types.js"
27
27
  }
28
28
  },
29
+ "scripts": {
30
+ "build": "pnpm remove-dist && tsup",
31
+ "remove-dist": "tsx scripts/remove-dist.ts",
32
+ "rel": "pnpm build && pnpm publish",
33
+ "test": "vitest --run",
34
+ "coverage": "vitest run --coverage",
35
+ "release": "release-it",
36
+ "changelog": "release-it --only-changelog"
37
+ },
29
38
  "keywords": [
30
39
  "api-service",
31
40
  "api",
32
41
  "alyvro-package",
33
- "alyvro"
42
+ "alyvro",
43
+ "express",
44
+ "middleware"
34
45
  ],
35
46
  "author": "alyvro",
36
47
  "license": "MIT",
@@ -41,12 +52,11 @@
41
52
  "url": "https://github.com/Alyvro/api-service/issues",
42
53
  "email": "support@alyvro.com"
43
54
  },
55
+ "packageManager": "pnpm@10.11.1",
44
56
  "dependencies": {
45
57
  "axios": "^1.11.0",
46
58
  "express": "^5.1.0",
47
59
  "jsonwebtoken": "^9.0.2",
48
- "parse-url": "^10.0.3",
49
- "tsup": "^8.5.0",
50
60
  "zlib": "^1.0.5"
51
61
  },
52
62
  "devDependencies": {
@@ -58,19 +68,10 @@
58
68
  "@vitest/coverage-v8": "^3.2.4",
59
69
  "msw": "^2.11.3",
60
70
  "release-it": "^19.0.5",
71
+ "tsup": "^8.5.0",
61
72
  "tsx": "^4.20.3",
62
73
  "typescript": "^5.8.3",
63
74
  "vite-tsconfig-paths": "^5.1.4",
64
- "vitest": "^3.2.4",
65
- "whatwg-fetch": "^3.6.20"
66
- },
67
- "scripts": {
68
- "build": "pnpm remove-dist && tsup",
69
- "remove-dist": "tsx scripts/remove-dist.ts",
70
- "rel": "pnpm build && pnpm publish",
71
- "test": "vitest --run",
72
- "coverage": "vitest run --coverage",
73
- "release": "release-it",
74
- "changelog": "release-it --only-changelog"
75
+ "vitest": "^3.2.4"
75
76
  }
76
- }
77
+ }