@gethydra/sdk 0.1.13 → 0.1.15
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 +3 -3
- package/dist/index.d.ts +744 -211
- package/dist/index.js +54 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -29,7 +29,7 @@ Configure the client with your secret API key, available in the [Hydra admin pan
|
|
|
29
29
|
```ts
|
|
30
30
|
import { Hydra } from '@gethydra/sdk';
|
|
31
31
|
|
|
32
|
-
const hydra = new Hydra({ apiKey: '
|
|
32
|
+
const hydra = new Hydra({ apiKey: 'sk_...' });
|
|
33
33
|
|
|
34
34
|
const { data: products } = await hydra.products.list({ limit: 10 });
|
|
35
35
|
console.log(products[0].title);
|
|
@@ -112,7 +112,7 @@ const isValid = await verifyWebhookSignature(rawBody, signatureHeader, webhookSe
|
|
|
112
112
|
|
|
113
113
|
```ts
|
|
114
114
|
const hydra = new Hydra({
|
|
115
|
-
apiKey: '
|
|
115
|
+
apiKey: 'sk_...',
|
|
116
116
|
baseUrl: 'https://api.hydrajs.dev', // default
|
|
117
117
|
timeout: 80_000, // 80 seconds (default)
|
|
118
118
|
maxNetworkRetries: 1, // default
|
|
@@ -125,7 +125,7 @@ const hydra = new Hydra({
|
|
|
125
125
|
|
|
126
126
|
| Option | Default | Description |
|
|
127
127
|
| ------------------- | ---------------------------- | ---------------------------------------------- |
|
|
128
|
-
| `apiKey` | (required) | Your Hydra API key (`
|
|
128
|
+
| `apiKey` | (required) | Your Hydra API key (`sk_*` or `pk_*`) |
|
|
129
129
|
| `baseUrl` | `https://api.hydrajs.dev` | API base URL |
|
|
130
130
|
| `timeout` | `80000` | Request timeout in milliseconds |
|
|
131
131
|
| `maxNetworkRetries` | `1` | Max automatic retries on network/server errors |
|