From ce0d5c96aeb1ef9b49d1c998fcf4659f21781a71 Mon Sep 17 00:00:00 2001 From: byteworthy Date: Wed, 15 Jul 2026 07:57:44 -0500 Subject: [PATCH] fix: use branded Data API host --- src/client.ts | 6 +++--- test/tools.test.ts | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/client.ts b/src/client.ts index e6c9f70..740991c 100644 --- a/src/client.ts +++ b/src/client.ts @@ -29,13 +29,13 @@ export const UPSTREAM_API_CONFIG: UpstreamClientConfig = { /** * The Upstream Data synthetic-claims service — a SEPARATE host and key from the platform API. - * `data.upstream.cx` is the marketing site, NOT the API; the API is the Railway service below, - * overridable via UPSTREAM_DATA_SERVICE_URL (e.g. once a stable branded subdomain is wired). + * `data.upstream.cx` is the marketing site, NOT the API; the API uses its dedicated subdomain and + * remains overridable via UPSTREAM_DATA_SERVICE_URL for local or isolated deployments. */ export const UPSTREAM_DATA_CONFIG: UpstreamClientConfig = { baseUrlEnv: 'UPSTREAM_DATA_SERVICE_URL', apiKeyEnv: 'UPSTREAM_DATA_API_KEY', - defaultBaseUrl: 'https://upstream-data-production.up.railway.app', + defaultBaseUrl: 'https://api.data.upstream.cx', serviceLabel: 'Upstream Data', }; diff --git a/test/tools.test.ts b/test/tools.test.ts index 1e894e4..bd2d943 100644 --- a/test/tools.test.ts +++ b/test/tools.test.ts @@ -254,7 +254,7 @@ describe('UpstreamAPIClient (Upstream Data service config)', () => { vi.restoreAllMocks(); }); - it('defaults to the upstream-data Railway host and sends UPSTREAM_DATA_API_KEY', async () => { + it('defaults to the branded Upstream Data API host and sends UPSTREAM_DATA_API_KEY', async () => { process.env['UPSTREAM_DATA_API_KEY'] = 'data_key_xyz'; const mockFetch = makeFetchMock(200, { synthetic_only: true }); vi.stubGlobal('fetch', mockFetch); @@ -263,7 +263,7 @@ describe('UpstreamAPIClient (Upstream Data service config)', () => { await dataClient.get('/api/v1/data/catalog/'); const [calledUrl, calledInit] = mockFetch.mock.calls[0] as [URL, RequestInit & { headers: Record }]; - expect(calledUrl.toString()).toBe('https://upstream-data-production.up.railway.app/api/v1/data/catalog/'); + expect(calledUrl.toString()).toBe('https://api.data.upstream.cx/api/v1/data/catalog/'); expect(calledInit.headers['X-API-Key']).toBe('data_key_xyz'); }); @@ -457,7 +457,7 @@ describe('synthetic data (dataset catalog) tools', () => { }); const [calledUrl] = mockFetch.mock.calls[0] as [URL, RequestInit]; expect(calledUrl.toString()).toBe( - 'https://upstream-data-production.up.railway.app/api/v1/data/catalog/', + 'https://api.data.upstream.cx/api/v1/data/catalog/', ); });