@baziapi/sdk 1.0.3 → 1.0.4
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 +9 -10
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.mjs +1 -1
- package/package.json +13 -18
package/README.md
CHANGED
|
@@ -59,7 +59,7 @@ console.log(result.luckPillars?.pillars); // 10-year luck cycles
|
|
|
59
59
|
```typescript
|
|
60
60
|
const client = new BaziClient({
|
|
61
61
|
apiKey: 'bazi_xxxx', // Your BaZi API key
|
|
62
|
-
baseUrl: 'https://api.
|
|
62
|
+
baseUrl: 'https://api.baziapi.pro', // API base URL (default: production)
|
|
63
63
|
timeout: 10_000, // Request timeout in ms (default: 10s)
|
|
64
64
|
retries: 3, // Retry attempts for transient errors (default: 3)
|
|
65
65
|
retryDelay: 500, // Base retry delay in ms, exponential (default: 500ms)
|
|
@@ -175,7 +175,7 @@ import type {
|
|
|
175
175
|
For CSP-compliant usage, add the API domain to your `connect-src` directive:
|
|
176
176
|
|
|
177
177
|
```
|
|
178
|
-
Content-Security-Policy: connect-src 'self' https://api.
|
|
178
|
+
Content-Security-Policy: connect-src 'self' https://api.baziapi.pro;
|
|
179
179
|
```
|
|
180
180
|
|
|
181
181
|
---
|
|
@@ -702,7 +702,7 @@ functions:
|
|
|
702
702
|
| Field | Value |
|
|
703
703
|
| ------------------ | ----------------------------------------------- |
|
|
704
704
|
| **Method** | `POST` |
|
|
705
|
-
| **URL** | `https://api.
|
|
705
|
+
| **URL** | `https://api.baziapi.pro/api/v1/bazi/calculate` |
|
|
706
706
|
| **Authentication** | Header Auth → `Authorization: Bearer bazi_xxxx` |
|
|
707
707
|
| **Content-Type** | `application/json` |
|
|
708
708
|
|
|
@@ -745,7 +745,7 @@ return [{ json: result }];
|
|
|
745
745
|
|
|
746
746
|
| Field | Value |
|
|
747
747
|
| ---------------- | ----------------------------------------------- |
|
|
748
|
-
| **URL** | `https://api.
|
|
748
|
+
| **URL** | `https://api.baziapi.pro/api/v1/bazi/calculate` |
|
|
749
749
|
| **Payload Type** | `JSON` |
|
|
750
750
|
| **Headers** | `Authorization: Bearer bazi_xxxx` |
|
|
751
751
|
|
|
@@ -817,7 +817,7 @@ Use **HTTP → Make a request** module:
|
|
|
817
817
|
|
|
818
818
|
| Field | Value |
|
|
819
819
|
| ------------- | ----------------------------------------------- |
|
|
820
|
-
| **URL** | `https://api.
|
|
820
|
+
| **URL** | `https://api.baziapi.pro/api/v1/bazi/calculate` |
|
|
821
821
|
| **Method** | `POST` |
|
|
822
822
|
| **Headers** | `Authorization: Bearer bazi_xxxx` |
|
|
823
823
|
| **Body type** | `Raw` → `application/json` |
|
|
@@ -839,7 +839,7 @@ Use **HTTP → Make a request** module:
|
|
|
839
839
|
#### cURL (Testing / CI)
|
|
840
840
|
|
|
841
841
|
```bash
|
|
842
|
-
curl -X POST https://api.
|
|
842
|
+
curl -X POST https://api.baziapi.pro/api/v1/bazi/calculate \
|
|
843
843
|
-H "Authorization: Bearer bazi_xxxx" \
|
|
844
844
|
-H "Content-Type: application/json" \
|
|
845
845
|
-d '{
|
|
@@ -886,12 +886,11 @@ To use this SDK in production, you need an active API Key from our platform. We
|
|
|
886
886
|
|
|
887
887
|
## Support
|
|
888
888
|
|
|
889
|
-
- **Email:**
|
|
890
|
-
- **Documentation:**
|
|
891
|
-
- **Repository:** [https://github.com/Shoyas/bazi-api-sdk](https://github.com/Shoyas/bazi-api-sdk)
|
|
889
|
+
- **Email:** support@baziapi.pro
|
|
890
|
+
- **Website & Documentation:** [https://baziapi.pro](https://baziapi.pro)
|
|
892
891
|
|
|
893
892
|
---
|
|
894
893
|
|
|
895
894
|
## License
|
|
896
895
|
|
|
897
|
-
MIT ©
|
|
896
|
+
MIT © Md. Nasir Uddin Shoyas
|
package/dist/index.cjs
CHANGED
|
@@ -722,7 +722,7 @@ async function verifyWebhookSignature(options) {
|
|
|
722
722
|
var __defProp = Object.defineProperty;
|
|
723
723
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
724
724
|
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
725
|
-
const DEFAULT_BASE_URL = "https://api.
|
|
725
|
+
const DEFAULT_BASE_URL = "https://api.baziapi.pro";
|
|
726
726
|
const DEFAULT_TIMEOUT = 1e4;
|
|
727
727
|
const DEFAULT_RETRIES = 3;
|
|
728
728
|
const DEFAULT_RETRY_DELAY = 500;
|
package/dist/index.d.cts
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
/** Internal configuration for the HttpClient. */
|
|
7
7
|
interface HttpClientConfig {
|
|
8
|
-
/** Root API URL without trailing slash. e.g. `https://api.
|
|
8
|
+
/** Root API URL without trailing slash. e.g. `https://api.baziapi.pro` */
|
|
9
9
|
readonly baseUrl: string;
|
|
10
10
|
/** API key for Bearer token authentication. */
|
|
11
11
|
readonly apiKey: string;
|
|
@@ -760,7 +760,7 @@ interface BaziClientOptions {
|
|
|
760
760
|
readonly apiKey?: string;
|
|
761
761
|
/**
|
|
762
762
|
* Base URL of the BaZi API server.
|
|
763
|
-
* @default 'https://api.
|
|
763
|
+
* @default 'https://api.baziapi.pro'
|
|
764
764
|
*/
|
|
765
765
|
readonly baseUrl?: string;
|
|
766
766
|
/**
|
package/dist/index.d.mts
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
/** Internal configuration for the HttpClient. */
|
|
7
7
|
interface HttpClientConfig {
|
|
8
|
-
/** Root API URL without trailing slash. e.g. `https://api.
|
|
8
|
+
/** Root API URL without trailing slash. e.g. `https://api.baziapi.pro` */
|
|
9
9
|
readonly baseUrl: string;
|
|
10
10
|
/** API key for Bearer token authentication. */
|
|
11
11
|
readonly apiKey: string;
|
|
@@ -760,7 +760,7 @@ interface BaziClientOptions {
|
|
|
760
760
|
readonly apiKey?: string;
|
|
761
761
|
/**
|
|
762
762
|
* Base URL of the BaZi API server.
|
|
763
|
-
* @default 'https://api.
|
|
763
|
+
* @default 'https://api.baziapi.pro'
|
|
764
764
|
*/
|
|
765
765
|
readonly baseUrl?: string;
|
|
766
766
|
/**
|
package/dist/index.d.ts
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
/** Internal configuration for the HttpClient. */
|
|
7
7
|
interface HttpClientConfig {
|
|
8
|
-
/** Root API URL without trailing slash. e.g. `https://api.
|
|
8
|
+
/** Root API URL without trailing slash. e.g. `https://api.baziapi.pro` */
|
|
9
9
|
readonly baseUrl: string;
|
|
10
10
|
/** API key for Bearer token authentication. */
|
|
11
11
|
readonly apiKey: string;
|
|
@@ -760,7 +760,7 @@ interface BaziClientOptions {
|
|
|
760
760
|
readonly apiKey?: string;
|
|
761
761
|
/**
|
|
762
762
|
* Base URL of the BaZi API server.
|
|
763
|
-
* @default 'https://api.
|
|
763
|
+
* @default 'https://api.baziapi.pro'
|
|
764
764
|
*/
|
|
765
765
|
readonly baseUrl?: string;
|
|
766
766
|
/**
|
package/dist/index.mjs
CHANGED
|
@@ -720,7 +720,7 @@ async function verifyWebhookSignature(options) {
|
|
|
720
720
|
var __defProp = Object.defineProperty;
|
|
721
721
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
722
722
|
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
723
|
-
const DEFAULT_BASE_URL = "https://api.
|
|
723
|
+
const DEFAULT_BASE_URL = "https://api.baziapi.pro";
|
|
724
724
|
const DEFAULT_TIMEOUT = 1e4;
|
|
725
725
|
const DEFAULT_RETRIES = 3;
|
|
726
726
|
const DEFAULT_RETRY_DELAY = 500;
|
package/package.json
CHANGED
|
@@ -1,17 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@baziapi/sdk",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.4",
|
|
4
4
|
"description": "Official TypeScript SDK for the BaZi API",
|
|
5
5
|
"author": "Md. Nasir Uddin Shoyas",
|
|
6
6
|
"license": "MIT",
|
|
7
|
-
"
|
|
8
|
-
"type": "git",
|
|
9
|
-
"url": "https://github.com/Shoyas/bazi-api-sdk.git",
|
|
10
|
-
"directory": "packages/bazi"
|
|
11
|
-
},
|
|
12
|
-
"homepage": "https://github.com/Shoyas/bazi-api-sdk#readme",
|
|
7
|
+
"homepage": "https://baziapi.pro",
|
|
13
8
|
"bugs": {
|
|
14
|
-
"url": "https://
|
|
9
|
+
"url": "https://baziapi.pro"
|
|
15
10
|
},
|
|
16
11
|
"type": "module",
|
|
17
12
|
"exports": {
|
|
@@ -44,6 +39,15 @@
|
|
|
44
39
|
"api-client"
|
|
45
40
|
],
|
|
46
41
|
"sideEffects": false,
|
|
42
|
+
"devDependencies": {
|
|
43
|
+
"@typescript-eslint/eslint-plugin": "^8.0.0",
|
|
44
|
+
"@typescript-eslint/parser": "^8.0.0",
|
|
45
|
+
"@vitest/coverage-v8": "^2.0.0",
|
|
46
|
+
"eslint": "^9.0.0",
|
|
47
|
+
"typescript": "^5.6.3",
|
|
48
|
+
"unbuild": "^3.0.0",
|
|
49
|
+
"vitest": "^2.0.0"
|
|
50
|
+
},
|
|
47
51
|
"scripts": {
|
|
48
52
|
"build": "unbuild",
|
|
49
53
|
"dev": "unbuild --stub",
|
|
@@ -53,14 +57,5 @@
|
|
|
53
57
|
"type-check": "tsc --noEmit",
|
|
54
58
|
"lint": "eslint src",
|
|
55
59
|
"clean": "rm -rf dist"
|
|
56
|
-
},
|
|
57
|
-
"devDependencies": {
|
|
58
|
-
"@typescript-eslint/eslint-plugin": "^8.0.0",
|
|
59
|
-
"@typescript-eslint/parser": "^8.0.0",
|
|
60
|
-
"@vitest/coverage-v8": "^2.0.0",
|
|
61
|
-
"eslint": "^9.0.0",
|
|
62
|
-
"typescript": "^5.6.3",
|
|
63
|
-
"unbuild": "^3.0.0",
|
|
64
|
-
"vitest": "^2.0.0"
|
|
65
60
|
}
|
|
66
|
-
}
|
|
61
|
+
}
|