@seekora-ai/search-sdk 0.1.1 → 0.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
@@ -29,70 +29,22 @@ const results = await client.search('laptop', {
29
29
  await client.trackClick('prod_123', 1, results.searchId);
30
30
  ```
31
31
 
32
- ## Environment Configuration
32
+ ## Configuration
33
33
 
34
- The SDK supports different environments for development, staging, and production.
34
+ The SDK uses the production API by default (`https://api.seekora.com/api`).
35
35
 
36
- ### Option 1: Environment Parameter
36
+ ### Custom Base URL
37
37
 
38
- ```typescript
39
- // Local development
40
- const client = new SeekoraClient({
41
- storeId: 'your-store-id',
42
- readSecret: 'your-read-secret',
43
- environment: 'local', // Uses http://localhost:3000
44
- });
45
-
46
- // Staging
47
- const client = new SeekoraClient({
48
- storeId: 'your-store-id',
49
- readSecret: 'your-read-secret',
50
- environment: 'stage', // Uses https://stage-api.seekora.ai
51
- });
52
-
53
- // Production
54
- const client = new SeekoraClient({
55
- storeId: 'your-store-id',
56
- readSecret: 'your-read-secret',
57
- environment: 'production', // Uses https://api.seekora.com
58
- });
59
- ```
60
-
61
- ### Option 2: Environment Variable
62
-
63
- Set the `SEEKORA_ENV` environment variable:
64
-
65
- ```bash
66
- # Local development
67
- SEEKORA_ENV=local node your-app.js
68
-
69
- # Staging (default)
70
- SEEKORA_ENV=stage node your-app.js
71
-
72
- # Production
73
- SEEKORA_ENV=production node your-app.js
74
- ```
75
-
76
- ### Option 3: Custom Base URL
38
+ To use a custom API endpoint (e.g. your own deployment), pass `baseUrl`:
77
39
 
78
40
  ```typescript
79
41
  const client = new SeekoraClient({
80
42
  storeId: 'your-store-id',
81
43
  readSecret: 'your-read-secret',
82
- baseUrl: 'https://custom-api.example.com', // Custom base URL
44
+ baseUrl: 'https://your-api.example.com/api',
83
45
  });
84
46
  ```
85
47
 
86
- ## Available Environments
87
-
88
- | Environment | Base URL | Description |
89
- |------------|----------|-------------|
90
- | `local` | `http://localhost:3000` | Local development |
91
- | `stage` | `https://stage-api.seekora.ai` | Staging (default) |
92
- | `production` | `https://api.seekora.com` | Production |
93
-
94
- **Default:** `stage` (staging environment)
95
-
96
48
  ## API Methods
97
49
 
98
50
  ### Search