diff --git a/AGENTS.md b/AGENTS.md index d16f4af..67b5bff 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -27,7 +27,7 @@ pnpm clean # rm dist in all packages # Per-package (run from repo root) pnpm --filter @ambosstech/core run build pnpm --filter @ambosstech/payments run codegen # regenerate GraphQL SDK from schema -pnpm --filter @ambosstech/core run refresh-schema # pull latest schema from rails.amboss.tech +pnpm --filter @ambosstech/core run refresh-schema # pull latest schema from app.amboss.tech ``` ## Architecture @@ -38,7 +38,7 @@ Shared HTTP/GraphQL transport. Not consumed directly by end users. - `AmbossClient` — base class; wraps `graphql-request`. Accepts `{ apiKey?, serviceApiKey?, baseUrl?, fetch?, timeoutMs? }`. - Default `baseUrl`: `https://rails.amboss.tech/graphql`. + Default `baseUrl`: `https://app.amboss.tech/graphql`. - Two auth headers: `apiKey` is sent as `Authorization: Bearer ...` (cross-product key); `serviceApiKey` is sent as `x-api-key` (scoped payments key). Payments resources require `serviceApiKey`. diff --git a/docs/INTEGRATION.md b/docs/INTEGRATION.md index b79f56c..9edc433 100644 --- a/docs/INTEGRATION.md +++ b/docs/INTEGRATION.md @@ -48,7 +48,7 @@ All options: new Payments({ serviceApiKey?: string, // omit for webhook-only usage webhookSecret?: string, // omit if you only call the API - baseUrl?: string, // default: https://rails.amboss.tech/graphql + baseUrl?: string, // default: https://app.amboss.tech/graphql fetch?: typeof fetch, // override for tests / non-Node runtimes timeoutMs?: number, // default: 30000 send?: Array<{ walletId, password?, teamId? }>, // pre-warm sending — see Step 4 diff --git a/packages/core/README.md b/packages/core/README.md index 32ae4b5..381df65 100644 --- a/packages/core/README.md +++ b/packages/core/README.md @@ -40,7 +40,7 @@ The pinned GraphQL schema lives at [`schema/rails.graphql`](./schema/rails.graph pnpm --filter @ambosstech/core run refresh-schema ``` -The endpoint defaults to `https://rails.amboss.tech/graphql`. Override with `AMBOSS_SCHEMA_URL`. +The endpoint defaults to `https://app.amboss.tech/graphql`. Override with `AMBOSS_SCHEMA_URL`. ## License diff --git a/packages/core/scripts/refresh-schema.ts b/packages/core/scripts/refresh-schema.ts index 9e35040..74f09fd 100644 --- a/packages/core/scripts/refresh-schema.ts +++ b/packages/core/scripts/refresh-schema.ts @@ -9,7 +9,7 @@ import { type IntrospectionQuery, } from 'graphql'; -const SCHEMA_ENDPOINT = process.env.AMBOSS_SCHEMA_URL ?? 'https://rails.amboss.tech/graphql'; +const SCHEMA_ENDPOINT = process.env.AMBOSS_SCHEMA_URL ?? 'https://app.amboss.tech/graphql'; const OUTPUT_PATH = resolve( dirname(fileURLToPath(import.meta.url)), '..', diff --git a/packages/core/src/client.test.ts b/packages/core/src/client.test.ts index 2862e39..f198973 100644 --- a/packages/core/src/client.test.ts +++ b/packages/core/src/client.test.ts @@ -7,7 +7,7 @@ import { ConfigError } from './errors.js'; describe('AmbossClient', () => { it('defaults baseUrl to production endpoint', () => { const config = AmbossClient.resolveConfig({}); - assert.equal(config.baseUrl, 'https://rails.amboss.tech/graphql'); + assert.equal(config.baseUrl, 'https://app.amboss.tech/graphql'); }); it('respects baseUrl override', () => { diff --git a/packages/core/src/client.ts b/packages/core/src/client.ts index b996616..fdefa43 100644 --- a/packages/core/src/client.ts +++ b/packages/core/src/client.ts @@ -3,7 +3,7 @@ import { ClientError, GraphQLClient, type RequestDocument, type Variables } from import { ApiError, ConfigError, NetworkError } from './errors.js'; import type { ClientConfig, FetchLike, ResolvedClientConfig } from './types.js'; -const DEFAULT_BASE_URL = 'https://rails.amboss.tech/graphql'; +const DEFAULT_BASE_URL = 'https://app.amboss.tech/graphql'; const DEFAULT_TIMEOUT_MS = 30_000; const SDK_VERSION = '0.4.0'; // x-release-please-version diff --git a/packages/payments/README.md b/packages/payments/README.md index 95d4ecc..ee70351 100644 --- a/packages/payments/README.md +++ b/packages/payments/README.md @@ -40,7 +40,7 @@ const wallets = await payments.wallets.list({ environmentId: envs[0].id }); new Payments({ serviceApiKey?: string, // scoped payments key (sent as x-api-key); omit for webhook-only use webhookSecret?: string, // omit if you only call the API - baseUrl?: string, // default: https://rails.amboss.tech/graphql + baseUrl?: string, // default: https://app.amboss.tech/graphql fetch?: typeof fetch, // override for tests / non-Node runtimes timeoutMs?: number, // default: 30000 send?: Array<{ walletId: string, password?: string, teamId?: string }>, // pre-warm — see Sending diff --git a/packages/payments/examples/receive.ts b/packages/payments/examples/receive.ts index 15fdcb4..873d5eb 100644 --- a/packages/payments/examples/receive.ts +++ b/packages/payments/examples/receive.ts @@ -29,7 +29,7 @@ function required(name: string): string { async function main(): Promise { const serviceApiKey = required('AMBOSS_API_KEY'); // the scoped payments service key (amb_live...) - const baseUrl = process.env.AMBOSS_BASE_URL; // optional; defaults to https://rails.amboss.tech/graphql + const baseUrl = process.env.AMBOSS_BASE_URL; // optional; defaults to https://app.amboss.tech/graphql const payments = new Payments({ serviceApiKey, ...(baseUrl ? { baseUrl } : {}) }); diff --git a/packages/payments/examples/send.ts b/packages/payments/examples/send.ts index 6fbf686..3333037 100644 --- a/packages/payments/examples/send.ts +++ b/packages/payments/examples/send.ts @@ -50,7 +50,7 @@ function resolveDestination(): SendDestination | null { async function main(): Promise { const serviceApiKey = required('AMBOSS_API_KEY'); // the scoped payments service key (amb_live...) - const baseUrl = process.env.AMBOSS_BASE_URL; // optional; defaults to https://rails.amboss.tech/graphql + const baseUrl = process.env.AMBOSS_BASE_URL; // optional; defaults to https://app.amboss.tech/graphql const payments = new Payments({ serviceApiKey, ...(baseUrl ? { baseUrl } : {}) });