Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
};

Expand Down
6 changes: 3 additions & 3 deletions test/tools.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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<string, string> }];
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');
});

Expand Down Expand Up @@ -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/',
);
});

Expand Down