@mixpeek/prebid 1.0.0 → 1.0.2
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/CHANGELOG.md +1 -1
- package/ENDPOINTS.md +21 -27
- package/QUICKSTART.md +5 -5
- package/README.md +225 -333
- package/dist/mixpeekContextAdapter.js +1 -1
- package/dist/mixpeekContextAdapter.js.map +1 -1
- package/docs/MIGRATION_V2.md +4 -4
- package/docs/api-reference.md +1 -1
- package/docs/health-check.md +5 -5
- package/docs/integration-guide.md +5 -5
- package/package.json +10 -4
- package/src/api/mixpeekClient.js +133 -32
- package/src/config/constants.js +13 -8
- package/src/modules/mixpeekContextAdapter.js +55 -3
package/CHANGELOG.md
CHANGED
|
@@ -147,7 +147,7 @@ This is the first stable release. No migration required.
|
|
|
147
147
|
For questions, issues, or feature requests:
|
|
148
148
|
|
|
149
149
|
- **Documentation**: https://docs.mixpeek.com
|
|
150
|
-
- **GitHub Issues**: https://github.com/mixpeek/prebid
|
|
150
|
+
- **GitHub Issues**: https://github.com/mixpeek/prebid/issues
|
|
151
151
|
- **Email**: support@mixpeek.com
|
|
152
152
|
- **Slack**: https://mixpeek.com/slack
|
|
153
153
|
|
package/ENDPOINTS.md
CHANGED
|
@@ -6,7 +6,7 @@ The Mixpeek adapter can work with different API endpoints. This is useful for de
|
|
|
6
6
|
|
|
7
7
|
| Environment | URL | Use Case |
|
|
8
8
|
|-------------|-----|----------|
|
|
9
|
-
| **Development** | `https://
|
|
9
|
+
| **Development** | `https://api.mixpeek.com` | Testing and development |
|
|
10
10
|
| **Production** | `https://api.mixpeek.com` | Production deployment |
|
|
11
11
|
| **Local** | `http://localhost:8000` | Local development |
|
|
12
12
|
|
|
@@ -17,8 +17,8 @@ The Mixpeek adapter can work with different API endpoints. This is useful for de
|
|
|
17
17
|
Set the endpoint before running tests or building:
|
|
18
18
|
|
|
19
19
|
```bash
|
|
20
|
-
# Use
|
|
21
|
-
export MIXPEEK_API_ENDPOINT=https://
|
|
20
|
+
# Use production API endpoint (recommended)
|
|
21
|
+
export MIXPEEK_API_ENDPOINT=https://api.mixpeek.com
|
|
22
22
|
|
|
23
23
|
# Or use production
|
|
24
24
|
export MIXPEEK_API_ENDPOINT=https://api.mixpeek.com
|
|
@@ -34,10 +34,10 @@ Edit `.mixpeek.config.js`:
|
|
|
34
34
|
```javascript
|
|
35
35
|
module.exports = {
|
|
36
36
|
// Option 1: Direct URL
|
|
37
|
-
endpoint: 'https://
|
|
37
|
+
endpoint: 'https://api.mixpeek.com',
|
|
38
38
|
|
|
39
39
|
// Option 2: Use predefined names
|
|
40
|
-
endpoint: '
|
|
40
|
+
endpoint: 'production', // or 'local'
|
|
41
41
|
|
|
42
42
|
// Your credentials
|
|
43
43
|
apiKey: process.env.MIXPEEK_API_KEY,
|
|
@@ -58,8 +58,7 @@ pbjs.setConfig({
|
|
|
58
58
|
mixpeek: {
|
|
59
59
|
apiKey: 'YOUR_API_KEY',
|
|
60
60
|
collectionId: 'YOUR_COLLECTION_ID',
|
|
61
|
-
endpoint: 'https://
|
|
62
|
-
// endpoint: 'https://api.mixpeek.com', // Production server
|
|
61
|
+
endpoint: 'https://api.mixpeek.com', // Production API
|
|
63
62
|
timeout: 5000,
|
|
64
63
|
featureExtractors: ['taxonomy']
|
|
65
64
|
}
|
|
@@ -73,7 +72,7 @@ For browser-based configuration:
|
|
|
73
72
|
```html
|
|
74
73
|
<script>
|
|
75
74
|
// Set before loading the adapter
|
|
76
|
-
window.MIXPEEK_API_ENDPOINT = 'https://
|
|
75
|
+
window.MIXPEEK_API_ENDPOINT = 'https://api.mixpeek.com';
|
|
77
76
|
</script>
|
|
78
77
|
<script src="mixpeekContextAdapter.js"></script>
|
|
79
78
|
```
|
|
@@ -83,8 +82,8 @@ For browser-based configuration:
|
|
|
83
82
|
### For Development & Testing
|
|
84
83
|
|
|
85
84
|
```bash
|
|
86
|
-
# Set
|
|
87
|
-
export MIXPEEK_API_ENDPOINT=https://
|
|
85
|
+
# Set production endpoint
|
|
86
|
+
export MIXPEEK_API_ENDPOINT=https://api.mixpeek.com
|
|
88
87
|
export MIXPEEK_API_KEY=your_dev_key
|
|
89
88
|
|
|
90
89
|
# Validate setup
|
|
@@ -117,10 +116,6 @@ Create a shell script for easy switching:
|
|
|
117
116
|
# switch-endpoint.sh
|
|
118
117
|
|
|
119
118
|
case "$1" in
|
|
120
|
-
dev|development)
|
|
121
|
-
export MIXPEEK_API_ENDPOINT=https://server-xb24.onrender.com
|
|
122
|
-
echo "✅ Switched to development: https://server-xb24.onrender.com"
|
|
123
|
-
;;
|
|
124
119
|
prod|production)
|
|
125
120
|
export MIXPEEK_API_ENDPOINT=https://api.mixpeek.com
|
|
126
121
|
echo "✅ Switched to production: https://api.mixpeek.com"
|
|
@@ -145,7 +140,7 @@ esac
|
|
|
145
140
|
### Development (.env.development)
|
|
146
141
|
|
|
147
142
|
```bash
|
|
148
|
-
MIXPEEK_API_ENDPOINT=https://
|
|
143
|
+
MIXPEEK_API_ENDPOINT=https://api.mixpeek.com
|
|
149
144
|
MIXPEEK_API_KEY=sk_dev_key
|
|
150
145
|
MIXPEEK_COLLECTION_ID=col_dev_collection
|
|
151
146
|
MIXPEEK_NAMESPACE=development
|
|
@@ -187,7 +182,7 @@ Output will show:
|
|
|
187
182
|
API Key: ✅ Set
|
|
188
183
|
Collection ID: ✅ Set
|
|
189
184
|
Namespace: ⚠️ Not set (using default)
|
|
190
|
-
Endpoint: https://
|
|
185
|
+
Endpoint: https://api.mixpeek.com 👈 Current endpoint
|
|
191
186
|
```
|
|
192
187
|
|
|
193
188
|
## CI/CD Configuration
|
|
@@ -204,10 +199,10 @@ jobs:
|
|
|
204
199
|
runs-on: ubuntu-latest
|
|
205
200
|
steps:
|
|
206
201
|
- uses: actions/checkout@v3
|
|
207
|
-
- name: Test against
|
|
202
|
+
- name: Test against production API
|
|
208
203
|
env:
|
|
209
|
-
MIXPEEK_API_ENDPOINT: https://
|
|
210
|
-
MIXPEEK_API_KEY: ${{ secrets.
|
|
204
|
+
MIXPEEK_API_ENDPOINT: https://api.mixpeek.com
|
|
205
|
+
MIXPEEK_API_KEY: ${{ secrets.MIXPEEK_PROD_API_KEY }}
|
|
211
206
|
run: npm run test:live
|
|
212
207
|
|
|
213
208
|
test-prod:
|
|
@@ -237,8 +232,8 @@ Adjust timeout accordingly:
|
|
|
237
232
|
```javascript
|
|
238
233
|
pbjs.setConfig({
|
|
239
234
|
mixpeek: {
|
|
240
|
-
endpoint: 'https://
|
|
241
|
-
timeout:
|
|
235
|
+
endpoint: 'https://api.mixpeek.com',
|
|
236
|
+
timeout: 250
|
|
242
237
|
}
|
|
243
238
|
});
|
|
244
239
|
```
|
|
@@ -247,10 +242,10 @@ pbjs.setConfig({
|
|
|
247
242
|
|
|
248
243
|
### "Cannot connect to endpoint"
|
|
249
244
|
|
|
250
|
-
Check if the
|
|
245
|
+
Check if the API is reachable:
|
|
251
246
|
|
|
252
247
|
```bash
|
|
253
|
-
curl https://
|
|
248
|
+
curl https://api.mixpeek.com/v1/health
|
|
254
249
|
```
|
|
255
250
|
|
|
256
251
|
Expected response:
|
|
@@ -273,7 +268,7 @@ Clear and reset if needed:
|
|
|
273
268
|
|
|
274
269
|
```bash
|
|
275
270
|
unset MIXPEEK_API_ENDPOINT
|
|
276
|
-
export MIXPEEK_API_ENDPOINT=https://
|
|
271
|
+
export MIXPEEK_API_ENDPOINT=https://api.mixpeek.com
|
|
277
272
|
```
|
|
278
273
|
|
|
279
274
|
### "Different results between endpoints"
|
|
@@ -287,10 +282,10 @@ Use the same collection ID across environments when possible.
|
|
|
287
282
|
|
|
288
283
|
## Current Default
|
|
289
284
|
|
|
290
|
-
The adapter
|
|
285
|
+
The adapter defaults to the **production API**:
|
|
291
286
|
|
|
292
287
|
```
|
|
293
|
-
https://
|
|
288
|
+
https://api.mixpeek.com
|
|
294
289
|
```
|
|
295
290
|
|
|
296
291
|
This can be changed in:
|
|
@@ -302,7 +297,6 @@ This can be changed in:
|
|
|
302
297
|
## Support
|
|
303
298
|
|
|
304
299
|
For endpoint-specific issues:
|
|
305
|
-
- **Development server**: Check [https://server-xb24.onrender.com/](https://server-xb24.onrender.com/) status
|
|
306
300
|
- **Production API**: Check [https://status.mixpeek.com](https://status.mixpeek.com)
|
|
307
301
|
- **General help**: support@mixpeek.com
|
|
308
302
|
|
package/QUICKSTART.md
CHANGED
|
@@ -21,14 +21,14 @@ npm install
|
|
|
21
21
|
# Set your API credentials
|
|
22
22
|
export MIXPEEK_API_KEY="sk_your_api_key_here"
|
|
23
23
|
|
|
24
|
-
# Use
|
|
25
|
-
export MIXPEEK_API_ENDPOINT="https://
|
|
24
|
+
# Use production API endpoint
|
|
25
|
+
export MIXPEEK_API_ENDPOINT="https://api.mixpeek.com"
|
|
26
26
|
|
|
27
27
|
# Optional: Set a collection ID (will create if not set)
|
|
28
28
|
export MIXPEEK_COLLECTION_ID="col_your_collection_id"
|
|
29
29
|
```
|
|
30
30
|
|
|
31
|
-
> **Note**:
|
|
31
|
+
> **Note**: Use the production API: `https://api.mixpeek.com`.
|
|
32
32
|
|
|
33
33
|
## 3. Validate Setup
|
|
34
34
|
|
|
@@ -132,7 +132,7 @@ pbjs.que.push(function() {
|
|
|
132
132
|
params: {
|
|
133
133
|
apiKey: 'YOUR_API_KEY',
|
|
134
134
|
collectionId: 'YOUR_COLLECTION_ID',
|
|
135
|
-
endpoint: 'https://
|
|
135
|
+
endpoint: 'https://api.mixpeek.com', // Production API
|
|
136
136
|
featureExtractors: ['taxonomy'],
|
|
137
137
|
mode: 'auto',
|
|
138
138
|
timeout: 5000, // Higher timeout for dev server
|
|
@@ -217,7 +217,7 @@ testTimeout: 60000 // 60 seconds
|
|
|
217
217
|
|
|
218
218
|
- **Documentation**: https://docs.mixpeek.com
|
|
219
219
|
- **Email**: support@mixpeek.com
|
|
220
|
-
- **GitHub Issues**: https://github.com/mixpeek/prebid
|
|
220
|
+
- **GitHub Issues**: https://github.com/mixpeek/prebid/issues
|
|
221
221
|
|
|
222
222
|
## What's Next?
|
|
223
223
|
|