@miradorlabs/parallax-web 2.0.1 → 2.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/README.md +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.esm.js +2 -2
- package/dist/index.umd.js +2 -2
- package/example/README.md +1 -1
- package/example/app.js +3 -3
- package/example/proxy-server.js +1 -1
- package/package.json +1 -1
- package/src/parallax/client.ts +2 -2
- package/tests/parallax.test.ts +2 -2
package/README.md
CHANGED
|
@@ -52,7 +52,7 @@ new ParallaxClient(apiKey: string, apiUrl?: string)
|
|
|
52
52
|
| Parameter | Type | Required | Description |
|
|
53
53
|
|-----------|------|----------|-------------|
|
|
54
54
|
| `apiKey` | `string` | Yes | API key for authentication (sent as `x-parallax-api-key` header) |
|
|
55
|
-
| `apiUrl` | `string` | No | Gateway URL (defaults to `https://parallax-gateway
|
|
55
|
+
| `apiUrl` | `string` | No | Gateway URL (defaults to `https://parallax-gateway-dev.mirador.org:443`) |
|
|
56
56
|
|
|
57
57
|
#### Methods
|
|
58
58
|
|
package/dist/index.d.ts
CHANGED
|
@@ -91,7 +91,7 @@ declare class ParallaxClient {
|
|
|
91
91
|
/**
|
|
92
92
|
* Create a new ParallaxClient instance
|
|
93
93
|
* @param apiKey Required API key for authentication (sent as x-parallax-api-key header)
|
|
94
|
-
* @param apiUrl Optional gateway URL (defaults to parallax-gateway
|
|
94
|
+
* @param apiUrl Optional gateway URL (defaults to parallax-gateway-dev.mirador.org:443)
|
|
95
95
|
*/
|
|
96
96
|
constructor(apiKey: string, apiUrl?: string);
|
|
97
97
|
/**
|
package/dist/index.esm.js
CHANGED
|
@@ -2283,7 +2283,7 @@ class ParallaxTrace {
|
|
|
2283
2283
|
}
|
|
2284
2284
|
}
|
|
2285
2285
|
|
|
2286
|
-
const DEFAULT_API_URL = 'https://parallax-gateway
|
|
2286
|
+
const DEFAULT_API_URL = 'https://parallax-gateway-dev.mirador.org:443';
|
|
2287
2287
|
/**
|
|
2288
2288
|
* Main client for interacting with the Parallax Gateway API
|
|
2289
2289
|
*/
|
|
@@ -2291,7 +2291,7 @@ class ParallaxClient {
|
|
|
2291
2291
|
/**
|
|
2292
2292
|
* Create a new ParallaxClient instance
|
|
2293
2293
|
* @param apiKey Required API key for authentication (sent as x-parallax-api-key header)
|
|
2294
|
-
* @param apiUrl Optional gateway URL (defaults to parallax-gateway
|
|
2294
|
+
* @param apiUrl Optional gateway URL (defaults to parallax-gateway-dev.mirador.org:443)
|
|
2295
2295
|
*/
|
|
2296
2296
|
constructor(apiKey, apiUrl) {
|
|
2297
2297
|
Object.defineProperty(this, "apiUrl", {
|
package/dist/index.umd.js
CHANGED
|
@@ -2289,7 +2289,7 @@
|
|
|
2289
2289
|
}
|
|
2290
2290
|
}
|
|
2291
2291
|
|
|
2292
|
-
const DEFAULT_API_URL = 'https://parallax-gateway
|
|
2292
|
+
const DEFAULT_API_URL = 'https://parallax-gateway-dev.mirador.org:443';
|
|
2293
2293
|
/**
|
|
2294
2294
|
* Main client for interacting with the Parallax Gateway API
|
|
2295
2295
|
*/
|
|
@@ -2297,7 +2297,7 @@
|
|
|
2297
2297
|
/**
|
|
2298
2298
|
* Create a new ParallaxClient instance
|
|
2299
2299
|
* @param apiKey Required API key for authentication (sent as x-parallax-api-key header)
|
|
2300
|
-
* @param apiUrl Optional gateway URL (defaults to parallax-gateway
|
|
2300
|
+
* @param apiUrl Optional gateway URL (defaults to parallax-gateway-dev.mirador.org:443)
|
|
2301
2301
|
*/
|
|
2302
2302
|
constructor(apiKey, apiUrl) {
|
|
2303
2303
|
Object.defineProperty(this, "apiUrl", {
|
package/example/README.md
CHANGED
package/example/app.js
CHANGED
|
@@ -3,11 +3,11 @@ import { ParallaxClient } from '../dist/index.esm.js';
|
|
|
3
3
|
|
|
4
4
|
// Initialize the client
|
|
5
5
|
// Use proxy to avoid CORS issues (default)
|
|
6
|
-
// To use direct connection, change to: 'https://parallax-gateway
|
|
6
|
+
// To use direct connection, change to: 'https://parallax-gateway-dev.mirador.org:443'
|
|
7
7
|
const USE_PROXY = true;
|
|
8
|
-
const GATEWAY_URL = USE_PROXY
|
|
8
|
+
const GATEWAY_URL = USE_PROXY
|
|
9
9
|
? 'http://localhost:3001' // Proxy server (no CORS issues)
|
|
10
|
-
: 'https://parallax-gateway
|
|
10
|
+
: 'https://parallax-gateway-dev.mirador.org:443'; // Direct (may have CORS issues)
|
|
11
11
|
|
|
12
12
|
const client = new ParallaxClient('demo-api-key', GATEWAY_URL);
|
|
13
13
|
|
package/example/proxy-server.js
CHANGED
|
@@ -11,7 +11,7 @@ const app = express();
|
|
|
11
11
|
const PORT = 3001;
|
|
12
12
|
|
|
13
13
|
// Target Parallax Gateway
|
|
14
|
-
const GATEWAY_URL = 'https://parallax-gateway
|
|
14
|
+
const GATEWAY_URL = 'https://parallax-gateway-dev.mirador.org:443';
|
|
15
15
|
|
|
16
16
|
// Enable CORS for all origins (development only)
|
|
17
17
|
app.use(cors({
|
package/package.json
CHANGED
package/src/parallax/client.ts
CHANGED
|
@@ -5,7 +5,7 @@ import { CreateTraceRequest } from 'mirador-gateway-parallax-web/proto/gateway/p
|
|
|
5
5
|
import { ParallaxGatewayServiceClient } from 'mirador-gateway-parallax-web/proto/gateway/parallax/v1/Parallax_gatewayServiceClientPb';
|
|
6
6
|
import { ParallaxTrace } from './trace';
|
|
7
7
|
|
|
8
|
-
const DEFAULT_API_URL = 'https://parallax-gateway
|
|
8
|
+
const DEFAULT_API_URL = 'https://parallax-gateway-dev.mirador.org:443';
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
* Main client for interacting with the Parallax Gateway API
|
|
@@ -18,7 +18,7 @@ export class ParallaxClient {
|
|
|
18
18
|
/**
|
|
19
19
|
* Create a new ParallaxClient instance
|
|
20
20
|
* @param apiKey Required API key for authentication (sent as x-parallax-api-key header)
|
|
21
|
-
* @param apiUrl Optional gateway URL (defaults to parallax-gateway
|
|
21
|
+
* @param apiUrl Optional gateway URL (defaults to parallax-gateway-dev.mirador.org:443)
|
|
22
22
|
*/
|
|
23
23
|
constructor(apiKey: string, apiUrl?: string) {
|
|
24
24
|
this.apiKey = apiKey;
|
package/tests/parallax.test.ts
CHANGED
|
@@ -97,7 +97,7 @@ describe('ParallaxClient', () => {
|
|
|
97
97
|
|
|
98
98
|
it('should use default gateway URL when not provided', () => {
|
|
99
99
|
const client = new ParallaxClient('my-api-key');
|
|
100
|
-
expect(client.apiUrl).toBe('https://parallax-gateway
|
|
100
|
+
expect(client.apiUrl).toBe('https://parallax-gateway-dev.mirador.org:443');
|
|
101
101
|
});
|
|
102
102
|
|
|
103
103
|
it('should use custom gateway URL when provided', () => {
|
|
@@ -111,7 +111,7 @@ describe('ParallaxClient', () => {
|
|
|
111
111
|
new ParallaxClient(apiKey);
|
|
112
112
|
|
|
113
113
|
expect(ParallaxGatewayServiceClient).toHaveBeenCalledWith(
|
|
114
|
-
'https://parallax-gateway
|
|
114
|
+
'https://parallax-gateway-dev.mirador.org:443',
|
|
115
115
|
{ 'x-parallax-api-key': apiKey }
|
|
116
116
|
);
|
|
117
117
|
});
|