@baziapi/sdk 1.0.2 → 1.0.3
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 +6 -6
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
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.example.com', // 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.example.com;
|
|
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.example.com/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.example.com/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.example.com/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.example.com/api/v1/bazi/calculate \
|
|
843
843
|
-H "Authorization: Bearer bazi_xxxx" \
|
|
844
844
|
-H "Content-Type: application/json" \
|
|
845
845
|
-d '{
|
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.example.com";
|
|
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
package/dist/index.d.mts
CHANGED
package/dist/index.d.ts
CHANGED
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.example.com";
|
|
724
724
|
const DEFAULT_TIMEOUT = 1e4;
|
|
725
725
|
const DEFAULT_RETRIES = 3;
|
|
726
726
|
const DEFAULT_RETRY_DELAY = 500;
|