import type jose from 'jose'; import type { Country } from './Country.js'; import type { Language } from './Language.js'; import type { LanguageMap } from './LanguageMap.js'; import type { Localized } from './Localized.js'; import type { MemberNumberAlgorithm } from './MemberNumberAlgorithm.js'; import type { StamhoofdDomains } from './StamhoofdDomains.js'; /** * The environment that is available everywhere: frontend, backend and shared */ export type SharedEnvironment = { /** * We'll map the value of NODE_ENV to the corresponsing value. But staging value isn't valid for NODE_ENV, hence our own variable */ readonly environment: 'production' | 'development' | 'staging' | 'test'; readonly domains: StamhoofdDomains; /** * List of the supported locales for this platform */ readonly locales?: Partial>; /** * organization = users are specific to one organization * platform = users are shared between organizations */ readonly userMode: 'organization' | 'platform'; readonly translationNamespace: string; readonly platformName: string; readonly fixedCountry?: Country; /** * This server only uses a single organization */ readonly singleOrganization?: string; }; /** * The specific backend environment values, only available in the backend services */ export type BackendSpecificEnvironment = { readonly PORT: number; readonly DB_HOST: string; readonly DB_USER: string; readonly DB_PASS: string; readonly DB_DATABASE: string; readonly DB_PORT?: number; readonly DB_CONNECTION_LIMIT?: number; readonly SMTP_HOST: string; readonly SMTP_USERNAME: string; readonly SMTP_PASSWORD: string; readonly SMTP_PORT: number; readonly SMTP_HEADERS?: Record; readonly TRANSACTIONAL_SMTP_HOST: string; readonly TRANSACTIONAL_SMTP_USERNAME: string; readonly TRANSACTIONAL_SMTP_PASSWORD: string; readonly TRANSACTIONAL_SMTP_PORT: number; readonly TRANSACTIONAL_SMTP_HEADERS?: Record; readonly TRANSACTIONAL_WHITELIST?: string[]; readonly AWS_ACCESS_KEY_ID: string; readonly AWS_SECRET_ACCESS_KEY: string; readonly AWS_REGION: 'eu-west-1' | string; readonly AWS_BOUNCE_QUEUE_URL?: string | null; readonly AWS_COMPLAINTS_QUEUE_URL?: string | null; readonly AWS_FORWARDING_QUEUE_URL?: string | null; readonly SPACES_ENDPOINT: string; readonly SPACES_BUCKET: string; readonly SPACES_KEY: string; readonly SPACES_SECRET: string; readonly SPACES_PREFIX?: string; readonly MOLLIE_CLIENT_ID: string; readonly MOLLIE_SECRET: string; readonly MOLLIE_API_KEY: string; readonly MOLLIE_ORGANIZATION_TOKEN: string; readonly LATEST_IOS_VERSION: number; readonly LATEST_ANDROID_VERSION: number; /** * SHA-256 fingerprints of the signing certificates of the Android apps that may use the * passkeys of this platform, in the colon separated hexadecimal notation of * assetlinks.json ("A0:7B:...:75"). * * Android reports the calling app as the WebAuthn origin * (`android:apk-key-hash:`) instead of the address of the web view, so a * passkey used inside the app can only be verified when its certificate is listed here. * Keep in sync with the assetlinks.json of the dashboard domain. */ readonly ANDROID_PASSKEY_SHA256_CERT_FINGERPRINTS?: string[]; readonly NOLT_SSO_SECRET_KEY?: string; readonly STRIPE_ACCOUNT_ID?: string; readonly STRIPE_SECRET_KEY?: string; readonly STRIPE_CONNECT_ENDPOINT_SECRET?: string; readonly STRIPE_ENDPOINT_SECRET?: string; readonly STRIPE_CONNECT_METHOD?: 'express' | 'standard'; readonly INTERNAL_SECRET_KEY: string; /** * Extra keys that are also accepted when verifying internal signatures, so multiple * platforms (each with their own INTERNAL_SECRET_KEY) can share one service. */ readonly EXTRA_INTERNAL_SECRET_KEYS?: string[]; readonly FILE_SIGNING_PUBLIC_KEY: jose.JWK; readonly FILE_SIGNING_PRIVATE_KEY: jose.JWK; readonly FILE_SIGNING_ALG?: string; readonly CRONS_DISABLED?: boolean; readonly RECOMMAND_TEAM_ID?: string; readonly RECOMMAND_COMPANY_ID?: string; readonly RECOMMAND_KEY?: string; readonly RECOMMAND_SECRET?: string; readonly PEPPOL_EMAIL_HANDLERS?: string[]; /** * Send each invoice in bcc to these recipients */ readonly INVOICE_BCC?: string[]; readonly WHITELISTED_EMAIL_DESTINATIONS?: string[]; readonly CACHE_PATH: string; readonly MEMBER_NUMBER_ALGORITHM?: MemberNumberAlgorithm; readonly MEMBER_NUMBER_ALGORITHM_LENGTH?: number; readonly UITPAS_API_URL?: string; readonly UITPAS_API_CLIENT_ID?: string; readonly UITPAS_API_CLIENT_SECRET?: string; readonly GATEWAYAPI_TOKEN?: string; readonly HEALTH_ACCESS_KEY?: string; }; export type BackendEnvironment = SharedEnvironment & BackendSpecificEnvironment; /** * Environment only available in the frontend apps */ export type FrontendSpecificEnvironment = { readonly PORT?: number; readonly VERSION: string; readonly NOLT_URL?: string; readonly FEEDBACK_URL?: string; readonly MOLLIE_CLIENT_ID?: string; readonly APP_UPDATE_SERVER_URL?: string; readonly APP_UPDATE_PRODUCTION_SERVER_URL?: string; readonly APP_UPDATE_STAGING_SERVER_URL?: string; readonly APP_UPDATE_DEVELOPMENT_SERVER_URL?: string; readonly CHANGELOG_URL?: Localized<`https://${string}`>; readonly ILLUSTRATIONS_NAMESPACE?: string; readonly ILLUSTRATIONS_COLORS?: Record; readonly PLAUSIBLE_DOMAIN?: string; /** * Redirect users that are not logged in to this domain (maintaining the same path) */ readonly REDIRECT_LOGIN_DOMAIN?: string; /** * Custom documentation page for members */ readonly memberDocumentationPage?: LanguageMap; }; /** * The environment that is available everywhere: frontend, backend and shared */ export type RedirecterEnvironment = { /** * We'll map the value of NODE_ENV to the corresponsing value. But staging value isn't valid for NODE_ENV, hence our own variable */ readonly environment: 'production' | 'development' | 'staging' | 'test'; readonly PORT: number; readonly domains: string[]; }; /** * The environment that is available everywhere: frontend, backend and shared */ export type RendererEnvironment = { /** * We'll map the value of NODE_ENV to the corresponsing value. But staging value isn't valid for NODE_ENV, hence our own variable */ readonly environment: 'production' | 'development' | 'staging' | 'test'; readonly PORT: number; readonly CACHE_PATH: string; readonly INTERNAL_SECRET_KEY: string; /** * Extra keys that are also accepted when verifying internal signatures, so multiple * platforms (each with their own INTERNAL_SECRET_KEY) can share one renderer. */ readonly EXTRA_INTERNAL_SECRET_KEYS?: string[]; readonly translationNamespace: string; readonly platformName: string; /** * Overrides the source URL for the trusted IP whitelist that guards the /prerender endpoint * (see TrustedIPWhitelist). The list is a plain-text file with one entry per line, each being * a single IP, a CIDR range or a "start-end" range (IPv4 and IPv6 supported); it's cached * locally so a transient fetch outage doesn't drop the whitelist. * * In production and staging a built-in default URL is used when this is unset, so whitelisting * is on by default there. In local development and tests it's off unless this is set. */ readonly PRERENDER_IP_WHITELIST_URL?: string; readonly HEALTH_ACCESS_KEY?: string; }; /** * The environment that is available everywhere: frontend, backend and shared */ export type BackupEnvironment = { /** * We'll map the value of NODE_ENV to the corresponsing value. But staging value isn't valid for NODE_ENV, hence our own variable */ readonly environment: 'production' | 'development' | 'staging' | 'test'; readonly PORT: number; readonly DB_HOST: string; readonly DB_DATABASE: string; readonly DB_USER: string; readonly DB_PASS: string; readonly CRONS_DISABLED?: boolean; readonly keyFingerprint: string; readonly objectStoragePath: string; readonly localBackupFolder: string; readonly SPACES_ENDPOINT: string; readonly SPACES_BUCKET: string; readonly SPACES_KEY: string; readonly SPACES_SECRET: string; readonly AWS_REGION: 'eu-west-1' | string; readonly MINIMUM_BACKUP_SIZE?: number; readonly IS_REPLICA?: boolean; readonly HEALTH_ACCESS_KEY?: string; }; export type FrontendEnvironment = SharedEnvironment & FrontendSpecificEnvironment; //# sourceMappingURL=Environment.d.ts.map