@amos.com/node 0.1.36 → 0.1.39

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@amos.com/node",
3
- "version": "0.1.36",
3
+ "version": "0.1.39",
4
4
  "description": "Node.js client for the Amos Pay API.",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -19,6 +19,8 @@
19
19
  ],
20
20
  "scripts": {
21
21
  "biome": "biome check --write",
22
+ "lint": "biome check",
23
+ "ci": "npm run typecheck && npm run lint && npm run build",
22
24
  "build": "tsup",
23
25
  "watch": "tsup --watch",
24
26
  "typecheck": "tsc --noEmit",
@@ -56,6 +58,6 @@
56
58
  "typescript": "5.9.3"
57
59
  },
58
60
  "engines": {
59
- "node": ">=24.11.0"
61
+ "node": ">=22.0.0"
60
62
  }
61
63
  }
package/src/index.ts CHANGED
@@ -6,9 +6,9 @@ import type { paths } from "../openapi/schema";
6
6
 
7
7
  export * from "../openapi/schema";
8
8
 
9
- export const PAY_API_BASE_URL_PRODUCTION = "https://pay.amos.com";
10
- export const PAY_API_BASE_URL_SANDBOX = "https://pay-sandbox.amos.com";
11
- export const PAY_API_VERSION = "1";
9
+ export const AMOS_API_BASE_URL_PRODUCTION = "https://api.amos.com";
10
+ export const AMOS_API_BASE_URL_SANDBOX = "https://api-sandbox.amos.com";
11
+ export const AMOS_API_VERSION = "1";
12
12
 
13
13
  /**
14
14
  * Create a typed `openapi-fetch` client for the Amos Pay API.
@@ -17,29 +17,27 @@ export const PAY_API_VERSION = "1";
17
17
  * fully typed against the OpenAPI spec — paths, path/query/header params,
18
18
  * request bodies, and response bodies are all checked at compile time.
19
19
  *
20
- * Provide credentials and the required `X-Api-Version` header either as
21
- * default `headers` here or via `params.header` on each call. Use
22
- * `client.use(middleware)` to add per-request behavior such as fresh
23
- * idempotency keys.
20
+ * Provide credentials and the required `X-Api-Version` header as default
21
+ * `headers` here. Use `client.use(middleware)` to add per-request behavior
22
+ * such as fresh idempotency keys.
24
23
  *
25
24
  * @example
26
25
  * ```ts
27
26
  * import {
28
27
  * createPayApiClient,
29
- * PAY_API_BASE_URL_SANDBOX,
30
- * PAY_API_VERSION,
28
+ * AMOS_API_BASE_URL_SANDBOX,
29
+ * AMOS_API_VERSION,
31
30
  * } from "@amos.com/node";
32
31
  *
33
32
  * const pay = createPayApiClient({
34
- * baseUrl: PAY_API_BASE_URL_SANDBOX,
33
+ * baseUrl: AMOS_API_BASE_URL_SANDBOX,
35
34
  * headers: {
36
35
  * "X-Api-Key": process.env.AMOS_API_KEY!,
37
- * "X-Api-Version": PAY_API_VERSION,
36
+ * "X-Api-Version": AMOS_API_VERSION,
38
37
  * },
39
38
  * });
40
39
  *
41
40
  * const { data, error } = await pay.POST("/customers", {
42
- * params: { header: { "X-Api-Version": PAY_API_VERSION } },
43
41
  * body: { customer: { email: "alex@example.com" } },
44
42
  * });
45
43
  * ```