@sortlist/cli 0.52.0 → 0.53.0

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/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts","../src/commands/config.ts","../src/lib/application-session.ts","../src/lib/auth.ts","../src/lib/output.ts","../src/lib/config.ts","../src/lib/env.ts","../src/lib/package-root.ts","../src/commands/dynamic.ts","../src/graphql/client.ts","../src/lib/api-headers.ts","../src/lib/token-claims.ts","../src/lib/client-credentials.ts","../src/lib/company.ts","../src/lib/sentry.ts","../src/graphql/generated/graphql.ts","../src/graphql/generated/gql.ts","../src/graphql/operations/hermes.ts","../src/graphql/query-builder.ts","../src/lib/render.ts","../src/commands/login.ts","../src/graphql/operations/common.ts","../src/lib/browser.ts","../src/commands/logout.ts","../src/commands/token.ts","../src/commands/use.ts","../src/commands/whoami.ts","../src/graphql/introspection.ts","../src/lib/version-check.ts"],"sourcesContent":["import { Command } from 'commander';\n\nimport { configCommand } from './commands/config.ts';\nimport { buildOperationCommands, formatOperationList, formatTypeInspection } from './commands/dynamic.ts';\nimport { loginCommand } from './commands/login.ts';\nimport { logoutCommand } from './commands/logout.ts';\nimport { tokenCommand } from './commands/token.ts';\nimport { useCommand } from './commands/use.ts';\nimport { whoamiCommand } from './commands/whoami.ts';\nimport { getIntrospectedSchema, refreshSchema } from './graphql/introspection.ts';\nimport { error, hint, info } from './lib/output.ts';\nimport { pkg } from './lib/package-root.ts';\nimport { captureException, flushSentry, initSentry } from './lib/sentry.ts';\nimport { checkForUpdates } from './lib/version-check.ts';\n\ninitSentry();\n\n// ── Colored help output ──\n\nconst useColor = process.stdout.isTTY && !process.env.NO_COLOR;\nconst ansi = {\n reset: '\\x1b[0m',\n bold: '\\x1b[1m',\n dim: '\\x1b[2m',\n cyan: '\\x1b[36m',\n yellow: '\\x1b[33m',\n green: '\\x1b[32m',\n};\n\nfunction colorizeHelp(text: string): string {\n if (!useColor) return text;\n return text.replace(\n /^(Usage|Options|Commands|Arguments|Quick start|Services|Examples|Queries|Mutations):(.*)$/gm,\n `${ansi.cyan}${ansi.bold}$1:$2${ansi.reset}`,\n );\n}\n\nconst colorOutput = {\n writeOut: (str: string) => process.stdout.write(colorizeHelp(str)),\n writeErr: (str: string) => process.stderr.write(colorizeHelp(str)),\n};\n\nfunction applyColorToAllCommands(cmd: Command): void {\n cmd.configureOutput(colorOutput);\n for (const sub of cmd.commands) {\n applyColorToAllCommands(sub as Command);\n }\n}\n\nconst BASE_DESCRIPTION =\n 'Sortlist CLI — query and manage the Sortlist platform from your terminal\\n\\n' +\n 'Quick start:\\n' +\n ' sl login Authenticate with your Sortlist account\\n' +\n \" sl whoami Check who you're logged in as\";\n\nfunction buildRootDescription(operationCount: number): string {\n const parts = [BASE_DESCRIPTION];\n\n if (operationCount > 0) {\n parts.push(\n `Every federation operation is a command (${operationCount} available).\\n` +\n 'Operation names are unique across the supergraph, so they are not namespaced:\\n' +\n ' sl operations List them all\\n' +\n ' sl operations --search company\\n' +\n ' sl <operation> --help Flags for one operation',\n );\n\n parts.push(\n 'Examples:\\n' +\n ' sl organizations --limit 5\\n' +\n ' sl create-application --name continuous-integration\\n' +\n ' sl config show',\n );\n }\n\n return parts.join('\\n\\n');\n}\n\nconst program = new Command()\n .name('sl')\n .configureOutput({\n writeOut: (str) => process.stdout.write(colorizeHelp(str)),\n writeErr: (str) => process.stderr.write(colorizeHelp(str)),\n })\n .description(BASE_DESCRIPTION)\n .version(pkg.version)\n .option('--endpoint <url>', 'Override the federation endpoint URL')\n .option('--company <slug|id>', 'Act for this company, by slug or id; must be one you belong to')\n .option('--json', 'Output as JSON (auto-enabled when stdout is not a TTY)')\n .option('--no-color', 'Disable colored output');\n\n// Auth commands (hand-written — interactive flows)\nprogram.addCommand(loginCommand);\nprogram.addCommand(logoutCommand);\nprogram.addCommand(whoamiCommand);\nprogram.addCommand(tokenCommand);\nprogram.addCommand(useCommand);\nprogram.addCommand(configCommand);\n\n// Schema refresh command\nconst schemaCommand = new Command('schema').description('Manage the cached GraphQL schema');\n\nschemaCommand\n .command('refresh')\n .description('Force-refresh the cached schema from the federation endpoint')\n .action(async function (this: Command) {\n const opts = this.optsWithGlobals();\n try {\n await refreshSchema(opts.endpoint);\n info('Schema refreshed successfully.');\n } catch (err) {\n error(`Failed to refresh schema: ${(err as Error).message}`);\n hint('Check your network connection and endpoint: sl config show');\n process.exit(1);\n }\n });\n\nschemaCommand\n .command('inspect <type>')\n .description('Show the fields/values of a schema type (e.g. an input filter or enum)')\n .action(async function (this: Command, typeName: string) {\n const opts = this.optsWithGlobals();\n try {\n const { schema } = await getIntrospectedSchema(opts.endpoint);\n const formatted = formatTypeInspection(schema, typeName);\n if (!formatted) {\n error(`No type named \"${typeName}\" in the schema.`);\n hint('Type names are case-sensitive, e.g. `sl schema inspect OrganizationFilterInput`.');\n hint('Find argument types in any command’s --help output.');\n process.exit(1);\n }\n info(formatted);\n } catch (err) {\n error(`Could not read the schema: ${(err as Error).message}`);\n hint('Check your network connection and endpoint: sl config show');\n process.exit(1);\n }\n });\n\nprogram.addCommand(schemaCommand);\n\n// Parse --endpoint early so introspection uses the right URL\nconst endpointIdx = process.argv.indexOf('--endpoint');\nconst endpointOverride = endpointIdx !== -1 ? process.argv[endpointIdx + 1] : undefined;\n\n// Register every federation operation as a top-level command. Hidden from the\n// root help — listing 70-odd entries there would bury the curated commands — and\n// discoverable through `sl operations`.\ntry {\n const { schema, fieldServices } = await getIntrospectedSchema(endpointOverride);\n const operations = buildOperationCommands(schema, fieldServices);\n\n for (const operation of operations) {\n program.addCommand(operation.command, { hidden: true });\n }\n\n const operationsCommand = new Command('operations')\n .summary('List every federation operation available as a command')\n .option('--search <text>', 'Filter by operation or subgraph name')\n .action(function (this: Command) {\n info(formatOperationList(operations, this.opts().search as string | undefined));\n });\n\n program.addCommand(operationsCommand);\n program.description(buildRootDescription(operations.length));\n} catch (err) {\n // Schema fetch failed — the hand-written commands must still work.\n const message = (err as Error).message;\n const offline = ['login', 'logout', 'config', 'token', 'whoami', 'schema'];\n if (!process.argv.some((a) => offline.includes(a))) {\n error(`Could not fetch schema: ${message}`);\n hint('Check your network connection and endpoint: sl config show');\n hint('You can still use: sl login, sl config, sl schema refresh');\n process.exit(1);\n }\n}\n\napplyColorToAllCommands(program);\n\nawait checkForUpdates();\n\ntry {\n await program.parseAsync(process.argv);\n} catch (err) {\n captureException(err);\n await flushSentry();\n throw err;\n}\n\nawait flushSentry();\n","import { Command } from 'commander';\n\nimport { clearApplicationSession } from '../lib/application-session.ts';\nimport { clearCredentials, clearElevatedCredentials } from '../lib/auth.ts';\nimport { loadConfig, resetConfig, saveConfig } from '../lib/config.ts';\nimport { isLocalDev } from '../lib/env.ts';\nimport { error, hint, info, isJsonMode, printJson, success } from '../lib/output.ts';\n\n// The token endpoint is a different host from the federation endpoint in every\n// environment, so it cannot be derived — switching environments has to move both\n// or an application credential keeps being exchanged against the previous one.\nexport const ENVIRONMENTS = [\n {\n name: 'production',\n label: 'federation.sortlist.com',\n endpoint: 'https://federation.sortlist.com/graphql',\n tokenEndpoint: 'https://hermes.sortlist.com/oauth/token',\n },\n {\n name: 'staging',\n label: 'federation.sortlist-test.com',\n endpoint: 'https://federation.sortlist-test.com/graphql',\n tokenEndpoint: 'https://hermes.sortlist-test.com/oauth/token',\n },\n {\n name: 'local',\n label: 'localhost:4020',\n endpoint: 'http://localhost:4020/graphql',\n tokenEndpoint: 'http://localhost:8003/oauth/token',\n },\n] as const;\n\nexport const configCommand = new Command('config')\n .summary('View or update CLI configuration')\n .description(\n 'View or update CLI configuration\\n\\n' +\n 'Manage your company context and credentials.\\n\\n' +\n 'Examples:\\n' +\n ' sl config show See current endpoint and company\\n' +\n ' sl config set company <slug|id> Act for that company on every command\\n' +\n (isLocalDev ? ' sl config set endpoint <url> Point to a custom endpoint\\n' : '') +\n ' sl config reset Clear all config and credentials',\n );\n\nconfigCommand\n .command('show')\n .description('Show current configuration')\n .action(function (this: Command) {\n const opts = this.optsWithGlobals();\n const config = loadConfig();\n if (isJsonMode(opts)) {\n printJson(config);\n } else {\n info(`Endpoint: ${config.endpoint}`);\n if (config.tokenEndpoint) info(`Token endpoint: ${config.tokenEndpoint}`);\n if (config.company) info(`Company: ${config.company}`);\n }\n });\n\n// `endpoint` is dev-only — published builds always target production, so the\n// endpoint must not be overridable there (mirrors the gated use-* commands).\nconst SETTABLE_KEYS = [...(isLocalDev ? ['endpoint'] : []), 'company', 'tokenEndpoint'];\n\nconfigCommand\n .command('set <key> <value>')\n .description(`Set a config value (${SETTABLE_KEYS.join(', ')})`)\n .action((key: string, value: string) => {\n if (!SETTABLE_KEYS.includes(key)) {\n error(`Unknown config key: \"${key}\".`);\n info('');\n info(' Allowed keys:');\n for (const k of SETTABLE_KEYS) {\n info(` ${k}`);\n }\n hint('Usage: sl config set <key> <value>');\n process.exit(1);\n }\n saveConfig({ [key]: value });\n success(`Set ${key} = ${value}`);\n });\n\nif (isLocalDev) {\n for (const environment of ENVIRONMENTS) {\n configCommand\n .command(`use-${environment.name}`)\n .description(`Point CLI to ${environment.name} (${environment.label})`)\n .action(() => {\n saveConfig({ endpoint: environment.endpoint, tokenEndpoint: environment.tokenEndpoint });\n success(`Endpoint set to ${environment.endpoint}`);\n info(`Token endpoint set to ${environment.tokenEndpoint}`);\n hint(`Run \\`sl login\\` to authenticate against ${environment.name}.`);\n });\n }\n}\n\nconfigCommand\n .command('reset')\n .description('Reset all config and credentials')\n .action(() => {\n resetConfig();\n clearCredentials();\n clearElevatedCredentials();\n clearApplicationSession();\n success('Config, credentials and any application session cleared.');\n hint('Run `sl login` to re-authenticate.');\n });\n","import fs from 'node:fs';\nimport os from 'node:os';\nimport path from 'node:path';\n\n/**\n * A token minted for an application, held for the life of one CLI session.\n *\n * The credential behind it is revoked the moment the token is issued, so what\n * sits on disk cannot mint anything — it is a bearer token that expires, exactly\n * like the human one beside it. Nothing here is long-lived.\n */\nconst SESSION_PATH = path.join(os.homedir(), '.sortlist', 'application-session.json');\n\nexport interface ApplicationSession {\n accessToken: string;\n applicationId: string;\n expiresAt: number;\n}\n\nexport function loadApplicationSession(): ApplicationSession | null {\n try {\n const session: ApplicationSession = JSON.parse(fs.readFileSync(SESSION_PATH, 'utf-8'));\n if (Date.now() >= session.expiresAt) return null;\n\n return session;\n } catch {\n return null;\n }\n}\n\nexport function saveApplicationSession(session: ApplicationSession): void {\n fs.mkdirSync(path.dirname(SESSION_PATH), { recursive: true });\n fs.writeFileSync(SESSION_PATH, JSON.stringify(session, null, 2) + '\\n', { mode: 0o600 });\n}\n\nexport function clearApplicationSession(): boolean {\n try {\n fs.unlinkSync(SESSION_PATH);\n return true;\n } catch {\n return false;\n }\n}\n\n/** True when a session file exists but its token has run out. */\nexport function applicationSessionExpired(): boolean {\n return fs.existsSync(SESSION_PATH) && loadApplicationSession() === null;\n}\n\n/**\n * True when the CLI is authenticating as an application rather than as a person.\n *\n * Worth asking before explaining a refusal: Hermes rejects the tokens it mints on\n * its own management API, so `companies`, `applications` and every `create*`\n * mutation fail while an application credential is in play — and the router\n * flattens that refusal to \"Unexpected error\", which explains nothing.\n */\nexport function actingAsApplication(): boolean {\n if (process.env.SORTLIST_CLIENT_ID && process.env.SORTLIST_CLIENT_SECRET) return true;\n\n return loadApplicationSession() !== null;\n}\n","import fs from 'fs';\nimport os from 'os';\nimport path from 'path';\n\nimport { error, hint } from './output.ts';\n\nconst CREDENTIALS_PATH = path.join(os.homedir(), '.sortlist', 'credentials.json');\nconst ELEVATED_CREDENTIALS_PATH = path.join(os.homedir(), '.sortlist', 'elevated-credentials.json');\n\nexport const ELEVATION_MAX_SECONDS = 30 * 60;\n\nexport interface Credentials {\n accessToken: string;\n refreshToken: string;\n idToken: string;\n expiresAt: number;\n}\n\nexport type ElevationLevel = 'sales' | 'admin' | 'superadmin';\n\nexport interface ElevatedCredentials {\n accessToken: string;\n expiresAt: number;\n level: ElevationLevel;\n}\n\nfunction ensureDir(): void {\n const dir = path.dirname(CREDENTIALS_PATH);\n if (!fs.existsSync(dir)) {\n fs.mkdirSync(dir, { recursive: true });\n }\n}\n\nexport function saveCredentials(creds: Credentials): void {\n ensureDir();\n fs.writeFileSync(CREDENTIALS_PATH, JSON.stringify(creds, null, 2) + '\\n', { mode: 0o600 });\n}\n\nexport function loadCredentials(): Credentials | null {\n try {\n const raw = fs.readFileSync(CREDENTIALS_PATH, 'utf-8');\n return JSON.parse(raw) as Credentials;\n } catch {\n return null;\n }\n}\n\nexport function clearCredentials(): void {\n try {\n fs.unlinkSync(CREDENTIALS_PATH);\n } catch {\n // already gone\n }\n}\n\nexport function isExpired(creds: Pick<Credentials, 'expiresAt'>): boolean {\n // 60s buffer before actual expiry\n return Date.now() >= (creds.expiresAt - 60) * 1000;\n}\n\nexport function saveElevatedCredentials(\n accessToken: string,\n expiresIn: number,\n level: ElevationLevel,\n): ElevatedCredentials {\n const creds: ElevatedCredentials = {\n accessToken,\n expiresAt: Math.floor(Date.now() / 1000) + Math.min(expiresIn, ELEVATION_MAX_SECONDS),\n level,\n };\n ensureDir();\n fs.writeFileSync(ELEVATED_CREDENTIALS_PATH, JSON.stringify(creds, null, 2) + '\\n', { mode: 0o600 });\n\n return creds;\n}\n\nexport function loadElevatedCredentials(): ElevatedCredentials | null {\n let creds: ElevatedCredentials;\n try {\n creds = JSON.parse(fs.readFileSync(ELEVATED_CREDENTIALS_PATH, 'utf-8'));\n } catch {\n return null;\n }\n\n if (isExpired(creds)) {\n clearElevatedCredentials();\n return null;\n }\n\n return creds;\n}\n\nexport function clearElevatedCredentials(): boolean {\n try {\n fs.unlinkSync(ELEVATED_CREDENTIALS_PATH);\n return true;\n } catch {\n return false;\n }\n}\n\nexport function storedUserAccessToken(): string | null {\n return loadElevatedCredentials()?.accessToken ?? loadCredentials()?.accessToken ?? null;\n}\n\nexport function ensureAuthenticated(): Credentials {\n const creds = loadCredentials();\n if (!creds) {\n error('You are not logged in.');\n hint('Run `sl login` to authenticate with your Sortlist account.');\n process.exit(2);\n }\n return creds;\n}\n","// ── Color helpers (respect --no-color / NO_COLOR) ──\n\nfunction colorEnabled(): boolean {\n return process.stderr.isTTY === true && !process.env.NO_COLOR;\n}\n\nconst ansi = {\n reset: '\\x1b[0m',\n dim: '\\x1b[2m',\n red: '\\x1b[31m',\n green: '\\x1b[32m',\n yellow: '\\x1b[33m',\n};\n\nfunction c(code: keyof typeof ansi, text: string): string {\n if (!colorEnabled()) return text;\n return `${ansi[code]}${text}${ansi.reset}`;\n}\n\n// ── JSON mode detection ──\n\nexport function isJsonMode(options: { json?: boolean }): boolean {\n if (options.json) return true;\n return !process.stdout.isTTY;\n}\n\nexport function printJson(data: unknown): void {\n process.stdout.write(JSON.stringify(data, null, 2) + '\\n');\n}\n\n// ── Message helpers ──\n// Every function uses a text prefix so status is conveyed independent of color.\n// Color is enhancement only — never the sole status indicator.\n\n/** General informational message (no prefix). */\nexport function info(msg: string): void {\n process.stderr.write(`${msg}\\n`);\n}\n\n/** Success: confirms an outcome. Use after a completed action. */\nexport function success(msg: string): void {\n process.stderr.write(`${c('green', '\\u2713')} ${msg}\\n`);\n}\n\n/** Warning: something is off but not fatal. */\nexport function warn(msg: string): void {\n process.stderr.write(`${c('yellow', '\\u26A0')} ${msg}\\n`);\n}\n\n/** Error: state what failed, why, and what to do next. */\nexport function error(msg: string): void {\n process.stderr.write(`${c('red', '\\u2717')} Error: ${msg}\\n`);\n}\n\n/** Hint: suggest a next step or recovery action. Indented for readability. */\nexport function hint(msg: string): void {\n process.stderr.write(`${c('dim', ' ' + msg)}\\n`);\n}\n","import fs from 'fs';\nimport os from 'os';\nimport path from 'path';\n\nconst SORTLIST_DIR = path.join(os.homedir(), '.sortlist');\nconst CONFIG_PATH = path.join(SORTLIST_DIR, 'config.json');\n\nexport interface CliConfig {\n endpoint: string;\n /** The company every request acts for: its id or its slug. */\n company?: string;\n /**\n * Hermes' OAuth token endpoint, used for unattended runs with an application\n * credential. A different host from the federation endpoint.\n */\n tokenEndpoint?: string;\n}\n\nconst DEFAULT_CONFIG: CliConfig = {\n endpoint: 'https://federation.sortlist.com/graphql',\n};\n\nfunction ensureDir(): void {\n if (!fs.existsSync(SORTLIST_DIR)) {\n fs.mkdirSync(SORTLIST_DIR, { recursive: true });\n }\n}\n\nexport function loadConfig(): CliConfig {\n try {\n const raw = fs.readFileSync(CONFIG_PATH, 'utf-8');\n return { ...DEFAULT_CONFIG, ...JSON.parse(raw) };\n } catch {\n return { ...DEFAULT_CONFIG };\n }\n}\n\nexport function saveConfig(config: Partial<CliConfig>): void {\n ensureDir();\n const current = loadConfig();\n const merged = { ...current, ...config };\n fs.writeFileSync(CONFIG_PATH, JSON.stringify(merged, null, 2) + '\\n');\n}\n\nexport function resetConfig(): void {\n try {\n fs.unlinkSync(CONFIG_PATH);\n } catch {\n // already gone\n }\n}\n\n/**\n * Drops the cached identity (user + company/agency context) while preserving\n * non-identity settings like the endpoint. Used by `logout` so the next login\n * can't surface the previous account's user and company.\n */\n/**\n * Forgets who you were, keeping where you point.\n *\n * `endpoint` and `tokenEndpoint` describe an environment, not an identity — an\n * earlier version kept only the first, so logging out silently discarded the\n * token endpoint and the next `sl use application` failed on a missing setting\n * nobody remembered unsetting.\n */\nexport function clearIdentity(): void {\n const { endpoint, tokenEndpoint } = loadConfig();\n ensureDir();\n const kept: Partial<CliConfig> = { endpoint };\n if (tokenEndpoint) kept.tokenEndpoint = tokenEndpoint;\n fs.writeFileSync(CONFIG_PATH, JSON.stringify(kept, null, 2) + '\\n');\n}\n\nexport function getEndpoint(override?: string): string {\n if (override) return override;\n if (process.env.SL_ENDPOINT) return process.env.SL_ENDPOINT;\n return loadConfig().endpoint;\n}\n\n/**\n * Context variables that are auto-injected into generated commands.\n * These are read from config and can be overridden via CLI flags.\n */\nexport interface UserContext {\n company?: string;\n}\n\nexport function getUserContext(): UserContext {\n const config = loadConfig();\n return { company: config.company };\n}\n","import fs from 'node:fs';\nimport path from 'node:path';\n\nimport { packageRoot } from './package-root.ts';\n\n/**\n * Whether the CLI is running from the platform monorepo (dev checkout)\n * vs a globally-installed npm package.\n *\n * Published builds contain a `.published` sentinel file stamped by CI.\n * Its absence means we're running from source.\n */\nexport const isLocalDev = !fs.existsSync(path.join(packageRoot, '.published'));\n","import fs from 'node:fs';\nimport path from 'node:path';\nimport { fileURLToPath } from 'node:url';\n\n/**\n * Locate the @sortlist/cli package root by walking up from this module.\n * Relative `import.meta.url` paths break once the source is bundled into\n * dist/, so root-relative files (.published, package.json) must be resolved\n * through this instead.\n */\nfunction findPackageRoot(): string {\n let dir = path.dirname(fileURLToPath(import.meta.url));\n while (true) {\n const pkgPath = path.join(dir, 'package.json');\n if (fs.existsSync(pkgPath)) {\n try {\n const parsed = JSON.parse(fs.readFileSync(pkgPath, 'utf-8')) as { name?: string };\n if (parsed.name === '@sortlist/cli') return dir;\n } catch {\n // unreadable package.json — keep walking\n }\n }\n const parent = path.dirname(dir);\n if (parent === dir) throw new Error('Could not locate the @sortlist/cli package root');\n dir = parent;\n }\n}\n\nexport const packageRoot = findPackageRoot();\n\nexport const pkg = JSON.parse(fs.readFileSync(path.join(packageRoot, 'package.json'), 'utf-8')) as {\n name: string;\n version: string;\n};\n","/**\n * Dynamic command registration.\n *\n * Derives service grouping from the `@join__field(graph: ...)` directives\n * that the router injects into introspection responses, then builds\n * Commander.js commands at runtime.\n */\nimport { randomUUID } from 'node:crypto';\nimport { Command, Option } from 'commander';\nimport {\n isEnumType,\n isInputObjectType,\n isInterfaceType,\n isListType,\n isNonNullType,\n isObjectType,\n isScalarType,\n isUnionType,\n type GraphQLArgument,\n type GraphQLEnumType,\n type GraphQLField,\n type GraphQLInputObjectType,\n type GraphQLInputType,\n type GraphQLNamedType,\n type GraphQLObjectType,\n type GraphQLOutputType,\n type GraphQLSchema,\n} from 'graphql';\n\nimport { graphqlRaw, graphqlSubscribe } from '../graphql/client.ts';\nimport { type FieldServiceMap } from '../graphql/introspection.ts';\nimport { buildQuery, rootTypeOf, UnknownFieldError, type OperationKind } from '../graphql/query-builder.ts';\nimport { actingAsApplication } from '../lib/application-session.ts';\nimport { personalCompanyId, resolveCompanyId } from '../lib/company.ts';\nimport { getUserContext } from '../lib/config.ts';\nimport { error, hint, info, isJsonMode, printJson, warn } from '../lib/output.ts';\nimport { formatResult } from '../lib/render.ts';\n\n// Context fields that are auto-injected from ~/.sortlist/config.json.\n// Schema field names (key) → UserContext property (value). The CLI is\n// company-scoped; marketplace fields like `agencyId` are NOT auto-filled\n// (Agency and Company are independent entities) and must be passed\n// explicitly via `--agency-id`.\n// Only `companyId`. An identifier naming *somebody else* must never come from the\n// caller's own context: filling the old `oauthId` argument that way made\n// `sl invite-company-member` silently invite the caller to their own company.\nconst CONTEXT_FIELDS: Record<string, string> = {\n companyId: 'companyId',\n};\n\n// Fields to skip — internal relay/federation helpers\nconst SKIP_FIELDS = new Set(['node', 'nodes', 'id', '_entities', '_service']);\n\nfunction unwrap(type: GraphQLOutputType | GraphQLInputType): GraphQLNamedType {\n if (isNonNullType(type)) return unwrap(type.ofType as GraphQLOutputType | GraphQLInputType);\n if (isListType(type)) return unwrap(type.ofType as GraphQLOutputType | GraphQLInputType);\n return type as GraphQLNamedType;\n}\n\nconst RESERVED_FLAGS = new Set(['version', 'help', 'endpoint', 'company', 'json', 'color', 'no-color']);\n\nexport function flagNameFor(fieldName: string, argName: string): string {\n const name = kebab(argName);\n return RESERVED_FLAGS.has(name) ? `${kebab(fieldName)}-${name}` : name;\n}\n\nfunction optionKey(flagName: string): string {\n return flagName.replace(/-([a-z0-9])/g, (_, letter: string) => letter.toUpperCase());\n}\n\nfunction kebab(s: string): string {\n return s.replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase();\n}\n\n/**\n * For mutations with a single `input` argument of an Input type,\n * return the fields of that input type for flattening into CLI options.\n */\ninterface CliArg {\n name: string;\n type: GraphQLArgument['type'];\n required: boolean;\n description?: string | null;\n}\n\nfunction getInputFields(field: GraphQLField<unknown, unknown>): CliArg[] | null {\n if (field.args.length !== 1) return null;\n const arg = field.args[0];\n if (arg.name !== 'input') return null;\n const argType = unwrap(arg.type);\n if (!argType || !isInputObjectType(argType)) return null;\n const fields = argType.getFields();\n return Object.entries(fields).map(([name, f]) => ({\n name,\n type: f.type,\n required: isNonNullType(f.type),\n description: f.description,\n }));\n}\n\n/**\n * Render a GraphQL type as its SDL signature, e.g. `String!`,\n * `[OrganizationSortInput!]`, `OrganizationFilterInput`. Works for both input\n * and output types (the wrapper structure is identical).\n */\nfunction renderType(type: GraphQLInputType | GraphQLOutputType): string {\n if (isNonNullType(type)) return `${renderType(type.ofType as GraphQLInputType | GraphQLOutputType)}!`;\n if (isListType(type)) return `[${renderType(type.ofType as GraphQLInputType | GraphQLOutputType)}]`;\n return (type as GraphQLNamedType).name;\n}\n\n/**\n * A \"structured\" arg is one that must be supplied as JSON on the CLI and parsed\n * (rather than passed through as a raw string): lists and input objects. Plain\n * leaf scalars and enums are passed as raw strings — including when wrapped in\n * non-null (`String!` is still a bare string on the CLI). The non-null wrapper\n * is transparent for this decision; a list at any level means JSON.\n */\nfunction isStructuredInput(type: GraphQLInputType): boolean {\n if (isNonNullType(type)) return isStructuredInput(type.ofType as GraphQLInputType);\n if (isListType(type)) return true;\n return isInputObjectType(type);\n}\n\n/**\n * Coerce a raw CLI string into the value GraphQL expects for the arg's type.\n * Leaf scalars are parsed by name; structured types (input objects, lists,\n * enums) are parsed as JSON. Throws a readable error on malformed JSON so the\n * action can surface it instead of silently sending a bad string.\n */\n/** `[Enum!]` however it is wrapped: the one structured input a person can type by hand. */\nfunction enumListOf(type: GraphQLInputType): GraphQLEnumType | null {\n const listless = isNonNullType(type) ? type.ofType : type;\n if (!isListType(listless)) return null;\n const inner = unwrap(listless.ofType as GraphQLInputType);\n return isEnumType(inner) ? (inner as GraphQLEnumType) : null;\n}\n\nfunction enumOf(type: GraphQLInputType): GraphQLEnumType | null {\n const listless = isNonNullType(type) ? (type.ofType as GraphQLInputType) : type;\n if (isListType(listless)) return null;\n return isEnumType(listless) ? (listless as GraphQLEnumType) : null;\n}\n\nfunction commonPrefix(values: string[]): string {\n if (values.length < 2) return '';\n let prefix = values[0];\n for (const value of values) while (!value.startsWith(prefix)) prefix = prefix.slice(0, -1);\n const cut = prefix.lastIndexOf('_');\n return cut === -1 ? '' : prefix.slice(0, cut + 1);\n}\n\nfunction matchEnumValue(part: string, names: string[], prefix: string): string | undefined {\n const wanted = part\n .trim()\n .replace(/([a-z0-9])([A-Z])/g, '$1_$2')\n .toUpperCase();\n return names.find((name) => name === wanted || name === `${prefix}${wanted}`);\n}\n\nfunction spellableValues(names: string[], prefix: string): string[] {\n return names.map((name) =>\n name\n .slice(prefix.length)\n .toLowerCase()\n .replace(/_([a-z])/g, (_, letter: string) => letter.toUpperCase()),\n );\n}\n\n/**\n * `emailAddress,phone`, `all` or `none` for an enum list, so a caller never types JSON\n * for a handful of known names. Case-insensitive, camelCase reads as SNAKE_CASE\n * so a value can be spelt like the field it stands for, and a prefix every value\n * shares (`CONTACT_`) may be left out. A value starting with `[` is still JSON.\n */\nexport function coerceEnumList(raw: string, enumType: GraphQLEnumType, flagName: string): string[] {\n const names = enumType.getValues().map((value) => value.name);\n if (raw.trim() === 'all') return names;\n if (raw.trim() === 'none') return [];\n\n const prefix = commonPrefix(names);\n return raw\n .split(',')\n .filter((part) => part.trim() !== '')\n .map((part) => {\n const match = matchEnumValue(part, names, prefix);\n if (match === undefined) {\n throw new Error(\n `--${flagName} does not know \"${part.trim()}\". ` +\n `One or more of: ${spellableValues(names, prefix).join(', ')}, all, or none.`,\n );\n }\n return match;\n });\n}\n\nexport function coerceEnum(raw: string, enumType: GraphQLEnumType, flagName: string): string {\n const names = enumType.getValues().map((value) => value.name);\n const prefix = commonPrefix(names);\n const match = matchEnumValue(raw, names, prefix);\n if (match === undefined) {\n throw new Error(\n `--${flagName} does not know \"${raw.trim()}\". One of: ${spellableValues(names, prefix).join(', ')}.`,\n );\n }\n return match;\n}\n\nexport function coerceValue(raw: string, type: GraphQLInputType, flagName: string): unknown {\n const enumList = enumListOf(type);\n if (enumList && !raw.trim().startsWith('[')) return coerceEnumList(raw, enumList, flagName);\n\n const enumValue = enumOf(type);\n if (enumValue) return coerceEnum(raw, enumValue, flagName);\n\n if (isStructuredInput(type)) {\n try {\n return JSON.parse(raw);\n } catch (parseError) {\n throw new Error(\n `--${flagName} expects JSON for type ${renderType(type)}, but the value could not be parsed: ` +\n `${(parseError as Error).message}`,\n );\n }\n }\n\n const typeName = unwrap(type).name;\n if (typeName === 'Int') {\n const parsed = parseInt(raw, 10);\n if (Number.isNaN(parsed)) throw new Error(`--${flagName} expects an integer, got \"${raw}\".`);\n return parsed;\n }\n if (typeName === 'Float') {\n const parsed = parseFloat(raw);\n if (Number.isNaN(parsed)) throw new Error(`--${flagName} expects a number, got \"${raw}\".`);\n return parsed;\n }\n if (typeName === 'Boolean') {\n if (raw !== 'true' && raw !== 'false') {\n throw new Error(`--${flagName} expects \"true\" or \"false\", got \"${raw}\".`);\n }\n return raw === 'true';\n }\n return raw;\n}\n\n/**\n * One-line summary of an input-object or enum type's shape, used in option\n * help so callers know what JSON to pass without a separate introspection\n * round-trip. Expands a single level: `{ industry: StringFilterInput, country:\n * String, ... }` for input objects, `one of: A | B | C` for enums.\n */\nfunction describeStructuredType(named: GraphQLNamedType): string | null {\n if (isInputObjectType(named)) {\n const fields = Object.values((named as GraphQLInputObjectType).getFields());\n const parts = fields.map((f) => `${f.name}: ${renderType(f.type)}`);\n return `{ ${parts.join(', ')} }`;\n }\n if (isEnumType(named)) {\n const values = (named as GraphQLEnumType).getValues().map((v) => v.name);\n return `one of: ${values.join(' | ')}`;\n }\n return null;\n}\n\n/** A named type worth pointing the user at via `sl schema inspect` — i.e. one with structure. */\nfunction isInspectable(named: GraphQLNamedType): boolean {\n return isInputObjectType(named) || isEnumType(named) || isObjectType(named);\n}\n\nfunction oneLineDescription(text: string | null | undefined): string {\n return (text ?? '').replace(/\\s+/g, ' ').trim();\n}\n\n/**\n * Render a full, human-readable description of a named type for\n * `sl schema inspect <Type>`: its kind, description, and one level of\n * structure (object/input fields with their types + descriptions, or enum\n * values). Nested structured types are named so the caller can `inspect` them\n * in turn. Returns null if the type does not exist in the schema.\n */\nexport function formatTypeInspection(schema: GraphQLSchema, typeName: string): string | null {\n const named = schema.getType(typeName);\n if (!named) return null;\n\n const lines: string[] = [];\n const suffix = oneLineDescription(named.description);\n const header = (kind: string): string => {\n const label = kind ? `${kind} ${named.name}` : named.name;\n return suffix ? `${label} — ${suffix}` : label;\n };\n\n const pushFields = (entries: Array<{ name: string; typeSig: string; description?: string | null }>): void => {\n const width = Math.max(...entries.map((entry) => `${entry.name}: ${entry.typeSig}`.length), 0);\n for (const entry of entries) {\n const signature = `${entry.name}: ${entry.typeSig}`;\n const note = oneLineDescription(entry.description);\n lines.push(note ? ` ${signature.padEnd(width)} ${note}` : ` ${signature}`);\n }\n };\n\n if (isInputObjectType(named) || isObjectType(named)) {\n lines.push(header(isInputObjectType(named) ? 'input' : 'type'));\n pushFields(\n Object.values(named.getFields()).map((f) => ({\n name: f.name,\n typeSig: renderType(f.type),\n description: f.description,\n })),\n );\n } else if (isEnumType(named)) {\n lines.push(header('enum'));\n for (const value of named.getValues()) {\n const note = oneLineDescription(value.description);\n lines.push(note ? ` ${value.name.padEnd(20)} ${note}` : ` ${value.name}`);\n }\n } else if (isScalarType(named)) {\n lines.push(header('scalar'));\n lines.push(' (scalar — pass a plain value)');\n } else {\n lines.push(header(''));\n }\n\n // Point the caller at the nested types they can drill into next.\n const nested = new Set<string>();\n if (isInputObjectType(named) || isObjectType(named)) {\n for (const field of Object.values(named.getFields())) {\n const fieldType = unwrap(field.type);\n if (isInspectable(fieldType) && fieldType.name !== named.name) nested.add(fieldType.name);\n }\n }\n if (nested.size > 0) {\n lines.push('');\n lines.push(\n `Inspect nested types: ${[...nested]\n .sort()\n .map((n) => `sl schema inspect ${n}`)\n .join(', ')}`,\n );\n }\n\n return lines.join('\\n');\n}\n\n/**\n * Build the help description for a single CLI option from its GraphQL arg:\n * the field description (if any), the rendered type with a `(JSON)` marker for\n * structured inputs, and a one-level shape hint (input-object fields or enum\n * values) so callers know what to pass without a separate introspection step.\n */\nfunction describeArg(arg: { name: string; type: GraphQLInputType; description?: string | null }): string {\n const parts: string[] = [];\n if (arg.description) parts.push(arg.description.replace(/\\s+/g, ' ').trim());\n\n const typeSig = renderType(arg.type);\n const enumList = enumListOf(arg.type);\n parts.push(\n enumList\n ? `${typeSig} (comma-separated, all, or none)`\n : isStructuredInput(arg.type)\n ? `${typeSig} (JSON)`\n : typeSig,\n );\n\n // Shape hint applies to enums (raw string) and input objects (JSON) alike.\n const named = unwrap(arg.type);\n const shape = describeStructuredType(named);\n if (shape) parts.push(shape);\n\n // Point at `schema inspect` so nested input/enum types can be drilled into\n // without resorting to raw introspection.\n if (isInputObjectType(named) || isEnumType(named)) {\n parts.push(`details: sl schema inspect ${named.name}`);\n }\n\n return parts.join(' — ');\n}\n\nconst DEFAULT_SUBSCRIPTION_TIMEOUT_SECONDS = 300;\nconst DEFAULT_WAIT_SECONDS = 120;\nconst TIMED_OUT_EXIT_CODE = 5;\n\nexport function supersededBy(\n field: GraphQLField<unknown, unknown>,\n siblings: Record<string, GraphQLField<unknown, unknown>>,\n): string | null {\n const replacement = field.deprecationReason?.match(/`(\\w+)`/)?.[1];\n if (!replacement || SKIP_FIELDS.has(replacement)) return null;\n\n const sibling = siblings[replacement];\n return sibling && !sibling.deprecationReason ? replacement : null;\n}\n\nfunction hasExternalId(field: GraphQLField<unknown, unknown>): boolean {\n const args = getInputFields(field) ?? field.args;\n return args.some((a) => a.name === 'externalId');\n}\n\nexport function resultSubscriptions(schema: GraphQLSchema): Map<string, string> {\n const pairs = new Map<string, string>();\n const mutations = schema.getMutationType()?.getFields() ?? {};\n\n for (const [name, field] of Object.entries(schema.getSubscriptionType()?.getFields() ?? {})) {\n const mutation = field.description?.match(/(?:result|outcome) of an? `(\\w+)` call/)?.[1];\n if (!mutation || !mutations[mutation]) continue;\n if (!field.args.some((a) => a.name === 'externalId') || !hasExternalId(mutations[mutation])) continue;\n pairs.set(mutation, name);\n }\n\n return pairs;\n}\n\nfunction isRecord(value: unknown): value is Record<string, unknown> {\n return typeof value === 'object' && value !== null;\n}\n\nexport function isStillFilling(result: unknown): boolean {\n return isRecord(result) && result.status === 'FILLING';\n}\n\nfunction shellWord(value: string): string {\n if (/^[\\w.:/@=+-]+$/.test(value)) return value;\n return \"'\" + value.replace(/'/g, \"'\\\\''\") + \"'\";\n}\n\nfunction nextPageCursor(result: unknown): string | null {\n if (!isRecord(result)) return null;\n for (const value of Object.values(result)) {\n const pageInfo = isRecord(value) && isRecord(value.pageInfo) ? value.pageInfo : null;\n if (pageInfo?.hasNextPage === true && typeof pageInfo.endCursor === 'string') return pageInfo.endCursor;\n }\n return null;\n}\n\nexport function nextPageHint(\n commandName: string,\n externalId: string,\n page: Record<string, unknown> | undefined,\n result: unknown,\n): string | null {\n const cursor = nextPageCursor(result);\n if (!cursor) return null;\n\n const nextPage = JSON.stringify({ ...(page ?? {}), after: cursor });\n return `Next page: sl ${commandName} --external-id ${shellWord(externalId)} --page ${shellWord(nextPage)} --wait`;\n}\n\nfunction printResult(fieldName: string, result: unknown, opts: Record<string, unknown>): void {\n if (result == null) {\n if (actingAsApplication()) {\n info(`${fieldName} answers for people, and you are acting as an application.`);\n hint('`sl whoami` reports what the token identifies; `sl use me` switches back.');\n } else {\n warn('No results returned.');\n hint('The query succeeded but the server returned null.');\n hint('Try different arguments or check that the resource exists.');\n }\n } else if (isJsonMode(opts)) {\n printJson(result);\n } else {\n const rendered = formatResult(result);\n if (rendered !== null) info(rendered);\n }\n}\n\nfunction secondsOption(raw: unknown, fallback: number, flag: string): number {\n if (raw === undefined) return fallback;\n const seconds = Number(raw);\n if (!Number.isFinite(seconds) || seconds <= 0) {\n error(`${flag} takes a number of seconds, not \"${String(raw)}\".`);\n process.exit(2);\n }\n return seconds;\n}\n\nasync function listen(\n query: string,\n variables: Record<string, unknown>,\n requestOptions: Parameters<typeof graphqlSubscribe>[2],\n seconds: number,\n): Promise<{ events: AsyncGenerator<Record<string, unknown>>; stop: () => void; timedOut: () => boolean }> {\n const controller = new AbortController();\n let expired = false;\n const timer = setTimeout(() => {\n expired = true;\n controller.abort();\n }, seconds * 1000);\n const open = () => graphqlSubscribe(query, variables, { ...requestOptions, signal: controller.signal });\n const first = await open();\n\n async function* events(): AsyncGenerator<Record<string, unknown>> {\n let current = first;\n for (;;) {\n try {\n yield* current.events;\n return;\n } catch (err) {\n if (expired || !isDroppedStream(err)) throw err;\n current = await open();\n }\n }\n }\n\n return {\n events: events(),\n stop: () => {\n clearTimeout(timer);\n controller.abort();\n },\n timedOut: () => expired,\n };\n}\n\nfunction isAbort(err: unknown): boolean {\n return err instanceof Error && (err.name === 'AbortError' || err.name === 'TimeoutError');\n}\n\nexport function isDroppedStream(err: unknown): boolean {\n if (!(err instanceof Error) || isAbort(err)) return false;\n const code = (err.cause as { code?: unknown } | undefined)?.code;\n\n return err.message === 'terminated' || code === 'UND_ERR_SOCKET' || code === 'ECONNRESET';\n}\n\nfunction buildCommand(\n schema: GraphQLSchema,\n fieldName: string,\n kind: OperationKind,\n description: string,\n service: string,\n resultSubscription?: string,\n): Command {\n const rootType = rootTypeOf(schema, kind);\n if (!rootType) throw new Error(`No ${kind} type in schema`);\n\n const field = rootType.getFields()[fieldName];\n if (!field) throw new Error(`Unknown ${kind} field: ${fieldName}`);\n\n const inputFields = getInputFields(field);\n const useInputWrapper = inputFields != null;\n const cliArgs: CliArg[] = useInputWrapper\n ? inputFields\n : field.args.map((a) => ({\n name: a.name,\n type: a.type,\n required: isNonNullType(a.type),\n description: a.description,\n }));\n\n const cmd = new Command(kebab(fieldName)).description(description);\n\n // Only *required* company arguments are worth blocking on. An optional one\n // means the server has a sensible default — for instance the caller's personal\n // company — and refusing to call it would make the CLI stricter than the API.\n const requiresCompanyId = cliArgs.some((a) => a.name === 'companyId' && a.required);\n\n for (const a of cliArgs) {\n // Variadic for an enum list, so `--reveal identity, email` and `--reveal identity email` both read.\n const placeholder = enumListOf(a.type) ? 'a,b|all|none...' : isStructuredInput(a.type) ? 'json' : kebab(a.name);\n const flag = `--${flagNameFor(fieldName, a.name)} <${placeholder}>`;\n const isContext = a.name in CONTEXT_FIELDS;\n if (isContext) {\n cmd.option(flag, `${describeArg(a)} (from context if omitted)`);\n } else if (resultSubscription && a.name === 'externalId') {\n cmd.option(flag, `${describeArg(a)} (generated if omitted)`);\n } else if (a.required) {\n cmd.requiredOption(flag, describeArg(a));\n } else {\n cmd.option(flag, describeArg(a));\n }\n }\n\n cmd\n .option('--depth <depth>', 'Selection depth (default: 0)', parseInt)\n .option('--fields <fields>', 'Comma-separated fields to include')\n .option('--exclude <fields>', 'Comma-separated fields to exclude')\n .option('--total-count', 'Also count every match, not just this page (slow on a broad filter)');\n\n if (kind === 'subscription') {\n cmd\n .option('--once', 'Stop after the first event')\n .option(\n '--timeout <seconds>',\n `Give up after this many seconds (default: ${DEFAULT_SUBSCRIPTION_TIMEOUT_SECONDS})`,\n );\n }\n\n if (resultSubscription) {\n cmd.addOption(\n new Option(\n '--wait [seconds]',\n `Subscribe to \\`${resultSubscription}\\`, send this mutation, and print the result it delivers. ` +\n '--fields, --exclude and --depth then select the result',\n ).preset(String(DEFAULT_WAIT_SECONDS)),\n );\n }\n\n cmd.action(async function (this: Command) {\n const opts = this.optsWithGlobals();\n const ctx = getUserContext();\n // Two different companies: the one the caller acts for (the header, checked\n // against the token) and the one an operation is about (its `companyId`\n // argument, checked by membership). Naming a company as an argument must not\n // make the whole request act for it.\n const acting = typeof opts.company === 'string' ? opts.company : undefined;\n const actingId = await resolveCompanyId({ company: acting, ctx });\n const argumentCompanyId =\n typeof opts.companyId === 'string' ? await resolveCompanyId({ company: opts.companyId, ctx }) : actingId;\n\n if (requiresCompanyId && !argumentCompanyId) {\n error('No company selected.');\n hint('Pass --company-id <slug|id>, or act for one with --company or `sl config set company <slug|id>`.');\n process.exit(2);\n }\n\n if (argumentCompanyId) opts.companyId = argumentCompanyId;\n\n const waiting = resultSubscription !== undefined && opts.wait !== undefined;\n const generatedExternalId = resultSubscription !== undefined && typeof opts.externalId !== 'string';\n if (generatedExternalId) opts.externalId = `sl-${randomUUID()}`;\n if (waiting && opts.async === undefined && cliArgs.some((a) => a.name === 'async')) opts.async = 'true';\n\n const collectArgs = (): Record<string, unknown> => {\n const out: Record<string, unknown> = {};\n for (const a of cliArgs) {\n const flagName = flagNameFor(fieldName, a.name);\n const given = opts[optionKey(flagName)];\n const raw = Array.isArray(given) ? (given as string[]).join(',') : given;\n if (raw != null) {\n try {\n out[a.name] = coerceValue(raw, a.type, flagName);\n } catch (coerceError) {\n error((coerceError as Error).message);\n hint('Run the command with --help to see the expected shape of each argument.');\n process.exit(2);\n }\n }\n }\n return out;\n };\n\n const variables: Record<string, unknown> = useInputWrapper ? { input: collectArgs() } : collectArgs();\n\n const selection = {\n depth: opts.depth,\n fields: opts.fields?.split(','),\n exclude: opts.exclude?.split(','),\n totalCount: opts.totalCount === true,\n };\n const build = (\n buildKind: OperationKind,\n buildField: string,\n buildVariables: Record<string, unknown>,\n select = true,\n ) => {\n try {\n return buildQuery(schema, buildKind, buildField, buildVariables, select ? selection : {});\n } catch (buildError) {\n if (!(buildError instanceof UnknownFieldError)) throw buildError;\n error(buildError.message);\n hint(`Did you mean: ${buildError.suggestions.join(', ')}?`);\n process.exit(2);\n }\n };\n const requestOptions = { endpoint: opts.endpoint, company: acting, companyId: actingId, subgraph: service };\n\n if (kind === 'subscription') {\n const seconds = secondsOption(opts.timeout, DEFAULT_SUBSCRIPTION_TIMEOUT_SECONDS, '--timeout');\n const { query, fieldName: fName } = build('subscription', fieldName, variables);\n const stream = await listen(query, variables, requestOptions, seconds);\n try {\n for await (const data of stream.events) {\n printResult(fieldName, data[fName], opts);\n if (opts.once) break;\n }\n } catch (err) {\n if (!isAbort(err) || !stream.timedOut()) throw err;\n warn(`No more events within ${seconds}s.`);\n process.exit(TIMED_OUT_EXIT_CODE);\n } finally {\n stream.stop();\n }\n return;\n }\n\n if (waiting && resultSubscription) {\n const seconds = secondsOption(opts.wait, DEFAULT_WAIT_SECONDS, '--wait');\n if (!requestOptions.companyId && !actingAsApplication()) {\n requestOptions.companyId = await personalCompanyId();\n }\n const externalId = opts.externalId as string;\n const subscriptionVariables = { externalId };\n const { query: subscriptionQuery, fieldName: subscriptionField } = build(\n 'subscription',\n resultSubscription,\n subscriptionVariables,\n );\n const stream = await listen(subscriptionQuery, subscriptionVariables, requestOptions, seconds);\n let delivered: unknown;\n try {\n const { query } = build(kind, fieldName, variables, false);\n await graphqlRaw(query, variables, requestOptions);\n for await (const data of stream.events) {\n delivered = data[subscriptionField];\n if (!isStillFilling(delivered)) break;\n }\n if (delivered === undefined) {\n warn(`${resultSubscription} closed without delivering a result.`);\n process.exit(1);\n }\n printResult(resultSubscription, delivered, opts);\n const pageArgument = useInputWrapper ? (variables.input as Record<string, unknown>).page : variables.page;\n const takesPage = cliArgs.some((a) => a.name === 'page');\n const pageHint = takesPage\n ? nextPageHint(this.name(), externalId, pageArgument as Record<string, unknown> | undefined, delivered)\n : null;\n if (pageHint) hint(pageHint);\n return;\n } catch (err) {\n if (!isAbort(err) || !stream.timedOut()) throw err;\n if (delivered !== undefined) {\n printResult(resultSubscription, delivered, opts);\n warn(`Still filling after ${seconds}s: what is above may still change.`);\n hint(`Wait longer with --wait <seconds>; its external id is ${externalId}.`);\n process.exit(TIMED_OUT_EXIT_CODE);\n }\n warn(`No result within ${seconds}s. The request was accepted and may still complete.`);\n hint(`Wait longer with --wait <seconds>, or read the result later; its external id is ${externalId}.`);\n process.exit(TIMED_OUT_EXIT_CODE);\n } finally {\n stream.stop();\n }\n }\n\n const { query, fieldName: fName } = build(kind, fieldName, variables);\n const data = await graphqlRaw(query, variables, requestOptions);\n printResult(fieldName, data[fName], opts);\n if (generatedExternalId && resultSubscription) {\n hint(\n `Its result arrives on ${kebab(resultSubscription)} --external-id ${String(opts.externalId)}, or pass --wait.`,\n );\n }\n });\n\n return cmd;\n}\n\n// ── Service map derivation ──\n\ninterface ServiceEntry {\n queries: Array<{ fieldName: string; description: string }>;\n mutations: Array<{ fieldName: string; description: string }>;\n subscriptions: Array<{ fieldName: string; description: string }>;\n}\n\n/**\n * Derive the service → operations map from the `@join__field(graph: ...)`\n * directives the router exposes on each root field. Fields without a mapped\n * subgraph are skipped.\n */\nfunction deriveServiceMap(schema: GraphQLSchema, fieldServices: FieldServiceMap): Map<string, ServiceEntry> {\n const map = new Map<string, ServiceEntry>();\n\n function ensure(service: string): ServiceEntry {\n if (!map.has(service)) map.set(service, { queries: [], mutations: [], subscriptions: [] });\n return map.get(service)!;\n }\n\n const rootTypes: Array<{\n kind: 'queries' | 'mutations' | 'subscriptions';\n type: GraphQLObjectType | null | undefined;\n }> = [\n { kind: 'queries', type: schema.getQueryType() },\n { kind: 'mutations', type: schema.getMutationType() },\n { kind: 'subscriptions', type: schema.getSubscriptionType() },\n ];\n\n for (const { kind, type } of rootTypes) {\n if (!type) continue;\n const services = fieldServices.get(type.name);\n if (!services) continue;\n\n const fields = type.getFields();\n for (const [fieldName, field] of Object.entries(fields)) {\n if (SKIP_FIELDS.has(fieldName) || fieldName.startsWith('__')) continue;\n if (supersededBy(field, fields)) continue;\n\n // Skip operations returning interfaces or unions\n const returnType = unwrap(field.type);\n if (isInterfaceType(returnType) || isUnionType(returnType)) continue;\n\n const service = services.get(fieldName);\n if (!service) continue;\n\n ensure(service)[kind].push({ fieldName, description: field.description ?? '' });\n }\n }\n\n // Sort fields alphabetically within each service\n for (const entry of map.values()) {\n entry.queries.sort((a, b) => a.fieldName.localeCompare(b.fieldName));\n entry.mutations.sort((a, b) => a.fieldName.localeCompare(b.fieldName));\n entry.subscriptions.sort((a, b) => a.fieldName.localeCompare(b.fieldName));\n }\n\n return map;\n}\n\n/** One flattened operation, ready to register at the top level. */\nexport interface OperationCommand {\n command: Command;\n /** Field name as it appears on the supergraph root type. */\n fieldName: string;\n kind: OperationKind;\n /** Subgraph that serves it. Shown when listing, never used as a command prefix. */\n service: string;\n}\n\n/**\n * Build one command per root field, flat.\n *\n * Operation names are unique across the whole supergraph, so grouping by\n * subgraph would only add a prefix a caller has to guess. The rare name shared\n * by a query and a mutation is suffixed instead. The subgraph is kept as\n * metadata for `sl operations`.\n */\nexport function buildOperationCommands(schema: GraphQLSchema, fieldServices: FieldServiceMap): OperationCommand[] {\n const serviceMap = deriveServiceMap(schema, fieldServices);\n const pairs = resultSubscriptions(schema);\n const operations: OperationCommand[] = [];\n\n const nameCounts = new Map<string, number>();\n for (const entry of serviceMap.values()) {\n for (const op of [...entry.queries, ...entry.mutations, ...entry.subscriptions]) {\n nameCounts.set(op.fieldName, (nameCounts.get(op.fieldName) ?? 0) + 1);\n }\n }\n\n for (const [service, entry] of serviceMap) {\n const kinds: Array<{ kind: OperationKind; ops: Array<{ fieldName: string; description: string }> }> = [\n { kind: 'query', ops: entry.queries },\n { kind: 'mutation', ops: entry.mutations },\n { kind: 'subscription', ops: entry.subscriptions },\n ];\n\n for (const { kind, ops } of kinds) {\n for (const op of ops) {\n try {\n const paired = kind === 'mutation' ? pairs.get(op.fieldName) : undefined;\n const command = buildCommand(schema, op.fieldName, kind, op.description, service, paired);\n if ((nameCounts.get(op.fieldName) ?? 0) > 1) {\n command.name(`${kebab(op.fieldName)}-${kind}`);\n }\n operations.push({ command, fieldName: op.fieldName, kind, service });\n } catch {\n // Field may not be resolvable against this schema — skip it.\n }\n }\n }\n }\n\n return operations.sort((a, b) => a.command.name().localeCompare(b.command.name()));\n}\n\n/** Rendered by `sl operations`: every flattened command, grouped by kind. */\nexport function formatOperationList(operations: readonly OperationCommand[], search?: string): string {\n const needle = search?.toLowerCase();\n const matching = needle\n ? operations.filter((op) => op.command.name().includes(needle) || op.service.toLowerCase().includes(needle))\n : operations;\n\n if (matching.length === 0) {\n return search\n ? `No operation matching \"${search}\".`\n : 'No operations available. The endpoint is not a composed supergraph, so no subgraph mapping is exposed.';\n }\n\n const lines: string[] = [];\n const headings: Record<OperationKind, string> = {\n query: 'Queries',\n mutation: 'Mutations',\n subscription: 'Subscriptions',\n };\n for (const kind of ['query', 'mutation', 'subscription'] as const) {\n const group = matching.filter((op) => op.kind === kind);\n if (group.length === 0) continue;\n\n const width = Math.max(...group.map((op) => op.command.name().length));\n lines.push(`${headings[kind]}:`);\n for (const op of group) {\n lines.push(` ${op.command.name().padEnd(width)} ${op.service}`);\n }\n lines.push('');\n }\n\n return lines.join('\\n');\n}\n","import type { TypedDocumentNode } from '@graphql-typed-document-node/core';\nimport { print } from 'graphql';\n\nimport { baseRequestHeaders } from '../lib/api-headers.ts';\nimport { actingAsApplication, applicationSessionExpired, loadApplicationSession } from '../lib/application-session.ts';\nimport {\n ensureAuthenticated,\n isExpired,\n loadElevatedCredentials,\n saveCredentials,\n type Credentials,\n} from '../lib/auth.ts';\nimport { clientCredentials, fetchClientCredentialsToken } from '../lib/client-credentials.ts';\nimport { personalCompanyId, resolveCompanyId } from '../lib/company.ts';\nimport { getEndpoint, getUserContext } from '../lib/config.ts';\nimport { error, hint, info, warn } from '../lib/output.ts';\nimport { addBreadcrumb, captureException } from '../lib/sentry.ts';\nimport { RefreshToken } from './operations/hermes.ts';\n\nfunction extractOperationName(query: string): string {\n const match = query.match(/(?:mutation|query|subscription)\\s+(\\w+)/);\n return match?.[1] ?? 'UnknownOperation';\n}\n\ninterface ResponseError {\n message: string;\n path?: (string | number)[];\n extensions?: Record<string, unknown>;\n}\n\ninterface GraphQLResponse<T = Record<string, unknown>> {\n data?: T;\n errors?: ResponseError[];\n}\n\ninterface RequestOptions {\n endpoint?: string;\n /** The company as the caller named it, slug or id, for messages. */\n company?: string;\n /** The same company resolved to its id. Absent, `config.company` applies. */\n companyId?: string;\n /** Send no X-Company-Id: the lookup that resolves a slug cannot itself act for one. */\n withoutCompany?: boolean;\n authenticated?: boolean;\n throwOnError?: boolean;\n /** Subgraph that owns the operation, used to explain a refusal precisely. */\n subgraph?: string;\n /**\n * Authenticate as the person even when an application credential is active.\n *\n * `sl use application` needs this: creating and revoking a credential is a\n * management operation, which Hermes refuses to an application token, so\n * switching from one application to another would otherwise be impossible\n * without stepping back through `sl use me` first.\n */\n asPerson?: boolean;\n actingForPersonalCompany?: boolean;\n}\n\nexport class GraphQLRequestError extends Error {\n readonly operationName: string;\n readonly httpStatus?: number;\n readonly graphqlErrors?: Array<{ message: string; extensions?: Record<string, unknown> }>;\n\n constructor(\n message: string,\n details: {\n operationName: string;\n httpStatus?: number;\n graphqlErrors?: Array<{ message: string; extensions?: Record<string, unknown> }>;\n },\n ) {\n super(message);\n this.name = 'GraphQLRequestError';\n this.operationName = details.operationName;\n this.httpStatus = details.httpStatus;\n this.graphqlErrors = details.graphqlErrors;\n }\n}\n\nasync function refreshAccessToken(creds: Credentials, endpoint: string): Promise<Credentials | null> {\n const res = await fetch(endpoint, {\n method: 'POST',\n headers: baseRequestHeaders(),\n body: JSON.stringify({\n query: print(RefreshToken),\n variables: { input: { refreshToken: creds.refreshToken } },\n }),\n });\n\n const json = (await res.json()) as GraphQLResponse<{\n refreshToken: {\n accessToken: string;\n refreshToken: string;\n idToken: string;\n expiresIn: number;\n error: string | null;\n };\n }>;\n\n const token = json.data?.refreshToken;\n if (!token || token.error) return null;\n\n const newCreds: Credentials = {\n accessToken: token.accessToken,\n refreshToken: token.refreshToken,\n idToken: token.idToken,\n expiresAt: Math.floor(Date.now() / 1000) + token.expiresIn,\n };\n\n saveCredentials(newCreds);\n return newCreds;\n}\n\n/**\n * A transport failure — nothing listening, DNS, TLS — rejects rather than\n * returning a response, so it never reaches the `!res.ok` path and escapes as an\n * undici stack trace unless it is handled here.\n */\nfunction reportUnreachable(\n err: Error,\n { endpoint, operationName, throwOnError }: { endpoint: string; operationName: string; throwOnError: boolean },\n): never {\n const code = (err as Error & { cause?: { code?: string } }).cause?.code;\n const reason = code === 'ECONNREFUSED' ? `nothing is listening on ${endpoint}` : err.message;\n\n captureException(err, { operationName, endpoint });\n if (throwOnError) {\n throw new GraphQLRequestError(`${operationName} could not reach the endpoint: ${reason}`, { operationName });\n }\n error(`Could not reach ${endpoint}: ${reason}`);\n hint('Is the local stack running? Check the configured endpoint with `sl config show`.');\n process.exit(3);\n}\n\n/**\n * Internal: execute a raw GraphQL query string.\n */\ninterface Attempt {\n endpoint: string;\n operationName: string;\n throwOnError: boolean;\n verbose: boolean;\n}\n\n/**\n * Which identity to present, in precedence order.\n *\n * An application credential wins over a stored session, and both are skipped for\n * `asPerson` — see RequestOptions.\n */\nasync function resolveAccessToken(\n options: RequestOptions,\n attempt: Attempt,\n): Promise<{ token: string; kind: 'application' | 'user' }> {\n const machine = options.asPerson ? null : clientCredentials();\n if (machine) {\n try {\n return { token: await fetchClientCredentialsToken(machine), kind: 'application' };\n } catch (err) {\n const message = (err as Error).message;\n if (attempt.throwOnError) throw new GraphQLRequestError(message, { operationName: attempt.operationName });\n\n error(message);\n hint('Check SORTLIST_CLIENT_ID, SORTLIST_CLIENT_SECRET and the token endpoint.');\n hint('The credential may also have been revoked, or its application deleted.');\n process.exit(2);\n }\n }\n\n // Its credential is already revoked, so there is nothing to refresh with: when\n // the token expires the caller runs `sl use application` again, which needs\n // their own token.\n const session = options.asPerson ? null : loadApplicationSession();\n if (session) return { token: session.accessToken, kind: 'application' };\n\n if (!options.asPerson && applicationSessionExpired()) {\n error('The application session has expired.');\n hint('Run `sl use application <id>` again, or `sl use me` to act as yourself.');\n process.exit(2);\n }\n\n const elevated = options.asPerson ? null : loadElevatedCredentials();\n if (elevated) return { token: elevated.accessToken, kind: 'user' };\n\n let creds = ensureAuthenticated();\n if (isExpired(creds)) {\n const refreshed = await refreshAccessToken(creds, attempt.endpoint);\n if (!refreshed) {\n if (attempt.throwOnError) {\n throw new GraphQLRequestError('Session expired and could not be refreshed.', {\n operationName: attempt.operationName,\n });\n }\n error('Your session has expired and could not be refreshed.');\n hint('Run `sl login` to re-authenticate.');\n process.exit(2);\n }\n creds = refreshed;\n }\n\n return { token: creds.accessToken, kind: 'user' };\n}\n\nfunction reportHttpFailure(res: Response, body: string, attempt: Attempt): never {\n const { operationName, endpoint, throwOnError, verbose } = attempt;\n captureException(new Error(`${operationName} failed: HTTP ${res.status}`), {\n operationName,\n httpStatus: res.status,\n endpoint,\n });\n if (throwOnError) {\n throw new GraphQLRequestError(`${operationName} failed: HTTP ${res.status} ${res.statusText}`, {\n operationName,\n httpStatus: res.status,\n });\n }\n\n error(`${operationName} failed: HTTP ${res.status} ${res.statusText}`);\n hint('Check your network connection and endpoint: sl config show');\n if (verbose) info(`[debug] Response body: ${body}`);\n process.exit(3);\n}\n\n/** A selection the subgraph could not resolve; `--fields` is the way out. */\nfunction hasFieldError(errors: ResponseError[]): boolean {\n return errors.some((e) => e.message.includes('Failed to implement') || e.message.includes('undefined method'));\n}\n\n/**\n * The router replaces a subgraph's message with \"Unexpected error\" but keeps its\n * `extensions.code`, so the code is the only part worth reading — which is also\n * what the platform's error contract says: the message is a log line, the code is\n * the contract.\n */\nfunction codeOf(errors: ResponseError[]): string | null {\n for (const { extensions } of errors) {\n const code = extensions?.code;\n if (typeof code === 'string') return code;\n }\n\n return null;\n}\n\n/** `VALIDATION_FAILED` reads better as a sentence than as a constant. */\nconst UUID = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;\n\nconst CALLBACK_STATUS_NOT_OK = 'SUBGRAPH_HTTP_CALLBACK_STATUS_CODE_NOT_OK';\n\nfunction subrequestStatus(errors: ResponseError[]): number | null {\n for (const { message, extensions } of errors) {\n const http = extensions?.http;\n if (typeof http === 'object' && http !== null && typeof (http as { status?: unknown }).status === 'number') {\n return (http as { status: number }).status;\n }\n const callbackStatus = extensions?.code === CALLBACK_STATUS_NOT_OK ? message.match(/'(\\d{3})\\b/)?.[1] : undefined;\n if (callbackStatus) return Number(callbackStatus);\n }\n\n return null;\n}\n\nfunction humanise(code: string): string {\n const words = code.toLowerCase().replaceAll('_', ' ');\n\n return words.charAt(0).toUpperCase() + words.slice(1) + '.';\n}\n\n/**\n * `{ name: [\"taken\"] }` becomes `name: taken`.\n *\n * The shape is the platform's error contract: an attribute mapped to symbolic\n * codes, never prose, so this only has to lay it out.\n */\nexport function detailLines(errors: ResponseError[]): string[] {\n const lines: string[] = [];\n for (const { extensions } of errors) {\n const details = extensions?.details;\n if (typeof details !== 'object' || details === null) continue;\n\n for (const [attribute, codes] of Object.entries(details as Record<string, unknown>)) {\n const described = Array.isArray(codes) ? codes.map(describeDetail) : [describeDetail(codes)];\n lines.push(`${attribute}: ${described.join(', ')}`);\n }\n }\n\n return lines;\n}\n\n/**\n * One refusal is a bare code (`\"taken\"`) or, in the newer services, an object naming the\n * code and what it was checked against: `{ error: \"not_running\", status: \"removed\" }`\n * reads as `not_running (status: removed)`.\n */\nfunction describeDetail(detail: unknown): string {\n if (typeof detail !== 'object' || detail === null) return String(detail);\n\n const { error, message, ...rest } = detail as Record<string, unknown>;\n if (error === undefined) return JSON.stringify(detail);\n\n const context = Object.entries(rest).map(([key, value]) => `${key}: ${String(value)}`);\n const code = context.length > 0 ? `${String(error)} (${context.join(', ')})` : String(error);\n return message === undefined ? code : `${code} — ${String(message)}`;\n}\n\nconst HEADLINE_EXTENSIONS = new Set(['code', 'details']);\n\n/**\n * Everything the errors carry beyond the code and its details, so nothing the\n * subgraph said stays hidden behind --verbose: the message unless it is the\n * router's placeholder, the remaining extensions (`service`, …) and the path.\n */\nexport function explainLines(errors: ResponseError[]): string[] {\n const lines = detailLines(errors);\n const seen = new Set(lines);\n const add = (line: string) => {\n if (seen.has(line)) return;\n seen.add(line);\n lines.push(line);\n };\n\n for (const gqlError of errors) {\n if (gqlError.message !== ROUTER_PLACEHOLDER && gqlError.message !== '') add(`message: ${gqlError.message}`);\n for (const [key, value] of Object.entries(gqlError.extensions ?? {})) {\n if (HEADLINE_EXTENSIONS.has(key) || value === null || value === undefined) continue;\n add(`${key}: ${typeof value === 'object' ? JSON.stringify(value) : String(value)}`);\n }\n if (gqlError.path !== undefined && gqlError.path.length > 0) add(`path: ${gqlError.path.join('.')}`);\n }\n\n return lines;\n}\n\nconst ROUTER_PLACEHOLDER = 'Unexpected error';\n\n/**\n * One sentence for a caller that catches rather than exits.\n *\n * Built from the code and its details for the same reason the printed path is:\n * joining the messages produced \"Unexpected error; Unexpected error\", which is\n * the router's placeholder twice and says nothing.\n */\nfunction describe(errors: ResponseError[]): string {\n const code = codeOf(errors);\n const details = detailLines(errors);\n const messages = messageLines(errors);\n\n if (code !== null && code !== 'DOWNSTREAM_SERVICE_ERROR') {\n const explanation = details.length > 0 ? details : messages;\n return explanation.length > 0 ? `${humanise(code)} ${explanation.join('; ')}` : humanise(code);\n }\n\n // Falling back to `code` here would print DOWNSTREAM_SERVICE_ERROR, which names\n // the router's own plumbing and explains nothing to whoever ran the command.\n return messages.length > 0 ? messages.join('; ') : 'the server gave no reason';\n}\n\nfunction messageLines(errors: ResponseError[]): string[] {\n return errors.map((e) => e.message).filter((message) => message !== ROUTER_PLACEHOLDER);\n}\n\nfunction serviceOf(errors: ResponseError[]): string | null {\n for (const { extensions } of errors) {\n const service = extensions?.service;\n if (typeof service === 'string') return service;\n }\n\n return null;\n}\n\nexport { subrequestStatus };\n\nexport function refusedForNamingNoCompany(errors: ResponseError[], namedNoCompany: boolean): boolean {\n if (!namedNoCompany) return false;\n\n const status = subrequestStatus(errors);\n const maskedCallbackRefusal = status === null && codeOf(errors) === CALLBACK_STATUS_NOT_OK;\n\n return status === 403 || maskedCallbackRefusal;\n}\n\n/** Did anything actually resolve? An all-null payload beside an error is a failure. */\nfunction hasResolvedField(data: unknown): boolean {\n if (data === null || data === undefined) return false;\n\n return Object.values(data as Record<string, unknown>).some((value) => value !== null);\n}\n\nfunction reportGraphqlErrors(errors: ResponseError[], options: RequestOptions, attempt: Attempt): never {\n const { operationName, throwOnError, verbose } = attempt;\n captureException(new Error(`${operationName} GraphQL errors`), {\n operationName,\n errors: errors.map((e) => e.message),\n });\n\n if (throwOnError) {\n throw new GraphQLRequestError(`${operationName} failed: ${describe(errors)}`, {\n operationName,\n graphqlErrors: errors,\n });\n }\n\n // Relaying \"Unexpected error\" teaches nobody anything; the code does.\n if (codeOf(errors) === 'NOT_AUTHENTICATED') {\n const service = serviceOf(errors);\n const where = service === null ? '' : ` for ${service}`;\n error(`Not authenticated${where}.`);\n if (actingAsApplication()) {\n hint('You are acting as an application. Hermes refuses the tokens it mints on its own');\n hint('management API by design, so a leaked secret cannot mint more — `sl use me` switches back.');\n } else {\n hint('Run `sl login` to authenticate, or `sl whoami` to see what the CLI is acting as.');\n }\n if (verbose) for (const gqlError of errors) info(`[debug] ${gqlError.message}`);\n process.exit(4);\n }\n\n // A 401 from a subgraph means the token no longer verifies there: expired, or\n // signed with a key the issuer has since rotated. The router relays neither.\n if (subrequestStatus(errors) === 401) {\n const service = serviceOf(errors);\n const where = service ?? 'The subgraph';\n error(`${where} did not accept your token.`);\n if (actingAsApplication()) {\n hint('The application token has expired or was signed with a key Hermes no longer publishes');\n hint('(a local Hermes mints a fresh key on every restart). Run `sl use application <id>` again.');\n } else {\n hint('Run `sl login` again; `sl whoami` shows what the CLI is acting as.');\n }\n if (verbose) for (const gqlError of errors) info(`[debug] ${JSON.stringify(gqlError)}`);\n process.exit(4);\n }\n\n // A 403 from a subgraph is the X-Company-Id check: the router hides the\n // subgraph's message, so the CLI has to say what it sent.\n if (subrequestStatus(errors) === 403) {\n const service = serviceOf(errors);\n const where = service ?? 'The subgraph';\n const company = options.company ?? getUserContext().company ?? options.companyId;\n if (options.actingForPersonalCompany) {\n error(`${where} refused to act for your personal company.`);\n hint('It was tried because the request named no company, and your token does not list it as yours.');\n hint(\"On a local stack the token comes from a shared tenant and lists that environment's companies.\");\n hint('Pass --company <slug|id>, or `sl config set company <slug|id>`; `sl companies` lists them.');\n } else if (company && UUID.test(company)) {\n error(`${where} refused ${company}: that is a raw uuid, not a company id.`);\n hint('Pass its slug, or the id `sl companies` lists.');\n } else if (company) {\n error(`${where} refused to act for company ${company}.`);\n hint('Your token does not list that company, or Hermes no longer knows you as one of its members.');\n hint('`sl whoami` shows what the CLI is acting as;');\n hint('pick one of your companies with --company or `sl config set company <slug|id>`.');\n } else {\n error(`${where} refused this request: it names no company to act for.`);\n hint('Pick one of your companies with --company or `sl config set company <slug|id>`;');\n hint('`sl companies` lists them. Join one first if the list is empty.');\n }\n if (verbose) for (const gqlError of errors) info(`[debug] ${JSON.stringify(gqlError)}`);\n process.exit(4);\n }\n\n // Prefer the code and its details over the message: the router replaces the\n // message with a placeholder, and the platform's error contract puts the\n // machine-readable part in extensions precisely so a client need not parse prose.\n const code = codeOf(errors);\n if (code !== null && code !== 'DOWNSTREAM_SERVICE_ERROR') {\n error(humanise(code));\n\n for (const line of explainLines(errors)) info(` ${line}`);\n if (verbose) for (const gqlError of errors) info(`[debug] ${JSON.stringify(gqlError)}`);\n process.exit(1);\n }\n\n error(`${operationName} failed:`);\n for (const gqlError of errors) {\n info(` ${gqlError.message}`);\n if (verbose && gqlError.extensions) info(`[debug] Extensions: ${JSON.stringify(gqlError.extensions)}`);\n }\n\n if (hasFieldError(errors)) {\n hint('Use --fields to select specific fields, or --exclude to skip broken ones.');\n hint(`Example: sl ${operationName.toLowerCase()} --fields id,title,status`);\n }\n\n process.exit(1);\n}\n\nfunction logRequest(query: string, variables: Record<string, unknown> | undefined, attempt: Attempt): void {\n info(`[debug] ${attempt.operationName} → ${attempt.endpoint}`);\n info(`[debug] Query:\\n${query}`);\n if (variables) info(`[debug] Variables: ${JSON.stringify(variables, null, 2)}`);\n}\n\nfunction startAttempt(query: string, variables: Record<string, unknown> | undefined, options: RequestOptions): Attempt {\n const attempt: Attempt = {\n endpoint: getEndpoint(options.endpoint),\n operationName: extractOperationName(query),\n throwOnError: options.throwOnError ?? false,\n verbose: process.env.SL_DEBUG === '1',\n };\n\n addBreadcrumb({\n category: 'graphql',\n message: attempt.operationName,\n data: { endpoint: attempt.endpoint, authenticated: options.authenticated ?? true },\n level: 'info',\n });\n\n if (attempt.verbose) logRequest(query, variables, attempt);\n\n return attempt;\n}\n\nasync function requestHeaders(\n options: RequestOptions,\n attempt: Attempt,\n): Promise<{ headers: Record<string, string>; namedNoCompany: boolean }> {\n const headers: Record<string, string> = baseRequestHeaders();\n if (!(options.authenticated ?? true)) return { headers, namedNoCompany: false };\n\n const { token, kind } = await resolveAccessToken(options, attempt);\n headers['Authorization'] = `Bearer ${token}`;\n const companyId = options.withoutCompany\n ? undefined\n : (options.companyId ?? (await resolveCompanyId({ ctx: getUserContext() })));\n if (companyId) headers['X-Company-Id'] = companyId;\n // Never print the full token — debug output ends up in pasted logs. `sl token`\n // is the deliberate way to get the raw value.\n if (attempt.verbose) info(`[debug] ${kind} token: ...${token.slice(-8)}`);\n\n return { headers, namedNoCompany: !companyId && kind === 'user' && !options.withoutCompany };\n}\n\nasync function executeQuery<T = Record<string, unknown>>(\n query: string,\n variables: Record<string, unknown> | undefined,\n options: RequestOptions = {},\n): Promise<T> {\n const attempt = startAttempt(query, variables, options);\n const { headers, namedNoCompany } = await requestHeaders(options, attempt);\n\n let res: Response;\n try {\n res = await fetch(attempt.endpoint, {\n method: 'POST',\n headers,\n body: JSON.stringify({ query, variables }),\n });\n } catch (err) {\n reportUnreachable(err as Error, {\n endpoint: attempt.endpoint,\n operationName: attempt.operationName,\n throwOnError: attempt.throwOnError,\n });\n }\n\n if (!res.ok) reportHttpFailure(res, await res.text(), attempt);\n\n const json = (await res.json()) as GraphQLResponse<T>;\n\n if (json.errors?.length) {\n // A refused mutation arrives as data carrying a null field *and* an error, so\n // the refusal has to be recognised before the partial-success branch — which\n // would otherwise relay the router's placeholder and let the caller explain\n // the null a second time, in different words.\n const refused = !hasResolvedField(json.data);\n if (refused && refusedForNamingNoCompany(json.errors, namedNoCompany)) {\n const personal = await personalCompanyId();\n if (personal) {\n return executeQuery<T>(query, variables, { ...options, companyId: personal, actingForPersonalCompany: true });\n }\n }\n if (refused) reportGraphqlErrors(json.errors, options, attempt);\n\n // Partial success: the data that did resolve is worth more than the failure.\n for (const gqlError of json.errors) warn(gqlError.message);\n if (hasFieldError(json.errors)) {\n hint('Use --fields to select specific fields, or --exclude to skip broken ones.');\n }\n return json.data as T;\n }\n\n if (!json.data) {\n if (attempt.throwOnError) {\n throw new GraphQLRequestError(`${attempt.operationName}: no data returned from API.`, {\n operationName: attempt.operationName,\n });\n }\n error(`${attempt.operationName}: no data returned from API.`);\n hint('This usually means the server returned an empty response.');\n hint('Verify your endpoint: sl config show');\n process.exit(1);\n }\n\n return json.data;\n}\n\nexport interface ServerSentEvent {\n event: string;\n data: string;\n}\n\nexport async function* parseEventStream(chunks: AsyncIterable<Uint8Array | string>): AsyncGenerator<ServerSentEvent> {\n const decoder = new TextDecoder();\n let buffer = '';\n\n for await (const chunk of chunks) {\n buffer += typeof chunk === 'string' ? chunk : decoder.decode(chunk, { stream: true });\n buffer = buffer.replaceAll('\\r\\n', '\\n');\n\n let boundary = buffer.indexOf('\\n\\n');\n while (boundary !== -1) {\n const block = buffer.slice(0, boundary);\n buffer = buffer.slice(boundary + 2);\n const parsed = parseEventBlock(block);\n if (parsed) yield parsed;\n boundary = buffer.indexOf('\\n\\n');\n }\n }\n\n const rest = parseEventBlock(buffer);\n if (rest) yield rest;\n}\n\nfunction parseEventBlock(block: string): ServerSentEvent | null {\n let event = 'message';\n const data: string[] = [];\n\n for (const line of block.split('\\n')) {\n if (line === '' || line.startsWith(':')) continue;\n const colon = line.indexOf(':');\n const field = colon === -1 ? line : line.slice(0, colon);\n const value = colon === -1 ? '' : line.slice(colon + 1).replace(/^ /, '');\n if (field === 'event') event = value;\n if (field === 'data') data.push(value);\n }\n\n return data.length > 0 || event !== 'message' ? { event, data: data.join('\\n') } : null;\n}\n\ninterface SubscribeOptions extends RequestOptions {\n signal?: AbortSignal;\n}\n\nexport interface Subscription {\n events: AsyncGenerator<Record<string, unknown>>;\n}\n\nasync function openEventStream(\n query: string,\n variables: Record<string, unknown> | undefined,\n options: SubscribeOptions,\n attempt: Attempt,\n): Promise<{ res: Response; namedNoCompany: boolean }> {\n const { headers, namedNoCompany } = await requestHeaders(options, attempt);\n headers['Accept'] = 'text/event-stream';\n\n let res: Response;\n try {\n res = await fetch(attempt.endpoint, {\n method: 'POST',\n headers,\n body: JSON.stringify({ query, variables }),\n signal: options.signal,\n });\n } catch (err) {\n reportUnreachable(err as Error, {\n endpoint: attempt.endpoint,\n operationName: attempt.operationName,\n throwOnError: attempt.throwOnError,\n });\n }\n\n if (!res.ok) {\n const body = await res.text();\n const errors = parseErrors(body);\n if (errors) reportGraphqlErrors(errors, options, attempt);\n reportHttpFailure(res, body, attempt);\n }\n\n return { res, namedNoCompany };\n}\n\nfunction parseErrors(body: string): ResponseError[] | null {\n try {\n const errors = (JSON.parse(body) as GraphQLResponse).errors;\n return errors?.length ? errors : null;\n } catch {\n return null;\n }\n}\n\nasync function* subscriptionEvents(\n res: Response,\n query: string,\n variables: Record<string, unknown> | undefined,\n options: SubscribeOptions,\n attempt: Attempt,\n namedNoCompany: boolean,\n): AsyncGenerator<Record<string, unknown>> {\n if (!res.body) return;\n\n for await (const { event, data } of parseEventStream(res.body as unknown as AsyncIterable<Uint8Array>)) {\n if (event === 'complete') return;\n if (event !== 'next' && event !== 'message') continue;\n\n const payload = JSON.parse(data) as GraphQLResponse;\n if (payload.errors?.length && !hasResolvedField(payload.data)) {\n if (refusedForNamingNoCompany(payload.errors, namedNoCompany)) {\n const personal = await personalCompanyId();\n if (personal) {\n const retry = await graphqlSubscribe(query, variables, {\n ...options,\n companyId: personal,\n actingForPersonalCompany: true,\n });\n yield* retry.events;\n return;\n }\n }\n reportGraphqlErrors(payload.errors, options, attempt);\n }\n\n for (const gqlError of payload.errors ?? []) warn(gqlError.message);\n if (payload.data) yield payload.data;\n }\n}\n\nexport async function graphqlSubscribe(\n query: string,\n variables: Record<string, unknown> | undefined,\n options: SubscribeOptions = {},\n): Promise<Subscription> {\n const attempt = startAttempt(query, variables, options);\n const { res, namedNoCompany } = await openEventStream(query, variables, options, attempt);\n\n return { events: subscriptionEvents(res, query, variables, options, attempt, namedNoCompany) };\n}\n\n/**\n * Execute a typed GraphQL operation (for hand-written commands).\n */\nexport async function graphql<TData, TVars>(\n document: TypedDocumentNode<TData, TVars>,\n variables?: TVars,\n options: RequestOptions = {},\n): Promise<TData> {\n return executeQuery<TData>(print(document), variables as Record<string, unknown> | undefined, options);\n}\n\n/**\n * Execute a raw GraphQL query string (for generated/dynamic commands).\n */\nexport async function graphqlRaw(\n query: string,\n variables?: Record<string, unknown>,\n options: RequestOptions = {},\n): Promise<Record<string, unknown>> {\n return executeQuery(query, variables, options);\n}\n\n/**\n * Execute an unauthenticated typed GraphQL operation.\n */\nexport async function graphqlUnauthenticated<TData, TVars>(\n document: TypedDocumentNode<TData, TVars>,\n variables?: TVars,\n endpoint?: string,\n): Promise<TData> {\n return graphql(document, variables, { endpoint, authenticated: false });\n}\n","import { pkg } from './package-root.ts';\n\nexport const API_CLIENT = 'sl-cli';\n\nexport function userAgent(): string {\n return `${API_CLIENT}/${pkg.version} (node/${process.versions.node})`;\n}\n\nexport function baseRequestHeaders(): Record<string, string> {\n return {\n 'Content-Type': 'application/json',\n 'X-API-Client': API_CLIENT,\n 'User-Agent': userAgent(),\n };\n}\n","/**\n * Claims out of a token this process holds.\n *\n * Decoded, never verified: the signature belongs to whoever issued the token,\n * and these values are only ever used to tell the operator what they hold.\n */\nexport function tokenClaims(accessToken: string): Record<string, unknown> | null {\n try {\n const payload = accessToken.split('.')[1];\n if (!payload) return null;\n\n return JSON.parse(Buffer.from(payload, 'base64url').toString('utf-8'));\n } catch {\n return null;\n }\n}\n\n/** Scopes the identity provider actually granted, as opposed to those requested. */\nexport function grantedScopes(accessToken: string): string[] {\n const scope = tokenClaims(accessToken)?.scope;\n\n return typeof scope === 'string' ? scope.split(' ').filter(Boolean) : [];\n}\n\n/**\n * The services `sl login` asked for that came back with nothing.\n *\n * Auth0 grants the intersection of requested scopes and the caller's assigned\n * permissions by exact string match, and drops the rest without saying so. The\n * comparison is per service rather than per scope on purpose: the CLI requests\n * a superset of permission names (`atlas/*:*` and `atlas/*:read`), so most\n * individual requests are expected to be dropped and listing them would be\n * noise. A service with no scope at all is the condition that breaks commands.\n */\nexport function servicesWithoutScope(requestedScope: string, accessToken: string): string[] {\n const serviceOf = (scope: string): string | null => (scope.includes('/') ? scope.split('/')[0] : null);\n const granted = new Set(grantedScopes(accessToken).map(serviceOf).filter(Boolean));\n const requested = new Set(requestedScope.split(' ').map(serviceOf).filter(Boolean));\n\n return [...requested].filter((service) => !granted.has(service)).sort() as string[];\n}\n","import { loadConfig } from './config.ts';\nimport { tokenClaims } from './token-claims.ts';\n\n/**\n * Unattended authentication with an application credential.\n *\n * `sl login` is interactive and its refresh token expires, so it cannot back a\n * CI job. When SORTLIST_CLIENT_ID and SORTLIST_CLIENT_SECRET are both present,\n * every command exchanges them at Hermes' token endpoint instead — including the\n * dynamically registered subgraph commands.\n */\nexport interface ClientCredentials {\n clientId: string;\n clientSecret: string;\n}\n\ninterface CachedToken {\n accessToken: string;\n expiresAt: number;\n}\n\n// Per-process only: a short-lived machine token is not worth writing to disk,\n// and a single command run exchanges once.\nlet cached: CachedToken | null = null;\n\nexport function clientCredentials(): ClientCredentials | null {\n const clientId = process.env.SORTLIST_CLIENT_ID;\n const clientSecret = process.env.SORTLIST_CLIENT_SECRET;\n if (!clientId || !clientSecret) return null;\n\n return { clientId, clientSecret };\n}\n\nexport interface ApplicationIdentity {\n applicationId: string;\n credentialId: string;\n companyId: string;\n /** The token's `sub`, `application:<uuid>` — the same application for every credential on it. */\n sub: string;\n expiresAt: Date;\n}\n\nconst CLAIM_NAMESPACE = 'https://sortlist.com/';\n\n/**\n * Reads the identity out of a token this process just minted.\n *\n * Decoded, never verified: the signature is Hermes' to check, and this is only\n * ever used to tell the operator what they are acting as. It is also the only\n * way to answer the question at all — Hermes refuses its own tokens on its\n * management API, so there is no `me` to call as an application.\n */\nexport function applicationIdentity(accessToken: string): ApplicationIdentity | null {\n try {\n const claims = tokenClaims(accessToken);\n if (!claims) return null;\n\n return {\n applicationId: String(claims[`${CLAIM_NAMESPACE}application_id`]),\n credentialId: String(claims[`${CLAIM_NAMESPACE}credential_id`]),\n companyId: String(claims[`${CLAIM_NAMESPACE}company_id`]),\n sub: String(claims.sub),\n expiresAt: new Date(Number(claims.exp) * 1000),\n };\n } catch {\n return null;\n }\n}\n\nconst RETIRED_TOKEN_ENDPOINTS: Record<string, string> = {\n 'https://hermes.production.sortlist.cloud/oauth/token': 'https://hermes.sortlist.com/oauth/token',\n 'https://hermes.staging.sortlist.cloud/oauth/token': 'https://hermes.sortlist-test.com/oauth/token',\n};\n\nexport function tokenEndpoint(): string {\n const configured = process.env.SORTLIST_TOKEN_URL ?? loadConfig().tokenEndpoint;\n if (!configured) {\n throw new Error('No token endpoint configured. Set SORTLIST_TOKEN_URL or run: sl config set tokenEndpoint <url>');\n }\n return RETIRED_TOKEN_ENDPOINTS[configured] ?? configured;\n}\n\nexport async function fetchClientCredentialsToken(credentials: ClientCredentials): Promise<string> {\n if (cached && Date.now() < cached.expiresAt) return cached.accessToken;\n\n // No `scope` is sent: omitting it asks for the application's full grant, and\n // the grant lives on the application rather than on the credential, so there\n // is nothing for the caller to narrow.\n const body = new URLSearchParams({\n grant_type: 'client_credentials',\n client_id: credentials.clientId,\n client_secret: credentials.clientSecret,\n });\n\n const res = await fetch(tokenEndpoint(), {\n method: 'POST',\n headers: { 'Content-Type': 'application/x-www-form-urlencoded' },\n body: body.toString(),\n });\n\n const json = (await res.json().catch(() => ({}))) as {\n access_token?: string;\n expires_in?: number;\n error?: string;\n };\n\n if (!res.ok || !json.access_token) {\n // The endpoint deliberately does not say whether the client id exists, so\n // there is nothing more specific to report than what it returned.\n const reason = json.error ?? `HTTP ${res.status}`;\n throw new Error(`Token request failed: ${reason}`);\n }\n\n cached = {\n accessToken: json.access_token,\n // 60s of headroom, matching the interactive path's expiry check.\n expiresAt: Date.now() + ((json.expires_in ?? 3600) - 60) * 1000,\n };\n\n return cached.accessToken;\n}\n\nexport function resetTokenCache(): void {\n cached = null;\n}\n","import { graphqlRaw } from '../graphql/client.ts';\nimport { type UserContext } from './config.ts';\nimport { error, hint } from './output.ts';\n\n/**\n * A company id is the url-safe base64 of `Company/<uuid>`; anything else a\n * person types for a company is taken as its slug.\n */\nexport function isCompanyId(value: string): boolean {\n try {\n return Buffer.from(value, 'base64url').toString('utf8').startsWith('Company/');\n } catch {\n return false;\n }\n}\n\nconst COMPANY_BY_SLUG = `query CompanyBySlug($slug: String!) { company(slug: $slug) { id } }`;\nconst PERSONAL_COMPANY = `query PersonalCompany { me { companies(first: 50) { nodes { id personal } } } }`;\n\nconst resolved = new Map<string, Promise<string>>();\nlet personal: Promise<string | undefined> | undefined;\n\nexport function pickPersonalCompanyId(data: Record<string, unknown>): string | undefined {\n const me = data.me as { companies?: { nodes?: Array<{ id?: string; personal?: boolean }> } } | null;\n\n return me?.companies?.nodes?.find((company) => company.personal === true)?.id;\n}\n\nexport function personalCompanyId(): Promise<string | undefined> {\n personal ??= graphqlRaw(PERSONAL_COMPANY, undefined, { withoutCompany: true, throwOnError: true })\n .then(pickPersonalCompanyId)\n .catch(() => undefined);\n\n return personal;\n}\n\nasync function lookupCompanyId(slug: string): Promise<string> {\n const data = await graphqlRaw(COMPANY_BY_SLUG, { slug }, { withoutCompany: true });\n const id = (data.company as { id?: string } | null)?.id;\n if (typeof id === 'string') return id;\n\n error(`No company with slug \"${slug}\" among yours.`);\n hint('`sl companies` lists the companies you belong to, with their slugs and ids.');\n process.exit(2);\n}\n\n/**\n * Resolve the company a request acts for to its id, from the `--company` flag\n * first and `config.company` second. A slug costs one lookup per process.\n */\nexport async function resolveCompanyId(opts: {\n company?: string | undefined;\n ctx: UserContext | undefined;\n}): Promise<string | undefined> {\n const value = opts.company ?? opts.ctx?.company;\n if (!value) return undefined;\n if (isCompanyId(value)) return value;\n\n let pending = resolved.get(value);\n if (!pending) {\n pending = lookupCompanyId(value);\n resolved.set(value, pending);\n }\n return pending;\n}\n","import * as Sentry from '@sentry/node';\n\nimport { isLocalDev } from './env.ts';\nimport { pkg } from './package-root.ts';\n\nconst SENTRY_DSN = 'https://306d2e4389b8baa0bf14e587c2ceff04@o27611.ingest.us.sentry.io/4511229468409856';\nconst SENTRY_ENVIRONMENT = process.env.SL_SENTRY_ENV ?? (isLocalDev ? 'development' : 'production');\n\nconst IGNORED_ERRORS = [\n /Network Error/i,\n /Failed to fetch/i,\n /fetch failed/i,\n /ECONNREFUSED/i,\n /ENOTFOUND/i,\n /ETIMEDOUT/i,\n /Request aborted/i,\n];\n\nfunction isIgnoredError(message: string): boolean {\n return IGNORED_ERRORS.some((pattern) =>\n typeof pattern === 'string' ? message.includes(pattern) : pattern.test(message),\n );\n}\n\nexport function initSentry(): void {\n if (isLocalDev) {\n return;\n }\n\n Sentry.init({\n dsn: SENTRY_DSN,\n environment: SENTRY_ENVIRONMENT,\n release: `${pkg.name}@${pkg.version}`,\n tracesSampleRate: 0,\n maxBreadcrumbs: 50,\n attachStacktrace: true,\n beforeSend(event) {\n const message = event.exception?.values?.[0]?.value ?? '';\n if (isIgnoredError(message)) {\n return null;\n }\n return event;\n },\n });\n\n Sentry.setTag('cli_version', pkg.version);\n}\n\nexport function captureException(error: unknown, extra?: Record<string, unknown>): void {\n if (isLocalDev) {\n return;\n }\n Sentry.captureException(error, extra ? { extra } : undefined);\n}\n\nexport function addBreadcrumb(breadcrumb: Sentry.Breadcrumb): void {\n if (isLocalDev) {\n return;\n }\n Sentry.addBreadcrumb(breadcrumb);\n}\n\nexport async function flushSentry(timeout = 2000): Promise<void> {\n if (isLocalDev) {\n return;\n }\n await Sentry.flush(timeout);\n}\n","/* eslint-disable */\nimport type { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core';\nexport type Maybe<T> = T | null;\nexport type InputMaybe<T> = T | null | undefined;\nexport type Exact<T extends { [key: string]: unknown }> = { [K in keyof T]: T[K] };\nexport type MakeOptional<T, K extends keyof T> = Omit<T, K> & { [SubKey in K]?: Maybe<T[SubKey]> };\nexport type MakeMaybe<T, K extends keyof T> = Omit<T, K> & { [SubKey in K]: Maybe<T[SubKey]> };\nexport type MakeEmpty<T extends { [key: string]: unknown }, K extends keyof T> = { [_ in K]?: never };\nexport type Incremental<T> = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never };\n/** All built-in and custom scalars, mapped to their actual values */\nexport type Scalars = {\n ID: { input: string; output: string; }\n String: { input: string; output: string; }\n Boolean: { input: boolean; output: boolean; }\n Int: { input: number; output: number; }\n Float: { input: number; output: number; }\n /** An ISO 8601-encoded date */\n ISO8601Date: { input: any; output: any; }\n /** An ISO 8601-encoded datetime */\n ISO8601DateTime: { input: any; output: any; }\n /** An ISO 8601-encoded duration */\n ISO8601Duration: { input: any; output: any; }\n /** Represents untyped JSON */\n JSON: { input: any; output: any; }\n /** An integer range represented as a two-element array [min, max]. A one-element array [min] is open-ended. */\n Range: { input: any; output: any; }\n join__DirectiveArguments: { input: any; output: any; }\n join__FieldSet: { input: any; output: any; }\n join__FieldValue: { input: any; output: any; }\n link__Import: { input: any; output: any; }\n requiresScopes__Scope: { input: any; output: any; }\n};\n\n/** Autogenerated input type of AcceptCompanyInvitation */\nexport type AcceptCompanyInvitationInput = {\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: InputMaybe<Scalars['String']['input']>;\n /** The code from createCompanyInvitation. An unknown, spent, revoked or expired one fails identically. */\n code: Scalars['String']['input'];\n};\n\n/** Whether a token subject may act for a company, as Hermes sees it right now. */\nexport type ActingCheck =\n /**\n * The company and the subject both exist, but the person is not a member of it,\n * or the application belongs to another company.\n */\n | 'NOT_A_MEMBER'\n /** The subject may act for the company: a member of it, or an application it owns. */\n | 'OK'\n /** No company with this id. */\n | 'UNKNOWN_COMPANY'\n /** Hermes knows no person or application behind this subject. */\n | 'UNKNOWN_SUBJECT';\n\n/** A national administrative code attached to a division, such as a French INSEE region or département code. */\nexport type AdministrativeCode = Node & {\n __typename?: 'AdministrativeCode';\n id: Scalars['ID']['output'];\n /**\n * Global id of the division that carries this code natively. Equals the queried\n * location's own id for its own codes, or an ancestor's id for an inherited one\n * — e.g. Lyon reports Rhône's département code with Rhône's id here.\n */\n locationId: Scalars['ID']['output'];\n /** Coding scheme the value belongs to. */\n scheme: AdministrativeCodeScheme;\n /** The code itself, as the scheme's authority writes it — e.g. \"11\", \"2A\", \"971\". Not zero-stripped. */\n value: Scalars['String']['output'];\n};\n\n/** National coding scheme an administrative code belongs to. */\nexport type AdministrativeCodeScheme =\n /**\n * French INSEE département code, e.g. \"69\" for Rhône, \"2A\" for Corse-du-Sud,\n * \"971\" for Guadeloupe. Carried by COUNTY divisions.\n */\n | 'INSEE_DEPARTMENT'\n /** French INSEE region code, e.g. \"11\" for Île-de-France. Carried by REGION divisions. */\n | 'INSEE_REGION';\n\n/** Federation reference to a Application owned by another subgraph. */\nexport type Application = Node & {\n __typename?: 'Application';\n /**\n * The owning company. Every member of it can manage this application, and\n * `Query.applications` spans them all, so this is what attributes a row to one.\n */\n company: Company;\n /** When the application was registered. */\n createdAt: Scalars['ISO8601DateTime']['output'];\n /** Who registered it. Confers no ownership: any member of the owning company can manage it. */\n createdBy: User;\n /**\n * Several may be active — chiefly to rotate without downtime. Throwaway CLI\n * session credentials are excluded unless asked for.\n */\n credentials: ApplicationCredentialConnection;\n /** Free-text note on what the application is for, or null. */\n description?: Maybe<Scalars['String']['output']>;\n /** GlobalID-encoded Application id. */\n id: Scalars['ID']['output'];\n /** Display name of the application. */\n name: Scalars['String']['output'];\n /**\n * Scopes every token minted from this application's credentials carries. The\n * same for every application and not a setting: reading Atlas contacts and\n * organizations, metered on the application's company.\n */\n scopes: Array<Scalars['String']['output']>;\n};\n\n\n/** Federation reference to a Application owned by another subgraph. */\nexport type ApplicationCredentialsArgs = {\n after?: InputMaybe<Scalars['String']['input']>;\n before?: InputMaybe<Scalars['String']['input']>;\n first?: InputMaybe<Scalars['Int']['input']>;\n includeSessions?: InputMaybe<Scalars['Boolean']['input']>;\n last?: InputMaybe<Scalars['Int']['input']>;\n};\n\n/** The connection type for Application. */\nexport type ApplicationConnection = {\n __typename?: 'ApplicationConnection';\n /** A list of edges. */\n edges?: Maybe<Array<Maybe<ApplicationEdge>>>;\n /** A list of nodes. */\n nodes?: Maybe<Array<Maybe<Application>>>;\n /** Information to aid in pagination. */\n pageInfo: PageInfo;\n /** Total number of items across all pages. */\n totalCount: Scalars['Int']['output'];\n};\n\n/** A client_id/client_secret pair. The secret is shown exactly once, at creation. */\nexport type ApplicationCredential = Node & {\n __typename?: 'ApplicationCredential';\n /** Public identifier of the credential, sent as client_id when requesting a token. */\n clientId: Scalars['String']['output'];\n /** When the credential was created. */\n createdAt: Scalars['ISO8601DateTime']['output'];\n /** Who registered it. Recorded, but absent from minted tokens: the subject is the application. */\n createdBy: User;\n /** Null for a credential that lives until revoked. */\n expiresAt?: Maybe<Scalars['ISO8601DateTime']['output']>;\n id: Scalars['ID']['output'];\n /** When this credential last obtained a token. Null if never used. */\n lastUsedAt?: Maybe<Scalars['ISO8601DateTime']['output']>;\n /** Human label, e.g. `rotation-2026-08`. Required: an unnamed credential among three is unmanageable. */\n name: Scalars['String']['output'];\n /** When the credential was revoked, or null unless revoked. Expiry is reported separately in `expiresAt`. */\n revokedAt?: Maybe<Scalars['ISO8601DateTime']['output']>;\n /** True for a throwaway credential minted for one CLI session and revoked immediately. */\n session: Scalars['Boolean']['output'];\n};\n\n/** The connection type for ApplicationCredential. */\nexport type ApplicationCredentialConnection = {\n __typename?: 'ApplicationCredentialConnection';\n /** A list of edges. */\n edges?: Maybe<Array<Maybe<ApplicationCredentialEdge>>>;\n /** A list of nodes. */\n nodes?: Maybe<Array<Maybe<ApplicationCredential>>>;\n /** Information to aid in pagination. */\n pageInfo: PageInfo;\n /** Total number of items across all pages. */\n totalCount: Scalars['Int']['output'];\n};\n\n/** An edge in a connection. */\nexport type ApplicationCredentialEdge = {\n __typename?: 'ApplicationCredentialEdge';\n /** A cursor for use in pagination. */\n cursor: Scalars['String']['output'];\n /** The item at the end of the edge. */\n node?: Maybe<ApplicationCredential>;\n};\n\n/** An edge in a connection. */\nexport type ApplicationEdge = {\n __typename?: 'ApplicationEdge';\n /** A cursor for use in pagination. */\n cursor: Scalars['String']['output'];\n /** The item at the end of the edge. */\n node?: Maybe<Application>;\n};\n\n/** Autogenerated input type of AuthenticateOutboundChannelAccount */\nexport type AuthenticateOutboundChannelAccountInput = {\n /**\n * Hostname the provider's sign-in page is served from instead of the provider's\n * own, e.g. `ln-auth.consumer.example`. Must be verified with the provider\n * beforehand; refused as `authentication_domain.invalid` when it is not a bare\n * hostname. Hosted-link providers only.\n */\n authenticationDomain?: InputMaybe<Scalars['String']['input']>;\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: InputMaybe<Scalars['String']['input']>;\n /**\n * Where the owner signs in from, as an ISO 3166-1 alpha-2 code. The provider\n * exits from that country so the member's session keeps the origin it has always\n * had. A country the provider cannot exit from is ignored rather than refused,\n * and the provider picks one itself — as it does when none is given. Only read\n * on the hosted path; the credentials path carries its own.\n */\n countryCode?: InputMaybe<Scalars['String']['input']>;\n /**\n * The owner's credentials, for a provider that authenticates with them. Verified\n * at the channel before this returns; refused as `credentials.rejected` when the\n * channel does not accept them and as `credentials.unsupported` on a hosted-link provider.\n */\n credentials?: InputMaybe<OutboundChannelAccountCredentialsInput>;\n /** Global id of the channel account to authenticate. */\n id: Scalars['ID']['input'];\n /**\n * Provider to authenticate on. Defaults to the account's running connection's\n * provider. Naming another one opens a new connection beside it; once that\n * connection is confirmed the account works through it and the previous one is\n * released — same id, same conversations. Refused as `provider.unknown` when it\n * does not serve the channel.\n */\n provider?: InputMaybe<OutboundChannelProvider>;\n /**\n * HTTPS address the owner's browser is sent back to after the provider's page.\n * Required by hosted-link providers (`return_url.blank` otherwise).\n * Display-only: its query string must never be trusted as the result. For\n * `google` and `microsoft` it is the consumer's OAuth callback, which hands the\n * `code` and `state` it receives to `completeOutboundChannelAuthentication`; it\n * must be one of the redirect addresses registered for the gateway\n * (`return_url.not_allowed` otherwise).\n */\n returnUrl?: InputMaybe<Scalars['String']['input']>;\n};\n\n/** Autogenerated return type of AuthenticateOutboundChannelAccount. */\nexport type AuthenticateOutboundChannelAccountPayload = Node & {\n __typename?: 'AuthenticateOutboundChannelAccountPayload';\n /** The step the account owner has to complete, or its acceptance. */\n authentication: OutboundChannelAccountAuthentication;\n /** The account the attempt was started on, unchanged. */\n channelAccount: OutboundChannelAccount;\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: Maybe<Scalars['String']['output']>;\n id: Scalars['ID']['output'];\n};\n\n/** A Stripe Checkout session opened for a company, in embedded mode. */\nexport type BillingCheckoutSession = {\n __typename?: 'BillingCheckoutSession';\n /**\n * Hand to Stripe.js' `<EmbeddedCheckoutProvider>` to mount the payment form in\n * place. Single-use and short-lived; request a new session rather than storing it.\n */\n clientSecret: Scalars['String']['output'];\n};\n\n/**\n * A grant of credits to a customer: a plan allowance, a trial, a pack or top-up, a\n * promo, a migrated balance, or credits given back by a refund or a correction.\n */\nexport type BillingCredit = Node & {\n __typename?: 'BillingCredit';\n /** Granted credits. Always greater than 0. */\n amount: Scalars['Float']['output'];\n /** When this credit was granted. */\n createdAt: Scalars['ISO8601DateTime']['output'];\n /**\n * For a refund or correction credit, the debit whose charge it reduces. Null for\n * every other kind, and when it reduces an overage.\n */\n debit?: Maybe<BillingDebit>;\n /** Free-form label describing the grant origin. */\n description?: Maybe<Scalars['String']['output']>;\n /** When the unconsumed portion of this grant expires. */\n expiresAt: Scalars['ISO8601DateTime']['output'];\n /** Credit UUID. */\n id: Scalars['ID']['output'];\n /**\n * The Stripe invoice whose line granted this credit. Null for credits no invoice\n * backs: trials, promos, migrated balances, refunds and corrections, whose\n * provenance is their debit's credit instead.\n */\n invoice?: Maybe<BillingInvoice>;\n /** One of: granted, trial, pack, topup, promo, migrated, refund, correction. */\n kind: Scalars['String']['output'];\n /** For a refund or correction credit that reduces an overage, that overage. Null otherwise. */\n overage?: Maybe<BillingOverage>;\n /**\n * Why the credit was granted, as the caller of grantPromotionalCredits,\n * refundDebit or correctDebit gave it. Null for credits billing grants itself.\n */\n reason?: Maybe<Scalars['String']['output']>;\n /**\n * The reference refundDebit received, such as the caller's refund request id.\n * Null when the caller gave none, and for every other kind.\n */\n reference?: Maybe<Scalars['String']['output']>;\n /** Credits still available on this grant: amount minus any debits drawn from it. */\n remaining: Scalars['Float']['output'];\n /**\n * For a refund or correction, the original revenue date of what it reduces: the\n * debit's revenueRecognizedAt or the overage's occurredAt. amount × unitPriceEur\n * is subtracted from the revenue recognized at that date. Null for every other credit.\n */\n revenueReversedAt?: Maybe<Scalars['ISO8601DateTime']['output']>;\n /** Per-credit price (EUR) when this grant was created, used for revenue recognition on debits. */\n unitPriceEur: Scalars['Float']['output'];\n};\n\n/** The connection type for BillingCredit. */\nexport type BillingCreditConnection = {\n __typename?: 'BillingCreditConnection';\n /** A list of edges. */\n edges?: Maybe<Array<Maybe<BillingCreditEdge>>>;\n /** A list of nodes. */\n nodes?: Maybe<Array<Maybe<BillingCredit>>>;\n /** Information to aid in pagination. */\n pageInfo: PageInfo;\n /**\n * Sum of granted `amount` over every credit in the filtered set — the total\n * credits originally granted. Use as the denominator of a usage gauge when\n * filtered by `expired: false`.\n */\n totalAmount: Scalars['Float']['output'];\n /** Total number of items across all pages. */\n totalCount: Scalars['Int']['output'];\n /**\n * Sum of `remaining` (amount − debits drawn) over every credit in the filtered\n * set — credits still available to consume. `total_amount − total_remaining` is\n * the consumption so far.\n */\n totalRemaining: Scalars['Float']['output'];\n};\n\n/** An edge in a connection. */\nexport type BillingCreditEdge = {\n __typename?: 'BillingCreditEdge';\n /** A cursor for use in pagination. */\n cursor: Scalars['String']['output'];\n /** The item at the end of the edge. */\n node?: Maybe<BillingCredit>;\n};\n\n/** Filter arguments for a customer's credits connection. Axes combine with AND. */\nexport type BillingCreditFilterInput = {\n /** Keep only the credits granted in this window. */\n createdAt?: InputMaybe<DateTimeFilterInput>;\n /**\n * Keep only the credits expiring in this window, e.g. `{ gteq: <now>, lteq: <now\n * + 30 days> }` for those expiring within 30 days.\n */\n expiresAt?: InputMaybe<DateTimeFilterInput>;\n /** Keep only the credits of these kinds. */\n kind?: InputMaybe<BillingCreditKindFilterInput>;\n};\n\n/**\n * Why a customer holds a credit grant. Billing writes every kind itself;\n * grantPromotionalCredits is the only caller-facing way to grant one, and it writes PROMO.\n */\nexport type BillingCreditKind =\n /** Credits given back when a consumption's cost is lowered, linked to the debit or overage they reduce. */\n | 'CORRECTION'\n /** A paid plan invoice line. */\n | 'GRANTED'\n /** An open balance carried over from another ledger. */\n | 'MIGRATED'\n /** A purchased credit pack. */\n | 'PACK'\n /** A free promotional grant, priced at 0. */\n | 'PROMO'\n /** Credits given back for a refunded consumption, linked to the debit they refund. */\n | 'REFUND'\n /** A one-off top-up purchase. */\n | 'TOPUP'\n /** A subscription trial's taster allowance. */\n | 'TRIAL';\n\n/** Filter on a credit's kind (eq/in/notEq/notIn). */\nexport type BillingCreditKindFilterInput = {\n /** Exact match. */\n eq?: InputMaybe<BillingCreditKind>;\n /** Match any of these values. */\n in?: InputMaybe<Array<BillingCreditKind>>;\n /** Exclude exact match. */\n notEq?: InputMaybe<BillingCreditKind>;\n /** Exclude any of these values. */\n notIn?: InputMaybe<Array<BillingCreditKind>>;\n};\n\n/**\n * A customer in the billing subgraph, one per tenant of the calling service.\n * Services read it through billingCustomer with billing/customer:read; a person\n * reaches it only through Hermes' Company.billingCustomer, which Hermes resolves\n * for the company's members.\n */\nexport type BillingCustomer = Node & {\n __typename?: 'BillingCustomer';\n /**\n * The customer's active subscription (one of trialing, active, past_due, unpaid,\n * paused, incomplete), or null. A customer holds at most one at a time; the\n * newest is returned if several exist.\n */\n activeSubscription?: Maybe<BillingSubscription>;\n /** ISO 3166-1 alpha-2 country code, captured from Stripe Checkout / Customer Portal. */\n countryCode?: Maybe<Scalars['String']['output']>;\n /** Derived credit balance: SUM(credits.amount) - SUM(debits.amount). Always 0 for a newly-created customer. */\n creditBalance: Scalars['Float']['output'];\n /** Paginated credits granted to this customer, newest first. Optionally filter by expiry status via the `expired` argument. */\n credits: BillingCreditConnection;\n /**\n * The customer's settlement currency, lowercase ISO — the single source of truth\n * for price display and checkout pinning. Locked at the first successful invoice\n * payment; null before that (the product or Stripe Adaptive Pricing pick per\n * request). Manually overridable for specific customers.\n */\n currency?: Maybe<Scalars['String']['output']>;\n /** Paginated debits drawn from this customer's credits, newest first: consumptions, expirations and withdrawals. */\n debits: BillingDebitConnection;\n /** Snapshot of the customer's default Stripe payment method (brand + last4 + expiry). Null until the customer adds a card. */\n defaultPaymentMethod?: Maybe<BillingPaymentMethod>;\n /** Customer's billing email, mirrored from Stripe. May lag the user's email until the next customer.updated webhook. */\n email?: Maybe<Scalars['String']['output']>;\n /** Billing customer UUID, stored on the owning service's company record. */\n id: Scalars['ID']['output'];\n /** Paginated invoices and credit notes for this customer, newest first. */\n invoices: BillingInvoiceConnection;\n /**\n * Net revenue the customer has paid, ex-VAT, in EUR cents: all invoice payments\n * minus all refunded credit notes, each stripped of its VAT share and converted\n * at its document's frozen FX rate. Credits applied to the customer balance or\n * booked out of band are not deductions (no money moved). Recomputed live, so\n * later corrections are reflected.\n */\n lifetimePaidCents: Scalars['Int']['output'];\n /**\n * Paginated overages of this customer, newest first: the consumption credits did\n * not cover. Recorded, not yet reported for billing.\n */\n overages: BillingOverageConnection;\n /**\n * Product this customer belongs to. Decides the Stripe account and plan catalog;\n * credits and subscriptions never cross products.\n */\n product: BillingProduct;\n /** Customer's VAT number for EU customers, captured by Stripe at Checkout. */\n vatId?: Maybe<Scalars['String']['output']>;\n /** Stripe VAT verification status. One of: pending, verified, unverified, unavailable. */\n vatIdStatus?: Maybe<Scalars['String']['output']>;\n};\n\n\n/**\n * A customer in the billing subgraph, one per tenant of the calling service.\n * Services read it through billingCustomer with billing/customer:read; a person\n * reaches it only through Hermes' Company.billingCustomer, which Hermes resolves\n * for the company's members.\n */\nexport type BillingCustomerCreditsArgs = {\n after?: InputMaybe<Scalars['String']['input']>;\n before?: InputMaybe<Scalars['String']['input']>;\n expired?: InputMaybe<Scalars['Boolean']['input']>;\n filter?: InputMaybe<BillingCreditFilterInput>;\n first?: InputMaybe<Scalars['Int']['input']>;\n last?: InputMaybe<Scalars['Int']['input']>;\n};\n\n\n/**\n * A customer in the billing subgraph, one per tenant of the calling service.\n * Services read it through billingCustomer with billing/customer:read; a person\n * reaches it only through Hermes' Company.billingCustomer, which Hermes resolves\n * for the company's members.\n */\nexport type BillingCustomerDebitsArgs = {\n after?: InputMaybe<Scalars['String']['input']>;\n before?: InputMaybe<Scalars['String']['input']>;\n filter?: InputMaybe<BillingDebitFilterInput>;\n first?: InputMaybe<Scalars['Int']['input']>;\n last?: InputMaybe<Scalars['Int']['input']>;\n};\n\n\n/**\n * A customer in the billing subgraph, one per tenant of the calling service.\n * Services read it through billingCustomer with billing/customer:read; a person\n * reaches it only through Hermes' Company.billingCustomer, which Hermes resolves\n * for the company's members.\n */\nexport type BillingCustomerInvoicesArgs = {\n after?: InputMaybe<Scalars['String']['input']>;\n before?: InputMaybe<Scalars['String']['input']>;\n first?: InputMaybe<Scalars['Int']['input']>;\n last?: InputMaybe<Scalars['Int']['input']>;\n};\n\n\n/**\n * A customer in the billing subgraph, one per tenant of the calling service.\n * Services read it through billingCustomer with billing/customer:read; a person\n * reaches it only through Hermes' Company.billingCustomer, which Hermes resolves\n * for the company's members.\n */\nexport type BillingCustomerOveragesArgs = {\n after?: InputMaybe<Scalars['String']['input']>;\n before?: InputMaybe<Scalars['String']['input']>;\n filter?: InputMaybe<BillingOverageFilterInput>;\n first?: InputMaybe<Scalars['Int']['input']>;\n last?: InputMaybe<Scalars['Int']['input']>;\n};\n\n/** A positive draw against a customer's credits — consumption, expiration, or withdrawal. */\nexport type BillingDebit = Node & {\n __typename?: 'BillingDebit';\n /**\n * For a consumption debit written by correctDebit to raise a cost, the\n * consumable's first debit, which it adds to. Null otherwise.\n */\n adjustedDebit?: Maybe<BillingDebit>;\n /** Credits drawn by this debit. Always greater than 0. */\n amount: Scalars['Float']['output'];\n /** UUID of the consumed record. Set only when source is consumption. */\n consumableId?: Maybe<Scalars['ID']['output']>;\n /** AR class name of the consumed record (e.g. \"Lead\", \"Message\"). Set only when source is consumption. */\n consumableType?: Maybe<Scalars['String']['output']>;\n /** When this debit row was created. */\n createdAt: Scalars['ISO8601DateTime']['output'];\n /** The credit grant this debit drew from: follow its invoice to the invoice that sold the credits. */\n credit: BillingCredit;\n /** Free-form note — the consumer's label, or the refund charge id on withdrawals. */\n description?: Maybe<Scalars['String']['output']>;\n /** Debit UUID. */\n id: Scalars['ID']['output'];\n /** When this entry was recorded for revenue. */\n revenueRecognizedAt: Scalars['ISO8601DateTime']['output'];\n /** One of: consumption, expiration, withdrawal. */\n source: Scalars['String']['output'];\n /**\n * EUR per credit this debit recognizes as revenue: the unit price of the credit\n * it drew from, 0 once a Stripe credit note refunded that credit.\n */\n unitPriceEur: Scalars['Float']['output'];\n};\n\n/** The connection type for BillingDebit. */\nexport type BillingDebitConnection = {\n __typename?: 'BillingDebitConnection';\n /** A list of edges. */\n edges?: Maybe<Array<Maybe<BillingDebitEdge>>>;\n /** A list of nodes. */\n nodes?: Maybe<Array<Maybe<BillingDebit>>>;\n /** Information to aid in pagination. */\n pageInfo: PageInfo;\n /** Total number of items across all pages. */\n totalCount: Scalars['Int']['output'];\n};\n\n/** An edge in a connection. */\nexport type BillingDebitEdge = {\n __typename?: 'BillingDebitEdge';\n /** A cursor for use in pagination. */\n cursor: Scalars['String']['output'];\n /** The item at the end of the edge. */\n node?: Maybe<BillingDebit>;\n};\n\n/** Filter arguments for a customer's debits connection. Axes combine with AND. */\nexport type BillingDebitFilterInput = {\n /** Keep only the debits of these consumed records, by the id the caller gave debitCredits. */\n consumableId?: InputMaybe<StringFilterInput>;\n /** Keep only the debits of these consumable types, e.g. `{ in: [\"Opportunity\"] }`. */\n consumableType?: InputMaybe<StringFilterInput>;\n /** Keep only the debits written in this window. */\n createdAt?: InputMaybe<DateTimeFilterInput>;\n /** Keep only the debits of these sources: consumption, expiration or withdrawal. */\n source?: InputMaybe<StringFilterInput>;\n};\n\n/** A mirrored Stripe invoice (or credit note). One row per Stripe object. */\nexport type BillingInvoice = Node & {\n __typename?: 'BillingInvoice';\n /** Amount paid in the transaction currency. */\n amountPaid: Scalars['Float']['output'];\n /** Outstanding balance in the transaction currency. Zero on a fully-paid invoice. */\n amountRemaining: Scalars['Float']['output'];\n /** True for credit-note rows (refund); false for regular invoices. */\n creditNote: Scalars['Boolean']['output'];\n /** Transaction currency — ISO 4217 lowercase (\"eur\", \"usd\", ...). */\n currency: Scalars['String']['output'];\n /** Stripe-hosted invoice page. May be null on credit-note rows. */\n hostedInvoiceUrl?: Maybe<Scalars['String']['output']>;\n id: Scalars['ID']['output'];\n /** When the invoice was finalized in Stripe. */\n issuedAt?: Maybe<Scalars['ISO8601DateTime']['output']>;\n /** Human-readable Stripe invoice number (\"INV-001\"). Null until finalized. */\n number?: Maybe<Scalars['String']['output']>;\n /** When payment was captured. Null on unpaid or credit-note rows. */\n paidAt?: Maybe<Scalars['ISO8601DateTime']['output']>;\n /** On credit-note rows, the parent invoice being refunded. Null on regular invoices. */\n parentInvoice?: Maybe<BillingInvoice>;\n /**\n * URL to the billing service's PDF passthrough endpoint. The endpoint fetches a\n * fresh signed URL from Stripe and 302s to it. Null until the invoice is finalized.\n */\n pdfUrl?: Maybe<Scalars['String']['output']>;\n /** End of the billing period this invoice covers (subscriptions). */\n periodEnd?: Maybe<Scalars['ISO8601DateTime']['output']>;\n /** Start of the billing period this invoice covers (subscriptions). */\n periodStart?: Maybe<Scalars['ISO8601DateTime']['output']>;\n /** Stripe's verbatim invoice status. One of: draft, open, paid, void, uncollectible — or for credit notes: issued, void. */\n status: Scalars['String']['output'];\n /** Pre-tax subtotal in the transaction currency. */\n subtotal: Scalars['Float']['output'];\n /** Tax applied in the transaction currency. */\n tax: Scalars['Float']['output'];\n /** Final total in the transaction currency. */\n total: Scalars['Float']['output'];\n};\n\n/** The connection type for BillingInvoice. */\nexport type BillingInvoiceConnection = {\n __typename?: 'BillingInvoiceConnection';\n /** A list of edges. */\n edges?: Maybe<Array<Maybe<BillingInvoiceEdge>>>;\n /** A list of nodes. */\n nodes?: Maybe<Array<Maybe<BillingInvoice>>>;\n /** Information to aid in pagination. */\n pageInfo: PageInfo;\n /** Total number of items across all pages. */\n totalCount: Scalars['Int']['output'];\n};\n\n/** An edge in a connection. */\nexport type BillingInvoiceEdge = {\n __typename?: 'BillingInvoiceEdge';\n /** A cursor for use in pagination. */\n cursor: Scalars['String']['output'];\n /** The item at the end of the edge. */\n node?: Maybe<BillingInvoice>;\n};\n\n/**\n * The part of a consumption that credits did not cover, written when debitCredits\n * or correctDebit runs with allowOverage. Recorded, not yet reported for billing:\n * reportedAt stays null until a later release reports overages. Lowering one gives\n * the customer CORRECTION credits instead of rewriting it.\n */\nexport type BillingOverage = Node & {\n __typename?: 'BillingOverage';\n /** Credits not covered. Greater than 0. */\n amount: Scalars['Float']['output'];\n /** Id of the consumed record, as the caller gave it. */\n consumableId: Scalars['ID']['output'];\n /** Type of the consumed record, as the caller gave it. */\n consumableType: Scalars['String']['output'];\n /** When this row was written. */\n createdAt: Scalars['ISO8601DateTime']['output'];\n /** The caller's label for the consumption. Null when the caller gave none. */\n description?: Maybe<Scalars['String']['output']>;\n /** Global id of the overage. */\n id: Scalars['ID']['output'];\n /** When the consumption happened. */\n occurredAt: Scalars['ISO8601DateTime']['output'];\n /** When the overage was reported for billing. Null until then; nothing reports overages yet. */\n reportedAt?: Maybe<Scalars['ISO8601DateTime']['output']>;\n /** EUR per credit the overage is billed at, and recognized as revenue at occurredAt. Always 1.0: one credit is one euro. */\n unitPriceEur: Scalars['Float']['output'];\n};\n\n/** The connection type for BillingOverage. */\nexport type BillingOverageConnection = {\n __typename?: 'BillingOverageConnection';\n /** A list of edges. */\n edges?: Maybe<Array<Maybe<BillingOverageEdge>>>;\n /** A list of nodes. */\n nodes?: Maybe<Array<Maybe<BillingOverage>>>;\n /** Information to aid in pagination. */\n pageInfo: PageInfo;\n /** Total number of items across all pages. */\n totalCount: Scalars['Int']['output'];\n};\n\n/** An edge in a connection. */\nexport type BillingOverageEdge = {\n __typename?: 'BillingOverageEdge';\n /** A cursor for use in pagination. */\n cursor: Scalars['String']['output'];\n /** The item at the end of the edge. */\n node?: Maybe<BillingOverage>;\n};\n\n/** Filter arguments for a customer's overages connection. Axes combine with AND. */\nexport type BillingOverageFilterInput = {\n /** Keep only the overages of these consumed records. */\n consumableId?: InputMaybe<StringFilterInput>;\n /** Keep only the overages of these consumable types. */\n consumableType?: InputMaybe<StringFilterInput>;\n /** Keep only the overages whose consumption happened in this window. */\n occurredAt?: InputMaybe<DateTimeFilterInput>;\n};\n\n/** Denormalized snapshot of a customer's default payment method, mirrored from Stripe. */\nexport type BillingPaymentMethod = {\n __typename?: 'BillingPaymentMethod';\n /** Card brand: visa, mastercard, amex, etc. */\n brand?: Maybe<Scalars['String']['output']>;\n /** Card expiration month (1-12), as reported by Stripe. */\n expMonth?: Maybe<Scalars['Int']['output']>;\n /** Card expiration year (4-digit), as reported by Stripe. */\n expYear?: Maybe<Scalars['Int']['output']>;\n /** Last 4 digits of the card number, as reported by Stripe. */\n last4?: Maybe<Scalars['String']['output']>;\n};\n\n/** Subscription billing periodicity. */\nexport type BillingPeriodicity =\n /** Billed annually (12% off vs monthly). */\n | 'ANNUAL'\n /** Billed monthly. */\n | 'MONTHLY';\n\n/** A single (plan, periodicity) row from a product's static plan catalog. */\nexport type BillingPlanCatalogEntry = Node & {\n __typename?: 'BillingPlanCatalogEntry';\n /** Exact total fee per period in EUR (the annual entries carry the full yearly amount). */\n feeEur: Scalars['Float']['output'];\n id: Scalars['ID']['output'];\n /** Credits granted on each paid invoice for this plan. Annual entries grant the full yearly pool at once. */\n includedCredits: Scalars['Int']['output'];\n /** Plan tier. */\n name: BillingPlanName;\n /** Whether the plan offers a self-serve trial. */\n offersTrial: Scalars['Boolean']['output'];\n /** Billing periodicity. */\n periodicity: BillingPeriodicity;\n /** Credits granted at trial start, expiring at trial end. Zero when the plan offers no trial. */\n trialCredits: Scalars['Int']['output'];\n /** Trial length in days. Zero when the plan offers no trial. */\n trialDays: Scalars['Int']['output'];\n};\n\n/**\n * Subscription plan tier of the Max catalog. Tiers differ by monthly credit\n * allowance and price; annual periodicity grants the yearly pool at once.\n */\nexport type BillingPlanName =\n /** Grow — developer catalog. */\n | 'GROW'\n /** Pro 500 — 5,000 credits/month. */\n | 'PRO_500'\n /** Pro 1,500 — 15,000 credits/month. */\n | 'PRO_1500'\n /** Pro 3,000 — 30,000 credits/month. */\n | 'PRO_3000'\n /** Pro 6,000 — 60,000 credits/month. */\n | 'PRO_6000'\n /** Pro 10,000 — 100,000 credits/month. */\n | 'PRO_10000'\n /** Scale — developer catalog. */\n | 'SCALE'\n /** Start — developer catalog. */\n | 'START'\n /** Starter — 1,000 credits/month. */\n | 'STARTER';\n\n/** A Stripe customer portal session opened for a company. */\nexport type BillingPortalSession = {\n __typename?: 'BillingPortalSession';\n /**\n * Hosted Stripe page for replacing the card and reading invoice history.\n * Single-use and short-lived; redirect to it immediately.\n */\n url: Scalars['String']['output'];\n};\n\n/**\n * Sortlist product a billing customer belongs to. Each product runs on its own\n * Stripe account with its own plan catalog; credits, subscriptions, and invoices\n * never cross products.\n */\nexport type BillingProduct =\n /** The developer portal's API access, on its own dedicated Stripe account. */\n | 'DEVELOPER'\n /** The original shared Stripe account — the old Max app's billing and the marketplace's Recurly payment-gateway traffic. */\n | 'LEGACY'\n /** The new Max product (rebuilt app replacing the old Max, keeping the name), on its own dedicated Stripe account. */\n | 'MAX';\n\n/**\n * A mirrored Stripe subscription. Plan tier is identified by the subscription's\n * plan-item Price (`PlanCatalog.find_by_stripe_price_id`).\n */\nexport type BillingSubscription = Node & {\n __typename?: 'BillingSubscription';\n /** Whether the subscription will end at `currentPeriodEnd` (Stripe-side cancel). */\n cancelAtPeriodEnd: Scalars['Boolean']['output'];\n /** When the subscription was canceled, or null if still active. */\n canceledAt?: Maybe<Scalars['ISO8601DateTime']['output']>;\n /** Credits the customer is entitled to per period (from `PlanCatalog#included_credits`). */\n creditsPerPeriod: Scalars['Float']['output'];\n /** End of the current billing period. */\n currentPeriodEnd?: Maybe<Scalars['ISO8601DateTime']['output']>;\n /** Start of the current billing period. */\n currentPeriodStart?: Maybe<Scalars['ISO8601DateTime']['output']>;\n id: Scalars['ID']['output'];\n /** Stripe billing interval string: day / week / month / year. */\n interval: Scalars['String']['output'];\n /** Interval multiplier (1 = every interval). */\n intervalCount: Scalars['Int']['output'];\n /**\n * Realized monthly rate in EUR cents, net of coupon discounts and inclusive VAT\n * — derived from the latest posted renewal invoice, spread over the months its\n * period covers and converted from the invoice's charge currency at its frozen\n * FX rate, so values are safe to aggregate across currencies. Falls back to the\n * catalog's gross monthly fee for trials and never-invoiced subscriptions.\n * Parity source for legacy product MRR columns.\n */\n netMonthlyFeeCents: Scalars['Int']['output'];\n /**\n * Scheduled plan change applying at the next bill date (a deferred downgrade or\n * lateral move, backed by a Stripe Subscription Schedule). Null when none is\n * pending. Cancel for free via cancelBillingSubscriptionChange.\n */\n pendingChange?: Maybe<BillingSubscriptionPendingChange>;\n /** Derived from the Stripe interval. Null on intervals we don't model. */\n periodicity?: Maybe<BillingPeriodicity>;\n /** Plan tier looked up from the stored stripe_price_id. Null when the Price doesn't match a known plan. */\n plan?: Maybe<BillingPlanName>;\n /** When the subscription was first created in Stripe. */\n startedAt?: Maybe<Scalars['ISO8601DateTime']['output']>;\n /** Stripe verbatim status (active, trialing, past_due, canceled, ...). */\n status: Scalars['String']['output'];\n};\n\n/**\n * A scheduled plan change waiting to apply at the subscription's next bill date,\n * backed by a Stripe Subscription Schedule. The current plan — credits and limits\n * — stays fully in force until then.\n */\nexport type BillingSubscriptionPendingChange = Node & {\n __typename?: 'BillingSubscriptionPendingChange';\n /** When the change applies: the end of the current billing period. */\n effectiveAt?: Maybe<Scalars['ISO8601DateTime']['output']>;\n id: Scalars['ID']['output'];\n /** Periodicity the subscription switches to. */\n periodicity: BillingPeriodicity;\n /** Plan tier the subscription switches to. */\n plan: BillingPlanName;\n};\n\n/** Autogenerated input type of CancelBillingCustomerSubscriptions */\nexport type CancelBillingCustomerSubscriptionsInput = {\n /** Billing customer UUID whose active subscriptions are canceled. The owning service stores this on its company record. */\n billingCustomerId: Scalars['ID']['input'];\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: InputMaybe<Scalars['String']['input']>;\n};\n\n/** Autogenerated return type of CancelBillingCustomerSubscriptions. */\nexport type CancelBillingCustomerSubscriptionsPayload = Node & {\n __typename?: 'CancelBillingCustomerSubscriptionsPayload';\n /** Number of subscriptions canceled by this call. Zero when the customer had no active subscription. */\n canceledCount: Scalars['Int']['output'];\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: Maybe<Scalars['String']['output']>;\n id: Scalars['ID']['output'];\n};\n\n/** Autogenerated input type of CancelBillingSubscriptionChange */\nexport type CancelBillingSubscriptionChangeInput = {\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: InputMaybe<Scalars['String']['input']>;\n /** Target subscription global id. */\n subscriptionId: Scalars['ID']['input'];\n};\n\n/** Autogenerated return type of CancelBillingSubscriptionChange. */\nexport type CancelBillingSubscriptionChangePayload = Node & {\n __typename?: 'CancelBillingSubscriptionChangePayload';\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: Maybe<Scalars['String']['output']>;\n id: Scalars['ID']['output'];\n /** The subscription, with pendingChange cleared. */\n subscription: BillingSubscription;\n};\n\n/** Autogenerated input type of CancelCompanySubscription */\nexport type CancelCompanySubscriptionInput = {\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: InputMaybe<Scalars['String']['input']>;\n /** The company whose subscription is ending. Every member may end it — there are no roles. */\n companyId: Scalars['ID']['input'];\n};\n\n/** Autogenerated input type of CancelOutboundChannelActions */\nexport type CancelOutboundChannelActionsInput = {\n /** Global id of the account the actions belong to. */\n channelAccountId: Scalars['ID']['input'];\n /** Global ids of the actions to stop, at most 100. Ids of another account's actions come back as `UNKNOWN`. */\n channelActionIds: Array<Scalars['ID']['input']>;\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: InputMaybe<Scalars['String']['input']>;\n};\n\n/** Autogenerated return type of CancelOutboundChannelActions. */\nexport type CancelOutboundChannelActionsPayload = Node & {\n __typename?: 'CancelOutboundChannelActionsPayload';\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: Maybe<Scalars['String']['output']>;\n id: Scalars['ID']['output'];\n /** One entry per id passed in, in the same order. */\n results: Array<OutboundChannelActionCancellationResult>;\n};\n\n/** A single entry in a contact's career history: a work-experience role, degree, certification, award, or publication. */\nexport type CareerEntry = Node & {\n __typename?: 'CareerEntry';\n /** Free-text description of the entry as provided by the source. */\n description?: Maybe<Scalars['String']['output']>;\n /** End date of the entry (upper bound of its period), or null when the entry is ongoing or the source gave no end date. */\n endedOn?: Maybe<Scalars['ISO8601Date']['output']>;\n id: Scalars['ID']['output'];\n /** Which kind of career entry this is. */\n kind: CareerEntryKind;\n /**\n * The organization this entry links to (e.g. the employer or school), or null\n * when it could not be resolved to a known record.\n */\n organization?: Maybe<Organization>;\n /** Start date of the entry (lower bound of its period), or null when the source gave no start date. */\n startedOn?: Maybe<Scalars['ISO8601Date']['output']>;\n /** The entry's headline — role title, degree, certification name, award title, or publication title depending on kind. */\n title?: Maybe<Scalars['String']['output']>;\n /** Source URL for the entry (e.g. the credential link), or null. */\n url?: Maybe<Scalars['String']['output']>;\n};\n\n/** The connection type for CareerEntry. */\nexport type CareerEntryConnection = {\n __typename?: 'CareerEntryConnection';\n /**\n * Estimated total number of items across all pages. It comes from the query\n * planner rather than a count, so it costs planning time instead of a scan and\n * cannot exceed the statement timeout. It is approximate at every magnitude,\n * including small ones, and it moves when the table's statistics are refreshed.\n * Accuracy depends on the filter: within a few percent on plain column and\n * array-overlap filters, and as much as 30% out on a range filter such as\n * `companySize`. It is not meaningful for the embedding filters `jobTitle` and\n * `industry` — no statistics exist for a vector-distance predicate, so the\n * estimate ignores the distance threshold entirely and approximates only what\n * the other filters admit; it has been measured reporting 241371 for a filter\n * whose true result was empty. Never render it as an exact figure, and use\n * `totalCount` when the figure has to be exact.\n */\n approximateTotalCount: Scalars['Int']['output'];\n /** A list of edges. */\n edges?: Maybe<Array<Maybe<CareerEntryEdge>>>;\n /** A list of nodes. */\n nodes?: Maybe<Array<Maybe<CareerEntry>>>;\n /** Information to aid in pagination. */\n pageInfo: PageInfo;\n /** Total number of items across all pages, exact unless `upTo` is given. */\n totalCount: Scalars['Int']['output'];\n};\n\n\n/** The connection type for CareerEntry. */\nexport type CareerEntryConnectionTotalCountArgs = {\n upTo?: InputMaybe<Scalars['Int']['input']>;\n};\n\n/** An edge in a connection. */\nexport type CareerEntryEdge = Node & {\n __typename?: 'CareerEntryEdge';\n /** A cursor for use in pagination. */\n cursor: Scalars['String']['output'];\n id: Scalars['ID']['output'];\n /** The item at the end of the edge. */\n node?: Maybe<CareerEntry>;\n};\n\n/** The kind of entry in a contact's career history. */\nexport type CareerEntryKind =\n /** An award or honor received. */\n | 'AWARD'\n /** A professional certification. */\n | 'CERTIFICATION'\n /** A degree or course of study. */\n | 'EDUCATION'\n /** A past or current work-experience role. */\n | 'EXPERIENCE'\n /** An authored publication. */\n | 'PUBLICATION';\n\n/** Filter on career-entry kind with schema-validated enum values. */\nexport type CareerEntryKindFilterInput = {\n /** Exact match. */\n eq?: InputMaybe<CareerEntryKind>;\n /** Match any of these values. */\n in?: InputMaybe<Array<CareerEntryKind>>;\n /** Exclude exact match. */\n notEq?: InputMaybe<CareerEntryKind>;\n /** Exclude any of these values. */\n notIn?: InputMaybe<Array<CareerEntryKind>>;\n};\n\n/** Autogenerated input type of ChangeBillingSubscription */\nexport type ChangeBillingSubscriptionInput = {\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: InputMaybe<Scalars['String']['input']>;\n /** Target periodicity. Omit to keep the current one. */\n periodicity?: InputMaybe<BillingPeriodicity>;\n /** Target plan tier. Omit to keep the current one. */\n plan?: InputMaybe<BillingPlanName>;\n /** Target subscription global id. */\n subscriptionId: Scalars['ID']['input'];\n};\n\n/** Autogenerated return type of ChangeBillingSubscription. */\nexport type ChangeBillingSubscriptionPayload = Node & {\n __typename?: 'ChangeBillingSubscriptionPayload';\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: Maybe<Scalars['String']['output']>;\n id: Scalars['ID']['output'];\n /** The subscription with its refreshed plan mirror. */\n subscription: BillingSubscription;\n};\n\n/** Autogenerated input type of ChangeCompanySubscription */\nexport type ChangeCompanySubscriptionInput = {\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: InputMaybe<Scalars['String']['input']>;\n /** The company whose subscription is changing. Every member may change it — there are no roles. */\n companyId: Scalars['ID']['input'];\n /** MONTHLY or ANNUAL. Unset keeps the current one. */\n periodicity?: InputMaybe<Scalars['String']['input']>;\n /** Tier name from `billingPlanCatalog(product:)`. Unset keeps the current one, so periodicity can change alone. */\n plan?: InputMaybe<Scalars['String']['input']>;\n};\n\n/** Federation reference to a Company owned by another subgraph. */\nexport type Company = Node & {\n __typename?: 'Company';\n /** Applications owned by this company. */\n applications: ApplicationConnection;\n /**\n * The company's customer in the billing subgraph, or null until it first touches\n * billing. Null as well for a caller who is neither a member of the company nor\n * staff, however the company was reached. The id itself is deliberately not\n * exposed: this field is the only way a person reaches a billing customer, which\n * is what scopes billing reads to their own tenant.\n */\n billingCustomer?: Maybe<BillingCustomer>;\n /** When the company was created. */\n createdAt: Scalars['ISO8601DateTime']['output'];\n /** GlobalID-encoded Company id. */\n id: Scalars['ID']['output'];\n /** Offers to join, in every state. */\n invitations: CompanyInvitationConnection;\n /** Every member can manage every application and credential this company owns. */\n members: CompanyMemberConnection;\n /** Display name. Not unique. */\n name: Scalars['String']['output'];\n /**\n * True when this is the calling user's private company. A relationship to the\n * caller rather than a property of the company, so it is resolved against them.\n */\n personal: Scalars['Boolean']['output'];\n /**\n * Readable, unique handle, derived from the name when the company is created and\n * never rewritten afterwards — a URL built from one does not break when the\n * company is renamed. Prefer it to `id` for addressing a company in a path.\n */\n slug: Scalars['String']['output'];\n};\n\n\n/** Federation reference to a Company owned by another subgraph. */\nexport type CompanyApplicationsArgs = {\n after?: InputMaybe<Scalars['String']['input']>;\n before?: InputMaybe<Scalars['String']['input']>;\n first?: InputMaybe<Scalars['Int']['input']>;\n last?: InputMaybe<Scalars['Int']['input']>;\n};\n\n\n/** Federation reference to a Company owned by another subgraph. */\nexport type CompanyInvitationsArgs = {\n after?: InputMaybe<Scalars['String']['input']>;\n before?: InputMaybe<Scalars['String']['input']>;\n first?: InputMaybe<Scalars['Int']['input']>;\n last?: InputMaybe<Scalars['Int']['input']>;\n pendingOnly?: InputMaybe<Scalars['Boolean']['input']>;\n};\n\n\n/** Federation reference to a Company owned by another subgraph. */\nexport type CompanyMembersArgs = {\n after?: InputMaybe<Scalars['String']['input']>;\n before?: InputMaybe<Scalars['String']['input']>;\n first?: InputMaybe<Scalars['Int']['input']>;\n last?: InputMaybe<Scalars['Int']['input']>;\n};\n\n/** The connection type for Company. */\nexport type CompanyConnection = {\n __typename?: 'CompanyConnection';\n /** A list of edges. */\n edges?: Maybe<Array<Maybe<CompanyEdge>>>;\n /** A list of nodes. */\n nodes?: Maybe<Array<Maybe<Company>>>;\n /** Information to aid in pagination. */\n pageInfo: PageInfo;\n /** Total number of items across all pages. */\n totalCount: Scalars['Int']['output'];\n};\n\n/** An edge in a connection. */\nexport type CompanyEdge = {\n __typename?: 'CompanyEdge';\n /** A cursor for use in pagination. */\n cursor: Scalars['String']['output'];\n /** The item at the end of the edge. */\n node?: Maybe<Company>;\n};\n\n/** An offer to join a company, redeemed by the invitee. */\nexport type CompanyInvitation = Node & {\n __typename?: 'CompanyInvitation';\n /** When the invitation was redeemed, or null while it is pending. */\n acceptedAt?: Maybe<Scalars['ISO8601DateTime']['output']>;\n /**\n * Who actually redeemed it. May not be who `email` names, since this service\n * cannot verify an email it only caches — the mismatch is recorded, not refused.\n */\n acceptedBy?: Maybe<User>;\n /** When the invitation was issued. */\n createdAt: Scalars['ISO8601DateTime']['output'];\n /**\n * Who the inviter meant it for. A label: membership is granted to whoever\n * authenticates while accepting, never to this address.\n */\n email: Scalars['String']['output'];\n /** When the invitation stops being redeemable. */\n expiresAt: Scalars['ISO8601DateTime']['output'];\n id: Scalars['ID']['output'];\n /** The member who issued the invitation. */\n invitedBy: User;\n /** When the invitation was revoked, or null if it was not. */\n revokedAt?: Maybe<Scalars['ISO8601DateTime']['output']>;\n};\n\n/** The connection type for CompanyInvitation. */\nexport type CompanyInvitationConnection = {\n __typename?: 'CompanyInvitationConnection';\n /** A list of edges. */\n edges?: Maybe<Array<Maybe<CompanyInvitationEdge>>>;\n /** A list of nodes. */\n nodes?: Maybe<Array<Maybe<CompanyInvitation>>>;\n /** Information to aid in pagination. */\n pageInfo: PageInfo;\n /** Total number of items across all pages. */\n totalCount: Scalars['Int']['output'];\n};\n\n/** An edge in a connection. */\nexport type CompanyInvitationEdge = {\n __typename?: 'CompanyInvitationEdge';\n /** A cursor for use in pagination. */\n cursor: Scalars['String']['output'];\n /** The item at the end of the edge. */\n node?: Maybe<CompanyInvitation>;\n};\n\n/** An invitation as its holder sees it, before accepting. */\nexport type CompanyInvitationPreview = {\n __typename?: 'CompanyInvitationPreview';\n /** Names are not unique, so read it alongside `invitedBy` rather than alone. */\n companyName: Scalars['String']['output'];\n /** Who the inviter meant it for. Unverified — a mismatch with your own address is a signal to ask them, not a refusal. */\n email: Scalars['String']['output'];\n /** When the invitation stops being redeemable. */\n expiresAt: Scalars['ISO8601DateTime']['output'];\n /** The member who issued the invitation. */\n invitedBy: User;\n};\n\n/** A user's membership of a company. Every member is an administrator. */\nexport type CompanyMember = Node & {\n __typename?: 'CompanyMember';\n id: Scalars['ID']['output'];\n /** Null for the founding member. */\n invitedBy?: Maybe<User>;\n /** When the user became a member. */\n joinedAt: Scalars['ISO8601DateTime']['output'];\n /** The user this membership belongs to. */\n user: User;\n};\n\n/** The connection type for CompanyMember. */\nexport type CompanyMemberConnection = {\n __typename?: 'CompanyMemberConnection';\n /** A list of edges. */\n edges?: Maybe<Array<Maybe<CompanyMemberEdge>>>;\n /** A list of nodes. */\n nodes?: Maybe<Array<Maybe<CompanyMember>>>;\n /** Information to aid in pagination. */\n pageInfo: PageInfo;\n /** Total number of items across all pages. */\n totalCount: Scalars['Int']['output'];\n};\n\n/** An edge in a connection. */\nexport type CompanyMemberEdge = {\n __typename?: 'CompanyMemberEdge';\n /** A cursor for use in pagination. */\n cursor: Scalars['String']['output'];\n /** The item at the end of the edge. */\n node?: Maybe<CompanyMember>;\n};\n\n/** Autogenerated input type of CompleteOutboundChannelAuthentication */\nexport type CompleteOutboundChannelAuthenticationInput = {\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: InputMaybe<Scalars['String']['input']>;\n /** The authorization code the callback received in its `code` query parameter. */\n code: Scalars['String']['input'];\n /** The global id of the channel account the attempt was started on. */\n id: Scalars['ID']['input'];\n /**\n * The opaque value the callback received in its `state` query parameter. It\n * names one attempt of this account and works once, within ten minutes of the\n * attempt's start.\n */\n state: Scalars['String']['input'];\n};\n\n/** Autogenerated return type of CompleteOutboundChannelAuthentication. */\nexport type CompleteOutboundChannelAuthenticationPayload = Node & {\n __typename?: 'CompleteOutboundChannelAuthenticationPayload';\n /**\n * Returns the account the sign-in connected, running when the outcome is\n * `CONNECTED`. When a disconnected account of the same owner and `externalId`\n * already held the mailbox, that account is resumed and returned instead of the\n * one the attempt started on, which is removed.\n */\n channelAccount: OutboundChannelAccount;\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: Maybe<Scalars['String']['output']>;\n id: Scalars['ID']['output'];\n /**\n * Returns where the attempt ended up: `CONNECTED`; `PROVIDER_ACCOUNT_BOUND` when\n * the identity is still being read, with `channel_account.connected` to follow;\n * or why it was refused (`CODE_REJECTED`, `SCOPES_MISSING`, `IDENTITY_MISMATCH`,\n * `IDENTITY_ALREADY_CONNECTED`, `PROVIDER_ACCOUNT_ALREADY_CONNECTED`,\n * `SESSION_INVALID`). Every refusal also emits\n * `channel_account.authentication_failed`.\n */\n outcome: OutboundChannelAuthenticationAttemptOutcome;\n};\n\n/** A business contact associated with an organization. */\nexport type Contact = Located & Node & {\n __typename?: 'Contact';\n /**\n * Profile picture URL, re-hosted on our own storage so it doesn't depend on the\n * source's (potentially expiring) URL. Null until the background fetch runs or\n * the contact has no public photo.\n */\n avatarUrl?: Maybe<Scalars['String']['output']>;\n /** Paginated career entries — experience, education, certifications, awards, and publications — most recent first. */\n careerEntries: CareerEntryConnection;\n /** City where the contact is located. */\n city?: Maybe<Scalars['String']['output']>;\n /** Confidence score (0.0-1.0) from source quality, freshness, and diversity. */\n confidenceScore?: Maybe<Scalars['Float']['output']>;\n /** When the contact record was first created. */\n createdAt: Scalars['ISO8601DateTime']['output'];\n /**\n * The contact's own profile summary (LinkedIn About), or their current role's\n * description when they wrote none. Null until a source provides one.\n */\n description?: Maybe<Scalars['String']['output']>;\n /** Primary email address. */\n emailAddress?: Maybe<Scalars['String']['output']>;\n /** Extracted email pattern (e.g. {first}.{last}). */\n emailPattern?: Maybe<Scalars['String']['output']>;\n /** Verification status of the primary email address. */\n emailStatus?: Maybe<EmailStatus>;\n /** First name. */\n firstName?: Maybe<Scalars['String']['output']>;\n /** The contact's professional headline as shown on their profile. Null until a source provides one. */\n headline?: Maybe<Scalars['String']['output']>;\n /** Global id of the record. */\n id: Scalars['ID']['output'];\n /** Functional department (e.g. marketing, sales, engineering). */\n jobFunction?: Maybe<Scalars['String']['output']>;\n /** Seniority level (e.g. c_level, vp, director, manager). */\n jobLevel?: Maybe<Scalars['String']['output']>;\n /** Current job title. */\n jobTitle?: Maybe<Scalars['String']['output']>;\n /** Last name. */\n lastName?: Maybe<Scalars['String']['output']>;\n /** LinkedIn profile URL. */\n linkedinUrl?: Maybe<Scalars['String']['output']>;\n /** Mercator Location ids of the record's divisions, as stored. Read by the router to resolve `locations` from Mercator. */\n locationIds: Array<Scalars['ID']['output']>;\n /**\n * Mercator divisions of the record, in the order its subgraph stores them: the\n * resolved place first, then its ancestors. Empty until the record's location\n * has been resolved.\n */\n locations: LocationConnection;\n /**\n * Returns the organization this contact belongs to, together with what this\n * query revealed about it. It is null when the reveal could not be paid for and\n * `reveals` is selected, and the contact is still served.\n */\n organization?: Maybe<RevealedOrganization>;\n /** Phone number from an enrichment source. Null until a source provides one. */\n phone?: Maybe<Scalars['String']['output']>;\n /**\n * Profile completeness score (0.0-1.0) from the presence of identity fields,\n * experience, and the merged confidence score. Consumers gate low-quality\n * records on this instead of counting raw history entries.\n */\n profileCompleteness: Scalars['Float']['output'];\n /** When the contact record was last modified. */\n updatedAt: Scalars['ISO8601DateTime']['output'];\n};\n\n\n/** A business contact associated with an organization. */\nexport type ContactCareerEntriesArgs = {\n after?: InputMaybe<Scalars['String']['input']>;\n before?: InputMaybe<Scalars['String']['input']>;\n first?: InputMaybe<Scalars['Int']['input']>;\n kind?: InputMaybe<CareerEntryKindFilterInput>;\n last?: InputMaybe<Scalars['Int']['input']>;\n};\n\n\n/** A business contact associated with an organization. */\nexport type ContactLocationsArgs = {\n after?: InputMaybe<Scalars['String']['input']>;\n before?: InputMaybe<Scalars['String']['input']>;\n first?: InputMaybe<Scalars['Int']['input']>;\n last?: InputMaybe<Scalars['Int']['input']>;\n subtype?: InputMaybe<LocationSubtypeFilterInput>;\n};\n\n\n/** A business contact associated with an organization. */\nexport type ContactOrganizationArgs = {\n reveal?: InputMaybe<Array<RevealDimension>>;\n};\n\n/**\n * A way to reach a contact that Atlas holds on file. Each one is named after the\n * reveal dimension that hands its value over, minus the subject: `PHONE_NUMBER`\n * here, `CONTACT_PHONE_NUMBER` in `reveal`.\n */\nexport type ContactChannel =\n /** A verified email address, not merely one on file. */\n | 'EMAIL_ADDRESS'\n /** A LinkedIn profile URL. */\n | 'LINKEDIN_URL'\n /** A phone number. */\n | 'PHONE_NUMBER';\n\n/**\n * Narrows contacts by the channels Atlas can reach them through: `eq` one channel,\n * `in` any of them, `all` every one of them, `notEq` / `notIn` without them.\n * Filtering on a channel never reveals its value: `reveal` decides that.\n */\nexport type ContactChannelFilterInput = {\n /** Match only records holding every one of these values. */\n all?: InputMaybe<Array<ContactChannel>>;\n /** Exact match. */\n eq?: InputMaybe<ContactChannel>;\n /** Match any of these values. */\n in?: InputMaybe<Array<ContactChannel>>;\n /** Exclude exact match. */\n notEq?: InputMaybe<ContactChannel>;\n /** Exclude any of these values. */\n notIn?: InputMaybe<Array<ContactChannel>>;\n};\n\n/** The connection type for Contact. */\nexport type ContactConnection = RevealedPage & {\n __typename?: 'ContactConnection';\n /**\n * Estimated total number of items across all pages. It comes from the query\n * planner rather than a count, so it costs planning time instead of a scan and\n * cannot exceed the statement timeout. It is approximate at every magnitude,\n * including small ones, and it moves when the table's statistics are refreshed.\n * Accuracy depends on the filter: within a few percent on plain column and\n * array-overlap filters, and as much as 30% out on a range filter such as\n * `companySize`. It is not meaningful for the embedding filters `jobTitle` and\n * `industry` — no statistics exist for a vector-distance predicate, so the\n * estimate ignores the distance threshold entirely and approximates only what\n * the other filters admit; it has been measured reporting 241371 for a filter\n * whose true result was empty. Never render it as an exact figure, and use\n * `totalCount` when the figure has to be exact.\n */\n approximateTotalCount: Scalars['Int']['output'];\n /**\n * Reports what this page cost in reveal credits. `held` is the ceiling reserved\n * for every requested dimension on every row, and `used` is the units the page\n * consumed. `used` is zero when the query revealed nothing, while `held` still\n * reports the reserved ceiling.\n */\n credits: RevealCredits;\n /** A list of edges. */\n edges?: Maybe<Array<Maybe<ContactEdge>>>;\n /** A list of nodes. */\n nodes?: Maybe<Array<Maybe<Contact>>>;\n /** Information to aid in pagination. */\n pageInfo: PageInfo;\n /** Total number of items across all pages, exact unless `upTo` is given. */\n totalCount: Scalars['Int']['output'];\n};\n\n\n/** The connection type for Contact. */\nexport type ContactConnectionTotalCountArgs = {\n upTo?: InputMaybe<Scalars['Int']['input']>;\n};\n\n/** A contact in a connection, with what this particular query revealed about it. */\nexport type ContactEdge = Revealed & {\n __typename?: 'ContactEdge';\n /**\n * Reports what revealing this record cost in reveal credits. `held` is the\n * ceiling reserved for it, one unit per requested dimension, and `used` is the\n * units it consumed. `used` is zero when the query revealed nothing, while\n * `held` still reports the reserved ceiling.\n */\n credits: RevealCredits;\n /** A cursor for use in pagination. */\n cursor: Scalars['String']['output'];\n /**\n * One entry per filter constrained on this query, reporting whether this contact\n * matched on the attribute's value or on its absence. `organizationFilter` axes\n * are reported under \"organization.\" paths. Empty when the connection was\n * resolved without a filter.\n */\n filterMatches: Array<FilterMatch>;\n /**\n * Hamming distance between the binary quantizations of the contact's job\n * embedding and the sort query, an integer from 0 to 512 where 0 is identical.\n * Not a cosine distance, and not comparable to the thresholds the jobTitle\n * filter takes. Only present when sorting by JOB_TITLE_DISTANCE with a query argument.\n */\n neighborDistance?: Maybe<Scalars['Float']['output']>;\n /** The item at the end of the edge. */\n node?: Maybe<Contact>;\n /**\n * Lists, per reach dimension this query touched, what this response revealed,\n * what the company already held and what stays locked. The list is empty when\n * the query touched no reach field.\n */\n reveals: Array<RevealDimensionStatus>;\n};\n\n/** Autogenerated return type of ContactEnrichmentResult. */\nexport type ContactEnrichmentResultPayload = {\n __typename?: 'ContactEnrichmentResultPayload';\n /** The merged Contact, or null when none could be resolved. */\n contact?: Maybe<Contact>;\n /** The caller-supplied correlation id this result answers. */\n externalId: Scalars['ID']['output'];\n /** Why no Contact could be resolved. Populated only when `contact` is null. */\n unresolvedReason?: Maybe<ContactEnrichmentUnresolvedReason>;\n};\n\n/** Why an enrichContact call resolved no Contact. */\nexport type ContactEnrichmentUnresolvedReason =\n /**\n * Enrichment was accepted and deferred to a background job, and that job did not\n * complete — an upstream provider outage, or a payload the interaction refused.\n * Unlike the other reasons this is not a verdict about the contact: nothing was\n * decided, so the caller may retry the same payload.\n */\n | 'ENRICHMENT_FAILED'\n /** No email address, LinkedIn URL, or first-and-last-name pair was supplied, so no contact could be matched or created. */\n | 'NO_IDENTIFIER'\n /**\n * No organization domain was supplied and none could be resolved from the\n * organization LinkedIn URL or name. A Contact is always attached to a\n * domain-keyed Organization, so none could be created.\n */\n | 'UNRESOLVED_ORGANIZATION_DOMAIN';\n\n/** Filter criteria for contacts. */\nexport type ContactFilterInput = {\n /** Filter by confidence score (0.0–1.0). */\n confidenceScore?: InputMaybe<FloatFilterInput>;\n /**\n * Filter contacts that belong to any of the given Mercator location division\n * IDs. `eq`/`in` match contacts with at least one overlapping division;\n * `not_eq`/`not_in` exclude them. This is an array-overlap filter against\n * Mercator-encoded division IDs, not a scalar Atlas ID filter.\n */\n divisionIds?: InputMaybe<IdFilterInput>;\n /**\n * Filter on the contact's email address. Values are downcased and trimmed\n * before matching — the same transform the column is written through — so\n * `eq: \" Jane@Acme.com \"` matches a stored \"jane@acme.com\". Matching is exact\n * after that, not a substring or domain search. An email is unique per\n * organization, and in practice globally, so a positive `eq` matches at most\n * one contact. Prefer this for a read-only \"do we already have this person?\"\n * lookup, batching a list through `in`; `searchContact` is the enriching\n * counterpart and will call paid providers on a miss. Pair with `valid: false`\n * to check existence irrespective of the quality floor — the default `valid`\n * gate requires a verified email and would hide a contact whose address is on\n * file but unverified. Use `emailStatus` to filter on verification state.\n */\n emailAddress?: InputMaybe<StringFilterInput>;\n /** Filter by email verification status (VALID, INVALID, CATCH_ALL, UNKNOWN). */\n emailStatus?: InputMaybe<EmailStatusFilterInput>;\n /** Filter by contact global id. */\n id?: InputMaybe<IdFilterInput>;\n /**\n * Job title embedding filters. Each entry matches contacts whose combined\n * job context (function + level + title) is semantically close to the query.\n * A query that is exactly one bare role word — a department such as\n * \"Marketing\", \"Sales\", \"Human Resources\", or \"Founder\", \"Owner\", \"Manager\",\n * \"Intern\", in English, French, Dutch, German, Spanish, Portuguese or\n * Italian (\"Fondateur\", \"Gründer\", \"Vendas\") — is embedded as that role's\n * curated vocabulary (\"Founder, Co-Founder, Owner, CEO\") rather than as the\n * word itself: measured on production documents, the bare word admits 92%\n * of the off-intent titles labelled for it, the vocabulary 25% with the same\n * recall. Five French executive titles are expanded the same way, as an\n * acronym or spelled out: \"PDG\", \"Directeur Général\" (\"DG\"), \"DAF\", \"DSI\"\n * and \"DRH\" (\"Président-Directeur Général\", \"Directeur Financier\", …). On\n * French production documents the bare \"Directeur Général\" admits 64% of\n * all job titles, its vocabulary 8% of the junk it admitted. Anything else\n * is embedded as typed. \"Director\" has no vocabulary: no phrasing separates\n * that seniority word on this axis.\n * List different roles in `queries` (e.g. [\"CMO\", \"Marketing Director\",\n * \"VP Marketing\"]) to match any of them. Multilingual queries work: include\n * translated titles (e.g. \"Directeur Marketing\", \"Marketingleiter\") to\n * improve cross-language recall. Entries AND with each other.\n * Set `match` rather than a raw `distance`: this axis is measured in its\n * fitted 512-dimension projection, so its calibrated operating point is\n * 0.89 (text-embedding-3-small) and not the native-space 0.58 — a number a\n * caller cannot derive, and one that moves with every refit.\n * INCLUDED_STRICT resolves to 0.89, INCLUDED_LOOSE to 0.8949; both sit\n * inside the defensible 0.8802-0.8998 interval.\n * Thresholds validated by the embedding_calibration test suite.\n * Maximum 25 entries.\n */\n jobTitle?: InputMaybe<Array<EmbeddingFilterInput>>;\n /**\n * Filter on the contact's LinkedIn profile URL. `presence: true` returns only\n * contacts that have one — independent of `valid`, so combine `valid: false`\n * with it to reach contacts reachable on LinkedIn but without a verified\n * email. `eq`/`in` match a specific profile, and values are normalized the way\n * the column is written, so scheme, host and a trailing slash or query no\n * longer have to match a stored URL byte for byte:\n * `eq: \"fr.linkedin.com/in/janedoe/?trk=x\"` finds a stored\n * \"https://www.linkedin.com/in/janedoe\". A vanity slug is case-dependent, so\n * `/in/JaneDoe` and `/in/janedoe` stay two different profiles. Only person\n * profiles resolve — a company page, a bare slug or a non-LinkedIn URL matches\n * nothing rather than being ignored; use the `linkedin` filter on\n * `organizations` for a company page. Prefer this for a read-only \"do we\n * already have this person?\" lookup, batching a list through `in`;\n * `searchContact` is the enriching counterpart and will call paid providers on\n * a miss. Pair with `valid: false` to check existence irrespective of the\n * quality floor.\n */\n linkedin?: InputMaybe<StringFilterInput>;\n /**\n * Filter on the contact's full name. `presence: true` returns only contacts with\n * both a first and a last name — it re-expresses `valid`'s name floor on its\n * own, so callers passing `valid: false` can keep it without the\n * email/confidence floors. `eq`/`in` match a full name; values are compared\n * case- and accent-insensitively.\n */\n name?: InputMaybe<StringFilterInput>;\n /**\n * Profile embedding filters. Each entry matches contacts whose whole profile\n * (headline + description + job title) is semantically close to the query, so a\n * topic or skill that never appears in the title still matches (\"hiring\",\n * \"trade fairs\", \"SEO\"). Synonyms and translations match without being listed;\n * list alternatives in `queries` to match any of them. Entries AND with each\n * other and with `jobTitle`. Measured on 1536-bit binary quantizations by\n * Hamming distance: set `match`, whose thresholds come from the serving fit,\n * rather than a raw `distance`. A contact with no headline, description or job\n * title has no profile and never matches unless `allowBlank` is set.\n * Maximum 25 entries.\n */\n profile?: InputMaybe<Array<EmbeddingFilterInput>>;\n /**\n * Return only contacts an outreach can land on — those with a LinkedIn URL, a\n * verified email, or both. Independent of `valid`, which requires the email leg\n * specifically, so pair `valid: false, reachable: true` to reach a contact whose\n * email is still undiscovered but whose LinkedIn profile is known. `false`\n * applies no constraint.\n */\n reachable?: InputMaybe<Scalars['Boolean']['input']>;\n /** Return only complete records (name, email, confidence >= 0.5). */\n valid?: InputMaybe<Scalars['Boolean']['input']>;\n};\n\n/** A page of contacts a `findContacts` call asked for, sent again as Atlas fills it; the last version is COMPLETE. */\nexport type ContactFindProgress = {\n __typename?: 'ContactFindProgress';\n /**\n * The contacts on the page, revealed as the call asked. `pageInfo.endCursor` is\n * the `page.after` of the call asking for the next page.\n */\n contacts: ContactPage;\n /** The externalId of the call that asked for the page. */\n externalId: Scalars['ID']['output'];\n /**\n * The state of this page, not of the search: FILLING while Atlas may send it\n * again, COMPLETE on its last version. Whether more records follow is\n * `pageInfo.hasNextPage`.\n */\n status: FindPageStatus;\n};\n\n/** Autogenerated return type of ContactIdentifyResult. */\nexport type ContactIdentifyResultPayload = {\n __typename?: 'ContactIdentifyResultPayload';\n /** The identified contact, or null when nothing matched. */\n contact?: Maybe<Contact>;\n /** The externalId the caller passed, naming the request this result answers. */\n externalId: Scalars['ID']['output'];\n};\n\n/** OneOf input for searchContact — supply exactly one lookup mode. */\nexport type ContactLookupInput = {\n /** Global ID of an existing contact whose email should be discovered. */\n contactId?: InputMaybe<Scalars['ID']['input']>;\n /** Contact's email address — globally unique within an organization. */\n emailAddress?: InputMaybe<Scalars['String']['input']>;\n /** Contact's LinkedIn profile URL — globally unique within an organization. */\n linkedinUrl?: InputMaybe<Scalars['String']['input']>;\n /** Name-based lookup: first name + last name + organization. */\n name?: InputMaybe<ContactNameInput>;\n};\n\n/** Name-based lookup for searchContact — first name, last name, and organization. */\nexport type ContactNameInput = {\n /** Contact's first name. */\n firstName: Scalars['String']['input'];\n /** Contact's last name. */\n lastName: Scalars['String']['input'];\n /** Global ID of the organization this contact belongs to. */\n organizationId: Scalars['ID']['input'];\n};\n\n/**\n * One page of contacts a `findContacts` call asked for. Not a connection: it takes\n * no paging arguments, and the next page is asked for with `findContacts(page: {\n * after: pageInfo.endCursor })`.\n */\nexport type ContactPage = RevealedPage & {\n __typename?: 'ContactPage';\n /**\n * Reports what this page cost in reveal credits. `held` is the ceiling reserved\n * for every requested dimension on every row, and `used` is the units the page\n * consumed. `used` is zero when the query revealed nothing, while `held` still\n * reports the reserved ceiling.\n */\n credits: RevealCredits;\n /** The contacts on the page, each with what this page revealed about it. */\n edges: Array<ContactEdge>;\n /** The contacts on the page. */\n nodes: Array<Contact>;\n /**\n * Where the page sits in the search: `endCursor` is the `page.after` of the call\n * for the next page, and `hasNextPage` says whether more contacts are listed\n * after it or may still be found by asking for it.\n */\n pageInfo: PageInfo;\n /** Number of contacts the search has listed so far, at most 1000. */\n totalCount: Scalars['Int']['output'];\n};\n\n/** Autogenerated return type of ContactSearchResult. */\nexport type ContactSearchResultPayload = {\n __typename?: 'ContactSearchResultPayload';\n /**\n * Matched contacts — both pre-existing database matches and newly-discovered,\n * newly-persisted third-party matches. Paginated; fetch further pages via the\n * `contacts` query using the same filter.\n */\n contacts: ContactConnection;\n /** The externalId the caller passed, naming the request this result answers. */\n externalId: Scalars['ID']['output'];\n};\n\n\n/** Autogenerated return type of ContactSearchResult. */\nexport type ContactSearchResultPayloadContactsArgs = {\n after?: InputMaybe<Scalars['String']['input']>;\n before?: InputMaybe<Scalars['String']['input']>;\n first?: InputMaybe<Scalars['Int']['input']>;\n last?: InputMaybe<Scalars['Int']['input']>;\n};\n\n/** Fields available for sorting contacts. */\nexport type ContactSortField =\n /** Sort by merged confidence score, highest first by default. */\n | 'CONFIDENCE_SCORE'\n /** Sort by creation timestamp. */\n | 'CREATED_AT'\n /** Cosine distance from the linked organization's description embedding. Requires a query argument. */\n | 'DESCRIPTION_DISTANCE'\n /** Cosine distance from the linked organization's industry embedding. Requires a query argument. */\n | 'INDUSTRY_DISTANCE'\n /**\n * Hamming distance between the binary quantizations of the job_title embedding\n * and the query, an integer from 0 to 512 where 0 is identical. Requires a query argument.\n */\n | 'JOB_TITLE_DISTANCE';\n\n/** Sort configuration for contacts. */\nexport type ContactSortInput = {\n direction?: InputMaybe<SortDirection>;\n field: ContactSortField;\n /**\n * Required when field is JOB_TITLE_DISTANCE, DESCRIPTION_DISTANCE, or\n * INDUSTRY_DISTANCE. Text to embed for distance ordering. For JOB_TITLE_DISTANCE\n * a bare role word follows the same vocabulary rule as a `jobTitle` filter query\n * (see ContactFilterInput.jobTitle).\n */\n query?: InputMaybe<Scalars['String']['input']>;\n};\n\n/** Contact field values to cross-check against Atlas's stored data. */\nexport type ContactValidationChecksInput = {\n /** Email address to include in contact coherence checks. */\n email?: InputMaybe<Scalars['String']['input']>;\n /** Phone number to include in contact coherence checks. */\n phone?: InputMaybe<Scalars['String']['input']>;\n};\n\n/** Autogenerated return type of ContactValidationResult. */\nexport type ContactValidationResultPayload = {\n __typename?: 'ContactValidationResultPayload';\n /** Per-field coherence flags from the validation pass. */\n clues?: Maybe<Scalars['JSON']['output']>;\n /** The contact after validation, or null when it could not be resolved. */\n contact?: Maybe<Contact>;\n /** The externalId the caller passed, naming the request this result answers. */\n externalId: Scalars['ID']['output'];\n /** The organization the validated contact belongs to, or null when none was resolved. */\n organization?: Maybe<Organization>;\n};\n\n/**\n * Filter criteria for `findContacts`. Applies exactly what it states: no quality\n * floor is added, so a contact with no email or a low confidence is returned\n * unless a filter here excludes it.\n */\nexport type ContactsFilterInput = {\n /** Filters by confidence score (0.0–1.0). `gteq: 0.5` is the floor the older `valid` argument applied. */\n confidenceScore?: InputMaybe<FloatFilterInput>;\n /**\n * Keeps contacts that belong to any of the given Mercator location division IDs\n * (`eq`/`in`), or excludes them (`notEq`/`notIn`).\n */\n divisionIds?: InputMaybe<IdFilterInput>;\n /**\n * Filters on the contact's email address, downcased and trimmed before an exact\n * match. A positive `eq` matches at most one contact.\n */\n emailAddress?: InputMaybe<StringFilterInput>;\n /** Filters by email verification status (VALID, INVALID, CATCH_ALL, UNKNOWN). */\n emailStatus?: InputMaybe<EmailStatusFilterInput>;\n /** Filters by contact global id. */\n id?: InputMaybe<IdFilterInput>;\n /** Job title embedding filters, matched exactly as `ContactFilterInput.jobTitle` matches them. Entries AND with each other. */\n jobTitle?: InputMaybe<Array<EmbeddingFilterInput>>;\n /**\n * Filters on the contact's LinkedIn profile URL, normalized the way the column\n * is written. `presence: true` keeps contacts that have one.\n */\n linkedinUrl?: InputMaybe<StringFilterInput>;\n /**\n * Filters on the contact's full name, case- and accent-insensitively. `presence:\n * true` keeps contacts with both a first and a last name.\n */\n name?: InputMaybe<StringFilterInput>;\n /**\n * Profile embedding filters, matched exactly as `ContactFilterInput.profile`\n * matches them. Entries AND with each other and with `jobTitle`.\n */\n profile?: InputMaybe<Array<EmbeddingFilterInput>>;\n /** Keeps contacts Atlas can reach through the listed channels. */\n reachableBy?: InputMaybe<ContactChannelFilterInput>;\n};\n\n/** A geographic point serialized as a GeoJSON Point object (RFC 7946). */\nexport type Coordinate = Node & {\n __typename?: 'Coordinate';\n /** Position in GeoJSON order: [longitude, latitude] (WGS 84). */\n coordinates: Array<Scalars['Float']['output']>;\n id: Scalars['ID']['output'];\n /** GeoJSON geometry type. Always \"Point\". */\n type: Scalars['String']['output'];\n};\n\n/** A geographic coordinate used as a spatial query input. */\nexport type CoordinateInput = {\n /** Latitude in decimal degrees (WGS 84). */\n lat: Scalars['Float']['input'];\n /** Longitude in decimal degrees (WGS 84). */\n lng: Scalars['Float']['input'];\n};\n\n/** Autogenerated input type of CorrectDebit */\nexport type CorrectDebitInput = {\n /** As on debitCredits: lets an increase the balance can't cover go to overage instead of failing with insufficient_credits. */\n allowOverage?: InputMaybe<Scalars['Boolean']['input']>;\n /** Global id of the billing customer whose consumption is corrected. */\n billingCustomerId: Scalars['ID']['input'];\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: InputMaybe<Scalars['String']['input']>;\n /** Id of the consumed record, as debitCredits received it. */\n consumableId: Scalars['ID']['input'];\n /** Type of the consumed record, as debitCredits received it. */\n consumableType: Scalars['String']['input'];\n /** Caller-chosen key, unique per customer, that makes a retry safe. */\n idempotencyKey: Scalars['String']['input'];\n /** What the consumable should cost in total, net of earlier corrections and refunds. 0 or more. */\n newCost: Scalars['Float']['input'];\n /** Why the cost changes, stored on every row this call writes. */\n reason: Scalars['String']['input'];\n};\n\n/** Autogenerated return type of CorrectDebit. */\nexport type CorrectDebitPayload = Node & {\n __typename?: 'CorrectDebitPayload';\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: Maybe<Scalars['String']['output']>;\n /**\n * What the consumable costs after the call: its debits and overages, minus the\n * refund and correction credits that reduce them.\n */\n consumedCost: Scalars['Float']['output'];\n /** CORRECTION credits written by a decrease, one per debit or overage reduced. Empty for an increase or an unchanged cost. */\n credits: BillingCreditConnection;\n /** Positive consumption debits written by an increase. Empty for a decrease, an unchanged cost or a refused increase. */\n debits: BillingDebitConnection;\n /** insufficient_credits when success is false. Null otherwise. */\n errorCode?: Maybe<Scalars['String']['output']>;\n id: Scalars['ID']['output'];\n /** The overage an increase recorded with allowOverage. Null otherwise. */\n overage?: Maybe<BillingOverage>;\n /** Customer's credit balance after the call. */\n remainingBalance: Scalars['Float']['output'];\n /**\n * False only when an increase exceeds the balance and allowOverage is false;\n * nothing is written then and the same idempotencyKey can be retried. True otherwise.\n */\n success: Scalars['Boolean']['output'];\n};\n\n\n/** Autogenerated return type of CorrectDebit. */\nexport type CorrectDebitPayloadCreditsArgs = {\n after?: InputMaybe<Scalars['String']['input']>;\n before?: InputMaybe<Scalars['String']['input']>;\n first?: InputMaybe<Scalars['Int']['input']>;\n last?: InputMaybe<Scalars['Int']['input']>;\n};\n\n\n/** Autogenerated return type of CorrectDebit. */\nexport type CorrectDebitPayloadDebitsArgs = {\n after?: InputMaybe<Scalars['String']['input']>;\n before?: InputMaybe<Scalars['String']['input']>;\n first?: InputMaybe<Scalars['Int']['input']>;\n last?: InputMaybe<Scalars['Int']['input']>;\n};\n\n/** Autogenerated input type of CreateApplicationCredential */\nexport type CreateApplicationCredentialInput = {\n applicationId: Scalars['ID']['input'];\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: InputMaybe<Scalars['String']['input']>;\n /**\n * Omit for a credential that lives until revoked. Note this bounds when the\n * credential may still obtain a token, not the tokens themselves: one issued\n * just before this moment stays valid for its full lifetime afterwards, because\n * a subgraph verifies a token by signature and `exp` and never asks whether the\n * credential behind it is still alive.\n */\n expiresAt?: InputMaybe<Scalars['ISO8601DateTime']['input']>;\n name: Scalars['String']['input'];\n /** Marks a throwaway credential minted for one CLI session. Hidden from listings by default. */\n session?: InputMaybe<Scalars['Boolean']['input']>;\n};\n\n/** Autogenerated input type of CreateApplication */\nexport type CreateApplicationInput = {\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: InputMaybe<Scalars['String']['input']>;\n /** Defaults to the caller's personal company. */\n companyId?: InputMaybe<Scalars['ID']['input']>;\n description?: InputMaybe<Scalars['String']['input']>;\n name: Scalars['String']['input'];\n};\n\n/** Autogenerated input type of CreateBillingCheckoutSession */\nexport type CreateBillingCheckoutSessionInput = {\n /** Billing customer UUID, stored on the owning service's company record. */\n billingCustomerId: Scalars['ID']['input'];\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: InputMaybe<Scalars['String']['input']>;\n /**\n * Settlement currency to charge, lowercase ISO (one of: eur, usd, gbp — the\n * currencies with defined catalog prices). Pins Checkout to that currency's\n * defined amount so the price the product displayed is exactly what the card is\n * charged. Omitted: Stripe Adaptive Pricing presents the customer's local\n * currency, converted from EUR.\n */\n currency?: InputMaybe<Scalars['String']['input']>;\n /** Billing periodicity for the new subscription. MONTHLY or ANNUAL. */\n periodicity: BillingPeriodicity;\n /** Plan tier for the new subscription. Plans whose catalog entry offers a trial start with one; the rest bill immediately. */\n plan: BillingPlanName;\n /** Override for the frontend base URL Stripe redirects to after Checkout. Defaults to BILLING_CHECKOUT_RETURN_BASE_URL. */\n returnBaseUrl?: InputMaybe<Scalars['String']['input']>;\n /**\n * Trial length override in days (0-90), for sales-led flows that hand out custom\n * trials. 0 disables the trial (charge at checkout). Defaults to the plan's catalog trial.\n */\n trialDays?: InputMaybe<Scalars['Int']['input']>;\n};\n\n/** Autogenerated return type of CreateBillingCheckoutSession. */\nexport type CreateBillingCheckoutSessionPayload = Node & {\n __typename?: 'CreateBillingCheckoutSessionPayload';\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: Maybe<Scalars['String']['output']>;\n id: Scalars['ID']['output'];\n /** Stripe-hosted Checkout URL. The frontend should immediately `window.location =` this. */\n url: Scalars['String']['output'];\n};\n\n/** Autogenerated input type of CreateBillingCustomer */\nexport type CreateBillingCustomerInput = {\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: InputMaybe<Scalars['String']['input']>;\n /**\n * Optional company UUID to record in Stripe's customer metadata for\n * cross-service debugging. Not used by billing for any lookup.\n */\n companyId?: InputMaybe<Scalars['ID']['input']>;\n /** Customer's email. Sent to Stripe so Checkout pre-fills the email field and receipts go to the right inbox. */\n email?: InputMaybe<Scalars['String']['input']>;\n /** Customer's display name (typically `first last`). Stored on the Stripe Customer for Dashboard readability. */\n name?: InputMaybe<Scalars['String']['input']>;\n /**\n * Product the customer belongs to — decides which Stripe account the customer is\n * created on and which plan catalog applies. The account must be registered in\n * the environment or the mutation fails.\n */\n product: BillingProduct;\n};\n\n/** Autogenerated return type of CreateBillingCustomer. */\nexport type CreateBillingCustomerPayload = Node & {\n __typename?: 'CreateBillingCustomerPayload';\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: Maybe<Scalars['String']['output']>;\n /** The newly created billing customer. */\n customer: BillingCustomer;\n id: Scalars['ID']['output'];\n};\n\n/** Autogenerated input type of CreateBillingEmbeddedCheckoutSession */\nexport type CreateBillingEmbeddedCheckoutSessionInput = {\n /** Billing customer UUID, stored on the owning service's company record. */\n billingCustomerId: Scalars['ID']['input'];\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: InputMaybe<Scalars['String']['input']>;\n /** Billing periodicity for the new subscription. MONTHLY or ANNUAL. */\n periodicity: BillingPeriodicity;\n /** Plan tier for the new subscription. Plans whose catalog entry offers a trial start with one; the rest bill immediately. */\n plan: BillingPlanName;\n /**\n * Override for the frontend base URL Stripe redirects the parent frame to after\n * the customer completes payment. Defaults to the\n * BILLING_CHECKOUT_RETURN_BASE_URL env var.\n */\n returnBaseUrl?: InputMaybe<Scalars['String']['input']>;\n};\n\n/** Autogenerated return type of CreateBillingEmbeddedCheckoutSession. */\nexport type CreateBillingEmbeddedCheckoutSessionPayload = Node & {\n __typename?: 'CreateBillingEmbeddedCheckoutSessionPayload';\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: Maybe<Scalars['String']['output']>;\n /**\n * Stripe Checkout Session client secret. The frontend feeds this to Stripe.js'\n * `<EmbeddedCheckoutProvider>` to mount the payment form inline.\n */\n clientSecret: Scalars['String']['output'];\n id: Scalars['ID']['output'];\n};\n\n/** Autogenerated input type of CreateBillingPortalSession */\nexport type CreateBillingPortalSessionInput = {\n /** Billing customer UUID. */\n billingCustomerId: Scalars['ID']['input'];\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: InputMaybe<Scalars['String']['input']>;\n /** Override for the frontend base URL Stripe redirects back to after the Portal session closes. */\n returnUrl?: InputMaybe<Scalars['String']['input']>;\n};\n\n/** Autogenerated return type of CreateBillingPortalSession. */\nexport type CreateBillingPortalSessionPayload = Node & {\n __typename?: 'CreateBillingPortalSessionPayload';\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: Maybe<Scalars['String']['output']>;\n id: Scalars['ID']['output'];\n /** Stripe-hosted Customer Portal URL. */\n url: Scalars['String']['output'];\n};\n\n/** Autogenerated input type of CreateCompanyBillingPortalSession */\nexport type CreateCompanyBillingPortalSessionInput = {\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: InputMaybe<Scalars['String']['input']>;\n /** The company whose billing is being managed. */\n companyId: Scalars['ID']['input'];\n /** Where Stripe returns the caller when they leave the portal. */\n returnUrl?: InputMaybe<Scalars['String']['input']>;\n};\n\n/** Autogenerated input type of CreateCompanyCheckoutSession */\nexport type CreateCompanyCheckoutSessionInput = {\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: InputMaybe<Scalars['String']['input']>;\n /** The company being subscribed. Every member may subscribe it — there are no roles. */\n companyId: Scalars['ID']['input'];\n /** MONTHLY or ANNUAL, as `billingPlanCatalog` reports it. */\n periodicity: Scalars['String']['input'];\n /**\n * Tier name, as `billingPlanCatalog(product:)` reports it. Validated by billing\n * against that product's catalog, so a tier belonging to another product is\n * refused rather than resolved.\n */\n plan: Scalars['String']['input'];\n /** Where Stripe returns the parent frame after payment. Defaults to the deployment's configured portal URL. */\n returnBaseUrl?: InputMaybe<Scalars['String']['input']>;\n};\n\n/** Autogenerated input type of CreateCompany */\nexport type CreateCompanyInput = {\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: InputMaybe<Scalars['String']['input']>;\n name: Scalars['String']['input'];\n};\n\n/** Autogenerated input type of CreateCompanyInvitation */\nexport type CreateCompanyInvitationInput = {\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: InputMaybe<Scalars['String']['input']>;\n companyId: Scalars['ID']['input'];\n /**\n * Who the invitation is meant for. A label for your own records: whoever\n * authenticates while accepting joins, not this address.\n */\n email: Scalars['String']['input'];\n /** Defaults to seven days. */\n expiresAt?: InputMaybe<Scalars['ISO8601DateTime']['input']>;\n};\n\n/** Autogenerated input type of CreateOutboundChannelAccount */\nexport type CreateOutboundChannelAccountInput = {\n /** Channel the account will operate on. */\n channel: OutboundChannel;\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: InputMaybe<Scalars['String']['input']>;\n /**\n * Whoever the consumer holds this account for, in the consumer's own terms: an\n * opaque reference the gateway stores, compares and never interprets. It\n * partitions the identity rule — two accounts of this owner may run the same\n * person when their `externalId` differ, and the same string sent by another\n * consumer is a different tenant, since the owner comes first. Fixed at\n * registration. Refused as `external_id.blank` when empty.\n */\n externalId: Scalars['String']['input'];\n /**\n * Who the account is for, when the consumer already knows: history can then be\n * imported before any connection. A claim until a connection confirms it; a\n * connection resolving to someone else is refused. Refused as\n * `identity.channel_mismatch` for another channel's variant and\n * `identity.already_claimed` when this owner already has a live account for that\n * person under the same `externalId`.\n */\n identity?: InputMaybe<OutboundChannelIdentityInput>;\n /**\n * Provider that runs the account on the channel. Defaults to the first\n * configured provider of the channel. Refused as `provider.unknown` when it does\n * not serve the channel and `provider.unavailable` when it is not configured in\n * this environment.\n */\n provider?: InputMaybe<OutboundChannelProvider>;\n /** HMAC-SHA256 secret every event about this account is signed with. Write-only: it is never returned by the API. */\n webhookSecret: Scalars['String']['input'];\n /** HTTPS address every event about this account is delivered to. */\n webhookUrl: Scalars['String']['input'];\n};\n\n/** Autogenerated return type of CreateOutboundChannelAccount. */\nexport type CreateOutboundChannelAccountPayload = Node & {\n __typename?: 'CreateOutboundChannelAccountPayload';\n /** The draft account. */\n channelAccount: OutboundChannelAccount;\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: Maybe<Scalars['String']['output']>;\n id: Scalars['ID']['output'];\n};\n\n/** Autogenerated input type of CreateSource */\nexport type CreateSourceInput = {\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: InputMaybe<Scalars['String']['input']>;\n /**\n * Maps Atlas canonical contact field names to rawData extraction expressions.\n * Keys: first_name, last_name, email_address, job_title, job_level, job_function,\n * linkedin_url, city, country_code.\n * Values: a string key (\"firstname\"), an array path for nested access\n * ([\"data\", \"email\"]), or an operation hash\n * ({\"op\": \"split\", \"key\": \"full_name\", \"index\": 0}).\n * All referenced keys must exist in contact_schema.\n */\n contactFieldMappings?: InputMaybe<Scalars['JSON']['input']>;\n /** JSON Schema (draft-07) describing the expected shape of contact rawData payloads. */\n contactSchema?: InputMaybe<Scalars['JSON']['input']>;\n /**\n * Maps Atlas canonical identification field names to rawData extraction expressions.\n * Keys: ip_address, organization_domain, confidence_score.\n * Values follow the same expression syntax as contact_field_mappings.\n * All referenced keys must exist in identification_schema.\n */\n identificationFieldMappings?: InputMaybe<Scalars['JSON']['input']>;\n /** JSON Schema (draft-07) describing the expected shape of identification rawData payloads. */\n identificationSchema?: InputMaybe<Scalars['JSON']['input']>;\n /**\n * Maps Atlas canonical organization field names to rawData extraction expressions.\n * Keys: name, website, phone, contact_email, linkedin_url, description,\n * company_size, founded_year, industry, country_code, annual_revenue.\n * Values: a string key (\"name\"), an array path ([\"company\", \"name\"]),\n * or an operation hash ({\"op\": \"parse_employee_range\", \"path\": [\"size_range\"]}).\n * All referenced keys must exist in organization_schema.\n */\n organizationFieldMappings?: InputMaybe<Scalars['JSON']['input']>;\n /** JSON Schema (draft-07) describing the expected shape of organization rawData payloads. */\n organizationSchema?: InputMaybe<Scalars['JSON']['input']>;\n /** Short machine-readable identifier for this source (e.g. snitcher, hunter). */\n slug: Scalars['String']['input'];\n /** Weight applied during multi-source merging, 0.0–1.0. Higher scores win field conflicts. */\n trustScore?: InputMaybe<Scalars['Float']['input']>;\n};\n\n/** Autogenerated input type of CreateWatcher */\nexport type CreateWatcherInput = {\n /**\n * Provision the Watcher's providers asynchronously. False (the default) keeps\n * the synchronous contract: providers are set up before this mutation returns,\n * the Watcher comes back `PROVISIONED` with its `installations` and\n * `providerReferences` populated, and a provider refusing the request (an\n * unresolvable place, an out-of-vocabulary industry, an upstream outage) fails\n * the call. True returns as soon as the Watcher is persisted, `PENDING`, and\n * provisions in background jobs retried across provider outages for about a day:\n * creation no longer fails when a provider is down, and the outcome arrives on\n * `provisioningStatus` (poll) or `watcherProvisioningResult` (subscribe, with\n * `externalId`), with per-provider reasons on `provisioningFailures`.\n */\n async?: InputMaybe<Scalars['Boolean']['input']>;\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: InputMaybe<Scalars['String']['input']>;\n /**\n * Ignored. Accepted only so callers written against the previous schema keep\n * working. The Watcher belongs to the company the request acts for: the one the\n * `X-Company-Id` header names, or an application's own.\n * @deprecated Never read. Removed once the last caller stops sending it.\n */\n companyId?: InputMaybe<Scalars['ID']['input']>;\n /** Slug of the Definition to subscribe to. */\n definitionSlug: Scalars['String']['input'];\n /** Version of the Definition to subscribe to. */\n definitionVersion: Scalars['Int']['input'];\n /**\n * How the upstream source treats a lead it has already delivered for this\n * watcher. Omit to leave the source's own default in place.\n */\n duplicateHandling?: InputMaybe<WatcherDuplicateHandlingInput>;\n /**\n * Optional caller-chosen correlation id for the asynchronous provisioning\n * outcome, used with `async: true`. Subscribe to\n * `watcherProvisioningResult(externalId:)` with the same value before calling\n * this mutation; when every provider settles, the watcher is delivered on that\n * subscription. Callers that poll `provisioningStatus` instead can omit it.\n */\n externalId?: InputMaybe<Scalars['ID']['input']>;\n /**\n * Optional Ideal Customer Profile, in the same shape Atlas search uses —\n * including geography: `contact.divisionIds` / `organization.divisionIds` are\n * Mercator location division IDs filtered exactly as Atlas search filters them,\n * so `notIn` excludes places as well. Forwarded to each provider's upstream\n * source so leads outside the profile are never emitted — and never billed. Part\n * of the watcher's identity: two callers watching the same topic with different\n * profiles get separate watchers.\n */\n icp?: InputMaybe<WatcherIcpInput>;\n /**\n * Optional freshness-first per-period lead caps for this watcher. Omit or pass\n * an empty list to leave the watcher uncapped. Caps are a property of the\n * watcher (not the individual webhook), so they replace any caps already set on\n * a shared watcher.\n */\n leadCaps?: InputMaybe<Array<WatcherLeadCapInput>>;\n /**\n * How many contacts one matched organization may yield, and the window that is\n * measured over. Omit to take the defaults the input type declares. Only sources\n * that can enforce a per-organization limit accept an explicit cap — a\n * definition whose providers cannot refuses one rather than silently ignoring\n * it, while omission is always accepted. Part of the Watcher's identity, so it\n * is fixed at creation.\n */\n maximumLeadsPerOrganization?: InputMaybe<WatcherMaximumLeadsPerOrganizationInput>;\n /** User-supplied watcher input validated against the Definition's `watcherInputSchema`. */\n watcherInput: Scalars['JSON']['input'];\n /**\n * Delivery endpoint registered on this watcher. Multiple callers with the same\n * definition and input share one watcher. Optional: a watcher created without\n * one keeps its sources running and only stores its leads, read back through `events`.\n */\n webhook?: InputMaybe<WatcherWebhookInput>;\n};\n\n/** Autogenerated return type of CreateWatcher. */\nexport type CreateWatcherPayload = Node & {\n __typename?: 'CreateWatcherPayload';\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: Maybe<Scalars['String']['output']>;\n id: Scalars['ID']['output'];\n /**\n * The newly created or updated Watcher. Already `PROVISIONED` unless `async:\n * true` was requested, in which case its provisioning may still be `PENDING` —\n * see `provisioningStatus`.\n */\n watcher: Watcher;\n};\n\n/** Filter on a timestamp column with comparison operators. Operators combine, so `gt` and `lteq` together select a window. */\nexport type DateTimeFilterInput = {\n /**\n * When true, a row also matches when the attribute is blank: NULL, an empty\n * string, an empty list, or no related record, depending on the column.\n */\n allowBlank?: InputMaybe<Scalars['Boolean']['input']>;\n /** Exactly at. */\n eq?: InputMaybe<Scalars['ISO8601DateTime']['input']>;\n /** Strictly after. */\n gt?: InputMaybe<Scalars['ISO8601DateTime']['input']>;\n /** At or after. */\n gteq?: InputMaybe<Scalars['ISO8601DateTime']['input']>;\n /** Strictly before. */\n lt?: InputMaybe<Scalars['ISO8601DateTime']['input']>;\n /** At or before. */\n lteq?: InputMaybe<Scalars['ISO8601DateTime']['input']>;\n};\n\n/** Autogenerated input type of DebitCredits */\nexport type DebitCreditsInput = {\n /**\n * When true, draws whatever credits are available and records the uncovered rest\n * as an overage instead of refusing with insufficient_credits. Defaults to\n * false, the all-or-nothing draw.\n */\n allowOverage?: InputMaybe<Scalars['Boolean']['input']>;\n /** Global id of the billing customer to charge, the one the calling service stored when it created the customer. */\n billingCustomerId: Scalars['ID']['input'];\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: InputMaybe<Scalars['String']['input']>;\n /** UUID of the record being paid for (e.g. the Lead or Message id). */\n consumableId: Scalars['ID']['input'];\n /** AR class name of the consumed record (e.g. 'Lead', 'Message'). */\n consumableType: Scalars['String']['input'];\n /** Number of credits to draw. Must be greater than 0. */\n cost: Scalars['Float']['input'];\n /** Optional label stored on the debit rows. */\n description?: InputMaybe<Scalars['String']['input']>;\n};\n\n/** Autogenerated return type of DebitCredits. */\nexport type DebitCreditsPayload = Node & {\n __typename?: 'DebitCreditsPayload';\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: Maybe<Scalars['String']['output']>;\n /** Debit rows written by this call. Empty on failure. */\n debits: Array<BillingDebit>;\n /** Currently always `insufficient_credits`. Null on success. */\n errorCode?: Maybe<Scalars['String']['output']>;\n id: Scalars['ID']['output'];\n /** The uncovered part of the cost, when allowOverage let the draw go beyond the balance. Null otherwise. */\n overage?: Maybe<BillingOverage>;\n /** Customer's credit balance after the debit, or on failure. */\n remainingBalance: Scalars['Float']['output'];\n /**\n * True when the cost is fully accounted for: drawn from credits, or, with\n * allowOverage, partly drawn and the rest recorded as an overage. False with\n * errorCode insufficient_credits otherwise.\n */\n success: Scalars['Boolean']['output'];\n};\n\n/** Autogenerated input type of DeleteApplication */\nexport type DeleteApplicationInput = {\n applicationId: Scalars['ID']['input'];\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: InputMaybe<Scalars['String']['input']>;\n};\n\n/** Autogenerated input type of DeleteBillingCustomer */\nexport type DeleteBillingCustomerInput = {\n /** Billing customer UUID to delete, stored on the owning service's company record. */\n billingCustomerId: Scalars['ID']['input'];\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: InputMaybe<Scalars['String']['input']>;\n};\n\n/** Autogenerated return type of DeleteBillingCustomer. */\nexport type DeleteBillingCustomerPayload = Node & {\n __typename?: 'DeleteBillingCustomerPayload';\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: Maybe<Scalars['String']['output']>;\n /** True when the customer was deleted. */\n deleted: Scalars['Boolean']['output'];\n id: Scalars['ID']['output'];\n};\n\n/** Autogenerated input type of DeleteCompany */\nexport type DeleteCompanyInput = {\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: InputMaybe<Scalars['String']['input']>;\n companyId: Scalars['ID']['input'];\n /** Required while the company still owns applications. Revokes all their credentials. */\n force?: InputMaybe<Scalars['Boolean']['input']>;\n};\n\n/** Autogenerated input type of DeleteWatcher */\nexport type DeleteWatcherInput = {\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: InputMaybe<Scalars['String']['input']>;\n id: Scalars['ID']['input'];\n /**\n * Webhook URL to remove from this watcher. Omitted, stops the owner's\n * webhook-less follow instead: there is one per watcher, however many\n * webhook-less calls started it, so this stops it for all of them. The watcher\n * is canceled once it has neither a webhook nor that follow left.\n */\n webhookUrl?: InputMaybe<Scalars['String']['input']>;\n};\n\n/** Autogenerated return type of DeleteWatcher. */\nexport type DeleteWatcherPayload = Node & {\n __typename?: 'DeleteWatcherPayload';\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: Maybe<Scalars['String']['output']>;\n id: Scalars['ID']['output'];\n /** The updated or canceled Watcher. */\n watcher: Watcher;\n};\n\n/** Autogenerated input type of DeviceAuthorize */\nexport type DeviceAuthorizeInput = {\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: InputMaybe<Scalars['String']['input']>;\n scope?: InputMaybe<Scalars['String']['input']>;\n};\n\n/** The answer to a device authorization request: what to show the person and what to poll with. */\nexport type DeviceCodeResponse = {\n __typename?: 'DeviceCodeResponse';\n /** Opaque code the device polls `deviceToken` with. */\n deviceCode: Scalars['String']['output'];\n /** Seconds until the device code expires. */\n expiresIn: Scalars['Int']['output'];\n /** Minimum seconds to wait between `deviceToken` polls. */\n interval: Scalars['Int']['output'];\n /** Short code the person types at the verification URI. */\n userCode: Scalars['String']['output'];\n /** Where the person goes to approve the device. */\n verificationUri: Scalars['String']['output'];\n /** The verification URI with the user code already filled in, when the provider supplies one. */\n verificationUriComplete?: Maybe<Scalars['String']['output']>;\n};\n\n/** Autogenerated input type of DeviceToken */\nexport type DeviceTokenInput = {\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: InputMaybe<Scalars['String']['input']>;\n deviceCode: Scalars['String']['input'];\n};\n\n/** Autogenerated input type of DisconnectOutboundChannelAccount */\nexport type DisconnectOutboundChannelAccountInput = {\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: InputMaybe<Scalars['String']['input']>;\n /** Global id of the channel account to sign out. */\n id: Scalars['ID']['input'];\n};\n\n/** Autogenerated return type of DisconnectOutboundChannelAccount. */\nexport type DisconnectOutboundChannelAccountPayload = Node & {\n __typename?: 'DisconnectOutboundChannelAccountPayload';\n /** The account, now `DISCONNECTED`. */\n channelAccount: OutboundChannelAccount;\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: Maybe<Scalars['String']['output']>;\n id: Scalars['ID']['output'];\n};\n\n/** Autogenerated return type of DomainValidationResult. */\nexport type DomainValidationResultPayload = {\n __typename?: 'DomainValidationResultPayload';\n /** Per-field coherence flags from the validation pass. */\n clues?: Maybe<Scalars['JSON']['output']>;\n /** The externalId the caller passed, naming the request this result answers. */\n externalId: Scalars['ID']['output'];\n /** The organization resolved for the domain, or null when none was found. */\n organization?: Maybe<Organization>;\n};\n\n/** The verdict on the email address a `verifyEmailAddress` call named. */\nexport type EmailAddressVerificationResult = {\n __typename?: 'EmailAddressVerificationResult';\n /** The address that was verified, stripped and downcased. */\n emailAddress: Scalars['String']['output'];\n /** The externalId the caller passed, naming the request this result answers. */\n externalId: Scalars['ID']['output'];\n /**\n * Why an address was answered `invalid` without a provider check. One of:\n * known_invalid, invalid_format, disposable, no_mail_exchanger. Null otherwise.\n */\n reason?: Maybe<Scalars['String']['output']>;\n /** Verdict for the address. One of: valid, invalid, catch_all, unknown, lookup_failed. */\n status: Scalars['String']['output'];\n};\n\n/** Represents a custom header the gateway sets on an email. */\nexport type EmailHeaderInput = {\n /** Names the header; only `X-` headers are accepted. */\n name: Scalars['String']['input'];\n /** Gives the header's value. */\n value: Scalars['String']['input'];\n};\n\n/** The mailbox a channel account is connected as. Read from the provider when the account connects; the address is lower-cased. */\nexport type EmailIdentity = {\n __typename?: 'EmailIdentity';\n /** Sender name the mailbox uses, as set at the provider. Null when none is set. */\n displayName?: Maybe<Scalars['String']['output']>;\n /** Address of the mailbox, lower-cased. */\n email: Scalars['String']['output'];\n /**\n * Whether the mailbox is a personal account (`gmail.com`, `outlook.com`,\n * `hotmail.com`…) rather than a Google Workspace or Microsoft 365 one. Personal\n * accounts may send far less mail per day. Null on a claim, until the mailbox has connected.\n */\n personal?: Maybe<Scalars['Boolean']['output']>;\n /**\n * Addresses the mailbox may send as, lower-cased, its own address included. Read\n * from Gmail's send-as settings; only the own address for Microsoft. Null on a\n * claim, until the mailbox has connected.\n */\n sendAs?: Maybe<Array<Scalars['String']['output']>>;\n /**\n * HTML signature of the mailbox's own address, as set in Gmail. Null for\n * Microsoft, whose API does not expose it, and when none is set.\n */\n signature?: Maybe<Scalars['String']['output']>;\n};\n\n/** The mailbox an account is for, named by the consumer before any connection confirms it. */\nexport type EmailIdentityInput = {\n /**\n * Address of the mailbox. Compared without regard to case or surrounding spaces;\n * the owner who signs in must own this address.\n */\n email: Scalars['String']['input'];\n};\n\n/**\n * Represents where a recipient unsubscribes, set as the `List-Unsubscribe` header.\n * A `url` also sets `List-Unsubscribe-Post: List-Unsubscribe=One-Click`, so the\n * URL must accept a one-click `POST`.\n */\nexport type EmailListUnsubscribeInput = {\n /** Gives an address that unsubscribes whoever writes to it. */\n mailto?: InputMaybe<Scalars['String']['input']>;\n /** Gives an HTTPS URL that unsubscribes on a `POST`. */\n url?: InputMaybe<Scalars['String']['input']>;\n};\n\n/** Represents one recipient of an email. */\nexport type EmailRecipientInput = {\n /** Gives the recipient's address. */\n email: Scalars['String']['input'];\n /** Gives the recipient's display name, shown beside the address. */\n name?: InputMaybe<Scalars['String']['input']>;\n};\n\n/**\n * Represents an email sent from the account's mailbox. It is sent as a reply in\n * the conversation of `replyToMessageId` when one is given, otherwise as a new conversation.\n */\nexport type EmailSendInput = {\n /** Lists the blind-copied recipients, hidden from the others. */\n bcc?: InputMaybe<Array<EmailRecipientInput>>;\n /** Lists the copied recipients. */\n cc?: InputMaybe<Array<EmailRecipientInput>>;\n /**\n * Gives the address to send as, the mailbox's own or one of its verified send-as\n * addresses. Defaults to the mailbox's own address.\n */\n from?: InputMaybe<Scalars['String']['input']>;\n /**\n * Gives the display name shown beside the sender's address. Defaults to the\n * mailbox's own display name when sending from the mailbox's own address and the\n * provider gives one (Google does not for a Workspace mailbox); an alias gets no default name.\n */\n fromName?: InputMaybe<Scalars['String']['input']>;\n /** Lists custom headers, `X-` only, which the gateway stores on the sent message and returns with the replies linked to it. */\n headers?: InputMaybe<Array<EmailHeaderInput>>;\n /** Gives the HTML body. At least one of `html` and `text` is required. */\n html?: InputMaybe<Scalars['String']['input']>;\n /** Sets the `List-Unsubscribe` header and, for an HTTPS URL, one-click unsubscribe. */\n listUnsubscribe?: InputMaybe<EmailListUnsubscribeInput>;\n /**\n * Gives the global id of the account's email message to answer, as returned in\n * an earlier send's `email_message_id`. Sets `In-Reply-To`, `References` and the\n * provider's conversation.\n */\n replyToMessageId?: InputMaybe<Scalars['ID']['input']>;\n /** Gives the subject line. */\n subject: Scalars['String']['input'];\n /** Gives the plain-text body. At least one of `html` and `text` is required. */\n text?: InputMaybe<Scalars['String']['input']>;\n /** Lists the recipients; at least one is required. */\n to: Array<EmailRecipientInput>;\n};\n\n/** Email verification status. */\nexport type EmailStatus =\n /** Domain accepts all emails (catch-all). */\n | 'CATCH_ALL'\n /** Email is invalid or undeliverable. */\n | 'INVALID'\n /** Verification status is unknown. */\n | 'UNKNOWN'\n /** Email is valid and deliverable. */\n | 'VALID';\n\n/** Filter on email status with schema-validated enum values. */\nexport type EmailStatusFilterInput = {\n /**\n * When true, a row also matches when the attribute is blank — NULL, an empty\n * string, an empty list, or no related record, depending on the column. The\n * connection edge reports which branch admitted each row via `filterMatches`.\n * Contrast `blank`, which narrows to blank-only rows where this one widens to include them.\n */\n allowBlank?: InputMaybe<Scalars['Boolean']['input']>;\n /** Exact match. */\n eq?: InputMaybe<EmailStatus>;\n /** Match any of these values. */\n in?: InputMaybe<Array<EmailStatus>>;\n /** Exclude exact match. */\n notEq?: InputMaybe<EmailStatus>;\n /** Exclude any of these values. */\n notIn?: InputMaybe<Array<EmailStatus>>;\n};\n\n/** A semantic-similarity filter, as submitted. */\nexport type EmbeddingFilter = {\n __typename?: 'EmbeddingFilter';\n /** Cosine distance constraints (0 = identical, 2 = opposite). Null when the filter was submitted with `match` instead. */\n distance?: Maybe<FloatFilter>;\n /** How the entry constrains a record. Null when the filter was submitted with the deprecated `distance` instead. */\n match?: Maybe<EmbeddingMatch>;\n /**\n * Texts that were embedded and compared against, combined under this entry's\n * constraint. Populated instead of `query` when the filter was submitted with a list.\n */\n queries?: Maybe<Array<Scalars['String']['output']>>;\n /** Text that was embedded and compared against. Null when the filter was submitted with `queries` instead. */\n query?: Maybe<Scalars['String']['output']>;\n};\n\n/** Filter by semantic similarity using vector embeddings. */\nexport type EmbeddingFilterInput = {\n /**\n * When true, a row also matches when the attribute is blank — NULL, an empty\n * string, an empty list, or no related record, depending on the column. The\n * connection edge reports which branch admitted each row via `filterMatches`.\n * Contrast `blank`, which narrows to blank-only rows where this one widens to include them.\n */\n allowBlank?: InputMaybe<Scalars['Boolean']['input']>;\n /**\n * Cosine distance constraints (0 = identical, 2 = opposite). `allowBlank`\n * belongs on the entry, not here — the distance operators are evaluated against\n * the embedding column.\n * @deprecated Supply `match` instead. A raw distance is only meaningful against the axis's calibrated threshold and the basis it is measured in, neither of which a caller can see.\n */\n distance?: InputMaybe<FloatFilterInput>;\n /**\n * How this entry constrains a record. `INCLUDED_*` keeps records within the\n * axis's calibrated cosine-distance threshold. `EXCLUDED_*` drops records within\n * the axis's exclusion threshold, calibrated separately and tighter, so only a\n * record that clearly is what the query names is dropped; on an axis with no\n * exclusion calibration it is the complement of the inclusion threshold.\n * `*_LOOSE` widens either threshold so near matches are admitted (or, on the\n * excluded side, dropped too).\n * The number itself is resolved per axis and in the vector basis that axis is\n * measured in, which is why it is no longer the caller's to supply.\n */\n match?: InputMaybe<EmbeddingMatch>;\n /**\n * Texts to embed and compare against, combined under this entry's single\n * `match`. Use this for \"any of these\" — the OR that `in` gives the scalar\n * filters. Each string is embedded separately, so several concepts keep their\n * own centroid and their own recall; packing them into one `query` instead\n * averages them into a single vector that can sit between the concepts and\n * match none of them well.\n * Direction decides how they combine: an `INCLUDED_*` match keeps records close\n * to **any** of the queries, while an `EXCLUDED_*` one keeps only records far\n * from **every** one of them.\n * Mutually exclusive with `query`; supply exactly one of the two. Maximum 50 queries.\n */\n queries?: InputMaybe<Array<Scalars['String']['input']>>;\n /** Text to embed and compare against. Mutually exclusive with `queries`; supply exactly one of the two. */\n query?: InputMaybe<Scalars['String']['input']>;\n};\n\n/**\n * How an embedding filter entry constrains a record: which side of the axis's\n * calibrated threshold to keep, and how wide that threshold is. The numeric bound\n * is resolved server-side per axis, in the vector basis that axis is measured in.\n */\nexport type EmbeddingMatch =\n /**\n * Drops records close to the query at the axis's widened exclusion threshold, so\n * near matches are dropped too. On an axis with no exclusion calibration it is\n * the complement of INCLUDED_LOOSE.\n */\n | 'EXCLUDED_LOOSE'\n /**\n * Drops records that clearly are what the query names, at the axis's calibrated\n * exclusion threshold. It is tighter than the inclusion one, so a record that\n * also names another role is kept. On an axis with no exclusion calibration it\n * is the complement of INCLUDED_STRICT.\n */\n | 'EXCLUDED_STRICT'\n /** Keeps records close to the query at a widened threshold, admitting near matches at the cost of precision. */\n | 'INCLUDED_LOOSE'\n /** Keeps records semantically close to the query, at the axis's calibrated threshold. */\n | 'INCLUDED_STRICT';\n\n/** Autogenerated input type of EnrichContact */\nexport type EnrichContactInput = {\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: InputMaybe<Scalars['String']['input']>;\n /** The contact's primary email address. */\n emailAddress?: InputMaybe<Scalars['String']['input']>;\n /**\n * Caller-supplied correlation id; when present, the merged contact is broadcast\n * over the contactEnrichmentResult subscription.\n */\n externalId?: InputMaybe<Scalars['ID']['input']>;\n /** The contact's first name. */\n firstName?: InputMaybe<Scalars['String']['input']>;\n /** When the raw data was originally ingested. */\n ingestedAt?: InputMaybe<Scalars['ISO8601DateTime']['input']>;\n /** Visitor IP address associated with this event. */\n ip?: InputMaybe<Scalars['String']['input']>;\n /** The contact's last name. */\n lastName?: InputMaybe<Scalars['String']['input']>;\n /** The contact's LinkedIn profile URL. */\n linkedinUrl?: InputMaybe<Scalars['String']['input']>;\n /**\n * The organization's primary web domain. When omitted, it is resolved from the\n * linkedin and organization hints below — a CoreSignal lookup and, failing that,\n * an LLM web search, which is the expensive part of this mutation.\n */\n organizationDomain?: InputMaybe<Scalars['String']['input']>;\n /**\n * The organization's LinkedIn URL. Used to resolve the organization domain via\n * CoreSignal when organization_domain is omitted.\n */\n organizationLinkedinUrl?: InputMaybe<Scalars['String']['input']>;\n /** The organization's name. Used to resolve the organization domain via web search when organization_domain is omitted. */\n organizationName?: InputMaybe<Scalars['String']['input']>;\n /** The full raw enrichment payload. */\n rawData: Scalars['JSON']['input'];\n /** The ID of the enrichment source. */\n sourceId: Scalars['ID']['input'];\n};\n\n/** Autogenerated return type of EnrichContact. */\nexport type EnrichContactPayload = {\n __typename?: 'EnrichContactPayload';\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: Maybe<Scalars['String']['output']>;\n /** One of: received. */\n status: Scalars['String']['output'];\n};\n\n/** Autogenerated input type of EnrichIdentification */\nexport type EnrichIdentificationInput = {\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: InputMaybe<Scalars['String']['input']>;\n /** When the raw data was originally ingested. */\n ingestedAt?: InputMaybe<Scalars['ISO8601DateTime']['input']>;\n /** The IPv4 or IPv6 address being identified. */\n ip: Scalars['String']['input'];\n /** The company domain identified for this IP. */\n organizationDomain?: InputMaybe<Scalars['String']['input']>;\n /** The raw enrichment payload, stored as-is. */\n rawData?: InputMaybe<Scalars['JSON']['input']>;\n /** The ID of the enrichment source. */\n sourceId: Scalars['ID']['input'];\n};\n\n/** Autogenerated return type of EnrichIdentification. */\nexport type EnrichIdentificationPayload = {\n __typename?: 'EnrichIdentificationPayload';\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: Maybe<Scalars['String']['output']>;\n /** One of: received. */\n status: Scalars['String']['output'];\n};\n\n/** Autogenerated input type of EnrichOrganization */\nexport type EnrichOrganizationInput = {\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: InputMaybe<Scalars['String']['input']>;\n /** The company's primary web domain. */\n domain: Scalars['String']['input'];\n /**\n * Correlation id echoed on the `organizationEnrichmentResult` subscription once\n * the merge (including embeddings) has settled. When omitted, no result is broadcast.\n */\n externalId?: InputMaybe<Scalars['ID']['input']>;\n /** When the raw data was originally ingested. */\n ingestedAt?: InputMaybe<Scalars['ISO8601DateTime']['input']>;\n /** Visitor IP associated with this event. */\n ip?: InputMaybe<Scalars['String']['input']>;\n /** The full raw enrichment payload. */\n rawData: Scalars['JSON']['input'];\n /** The ID of the enrichment source. */\n sourceId: Scalars['ID']['input'];\n};\n\n/** Autogenerated return type of EnrichOrganization. */\nexport type EnrichOrganizationPayload = {\n __typename?: 'EnrichOrganizationPayload';\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: Maybe<Scalars['String']['output']>;\n /** One of: received. */\n status: Scalars['String']['output'];\n};\n\n/** How one constrained filter admitted this row. */\nexport type FilterMatch = {\n __typename?: 'FilterMatch';\n /** Whether this filter was submitted with `allowBlank: true`. */\n allowBlank: Scalars['Boolean']['output'];\n /** Whether the row matched on the attribute's value or on its absence. */\n matchedOn: FilterMatchSource;\n /** Dotted path of the filter argument, e.g. \"contact.jobTitle\" or \"organization.industry\". */\n path: Scalars['String']['output'];\n};\n\n/** Which branch of a filter admitted a row. */\nexport type FilterMatchSource =\n /**\n * The attribute is absent on this row — NULL, an empty string, an empty list, or\n * no related record. Usually paired with `allowBlank: true`, but `blank: true`\n * targets absence on purpose and reports BLANK too.\n */\n | 'BLANK'\n /** The row carries a value on this attribute, so the filter's own predicate is what admitted it. */\n | 'VALUE';\n\n/** Autogenerated input type of FindContacts */\nexport type FindContactsInput = {\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: InputMaybe<Scalars['String']['input']>;\n /** Caller-supplied identifier keying the `contactFindProgress` subscription. */\n externalId: Scalars['ID']['input'];\n /** Filter criteria for the contacts. Ignored with `page.after`: the search keeps the filters it started with. */\n filter?: InputMaybe<ContactsFilterInput>;\n /** Filter criteria for the contacts' organizations. Ignored with `page.after`. */\n organizationFilter?: InputMaybe<OrganizationsFilterInput>;\n /** The page asked for: `first` contacts, after the `after` cursor. Defaults to the first 20 contacts of a new search. */\n page?: InputMaybe<FindPageInput>;\n /**\n * Reach dimensions to reveal for every contact on the page, recorded against the\n * company the token acts for. Defaults to none. An email address or phone number\n * Atlas has not checked is looked up, and the page stays FILLING until it is.\n */\n reveal?: InputMaybe<Array<RevealDimension>>;\n /** Sort order of the search. Ignored with `page.after`. */\n sort?: InputMaybe<Array<ContactSortInput>>;\n};\n\n/** Autogenerated return type of FindContacts. */\nexport type FindContactsPayload = {\n __typename?: 'FindContactsPayload';\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: Maybe<Scalars['String']['output']>;\n /** One of: received. */\n status: Scalars['String']['output'];\n};\n\n/** Autogenerated input type of FindOrganizations */\nexport type FindOrganizationsInput = {\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: InputMaybe<Scalars['String']['input']>;\n /** Caller-supplied identifier keying the `organizationFindProgress` subscription. */\n externalId: Scalars['ID']['input'];\n /** Filter criteria for the organizations. Ignored with `page.after`: the search keeps the filters it started with. */\n filter?: InputMaybe<OrganizationsFilterInput>;\n /**\n * The page asked for: `first` organizations, after the `after` cursor. Defaults\n * to the first 20 organizations of a new search.\n */\n page?: InputMaybe<FindPageInput>;\n /**\n * Reach dimensions to reveal for every organization on the page, recorded\n * against the company the token acts for. Defaults to none.\n */\n reveal?: InputMaybe<Array<RevealDimension>>;\n /** Sort order of the search. Ignored with `page.after`. */\n sort?: InputMaybe<Array<OrganizationSortInput>>;\n};\n\n/** Autogenerated return type of FindOrganizations. */\nexport type FindOrganizationsPayload = {\n __typename?: 'FindOrganizationsPayload';\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: Maybe<Scalars['String']['output']>;\n /** One of: received. */\n status: Scalars['String']['output'];\n};\n\n/**\n * The page of a search a find operation asks for. Leave `after` out to start a new\n * search; pass a cursor to read on in the search it came from.\n */\nexport type FindPageInput = {\n /**\n * A cursor from a page of an earlier call: reads the records listed after it, in\n * the search that cursor belongs to, with the filters that search started with.\n * A cursor that is not one is refused with `details.after` invalid, and one of a\n * search that expired or another caller started with `details.after` expired.\n */\n after?: InputMaybe<Scalars['String']['input']>;\n /** Number of records on the page, from 1 to 20. Defaults to 20. */\n first?: InputMaybe<Scalars['Int']['input']>;\n};\n\n/** Where a page of a find operation stands. */\nexport type FindPageStatus =\n /** The last version of the page: nothing more will change on it. */\n | 'COMPLETE'\n /** Atlas is still filling the page and will send it again. */\n | 'FILLING';\n\n/** A numeric comparison filter, as submitted. */\nexport type FloatFilter = {\n __typename?: 'FloatFilter';\n /** Exact match. */\n eq?: Maybe<Scalars['Float']['output']>;\n /** Greater than. */\n gt?: Maybe<Scalars['Float']['output']>;\n /** Greater than or equal. */\n gteq?: Maybe<Scalars['Float']['output']>;\n /** Less than. */\n lt?: Maybe<Scalars['Float']['output']>;\n /** Less than or equal. */\n lteq?: Maybe<Scalars['Float']['output']>;\n};\n\n/** Filter on a numeric column with comparison operators. */\nexport type FloatFilterInput = {\n /**\n * When true, a row also matches when the attribute is blank — NULL, an empty\n * string, an empty list, or no related record, depending on the column. The\n * connection edge reports which branch admitted each row via `filterMatches`.\n * Contrast `blank`, which narrows to blank-only rows where this one widens to include them.\n */\n allowBlank?: InputMaybe<Scalars['Boolean']['input']>;\n /** Exact match. */\n eq?: InputMaybe<Scalars['Float']['input']>;\n /** Greater than. */\n gt?: InputMaybe<Scalars['Float']['input']>;\n /** Greater than or equal. */\n gteq?: InputMaybe<Scalars['Float']['input']>;\n /** Less than. */\n lt?: InputMaybe<Scalars['Float']['input']>;\n /** Less than or equal. */\n lteq?: InputMaybe<Scalars['Float']['input']>;\n};\n\n/** Autogenerated input type of GrantPromotionalCredits */\nexport type GrantPromotionalCreditsInput = {\n /** Number of credits to grant. Must be greater than 0. */\n amount: Scalars['Float']['input'];\n /** Global id of the billing customer to credit. */\n billingCustomerId: Scalars['ID']['input'];\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: InputMaybe<Scalars['String']['input']>;\n /** When the unconsumed part of the grant expires. Must be in the future. */\n expiresAt: Scalars['ISO8601DateTime']['input'];\n /** Caller-chosen key, unique per customer, that makes a retry safe. */\n idempotencyKey: Scalars['String']['input'];\n /** Why the credits are granted, stored on the credit for the history. */\n reason: Scalars['String']['input'];\n};\n\n/** Autogenerated return type of GrantPromotionalCredits. */\nexport type GrantPromotionalCreditsPayload = Node & {\n __typename?: 'GrantPromotionalCreditsPayload';\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: Maybe<Scalars['String']['output']>;\n /** The granted credit, or the one an earlier call with the same key granted. */\n credit: BillingCredit;\n id: Scalars['ID']['output'];\n};\n\n/** Filter on an encoded global ID field with positive and negative matching. */\nexport type IdFilterInput = {\n /**\n * When true, a row also matches when the attribute is blank — NULL, an empty\n * string, an empty list, or no related record, depending on the column. The\n * connection edge reports which branch admitted each row via `filterMatches`.\n * Contrast `blank`, which narrows to blank-only rows where this one widens to include them.\n */\n allowBlank?: InputMaybe<Scalars['Boolean']['input']>;\n /** Exact match. */\n eq?: InputMaybe<Scalars['ID']['input']>;\n /** Match any of these values. Maximum 10000 entries. */\n in?: InputMaybe<Array<Scalars['ID']['input']>>;\n /** Exclude exact match. */\n notEq?: InputMaybe<Scalars['ID']['input']>;\n /** Exclude any of these values. Maximum 10000 entries. */\n notIn?: InputMaybe<Array<Scalars['ID']['input']>>;\n};\n\n/** An IP-to-company identification record. */\nexport type Identification = Node & {\n __typename?: 'Identification';\n /** Confidence score between 0.0 and 1.0. */\n confidenceScore?: Maybe<Scalars['Float']['output']>;\n /** When the identification was created. */\n createdAt?: Maybe<Scalars['ISO8601DateTime']['output']>;\n id: Scalars['ID']['output'];\n /** The identified IP address. */\n ipAddress: Scalars['String']['output'];\n /** Best matching industry name from provided candidates. */\n matchedIndustry?: Maybe<Scalars['String']['output']>;\n /** The identified organization. */\n organization?: Maybe<Organization>;\n /** When the identification was last updated. */\n updatedAt?: Maybe<Scalars['ISO8601DateTime']['output']>;\n};\n\n/** The connection type for Identification. */\nexport type IdentificationConnection = {\n __typename?: 'IdentificationConnection';\n /**\n * Estimated total number of items across all pages. It comes from the query\n * planner rather than a count, so it costs planning time instead of a scan and\n * cannot exceed the statement timeout. It is approximate at every magnitude,\n * including small ones, and it moves when the table's statistics are refreshed.\n * Accuracy depends on the filter: within a few percent on plain column and\n * array-overlap filters, and as much as 30% out on a range filter such as\n * `companySize`. It is not meaningful for the embedding filters `jobTitle` and\n * `industry` — no statistics exist for a vector-distance predicate, so the\n * estimate ignores the distance threshold entirely and approximates only what\n * the other filters admit; it has been measured reporting 241371 for a filter\n * whose true result was empty. Never render it as an exact figure, and use\n * `totalCount` when the figure has to be exact.\n */\n approximateTotalCount: Scalars['Int']['output'];\n /** A list of edges. */\n edges?: Maybe<Array<Maybe<IdentificationEdge>>>;\n /** A list of nodes. */\n nodes?: Maybe<Array<Maybe<Identification>>>;\n /** Information to aid in pagination. */\n pageInfo: PageInfo;\n /** Total number of items across all pages, exact unless `upTo` is given. */\n totalCount: Scalars['Int']['output'];\n};\n\n\n/** The connection type for Identification. */\nexport type IdentificationConnectionTotalCountArgs = {\n upTo?: InputMaybe<Scalars['Int']['input']>;\n};\n\n/** An edge in a connection. */\nexport type IdentificationEdge = Node & {\n __typename?: 'IdentificationEdge';\n /** A cursor for use in pagination. */\n cursor: Scalars['String']['output'];\n id: Scalars['ID']['output'];\n /** The item at the end of the edge. */\n node?: Maybe<Identification>;\n};\n\n/** Filter criteria for identifications. */\nexport type IdentificationFilterInput = {\n /** Filter by confidence score (0.0–1.0). */\n confidenceScore?: InputMaybe<FloatFilterInput>;\n /** Return only matched identifications. */\n valid?: InputMaybe<Scalars['Boolean']['input']>;\n};\n\n/** Autogenerated input type of IdentifyOrganizationByIp */\nexport type IdentifyOrganizationByIpInput = {\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: InputMaybe<Scalars['String']['input']>;\n /**\n * Visitor's ISO 3166-1 alpha-2 country code, which sharpens the match and\n * narrows the decision-makers Atlas looks for to that country.\n */\n countryCode?: InputMaybe<Scalars['String']['input']>;\n /** Caller-supplied identifier keying the `organizationIdentifyResult` subscription. */\n externalId: Scalars['ID']['input'];\n /** The visitor's IPv4 or IPv6 address. */\n ip: Scalars['String']['input'];\n /** Reach dimensions to reveal on the organization, recorded against the company the token acts for. Defaults to none. */\n reveal?: InputMaybe<Array<RevealDimension>>;\n /** Optional URL that also receives the result by webhook. Requires the `atlas/source:write` scope. */\n webhookUrl?: InputMaybe<Scalars['String']['input']>;\n};\n\n/** Autogenerated return type of IdentifyOrganizationByIp. */\nexport type IdentifyOrganizationByIpPayload = {\n __typename?: 'IdentifyOrganizationByIpPayload';\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: Maybe<Scalars['String']['output']>;\n /** One of: received. */\n status: Scalars['String']['output'];\n};\n\n/** Autogenerated input type of ImportLinkedinHistory */\nexport type ImportLinkedinHistoryInput = {\n /** Global id of the account. Must be `RUNNING`. */\n channelAccountId: Scalars['ID']['input'];\n /** Conversations to import. */\n chats?: InputMaybe<Array<LinkedinChatReferenceInput>>;\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: InputMaybe<Scalars['String']['input']>;\n /** Connection requests to import. */\n invitations?: InputMaybe<Array<LinkedinInvitationReferenceInput>>;\n};\n\n/** Autogenerated return type of ImportLinkedinHistory. */\nexport type ImportLinkedinHistoryPayload = Node & {\n __typename?: 'ImportLinkedinHistoryPayload';\n /** The account the import runs on. */\n channelAccount: OutboundChannelAccount;\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: Maybe<Scalars['String']['output']>;\n id: Scalars['ID']['output'];\n};\n\n/** Returned once, at creation. The secret is never retrievable again. */\nexport type IssuedCredential = {\n __typename?: 'IssuedCredential';\n /** Public half of the credential. Paired with clientSecret below. */\n clientId: Scalars['String']['output'];\n /** Store it now; only its digest is kept, so it cannot be shown again. */\n clientSecret: Scalars['String']['output'];\n /** The stored credential the secret belongs to. */\n credential: ApplicationCredential;\n};\n\n/** Returned once, at creation. The code is never retrievable again. */\nexport type IssuedInvitation = {\n __typename?: 'IssuedInvitation';\n /**\n * Give this to the invitee; they run `acceptCompanyInvitation`. Only its digest\n * is kept, so it cannot be shown again — and whoever holds it can join.\n */\n code: Scalars['String']['output'];\n /** When the code stops being redeemable. */\n expiresAt: Scalars['ISO8601DateTime']['output'];\n /** The stored invitation the code belongs to. */\n invitation: CompanyInvitation;\n};\n\n/** A file to attach to a LinkedIn message. The combined size of a message's attachments may not exceed 20 MB, LinkedIn's limit. */\nexport type LinkedinAttachmentInput = {\n /** The file's bytes, base64-encoded. */\n content: Scalars['String']['input'];\n /** MIME type, e.g. `application/pdf`. */\n contentType: Scalars['String']['input'];\n /** File name shown to the recipient. */\n filename: Scalars['String']['input'];\n};\n\n/** Withdraws a connection request the account sent. */\nexport type LinkedinCancelInvitationInput = {\n /** LinkedIn's id of the request, as `channel_action.completed` returned it for the `LINKEDIN_INVITE` action. */\n invitationId: Scalars['String']['input'];\n};\n\n/** A one-to-one LinkedIn conversation Outreach started, or that followed an invitation it sent. */\nexport type LinkedinChat = Node & {\n __typename?: 'LinkedinChat';\n /** LinkedIn's id of the chat. */\n chatId: Scalars['String']['output'];\n /** When recorded. */\n createdAt: Scalars['ISO8601DateTime']['output'];\n id: Scalars['ID']['output'];\n /** The connection request this conversation followed, when there was one. */\n invitation?: Maybe<LinkedinInvitation>;\n /** When the most recent message was sent. */\n lastMessageAt?: Maybe<Scalars['ISO8601DateTime']['output']>;\n /** The other participant, as far as the provider told us. */\n member?: Maybe<LinkedinMember>;\n /** The other participant's member id. */\n memberId: Scalars['String']['output'];\n};\n\n/** The connection type for LinkedinChat. */\nexport type LinkedinChatConnection = {\n __typename?: 'LinkedinChatConnection';\n /** A list of edges. */\n edges?: Maybe<Array<Maybe<LinkedinChatEdge>>>;\n /** A list of nodes. */\n nodes?: Maybe<Array<Maybe<LinkedinChat>>>;\n /** Information to aid in pagination. */\n pageInfo: PageInfo;\n /** Total number of items across all pages. */\n totalCount: Scalars['Int']['output'];\n};\n\n/** An edge in a connection. */\nexport type LinkedinChatEdge = {\n __typename?: 'LinkedinChatEdge';\n /** A cursor for use in pagination. */\n cursor: Scalars['String']['output'];\n /** The item at the end of the edge. */\n node?: Maybe<LinkedinChat>;\n};\n\n/** A conversation the consumer already holds, to import. */\nexport type LinkedinChatReferenceInput = {\n /** LinkedIn's id of the chat. */\n chatId: Scalars['String']['input'];\n /** The other participant's member id (`ACoAA…`). */\n memberId: Scalars['String']['input'];\n /** The messages the consumer holds for it. */\n messages: Array<LinkedinMessageReferenceInput>;\n};\n\n/**\n * The LinkedIn session the account owner is signed in with, as their browser holds\n * it. Either the raw `cookie` header or the `liAt` and `jsessionid` pair.\n */\nexport type LinkedinCookieCredentialsInput = {\n /**\n * The browser's `Cookie` header value for linkedin.com, carrying at least\n * `li_at` and `JSESSIONID`. Write-only, stored encrypted.\n */\n cookie?: InputMaybe<Scalars['String']['input']>;\n /**\n * ISO 3166-1 alpha-2 country the owner uses LinkedIn from, so the gateway exits\n * from that country. Left out, the country on the member's LinkedIn profile is\n * used. A country the gateway cannot exit from falls back to the nearest one it\n * serves, so a sign-in is never refused over its country.\n */\n countryCode?: InputMaybe<Scalars['String']['input']>;\n /** The `JSESSIONID` cookie, LinkedIn's CSRF token. Used with `liAt` when `cookie` is not given. */\n jsessionid?: InputMaybe<Scalars['String']['input']>;\n /** The `li_at` cookie, LinkedIn's session token. Used with `jsessionid` when `cookie` is not given. */\n liAt?: InputMaybe<Scalars['String']['input']>;\n /**\n * The browser's User-Agent, so the gateway looks like the device the session was\n * opened on. Left out, a common desktop browser is used.\n */\n userAgent?: InputMaybe<Scalars['String']['input']>;\n};\n\n/**\n * The LinkedIn member a channel account is connected as. Read from the provider\n * when the account connects; the member id is the identifier LinkedIn keeps stable.\n */\nexport type LinkedinIdentity = {\n __typename?: 'LinkedinIdentity';\n /** Name as displayed on LinkedIn. */\n displayName?: Maybe<Scalars['String']['output']>;\n /** First name. */\n firstName?: Maybe<Scalars['String']['output']>;\n /** Last name. */\n lastName?: Maybe<Scalars['String']['output']>;\n /** LinkedIn member id (`ACoAA…`), the stable identifier of the person across providers. */\n memberId: Scalars['String']['output'];\n /**\n * Whether the member holds a LinkedIn Premium subscription, as read from the\n * provider when the account connected. Premium accounts are not subject to the\n * monthly cap on invitation notes and get higher invitation quotas. Null when\n * the provider did not say.\n */\n premium?: Maybe<Scalars['Boolean']['output']>;\n /** Public profile URL. */\n profileUrl?: Maybe<Scalars['String']['output']>;\n /** Public identifier, the last segment of the profile URL. */\n publicIdentifier?: Maybe<Scalars['String']['output']>;\n};\n\n/** The LinkedIn member an account is for, named by the consumer before any connection confirms it. */\nexport type LinkedinIdentityInput = {\n /** LinkedIn member id (`ACoAA…`), the identifier LinkedIn keeps stable for a person across providers. */\n memberId: Scalars['String']['input'];\n};\n\n/** A connection request sent through Outreach, followed until it settles. */\nexport type LinkedinInvitation = Node & {\n __typename?: 'LinkedinInvitation';\n /** When the member accepted, as far as Outreach saw it. */\n acceptedAt?: Maybe<Scalars['ISO8601DateTime']['output']>;\n /** The action that sent it. */\n channelAction?: Maybe<OutboundChannelAction>;\n /** The conversation LinkedIn opened once the member accepted. */\n chat?: Maybe<LinkedinChat>;\n /** When recorded. */\n createdAt: Scalars['ISO8601DateTime']['output'];\n id: Scalars['ID']['output'];\n /** LinkedIn's id of the request. */\n invitationId: Scalars['String']['output'];\n /** The invited member (`ACoAA…`). */\n memberId: Scalars['String']['output'];\n /** The note sent with it. */\n note?: Maybe<Scalars['String']['output']>;\n /** When it was sent. */\n sentAt: Scalars['ISO8601DateTime']['output'];\n /** Where it stands. */\n state: LinkedinInvitationState;\n /** When Outreach withdrew it. */\n withdrawnAt?: Maybe<Scalars['ISO8601DateTime']['output']>;\n};\n\n/** The connection type for LinkedinInvitation. */\nexport type LinkedinInvitationConnection = {\n __typename?: 'LinkedinInvitationConnection';\n /** A list of edges. */\n edges?: Maybe<Array<Maybe<LinkedinInvitationEdge>>>;\n /** A list of nodes. */\n nodes?: Maybe<Array<Maybe<LinkedinInvitation>>>;\n /** Information to aid in pagination. */\n pageInfo: PageInfo;\n /** Total number of items across all pages. */\n totalCount: Scalars['Int']['output'];\n};\n\n/** An edge in a connection. */\nexport type LinkedinInvitationEdge = {\n __typename?: 'LinkedinInvitationEdge';\n /** A cursor for use in pagination. */\n cursor: Scalars['String']['output'];\n /** The item at the end of the edge. */\n node?: Maybe<LinkedinInvitation>;\n};\n\n/** Narrows `linkedinInvitations`. */\nexport type LinkedinInvitationFilterInput = {\n /** Keep only the invitations in these states. */\n state?: InputMaybe<LinkedinInvitationStateFilterInput>;\n};\n\n/** A connection request the consumer already holds, to import. */\nexport type LinkedinInvitationReferenceInput = {\n /** LinkedIn's id of the request. */\n invitationId: Scalars['String']['input'];\n /** The invited member's id (`ACoAA…`). */\n memberId: Scalars['String']['input'];\n /** The note it carried, if known. */\n note?: InputMaybe<Scalars['String']['input']>;\n /** When it was sent, if known. */\n sentAt?: InputMaybe<Scalars['ISO8601DateTime']['input']>;\n /** Where it stands, as far as the consumer knows. */\n state: LinkedinInvitationState;\n};\n\n/** Where a connection request stands. One of: pending, accepted, withdrawn, gone. */\nexport type LinkedinInvitationState =\n /** The member accepted; a chat followed. */\n | 'ACCEPTED'\n /** No longer pending at LinkedIn, for a reason it does not tell (declined, expired). */\n | 'GONE'\n /** Sent, not answered yet. */\n | 'PENDING'\n /** Withdrawn through `linkedinCancelInvitation`. */\n | 'WITHDRAWN';\n\n/** Filter on invitation state (eq/in/notEq/notIn). */\nexport type LinkedinInvitationStateFilterInput = {\n /** Exact match. */\n eq?: InputMaybe<LinkedinInvitationState>;\n /** Match any of these values. */\n in?: InputMaybe<Array<LinkedinInvitationState>>;\n /** Exclude exact match. */\n notEq?: InputMaybe<LinkedinInvitationState>;\n /** Exclude any of these values. */\n notIn?: InputMaybe<Array<LinkedinInvitationState>>;\n};\n\n/**\n * A LinkedIn connection request to one member. Fails at the provider when the\n * member is already a connection or a request is already pending.\n */\nexport type LinkedinInviteInput = {\n /** LinkedIn member id of the recipient (`ACoAA…`). */\n memberId: Scalars['String']['input'];\n /**\n * Note sent with the request. LinkedIn caps notes at 300 characters and, on free\n * accounts, at a handful of noted requests a month.\n */\n message?: InputMaybe<Scalars['String']['input']>;\n};\n\n/**\n * Reads a member's profile as the account: identity, headline, location, network\n * distance, pending connection request, InMail reachability. Reading does not\n * notify the member; `linkedinVisit` does.\n */\nexport type LinkedinLookupProfileInput = {\n /** Member id (`ACoAA…`) or public identifier (the profile URL's last segment). */\n identifier: Scalars['String']['input'];\n /** Bypass the hour-long cache and read LinkedIn now, against the account's rate limits. */\n noCache?: InputMaybe<Scalars['Boolean']['input']>;\n};\n\n/** A LinkedIn member, as far as the provider has told us about them. */\nexport type LinkedinMember = {\n __typename?: 'LinkedinMember';\n /** Name as displayed on LinkedIn. */\n displayName?: Maybe<Scalars['String']['output']>;\n /** First name. */\n firstName?: Maybe<Scalars['String']['output']>;\n /** Last name. */\n lastName?: Maybe<Scalars['String']['output']>;\n /** LinkedIn member id (`ACoAA…`). */\n memberId?: Maybe<Scalars['String']['output']>;\n /** Public profile URL. */\n profileUrl?: Maybe<Scalars['String']['output']>;\n /** Public identifier. */\n publicIdentifier?: Maybe<Scalars['String']['output']>;\n};\n\n/** A message in a conversation Outreach follows, the shape `message.received` delivers. */\nexport type LinkedinMessage = Node & {\n __typename?: 'LinkedinMessage';\n /** `[{ type, mimetype, filename, file_size, url, url_expires_at }]`. */\n attachments: Scalars['JSON']['output'];\n /** The action that sent it, when Outreach did. */\n channelAction?: Maybe<OutboundChannelAction>;\n /** The conversation. */\n chat: LinkedinChat;\n id: Scalars['ID']['output'];\n /** LinkedIn's id of the message. */\n messageId: Scalars['String']['output'];\n /** True when the account sent it. */\n own: Scalars['Boolean']['output'];\n /** Who sent it. */\n sender?: Maybe<LinkedinMember>;\n /** When it was sent. */\n sentAt: Scalars['ISO8601DateTime']['output'];\n /** The message. */\n text?: Maybe<Scalars['String']['output']>;\n};\n\n/** The connection type for LinkedinMessage. */\nexport type LinkedinMessageConnection = {\n __typename?: 'LinkedinMessageConnection';\n /** A list of edges. */\n edges?: Maybe<Array<Maybe<LinkedinMessageEdge>>>;\n /** A list of nodes. */\n nodes?: Maybe<Array<Maybe<LinkedinMessage>>>;\n /** Information to aid in pagination. */\n pageInfo: PageInfo;\n /** Total number of items across all pages. */\n totalCount: Scalars['Int']['output'];\n};\n\n/** An edge in a connection. */\nexport type LinkedinMessageEdge = {\n __typename?: 'LinkedinMessageEdge';\n /** A cursor for use in pagination. */\n cursor: Scalars['String']['output'];\n /** The item at the end of the edge. */\n node?: Maybe<LinkedinMessage>;\n};\n\n/** A message of a conversation the consumer already holds, to import. */\nexport type LinkedinMessageReferenceInput = {\n /** LinkedIn's id of the message. */\n messageId: Scalars['String']['input'];\n /** Whether the account's owner wrote it. */\n own: Scalars['Boolean']['input'];\n /** When it was sent. */\n sentAt: Scalars['ISO8601DateTime']['input'];\n /** Its text, if any. */\n text?: InputMaybe<Scalars['String']['input']>;\n};\n\n/**\n * A LinkedIn message to one member. Sent in the existing conversation with that\n * member when there is one, otherwise a new one is started.\n */\nexport type LinkedinSendMessageInput = {\n /** Files to attach, 20 MB in all at most. */\n attachments?: InputMaybe<Array<LinkedinAttachmentInput>>;\n /** LinkedIn member id of the recipient (`ACoAA…`). */\n memberId: Scalars['String']['input'];\n /** The message. */\n text: Scalars['String']['input'];\n};\n\n/**\n * A LinkedIn profile visit: the profile is read as the account, and the member is\n * notified of the visit when their settings allow it.\n */\nexport type LinkedinVisitInput = {\n /** LinkedIn member id of the profile (`ACoAA…`). */\n memberId: Scalars['String']['input'];\n};\n\n/**\n * A record placed in Mercator's geography. Mercator resolves `locations` for every\n * type implementing it, from the record's `locationIds`.\n */\nexport type Located = {\n /** Global id of the record. */\n id: Scalars['ID']['output'];\n /** Mercator Location ids of the record's divisions, as stored. Read by the router to resolve `locations` from Mercator. */\n locationIds: Array<Scalars['ID']['output']>;\n /**\n * Mercator divisions of the record, in the order its subgraph stores them: the\n * resolved place first, then its ancestors. Empty until the record's location\n * has been resolved.\n */\n locations: LocationConnection;\n};\n\n\n/**\n * A record placed in Mercator's geography. Mercator resolves `locations` for every\n * type implementing it, from the record's `locationIds`.\n */\nexport type LocatedLocationsArgs = {\n after?: InputMaybe<Scalars['String']['input']>;\n before?: InputMaybe<Scalars['String']['input']>;\n first?: InputMaybe<Scalars['Int']['input']>;\n last?: InputMaybe<Scalars['Int']['input']>;\n subtype?: InputMaybe<LocationSubtypeFilterInput>;\n};\n\n/** Federation reference to a Location owned by another subgraph. */\nexport type Location = Node & {\n __typename?: 'Location';\n /** Numeric hierarchy depth. 0 = country, higher = more granular. */\n adminLevel: Scalars['Int']['output'];\n /**\n * National administrative codes for this division, own codes first, then codes\n * inherited from enclosing divisions — so a locality reports its département's\n * and region's INSEE codes without the caller walking the hierarchy. Each entry\n * names the division it came from via locationId. Empty for divisions in\n * countries without a mapped scheme.\n */\n administrativeCodes: Array<AdministrativeCode>;\n /**\n * Every enclosing division, ordered root-first (highest ancestor first,\n * immediate parent last) so the connection reads as a breadcrumb path. Excludes\n * this location, so a root division returns an empty connection — and so does a\n * freshly imported division whose ancestry is not yet resolved. The two are\n * deliberately indistinguishable here: both mean \"no ancestors to walk\".\n */\n ancestors: LocationConnection;\n /** Center point of the division boundary as a GeoJSON Point. */\n centroid?: Maybe<Coordinate>;\n /** Child divisions in the hierarchy. */\n children: LocationConnection;\n /** ISO 3166-1 alpha-2 country code of the division. */\n countryCode?: Maybe<Scalars['String']['output']>;\n /** GlobalID-encoded Location id. */\n id: Scalars['ID']['output'];\n /**\n * ISO 3166-2 code of the principal subdivision this division belongs to, e.g.\n * \"FR-IDF\", \"BE-WAL\" — the division's own code only on REGION rows; every deeper\n * division carries its enclosing region's. As shipped by Overture; null when the\n * source has none.\n */\n iso31662?: Maybe<Scalars['String']['output']>;\n /**\n * Name in the requested language, e.g. \"Luxembourg\" for EN where name is\n * \"Lëtzebuerg\". Falls back to the English name, and then to name, for the\n * divisions the source publishes neither for — so it is always a usable name\n * rather than sometimes null.\n */\n localizedName: Scalars['String']['output'];\n /**\n * Primary name of the division as Overture publishes it, which is the local\n * endonym for a multilingual country — \"Lëtzebuerg\",\n * \"Schweiz/Suisse/Svizzera/Svizra\". Read localizedName when the name has to be\n * understood, matched or displayed in one language.\n */\n name: Scalars['String']['output'];\n /** Parent administrative division in the hierarchy. */\n parent?: Maybe<Location>;\n /**\n * Name with its administrative wrapper removed — \"Edinburgh\" where name is \"City\n * of Edinburgh\", \"Copenhagen\" where name is \"Københavns Kommune\". Read this\n * instead of name when the value is stored or shown as a city: Overture files\n * many cities under their council's name, and persisting that records a city\n * nobody calls it. Identical to name for divisions whose name carries no\n * wrapper, so a caller already storing name keeps the same value for them.\n */\n shortName: Scalars['String']['output'];\n /** Administrative subdivision level. */\n subtype: LocationSubtype;\n /**\n * True when Overture publishes this division as a point only and Mercator\n * approximates its boundary: a circle sized by population, clipped to the\n * nearest enclosing division at least as large. Containment answers for such a\n * division are approximate, so containingDivisions lists it after the real\n * boundaries of its level.\n */\n syntheticGeometry: Scalars['Boolean']['output'];\n};\n\n\n/** Federation reference to a Location owned by another subgraph. */\nexport type LocationAncestorsArgs = {\n after?: InputMaybe<Scalars['String']['input']>;\n before?: InputMaybe<Scalars['String']['input']>;\n first?: InputMaybe<Scalars['Int']['input']>;\n last?: InputMaybe<Scalars['Int']['input']>;\n};\n\n\n/** Federation reference to a Location owned by another subgraph. */\nexport type LocationChildrenArgs = {\n after?: InputMaybe<Scalars['String']['input']>;\n before?: InputMaybe<Scalars['String']['input']>;\n country?: InputMaybe<Scalars['String']['input']>;\n deep?: InputMaybe<Scalars['Boolean']['input']>;\n first?: InputMaybe<Scalars['Int']['input']>;\n last?: InputMaybe<Scalars['Int']['input']>;\n sort?: InputMaybe<Array<LocationSortInput>>;\n subtype?: InputMaybe<LocationSubtypeFilterInput>;\n};\n\n\n/** Federation reference to a Location owned by another subgraph. */\nexport type LocationLocalizedNameArgs = {\n language: LocationLanguage;\n};\n\n\n/** Federation reference to a Location owned by another subgraph. */\nexport type LocationShortNameArgs = {\n language?: InputMaybe<LocationLanguage>;\n};\n\n/** The identifier scheme a code passed to `resolveByCode` is expressed in. */\nexport type LocationCode =\n /** ISO 3166-1 alpha-2 country code (e.g. \"BE\", \"US\"). */\n | 'COUNTRY_ISO';\n\n/** The connection type for Location. */\nexport type LocationConnection = {\n __typename?: 'LocationConnection';\n /** A list of edges. */\n edges?: Maybe<Array<Maybe<LocationEdge>>>;\n /** A list of nodes. */\n nodes?: Maybe<Array<Maybe<Location>>>;\n /** Information to aid in pagination. */\n pageInfo: PageInfo;\n /** Total number of items across all pages. */\n totalCount: Scalars['Int']['output'];\n};\n\n/** An edge in a connection. */\nexport type LocationEdge = {\n __typename?: 'LocationEdge';\n /** A cursor for use in pagination. */\n cursor: Scalars['String']['output'];\n /** The item at the end of the edge. */\n node?: Maybe<Location>;\n};\n\n/**\n * Language a division's name can be rendered in — the locales Sortlist serves, and\n * the only ones every tier is guaranteed to carry a name for.\n */\nexport type LocationLanguage =\n /** German name of the division. */\n | 'DE'\n /** English name of the division. */\n | 'EN'\n /** Spanish name of the division. */\n | 'ES'\n /** French name of the division. */\n | 'FR'\n /** Italian name of the division. */\n | 'IT'\n /** Dutch name of the division. */\n | 'NL';\n\n/** Fields available for sorting locations. */\nexport type LocationSortField =\n /**\n * Resident population as shipped by Overture. Null on small or minor divisions,\n * which sort after every populated one regardless of direction.\n */\n | 'POPULATION';\n\n/** Sort configuration for locations. */\nexport type LocationSortInput = {\n /** Direction to sort in. Defaults to descending. */\n direction?: InputMaybe<SortDirection>;\n /** Field to sort by. */\n field: LocationSortField;\n};\n\n/** Administrative subdivision level of a geographic location. */\nexport type LocationSubtype =\n /** Borough or city district between the locality and neighborhood levels. */\n | 'BOROUGH'\n /** Sovereign nation (admin_level 0). */\n | 'COUNTRY'\n /** County, department, or second-level subdivision (admin_level 3-4). */\n | 'COUNTY'\n /** Dependent or overseas territory of a country. */\n | 'DEPENDENCY'\n /** Local administrative unit such as a commune or municipality, between the county and locality levels. */\n | 'LOCALADMIN'\n /** City, town, or municipality (admin_level 5-8). */\n | 'LOCALITY'\n /**\n * Continent or business macro-region grouping whole countries, above the country\n * level. Its member countries are exposed through `children`, not through\n * `parent` on the country: a country belongs to several macro-countries at once.\n */\n | 'MACROCOUNTRY'\n /** Grouping of counties between the region and county levels. */\n | 'MACROCOUNTY'\n /** Large area grouping multiple neighborhoods within a locality. */\n | 'MACROHOOD'\n /** Grouping of regions between the country and region levels. */\n | 'MACROREGION'\n /** Neighborhood, district, or sub-municipal area (admin_level 9+). */\n | 'NEIGHBORHOOD'\n /** State, province, or first-level subdivision (admin_level 1-2). */\n | 'REGION';\n\n/** Filter on location subtype with schema-validated enum values. */\nexport type LocationSubtypeFilterInput = {\n /** Exact match. */\n eq?: InputMaybe<LocationSubtype>;\n /** Match any of these subdivision levels. */\n in?: InputMaybe<Array<LocationSubtype>>;\n /** Exclude exact match. */\n notEq?: InputMaybe<LocationSubtype>;\n /** Exclude any of these values. */\n notIn?: InputMaybe<Array<LocationSubtype>>;\n};\n\n/** Root mutation type. Each subgraph contributes its own fields to it. */\nexport type Mutation = {\n __typename?: 'Mutation';\n /** Joins the authenticated caller. The only management mutation a non-member may call. */\n acceptCompanyInvitation?: Maybe<Company>;\n /**\n * Starts one authentication attempt on a channel account, in the shape its\n * provider requires: a hosted sign-in page the owner is sent to (`returnUrl`),\n * or credentials the consumer collected and passes along (`credentials`). Works\n * on a draft account and on a connected or disconnected one alike:\n * re-authenticating is the same call. The account stays in its current status\n * until the identity is read; the outcome arrives as a\n * `channel_account.connected` event.\n */\n authenticateOutboundChannelAccount?: Maybe<AuthenticateOutboundChannelAccountPayload>;\n /**\n * Cancels all of a billing customer's active subscriptions immediately. Used\n * when the owning company is destroyed. Idempotent.\n */\n cancelBillingCustomerSubscriptions?: Maybe<CancelBillingCustomerSubscriptionsPayload>;\n /**\n * Cancels the subscription's pending scheduled plan change (see\n * BillingSubscription.pendingChange) before it applies at the next bill date.\n * Free of charge — the subscription keeps its current plan. Errors when no\n * change is pending.\n */\n cancelBillingSubscriptionChange?: Maybe<CancelBillingSubscriptionChangePayload>;\n /**\n * Ends the subscription immediately, forfeiting the rest of the paid period.\n * Billing offers no cancel-at-period-end, so this exists for a subscription on a\n * withdrawn plan, which cannot be changed instead.\n */\n cancelCompanySubscription?: Maybe<Company>;\n /**\n * Stops actions of the caller's that have not run yet, so an account no longer\n * acts on a prospect the consumer has dropped. Each id is answered on its own:\n * an action still `PENDING` becomes `CANCELLED` and never reaches the provider,\n * one already being performed cannot be stopped, and one that has settled or is\n * not on this account is reported as such. Calling again on an action already\n * cancelled succeeds. A cancelled action releases the day's quota it had booked,\n * though not its place in the account's pace, and reaches an open\n * `outboundChannelActionResult` subscription like any other outcome.\n */\n cancelOutboundChannelActions?: Maybe<CancelOutboundChannelActionsPayload>;\n /**\n * Changes a subscription's plan or periodicity. Unset arguments preserve the\n * current value. Upgrades are invoiced immediately with proration and grant the\n * prorated credit share; downgrades and lateral moves are SCHEDULED at the next\n * bill date (surfaced as BillingSubscription.pendingChange, cancelable for free\n * via cancelBillingSubscriptionChange) — the current plan's credits and limits\n * stay in force until then. Re-targeting the current plan cancels a pending change.\n */\n changeBillingSubscription?: Maybe<ChangeBillingSubscriptionPayload>;\n /**\n * Moves an existing subscription to another plan or periodicity. Upgrades\n * invoice immediately with prorated credits; downgrades are scheduled at the\n * next bill date and readable as `pendingChange` until they apply.\n */\n changeCompanySubscription?: Maybe<Company>;\n /**\n * Completes a sign-in started by `authenticateOutboundChannelAccount` on a\n * provider that returns the owner's browser with an authorization code\n * (`google`, `microsoft`). The consumer's callback, the `returnUrl` of the\n * attempt, receives `code` and `state` and hands both here. The gateway\n * exchanges the code for the mailbox's tokens, which it keeps and never returns,\n * reads the identity and answers with the attempt's outcome;\n * `channel_account.connected` follows as for any other sign-in. Refused as\n * `channel_account.removed`, `state.unknown`, `state.expired`,\n * `state.already_used` (a second call with the same `state`) or\n * `state.unsupported` (a provider that signs in another way). A code the\n * provider refuses or a consent missing a permission is an outcome, not an\n * error: `CODE_REJECTED`, `SCOPES_MISSING`.\n */\n completeOutboundChannelAuthentication?: Maybe<CompleteOutboundChannelAuthenticationPayload>;\n /**\n * Brings what a consumable costs to newCost without rewriting any row or writing\n * a negative amount. A higher cost writes additional positive consumption debits\n * for the difference, each naming the consumable's first debit as its\n * adjustedDebit, drawn like debitCredits: with allowOverage, what credits do not\n * cover is recorded as an overage. A lower cost gives the difference back as\n * CORRECTION credits, the consumable's overage first, then its debits newest\n * first. Each correction is priced at the unit price of what it reduces (the\n * debit's, or the overage price) and cancels that revenue at its original date;\n * an overage that is lowered is still billed, so the customer keeps the credits.\n * Correction credits expire one year after the call. Idempotent per customer and\n * idempotencyKey: a replay answers the rows the first call wrote, whatever the\n * other arguments say. Refused with consumable_id: not_consumed when\n * debitCredits never charged the consumable.\n */\n correctDebit?: Maybe<CorrectDebitPayload>;\n /** Registers an application under a company so it can hold credentials and call the federation. */\n createApplication?: Maybe<Application>;\n /** Returns the secret exactly once. */\n createApplicationCredential?: Maybe<IssuedCredential>;\n /** Creates a hosted Stripe Checkout session for a new subscription and returns the URL the frontend redirects to. */\n createBillingCheckoutSession?: Maybe<CreateBillingCheckoutSessionPayload>;\n /** Creates a billing customer + matching Stripe customer. Caller stores the returned id. */\n createBillingCustomer?: Maybe<CreateBillingCustomerPayload>;\n /**\n * Creates an embedded Stripe Checkout session for a new subscription and returns\n * the clientSecret the frontend passes to Stripe.js.\n */\n createBillingEmbeddedCheckoutSession?: Maybe<CreateBillingEmbeddedCheckoutSessionPayload>;\n /** Creates a Stripe Customer Portal session and returns the hosted URL the frontend redirects to. */\n createBillingPortalSession?: Maybe<CreateBillingPortalSessionPayload>;\n /** Creates a company with the calling user as its first member. */\n createCompany?: Maybe<Company>;\n /** Opens Stripe's hosted portal for card replacement and invoice history. */\n createCompanyBillingPortalSession?: Maybe<BillingPortalSession>;\n /**\n * Subscribes a company to a plan. Billing is never reached directly by a caller:\n * it checks no tenancy of its own, so every write that spends a company's money\n * goes through a membership check here first.\n */\n createCompanyCheckoutSession?: Maybe<BillingCheckoutSession>;\n /**\n * A security grant: whoever redeems the code gains full control of every\n * application and credential the company owns. Refused for a personal company —\n * create a shared one.\n */\n createCompanyInvitation?: Maybe<IssuedInvitation>;\n /**\n * Registers a channel account as a draft on a provider of the channel: the one\n * named in `provider`, or the channel's default when none is. Nothing reaches\n * the provider yet: the account is connected by a later authentication step,\n * whose shape depends on the provider. The consumer stores the returned id\n * before any event can arrive.\n */\n createOutboundChannelAccount?: Maybe<CreateOutboundChannelAccountPayload>;\n /** Create a new enrichment source. */\n createSource?: Maybe<Source>;\n /**\n * Create a Watcher for a given Definition. All providers registered on the\n * Definition are auto-provisioned; the user does not choose providers.\n *\n * By default every provider is set up before this mutation returns, so the\n * Watcher comes back `PROVISIONED` and a provider refusing the request fails the\n * call. Pass `async: true` to instead have the Watcher persisted immediately as\n * `PENDING` and provisioned in the background — a provider outage then delays\n * provisioning rather than failing creation. See `async`.\n *\n * There is no mutation to change a Watcher's `watcherInput` or `icp` afterwards,\n * by design. Both determine *which leads the Watcher returns*, and a Watcher is\n * shared: callers with the same definition and input attach their own webhook to\n * one row, so editing it in place would silently repoint every other webhook\n * attached to it. Those fields are also what the Watcher is keyed on, so\n * changing them means becoming a different Watcher.\n *\n * To change what a Watcher returns, call `createWatcher` again with the new\n * input — an existing match is reused, otherwise a new Watcher is provisioned —\n * then `deleteWatcher` the old one if nothing else needs it.\n * `updateWatcherLeadCaps` and `setWebhookActive` remain available: they bound\n * volume and delivery, not which leads qualify.\n */\n createWatcher?: Maybe<CreateWatcherPayload>;\n /**\n * Draws credits for in-app usage. Idempotent per consumable: a replay for an\n * already-paid consumableType/consumableId returns the original debits as a\n * success instead of drawing again. Returns success=false with\n * errorCode=insufficient_credits when the balance can't cover the cost; raises a\n * GraphQL error if the billingCustomerId is unknown.\n */\n debitCredits?: Maybe<DebitCreditsPayload>;\n /** Deletes an application the caller may manage. */\n deleteApplication?: Maybe<Application>;\n /**\n * Hard-deletes a billing customer and its Stripe customer. Used to compensate a\n * failed sales-offer creation. Refuses a customer that has subscriptions,\n * invoices, credits, or debits.\n */\n deleteBillingCustomer?: Maybe<DeleteBillingCustomerPayload>;\n /** Deletes a company the caller belongs to. Requires `force` while it still owns applications. */\n deleteCompany?: Maybe<Company>;\n /**\n * Cancel a Watcher and tear down its external provider resources. The\n * cancellation is immediate; the external teardown runs asynchronously and is\n * retried across provider outages. Events are preserved.\n */\n deleteWatcher?: Maybe<DeleteWatcherPayload>;\n /** Starts the OAuth device authorization flow and returns the codes to show the person and to poll with. */\n deviceAuthorize?: Maybe<DeviceCodeResponse>;\n /**\n * Polls the device flow for tokens. Instead of failing the request, the\n * provider's error code is returned in `error`: authorization_pending and\n * slow_down mean poll again, expired_token and access_denied mean stop.\n */\n deviceToken?: Maybe<TokenResponse>;\n /**\n * Signs a channel account out without losing it: its connection is retired and\n * released at the provider, the account moves to `DISCONNECTED` and stops\n * performing actions, and the consumer receives `channel_account.disconnected`.\n * Its id, identity and history stay; `authenticateOutboundChannelAccount` on the\n * same account connects it again. Refused as `channel_account.not_connected` on\n * a draft, and as `channel_account.removed` once removed. To be rid of an\n * account for good, use `removeOutboundChannelAccount`.\n */\n disconnectOutboundChannelAccount?: Maybe<DisconnectOutboundChannelAccountPayload>;\n /**\n * Asynchronously merge a raw source payload into the contact record, applying the source's\n * trust score to resolve field conflicts, then recompute the confidence score.\n * Returns `{status: \"received\"}` immediately; the merged Contact arrives via the\n * `contactEnrichmentResult(externalId:)` subscription, so pass an `externalId` and\n * subscribe before calling.\n * Use when pushing enrichment data from a registered source.\n * To discover a contact from a known identifier (email, LinkedIn, name) without raw\n * source data, use `searchContact` instead.\n */\n enrichContact?: Maybe<EnrichContactPayload>;\n /**\n * Asynchronously store or update an IP-to-company identification record from a source\n * payload. Returns `{status: \"received\"}` immediately.\n * Unlike `enrichContact` and `enrichOrganization` there is no result subscription for this\n * one, so a caller learns only that the push was accepted; failures are logged and\n * reported to Sentry rather than broadcast.\n * Use when a source (e.g. Snitcher) has already resolved an IP to a company domain\n * and you want to persist that result. To trigger async resolution from an IP address,\n * use `searchOrganization` with `ip:` instead.\n */\n enrichIdentification?: Maybe<EnrichIdentificationPayload>;\n /**\n * Asynchronously merge a raw source payload into the organization record, applying the\n * source's trust score to resolve field conflicts, then recompute the confidence score.\n * Returns `{status: \"received\"}` immediately; the merged Organization arrives via the\n * `organizationEnrichmentResult(externalId:)` subscription, so pass an `externalId` and\n * subscribe before calling.\n * Use when pushing enrichment data from a registered source.\n * To look up an existing organization without writing data, use `organization(domain:)` instead.\n */\n enrichOrganization?: Maybe<EnrichOrganizationPayload>;\n /**\n * Asks for a page of contacts matching `filter` and `organizationFilter` and returns\n * `{status: \"received\"}` at once. The page arrives on the\n * `contactFindProgress(externalId:)` subscription, which only delivers to a subscriber\n * acting for the same caller, and is sent again as Atlas fills it until it is COMPLETE.\n * Without `page.after`, the call starts a new search; with the `endCursor` of a page it\n * reads on in that search. The filter applies exactly what it states, with no quality floor\n * added.\n */\n findContacts?: Maybe<FindContactsPayload>;\n /**\n * Asks for a page of organizations matching `filter` and returns `{status: \"received\"}` at\n * once. The page arrives on the `organizationFindProgress(externalId:)` subscription,\n * which only delivers to a subscriber acting for the same caller, and is sent again as\n * Atlas fills it until it is COMPLETE. Without `page.after`, the call starts a new search;\n * with the `endCursor` of a page it reads on in that search. The filter applies exactly what\n * it states, with no quality floor added. A `domain: { eq }` Atlas holds no fresh row for is\n * looked up before the page is COMPLETE; a malformed one is refused with\n * `INVALID_INTERACTION`.\n */\n findOrganizations?: Maybe<FindOrganizationsPayload>;\n /**\n * Grants free promotional credits: a PROMO credit at a unit price of 0, so\n * consuming it recognizes no revenue. Idempotent per customer and\n * idempotencyKey: a replay returns the credit the first call granted, whatever\n * the other arguments say, even once its expiresAt has passed.\n */\n grantPromotionalCredits?: Maybe<GrantPromotionalCreditsPayload>;\n /**\n * Asynchronously identifies the organization behind a visitor's IP address. Returns\n * `{status: \"received\"}` immediately; the organization, or null when Atlas cannot tell\n * who it is, arrives on the `organizationIdentifyResult(externalId:)` subscription, which\n * only delivers to a subscriber acting for the same caller. Atlas also starts identifying\n * a handful of the organization's decision-makers in the background. `reveal` defaults\n * to nothing: only fields the company already owns are served unless it names the\n * dimensions it wants.\n */\n identifyOrganizationByIp?: Maybe<IdentifyOrganizationByIpPayload>;\n /**\n * Brings a consumer's existing LinkedIn history under Outreach's watch: the\n * conversations, messages and connection requests it passes are stored as the\n * consumer holds them, then followed like the ones Outreach started. Nothing is\n * read from the provider. Accepted and run in the background;\n * `linkedin_import.completed` reports the counts. Meant for a consumer's first\n * connection of an account, under a scope of its own. Every id must be\n * LinkedIn's own, without a provider's or LinkedIn's own envelope: a value\n * starting with `urn:`, or with a prefix such as `CLASSIC_` or `SENT_`, is\n * refused as `IDENTIFIER_NOT_CANONICAL` before anything is stored, with the\n * offending fields and values in `details`.\n */\n importLinkedinHistory?: Maybe<ImportLinkedinHistoryPayload>;\n /**\n * Asks the gateway to perform one action on a connected account. The action is\n * accepted and executed in the background; its outcome reaches the consumer as\n * `channel_action.completed` or `channel_action.failed`. Repeating the call with\n * the same `externalId` — or, when none is given, with the same account and\n * input — returns the accepted action instead of performing it again.\n */\n performOutboundChannelAction?: Maybe<PerformOutboundChannelActionPayload>;\n /** Exchanges a refresh token for a new access token. */\n refreshToken?: Maybe<TokenResponse>;\n /**\n * Refunds part or all of what was charged for one consumable, as REFUND credits,\n * whether credits paid for it or it went to overage and is not paid yet: one\n * credit per consumption debit and per overage of the consumable, each amount ×\n * row / total charged, rounded up to the cent in the customer's favour and\n * capped at what that row still holds. Each refund credit is priced at the unit\n * price of what it reduces (the debit's, or the overage price), cancels that\n * revenue at its original date (the debit's revenueRecognizedAt or the overage's\n * occurredAt), and expires one year after the call. Refused with amount:\n * exceeds_refundable (and the refundable figure) beyond what remains unrefunded\n * for the consumable, and consumable_id: not_consumed when nothing charged it.\n * Idempotent per customer and idempotencyKey: a replay answers the credits the\n * first call wrote, whatever the other arguments say.\n */\n refundDebit?: Maybe<RefundDebitPayload>;\n /** Also revokes every credential that member created for this company's applications, in one transaction. */\n removeCompanyMember?: Maybe<Company>;\n /**\n * Removes a channel account for good: it becomes `REMOVED` and disappears from\n * `outboundChannelAccount` at once; the provider's connection is deleted in the\n * background and, once the provider has confirmed, the consumer receives\n * `channel_account.removed`. Idempotent: removing a removed account changes\n * nothing. To use the same identity again, register a new account.\n */\n removeOutboundChannelAccount?: Maybe<RemoveOutboundChannelAccountPayload>;\n /** Effective immediately for new token requests; tokens already issued remain valid until they expire. */\n revokeApplicationCredential?: Maybe<ApplicationCredential>;\n /** Revokes a pending invitation so its code can no longer be redeemed. */\n revokeCompanyInvitation?: Maybe<CompanyInvitation>;\n /** Runs a background job inline. Admin-only, intended for E2E test orchestration. */\n runSignalsSynchronousWorker?: Maybe<RunSignalsSynchronousWorkerPayload>;\n /** Run a background job inline. Admin-only, intended for E2E test orchestration. */\n runSynchronousWorker?: Maybe<RunSynchronousWorkerPayload>;\n /**\n * Asynchronously discover an Atlas Contact record.\n * Returns `{status: \"received\"}` immediately. The result arrives via\n * the `contactIdentifyResult(externalId:)` subscription.\n * Provide exactly one lookup mode via `lookup`:\n * `contactId`, `linkedinUrl`, `emailAddress`, or `name`.\n * @deprecated Use `findContacts` with a filter naming the person and `page: { first: 1 }`.\n */\n searchContact?: Maybe<SearchContactPayload>;\n /**\n * Synchronously discover a contact's phone number and merge it into the contact record.\n * Unlike `searchContact` this one blocks and answers on the same round trip, so no\n * subscription is involved.\n * Supply `contactId` when you hold one, otherwise `linkedinUrl`. A LinkedIn URL Atlas\n * has not seen before is identified first, through the same strategy `searchContact`\n * leads with, so the lookup does not require the person to be known already; it\n * answers `contact_not_found` only when identification fails too. The lookup is keyed\n * on the LinkedIn profile, so a contact carrying none answers `missing_linkedin_url`.\n * A number already known is re-validated at most once per revalidation period; inside\n * it the cached number is returned without a new lookup.\n * A `linkedinUrl` that is not a LinkedIn profile URL is refused with\n * `INVALID_INTERACTION` rather than answered as `contact_not_found`, so bad input stays\n * distinguishable from a genuine miss.\n * When the lookup cannot be completed (the upstream source refuses the request, fails\n * or times out), it answers `lookup_failed` instead of `not_found`: nothing was\n * learned about the person, no miss is recorded, and a later call retries. A number\n * Atlas already holds is still answered as `found`.\n * @deprecated Use `findContacts` with a filter naming the person, `page: { first: 1 }` and `reveal: [CONTACT_PHONE_NUMBER]`.\n */\n searchContactPhone?: Maybe<SearchContactPhonePayload>;\n /**\n * Asynchronously searches for contacts matching `filter`/`organizationFilter`, the\n * same criteria accepted by the `contacts` query — but in addition to the local\n * database, this also searches Atlas's third-party sources (currently Coresignal)\n * and persists any new matches as Contact records.\n * Returns `{status: \"received\"}` immediately. The result arrives via the\n * `contactSearchResult(externalId:)` subscription, as a paginated connection —\n * further pages beyond the first are fetched via the `contacts` query using the\n * same filter.\n * @deprecated Use `findContacts`.\n */\n searchContacts?: Maybe<SearchContactsPayload>;\n /**\n * Asynchronously search for an organization by domain or visitor IP.\n * Returns {status: \"received\"} immediately. The matched Organization arrives via\n * the `organizationSearchResult(externalId:)` subscription.\n * Provide exactly one lookup mode via `lookup`: either `domain` or `byIp`.\n * A `lookup.domain` that is not a resolvable hostname is rejected up front with\n * `INVALID_INTERACTION` and no work is queued.\n * @deprecated Use `findOrganizations` with `filter: { domain: { eq } }` and `page: { first: 1 }`, or `identifyOrganizationByIp` for an IP.\n */\n searchOrganization?: Maybe<SearchOrganizationPayload>;\n /** Sets the company the calling user acts for by default, or clears it with null. It must be one the caller belongs to. */\n setDefaultCompany?: Maybe<User>;\n /**\n * Activate or pause delivery for a single webhook on a Watcher. The upstream\n * source's emitting state is reconciled asynchronously, so the call succeeds\n * even while the provider is unreachable. Does not deprovision — the\n * subscription, webhook, and config are preserved.\n */\n setWatcherWebhookActive?: Maybe<SetWatcherWebhookActivePayload>;\n /**\n * Activate or pause delivery for a single webhook on a Watcher. The upstream\n * source's emitting state is reconciled asynchronously, so the call succeeds\n * even while the provider is unreachable. Does not deprovision — the\n * subscription, webhook, and config are preserved.\n * @deprecated Use `setWatcherWebhookActive` instead.\n */\n setWebhookActive?: Maybe<SetWebhookActivePayload>;\n /** Manually fire an ingestion run for a Watcher. Rejects pure-webhook strategies. */\n triggerWatcher?: Maybe<TriggerWatcherPayload>;\n /** Update an existing enrichment source. */\n updateSource?: Maybe<Source>;\n /**\n * Replace the freshness-first per-period lead caps on a Watcher. The new caps\n * take effect in-house immediately and are propagated to Rodz-backed signals as\n * their per-day limit.\n */\n updateWatcherLeadCaps?: Maybe<UpdateWatcherLeadCapsPayload>;\n /**\n * Asynchronously validate that the supplied name, email, and phone are internally consistent\n * for a contact at the given organization.\n * Returns `{status: \"received\"}` immediately. Per-field coherence flags arrive via\n * the `contactValidationResult(externalId:)` subscription.\n */\n validateContact?: Maybe<ValidateContactPayload>;\n /**\n * Asynchronously validate that the supplied company field values are coherent with\n * Atlas's stored data for the given domain.\n * Returns `{status: \"received\"}` immediately. Per-field coherence flags arrive via\n * the `domainValidationResult(externalId:)` subscription.\n * A `domain` that is not a resolvable hostname is rejected up front with\n * `INVALID_INTERACTION` and no work is queued.\n */\n validateDomain?: Maybe<ValidateDomainPayload>;\n /**\n * Asynchronously verifies whether an email address can receive mail. Returns\n * `{status: \"received\"}` immediately; the verdict\n * arrives on the `emailAddressVerificationResult(externalId:)` subscription, which only\n * delivers to a subscriber acting for the same caller.\n * Atlas first checks the addresses it already knows: one it holds as invalid (a reported\n * hard bounce, or an earlier failed verification) answers `invalid` with reason\n * `known_invalid` and spends no provider call. Any other address is checked with the email\n * verification provider. A definitive verdict from the provider (`valid`, `invalid` or\n * `catch_all`) is kept on the contacts that hold that exact address (their email status and a provider source),\n * as email discovery does. When none does and the address is not on a free webmail domain,\n * Atlas creates a contact holding only that address under the organization of its domain,\n * creating the organization when the domain is new, and keeps the verdict there. A webmail\n * address no contact holds is not kept. Neither an `unknown` verdict nor a prescreen\n * rejection (bad format, disposable domain, no mail server) is kept.\n * Each call also records one usage row naming the caller, the verdict and whether the\n * provider was called, never the address. Until the check runs, the address waits in the\n * job queue encrypted, and the ciphertext becomes unreadable after one hour.\n * When the provider cannot be reached, times out or is not configured, the verdict is\n * `lookup_failed`: nothing was learned about the address, and a later call retries.\n */\n verifyEmailAddress?: Maybe<VerifyEmailAddressPayload>;\n};\n\n\n/** Root mutation type. Each subgraph contributes its own fields to it. */\nexport type MutationAcceptCompanyInvitationArgs = {\n input: AcceptCompanyInvitationInput;\n};\n\n\n/** Root mutation type. Each subgraph contributes its own fields to it. */\nexport type MutationAuthenticateOutboundChannelAccountArgs = {\n input: AuthenticateOutboundChannelAccountInput;\n};\n\n\n/** Root mutation type. Each subgraph contributes its own fields to it. */\nexport type MutationCancelBillingCustomerSubscriptionsArgs = {\n input: CancelBillingCustomerSubscriptionsInput;\n};\n\n\n/** Root mutation type. Each subgraph contributes its own fields to it. */\nexport type MutationCancelBillingSubscriptionChangeArgs = {\n input: CancelBillingSubscriptionChangeInput;\n};\n\n\n/** Root mutation type. Each subgraph contributes its own fields to it. */\nexport type MutationCancelCompanySubscriptionArgs = {\n input: CancelCompanySubscriptionInput;\n};\n\n\n/** Root mutation type. Each subgraph contributes its own fields to it. */\nexport type MutationCancelOutboundChannelActionsArgs = {\n input: CancelOutboundChannelActionsInput;\n};\n\n\n/** Root mutation type. Each subgraph contributes its own fields to it. */\nexport type MutationChangeBillingSubscriptionArgs = {\n input: ChangeBillingSubscriptionInput;\n};\n\n\n/** Root mutation type. Each subgraph contributes its own fields to it. */\nexport type MutationChangeCompanySubscriptionArgs = {\n input: ChangeCompanySubscriptionInput;\n};\n\n\n/** Root mutation type. Each subgraph contributes its own fields to it. */\nexport type MutationCompleteOutboundChannelAuthenticationArgs = {\n input: CompleteOutboundChannelAuthenticationInput;\n};\n\n\n/** Root mutation type. Each subgraph contributes its own fields to it. */\nexport type MutationCorrectDebitArgs = {\n input: CorrectDebitInput;\n};\n\n\n/** Root mutation type. Each subgraph contributes its own fields to it. */\nexport type MutationCreateApplicationArgs = {\n input: CreateApplicationInput;\n};\n\n\n/** Root mutation type. Each subgraph contributes its own fields to it. */\nexport type MutationCreateApplicationCredentialArgs = {\n input: CreateApplicationCredentialInput;\n};\n\n\n/** Root mutation type. Each subgraph contributes its own fields to it. */\nexport type MutationCreateBillingCheckoutSessionArgs = {\n input: CreateBillingCheckoutSessionInput;\n};\n\n\n/** Root mutation type. Each subgraph contributes its own fields to it. */\nexport type MutationCreateBillingCustomerArgs = {\n input: CreateBillingCustomerInput;\n};\n\n\n/** Root mutation type. Each subgraph contributes its own fields to it. */\nexport type MutationCreateBillingEmbeddedCheckoutSessionArgs = {\n input: CreateBillingEmbeddedCheckoutSessionInput;\n};\n\n\n/** Root mutation type. Each subgraph contributes its own fields to it. */\nexport type MutationCreateBillingPortalSessionArgs = {\n input: CreateBillingPortalSessionInput;\n};\n\n\n/** Root mutation type. Each subgraph contributes its own fields to it. */\nexport type MutationCreateCompanyArgs = {\n input: CreateCompanyInput;\n};\n\n\n/** Root mutation type. Each subgraph contributes its own fields to it. */\nexport type MutationCreateCompanyBillingPortalSessionArgs = {\n input: CreateCompanyBillingPortalSessionInput;\n};\n\n\n/** Root mutation type. Each subgraph contributes its own fields to it. */\nexport type MutationCreateCompanyCheckoutSessionArgs = {\n input: CreateCompanyCheckoutSessionInput;\n};\n\n\n/** Root mutation type. Each subgraph contributes its own fields to it. */\nexport type MutationCreateCompanyInvitationArgs = {\n input: CreateCompanyInvitationInput;\n};\n\n\n/** Root mutation type. Each subgraph contributes its own fields to it. */\nexport type MutationCreateOutboundChannelAccountArgs = {\n input: CreateOutboundChannelAccountInput;\n};\n\n\n/** Root mutation type. Each subgraph contributes its own fields to it. */\nexport type MutationCreateSourceArgs = {\n input: CreateSourceInput;\n};\n\n\n/** Root mutation type. Each subgraph contributes its own fields to it. */\nexport type MutationCreateWatcherArgs = {\n input: CreateWatcherInput;\n};\n\n\n/** Root mutation type. Each subgraph contributes its own fields to it. */\nexport type MutationDebitCreditsArgs = {\n input: DebitCreditsInput;\n};\n\n\n/** Root mutation type. Each subgraph contributes its own fields to it. */\nexport type MutationDeleteApplicationArgs = {\n input: DeleteApplicationInput;\n};\n\n\n/** Root mutation type. Each subgraph contributes its own fields to it. */\nexport type MutationDeleteBillingCustomerArgs = {\n input: DeleteBillingCustomerInput;\n};\n\n\n/** Root mutation type. Each subgraph contributes its own fields to it. */\nexport type MutationDeleteCompanyArgs = {\n input: DeleteCompanyInput;\n};\n\n\n/** Root mutation type. Each subgraph contributes its own fields to it. */\nexport type MutationDeleteWatcherArgs = {\n input: DeleteWatcherInput;\n};\n\n\n/** Root mutation type. Each subgraph contributes its own fields to it. */\nexport type MutationDeviceAuthorizeArgs = {\n input: DeviceAuthorizeInput;\n};\n\n\n/** Root mutation type. Each subgraph contributes its own fields to it. */\nexport type MutationDeviceTokenArgs = {\n input: DeviceTokenInput;\n};\n\n\n/** Root mutation type. Each subgraph contributes its own fields to it. */\nexport type MutationDisconnectOutboundChannelAccountArgs = {\n input: DisconnectOutboundChannelAccountInput;\n};\n\n\n/** Root mutation type. Each subgraph contributes its own fields to it. */\nexport type MutationEnrichContactArgs = {\n input: EnrichContactInput;\n};\n\n\n/** Root mutation type. Each subgraph contributes its own fields to it. */\nexport type MutationEnrichIdentificationArgs = {\n input: EnrichIdentificationInput;\n};\n\n\n/** Root mutation type. Each subgraph contributes its own fields to it. */\nexport type MutationEnrichOrganizationArgs = {\n input: EnrichOrganizationInput;\n};\n\n\n/** Root mutation type. Each subgraph contributes its own fields to it. */\nexport type MutationFindContactsArgs = {\n input: FindContactsInput;\n};\n\n\n/** Root mutation type. Each subgraph contributes its own fields to it. */\nexport type MutationFindOrganizationsArgs = {\n input: FindOrganizationsInput;\n};\n\n\n/** Root mutation type. Each subgraph contributes its own fields to it. */\nexport type MutationGrantPromotionalCreditsArgs = {\n input: GrantPromotionalCreditsInput;\n};\n\n\n/** Root mutation type. Each subgraph contributes its own fields to it. */\nexport type MutationIdentifyOrganizationByIpArgs = {\n input: IdentifyOrganizationByIpInput;\n};\n\n\n/** Root mutation type. Each subgraph contributes its own fields to it. */\nexport type MutationImportLinkedinHistoryArgs = {\n input: ImportLinkedinHistoryInput;\n};\n\n\n/** Root mutation type. Each subgraph contributes its own fields to it. */\nexport type MutationPerformOutboundChannelActionArgs = {\n input: PerformOutboundChannelActionInput;\n};\n\n\n/** Root mutation type. Each subgraph contributes its own fields to it. */\nexport type MutationRefreshTokenArgs = {\n input: RefreshTokenInput;\n};\n\n\n/** Root mutation type. Each subgraph contributes its own fields to it. */\nexport type MutationRefundDebitArgs = {\n input: RefundDebitInput;\n};\n\n\n/** Root mutation type. Each subgraph contributes its own fields to it. */\nexport type MutationRemoveCompanyMemberArgs = {\n input: RemoveCompanyMemberInput;\n};\n\n\n/** Root mutation type. Each subgraph contributes its own fields to it. */\nexport type MutationRemoveOutboundChannelAccountArgs = {\n input: RemoveOutboundChannelAccountInput;\n};\n\n\n/** Root mutation type. Each subgraph contributes its own fields to it. */\nexport type MutationRevokeApplicationCredentialArgs = {\n input: RevokeApplicationCredentialInput;\n};\n\n\n/** Root mutation type. Each subgraph contributes its own fields to it. */\nexport type MutationRevokeCompanyInvitationArgs = {\n input: RevokeCompanyInvitationInput;\n};\n\n\n/** Root mutation type. Each subgraph contributes its own fields to it. */\nexport type MutationRunSignalsSynchronousWorkerArgs = {\n input: RunSignalsSynchronousWorkerInput;\n};\n\n\n/** Root mutation type. Each subgraph contributes its own fields to it. */\nexport type MutationRunSynchronousWorkerArgs = {\n input: RunSynchronousWorkerInput;\n};\n\n\n/** Root mutation type. Each subgraph contributes its own fields to it. */\nexport type MutationSearchContactArgs = {\n input: SearchContactInput;\n};\n\n\n/** Root mutation type. Each subgraph contributes its own fields to it. */\nexport type MutationSearchContactPhoneArgs = {\n input: SearchContactPhoneInput;\n};\n\n\n/** Root mutation type. Each subgraph contributes its own fields to it. */\nexport type MutationSearchContactsArgs = {\n input: SearchContactsInput;\n};\n\n\n/** Root mutation type. Each subgraph contributes its own fields to it. */\nexport type MutationSearchOrganizationArgs = {\n input: SearchOrganizationInput;\n};\n\n\n/** Root mutation type. Each subgraph contributes its own fields to it. */\nexport type MutationSetDefaultCompanyArgs = {\n input: SetDefaultCompanyInput;\n};\n\n\n/** Root mutation type. Each subgraph contributes its own fields to it. */\nexport type MutationSetWatcherWebhookActiveArgs = {\n input: SetWatcherWebhookActiveInput;\n};\n\n\n/** Root mutation type. Each subgraph contributes its own fields to it. */\nexport type MutationSetWebhookActiveArgs = {\n input: SetWebhookActiveInput;\n};\n\n\n/** Root mutation type. Each subgraph contributes its own fields to it. */\nexport type MutationTriggerWatcherArgs = {\n input: TriggerWatcherInput;\n};\n\n\n/** Root mutation type. Each subgraph contributes its own fields to it. */\nexport type MutationUpdateSourceArgs = {\n input: UpdateSourceInput;\n};\n\n\n/** Root mutation type. Each subgraph contributes its own fields to it. */\nexport type MutationUpdateWatcherLeadCapsArgs = {\n input: UpdateWatcherLeadCapsInput;\n};\n\n\n/** Root mutation type. Each subgraph contributes its own fields to it. */\nexport type MutationValidateContactArgs = {\n input: ValidateContactInput;\n};\n\n\n/** Root mutation type. Each subgraph contributes its own fields to it. */\nexport type MutationValidateDomainArgs = {\n input: ValidateDomainInput;\n};\n\n\n/** Root mutation type. Each subgraph contributes its own fields to it. */\nexport type MutationVerifyEmailAddressArgs = {\n input: VerifyEmailAddressInput;\n};\n\n/** An object with an ID. */\nexport type Node = {\n /** ID of the object. */\n id: Scalars['ID']['output'];\n};\n\n/** A company or organization identified and enriched from multiple data sources. */\nexport type Organization = Located & Node & {\n __typename?: 'Organization';\n /** Annual revenue range in USD (e.g. [1000000, 5000000]). */\n annualRevenue?: Maybe<Scalars['Range']['output']>;\n /** Employee count range (e.g. [10, 50]). */\n companySize?: Maybe<Scalars['Range']['output']>;\n /** Confidence score (0.0–1.0) from source quality, freshness, and diversity. */\n confidenceScore?: Maybe<Scalars['Float']['output']>;\n /** General contact email address. */\n contactEmail?: Maybe<Scalars['String']['output']>;\n /** Known contacts at this organization. */\n contacts: ContactConnection;\n /** When the organization record was first created. */\n createdAt: Scalars['ISO8601DateTime']['output'];\n /** Short company description or tagline. */\n description?: Maybe<Scalars['String']['output']>;\n /** Primary web domain (unique identifier for deduplication). */\n domain: Scalars['String']['output'];\n /** When the domain was last verified as reachable. */\n domainReachableAt?: Maybe<Scalars['ISO8601DateTime']['output']>;\n /** Year the company was founded. */\n foundedYear?: Maybe<Scalars['Int']['output']>;\n /** Global id of the record. */\n id: Scalars['ID']['output'];\n /** Primary industry classification. */\n industry?: Maybe<Scalars['String']['output']>;\n /** Whether the LinkedIn page is claimed by the organization. */\n linkedinClaimed?: Maybe<Scalars['Boolean']['output']>;\n /** LinkedIn company page URL. */\n linkedinUrl?: Maybe<Scalars['String']['output']>;\n /**\n * Mercator Location ids of the organization's divisions, chosen as for\n * `locations`. Read by the router to resolve `locations` from Mercator.\n */\n locationIds: Array<Scalars['ID']['output']>;\n /**\n * Mercator divisions of the record, in the order its subgraph stores them: the\n * resolved place first, then its ancestors. Empty until the record's location\n * has been resolved.\n */\n locations: LocationConnection;\n /** URL to the organization's logo image. */\n logoUrl?: Maybe<Scalars['String']['output']>;\n /** Legal or trade name. */\n name?: Maybe<Scalars['String']['output']>;\n /**\n * Physical office locations.\n * @deprecated Use organization_addresses instead.\n */\n offices: Array<OrganizationAddress>;\n /** Physical addresses. */\n organizationAddresses: OrganizationAddressConnection;\n /** Main phone number. */\n phone?: Maybe<Scalars['String']['output']>;\n /** When the organization record was last modified. */\n updatedAt: Scalars['ISO8601DateTime']['output'];\n /** Unique identifier (UUID) for this organization. */\n uuid: Scalars['String']['output'];\n /** Company website URL. */\n website?: Maybe<Scalars['String']['output']>;\n};\n\n\n/** A company or organization identified and enriched from multiple data sources. */\nexport type OrganizationContactsArgs = {\n after?: InputMaybe<Scalars['String']['input']>;\n before?: InputMaybe<Scalars['String']['input']>;\n filter?: InputMaybe<ContactFilterInput>;\n first?: InputMaybe<Scalars['Int']['input']>;\n last?: InputMaybe<Scalars['Int']['input']>;\n reveal?: InputMaybe<Array<RevealDimension>>;\n sort?: InputMaybe<Array<ContactSortInput>>;\n};\n\n\n/** A company or organization identified and enriched from multiple data sources. */\nexport type OrganizationLocationsArgs = {\n after?: InputMaybe<Scalars['String']['input']>;\n before?: InputMaybe<Scalars['String']['input']>;\n first?: InputMaybe<Scalars['Int']['input']>;\n last?: InputMaybe<Scalars['Int']['input']>;\n subtype?: InputMaybe<LocationSubtypeFilterInput>;\n};\n\n\n/** A company or organization identified and enriched from multiple data sources. */\nexport type OrganizationOrganizationAddressesArgs = {\n after?: InputMaybe<Scalars['String']['input']>;\n before?: InputMaybe<Scalars['String']['input']>;\n first?: InputMaybe<Scalars['Int']['input']>;\n isHeadquarters?: InputMaybe<Scalars['Boolean']['input']>;\n kind?: InputMaybe<OrganizationAddressKind>;\n last?: InputMaybe<Scalars['Int']['input']>;\n};\n\n/** A physical address of an organization. */\nexport type OrganizationAddress = Located & Node & {\n __typename?: 'OrganizationAddress';\n /** City where the office is located. */\n city?: Maybe<Scalars['String']['output']>;\n /** Geographic coordinates of the address as a GeoJSON Point. */\n coordinates?: Maybe<Coordinate>;\n /** When the address was created. */\n createdAt: Scalars['ISO8601DateTime']['output'];\n /** Global id of the record. */\n id: Scalars['ID']['output'];\n /**\n * Whether this is the organization's headquarters.\n * @deprecated Use `kind == HEADQUARTERS` instead.\n */\n isHeadquarters: Scalars['Boolean']['output'];\n /** Classification of this address: headquarters, office, or unattended. */\n kind: OrganizationAddressKind;\n /** Mercator Location ids of the record's divisions, as stored. Read by the router to resolve `locations` from Mercator. */\n locationIds: Array<Scalars['ID']['output']>;\n /**\n * Mercator divisions of the record, in the order its subgraph stores them: the\n * resolved place first, then its ancestors. Empty until the record's location\n * has been resolved.\n */\n locations: LocationConnection;\n /** Postal or ZIP code. */\n postalCode?: Maybe<Scalars['String']['output']>;\n /** State or province. */\n state?: Maybe<Scalars['String']['output']>;\n /** Street address. */\n street?: Maybe<Scalars['String']['output']>;\n /** When the address was last updated. */\n updatedAt: Scalars['ISO8601DateTime']['output'];\n};\n\n\n/** A physical address of an organization. */\nexport type OrganizationAddressLocationsArgs = {\n after?: InputMaybe<Scalars['String']['input']>;\n before?: InputMaybe<Scalars['String']['input']>;\n first?: InputMaybe<Scalars['Int']['input']>;\n last?: InputMaybe<Scalars['Int']['input']>;\n subtype?: InputMaybe<LocationSubtypeFilterInput>;\n};\n\n/** The connection type for OrganizationAddress. */\nexport type OrganizationAddressConnection = {\n __typename?: 'OrganizationAddressConnection';\n /**\n * Estimated total number of items across all pages. It comes from the query\n * planner rather than a count, so it costs planning time instead of a scan and\n * cannot exceed the statement timeout. It is approximate at every magnitude,\n * including small ones, and it moves when the table's statistics are refreshed.\n * Accuracy depends on the filter: within a few percent on plain column and\n * array-overlap filters, and as much as 30% out on a range filter such as\n * `companySize`. It is not meaningful for the embedding filters `jobTitle` and\n * `industry` — no statistics exist for a vector-distance predicate, so the\n * estimate ignores the distance threshold entirely and approximates only what\n * the other filters admit; it has been measured reporting 241371 for a filter\n * whose true result was empty. Never render it as an exact figure, and use\n * `totalCount` when the figure has to be exact.\n */\n approximateTotalCount: Scalars['Int']['output'];\n /** A list of edges. */\n edges?: Maybe<Array<Maybe<OrganizationAddressEdge>>>;\n /** A list of nodes. */\n nodes?: Maybe<Array<Maybe<OrganizationAddress>>>;\n /** Information to aid in pagination. */\n pageInfo: PageInfo;\n /** Total number of items across all pages, exact unless `upTo` is given. */\n totalCount: Scalars['Int']['output'];\n};\n\n\n/** The connection type for OrganizationAddress. */\nexport type OrganizationAddressConnectionTotalCountArgs = {\n upTo?: InputMaybe<Scalars['Int']['input']>;\n};\n\n/** An edge in a connection. */\nexport type OrganizationAddressEdge = Node & {\n __typename?: 'OrganizationAddressEdge';\n /** A cursor for use in pagination. */\n cursor: Scalars['String']['output'];\n id: Scalars['ID']['output'];\n /** The item at the end of the edge. */\n node?: Maybe<OrganizationAddress>;\n};\n\n/** Classification of an organization address. */\nexport type OrganizationAddressKind =\n /** The organization's elected headquarters. */\n | 'HEADQUARTERS'\n /** A staffed office or branch location. */\n | 'OFFICE'\n /** A location with no on-site staff (e.g. an ATM or EV charging station). */\n | 'UNATTENDED';\n\n/** Parameters for an organization search by visitor IP address. */\nexport type OrganizationByIpInput = {\n /** The visitor's IPv4 or IPv6 address to identify. */\n ip: Scalars['String']['input'];\n /**\n * Mercator Location id (Relay global id) whose country Atlas uses. A location\n * inside a country resolves to that country, so a city id is accepted; one above\n * the country level, such as a continent, has no country and is treated as no country.\n */\n locationId?: InputMaybe<Scalars['ID']['input']>;\n};\n\n/**\n * A way to reach an organization that Atlas holds on file. Each one is named after\n * the reveal dimension that hands its value over, minus the subject:\n * `PHONE_NUMBER` here, `ORGANIZATION_PHONE_NUMBER` in `reveal`.\n */\nexport type OrganizationChannel =\n /** A general contact email address. */\n | 'EMAIL_ADDRESS'\n /** A LinkedIn company page. */\n | 'LINKEDIN_URL'\n /** A main phone number. */\n | 'PHONE_NUMBER'\n /** A domain that answered when Atlas last checked it, which a website value on file alone does not prove. */\n | 'WEBSITE';\n\n/**\n * Narrows organizations by the channels Atlas can reach them through: `eq` one\n * channel, `in` any of them, `all` every one of them, `notEq` / `notIn` without\n * them. Filtering on a channel never reveals its value: `reveal` decides that.\n */\nexport type OrganizationChannelFilterInput = {\n /** Match only records holding every one of these values. */\n all?: InputMaybe<Array<OrganizationChannel>>;\n /** Exact match. */\n eq?: InputMaybe<OrganizationChannel>;\n /** Match any of these values. */\n in?: InputMaybe<Array<OrganizationChannel>>;\n /** Exclude exact match. */\n notEq?: InputMaybe<OrganizationChannel>;\n /** Exclude any of these values. */\n notIn?: InputMaybe<Array<OrganizationChannel>>;\n};\n\n/** The connection type for Organization. */\nexport type OrganizationConnection = RevealedPage & {\n __typename?: 'OrganizationConnection';\n /**\n * Estimated total number of items across all pages. It comes from the query\n * planner rather than a count, so it costs planning time instead of a scan and\n * cannot exceed the statement timeout. It is approximate at every magnitude,\n * including small ones, and it moves when the table's statistics are refreshed.\n * Accuracy depends on the filter: within a few percent on plain column and\n * array-overlap filters, and as much as 30% out on a range filter such as\n * `companySize`. It is not meaningful for the embedding filters `jobTitle` and\n * `industry` — no statistics exist for a vector-distance predicate, so the\n * estimate ignores the distance threshold entirely and approximates only what\n * the other filters admit; it has been measured reporting 241371 for a filter\n * whose true result was empty. Never render it as an exact figure, and use\n * `totalCount` when the figure has to be exact.\n */\n approximateTotalCount: Scalars['Int']['output'];\n /**\n * Reports what this page cost in reveal credits. `held` is the ceiling reserved\n * for every requested dimension on every row, and `used` is the units the page\n * consumed. `used` is zero when the query revealed nothing, while `held` still\n * reports the reserved ceiling.\n */\n credits: RevealCredits;\n /** A list of edges. */\n edges?: Maybe<Array<Maybe<OrganizationEdge>>>;\n /** A list of nodes. */\n nodes?: Maybe<Array<Maybe<Organization>>>;\n /** Information to aid in pagination. */\n pageInfo: PageInfo;\n /** Total number of items across all pages, exact unless `upTo` is given. */\n totalCount: Scalars['Int']['output'];\n};\n\n\n/** The connection type for Organization. */\nexport type OrganizationConnectionTotalCountArgs = {\n upTo?: InputMaybe<Scalars['Int']['input']>;\n};\n\n/** An edge in a connection. */\nexport type OrganizationEdge = Node & Revealed & {\n __typename?: 'OrganizationEdge';\n /**\n * Reports what revealing this record cost in reveal credits. `held` is the\n * ceiling reserved for it, one unit per requested dimension, and `used` is the\n * units it consumed. `used` is zero when the query revealed nothing, while\n * `held` still reports the reserved ceiling.\n */\n credits: RevealCredits;\n /** A cursor for use in pagination. */\n cursor: Scalars['String']['output'];\n /**\n * One entry per filter constrained on this query, reporting whether this\n * organization matched on the attribute's value or on its absence. Empty when\n * the connection was resolved without a filter.\n */\n filterMatches: Array<FilterMatch>;\n id: Scalars['ID']['output'];\n /** The item at the end of the edge. */\n node?: Maybe<Organization>;\n /**\n * Lists, per reach dimension this query touched, what this response revealed,\n * what the company already held and what stays locked. The list is empty when\n * the query touched no reach field.\n */\n reveals: Array<RevealDimensionStatus>;\n};\n\n/** Autogenerated return type of OrganizationEnrichmentResult. */\nexport type OrganizationEnrichmentResultPayload = {\n __typename?: 'OrganizationEnrichmentResultPayload';\n /** The externalId the caller passed, naming the request this result answers. */\n externalId: Scalars['ID']['output'];\n /** The enriched organization, or null when enrichment produced nothing. */\n organization?: Maybe<Organization>;\n};\n\n/** Filter criteria for organizations. */\nexport type OrganizationFilterInput = {\n /**\n * Filter on the organization's employee-count range. Use `overlaps` with a\n * [min, max] range (a one-element [min] array means open-ended) — e.g.\n * { overlaps: [0, 100] } for \"fewer than 100 employees\", { overlaps: [1000] }\n * for \"1000+\". Callers targeting several buckets pass a single merged range.\n */\n companySize?: InputMaybe<RangeFilterInput>;\n /** Filter by confidence score (0.0–1.0). */\n confidenceScore?: InputMaybe<FloatFilterInput>;\n /**\n * Description embedding filters. Each entry matches organizations whose\n * description is semantically close to the query. Use a rich phrase rather\n * than a single keyword — e.g. \"B2B SaaS platform for sales teams\" — for a\n * strong centroid. For several distinct concepts, list them in `queries`\n * rather than joining them into one string: each keeps its own centroid,\n * where one merged string averages them into a vector that may match none\n * of them well. Entries AND with each other.\n * Set `match` rather than a raw `distance`: INCLUDED_STRICT resolves to\n * 0.55 (text-embedding-3-small) and INCLUDED_LOOSE to 0.60, measured in the\n * native 1536-dimension space — this axis carries no projection.\n * Thresholds validated by the embedding_calibration test suite.\n * Maximum 25 entries.\n */\n description?: InputMaybe<Array<EmbeddingFilterInput>>;\n /**\n * Filter organizations that have at least one address belonging to any of the\n * given Mercator location division IDs. `eq`/`in` match organizations with at\n * least one overlapping division; `not_eq`/`not_in` exclude them. This is an\n * array-overlap filter against Mercator-encoded division IDs, not a scalar Atlas ID filter.\n */\n divisionIds?: InputMaybe<IdFilterInput>;\n /**\n * Filter on the organization's domain. Values are matched against a normalized\n * form — host downcased, a single leading \"www.\" dropped — so `eq:\n * \"https://www.Acme.com/about\"` matches a stored \"acme.com\". Matching is exact\n * after that normalization, not a substring or suffix search, and no further\n * subdomain stripping happens, so \"barla.synlab.fr\" and \"synlab.fr\" stay\n * distinct organizations. `domain` is unique, so a positive `eq` matches at\n * most one record. A value that cannot yield a host (a bare company name, an IP\n * literal, punctuation) matches no organization rather than silently dropping\n * the constraint — so passing a mixed name/domain list here returns only its\n * domain-shaped entries instead of the whole table. Prefer this for a read-only\n * \"which of these organizations do we already have?\" lookup over a list — it\n * normalizes and batches through `in`. `organization(domain:)` is the\n * single-record equivalent but matches the column raw, so it misses any URL\n * form; `searchOrganization(input: { domain: ... })` is the enriching\n * counterpart and will call paid providers on a miss.\n */\n domain?: InputMaybe<StringFilterInput>;\n /** Filter by organization global id. */\n id?: InputMaybe<IdFilterInput>;\n /**\n * Industry embedding filters. Each entry matches organizations whose\n * industry is semantically close to the query. List related sectors in\n * `queries` (e.g. [\"Marketing Agency\", \"Digital Agency\", \"PR Agency\"]) to\n * match any of them. Multilingual queries work: adding translations\n * (e.g. \"Agence Marketing\", \"Marketingagentur\") widens recall. Entries AND\n * with each other.\n * Set `match` rather than a raw `distance`: this axis is measured in its\n * fitted 512-dimension projection, so its calibrated operating point is\n * 0.777 (text-embedding-3-small) and not the native-space 0.60 — a number a\n * caller cannot derive, and one that moves with every refit.\n * INCLUDED_STRICT resolves to 0.777, INCLUDED_LOOSE to 0.7811; both sit\n * inside the defensible 0.7687-0.7852 interval.\n * Thresholds validated by the embedding_calibration test suite.\n * Maximum 25 entries.\n */\n industry?: InputMaybe<Array<EmbeddingFilterInput>>;\n /**\n * Filter on the organization's LinkedIn company page. Values are matched on\n * the company vanity slug, extracted from both sides of the comparison, so\n * `eq: \"http://fr.linkedin.com/company/acme/?trk=x\"` matches a stored\n * \"https://www.linkedin.com/company/acme\". Slug matching is what makes this\n * usable: unlike `domain` and `name`, the stored URL is never normalized on\n * write, so any URL form may be on file. A slug is globally unique on\n * LinkedIn, so a positive `eq` matches at most one organization. Only the\n * first path segment identifies the company, so a sub-page link resolves the\n * company itself — `eq: \".../company/acme/about/\"` matches a stored\n * \".../company/acme\", and a stored sub-page URL is matched by the plain\n * company URL. Percent-encoded and literal non-ASCII slugs are the same page\n * (\"/company/ko%C3%A7-holding\" matches a stored \"/company/koç-holding\" and\n * the reverse). The slug is **case-sensitive** — scheme, host, sub-pages,\n * percent-encoding and trailing punctuation are normalized away, but\n * \"/company/Acme\" and \"/company/acme\" are two different pages, so pass the\n * slug exactly as LinkedIn spells it. A value yielding no company\n * slug (a `/in/` person profile, a bare slug, a school or showcase page, a\n * non-LinkedIn URL) matches no organization rather than silently dropping the\n * constraint. `presence: true` is a check on the raw column — it returns\n * organizations that have any LinkedIn URL on file, even one this filter's\n * `eq` could not parse — and applies independently of `valid`, so combine\n * `valid: false` with it to reach organizations reachable on LinkedIn but\n * below the quality floor. Note that `notEq`/`notIn` also exclude\n * organizations with no LinkedIn URL at all, matching how every other\n * negative string operator in this schema treats NULL.\n */\n linkedin?: InputMaybe<StringFilterInput>;\n /**\n * Filter on the organization's name. Values are matched against a\n * normalized form — transliterated, downcased, punctuation-stripped and\n * with trailing legal-form tokens dropped — so `eq: \"Acme\"` matches a\n * stored \"ACME, Inc.\" and `eq: \"Sortlist NV/SA\"` matches a stored\n * \"Sortlist\". Matching stays exact *after* that normalization: it is not\n * a substring or fuzzy search, so \"Acme\" does not match \"Acme Widgets\".\n * A name is not unique in Atlas (country subsidiaries, \"<brand> SA\" /\n * \"<brand> NV\" pairs), so every match is returned, ordered by the\n * connection's default confidence_score DESC — use\n * `searchOrganization(input: { domain: ... })` instead when the caller has\n * a domain and needs exactly one record. A value that normalizes to\n * nothing (punctuation only) matches no organization rather than silently\n * dropping the constraint. `presence: true` returns only organizations\n * that have a name, re-expressing `valid`'s name floor on its own, so\n * callers passing `valid: false` can keep it without the confidence and\n * domain-reachability floors.\n */\n name?: InputMaybe<StringFilterInput>;\n /** Return only complete records. */\n valid?: InputMaybe<Scalars['Boolean']['input']>;\n};\n\n/** A page of organizations a `findOrganizations` call asked for, sent again as Atlas fills it; the last version is COMPLETE. */\nexport type OrganizationFindProgress = {\n __typename?: 'OrganizationFindProgress';\n /** The externalId of the call that asked for the page. */\n externalId: Scalars['ID']['output'];\n /**\n * The organizations on the page, revealed as the call asked.\n * `pageInfo.endCursor` is the `page.after` of the call asking for the next page.\n */\n organizations: OrganizationPage;\n /**\n * The state of this page, not of the search: FILLING while Atlas may send it\n * again, COMPLETE on its last version. Whether more records follow is\n * `pageInfo.hasNextPage`.\n */\n status: FindPageStatus;\n};\n\n/** The organization behind the IP an `identifyOrganizationByIp` call named. */\nexport type OrganizationIdentifyResult = {\n __typename?: 'OrganizationIdentifyResult';\n /** The externalId the caller passed, naming the request this result answers. */\n externalId: Scalars['ID']['output'];\n /** The organization identified behind the IP, revealed as the call asked, or null when Atlas could not tell who it is. */\n organization?: Maybe<Organization>;\n /**\n * Per reach dimension the `organization` selection touched: what this result\n * revealed, what the company already held, and what stays locked. Empty when the\n * organization is null or no reach field is selected.\n */\n reveals: Array<RevealDimensionStatus>;\n};\n\n/** OneOf input for searchOrganization — supply exactly one lookup mode. */\nexport type OrganizationLookupInput = {\n /** Look up by visitor IP address. */\n byIp?: InputMaybe<OrganizationByIpInput>;\n /** Look up by company's primary web domain (no scheme, no trailing slash). */\n domain?: InputMaybe<Scalars['String']['input']>;\n};\n\n/**\n * One page of organizations a `findOrganizations` call asked for. Not a\n * connection: it takes no paging arguments, and the next page is asked for with\n * `findOrganizations(page: { after: pageInfo.endCursor })`.\n */\nexport type OrganizationPage = RevealedPage & {\n __typename?: 'OrganizationPage';\n /**\n * Reports what this page cost in reveal credits. `held` is the ceiling reserved\n * for every requested dimension on every row, and `used` is the units the page\n * consumed. `used` is zero when the query revealed nothing, while `held` still\n * reports the reserved ceiling.\n */\n credits: RevealCredits;\n /** The organizations on the page, each with what this page revealed about it. */\n edges: Array<OrganizationEdge>;\n /** The organizations on the page. */\n nodes: Array<Organization>;\n /**\n * Where the page sits in the search: `endCursor` is the `page.after` of the call\n * for the next page, and `hasNextPage` says whether more organizations are\n * listed after it.\n */\n pageInfo: PageInfo;\n /** Number of organizations the search has listed so far, at most 1000. */\n totalCount: Scalars['Int']['output'];\n};\n\n/** Autogenerated return type of OrganizationSearchResult. */\nexport type OrganizationSearchResultPayload = {\n __typename?: 'OrganizationSearchResultPayload';\n /** The externalId the caller passed, naming the request this result answers. */\n externalId: Scalars['ID']['output'];\n /** The organization found for the lookup, or null when nothing matched. */\n organization?: Maybe<Organization>;\n};\n\n/** Fields available for sorting organizations. */\nexport type OrganizationSortField =\n /** Sort by merged confidence score, highest first by default. */\n | 'CONFIDENCE_SCORE'\n /** Sort by creation timestamp. */\n | 'CREATED_AT'\n /** Cosine distance from the description embedding. Requires query. */\n | 'DESCRIPTION_DISTANCE'\n /** Cosine distance from the industry embedding. Requires query. */\n | 'INDUSTRY_DISTANCE'\n /** Sort alphabetically by legal or trade name. */\n | 'NAME';\n\n/** Sort configuration for organizations. */\nexport type OrganizationSortInput = {\n direction?: InputMaybe<SortDirection>;\n field: OrganizationSortField;\n /** Required when field is DESCRIPTION_DISTANCE or INDUSTRY_DISTANCE. Text to embed for distance ordering. */\n query?: InputMaybe<Scalars['String']['input']>;\n};\n\n/**\n * Filter criteria for the find operations' organizations. Applies exactly what it\n * states: no quality floor is added, so an organization with only a name is\n * returned unless a filter here excludes it.\n */\nexport type OrganizationsFilterInput = {\n /** Filters on the employee-count range with `overlaps`, e.g. `{ overlaps: [0, 100] }` for fewer than 100 employees. */\n companySize?: InputMaybe<RangeFilterInput>;\n /** Filters by confidence score (0.0–1.0). */\n confidenceScore?: InputMaybe<FloatFilterInput>;\n /** Description embedding filters, matched exactly as `OrganizationFilterInput.description` matches them. */\n description?: InputMaybe<Array<EmbeddingFilterInput>>;\n /**\n * Keeps organizations with an address in any of the given Mercator location\n * division IDs (`eq`/`in`), or excludes them (`notEq`/`notIn`).\n */\n divisionIds?: InputMaybe<IdFilterInput>;\n /**\n * Filters on the organization's domain, host downcased and a leading \"www.\"\n * dropped before an exact match. A positive `eq` matches at most one organization.\n */\n domain?: InputMaybe<StringFilterInput>;\n /** Filters by organization global id. */\n id?: InputMaybe<IdFilterInput>;\n /** Industry embedding filters, matched exactly as `OrganizationFilterInput.industry` matches them. */\n industry?: InputMaybe<Array<EmbeddingFilterInput>>;\n /** Filters on the organization's LinkedIn company page, matched on its case-sensitive company slug. */\n linkedinUrl?: InputMaybe<StringFilterInput>;\n /** Filters on the organization's normalized name. `presence: true` keeps organizations that have one. */\n name?: InputMaybe<StringFilterInput>;\n /** Keeps organizations Atlas can reach through the listed channels. */\n reachableBy?: InputMaybe<OrganizationChannelFilterInput>;\n};\n\n/** Channel a channel account operates on. One of: linkedin, email. */\nexport type OutboundChannel =\n /** The email channel. */\n | 'EMAIL'\n /** The linkedin channel. */\n | 'LINKEDIN';\n\n/**\n * An account the gateway operates on a channel, for one consumer: who the account\n * is, and the sessions through which it has been reached.\n */\nexport type OutboundChannelAccount = Node & {\n __typename?: 'OutboundChannelAccount';\n /**\n * Every `authenticateOutboundChannelAccount` call made on the account, newest\n * first, with its outcome: the way to tell a sign-in nobody finished from one\n * the gateway refused as `IDENTITY_MISMATCH`.\n */\n authenticationAttempts: OutboundChannelAuthenticationAttemptConnection;\n /** Channel the account operates on. */\n channel: OutboundChannel;\n /**\n * The Hermes company the account belongs to, as the GlobalID Hermes addresses it\n * by: the company the registering request acted for. Null when that request\n * acted for none, as a Cognito service token does, or when the account was\n * registered before companies were recorded.\n */\n companyId?: Maybe<Scalars['ID']['output']>;\n /** When the account was registered. */\n createdAt: Scalars['ISO8601DateTime']['output'];\n /**\n * The reference the consumer registered the account under, in its own terms: the\n * tenant the identity rule applies within. Null when the account was registered without one.\n */\n externalId?: Maybe<Scalars['String']['output']>;\n id: Scalars['ID']['output'];\n /**\n * Who the account is, typed by channel. Populated once a connection has\n * confirmed the identity; null while it is a draft, or when the consumer only\n * claimed an identity that no connection has confirmed yet.\n */\n identity?: Maybe<OutboundChannelAccountIdentity>;\n /**\n * Who the consumer said the account is for at registration, typed by channel,\n * carrying only the identifier it claimed (`memberId` on LinkedIn). Populated\n * from the claim as long as the account lives, confirmed or not; null when the\n * consumer claimed nothing. `identity` is the confirmed one.\n */\n identityClaim?: Maybe<OutboundChannelAccountIdentity>;\n /**\n * Subject of the token that registered the account and owns it: a person's\n * `auth0|…` or an application's `application:<uuid>`, the same value Hermes\n * knows the caller by.\n */\n ownerSub: Scalars['String']['output'];\n /**\n * Until when the provider asked the gateway to hold the account's actions, after\n * a `429`; the pending ones are rebooked after it. Null when the account is not paused.\n */\n pausedUntil?: Maybe<Scalars['ISO8601DateTime']['output']>;\n /**\n * Provider of the running connection, or of the latest one while none runs; the\n * channel's default before any connection exists.\n */\n provider: OutboundChannelProvider;\n /** How the account has been reached over time, newest first: at most one `RUNNING`, the rest drafts, disconnected or retired. */\n sessions: OutboundChannelProviderSessionConnection;\n /** Lifecycle state of the account. */\n status: OutboundChannelAccountStatus;\n /** Address the account's events are delivered to. */\n webhookUrl: Scalars['String']['output'];\n};\n\n\n/**\n * An account the gateway operates on a channel, for one consumer: who the account\n * is, and the sessions through which it has been reached.\n */\nexport type OutboundChannelAccountAuthenticationAttemptsArgs = {\n after?: InputMaybe<Scalars['String']['input']>;\n before?: InputMaybe<Scalars['String']['input']>;\n first?: InputMaybe<Scalars['Int']['input']>;\n last?: InputMaybe<Scalars['Int']['input']>;\n};\n\n\n/**\n * An account the gateway operates on a channel, for one consumer: who the account\n * is, and the sessions through which it has been reached.\n */\nexport type OutboundChannelAccountSessionsArgs = {\n after?: InputMaybe<Scalars['String']['input']>;\n before?: InputMaybe<Scalars['String']['input']>;\n first?: InputMaybe<Scalars['Int']['input']>;\n last?: InputMaybe<Scalars['Int']['input']>;\n};\n\n/**\n * How the account owner authenticates at the provider. One of:\n * OutboundChannelHostedAuthenticationLink, OutboundChannelCredentialsAccepted.\n */\nexport type OutboundChannelAccountAuthentication = OutboundChannelCredentialsAccepted | OutboundChannelHostedAuthenticationLink;\n\n/** The connection type for OutboundChannelAccount. */\nexport type OutboundChannelAccountConnection = {\n __typename?: 'OutboundChannelAccountConnection';\n /** A list of edges. */\n edges?: Maybe<Array<Maybe<OutboundChannelAccountEdge>>>;\n /** A list of nodes. */\n nodes?: Maybe<Array<Maybe<OutboundChannelAccount>>>;\n /** Information to aid in pagination. */\n pageInfo: PageInfo;\n /** Total number of items across all pages. */\n totalCount: Scalars['Int']['output'];\n};\n\n/**\n * The credentials the account owner authenticates with: exactly one of the\n * variants, typed by channel and accepted only by a provider that authenticates this way.\n */\nexport type OutboundChannelAccountCredentialsInput = {\n /** A LinkedIn session cookie. */\n linkedinCookie?: InputMaybe<LinkedinCookieCredentialsInput>;\n};\n\n/** An edge in a connection. */\nexport type OutboundChannelAccountEdge = {\n __typename?: 'OutboundChannelAccountEdge';\n /** A cursor for use in pagination. */\n cursor: Scalars['String']['output'];\n /** The item at the end of the edge. */\n node?: Maybe<OutboundChannelAccount>;\n};\n\n/** Narrows `outboundChannelAccounts`. */\nexport type OutboundChannelAccountFilterInput = {\n /** Keep only the accounts of these channels. */\n channel?: InputMaybe<OutboundChannelFilterInput>;\n /**\n * Keep only the accounts owned by these subjects. Of use to a token carrying\n * `outreach/*:read`, which sees every consumer's accounts.\n */\n ownerSub?: InputMaybe<StringFilterInput>;\n /** Keep only the accounts whose `provider` is one of these: the running connection's, or the latest one's while none runs. */\n provider?: InputMaybe<OutboundChannelProviderFilterInput>;\n /**\n * Keep only the accounts in these states. Naming `REMOVED` in `eq` or `in` is\n * the one way to list removed accounts, which the list leaves out otherwise.\n */\n status?: InputMaybe<OutboundChannelAccountStatusFilterInput>;\n};\n\n/** Who a channel account is connected as, typed by channel. One of: LinkedinIdentity, EmailIdentity. */\nexport type OutboundChannelAccountIdentity = EmailIdentity | LinkedinIdentity;\n\n/** Lifecycle state of a channel account. One of: draft, running, disconnected, removed. */\nexport type OutboundChannelAccountStatus =\n /** The provider session expired or was revoked; a new authentication is needed. */\n | 'DISCONNECTED'\n /** Registered, never authenticated at the provider yet. */\n | 'DRAFT'\n /** Removed for good, by the consumer or at the provider; it no longer resolves by id. */\n | 'REMOVED'\n /** Authenticated and able to perform actions. */\n | 'RUNNING';\n\n/** Filter on an account's lifecycle state (eq/in/notEq/notIn). */\nexport type OutboundChannelAccountStatusFilterInput = {\n /** Exact match. */\n eq?: InputMaybe<OutboundChannelAccountStatus>;\n /** Match any of these values. */\n in?: InputMaybe<Array<OutboundChannelAccountStatus>>;\n /** Exclude exact match. */\n notEq?: InputMaybe<OutboundChannelAccountStatus>;\n /** Exclude any of these values. */\n notIn?: InputMaybe<Array<OutboundChannelAccountStatus>>;\n};\n\n/** One piece of work a consumer asked the gateway to perform on a channel account. */\nexport type OutboundChannelAction = Node & {\n __typename?: 'OutboundChannelAction';\n /** What the action does. */\n actionType: OutboundChannelActionType;\n /** The account the action runs on. */\n channelAccount: OutboundChannelAccount;\n /** When the action settled, completed or failed. */\n completedAt?: Maybe<Scalars['ISO8601DateTime']['output']>;\n /** When the action was accepted. */\n createdAt: Scalars['ISO8601DateTime']['output'];\n /** Why the action failed: `{ code, status, message }`, the same object `channel_action.failed` carries. Null unless `FAILED`. */\n error?: Maybe<Scalars['JSON']['output']>;\n /**\n * The caller's own id for this action on its account, or the one the gateway\n * derived from the input when none was given. Unique per account, dedupes a\n * repeated call, and is what `outboundChannelActionResult` subscribes on; the\n * same word as Atlas's async mutations.\n */\n externalId: Scalars['String']['output'];\n id: Scalars['ID']['output'];\n /** The action's input, as accepted; attachment contents are replaced by their `size` in bytes. */\n input: Scalars['JSON']['output'];\n /**\n * What the provider answered, typed by action — for `LINKEDIN_SEND_MESSAGE`, `{\n * chat_id, message_id }`, LinkedIn's own ids; for `EMAIL_SEND`, `{\n * email_message_id, email_thread_id, rfc_message_id, provider_message_id,\n * provider_thread_id, sent_at }`. Null unless `COMPLETED`.\n */\n result?: Maybe<Scalars['JSON']['output']>;\n /**\n * When the action is due to run, the slot the gateway booked for it within the\n * account's pace; moves later when the provider pauses the account. Null once it\n * has run. A caller decides on it whether to wait on\n * `outboundChannelActionResult` or to rely on the webhook.\n */\n scheduledAt?: Maybe<Scalars['ISO8601DateTime']['output']>;\n /** Where the action stands. */\n state: OutboundChannelActionState;\n};\n\n/** What became of one action the caller asked to cancel. One of: cancelled, already_cancelled, running, settled, unknown. */\nexport type OutboundChannelActionCancellation =\n /** A previous call already stopped it; nothing changed. */\n | 'ALREADY_CANCELLED'\n /** Stopped in time; it will not reach the provider. */\n | 'CANCELLED'\n /** Too late: the provider is being called and the outcome is still open. */\n | 'RUNNING'\n /** Too late: it already completed or failed. */\n | 'SETTLED'\n /** No such action on this account; it may belong to another one. */\n | 'UNKNOWN';\n\n/** What became of one of the actions the caller asked to cancel. */\nexport type OutboundChannelActionCancellationResult = Node & {\n __typename?: 'OutboundChannelActionCancellationResult';\n /** The id the caller passed in, echoed back unchanged. */\n channelActionId: Scalars['ID']['output'];\n id: Scalars['ID']['output'];\n /** Whether it was stopped, and why not when it was not. */\n outcome: OutboundChannelActionCancellation;\n};\n\n/** The connection type for OutboundChannelAction. */\nexport type OutboundChannelActionConnection = {\n __typename?: 'OutboundChannelActionConnection';\n /** A list of edges. */\n edges?: Maybe<Array<Maybe<OutboundChannelActionEdge>>>;\n /** A list of nodes. */\n nodes?: Maybe<Array<Maybe<OutboundChannelAction>>>;\n /** Information to aid in pagination. */\n pageInfo: PageInfo;\n /** Total number of items across all pages. */\n totalCount: Scalars['Int']['output'];\n};\n\n/** An edge in a connection. */\nexport type OutboundChannelActionEdge = {\n __typename?: 'OutboundChannelActionEdge';\n /** A cursor for use in pagination. */\n cursor: Scalars['String']['output'];\n /** The item at the end of the edge. */\n node?: Maybe<OutboundChannelAction>;\n};\n\n/** Narrows `outboundChannelActions`. */\nexport type OutboundChannelActionFilterInput = {\n /** Keep only the actions of these types. */\n actionType?: InputMaybe<OutboundChannelActionTypeFilterInput>;\n /** Keep only the actions in these states. */\n state?: InputMaybe<OutboundChannelActionStateFilterInput>;\n};\n\n/** The action to perform: exactly one of the variants, typed by channel. */\nexport type OutboundChannelActionInput = {\n /** Sends an email from the account's mailbox. */\n emailSend?: InputMaybe<EmailSendInput>;\n /** Withdraw a LinkedIn connection request. */\n linkedinCancelInvitation?: InputMaybe<LinkedinCancelInvitationInput>;\n /** Send a LinkedIn connection request. */\n linkedinInvite?: InputMaybe<LinkedinInviteInput>;\n /** Read a LinkedIn member's profile. */\n linkedinLookupProfile?: InputMaybe<LinkedinLookupProfileInput>;\n /** Send a LinkedIn message. */\n linkedinSendMessage?: InputMaybe<LinkedinSendMessageInput>;\n /** Visit a LinkedIn profile. */\n linkedinVisit?: InputMaybe<LinkedinVisitInput>;\n};\n\n/** Autogenerated return type of OutboundChannelActionResult. */\nexport type OutboundChannelActionResultPayload = {\n __typename?: 'OutboundChannelActionResultPayload';\n /** The settled action, with its `result` or `error`. */\n channelAction: OutboundChannelAction;\n};\n\n/** Where an action stands. One of: pending, executing, completed, failed, cancelled. */\nexport type OutboundChannelActionState =\n /** Stopped by the caller before it ran; it never reached the provider. */\n | 'CANCELLED'\n /** Performed; the result is in `channel_action.completed`. */\n | 'COMPLETED'\n /** Being performed. */\n | 'EXECUTING'\n /** Refused or failed; the error is in `channel_action.failed`. */\n | 'FAILED'\n /** Accepted, not performed yet. */\n | 'PENDING';\n\n/** Filter on where an action stands (eq/in/notEq/notIn). */\nexport type OutboundChannelActionStateFilterInput = {\n /** Exact match. */\n eq?: InputMaybe<OutboundChannelActionState>;\n /** Match any of these values. */\n in?: InputMaybe<Array<OutboundChannelActionState>>;\n /** Exclude exact match. */\n notEq?: InputMaybe<OutboundChannelActionState>;\n /** Exclude any of these values. */\n notIn?: InputMaybe<Array<OutboundChannelActionState>>;\n};\n\n/** What an action does, typed by channel. */\nexport type OutboundChannelActionType =\n /** Sends an email from the account's mailbox. */\n | 'EMAIL_SEND'\n /** Withdraws a LinkedIn connection request. */\n | 'LINKEDIN_CANCEL_INVITATION'\n /** Sends a LinkedIn connection request to a member. */\n | 'LINKEDIN_INVITE'\n /** Reads a LinkedIn member's profile as the account. */\n | 'LINKEDIN_LOOKUP_PROFILE'\n /** Sends a LinkedIn message to a member. */\n | 'LINKEDIN_SEND_MESSAGE'\n /** Visits a LinkedIn profile, notifying the member when they allow it. */\n | 'LINKEDIN_VISIT';\n\n/** Filter on what an action does (eq/in/notEq/notIn). */\nexport type OutboundChannelActionTypeFilterInput = {\n /** Exact match. */\n eq?: InputMaybe<OutboundChannelActionType>;\n /** Match any of these values. */\n in?: InputMaybe<Array<OutboundChannelActionType>>;\n /** Exclude exact match. */\n notEq?: InputMaybe<OutboundChannelActionType>;\n /** Exclude any of these values. */\n notIn?: InputMaybe<Array<OutboundChannelActionType>>;\n};\n\n/**\n * One `authenticateOutboundChannelAccount` call and what became of it: the hosted\n * sign-in or credentials it issued, on which connection, and the outcome once the\n * provider answered. An account keeps every attempt, refused ones included, so an\n * operator can tell a sign-in that never happened from one the gateway turned down.\n */\nexport type OutboundChannelAuthenticationAttempt = Node & {\n __typename?: 'OutboundChannelAuthenticationAttempt';\n /** The account the attempt was made on. */\n channelAccount: OutboundChannelAccount;\n /** When issued. */\n createdAt: Scalars['ISO8601DateTime']['output'];\n /** Until when the provider's answer is accepted. */\n expiresAt: Scalars['ISO8601DateTime']['output'];\n id: Scalars['ID']['output'];\n /** Where it ended up: `PENDING` or `EXPIRED` while unsettled, otherwise what the provider and the identity read decided. */\n outcome: OutboundChannelAuthenticationAttemptOutcome;\n /** The provider signed in with, from the connection. */\n provider?: Maybe<OutboundChannelProvider>;\n /** The connection the attempt was made on; null for attempts recorded before connections existed. */\n providerConnection?: Maybe<OutboundChannelProviderSession>;\n /** When the provider answered; null while pending or expired. */\n settledAt?: Maybe<Scalars['ISO8601DateTime']['output']>;\n};\n\n/** The connection type for OutboundChannelAuthenticationAttempt. */\nexport type OutboundChannelAuthenticationAttemptConnection = {\n __typename?: 'OutboundChannelAuthenticationAttemptConnection';\n /** A list of edges. */\n edges?: Maybe<Array<Maybe<OutboundChannelAuthenticationAttemptEdge>>>;\n /** A list of nodes. */\n nodes?: Maybe<Array<Maybe<OutboundChannelAuthenticationAttempt>>>;\n /** Information to aid in pagination. */\n pageInfo: PageInfo;\n /** Total number of items across all pages. */\n totalCount: Scalars['Int']['output'];\n};\n\n/** An edge in a connection. */\nexport type OutboundChannelAuthenticationAttemptEdge = {\n __typename?: 'OutboundChannelAuthenticationAttemptEdge';\n /** A cursor for use in pagination. */\n cursor: Scalars['String']['output'];\n /** The item at the end of the edge. */\n node?: Maybe<OutboundChannelAuthenticationAttempt>;\n};\n\n/**\n * Where an authentication attempt ended up. One of: pending, expired, connected,\n * provider_account_bound, provider_account_already_connected, identity_mismatch,\n * identity_already_connected, session_invalid, credentials_rejected,\n * code_rejected, scopes_missing, country_unsupported.\n */\nexport type OutboundChannelAuthenticationAttemptOutcome =\n /** The provider refused the authorization code handed in, usually because it was already used or has expired. */\n | 'CODE_REJECTED'\n /** The identity was read and the account now runs through this connection. */\n | 'CONNECTED'\n /**\n * No longer produced: a country the gateway cannot exit from now falls back to\n * the nearest one it serves. Kept for attempts settled before that change.\n */\n | 'COUNTRY_UNSUPPORTED'\n /** The provider refused the credentials handed in. */\n | 'CREDENTIALS_REJECTED'\n /** Never completed before its deadline. */\n | 'EXPIRED'\n /**\n * The member who signed in already runs another live account of the same owner;\n * another owner's account for that member is no obstacle.\n */\n | 'IDENTITY_ALREADY_CONNECTED'\n /**\n * The person who signed in is not the member the account was claimed for; the\n * connection was released and the account left as it was.\n */\n | 'IDENTITY_MISMATCH'\n /** Issued, the owner has not finished signing in; expires ten minutes after issue. */\n | 'PENDING'\n /** The provider account it produced already runs another live account of the gateway. */\n | 'PROVIDER_ACCOUNT_ALREADY_CONNECTED'\n /** The provider confirmed the sign-in; the identity is being read. */\n | 'PROVIDER_ACCOUNT_BOUND'\n /** The owner signed in without granting every permission the gateway asked for; nothing was kept. */\n | 'SCOPES_MISSING'\n /** The provider session died before the identity could be read. */\n | 'SESSION_INVALID';\n\n/**\n * The credentials were verified at the channel and stored; nothing is left for the\n * account owner to do. The account is connected only when the\n * `channel_account.connected` event arrives, a few seconds later.\n */\nexport type OutboundChannelCredentialsAccepted = {\n __typename?: 'OutboundChannelCredentialsAccepted';\n /** When the credentials were verified. */\n acceptedAt: Scalars['ISO8601DateTime']['output'];\n /** The channel-side id the credentials resolved to — for LinkedIn, the member id (`ACoAA…`). */\n providerAccountId: Scalars['String']['output'];\n};\n\n/** One event the gateway sent, or is sending, to the consumer's webhook. */\nexport type OutboundChannelEvent = Node & {\n __typename?: 'OutboundChannelEvent';\n /** How many deliveries were tried. */\n attempts: Scalars['Int']['output'];\n /** The account the event is about. */\n channelAccount: OutboundChannelAccount;\n /** When the gateway recorded the event. */\n createdAt: Scalars['ISO8601DateTime']['output'];\n /** When the gateway gave up delivering it. */\n deadAt?: Maybe<Scalars['ISO8601DateTime']['output']>;\n /** When the consumer's webhook accepted it. */\n deliveredAt?: Maybe<Scalars['ISO8601DateTime']['output']>;\n /** The type the consumer receives, one of the events documented in the API reference (`channel_action.completed`, …). */\n eventType: Scalars['String']['output'];\n id: Scalars['ID']['output'];\n /** HTTP status of the last delivery attempt. */\n lastResponseStatus?: Maybe<Scalars['Int']['output']>;\n /** When the thing the event reports happened. */\n occurredAt: Scalars['ISO8601DateTime']['output'];\n /** The event's payload, as delivered. */\n payload: Scalars['JSON']['output'];\n /** Where the delivery stands. */\n state: OutboundChannelEventState;\n};\n\n/** The connection type for OutboundChannelEvent. */\nexport type OutboundChannelEventConnection = {\n __typename?: 'OutboundChannelEventConnection';\n /** A list of edges. */\n edges?: Maybe<Array<Maybe<OutboundChannelEventEdge>>>;\n /** A list of nodes. */\n nodes?: Maybe<Array<Maybe<OutboundChannelEvent>>>;\n /** Information to aid in pagination. */\n pageInfo: PageInfo;\n /** Total number of items across all pages. */\n totalCount: Scalars['Int']['output'];\n};\n\n/** An edge in a connection. */\nexport type OutboundChannelEventEdge = {\n __typename?: 'OutboundChannelEventEdge';\n /** A cursor for use in pagination. */\n cursor: Scalars['String']['output'];\n /** The item at the end of the edge. */\n node?: Maybe<OutboundChannelEvent>;\n};\n\n/** Narrows `outboundChannelEvents`. */\nexport type OutboundChannelEventFilterInput = {\n /** Keep only these event types, as the consumer receives them (`channel_action.failed`, `message.received`, …). */\n eventType?: InputMaybe<StringFilterInput>;\n /** Keep only the events in these delivery states. */\n state?: InputMaybe<OutboundChannelEventStateFilterInput>;\n};\n\n/** Where an event stands on its way to the consumer's webhook. One of: pending, delivered, dead. */\nexport type OutboundChannelEventState =\n /** Given up: the webhook refused it (4xx) or failed eight times. */\n | 'DEAD'\n /** The consumer's webhook answered 2xx. */\n | 'DELIVERED'\n /** Not delivered yet; the gateway is still trying. */\n | 'PENDING';\n\n/** Filter on an event's delivery state (eq/in/notEq/notIn). Derived from `deliveredAt` and `deadAt`, not a column. */\nexport type OutboundChannelEventStateFilterInput = {\n /** Exact match. */\n eq?: InputMaybe<OutboundChannelEventState>;\n /** Match any of these values. */\n in?: InputMaybe<Array<OutboundChannelEventState>>;\n /** Exclude exact match. */\n notEq?: InputMaybe<OutboundChannelEventState>;\n /** Exclude any of these values. */\n notIn?: InputMaybe<Array<OutboundChannelEventState>>;\n};\n\n/** Filter on channel (eq/in/notEq/notIn). */\nexport type OutboundChannelFilterInput = {\n /** Exact match. */\n eq?: InputMaybe<OutboundChannel>;\n /** Match any of these values. */\n in?: InputMaybe<Array<OutboundChannel>>;\n /** Exclude exact match. */\n notEq?: InputMaybe<OutboundChannel>;\n /** Exclude any of these values. */\n notIn?: InputMaybe<Array<OutboundChannel>>;\n};\n\n/**\n * A short-lived page hosted by the provider where the account owner signs in. Send\n * the user's browser there; the account is connected only when the\n * `channel_account.connected` event arrives, never from the return redirect.\n */\nexport type OutboundChannelHostedAuthenticationLink = {\n __typename?: 'OutboundChannelHostedAuthenticationLink';\n /** Address of the hosted sign-in page. Valid for about ten minutes. */\n url: Scalars['String']['output'];\n};\n\n/** Who the account is for, typed by channel: exactly one variant, which must match the account's channel. */\nexport type OutboundChannelIdentityInput = {\n /** A mailbox. */\n email?: InputMaybe<EmailIdentityInput>;\n /** A LinkedIn member. */\n linkedin?: InputMaybe<LinkedinIdentityInput>;\n};\n\n/** Provider running a channel account behind the gateway. One of: unipile, linkedin_direct, google, microsoft. */\nexport type OutboundChannelProvider =\n /** The google provider. */\n | 'GOOGLE'\n /** The linkedin_direct provider. */\n | 'LINKEDIN_DIRECT'\n /** The microsoft provider. */\n | 'MICROSOFT'\n /** The unipile provider. */\n | 'UNIPILE';\n\n/** One delivery the provider made to the gateway's webhook about an account. */\nexport type OutboundChannelProviderEvent = Node & {\n __typename?: 'OutboundChannelProviderEvent';\n /** When the gateway stored it. */\n createdAt: Scalars['ISO8601DateTime']['output'];\n /** Why processing failed, when it did. */\n error?: Maybe<Scalars['String']['output']>;\n /** The type in the provider's own vocabulary. */\n eventType: Scalars['String']['output'];\n /** The provider's id of the delivery. */\n externalId: Scalars['String']['output'];\n id: Scalars['ID']['output'];\n /** The gateway's own event type it was translated to; null when the gateway stores this type without effect. */\n kind?: Maybe<Scalars['String']['output']>;\n /** The delivery's body, as received. */\n payload: Scalars['JSON']['output'];\n /** When the gateway processed it; null while it waits. */\n processedAt?: Maybe<Scalars['ISO8601DateTime']['output']>;\n /** The provider that sent it. */\n provider: OutboundChannelProvider;\n /** When the gateway received it. */\n receivedAt: Scalars['ISO8601DateTime']['output'];\n};\n\n/** The connection type for OutboundChannelProviderEvent. */\nexport type OutboundChannelProviderEventConnection = {\n __typename?: 'OutboundChannelProviderEventConnection';\n /** A list of edges. */\n edges?: Maybe<Array<Maybe<OutboundChannelProviderEventEdge>>>;\n /** A list of nodes. */\n nodes?: Maybe<Array<Maybe<OutboundChannelProviderEvent>>>;\n /** Information to aid in pagination. */\n pageInfo: PageInfo;\n /** Total number of items across all pages. */\n totalCount: Scalars['Int']['output'];\n};\n\n/** An edge in a connection. */\nexport type OutboundChannelProviderEventEdge = {\n __typename?: 'OutboundChannelProviderEventEdge';\n /** A cursor for use in pagination. */\n cursor: Scalars['String']['output'];\n /** The item at the end of the edge. */\n node?: Maybe<OutboundChannelProviderEvent>;\n};\n\n/** Narrows `outboundChannelProviderEvents`. */\nexport type OutboundChannelProviderEventFilterInput = {\n /** Keep only these types, in the provider's own vocabulary (`message.new`, `account.status.disconnected`, …). */\n eventType?: InputMaybe<StringFilterInput>;\n /**\n * Keep only the deliveries the gateway translated to these event types\n * (`message.received`, `channel_account.disconnected`, …). `blank: true` keeps\n * the ones it stores without effect.\n */\n kind?: InputMaybe<StringFilterInput>;\n};\n\n/** Filter on provider (eq/in/notEq/notIn). */\nexport type OutboundChannelProviderFilterInput = {\n /** Exact match. */\n eq?: InputMaybe<OutboundChannelProvider>;\n /** Match any of these values. */\n in?: InputMaybe<Array<OutboundChannelProvider>>;\n /** Exclude exact match. */\n notEq?: InputMaybe<OutboundChannelProvider>;\n /** Exclude any of these values. */\n notIn?: InputMaybe<Array<OutboundChannelProvider>>;\n};\n\n/**\n * One way an account has been reached: a provider, the id that provider knows the\n * account by, and the life of that link. An account works through one running\n * connection at a time; the others are its history.\n */\nexport type OutboundChannelProviderSession = Node & {\n __typename?: 'OutboundChannelProviderSession';\n /** The account this connection reaches. */\n channelAccount: OutboundChannelAccount;\n /**\n * When its current run began — reset every time the connection starts running\n * again, so it reads as how long the session has been up; null while a draft.\n */\n connectedAt?: Maybe<Scalars['ISO8601DateTime']['output']>;\n /** When opened. */\n createdAt: Scalars['ISO8601DateTime']['output'];\n id: Scalars['ID']['output'];\n /** The provider. */\n provider: OutboundChannelProvider;\n /**\n * The id the provider knows the account by — Unipile's account id, or the\n * LinkedIn member id for the direct provider. Null until bound.\n */\n providerAccountId?: Maybe<Scalars['String']['output']>;\n /** When it was replaced or removed, and released at the provider. */\n retiredAt?: Maybe<Scalars['ISO8601DateTime']['output']>;\n /** Where the connection stands. */\n status: OutboundChannelProviderSessionStatus;\n};\n\n/** The connection type for OutboundChannelProviderSession. */\nexport type OutboundChannelProviderSessionConnection = {\n __typename?: 'OutboundChannelProviderSessionConnection';\n /** A list of edges. */\n edges?: Maybe<Array<Maybe<OutboundChannelProviderSessionEdge>>>;\n /** A list of nodes. */\n nodes?: Maybe<Array<Maybe<OutboundChannelProviderSession>>>;\n /** Information to aid in pagination. */\n pageInfo: PageInfo;\n /** Total number of items across all pages. */\n totalCount: Scalars['Int']['output'];\n};\n\n/** An edge in a connection. */\nexport type OutboundChannelProviderSessionEdge = {\n __typename?: 'OutboundChannelProviderSessionEdge';\n /** A cursor for use in pagination. */\n cursor: Scalars['String']['output'];\n /** The item at the end of the edge. */\n node?: Maybe<OutboundChannelProviderSession>;\n};\n\n/** State of one connection between an account and a provider. One of: draft, running, disconnected, retired. */\nexport type OutboundChannelProviderSessionStatus =\n /** Its provider session expired or was revoked; re-authenticate or switch. */\n | 'DISCONNECTED'\n /** Opened by an authentication attempt, not confirmed yet. */\n | 'DRAFT'\n /** Replaced by another connection or removed with the account; released at the provider. */\n | 'RETIRED'\n /** The connection the account works through. */\n | 'RUNNING';\n\n/** Information about pagination in a connection. */\nexport type PageInfo = {\n __typename?: 'PageInfo';\n /** When paginating forwards, the cursor to continue. */\n endCursor?: Maybe<Scalars['String']['output']>;\n /** When paginating forwards, are there more items? */\n hasNextPage: Scalars['Boolean']['output'];\n /** When paginating backwards, are there more items? */\n hasPreviousPage: Scalars['Boolean']['output'];\n /** When paginating backwards, the cursor to continue. */\n startCursor?: Maybe<Scalars['String']['output']>;\n};\n\n/** Autogenerated input type of PerformOutboundChannelAction */\nexport type PerformOutboundChannelActionInput = {\n /** What to do, exactly one variant. */\n action: OutboundChannelActionInput;\n /** Global id of the account to act with. Must be `RUNNING`. */\n channelAccountId: Scalars['ID']['input'];\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: InputMaybe<Scalars['String']['input']>;\n /**\n * Caller's key for this action. Omitted, the gateway derives one from the\n * account and the input, so an identical retry is a no-op; pass your own to\n * repeat an identical action on purpose.\n */\n externalId?: InputMaybe<Scalars['String']['input']>;\n};\n\n/** Autogenerated return type of PerformOutboundChannelAction. */\nexport type PerformOutboundChannelActionPayload = Node & {\n __typename?: 'PerformOutboundChannelActionPayload';\n /** The accepted action, `PENDING` unless it was already known. */\n channelAction: OutboundChannelAction;\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: Maybe<Scalars['String']['output']>;\n id: Scalars['ID']['output'];\n};\n\n/** Autogenerated return type of Ping. */\nexport type PingPayload = {\n __typename?: 'PingPayload';\n /** The externalId the caller passed, naming the request this result answers. */\n externalId: Scalars['ID']['output'];\n /** The message the trigger carried. */\n message: Scalars['String']['output'];\n};\n\n/** Root query type. Each subgraph contributes its own fields to it. */\nexport type Query = {\n __typename?: 'Query';\n /**\n * Whether a token subject may act for a company right now: a person who is a\n * member of it, or an application it owns. Atlas asks this before recording a\n * reveal, with its service token. Reachable by a **machine token** from the\n * Cognito issuer and by a caller holding `hermes/company:read`; UNKNOWN_SUBJECT\n * for everyone else, so a subject cannot be probed for its memberships.\n */\n actingCheck: ActingCheck;\n /**\n * One application the caller may manage, by global id. Returns null when no\n * company the caller belongs to owns it. A caller holding\n * `hermes/application:read` reaches any application, and for them null means it\n * does not exist.\n */\n application?: Maybe<Application>;\n /**\n * Applications the caller may manage: those owned by every company they belong\n * to. A caller holding `hermes/application:read` reads every application instead\n * — the scope Sortlist staff hold, so support can inspect a customer's.\n */\n applications: ApplicationConnection;\n /**\n * Looks up a billing customer by id, e.g. for a consumer's credit pre-check.\n * Refused unless the caller may read that customer: a service holding\n * billing/customer:read, or staff.\n */\n billingCustomer?: Maybe<BillingCustomer>;\n /** Liveness probe for the billing subgraph. */\n billingPing: Scalars['String']['output'];\n /** Static plan catalog of one product (tiers × monthly / annual). Drives the plan-picker UI without round-tripping Stripe. */\n billingPlanCatalog: Array<BillingPlanCatalogEntry>;\n /**\n * Companies the caller belongs to, including their personal one. A caller\n * holding `hermes/company:read` reads every company instead — the scope Sortlist\n * staff hold, so support can look up a customer they are not a member of.\n */\n companies: CompanyConnection;\n /**\n * One company the caller belongs to, by slug. Returns null when they do not\n * belong to it, so a company that exists and one that does not are\n * indistinguishable. A caller holding `hermes/company:read` reaches any company,\n * and for them null means it does not exist.\n */\n company?: Maybe<Company>;\n /**\n * What an invitation code is for, without redeeming it — accepting hands over\n * full control of a company's applications and credentials, so nobody should\n * have to do it blind. Null for a code that is unknown, spent, revoked or\n * expired; those are indistinguishable on purpose.\n */\n companyInvitationPreview?: Maybe<CompanyInvitationPreview>;\n /**\n * List contacts with optional filtering and sorting.\n * Supports cross-organization filtering via `organizationFilter` — for example, contacts\n * whose organization is in a given industry or country.\n * When you already hold an Organization, prefer `organization { contacts { ... } }` to\n * avoid cross-joins. Maximum page size: 100.\n * Kept for admin lookups: every field is served, organizations under it included, and\n * nothing is revealed, recorded or billed. To reveal reach fields for a company, use\n * `findContacts`.\n */\n contacts: ContactConnection;\n /** Returns all administrative divisions at every hierarchy level that contain the given coordinate. */\n containingDivisions: LocationConnection;\n /**\n * Find a Definition by slug and version.\n * @deprecated Use `watcherDefinition` instead.\n */\n definition?: Maybe<WatcherDefinition>;\n /**\n * List of code-defined Definitions exposed by this subgraph.\n * @deprecated Use `watcherDefinitions` instead.\n */\n definitions: WatcherDefinitionConnection;\n /**\n * Events across every Watcher the caller reads, newest first. Kept ones by\n * default; the refused slice carries the provider's own envelope and takes a\n * service-wide read scope, exactly as `Watcher.events` does.\n * @deprecated Use `watcherEvents` instead.\n */\n events: WatcherEventConnection;\n /**\n * List IP-to-company identification records with optional filtering.\n * Use `filter.valid: true` to restrict to records that successfully matched a company.\n */\n identifications: IdentificationConnection;\n /** The messages of one conversation Outreach follows, newest first. */\n linkedinChatMessages?: Maybe<LinkedinMessageConnection>;\n /**\n * The conversations Outreach follows on one of the caller's accounts, most\n * recent activity first. Only what Outreach started is here.\n */\n linkedinChats?: Maybe<LinkedinChatConnection>;\n /** The connection requests sent through Outreach on one of the caller's accounts, newest first, with where each one stands. */\n linkedinInvitations?: Maybe<LinkedinInvitationConnection>;\n /**\n * Every division level, ordered coarsest to finest. The MACRO* levels group\n * whole levels rather than sitting on one, so they fall *between* the\n * administrative levels — which is why this ordering, and not `adminLevel`, is\n * what a consumer walks to find the nearest level it can express.\n */\n locationSubtypes: Array<LocationSubtype>;\n /** Auth0 logout URL used by the CLI to clear the browser session. */\n logoutUrl: Scalars['String']['output'];\n /**\n * The person calling. Null when the request carries no access token, one this\n * service does not trust, or an application credential's token — an application\n * is not a person, and this service refuses its own tokens by design. A caller\n * holding such a token reads its own `application_id` and `company_id` claims\n * instead; it minted the token, so it needs nothing from here to know that.\n */\n me?: Maybe<User>;\n /**\n * Fetches an object given its ID. Supports all entity types across subgraphs —\n * the gateway hydrates fields from the owning subgraph via federation entity resolution.\n */\n node?: Maybe<Node>;\n /** Fetches a list of objects given a list of IDs. Supports all entity types across subgraphs. */\n nodes: Array<Maybe<Node>>;\n /**\n * Look up an organization by its exact primary domain.\n * Returns null when no record exists for that domain.\n * Use when you have the exact domain. For attribute-based or fuzzy search,\n * use `organizations(filter:, sort:)` instead.\n */\n organization?: Maybe<Organization>;\n /**\n * List organizations with optional filtering and sorting.\n * Supports semantic search via embedding filters on `description` and `industry`.\n * The `name` and `domain` filters both accept `in`, so a whole list of company\n * identifiers can be resolved to records in one read — no enrichment, no external calls.\n * Use `organization(domain:)` for a direct single-domain lookup.\n * Maximum page size: 100.\n * Kept for admin lookups: every field is served, contacts under it included, and nothing\n * is revealed, recorded or billed. To reveal reach fields for a company, use\n * `findOrganizations`.\n */\n organizations: OrganizationConnection;\n /**\n * Looks up a channel account by id. Null when the id is unknown, and for a\n * consumer once the account was removed; an operator holding `outreach/*:read`\n * or `outreach/*:*` still reads a removed account, with its history. Refused\n * when it belongs to another caller.\n */\n outboundChannelAccount?: Maybe<OutboundChannelAccount>;\n /**\n * The caller's channel accounts, newest first, without the removed ones unless\n * `filter.status` names `REMOVED`. A token carrying `outreach/*:read` or\n * `outreach/*:*` sees every consumer's accounts.\n */\n outboundChannelAccounts: OutboundChannelAccountConnection;\n /**\n * Looks up an action by id, for consumers that prefer polling to the\n * `channel_action.*` events. Null when the id is unknown; refused when the\n * action belongs to another caller.\n */\n outboundChannelAction?: Maybe<OutboundChannelAction>;\n /** The actions a consumer asked for on one of the caller's accounts, newest first, with where each one stands. */\n outboundChannelActions?: Maybe<OutboundChannelActionConnection>;\n /**\n * The events the gateway sent to the consumer's webhook about one of the\n * caller's accounts, newest first, with whether each one got through.\n */\n outboundChannelEvents?: Maybe<OutboundChannelEventConnection>;\n /**\n * The deliveries the provider made to the gateway about an account, newest\n * first, with what the gateway made of each one. For operators: the token has to\n * carry `outreach/*:read` or `outreach/*:*`.\n */\n outboundChannelProviderEvents?: Maybe<OutboundChannelProviderEventConnection>;\n /**\n * Liveness probe for the outreach subgraph. Answers \"pong\" to any caller whose\n * token carries `outreach/channel_account:read`.\n */\n ping: Scalars['String']['output'];\n /**\n * What this service would send upstream for every (Definition, provider) pair,\n * rendered without provisioning anything. Exposed so the checks that assert\n * against a provider's live API can run from outside this codebase (see the e2e\n * backend suite) and therefore check the deployed service rather than a copy of its source.\n * @deprecated Use `watcherProvisioningPreviews` instead.\n */\n provisioningPreviews: Array<WatcherProvisioningPreview>;\n /** Looks up a single location by an external code, in the identifier scheme given by `code_type`. */\n resolveByCode?: Maybe<Location>;\n /** Fuzzy text search over location names and aliases. Returns ranked matches. */\n resolveLocations: LocationConnection;\n /**\n * Fetches a contact or an organization given its id, with what this query revealed about\n * it. An id of any other type resolves to null. Selecting a reach field asks about it, and\n * `reveal` decides what may be revealed.\n */\n revealNode?: Maybe<Revealed>;\n /**\n * Fetches contacts and organizations given their ids, each with what this query revealed\n * about it. Ids of any other type resolve to null. Selecting a reach field asks about it,\n * and `reveal` decides what may be revealed.\n */\n revealNodes: Array<Maybe<Revealed>>;\n /**\n * The reveal ledger, newest first: which reach dimensions each company was handed,\n * and in which window. Staff surface for reading usage before it is priced. Maximum page size: 100.\n */\n reveals: RevealRecordConnection;\n /** Liveness probe for the signals subgraph */\n signalsPing: Scalars['String']['output'];\n /**\n * Looks up a user by Auth0 subject. Reachable by a **machine token** from the\n * Cognito issuer — it exists for one of them, the sync_company_ids Auth0 Action,\n * which holds a subject and no way to obtain a global id — and by a caller\n * holding `hermes/user:read`, the scope Sortlist staff hold, since correlating a\n * subject from a log line to a person is the support question it answers. Null\n * for everyone else: a subject is not a secret, so an open lookup is a directory.\n */\n user?: Maybe<User>;\n /**\n * Every person Hermes has provisioned, newest first. Requires `hermes/user:read`\n * — the scope Sortlist staff hold — because a list of people with their emails\n * and companies is exactly the directory `user(sub:)` is closed to avoid handing\n * out. Empty for anyone else.\n */\n users: UserConnection;\n /**\n * Find a Watcher by id.\n * @deprecated use node instead\n */\n watcher?: Maybe<Watcher>;\n /** Find a Definition by slug and version. */\n watcherDefinition?: Maybe<WatcherDefinition>;\n /** List of code-defined Definitions exposed by this subgraph. */\n watcherDefinitions: WatcherDefinitionConnection;\n /**\n * Events across every Watcher the caller reads, newest first. Kept ones by\n * default; the refused slice carries the provider's own envelope and takes a\n * service-wide read scope, exactly as `Watcher.events` does.\n */\n watcherEvents: WatcherEventConnection;\n /**\n * What this service would send upstream for every (Definition, provider) pair,\n * rendered without provisioning anything. Exposed so the checks that assert\n * against a provider's live API can run from outside this codebase (see the e2e\n * backend suite) and therefore check the deployed service rather than a copy of its source.\n */\n watcherProvisioningPreviews: Array<WatcherProvisioningPreview>;\n /**\n * Delivery endpoints across every Watcher the caller reads, newest first. The\n * delivery side of the pipeline read as a whole: an outage is usually shared by\n * host rather than by watcher, which no single Watcher's page can show.\n */\n watcherWebhooks: WatcherWebhookConnection;\n /**\n * Watchers the caller owns. A caller holding a resource-wide read scope reads\n * every watcher instead — the scopes Sortlist staff hold, so support can see\n * what a customer subscribed to.\n */\n watchers: WatcherConnection;\n /**\n * Delivery endpoints across every Watcher the caller reads, newest first. The\n * delivery side of the pipeline read as a whole: an outage is usually shared by\n * host rather than by watcher, which no single Watcher's page can show.\n * @deprecated Use `watcherWebhooks` instead.\n */\n webhooks: WatcherWebhookConnection;\n};\n\n\n/** Root query type. Each subgraph contributes its own fields to it. */\nexport type QueryActingCheckArgs = {\n companyId: Scalars['ID']['input'];\n subject: Scalars['String']['input'];\n};\n\n\n/** Root query type. Each subgraph contributes its own fields to it. */\nexport type QueryApplicationArgs = {\n id: Scalars['ID']['input'];\n};\n\n\n/** Root query type. Each subgraph contributes its own fields to it. */\nexport type QueryApplicationsArgs = {\n after?: InputMaybe<Scalars['String']['input']>;\n before?: InputMaybe<Scalars['String']['input']>;\n first?: InputMaybe<Scalars['Int']['input']>;\n last?: InputMaybe<Scalars['Int']['input']>;\n};\n\n\n/** Root query type. Each subgraph contributes its own fields to it. */\nexport type QueryBillingCustomerArgs = {\n id: Scalars['ID']['input'];\n};\n\n\n/** Root query type. Each subgraph contributes its own fields to it. */\nexport type QueryBillingPlanCatalogArgs = {\n product: BillingProduct;\n};\n\n\n/** Root query type. Each subgraph contributes its own fields to it. */\nexport type QueryCompaniesArgs = {\n after?: InputMaybe<Scalars['String']['input']>;\n before?: InputMaybe<Scalars['String']['input']>;\n first?: InputMaybe<Scalars['Int']['input']>;\n last?: InputMaybe<Scalars['Int']['input']>;\n};\n\n\n/** Root query type. Each subgraph contributes its own fields to it. */\nexport type QueryCompanyArgs = {\n slug: Scalars['String']['input'];\n};\n\n\n/** Root query type. Each subgraph contributes its own fields to it. */\nexport type QueryCompanyInvitationPreviewArgs = {\n code: Scalars['String']['input'];\n};\n\n\n/** Root query type. Each subgraph contributes its own fields to it. */\nexport type QueryContactsArgs = {\n after?: InputMaybe<Scalars['String']['input']>;\n before?: InputMaybe<Scalars['String']['input']>;\n filter?: InputMaybe<ContactFilterInput>;\n first?: InputMaybe<Scalars['Int']['input']>;\n last?: InputMaybe<Scalars['Int']['input']>;\n organizationFilter?: InputMaybe<OrganizationFilterInput>;\n sort?: InputMaybe<Array<ContactSortInput>>;\n};\n\n\n/** Root query type. Each subgraph contributes its own fields to it. */\nexport type QueryContainingDivisionsArgs = {\n after?: InputMaybe<Scalars['String']['input']>;\n before?: InputMaybe<Scalars['String']['input']>;\n coordinate: CoordinateInput;\n first?: InputMaybe<Scalars['Int']['input']>;\n last?: InputMaybe<Scalars['Int']['input']>;\n};\n\n\n/** Root query type. Each subgraph contributes its own fields to it. */\nexport type QueryDefinitionArgs = {\n slug: Scalars['String']['input'];\n version: Scalars['Int']['input'];\n};\n\n\n/** Root query type. Each subgraph contributes its own fields to it. */\nexport type QueryDefinitionsArgs = {\n after?: InputMaybe<Scalars['String']['input']>;\n before?: InputMaybe<Scalars['String']['input']>;\n filter?: InputMaybe<WatcherDefinitionFilterInput>;\n first?: InputMaybe<Scalars['Int']['input']>;\n last?: InputMaybe<Scalars['Int']['input']>;\n};\n\n\n/** Root query type. Each subgraph contributes its own fields to it. */\nexport type QueryEventsArgs = {\n after?: InputMaybe<Scalars['String']['input']>;\n before?: InputMaybe<Scalars['String']['input']>;\n filter?: InputMaybe<WatcherEventFilterInput>;\n first?: InputMaybe<Scalars['Int']['input']>;\n last?: InputMaybe<Scalars['Int']['input']>;\n};\n\n\n/** Root query type. Each subgraph contributes its own fields to it. */\nexport type QueryIdentificationsArgs = {\n after?: InputMaybe<Scalars['String']['input']>;\n before?: InputMaybe<Scalars['String']['input']>;\n filter?: InputMaybe<IdentificationFilterInput>;\n first?: InputMaybe<Scalars['Int']['input']>;\n last?: InputMaybe<Scalars['Int']['input']>;\n};\n\n\n/** Root query type. Each subgraph contributes its own fields to it. */\nexport type QueryLinkedinChatMessagesArgs = {\n after?: InputMaybe<Scalars['String']['input']>;\n before?: InputMaybe<Scalars['String']['input']>;\n chatId: Scalars['ID']['input'];\n first?: InputMaybe<Scalars['Int']['input']>;\n last?: InputMaybe<Scalars['Int']['input']>;\n};\n\n\n/** Root query type. Each subgraph contributes its own fields to it. */\nexport type QueryLinkedinChatsArgs = {\n after?: InputMaybe<Scalars['String']['input']>;\n before?: InputMaybe<Scalars['String']['input']>;\n channelAccountId: Scalars['ID']['input'];\n first?: InputMaybe<Scalars['Int']['input']>;\n last?: InputMaybe<Scalars['Int']['input']>;\n};\n\n\n/** Root query type. Each subgraph contributes its own fields to it. */\nexport type QueryLinkedinInvitationsArgs = {\n after?: InputMaybe<Scalars['String']['input']>;\n before?: InputMaybe<Scalars['String']['input']>;\n channelAccountId: Scalars['ID']['input'];\n filter?: InputMaybe<LinkedinInvitationFilterInput>;\n first?: InputMaybe<Scalars['Int']['input']>;\n last?: InputMaybe<Scalars['Int']['input']>;\n};\n\n\n/** Root query type. Each subgraph contributes its own fields to it. */\nexport type QueryNodeArgs = {\n id: Scalars['ID']['input'];\n};\n\n\n/** Root query type. Each subgraph contributes its own fields to it. */\nexport type QueryNodesArgs = {\n ids: Array<Scalars['ID']['input']>;\n};\n\n\n/** Root query type. Each subgraph contributes its own fields to it. */\nexport type QueryOrganizationArgs = {\n domain: Scalars['String']['input'];\n};\n\n\n/** Root query type. Each subgraph contributes its own fields to it. */\nexport type QueryOrganizationsArgs = {\n after?: InputMaybe<Scalars['String']['input']>;\n before?: InputMaybe<Scalars['String']['input']>;\n filter?: InputMaybe<OrganizationFilterInput>;\n first?: InputMaybe<Scalars['Int']['input']>;\n last?: InputMaybe<Scalars['Int']['input']>;\n sort?: InputMaybe<Array<OrganizationSortInput>>;\n};\n\n\n/** Root query type. Each subgraph contributes its own fields to it. */\nexport type QueryOutboundChannelAccountArgs = {\n id: Scalars['ID']['input'];\n};\n\n\n/** Root query type. Each subgraph contributes its own fields to it. */\nexport type QueryOutboundChannelAccountsArgs = {\n after?: InputMaybe<Scalars['String']['input']>;\n before?: InputMaybe<Scalars['String']['input']>;\n filter?: InputMaybe<OutboundChannelAccountFilterInput>;\n first?: InputMaybe<Scalars['Int']['input']>;\n last?: InputMaybe<Scalars['Int']['input']>;\n};\n\n\n/** Root query type. Each subgraph contributes its own fields to it. */\nexport type QueryOutboundChannelActionArgs = {\n id: Scalars['ID']['input'];\n};\n\n\n/** Root query type. Each subgraph contributes its own fields to it. */\nexport type QueryOutboundChannelActionsArgs = {\n after?: InputMaybe<Scalars['String']['input']>;\n before?: InputMaybe<Scalars['String']['input']>;\n channelAccountId: Scalars['ID']['input'];\n filter?: InputMaybe<OutboundChannelActionFilterInput>;\n first?: InputMaybe<Scalars['Int']['input']>;\n last?: InputMaybe<Scalars['Int']['input']>;\n};\n\n\n/** Root query type. Each subgraph contributes its own fields to it. */\nexport type QueryOutboundChannelEventsArgs = {\n after?: InputMaybe<Scalars['String']['input']>;\n before?: InputMaybe<Scalars['String']['input']>;\n channelAccountId: Scalars['ID']['input'];\n filter?: InputMaybe<OutboundChannelEventFilterInput>;\n first?: InputMaybe<Scalars['Int']['input']>;\n last?: InputMaybe<Scalars['Int']['input']>;\n};\n\n\n/** Root query type. Each subgraph contributes its own fields to it. */\nexport type QueryOutboundChannelProviderEventsArgs = {\n after?: InputMaybe<Scalars['String']['input']>;\n before?: InputMaybe<Scalars['String']['input']>;\n channelAccountId: Scalars['ID']['input'];\n filter?: InputMaybe<OutboundChannelProviderEventFilterInput>;\n first?: InputMaybe<Scalars['Int']['input']>;\n last?: InputMaybe<Scalars['Int']['input']>;\n};\n\n\n/** Root query type. Each subgraph contributes its own fields to it. */\nexport type QueryProvisioningPreviewsArgs = {\n filter?: InputMaybe<WatcherProvisioningPreviewSelectorInput>;\n icp?: InputMaybe<WatcherIcpInput>;\n};\n\n\n/** Root query type. Each subgraph contributes its own fields to it. */\nexport type QueryResolveByCodeArgs = {\n code: Scalars['String']['input'];\n codeType: LocationCode;\n};\n\n\n/** Root query type. Each subgraph contributes its own fields to it. */\nexport type QueryResolveLocationsArgs = {\n after?: InputMaybe<Scalars['String']['input']>;\n before?: InputMaybe<Scalars['String']['input']>;\n exactOnly?: InputMaybe<Scalars['Boolean']['input']>;\n first?: InputMaybe<Scalars['Int']['input']>;\n last?: InputMaybe<Scalars['Int']['input']>;\n query: Scalars['String']['input'];\n subtypes?: InputMaybe<LocationSubtypeFilterInput>;\n within?: InputMaybe<Scalars['ID']['input']>;\n};\n\n\n/** Root query type. Each subgraph contributes its own fields to it. */\nexport type QueryRevealNodeArgs = {\n id: Scalars['ID']['input'];\n reveal?: InputMaybe<Array<RevealDimension>>;\n};\n\n\n/** Root query type. Each subgraph contributes its own fields to it. */\nexport type QueryRevealNodesArgs = {\n ids: Array<Scalars['ID']['input']>;\n reveal?: InputMaybe<Array<RevealDimension>>;\n};\n\n\n/** Root query type. Each subgraph contributes its own fields to it. */\nexport type QueryRevealsArgs = {\n after?: InputMaybe<Scalars['String']['input']>;\n before?: InputMaybe<Scalars['String']['input']>;\n filter?: InputMaybe<RevealFilterInput>;\n first?: InputMaybe<Scalars['Int']['input']>;\n last?: InputMaybe<Scalars['Int']['input']>;\n};\n\n\n/** Root query type. Each subgraph contributes its own fields to it. */\nexport type QueryUserArgs = {\n sub: Scalars['String']['input'];\n};\n\n\n/** Root query type. Each subgraph contributes its own fields to it. */\nexport type QueryUsersArgs = {\n after?: InputMaybe<Scalars['String']['input']>;\n before?: InputMaybe<Scalars['String']['input']>;\n filter?: InputMaybe<UserFilterInput>;\n first?: InputMaybe<Scalars['Int']['input']>;\n last?: InputMaybe<Scalars['Int']['input']>;\n};\n\n\n/** Root query type. Each subgraph contributes its own fields to it. */\nexport type QueryWatcherArgs = {\n id: Scalars['ID']['input'];\n};\n\n\n/** Root query type. Each subgraph contributes its own fields to it. */\nexport type QueryWatcherDefinitionArgs = {\n slug: Scalars['String']['input'];\n version: Scalars['Int']['input'];\n};\n\n\n/** Root query type. Each subgraph contributes its own fields to it. */\nexport type QueryWatcherDefinitionsArgs = {\n after?: InputMaybe<Scalars['String']['input']>;\n before?: InputMaybe<Scalars['String']['input']>;\n filter?: InputMaybe<WatcherDefinitionFilterInput>;\n first?: InputMaybe<Scalars['Int']['input']>;\n last?: InputMaybe<Scalars['Int']['input']>;\n};\n\n\n/** Root query type. Each subgraph contributes its own fields to it. */\nexport type QueryWatcherEventsArgs = {\n after?: InputMaybe<Scalars['String']['input']>;\n before?: InputMaybe<Scalars['String']['input']>;\n filter?: InputMaybe<WatcherEventFilterInput>;\n first?: InputMaybe<Scalars['Int']['input']>;\n last?: InputMaybe<Scalars['Int']['input']>;\n};\n\n\n/** Root query type. Each subgraph contributes its own fields to it. */\nexport type QueryWatcherProvisioningPreviewsArgs = {\n filter?: InputMaybe<WatcherProvisioningPreviewSelectorInput>;\n icp?: InputMaybe<WatcherIcpInput>;\n};\n\n\n/** Root query type. Each subgraph contributes its own fields to it. */\nexport type QueryWatcherWebhooksArgs = {\n after?: InputMaybe<Scalars['String']['input']>;\n before?: InputMaybe<Scalars['String']['input']>;\n filter?: InputMaybe<WatcherWebhookFilterInput>;\n first?: InputMaybe<Scalars['Int']['input']>;\n last?: InputMaybe<Scalars['Int']['input']>;\n};\n\n\n/** Root query type. Each subgraph contributes its own fields to it. */\nexport type QueryWatchersArgs = {\n after?: InputMaybe<Scalars['String']['input']>;\n before?: InputMaybe<Scalars['String']['input']>;\n filter?: InputMaybe<WatcherFilterInput>;\n first?: InputMaybe<Scalars['Int']['input']>;\n last?: InputMaybe<Scalars['Int']['input']>;\n};\n\n\n/** Root query type. Each subgraph contributes its own fields to it. */\nexport type QueryWebhooksArgs = {\n after?: InputMaybe<Scalars['String']['input']>;\n before?: InputMaybe<Scalars['String']['input']>;\n filter?: InputMaybe<WatcherWebhookFilterInput>;\n first?: InputMaybe<Scalars['Int']['input']>;\n last?: InputMaybe<Scalars['Int']['input']>;\n};\n\n/** Filter on an int8range column with range operators. */\nexport type RangeFilterInput = {\n /**\n * When true, a row also matches when the attribute is blank — NULL, an empty\n * string, an empty list, or no related record, depending on the column. The\n * connection edge reports which branch admitted each row via `filterMatches`.\n * Contrast `blank`, which narrows to blank-only rows where this one widens to include them.\n */\n allowBlank?: InputMaybe<Scalars['Boolean']['input']>;\n /** Matches rows whose range is fully within the given [min, max] range. */\n containedBy?: InputMaybe<Scalars['Range']['input']>;\n /** Matches rows whose range contains the given value. */\n contains?: InputMaybe<Scalars['Int']['input']>;\n /** Matches rows whose range overlaps the given [min, max] range. */\n overlaps?: InputMaybe<Scalars['Range']['input']>;\n};\n\n/** Autogenerated input type of RefreshToken */\nexport type RefreshTokenInput = {\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: InputMaybe<Scalars['String']['input']>;\n refreshToken: Scalars['String']['input'];\n};\n\n/** Autogenerated input type of RefundDebit */\nexport type RefundDebitInput = {\n /** Credits to refund, out of the consumable's charge. Greater than 0. */\n amount: Scalars['Float']['input'];\n /** Global id of the billing customer to refund. */\n billingCustomerId: Scalars['ID']['input'];\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: InputMaybe<Scalars['String']['input']>;\n /** Id of the consumed record, as debitCredits received it. */\n consumableId: Scalars['ID']['input'];\n /** Type of the consumed record, as debitCredits received it. */\n consumableType: Scalars['String']['input'];\n /** Caller-chosen key, unique per customer, that makes a retry safe. */\n idempotencyKey: Scalars['String']['input'];\n /** Why the charge is refunded, stored on every refund credit. */\n reason: Scalars['String']['input'];\n /** The caller's own reference for the refund, such as its refund request id, stored on every refund credit. */\n reference?: InputMaybe<Scalars['String']['input']>;\n};\n\n/** Autogenerated return type of RefundDebit. */\nexport type RefundDebitPayload = Node & {\n __typename?: 'RefundDebitPayload';\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: Maybe<Scalars['String']['output']>;\n /** The REFUND credits written, one per debit or overage refunded, each naming it. */\n credits: BillingCreditConnection;\n id: Scalars['ID']['output'];\n /**\n * What can still be refunded for the consumable after the call: its debits and\n * overages minus the refund and correction credits that reduce them.\n */\n refundableAmount: Scalars['Float']['output'];\n /**\n * Credits given back by this call: the sum of the refund credits, which can\n * exceed amount by the cents rounded in the customer's favour.\n */\n refundedAmount: Scalars['Float']['output'];\n /** Customer's credit balance after the call. */\n remainingBalance: Scalars['Float']['output'];\n};\n\n\n/** Autogenerated return type of RefundDebit. */\nexport type RefundDebitPayloadCreditsArgs = {\n after?: InputMaybe<Scalars['String']['input']>;\n before?: InputMaybe<Scalars['String']['input']>;\n first?: InputMaybe<Scalars['Int']['input']>;\n last?: InputMaybe<Scalars['Int']['input']>;\n};\n\n/** Autogenerated input type of RemoveCompanyMember */\nexport type RemoveCompanyMemberInput = {\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: InputMaybe<Scalars['String']['input']>;\n companyId: Scalars['ID']['input'];\n /** The member to remove. `company { members { user { id } } }` lists them. */\n userId: Scalars['ID']['input'];\n};\n\n/** Autogenerated input type of RemoveOutboundChannelAccount */\nexport type RemoveOutboundChannelAccountInput = {\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: InputMaybe<Scalars['String']['input']>;\n /** Global id of the channel account to remove. */\n id: Scalars['ID']['input'];\n};\n\n/** Autogenerated return type of RemoveOutboundChannelAccount. */\nexport type RemoveOutboundChannelAccountPayload = Node & {\n __typename?: 'RemoveOutboundChannelAccountPayload';\n /** The account, now `REMOVED`; it no longer resolves by id. */\n channelAccount: OutboundChannelAccount;\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: Maybe<Scalars['String']['output']>;\n id: Scalars['ID']['output'];\n};\n\n/**\n * What this response cost in reveal credits: the most it could have, and what it\n * actually did. Nothing is charged yet; the figures are what would be.\n */\nexport type RevealCredits = {\n __typename?: 'RevealCredits';\n /** The units used, per dimension this response revealed. Empty when it revealed nothing. */\n byDimension: Array<RevealDimensionCredits>;\n /** The ceiling reserved before the page was read: every requested dimension on every row. */\n held: Scalars['Int']['output'];\n /**\n * Units this response actually consumed: one per dimension revealed on one row.\n * An owned or unavailable dimension costs nothing.\n */\n used: Scalars['Int']['output'];\n};\n\n/**\n * A separately purchasable piece of reach information about a lead. One flat list\n * rather than a subject plus a dimension, so a contact edge can report\n * organization lines under the same vocabulary.\n */\nexport type RevealDimension =\n /** Their email address, its verification status and its pattern. */\n | 'CONTACT_EMAIL_ADDRESS'\n /** The person's name, picture and career history. */\n | 'CONTACT_IDENTITY'\n /** Their LinkedIn profile. */\n | 'CONTACT_LINKEDIN_URL'\n /** Their phone number. */\n | 'CONTACT_PHONE_NUMBER'\n /** The organization's physical addresses and offices. */\n | 'ORGANIZATION_ADDRESS'\n /** The organization's general contact email. */\n | 'ORGANIZATION_EMAIL_ADDRESS'\n /** The organization's industry, description, size, revenue and founding year. */\n | 'ORGANIZATION_FIRMOGRAPHICS'\n /** The organization's name and logo. */\n | 'ORGANIZATION_IDENTITY'\n /** The organization's LinkedIn company page. */\n | 'ORGANIZATION_LINKEDIN_URL'\n /** The organization's main phone number. */\n | 'ORGANIZATION_PHONE_NUMBER'\n /** The organization's website. */\n | 'ORGANIZATION_WEBSITE';\n\n/** Units one dimension cost on this response. */\nexport type RevealDimensionCredits = {\n __typename?: 'RevealDimensionCredits';\n /** The reach dimension these units were spent on. */\n dimension: RevealDimension;\n /** Rows this dimension was revealed on. */\n used: Scalars['Int']['output'];\n};\n\n/** Filter on the reach dimension a reveal handed over (eq/in/notEq/notIn). */\nexport type RevealDimensionFilterInput = {\n /** Exact match. */\n eq?: InputMaybe<RevealDimension>;\n /** Match any of these values. */\n in?: InputMaybe<Array<RevealDimension>>;\n /** Exclude exact match. */\n notEq?: InputMaybe<RevealDimension>;\n /** Exclude any of these values. */\n notIn?: InputMaybe<Array<RevealDimension>>;\n};\n\n/** One dimension of one lead, and what this response did about it. */\nexport type RevealDimensionStatus = {\n __typename?: 'RevealDimensionStatus';\n /** The piece of reach information this entry is about. */\n dimension: RevealDimension;\n /** When this dimension stops being owned and would be charged again. Set on REVEALED and OWNED, null otherwise. */\n ownedUntil?: Maybe<Scalars['ISO8601DateTime']['output']>;\n /** Whether it was revealed now, already owned, locked, or not there. */\n status: RevealStatus;\n};\n\n/** Filter criteria for the reveal ledger. */\nexport type RevealFilterInput = {\n /**\n * Only reveals handed to these companies, as Company ids. An id that is not a\n * company's matches nothing rather than everything.\n */\n companyId?: InputMaybe<IdFilterInput>;\n /** Only reveals of these contacts, as Contact ids: who was handed which of their dimensions. */\n contactId?: InputMaybe<IdFilterInput>;\n /** `true` keeps only rows not yet superseded by a later window. */\n current?: InputMaybe<Scalars['Boolean']['input']>;\n /** Only reveals of these dimensions. */\n dimension?: InputMaybe<RevealDimensionFilterInput>;\n /** Only reveals triggered by these token subjects — an Auth0 subject for a person, `application:<uuid>` for a machine. */\n oauthId?: InputMaybe<StringFilterInput>;\n /** Only reveals of these organizations, as Organization ids: who was handed which of their dimensions. */\n organizationId?: InputMaybe<IdFilterInput>;\n};\n\n/**\n * One row of the reveal ledger: a reach dimension handed to a company, recorded\n * once per window. What the list `reveals` returns, as opposed to the per-edge\n * `Reveal` a query reports back beside each lead.\n */\nexport type RevealRecord = Node & {\n __typename?: 'RevealRecord';\n /** The day this window opened. */\n anchorOn: Scalars['ISO8601Date']['output'];\n /** The application whose token triggered the reveal, resolved by Hermes. Null when a person did. */\n application?: Maybe<Application>;\n /** The company the information was handed to, resolved by Hermes. Null when Hermes no longer knows it. */\n company?: Maybe<Company>;\n /** The identifier a charge would carry: subject, window anchor, dimension. */\n consumableId: Scalars['String']['output'];\n /** The contact the information belongs to. Null when the subject is not a contact or has since been merged away. */\n contact?: Maybe<Contact>;\n /** The piece of reach information recorded. */\n dimension: RevealDimension;\n /** When this window closes and the dimension would be recorded again. */\n expiresAt: Scalars['ISO8601DateTime']['output'];\n /**\n * How many responses served this dimension inside this window, the reveal itself\n * included. Reads inside the window count here and nowhere else: the row is what\n * would be charged, once.\n */\n hits: Scalars['Int']['output'];\n id: Scalars['ID']['output'];\n /** Whether this row is the current, unexpired record for its dimension. */\n live: Scalars['Boolean']['output'];\n /** The token subject that triggered the reveal: a person or an application. */\n oauthId: Scalars['String']['output'];\n /** The organization the information belongs to. Null when the subject is not an organization or has since been merged away. */\n organization?: Maybe<Organization>;\n /** When the information was first handed over in this window. */\n revealedAt: Scalars['ISO8601DateTime']['output'];\n /** When a later window replaced this row. Null on the current row. */\n supersededAt?: Maybe<Scalars['ISO8601DateTime']['output']>;\n /** Why the row was superseded: `rollover` when its window lapsed. */\n supersededReason?: Maybe<Scalars['String']['output']>;\n};\n\n/** The connection type for RevealRecord. */\nexport type RevealRecordConnection = {\n __typename?: 'RevealRecordConnection';\n /**\n * Estimated total number of items across all pages. It comes from the query\n * planner rather than a count, so it costs planning time instead of a scan and\n * cannot exceed the statement timeout. It is approximate at every magnitude,\n * including small ones, and it moves when the table's statistics are refreshed.\n * Accuracy depends on the filter: within a few percent on plain column and\n * array-overlap filters, and as much as 30% out on a range filter such as\n * `companySize`. It is not meaningful for the embedding filters `jobTitle` and\n * `industry` — no statistics exist for a vector-distance predicate, so the\n * estimate ignores the distance threshold entirely and approximates only what\n * the other filters admit; it has been measured reporting 241371 for a filter\n * whose true result was empty. Never render it as an exact figure, and use\n * `totalCount` when the figure has to be exact.\n */\n approximateTotalCount: Scalars['Int']['output'];\n /** A list of edges. */\n edges?: Maybe<Array<Maybe<RevealRecordEdge>>>;\n /** A list of nodes. */\n nodes?: Maybe<Array<Maybe<RevealRecord>>>;\n /** Information to aid in pagination. */\n pageInfo: PageInfo;\n /** Total number of items across all pages, exact unless `upTo` is given. */\n totalCount: Scalars['Int']['output'];\n};\n\n\n/** The connection type for RevealRecord. */\nexport type RevealRecordConnectionTotalCountArgs = {\n upTo?: InputMaybe<Scalars['Int']['input']>;\n};\n\n/** An edge in a connection. */\nexport type RevealRecordEdge = Node & {\n __typename?: 'RevealRecordEdge';\n /** A cursor for use in pagination. */\n cursor: Scalars['String']['output'];\n id: Scalars['ID']['output'];\n /** The item at the end of the edge. */\n node?: Maybe<RevealRecord>;\n};\n\n/** What happened to one dimension of one lead on this response. */\nexport type RevealStatus =\n /**\n * Atlas could not complete the lookup, so nothing was learned. Never recorded or\n * billed, and the next search tries again. Only `findContacts` returns it.\n */\n | 'FAILED'\n /**\n * Atlas has it, but this company has not asked for it: the fields come back null\n * until a response passes the dimension in `reveal:`.\n */\n | 'LOCKED'\n /** Already recorded inside its window, so it is served and counts once, not again. */\n | 'OWNED'\n /** Asked for through `reveal:`, found, and recorded by this response. */\n | 'REVEALED'\n /** Atlas found nothing. Never recorded — an unsuccessful lookup would not be chargeable. */\n | 'UNAVAILABLE';\n\n/**\n * Represents a contact or an organization together with what this particular query\n * revealed about it, reported beside the record rather than on it.\n */\nexport type Revealed = {\n /**\n * Reports what revealing this record cost in reveal credits. `held` is the\n * ceiling reserved for it, one unit per requested dimension, and `used` is the\n * units it consumed. `used` is zero when the query revealed nothing, while\n * `held` still reports the reserved ceiling.\n */\n credits: RevealCredits;\n /**\n * Returns the contact or organization the entry is about. It is never null on\n * `RevealedContact` and `RevealedOrganization`, and is null on a connection edge\n * only when its record could not be loaded.\n */\n node?: Maybe<Node>;\n /**\n * Lists, per reach dimension this query touched, what this response revealed,\n * what the company already held and what stays locked. The list is empty when\n * the query touched no reach field.\n */\n reveals: Array<RevealDimensionStatus>;\n};\n\n/**\n * A contact another subgraph points to, with what this particular query revealed\n * about it. The pointing subgraph returns the key — the contact id and the\n * `reveal:` its caller passed — and Atlas resolves the rest.\n */\nexport type RevealedContact = Revealed & {\n __typename?: 'RevealedContact';\n /** The contact the pointing resource resolved to, as that resource serves it: a Contact GlobalID, or a bare uuid. */\n contactId: Scalars['ID']['output'];\n /**\n * Reports what revealing this record cost in reveal credits. `held` is the\n * ceiling reserved for it, one unit per requested dimension, and `used` is the\n * units it consumed. `used` is zero when the query revealed nothing, while\n * `held` still reports the reserved ceiling.\n */\n credits: RevealCredits;\n /** The contact the resource points to. */\n node: Contact;\n /**\n * Which reach dimensions the caller asked to reveal. Null, every reach field the\n * query selects under `node`. `[]` reveals nothing: the read serves only what\n * the company already owns, the rest comes back null and `reveals` reports it\n * LOCKED. A list reveals exactly those. Recorded against the company the token acts for.\n */\n reveal?: Maybe<Array<RevealDimension>>;\n /**\n * Lists, per reach dimension this query touched, what this response revealed,\n * what the company already held and what stays locked. The list is empty when\n * the query touched no reach field.\n */\n reveals: Array<RevealDimensionStatus>;\n};\n\n/** Represents an organization together with what this particular query revealed about it. */\nexport type RevealedOrganization = Revealed & {\n __typename?: 'RevealedOrganization';\n /**\n * Reports what revealing this record cost in reveal credits. `held` is the\n * ceiling reserved for it, one unit per requested dimension, and `used` is the\n * units it consumed. `used` is zero when the query revealed nothing, while\n * `held` still reports the reserved ceiling.\n */\n credits: RevealCredits;\n /** Returns the organization the entry is about. */\n node: Organization;\n /**\n * Lists, per reach dimension this query touched, what this response revealed,\n * what the company already held and what stays locked. The list is empty when\n * the query touched no reach field.\n */\n reveals: Array<RevealDimensionStatus>;\n};\n\n/**\n * Represents a page of contacts or organizations together with what it cost and,\n * on each edge, what this particular query revealed about the record.\n */\nexport type RevealedPage = {\n /**\n * Reports what this page cost in reveal credits. `held` is the ceiling reserved\n * for every requested dimension on every row, and `used` is the units the page\n * consumed. `used` is zero when the query revealed nothing, while `held` still\n * reports the reserved ceiling.\n */\n credits: RevealCredits;\n /** Lists the records on the page, each with what this query revealed about it. */\n edges?: Maybe<Array<Maybe<Revealed>>>;\n};\n\n/** Autogenerated input type of RevokeApplicationCredential */\nexport type RevokeApplicationCredentialInput = {\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: InputMaybe<Scalars['String']['input']>;\n credentialId: Scalars['ID']['input'];\n};\n\n/** Autogenerated input type of RevokeCompanyInvitation */\nexport type RevokeCompanyInvitationInput = {\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: InputMaybe<Scalars['String']['input']>;\n invitationId: Scalars['ID']['input'];\n};\n\n/** Autogenerated input type of RunSignalsSynchronousWorker */\nexport type RunSignalsSynchronousWorkerInput = {\n /** Positional arguments forwarded to the job's perform. */\n args?: InputMaybe<Array<Scalars['JSON']['input']>>;\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: InputMaybe<Scalars['String']['input']>;\n /** Fully-qualified ActiveJob class name to execute inline. */\n jobName: Scalars['String']['input'];\n /** Keyword arguments forwarded to the job's perform. */\n kwargs?: InputMaybe<Scalars['JSON']['input']>;\n};\n\n/** Autogenerated return type of RunSignalsSynchronousWorker. */\nexport type RunSignalsSynchronousWorkerPayload = Node & {\n __typename?: 'RunSignalsSynchronousWorkerPayload';\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: Maybe<Scalars['String']['output']>;\n /** Indicates whether the job ran to completion without raising. */\n done: Scalars['Boolean']['output'];\n id: Scalars['ID']['output'];\n};\n\n/** Autogenerated input type of RunSynchronousWorker */\nexport type RunSynchronousWorkerInput = {\n /** Positional arguments forwarded to the job's #perform. */\n args?: InputMaybe<Array<Scalars['JSON']['input']>>;\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: InputMaybe<Scalars['String']['input']>;\n /** Fully-qualified ActiveJob class name to execute inline. */\n jobName: Scalars['String']['input'];\n /** Keyword arguments forwarded to the job's #perform. */\n kwargs?: InputMaybe<Scalars['JSON']['input']>;\n};\n\n/** Autogenerated return type of RunSynchronousWorker. */\nexport type RunSynchronousWorkerPayload = {\n __typename?: 'RunSynchronousWorkerPayload';\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: Maybe<Scalars['String']['output']>;\n /** True once the job has finished running inline. */\n done: Scalars['Boolean']['output'];\n};\n\n/** Autogenerated input type of SearchContact */\nexport type SearchContactInput = {\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: InputMaybe<Scalars['String']['input']>;\n /** Caller-supplied identifier used to key the `contactIdentifyResult` subscription. */\n externalId: Scalars['ID']['input'];\n /** Exactly one lookup mode must be provided. */\n lookup: ContactLookupInput;\n};\n\n/** Autogenerated return type of SearchContact. */\nexport type SearchContactPayload = {\n __typename?: 'SearchContactPayload';\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: Maybe<Scalars['String']['output']>;\n /** One of: received. */\n status: Scalars['String']['output'];\n};\n\n/** Autogenerated input type of SearchContactPhone */\nexport type SearchContactPhoneInput = {\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: InputMaybe<Scalars['String']['input']>;\n /** Global id of the contact whose phone number should be discovered. */\n contactId?: InputMaybe<Scalars['ID']['input']>;\n /**\n * LinkedIn profile URL of the person, used when no `contactId` is held. Ignored\n * when `contactId` is supplied. A value that does not normalize to a LinkedIn\n * profile URL is rejected with `INVALID_INTERACTION`.\n */\n linkedinUrl?: InputMaybe<Scalars['String']['input']>;\n};\n\n/** Autogenerated return type of SearchContactPhone. */\nexport type SearchContactPhonePayload = {\n __typename?: 'SearchContactPhonePayload';\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: Maybe<Scalars['String']['output']>;\n /** The contact the lookup resolved to, with `phone` populated when one was found. Null when no contact matched. */\n contact?: Maybe<Contact>;\n /** The discovered phone number, or null when none was found. */\n phoneNumber?: Maybe<Scalars['String']['output']>;\n /** Outcome of the lookup. One of: found, not_found, contact_not_found, missing_linkedin_url, lookup_failed. */\n status: Scalars['String']['output'];\n};\n\n/** Autogenerated input type of SearchContacts */\nexport type SearchContactsInput = {\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: InputMaybe<Scalars['String']['input']>;\n /** Caller-supplied identifier used to key the `contactSearchResult` subscription. */\n externalId: Scalars['ID']['input'];\n /** Filter criteria for contacts, applied to both the local database and, where translatable, the Coresignal search. */\n filter?: InputMaybe<ContactFilterInput>;\n /**\n * Filter criteria for the contacts' organizations, applied to both the local\n * database and, where translatable, the Coresignal search.\n */\n organizationFilter?: InputMaybe<OrganizationFilterInput>;\n /** Sort order applied to the database contacts result set. */\n sort?: InputMaybe<Array<ContactSortInput>>;\n};\n\n/** Autogenerated return type of SearchContacts. */\nexport type SearchContactsPayload = {\n __typename?: 'SearchContactsPayload';\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: Maybe<Scalars['String']['output']>;\n /** One of: received. */\n status: Scalars['String']['output'];\n};\n\n/** Autogenerated input type of SearchOrganization */\nexport type SearchOrganizationInput = {\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: InputMaybe<Scalars['String']['input']>;\n /** Caller-supplied correlation key; pass the same value to `organizationSearchResult(externalId:)` to receive the result. */\n externalId: Scalars['String']['input'];\n /** Lookup mode — provide exactly one of `domain` or `byIp`. */\n lookup: OrganizationLookupInput;\n /**\n * Optional URL to receive the result via webhook instead of the federated\n * subscription. Only used with `lookup.byIp`. Requires the `atlas/source:write` scope.\n */\n webhookUrl?: InputMaybe<Scalars['String']['input']>;\n};\n\n/** Autogenerated return type of SearchOrganization. */\nexport type SearchOrganizationPayload = {\n __typename?: 'SearchOrganizationPayload';\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: Maybe<Scalars['String']['output']>;\n /** One of: received. */\n status: Scalars['String']['output'];\n};\n\n/** Autogenerated input type of SetDefaultCompany */\nexport type SetDefaultCompanyInput = {\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: InputMaybe<Scalars['String']['input']>;\n /** A company the caller is a member of. Null clears the default. */\n companyId?: InputMaybe<Scalars['ID']['input']>;\n};\n\n/** Autogenerated input type of SetWatcherWebhookActive */\nexport type SetWatcherWebhookActiveInput = {\n /** True to resume delivery, false to pause it. */\n active: Scalars['Boolean']['input'];\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: InputMaybe<Scalars['String']['input']>;\n id: Scalars['ID']['input'];\n /** Webhook URL whose delivery state is toggled. */\n webhookUrl: Scalars['String']['input'];\n};\n\n/** Autogenerated return type of SetWatcherWebhookActive. */\nexport type SetWatcherWebhookActivePayload = Node & {\n __typename?: 'SetWatcherWebhookActivePayload';\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: Maybe<Scalars['String']['output']>;\n id: Scalars['ID']['output'];\n /** The reconciled Watcher. */\n watcher: Watcher;\n};\n\n/** Autogenerated input type of SetWebhookActive */\nexport type SetWebhookActiveInput = {\n /** True to resume delivery, false to pause it. */\n active: Scalars['Boolean']['input'];\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: InputMaybe<Scalars['String']['input']>;\n id: Scalars['ID']['input'];\n /** Webhook URL whose delivery state is toggled. */\n webhookUrl: Scalars['String']['input'];\n};\n\n/** Autogenerated return type of SetWebhookActive. */\nexport type SetWebhookActivePayload = Node & {\n __typename?: 'SetWebhookActivePayload';\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: Maybe<Scalars['String']['output']>;\n id: Scalars['ID']['output'];\n /** The reconciled Watcher. */\n watcher: Watcher;\n};\n\n/** Sort direction. */\nexport type SortDirection =\n /** Ascending order (lowest to highest, oldest to newest). */\n | 'ASC'\n /** Descending order (highest to lowest, newest to oldest). */\n | 'DESC';\n\n/** An enrichment data source with trust score and field mappings. */\nexport type Source = Node & {\n __typename?: 'Source';\n /**\n * Maps Atlas canonical contact field names to rawData extraction expressions.\n * Keys: first_name, last_name, email_address, job_title, job_level, job_function,\n * linkedin_url, city, country_code.\n * Values: a string key (\"firstname\"), an array path for nested access\n * ([\"data\", \"email\"]), or an operation hash\n * ({\"op\": \"split\", \"key\": \"full_name\", \"index\": 0}).\n * All referenced keys must exist in contact_schema.\n */\n contactFieldMappings: Scalars['JSON']['output'];\n /** JSON Schema (draft-07) describing the expected shape of contact rawData payloads. */\n contactSchema: Scalars['JSON']['output'];\n /** When the source was registered. */\n createdAt: Scalars['ISO8601DateTime']['output'];\n id: Scalars['ID']['output'];\n /**\n * Maps Atlas canonical identification field names to rawData extraction expressions.\n * Keys: ip_address, organization_domain, confidence_score.\n * Values follow the same expression syntax as contact_field_mappings.\n * All referenced keys must exist in identification_schema.\n */\n identificationFieldMappings: Scalars['JSON']['output'];\n /** JSON Schema (draft-07) describing the expected shape of identification rawData payloads. */\n identificationSchema: Scalars['JSON']['output'];\n /** OAuth subject of the user who registered this source. Null for system-registered sources. */\n oauthId?: Maybe<Scalars['String']['output']>;\n /**\n * Maps address slot names to rawData extraction expressions.\n * The top-level key names an address slot (e.g. \"headquarters\").\n * Each slot maps Atlas address field names (street, city, state, postal_code,\n * country_code, is_headquarters) to extraction expressions or literal values.\n */\n officeFieldMappings: Scalars['JSON']['output'];\n /**\n * Maps Atlas canonical organization field names to rawData extraction expressions.\n * Keys: name, website, phone, contact_email, linkedin_url, description,\n * company_size, founded_year, industry, country_code, annual_revenue.\n * Values: a string key (\"name\"), an array path ([\"company\", \"name\"]),\n * or an operation hash ({\"op\": \"parse_employee_range\", \"path\": [\"size_range\"]}).\n * All referenced keys must exist in organization_schema.\n */\n organizationFieldMappings: Scalars['JSON']['output'];\n /** JSON Schema (draft-07) describing the expected shape of organization rawData payloads. */\n organizationSchema: Scalars['JSON']['output'];\n /** Short machine-readable identifier for this source (e.g. snitcher, hunter). */\n slug: Scalars['String']['output'];\n /** Weight applied during multi-source merging, 0.0–1.0. Higher scores win field conflicts. */\n trustScore: Scalars['Float']['output'];\n /** When the source configuration was last updated. */\n updatedAt: Scalars['ISO8601DateTime']['output'];\n};\n\n/** Filter on a string column with positive and negative matching. */\nexport type StringFilterInput = {\n /**\n * When true, a row also matches when the attribute is blank — NULL, an empty\n * string, an empty list, or no related record, depending on the column. The\n * connection edge reports which branch admitted each row via `filterMatches`.\n * Contrast `blank`, which narrows to blank-only rows where this one widens to include them.\n */\n allowBlank?: InputMaybe<Scalars['Boolean']['input']>;\n /** When true, match only rows where the column is NULL or empty. False or omitted applies no constraint. */\n blank?: InputMaybe<Scalars['Boolean']['input']>;\n /** Exact match. */\n eq?: InputMaybe<Scalars['String']['input']>;\n /** Match any of these values. Maximum 10000 entries. */\n in?: InputMaybe<Array<Scalars['String']['input']>>;\n /** Exclude exact match. */\n notEq?: InputMaybe<Scalars['String']['input']>;\n /** Exclude any of these values. Maximum 10000 entries. */\n notIn?: InputMaybe<Array<Scalars['String']['input']>>;\n /** When true, match only rows where the column is neither NULL nor empty. False or omitted applies no constraint. */\n presence?: InputMaybe<Scalars['Boolean']['input']>;\n};\n\n/** Root subscription type. Each subgraph contributes its own fields to it. */\nexport type Subscription = {\n __typename?: 'Subscription';\n /**\n * Delivers the result of an `enrichContact` call when `externalId` was supplied,\n * keyed by that `externalId`. The payload contains the merged Contact after enrichment,\n * or a null Contact and an `unresolvedReason` when none could be resolved.\n */\n contactEnrichmentResult: ContactEnrichmentResultPayload;\n /**\n * Delivers the result of a `findContacts` call: the page it asked for, keyed by\n * `externalId`, and only to a subscriber acting for the caller that made it. Subscribe\n * with the same `externalId` before calling `findContacts`. A page is sent again as\n * Atlas fills it, until `status` is COMPLETE; asking for the next page stops sending\n * the earlier one.\n */\n contactFindProgress: ContactFindProgress;\n /**\n * Delivers the result of a `searchContact` call, keyed by `externalId`.\n * Subscribe before or immediately after calling `searchContact`, passing the\n * same `externalId`. The payload contains the matched Contact (or null if not found),\n * regardless of which probe mode was used.\n */\n contactIdentifyResult: ContactIdentifyResultPayload;\n /**\n * Delivers the result of a `searchContacts` call, keyed by `externalId`.\n * The payload contains the contacts matching the filter — both\n * pre-existing database matches and newly-discovered, newly-persisted\n * third-party (Coresignal) matches, since Coresignal-sourced contacts\n * are persisted before this query runs.\n */\n contactSearchResult: ContactSearchResultPayload;\n /**\n * Delivers the result of a `validateContact` call, keyed by `externalId`.\n * The payload contains the Contact and per-field coherence flags in `clues`.\n */\n contactValidationResult: ContactValidationResultPayload;\n /**\n * Delivers the result of a `validateDomain` call, keyed by `externalId`.\n * The payload contains the Organization and per-field coherence flags in `clues`.\n */\n domainValidationResult: DomainValidationResultPayload;\n /**\n * Delivers the verdict of a `verifyEmailAddress` call, keyed by `externalId`, and only\n * to a subscriber acting for the caller that made it.\n */\n emailAddressVerificationResult: EmailAddressVerificationResult;\n /**\n * Delivers the result of an `enrichOrganization` call when `externalId` was\n * supplied, keyed by that `externalId`. Fires once the merge has settled,\n * including the embedding columns, so the organization is immediately\n * queryable through embedding filters (e.g. `industry`).\n */\n organizationEnrichmentResult: OrganizationEnrichmentResultPayload;\n /**\n * Delivers the result of a `findOrganizations` call: the page it asked for, keyed by\n * `externalId`, and only to a subscriber acting for the caller that made it. Subscribe\n * with the same `externalId` before calling `findOrganizations`. A page is sent again as\n * Atlas fills it, until `status` is COMPLETE; asking for the next page stops sending\n * the earlier one.\n */\n organizationFindProgress: OrganizationFindProgress;\n /**\n * Delivers the result of an `identifyOrganizationByIp` call, keyed by `externalId`, and\n * only to a subscriber acting for the caller that made it: the organization behind the\n * IP, or null when Atlas could not tell who it is.\n */\n organizationIdentifyResult: OrganizationIdentifyResult;\n /**\n * Delivers the result of a `searchOrganization` call, keyed by `externalId`.\n * The payload contains the Organization once Atlas has looked up or enriched it\n * (whether by domain or IP), or null if no match was found.\n */\n organizationSearchResult: OrganizationSearchResultPayload;\n /**\n * Delivers an action the moment it settles, `COMPLETED` or `FAILED`, to the\n * caller that performed it, keyed by account and `externalId`. Choose the key,\n * subscribe, then call `performOutboundChannelAction`: the result cannot slip by\n * before the subscription exists. The fast path only: a subscription lives\n * minutes, so the webhook event and `outboundChannelAction(id)` remain the paths of record.\n */\n outboundChannelActionResult: OutboundChannelActionResultPayload;\n /** Spike subscription used to validate the callback transport end-to-end. */\n ping: PingPayload;\n /**\n * Delivers each lead as it qualifies, once, to its watcher's owner: one watcher\n * with `watcherId`, every watcher the caller owns without it. Real time only —\n * a lead that qualified while nothing listened is not replayed, so catch up with\n * `watcherEvents(filter: { qualifiedAt: { gt: … } })`.\n */\n watcherEventQualified: WatcherEventQualifiedPayload;\n /**\n * Delivers the outcome of a `createWatcher` call once every provider has\n * settled (provisioned or terminally failed), keyed by the `externalId`\n * the caller passed to the mutation. Subscribe before mutating. Covers\n * the fast path only — a subscription lives minutes, while an upstream\n * outage can keep provisioning pending for hours — so poll the watcher's\n * `provisioningStatus` to cover the long tail.\n */\n watcherProvisioningResult: WatcherProvisioningResultPayload;\n};\n\n\n/** Root subscription type. Each subgraph contributes its own fields to it. */\nexport type SubscriptionContactEnrichmentResultArgs = {\n externalId: Scalars['ID']['input'];\n};\n\n\n/** Root subscription type. Each subgraph contributes its own fields to it. */\nexport type SubscriptionContactFindProgressArgs = {\n externalId: Scalars['ID']['input'];\n};\n\n\n/** Root subscription type. Each subgraph contributes its own fields to it. */\nexport type SubscriptionContactIdentifyResultArgs = {\n externalId: Scalars['ID']['input'];\n};\n\n\n/** Root subscription type. Each subgraph contributes its own fields to it. */\nexport type SubscriptionContactSearchResultArgs = {\n externalId: Scalars['ID']['input'];\n};\n\n\n/** Root subscription type. Each subgraph contributes its own fields to it. */\nexport type SubscriptionContactValidationResultArgs = {\n externalId: Scalars['ID']['input'];\n};\n\n\n/** Root subscription type. Each subgraph contributes its own fields to it. */\nexport type SubscriptionDomainValidationResultArgs = {\n externalId: Scalars['ID']['input'];\n};\n\n\n/** Root subscription type. Each subgraph contributes its own fields to it. */\nexport type SubscriptionEmailAddressVerificationResultArgs = {\n externalId: Scalars['ID']['input'];\n};\n\n\n/** Root subscription type. Each subgraph contributes its own fields to it. */\nexport type SubscriptionOrganizationEnrichmentResultArgs = {\n externalId: Scalars['ID']['input'];\n};\n\n\n/** Root subscription type. Each subgraph contributes its own fields to it. */\nexport type SubscriptionOrganizationFindProgressArgs = {\n externalId: Scalars['ID']['input'];\n};\n\n\n/** Root subscription type. Each subgraph contributes its own fields to it. */\nexport type SubscriptionOrganizationIdentifyResultArgs = {\n externalId: Scalars['ID']['input'];\n};\n\n\n/** Root subscription type. Each subgraph contributes its own fields to it. */\nexport type SubscriptionOrganizationSearchResultArgs = {\n externalId: Scalars['ID']['input'];\n};\n\n\n/** Root subscription type. Each subgraph contributes its own fields to it. */\nexport type SubscriptionOutboundChannelActionResultArgs = {\n channelAccountId: Scalars['ID']['input'];\n externalId: Scalars['String']['input'];\n};\n\n\n/** Root subscription type. Each subgraph contributes its own fields to it. */\nexport type SubscriptionPingArgs = {\n externalId: Scalars['ID']['input'];\n};\n\n\n/** Root subscription type. Each subgraph contributes its own fields to it. */\nexport type SubscriptionWatcherEventQualifiedArgs = {\n watcherId?: InputMaybe<Scalars['ID']['input']>;\n};\n\n\n/** Root subscription type. Each subgraph contributes its own fields to it. */\nexport type SubscriptionWatcherProvisioningResultArgs = {\n externalId: Scalars['ID']['input'];\n};\n\n/** Tokens from the device and refresh flows, or the provider's error code when the device flow has not produced them. */\nexport type TokenResponse = {\n __typename?: 'TokenResponse';\n /** Bearer token for calling the federation, or null whenever `error` is set. */\n accessToken?: Maybe<Scalars['String']['output']>;\n /**\n * OAuth error code from the provider; null on success. authorization_pending and\n * slow_down mean poll again; expired_token and access_denied are final, so start\n * a new device flow.\n */\n error?: Maybe<Scalars['String']['output']>;\n /** Seconds until the access token expires. */\n expiresIn?: Maybe<Scalars['Int']['output']>;\n /** OpenID Connect ID token, when the scope asked for one. */\n idToken?: Maybe<Scalars['String']['output']>;\n /** Token for `refreshToken`, when offline access was granted. */\n refreshToken?: Maybe<Scalars['String']['output']>;\n /** Type of the access token, normally Bearer. */\n tokenType?: Maybe<Scalars['String']['output']>;\n};\n\n/** Autogenerated input type of TriggerWatcher */\nexport type TriggerWatcherInput = {\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: InputMaybe<Scalars['String']['input']>;\n id: Scalars['ID']['input'];\n};\n\n/** Autogenerated return type of TriggerWatcher. */\nexport type TriggerWatcherPayload = Node & {\n __typename?: 'TriggerWatcherPayload';\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: Maybe<Scalars['String']['output']>;\n id: Scalars['ID']['output'];\n /** The watcher the run was fired for. */\n watcher: Watcher;\n};\n\n/** Autogenerated input type of UpdateSource */\nexport type UpdateSourceInput = {\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: InputMaybe<Scalars['String']['input']>;\n /**\n * Maps Atlas canonical contact field names to rawData extraction expressions.\n * Keys: first_name, last_name, email_address, job_title, job_level, job_function,\n * linkedin_url, city, country_code.\n * Values: a string key (\"firstname\"), an array path for nested access\n * ([\"data\", \"email\"]), or an operation hash\n * ({\"op\": \"split\", \"key\": \"full_name\", \"index\": 0}).\n * All referenced keys must exist in contact_schema.\n */\n contactFieldMappings?: InputMaybe<Scalars['JSON']['input']>;\n /** JSON Schema (draft-07) describing the expected shape of contact rawData payloads. */\n contactSchema?: InputMaybe<Scalars['JSON']['input']>;\n /**\n * Maps Atlas canonical identification field names to rawData extraction expressions.\n * Keys: ip_address, organization_domain, confidence_score.\n * Values follow the same expression syntax as contact_field_mappings.\n * All referenced keys must exist in identification_schema.\n */\n identificationFieldMappings?: InputMaybe<Scalars['JSON']['input']>;\n /** JSON Schema (draft-07) describing the expected shape of identification rawData payloads. */\n identificationSchema?: InputMaybe<Scalars['JSON']['input']>;\n /**\n * Maps Atlas canonical organization field names to rawData extraction expressions.\n * Keys: name, website, phone, contact_email, linkedin_url, description,\n * company_size, founded_year, industry, country_code, annual_revenue.\n * Values: a string key (\"name\"), an array path ([\"company\", \"name\"]),\n * or an operation hash ({\"op\": \"parse_employee_range\", \"path\": [\"size_range\"]}).\n * All referenced keys must exist in organization_schema.\n */\n organizationFieldMappings?: InputMaybe<Scalars['JSON']['input']>;\n /** JSON Schema (draft-07) describing the expected shape of organization rawData payloads. */\n organizationSchema?: InputMaybe<Scalars['JSON']['input']>;\n /** Global ID of the source to update. */\n sourceId: Scalars['ID']['input'];\n /** Weight applied during multi-source merging, 0.0–1.0. Higher scores win field conflicts. */\n trustScore?: InputMaybe<Scalars['Float']['input']>;\n};\n\n/** Autogenerated input type of UpdateWatcherLeadCaps */\nexport type UpdateWatcherLeadCapsInput = {\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: InputMaybe<Scalars['String']['input']>;\n /** Global id of the Watcher whose caps are being replaced. */\n id: Scalars['ID']['input'];\n /** The full set of caps for the Watcher. Pass an empty list to remove all caps (leaving the Watcher uncapped). */\n leadCaps: Array<WatcherLeadCapInput>;\n};\n\n/** Autogenerated return type of UpdateWatcherLeadCaps. */\nexport type UpdateWatcherLeadCapsPayload = Node & {\n __typename?: 'UpdateWatcherLeadCapsPayload';\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: Maybe<Scalars['String']['output']>;\n id: Scalars['ID']['output'];\n /** The updated Watcher. */\n watcher: Watcher;\n};\n\n/** Federation reference to a User owned by another subgraph. */\nexport type User = Node & {\n __typename?: 'User';\n /** Companies this user belongs to. Reading this never provisions — only the caller's own first access does, through `me`. */\n companies: CompanyConnection;\n /** When this person first reached Hermes — their row is provisioned on that request, not when they registered with Auth0. */\n createdAt: Scalars['ISO8601DateTime']['output'];\n /**\n * The company this user acts for by default, chosen with `setDefaultCompany`.\n * Only ever resolved for the caller themselves, and null once they no longer belong to it.\n */\n defaultCompany?: Maybe<Company>;\n /** Cached from Auth0 on this user's own requests. May lag; never authoritative. */\n email?: Maybe<Scalars['String']['output']>;\n /** Cached from Auth0. Null when the identity provider does not supply one. */\n firstName?: Maybe<Scalars['String']['output']>;\n /** GlobalID-encoded User id. */\n id: Scalars['ID']['output'];\n /** Cached from Auth0. Null when the identity provider does not supply one. */\n lastName?: Maybe<Scalars['String']['output']>;\n /**\n * The Auth0 subject. It is what a log line and a JWT carry, so it is the handle\n * support correlates on — and the reason `user(sub:)` is not open: a subject is\n * copyable, so an unscoped lookup by it is a directory.\n */\n oauthId: Scalars['String']['output'];\n};\n\n\n/** Federation reference to a User owned by another subgraph. */\nexport type UserCompaniesArgs = {\n after?: InputMaybe<Scalars['String']['input']>;\n before?: InputMaybe<Scalars['String']['input']>;\n first?: InputMaybe<Scalars['Int']['input']>;\n last?: InputMaybe<Scalars['Int']['input']>;\n};\n\n/** The connection type for User. */\nexport type UserConnection = {\n __typename?: 'UserConnection';\n /** A list of edges. */\n edges?: Maybe<Array<Maybe<UserEdge>>>;\n /** A list of nodes. */\n nodes?: Maybe<Array<Maybe<User>>>;\n /** Information to aid in pagination. */\n pageInfo: PageInfo;\n /** Total number of items across all pages. */\n totalCount: Scalars['Int']['output'];\n};\n\n/** An edge in a connection. */\nexport type UserEdge = {\n __typename?: 'UserEdge';\n /** A cursor for use in pagination. */\n cursor: Scalars['String']['output'];\n /** The item at the end of the edge. */\n node?: Maybe<User>;\n};\n\n/** Filter criteria for people. */\nexport type UserFilterInput = {\n /** The Auth0 subjects, as a log line or a ledger row names them. */\n oauthId?: InputMaybe<StringFilterInput>;\n};\n\n/** Autogenerated input type of ValidateContact */\nexport type ValidateContactInput = {\n /** Optional values to cross-check against Atlas data (email, phone). */\n checks?: InputMaybe<ContactValidationChecksInput>;\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: InputMaybe<Scalars['String']['input']>;\n /** Caller-supplied correlation key; pass the same value to `contactValidationResult(externalId:)` to receive the result. */\n externalId: Scalars['String']['input'];\n /** Contact's first name to validate. */\n firstName: Scalars['String']['input'];\n /** Contact's last name to validate. */\n lastName: Scalars['String']['input'];\n /** Global ID of the organization this contact belongs to. */\n organizationId: Scalars['ID']['input'];\n /**\n * Optional URL to receive the result via webhook. Callers consuming results via\n * the federated `contactValidationResult` subscription can omit it. Requires the\n * `atlas/source:write` scope.\n */\n webhookUrl?: InputMaybe<Scalars['String']['input']>;\n};\n\n/** Autogenerated return type of ValidateContact. */\nexport type ValidateContactPayload = {\n __typename?: 'ValidateContactPayload';\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: Maybe<Scalars['String']['output']>;\n /** One of: received. */\n status: Scalars['String']['output'];\n};\n\n/** Autogenerated input type of ValidateDomain */\nexport type ValidateDomainInput = {\n /** Company field values to cross-check against Atlas data. */\n checks?: InputMaybe<ValidationChecksInput>;\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: InputMaybe<Scalars['String']['input']>;\n /** The company's primary web domain to validate. */\n domain: Scalars['String']['input'];\n /** Caller-supplied correlation key; pass the same value to `domainValidationResult(externalId:)` to receive the result. */\n externalId: Scalars['String']['input'];\n /**\n * Optional URL to receive the result via webhook. Callers consuming results via\n * the federated `domainValidationResult` subscription can omit it. Requires the\n * `atlas/source:write` scope.\n */\n webhookUrl?: InputMaybe<Scalars['String']['input']>;\n};\n\n/** Autogenerated return type of ValidateDomain. */\nexport type ValidateDomainPayload = {\n __typename?: 'ValidateDomainPayload';\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: Maybe<Scalars['String']['output']>;\n /** One of: received. */\n status: Scalars['String']['output'];\n};\n\n/** Company field values to cross-check against Atlas's stored organization data. */\nexport type ValidationChecksInput = {\n /** Expected annual revenue string to validate against the stored range. */\n annualRevenue?: InputMaybe<Scalars['String']['input']>;\n /** Expected employee count string to validate against the stored range. */\n companySize?: InputMaybe<Scalars['String']['input']>;\n /** General contact email address to validate. */\n contactEmail?: InputMaybe<Scalars['String']['input']>;\n /** Four-digit founding year to validate against the stored value. */\n foundedYear?: InputMaybe<Scalars['Int']['input']>;\n /** Industry string to validate against the stored classification. */\n industry?: InputMaybe<Scalars['String']['input']>;\n /** IP address to include in identification coherence checks. */\n ip?: InputMaybe<Scalars['String']['input']>;\n /** LinkedIn company page URL to validate. */\n linkedinUrl?: InputMaybe<Scalars['String']['input']>;\n /**\n * Mercator Location id (Relay global id) whose country Atlas uses. A location\n * inside a country resolves to that country, so a city id is accepted; one above\n * the country level, such as a continent, has no country and is treated as no country.\n */\n locationId?: InputMaybe<Scalars['ID']['input']>;\n /** Legal or trade name to validate against the stored value. */\n name?: InputMaybe<Scalars['String']['input']>;\n /** Main phone number to validate. */\n phone?: InputMaybe<Scalars['String']['input']>;\n};\n\n/** Autogenerated input type of VerifyEmailAddress */\nexport type VerifyEmailAddressInput = {\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: InputMaybe<Scalars['String']['input']>;\n /**\n * The email address to verify. Surrounding whitespace and letter case are\n * ignored. A blank value is rejected with `INVALID_INTERACTION`.\n */\n emailAddress: Scalars['String']['input'];\n /** Caller-supplied identifier keying the `emailAddressVerificationResult` subscription. */\n externalId: Scalars['ID']['input'];\n};\n\n/** Autogenerated return type of VerifyEmailAddress. */\nexport type VerifyEmailAddressPayload = {\n __typename?: 'VerifyEmailAddressPayload';\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: Maybe<Scalars['String']['output']>;\n /** One of: received. */\n status: Scalars['String']['output'];\n};\n\n/** Federation reference to a Watcher owned by another subgraph. */\nexport type Watcher = Node & {\n __typename?: 'Watcher';\n /** Timestamp at which the Watcher was permanently canceled, or null if active or paused. */\n canceledAt?: Maybe<Scalars['ISO8601DateTime']['output']>;\n /**\n * The Hermes company this Watcher belongs to, as the GlobalID hermes addresses\n * it by. Null on a watcher created before companies were recorded, or by a\n * subject that belongs to none. `ownerSub` says who created it; this says who is\n * billed for it, and the two answer different halves of \"whose watcher is this\".\n */\n companyId?: Maybe<Scalars['ID']['output']>;\n /** Timestamp when the Watcher was created. */\n createdAt: Scalars['ISO8601DateTime']['output'];\n /** The signal Definition this Watcher tracks. */\n definition: WatcherDefinition;\n /**\n * Events this Watcher captured, newest first. Kept ones by default: a delivery\n * that was refused — a duplicate, a lead past the cap, an upstream payload\n * carrying no contact — never became a lead. Its reason is operator data, so\n * listing it through `state` takes a service-wide read scope — the one staff\n * hold, not the per-resource scope a customer is granted.\n */\n events: WatcherEventHistoryConnection;\n /**\n * Ideal Customer Profile this Watcher filters its leads by, in the same shape\n * Atlas search uses — including geography, as `contact.divisionIds` /\n * `organization.divisionIds`. Null for a Watcher created without a profile. Part\n * of the Watcher's identity, so it is fixed at creation.\n */\n icp?: Maybe<WatcherIcp>;\n /** GlobalID-encoded Watcher id. */\n id: Scalars['ID']['output'];\n /**\n * User-supplied input that defines what to track (e.g. keywords, domain, post\n * URL). Provider-managed configuration is not included here.\n */\n input: Scalars['JSON']['output'];\n /**\n * Client-side installation artifacts for this Watcher, one entry per provider\n * that publishes one. Each entry is a provider-specific JSON blob. By convention\n * every entry includes an `instructions` markdown field that tells the consumer\n * (agent or UI) how to walk the user through the install, plus the concrete\n * artifacts those instructions reference (e.g. Snitcher exposes `snippet`,\n * `snippet_version`, `wordpress_plugin_url`, `help_article_path`). Empty when no\n * provider requires client-side setup.\n */\n installations: Array<Scalars['JSON']['output']>;\n /** Freshness-first per-period lead caps applied to this Watcher. Empty when the Watcher is uncapped. */\n leadCaps: WatcherLeadCapConnection;\n /**\n * Whether this Watcher is currently producing signals. Reads PAUSED when every\n * registered webhook is paused, which provisioningStatus cannot express.\n */\n lifecycleState: WatcherLifecycleStateEnum;\n /** Human-readable display name of the Watcher, derived from the signal Definition it tracks. */\n name: Scalars['String']['output'];\n /**\n * The subject that created this Watcher — an Auth0 subject for a person,\n * `application:<uuid>` for a machine. It is what ownership is enforced on, so it\n * is also what correlates a Watcher to a log line.\n */\n ownerSub: Scalars['String']['output'];\n /**\n * Identifiers the upstream services assigned to this Watcher, one per provider\n * that holds one. Gated behind `signals/watcher:*` because these are internal\n * vendor ids — unlike `installations`, they are not customer-facing and disclose\n * which third party backs the signal. Empty for providers that keep no external reference.\n */\n providerReferences: Array<WatcherProviderReference>;\n /**\n * Where each provider stands: provisioned or not, torn down or not, and when it\n * next runs. Requires `signals/watcher:read` rather than the wider scope\n * providerReferences needs, because it carries no upstream identifier — only\n * whether the plumbing works.\n */\n providerStates: WatcherProviderStateConnection;\n /**\n * Terminal per-provider provisioning failures, one entry per provider that could\n * not be set up. Entries accumulate as each provider settles, so a still-PENDING\n * watcher can already carry failures for the providers that gave up first; empty\n * when everything provisioned. Gated behind `signals/watcher:*` for the same\n * reason `providerReferences` is: the provider slug discloses which third party\n * backs the signal.\n */\n provisioningFailures: Array<WatcherProvisioningFailure>;\n /**\n * Aggregate provisioning state of this Watcher's providers. `PROVISIONED` on a\n * Watcher created the default synchronous way; a Watcher created with\n * `createWatcher(async: true)` starts `PENDING` and settles once every provider\n * has an answer — poll this field, or subscribe to `watcherProvisioningResult`,\n * to learn the outcome.\n */\n provisioningStatus: WatcherProvisioningStatusEnum;\n /** Timestamp of the most recent change to this Watcher. */\n updatedAt: Scalars['ISO8601DateTime']['output'];\n /** Delivery URLs registered on this watcher. Secrets are never exposed. */\n webhookUrls: Array<Scalars['String']['output']>;\n /**\n * Where each delivery endpoint stands and how it has been answering — paused or\n * not, how many leads reached it, how many failed. Requires\n * `signals/watcher:read`, and each summary is a set of aggregate queries: select\n * it on one Watcher, not across a list. `webhookUrls` stays the customer-facing\n * view of the same endpoints.\n */\n webhooks: WatcherWebhookConnection;\n};\n\n\n/** Federation reference to a Watcher owned by another subgraph. */\nexport type WatcherEventsArgs = {\n after?: InputMaybe<Scalars['String']['input']>;\n before?: InputMaybe<Scalars['String']['input']>;\n first?: InputMaybe<Scalars['Int']['input']>;\n last?: InputMaybe<Scalars['Int']['input']>;\n state?: InputMaybe<WatcherEventStateFilterInput>;\n};\n\n\n/** Federation reference to a Watcher owned by another subgraph. */\nexport type WatcherLeadCapsArgs = {\n after?: InputMaybe<Scalars['String']['input']>;\n before?: InputMaybe<Scalars['String']['input']>;\n first?: InputMaybe<Scalars['Int']['input']>;\n last?: InputMaybe<Scalars['Int']['input']>;\n};\n\n\n/** Federation reference to a Watcher owned by another subgraph. */\nexport type WatcherProviderStatesArgs = {\n after?: InputMaybe<Scalars['String']['input']>;\n before?: InputMaybe<Scalars['String']['input']>;\n first?: InputMaybe<Scalars['Int']['input']>;\n last?: InputMaybe<Scalars['Int']['input']>;\n};\n\n\n/** Federation reference to a Watcher owned by another subgraph. */\nexport type WatcherWebhooksArgs = {\n after?: InputMaybe<Scalars['String']['input']>;\n before?: InputMaybe<Scalars['String']['input']>;\n first?: InputMaybe<Scalars['Int']['input']>;\n last?: InputMaybe<Scalars['Int']['input']>;\n};\n\n/** The connection type for Watcher. */\nexport type WatcherConnection = {\n __typename?: 'WatcherConnection';\n /** A list of edges. */\n edges?: Maybe<Array<Maybe<WatcherEdge>>>;\n /** A list of nodes. */\n nodes?: Maybe<Array<Maybe<Watcher>>>;\n /** Information to aid in pagination. */\n pageInfo: PageInfo;\n /** Total number of items across all pages. */\n totalCount: Scalars['Int']['output'];\n};\n\n/**\n * Person-level ICP criteria, as submitted. Mirrors `WatcherContactIcpInput`, which\n * in turn mirrors the subset of Atlas's `ContactFilterInput` an upstream lead\n * source can enforce.\n */\nexport type WatcherContactIcp = {\n __typename?: 'WatcherContactIcp';\n /** Mercator locations the person had to belong to. */\n divisionIds?: Maybe<WatcherDivisionFilter>;\n /**\n * Job title embedding filters. Only the *direction* of `match` was honoured\n * upstream (`INCLUDED_*` include, `EXCLUDED_*` exclude); the entry is echoed\n * back as the caller sent it, including a deprecated `distance`.\n */\n jobTitle?: Maybe<Array<EmbeddingFilter>>;\n};\n\n/** Person-level ICP criteria, mirroring the subset of Atlas's `ContactFilterInput` that an upstream lead source can enforce. */\nexport type WatcherContactIcpInput = {\n /**\n * Mercator location division IDs the person must belong to. Resolved to place\n * names before being handed upstream, since no source speaks Mercator.\n */\n divisionIds?: InputMaybe<IdFilterInput>;\n /**\n * Job title embedding filters. Each `query` is embedded as a single vector, so\n * keep one string to one semantic neighborhood — packing unrelated roles into it\n * dilutes the vector and forces a looser match, costing precision. To target\n * several distinct roles, list them in `queries`: each keeps its own vector, and\n * the entry matches a person close to any of them. Entries combine with AND (an\n * include plus an exclude). Upstream sources honour only the *direction* of\n * `match` (`INCLUDED_*` include, `EXCLUDED_*` exclude); the threshold behind it\n * is enforced at delivery time. Note that upstream sources OR every included\n * title together, so on their side a `queries` list and separate entries are\n * indistinguishable — the AND is enforced at delivery time.\n */\n jobTitle?: InputMaybe<Array<EmbeddingFilterInput>>;\n};\n\n/** A signal Definition: a code-defined strategy that produces leads from external sources via one or more internal providers. */\nexport type WatcherDefinition = {\n __typename?: 'WatcherDefinition';\n /**\n * JSON Schema describing the shape of `Event.payload` rows produced by this\n * Definition, regardless of which provider delivered them. `Event.payload` is\n * projected onto this schema, so a property it does not declare is never\n * returned. Property names are camelCase, matching the payload; each carries a\n * localized `title` in the caller's locale.\n */\n canonicalEventSchema: Scalars['JSON']['output'];\n /** Whether this Definition version is deprecated. */\n deprecated: Scalars['Boolean']['output'];\n /** Human-readable explanation of the signal this Definition captures. */\n description?: Maybe<Scalars['String']['output']>;\n /**\n * Display-only description localized to the caller's Accept-Language locale, for\n * showing in the UI. Falls back to the English `description` when no translation exists.\n */\n descriptionLocalized?: Maybe<Scalars['String']['output']>;\n /** Stable composite identifier in the form 'slug@version'. */\n id: Scalars['ID']['output'];\n /** Human-readable name of the Definition. */\n name: Scalars['String']['output'];\n /**\n * Display-only name localized to the caller's Accept-Language locale, for\n * showing in the UI. Falls back to the English `name` when no translation exists.\n */\n nameLocalized: Scalars['String']['output'];\n /** Cron expression for scheduled ingestion runs, or null if the Definition is purely webhook-driven. */\n scheduleCron?: Maybe<Scalars['String']['output']>;\n /** URL-safe identifier of the Definition (e.g. 'radar'). */\n slug: Scalars['String']['output'];\n /** Ways this Definition can be triggered (scheduled, webhook, manual). */\n triggers: Array<WatcherDefinitionTriggerEnum>;\n /** Definition version. Bumped when the canonical event shape changes. */\n version: Scalars['Int']['output'];\n /**\n * JSON Schema for the user-supplied watcher input. The same input is fanned out\n * to every internal provider; providers never require additional user input.\n * Each property carries a localized `title` and, for enum-constrained\n * properties, an `x-enumLabels` map of localized option labels in the caller's locale.\n */\n watcherInputSchema: Scalars['JSON']['output'];\n};\n\n/** The connection type for WatcherDefinition. */\nexport type WatcherDefinitionConnection = {\n __typename?: 'WatcherDefinitionConnection';\n /** A list of edges. */\n edges?: Maybe<Array<Maybe<WatcherDefinitionEdge>>>;\n /** A list of nodes. */\n nodes?: Maybe<Array<Maybe<WatcherDefinition>>>;\n /** Information to aid in pagination. */\n pageInfo: PageInfo;\n /** Total number of items across all pages. */\n totalCount: Scalars['Int']['output'];\n};\n\n/** An edge in a connection. */\nexport type WatcherDefinitionEdge = {\n __typename?: 'WatcherDefinitionEdge';\n /** A cursor for use in pagination. */\n cursor: Scalars['String']['output'];\n /** The item at the end of the edge. */\n node?: Maybe<WatcherDefinition>;\n};\n\n/** Filter arguments for the definitions connection. */\nexport type WatcherDefinitionFilterInput = {\n /** Include deprecated definitions. Defaults to false. */\n includeDeprecated?: InputMaybe<Scalars['Boolean']['input']>;\n};\n\n/** How a Watcher run is initiated. */\nexport type WatcherDefinitionTriggerEnum =\n | 'MANUAL'\n | 'SCHEDULE'\n | 'WEBHOOK';\n\n/** A Mercator location filter, as submitted, resolved to Locations. */\nexport type WatcherDivisionFilter = {\n __typename?: 'WatcherDivisionFilter';\n /** Location that had to match exactly. */\n eq?: Maybe<Location>;\n /** Locations any of which had to match. */\n in?: Maybe<Array<Location>>;\n /** Location that was excluded. */\n notEq?: Maybe<Location>;\n /** Locations that were excluded. */\n notIn?: Maybe<Array<Location>>;\n};\n\n/**\n * Policy for a lead the upstream source has already delivered for this Watcher.\n * Omit the whole input to leave the source's own default in place.\n */\nexport type WatcherDuplicateHandlingInput = {\n /** Which policy applies. */\n mode: WatcherDuplicateHandlingModeEnum;\n /**\n * How long a repeat delivery stays refused, as an ISO-8601 duration (e.g. P7D).\n * Required when `mode` is REFUSE_DURING and rejected otherwise. Sources count\n * this in whole days, so a duration that isn't a whole number of days is rejected.\n */\n period?: InputMaybe<Scalars['ISO8601Duration']['input']>;\n};\n\n/** How the upstream source treats a lead it has already delivered for a Watcher. */\nexport type WatcherDuplicateHandlingModeEnum =\n /** Always deliver, even for a lead already seen. */\n | 'ALWAYS'\n /** Never deliver the same lead twice. */\n | 'REFUSE'\n /** Refuse a repeat delivery for `period`, then allow it again. */\n | 'REFUSE_DURING';\n\n/** An edge in a connection. */\nexport type WatcherEdge = {\n __typename?: 'WatcherEdge';\n /** A cursor for use in pagination. */\n cursor: Scalars['String']['output'];\n /** The item at the end of the edge. */\n node?: Maybe<Watcher>;\n};\n\n/** Federation reference to a WatcherEvent owned by another subgraph. */\nexport type WatcherEvent = Node & {\n __typename?: 'WatcherEvent';\n /**\n * Atlas contact this Event resolved to, with the reach dimensions this query\n * revealed about it. Signals hands Atlas the contact id and `reveal`; Atlas\n * serves the contact and meters the reveal. Null when materialization resolved\n * no contact, or when the contact no longer exists. Requires\n * `signals/watcher:read`, and `atlas/organization:read` for what Atlas serves.\n */\n contact?: Maybe<RevealedContact>;\n /** Timestamp when the Event row was persisted. */\n createdAt: Scalars['ISO8601DateTime']['output'];\n /** Key used by the Definition's deduplication strategy. Null when the Definition does not deduplicate. */\n deduplicationKey?: Maybe<Scalars['String']['output']>;\n /**\n * Every attempt made to deliver this Event to its Watcher's webhooks, oldest\n * first. Retries each write their own row, so several attempts against one URL\n * is normal and the last one decides whether the lead arrived. Requires\n * `signals/watcher:read`.\n */\n deliveries: WatcherWebhookDeliveryConnection;\n /**\n * Why this Event never became a lead — a duplicate, or an ICP the payload did\n * not clear. Null for one that was kept. It is the difference between \"nothing\n * arrived\" and \"something arrived and was refused\", which the timestamps alone\n * cannot express.\n */\n discardReason?: Maybe<Scalars['String']['output']>;\n /** When this Event was refused. Null for one that was kept. */\n discardedAt?: Maybe<Scalars['ISO8601DateTime']['output']>;\n /**\n * How the lead cleared each attribute the Watcher's ICP constrains, one entry\n * per attribute, ordered by attribute name. Null when the Event predates the\n * check, never reached it, or its Watcher has no ICP.\n */\n icpAxisVerdicts?: Maybe<Array<WatcherEventIcpAxisVerdict>>;\n /** GlobalID-encoded WatcherEvent id. */\n id: Scalars['ID']['output'];\n /**\n * Why materialization failed, as the pipeline recorded it. Distinct from\n * discardReason: this one is our failure, not a refusal. Requires\n * `signals/watcher:read`.\n */\n materializationFailureReason?: Maybe<Scalars['String']['output']>;\n /**\n * Which route materialization took to turn this Event into a lead — the\n * difference between \"no contact was found\" and \"a contact was found the other\n * way\". Requires `signals/watcher:read`.\n */\n materializationPath?: Maybe<Scalars['String']['output']>;\n /** Timestamp at which the originating ingestion run observed this Event. */\n observedAt: Scalars['ISO8601DateTime']['output'];\n /** Timestamp at which the underlying activity actually happened upstream, when known. */\n occurredAt?: Maybe<Scalars['ISO8601DateTime']['output']>;\n /**\n * Canonical Event payload, projected onto the shape declared by the\n * `canonicalEventSchema` of the Definition version that captured it. A key the\n * schema does not declare is never returned, at any depth, and declared keys are\n * camelCase. An object the schema marks `additionalProperties: true` is returned\n * whole, under the key names its provider sends.\n */\n payload: Scalars['JSON']['output'];\n /** Timestamp of the most recent failed materialization attempt. */\n processingFailedAt?: Maybe<Scalars['ISO8601DateTime']['output']>;\n /** Timestamp at which materialization succeeded. */\n processingSucceededAt?: Maybe<Scalars['ISO8601DateTime']['output']>;\n /**\n * When this Event became a lead: it cleared the ICP and claimed a lead slot.\n * Null until then, and for a refused Event. Replayed leads keep the time they\n * first qualified.\n */\n qualifiedAt?: Maybe<Scalars['ISO8601DateTime']['output']>;\n /**\n * Delivery exactly as the provider sent it, before canonicalization: keys in the\n * provider's own names, the person's contact details and the provider's own ids\n * included. Null when the Event was recorded without one. Requires\n * `signals/*:read`, a service-wide scope Sortlist staff hold and no customer token carries.\n */\n rawPayload?: Maybe<Scalars['JSON']['output']>;\n /**\n * Atlas contact this Event resolved to, as the GlobalID atlas addresses it by —\n * the same form `Events::DeliverWebhookJob` puts on the wire, so a lead can be\n * followed from here into atlas without re-encoding anything. Null when\n * materialization resolved no contact. Requires `signals/watcher:read`.\n * @deprecated Select `contact { node { id } }` instead: it returns the Atlas contact itself, and lets the query choose which reach dimensions to reveal.\n */\n resolvedContactId?: Maybe<Scalars['String']['output']>;\n /**\n * The Watcher that captured this Event. Selected from the root `events`\n * connection, where a page spans many Watchers and a row is unreadable without\n * the one it belongs to.\n */\n watcher: Watcher;\n};\n\n\n/** Federation reference to a WatcherEvent owned by another subgraph. */\nexport type WatcherEventContactArgs = {\n reveal?: InputMaybe<Array<RevealDimension>>;\n};\n\n\n/** Federation reference to a WatcherEvent owned by another subgraph. */\nexport type WatcherEventDeliveriesArgs = {\n after?: InputMaybe<Scalars['String']['input']>;\n before?: InputMaybe<Scalars['String']['input']>;\n first?: InputMaybe<Scalars['Int']['input']>;\n last?: InputMaybe<Scalars['Int']['input']>;\n};\n\n/** The connection type for WatcherEvent. */\nexport type WatcherEventConnection = {\n __typename?: 'WatcherEventConnection';\n /** A list of edges. */\n edges?: Maybe<Array<Maybe<WatcherEventEdge>>>;\n /** A list of nodes. */\n nodes?: Maybe<Array<Maybe<WatcherEvent>>>;\n /** Information to aid in pagination. */\n pageInfo: PageInfo;\n /** Total number of items across all pages. */\n totalCount: Scalars['Int']['output'];\n};\n\n/** An edge in a connection. */\nexport type WatcherEventEdge = {\n __typename?: 'WatcherEventEdge';\n /** A cursor for use in pagination. */\n cursor: Scalars['String']['output'];\n /** The item at the end of the edge. */\n node?: Maybe<WatcherEvent>;\n};\n\n/** Filter arguments for the events connection. */\nexport type WatcherEventFilterInput = {\n /** Keep only the events captured by watchers of this Definition, by its slug, e.g. 'radar-website'. */\n definitionSlug?: InputMaybe<StringFilterInput>;\n /**\n * Keep only the events refused for this reason, e.g. 'icp_mismatch'. A reason is\n * only ever carried by a refused event, so asking for one asks for the DISCARDED\n * slice and takes the same scope.\n */\n discardReason?: InputMaybe<StringFilterInput>;\n /**\n * Keep only the leads that qualified in this window, e.g. `{ gt: <the newest\n * qualifiedAt already read> }` to fetch the leads kept since. An event that has\n * not qualified is never selected.\n */\n qualifiedAt?: InputMaybe<DateTimeFilterInput>;\n /** Which slices to list. Omitted, KEPT alone — the only slice a caller without a service-wide read scope may reach. */\n state?: InputMaybe<WatcherEventStateFilterInput>;\n /**\n * Keep only the events captured by this Watcher, as its GlobalID. The root\n * connection spans every watcher, so this is what narrows it to the one a ticket names.\n */\n watcherId?: InputMaybe<IdFilterInput>;\n};\n\n/** The connection type for WatcherEvent. */\nexport type WatcherEventHistoryConnection = {\n __typename?: 'WatcherEventHistoryConnection';\n /**\n * Events refused before materialization — a duplicate, or a lead the ICP\n * excluded. Never delivered, and excluded from `pending` so a backlog that\n * cannot drain is not reported.\n */\n discarded: Scalars['Int']['output'];\n /** A list of edges. */\n edges?: Maybe<Array<Maybe<WatcherEventEdge>>>;\n /** Events whose processing raised and has not since succeeded. */\n failed: Scalars['Int']['output'];\n /**\n * Delivered leads carrying at least one attribute the ICP could only match on\n * absence — a fit enrichment could not confirm, counted inside `total`.\n */\n icpUnverified: Scalars['Int']['output'];\n /** When the most recent event was observed upstream. Null when none ever arrived. */\n lastObservedAt?: Maybe<Scalars['ISO8601DateTime']['output']>;\n /** When an event last finished processing successfully. */\n lastSucceededAt?: Maybe<Scalars['ISO8601DateTime']['output']>;\n /** A list of nodes. */\n nodes?: Maybe<Array<Maybe<WatcherEvent>>>;\n /** Information to aid in pagination. */\n pageInfo: PageInfo;\n /** Kept events not yet processed and not currently failed — the live backlog. */\n pending: Scalars['Int']['output'];\n /** Events that finished processing successfully. */\n succeeded: Scalars['Int']['output'];\n /**\n * Every event ever ingested for this Watcher, discarded ones included — unlike\n * `totalCount`, which counts the slice `state` selected.\n */\n total: Scalars['Int']['output'];\n /** Total number of items across all pages. */\n totalCount: Scalars['Int']['output'];\n};\n\n/** One attribute the Watcher's ICP constrains, and how the lead cleared it. */\nexport type WatcherEventIcpAxisVerdict = {\n __typename?: 'WatcherEventIcpAxisVerdict';\n /** Attribute the ICP constrains. One of: job_title, contact_divisions, industry, company_size, organization_divisions. */\n axis: Scalars['String']['output'];\n /**\n * What the ICP required of this attribute, as the filter the lead was checked\n * against: a list of `{ queries, distance }` entries for job_title and industry,\n * a range operator for company_size, id operators for the others. Null when the\n * Watcher's ICP no longer constrains the axis.\n */\n criterion?: Maybe<Scalars['JSON']['output']>;\n /** How the lead cleared this attribute. */\n verdict: WatcherIcpAxisVerdictEnum;\n};\n\n/** Autogenerated return type of WatcherEventQualified. */\nexport type WatcherEventQualifiedPayload = {\n __typename?: 'WatcherEventQualifiedPayload';\n /** The qualified lead, as `watcherEvents` returns it. */\n event: WatcherEvent;\n};\n\n/**\n * Which slice of a Watcher's event history to list. Anything other than KEPT is\n * operator data and takes a service-wide read scope: a refused event carries the\n * provider's own envelope rather than a lead.\n */\nexport type WatcherEventStateEnum =\n /** Both, newest first — what a support session reads to tell \"nothing arrived\" from \"everything was refused\". */\n | 'ALL'\n /** Events refused before materialization, carrying the reason they never became a lead. */\n | 'DISCARDED'\n /** Events that became leads. The default, and the only slice a customer-facing caller sees. */\n | 'KEPT';\n\n/**\n * Which slices of an event history to list (eq/in/notEq/notIn). Omitted, only KEPT\n * is listed. Any combination reaching DISCARDED is operator data and takes a\n * service-wide read scope.\n */\nexport type WatcherEventStateFilterInput = {\n /** Exact match. */\n eq?: InputMaybe<WatcherEventStateEnum>;\n /** Match any of these values. */\n in?: InputMaybe<Array<WatcherEventStateEnum>>;\n /** Exclude exact match. */\n notEq?: InputMaybe<WatcherEventStateEnum>;\n /** Exclude any of these values. */\n notIn?: InputMaybe<Array<WatcherEventStateEnum>>;\n};\n\n/**\n * Filter criteria for watchers. Each axis is index-backed: a support session\n * narrows by the thing it was given — a subject from a log line, a company from a\n * ticket, a slug from a definition — not by a phrase it half-remembers.\n */\nexport type WatcherFilterInput = {\n /**\n * Company the watcher belongs to, as the GlobalID hermes addresses one by — the\n * same form `Watcher.companyId` returns, so what is read back is what filters.\n */\n companyId?: InputMaybe<IdFilterInput>;\n /** Slug of the tracked Definition, e.g. 'radar-website'. */\n definitionSlug?: InputMaybe<StringFilterInput>;\n /** Version of the tracked Definition. Pair with definitionSlug to reach one published version. */\n definitionVersion?: InputMaybe<FloatFilterInput>;\n /** Whether the watcher is producing signals. */\n lifecycleState?: InputMaybe<WatcherLifecycleStateFilterInput>;\n /**\n * The subject that created the watcher — an Auth0 subject for a person,\n * `application:<uuid>` for a machine. It is what ownership is enforced on, so it\n * is also what correlates a watcher to a log line.\n */\n ownerSub?: InputMaybe<StringFilterInput>;\n};\n\n/**\n * The Ideal Customer Profile a Watcher filters its leads by, returned in the same\n * vocabulary Atlas search uses. This is what the caller submitted, not what each\n * source could enforce: criteria an individual source cannot express are dropped\n * for that source only, and that translation is not reflected here.\n */\nexport type WatcherIcp = {\n __typename?: 'WatcherIcp';\n /** Person-level criteria. */\n contact?: Maybe<WatcherContactIcp>;\n /** Company-level criteria. */\n organization?: Maybe<WatcherOrganizationIcp>;\n};\n\n/**\n * Whether the delivery-time ICP re-check judged an attribute on the lead's own\n * data, on its absence, or refused the lead on it.\n */\nexport type WatcherIcpAxisVerdictEnum =\n /**\n * This attribute is why the lead was discarded as an ICP mismatch. Only a\n * discarded lead carries it, and it may carry it on more than one attribute.\n */\n | 'REFUSED'\n /** The lead was admitted on this attribute only because no value is held for it, so the attribute says nothing about its fit. */\n | 'UNVERIFIED'\n /** The ICP's own criterion is what admitted the lead on this attribute. */\n | 'VERIFIED';\n\n/**\n * The subscriber's Ideal Customer Profile, expressed in the same vocabulary Atlas\n * search uses so a caller can pass the filters it already built for\n * `searchContacts`. Enforced twice: each Watcher provider translates what it can\n * into whatever its upstream source accepts, so out-of-ICP leads are never\n * streamed — and never billed — and every resolved contact is then re-checked\n * against the full ICP before delivery. Criteria an individual source cannot\n * express are therefore still applied, just later, so the ICP means the same thing\n * whichever provider backs the watcher.\n */\nexport type WatcherIcpInput = {\n /** Person-level criteria. */\n contact?: InputMaybe<WatcherContactIcpInput>;\n /** Company-level criteria. */\n organization?: InputMaybe<WatcherOrganizationIcpInput>;\n};\n\n/**\n * A freshness-first lead cap on a Watcher: at most `maximumLeads` events are\n * surfaced per `period`, counted from `startsAt` and reset at every period boundary.\n */\nexport type WatcherLeadCap = Node & {\n __typename?: 'WatcherLeadCap';\n /** Timestamp when the cap was created. */\n createdAt: Scalars['ISO8601DateTime']['output'];\n /** Start of the window currently accumulating; events are counted from here and the usage resets at the next boundary. */\n currentPeriodStartsAt: Scalars['ISO8601DateTime']['output'];\n /**\n * Number of leads already delivered — or qualified and on their way — in the\n * current window. Leads refused before delivery (duplicates, ICP mismatches,\n * undeliverable endpoints) are not counted. The cap drops further leads once\n * this reaches `maximumLeads`.\n */\n currentUsage: Scalars['Int']['output'];\n id: Scalars['ID']['output'];\n /** Maximum number of events surfaced per period. */\n maximumLeads: Scalars['Int']['output'];\n /** Length of the accumulation window as an ISO-8601 duration, e.g. P1D or P1W. */\n period: Scalars['ISO8601Duration']['output'];\n /** Anchor at which the first period begins; each window is measured forward from here. */\n startsAt: Scalars['ISO8601DateTime']['output'];\n};\n\n/** The connection type for WatcherLeadCap. */\nexport type WatcherLeadCapConnection = {\n __typename?: 'WatcherLeadCapConnection';\n /** A list of edges. */\n edges?: Maybe<Array<Maybe<WatcherLeadCapEdge>>>;\n /** A list of nodes. */\n nodes?: Maybe<Array<Maybe<WatcherLeadCap>>>;\n /** Information to aid in pagination. */\n pageInfo: PageInfo;\n /** Total number of items across all pages. */\n totalCount: Scalars['Int']['output'];\n};\n\n/** An edge in a connection. */\nexport type WatcherLeadCapEdge = {\n __typename?: 'WatcherLeadCapEdge';\n /** A cursor for use in pagination. */\n cursor: Scalars['String']['output'];\n /** The item at the end of the edge. */\n node?: Maybe<WatcherLeadCap>;\n};\n\n/**\n * A single freshness-first lead cap for a Watcher: at most `maximumLeads` events\n * are surfaced per `period`, counted from `startsAt` and reset at every period\n * boundary. Excess events are dropped, never buffered. Combine several caps to\n * constrain multiple periods at once — the most restrictive one wins.\n */\nexport type WatcherLeadCapInput = {\n /** Maximum number of events surfaced per period. Must be greater than zero. */\n maximumLeads: Scalars['Int']['input'];\n /** Length of the accumulation window as an ISO-8601 duration, e.g. P1D (one day) or P1W (one week). */\n period: Scalars['ISO8601Duration']['input'];\n /** Anchor at which the first period begins. Defaults to the moment the cap is created. */\n startsAt?: InputMaybe<Scalars['ISO8601DateTime']['input']>;\n};\n\n/**\n * Whether a Watcher is currently producing signals. Distinct from\n * provisioningStatus, which describes its upstream resources rather than whether\n * it runs: a fully provisioned Watcher whose webhooks were all paused delivers\n * nothing and still reports PROVISIONED.\n */\nexport type WatcherLifecycleStateEnum =\n /** Not canceled, and at least one webhook is active — or it has no webhook yet, which is the state right after creation. */\n | 'ACTIVE'\n /** Terminal: canceledAt is set, providers are deprovisioned upstream and no further event is ingested. */\n | 'CANCELED'\n /** Not canceled, but every registered webhook is paused, so nothing is delivered. Reversible with setWebhookActive. */\n | 'PAUSED';\n\n/**\n * Filter on a Watcher's lifecycle state (eq/in/notEq/notIn). PAUSED is the state\n * provisioningStatus cannot express — every webhook paused on an otherwise\n * provisioned watcher — and is the usual answer to \"it stopped working\".\n */\nexport type WatcherLifecycleStateFilterInput = {\n /** Exact match. */\n eq?: InputMaybe<WatcherLifecycleStateEnum>;\n /** Match any of these values. */\n in?: InputMaybe<Array<WatcherLifecycleStateEnum>>;\n /** Exclude exact match. */\n notEq?: InputMaybe<WatcherLifecycleStateEnum>;\n /** Exclude any of these values. */\n notIn?: InputMaybe<Array<WatcherLifecycleStateEnum>>;\n};\n\n/**\n * How many contacts one matched organization may yield, and the window that is\n * measured over. Left uncapped a source mints a contact per 10% of the\n * organization's headcount — every one billed, every one pitching the same account.\n */\nexport type WatcherMaximumLeadsPerOrganizationInput = {\n /** Maximum number of contacts one matched organization may yield. Must be greater than zero. Defaults to 2. */\n maximum?: InputMaybe<Scalars['Int']['input']>;\n /**\n * Window the maximum is measured over, as an ISO-8601 duration, e.g. P1D (one\n * day). Bounds how many contacts one organization may yield before the source is\n * reported as having ignored the cap — the source itself is only told the\n * maximum, since it accepts no window. Defaults to P1D.\n */\n period?: InputMaybe<Scalars['ISO8601Duration']['input']>;\n};\n\n/**\n * Company-level ICP criteria, as submitted. Mirrors `WatcherOrganizationIcpInput`,\n * which in turn mirrors the subset of Atlas's `OrganizationFilterInput` an\n * upstream lead source can enforce.\n */\nexport type WatcherOrganizationIcp = {\n __typename?: 'WatcherOrganizationIcp';\n /**\n * Employee-count range the organization had to fall in, as `[min, max]`.\n * Flattened from the submitted filter's `overlaps`, the only operator creation\n * accepts — `contains` and `contained_by` describe querying a stored range and\n * are rejected, so there is nothing else to report.\n */\n companySize?: Maybe<Scalars['Range']['output']>;\n /** Mercator locations the organization had to belong to. */\n divisionIds?: Maybe<WatcherDivisionFilter>;\n /** Industry embedding filters, same `match` handling as `WatcherContactIcp.jobTitle`. */\n industry?: Maybe<Array<EmbeddingFilter>>;\n};\n\n/**\n * Company-level ICP criteria, mirroring the subset of Atlas's\n * `OrganizationFilterInput` that an upstream lead source can enforce.\n */\nexport type WatcherOrganizationIcpInput = {\n /**\n * Employee-count range, e.g. `{ overlaps: [0, 100] }` for \"fewer than 100\n * employees\" or `{ overlaps: [1000] }` for \"1000+\". Mapped onto the headcount\n * buckets the upstream source accepts. `contains` / `contained_by` describe\n * querying a stored range and have no meaning at an external source, so they are rejected.\n */\n companySize?: InputMaybe<RangeFilterInput>;\n /** Mercator location division IDs the organization must belong to. Resolved to place names before being handed upstream. */\n divisionIds?: InputMaybe<IdFilterInput>;\n /**\n * Filter by organization global id — the lead's employer. Its chief use is\n * excluding the companies whose employees are not leads: the page a watcher\n * tracks, and the subscriber's own. `notEq`/`notIn` are resolved to the company\n * URLs or domains the upstream source excludes on, so those leads are never\n * streamed nor billed, and re-checked at delivery for the sources that carry no\n * exclusion key. `eq`/`in` have no upstream counterpart at all — no source\n * filters on an employer allowlist — so they narrow at delivery time only. Two\n * caveats: a lead whose employer we cannot resolve is refused rather than\n * admitted, as with every other company-level criterion; and only the positive\n * operators follow organization merges, so exclude by the ids Atlas holds today\n * rather than ones merged away.\n */\n id?: InputMaybe<IdFilterInput>;\n /**\n * Industry embedding filters. Each `query` is embedded as a single vector, so\n * keep one string to one semantic neighborhood — listing many sectors in it\n * dilutes the vector and forces a looser match, costing precision. To target\n * several sectors, list them in `queries`: each keeps its own vector, and the\n * entry matches a company in any of them. Entries combine with AND. Upstream\n * sources honour only the *direction* of `match` (`INCLUDED_*` include,\n * `EXCLUDED_*` exclude); the threshold behind it is enforced at delivery time.\n * Note that upstream sources OR every included industry together, so on their\n * side a `queries` list and separate entries are indistinguishable — the AND is\n * enforced at delivery time.\n */\n industry?: InputMaybe<Array<EmbeddingFilterInput>>;\n};\n\n/**\n * The identifier a provider's upstream service assigned to this Watcher. Internal\n * plumbing rather than customer-facing data: it is only actionable with that\n * provider's own API credentials, and it discloses which third party backs the\n * signal. Exposed for operational reconciliation and end-to-end testing.\n */\nexport type WatcherProviderReference = {\n __typename?: 'WatcherProviderReference';\n /** Identifier the upstream service uses for this Watcher — for Rodz, the provisioned Signal's id. */\n externalId: Scalars['String']['output'];\n /** Slug of the definition provider holding the reference, e.g. 'rodz'. */\n providerSlug: Scalars['String']['output'];\n};\n\n/**\n * Where one of a Watcher's providers stands: whether it was provisioned upstream,\n * when it last was, and when it next runs. Deliberately carries no external\n * identifier — that one is actionable with the provider's own credentials and\n * stays on providerReferences behind a wider scope.\n */\nexport type WatcherProviderState = {\n __typename?: 'WatcherProviderState';\n /** False once the row is deprovisioned. A deprovisioned provider ingests nothing, whatever its provisioning state says. */\n active: Scalars['Boolean']['output'];\n /** When the upstream resource was torn down. Null while it lives. */\n deprovisionedAt?: Maybe<Scalars['ISO8601DateTime']['output']>;\n /**\n * When this provider is next scheduled to pull. Null for a provider driven by\n * webhooks rather than a schedule, and for one already deprovisioned — so a null\n * here separates \"nothing scheduled\" from \"overdue\".\n */\n nextRunAt?: Maybe<Scalars['ISO8601DateTime']['output']>;\n /** Slug of the definition provider, e.g. 'rodz'. */\n providerSlug: Scalars['String']['output'];\n /**\n * When the upstream resource was created. Null when provisioning has not\n * succeeded, which is the usual reason a Watcher delivers nothing at all.\n */\n provisionedAt?: Maybe<Scalars['ISO8601DateTime']['output']>;\n /** What the last provisioning attempt failed with, as the provider reported it. Null when nothing failed. */\n provisioningError?: Maybe<Scalars['JSON']['output']>;\n /** Whether the upstream resource exists yet. */\n provisioningState: WatcherProvisioningStateEnum;\n};\n\n/** The connection type for WatcherProviderState. */\nexport type WatcherProviderStateConnection = {\n __typename?: 'WatcherProviderStateConnection';\n /** A list of edges. */\n edges?: Maybe<Array<Maybe<WatcherProviderStateEdge>>>;\n /** A list of nodes. */\n nodes?: Maybe<Array<Maybe<WatcherProviderState>>>;\n /** Information to aid in pagination. */\n pageInfo: PageInfo;\n /** Total number of items across all pages. */\n totalCount: Scalars['Int']['output'];\n};\n\n/** An edge in a connection. */\nexport type WatcherProviderStateEdge = {\n __typename?: 'WatcherProviderStateEdge';\n /** A cursor for use in pagination. */\n cursor: Scalars['String']['output'];\n /** The item at the end of the edge. */\n node?: Maybe<WatcherProviderState>;\n};\n\n/**\n * A provider's terminal provisioning failure on a Watcher. Gated behind\n * `signals/watcher:*` alongside providerReferences: the provider slug discloses\n * which third party backs the signal.\n */\nexport type WatcherProvisioningFailure = {\n __typename?: 'WatcherProvisioningFailure';\n /**\n * Structured, machine-readable failure data — an Inexpressible refusal's\n * attributes, or the provider / status / upstreamCode of an upstream rejection.\n * Never vendor prose.\n */\n details: Scalars['JSON']['output'];\n /** Slug of the definition provider that failed to provision, e.g. 'rodz'. */\n providerSlug: Scalars['String']['output'];\n /**\n * Symbolic failure code. `upstream_unavailable` (retries exhausted against an\n * outage), `upstream_rejected` (the provider refused the request), or an\n * Inexpressible refusal's own reason (e.g. `unresolvable_locations`).\n */\n reason: Scalars['String']['output'];\n};\n\n/**\n * What this service would send upstream for one (Definition, provider) pair,\n * rendered without provisioning anything. Internal plumbing rather than\n * customer-facing data, exposed so the checks that assert against a provider's\n * live API can run from outside this codebase — the e2e backend suite diffs\n * `sentConfigKeys` against the provider's published schemas and offers\n * `draftRequestBody` to the live API as a draft.\n */\nexport type WatcherProvisioningPreview = {\n __typename?: 'WatcherProvisioningPreview';\n /** Slug of the Definition this preview belongs to. */\n definitionSlug: Scalars['String']['output'];\n /** Version of the Definition this preview belongs to. */\n definitionVersion: Scalars['Int']['output'];\n /**\n * The complete request body this provider's provisioning builds, from a sample\n * input derived from the Definition's own `watcherInputSchema`. Carries `status:\n * \"draft\"` where the provider has one: leads are sourced only once a signal is\n * activated, which is what makes offering this body to a live API free. Null for\n * a provider whose provisioning is a sequence of API calls rather than one\n * declarative body, leaving nothing to render ahead of time. Carries the\n * translation of the query's `icp` argument when one is given, so a caller can\n * see what a given ICP constrains upstream without provisioning a billable signal.\n */\n draftRequestBody?: Maybe<Scalars['JSON']['output']>;\n /**\n * Upstream route this provider provisions against, e.g. 'fundraising' or\n * 'gmb-listing'. Null for a provider with no named per-signal route.\n */\n endpoint?: Maybe<Scalars['String']['output']>;\n /**\n * Whether this is the latest version of the Definition. Deprecated versions\n * share their provisioning with the successor, so a consumer diffing config keys\n * can skip them without losing coverage.\n */\n latest: Scalars['Boolean']['output'];\n /** Slug of the definition provider this preview is for, e.g. 'rodz'. */\n providerSlug: Scalars['String']['output'];\n /**\n * ICP paths this Definition cannot be created without — `createWatcher` refuses\n * a watcher missing any of them, because some endpoints cannot run unfiltered.\n * Values are the caller's to supply: `organization.division_ids` wants real\n * Mercator ids, which only the caller's environment can resolve. Empty when the\n * Definition can be created with no ICP at all.\n */\n requiredIcpPaths: Array<Scalars['String']['output']>;\n /**\n * The watcher input `draftRequestBody` was rendered from, derived from the\n * Definition's own `watcherInputSchema`. Exposed so a consumer driving the real\n * `createWatcher` path needs no second implementation of \"an input this\n * Definition accepts\".\n */\n sampleWatcherInput: Scalars['JSON']['output'];\n /**\n * Every upstream filter-config key this provider's provisioning can emit — the\n * declared set, not the subset this particular sample input rendered. A key the\n * provider no longer accepts is a filter that silently stopped applying, since\n * Rodz (for one) ignores unknown config keys rather than rejecting them. Empty\n * for a provider that sends no filter config upstream and filters locally instead.\n */\n sentConfigKeys: Array<Scalars['String']['output']>;\n};\n\n/**\n * Selection arguments for the provisioning previews query. Each field picks one\n * value rather than filtering a set: an ICP-scoped preview is refused unless\n * exactly one Definition is named.\n */\nexport type WatcherProvisioningPreviewSelectorInput = {\n /**\n * Only preview this Definition, e.g. 'fundraising'. Both versions of a\n * superseded slug are returned — filter on `latest` to keep the current one.\n * Omit for every Definition.\n */\n definitionSlug?: InputMaybe<Scalars['String']['input']>;\n /** Only preview this definition provider, e.g. 'rodz' or 'snitcher'. Omit for every provider. */\n providerSlug?: InputMaybe<Scalars['String']['input']>;\n};\n\n/** Autogenerated return type of WatcherProvisioningResult. */\nexport type WatcherProvisioningResultPayload = {\n __typename?: 'WatcherProvisioningResultPayload';\n /** Echo of the externalId this event is keyed by. */\n externalId: Scalars['ID']['output'];\n /** The watcher whose provisioning settled. Read `provisioningStatus` and `provisioningFailures` off it for the outcome. */\n watcher: Watcher;\n};\n\n/** Where one provider's provisioning stands. */\nexport type WatcherProvisioningStateEnum =\n /** The last attempt failed; provisioningError says why. */\n | 'FAILED'\n /** The upstream resource has not been created yet. */\n | 'PENDING'\n /** The upstream resource exists. */\n | 'PROVISIONED';\n\n/**\n * Aggregate provisioning state of a Watcher's providers. Only a Watcher created\n * with `createWatcher(async: true)` is ever PENDING — the default synchronous\n * creation provisions before it returns, so it is already settled.\n */\nexport type WatcherProvisioningStatusEnum =\n /** Terminal: no provider could be provisioned. The Watcher will deliver nothing. */\n | 'FAILED'\n /** Terminal: some providers provisioned, others failed. The Watcher runs on the ones that succeeded. */\n | 'PARTIALLY_FAILED'\n /**\n * At least one provider is still being provisioned upstream (retried across an\n * outage for about a day). Providers that already failed terminally are visible\n * on provisioningFailures meanwhile.\n */\n | 'PENDING'\n /**\n * Every provider's upstream resource is live. Also reported when there is\n * nothing to provision — a definition with no available provider, or a canceled\n * watcher whose rows are all deprovisioned.\n */\n | 'PROVISIONED';\n\n/**\n * A delivery endpoint registered on a Watcher, with how it has been answering.\n * This is the delivery side of the pipeline: a Watcher that ingests normally and\n * delivers nothing is diagnosed here, not on providerStates.\n */\nexport type WatcherWebhook = Node & {\n __typename?: 'WatcherWebhook';\n /** When the endpoint was registered. */\n createdAt: Scalars['ISO8601DateTime']['output'];\n /** Every attempt against this endpoint, oldest first, with how it has been answering carried on the connection itself. */\n deliveries: WatcherWebhookDeliveryHistoryConnection;\n /** Host of the URL, which is what a delivery-side outage is usually shared by. Null when the URL does not parse. */\n host?: Maybe<Scalars['String']['output']>;\n /** GlobalID of the endpoint, as the `id` filter of `webhooks` takes it. `/debug/webhooks/:id` takes the raw uuid it encodes. */\n id: Scalars['ID']['output'];\n /** When delivery stopped. Null while the endpoint is active. */\n pausedAt?: Maybe<Scalars['ISO8601DateTime']['output']>;\n /**\n * Why delivery stopped — set by PauseBrokenWebhook when an endpoint failed too\n * many times in a row, or by the caller through setWebhookActive.\n */\n pausedReason?: Maybe<Scalars['String']['output']>;\n /** Whether delivery is running. */\n state: WatcherWebhookStateEnum;\n /** The delivery URL. Secrets are never exposed. */\n url: Scalars['String']['output'];\n /**\n * The Watcher this endpoint delivers for. Selected from the root `webhooks`\n * connection, where a page spans many Watchers and an endpoint is unreadable\n * without the one it belongs to.\n */\n watcher: Watcher;\n};\n\n\n/**\n * A delivery endpoint registered on a Watcher, with how it has been answering.\n * This is the delivery side of the pipeline: a Watcher that ingests normally and\n * delivers nothing is diagnosed here, not on providerStates.\n */\nexport type WatcherWebhookDeliveriesArgs = {\n after?: InputMaybe<Scalars['String']['input']>;\n before?: InputMaybe<Scalars['String']['input']>;\n first?: InputMaybe<Scalars['Int']['input']>;\n last?: InputMaybe<Scalars['Int']['input']>;\n};\n\n/** The connection type for WatcherWebhook. */\nexport type WatcherWebhookConnection = {\n __typename?: 'WatcherWebhookConnection';\n /** A list of edges. */\n edges?: Maybe<Array<Maybe<WatcherWebhookEdge>>>;\n /** A list of nodes. */\n nodes?: Maybe<Array<Maybe<WatcherWebhook>>>;\n /** Information to aid in pagination. */\n pageInfo: PageInfo;\n /** Total number of items across all pages. */\n totalCount: Scalars['Int']['output'];\n};\n\n/**\n * One attempt to deliver an Event to one of its Watcher's webhooks.\n * DeliverWebhookJob retries, so a single Event can carry several attempts against\n * the same URL — the last one decides whether the lead arrived.\n */\nexport type WatcherWebhookDelivery = {\n __typename?: 'WatcherWebhookDelivery';\n /** When the attempt was made. */\n attemptedAt: Scalars['ISO8601DateTime']['output'];\n /** What the endpoint or the transport answered with, when the attempt failed. Null for one that succeeded. */\n error?: Maybe<Scalars['String']['output']>;\n /**\n * Global id of the Event this attempt delivered, the same id the webhook body\n * carries as `event_id`, so `node(id:)` resolves it as-is.\n */\n eventId: Scalars['ID']['output'];\n /**\n * Status the endpoint answered with. Null when the request never got an answer —\n * a timeout or a DNS failure, which is not the same as a 5xx.\n */\n httpStatus?: Maybe<Scalars['Int']['output']>;\n /**\n * The JSON body exactly as it was POSTed to the endpoint on this attempt. Null\n * for an attempt made before request bodies were recorded.\n */\n requestBody?: Maybe<Scalars['JSON']['output']>;\n /**\n * What the endpoint answered with, truncated to 2,000 characters. Null when it\n * answered nothing, when the request never got an answer, or for an attempt made\n * before responses were recorded.\n */\n responseBody?: Maybe<Scalars['String']['output']>;\n /** Whether the lead reached the endpoint on this attempt. */\n state: WatcherWebhookDeliveryStateEnum;\n /**\n * The webhook URL this attempt targeted. Secrets are never exposed. Null when\n * the endpoint has since been deleted — deliveries outlive it, being an audit trail.\n */\n url?: Maybe<Scalars['String']['output']>;\n /** Identifier of the webhook this attempt targeted. */\n webhookId: Scalars['ID']['output'];\n};\n\n/** The connection type for WatcherWebhookDelivery. */\nexport type WatcherWebhookDeliveryConnection = {\n __typename?: 'WatcherWebhookDeliveryConnection';\n /** A list of edges. */\n edges?: Maybe<Array<Maybe<WatcherWebhookDeliveryEdge>>>;\n /** A list of nodes. */\n nodes?: Maybe<Array<Maybe<WatcherWebhookDelivery>>>;\n /** Information to aid in pagination. */\n pageInfo: PageInfo;\n /** Total number of items across all pages. */\n totalCount: Scalars['Int']['output'];\n};\n\n/** An edge in a connection. */\nexport type WatcherWebhookDeliveryEdge = {\n __typename?: 'WatcherWebhookDeliveryEdge';\n /** A cursor for use in pagination. */\n cursor: Scalars['String']['output'];\n /** The item at the end of the edge. */\n node?: Maybe<WatcherWebhookDelivery>;\n};\n\n/** The connection type for WatcherWebhookDelivery. */\nexport type WatcherWebhookDeliveryHistoryConnection = {\n __typename?: 'WatcherWebhookDeliveryHistoryConnection';\n /**\n * Whether the consecutive-failure streak has reached the threshold at which\n * PauseBrokenWebhook stops delivering — the difference between \"failing\" and\n * \"about to go quiet\".\n */\n autoPauseThresholdMet: Scalars['Boolean']['output'];\n /** Failed attempts since the last success, or every failed attempt when none ever succeeded. */\n consecutiveFailures: Scalars['Int']['output'];\n /** A list of edges. */\n edges?: Maybe<Array<Maybe<WatcherWebhookDeliveryEdge>>>;\n /** When this webhook was first delivered to. Null when it never was. */\n firstAttemptAt?: Maybe<Scalars['ISO8601DateTime']['output']>;\n /** When it was last delivered to, successfully or not. */\n lastAttemptAt?: Maybe<Scalars['ISO8601DateTime']['output']>;\n /**\n * When a lead last arrived. A recent lastAttemptAt with an old lastSucceededAt\n * is an endpoint that is answering, but not with a 2xx.\n */\n lastSucceededAt?: Maybe<Scalars['ISO8601DateTime']['output']>;\n /** Distinct leads that reached the endpoint at least once. */\n leadsDelivered: Scalars['Int']['output'];\n /** Distinct leads whose every attempt failed. A lead that failed once and then succeeded on a retry is not counted here. */\n leadsFailed: Scalars['Int']['output'];\n /** A list of nodes. */\n nodes?: Maybe<Array<Maybe<WatcherWebhookDelivery>>>;\n /** Information to aid in pagination. */\n pageInfo: PageInfo;\n /** Every HTTP attempt ever made, retries included — the same figure as `totalCount`, named for what it counts. */\n totalAttempts: Scalars['Int']['output'];\n /** Total number of items across all pages. */\n totalCount: Scalars['Int']['output'];\n};\n\n/** How one delivery attempt ended. */\nexport type WatcherWebhookDeliveryStateEnum =\n /** The endpoint answered with a 2xx. */\n | 'DELIVERED'\n /** The endpoint answered with anything else, or never answered at all. */\n | 'FAILED';\n\n/** An edge in a connection. */\nexport type WatcherWebhookEdge = {\n __typename?: 'WatcherWebhookEdge';\n /** A cursor for use in pagination. */\n cursor: Scalars['String']['output'];\n /** The item at the end of the edge. */\n node?: Maybe<WatcherWebhook>;\n};\n\n/** Filter criteria for webhooks. */\nexport type WatcherWebhookFilterInput = {\n /**\n * Host of the delivery URL, anchored: `example.com` does not match\n * `hooks.example.com`. Computed from `url`, so it has no column of its own.\n */\n host?: InputMaybe<WatcherWebhookHostFilterInput>;\n /** Keep only these endpoints, as their GlobalIDs. */\n id?: InputMaybe<IdFilterInput>;\n /** Whether the endpoint is being delivered to. */\n state?: InputMaybe<WatcherWebhookStateFilterInput>;\n /** The delivery URL, exactly or by fragment. */\n url?: InputMaybe<WatcherWebhookUrlFilterInput>;\n /** Keep only the endpoints of this Watcher, as its GlobalID. */\n watcherId?: InputMaybe<IdFilterInput>;\n};\n\n/**\n * Filter on the host of a delivery URL, matched exactly and without its port. A\n * delivery-side outage is usually shared by host rather than by watcher, so this\n * is the axis that separates \"one customer's endpoint is down\" from \"ours stopped\n * sending\". Pass `hooks.example.com`, not a URL.\n */\nexport type WatcherWebhookHostFilterInput = {\n /** When true, match only rows where the column is NULL or empty. False or omitted applies no constraint. */\n blank?: InputMaybe<Scalars['Boolean']['input']>;\n /** Exact match. */\n eq?: InputMaybe<Scalars['String']['input']>;\n /** Match any of these values. Maximum 10000 entries. */\n in?: InputMaybe<Array<Scalars['String']['input']>>;\n /** Exclude exact match. */\n notEq?: InputMaybe<Scalars['String']['input']>;\n /** Exclude any of these values. Maximum 10000 entries. */\n notIn?: InputMaybe<Array<Scalars['String']['input']>>;\n /** When true, match only rows where the column is neither NULL nor empty. False or omitted applies no constraint. */\n presence?: InputMaybe<Scalars['Boolean']['input']>;\n};\n\n/** Delivery endpoint registered on a Watcher. Secrets are write-only — they are never returned by the API. */\nexport type WatcherWebhookInput = {\n /**\n * Whether this webhook should receive deliveries. Defaults to true; pass false\n * to register it without delivering events yet (e.g. for a paused or\n * credit-blocked routine), then activate it later via setWebhookActive.\n */\n active?: InputMaybe<Scalars['Boolean']['input']>;\n /** HMAC-SHA256 secret used to sign deliveries. Store this — it is not returned after creation. */\n secret: Scalars['String']['input'];\n /** URL that receives a POST payload when a signal fires. */\n url: Scalars['String']['input'];\n};\n\n/** Whether an endpoint is being delivered to. */\nexport type WatcherWebhookStateEnum =\n /** Delivery is running. */\n | 'ACTIVE'\n /**\n * Delivery stopped — either requested by the caller, or by PauseBrokenWebhook\n * after too many consecutive failures. Reversible with setWebhookActive.\n */\n | 'PAUSED';\n\n/**\n * Which delivery states to list (eq/in/notEq/notIn). Omitted, every endpoint is\n * listed. Delivery state is a `pausedAt` timestamp rather than a column of states,\n * so the operators resolve to the set of states they reach and then to the model's own scopes.\n */\nexport type WatcherWebhookStateFilterInput = {\n /** Exact match. */\n eq?: InputMaybe<WatcherWebhookStateEnum>;\n /** Match any of these values. */\n in?: InputMaybe<Array<WatcherWebhookStateEnum>>;\n /** Exclude exact match. */\n notEq?: InputMaybe<WatcherWebhookStateEnum>;\n /** Exclude any of these values. */\n notIn?: InputMaybe<Array<WatcherWebhookStateEnum>>;\n};\n\n/**\n * Filter on a delivery URL. `contains` is what a support request usually carries:\n * a webhook's uuid appears nowhere a human can reach, so what comes in is a piece\n * of the callback — a path segment, a routine action id, a host fragment — and\n * none of those is a whole URL.\n */\nexport type WatcherWebhookUrlFilterInput = {\n /** When true, match only rows where the column is NULL or empty. False or omitted applies no constraint. */\n blank?: InputMaybe<Scalars['Boolean']['input']>;\n /**\n * Case-insensitive substring of the URL, wildcard characters taken literally.\n * Not anchored: `sortlist.com` matches `max.sortlist.com`; use `host` for the\n * anchored question.\n */\n contains?: InputMaybe<Scalars['String']['input']>;\n /** Exact match. */\n eq?: InputMaybe<Scalars['String']['input']>;\n /** Match any of these values. Maximum 10000 entries. */\n in?: InputMaybe<Array<Scalars['String']['input']>>;\n /** Exclude exact match. */\n notEq?: InputMaybe<Scalars['String']['input']>;\n /** Exclude any of these values. Maximum 10000 entries. */\n notIn?: InputMaybe<Array<Scalars['String']['input']>>;\n /** When true, match only rows where the column is neither NULL nor empty. False or omitted applies no constraint. */\n presence?: InputMaybe<Scalars['Boolean']['input']>;\n};\n\nexport type Join__ContextArgument = {\n context: Scalars['String']['input'];\n name: Scalars['String']['input'];\n selection: Scalars['join__FieldValue']['input'];\n type: Scalars['String']['input'];\n};\n\nexport type Join__Graph =\n | 'ATLAS'\n | 'BILLING'\n | 'HERMES'\n | 'MERCATOR'\n | 'OUTREACH'\n | 'SIGNALS';\n\nexport type Link__Purpose =\n /** `EXECUTION` features provide metadata necessary for operation execution. */\n | 'EXECUTION'\n /** `SECURITY` features provide metadata necessary to securely resolve fields. */\n | 'SECURITY';\n\nexport type MeQueryVariables = Exact<{ [key: string]: never; }>;\n\n\nexport type MeQuery = { __typename?: 'Query', me?: { __typename?: 'User', id: string, email?: string | null, firstName?: string | null, lastName?: string | null } | null };\n\nexport type LogoutUrlQueryVariables = Exact<{ [key: string]: never; }>;\n\n\nexport type LogoutUrlQuery = { __typename?: 'Query', logoutUrl: string };\n\nexport type DeviceAuthorizeMutationVariables = Exact<{\n input: DeviceAuthorizeInput;\n}>;\n\n\nexport type DeviceAuthorizeMutation = { __typename?: 'Mutation', deviceAuthorize?: { __typename?: 'DeviceCodeResponse', deviceCode: string, expiresIn: number, interval: number, userCode: string, verificationUri: string, verificationUriComplete?: string | null } | null };\n\nexport type DeviceTokenMutationVariables = Exact<{\n input: DeviceTokenInput;\n}>;\n\n\nexport type DeviceTokenMutation = { __typename?: 'Mutation', deviceToken?: { __typename?: 'TokenResponse', accessToken?: string | null, error?: string | null, expiresIn?: number | null, idToken?: string | null, refreshToken?: string | null, tokenType?: string | null } | null };\n\nexport type RefreshTokenMutationVariables = Exact<{\n input: RefreshTokenInput;\n}>;\n\n\nexport type RefreshTokenMutation = { __typename?: 'Mutation', refreshToken?: { __typename?: 'TokenResponse', accessToken?: string | null, error?: string | null, expiresIn?: number | null, idToken?: string | null, refreshToken?: string | null, tokenType?: string | null } | null };\n\n\nexport const MeDocument = {\"kind\":\"Document\",\"definitions\":[{\"kind\":\"OperationDefinition\",\"operation\":\"query\",\"name\":{\"kind\":\"Name\",\"value\":\"Me\"},\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"me\"},\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"id\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"email\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"firstName\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"lastName\"}}]}}]}}]} as unknown as DocumentNode<MeQuery, MeQueryVariables>;\nexport const LogoutUrlDocument = {\"kind\":\"Document\",\"definitions\":[{\"kind\":\"OperationDefinition\",\"operation\":\"query\",\"name\":{\"kind\":\"Name\",\"value\":\"LogoutUrl\"},\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"logoutUrl\"}}]}}]} as unknown as DocumentNode<LogoutUrlQuery, LogoutUrlQueryVariables>;\nexport const DeviceAuthorizeDocument = {\"kind\":\"Document\",\"definitions\":[{\"kind\":\"OperationDefinition\",\"operation\":\"mutation\",\"name\":{\"kind\":\"Name\",\"value\":\"DeviceAuthorize\"},\"variableDefinitions\":[{\"kind\":\"VariableDefinition\",\"variable\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"input\"}},\"type\":{\"kind\":\"NonNullType\",\"type\":{\"kind\":\"NamedType\",\"name\":{\"kind\":\"Name\",\"value\":\"DeviceAuthorizeInput\"}}}}],\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"deviceAuthorize\"},\"arguments\":[{\"kind\":\"Argument\",\"name\":{\"kind\":\"Name\",\"value\":\"input\"},\"value\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"input\"}}}],\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"deviceCode\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"expiresIn\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"interval\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"userCode\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"verificationUri\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"verificationUriComplete\"}}]}}]}}]} as unknown as DocumentNode<DeviceAuthorizeMutation, DeviceAuthorizeMutationVariables>;\nexport const DeviceTokenDocument = {\"kind\":\"Document\",\"definitions\":[{\"kind\":\"OperationDefinition\",\"operation\":\"mutation\",\"name\":{\"kind\":\"Name\",\"value\":\"DeviceToken\"},\"variableDefinitions\":[{\"kind\":\"VariableDefinition\",\"variable\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"input\"}},\"type\":{\"kind\":\"NonNullType\",\"type\":{\"kind\":\"NamedType\",\"name\":{\"kind\":\"Name\",\"value\":\"DeviceTokenInput\"}}}}],\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"deviceToken\"},\"arguments\":[{\"kind\":\"Argument\",\"name\":{\"kind\":\"Name\",\"value\":\"input\"},\"value\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"input\"}}}],\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"accessToken\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"error\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"expiresIn\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"idToken\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"refreshToken\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"tokenType\"}}]}}]}}]} as unknown as DocumentNode<DeviceTokenMutation, DeviceTokenMutationVariables>;\nexport const RefreshTokenDocument = {\"kind\":\"Document\",\"definitions\":[{\"kind\":\"OperationDefinition\",\"operation\":\"mutation\",\"name\":{\"kind\":\"Name\",\"value\":\"RefreshToken\"},\"variableDefinitions\":[{\"kind\":\"VariableDefinition\",\"variable\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"input\"}},\"type\":{\"kind\":\"NonNullType\",\"type\":{\"kind\":\"NamedType\",\"name\":{\"kind\":\"Name\",\"value\":\"RefreshTokenInput\"}}}}],\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"refreshToken\"},\"arguments\":[{\"kind\":\"Argument\",\"name\":{\"kind\":\"Name\",\"value\":\"input\"},\"value\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"input\"}}}],\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"accessToken\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"error\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"expiresIn\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"idToken\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"refreshToken\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"tokenType\"}}]}}]}}]} as unknown as DocumentNode<RefreshTokenMutation, RefreshTokenMutationVariables>;","/* eslint-disable */\nimport * as types from './graphql.js';\nimport type { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core';\n\n/**\n * Map of all GraphQL operations in the project.\n *\n * This map has several performance disadvantages:\n * 1. It is not tree-shakeable, so it will include all operations in the project.\n * 2. It is not minifiable, so the string of a GraphQL query will be multiple times inside the bundle.\n * 3. It does not support dead code elimination, so it will add unused operations.\n *\n * Therefore it is highly recommended to use the babel or swc plugin for production.\n * Learn more about it here: https://the-guild.dev/graphql/codegen/plugins/presets/preset-client#reducing-bundle-size\n */\ntype Documents = {\n \"\\n query Me {\\n me {\\n id\\n email\\n firstName\\n lastName\\n }\\n }\\n\": typeof types.MeDocument,\n \"\\n query LogoutUrl {\\n logoutUrl\\n }\\n\": typeof types.LogoutUrlDocument,\n \"\\n mutation DeviceAuthorize($input: DeviceAuthorizeInput!) {\\n deviceAuthorize(input: $input) {\\n deviceCode\\n expiresIn\\n interval\\n userCode\\n verificationUri\\n verificationUriComplete\\n }\\n }\\n\": typeof types.DeviceAuthorizeDocument,\n \"\\n mutation DeviceToken($input: DeviceTokenInput!) {\\n deviceToken(input: $input) {\\n accessToken\\n error\\n expiresIn\\n idToken\\n refreshToken\\n tokenType\\n }\\n }\\n\": typeof types.DeviceTokenDocument,\n \"\\n mutation RefreshToken($input: RefreshTokenInput!) {\\n refreshToken(input: $input) {\\n accessToken\\n error\\n expiresIn\\n idToken\\n refreshToken\\n tokenType\\n }\\n }\\n\": typeof types.RefreshTokenDocument,\n};\nconst documents: Documents = {\n \"\\n query Me {\\n me {\\n id\\n email\\n firstName\\n lastName\\n }\\n }\\n\": types.MeDocument,\n \"\\n query LogoutUrl {\\n logoutUrl\\n }\\n\": types.LogoutUrlDocument,\n \"\\n mutation DeviceAuthorize($input: DeviceAuthorizeInput!) {\\n deviceAuthorize(input: $input) {\\n deviceCode\\n expiresIn\\n interval\\n userCode\\n verificationUri\\n verificationUriComplete\\n }\\n }\\n\": types.DeviceAuthorizeDocument,\n \"\\n mutation DeviceToken($input: DeviceTokenInput!) {\\n deviceToken(input: $input) {\\n accessToken\\n error\\n expiresIn\\n idToken\\n refreshToken\\n tokenType\\n }\\n }\\n\": types.DeviceTokenDocument,\n \"\\n mutation RefreshToken($input: RefreshTokenInput!) {\\n refreshToken(input: $input) {\\n accessToken\\n error\\n expiresIn\\n idToken\\n refreshToken\\n tokenType\\n }\\n }\\n\": types.RefreshTokenDocument,\n};\n\n/**\n * The gql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.\n *\n *\n * @example\n * ```ts\n * const query = gql(`query GetUser($id: ID!) { user(id: $id) { name } }`);\n * ```\n *\n * The query argument is unknown!\n * Please regenerate the types.\n */\nexport function gql(source: string): unknown;\n\n/**\n * The gql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.\n */\nexport function gql(source: \"\\n query Me {\\n me {\\n id\\n email\\n firstName\\n lastName\\n }\\n }\\n\"): (typeof documents)[\"\\n query Me {\\n me {\\n id\\n email\\n firstName\\n lastName\\n }\\n }\\n\"];\n/**\n * The gql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.\n */\nexport function gql(source: \"\\n query LogoutUrl {\\n logoutUrl\\n }\\n\"): (typeof documents)[\"\\n query LogoutUrl {\\n logoutUrl\\n }\\n\"];\n/**\n * The gql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.\n */\nexport function gql(source: \"\\n mutation DeviceAuthorize($input: DeviceAuthorizeInput!) {\\n deviceAuthorize(input: $input) {\\n deviceCode\\n expiresIn\\n interval\\n userCode\\n verificationUri\\n verificationUriComplete\\n }\\n }\\n\"): (typeof documents)[\"\\n mutation DeviceAuthorize($input: DeviceAuthorizeInput!) {\\n deviceAuthorize(input: $input) {\\n deviceCode\\n expiresIn\\n interval\\n userCode\\n verificationUri\\n verificationUriComplete\\n }\\n }\\n\"];\n/**\n * The gql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.\n */\nexport function gql(source: \"\\n mutation DeviceToken($input: DeviceTokenInput!) {\\n deviceToken(input: $input) {\\n accessToken\\n error\\n expiresIn\\n idToken\\n refreshToken\\n tokenType\\n }\\n }\\n\"): (typeof documents)[\"\\n mutation DeviceToken($input: DeviceTokenInput!) {\\n deviceToken(input: $input) {\\n accessToken\\n error\\n expiresIn\\n idToken\\n refreshToken\\n tokenType\\n }\\n }\\n\"];\n/**\n * The gql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.\n */\nexport function gql(source: \"\\n mutation RefreshToken($input: RefreshTokenInput!) {\\n refreshToken(input: $input) {\\n accessToken\\n error\\n expiresIn\\n idToken\\n refreshToken\\n tokenType\\n }\\n }\\n\"): (typeof documents)[\"\\n mutation RefreshToken($input: RefreshTokenInput!) {\\n refreshToken(input: $input) {\\n accessToken\\n error\\n expiresIn\\n idToken\\n refreshToken\\n tokenType\\n }\\n }\\n\"];\n\nexport function gql(source: string) {\n return (documents as any)[source] ?? {};\n}\n\nexport type DocumentType<TDocumentNode extends DocumentNode<any, any>> = TDocumentNode extends DocumentNode< infer TType, any> ? TType : never;","/**\n * The auth operations, kept by hand.\n *\n * Every other operation is derived from introspection at runtime; these four\n * cannot be, because a caller needs them *before* it holds a token to introspect\n * with. `npm run codegen` types them against the supergraph.\n */\nimport { gql } from '../generated/gql.ts';\n\n// ── Queries ──\n\nexport const LogoutUrl = gql(`\n query LogoutUrl {\n logoutUrl\n }\n`);\n\n// ── Mutations ──\n\nexport const DeviceAuthorize = gql(`\n mutation DeviceAuthorize($input: DeviceAuthorizeInput!) {\n deviceAuthorize(input: $input) {\n deviceCode\n expiresIn\n interval\n userCode\n verificationUri\n verificationUriComplete\n }\n }\n`);\n\nexport const DeviceToken = gql(`\n mutation DeviceToken($input: DeviceTokenInput!) {\n deviceToken(input: $input) {\n accessToken\n error\n expiresIn\n idToken\n refreshToken\n tokenType\n }\n }\n`);\n\nexport const RefreshToken = gql(`\n mutation RefreshToken($input: RefreshTokenInput!) {\n refreshToken(input: $input) {\n accessToken\n error\n expiresIn\n idToken\n refreshToken\n tokenType\n }\n }\n`);\n","/**\n * Runtime GraphQL query builder.\n * Dynamically constructs operations from an introspected schema\n * with user-controlled depth and field selection.\n */\nimport {\n isAbstractType,\n isEnumType,\n isListType,\n isNonNullType,\n isObjectType,\n isScalarType,\n type GraphQLAbstractType,\n type GraphQLField,\n type GraphQLNamedType,\n type GraphQLObjectType,\n type GraphQLOutputType,\n type GraphQLSchema,\n} from 'graphql';\n\nexport const CLI_OPERATION_PREFIX = 'SlCli_';\n\n// ── Helpers ──\n\nfunction unwrap(type: GraphQLOutputType): GraphQLNamedType {\n if (isNonNullType(type)) return unwrap(type.ofType);\n if (isListType(type)) return unwrap(type.ofType);\n return type as GraphQLNamedType;\n}\n\nfunction isLeaf(type: GraphQLNamedType): boolean {\n return isScalarType(type) || isEnumType(type);\n}\n\nfunction ucfirst(s: string): string {\n return s.charAt(0).toUpperCase() + s.slice(1);\n}\n\n// Payload types where `id` often fails at runtime\nconst PAYLOAD_TYPE_PATTERN = /(?:Response|Payload|MutationPayload)$/;\n// What a mutation payload carries besides its result: an id that often fails at runtime, and\n// Relay's echo of an input the CLI never sends.\nconst PAYLOAD_PLUMBING = new Set(['id', 'clientMutationId']);\n\n/**\n * A mutation payload is a wrapper around the result, not a level of it: at the default depth a\n * caller wants the account the mutation returns, not the wrapper's scalars. So the wrapper is\n * crossed for free, the way a connection's `nodes` is.\n */\nfunction effectiveDepth(returnType: GraphQLNamedType, depth: number): number {\n return isObjectType(returnType) && PAYLOAD_TYPE_PATTERN.test(returnType.name) ? depth + 1 : depth;\n}\n\n// ── Selection set builder ──\n\nexport interface QueryOptions {\n /** Max nesting depth for sub-objects (default: 0) */\n depth?: number;\n /** Only include these fields (dot-notation for nested, e.g. \"organization.name\") */\n fields?: string[];\n /** Exclude these fields (dot-notation for nested) */\n exclude?: string[];\n /** Select `totalCount` on connections (default: false) */\n totalCount?: boolean;\n}\n\nfunction buildSelections(\n type: GraphQLNamedType,\n schema: GraphQLSchema,\n depth: number,\n exclude: Set<string>,\n prefix: string,\n totalCount: boolean,\n visited: Set<string>,\n): string[] {\n if (!isObjectType(type)) return [];\n if (visited.has(type.name)) return [];\n visited.add(type.name);\n\n const fields = type.getFields();\n const lines: string[] = [];\n const isPayload = PAYLOAD_TYPE_PATTERN.test(type.name);\n\n // Relay Connection pattern. The connection/`nodes` wrapper is not a semantic\n // nesting level, so the node type inherits the caller's `depth` unchanged —\n // otherwise object fields on the node (e.g. Contact.organization) would never\n // be selected regardless of --depth.\n if (isConnection(type)) {\n const nodesType = unwrap(fields.nodes.type);\n const nodeSelections = buildSelections(\n nodesType,\n schema,\n depth,\n exclude,\n `${prefix}nodes.`,\n totalCount,\n new Set(visited),\n );\n return connectionSelections(type, nodeSelections, totalCount);\n }\n\n for (const [name, field] of Object.entries(fields)) {\n if (name.startsWith('__')) continue;\n if (isPayload && PAYLOAD_PLUMBING.has(name)) continue;\n\n const fullPath = `${prefix}${name}`;\n if (exclude.has(fullPath) || exclude.has(name)) continue;\n\n if (!isAutoSelectable(field)) continue;\n\n const namedType = unwrap(field.type);\n\n if (isLeaf(namedType)) {\n lines.push(name);\n } else if (isObjectType(namedType) && isConnection(namedType) && field.args.length === 0) {\n const pageSelections = buildSelections(\n namedType,\n schema,\n depth,\n exclude,\n `${fullPath}.`,\n totalCount,\n new Set(visited),\n );\n if (pageSelections.length > 0) {\n lines.push(`${name} {`);\n for (const sel of pageSelections) lines.push(` ${sel}`);\n lines.push(`}`);\n }\n } else if (isObjectType(namedType) && depth > 0) {\n const subSelections = buildSelections(\n namedType,\n schema,\n depth - 1,\n exclude,\n `${fullPath}.`,\n totalCount,\n new Set(visited),\n );\n if (subSelections.length > 0) {\n lines.push(`${fieldCall(name, field)} {`);\n for (const sel of subSelections) lines.push(` ${sel}`);\n lines.push(`}`);\n }\n } else if (isAbstractType(namedType) && depth > 0) {\n lines.push(`${name} {`);\n for (const sel of abstractSelections(\n namedType,\n schema,\n depth - 1,\n exclude,\n `${fullPath}.`,\n totalCount,\n visited,\n )) {\n lines.push(` ${sel}`);\n }\n lines.push(`}`);\n }\n }\n\n return lines;\n}\n\n/**\n * A union or interface is read through its members: `__typename` says which one\n * came back, and one inline fragment per possible type carries that type's fields,\n * so a payload's `authentication` renders as the hosted link or the accepted\n * credentials, whichever the subgraph answered.\n */\nfunction abstractSelections(\n type: GraphQLAbstractType,\n schema: GraphQLSchema,\n depth: number,\n exclude: Set<string>,\n prefix: string,\n totalCount: boolean,\n visited: Set<string>,\n): string[] {\n const lines = ['__typename'];\n for (const member of schema.getPossibleTypes(type)) {\n const memberSelections = buildSelections(member, schema, depth, exclude, prefix, totalCount, new Set(visited));\n if (memberSelections.length === 0) continue;\n lines.push(`... on ${member.name} {`);\n for (const sel of memberSelections) lines.push(` ${sel}`);\n lines.push(`}`);\n }\n return lines;\n}\n\n/** A nested connection left unbounded is costed at its max page size per parent row, which blows the complexity budget. */\nconst NESTED_PAGE_SIZE = 10;\n\nfunction fieldCall(name: string, field: GraphQLField<unknown, unknown>): string {\n const named = unwrap(field.type);\n const pageable = isObjectType(named) && isConnection(named) && field.args.some((a) => a.name === 'first');\n return pageable ? `${name}(first: ${NESTED_PAGE_SIZE})` : name;\n}\n\nfunction deliveredPageField(type: GraphQLObjectType): GraphQLField<unknown, unknown> | null {\n const pages = Object.values(type.getFields()).filter((field) => {\n const named = unwrap(field.type);\n return isObjectType(named) && isConnection(named) && field.args.length === 0;\n });\n return pages.length === 1 ? pages[0] : null;\n}\n\nfunction isConnection(type: GraphQLObjectType): boolean {\n const fields = type.getFields();\n return Boolean(fields.nodes) && Boolean(fields.pageInfo);\n}\n\nfunction isAutoSelectable(field: GraphQLField<unknown, unknown>): boolean {\n if (field.name.startsWith('__') || field.deprecationReason != null) return false;\n return !field.args.some((a) => isNonNullType(a.type) && a.defaultValue === undefined);\n}\n\nfunction selectableFields(type: GraphQLObjectType): GraphQLField<unknown, unknown>[] {\n return Object.values(type.getFields()).filter(isAutoSelectable);\n}\n\n/**\n * What the edge carries besides the node — a reveal report, a distance, a\n * filter match. Selected whenever present, one level deep: these are small\n * value objects that describe the row, and losing them for the sake of a\n * shorter query is losing the answer.\n */\nfunction edgeExtras(connection: GraphQLObjectType): { edge: GraphQLObjectType; lines: string[] } | null {\n const edgesField = connection.getFields().edges;\n if (!edgesField) return null;\n const edge = unwrap(edgesField.type);\n if (!isObjectType(edge)) return null;\n\n const lines: string[] = [];\n for (const field of selectableFields(edge)) {\n if (field.name === 'node' || field.name === 'cursor' || field.name === 'id') continue;\n const named = unwrap(field.type);\n if (isLeaf(named)) {\n lines.push(field.name);\n } else if (isObjectType(named)) {\n const leaves = selectableFields(named)\n .filter((sub) => isLeaf(unwrap(sub.type)))\n .map((sub) => sub.name);\n if (leaves.length > 0) lines.push(`${field.name} { ${leaves.join(' ')} }`);\n }\n }\n\n return lines.length === 0 ? null : { edge, lines };\n}\n\n/**\n * `nodes { … }` when the edge is a plain wrapper; `edges { node { … } … }` when\n * it carries more, so what the server says about each row comes along.\n */\nfunction connectionSelections(connection: GraphQLObjectType, nodeSelections: string[], totalCount: boolean): string[] {\n if (nodeSelections.length === 0) return [];\n const lines: string[] = [];\n const extras = edgeExtras(connection);\n\n if (extras) {\n lines.push('edges {');\n lines.push(' node {');\n for (const sel of nodeSelections) lines.push(` ${sel}`);\n lines.push(' }');\n for (const extra of extras.lines) lines.push(` ${extra}`);\n lines.push('}');\n } else {\n lines.push('nodes {');\n for (const sel of nodeSelections) lines.push(` ${sel}`);\n lines.push('}');\n }\n lines.push('pageInfo {');\n lines.push(' hasNextPage');\n lines.push(' endCursor');\n lines.push('}');\n if (totalCount && connection.getFields().totalCount) lines.push('totalCount');\n for (const extra of connectionExtras(connection)) lines.push(extra);\n return lines;\n}\n\nconst CONNECTION_PLUMBING = new Set(['edges', 'nodes', 'pageInfo', 'totalCount', 'approximateTotalCount']);\n\n/**\n * What a connection says about the page as a whole — the bill of a reveal, for\n * one — selected two levels deep so a summary with a per-item split comes along.\n */\nfunction connectionExtras(connection: GraphQLObjectType): string[] {\n return selectableFields(connection)\n .filter((field) => !CONNECTION_PLUMBING.has(field.name))\n .flatMap((field) => {\n const named = unwrap(field.type);\n if (isLeaf(named)) return [field.name];\n if (!isObjectType(named)) return [];\n const inner = selectableFields(named).flatMap((sub) => {\n const subType = unwrap(sub.type);\n if (isLeaf(subType)) return [sub.name];\n if (!isObjectType(subType)) return [];\n const leaves = selectableFields(subType).filter((leaf) => isLeaf(unwrap(leaf.type)));\n return leaves.length === 0 ? [] : [`${sub.name} { ${leaves.map((leaf) => leaf.name).join(' ')} }`];\n });\n return inner.length === 0 ? [] : [`${field.name} { ${inner.join(' ')} }`];\n });\n}\n\n/**\n * A misspelt field used to be dropped silently, so `--fields email` printed\n * every other column and left the caller wondering where the email went.\n */\nfunction fieldNamesOf(type: GraphQLNamedType): string[] {\n return isObjectType(type) ? Object.keys(type.getFields()) : [];\n}\n\nexport class UnknownFieldError extends Error {\n readonly field: string;\n readonly suggestions: string[];\n\n constructor(field: string, type: GraphQLNamedType, candidates: string[] = fieldNamesOf(type)) {\n const names = candidates.filter((name) => !name.startsWith('__'));\n const needle = field.toLowerCase();\n const suggestions = names.filter((name) => {\n const candidate = name.toLowerCase();\n return candidate.includes(needle) || needle.includes(candidate);\n });\n super(`${type.name} has no field \"${field}\".`);\n this.name = 'UnknownFieldError';\n this.field = field;\n this.suggestions = suggestions.length > 0 ? suggestions : names;\n }\n}\n\n// ── Public API ──\n\nexport interface BuiltQuery {\n query: string;\n variables: Record<string, unknown>;\n /** The root field name (e.g. \"agency\", \"createChat\") */\n fieldName: string;\n}\n\n/**\n * Build a GraphQL query/mutation string for a root operation field.\n *\n * @param schema - The introspected GraphQL schema\n * @param kind - \"query\" or \"mutation\"\n * @param fieldName - The root field name (e.g. \"agency\", \"createChat\")\n * @param variables - Variable values to send\n * @param options - Depth, field inclusion/exclusion\n */\nexport type OperationKind = 'query' | 'mutation' | 'subscription';\n\nexport function rootTypeOf(schema: GraphQLSchema, kind: OperationKind): GraphQLObjectType | null | undefined {\n if (kind === 'query') return schema.getQueryType();\n if (kind === 'mutation') return schema.getMutationType();\n return schema.getSubscriptionType();\n}\n\nexport function buildQuery(\n schema: GraphQLSchema,\n kind: OperationKind,\n fieldName: string,\n variables: Record<string, unknown>,\n options: QueryOptions = {},\n): BuiltQuery {\n const rootType = rootTypeOf(schema, kind);\n if (!rootType) throw new Error(`No ${kind} type in schema`);\n\n const field = rootType.getFields()[fieldName];\n if (!field) throw new Error(`Unknown ${kind} field: ${fieldName}`);\n\n const returnType = unwrap(field.type);\n const depth = effectiveDepth(returnType, options.depth ?? 0);\n const exclude = new Set(options.exclude ?? []);\n const wantsTotalCount = options.totalCount === true;\n\n // Build variable definitions from the field's arguments\n const allArgs = field.args;\n\n const varDefsInner = allArgs.map((a) => `$${a.name}: ${a.type.toString()}`).join(', ');\n const fieldArgsInner = allArgs.map((a) => `${a.name}: $${a.name}`).join(', ');\n const varDefs = allArgs.length > 0 ? `(${varDefsInner})` : '';\n const fieldArgs = allArgs.length > 0 ? `(${fieldArgsInner})` : '';\n\n // Build selection set\n let selectionBody: string;\n if (isLeaf(returnType)) {\n selectionBody = ` ${fieldName}${fieldArgs}`;\n } else if (isAbstractType(returnType)) {\n const indent = ' ';\n const body = abstractSelections(returnType, schema, depth, exclude, '', wantsTotalCount, new Set())\n .map((s) => `${indent}${s}`)\n .join('\\n');\n selectionBody = ` ${fieldName}${fieldArgs} {\\n${body}\\n }`;\n } else {\n // Filter fields if --fields is provided\n let selections: string[];\n if (options.fields && options.fields.length > 0) {\n selections = buildFieldsFromList(returnType, schema, options.fields, wantsTotalCount);\n } else {\n selections = buildSelections(returnType, schema, depth, exclude, '', wantsTotalCount, new Set());\n }\n\n if (selections.length === 0) {\n // Fallback: at minimum select __typename\n selectionBody = ` ${fieldName}${fieldArgs} {\\n __typename\\n }`;\n } else {\n const indent = ' ';\n const body = selections.map((s) => `${indent}${s}`).join('\\n');\n selectionBody = ` ${fieldName}${fieldArgs} {\\n${body}\\n }`;\n }\n }\n\n const opName = `${CLI_OPERATION_PREFIX}${ucfirst(fieldName)}`;\n const query = `${kind} ${opName}${varDefs} {\\n${selectionBody}\\n }`;\n\n return { query, variables, fieldName };\n}\n\n/**\n * Build selections from an explicit field list (e.g. --fields id,name,slug).\n */\nfunction buildFieldsFromList(\n type: GraphQLNamedType,\n schema: GraphQLSchema,\n requestedPaths: string[],\n totalCount: boolean,\n): string[] {\n if (!isObjectType(type)) return [];\n const fields = type.getFields();\n const page = deliveredPageField(type);\n const fieldPaths = page\n ? requestedPaths.map((path) => (fields[path.split('.')[0]] ? path : `${page.name}.${path}`))\n : requestedPaths;\n\n // Relay Connection pattern — unwrap to the node type. The id always comes\n // along: it is what a row is titled by and what the next command is pasted.\n if (isConnection(type)) {\n const nodesType = unwrap(fields.nodes.type);\n const withId = isObjectType(nodesType) && nodesType.getFields().id && !fieldPaths.includes('id');\n const nodeSelections = buildFieldsFromList(\n nodesType,\n schema,\n withId ? ['id', ...fieldPaths] : fieldPaths,\n totalCount,\n );\n return connectionSelections(type, nodeSelections, totalCount);\n }\n\n const lines: string[] = [];\n\n // Group by top-level field\n const grouped = new Map<string, string[]>();\n for (const fp of fieldPaths) {\n const [top, ...rest] = fp.split('.');\n if (!grouped.has(top)) grouped.set(top, []);\n if (rest.length > 0) grouped.get(top)!.push(rest.join('.'));\n }\n\n for (const [name, subPaths] of grouped) {\n const field = fields[name];\n if (!field) throw new UnknownFieldError(name, type);\n\n const namedType = unwrap(field.type);\n if (isLeaf(namedType)) {\n lines.push(name);\n } else if (isObjectType(namedType) && subPaths.length > 0) {\n const subSelections = buildFieldsFromList(namedType, schema, subPaths, totalCount);\n if (subSelections.length > 0) {\n lines.push(`${fieldCall(name, field)} {`);\n for (const sel of subSelections) lines.push(` ${sel}`);\n lines.push(`}`);\n }\n } else if (isAbstractType(namedType)) {\n lines.push(`${name} {`);\n for (const sel of abstractFieldsFromList(namedType, schema, subPaths, totalCount)) lines.push(` ${sel}`);\n lines.push(`}`);\n }\n }\n\n return lines;\n}\n\n/**\n * `--fields authentication.url` names a field of one member; each member takes\n * the paths it knows, and a path no member knows is refused against the union\n * itself. Without sub-paths, every member's leaf fields are selected.\n */\nfunction abstractFieldsFromList(\n type: GraphQLAbstractType,\n schema: GraphQLSchema,\n subPaths: string[],\n totalCount: boolean,\n): string[] {\n const members = schema.getPossibleTypes(type);\n if (subPaths.length === 0) {\n return abstractSelections(type, schema, 0, new Set(), '', totalCount, new Set());\n }\n\n const lines = ['__typename'];\n const claimed = new Set<string>();\n for (const member of members) {\n const known = subPaths.filter((fp) => Boolean(member.getFields()[fp.split('.')[0]]));\n if (known.length === 0) continue;\n for (const fp of known) claimed.add(fp);\n lines.push(`... on ${member.name} {`);\n for (const sel of buildFieldsFromList(member, schema, known, totalCount)) lines.push(` ${sel}`);\n lines.push(`}`);\n }\n const unknown = subPaths.find((fp) => !claimed.has(fp));\n if (unknown !== undefined) {\n throw new UnknownFieldError(unknown.split('.')[0], type, members.flatMap(fieldNamesOf));\n }\n\n return lines;\n}\n","/**\n * Human-readable rendering for operation results.\n *\n * Records are printed as aligned key/value blocks rather than a table: a Relay\n * global id runs to sixty characters, so any table wide enough to hold one is\n * unreadable and any table that fits has truncated the one value the caller\n * needs to paste into the next command. `--json` remains the machine path.\n */\nconst INDENT = ' ';\n\ninterface Connection {\n nodes: unknown[];\n totalCount?: number;\n pageInfo?: { hasNextPage?: boolean; endCursor?: string | null };\n}\n\nconst CONNECTION_PLUMBING = new Set([\n 'edges',\n 'nodes',\n 'pageInfo',\n 'totalCount',\n 'approximateTotalCount',\n '__typename',\n]);\n\nfunction isRecord(value: unknown): value is Record<string, unknown> {\n return typeof value === 'object' && value !== null && !Array.isArray(value);\n}\n\n/**\n * The edge's own fields — a reveal report, a distance — are folded into the\n * node they describe, after its fields, so a row reads as one block.\n */\nfunction rowOf(edge: unknown): unknown {\n if (!isRecord(edge) || !isRecord(edge.node)) return isRecord(edge) ? edge.node : edge;\n const { node, cursor: _cursor, __typename: _typename, ...extras } = edge;\n const said = Object.entries(extras).filter(\n ([, value]) => value != null && !(Array.isArray(value) && value.length === 0),\n );\n return { ...node, ...Object.fromEntries(said) };\n}\n\nfunction asConnection(value: unknown): Connection | null {\n if (!isRecord(value)) return null;\n if (Array.isArray(value.nodes)) return value as unknown as Connection;\n if (Array.isArray(value.edges)) return { ...value, nodes: value.edges.map(rowOf) } as unknown as Connection;\n\n return null;\n}\n\n/** An ISO timestamp keeps its time of day, down to the second; a bare date stays a date. */\nfunction formatScalar(value: unknown): string {\n if (value === null || value === undefined) return '—';\n if (typeof value === 'boolean') return value ? 'yes' : 'no';\n if (typeof value === 'string' && /^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}/.test(value)) {\n return value.slice(0, 19).replace('T', ' ');\n }\n\n return String(value);\n}\n\nfunction isFlatRecord(value: unknown): value is Record<string, unknown> {\n return isRecord(value) && Object.values(value).every((v) => !isRecord(v) && !Array.isArray(v));\n}\n\n/**\n * A list of small flat records — one status per dimension, one match per\n * filter — is laid out as aligned sub-rows under its key, values side by side.\n * The keys are dropped: they repeat on every row and the columns say enough.\n */\nconst isDeadline = (key: string) => /Until$/.test(key);\n\n/**\n * `ownedUntil: 2026-12-11T23:59:59Z` reads as `until 2026-12-11 23:59:59`: the\n * key names the relation, so it is folded into the value where the column has\n * no header.\n */\nfunction formatDeadline(value: unknown): string {\n return typeof value === 'string' && value !== '' ? `until ${formatScalar(value)}` : '—';\n}\n\nfunction formatFlatRows(rows: Record<string, unknown>[], indent: string): string {\n const keys = Object.keys(rows[0]).filter((key) => key !== '__typename');\n const ordered = [...keys.filter((key) => !isDeadline(key)), ...keys.filter(isDeadline)];\n const cells = rows.map((row) =>\n ordered.map((key) => (isDeadline(key) ? formatDeadline(row[key]) : formatScalar(row[key]))),\n );\n const widths = ordered.map((_, column) => Math.max(...cells.map((row) => (row[column] ?? '').length)));\n\n return cells\n .map((row) =>\n row.map((cell, column) => (column === row.length - 1 ? cell : cell.padEnd(widths[column]))).join(' '),\n )\n .join(`\\n${indent}`);\n}\n\n/**\n * A nested collection is summarised rather than expanded: expanding it inline\n * loses the alignment that makes the block readable, and the count is what a\n * caller scanning a list actually wants.\n */\nfunction summarise(key: string, value: unknown): string | null {\n const connection = asConnection(value);\n if (connection) {\n const count = connection.totalCount ?? connection.nodes.length;\n return `${count} ${count === 1 ? 'entry' : 'entries'}`;\n }\n if (Array.isArray(value)) return value.length === 0 ? 'none' : `${value.length} items`;\n if (isRecord(value)) {\n const label = value.name ?? value.sub ?? value.id;\n return label === undefined ? null : formatScalar(label);\n }\n\n return null;\n}\n\n/**\n * A nested record with nothing to name it by — a payload's `authentication`,\n * an identity — is what the caller came for, so it opens as an indented block\n * under its key rather than hiding behind an ellipsis.\n */\nfunction isUnlabelledRecord(value: unknown): value is Record<string, unknown> {\n return isRecord(value) && value.name === undefined && value.sub === undefined && value.id === undefined;\n}\n\n/**\n * A row in a list is titled by its id: the one value every row has, whatever\n * the caller may see of it, and the one the next command is pasted. The id\n * line is then not repeated below.\n */\nfunction titleOf(record: Record<string, unknown>): string | null {\n return typeof record.id === 'string' && record.id !== '' ? record.id : null;\n}\n\nfunction formatRecord(record: Record<string, unknown>, indent: string, titled = false): string {\n const title = titled ? titleOf(record) : null;\n const isFlatRows = (value: unknown) => Array.isArray(value) && value.length > 0 && value.every(isFlatRecord);\n const entries = Object.entries(record)\n .filter(([key]) => key !== '__typename' && (title === null || key !== 'id'))\n .sort(([, a], [, b]) => Number(Array.isArray(a)) - Number(Array.isArray(b)));\n const width = Math.max(0, ...entries.map(([key]) => key.length));\n const valueIndent = `${indent}${''.padEnd(width)} `;\n\n const body = entries\n .map(([key, value]) => {\n if (isUnlabelledRecord(value) && !asConnection(value)) {\n const nestedIndent = indent + INDENT;\n return `${indent}${key}\\n${formatRecord(value, nestedIndent)}`;\n }\n const rendered = isFlatRows(value)\n ? formatFlatRows(value as Record<string, unknown>[], valueIndent)\n : (summarise(key, value) ?? formatScalar(value));\n return `${indent}${key.padEnd(width)} ${rendered}`;\n })\n .join('\\n');\n\n return title === null ? body : `${indent.slice(INDENT.length)}${title}\\n${body}`;\n}\n\nfunction formatFooter(connection: Connection): string | null {\n const shown = connection.nodes.length;\n const total = connection.totalCount;\n const more = connection.pageInfo?.hasNextPage === true;\n\n if (total === undefined && !more) return null;\n if (total !== undefined && total === shown && !more) return null;\n\n const counted = total === undefined ? `${shown}` : `${shown} of ${total}`;\n return more ? `${counted} — more available, pass --after ${connection.pageInfo?.endCursor}` : counted;\n}\n\n/**\n * What a connection says about the page as a whole — a reveal's bill — printed\n * after the list, each summary as its own titled block.\n */\nfunction formatConnectionExtras(connection: Record<string, unknown>): string[] {\n return Object.entries(connection)\n .filter(([key, value]) => !CONNECTION_PLUMBING.has(key) && value != null)\n .map(([key, value]) =>\n isRecord(value) ? `${key}\\n${formatRecord(value, INDENT)}` : `${key} ${formatScalar(value)}`,\n );\n}\n\n/** Renders one operation result. Returns null when there is nothing to show. */\nexport function formatResult(result: unknown): string | null {\n const connection = asConnection(result);\n if (connection) {\n if (connection.nodes.length === 0) return 'No results.';\n\n const blocks = connection.nodes.map((node) =>\n isRecord(node) ? formatRecord(node, INDENT, true) : `${INDENT}${formatScalar(node)}`,\n );\n const tail = [formatFooter(connection), ...formatConnectionExtras(result as Record<string, unknown>)].filter(\n (part): part is string => part !== null,\n );\n\n return [blocks.join('\\n\\n'), ...tail].join('\\n\\n');\n }\n\n if (Array.isArray(result)) {\n if (result.length === 0) return 'No results.';\n\n return result.map((item) => (isRecord(item) ? formatRecord(item, INDENT, true) : formatScalar(item))).join('\\n\\n');\n }\n\n if (isRecord(result)) return formatRecord(result, '');\n\n return result === null || result === undefined ? null : formatScalar(result);\n}\n","import { Command, Option } from 'commander';\n\nimport { graphql, graphqlUnauthenticated } from '../graphql/client.ts';\nimport { Me } from '../graphql/operations/common.ts';\nimport { DeviceAuthorize, DeviceToken } from '../graphql/operations/hermes.ts';\nimport {\n clearElevatedCredentials,\n ELEVATION_MAX_SECONDS,\n loadCredentials,\n saveCredentials,\n saveElevatedCredentials,\n type ElevationLevel,\n} from '../lib/auth.ts';\nimport { openBrowser } from '../lib/browser.ts';\nimport { error, hint, info, success, warn } from '../lib/output.ts';\nimport { servicesWithoutScope } from '../lib/token-claims.ts';\n\n// TODO: fetch the set of available API scopes dynamically (e.g. from Hermes'\n// resource server) once the backend exposes them. Auth0 RBAC grants the\n// intersection of requested scopes and the user's assigned permissions by EXACT\n// string match — wildcards are not expanded, and unmatched scopes are dropped\n// silently. The list below must therefore contain every permission name the\n// terraform-auth0 roles can hold (superadmin `*:*`, admin `*:read`, sales\n// granular grants), not just the broadest wildcard per service.\nconst SERVICES = ['atlas', 'core', 'signals', 'billing', 'outreach', 'hermes'];\nconst ADMIN_API_SCOPES = SERVICES.map((service) => `${service}/*:read`);\n\nexport const USER_API_SCOPES = [\n 'atlas/organization:read',\n 'atlas/reveal:read',\n 'outreach/channel_account:read',\n 'outreach/channel_account:write',\n 'signals/watcher:read',\n 'signals/watcher:write',\n];\n\nexport const ELEVATION_API_SCOPES = {\n sales: ['atlas/*:read', 'billing/offer:*'],\n admin: ADMIN_API_SCOPES,\n superadmin: [...ADMIN_API_SCOPES, ...SERVICES.map((service) => `${service}/*:*`)],\n} satisfies Record<ElevationLevel, string[]>;\n\nconst DEFAULT_ELEVATION: ElevationLevel = 'admin';\nconst DEFAULT_SCOPE = `openid profile email offline_access ${USER_API_SCOPES.join(' ')}`;\n\nexport function scopeForLogin(scope: string, scopeIsDefault: boolean, level: ElevationLevel | undefined): string {\n if (!level) return scope;\n\n const requested = scopeIsDefault\n ? `openid profile email ${[...USER_API_SCOPES, ...ELEVATION_API_SCOPES[level]].join(' ')}`\n : scope;\n\n return requested\n .split(' ')\n .filter((name) => name && name !== 'offline_access')\n .join(' ');\n}\n\nfunction sleep(ms: number): Promise<void> {\n return new Promise((resolve) => setTimeout(resolve, ms));\n}\n\nasync function setupUserContext(endpoint?: string): Promise<void> {\n const userData = await graphql(Me, undefined, { endpoint });\n const user = userData.me;\n if (!user) return;\n\n info('');\n info(` User: ${user.firstName} ${user.lastName} <${user.email}>`);\n hint('Run `sl whoami` to verify.');\n}\n\n/**\n * Says so when the identity provider granted nothing for a service.\n *\n * Without this the loss is invisible: login reports success, and the operator\n * meets it much later as `unknown command 'organizations'`, because the CLI\n * builds its commands from the schema the router filters by the token's scopes.\n */\nfunction reportScopeGrant(requestedScope: string, accessToken: string): void {\n const missing = servicesWithoutScope(requestedScope, accessToken);\n if (missing.length === 0) return;\n\n warn(`No scope granted for: ${missing.join(', ')}.`);\n info(' Their commands will not appear in `sl --help`, and their fields are');\n info(' filtered out of the schema this CLI builds itself from.');\n hint('Auth0 grants requested scopes by exact string match against your assigned');\n hint('permissions and drops the rest silently — this is a role assignment in the');\n hint('tenant you logged into, not a CLI setting. Ask an administrator, then re-run `sl login`.');\n}\n\nexport const loginCommand = new Command('login')\n .summary('Log in to your Sortlist account')\n .description(\n 'Log in to your Sortlist account\\n\\n' +\n 'Opens a browser to complete authentication, then saves your\\n' +\n \"credentials locally. If you belong to multiple companies, you'll\\n\" +\n 'be prompted to pick one.\\n\\n' +\n 'Examples:\\n' +\n ' sl login Log in with the user scopes, no staff scope\\n' +\n ' sl login --no-browser Print the login URL instead of opening it\\n' +\n ' sl login --elevate=sales Sales scopes, for a limited time\\n' +\n ' sl login --elevate Admin (read) scopes, for a limited time\\n' +\n ' sl login --elevate=superadmin Superadmin (write) scopes, for a limited time\\n\\n' +\n `An elevated token lasts at most ${ELEVATION_MAX_SECONDS / 60} minutes, is never refreshed, and sits\\n` +\n 'beside your session: once it expires, or after `sl logout --elevated`,\\n' +\n 'commands fall back to the plain login.',\n )\n .option('--scope <scope>', 'OAuth scope', DEFAULT_SCOPE)\n .option('--no-browser', 'Print the login URL instead of opening a browser')\n .addOption(\n new Option('--elevate [level]', 'Get a short-lived token with staff scopes')\n .choices(Object.keys(ELEVATION_API_SCOPES))\n .preset(DEFAULT_ELEVATION),\n )\n .action(async function (this: Command) {\n const opts = this.optsWithGlobals();\n const level: ElevationLevel | undefined = opts.elevate;\n const scope = scopeForLogin(opts.scope, this.getOptionValueSource('scope') === 'default', level);\n\n info(level ? `Starting device authorization for ${level} elevation...` : 'Starting device authorization...');\n\n const authData = await graphqlUnauthenticated(DeviceAuthorize, { input: { scope } }, opts.endpoint);\n\n const device = authData.deviceAuthorize;\n if (!device) {\n error('Device authorization failed — the server returned an empty response.');\n hint('Check your network connection and try again.');\n hint('If the problem persists, verify the endpoint: sl config show');\n process.exit(2);\n }\n\n const url = device.verificationUriComplete ?? device.verificationUri;\n info('');\n info(` Open this URL in your browser:`);\n info(` ${url}`);\n info('');\n info(` Enter code: ${device.userCode}`);\n info('');\n\n if (opts.browser) {\n openBrowser(url);\n info(' (Browser opened automatically)');\n info('');\n }\n\n info('Waiting for you to complete login in the browser...');\n\n let interval = device.interval * 1000;\n const deadline = Date.now() + device.expiresIn * 1000;\n\n while (Date.now() < deadline) {\n await sleep(interval);\n\n const tokenData = await graphqlUnauthenticated(\n DeviceToken,\n { input: { deviceCode: device.deviceCode } },\n opts.endpoint,\n );\n\n const token = tokenData.deviceToken;\n if (!token) {\n error('Token exchange failed — the server returned an empty response.');\n hint('Try running `sl login` again.');\n process.exit(2);\n }\n\n if (token.error === 'authorization_pending') {\n continue;\n }\n\n if (token.error === 'slow_down') {\n interval += 5000;\n continue;\n }\n\n if (token.error === 'expired_token') {\n error('The login code expired before you completed authentication.');\n hint('Run `sl login` to generate a new code.');\n process.exit(2);\n }\n\n if (token.error === 'access_denied') {\n error('Access was denied during authentication.');\n hint('Make sure you approved the request in the browser.');\n hint('If you denied it by mistake, run `sl login` to try again.');\n process.exit(2);\n }\n\n if (token.error) {\n error(`Authentication failed (${token.error}).`);\n hint('Run `sl login` to try again.');\n process.exit(2);\n }\n\n if (level && token.accessToken && token.expiresIn) {\n const elevated = saveElevatedCredentials(token.accessToken, token.expiresIn, level);\n\n success(`Elevated to ${level} until ${new Date(elevated.expiresAt * 1000).toLocaleTimeString()}.`);\n reportScopeGrant(scope, token.accessToken);\n if (!loadCredentials()) hint('You have no regular session: once this expires, run `sl login`.');\n hint('Run `sl logout --elevated` to drop it sooner.');\n return;\n }\n\n if (token.accessToken && token.refreshToken && token.idToken && token.expiresIn) {\n saveCredentials({\n accessToken: token.accessToken,\n refreshToken: token.refreshToken,\n idToken: token.idToken,\n expiresAt: Math.floor(Date.now() / 1000) + token.expiresIn,\n });\n clearElevatedCredentials();\n\n success('Logged in successfully.');\n reportScopeGrant(scope, token.accessToken);\n await setupUserContext(opts.endpoint);\n return;\n }\n }\n\n error('Authentication timed out — no response from the browser.');\n hint('Run `sl login` to start a new session.');\n process.exit(2);\n });\n","/**\n * Hand-maintained typed operations used by non-generated commands.\n * These need gql() for TypedDocumentNode inference.\n */\nimport { gql } from '../generated/gql.ts';\n\nexport const Me = gql(`\n query Me {\n me {\n id\n email\n firstName\n lastName\n }\n }\n`);\n","import { execFile } from 'node:child_process';\n\nexport function openBrowser(url: string): void {\n if (process.platform === 'win32') {\n // `start` is a cmd built-in; the empty string is the window title slot.\n execFile('cmd', ['/c', 'start', '', url], () => {});\n return;\n }\n const cmd = process.platform === 'darwin' ? 'open' : 'xdg-open';\n execFile(cmd, [url], () => {});\n}\n","import { Command } from 'commander';\n\nimport { graphqlUnauthenticated } from '../graphql/client.ts';\nimport { LogoutUrl } from '../graphql/operations/hermes.ts';\nimport { clearApplicationSession } from '../lib/application-session.ts';\nimport { clearCredentials, clearElevatedCredentials } from '../lib/auth.ts';\nimport { openBrowser } from '../lib/browser.ts';\nimport { clearIdentity } from '../lib/config.ts';\nimport { hint, info, success, warn } from '../lib/output.ts';\n\nexport const logoutCommand = new Command('logout')\n .summary('Log out and remove stored credentials')\n .description(\n 'Log out and remove stored credentials\\n\\n' +\n 'Deletes the saved tokens from ~/.sortlist/credentials.json and\\n' +\n 'opens the Auth0 logout URL in your browser so the next `sl login`\\n' +\n \"doesn't silently reuse the previous account.\\n\\n\" +\n 'Examples:\\n' +\n ' sl logout Clear credentials and log out of Auth0\\n' +\n ' sl logout --no-browser Only clear local credentials\\n' +\n ' sl logout --elevated Drop the elevated token, keep your session',\n )\n .option('--no-browser', 'Skip opening the Auth0 logout URL in a browser')\n .option('--elevated', 'Only drop the token from `sl login --elevate`')\n .action(async function (this: Command) {\n const opts = this.optsWithGlobals();\n\n if (opts.elevated) {\n if (clearElevatedCredentials()) success('Elevation dropped — back to your regular session.');\n else info('No elevated token to drop.');\n return;\n }\n\n clearCredentials();\n clearElevatedCredentials();\n clearIdentity();\n // Also the application session: \"logged out\" has to mean no working token of\n // any kind, and its token keeps authenticating until it expires on its own.\n const hadSession = clearApplicationSession();\n success('Logged out — credentials removed.');\n if (hadSession) info('The application session was cleared too.');\n\n if (!opts.browser) {\n hint('Run `sl login` to authenticate again.');\n return;\n }\n\n try {\n const data = await graphqlUnauthenticated(LogoutUrl, {}, opts.endpoint);\n if (data.logoutUrl) {\n openBrowser(data.logoutUrl);\n info('Opened Auth0 logout in your browser.');\n }\n } catch {\n warn('Could not fetch the Auth0 logout URL — skipped browser logout.');\n }\n\n hint('Run `sl login` to authenticate again.');\n });\n","import { Command } from 'commander';\n\nimport { ensureAuthenticated, isExpired, loadElevatedCredentials } from '../lib/auth.ts';\nimport { clientCredentials, fetchClientCredentialsToken } from '../lib/client-credentials.ts';\nimport { error, hint } from '../lib/output.ts';\n\nexport const tokenCommand = new Command('token')\n .summary('Print the current access token to stdout')\n .description(\n 'Print the current access token to stdout\\n\\n' +\n \"Prints the application credential's token when SORTLIST_CLIENT_ID and\\n\" +\n 'SORTLIST_CLIENT_SECRET are set, and yours otherwise — matching what every\\n' +\n 'other command authenticates as.\\n\\n' +\n 'Examples:\\n' +\n ' sl token Print the token\\n' +\n ' curl -H \"Authorization: Bearer $(sl token)\" ...',\n )\n .action(async () => {\n // Every other command prefers the application credential, so this one must\n // too: piping `sl token` into curl otherwise acts as the human while the\n // command beside it acts as the application.\n const machine = clientCredentials();\n if (machine) {\n try {\n process.stdout.write(await fetchClientCredentialsToken(machine));\n } catch (err) {\n error((err as Error).message);\n hint('Check SORTLIST_CLIENT_ID, SORTLIST_CLIENT_SECRET and the token endpoint.');\n process.exit(2);\n }\n return;\n }\n\n const elevated = loadElevatedCredentials();\n if (elevated) {\n process.stdout.write(elevated.accessToken);\n return;\n }\n\n const creds = ensureAuthenticated();\n if (isExpired(creds)) {\n error('Your access token has expired.');\n hint('Run `sl login` to re-authenticate.');\n process.exit(2);\n }\n process.stdout.write(creds.accessToken);\n });\n","import { Command } from 'commander';\n\nimport { graphqlRaw } from '../graphql/client.ts';\nimport { clearApplicationSession, saveApplicationSession } from '../lib/application-session.ts';\nimport { applicationIdentity, fetchClientCredentialsToken } from '../lib/client-credentials.ts';\nimport { error, hint, info, success } from '../lib/output.ts';\n\nconst CREATE = `\n mutation UseApplication($applicationId: ID!, $name: String!) {\n createApplicationCredential(input: { applicationId: $applicationId, name: $name, session: true }) {\n clientId\n clientSecret\n credential { id }\n }\n }\n`;\n\nconst REVOKE = `\n mutation ReleaseSessionCredential($credentialId: ID!) {\n revokeApplicationCredential(input: { credentialId: $credentialId }) { revokedAt }\n }\n`;\n\ninterface IssuedSessionCredential {\n clientId: string;\n clientSecret: string;\n credential: { id: string };\n}\n\nexport const useCommand = new Command('use')\n .summary('Act as an application, or go back to acting as yourself')\n .description(\n 'Act as an application, or go back to acting as yourself\\n\\n' +\n 'Examples:\\n' +\n ' sl use application <id> Act as that application for one token lifetime\\n' +\n ' sl use me Go back to acting as yourself',\n );\n\nuseCommand\n .command('application <id>')\n .description('Act as an application for one token lifetime')\n .action(async function (this: Command, id: string) {\n const opts = this.optsWithGlobals();\n\n // The credential exists only long enough to be exchanged. Revoking it at once\n // means nothing reusable is left anywhere: what lands on disk is a bearer\n // token that expires, and a subgraph verifies it by signature and `exp`\n // against the JWKS, never by asking Hermes whether the credential still lives.\n // asPerson: creating and revoking a credential is a management operation,\n // which Hermes refuses to an application token — so switching straight from\n // one application to another has to authenticate as the person regardless of\n // what is currently active.\n const asPerson = { endpoint: opts.endpoint, throwOnError: true, asPerson: true };\n\n let credential: IssuedSessionCredential | null = null;\n try {\n const issued = (await graphqlRaw(CREATE, { applicationId: id, name: sessionName() }, asPerson)) as {\n createApplicationCredential: IssuedSessionCredential | null;\n };\n credential = issued.createApplicationCredential;\n } catch (err) {\n error(`Could not create a session credential: ${(err as Error).message}`);\n hint('`sl applications` lists the applications you can manage.');\n process.exit(1);\n }\n\n // A refused mutation can arrive as data carrying a null field rather than as\n // a thrown error, so catching is not enough on its own.\n if (!credential) {\n error('The server did not return a session credential.');\n hint('`sl applications` lists the applications you can manage.');\n process.exit(1);\n }\n\n let accessToken: string | null = null;\n try {\n accessToken = await fetchClientCredentialsToken({\n clientId: credential.clientId,\n clientSecret: credential.clientSecret,\n });\n } catch (err) {\n error(`Could not exchange the credential for a token: ${(err as Error).message}`);\n hint('`sl config use-local` / `use-staging` / `use-production` set the token endpoint.');\n } finally {\n // Revoked either way: a credential whose exchange failed must not survive.\n await graphqlRaw(REVOKE, { credentialId: credential.credential.id }, asPerson);\n }\n\n if (!accessToken) process.exit(2);\n\n const identity = applicationIdentity(accessToken);\n if (!identity) {\n error('The token endpoint returned something this CLI could not read.');\n process.exit(1);\n }\n\n saveApplicationSession({\n accessToken,\n applicationId: identity.applicationId,\n expiresAt: identity.expiresAt.getTime(),\n });\n\n success(`Now acting as application ${identity.applicationId}`);\n info(` until ${identity.expiresAt.toISOString()}`);\n hint('The credential behind this token is already revoked, so nothing reusable is stored.');\n hint('Managing companies, applications and credentials is now out of reach: Hermes refuses');\n hint('its own tokens on its management API. Run `sl use me` to act as yourself again.');\n });\n\nuseCommand\n .command('me')\n .description('Go back to acting as yourself')\n .action(() => {\n if (clearApplicationSession()) {\n success('Now acting as yourself again.');\n return;\n }\n info('Already acting as yourself.');\n });\n\nfunction sessionName(): string {\n return `cli-session-${new Date().toISOString().slice(0, 19).replace(/[:T]/g, '')}`;\n}\n","import { Command } from 'commander';\n\nimport { graphql, GraphQLRequestError } from '../graphql/client.ts';\nimport { Me } from '../graphql/operations/common.ts';\nimport { loadApplicationSession } from '../lib/application-session.ts';\nimport { loadElevatedCredentials, storedUserAccessToken } from '../lib/auth.ts';\nimport { applicationIdentity, clientCredentials, fetchClientCredentialsToken } from '../lib/client-credentials.ts';\nimport { error, hint, info, isJsonMode, printJson } from '../lib/output.ts';\nimport { formatResult } from '../lib/render.ts';\nimport { grantedScopes } from '../lib/token-claims.ts';\n\nexport function apiScopes(accessToken: string | null): string[] {\n return accessToken ? grantedScopes(accessToken).filter((scope) => scope.includes('/')) : [];\n}\n\nfunction currentElevation(): { level: string; until: string } | null {\n const elevated = loadElevatedCredentials();\n\n return elevated ? { level: elevated.level, until: new Date(elevated.expiresAt * 1000).toISOString() } : null;\n}\n\nexport const whoamiCommand = new Command('whoami')\n .summary('Show what the CLI is currently acting as')\n .description(\n 'Show what the CLI is currently acting as\\n\\n' +\n 'Reports a person or an application, matching what every command\\n' +\n 'authenticates as. Use --json for machine-readable output.\\n\\n' +\n 'Examples:\\n' +\n ' sl whoami Show the current identity\\n' +\n ' sl whoami --json Output the full object as JSON',\n )\n .action(async function (this: Command) {\n const opts = this.optsWithGlobals();\n\n // An application cannot be identified by asking the API: Hermes refuses its\n // own tokens on the management API, so `me` returns null. The claims of the\n // token we just minted are the only answer available.\n const session = loadApplicationSession();\n if (session) {\n const identity = applicationIdentity(session.accessToken);\n if (isJsonMode(opts)) {\n printJson({ kind: 'application', via: 'session', ...identity });\n return;\n }\n\n info('Acting as an application.\\n');\n info(\n formatResult({\n application: session.applicationId,\n 'acts for company': identity?.companyId,\n subject: identity?.sub,\n 'token expires': new Date(session.expiresAt).toISOString(),\n source: 'sl use application — its credential is already revoked',\n }) ?? '',\n );\n hint('Run `sl use me` to act as yourself again.');\n return;\n }\n\n const machine = clientCredentials();\n if (machine) {\n let identity;\n try {\n identity = applicationIdentity(await fetchClientCredentialsToken(machine));\n } catch (err) {\n error((err as Error).message);\n hint('Check SORTLIST_CLIENT_ID, SORTLIST_CLIENT_SECRET and the token endpoint.');\n process.exit(2);\n }\n if (!identity) {\n error('The token endpoint returned something this CLI could not read.');\n process.exit(1);\n }\n\n if (isJsonMode(opts)) {\n printJson({ kind: 'application', clientId: machine.clientId, ...identity });\n return;\n }\n\n info('Acting as an application.\\n');\n info(\n formatResult({\n application: identity.applicationId,\n 'acts for company': identity.companyId,\n subject: identity.sub,\n credential: `${identity.credentialId} (${machine.clientId})`,\n 'token expires': identity.expiresAt.toISOString(),\n source: 'SORTLIST_CLIENT_ID / SORTLIST_CLIENT_SECRET',\n }) ?? '',\n );\n hint('A credential carries no scopes, so scoped data stays out of reach.');\n hint('Unset both variables to act as yourself again.');\n return;\n }\n\n let data;\n try {\n data = await graphql(Me, undefined, {\n endpoint: opts.endpoint,\n throwOnError: true,\n });\n } catch (err) {\n if (err instanceof GraphQLRequestError) {\n error('Could not verify your identity — the API returned an error:');\n const messages = err.graphqlErrors?.map((e) => e.message) ?? [err.message];\n for (const message of messages) info(` ${message}`);\n hint('This is a server-side or authorization error, not necessarily an expired session.');\n hint('Retry in a moment; if it persists, re-run `sl login` or report it.');\n process.exit(1);\n }\n throw err;\n }\n\n const user = data.me;\n if (!user) {\n // A successful `me` for a logged-in user is never null — the resolver\n // returns the calling user. Null here means the backend could not resolve\n // the account (e.g. an upstream identity/profile lookup failed), not that\n // the local session is invalid, so we do not tell the user to log in again.\n error('The API did not return your user identity.');\n hint('This is usually a temporary backend issue rather than an expired session.');\n hint('Retry in a moment; if it persists, re-run `sl login` or report it.');\n process.exit(1);\n }\n\n const elevation = currentElevation();\n const scopes = apiScopes(storedUserAccessToken());\n\n if (isJsonMode(opts)) {\n printJson({ kind: 'person', ...user, elevation, scopes });\n return;\n }\n\n info(elevation ? `Acting as yourself, elevated to ${elevation.level}.\\n` : 'Acting as yourself.\\n');\n info(\n formatResult({\n name: [user.firstName, user.lastName].filter(Boolean).join(' ') || null,\n email: user.email,\n id: user.id,\n ...(elevation && { 'elevated until': elevation.until }),\n scopes: scopes.length > 0 ? scopes.join(' ') : 'none',\n }) ?? '',\n );\n if (elevation) hint('Run `sl logout --elevated` to drop the elevation now.');\n });\n","/**\n * Runtime schema introspection.\n *\n * Fetches the schema from the federation endpoint via an introspection query,\n * caches it on disk at ~/.sortlist/schema.json, and returns a GraphQLSchema\n * together with a field → subgraph map derived from the `@join__field`\n * directives the router injects into introspection responses.\n */\nimport { createHash } from 'node:crypto';\nimport fs from 'node:fs';\nimport os from 'node:os';\nimport path from 'node:path';\nimport { buildClientSchema, getIntrospectionQuery, type GraphQLSchema, type IntrospectionQuery } from 'graphql';\n\nimport { baseRequestHeaders } from '../lib/api-headers.ts';\nimport { loadApplicationSession } from '../lib/application-session.ts';\nimport { storedUserAccessToken } from '../lib/auth.ts';\nimport { clientCredentials, fetchClientCredentialsToken } from '../lib/client-credentials.ts';\nimport { getEndpoint } from '../lib/config.ts';\n\nconst CACHE_DIR = path.join(os.homedir(), '.sortlist');\nconst CACHE_PATH = path.join(CACHE_DIR, 'schema.json');\nconst CACHE_TTL_MS = 60 * 60 * 1000; // 1 hour\n\nexport type FieldServiceMap = Map<string, Map<string, string>>;\n\nexport interface IntrospectedSchema {\n schema: GraphQLSchema;\n fieldServices: FieldServiceMap;\n /** All subgraph names observed in the supergraph, regardless of scope visibility. */\n services: Set<string>;\n}\n\nlet cached: IntrospectedSchema | null = null;\n\n/**\n * The router injects `appliedDirectives` into introspection responses — this\n * isn't a standard introspection field, so we read it from the raw JSON.\n */\ninterface RawField {\n name: string;\n appliedDirectives?: Array<{\n name: string;\n args: Array<{ name: string; value: unknown }>;\n }>;\n}\n\ninterface RawType {\n name: string;\n fields?: RawField[];\n}\n\ninterface RawIntrospection {\n __schema: {\n queryType?: { name: string } | null;\n mutationType?: { name: string } | null;\n types: RawType[];\n };\n}\n\ninterface CacheEnvelope {\n endpoint: string;\n fetchedAt: number;\n /** Short fingerprint of the access token so schemas for different scopes don't collide. */\n tokenFingerprint: string;\n introspection: IntrospectionQuery;\n raw: RawIntrospection;\n}\n\nfunction tokenFingerprint(token: string | null): string {\n if (!token) return 'anonymous';\n return createHash('sha256').update(token).digest('hex').slice(0, 16);\n}\n\nfunction readCache(\n endpoint: string,\n token: string | null,\n): { introspection: IntrospectionQuery; raw: RawIntrospection } | null {\n try {\n const text = fs.readFileSync(CACHE_PATH, 'utf-8');\n const envelope: CacheEnvelope = JSON.parse(text);\n if (envelope.endpoint !== endpoint) return null;\n if (envelope.tokenFingerprint !== tokenFingerprint(token)) return null;\n if (Date.now() - envelope.fetchedAt > CACHE_TTL_MS) return null;\n if (!envelope.raw) return null;\n return { introspection: envelope.introspection, raw: envelope.raw };\n } catch {\n return null;\n }\n}\n\nfunction writeCache(\n endpoint: string,\n token: string | null,\n introspection: IntrospectionQuery,\n raw: RawIntrospection,\n): void {\n try {\n if (!fs.existsSync(CACHE_DIR)) {\n fs.mkdirSync(CACHE_DIR, { recursive: true });\n }\n const envelope: CacheEnvelope = {\n endpoint,\n fetchedAt: Date.now(),\n tokenFingerprint: tokenFingerprint(token),\n introspection,\n raw,\n };\n fs.writeFileSync(CACHE_PATH, JSON.stringify(envelope));\n } catch {\n // Non-fatal — worst case we re-fetch next time\n }\n}\n\nasync function fetchIntrospection(\n endpoint: string,\n token: string | null,\n): Promise<{ introspection: IntrospectionQuery; raw: RawIntrospection }> {\n const headers: Record<string, string> = baseRequestHeaders();\n if (token) headers['Authorization'] = `Bearer ${token}`;\n\n const res = await fetch(endpoint, {\n method: 'POST',\n headers,\n body: JSON.stringify({ query: getIntrospectionQuery() }),\n });\n\n if (!res.ok) {\n throw new Error(`Introspection failed: HTTP ${res.status} ${res.statusText}`);\n }\n\n const json = (await res.json()) as {\n data?: IntrospectionQuery & RawIntrospection;\n errors?: Array<{ message: string }>;\n };\n\n if (json.errors?.length) {\n throw new Error(`Introspection errors: ${json.errors.map((e) => e.message).join(', ')}`);\n }\n\n if (!json.data) {\n throw new Error('Introspection returned no data');\n }\n\n return { introspection: json.data as IntrospectionQuery, raw: json.data as RawIntrospection };\n}\n\n/**\n * Walk the raw introspection response and build:\n * - a `typeName → fieldName → subgraph` map from `@join__field(graph: ...)` directives\n * - the full set of subgraph names observed anywhere in the response (including types\n * whose root-fields were hidden by scope filtering — still useful so the CLI can\n * expose empty sub-commands that explain the scope gap)\n */\nfunction parseIntrospection(raw: RawIntrospection): { fieldServices: FieldServiceMap; services: Set<string> } {\n const fieldServices: FieldServiceMap = new Map();\n const services = new Set<string>();\n\n for (const type of raw.__schema.types ?? []) {\n if (!type.fields?.length) continue;\n\n let fieldMap: Map<string, string> | null = null;\n\n for (const field of type.fields) {\n const directive = field.appliedDirectives?.find((d) => d.name === 'join__field');\n if (!directive) continue;\n const graphArg = directive.args.find((a) => a.name === 'graph');\n if (!graphArg || typeof graphArg.value !== 'string') continue;\n services.add(graphArg.value);\n if (!fieldMap) fieldMap = new Map();\n fieldMap.set(field.name, graphArg.value);\n }\n\n if (fieldMap) fieldServices.set(type.name, fieldMap);\n }\n\n return { fieldServices, services };\n}\n\n/**\n * Fetches and caches the schema via introspection. Returns the built schema\n * along with a map of root-field → subgraph name used for CLI service grouping.\n *\n * @param endpointOverride - Override the configured endpoint URL\n */\nasync function currentAccessToken(): Promise<string | null> {\n const machine = clientCredentials();\n if (machine) return fetchClientCredentialsToken(machine);\n\n return loadApplicationSession()?.accessToken ?? storedUserAccessToken();\n}\n\nexport async function getIntrospectedSchema(endpointOverride?: string): Promise<IntrospectedSchema> {\n if (cached) return cached;\n\n const endpoint = getEndpoint(endpointOverride);\n const token = await currentAccessToken();\n\n const fromCache = readCache(endpoint, token);\n if (fromCache) {\n // A cache that no longer builds is discarded rather than raised: one bad\n // fetch — a subgraph restarting mid-introspection is enough — would otherwise\n // fail every command for the whole TTL, and the error blames the query rather\n // than the file.\n const usable = build(fromCache.introspection, fromCache.raw);\n if (usable) {\n cached = usable;\n return cached;\n }\n discardCache();\n }\n\n const { introspection, raw } = await fetchIntrospection(endpoint, token);\n const built = build(introspection, raw);\n if (!built) {\n throw new Error(\n 'The endpoint returned an introspection result this CLI could not build a schema from. ' +\n 'Nothing was cached; retry, and check that every subgraph is up.',\n );\n }\n\n // Written only once the result is known to build, so a partial response cannot\n // become a sticky failure.\n writeCache(endpoint, token, introspection, raw);\n cached = built;\n return cached;\n}\n\nfunction build(introspection: IntrospectionQuery, raw: RawIntrospection): IntrospectedSchema | null {\n try {\n const { fieldServices, services } = parseIntrospection(raw);\n return { schema: buildClientSchema(introspection), fieldServices, services };\n } catch {\n return null;\n }\n}\n\nfunction discardCache(): void {\n try {\n fs.unlinkSync(CACHE_PATH);\n } catch {\n // already gone\n }\n}\n\n/**\n * Force-refresh the cached schema, bypassing the disk cache.\n */\nexport async function refreshSchema(endpointOverride?: string): Promise<IntrospectedSchema> {\n cached = null;\n discardCache();\n\n const endpoint = getEndpoint(endpointOverride);\n const token = await currentAccessToken();\n const { introspection, raw } = await fetchIntrospection(endpoint, token);\n const built = build(introspection, raw);\n if (!built) {\n throw new Error(\n 'The endpoint returned an introspection result this CLI could not build a schema from. ' +\n 'Nothing was cached; retry, and check that every subgraph is up.',\n );\n }\n\n writeCache(endpoint, token, introspection, raw);\n cached = built;\n return cached;\n}\n","import { execFileSync } from 'node:child_process';\n\nimport { isLocalDev } from './env.ts';\nimport { error, hint, info, success, warn } from './output.ts';\nimport { pkg } from './package-root.ts';\n\nconst PACKAGE_NAME = '@sortlist/cli';\n\nfunction getCurrentVersion(): string {\n return pkg.version;\n}\n\nasync function fetchLatestVersion(): Promise<string | null> {\n try {\n const controller = new AbortController();\n const timeout = setTimeout(() => controller.abort(), 3000);\n const res = await fetch(`https://registry.npmjs.org/${encodeURIComponent(PACKAGE_NAME)}/latest`, {\n signal: controller.signal,\n });\n clearTimeout(timeout);\n if (!res.ok) return null;\n const data = (await res.json()) as { version: string };\n return data.version;\n } catch {\n return null;\n }\n}\n\nfunction parseSemver(version: string): [number, number, number] {\n const [major, minor, patch] = version.split('.').map(Number);\n return [major ?? 0, minor ?? 0, patch ?? 0];\n}\n\nfunction autoUpdate(current: string, latest: string): void {\n info(`Updating ${PACKAGE_NAME}: ${current} \\u2192 ${latest}...`);\n\n try {\n // Clean stale temp directories that cause ENOTEMPTY errors. npm stages a\n // package under a sibling `.<name>-<hash>` dir; for scoped names the dot\n // sits on the final segment, e.g. `@sortlist/.cli-<hash>`.\n const prefix = execFileSync('npm', ['prefix', '-g'], { stdio: 'pipe', encoding: 'utf-8' }).trim();\n const lastSlash = PACKAGE_NAME.lastIndexOf('/');\n const scope = lastSlash === -1 ? '' : `${PACKAGE_NAME.slice(0, lastSlash)}/`;\n const name = lastSlash === -1 ? PACKAGE_NAME : PACKAGE_NAME.slice(lastSlash + 1);\n const staleDir = `${prefix}/lib/node_modules/${scope}.${name}-`;\n execFileSync('sh', ['-c', `rm -rf \"${staleDir}\"* 2>/dev/null || true`], { stdio: 'pipe' });\n\n execFileSync('npm', ['install', '-g', '--prefer-online', `${PACKAGE_NAME}@${latest}`], {\n stdio: 'pipe',\n });\n success(`Updated to ${latest}. Restart \\`sl\\` to use the new version.`);\n } catch (err) {\n const stderr = err && typeof err === 'object' && 'stderr' in err ? String(err.stderr).trim() : '';\n const detail = stderr ? ` (${stderr.split('\\n')[0]})` : '';\n warn(`Auto-update failed${detail}.`);\n hint(`Run \\`npm i -g ${PACKAGE_NAME}\\` to update manually.`);\n }\n}\n\n/**\n * Checks npm for the latest version.\n * - Major mismatch: blocks execution and exits.\n * - Minor/patch mismatch: auto-updates with a spinner, then continues.\n */\nexport async function checkForUpdates(): Promise<void> {\n if (isLocalDev) return;\n\n const current = getCurrentVersion();\n const latest = await fetchLatestVersion();\n if (!latest || latest === current) return;\n\n const [curMajor] = parseSemver(current);\n const [latMajor] = parseSemver(latest);\n\n if (latMajor > curMajor) {\n error(`Breaking update: ${current} \\u2192 ${latest}`);\n info('');\n info(' Your CLI is incompatible with the current API.');\n info(' Update before continuing:');\n info('');\n info(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AW,aAAa,YAAY;AAClC,YAAQ,WAAW,UAAU,SAAS,EAAE,QAAQ,KAAK,CAAC;AAAA,EACxD;AAEA,QAAM,oBAAoB,IAAIA,SAAQ,YAAY,EAC/C,QAAQ,wDAAwD,EAChE,OAAO,mBAAmB,sCAAsC,EAChE,OAAO,WAAyB;AAC/B,SAAK,oBAAoB,YAAY,KAAK,KAAK,EAAE,MAA4B,CAAC;AAAA,EAChF,CAAC;AAEH,UAAQ,WAAW,iBAAiB;AACpC,UAAQ,YAAY,qBAAqB,WAAW,MAAM,CAAC;AAC7D,SAAS,KAAK;AAEZ,QAAM,UAAW,IAAc;AAC/B,QAAM,UAAU,CAAC,SAAS,UAAU,UAAU,SAAS,UAAU,QAAQ;AACzE,MAAI,CAAC,QAAQ,KAAK,KAAK,CAAC,MAAM,QAAQ,SAAS,CAAC,CAAC,GAAG;AAClD,UAAM,2BAA2B,OAAO,EAAE;AAC1C,SAAK,4DAA4D;AACjE,SAAK,2DAA2D;AAChE,YAAQ,KAAK,CAAC;AAAA,EAChB;AACF;AAEA,wBAAwB,OAAO;AAE/B,MAAM,gBAAgB;AAEtB,IAAI;AACF,QAAM,QAAQ,WAAW,QAAQ,IAAI;AACvC,SAAS,KAAK;AACZ,EAAAC,kBAAiB,GAAG;AACpB,QAAM,YAAY;AAClB,QAAM;AACR;AAEA,MAAM,YAAY;","names":["Command","fs","os","path","path","os","fs","fs","os","path","ensureDir","tokenEndpoint","fs","path","fs","path","fs","path","Command","isEnumType","isListType","isNonNullType","isObjectType","isScalarType","serviceOf","captureException","error","addBreadcrumb","captureException","error","captureException","addBreadcrumb","personal","path","CONNECTION_PLUMBING","unwrap","isNonNullType","isListType","isEnumType","isObjectType","isScalarType","isRecord","Command","build","query","fName","data","Command","Option","Command","Option","Command","Command","Command","Command","Command","Command","Command","Command","fs","os","path","path","os","cached","fs","endpointOverride","ansi","Command","captureException"]}
1
+ {"version":3,"sources":["../src/index.ts","../src/commands/config.ts","../src/lib/application-session.ts","../src/lib/auth.ts","../src/lib/output.ts","../src/lib/config.ts","../src/lib/env.ts","../src/lib/package-root.ts","../src/commands/dynamic.ts","../src/graphql/client.ts","../src/lib/api-headers.ts","../src/lib/token-claims.ts","../src/lib/client-credentials.ts","../src/lib/company.ts","../src/lib/sentry.ts","../src/graphql/generated/graphql.ts","../src/graphql/generated/gql.ts","../src/graphql/operations/hermes.ts","../src/graphql/query-builder.ts","../src/lib/render.ts","../src/commands/login.ts","../src/graphql/operations/common.ts","../src/lib/browser.ts","../src/commands/logout.ts","../src/commands/token.ts","../src/commands/use.ts","../src/commands/whoami.ts","../src/graphql/introspection.ts","../src/lib/version-check.ts"],"sourcesContent":["import { Command } from 'commander';\n\nimport { configCommand } from './commands/config.ts';\nimport {\n buildOperationCommands,\n formatOperationList,\n formatTypeInspection,\n groupOperationCommands,\n} from './commands/dynamic.ts';\nimport { loginCommand } from './commands/login.ts';\nimport { logoutCommand } from './commands/logout.ts';\nimport { tokenCommand } from './commands/token.ts';\nimport { useCommand } from './commands/use.ts';\nimport { whoamiCommand } from './commands/whoami.ts';\nimport { getIntrospectedSchema, refreshSchema } from './graphql/introspection.ts';\nimport { error, hint, info } from './lib/output.ts';\nimport { pkg } from './lib/package-root.ts';\nimport { captureException, flushSentry, initSentry } from './lib/sentry.ts';\nimport { checkForUpdates } from './lib/version-check.ts';\n\ninitSentry();\n\n// ── Colored help output ──\n\nconst useColor = process.stdout.isTTY && !process.env.NO_COLOR;\nconst ansi = {\n reset: '\\x1b[0m',\n bold: '\\x1b[1m',\n dim: '\\x1b[2m',\n cyan: '\\x1b[36m',\n yellow: '\\x1b[33m',\n green: '\\x1b[32m',\n};\n\nfunction colorizeHelp(text: string): string {\n if (!useColor) return text;\n return text.replace(\n /^(Usage|Options|Commands|Arguments|Quick start|Services|Examples|Queries|Mutations):(.*)$/gm,\n `${ansi.cyan}${ansi.bold}$1:$2${ansi.reset}`,\n );\n}\n\nconst colorOutput = {\n writeOut: (str: string) => process.stdout.write(colorizeHelp(str)),\n writeErr: (str: string) => process.stderr.write(colorizeHelp(str)),\n};\n\nfunction applyColorToAllCommands(cmd: Command): void {\n cmd.configureOutput(colorOutput);\n for (const sub of cmd.commands) {\n applyColorToAllCommands(sub as Command);\n }\n}\n\nconst BASE_DESCRIPTION =\n 'Sortlist CLI — query and manage the Sortlist platform from your terminal\\n\\n' +\n 'Quick start:\\n' +\n ' sl login Authenticate with your Sortlist account\\n' +\n \" sl whoami Check who you're logged in as\";\n\nfunction buildRootDescription(operationCount: number): string {\n const parts = [BASE_DESCRIPTION];\n\n if (operationCount > 0) {\n parts.push(\n `Every federation operation exposed to the CLI is a command (${operationCount} available),\\n` +\n 'grouped under the service that serves it. Account and company operations stay at the top level:\\n' +\n ' sl operations List them all\\n' +\n ' sl operations --search organization\\n' +\n ' sl <service> <operation> --help Flags for one operation',\n );\n\n parts.push('Examples:\\n' + ' sl companies\\n' + ' sl atlas find-organizations --help\\n' + ' sl config show');\n }\n\n return parts.join('\\n\\n');\n}\n\nconst program = new Command()\n .name('sl')\n .configureOutput({\n writeOut: (str) => process.stdout.write(colorizeHelp(str)),\n writeErr: (str) => process.stderr.write(colorizeHelp(str)),\n })\n .description(BASE_DESCRIPTION)\n .version(pkg.version)\n .option('--endpoint <url>', 'Override the federation endpoint URL')\n .option('--company <slug|id>', 'Act for this company, by slug or id; must be one you belong to')\n .option('--json', 'Output as JSON (auto-enabled when stdout is not a TTY)')\n .option('--no-color', 'Disable colored output');\n\n// Auth commands (hand-written — interactive flows)\nprogram.addCommand(loginCommand);\nprogram.addCommand(logoutCommand);\nprogram.addCommand(whoamiCommand);\nprogram.addCommand(tokenCommand);\nprogram.addCommand(useCommand);\nprogram.addCommand(configCommand);\n\n// Schema refresh command\nconst schemaCommand = new Command('schema').description('Manage the cached GraphQL schema');\n\nschemaCommand\n .command('refresh')\n .description('Force-refresh the cached schema from the federation endpoint')\n .action(async function (this: Command) {\n const opts = this.optsWithGlobals();\n try {\n await refreshSchema(opts.endpoint);\n info('Schema refreshed successfully.');\n } catch (err) {\n error(`Failed to refresh schema: ${(err as Error).message}`);\n hint('Check your network connection and endpoint: sl config show');\n process.exit(1);\n }\n });\n\nschemaCommand\n .command('inspect <type>')\n .description('Show the fields/values of a schema type (e.g. an input filter or enum)')\n .action(async function (this: Command, typeName: string) {\n const opts = this.optsWithGlobals();\n try {\n const { schema } = await getIntrospectedSchema(opts.endpoint);\n const formatted = formatTypeInspection(schema, typeName);\n if (!formatted) {\n error(`No type named \"${typeName}\" in the schema.`);\n hint('Type names are case-sensitive, e.g. `sl schema inspect OrganizationFilterInput`.');\n hint('Find argument types in any command’s --help output.');\n process.exit(1);\n }\n info(formatted);\n } catch (err) {\n error(`Could not read the schema: ${(err as Error).message}`);\n hint('Check your network connection and endpoint: sl config show');\n process.exit(1);\n }\n });\n\nprogram.addCommand(schemaCommand);\n\n// Parse --endpoint early so introspection uses the right URL\nconst endpointIdx = process.argv.indexOf('--endpoint');\nconst endpointOverride = endpointIdx !== -1 ? process.argv[endpointIdx + 1] : undefined;\n\ntry {\n const { schema, fieldServices } = await getIntrospectedSchema(endpointOverride);\n const operations = buildOperationCommands(schema, fieldServices);\n const { topLevel, services } = groupOperationCommands(operations);\n\n for (const command of topLevel) {\n program.addCommand(command, { hidden: true });\n }\n for (const command of services) {\n program.addCommand(command);\n }\n\n const operationsCommand = new Command('operations')\n .summary('List every federation operation available as a command')\n .option('--search <text>', 'Filter by operation or subgraph name')\n .action(function (this: Command) {\n info(formatOperationList(operations, this.opts().search as string | undefined));\n });\n\n program.addCommand(operationsCommand);\n program.description(buildRootDescription(operations.length));\n} catch (err) {\n // Schema fetch failed — the hand-written commands must still work.\n const message = (err as Error).message;\n const offline = ['login', 'logout', 'config', 'token', 'whoami', 'schema'];\n if (!process.argv.some((a) => offline.includes(a))) {\n error(`Could not fetch schema: ${message}`);\n hint('Check your network connection and endpoint: sl config show');\n hint('You can still use: sl login, sl config, sl schema refresh');\n process.exit(1);\n }\n}\n\napplyColorToAllCommands(program);\n\nawait checkForUpdates();\n\ntry {\n await program.parseAsync(process.argv);\n} catch (err) {\n captureException(err);\n await flushSentry();\n throw err;\n}\n\nawait flushSentry();\n","import { Command } from 'commander';\n\nimport { clearApplicationSession } from '../lib/application-session.ts';\nimport { clearCredentials, clearElevatedCredentials } from '../lib/auth.ts';\nimport { loadConfig, resetConfig, saveConfig } from '../lib/config.ts';\nimport { isLocalDev } from '../lib/env.ts';\nimport { error, hint, info, isJsonMode, printJson, success } from '../lib/output.ts';\n\n// The token endpoint is a different host from the federation endpoint in every\n// environment, so it cannot be derived — switching environments has to move both\n// or an application credential keeps being exchanged against the previous one.\nexport const ENVIRONMENTS = [\n {\n name: 'production',\n label: 'federation.sortlist.com',\n endpoint: 'https://federation.sortlist.com/graphql',\n tokenEndpoint: 'https://hermes.sortlist.com/oauth/token',\n },\n {\n name: 'staging',\n label: 'federation.sortlist-test.com',\n endpoint: 'https://federation.sortlist-test.com/graphql',\n tokenEndpoint: 'https://hermes.sortlist-test.com/oauth/token',\n },\n {\n name: 'local',\n label: 'localhost:4020',\n endpoint: 'http://localhost:4020/graphql',\n tokenEndpoint: 'http://localhost:8003/oauth/token',\n },\n] as const;\n\nexport const configCommand = new Command('config')\n .summary('View or update CLI configuration')\n .description(\n 'View or update CLI configuration\\n\\n' +\n 'Manage your company context and credentials.\\n\\n' +\n 'Examples:\\n' +\n ' sl config show See current endpoint and company\\n' +\n ' sl config set company <slug|id> Act for that company on every command\\n' +\n (isLocalDev ? ' sl config set endpoint <url> Point to a custom endpoint\\n' : '') +\n ' sl config reset Clear all config and credentials',\n );\n\nconfigCommand\n .command('show')\n .description('Show current configuration')\n .action(function (this: Command) {\n const opts = this.optsWithGlobals();\n const config = loadConfig();\n if (isJsonMode(opts)) {\n printJson(config);\n } else {\n info(`Endpoint: ${config.endpoint}`);\n if (config.tokenEndpoint) info(`Token endpoint: ${config.tokenEndpoint}`);\n if (config.company) info(`Company: ${config.company}`);\n }\n });\n\n// `endpoint` is dev-only — published builds always target production, so the\n// endpoint must not be overridable there (mirrors the gated use-* commands).\nconst SETTABLE_KEYS = [...(isLocalDev ? ['endpoint'] : []), 'company', 'tokenEndpoint'];\n\nconfigCommand\n .command('set <key> <value>')\n .description(`Set a config value (${SETTABLE_KEYS.join(', ')})`)\n .action((key: string, value: string) => {\n if (!SETTABLE_KEYS.includes(key)) {\n error(`Unknown config key: \"${key}\".`);\n info('');\n info(' Allowed keys:');\n for (const k of SETTABLE_KEYS) {\n info(` ${k}`);\n }\n hint('Usage: sl config set <key> <value>');\n process.exit(1);\n }\n saveConfig({ [key]: value });\n success(`Set ${key} = ${value}`);\n });\n\nif (isLocalDev) {\n for (const environment of ENVIRONMENTS) {\n configCommand\n .command(`use-${environment.name}`)\n .description(`Point CLI to ${environment.name} (${environment.label})`)\n .action(() => {\n saveConfig({ endpoint: environment.endpoint, tokenEndpoint: environment.tokenEndpoint });\n success(`Endpoint set to ${environment.endpoint}`);\n info(`Token endpoint set to ${environment.tokenEndpoint}`);\n hint(`Run \\`sl login\\` to authenticate against ${environment.name}.`);\n });\n }\n}\n\nconfigCommand\n .command('reset')\n .description('Reset all config and credentials')\n .action(() => {\n resetConfig();\n clearCredentials();\n clearElevatedCredentials();\n clearApplicationSession();\n success('Config, credentials and any application session cleared.');\n hint('Run `sl login` to re-authenticate.');\n });\n","import fs from 'node:fs';\nimport os from 'node:os';\nimport path from 'node:path';\n\n/**\n * A token minted for an application, held for the life of one CLI session.\n *\n * The credential behind it is revoked the moment the token is issued, so what\n * sits on disk cannot mint anything — it is a bearer token that expires, exactly\n * like the human one beside it. Nothing here is long-lived.\n */\nconst SESSION_PATH = path.join(os.homedir(), '.sortlist', 'application-session.json');\n\nexport interface ApplicationSession {\n accessToken: string;\n applicationId: string;\n expiresAt: number;\n}\n\nexport function loadApplicationSession(): ApplicationSession | null {\n try {\n const session: ApplicationSession = JSON.parse(fs.readFileSync(SESSION_PATH, 'utf-8'));\n if (Date.now() >= session.expiresAt) return null;\n\n return session;\n } catch {\n return null;\n }\n}\n\nexport function saveApplicationSession(session: ApplicationSession): void {\n fs.mkdirSync(path.dirname(SESSION_PATH), { recursive: true });\n fs.writeFileSync(SESSION_PATH, JSON.stringify(session, null, 2) + '\\n', { mode: 0o600 });\n}\n\nexport function clearApplicationSession(): boolean {\n try {\n fs.unlinkSync(SESSION_PATH);\n return true;\n } catch {\n return false;\n }\n}\n\n/** True when a session file exists but its token has run out. */\nexport function applicationSessionExpired(): boolean {\n return fs.existsSync(SESSION_PATH) && loadApplicationSession() === null;\n}\n\n/**\n * True when the CLI is authenticating as an application rather than as a person.\n *\n * Worth asking before explaining a refusal: Hermes rejects the tokens it mints on\n * its own management API, so `companies`, `applications` and every `create*`\n * mutation fail while an application credential is in play — and the router\n * flattens that refusal to \"Unexpected error\", which explains nothing.\n */\nexport function actingAsApplication(): boolean {\n if (process.env.SORTLIST_CLIENT_ID && process.env.SORTLIST_CLIENT_SECRET) return true;\n\n return loadApplicationSession() !== null;\n}\n","import fs from 'fs';\nimport os from 'os';\nimport path from 'path';\n\nimport { error, hint } from './output.ts';\n\nconst CREDENTIALS_PATH = path.join(os.homedir(), '.sortlist', 'credentials.json');\nconst ELEVATED_CREDENTIALS_PATH = path.join(os.homedir(), '.sortlist', 'elevated-credentials.json');\n\nexport const ELEVATION_MAX_SECONDS = 30 * 60;\n\nexport interface Credentials {\n accessToken: string;\n refreshToken: string;\n idToken: string;\n expiresAt: number;\n}\n\nexport type ElevationLevel = 'sales' | 'admin' | 'superadmin';\n\nexport interface ElevatedCredentials {\n accessToken: string;\n expiresAt: number;\n level: ElevationLevel;\n}\n\nfunction ensureDir(): void {\n const dir = path.dirname(CREDENTIALS_PATH);\n if (!fs.existsSync(dir)) {\n fs.mkdirSync(dir, { recursive: true });\n }\n}\n\nexport function saveCredentials(creds: Credentials): void {\n ensureDir();\n fs.writeFileSync(CREDENTIALS_PATH, JSON.stringify(creds, null, 2) + '\\n', { mode: 0o600 });\n}\n\nexport function loadCredentials(): Credentials | null {\n try {\n const raw = fs.readFileSync(CREDENTIALS_PATH, 'utf-8');\n return JSON.parse(raw) as Credentials;\n } catch {\n return null;\n }\n}\n\nexport function clearCredentials(): void {\n try {\n fs.unlinkSync(CREDENTIALS_PATH);\n } catch {\n // already gone\n }\n}\n\nexport function isExpired(creds: Pick<Credentials, 'expiresAt'>): boolean {\n // 60s buffer before actual expiry\n return Date.now() >= (creds.expiresAt - 60) * 1000;\n}\n\nexport function saveElevatedCredentials(\n accessToken: string,\n expiresIn: number,\n level: ElevationLevel,\n): ElevatedCredentials {\n const creds: ElevatedCredentials = {\n accessToken,\n expiresAt: Math.floor(Date.now() / 1000) + Math.min(expiresIn, ELEVATION_MAX_SECONDS),\n level,\n };\n ensureDir();\n fs.writeFileSync(ELEVATED_CREDENTIALS_PATH, JSON.stringify(creds, null, 2) + '\\n', { mode: 0o600 });\n\n return creds;\n}\n\nexport function loadElevatedCredentials(): ElevatedCredentials | null {\n let creds: ElevatedCredentials;\n try {\n creds = JSON.parse(fs.readFileSync(ELEVATED_CREDENTIALS_PATH, 'utf-8'));\n } catch {\n return null;\n }\n\n if (isExpired(creds)) {\n clearElevatedCredentials();\n return null;\n }\n\n return creds;\n}\n\nexport function clearElevatedCredentials(): boolean {\n try {\n fs.unlinkSync(ELEVATED_CREDENTIALS_PATH);\n return true;\n } catch {\n return false;\n }\n}\n\nexport function storedUserAccessToken(): string | null {\n return loadElevatedCredentials()?.accessToken ?? loadCredentials()?.accessToken ?? null;\n}\n\nexport function ensureAuthenticated(): Credentials {\n const creds = loadCredentials();\n if (!creds) {\n error('You are not logged in.');\n hint('Run `sl login` to authenticate with your Sortlist account.');\n process.exit(2);\n }\n return creds;\n}\n","// ── Color helpers (respect --no-color / NO_COLOR) ──\n\nfunction colorEnabled(): boolean {\n return process.stderr.isTTY === true && !process.env.NO_COLOR;\n}\n\nconst ansi = {\n reset: '\\x1b[0m',\n dim: '\\x1b[2m',\n red: '\\x1b[31m',\n green: '\\x1b[32m',\n yellow: '\\x1b[33m',\n};\n\nfunction c(code: keyof typeof ansi, text: string): string {\n if (!colorEnabled()) return text;\n return `${ansi[code]}${text}${ansi.reset}`;\n}\n\n// ── JSON mode detection ──\n\nexport function isJsonMode(options: { json?: boolean }): boolean {\n if (options.json) return true;\n return !process.stdout.isTTY;\n}\n\nexport function printJson(data: unknown): void {\n process.stdout.write(JSON.stringify(data, null, 2) + '\\n');\n}\n\n// ── Message helpers ──\n// Every function uses a text prefix so status is conveyed independent of color.\n// Color is enhancement only — never the sole status indicator.\n\n/** General informational message (no prefix). */\nexport function info(msg: string): void {\n process.stderr.write(`${msg}\\n`);\n}\n\n/** Success: confirms an outcome. Use after a completed action. */\nexport function success(msg: string): void {\n process.stderr.write(`${c('green', '\\u2713')} ${msg}\\n`);\n}\n\n/** Warning: something is off but not fatal. */\nexport function warn(msg: string): void {\n process.stderr.write(`${c('yellow', '\\u26A0')} ${msg}\\n`);\n}\n\n/** Error: state what failed, why, and what to do next. */\nexport function error(msg: string): void {\n process.stderr.write(`${c('red', '\\u2717')} Error: ${msg}\\n`);\n}\n\n/** Hint: suggest a next step or recovery action. Indented for readability. */\nexport function hint(msg: string): void {\n process.stderr.write(`${c('dim', ' ' + msg)}\\n`);\n}\n","import fs from 'fs';\nimport os from 'os';\nimport path from 'path';\n\nconst SORTLIST_DIR = path.join(os.homedir(), '.sortlist');\nconst CONFIG_PATH = path.join(SORTLIST_DIR, 'config.json');\n\nexport interface CliConfig {\n endpoint: string;\n /** The company every request acts for: its id or its slug. */\n company?: string;\n /**\n * Hermes' OAuth token endpoint, used for unattended runs with an application\n * credential. A different host from the federation endpoint.\n */\n tokenEndpoint?: string;\n}\n\nconst DEFAULT_CONFIG: CliConfig = {\n endpoint: 'https://federation.sortlist.com/graphql',\n};\n\nfunction ensureDir(): void {\n if (!fs.existsSync(SORTLIST_DIR)) {\n fs.mkdirSync(SORTLIST_DIR, { recursive: true });\n }\n}\n\nexport function loadConfig(): CliConfig {\n try {\n const raw = fs.readFileSync(CONFIG_PATH, 'utf-8');\n return { ...DEFAULT_CONFIG, ...JSON.parse(raw) };\n } catch {\n return { ...DEFAULT_CONFIG };\n }\n}\n\nexport function saveConfig(config: Partial<CliConfig>): void {\n ensureDir();\n const current = loadConfig();\n const merged = { ...current, ...config };\n fs.writeFileSync(CONFIG_PATH, JSON.stringify(merged, null, 2) + '\\n');\n}\n\nexport function resetConfig(): void {\n try {\n fs.unlinkSync(CONFIG_PATH);\n } catch {\n // already gone\n }\n}\n\n/**\n * Drops the cached identity (user + company/agency context) while preserving\n * non-identity settings like the endpoint. Used by `logout` so the next login\n * can't surface the previous account's user and company.\n */\n/**\n * Forgets who you were, keeping where you point.\n *\n * `endpoint` and `tokenEndpoint` describe an environment, not an identity — an\n * earlier version kept only the first, so logging out silently discarded the\n * token endpoint and the next `sl use application` failed on a missing setting\n * nobody remembered unsetting.\n */\nexport function clearIdentity(): void {\n const { endpoint, tokenEndpoint } = loadConfig();\n ensureDir();\n const kept: Partial<CliConfig> = { endpoint };\n if (tokenEndpoint) kept.tokenEndpoint = tokenEndpoint;\n fs.writeFileSync(CONFIG_PATH, JSON.stringify(kept, null, 2) + '\\n');\n}\n\nexport function getEndpoint(override?: string): string {\n if (override) return override;\n if (process.env.SL_ENDPOINT) return process.env.SL_ENDPOINT;\n return loadConfig().endpoint;\n}\n\n/**\n * Context variables that are auto-injected into generated commands.\n * These are read from config and can be overridden via CLI flags.\n */\nexport interface UserContext {\n company?: string;\n}\n\nexport function getUserContext(): UserContext {\n const config = loadConfig();\n return { company: config.company };\n}\n","import fs from 'node:fs';\nimport path from 'node:path';\n\nimport { packageRoot } from './package-root.ts';\n\n/**\n * Whether the CLI is running from the platform monorepo (dev checkout)\n * vs a globally-installed npm package.\n *\n * Published builds contain a `.published` sentinel file stamped by CI.\n * Its absence means we're running from source.\n */\nexport const isLocalDev = !fs.existsSync(path.join(packageRoot, '.published'));\n","import fs from 'node:fs';\nimport path from 'node:path';\nimport { fileURLToPath } from 'node:url';\n\n/**\n * Locate the @sortlist/cli package root by walking up from this module.\n * Relative `import.meta.url` paths break once the source is bundled into\n * dist/, so root-relative files (.published, package.json) must be resolved\n * through this instead.\n */\nfunction findPackageRoot(): string {\n let dir = path.dirname(fileURLToPath(import.meta.url));\n while (true) {\n const pkgPath = path.join(dir, 'package.json');\n if (fs.existsSync(pkgPath)) {\n try {\n const parsed = JSON.parse(fs.readFileSync(pkgPath, 'utf-8')) as { name?: string };\n if (parsed.name === '@sortlist/cli') return dir;\n } catch {\n // unreadable package.json — keep walking\n }\n }\n const parent = path.dirname(dir);\n if (parent === dir) throw new Error('Could not locate the @sortlist/cli package root');\n dir = parent;\n }\n}\n\nexport const packageRoot = findPackageRoot();\n\nexport const pkg = JSON.parse(fs.readFileSync(path.join(packageRoot, 'package.json'), 'utf-8')) as {\n name: string;\n version: string;\n};\n","/**\n * Dynamic command registration.\n *\n * Derives service grouping from the `@join__field(graph: ...)` directives\n * that the router injects into introspection responses, then builds\n * Commander.js commands at runtime.\n */\nimport { randomUUID } from 'node:crypto';\nimport { Command, Option } from 'commander';\nimport {\n isEnumType,\n isInputObjectType,\n isInterfaceType,\n isListType,\n isNonNullType,\n isObjectType,\n isScalarType,\n isUnionType,\n type GraphQLArgument,\n type GraphQLEnumType,\n type GraphQLField,\n type GraphQLInputObjectType,\n type GraphQLInputType,\n type GraphQLNamedType,\n type GraphQLObjectType,\n type GraphQLOutputType,\n type GraphQLSchema,\n} from 'graphql';\n\nimport { graphqlRaw, graphqlSubscribe } from '../graphql/client.ts';\nimport { type FieldServiceMap } from '../graphql/introspection.ts';\nimport { buildQuery, rootTypeOf, UnknownFieldError, type OperationKind } from '../graphql/query-builder.ts';\nimport { actingAsApplication } from '../lib/application-session.ts';\nimport { personalCompanyId, resolveCompanyId } from '../lib/company.ts';\nimport { getUserContext } from '../lib/config.ts';\nimport { error, hint, info, isJsonMode, printJson, warn } from '../lib/output.ts';\nimport { formatResult } from '../lib/render.ts';\n\n// Context fields that are auto-injected from ~/.sortlist/config.json.\n// Schema field names (key) → UserContext property (value). The CLI is\n// company-scoped; marketplace fields like `agencyId` are NOT auto-filled\n// (Agency and Company are independent entities) and must be passed\n// explicitly via `--agency-id`.\n// Only `companyId`. An identifier naming *somebody else* must never come from the\n// caller's own context: filling the old `oauthId` argument that way made\n// `sl invite-company-member` silently invite the caller to their own company.\nconst CONTEXT_FIELDS: Record<string, string> = {\n companyId: 'companyId',\n};\n\n// Fields to skip — internal relay/federation helpers\nconst SKIP_FIELDS = new Set(['node', 'nodes', 'id', '_entities', '_service']);\n\nfunction unwrap(type: GraphQLOutputType | GraphQLInputType): GraphQLNamedType {\n if (isNonNullType(type)) return unwrap(type.ofType as GraphQLOutputType | GraphQLInputType);\n if (isListType(type)) return unwrap(type.ofType as GraphQLOutputType | GraphQLInputType);\n return type as GraphQLNamedType;\n}\n\nconst RESERVED_FLAGS = new Set(['version', 'help', 'endpoint', 'company', 'json', 'color', 'no-color']);\n\nexport function flagNameFor(fieldName: string, argName: string): string {\n const name = kebab(argName);\n return RESERVED_FLAGS.has(name) ? `${kebab(fieldName)}-${name}` : name;\n}\n\nfunction optionKey(flagName: string): string {\n return flagName.replace(/-([a-z0-9])/g, (_, letter: string) => letter.toUpperCase());\n}\n\nfunction kebab(s: string): string {\n return s.replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase();\n}\n\n/**\n * For mutations with a single `input` argument of an Input type,\n * return the fields of that input type for flattening into CLI options.\n */\ninterface CliArg {\n name: string;\n type: GraphQLArgument['type'];\n required: boolean;\n description?: string | null;\n}\n\nfunction getInputFields(field: GraphQLField<unknown, unknown>): CliArg[] | null {\n if (field.args.length !== 1) return null;\n const arg = field.args[0];\n if (arg.name !== 'input') return null;\n const argType = unwrap(arg.type);\n if (!argType || !isInputObjectType(argType)) return null;\n const fields = argType.getFields();\n return Object.entries(fields).map(([name, f]) => ({\n name,\n type: f.type,\n required: isNonNullType(f.type),\n description: f.description,\n }));\n}\n\n/**\n * Render a GraphQL type as its SDL signature, e.g. `String!`,\n * `[OrganizationSortInput!]`, `OrganizationFilterInput`. Works for both input\n * and output types (the wrapper structure is identical).\n */\nfunction renderType(type: GraphQLInputType | GraphQLOutputType): string {\n if (isNonNullType(type)) return `${renderType(type.ofType as GraphQLInputType | GraphQLOutputType)}!`;\n if (isListType(type)) return `[${renderType(type.ofType as GraphQLInputType | GraphQLOutputType)}]`;\n return (type as GraphQLNamedType).name;\n}\n\n/**\n * A \"structured\" arg is one that must be supplied as JSON on the CLI and parsed\n * (rather than passed through as a raw string): lists and input objects. Plain\n * leaf scalars and enums are passed as raw strings — including when wrapped in\n * non-null (`String!` is still a bare string on the CLI). The non-null wrapper\n * is transparent for this decision; a list at any level means JSON.\n */\nfunction isStructuredInput(type: GraphQLInputType): boolean {\n if (isNonNullType(type)) return isStructuredInput(type.ofType as GraphQLInputType);\n if (isListType(type)) return true;\n return isInputObjectType(type);\n}\n\n/**\n * Coerce a raw CLI string into the value GraphQL expects for the arg's type.\n * Leaf scalars are parsed by name; structured types (input objects, lists,\n * enums) are parsed as JSON. Throws a readable error on malformed JSON so the\n * action can surface it instead of silently sending a bad string.\n */\n/** `[Enum!]` however it is wrapped: the one structured input a person can type by hand. */\nfunction enumListOf(type: GraphQLInputType): GraphQLEnumType | null {\n const listless = isNonNullType(type) ? type.ofType : type;\n if (!isListType(listless)) return null;\n const inner = unwrap(listless.ofType as GraphQLInputType);\n return isEnumType(inner) ? (inner as GraphQLEnumType) : null;\n}\n\nfunction enumOf(type: GraphQLInputType): GraphQLEnumType | null {\n const listless = isNonNullType(type) ? (type.ofType as GraphQLInputType) : type;\n if (isListType(listless)) return null;\n return isEnumType(listless) ? (listless as GraphQLEnumType) : null;\n}\n\nfunction commonPrefix(values: string[]): string {\n if (values.length < 2) return '';\n let prefix = values[0];\n for (const value of values) while (!value.startsWith(prefix)) prefix = prefix.slice(0, -1);\n const cut = prefix.lastIndexOf('_');\n return cut === -1 ? '' : prefix.slice(0, cut + 1);\n}\n\nfunction matchEnumValue(part: string, names: string[], prefix: string): string | undefined {\n const wanted = part\n .trim()\n .replace(/([a-z0-9])([A-Z])/g, '$1_$2')\n .toUpperCase();\n return names.find((name) => name === wanted || name === `${prefix}${wanted}`);\n}\n\nfunction spellableValues(names: string[], prefix: string): string[] {\n return names.map((name) =>\n name\n .slice(prefix.length)\n .toLowerCase()\n .replace(/_([a-z])/g, (_, letter: string) => letter.toUpperCase()),\n );\n}\n\n/**\n * `emailAddress,phone`, `all` or `none` for an enum list, so a caller never types JSON\n * for a handful of known names. Case-insensitive, camelCase reads as SNAKE_CASE\n * so a value can be spelt like the field it stands for, and a prefix every value\n * shares (`CONTACT_`) may be left out. A value starting with `[` is still JSON.\n */\nexport function coerceEnumList(raw: string, enumType: GraphQLEnumType, flagName: string): string[] {\n const names = enumType.getValues().map((value) => value.name);\n if (raw.trim() === 'all') return names;\n if (raw.trim() === 'none') return [];\n\n const prefix = commonPrefix(names);\n return raw\n .split(',')\n .filter((part) => part.trim() !== '')\n .map((part) => {\n const match = matchEnumValue(part, names, prefix);\n if (match === undefined) {\n throw new Error(\n `--${flagName} does not know \"${part.trim()}\". ` +\n `One or more of: ${spellableValues(names, prefix).join(', ')}, all, or none.`,\n );\n }\n return match;\n });\n}\n\nexport function coerceEnum(raw: string, enumType: GraphQLEnumType, flagName: string): string {\n const names = enumType.getValues().map((value) => value.name);\n const prefix = commonPrefix(names);\n const match = matchEnumValue(raw, names, prefix);\n if (match === undefined) {\n throw new Error(\n `--${flagName} does not know \"${raw.trim()}\". One of: ${spellableValues(names, prefix).join(', ')}.`,\n );\n }\n return match;\n}\n\nexport function coerceValue(raw: string, type: GraphQLInputType, flagName: string): unknown {\n const enumList = enumListOf(type);\n if (enumList && !raw.trim().startsWith('[')) return coerceEnumList(raw, enumList, flagName);\n\n const enumValue = enumOf(type);\n if (enumValue) return coerceEnum(raw, enumValue, flagName);\n\n if (isStructuredInput(type)) {\n try {\n return JSON.parse(raw);\n } catch (parseError) {\n throw new Error(\n `--${flagName} expects JSON for type ${renderType(type)}, but the value could not be parsed: ` +\n `${(parseError as Error).message}`,\n );\n }\n }\n\n const typeName = unwrap(type).name;\n if (typeName === 'Int') {\n const parsed = parseInt(raw, 10);\n if (Number.isNaN(parsed)) throw new Error(`--${flagName} expects an integer, got \"${raw}\".`);\n return parsed;\n }\n if (typeName === 'Float') {\n const parsed = parseFloat(raw);\n if (Number.isNaN(parsed)) throw new Error(`--${flagName} expects a number, got \"${raw}\".`);\n return parsed;\n }\n if (typeName === 'Boolean') {\n if (raw !== 'true' && raw !== 'false') {\n throw new Error(`--${flagName} expects \"true\" or \"false\", got \"${raw}\".`);\n }\n return raw === 'true';\n }\n return raw;\n}\n\n/**\n * One-line summary of an input-object or enum type's shape, used in option\n * help so callers know what JSON to pass without a separate introspection\n * round-trip. Expands a single level: `{ industry: StringFilterInput, country:\n * String, ... }` for input objects, `one of: A | B | C` for enums.\n */\nfunction describeStructuredType(named: GraphQLNamedType): string | null {\n if (isInputObjectType(named)) {\n const fields = Object.values((named as GraphQLInputObjectType).getFields());\n const parts = fields.map((f) => `${f.name}: ${renderType(f.type)}`);\n return `{ ${parts.join(', ')} }`;\n }\n if (isEnumType(named)) {\n const values = (named as GraphQLEnumType).getValues().map((v) => v.name);\n return `one of: ${values.join(' | ')}`;\n }\n return null;\n}\n\n/** A named type worth pointing the user at via `sl schema inspect` — i.e. one with structure. */\nfunction isInspectable(named: GraphQLNamedType): boolean {\n return isInputObjectType(named) || isEnumType(named) || isObjectType(named);\n}\n\nfunction oneLineDescription(text: string | null | undefined): string {\n return (text ?? '').replace(/\\s+/g, ' ').trim();\n}\n\n/**\n * Render a full, human-readable description of a named type for\n * `sl schema inspect <Type>`: its kind, description, and one level of\n * structure (object/input fields with their types + descriptions, or enum\n * values). Nested structured types are named so the caller can `inspect` them\n * in turn. Returns null if the type does not exist in the schema.\n */\nexport function formatTypeInspection(schema: GraphQLSchema, typeName: string): string | null {\n const named = schema.getType(typeName);\n if (!named) return null;\n\n const lines: string[] = [];\n const suffix = oneLineDescription(named.description);\n const header = (kind: string): string => {\n const label = kind ? `${kind} ${named.name}` : named.name;\n return suffix ? `${label} — ${suffix}` : label;\n };\n\n const pushFields = (entries: Array<{ name: string; typeSig: string; description?: string | null }>): void => {\n const width = Math.max(...entries.map((entry) => `${entry.name}: ${entry.typeSig}`.length), 0);\n for (const entry of entries) {\n const signature = `${entry.name}: ${entry.typeSig}`;\n const note = oneLineDescription(entry.description);\n lines.push(note ? ` ${signature.padEnd(width)} ${note}` : ` ${signature}`);\n }\n };\n\n if (isInputObjectType(named) || isObjectType(named)) {\n lines.push(header(isInputObjectType(named) ? 'input' : 'type'));\n pushFields(\n Object.values(named.getFields()).map((f) => ({\n name: f.name,\n typeSig: renderType(f.type),\n description: f.description,\n })),\n );\n } else if (isEnumType(named)) {\n lines.push(header('enum'));\n for (const value of named.getValues()) {\n const note = oneLineDescription(value.description);\n lines.push(note ? ` ${value.name.padEnd(20)} ${note}` : ` ${value.name}`);\n }\n } else if (isScalarType(named)) {\n lines.push(header('scalar'));\n lines.push(' (scalar — pass a plain value)');\n } else {\n lines.push(header(''));\n }\n\n // Point the caller at the nested types they can drill into next.\n const nested = new Set<string>();\n if (isInputObjectType(named) || isObjectType(named)) {\n for (const field of Object.values(named.getFields())) {\n const fieldType = unwrap(field.type);\n if (isInspectable(fieldType) && fieldType.name !== named.name) nested.add(fieldType.name);\n }\n }\n if (nested.size > 0) {\n lines.push('');\n lines.push(\n `Inspect nested types: ${[...nested]\n .sort()\n .map((n) => `sl schema inspect ${n}`)\n .join(', ')}`,\n );\n }\n\n return lines.join('\\n');\n}\n\n/**\n * Build the help description for a single CLI option from its GraphQL arg:\n * the field description (if any), the rendered type with a `(JSON)` marker for\n * structured inputs, and a one-level shape hint (input-object fields or enum\n * values) so callers know what to pass without a separate introspection step.\n */\nfunction describeArg(arg: { name: string; type: GraphQLInputType; description?: string | null }): string {\n const parts: string[] = [];\n if (arg.description) parts.push(arg.description.replace(/\\s+/g, ' ').trim());\n\n const typeSig = renderType(arg.type);\n const enumList = enumListOf(arg.type);\n parts.push(\n enumList\n ? `${typeSig} (comma-separated, all, or none)`\n : isStructuredInput(arg.type)\n ? `${typeSig} (JSON)`\n : typeSig,\n );\n\n // Shape hint applies to enums (raw string) and input objects (JSON) alike.\n const named = unwrap(arg.type);\n const shape = describeStructuredType(named);\n if (shape) parts.push(shape);\n\n // Point at `schema inspect` so nested input/enum types can be drilled into\n // without resorting to raw introspection.\n if (isInputObjectType(named) || isEnumType(named)) {\n parts.push(`details: sl schema inspect ${named.name}`);\n }\n\n return parts.join(' — ');\n}\n\nconst DEFAULT_SUBSCRIPTION_TIMEOUT_SECONDS = 300;\nconst DEFAULT_WAIT_SECONDS = 120;\nconst TIMED_OUT_EXIT_CODE = 5;\n\nexport function supersededBy(\n field: GraphQLField<unknown, unknown>,\n siblings: Record<string, GraphQLField<unknown, unknown>>,\n): string | null {\n const replacement = field.deprecationReason?.match(/`(\\w+)`/)?.[1];\n if (!replacement || SKIP_FIELDS.has(replacement)) return null;\n\n const sibling = siblings[replacement];\n return sibling && !sibling.deprecationReason ? replacement : null;\n}\n\nfunction hasExternalId(field: GraphQLField<unknown, unknown>): boolean {\n const args = getInputFields(field) ?? field.args;\n return args.some((a) => a.name === 'externalId');\n}\n\nexport function resultSubscriptions(schema: GraphQLSchema): Map<string, string> {\n const pairs = new Map<string, string>();\n const mutations = schema.getMutationType()?.getFields() ?? {};\n\n for (const [name, field] of Object.entries(schema.getSubscriptionType()?.getFields() ?? {})) {\n const mutation = field.description?.match(/(?:result|outcome) of an? `(\\w+)` call/)?.[1];\n if (!mutation || !mutations[mutation]) continue;\n if (!field.args.some((a) => a.name === 'externalId') || !hasExternalId(mutations[mutation])) continue;\n pairs.set(mutation, name);\n }\n\n return pairs;\n}\n\nfunction isRecord(value: unknown): value is Record<string, unknown> {\n return typeof value === 'object' && value !== null;\n}\n\nexport function isStillFilling(result: unknown): boolean {\n return isRecord(result) && result.status === 'FILLING';\n}\n\nconst PAGE_STATUS_FIELD = 'status';\n\nexport function deliversFillingPages(schema: GraphQLSchema, subscriptionName: string): boolean {\n const field = schema.getSubscriptionType()?.getFields()[subscriptionName];\n const returnType = field ? unwrap(field.type) : null;\n const status = returnType && isObjectType(returnType) ? returnType.getFields()[PAGE_STATUS_FIELD] : undefined;\n const statusType = status ? unwrap(status.type) : null;\n return Boolean(statusType && isEnumType(statusType) && statusType.getValue('FILLING'));\n}\n\nfunction shellWord(value: string): string {\n if (/^[\\w.:/@=+-]+$/.test(value)) return value;\n return \"'\" + value.replace(/'/g, \"'\\\\''\") + \"'\";\n}\n\nfunction nextPageCursor(result: unknown): string | null {\n if (!isRecord(result)) return null;\n for (const value of Object.values(result)) {\n const pageInfo = isRecord(value) && isRecord(value.pageInfo) ? value.pageInfo : null;\n if (pageInfo?.hasNextPage === true && typeof pageInfo.endCursor === 'string') return pageInfo.endCursor;\n }\n return null;\n}\n\nexport function nextPageHint(\n commandName: string,\n externalId: string,\n page: Record<string, unknown> | undefined,\n result: unknown,\n): string | null {\n const cursor = nextPageCursor(result);\n if (!cursor) return null;\n\n const nextPage = JSON.stringify({ ...(page ?? {}), after: cursor });\n return `Next page: sl ${commandName} --external-id ${shellWord(externalId)} --page ${shellWord(nextPage)} --wait`;\n}\n\nfunction printResult(fieldName: string, result: unknown, opts: Record<string, unknown>): void {\n if (result == null) {\n if (actingAsApplication()) {\n info(`${fieldName} answers for people, and you are acting as an application.`);\n hint('`sl whoami` reports what the token identifies; `sl use me` switches back.');\n } else {\n warn('No results returned.');\n hint('The query succeeded but the server returned null.');\n hint('Try different arguments or check that the resource exists.');\n }\n } else if (isJsonMode(opts)) {\n printJson(result);\n } else {\n const rendered = formatResult(result);\n if (rendered !== null) info(rendered);\n }\n}\n\nfunction secondsOption(raw: unknown, fallback: number, flag: string): number {\n if (raw === undefined) return fallback;\n const seconds = Number(raw);\n if (!Number.isFinite(seconds) || seconds <= 0) {\n error(`${flag} takes a number of seconds, not \"${String(raw)}\".`);\n process.exit(2);\n }\n return seconds;\n}\n\nasync function listen(\n query: string,\n variables: Record<string, unknown>,\n requestOptions: Parameters<typeof graphqlSubscribe>[2],\n seconds: number,\n): Promise<{ events: AsyncGenerator<Record<string, unknown>>; stop: () => void; timedOut: () => boolean }> {\n const controller = new AbortController();\n let expired = false;\n const timer = setTimeout(() => {\n expired = true;\n controller.abort();\n }, seconds * 1000);\n const open = () => graphqlSubscribe(query, variables, { ...requestOptions, signal: controller.signal });\n const first = await open();\n\n async function* events(): AsyncGenerator<Record<string, unknown>> {\n let current = first;\n for (;;) {\n try {\n yield* current.events;\n return;\n } catch (err) {\n if (expired || !isDroppedStream(err)) throw err;\n current = await open();\n }\n }\n }\n\n return {\n events: events(),\n stop: () => {\n clearTimeout(timer);\n controller.abort();\n },\n timedOut: () => expired,\n };\n}\n\nfunction isAbort(err: unknown): boolean {\n return err instanceof Error && (err.name === 'AbortError' || err.name === 'TimeoutError');\n}\n\nexport function isDroppedStream(err: unknown): boolean {\n if (!(err instanceof Error) || isAbort(err)) return false;\n const code = (err.cause as { code?: unknown } | undefined)?.code;\n\n return err.message === 'terminated' || code === 'UND_ERR_SOCKET' || code === 'ECONNRESET';\n}\n\nfunction buildCommand(\n schema: GraphQLSchema,\n fieldName: string,\n kind: OperationKind,\n description: string,\n service: string,\n resultSubscription?: string,\n resultCommand?: string,\n): Command {\n const rootType = rootTypeOf(schema, kind);\n if (!rootType) throw new Error(`No ${kind} type in schema`);\n\n const field = rootType.getFields()[fieldName];\n if (!field) throw new Error(`Unknown ${kind} field: ${fieldName}`);\n\n const inputFields = getInputFields(field);\n const useInputWrapper = inputFields != null;\n const cliArgs: CliArg[] = useInputWrapper\n ? inputFields\n : field.args.map((a) => ({\n name: a.name,\n type: a.type,\n required: isNonNullType(a.type),\n description: a.description,\n }));\n\n const cmd = new Command(kebab(fieldName)).description(description);\n\n // Only *required* company arguments are worth blocking on. An optional one\n // means the server has a sensible default — for instance the caller's personal\n // company — and refusing to call it would make the CLI stricter than the API.\n const requiresCompanyId = cliArgs.some((a) => a.name === 'companyId' && a.required);\n\n for (const a of cliArgs) {\n // Variadic for an enum list, so `--reveal identity, email` and `--reveal identity email` both read.\n const placeholder = enumListOf(a.type) ? 'a,b|all|none...' : isStructuredInput(a.type) ? 'json' : kebab(a.name);\n const flag = `--${flagNameFor(fieldName, a.name)} <${placeholder}>`;\n const isContext = a.name in CONTEXT_FIELDS;\n if (isContext) {\n cmd.option(flag, `${describeArg(a)} (from context if omitted)`);\n } else if (resultSubscription && a.name === 'externalId') {\n cmd.option(flag, `${describeArg(a)} (generated if omitted)`);\n } else if (a.required) {\n cmd.requiredOption(flag, describeArg(a));\n } else {\n cmd.option(flag, describeArg(a));\n }\n }\n\n cmd\n .option('--depth <depth>', 'Selection depth (default: 0)', parseInt)\n .option('--fields <fields>', 'Comma-separated fields to include')\n .option('--exclude <fields>', 'Comma-separated fields to exclude')\n .option('--total-count', 'Also count every match, not just this page (slow on a broad filter)');\n\n if (kind === 'subscription') {\n cmd\n .option('--once', 'Stop after the first event')\n .option(\n '--timeout <seconds>',\n `Give up after this many seconds (default: ${DEFAULT_SUBSCRIPTION_TIMEOUT_SECONDS})`,\n );\n }\n\n if (resultSubscription) {\n cmd.addOption(\n new Option(\n '--wait [seconds]',\n `Subscribe to \\`${resultSubscription}\\`, send this mutation, and print the result it delivers. ` +\n '--fields, --exclude and --depth then select the result',\n ).preset(String(DEFAULT_WAIT_SECONDS)),\n );\n }\n\n cmd.action(async function (this: Command) {\n const opts = this.optsWithGlobals();\n const ctx = getUserContext();\n // Two different companies: the one the caller acts for (the header, checked\n // against the token) and the one an operation is about (its `companyId`\n // argument, checked by membership). Naming a company as an argument must not\n // make the whole request act for it.\n const acting = typeof opts.company === 'string' ? opts.company : undefined;\n const actingId = await resolveCompanyId({ company: acting, ctx });\n const argumentCompanyId =\n typeof opts.companyId === 'string' ? await resolveCompanyId({ company: opts.companyId, ctx }) : actingId;\n\n if (requiresCompanyId && !argumentCompanyId) {\n error('No company selected.');\n hint('Pass --company-id <slug|id>, or act for one with --company or `sl config set company <slug|id>`.');\n process.exit(2);\n }\n\n if (argumentCompanyId) opts.companyId = argumentCompanyId;\n\n const waiting = resultSubscription !== undefined && opts.wait !== undefined;\n const generatedExternalId = resultSubscription !== undefined && typeof opts.externalId !== 'string';\n if (generatedExternalId) opts.externalId = `sl-${randomUUID()}`;\n if (waiting && opts.async === undefined && cliArgs.some((a) => a.name === 'async')) opts.async = 'true';\n\n const collectArgs = (): Record<string, unknown> => {\n const out: Record<string, unknown> = {};\n for (const a of cliArgs) {\n const flagName = flagNameFor(fieldName, a.name);\n const given = opts[optionKey(flagName)];\n const raw = Array.isArray(given) ? (given as string[]).join(',') : given;\n if (raw != null) {\n try {\n out[a.name] = coerceValue(raw, a.type, flagName);\n } catch (coerceError) {\n error((coerceError as Error).message);\n hint('Run the command with --help to see the expected shape of each argument.');\n process.exit(2);\n }\n }\n }\n return out;\n };\n\n const variables: Record<string, unknown> = useInputWrapper ? { input: collectArgs() } : collectArgs();\n\n const selection = {\n depth: opts.depth,\n fields: opts.fields?.split(','),\n exclude: opts.exclude?.split(','),\n totalCount: opts.totalCount === true,\n };\n const build = (\n buildKind: OperationKind,\n buildField: string,\n buildVariables: Record<string, unknown>,\n select = true,\n ) => {\n try {\n return buildQuery(schema, buildKind, buildField, buildVariables, select ? selection : {});\n } catch (buildError) {\n if (!(buildError instanceof UnknownFieldError)) throw buildError;\n error(buildError.message);\n hint(`Did you mean: ${buildError.suggestions.join(', ')}?`);\n process.exit(2);\n }\n };\n const requestOptions = { endpoint: opts.endpoint, company: acting, companyId: actingId, subgraph: service };\n\n if (kind === 'subscription') {\n const seconds = secondsOption(opts.timeout, DEFAULT_SUBSCRIPTION_TIMEOUT_SECONDS, '--timeout');\n const { query, fieldName: fName } = build('subscription', fieldName, variables);\n const stream = await listen(query, variables, requestOptions, seconds);\n try {\n for await (const data of stream.events) {\n printResult(fieldName, data[fName], opts);\n if (opts.once) break;\n }\n } catch (err) {\n if (!isAbort(err) || !stream.timedOut()) throw err;\n warn(`No more events within ${seconds}s.`);\n process.exit(TIMED_OUT_EXIT_CODE);\n } finally {\n stream.stop();\n }\n return;\n }\n\n if (waiting && resultSubscription) {\n const seconds = secondsOption(opts.wait, DEFAULT_WAIT_SECONDS, '--wait');\n if (!requestOptions.companyId && !actingAsApplication()) {\n requestOptions.companyId = await personalCompanyId();\n }\n const externalId = opts.externalId as string;\n const subscriptionVariables = { externalId };\n if (\n selection.fields &&\n !selection.fields.includes(PAGE_STATUS_FIELD) &&\n deliversFillingPages(schema, resultSubscription)\n ) {\n selection.fields = [...selection.fields, PAGE_STATUS_FIELD];\n }\n const { query: subscriptionQuery, fieldName: subscriptionField } = build(\n 'subscription',\n resultSubscription,\n subscriptionVariables,\n );\n const stream = await listen(subscriptionQuery, subscriptionVariables, requestOptions, seconds);\n let delivered: unknown;\n try {\n const { query } = build(kind, fieldName, variables, false);\n await graphqlRaw(query, variables, requestOptions);\n for await (const data of stream.events) {\n delivered = data[subscriptionField];\n if (!isStillFilling(delivered)) break;\n }\n if (delivered === undefined) {\n warn(`${resultSubscription} closed without delivering a result.`);\n process.exit(1);\n }\n printResult(resultSubscription, delivered, opts);\n const pageArgument = useInputWrapper ? (variables.input as Record<string, unknown>).page : variables.page;\n const takesPage = cliArgs.some((a) => a.name === 'page');\n const pageHint = takesPage\n ? nextPageHint(\n invocation(service, this.name()),\n externalId,\n pageArgument as Record<string, unknown> | undefined,\n delivered,\n )\n : null;\n if (pageHint) hint(pageHint);\n return;\n } catch (err) {\n if (!isAbort(err) || !stream.timedOut()) throw err;\n if (delivered !== undefined) {\n printResult(resultSubscription, delivered, opts);\n warn(`Still filling after ${seconds}s: what is above may still change.`);\n hint(`Wait longer with --wait <seconds>; its external id is ${externalId}.`);\n process.exit(TIMED_OUT_EXIT_CODE);\n }\n warn(`No result within ${seconds}s. The request was accepted and may still complete.`);\n hint(`Wait longer with --wait <seconds>, or read the result later; its external id is ${externalId}.`);\n process.exit(TIMED_OUT_EXIT_CODE);\n } finally {\n stream.stop();\n }\n }\n\n const { query, fieldName: fName } = build(kind, fieldName, variables);\n const data = await graphqlRaw(query, variables, requestOptions);\n printResult(fieldName, data[fName], opts);\n if (generatedExternalId && resultCommand) {\n hint(`Its result arrives on sl ${resultCommand} --external-id ${String(opts.externalId)}, or pass --wait.`);\n } else if (generatedExternalId && resultSubscription) {\n hint(`Its external id is ${String(opts.externalId)}. Pass --wait to receive its result.`);\n }\n });\n\n return cmd;\n}\n\n// ── Service map derivation ──\n\ninterface ServiceEntry {\n queries: Array<{ fieldName: string; description: string }>;\n mutations: Array<{ fieldName: string; description: string }>;\n subscriptions: Array<{ fieldName: string; description: string }>;\n}\n\n/**\n * Derive the service → operations map from the `@join__field(graph: ...)`\n * directives the router exposes on each root field. Fields without a mapped\n * subgraph are skipped.\n */\nfunction deriveServiceMap(schema: GraphQLSchema, fieldServices: FieldServiceMap): Map<string, ServiceEntry> {\n const map = new Map<string, ServiceEntry>();\n\n function ensure(service: string): ServiceEntry {\n if (!map.has(service)) map.set(service, { queries: [], mutations: [], subscriptions: [] });\n return map.get(service)!;\n }\n\n const rootTypes: Array<{\n kind: 'queries' | 'mutations' | 'subscriptions';\n type: GraphQLObjectType | null | undefined;\n }> = [\n { kind: 'queries', type: schema.getQueryType() },\n { kind: 'mutations', type: schema.getMutationType() },\n { kind: 'subscriptions', type: schema.getSubscriptionType() },\n ];\n\n for (const { kind, type } of rootTypes) {\n if (!type) continue;\n const services = fieldServices.get(type.name);\n if (!services) continue;\n\n const fields = type.getFields();\n for (const [fieldName, field] of Object.entries(fields)) {\n if (SKIP_FIELDS.has(fieldName) || fieldName.startsWith('__')) continue;\n if (supersededBy(field, fields)) continue;\n\n // Skip operations returning interfaces or unions\n const returnType = unwrap(field.type);\n if (isInterfaceType(returnType) || isUnionType(returnType)) continue;\n\n const service = services.get(fieldName);\n if (!service) continue;\n\n ensure(service)[kind].push({ fieldName, description: field.description ?? '' });\n }\n }\n\n // Sort fields alphabetically within each service\n for (const entry of map.values()) {\n entry.queries.sort((a, b) => a.fieldName.localeCompare(b.fieldName));\n entry.mutations.sort((a, b) => a.fieldName.localeCompare(b.fieldName));\n entry.subscriptions.sort((a, b) => a.fieldName.localeCompare(b.fieldName));\n }\n\n return map;\n}\n\nexport interface OperationCommand {\n command: Command;\n /** Field name as it appears on the supergraph root type. */\n fieldName: string;\n kind: OperationKind;\n service: string;\n}\n\nexport const TOP_LEVEL_SERVICE = 'hermes';\n\nfunction invocation(service: string, commandName: string): string {\n return service === TOP_LEVEL_SERVICE ? commandName : `${service} ${commandName}`;\n}\n\nexport function invocationOf(operation: OperationCommand): string {\n return invocation(operation.service, operation.command.name());\n}\n\nexport function groupOperationCommands(operations: readonly OperationCommand[]): {\n topLevel: Command[];\n services: Command[];\n} {\n const topLevel: Command[] = [];\n const services = new Map<string, Command>();\n\n for (const operation of operations) {\n if (operation.service === TOP_LEVEL_SERVICE) {\n topLevel.push(operation.command);\n continue;\n }\n let group = services.get(operation.service);\n if (!group) {\n group = new Command(operation.service).description(`Operations served by ${operation.service}`);\n services.set(operation.service, group);\n }\n group.addCommand(operation.command);\n }\n\n return {\n topLevel,\n services: [...services.values()].sort((a, b) => a.name().localeCompare(b.name())),\n };\n}\n\nexport function buildOperationCommands(schema: GraphQLSchema, fieldServices: FieldServiceMap): OperationCommand[] {\n const serviceMap = deriveServiceMap(schema, fieldServices);\n const pairs = resultSubscriptions(schema);\n const operations: OperationCommand[] = [];\n\n for (const [service, entry] of serviceMap) {\n const nameCounts = new Map<string, number>();\n for (const op of [...entry.queries, ...entry.mutations, ...entry.subscriptions]) {\n nameCounts.set(op.fieldName, (nameCounts.get(op.fieldName) ?? 0) + 1);\n }\n const exposedSubscriptions = new Set(entry.subscriptions.map((op) => op.fieldName));\n\n const kinds: Array<{ kind: OperationKind; ops: Array<{ fieldName: string; description: string }> }> = [\n { kind: 'query', ops: entry.queries },\n { kind: 'mutation', ops: entry.mutations },\n { kind: 'subscription', ops: entry.subscriptions },\n ];\n\n for (const { kind, ops } of kinds) {\n for (const op of ops) {\n try {\n const paired = kind === 'mutation' ? pairs.get(op.fieldName) : undefined;\n const resultCommand =\n paired && exposedSubscriptions.has(paired) ? invocation(service, kebab(paired)) : undefined;\n const command = buildCommand(schema, op.fieldName, kind, op.description, service, paired, resultCommand);\n if ((nameCounts.get(op.fieldName) ?? 0) > 1) {\n command.name(`${kebab(op.fieldName)}-${kind}`);\n }\n operations.push({ command, fieldName: op.fieldName, kind, service });\n } catch {\n // Field may not be resolvable against this schema — skip it.\n }\n }\n }\n }\n\n return operations.sort((a, b) => a.command.name().localeCompare(b.command.name()));\n}\n\n/** Rendered by `sl operations`: every flattened command, grouped by kind. */\nexport function formatOperationList(operations: readonly OperationCommand[], search?: string): string {\n const needle = search?.toLowerCase();\n const matching = needle\n ? operations.filter((op) => invocationOf(op).includes(needle) || op.service.toLowerCase().includes(needle))\n : operations;\n\n if (matching.length === 0) {\n return search ? `No operation matching \"${search}\".` : 'No operation on this endpoint is exposed to the CLI.';\n }\n\n const lines: string[] = [];\n const headings: Record<OperationKind, string> = {\n query: 'Queries',\n mutation: 'Mutations',\n subscription: 'Subscriptions',\n };\n for (const kind of ['query', 'mutation', 'subscription'] as const) {\n const group = matching.filter((op) => op.kind === kind);\n if (group.length === 0) continue;\n\n const rows = group.map((op) => ({ invocation: invocationOf(op), service: op.service }));\n rows.sort((a, b) => a.invocation.localeCompare(b.invocation));\n const width = Math.max(...rows.map((row) => row.invocation.length));\n lines.push(`${headings[kind]}:`);\n for (const row of rows) {\n lines.push(` ${row.invocation.padEnd(width)} ${row.service}`);\n }\n lines.push('');\n }\n\n return lines.join('\\n');\n}\n","import type { TypedDocumentNode } from '@graphql-typed-document-node/core';\nimport { print } from 'graphql';\n\nimport { baseRequestHeaders } from '../lib/api-headers.ts';\nimport { actingAsApplication, applicationSessionExpired, loadApplicationSession } from '../lib/application-session.ts';\nimport {\n ensureAuthenticated,\n isExpired,\n loadElevatedCredentials,\n saveCredentials,\n type Credentials,\n} from '../lib/auth.ts';\nimport { clientCredentials, fetchClientCredentialsToken } from '../lib/client-credentials.ts';\nimport { personalCompanyId, resolveCompanyId } from '../lib/company.ts';\nimport { getEndpoint, getUserContext } from '../lib/config.ts';\nimport { error, hint, info, warn } from '../lib/output.ts';\nimport { addBreadcrumb, captureException } from '../lib/sentry.ts';\nimport { RefreshToken } from './operations/hermes.ts';\n\nfunction extractOperationName(query: string): string {\n const match = query.match(/(?:mutation|query|subscription)\\s+(\\w+)/);\n return match?.[1] ?? 'UnknownOperation';\n}\n\ninterface ResponseError {\n message: string;\n path?: (string | number)[];\n extensions?: Record<string, unknown>;\n}\n\ninterface GraphQLResponse<T = Record<string, unknown>> {\n data?: T;\n errors?: ResponseError[];\n}\n\ninterface RequestOptions {\n endpoint?: string;\n /** The company as the caller named it, slug or id, for messages. */\n company?: string;\n /** The same company resolved to its id. Absent, `config.company` applies. */\n companyId?: string;\n /** Send no X-Company-Id: the lookup that resolves a slug cannot itself act for one. */\n withoutCompany?: boolean;\n authenticated?: boolean;\n throwOnError?: boolean;\n /** Subgraph that owns the operation, used to explain a refusal precisely. */\n subgraph?: string;\n /**\n * Authenticate as the person even when an application credential is active.\n *\n * `sl use application` needs this: creating and revoking a credential is a\n * management operation, which Hermes refuses to an application token, so\n * switching from one application to another would otherwise be impossible\n * without stepping back through `sl use me` first.\n */\n asPerson?: boolean;\n actingForPersonalCompany?: boolean;\n}\n\nexport class GraphQLRequestError extends Error {\n readonly operationName: string;\n readonly httpStatus?: number;\n readonly graphqlErrors?: Array<{ message: string; extensions?: Record<string, unknown> }>;\n\n constructor(\n message: string,\n details: {\n operationName: string;\n httpStatus?: number;\n graphqlErrors?: Array<{ message: string; extensions?: Record<string, unknown> }>;\n },\n ) {\n super(message);\n this.name = 'GraphQLRequestError';\n this.operationName = details.operationName;\n this.httpStatus = details.httpStatus;\n this.graphqlErrors = details.graphqlErrors;\n }\n}\n\nasync function refreshAccessToken(creds: Credentials, endpoint: string): Promise<Credentials | null> {\n const res = await fetch(endpoint, {\n method: 'POST',\n headers: baseRequestHeaders(),\n body: JSON.stringify({\n query: print(RefreshToken),\n variables: { input: { refreshToken: creds.refreshToken } },\n }),\n });\n\n const json = (await res.json()) as GraphQLResponse<{\n refreshToken: {\n accessToken: string;\n refreshToken: string;\n idToken: string;\n expiresIn: number;\n error: string | null;\n };\n }>;\n\n const token = json.data?.refreshToken;\n if (!token || token.error) return null;\n\n const newCreds: Credentials = {\n accessToken: token.accessToken,\n refreshToken: token.refreshToken,\n idToken: token.idToken,\n expiresAt: Math.floor(Date.now() / 1000) + token.expiresIn,\n };\n\n saveCredentials(newCreds);\n return newCreds;\n}\n\n/**\n * A transport failure — nothing listening, DNS, TLS — rejects rather than\n * returning a response, so it never reaches the `!res.ok` path and escapes as an\n * undici stack trace unless it is handled here.\n */\nfunction reportUnreachable(\n err: Error,\n { endpoint, operationName, throwOnError }: { endpoint: string; operationName: string; throwOnError: boolean },\n): never {\n const code = (err as Error & { cause?: { code?: string } }).cause?.code;\n const reason = code === 'ECONNREFUSED' ? `nothing is listening on ${endpoint}` : err.message;\n\n captureException(err, { operationName, endpoint });\n if (throwOnError) {\n throw new GraphQLRequestError(`${operationName} could not reach the endpoint: ${reason}`, { operationName });\n }\n error(`Could not reach ${endpoint}: ${reason}`);\n hint('Is the local stack running? Check the configured endpoint with `sl config show`.');\n process.exit(3);\n}\n\n/**\n * Internal: execute a raw GraphQL query string.\n */\ninterface Attempt {\n endpoint: string;\n operationName: string;\n throwOnError: boolean;\n verbose: boolean;\n}\n\n/**\n * Which identity to present, in precedence order.\n *\n * An application credential wins over a stored session, and both are skipped for\n * `asPerson` — see RequestOptions.\n */\nasync function resolveAccessToken(\n options: RequestOptions,\n attempt: Attempt,\n): Promise<{ token: string; kind: 'application' | 'user' }> {\n const machine = options.asPerson ? null : clientCredentials();\n if (machine) {\n try {\n return { token: await fetchClientCredentialsToken(machine), kind: 'application' };\n } catch (err) {\n const message = (err as Error).message;\n if (attempt.throwOnError) throw new GraphQLRequestError(message, { operationName: attempt.operationName });\n\n error(message);\n hint('Check SORTLIST_CLIENT_ID, SORTLIST_CLIENT_SECRET and the token endpoint.');\n hint('The credential may also have been revoked, or its application deleted.');\n process.exit(2);\n }\n }\n\n // Its credential is already revoked, so there is nothing to refresh with: when\n // the token expires the caller runs `sl use application` again, which needs\n // their own token.\n const session = options.asPerson ? null : loadApplicationSession();\n if (session) return { token: session.accessToken, kind: 'application' };\n\n if (!options.asPerson && applicationSessionExpired()) {\n error('The application session has expired.');\n hint('Run `sl use application <id>` again, or `sl use me` to act as yourself.');\n process.exit(2);\n }\n\n const elevated = options.asPerson ? null : loadElevatedCredentials();\n if (elevated) return { token: elevated.accessToken, kind: 'user' };\n\n let creds = ensureAuthenticated();\n if (isExpired(creds)) {\n const refreshed = await refreshAccessToken(creds, attempt.endpoint);\n if (!refreshed) {\n if (attempt.throwOnError) {\n throw new GraphQLRequestError('Session expired and could not be refreshed.', {\n operationName: attempt.operationName,\n });\n }\n error('Your session has expired and could not be refreshed.');\n hint('Run `sl login` to re-authenticate.');\n process.exit(2);\n }\n creds = refreshed;\n }\n\n return { token: creds.accessToken, kind: 'user' };\n}\n\nfunction reportHttpFailure(res: Response, body: string, attempt: Attempt): never {\n const { operationName, endpoint, throwOnError, verbose } = attempt;\n captureException(new Error(`${operationName} failed: HTTP ${res.status}`), {\n operationName,\n httpStatus: res.status,\n endpoint,\n });\n if (throwOnError) {\n throw new GraphQLRequestError(`${operationName} failed: HTTP ${res.status} ${res.statusText}`, {\n operationName,\n httpStatus: res.status,\n });\n }\n\n error(`${operationName} failed: HTTP ${res.status} ${res.statusText}`);\n hint('Check your network connection and endpoint: sl config show');\n if (verbose) info(`[debug] Response body: ${body}`);\n process.exit(3);\n}\n\n/** A selection the subgraph could not resolve; `--fields` is the way out. */\nfunction hasFieldError(errors: ResponseError[]): boolean {\n return errors.some((e) => e.message.includes('Failed to implement') || e.message.includes('undefined method'));\n}\n\n/**\n * The router replaces a subgraph's message with \"Unexpected error\" but keeps its\n * `extensions.code`, so the code is the only part worth reading — which is also\n * what the platform's error contract says: the message is a log line, the code is\n * the contract.\n */\nfunction codeOf(errors: ResponseError[]): string | null {\n for (const { extensions } of errors) {\n const code = extensions?.code;\n if (typeof code === 'string') return code;\n }\n\n return null;\n}\n\n/** `VALIDATION_FAILED` reads better as a sentence than as a constant. */\nconst UUID = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;\n\nconst CALLBACK_STATUS_NOT_OK = 'SUBGRAPH_HTTP_CALLBACK_STATUS_CODE_NOT_OK';\n\nfunction subrequestStatus(errors: ResponseError[]): number | null {\n for (const { message, extensions } of errors) {\n const http = extensions?.http;\n if (typeof http === 'object' && http !== null && typeof (http as { status?: unknown }).status === 'number') {\n return (http as { status: number }).status;\n }\n const callbackStatus = extensions?.code === CALLBACK_STATUS_NOT_OK ? message.match(/'(\\d{3})\\b/)?.[1] : undefined;\n if (callbackStatus) return Number(callbackStatus);\n }\n\n return null;\n}\n\nfunction humanise(code: string): string {\n const words = code.toLowerCase().replaceAll('_', ' ');\n\n return words.charAt(0).toUpperCase() + words.slice(1) + '.';\n}\n\n/**\n * `{ name: [\"taken\"] }` becomes `name: taken`.\n *\n * The shape is the platform's error contract: an attribute mapped to symbolic\n * codes, never prose, so this only has to lay it out.\n */\nexport function detailLines(errors: ResponseError[]): string[] {\n const lines: string[] = [];\n for (const { extensions } of errors) {\n const details = extensions?.details;\n if (typeof details !== 'object' || details === null) continue;\n\n for (const [attribute, codes] of Object.entries(details as Record<string, unknown>)) {\n const described = Array.isArray(codes) ? codes.map(describeDetail) : [describeDetail(codes)];\n lines.push(`${attribute}: ${described.join(', ')}`);\n }\n }\n\n return lines;\n}\n\n/**\n * One refusal is a bare code (`\"taken\"`) or, in the newer services, an object naming the\n * code and what it was checked against: `{ error: \"not_running\", status: \"removed\" }`\n * reads as `not_running (status: removed)`.\n */\nfunction describeDetail(detail: unknown): string {\n if (typeof detail !== 'object' || detail === null) return String(detail);\n\n const { error, message, ...rest } = detail as Record<string, unknown>;\n if (error === undefined) return JSON.stringify(detail);\n\n const context = Object.entries(rest).map(([key, value]) => `${key}: ${String(value)}`);\n const code = context.length > 0 ? `${String(error)} (${context.join(', ')})` : String(error);\n return message === undefined ? code : `${code} — ${String(message)}`;\n}\n\nconst HEADLINE_EXTENSIONS = new Set(['code', 'details']);\n\n/**\n * Everything the errors carry beyond the code and its details, so nothing the\n * subgraph said stays hidden behind --verbose: the message unless it is the\n * router's placeholder, the remaining extensions (`service`, …) and the path.\n */\nexport function explainLines(errors: ResponseError[]): string[] {\n const lines = detailLines(errors);\n const seen = new Set(lines);\n const add = (line: string) => {\n if (seen.has(line)) return;\n seen.add(line);\n lines.push(line);\n };\n\n for (const gqlError of errors) {\n if (gqlError.message !== ROUTER_PLACEHOLDER && gqlError.message !== '') add(`message: ${gqlError.message}`);\n for (const [key, value] of Object.entries(gqlError.extensions ?? {})) {\n if (HEADLINE_EXTENSIONS.has(key) || value === null || value === undefined) continue;\n add(`${key}: ${typeof value === 'object' ? JSON.stringify(value) : String(value)}`);\n }\n if (gqlError.path !== undefined && gqlError.path.length > 0) add(`path: ${gqlError.path.join('.')}`);\n }\n\n return lines;\n}\n\nconst ROUTER_PLACEHOLDER = 'Unexpected error';\n\n/**\n * One sentence for a caller that catches rather than exits.\n *\n * Built from the code and its details for the same reason the printed path is:\n * joining the messages produced \"Unexpected error; Unexpected error\", which is\n * the router's placeholder twice and says nothing.\n */\nfunction describe(errors: ResponseError[]): string {\n const code = codeOf(errors);\n const details = detailLines(errors);\n const messages = messageLines(errors);\n\n if (code !== null && code !== 'DOWNSTREAM_SERVICE_ERROR') {\n const explanation = details.length > 0 ? details : messages;\n return explanation.length > 0 ? `${humanise(code)} ${explanation.join('; ')}` : humanise(code);\n }\n\n // Falling back to `code` here would print DOWNSTREAM_SERVICE_ERROR, which names\n // the router's own plumbing and explains nothing to whoever ran the command.\n return messages.length > 0 ? messages.join('; ') : 'the server gave no reason';\n}\n\nfunction messageLines(errors: ResponseError[]): string[] {\n return errors.map((e) => e.message).filter((message) => message !== ROUTER_PLACEHOLDER);\n}\n\nfunction serviceOf(errors: ResponseError[]): string | null {\n for (const { extensions } of errors) {\n const service = extensions?.service;\n if (typeof service === 'string') return service;\n }\n\n return null;\n}\n\nexport { subrequestStatus };\n\nexport function refusedForNamingNoCompany(errors: ResponseError[], namedNoCompany: boolean): boolean {\n if (!namedNoCompany) return false;\n\n const status = subrequestStatus(errors);\n const maskedCallbackRefusal = status === null && codeOf(errors) === CALLBACK_STATUS_NOT_OK;\n\n return status === 403 || maskedCallbackRefusal;\n}\n\n/** Did anything actually resolve? An all-null payload beside an error is a failure. */\nfunction hasResolvedField(data: unknown): boolean {\n if (data === null || data === undefined) return false;\n\n return Object.values(data as Record<string, unknown>).some((value) => value !== null);\n}\n\nfunction reportGraphqlErrors(errors: ResponseError[], options: RequestOptions, attempt: Attempt): never {\n const { operationName, throwOnError, verbose } = attempt;\n captureException(new Error(`${operationName} GraphQL errors`), {\n operationName,\n errors: errors.map((e) => e.message),\n });\n\n if (throwOnError) {\n throw new GraphQLRequestError(`${operationName} failed: ${describe(errors)}`, {\n operationName,\n graphqlErrors: errors,\n });\n }\n\n // Relaying \"Unexpected error\" teaches nobody anything; the code does.\n if (codeOf(errors) === 'NOT_AUTHENTICATED') {\n const service = serviceOf(errors);\n const where = service === null ? '' : ` for ${service}`;\n error(`Not authenticated${where}.`);\n if (actingAsApplication()) {\n hint('You are acting as an application. Hermes refuses the tokens it mints on its own');\n hint('management API by design, so a leaked secret cannot mint more — `sl use me` switches back.');\n } else {\n hint('Run `sl login` to authenticate, or `sl whoami` to see what the CLI is acting as.');\n }\n if (verbose) for (const gqlError of errors) info(`[debug] ${gqlError.message}`);\n process.exit(4);\n }\n\n // A 401 from a subgraph means the token no longer verifies there: expired, or\n // signed with a key the issuer has since rotated. The router relays neither.\n if (subrequestStatus(errors) === 401) {\n const service = serviceOf(errors);\n const where = service ?? 'The subgraph';\n error(`${where} did not accept your token.`);\n if (actingAsApplication()) {\n hint('The application token has expired or was signed with a key Hermes no longer publishes');\n hint('(a local Hermes mints a fresh key on every restart). Run `sl use application <id>` again.');\n } else {\n hint('Run `sl login` again; `sl whoami` shows what the CLI is acting as.');\n }\n if (verbose) for (const gqlError of errors) info(`[debug] ${JSON.stringify(gqlError)}`);\n process.exit(4);\n }\n\n // A 403 from a subgraph is the X-Company-Id check: the router hides the\n // subgraph's message, so the CLI has to say what it sent.\n if (subrequestStatus(errors) === 403) {\n const service = serviceOf(errors);\n const where = service ?? 'The subgraph';\n const company = options.company ?? getUserContext().company ?? options.companyId;\n if (options.actingForPersonalCompany) {\n error(`${where} refused to act for your personal company.`);\n hint('It was tried because the request named no company, and your token does not list it as yours.');\n hint(\"On a local stack the token comes from a shared tenant and lists that environment's companies.\");\n hint('Pass --company <slug|id>, or `sl config set company <slug|id>`; `sl companies` lists them.');\n } else if (company && UUID.test(company)) {\n error(`${where} refused ${company}: that is a raw uuid, not a company id.`);\n hint('Pass its slug, or the id `sl companies` lists.');\n } else if (company) {\n error(`${where} refused to act for company ${company}.`);\n hint('Your token does not list that company, or Hermes no longer knows you as one of its members.');\n hint('`sl whoami` shows what the CLI is acting as;');\n hint('pick one of your companies with --company or `sl config set company <slug|id>`.');\n } else {\n error(`${where} refused this request: it names no company to act for.`);\n hint('Pick one of your companies with --company or `sl config set company <slug|id>`;');\n hint('`sl companies` lists them. Join one first if the list is empty.');\n }\n if (verbose) for (const gqlError of errors) info(`[debug] ${JSON.stringify(gqlError)}`);\n process.exit(4);\n }\n\n // Prefer the code and its details over the message: the router replaces the\n // message with a placeholder, and the platform's error contract puts the\n // machine-readable part in extensions precisely so a client need not parse prose.\n const code = codeOf(errors);\n if (code !== null && code !== 'DOWNSTREAM_SERVICE_ERROR') {\n error(humanise(code));\n\n for (const line of explainLines(errors)) info(` ${line}`);\n if (verbose) for (const gqlError of errors) info(`[debug] ${JSON.stringify(gqlError)}`);\n process.exit(1);\n }\n\n error(`${operationName} failed:`);\n for (const gqlError of errors) {\n info(` ${gqlError.message}`);\n if (verbose && gqlError.extensions) info(`[debug] Extensions: ${JSON.stringify(gqlError.extensions)}`);\n }\n\n if (hasFieldError(errors)) {\n hint('Use --fields to select specific fields, or --exclude to skip broken ones.');\n hint(`Example: sl ${operationName.toLowerCase()} --fields id,title,status`);\n }\n\n process.exit(1);\n}\n\nfunction logRequest(query: string, variables: Record<string, unknown> | undefined, attempt: Attempt): void {\n info(`[debug] ${attempt.operationName} → ${attempt.endpoint}`);\n info(`[debug] Query:\\n${query}`);\n if (variables) info(`[debug] Variables: ${JSON.stringify(variables, null, 2)}`);\n}\n\nfunction startAttempt(query: string, variables: Record<string, unknown> | undefined, options: RequestOptions): Attempt {\n const attempt: Attempt = {\n endpoint: getEndpoint(options.endpoint),\n operationName: extractOperationName(query),\n throwOnError: options.throwOnError ?? false,\n verbose: process.env.SL_DEBUG === '1',\n };\n\n addBreadcrumb({\n category: 'graphql',\n message: attempt.operationName,\n data: { endpoint: attempt.endpoint, authenticated: options.authenticated ?? true },\n level: 'info',\n });\n\n if (attempt.verbose) logRequest(query, variables, attempt);\n\n return attempt;\n}\n\nasync function requestHeaders(\n options: RequestOptions,\n attempt: Attempt,\n): Promise<{ headers: Record<string, string>; namedNoCompany: boolean }> {\n const headers: Record<string, string> = baseRequestHeaders();\n if (!(options.authenticated ?? true)) return { headers, namedNoCompany: false };\n\n const { token, kind } = await resolveAccessToken(options, attempt);\n headers['Authorization'] = `Bearer ${token}`;\n const companyId = options.withoutCompany\n ? undefined\n : (options.companyId ?? (await resolveCompanyId({ ctx: getUserContext() })));\n if (companyId) headers['X-Company-Id'] = companyId;\n // Never print the full token — debug output ends up in pasted logs. `sl token`\n // is the deliberate way to get the raw value.\n if (attempt.verbose) info(`[debug] ${kind} token: ...${token.slice(-8)}`);\n\n return { headers, namedNoCompany: !companyId && kind === 'user' && !options.withoutCompany };\n}\n\nasync function executeQuery<T = Record<string, unknown>>(\n query: string,\n variables: Record<string, unknown> | undefined,\n options: RequestOptions = {},\n): Promise<T> {\n const attempt = startAttempt(query, variables, options);\n const { headers, namedNoCompany } = await requestHeaders(options, attempt);\n\n let res: Response;\n try {\n res = await fetch(attempt.endpoint, {\n method: 'POST',\n headers,\n body: JSON.stringify({ query, variables }),\n });\n } catch (err) {\n reportUnreachable(err as Error, {\n endpoint: attempt.endpoint,\n operationName: attempt.operationName,\n throwOnError: attempt.throwOnError,\n });\n }\n\n if (!res.ok) reportHttpFailure(res, await res.text(), attempt);\n\n const json = (await res.json()) as GraphQLResponse<T>;\n\n if (json.errors?.length) {\n // A refused mutation arrives as data carrying a null field *and* an error, so\n // the refusal has to be recognised before the partial-success branch — which\n // would otherwise relay the router's placeholder and let the caller explain\n // the null a second time, in different words.\n const refused = !hasResolvedField(json.data);\n if (refused && refusedForNamingNoCompany(json.errors, namedNoCompany)) {\n const personal = await personalCompanyId();\n if (personal) {\n return executeQuery<T>(query, variables, { ...options, companyId: personal, actingForPersonalCompany: true });\n }\n }\n if (refused) reportGraphqlErrors(json.errors, options, attempt);\n\n // Partial success: the data that did resolve is worth more than the failure.\n for (const gqlError of json.errors) warn(gqlError.message);\n if (hasFieldError(json.errors)) {\n hint('Use --fields to select specific fields, or --exclude to skip broken ones.');\n }\n return json.data as T;\n }\n\n if (!json.data) {\n if (attempt.throwOnError) {\n throw new GraphQLRequestError(`${attempt.operationName}: no data returned from API.`, {\n operationName: attempt.operationName,\n });\n }\n error(`${attempt.operationName}: no data returned from API.`);\n hint('This usually means the server returned an empty response.');\n hint('Verify your endpoint: sl config show');\n process.exit(1);\n }\n\n return json.data;\n}\n\nexport interface ServerSentEvent {\n event: string;\n data: string;\n}\n\nexport async function* parseEventStream(chunks: AsyncIterable<Uint8Array | string>): AsyncGenerator<ServerSentEvent> {\n const decoder = new TextDecoder();\n let buffer = '';\n\n for await (const chunk of chunks) {\n buffer += typeof chunk === 'string' ? chunk : decoder.decode(chunk, { stream: true });\n buffer = buffer.replaceAll('\\r\\n', '\\n');\n\n let boundary = buffer.indexOf('\\n\\n');\n while (boundary !== -1) {\n const block = buffer.slice(0, boundary);\n buffer = buffer.slice(boundary + 2);\n const parsed = parseEventBlock(block);\n if (parsed) yield parsed;\n boundary = buffer.indexOf('\\n\\n');\n }\n }\n\n const rest = parseEventBlock(buffer);\n if (rest) yield rest;\n}\n\nfunction parseEventBlock(block: string): ServerSentEvent | null {\n let event = 'message';\n const data: string[] = [];\n\n for (const line of block.split('\\n')) {\n if (line === '' || line.startsWith(':')) continue;\n const colon = line.indexOf(':');\n const field = colon === -1 ? line : line.slice(0, colon);\n const value = colon === -1 ? '' : line.slice(colon + 1).replace(/^ /, '');\n if (field === 'event') event = value;\n if (field === 'data') data.push(value);\n }\n\n return data.length > 0 || event !== 'message' ? { event, data: data.join('\\n') } : null;\n}\n\ninterface SubscribeOptions extends RequestOptions {\n signal?: AbortSignal;\n}\n\nexport interface Subscription {\n events: AsyncGenerator<Record<string, unknown>>;\n}\n\nasync function openEventStream(\n query: string,\n variables: Record<string, unknown> | undefined,\n options: SubscribeOptions,\n attempt: Attempt,\n): Promise<{ res: Response; namedNoCompany: boolean }> {\n const { headers, namedNoCompany } = await requestHeaders(options, attempt);\n headers['Accept'] = 'text/event-stream';\n\n let res: Response;\n try {\n res = await fetch(attempt.endpoint, {\n method: 'POST',\n headers,\n body: JSON.stringify({ query, variables }),\n signal: options.signal,\n });\n } catch (err) {\n reportUnreachable(err as Error, {\n endpoint: attempt.endpoint,\n operationName: attempt.operationName,\n throwOnError: attempt.throwOnError,\n });\n }\n\n if (!res.ok) {\n const body = await res.text();\n const errors = parseErrors(body);\n if (errors) reportGraphqlErrors(errors, options, attempt);\n reportHttpFailure(res, body, attempt);\n }\n\n return { res, namedNoCompany };\n}\n\nfunction parseErrors(body: string): ResponseError[] | null {\n try {\n const errors = (JSON.parse(body) as GraphQLResponse).errors;\n return errors?.length ? errors : null;\n } catch {\n return null;\n }\n}\n\nasync function* subscriptionEvents(\n res: Response,\n query: string,\n variables: Record<string, unknown> | undefined,\n options: SubscribeOptions,\n attempt: Attempt,\n namedNoCompany: boolean,\n): AsyncGenerator<Record<string, unknown>> {\n if (!res.body) return;\n\n for await (const { event, data } of parseEventStream(res.body as unknown as AsyncIterable<Uint8Array>)) {\n if (event === 'complete') return;\n if (event !== 'next' && event !== 'message') continue;\n\n const payload = JSON.parse(data) as GraphQLResponse;\n if (payload.errors?.length && !hasResolvedField(payload.data)) {\n if (refusedForNamingNoCompany(payload.errors, namedNoCompany)) {\n const personal = await personalCompanyId();\n if (personal) {\n const retry = await graphqlSubscribe(query, variables, {\n ...options,\n companyId: personal,\n actingForPersonalCompany: true,\n });\n yield* retry.events;\n return;\n }\n }\n reportGraphqlErrors(payload.errors, options, attempt);\n }\n\n for (const gqlError of payload.errors ?? []) warn(gqlError.message);\n if (payload.data) yield payload.data;\n }\n}\n\nexport async function graphqlSubscribe(\n query: string,\n variables: Record<string, unknown> | undefined,\n options: SubscribeOptions = {},\n): Promise<Subscription> {\n const attempt = startAttempt(query, variables, options);\n const { res, namedNoCompany } = await openEventStream(query, variables, options, attempt);\n\n return { events: subscriptionEvents(res, query, variables, options, attempt, namedNoCompany) };\n}\n\n/**\n * Execute a typed GraphQL operation (for hand-written commands).\n */\nexport async function graphql<TData, TVars>(\n document: TypedDocumentNode<TData, TVars>,\n variables?: TVars,\n options: RequestOptions = {},\n): Promise<TData> {\n return executeQuery<TData>(print(document), variables as Record<string, unknown> | undefined, options);\n}\n\n/**\n * Execute a raw GraphQL query string (for generated/dynamic commands).\n */\nexport async function graphqlRaw(\n query: string,\n variables?: Record<string, unknown>,\n options: RequestOptions = {},\n): Promise<Record<string, unknown>> {\n return executeQuery(query, variables, options);\n}\n\n/**\n * Execute an unauthenticated typed GraphQL operation.\n */\nexport async function graphqlUnauthenticated<TData, TVars>(\n document: TypedDocumentNode<TData, TVars>,\n variables?: TVars,\n endpoint?: string,\n): Promise<TData> {\n return graphql(document, variables, { endpoint, authenticated: false });\n}\n","import { pkg } from './package-root.ts';\n\nexport const API_CLIENT = 'sl-cli';\n\nexport function userAgent(): string {\n return `${API_CLIENT}/${pkg.version} (node/${process.versions.node})`;\n}\n\nexport function baseRequestHeaders(): Record<string, string> {\n return {\n 'Content-Type': 'application/json',\n 'X-API-Client': API_CLIENT,\n 'User-Agent': userAgent(),\n };\n}\n","/**\n * Claims out of a token this process holds.\n *\n * Decoded, never verified: the signature belongs to whoever issued the token,\n * and these values are only ever used to tell the operator what they hold.\n */\nexport function tokenClaims(accessToken: string): Record<string, unknown> | null {\n try {\n const payload = accessToken.split('.')[1];\n if (!payload) return null;\n\n return JSON.parse(Buffer.from(payload, 'base64url').toString('utf-8'));\n } catch {\n return null;\n }\n}\n\n/** Scopes the identity provider actually granted, as opposed to those requested. */\nexport function grantedScopes(accessToken: string): string[] {\n const scope = tokenClaims(accessToken)?.scope;\n\n return typeof scope === 'string' ? scope.split(' ').filter(Boolean) : [];\n}\n\n/**\n * The services `sl login` asked for that came back with nothing.\n *\n * Auth0 grants the intersection of requested scopes and the caller's assigned\n * permissions by exact string match, and drops the rest without saying so. The\n * comparison is per service rather than per scope on purpose: the CLI requests\n * a superset of permission names (`atlas/*:*` and `atlas/*:read`), so most\n * individual requests are expected to be dropped and listing them would be\n * noise. A service with no scope at all is the condition that breaks commands.\n */\nexport function servicesWithoutScope(requestedScope: string, accessToken: string): string[] {\n const serviceOf = (scope: string): string | null => (scope.includes('/') ? scope.split('/')[0] : null);\n const granted = new Set(grantedScopes(accessToken).map(serviceOf).filter(Boolean));\n const requested = new Set(requestedScope.split(' ').map(serviceOf).filter(Boolean));\n\n return [...requested].filter((service) => !granted.has(service)).sort() as string[];\n}\n","import { loadConfig } from './config.ts';\nimport { tokenClaims } from './token-claims.ts';\n\n/**\n * Unattended authentication with an application credential.\n *\n * `sl login` is interactive and its refresh token expires, so it cannot back a\n * CI job. When SORTLIST_CLIENT_ID and SORTLIST_CLIENT_SECRET are both present,\n * every command exchanges them at Hermes' token endpoint instead — including the\n * dynamically registered subgraph commands.\n */\nexport interface ClientCredentials {\n clientId: string;\n clientSecret: string;\n}\n\ninterface CachedToken {\n accessToken: string;\n expiresAt: number;\n}\n\n// Per-process only: a short-lived machine token is not worth writing to disk,\n// and a single command run exchanges once.\nlet cached: CachedToken | null = null;\n\nexport function clientCredentials(): ClientCredentials | null {\n const clientId = process.env.SORTLIST_CLIENT_ID;\n const clientSecret = process.env.SORTLIST_CLIENT_SECRET;\n if (!clientId || !clientSecret) return null;\n\n return { clientId, clientSecret };\n}\n\nexport interface ApplicationIdentity {\n applicationId: string;\n credentialId: string;\n companyId: string;\n /** The token's `sub`, `application:<uuid>` — the same application for every credential on it. */\n sub: string;\n expiresAt: Date;\n}\n\nconst CLAIM_NAMESPACE = 'https://sortlist.com/';\n\n/**\n * Reads the identity out of a token this process just minted.\n *\n * Decoded, never verified: the signature is Hermes' to check, and this is only\n * ever used to tell the operator what they are acting as. It is also the only\n * way to answer the question at all — Hermes refuses its own tokens on its\n * management API, so there is no `me` to call as an application.\n */\nexport function applicationIdentity(accessToken: string): ApplicationIdentity | null {\n try {\n const claims = tokenClaims(accessToken);\n if (!claims) return null;\n\n return {\n applicationId: String(claims[`${CLAIM_NAMESPACE}application_id`]),\n credentialId: String(claims[`${CLAIM_NAMESPACE}credential_id`]),\n companyId: String(claims[`${CLAIM_NAMESPACE}company_id`]),\n sub: String(claims.sub),\n expiresAt: new Date(Number(claims.exp) * 1000),\n };\n } catch {\n return null;\n }\n}\n\nconst RETIRED_TOKEN_ENDPOINTS: Record<string, string> = {\n 'https://hermes.production.sortlist.cloud/oauth/token': 'https://hermes.sortlist.com/oauth/token',\n 'https://hermes.staging.sortlist.cloud/oauth/token': 'https://hermes.sortlist-test.com/oauth/token',\n};\n\nexport function tokenEndpoint(): string {\n const configured = process.env.SORTLIST_TOKEN_URL ?? loadConfig().tokenEndpoint;\n if (!configured) {\n throw new Error('No token endpoint configured. Set SORTLIST_TOKEN_URL or run: sl config set tokenEndpoint <url>');\n }\n return RETIRED_TOKEN_ENDPOINTS[configured] ?? configured;\n}\n\nexport async function fetchClientCredentialsToken(credentials: ClientCredentials): Promise<string> {\n if (cached && Date.now() < cached.expiresAt) return cached.accessToken;\n\n // No `scope` is sent: omitting it asks for the application's full grant, and\n // the grant lives on the application rather than on the credential, so there\n // is nothing for the caller to narrow.\n const body = new URLSearchParams({\n grant_type: 'client_credentials',\n client_id: credentials.clientId,\n client_secret: credentials.clientSecret,\n });\n\n const res = await fetch(tokenEndpoint(), {\n method: 'POST',\n headers: { 'Content-Type': 'application/x-www-form-urlencoded' },\n body: body.toString(),\n });\n\n const json = (await res.json().catch(() => ({}))) as {\n access_token?: string;\n expires_in?: number;\n error?: string;\n };\n\n if (!res.ok || !json.access_token) {\n // The endpoint deliberately does not say whether the client id exists, so\n // there is nothing more specific to report than what it returned.\n const reason = json.error ?? `HTTP ${res.status}`;\n throw new Error(`Token request failed: ${reason}`);\n }\n\n cached = {\n accessToken: json.access_token,\n // 60s of headroom, matching the interactive path's expiry check.\n expiresAt: Date.now() + ((json.expires_in ?? 3600) - 60) * 1000,\n };\n\n return cached.accessToken;\n}\n\nexport function resetTokenCache(): void {\n cached = null;\n}\n","import { graphqlRaw } from '../graphql/client.ts';\nimport { type UserContext } from './config.ts';\nimport { error, hint } from './output.ts';\n\n/**\n * A company id is the url-safe base64 of `Company/<uuid>`; anything else a\n * person types for a company is taken as its slug.\n */\nexport function isCompanyId(value: string): boolean {\n try {\n return Buffer.from(value, 'base64url').toString('utf8').startsWith('Company/');\n } catch {\n return false;\n }\n}\n\nconst COMPANY_BY_SLUG = `query CompanyBySlug($slug: String!) { company(slug: $slug) { id } }`;\nconst PERSONAL_COMPANY = `query PersonalCompany { me { companies(first: 50) { nodes { id personal } } } }`;\n\nconst resolved = new Map<string, Promise<string>>();\nlet personal: Promise<string | undefined> | undefined;\n\nexport function pickPersonalCompanyId(data: Record<string, unknown>): string | undefined {\n const me = data.me as { companies?: { nodes?: Array<{ id?: string; personal?: boolean }> } } | null;\n\n return me?.companies?.nodes?.find((company) => company.personal === true)?.id;\n}\n\nexport function personalCompanyId(): Promise<string | undefined> {\n personal ??= graphqlRaw(PERSONAL_COMPANY, undefined, { withoutCompany: true, throwOnError: true })\n .then(pickPersonalCompanyId)\n .catch(() => undefined);\n\n return personal;\n}\n\nasync function lookupCompanyId(slug: string): Promise<string> {\n const data = await graphqlRaw(COMPANY_BY_SLUG, { slug }, { withoutCompany: true });\n const id = (data.company as { id?: string } | null)?.id;\n if (typeof id === 'string') return id;\n\n error(`No company with slug \"${slug}\" among yours.`);\n hint('`sl companies` lists the companies you belong to, with their slugs and ids.');\n process.exit(2);\n}\n\n/**\n * Resolve the company a request acts for to its id, from the `--company` flag\n * first and `config.company` second. A slug costs one lookup per process.\n */\nexport async function resolveCompanyId(opts: {\n company?: string | undefined;\n ctx: UserContext | undefined;\n}): Promise<string | undefined> {\n const value = opts.company ?? opts.ctx?.company;\n if (!value) return undefined;\n if (isCompanyId(value)) return value;\n\n let pending = resolved.get(value);\n if (!pending) {\n pending = lookupCompanyId(value);\n resolved.set(value, pending);\n }\n return pending;\n}\n","import * as Sentry from '@sentry/node';\n\nimport { isLocalDev } from './env.ts';\nimport { pkg } from './package-root.ts';\n\nconst SENTRY_DSN = 'https://306d2e4389b8baa0bf14e587c2ceff04@o27611.ingest.us.sentry.io/4511229468409856';\nconst SENTRY_ENVIRONMENT = process.env.SL_SENTRY_ENV ?? (isLocalDev ? 'development' : 'production');\n\nconst IGNORED_ERRORS = [\n /Network Error/i,\n /Failed to fetch/i,\n /fetch failed/i,\n /ECONNREFUSED/i,\n /ENOTFOUND/i,\n /ETIMEDOUT/i,\n /Request aborted/i,\n];\n\nfunction isIgnoredError(message: string): boolean {\n return IGNORED_ERRORS.some((pattern) =>\n typeof pattern === 'string' ? message.includes(pattern) : pattern.test(message),\n );\n}\n\nexport function initSentry(): void {\n if (isLocalDev) {\n return;\n }\n\n Sentry.init({\n dsn: SENTRY_DSN,\n environment: SENTRY_ENVIRONMENT,\n release: `${pkg.name}@${pkg.version}`,\n tracesSampleRate: 0,\n maxBreadcrumbs: 50,\n attachStacktrace: true,\n beforeSend(event) {\n const message = event.exception?.values?.[0]?.value ?? '';\n if (isIgnoredError(message)) {\n return null;\n }\n return event;\n },\n });\n\n Sentry.setTag('cli_version', pkg.version);\n}\n\nexport function captureException(error: unknown, extra?: Record<string, unknown>): void {\n if (isLocalDev) {\n return;\n }\n Sentry.captureException(error, extra ? { extra } : undefined);\n}\n\nexport function addBreadcrumb(breadcrumb: Sentry.Breadcrumb): void {\n if (isLocalDev) {\n return;\n }\n Sentry.addBreadcrumb(breadcrumb);\n}\n\nexport async function flushSentry(timeout = 2000): Promise<void> {\n if (isLocalDev) {\n return;\n }\n await Sentry.flush(timeout);\n}\n","/* eslint-disable */\nimport type { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core';\nexport type Maybe<T> = T | null;\nexport type InputMaybe<T> = T | null | undefined;\nexport type Exact<T extends { [key: string]: unknown }> = { [K in keyof T]: T[K] };\nexport type MakeOptional<T, K extends keyof T> = Omit<T, K> & { [SubKey in K]?: Maybe<T[SubKey]> };\nexport type MakeMaybe<T, K extends keyof T> = Omit<T, K> & { [SubKey in K]: Maybe<T[SubKey]> };\nexport type MakeEmpty<T extends { [key: string]: unknown }, K extends keyof T> = { [_ in K]?: never };\nexport type Incremental<T> = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never };\n/** All built-in and custom scalars, mapped to their actual values */\nexport type Scalars = {\n ID: { input: string; output: string; }\n String: { input: string; output: string; }\n Boolean: { input: boolean; output: boolean; }\n Int: { input: number; output: number; }\n Float: { input: number; output: number; }\n /** An ISO 8601-encoded date */\n ISO8601Date: { input: any; output: any; }\n /** An ISO 8601-encoded datetime */\n ISO8601DateTime: { input: any; output: any; }\n /** An ISO 8601-encoded duration */\n ISO8601Duration: { input: any; output: any; }\n /** Represents untyped JSON */\n JSON: { input: any; output: any; }\n /** An integer range represented as a two-element array [min, max]. A one-element array [min] is open-ended. */\n Range: { input: any; output: any; }\n join__DirectiveArguments: { input: any; output: any; }\n join__FieldSet: { input: any; output: any; }\n join__FieldValue: { input: any; output: any; }\n link__Import: { input: any; output: any; }\n requiresScopes__Scope: { input: any; output: any; }\n};\n\n/** Autogenerated input type of AcceptCompanyInvitation */\nexport type AcceptCompanyInvitationInput = {\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: InputMaybe<Scalars['String']['input']>;\n /** The code from createCompanyInvitation. An unknown, spent, revoked or expired one fails identically. */\n code: Scalars['String']['input'];\n};\n\n/** Whether a token subject may act for a company, as Hermes sees it right now. */\nexport type ActingCheck =\n /**\n * The company and the subject both exist, but the person is not a member of it,\n * or the application belongs to another company.\n */\n | 'NOT_A_MEMBER'\n /** The subject may act for the company: a member of it, or an application it owns. */\n | 'OK'\n /** No company with this id. */\n | 'UNKNOWN_COMPANY'\n /** Hermes knows no person or application behind this subject. */\n | 'UNKNOWN_SUBJECT';\n\n/** A national administrative code attached to a division, such as a French INSEE region or département code. */\nexport type AdministrativeCode = Node & {\n __typename?: 'AdministrativeCode';\n id: Scalars['ID']['output'];\n /**\n * Global id of the division that carries this code natively. Equals the queried\n * location's own id for its own codes, or an ancestor's id for an inherited one\n * — e.g. Lyon reports Rhône's département code with Rhône's id here.\n */\n locationId: Scalars['ID']['output'];\n /** Coding scheme the value belongs to. */\n scheme: AdministrativeCodeScheme;\n /** The code itself, as the scheme's authority writes it — e.g. \"11\", \"2A\", \"971\". Not zero-stripped. */\n value: Scalars['String']['output'];\n};\n\n/** National coding scheme an administrative code belongs to. */\nexport type AdministrativeCodeScheme =\n /**\n * French INSEE département code, e.g. \"69\" for Rhône, \"2A\" for Corse-du-Sud,\n * \"971\" for Guadeloupe. Carried by COUNTY divisions.\n */\n | 'INSEE_DEPARTMENT'\n /** French INSEE region code, e.g. \"11\" for Île-de-France. Carried by REGION divisions. */\n | 'INSEE_REGION';\n\n/** Federation reference to a Application owned by another subgraph. */\nexport type Application = Node & {\n __typename?: 'Application';\n /**\n * The owning company. Every member of it can manage this application, and\n * `Query.applications` spans them all, so this is what attributes a row to one.\n */\n company: Company;\n /** When the application was registered. */\n createdAt: Scalars['ISO8601DateTime']['output'];\n /** Who registered it. Confers no ownership: any member of the owning company can manage it. */\n createdBy: User;\n /**\n * Several may be active — chiefly to rotate without downtime. Throwaway CLI\n * session credentials are excluded unless asked for.\n */\n credentials: ApplicationCredentialConnection;\n /** Free-text note on what the application is for, or null. */\n description?: Maybe<Scalars['String']['output']>;\n /** GlobalID-encoded Application id. */\n id: Scalars['ID']['output'];\n /** Display name of the application. */\n name: Scalars['String']['output'];\n /**\n * Scopes every token minted from this application's credentials carries. The\n * same for every application and not a setting: reading Atlas contacts and\n * organizations, metered on the application's company.\n */\n scopes: Array<Scalars['String']['output']>;\n};\n\n\n/** Federation reference to a Application owned by another subgraph. */\nexport type ApplicationCredentialsArgs = {\n after?: InputMaybe<Scalars['String']['input']>;\n before?: InputMaybe<Scalars['String']['input']>;\n first?: InputMaybe<Scalars['Int']['input']>;\n includeSessions?: InputMaybe<Scalars['Boolean']['input']>;\n last?: InputMaybe<Scalars['Int']['input']>;\n};\n\n/** The connection type for Application. */\nexport type ApplicationConnection = {\n __typename?: 'ApplicationConnection';\n /** A list of edges. */\n edges?: Maybe<Array<Maybe<ApplicationEdge>>>;\n /** A list of nodes. */\n nodes?: Maybe<Array<Maybe<Application>>>;\n /** Information to aid in pagination. */\n pageInfo: PageInfo;\n /** Total number of items across all pages. */\n totalCount: Scalars['Int']['output'];\n};\n\n/** A client_id/client_secret pair. The secret is shown exactly once, at creation. */\nexport type ApplicationCredential = Node & {\n __typename?: 'ApplicationCredential';\n /** Public identifier of the credential, sent as client_id when requesting a token. */\n clientId: Scalars['String']['output'];\n /** When the credential was created. */\n createdAt: Scalars['ISO8601DateTime']['output'];\n /** Who registered it. Recorded, but absent from minted tokens: the subject is the application. */\n createdBy: User;\n /** Null for a credential that lives until revoked. */\n expiresAt?: Maybe<Scalars['ISO8601DateTime']['output']>;\n id: Scalars['ID']['output'];\n /** When this credential last obtained a token. Null if never used. */\n lastUsedAt?: Maybe<Scalars['ISO8601DateTime']['output']>;\n /** Human label, e.g. `rotation-2026-08`. Required: an unnamed credential among three is unmanageable. */\n name: Scalars['String']['output'];\n /** When the credential was revoked, or null unless revoked. Expiry is reported separately in `expiresAt`. */\n revokedAt?: Maybe<Scalars['ISO8601DateTime']['output']>;\n /** True for a throwaway credential minted for one CLI session and revoked immediately. */\n session: Scalars['Boolean']['output'];\n};\n\n/** The connection type for ApplicationCredential. */\nexport type ApplicationCredentialConnection = {\n __typename?: 'ApplicationCredentialConnection';\n /** A list of edges. */\n edges?: Maybe<Array<Maybe<ApplicationCredentialEdge>>>;\n /** A list of nodes. */\n nodes?: Maybe<Array<Maybe<ApplicationCredential>>>;\n /** Information to aid in pagination. */\n pageInfo: PageInfo;\n /** Total number of items across all pages. */\n totalCount: Scalars['Int']['output'];\n};\n\n/** An edge in a connection. */\nexport type ApplicationCredentialEdge = {\n __typename?: 'ApplicationCredentialEdge';\n /** A cursor for use in pagination. */\n cursor: Scalars['String']['output'];\n /** The item at the end of the edge. */\n node?: Maybe<ApplicationCredential>;\n};\n\n/** An edge in a connection. */\nexport type ApplicationEdge = {\n __typename?: 'ApplicationEdge';\n /** A cursor for use in pagination. */\n cursor: Scalars['String']['output'];\n /** The item at the end of the edge. */\n node?: Maybe<Application>;\n};\n\n/** Autogenerated input type of AuthenticateOutboundChannelAccount */\nexport type AuthenticateOutboundChannelAccountInput = {\n /**\n * Hostname the provider's sign-in page is served from instead of the provider's\n * own, e.g. `ln-auth.consumer.example`. Must be verified with the provider\n * beforehand; refused as `authentication_domain.invalid` when it is not a bare\n * hostname. Hosted-link providers only.\n */\n authenticationDomain?: InputMaybe<Scalars['String']['input']>;\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: InputMaybe<Scalars['String']['input']>;\n /**\n * Where the owner signs in from, as an ISO 3166-1 alpha-2 code. The provider\n * exits from that country so the member's session keeps the origin it has always\n * had. A country the provider cannot exit from is ignored rather than refused,\n * and the provider picks one itself — as it does when none is given. Only read\n * on the hosted path; the credentials path carries its own.\n */\n countryCode?: InputMaybe<Scalars['String']['input']>;\n /**\n * The owner's credentials, for a provider that authenticates with them. Verified\n * at the channel before this returns; refused as `credentials.rejected` when the\n * channel does not accept them and as `credentials.unsupported` on a hosted-link provider.\n */\n credentials?: InputMaybe<OutboundChannelAccountCredentialsInput>;\n /** Global id of the channel account to authenticate. */\n id: Scalars['ID']['input'];\n /**\n * Provider to authenticate on. Defaults to the account's running connection's\n * provider. Naming another one opens a new connection beside it; once that\n * connection is confirmed the account works through it and the previous one is\n * released — same id, same conversations. Refused as `provider.unknown` when it\n * does not serve the channel.\n */\n provider?: InputMaybe<OutboundChannelProvider>;\n /**\n * HTTPS address the owner's browser is sent back to after the provider's page.\n * Required by hosted-link providers (`return_url.blank` otherwise).\n * Display-only: its query string must never be trusted as the result. For\n * `google` and `microsoft` it is the consumer's OAuth callback, which hands the\n * `code` and `state` it receives to `completeOutboundChannelAuthentication`; it\n * must be one of the redirect addresses registered for the gateway\n * (`return_url.not_allowed` otherwise).\n */\n returnUrl?: InputMaybe<Scalars['String']['input']>;\n};\n\n/** Autogenerated return type of AuthenticateOutboundChannelAccount. */\nexport type AuthenticateOutboundChannelAccountPayload = Node & {\n __typename?: 'AuthenticateOutboundChannelAccountPayload';\n /** The step the account owner has to complete, or its acceptance. */\n authentication: OutboundChannelAccountAuthentication;\n /** The account the attempt was started on, unchanged. */\n channelAccount: OutboundChannelAccount;\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: Maybe<Scalars['String']['output']>;\n id: Scalars['ID']['output'];\n};\n\n/** A Stripe Checkout session opened for a company, in embedded mode. */\nexport type BillingCheckoutSession = {\n __typename?: 'BillingCheckoutSession';\n /**\n * Hand to Stripe.js' `<EmbeddedCheckoutProvider>` to mount the payment form in\n * place. Single-use and short-lived; request a new session rather than storing it.\n */\n clientSecret: Scalars['String']['output'];\n};\n\n/**\n * A grant of credits to a customer: a plan allowance, a trial, a pack or top-up, a\n * promo, a migrated balance, or credits given back by a refund or a correction.\n */\nexport type BillingCredit = Node & {\n __typename?: 'BillingCredit';\n /** Granted credits. Always greater than 0. */\n amount: Scalars['Float']['output'];\n /** When this credit was granted. */\n createdAt: Scalars['ISO8601DateTime']['output'];\n /**\n * For a refund or correction credit, the debit whose charge it reduces. Null for\n * every other kind, and when it reduces an overage.\n */\n debit?: Maybe<BillingDebit>;\n /** Free-form label describing the grant origin. */\n description?: Maybe<Scalars['String']['output']>;\n /** When the unconsumed portion of this grant expires. */\n expiresAt: Scalars['ISO8601DateTime']['output'];\n /** Credit UUID. */\n id: Scalars['ID']['output'];\n /**\n * The Stripe invoice whose line granted this credit. Null for credits no invoice\n * backs: trials, promos, migrated balances, refunds and corrections, whose\n * provenance is their debit's credit instead.\n */\n invoice?: Maybe<BillingInvoice>;\n /** One of: granted, trial, pack, topup, promo, migrated, refund, correction. */\n kind: Scalars['String']['output'];\n /** For a refund or correction credit that reduces an overage, that overage. Null otherwise. */\n overage?: Maybe<BillingOverage>;\n /**\n * Why the credit was granted, as the caller of grantPromotionalCredits,\n * refundDebit or correctDebit gave it. Null for credits billing grants itself.\n */\n reason?: Maybe<Scalars['String']['output']>;\n /**\n * The reference refundDebit received, such as the caller's refund request id.\n * Null when the caller gave none, and for every other kind.\n */\n reference?: Maybe<Scalars['String']['output']>;\n /** Credits still available on this grant: amount minus any debits drawn from it. */\n remaining: Scalars['Float']['output'];\n /**\n * For a refund or correction, the original revenue date of what it reduces: the\n * debit's revenueRecognizedAt or the overage's occurredAt. amount × unitPriceEur\n * is subtracted from the revenue recognized at that date. Null for every other credit.\n */\n revenueReversedAt?: Maybe<Scalars['ISO8601DateTime']['output']>;\n /** Per-credit price (EUR) when this grant was created, used for revenue recognition on debits. */\n unitPriceEur: Scalars['Float']['output'];\n};\n\n/** The connection type for BillingCredit. */\nexport type BillingCreditConnection = {\n __typename?: 'BillingCreditConnection';\n /** A list of edges. */\n edges?: Maybe<Array<Maybe<BillingCreditEdge>>>;\n /** A list of nodes. */\n nodes?: Maybe<Array<Maybe<BillingCredit>>>;\n /** Information to aid in pagination. */\n pageInfo: PageInfo;\n /**\n * Sum of granted `amount` over every credit in the filtered set — the total\n * credits originally granted. Use as the denominator of a usage gauge when\n * filtered by `expired: false`.\n */\n totalAmount: Scalars['Float']['output'];\n /** Total number of items across all pages. */\n totalCount: Scalars['Int']['output'];\n /**\n * Sum of `remaining` (amount − debits drawn) over every credit in the filtered\n * set — credits still available to consume. `total_amount − total_remaining` is\n * the consumption so far.\n */\n totalRemaining: Scalars['Float']['output'];\n};\n\n/** An edge in a connection. */\nexport type BillingCreditEdge = {\n __typename?: 'BillingCreditEdge';\n /** A cursor for use in pagination. */\n cursor: Scalars['String']['output'];\n /** The item at the end of the edge. */\n node?: Maybe<BillingCredit>;\n};\n\n/** Filter arguments for a customer's credits connection. Axes combine with AND. */\nexport type BillingCreditFilterInput = {\n /** Keep only the credits granted in this window. */\n createdAt?: InputMaybe<DateTimeFilterInput>;\n /**\n * Keep only the credits expiring in this window, e.g. `{ gteq: <now>, lteq: <now\n * + 30 days> }` for those expiring within 30 days.\n */\n expiresAt?: InputMaybe<DateTimeFilterInput>;\n /** Keep only the credits of these kinds. */\n kind?: InputMaybe<BillingCreditKindFilterInput>;\n};\n\n/**\n * Why a customer holds a credit grant. Billing writes every kind itself;\n * grantPromotionalCredits is the only caller-facing way to grant one, and it writes PROMO.\n */\nexport type BillingCreditKind =\n /** Credits given back when a consumption's cost is lowered, linked to the debit or overage they reduce. */\n | 'CORRECTION'\n /** A paid plan invoice line. */\n | 'GRANTED'\n /** An open balance carried over from another ledger. */\n | 'MIGRATED'\n /** A purchased credit pack. */\n | 'PACK'\n /** A free promotional grant, priced at 0. */\n | 'PROMO'\n /** Credits given back for a refunded consumption, linked to the debit they refund. */\n | 'REFUND'\n /** A one-off top-up purchase. */\n | 'TOPUP'\n /** A subscription trial's taster allowance. */\n | 'TRIAL';\n\n/** Filter on a credit's kind (eq/in/notEq/notIn). */\nexport type BillingCreditKindFilterInput = {\n /** Exact match. */\n eq?: InputMaybe<BillingCreditKind>;\n /** Match any of these values. */\n in?: InputMaybe<Array<BillingCreditKind>>;\n /** Exclude exact match. */\n notEq?: InputMaybe<BillingCreditKind>;\n /** Exclude any of these values. */\n notIn?: InputMaybe<Array<BillingCreditKind>>;\n};\n\n/**\n * A customer in the billing subgraph, one per tenant of the calling service.\n * Services read it through billingCustomer with billing/customer:read; a person\n * reaches it only through Hermes' Company.billingCustomer, which Hermes resolves\n * for the company's members.\n */\nexport type BillingCustomer = Node & {\n __typename?: 'BillingCustomer';\n /**\n * The customer's active subscription (one of trialing, active, past_due, unpaid,\n * paused, incomplete), or null. A customer holds at most one at a time; the\n * newest is returned if several exist.\n */\n activeSubscription?: Maybe<BillingSubscription>;\n /** ISO 3166-1 alpha-2 country code, captured from Stripe Checkout / Customer Portal. */\n countryCode?: Maybe<Scalars['String']['output']>;\n /** Derived credit balance: SUM(credits.amount) - SUM(debits.amount). Always 0 for a newly-created customer. */\n creditBalance: Scalars['Float']['output'];\n /** Paginated credits granted to this customer, newest first. Optionally filter by expiry status via the `expired` argument. */\n credits: BillingCreditConnection;\n /**\n * The customer's settlement currency, lowercase ISO — the single source of truth\n * for price display and checkout pinning. Locked at the first successful invoice\n * payment; null before that (the product or Stripe Adaptive Pricing pick per\n * request). Manually overridable for specific customers.\n */\n currency?: Maybe<Scalars['String']['output']>;\n /** Paginated debits drawn from this customer's credits, newest first: consumptions, expirations and withdrawals. */\n debits: BillingDebitConnection;\n /** Snapshot of the customer's default Stripe payment method (brand + last4 + expiry). Null until the customer adds a card. */\n defaultPaymentMethod?: Maybe<BillingPaymentMethod>;\n /** Customer's billing email, mirrored from Stripe. May lag the user's email until the next customer.updated webhook. */\n email?: Maybe<Scalars['String']['output']>;\n /** Billing customer UUID, stored on the owning service's company record. */\n id: Scalars['ID']['output'];\n /** Paginated invoices and credit notes for this customer, newest first. */\n invoices: BillingInvoiceConnection;\n /**\n * Net revenue the customer has paid, ex-VAT, in EUR cents: all invoice payments\n * minus all refunded credit notes, each stripped of its VAT share and converted\n * at its document's frozen FX rate. Credits applied to the customer balance or\n * booked out of band are not deductions (no money moved). Recomputed live, so\n * later corrections are reflected.\n */\n lifetimePaidCents: Scalars['Int']['output'];\n /**\n * Paginated overages of this customer, newest first: the consumption credits did\n * not cover. Recorded, not yet reported for billing.\n */\n overages: BillingOverageConnection;\n /**\n * Product this customer belongs to. Decides the Stripe account and plan catalog;\n * credits and subscriptions never cross products.\n */\n product: BillingProduct;\n /** Customer's VAT number for EU customers, captured by Stripe at Checkout. */\n vatId?: Maybe<Scalars['String']['output']>;\n /** Stripe VAT verification status. One of: pending, verified, unverified, unavailable. */\n vatIdStatus?: Maybe<Scalars['String']['output']>;\n};\n\n\n/**\n * A customer in the billing subgraph, one per tenant of the calling service.\n * Services read it through billingCustomer with billing/customer:read; a person\n * reaches it only through Hermes' Company.billingCustomer, which Hermes resolves\n * for the company's members.\n */\nexport type BillingCustomerCreditsArgs = {\n after?: InputMaybe<Scalars['String']['input']>;\n before?: InputMaybe<Scalars['String']['input']>;\n expired?: InputMaybe<Scalars['Boolean']['input']>;\n filter?: InputMaybe<BillingCreditFilterInput>;\n first?: InputMaybe<Scalars['Int']['input']>;\n last?: InputMaybe<Scalars['Int']['input']>;\n};\n\n\n/**\n * A customer in the billing subgraph, one per tenant of the calling service.\n * Services read it through billingCustomer with billing/customer:read; a person\n * reaches it only through Hermes' Company.billingCustomer, which Hermes resolves\n * for the company's members.\n */\nexport type BillingCustomerDebitsArgs = {\n after?: InputMaybe<Scalars['String']['input']>;\n before?: InputMaybe<Scalars['String']['input']>;\n filter?: InputMaybe<BillingDebitFilterInput>;\n first?: InputMaybe<Scalars['Int']['input']>;\n last?: InputMaybe<Scalars['Int']['input']>;\n};\n\n\n/**\n * A customer in the billing subgraph, one per tenant of the calling service.\n * Services read it through billingCustomer with billing/customer:read; a person\n * reaches it only through Hermes' Company.billingCustomer, which Hermes resolves\n * for the company's members.\n */\nexport type BillingCustomerInvoicesArgs = {\n after?: InputMaybe<Scalars['String']['input']>;\n before?: InputMaybe<Scalars['String']['input']>;\n first?: InputMaybe<Scalars['Int']['input']>;\n last?: InputMaybe<Scalars['Int']['input']>;\n};\n\n\n/**\n * A customer in the billing subgraph, one per tenant of the calling service.\n * Services read it through billingCustomer with billing/customer:read; a person\n * reaches it only through Hermes' Company.billingCustomer, which Hermes resolves\n * for the company's members.\n */\nexport type BillingCustomerOveragesArgs = {\n after?: InputMaybe<Scalars['String']['input']>;\n before?: InputMaybe<Scalars['String']['input']>;\n filter?: InputMaybe<BillingOverageFilterInput>;\n first?: InputMaybe<Scalars['Int']['input']>;\n last?: InputMaybe<Scalars['Int']['input']>;\n};\n\n/** A positive draw against a customer's credits — consumption, expiration, or withdrawal. */\nexport type BillingDebit = Node & {\n __typename?: 'BillingDebit';\n /**\n * For a consumption debit written by correctDebit to raise a cost, the\n * consumable's first debit, which it adds to. Null otherwise.\n */\n adjustedDebit?: Maybe<BillingDebit>;\n /** Credits drawn by this debit. Always greater than 0. */\n amount: Scalars['Float']['output'];\n /** UUID of the consumed record. Set only when source is consumption. */\n consumableId?: Maybe<Scalars['ID']['output']>;\n /** AR class name of the consumed record (e.g. \"Lead\", \"Message\"). Set only when source is consumption. */\n consumableType?: Maybe<Scalars['String']['output']>;\n /** When this debit row was created. */\n createdAt: Scalars['ISO8601DateTime']['output'];\n /** The credit grant this debit drew from: follow its invoice to the invoice that sold the credits. */\n credit: BillingCredit;\n /** Free-form note — the consumer's label, or the refund charge id on withdrawals. */\n description?: Maybe<Scalars['String']['output']>;\n /** Debit UUID. */\n id: Scalars['ID']['output'];\n /** When this entry was recorded for revenue. */\n revenueRecognizedAt: Scalars['ISO8601DateTime']['output'];\n /** One of: consumption, expiration, withdrawal. */\n source: Scalars['String']['output'];\n /**\n * EUR per credit this debit recognizes as revenue: the unit price of the credit\n * it drew from, 0 once a Stripe credit note refunded that credit.\n */\n unitPriceEur: Scalars['Float']['output'];\n};\n\n/** The connection type for BillingDebit. */\nexport type BillingDebitConnection = {\n __typename?: 'BillingDebitConnection';\n /** A list of edges. */\n edges?: Maybe<Array<Maybe<BillingDebitEdge>>>;\n /** A list of nodes. */\n nodes?: Maybe<Array<Maybe<BillingDebit>>>;\n /** Information to aid in pagination. */\n pageInfo: PageInfo;\n /** Total number of items across all pages. */\n totalCount: Scalars['Int']['output'];\n};\n\n/** An edge in a connection. */\nexport type BillingDebitEdge = {\n __typename?: 'BillingDebitEdge';\n /** A cursor for use in pagination. */\n cursor: Scalars['String']['output'];\n /** The item at the end of the edge. */\n node?: Maybe<BillingDebit>;\n};\n\n/** Filter arguments for a customer's debits connection. Axes combine with AND. */\nexport type BillingDebitFilterInput = {\n /** Keep only the debits of these consumed records, by the id the caller gave debitCredits. */\n consumableId?: InputMaybe<StringFilterInput>;\n /** Keep only the debits of these consumable types, e.g. `{ in: [\"Opportunity\"] }`. */\n consumableType?: InputMaybe<StringFilterInput>;\n /** Keep only the debits written in this window. */\n createdAt?: InputMaybe<DateTimeFilterInput>;\n /** Keep only the debits of these sources: consumption, expiration or withdrawal. */\n source?: InputMaybe<StringFilterInput>;\n};\n\n/** A mirrored Stripe invoice (or credit note). One row per Stripe object. */\nexport type BillingInvoice = Node & {\n __typename?: 'BillingInvoice';\n /** Amount paid in the transaction currency. */\n amountPaid: Scalars['Float']['output'];\n /** Outstanding balance in the transaction currency. Zero on a fully-paid invoice. */\n amountRemaining: Scalars['Float']['output'];\n /** True for credit-note rows (refund); false for regular invoices. */\n creditNote: Scalars['Boolean']['output'];\n /** Transaction currency — ISO 4217 lowercase (\"eur\", \"usd\", ...). */\n currency: Scalars['String']['output'];\n /** Stripe-hosted invoice page. May be null on credit-note rows. */\n hostedInvoiceUrl?: Maybe<Scalars['String']['output']>;\n id: Scalars['ID']['output'];\n /** When the invoice was finalized in Stripe. */\n issuedAt?: Maybe<Scalars['ISO8601DateTime']['output']>;\n /** Human-readable Stripe invoice number (\"INV-001\"). Null until finalized. */\n number?: Maybe<Scalars['String']['output']>;\n /** When payment was captured. Null on unpaid or credit-note rows. */\n paidAt?: Maybe<Scalars['ISO8601DateTime']['output']>;\n /** On credit-note rows, the parent invoice being refunded. Null on regular invoices. */\n parentInvoice?: Maybe<BillingInvoice>;\n /**\n * URL to the billing service's PDF passthrough endpoint. The endpoint fetches a\n * fresh signed URL from Stripe and 302s to it. Null until the invoice is finalized.\n */\n pdfUrl?: Maybe<Scalars['String']['output']>;\n /** End of the billing period this invoice covers (subscriptions). */\n periodEnd?: Maybe<Scalars['ISO8601DateTime']['output']>;\n /** Start of the billing period this invoice covers (subscriptions). */\n periodStart?: Maybe<Scalars['ISO8601DateTime']['output']>;\n /** Stripe's verbatim invoice status. One of: draft, open, paid, void, uncollectible — or for credit notes: issued, void. */\n status: Scalars['String']['output'];\n /** Pre-tax subtotal in the transaction currency. */\n subtotal: Scalars['Float']['output'];\n /** Tax applied in the transaction currency. */\n tax: Scalars['Float']['output'];\n /** Final total in the transaction currency. */\n total: Scalars['Float']['output'];\n};\n\n/** The connection type for BillingInvoice. */\nexport type BillingInvoiceConnection = {\n __typename?: 'BillingInvoiceConnection';\n /** A list of edges. */\n edges?: Maybe<Array<Maybe<BillingInvoiceEdge>>>;\n /** A list of nodes. */\n nodes?: Maybe<Array<Maybe<BillingInvoice>>>;\n /** Information to aid in pagination. */\n pageInfo: PageInfo;\n /** Total number of items across all pages. */\n totalCount: Scalars['Int']['output'];\n};\n\n/** An edge in a connection. */\nexport type BillingInvoiceEdge = {\n __typename?: 'BillingInvoiceEdge';\n /** A cursor for use in pagination. */\n cursor: Scalars['String']['output'];\n /** The item at the end of the edge. */\n node?: Maybe<BillingInvoice>;\n};\n\n/**\n * The part of a consumption that credits did not cover, written when debitCredits\n * or correctDebit runs with allowOverage. Recorded, not yet reported for billing:\n * reportedAt stays null until a later release reports overages. Lowering one gives\n * the customer CORRECTION credits instead of rewriting it.\n */\nexport type BillingOverage = Node & {\n __typename?: 'BillingOverage';\n /** Credits not covered. Greater than 0. */\n amount: Scalars['Float']['output'];\n /** Id of the consumed record, as the caller gave it. */\n consumableId: Scalars['ID']['output'];\n /** Type of the consumed record, as the caller gave it. */\n consumableType: Scalars['String']['output'];\n /** When this row was written. */\n createdAt: Scalars['ISO8601DateTime']['output'];\n /** The caller's label for the consumption. Null when the caller gave none. */\n description?: Maybe<Scalars['String']['output']>;\n /** Global id of the overage. */\n id: Scalars['ID']['output'];\n /** When the consumption happened. */\n occurredAt: Scalars['ISO8601DateTime']['output'];\n /** When the overage was reported for billing. Null until then; nothing reports overages yet. */\n reportedAt?: Maybe<Scalars['ISO8601DateTime']['output']>;\n /** EUR per credit the overage is billed at, and recognized as revenue at occurredAt. Always 1.0: one credit is one euro. */\n unitPriceEur: Scalars['Float']['output'];\n};\n\n/** The connection type for BillingOverage. */\nexport type BillingOverageConnection = {\n __typename?: 'BillingOverageConnection';\n /** A list of edges. */\n edges?: Maybe<Array<Maybe<BillingOverageEdge>>>;\n /** A list of nodes. */\n nodes?: Maybe<Array<Maybe<BillingOverage>>>;\n /** Information to aid in pagination. */\n pageInfo: PageInfo;\n /** Total number of items across all pages. */\n totalCount: Scalars['Int']['output'];\n};\n\n/** An edge in a connection. */\nexport type BillingOverageEdge = {\n __typename?: 'BillingOverageEdge';\n /** A cursor for use in pagination. */\n cursor: Scalars['String']['output'];\n /** The item at the end of the edge. */\n node?: Maybe<BillingOverage>;\n};\n\n/** Filter arguments for a customer's overages connection. Axes combine with AND. */\nexport type BillingOverageFilterInput = {\n /** Keep only the overages of these consumed records. */\n consumableId?: InputMaybe<StringFilterInput>;\n /** Keep only the overages of these consumable types. */\n consumableType?: InputMaybe<StringFilterInput>;\n /** Keep only the overages whose consumption happened in this window. */\n occurredAt?: InputMaybe<DateTimeFilterInput>;\n};\n\n/** Denormalized snapshot of a customer's default payment method, mirrored from Stripe. */\nexport type BillingPaymentMethod = {\n __typename?: 'BillingPaymentMethod';\n /** Card brand: visa, mastercard, amex, etc. */\n brand?: Maybe<Scalars['String']['output']>;\n /** Card expiration month (1-12), as reported by Stripe. */\n expMonth?: Maybe<Scalars['Int']['output']>;\n /** Card expiration year (4-digit), as reported by Stripe. */\n expYear?: Maybe<Scalars['Int']['output']>;\n /** Last 4 digits of the card number, as reported by Stripe. */\n last4?: Maybe<Scalars['String']['output']>;\n};\n\n/** Subscription billing periodicity. */\nexport type BillingPeriodicity =\n /** Billed annually (12% off vs monthly). */\n | 'ANNUAL'\n /** Billed monthly. */\n | 'MONTHLY';\n\n/** A single (plan, periodicity) row from a product's static plan catalog. */\nexport type BillingPlanCatalogEntry = Node & {\n __typename?: 'BillingPlanCatalogEntry';\n /** Exact total fee per period in EUR (the annual entries carry the full yearly amount). */\n feeEur: Scalars['Float']['output'];\n id: Scalars['ID']['output'];\n /** Credits granted on each paid invoice for this plan. Annual entries grant the full yearly pool at once. */\n includedCredits: Scalars['Int']['output'];\n /** Plan tier. */\n name: BillingPlanName;\n /** Whether the plan offers a self-serve trial. */\n offersTrial: Scalars['Boolean']['output'];\n /** Billing periodicity. */\n periodicity: BillingPeriodicity;\n /** Credits granted at trial start, expiring at trial end. Zero when the plan offers no trial. */\n trialCredits: Scalars['Int']['output'];\n /** Trial length in days. Zero when the plan offers no trial. */\n trialDays: Scalars['Int']['output'];\n};\n\n/**\n * Subscription plan tier of the Max catalog. Tiers differ by monthly credit\n * allowance and price; annual periodicity grants the yearly pool at once.\n */\nexport type BillingPlanName =\n /** Grow — developer catalog. */\n | 'GROW'\n /** Pro 500 — 5,000 credits/month. */\n | 'PRO_500'\n /** Pro 1,500 — 15,000 credits/month. */\n | 'PRO_1500'\n /** Pro 3,000 — 30,000 credits/month. */\n | 'PRO_3000'\n /** Pro 6,000 — 60,000 credits/month. */\n | 'PRO_6000'\n /** Pro 10,000 — 100,000 credits/month. */\n | 'PRO_10000'\n /** Scale — developer catalog. */\n | 'SCALE'\n /** Start — developer catalog. */\n | 'START'\n /** Starter — 1,000 credits/month. */\n | 'STARTER';\n\n/** A Stripe customer portal session opened for a company. */\nexport type BillingPortalSession = {\n __typename?: 'BillingPortalSession';\n /**\n * Hosted Stripe page for replacing the card and reading invoice history.\n * Single-use and short-lived; redirect to it immediately.\n */\n url: Scalars['String']['output'];\n};\n\n/**\n * Sortlist product a billing customer belongs to. Each product runs on its own\n * Stripe account with its own plan catalog; credits, subscriptions, and invoices\n * never cross products.\n */\nexport type BillingProduct =\n /** The developer portal's API access, on its own dedicated Stripe account. */\n | 'DEVELOPER'\n /** The original shared Stripe account — the old Max app's billing and the marketplace's Recurly payment-gateway traffic. */\n | 'LEGACY'\n /** The new Max product (rebuilt app replacing the old Max, keeping the name), on its own dedicated Stripe account. */\n | 'MAX';\n\n/**\n * A mirrored Stripe subscription. Plan tier is identified by the subscription's\n * plan-item Price (`PlanCatalog.find_by_stripe_price_id`).\n */\nexport type BillingSubscription = Node & {\n __typename?: 'BillingSubscription';\n /** Whether the subscription will end at `currentPeriodEnd` (Stripe-side cancel). */\n cancelAtPeriodEnd: Scalars['Boolean']['output'];\n /** When the subscription was canceled, or null if still active. */\n canceledAt?: Maybe<Scalars['ISO8601DateTime']['output']>;\n /** Credits the customer is entitled to per period (from `PlanCatalog#included_credits`). */\n creditsPerPeriod: Scalars['Float']['output'];\n /** End of the current billing period. */\n currentPeriodEnd?: Maybe<Scalars['ISO8601DateTime']['output']>;\n /** Start of the current billing period. */\n currentPeriodStart?: Maybe<Scalars['ISO8601DateTime']['output']>;\n id: Scalars['ID']['output'];\n /** Stripe billing interval string: day / week / month / year. */\n interval: Scalars['String']['output'];\n /** Interval multiplier (1 = every interval). */\n intervalCount: Scalars['Int']['output'];\n /**\n * Realized monthly rate in EUR cents, net of coupon discounts and inclusive VAT\n * — derived from the latest posted renewal invoice, spread over the months its\n * period covers and converted from the invoice's charge currency at its frozen\n * FX rate, so values are safe to aggregate across currencies. Falls back to the\n * catalog's gross monthly fee for trials and never-invoiced subscriptions.\n * Parity source for legacy product MRR columns.\n */\n netMonthlyFeeCents: Scalars['Int']['output'];\n /**\n * Scheduled plan change applying at the next bill date (a deferred downgrade or\n * lateral move, backed by a Stripe Subscription Schedule). Null when none is\n * pending. Cancel for free via cancelBillingSubscriptionChange.\n */\n pendingChange?: Maybe<BillingSubscriptionPendingChange>;\n /** Derived from the Stripe interval. Null on intervals we don't model. */\n periodicity?: Maybe<BillingPeriodicity>;\n /** Plan tier looked up from the stored stripe_price_id. Null when the Price doesn't match a known plan. */\n plan?: Maybe<BillingPlanName>;\n /** When the subscription was first created in Stripe. */\n startedAt?: Maybe<Scalars['ISO8601DateTime']['output']>;\n /** Stripe verbatim status (active, trialing, past_due, canceled, ...). */\n status: Scalars['String']['output'];\n};\n\n/**\n * A scheduled plan change waiting to apply at the subscription's next bill date,\n * backed by a Stripe Subscription Schedule. The current plan — credits and limits\n * — stays fully in force until then.\n */\nexport type BillingSubscriptionPendingChange = Node & {\n __typename?: 'BillingSubscriptionPendingChange';\n /** When the change applies: the end of the current billing period. */\n effectiveAt?: Maybe<Scalars['ISO8601DateTime']['output']>;\n id: Scalars['ID']['output'];\n /** Periodicity the subscription switches to. */\n periodicity: BillingPeriodicity;\n /** Plan tier the subscription switches to. */\n plan: BillingPlanName;\n};\n\n/** Autogenerated input type of CancelBillingCustomerSubscriptions */\nexport type CancelBillingCustomerSubscriptionsInput = {\n /** Billing customer UUID whose active subscriptions are canceled. The owning service stores this on its company record. */\n billingCustomerId: Scalars['ID']['input'];\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: InputMaybe<Scalars['String']['input']>;\n};\n\n/** Autogenerated return type of CancelBillingCustomerSubscriptions. */\nexport type CancelBillingCustomerSubscriptionsPayload = Node & {\n __typename?: 'CancelBillingCustomerSubscriptionsPayload';\n /** Number of subscriptions canceled by this call. Zero when the customer had no active subscription. */\n canceledCount: Scalars['Int']['output'];\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: Maybe<Scalars['String']['output']>;\n id: Scalars['ID']['output'];\n};\n\n/** Autogenerated input type of CancelBillingSubscriptionChange */\nexport type CancelBillingSubscriptionChangeInput = {\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: InputMaybe<Scalars['String']['input']>;\n /** Target subscription global id. */\n subscriptionId: Scalars['ID']['input'];\n};\n\n/** Autogenerated return type of CancelBillingSubscriptionChange. */\nexport type CancelBillingSubscriptionChangePayload = Node & {\n __typename?: 'CancelBillingSubscriptionChangePayload';\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: Maybe<Scalars['String']['output']>;\n id: Scalars['ID']['output'];\n /** The subscription, with pendingChange cleared. */\n subscription: BillingSubscription;\n};\n\n/** Autogenerated input type of CancelCompanySubscription */\nexport type CancelCompanySubscriptionInput = {\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: InputMaybe<Scalars['String']['input']>;\n /** The company whose subscription is ending. Every member may end it — there are no roles. */\n companyId: Scalars['ID']['input'];\n};\n\n/** Autogenerated input type of CancelOutboundChannelActions */\nexport type CancelOutboundChannelActionsInput = {\n /** Global id of the account the actions belong to. */\n channelAccountId: Scalars['ID']['input'];\n /** Global ids of the actions to stop, at most 100. Ids of another account's actions come back as `UNKNOWN`. */\n channelActionIds: Array<Scalars['ID']['input']>;\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: InputMaybe<Scalars['String']['input']>;\n};\n\n/** Autogenerated return type of CancelOutboundChannelActions. */\nexport type CancelOutboundChannelActionsPayload = Node & {\n __typename?: 'CancelOutboundChannelActionsPayload';\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: Maybe<Scalars['String']['output']>;\n id: Scalars['ID']['output'];\n /** One entry per id passed in, in the same order. */\n results: Array<OutboundChannelActionCancellationResult>;\n};\n\n/** A single entry in a contact's career history: a work-experience role, degree, certification, award, or publication. */\nexport type CareerEntry = Node & {\n __typename?: 'CareerEntry';\n /** Free-text description of the entry as provided by the source. */\n description?: Maybe<Scalars['String']['output']>;\n /** End date of the entry (upper bound of its period), or null when the entry is ongoing or the source gave no end date. */\n endedOn?: Maybe<Scalars['ISO8601Date']['output']>;\n id: Scalars['ID']['output'];\n /** Which kind of career entry this is. */\n kind: CareerEntryKind;\n /**\n * The organization this entry links to (e.g. the employer or school), or null\n * when it could not be resolved to a known record.\n */\n organization?: Maybe<Organization>;\n /** Start date of the entry (lower bound of its period), or null when the source gave no start date. */\n startedOn?: Maybe<Scalars['ISO8601Date']['output']>;\n /** The entry's headline — role title, degree, certification name, award title, or publication title depending on kind. */\n title?: Maybe<Scalars['String']['output']>;\n /** Source URL for the entry (e.g. the credential link), or null. */\n url?: Maybe<Scalars['String']['output']>;\n};\n\n/** The connection type for CareerEntry. */\nexport type CareerEntryConnection = {\n __typename?: 'CareerEntryConnection';\n /**\n * Estimated total number of items across all pages. It comes from the query\n * planner rather than a count, so it costs planning time instead of a scan and\n * cannot exceed the statement timeout. It is approximate at every magnitude,\n * including small ones, and it moves when the table's statistics are refreshed.\n * Accuracy depends on the filter: within a few percent on plain column and\n * array-overlap filters, and as much as 30% out on a range filter such as\n * `companySize`. It is not meaningful for the embedding filters `jobTitle` and\n * `industry` — no statistics exist for a vector-distance predicate, so the\n * estimate ignores the distance threshold entirely and approximates only what\n * the other filters admit; it has been measured reporting 241371 for a filter\n * whose true result was empty. Never render it as an exact figure, and use\n * `totalCount` when the figure has to be exact.\n */\n approximateTotalCount: Scalars['Int']['output'];\n /** A list of edges. */\n edges?: Maybe<Array<Maybe<CareerEntryEdge>>>;\n /** A list of nodes. */\n nodes?: Maybe<Array<Maybe<CareerEntry>>>;\n /** Information to aid in pagination. */\n pageInfo: PageInfo;\n /** Total number of items across all pages, exact unless `upTo` is given. */\n totalCount: Scalars['Int']['output'];\n};\n\n\n/** The connection type for CareerEntry. */\nexport type CareerEntryConnectionTotalCountArgs = {\n upTo?: InputMaybe<Scalars['Int']['input']>;\n};\n\n/** An edge in a connection. */\nexport type CareerEntryEdge = Node & {\n __typename?: 'CareerEntryEdge';\n /** A cursor for use in pagination. */\n cursor: Scalars['String']['output'];\n id: Scalars['ID']['output'];\n /** The item at the end of the edge. */\n node?: Maybe<CareerEntry>;\n};\n\n/** The kind of entry in a contact's career history. */\nexport type CareerEntryKind =\n /** An award or honor received. */\n | 'AWARD'\n /** A professional certification. */\n | 'CERTIFICATION'\n /** A degree or course of study. */\n | 'EDUCATION'\n /** A past or current work-experience role. */\n | 'EXPERIENCE'\n /** An authored publication. */\n | 'PUBLICATION';\n\n/** Filter on career-entry kind with schema-validated enum values. */\nexport type CareerEntryKindFilterInput = {\n /** Exact match. */\n eq?: InputMaybe<CareerEntryKind>;\n /** Match any of these values. */\n in?: InputMaybe<Array<CareerEntryKind>>;\n /** Exclude exact match. */\n notEq?: InputMaybe<CareerEntryKind>;\n /** Exclude any of these values. */\n notIn?: InputMaybe<Array<CareerEntryKind>>;\n};\n\n/** Autogenerated input type of ChangeBillingSubscription */\nexport type ChangeBillingSubscriptionInput = {\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: InputMaybe<Scalars['String']['input']>;\n /** Target periodicity. Omit to keep the current one. */\n periodicity?: InputMaybe<BillingPeriodicity>;\n /** Target plan tier. Omit to keep the current one. */\n plan?: InputMaybe<BillingPlanName>;\n /** Target subscription global id. */\n subscriptionId: Scalars['ID']['input'];\n};\n\n/** Autogenerated return type of ChangeBillingSubscription. */\nexport type ChangeBillingSubscriptionPayload = Node & {\n __typename?: 'ChangeBillingSubscriptionPayload';\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: Maybe<Scalars['String']['output']>;\n id: Scalars['ID']['output'];\n /** The subscription with its refreshed plan mirror. */\n subscription: BillingSubscription;\n};\n\n/** Autogenerated input type of ChangeCompanySubscription */\nexport type ChangeCompanySubscriptionInput = {\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: InputMaybe<Scalars['String']['input']>;\n /** The company whose subscription is changing. Every member may change it — there are no roles. */\n companyId: Scalars['ID']['input'];\n /** MONTHLY or ANNUAL. Unset keeps the current one. */\n periodicity?: InputMaybe<Scalars['String']['input']>;\n /** Tier name from `billingPlanCatalog(product:)`. Unset keeps the current one, so periodicity can change alone. */\n plan?: InputMaybe<Scalars['String']['input']>;\n};\n\n/** Federation reference to a Company owned by another subgraph. */\nexport type Company = Node & {\n __typename?: 'Company';\n /** Applications owned by this company. */\n applications: ApplicationConnection;\n /**\n * The company's customer in the billing subgraph, or null until it first touches\n * billing. Null as well for a caller who is neither a member of the company nor\n * staff, however the company was reached. The id itself is deliberately not\n * exposed: this field is the only way a person reaches a billing customer, which\n * is what scopes billing reads to their own tenant.\n */\n billingCustomer?: Maybe<BillingCustomer>;\n /** When the company was created. */\n createdAt: Scalars['ISO8601DateTime']['output'];\n /** GlobalID-encoded Company id. */\n id: Scalars['ID']['output'];\n /** Offers to join, in every state. */\n invitations: CompanyInvitationConnection;\n /** Every member can manage every application and credential this company owns. */\n members: CompanyMemberConnection;\n /** Display name. Not unique. */\n name: Scalars['String']['output'];\n /**\n * True when this is the calling user's private company. A relationship to the\n * caller rather than a property of the company, so it is resolved against them.\n */\n personal: Scalars['Boolean']['output'];\n /**\n * Readable, unique handle, derived from the name when the company is created and\n * never rewritten afterwards — a URL built from one does not break when the\n * company is renamed. Prefer it to `id` for addressing a company in a path.\n */\n slug: Scalars['String']['output'];\n};\n\n\n/** Federation reference to a Company owned by another subgraph. */\nexport type CompanyApplicationsArgs = {\n after?: InputMaybe<Scalars['String']['input']>;\n before?: InputMaybe<Scalars['String']['input']>;\n first?: InputMaybe<Scalars['Int']['input']>;\n last?: InputMaybe<Scalars['Int']['input']>;\n};\n\n\n/** Federation reference to a Company owned by another subgraph. */\nexport type CompanyInvitationsArgs = {\n after?: InputMaybe<Scalars['String']['input']>;\n before?: InputMaybe<Scalars['String']['input']>;\n first?: InputMaybe<Scalars['Int']['input']>;\n last?: InputMaybe<Scalars['Int']['input']>;\n pendingOnly?: InputMaybe<Scalars['Boolean']['input']>;\n};\n\n\n/** Federation reference to a Company owned by another subgraph. */\nexport type CompanyMembersArgs = {\n after?: InputMaybe<Scalars['String']['input']>;\n before?: InputMaybe<Scalars['String']['input']>;\n first?: InputMaybe<Scalars['Int']['input']>;\n last?: InputMaybe<Scalars['Int']['input']>;\n};\n\n/** The connection type for Company. */\nexport type CompanyConnection = {\n __typename?: 'CompanyConnection';\n /** A list of edges. */\n edges?: Maybe<Array<Maybe<CompanyEdge>>>;\n /** A list of nodes. */\n nodes?: Maybe<Array<Maybe<Company>>>;\n /** Information to aid in pagination. */\n pageInfo: PageInfo;\n /** Total number of items across all pages. */\n totalCount: Scalars['Int']['output'];\n};\n\n/** An edge in a connection. */\nexport type CompanyEdge = {\n __typename?: 'CompanyEdge';\n /** A cursor for use in pagination. */\n cursor: Scalars['String']['output'];\n /** The item at the end of the edge. */\n node?: Maybe<Company>;\n};\n\n/** An offer to join a company, redeemed by the invitee. */\nexport type CompanyInvitation = Node & {\n __typename?: 'CompanyInvitation';\n /** When the invitation was redeemed, or null while it is pending. */\n acceptedAt?: Maybe<Scalars['ISO8601DateTime']['output']>;\n /**\n * Who actually redeemed it. May not be who `email` names, since this service\n * cannot verify an email it only caches — the mismatch is recorded, not refused.\n */\n acceptedBy?: Maybe<User>;\n /** When the invitation was issued. */\n createdAt: Scalars['ISO8601DateTime']['output'];\n /**\n * Who the inviter meant it for. A label: membership is granted to whoever\n * authenticates while accepting, never to this address.\n */\n email: Scalars['String']['output'];\n /** When the invitation stops being redeemable. */\n expiresAt: Scalars['ISO8601DateTime']['output'];\n id: Scalars['ID']['output'];\n /** The member who issued the invitation. */\n invitedBy: User;\n /** When the invitation was revoked, or null if it was not. */\n revokedAt?: Maybe<Scalars['ISO8601DateTime']['output']>;\n};\n\n/** The connection type for CompanyInvitation. */\nexport type CompanyInvitationConnection = {\n __typename?: 'CompanyInvitationConnection';\n /** A list of edges. */\n edges?: Maybe<Array<Maybe<CompanyInvitationEdge>>>;\n /** A list of nodes. */\n nodes?: Maybe<Array<Maybe<CompanyInvitation>>>;\n /** Information to aid in pagination. */\n pageInfo: PageInfo;\n /** Total number of items across all pages. */\n totalCount: Scalars['Int']['output'];\n};\n\n/** An edge in a connection. */\nexport type CompanyInvitationEdge = {\n __typename?: 'CompanyInvitationEdge';\n /** A cursor for use in pagination. */\n cursor: Scalars['String']['output'];\n /** The item at the end of the edge. */\n node?: Maybe<CompanyInvitation>;\n};\n\n/** An invitation as its holder sees it, before accepting. */\nexport type CompanyInvitationPreview = {\n __typename?: 'CompanyInvitationPreview';\n /** Names are not unique, so read it alongside `invitedBy` rather than alone. */\n companyName: Scalars['String']['output'];\n /** Who the inviter meant it for. Unverified — a mismatch with your own address is a signal to ask them, not a refusal. */\n email: Scalars['String']['output'];\n /** When the invitation stops being redeemable. */\n expiresAt: Scalars['ISO8601DateTime']['output'];\n /** The member who issued the invitation. */\n invitedBy: User;\n};\n\n/** A user's membership of a company. Every member is an administrator. */\nexport type CompanyMember = Node & {\n __typename?: 'CompanyMember';\n id: Scalars['ID']['output'];\n /** Null for the founding member. */\n invitedBy?: Maybe<User>;\n /** When the user became a member. */\n joinedAt: Scalars['ISO8601DateTime']['output'];\n /** The user this membership belongs to. */\n user: User;\n};\n\n/** The connection type for CompanyMember. */\nexport type CompanyMemberConnection = {\n __typename?: 'CompanyMemberConnection';\n /** A list of edges. */\n edges?: Maybe<Array<Maybe<CompanyMemberEdge>>>;\n /** A list of nodes. */\n nodes?: Maybe<Array<Maybe<CompanyMember>>>;\n /** Information to aid in pagination. */\n pageInfo: PageInfo;\n /** Total number of items across all pages. */\n totalCount: Scalars['Int']['output'];\n};\n\n/** An edge in a connection. */\nexport type CompanyMemberEdge = {\n __typename?: 'CompanyMemberEdge';\n /** A cursor for use in pagination. */\n cursor: Scalars['String']['output'];\n /** The item at the end of the edge. */\n node?: Maybe<CompanyMember>;\n};\n\n/** Autogenerated input type of CompleteOutboundChannelAuthentication */\nexport type CompleteOutboundChannelAuthenticationInput = {\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: InputMaybe<Scalars['String']['input']>;\n /** The authorization code the callback received in its `code` query parameter. */\n code: Scalars['String']['input'];\n /** The global id of the channel account the attempt was started on. */\n id: Scalars['ID']['input'];\n /**\n * The opaque value the callback received in its `state` query parameter. It\n * names one attempt of this account and works once, within ten minutes of the\n * attempt's start.\n */\n state: Scalars['String']['input'];\n};\n\n/** Autogenerated return type of CompleteOutboundChannelAuthentication. */\nexport type CompleteOutboundChannelAuthenticationPayload = Node & {\n __typename?: 'CompleteOutboundChannelAuthenticationPayload';\n /**\n * Returns the account the sign-in connected, running when the outcome is\n * `CONNECTED`. When a disconnected account of the same owner and `externalId`\n * already held the mailbox, that account is resumed and returned instead of the\n * one the attempt started on, which is removed.\n */\n channelAccount: OutboundChannelAccount;\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: Maybe<Scalars['String']['output']>;\n id: Scalars['ID']['output'];\n /**\n * Returns where the attempt ended up: `CONNECTED`; `PROVIDER_ACCOUNT_BOUND` when\n * the identity is still being read, with `channel_account.connected` to follow;\n * or why it was refused (`CODE_REJECTED`, `SCOPES_MISSING`, `IDENTITY_MISMATCH`,\n * `IDENTITY_ALREADY_CONNECTED`, `PROVIDER_ACCOUNT_ALREADY_CONNECTED`,\n * `SESSION_INVALID`). Every refusal also emits\n * `channel_account.authentication_failed`.\n */\n outcome: OutboundChannelAuthenticationAttemptOutcome;\n};\n\n/** A business contact associated with an organization. */\nexport type Contact = Located & Node & {\n __typename?: 'Contact';\n /**\n * Profile picture URL, re-hosted on our own storage so it doesn't depend on the\n * source's (potentially expiring) URL. Null until the background fetch runs or\n * the contact has no public photo.\n */\n avatarUrl?: Maybe<Scalars['String']['output']>;\n /** Paginated career entries — experience, education, certifications, awards, and publications — most recent first. */\n careerEntries: CareerEntryConnection;\n /** City where the contact is located. */\n city?: Maybe<Scalars['String']['output']>;\n /** Confidence score (0.0-1.0) from source quality, freshness, and diversity. */\n confidenceScore?: Maybe<Scalars['Float']['output']>;\n /** When the contact record was first created. */\n createdAt: Scalars['ISO8601DateTime']['output'];\n /**\n * The contact's own profile summary (LinkedIn About), or their current role's\n * description when they wrote none. Null until a source provides one.\n */\n description?: Maybe<Scalars['String']['output']>;\n /** Primary email address. */\n emailAddress?: Maybe<Scalars['String']['output']>;\n /** Extracted email pattern (e.g. {first}.{last}). */\n emailPattern?: Maybe<Scalars['String']['output']>;\n /** Verification status of the primary email address. */\n emailStatus?: Maybe<EmailStatus>;\n /** First name. */\n firstName?: Maybe<Scalars['String']['output']>;\n /** The contact's professional headline as shown on their profile. Null until a source provides one. */\n headline?: Maybe<Scalars['String']['output']>;\n /** Global id of the record. */\n id: Scalars['ID']['output'];\n /** Functional department (e.g. marketing, sales, engineering). */\n jobFunction?: Maybe<Scalars['String']['output']>;\n /** Seniority level (e.g. c_level, vp, director, manager). */\n jobLevel?: Maybe<Scalars['String']['output']>;\n /** Current job title. */\n jobTitle?: Maybe<Scalars['String']['output']>;\n /** Last name. */\n lastName?: Maybe<Scalars['String']['output']>;\n /** LinkedIn profile URL. */\n linkedinUrl?: Maybe<Scalars['String']['output']>;\n /** Mercator Location ids of the record's divisions, as stored. Read by the router to resolve `locations` from Mercator. */\n locationIds: Array<Scalars['ID']['output']>;\n /**\n * Mercator divisions of the record, in the order its subgraph stores them: the\n * resolved place first, then its ancestors. Empty until the record's location\n * has been resolved.\n */\n locations: LocationConnection;\n /**\n * Returns the organization this contact belongs to, together with what this\n * query revealed about it. It is null when the reveal could not be paid for and\n * `reveals` is selected, and the contact is still served.\n */\n organization?: Maybe<RevealedOrganization>;\n /** Phone number from an enrichment source. Null until a source provides one. */\n phone?: Maybe<Scalars['String']['output']>;\n /**\n * Profile completeness score (0.0-1.0) from the presence of identity fields,\n * experience, and the merged confidence score. Consumers gate low-quality\n * records on this instead of counting raw history entries.\n */\n profileCompleteness: Scalars['Float']['output'];\n /** When the contact record was last modified. */\n updatedAt: Scalars['ISO8601DateTime']['output'];\n};\n\n\n/** A business contact associated with an organization. */\nexport type ContactCareerEntriesArgs = {\n after?: InputMaybe<Scalars['String']['input']>;\n before?: InputMaybe<Scalars['String']['input']>;\n first?: InputMaybe<Scalars['Int']['input']>;\n kind?: InputMaybe<CareerEntryKindFilterInput>;\n last?: InputMaybe<Scalars['Int']['input']>;\n};\n\n\n/** A business contact associated with an organization. */\nexport type ContactLocationsArgs = {\n after?: InputMaybe<Scalars['String']['input']>;\n before?: InputMaybe<Scalars['String']['input']>;\n first?: InputMaybe<Scalars['Int']['input']>;\n last?: InputMaybe<Scalars['Int']['input']>;\n subtype?: InputMaybe<LocationSubtypeFilterInput>;\n};\n\n\n/** A business contact associated with an organization. */\nexport type ContactOrganizationArgs = {\n reveal?: InputMaybe<Array<RevealDimension>>;\n};\n\n/**\n * A way to reach a contact that Atlas holds on file. Each one is named after the\n * reveal dimension that hands its value over, minus the subject: `PHONE_NUMBER`\n * here, `CONTACT_PHONE_NUMBER` in `reveal`.\n */\nexport type ContactChannel =\n /** A verified email address, not merely one on file. */\n | 'EMAIL_ADDRESS'\n /** A LinkedIn profile URL. */\n | 'LINKEDIN_URL'\n /** A phone number. */\n | 'PHONE_NUMBER';\n\n/**\n * Narrows contacts by the channels Atlas can reach them through: `eq` one channel,\n * `in` any of them, `all` every one of them, `notEq` / `notIn` without them.\n * Filtering on a channel never reveals its value: `reveal` decides that.\n */\nexport type ContactChannelFilterInput = {\n /** Match only records holding every one of these values. */\n all?: InputMaybe<Array<ContactChannel>>;\n /** Exact match. */\n eq?: InputMaybe<ContactChannel>;\n /** Match any of these values. */\n in?: InputMaybe<Array<ContactChannel>>;\n /** Exclude exact match. */\n notEq?: InputMaybe<ContactChannel>;\n /** Exclude any of these values. */\n notIn?: InputMaybe<Array<ContactChannel>>;\n};\n\n/** The connection type for Contact. */\nexport type ContactConnection = RevealedPage & {\n __typename?: 'ContactConnection';\n /**\n * Estimated total number of items across all pages. It comes from the query\n * planner rather than a count, so it costs planning time instead of a scan and\n * cannot exceed the statement timeout. It is approximate at every magnitude,\n * including small ones, and it moves when the table's statistics are refreshed.\n * Accuracy depends on the filter: within a few percent on plain column and\n * array-overlap filters, and as much as 30% out on a range filter such as\n * `companySize`. It is not meaningful for the embedding filters `jobTitle` and\n * `industry` — no statistics exist for a vector-distance predicate, so the\n * estimate ignores the distance threshold entirely and approximates only what\n * the other filters admit; it has been measured reporting 241371 for a filter\n * whose true result was empty. Never render it as an exact figure, and use\n * `totalCount` when the figure has to be exact.\n */\n approximateTotalCount: Scalars['Int']['output'];\n /**\n * Reports what this page cost in reveal credits. `held` is the ceiling reserved\n * for every requested dimension on every row, and `used` is the units the page\n * consumed. `used` is zero when the query revealed nothing, while `held` still\n * reports the reserved ceiling.\n */\n credits: RevealCredits;\n /** A list of edges. */\n edges?: Maybe<Array<Maybe<ContactEdge>>>;\n /** A list of nodes. */\n nodes?: Maybe<Array<Maybe<Contact>>>;\n /** Information to aid in pagination. */\n pageInfo: PageInfo;\n /** Total number of items across all pages, exact unless `upTo` is given. */\n totalCount: Scalars['Int']['output'];\n};\n\n\n/** The connection type for Contact. */\nexport type ContactConnectionTotalCountArgs = {\n upTo?: InputMaybe<Scalars['Int']['input']>;\n};\n\n/** A contact in a connection, with what this particular query revealed about it. */\nexport type ContactEdge = Revealed & {\n __typename?: 'ContactEdge';\n /**\n * Reports what revealing this record cost in reveal credits. `held` is the\n * ceiling reserved for it, one unit per requested dimension, and `used` is the\n * units it consumed. `used` is zero when the query revealed nothing, while\n * `held` still reports the reserved ceiling.\n */\n credits: RevealCredits;\n /** A cursor for use in pagination. */\n cursor: Scalars['String']['output'];\n /**\n * One entry per filter constrained on this query, reporting whether this contact\n * matched on the attribute's value or on its absence. `organizationFilter` axes\n * are reported under \"organization.\" paths. Empty when the connection was\n * resolved without a filter.\n */\n filterMatches: Array<FilterMatch>;\n /**\n * Hamming distance between the binary quantizations of the contact's job\n * embedding and the sort query, an integer from 0 to 512 where 0 is identical.\n * Not a cosine distance, and not comparable to the thresholds the jobTitle\n * filter takes. Only present when sorting by JOB_TITLE_DISTANCE with a query argument.\n */\n neighborDistance?: Maybe<Scalars['Float']['output']>;\n /** The item at the end of the edge. */\n node?: Maybe<Contact>;\n /**\n * Lists, per reach dimension this query touched, what this response revealed,\n * what the company already held and what stays locked. The list is empty when\n * the query touched no reach field.\n */\n reveals: Array<RevealDimensionStatus>;\n};\n\n/** Autogenerated return type of ContactEnrichmentResult. */\nexport type ContactEnrichmentResultPayload = {\n __typename?: 'ContactEnrichmentResultPayload';\n /** The merged Contact, or null when none could be resolved. */\n contact?: Maybe<Contact>;\n /** The caller-supplied correlation id this result answers. */\n externalId: Scalars['ID']['output'];\n /** Why no Contact could be resolved. Populated only when `contact` is null. */\n unresolvedReason?: Maybe<ContactEnrichmentUnresolvedReason>;\n};\n\n/** Why an enrichContact call resolved no Contact. */\nexport type ContactEnrichmentUnresolvedReason =\n /**\n * Enrichment was accepted and deferred to a background job, and that job did not\n * complete — an upstream provider outage, or a payload the interaction refused.\n * Unlike the other reasons this is not a verdict about the contact: nothing was\n * decided, so the caller may retry the same payload.\n */\n | 'ENRICHMENT_FAILED'\n /** No email address, LinkedIn URL, or first-and-last-name pair was supplied, so no contact could be matched or created. */\n | 'NO_IDENTIFIER'\n /**\n * No organization domain was supplied and none could be resolved from the\n * organization LinkedIn URL or name. A Contact is always attached to a\n * domain-keyed Organization, so none could be created.\n */\n | 'UNRESOLVED_ORGANIZATION_DOMAIN';\n\n/** Filter criteria for contacts. */\nexport type ContactFilterInput = {\n /** Filter by confidence score (0.0–1.0). */\n confidenceScore?: InputMaybe<FloatFilterInput>;\n /**\n * Filter contacts that belong to any of the given Mercator location division\n * IDs. `eq`/`in` match contacts with at least one overlapping division;\n * `not_eq`/`not_in` exclude them. This is an array-overlap filter against\n * Mercator-encoded division IDs, not a scalar Atlas ID filter.\n */\n divisionIds?: InputMaybe<IdFilterInput>;\n /**\n * Filter on the contact's email address. Values are downcased and trimmed\n * before matching — the same transform the column is written through — so\n * `eq: \" Jane@Acme.com \"` matches a stored \"jane@acme.com\". Matching is exact\n * after that, not a substring or domain search. An email is unique per\n * organization, and in practice globally, so a positive `eq` matches at most\n * one contact. Prefer this for a read-only \"do we already have this person?\"\n * lookup, batching a list through `in`; `searchContact` is the enriching\n * counterpart and will call paid providers on a miss. Pair with `valid: false`\n * to check existence irrespective of the quality floor — the default `valid`\n * gate requires a verified email and would hide a contact whose address is on\n * file but unverified. Use `emailStatus` to filter on verification state.\n */\n emailAddress?: InputMaybe<StringFilterInput>;\n /** Filter by email verification status (VALID, INVALID, CATCH_ALL, UNKNOWN). */\n emailStatus?: InputMaybe<EmailStatusFilterInput>;\n /** Filter by contact global id. */\n id?: InputMaybe<IdFilterInput>;\n /**\n * Job title embedding filters. Each entry matches contacts whose combined\n * job context (function + level + title) is semantically close to the query.\n * A query that is exactly one bare role word — a department such as\n * \"Marketing\", \"Sales\", \"Human Resources\", or \"Founder\", \"Owner\", \"Manager\",\n * \"Intern\", in English, French, Dutch, German, Spanish, Portuguese or\n * Italian (\"Fondateur\", \"Gründer\", \"Vendas\") — is embedded as that role's\n * curated vocabulary (\"Founder, Co-Founder, Owner, CEO\") rather than as the\n * word itself: measured on production documents, the bare word admits 92%\n * of the off-intent titles labelled for it, the vocabulary 25% with the same\n * recall. Five French executive titles are expanded the same way, as an\n * acronym or spelled out: \"PDG\", \"Directeur Général\" (\"DG\"), \"DAF\", \"DSI\"\n * and \"DRH\" (\"Président-Directeur Général\", \"Directeur Financier\", …). On\n * French production documents the bare \"Directeur Général\" admits 64% of\n * all job titles, its vocabulary 8% of the junk it admitted. Anything else\n * is embedded as typed. \"Director\" has no vocabulary: no phrasing separates\n * that seniority word on this axis.\n * List different roles in `queries` (e.g. [\"CMO\", \"Marketing Director\",\n * \"VP Marketing\"]) to match any of them. Multilingual queries work: include\n * translated titles (e.g. \"Directeur Marketing\", \"Marketingleiter\") to\n * improve cross-language recall. Entries AND with each other.\n * Set `match` rather than a raw `distance`: this axis is measured in its\n * fitted 512-dimension projection, so its calibrated operating point is\n * 0.89 (text-embedding-3-small) and not the native-space 0.58 — a number a\n * caller cannot derive, and one that moves with every refit.\n * INCLUDED_STRICT resolves to 0.89, INCLUDED_LOOSE to 0.8949; both sit\n * inside the defensible 0.8802-0.8998 interval.\n * Thresholds validated by the embedding_calibration test suite.\n * Maximum 25 entries.\n */\n jobTitle?: InputMaybe<Array<EmbeddingFilterInput>>;\n /**\n * Filter on the contact's LinkedIn profile URL. `presence: true` returns only\n * contacts that have one — independent of `valid`, so combine `valid: false`\n * with it to reach contacts reachable on LinkedIn but without a verified\n * email. `eq`/`in` match a specific profile, and values are normalized the way\n * the column is written, so scheme, host and a trailing slash or query no\n * longer have to match a stored URL byte for byte:\n * `eq: \"fr.linkedin.com/in/janedoe/?trk=x\"` finds a stored\n * \"https://www.linkedin.com/in/janedoe\". A vanity slug is case-dependent, so\n * `/in/JaneDoe` and `/in/janedoe` stay two different profiles. Only person\n * profiles resolve — a company page, a bare slug or a non-LinkedIn URL matches\n * nothing rather than being ignored; use the `linkedin` filter on\n * `organizations` for a company page. Prefer this for a read-only \"do we\n * already have this person?\" lookup, batching a list through `in`;\n * `searchContact` is the enriching counterpart and will call paid providers on\n * a miss. Pair with `valid: false` to check existence irrespective of the\n * quality floor.\n */\n linkedin?: InputMaybe<StringFilterInput>;\n /**\n * Filter on the contact's full name. `presence: true` returns only contacts with\n * both a first and a last name — it re-expresses `valid`'s name floor on its\n * own, so callers passing `valid: false` can keep it without the\n * email/confidence floors. `eq`/`in` match a full name; values are compared\n * case- and accent-insensitively.\n */\n name?: InputMaybe<StringFilterInput>;\n /**\n * Profile embedding filters. Each entry matches contacts whose whole profile\n * (headline + description + job title) is semantically close to the query, so a\n * topic or skill that never appears in the title still matches (\"hiring\",\n * \"trade fairs\", \"SEO\"). Synonyms and translations match without being listed;\n * list alternatives in `queries` to match any of them. Entries AND with each\n * other and with `jobTitle`. Measured on 1536-bit binary quantizations by\n * Hamming distance: set `match`, whose thresholds come from the serving fit,\n * rather than a raw `distance`. A contact with no headline, description or job\n * title has no profile and never matches unless `allowBlank` is set.\n * Maximum 25 entries.\n */\n profile?: InputMaybe<Array<EmbeddingFilterInput>>;\n /**\n * Return only contacts an outreach can land on — those with a LinkedIn URL, a\n * verified email, or both. Independent of `valid`, which requires the email leg\n * specifically, so pair `valid: false, reachable: true` to reach a contact whose\n * email is still undiscovered but whose LinkedIn profile is known. `false`\n * applies no constraint.\n */\n reachable?: InputMaybe<Scalars['Boolean']['input']>;\n /** Return only complete records (name, email, confidence >= 0.5). */\n valid?: InputMaybe<Scalars['Boolean']['input']>;\n};\n\n/** A page of contacts a `findContacts` call asked for, sent again as Atlas fills it; the last version is COMPLETE. */\nexport type ContactFindProgress = {\n __typename?: 'ContactFindProgress';\n /**\n * The contacts on the page, revealed as the call asked. `pageInfo.endCursor` is\n * the `page.after` of the call asking for the next page.\n */\n contacts: ContactPage;\n /** The externalId of the call that asked for the page. */\n externalId: Scalars['ID']['output'];\n /**\n * The state of this page, not of the search: FILLING while Atlas may send it\n * again, COMPLETE on its last version. Whether more records follow is\n * `pageInfo.hasNextPage`.\n */\n status: FindPageStatus;\n};\n\n/** Autogenerated return type of ContactIdentifyResult. */\nexport type ContactIdentifyResultPayload = {\n __typename?: 'ContactIdentifyResultPayload';\n /** The identified contact, or null when nothing matched. */\n contact?: Maybe<Contact>;\n /** The externalId the caller passed, naming the request this result answers. */\n externalId: Scalars['ID']['output'];\n};\n\n/** OneOf input for searchContact — supply exactly one lookup mode. */\nexport type ContactLookupInput = {\n /** Global ID of an existing contact whose email should be discovered. */\n contactId?: InputMaybe<Scalars['ID']['input']>;\n /** Contact's email address — globally unique within an organization. */\n emailAddress?: InputMaybe<Scalars['String']['input']>;\n /** Contact's LinkedIn profile URL — globally unique within an organization. */\n linkedinUrl?: InputMaybe<Scalars['String']['input']>;\n /** Name-based lookup: first name + last name + organization. */\n name?: InputMaybe<ContactNameInput>;\n};\n\n/** Name-based lookup for searchContact — first name, last name, and organization. */\nexport type ContactNameInput = {\n /** Contact's first name. */\n firstName: Scalars['String']['input'];\n /** Contact's last name. */\n lastName: Scalars['String']['input'];\n /** Global ID of the organization this contact belongs to. */\n organizationId: Scalars['ID']['input'];\n};\n\n/**\n * One page of contacts a `findContacts` call asked for. Not a connection: it takes\n * no paging arguments, and the next page is asked for with `findContacts(page: {\n * after: pageInfo.endCursor })`.\n */\nexport type ContactPage = RevealedPage & {\n __typename?: 'ContactPage';\n /**\n * Reports what this page cost in reveal credits. `held` is the ceiling reserved\n * for every requested dimension on every row, and `used` is the units the page\n * consumed. `used` is zero when the query revealed nothing, while `held` still\n * reports the reserved ceiling.\n */\n credits: RevealCredits;\n /** The contacts on the page, each with what this page revealed about it. */\n edges: Array<ContactEdge>;\n /** The contacts on the page. */\n nodes: Array<Contact>;\n /**\n * Where the page sits in the search: `endCursor` is the `page.after` of the call\n * for the next page, and `hasNextPage` says whether more contacts are listed\n * after it or may still be found by asking for it.\n */\n pageInfo: PageInfo;\n /** Number of contacts the search has listed so far, at most 1000. */\n totalCount: Scalars['Int']['output'];\n};\n\n/** Autogenerated return type of ContactSearchResult. */\nexport type ContactSearchResultPayload = {\n __typename?: 'ContactSearchResultPayload';\n /**\n * Matched contacts — both pre-existing database matches and newly-discovered,\n * newly-persisted third-party matches. Paginated; fetch further pages via the\n * `contacts` query using the same filter.\n */\n contacts: ContactConnection;\n /** The externalId the caller passed, naming the request this result answers. */\n externalId: Scalars['ID']['output'];\n};\n\n\n/** Autogenerated return type of ContactSearchResult. */\nexport type ContactSearchResultPayloadContactsArgs = {\n after?: InputMaybe<Scalars['String']['input']>;\n before?: InputMaybe<Scalars['String']['input']>;\n first?: InputMaybe<Scalars['Int']['input']>;\n last?: InputMaybe<Scalars['Int']['input']>;\n};\n\n/** Fields available for sorting contacts. */\nexport type ContactSortField =\n /** Sort by merged confidence score, highest first by default. */\n | 'CONFIDENCE_SCORE'\n /** Sort by creation timestamp. */\n | 'CREATED_AT'\n /** Cosine distance from the linked organization's description embedding. Requires a query argument. */\n | 'DESCRIPTION_DISTANCE'\n /** Cosine distance from the linked organization's industry embedding. Requires a query argument. */\n | 'INDUSTRY_DISTANCE'\n /**\n * Hamming distance between the binary quantizations of the job_title embedding\n * and the query, an integer from 0 to 512 where 0 is identical. Requires a query argument.\n */\n | 'JOB_TITLE_DISTANCE';\n\n/** Sort configuration for contacts. */\nexport type ContactSortInput = {\n direction?: InputMaybe<SortDirection>;\n field: ContactSortField;\n /**\n * Required when field is JOB_TITLE_DISTANCE, DESCRIPTION_DISTANCE, or\n * INDUSTRY_DISTANCE. Text to embed for distance ordering. For JOB_TITLE_DISTANCE\n * a bare role word follows the same vocabulary rule as a `jobTitle` filter query\n * (see ContactFilterInput.jobTitle).\n */\n query?: InputMaybe<Scalars['String']['input']>;\n};\n\n/** Contact field values to cross-check against Atlas's stored data. */\nexport type ContactValidationChecksInput = {\n /** Email address to include in contact coherence checks. */\n email?: InputMaybe<Scalars['String']['input']>;\n /** Phone number to include in contact coherence checks. */\n phone?: InputMaybe<Scalars['String']['input']>;\n};\n\n/** Autogenerated return type of ContactValidationResult. */\nexport type ContactValidationResultPayload = {\n __typename?: 'ContactValidationResultPayload';\n /** Per-field coherence flags from the validation pass. */\n clues?: Maybe<Scalars['JSON']['output']>;\n /** The contact after validation, or null when it could not be resolved. */\n contact?: Maybe<Contact>;\n /** The externalId the caller passed, naming the request this result answers. */\n externalId: Scalars['ID']['output'];\n /** The organization the validated contact belongs to, or null when none was resolved. */\n organization?: Maybe<Organization>;\n};\n\n/**\n * Filter criteria for `findContacts`. Applies exactly what it states: no quality\n * floor is added, so a contact with no email or a low confidence is returned\n * unless a filter here excludes it.\n */\nexport type ContactsFilterInput = {\n /** Filters by confidence score (0.0–1.0). `gteq: 0.5` is the floor the older `valid` argument applied. */\n confidenceScore?: InputMaybe<FloatFilterInput>;\n /**\n * Keeps contacts that belong to any of the given Mercator location division IDs\n * (`eq`/`in`), or excludes them (`notEq`/`notIn`).\n */\n divisionIds?: InputMaybe<IdFilterInput>;\n /**\n * Filters on the contact's email address, downcased and trimmed before an exact\n * match. A positive `eq` matches at most one contact.\n */\n emailAddress?: InputMaybe<StringFilterInput>;\n /** Filters by email verification status (VALID, INVALID, CATCH_ALL, UNKNOWN). */\n emailStatus?: InputMaybe<EmailStatusFilterInput>;\n /** Filters by contact global id. */\n id?: InputMaybe<IdFilterInput>;\n /** Job title embedding filters, matched exactly as `ContactFilterInput.jobTitle` matches them. Entries AND with each other. */\n jobTitle?: InputMaybe<Array<EmbeddingFilterInput>>;\n /**\n * Filters on the contact's LinkedIn profile URL, normalized the way the column\n * is written. `presence: true` keeps contacts that have one.\n */\n linkedinUrl?: InputMaybe<StringFilterInput>;\n /**\n * Filters on the contact's full name, case- and accent-insensitively. `presence:\n * true` keeps contacts with both a first and a last name.\n */\n name?: InputMaybe<StringFilterInput>;\n /**\n * Profile embedding filters, matched exactly as `ContactFilterInput.profile`\n * matches them. Entries AND with each other and with `jobTitle`.\n */\n profile?: InputMaybe<Array<EmbeddingFilterInput>>;\n /** Keeps contacts Atlas can reach through the listed channels. */\n reachableBy?: InputMaybe<ContactChannelFilterInput>;\n};\n\n/** A geographic point serialized as a GeoJSON Point object (RFC 7946). */\nexport type Coordinate = Node & {\n __typename?: 'Coordinate';\n /** Position in GeoJSON order: [longitude, latitude] (WGS 84). */\n coordinates: Array<Scalars['Float']['output']>;\n id: Scalars['ID']['output'];\n /** GeoJSON geometry type. Always \"Point\". */\n type: Scalars['String']['output'];\n};\n\n/** A geographic coordinate used as a spatial query input. */\nexport type CoordinateInput = {\n /** Latitude in decimal degrees (WGS 84). */\n lat: Scalars['Float']['input'];\n /** Longitude in decimal degrees (WGS 84). */\n lng: Scalars['Float']['input'];\n};\n\n/** Autogenerated input type of CorrectDebit */\nexport type CorrectDebitInput = {\n /** As on debitCredits: lets an increase the balance can't cover go to overage instead of failing with insufficient_credits. */\n allowOverage?: InputMaybe<Scalars['Boolean']['input']>;\n /** Global id of the billing customer whose consumption is corrected. */\n billingCustomerId: Scalars['ID']['input'];\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: InputMaybe<Scalars['String']['input']>;\n /** Id of the consumed record, as debitCredits received it. */\n consumableId: Scalars['ID']['input'];\n /** Type of the consumed record, as debitCredits received it. */\n consumableType: Scalars['String']['input'];\n /** Caller-chosen key, unique per customer, that makes a retry safe. */\n idempotencyKey: Scalars['String']['input'];\n /** What the consumable should cost in total, net of earlier corrections and refunds. 0 or more. */\n newCost: Scalars['Float']['input'];\n /** Why the cost changes, stored on every row this call writes. */\n reason: Scalars['String']['input'];\n};\n\n/** Autogenerated return type of CorrectDebit. */\nexport type CorrectDebitPayload = Node & {\n __typename?: 'CorrectDebitPayload';\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: Maybe<Scalars['String']['output']>;\n /**\n * What the consumable costs after the call: its debits and overages, minus the\n * refund and correction credits that reduce them.\n */\n consumedCost: Scalars['Float']['output'];\n /** CORRECTION credits written by a decrease, one per debit or overage reduced. Empty for an increase or an unchanged cost. */\n credits: BillingCreditConnection;\n /** Positive consumption debits written by an increase. Empty for a decrease, an unchanged cost or a refused increase. */\n debits: BillingDebitConnection;\n /** insufficient_credits when success is false. Null otherwise. */\n errorCode?: Maybe<Scalars['String']['output']>;\n id: Scalars['ID']['output'];\n /** The overage an increase recorded with allowOverage. Null otherwise. */\n overage?: Maybe<BillingOverage>;\n /** Customer's credit balance after the call. */\n remainingBalance: Scalars['Float']['output'];\n /**\n * False only when an increase exceeds the balance and allowOverage is false;\n * nothing is written then and the same idempotencyKey can be retried. True otherwise.\n */\n success: Scalars['Boolean']['output'];\n};\n\n\n/** Autogenerated return type of CorrectDebit. */\nexport type CorrectDebitPayloadCreditsArgs = {\n after?: InputMaybe<Scalars['String']['input']>;\n before?: InputMaybe<Scalars['String']['input']>;\n first?: InputMaybe<Scalars['Int']['input']>;\n last?: InputMaybe<Scalars['Int']['input']>;\n};\n\n\n/** Autogenerated return type of CorrectDebit. */\nexport type CorrectDebitPayloadDebitsArgs = {\n after?: InputMaybe<Scalars['String']['input']>;\n before?: InputMaybe<Scalars['String']['input']>;\n first?: InputMaybe<Scalars['Int']['input']>;\n last?: InputMaybe<Scalars['Int']['input']>;\n};\n\n/** Autogenerated input type of CreateApplicationCredential */\nexport type CreateApplicationCredentialInput = {\n applicationId: Scalars['ID']['input'];\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: InputMaybe<Scalars['String']['input']>;\n /**\n * Omit for a credential that lives until revoked. Note this bounds when the\n * credential may still obtain a token, not the tokens themselves: one issued\n * just before this moment stays valid for its full lifetime afterwards, because\n * a subgraph verifies a token by signature and `exp` and never asks whether the\n * credential behind it is still alive.\n */\n expiresAt?: InputMaybe<Scalars['ISO8601DateTime']['input']>;\n name: Scalars['String']['input'];\n /** Marks a throwaway credential minted for one CLI session. Hidden from listings by default. */\n session?: InputMaybe<Scalars['Boolean']['input']>;\n};\n\n/** Autogenerated input type of CreateApplication */\nexport type CreateApplicationInput = {\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: InputMaybe<Scalars['String']['input']>;\n /** Defaults to the caller's personal company. */\n companyId?: InputMaybe<Scalars['ID']['input']>;\n description?: InputMaybe<Scalars['String']['input']>;\n name: Scalars['String']['input'];\n};\n\n/** Autogenerated input type of CreateBillingCheckoutSession */\nexport type CreateBillingCheckoutSessionInput = {\n /** Billing customer UUID, stored on the owning service's company record. */\n billingCustomerId: Scalars['ID']['input'];\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: InputMaybe<Scalars['String']['input']>;\n /**\n * Settlement currency to charge, lowercase ISO (one of: eur, usd, gbp — the\n * currencies with defined catalog prices). Pins Checkout to that currency's\n * defined amount so the price the product displayed is exactly what the card is\n * charged. Omitted: Stripe Adaptive Pricing presents the customer's local\n * currency, converted from EUR.\n */\n currency?: InputMaybe<Scalars['String']['input']>;\n /** Billing periodicity for the new subscription. MONTHLY or ANNUAL. */\n periodicity: BillingPeriodicity;\n /** Plan tier for the new subscription. Plans whose catalog entry offers a trial start with one; the rest bill immediately. */\n plan: BillingPlanName;\n /** Override for the frontend base URL Stripe redirects to after Checkout. Defaults to BILLING_CHECKOUT_RETURN_BASE_URL. */\n returnBaseUrl?: InputMaybe<Scalars['String']['input']>;\n /**\n * Trial length override in days (0-90), for sales-led flows that hand out custom\n * trials. 0 disables the trial (charge at checkout). Defaults to the plan's catalog trial.\n */\n trialDays?: InputMaybe<Scalars['Int']['input']>;\n};\n\n/** Autogenerated return type of CreateBillingCheckoutSession. */\nexport type CreateBillingCheckoutSessionPayload = Node & {\n __typename?: 'CreateBillingCheckoutSessionPayload';\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: Maybe<Scalars['String']['output']>;\n id: Scalars['ID']['output'];\n /** Stripe-hosted Checkout URL. The frontend should immediately `window.location =` this. */\n url: Scalars['String']['output'];\n};\n\n/** Autogenerated input type of CreateBillingCustomer */\nexport type CreateBillingCustomerInput = {\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: InputMaybe<Scalars['String']['input']>;\n /**\n * Optional company UUID to record in Stripe's customer metadata for\n * cross-service debugging. Not used by billing for any lookup.\n */\n companyId?: InputMaybe<Scalars['ID']['input']>;\n /** Customer's email. Sent to Stripe so Checkout pre-fills the email field and receipts go to the right inbox. */\n email?: InputMaybe<Scalars['String']['input']>;\n /** Customer's display name (typically `first last`). Stored on the Stripe Customer for Dashboard readability. */\n name?: InputMaybe<Scalars['String']['input']>;\n /**\n * Product the customer belongs to — decides which Stripe account the customer is\n * created on and which plan catalog applies. The account must be registered in\n * the environment or the mutation fails.\n */\n product: BillingProduct;\n};\n\n/** Autogenerated return type of CreateBillingCustomer. */\nexport type CreateBillingCustomerPayload = Node & {\n __typename?: 'CreateBillingCustomerPayload';\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: Maybe<Scalars['String']['output']>;\n /** The newly created billing customer. */\n customer: BillingCustomer;\n id: Scalars['ID']['output'];\n};\n\n/** Autogenerated input type of CreateBillingEmbeddedCheckoutSession */\nexport type CreateBillingEmbeddedCheckoutSessionInput = {\n /** Billing customer UUID, stored on the owning service's company record. */\n billingCustomerId: Scalars['ID']['input'];\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: InputMaybe<Scalars['String']['input']>;\n /** Billing periodicity for the new subscription. MONTHLY or ANNUAL. */\n periodicity: BillingPeriodicity;\n /** Plan tier for the new subscription. Plans whose catalog entry offers a trial start with one; the rest bill immediately. */\n plan: BillingPlanName;\n /**\n * Override for the frontend base URL Stripe redirects the parent frame to after\n * the customer completes payment. Defaults to the\n * BILLING_CHECKOUT_RETURN_BASE_URL env var.\n */\n returnBaseUrl?: InputMaybe<Scalars['String']['input']>;\n};\n\n/** Autogenerated return type of CreateBillingEmbeddedCheckoutSession. */\nexport type CreateBillingEmbeddedCheckoutSessionPayload = Node & {\n __typename?: 'CreateBillingEmbeddedCheckoutSessionPayload';\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: Maybe<Scalars['String']['output']>;\n /**\n * Stripe Checkout Session client secret. The frontend feeds this to Stripe.js'\n * `<EmbeddedCheckoutProvider>` to mount the payment form inline.\n */\n clientSecret: Scalars['String']['output'];\n id: Scalars['ID']['output'];\n};\n\n/** Autogenerated input type of CreateBillingPortalSession */\nexport type CreateBillingPortalSessionInput = {\n /** Billing customer UUID. */\n billingCustomerId: Scalars['ID']['input'];\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: InputMaybe<Scalars['String']['input']>;\n /** Override for the frontend base URL Stripe redirects back to after the Portal session closes. */\n returnUrl?: InputMaybe<Scalars['String']['input']>;\n};\n\n/** Autogenerated return type of CreateBillingPortalSession. */\nexport type CreateBillingPortalSessionPayload = Node & {\n __typename?: 'CreateBillingPortalSessionPayload';\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: Maybe<Scalars['String']['output']>;\n id: Scalars['ID']['output'];\n /** Stripe-hosted Customer Portal URL. */\n url: Scalars['String']['output'];\n};\n\n/** Autogenerated input type of CreateCompanyBillingPortalSession */\nexport type CreateCompanyBillingPortalSessionInput = {\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: InputMaybe<Scalars['String']['input']>;\n /** The company whose billing is being managed. */\n companyId: Scalars['ID']['input'];\n /** Where Stripe returns the caller when they leave the portal. */\n returnUrl?: InputMaybe<Scalars['String']['input']>;\n};\n\n/** Autogenerated input type of CreateCompanyCheckoutSession */\nexport type CreateCompanyCheckoutSessionInput = {\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: InputMaybe<Scalars['String']['input']>;\n /** The company being subscribed. Every member may subscribe it — there are no roles. */\n companyId: Scalars['ID']['input'];\n /** MONTHLY or ANNUAL, as `billingPlanCatalog` reports it. */\n periodicity: Scalars['String']['input'];\n /**\n * Tier name, as `billingPlanCatalog(product:)` reports it. Validated by billing\n * against that product's catalog, so a tier belonging to another product is\n * refused rather than resolved.\n */\n plan: Scalars['String']['input'];\n /** Where Stripe returns the parent frame after payment. Defaults to the deployment's configured portal URL. */\n returnBaseUrl?: InputMaybe<Scalars['String']['input']>;\n};\n\n/** Autogenerated input type of CreateCompany */\nexport type CreateCompanyInput = {\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: InputMaybe<Scalars['String']['input']>;\n name: Scalars['String']['input'];\n};\n\n/** Autogenerated input type of CreateCompanyInvitation */\nexport type CreateCompanyInvitationInput = {\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: InputMaybe<Scalars['String']['input']>;\n companyId: Scalars['ID']['input'];\n /**\n * Who the invitation is meant for. A label for your own records: whoever\n * authenticates while accepting joins, not this address.\n */\n email: Scalars['String']['input'];\n /** Defaults to seven days. */\n expiresAt?: InputMaybe<Scalars['ISO8601DateTime']['input']>;\n};\n\n/** Autogenerated input type of CreateOutboundChannelAccount */\nexport type CreateOutboundChannelAccountInput = {\n /** Channel the account will operate on. */\n channel: OutboundChannel;\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: InputMaybe<Scalars['String']['input']>;\n /**\n * Whoever the consumer holds this account for, in the consumer's own terms: an\n * opaque reference the gateway stores, compares and never interprets. It\n * partitions the identity rule — two accounts of this owner may run the same\n * person when their `externalId` differ, and the same string sent by another\n * consumer is a different tenant, since the owner comes first. Fixed at\n * registration. Refused as `external_id.blank` when empty.\n */\n externalId: Scalars['String']['input'];\n /**\n * Who the account is for, when the consumer already knows: history can then be\n * imported before any connection. A claim until a connection confirms it; a\n * connection resolving to someone else is refused. Refused as\n * `identity.channel_mismatch` for another channel's variant and\n * `identity.already_claimed` when this owner already has a live account for that\n * person under the same `externalId`.\n */\n identity?: InputMaybe<OutboundChannelIdentityInput>;\n /**\n * Provider that runs the account on the channel. Defaults to the first\n * configured provider of the channel. Refused as `provider.unknown` when it does\n * not serve the channel and `provider.unavailable` when it is not configured in\n * this environment.\n */\n provider?: InputMaybe<OutboundChannelProvider>;\n /** HMAC-SHA256 secret every event about this account is signed with. Write-only: it is never returned by the API. */\n webhookSecret: Scalars['String']['input'];\n /** HTTPS address every event about this account is delivered to. */\n webhookUrl: Scalars['String']['input'];\n};\n\n/** Autogenerated return type of CreateOutboundChannelAccount. */\nexport type CreateOutboundChannelAccountPayload = Node & {\n __typename?: 'CreateOutboundChannelAccountPayload';\n /** The draft account. */\n channelAccount: OutboundChannelAccount;\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: Maybe<Scalars['String']['output']>;\n id: Scalars['ID']['output'];\n};\n\n/** Autogenerated input type of CreateSource */\nexport type CreateSourceInput = {\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: InputMaybe<Scalars['String']['input']>;\n /**\n * Maps Atlas canonical contact field names to rawData extraction expressions.\n * Keys: first_name, last_name, email_address, job_title, job_level, job_function,\n * linkedin_url, city, country_code.\n * Values: a string key (\"firstname\"), an array path for nested access\n * ([\"data\", \"email\"]), or an operation hash\n * ({\"op\": \"split\", \"key\": \"full_name\", \"index\": 0}).\n * All referenced keys must exist in contact_schema.\n */\n contactFieldMappings?: InputMaybe<Scalars['JSON']['input']>;\n /** JSON Schema (draft-07) describing the expected shape of contact rawData payloads. */\n contactSchema?: InputMaybe<Scalars['JSON']['input']>;\n /**\n * Maps Atlas canonical identification field names to rawData extraction expressions.\n * Keys: ip_address, organization_domain, confidence_score.\n * Values follow the same expression syntax as contact_field_mappings.\n * All referenced keys must exist in identification_schema.\n */\n identificationFieldMappings?: InputMaybe<Scalars['JSON']['input']>;\n /** JSON Schema (draft-07) describing the expected shape of identification rawData payloads. */\n identificationSchema?: InputMaybe<Scalars['JSON']['input']>;\n /**\n * Maps Atlas canonical organization field names to rawData extraction expressions.\n * Keys: name, website, phone, contact_email, linkedin_url, description,\n * company_size, founded_year, industry, country_code, annual_revenue.\n * Values: a string key (\"name\"), an array path ([\"company\", \"name\"]),\n * or an operation hash ({\"op\": \"parse_employee_range\", \"path\": [\"size_range\"]}).\n * All referenced keys must exist in organization_schema.\n */\n organizationFieldMappings?: InputMaybe<Scalars['JSON']['input']>;\n /** JSON Schema (draft-07) describing the expected shape of organization rawData payloads. */\n organizationSchema?: InputMaybe<Scalars['JSON']['input']>;\n /** Short machine-readable identifier for this source (e.g. snitcher, hunter). */\n slug: Scalars['String']['input'];\n /** Weight applied during multi-source merging, 0.0–1.0. Higher scores win field conflicts. */\n trustScore?: InputMaybe<Scalars['Float']['input']>;\n};\n\n/** Autogenerated input type of CreateWatcher */\nexport type CreateWatcherInput = {\n /**\n * Provision the Watcher's providers asynchronously. False (the default) keeps\n * the synchronous contract: providers are set up before this mutation returns,\n * the Watcher comes back `PROVISIONED` with its `installations` and\n * `providerReferences` populated, and a provider refusing the request (an\n * unresolvable place, an out-of-vocabulary industry, an upstream outage) fails\n * the call. True returns as soon as the Watcher is persisted, `PENDING`, and\n * provisions in background jobs retried across provider outages for about a day:\n * creation no longer fails when a provider is down, and the outcome arrives on\n * `provisioningStatus` (poll) or `watcherProvisioningResult` (subscribe, with\n * `externalId`), with per-provider reasons on `provisioningFailures`.\n */\n async?: InputMaybe<Scalars['Boolean']['input']>;\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: InputMaybe<Scalars['String']['input']>;\n /**\n * Ignored. Accepted only so callers written against the previous schema keep\n * working. The Watcher belongs to the company the request acts for: the one the\n * `X-Company-Id` header names, or an application's own.\n * @deprecated Never read. Removed once the last caller stops sending it.\n */\n companyId?: InputMaybe<Scalars['ID']['input']>;\n /** Slug of the Definition to subscribe to. */\n definitionSlug: Scalars['String']['input'];\n /** Version of the Definition to subscribe to. */\n definitionVersion: Scalars['Int']['input'];\n /**\n * How the upstream source treats a lead it has already delivered for this\n * watcher. Omit to leave the source's own default in place.\n */\n duplicateHandling?: InputMaybe<WatcherDuplicateHandlingInput>;\n /**\n * Optional caller-chosen correlation id for the asynchronous provisioning\n * outcome, used with `async: true`. Subscribe to\n * `watcherProvisioningResult(externalId:)` with the same value before calling\n * this mutation; when every provider settles, the watcher is delivered on that\n * subscription. Callers that poll `provisioningStatus` instead can omit it.\n */\n externalId?: InputMaybe<Scalars['ID']['input']>;\n /**\n * Optional Ideal Customer Profile, in the same shape Atlas search uses —\n * including geography: `contact.divisionIds` / `organization.divisionIds` are\n * Mercator location division IDs filtered exactly as Atlas search filters them,\n * so `notIn` excludes places as well. Forwarded to each provider's upstream\n * source so leads outside the profile are never emitted — and never billed. Part\n * of the watcher's identity: two callers watching the same topic with different\n * profiles get separate watchers.\n */\n icp?: InputMaybe<WatcherIcpInput>;\n /**\n * Optional freshness-first per-period lead caps for this watcher. Omit or pass\n * an empty list to leave the watcher uncapped. Caps are a property of the\n * watcher (not the individual webhook), so they replace any caps already set on\n * a shared watcher.\n */\n leadCaps?: InputMaybe<Array<WatcherLeadCapInput>>;\n /**\n * How many contacts one matched organization may yield, and the window that is\n * measured over. Omit to take the defaults the input type declares. Only sources\n * that can enforce a per-organization limit accept an explicit cap — a\n * definition whose providers cannot refuses one rather than silently ignoring\n * it, while omission is always accepted. Part of the Watcher's identity, so it\n * is fixed at creation.\n */\n maximumLeadsPerOrganization?: InputMaybe<WatcherMaximumLeadsPerOrganizationInput>;\n /** User-supplied watcher input validated against the Definition's `watcherInputSchema`. */\n watcherInput: Scalars['JSON']['input'];\n /**\n * Delivery endpoint registered on this watcher. Multiple callers with the same\n * definition and input share one watcher. Optional: a watcher created without\n * one keeps its sources running and only stores its leads, read back through `events`.\n */\n webhook?: InputMaybe<WatcherWebhookInput>;\n};\n\n/** Autogenerated return type of CreateWatcher. */\nexport type CreateWatcherPayload = Node & {\n __typename?: 'CreateWatcherPayload';\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: Maybe<Scalars['String']['output']>;\n id: Scalars['ID']['output'];\n /**\n * The newly created or updated Watcher. Already `PROVISIONED` unless `async:\n * true` was requested, in which case its provisioning may still be `PENDING` —\n * see `provisioningStatus`.\n */\n watcher: Watcher;\n};\n\n/** Filter on a timestamp column with comparison operators. Operators combine, so `gt` and `lteq` together select a window. */\nexport type DateTimeFilterInput = {\n /**\n * When true, a row also matches when the attribute is blank: NULL, an empty\n * string, an empty list, or no related record, depending on the column.\n */\n allowBlank?: InputMaybe<Scalars['Boolean']['input']>;\n /** Exactly at. */\n eq?: InputMaybe<Scalars['ISO8601DateTime']['input']>;\n /** Strictly after. */\n gt?: InputMaybe<Scalars['ISO8601DateTime']['input']>;\n /** At or after. */\n gteq?: InputMaybe<Scalars['ISO8601DateTime']['input']>;\n /** Strictly before. */\n lt?: InputMaybe<Scalars['ISO8601DateTime']['input']>;\n /** At or before. */\n lteq?: InputMaybe<Scalars['ISO8601DateTime']['input']>;\n};\n\n/** Autogenerated input type of DebitCredits */\nexport type DebitCreditsInput = {\n /**\n * When true, draws whatever credits are available and records the uncovered rest\n * as an overage instead of refusing with insufficient_credits. Defaults to\n * false, the all-or-nothing draw.\n */\n allowOverage?: InputMaybe<Scalars['Boolean']['input']>;\n /** Global id of the billing customer to charge, the one the calling service stored when it created the customer. */\n billingCustomerId: Scalars['ID']['input'];\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: InputMaybe<Scalars['String']['input']>;\n /** UUID of the record being paid for (e.g. the Lead or Message id). */\n consumableId: Scalars['ID']['input'];\n /** AR class name of the consumed record (e.g. 'Lead', 'Message'). */\n consumableType: Scalars['String']['input'];\n /** Number of credits to draw. Must be greater than 0. */\n cost: Scalars['Float']['input'];\n /** Optional label stored on the debit rows. */\n description?: InputMaybe<Scalars['String']['input']>;\n};\n\n/** Autogenerated return type of DebitCredits. */\nexport type DebitCreditsPayload = Node & {\n __typename?: 'DebitCreditsPayload';\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: Maybe<Scalars['String']['output']>;\n /** Debit rows written by this call. Empty on failure. */\n debits: Array<BillingDebit>;\n /** Currently always `insufficient_credits`. Null on success. */\n errorCode?: Maybe<Scalars['String']['output']>;\n id: Scalars['ID']['output'];\n /** The uncovered part of the cost, when allowOverage let the draw go beyond the balance. Null otherwise. */\n overage?: Maybe<BillingOverage>;\n /** Customer's credit balance after the debit, or on failure. */\n remainingBalance: Scalars['Float']['output'];\n /**\n * True when the cost is fully accounted for: drawn from credits, or, with\n * allowOverage, partly drawn and the rest recorded as an overage. False with\n * errorCode insufficient_credits otherwise.\n */\n success: Scalars['Boolean']['output'];\n};\n\n/** Autogenerated input type of DeleteApplication */\nexport type DeleteApplicationInput = {\n applicationId: Scalars['ID']['input'];\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: InputMaybe<Scalars['String']['input']>;\n};\n\n/** Autogenerated input type of DeleteBillingCustomer */\nexport type DeleteBillingCustomerInput = {\n /** Billing customer UUID to delete, stored on the owning service's company record. */\n billingCustomerId: Scalars['ID']['input'];\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: InputMaybe<Scalars['String']['input']>;\n};\n\n/** Autogenerated return type of DeleteBillingCustomer. */\nexport type DeleteBillingCustomerPayload = Node & {\n __typename?: 'DeleteBillingCustomerPayload';\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: Maybe<Scalars['String']['output']>;\n /** True when the customer was deleted. */\n deleted: Scalars['Boolean']['output'];\n id: Scalars['ID']['output'];\n};\n\n/** Autogenerated input type of DeleteCompany */\nexport type DeleteCompanyInput = {\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: InputMaybe<Scalars['String']['input']>;\n companyId: Scalars['ID']['input'];\n /** Required while the company still owns applications. Revokes all their credentials. */\n force?: InputMaybe<Scalars['Boolean']['input']>;\n};\n\n/** Autogenerated input type of DeleteWatcher */\nexport type DeleteWatcherInput = {\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: InputMaybe<Scalars['String']['input']>;\n id: Scalars['ID']['input'];\n /**\n * Webhook URL to remove from this watcher. Omitted, stops the owner's\n * webhook-less follow instead: there is one per watcher, however many\n * webhook-less calls started it, so this stops it for all of them. The watcher\n * is canceled once it has neither a webhook nor that follow left.\n */\n webhookUrl?: InputMaybe<Scalars['String']['input']>;\n};\n\n/** Autogenerated return type of DeleteWatcher. */\nexport type DeleteWatcherPayload = Node & {\n __typename?: 'DeleteWatcherPayload';\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: Maybe<Scalars['String']['output']>;\n id: Scalars['ID']['output'];\n /** The updated or canceled Watcher. */\n watcher: Watcher;\n};\n\n/** Autogenerated input type of DeviceAuthorize */\nexport type DeviceAuthorizeInput = {\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: InputMaybe<Scalars['String']['input']>;\n scope?: InputMaybe<Scalars['String']['input']>;\n};\n\n/** The answer to a device authorization request: what to show the person and what to poll with. */\nexport type DeviceCodeResponse = {\n __typename?: 'DeviceCodeResponse';\n /** Opaque code the device polls `deviceToken` with. */\n deviceCode: Scalars['String']['output'];\n /** Seconds until the device code expires. */\n expiresIn: Scalars['Int']['output'];\n /** Minimum seconds to wait between `deviceToken` polls. */\n interval: Scalars['Int']['output'];\n /** Short code the person types at the verification URI. */\n userCode: Scalars['String']['output'];\n /** Where the person goes to approve the device. */\n verificationUri: Scalars['String']['output'];\n /** The verification URI with the user code already filled in, when the provider supplies one. */\n verificationUriComplete?: Maybe<Scalars['String']['output']>;\n};\n\n/** Autogenerated input type of DeviceToken */\nexport type DeviceTokenInput = {\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: InputMaybe<Scalars['String']['input']>;\n deviceCode: Scalars['String']['input'];\n};\n\n/** Autogenerated input type of DisconnectOutboundChannelAccount */\nexport type DisconnectOutboundChannelAccountInput = {\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: InputMaybe<Scalars['String']['input']>;\n /** Global id of the channel account to sign out. */\n id: Scalars['ID']['input'];\n};\n\n/** Autogenerated return type of DisconnectOutboundChannelAccount. */\nexport type DisconnectOutboundChannelAccountPayload = Node & {\n __typename?: 'DisconnectOutboundChannelAccountPayload';\n /** The account, now `DISCONNECTED`. */\n channelAccount: OutboundChannelAccount;\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: Maybe<Scalars['String']['output']>;\n id: Scalars['ID']['output'];\n};\n\n/** Autogenerated return type of DomainValidationResult. */\nexport type DomainValidationResultPayload = {\n __typename?: 'DomainValidationResultPayload';\n /** Per-field coherence flags from the validation pass. */\n clues?: Maybe<Scalars['JSON']['output']>;\n /** The externalId the caller passed, naming the request this result answers. */\n externalId: Scalars['ID']['output'];\n /** The organization resolved for the domain, or null when none was found. */\n organization?: Maybe<Organization>;\n};\n\n/** The verdict on the email address a `verifyEmailAddress` call named. */\nexport type EmailAddressVerificationResult = {\n __typename?: 'EmailAddressVerificationResult';\n /** The address that was verified, stripped and downcased. */\n emailAddress: Scalars['String']['output'];\n /** The externalId the caller passed, naming the request this result answers. */\n externalId: Scalars['ID']['output'];\n /**\n * Why an address was answered `invalid` without a provider check. One of:\n * known_invalid, invalid_format, disposable, no_mail_exchanger. Null otherwise.\n */\n reason?: Maybe<Scalars['String']['output']>;\n /** Verdict for the address. One of: valid, invalid, catch_all, unknown, lookup_failed. */\n status: Scalars['String']['output'];\n};\n\n/** Represents a custom header the gateway sets on an email. */\nexport type EmailHeaderInput = {\n /** Names the header; only `X-` headers are accepted. */\n name: Scalars['String']['input'];\n /** Gives the header's value. */\n value: Scalars['String']['input'];\n};\n\n/** The mailbox a channel account is connected as. Read from the provider when the account connects; the address is lower-cased. */\nexport type EmailIdentity = {\n __typename?: 'EmailIdentity';\n /** Sender name the mailbox uses, as set at the provider. Null when none is set. */\n displayName?: Maybe<Scalars['String']['output']>;\n /** Address of the mailbox, lower-cased. */\n email: Scalars['String']['output'];\n /**\n * Whether the mailbox is a personal account (`gmail.com`, `outlook.com`,\n * `hotmail.com`…) rather than a Google Workspace or Microsoft 365 one. Personal\n * accounts may send far less mail per day. Null on a claim, until the mailbox has connected.\n */\n personal?: Maybe<Scalars['Boolean']['output']>;\n /**\n * Addresses the mailbox may send as, lower-cased, its own address included. Read\n * from Gmail's send-as settings; only the own address for Microsoft. Null on a\n * claim, until the mailbox has connected.\n */\n sendAs?: Maybe<Array<Scalars['String']['output']>>;\n /**\n * HTML signature of the mailbox's own address, as set in Gmail. Null for\n * Microsoft, whose API does not expose it, and when none is set.\n */\n signature?: Maybe<Scalars['String']['output']>;\n};\n\n/** The mailbox an account is for, named by the consumer before any connection confirms it. */\nexport type EmailIdentityInput = {\n /**\n * Address of the mailbox. Compared without regard to case or surrounding spaces;\n * the owner who signs in must own this address.\n */\n email: Scalars['String']['input'];\n};\n\n/**\n * Represents where a recipient unsubscribes, set as the `List-Unsubscribe` header.\n * A `url` also sets `List-Unsubscribe-Post: List-Unsubscribe=One-Click`, so the\n * URL must accept a one-click `POST`.\n */\nexport type EmailListUnsubscribeInput = {\n /** Gives an address that unsubscribes whoever writes to it. */\n mailto?: InputMaybe<Scalars['String']['input']>;\n /** Gives an HTTPS URL that unsubscribes on a `POST`. */\n url?: InputMaybe<Scalars['String']['input']>;\n};\n\n/** Represents one recipient of an email. */\nexport type EmailRecipientInput = {\n /** Gives the recipient's address. */\n email: Scalars['String']['input'];\n /** Gives the recipient's display name, shown beside the address. */\n name?: InputMaybe<Scalars['String']['input']>;\n};\n\n/**\n * Represents an email sent from the account's mailbox. It is sent as a reply in\n * the conversation of `replyToMessageId` when one is given, otherwise as a new conversation.\n */\nexport type EmailSendInput = {\n /** Lists the blind-copied recipients, hidden from the others. */\n bcc?: InputMaybe<Array<EmailRecipientInput>>;\n /** Lists the copied recipients. */\n cc?: InputMaybe<Array<EmailRecipientInput>>;\n /**\n * Gives the address to send as, the mailbox's own or one of its verified send-as\n * addresses. Defaults to the mailbox's own address.\n */\n from?: InputMaybe<Scalars['String']['input']>;\n /**\n * Gives the display name shown beside the sender's address. Defaults to the\n * mailbox's own display name when sending from the mailbox's own address and the\n * provider gives one (Google does not for a Workspace mailbox); an alias gets no default name.\n */\n fromName?: InputMaybe<Scalars['String']['input']>;\n /** Lists custom headers, `X-` only, which the gateway stores on the sent message and returns with the replies linked to it. */\n headers?: InputMaybe<Array<EmailHeaderInput>>;\n /** Gives the HTML body. At least one of `html` and `text` is required. */\n html?: InputMaybe<Scalars['String']['input']>;\n /** Sets the `List-Unsubscribe` header and, for an HTTPS URL, one-click unsubscribe. */\n listUnsubscribe?: InputMaybe<EmailListUnsubscribeInput>;\n /**\n * Gives the global id of the account's email message to answer, as returned in\n * an earlier send's `email_message_id`. Sets `In-Reply-To`, `References` and the\n * provider's conversation.\n */\n replyToMessageId?: InputMaybe<Scalars['ID']['input']>;\n /** Gives the subject line. */\n subject: Scalars['String']['input'];\n /** Gives the plain-text body. At least one of `html` and `text` is required. */\n text?: InputMaybe<Scalars['String']['input']>;\n /** Lists the recipients; at least one is required. */\n to: Array<EmailRecipientInput>;\n};\n\n/** Email verification status. */\nexport type EmailStatus =\n /** Domain accepts all emails (catch-all). */\n | 'CATCH_ALL'\n /** Email is invalid or undeliverable. */\n | 'INVALID'\n /** Verification status is unknown. */\n | 'UNKNOWN'\n /** Email is valid and deliverable. */\n | 'VALID';\n\n/** Filter on email status with schema-validated enum values. */\nexport type EmailStatusFilterInput = {\n /**\n * When true, a row also matches when the attribute is blank — NULL, an empty\n * string, an empty list, or no related record, depending on the column. The\n * connection edge reports which branch admitted each row via `filterMatches`.\n * Contrast `blank`, which narrows to blank-only rows where this one widens to include them.\n */\n allowBlank?: InputMaybe<Scalars['Boolean']['input']>;\n /** Exact match. */\n eq?: InputMaybe<EmailStatus>;\n /** Match any of these values. */\n in?: InputMaybe<Array<EmailStatus>>;\n /** Exclude exact match. */\n notEq?: InputMaybe<EmailStatus>;\n /** Exclude any of these values. */\n notIn?: InputMaybe<Array<EmailStatus>>;\n};\n\n/** A semantic-similarity filter, as submitted. */\nexport type EmbeddingFilter = {\n __typename?: 'EmbeddingFilter';\n /** Cosine distance constraints (0 = identical, 2 = opposite). Null when the filter was submitted with `match` instead. */\n distance?: Maybe<FloatFilter>;\n /** How the entry constrains a record. Null when the filter was submitted with the deprecated `distance` instead. */\n match?: Maybe<EmbeddingMatch>;\n /**\n * Texts that were embedded and compared against, combined under this entry's\n * constraint. Populated instead of `query` when the filter was submitted with a list.\n */\n queries?: Maybe<Array<Scalars['String']['output']>>;\n /** Text that was embedded and compared against. Null when the filter was submitted with `queries` instead. */\n query?: Maybe<Scalars['String']['output']>;\n};\n\n/** Filter by semantic similarity using vector embeddings. */\nexport type EmbeddingFilterInput = {\n /**\n * When true, a row also matches when the attribute is blank — NULL, an empty\n * string, an empty list, or no related record, depending on the column. The\n * connection edge reports which branch admitted each row via `filterMatches`.\n * Contrast `blank`, which narrows to blank-only rows where this one widens to include them.\n */\n allowBlank?: InputMaybe<Scalars['Boolean']['input']>;\n /**\n * Cosine distance constraints (0 = identical, 2 = opposite). `allowBlank`\n * belongs on the entry, not here — the distance operators are evaluated against\n * the embedding column.\n * @deprecated Supply `match` instead. A raw distance is only meaningful against the axis's calibrated threshold and the basis it is measured in, neither of which a caller can see.\n */\n distance?: InputMaybe<FloatFilterInput>;\n /**\n * How this entry constrains a record. `INCLUDED_*` keeps records within the\n * axis's calibrated cosine-distance threshold. `EXCLUDED_*` drops records within\n * the axis's exclusion threshold, calibrated separately and tighter, so only a\n * record that clearly is what the query names is dropped; on an axis with no\n * exclusion calibration it is the complement of the inclusion threshold.\n * `*_LOOSE` widens either threshold so near matches are admitted (or, on the\n * excluded side, dropped too).\n * The number itself is resolved per axis and in the vector basis that axis is\n * measured in, which is why it is no longer the caller's to supply.\n */\n match?: InputMaybe<EmbeddingMatch>;\n /**\n * Texts to embed and compare against, combined under this entry's single\n * `match`. Use this for \"any of these\" — the OR that `in` gives the scalar\n * filters. Each string is embedded separately, so several concepts keep their\n * own centroid and their own recall; packing them into one `query` instead\n * averages them into a single vector that can sit between the concepts and\n * match none of them well.\n * Direction decides how they combine: an `INCLUDED_*` match keeps records close\n * to **any** of the queries, while an `EXCLUDED_*` one keeps only records far\n * from **every** one of them.\n * Mutually exclusive with `query`; supply exactly one of the two. Maximum 50 queries.\n */\n queries?: InputMaybe<Array<Scalars['String']['input']>>;\n /** Text to embed and compare against. Mutually exclusive with `queries`; supply exactly one of the two. */\n query?: InputMaybe<Scalars['String']['input']>;\n};\n\n/**\n * How an embedding filter entry constrains a record: which side of the axis's\n * calibrated threshold to keep, and how wide that threshold is. The numeric bound\n * is resolved server-side per axis, in the vector basis that axis is measured in.\n */\nexport type EmbeddingMatch =\n /**\n * Drops records close to the query at the axis's widened exclusion threshold, so\n * near matches are dropped too. On an axis with no exclusion calibration it is\n * the complement of INCLUDED_LOOSE.\n */\n | 'EXCLUDED_LOOSE'\n /**\n * Drops records that clearly are what the query names, at the axis's calibrated\n * exclusion threshold. It is tighter than the inclusion one, so a record that\n * also names another role is kept. On an axis with no exclusion calibration it\n * is the complement of INCLUDED_STRICT.\n */\n | 'EXCLUDED_STRICT'\n /** Keeps records close to the query at a widened threshold, admitting near matches at the cost of precision. */\n | 'INCLUDED_LOOSE'\n /** Keeps records semantically close to the query, at the axis's calibrated threshold. */\n | 'INCLUDED_STRICT';\n\n/** Autogenerated input type of EnrichContact */\nexport type EnrichContactInput = {\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: InputMaybe<Scalars['String']['input']>;\n /** The contact's primary email address. */\n emailAddress?: InputMaybe<Scalars['String']['input']>;\n /**\n * Caller-supplied correlation id; when present, the merged contact is broadcast\n * over the contactEnrichmentResult subscription.\n */\n externalId?: InputMaybe<Scalars['ID']['input']>;\n /** The contact's first name. */\n firstName?: InputMaybe<Scalars['String']['input']>;\n /** When the raw data was originally ingested. */\n ingestedAt?: InputMaybe<Scalars['ISO8601DateTime']['input']>;\n /** Visitor IP address associated with this event. */\n ip?: InputMaybe<Scalars['String']['input']>;\n /** The contact's last name. */\n lastName?: InputMaybe<Scalars['String']['input']>;\n /** The contact's LinkedIn profile URL. */\n linkedinUrl?: InputMaybe<Scalars['String']['input']>;\n /**\n * The organization's primary web domain. When omitted, it is resolved from the\n * linkedin and organization hints below — a CoreSignal lookup and, failing that,\n * an LLM web search, which is the expensive part of this mutation.\n */\n organizationDomain?: InputMaybe<Scalars['String']['input']>;\n /**\n * The organization's LinkedIn URL. Used to resolve the organization domain via\n * CoreSignal when organization_domain is omitted.\n */\n organizationLinkedinUrl?: InputMaybe<Scalars['String']['input']>;\n /** The organization's name. Used to resolve the organization domain via web search when organization_domain is omitted. */\n organizationName?: InputMaybe<Scalars['String']['input']>;\n /** The full raw enrichment payload. */\n rawData: Scalars['JSON']['input'];\n /** The ID of the enrichment source. */\n sourceId: Scalars['ID']['input'];\n};\n\n/** Autogenerated return type of EnrichContact. */\nexport type EnrichContactPayload = {\n __typename?: 'EnrichContactPayload';\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: Maybe<Scalars['String']['output']>;\n /** One of: received. */\n status: Scalars['String']['output'];\n};\n\n/** Autogenerated input type of EnrichIdentification */\nexport type EnrichIdentificationInput = {\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: InputMaybe<Scalars['String']['input']>;\n /** When the raw data was originally ingested. */\n ingestedAt?: InputMaybe<Scalars['ISO8601DateTime']['input']>;\n /** The IPv4 or IPv6 address being identified. */\n ip: Scalars['String']['input'];\n /** The company domain identified for this IP. */\n organizationDomain?: InputMaybe<Scalars['String']['input']>;\n /** The raw enrichment payload, stored as-is. */\n rawData?: InputMaybe<Scalars['JSON']['input']>;\n /** The ID of the enrichment source. */\n sourceId: Scalars['ID']['input'];\n};\n\n/** Autogenerated return type of EnrichIdentification. */\nexport type EnrichIdentificationPayload = {\n __typename?: 'EnrichIdentificationPayload';\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: Maybe<Scalars['String']['output']>;\n /** One of: received. */\n status: Scalars['String']['output'];\n};\n\n/** Autogenerated input type of EnrichOrganization */\nexport type EnrichOrganizationInput = {\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: InputMaybe<Scalars['String']['input']>;\n /** The company's primary web domain. */\n domain: Scalars['String']['input'];\n /**\n * Correlation id echoed on the `organizationEnrichmentResult` subscription once\n * the merge (including embeddings) has settled. When omitted, no result is broadcast.\n */\n externalId?: InputMaybe<Scalars['ID']['input']>;\n /** When the raw data was originally ingested. */\n ingestedAt?: InputMaybe<Scalars['ISO8601DateTime']['input']>;\n /** Visitor IP associated with this event. */\n ip?: InputMaybe<Scalars['String']['input']>;\n /** The full raw enrichment payload. */\n rawData: Scalars['JSON']['input'];\n /** The ID of the enrichment source. */\n sourceId: Scalars['ID']['input'];\n};\n\n/** Autogenerated return type of EnrichOrganization. */\nexport type EnrichOrganizationPayload = {\n __typename?: 'EnrichOrganizationPayload';\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: Maybe<Scalars['String']['output']>;\n /** One of: received. */\n status: Scalars['String']['output'];\n};\n\n/** How one constrained filter admitted this row. */\nexport type FilterMatch = {\n __typename?: 'FilterMatch';\n /** Whether this filter was submitted with `allowBlank: true`. */\n allowBlank: Scalars['Boolean']['output'];\n /** Whether the row matched on the attribute's value or on its absence. */\n matchedOn: FilterMatchSource;\n /** Dotted path of the filter argument, e.g. \"contact.jobTitle\" or \"organization.industry\". */\n path: Scalars['String']['output'];\n};\n\n/** Which branch of a filter admitted a row. */\nexport type FilterMatchSource =\n /**\n * The attribute is absent on this row — NULL, an empty string, an empty list, or\n * no related record. Usually paired with `allowBlank: true`, but `blank: true`\n * targets absence on purpose and reports BLANK too.\n */\n | 'BLANK'\n /** The row carries a value on this attribute, so the filter's own predicate is what admitted it. */\n | 'VALUE';\n\n/** Autogenerated input type of FindContacts */\nexport type FindContactsInput = {\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: InputMaybe<Scalars['String']['input']>;\n /** Caller-supplied identifier keying the `contactFindProgress` subscription. */\n externalId: Scalars['ID']['input'];\n /** Filter criteria for the contacts. Ignored with `page.after`: the search keeps the filters it started with. */\n filter?: InputMaybe<ContactsFilterInput>;\n /** Filter criteria for the contacts' organizations. Ignored with `page.after`. */\n organizationFilter?: InputMaybe<OrganizationsFilterInput>;\n /** The page asked for: `first` contacts, after the `after` cursor. Defaults to the first 20 contacts of a new search. */\n page?: InputMaybe<FindPageInput>;\n /**\n * Reach dimensions to reveal for every contact on the page, recorded against the\n * company the token acts for. Defaults to none. An email address or phone number\n * Atlas has not checked is looked up, and the page stays FILLING until it is.\n */\n reveal?: InputMaybe<Array<RevealDimension>>;\n /** Sort order of the search. Ignored with `page.after`. */\n sort?: InputMaybe<Array<ContactSortInput>>;\n};\n\n/** Autogenerated return type of FindContacts. */\nexport type FindContactsPayload = {\n __typename?: 'FindContactsPayload';\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: Maybe<Scalars['String']['output']>;\n /** One of: received. */\n status: Scalars['String']['output'];\n};\n\n/** Autogenerated input type of FindOrganizations */\nexport type FindOrganizationsInput = {\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: InputMaybe<Scalars['String']['input']>;\n /** Caller-supplied identifier keying the `organizationFindProgress` subscription. */\n externalId: Scalars['ID']['input'];\n /** Filter criteria for the organizations. Ignored with `page.after`: the search keeps the filters it started with. */\n filter?: InputMaybe<OrganizationsFilterInput>;\n /**\n * The page asked for: `first` organizations, after the `after` cursor. Defaults\n * to the first 20 organizations of a new search.\n */\n page?: InputMaybe<FindPageInput>;\n /**\n * Reach dimensions to reveal for every organization on the page, recorded\n * against the company the token acts for. Defaults to none.\n */\n reveal?: InputMaybe<Array<RevealDimension>>;\n /** Sort order of the search. Ignored with `page.after`. */\n sort?: InputMaybe<Array<OrganizationSortInput>>;\n};\n\n/** Autogenerated return type of FindOrganizations. */\nexport type FindOrganizationsPayload = {\n __typename?: 'FindOrganizationsPayload';\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: Maybe<Scalars['String']['output']>;\n /** One of: received. */\n status: Scalars['String']['output'];\n};\n\n/**\n * The page of a search a find operation asks for. Leave `after` out to start a new\n * search; pass a cursor to read on in the search it came from.\n */\nexport type FindPageInput = {\n /**\n * A cursor from a page of an earlier call: reads the records listed after it, in\n * the search that cursor belongs to, with the filters that search started with.\n * A cursor that is not one is refused with `details.after` invalid, and one of a\n * search that expired or another caller started with `details.after` expired.\n */\n after?: InputMaybe<Scalars['String']['input']>;\n /** Number of records on the page, from 1 to 20. Defaults to 20. */\n first?: InputMaybe<Scalars['Int']['input']>;\n};\n\n/** Where a page of a find operation stands. */\nexport type FindPageStatus =\n /** The last version of the page: nothing more will change on it. */\n | 'COMPLETE'\n /** Atlas is still filling the page and will send it again. */\n | 'FILLING';\n\n/** A numeric comparison filter, as submitted. */\nexport type FloatFilter = {\n __typename?: 'FloatFilter';\n /** Exact match. */\n eq?: Maybe<Scalars['Float']['output']>;\n /** Greater than. */\n gt?: Maybe<Scalars['Float']['output']>;\n /** Greater than or equal. */\n gteq?: Maybe<Scalars['Float']['output']>;\n /** Less than. */\n lt?: Maybe<Scalars['Float']['output']>;\n /** Less than or equal. */\n lteq?: Maybe<Scalars['Float']['output']>;\n};\n\n/** Filter on a numeric column with comparison operators. */\nexport type FloatFilterInput = {\n /**\n * When true, a row also matches when the attribute is blank — NULL, an empty\n * string, an empty list, or no related record, depending on the column. The\n * connection edge reports which branch admitted each row via `filterMatches`.\n * Contrast `blank`, which narrows to blank-only rows where this one widens to include them.\n */\n allowBlank?: InputMaybe<Scalars['Boolean']['input']>;\n /** Exact match. */\n eq?: InputMaybe<Scalars['Float']['input']>;\n /** Greater than. */\n gt?: InputMaybe<Scalars['Float']['input']>;\n /** Greater than or equal. */\n gteq?: InputMaybe<Scalars['Float']['input']>;\n /** Less than. */\n lt?: InputMaybe<Scalars['Float']['input']>;\n /** Less than or equal. */\n lteq?: InputMaybe<Scalars['Float']['input']>;\n};\n\n/** Autogenerated input type of GrantPromotionalCredits */\nexport type GrantPromotionalCreditsInput = {\n /** Number of credits to grant. Must be greater than 0. */\n amount: Scalars['Float']['input'];\n /** Global id of the billing customer to credit. */\n billingCustomerId: Scalars['ID']['input'];\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: InputMaybe<Scalars['String']['input']>;\n /** When the unconsumed part of the grant expires. Must be in the future. */\n expiresAt: Scalars['ISO8601DateTime']['input'];\n /** Caller-chosen key, unique per customer, that makes a retry safe. */\n idempotencyKey: Scalars['String']['input'];\n /** Why the credits are granted, stored on the credit for the history. */\n reason: Scalars['String']['input'];\n};\n\n/** Autogenerated return type of GrantPromotionalCredits. */\nexport type GrantPromotionalCreditsPayload = Node & {\n __typename?: 'GrantPromotionalCreditsPayload';\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: Maybe<Scalars['String']['output']>;\n /** The granted credit, or the one an earlier call with the same key granted. */\n credit: BillingCredit;\n id: Scalars['ID']['output'];\n};\n\n/** Filter on an encoded global ID field with positive and negative matching. */\nexport type IdFilterInput = {\n /**\n * When true, a row also matches when the attribute is blank — NULL, an empty\n * string, an empty list, or no related record, depending on the column. The\n * connection edge reports which branch admitted each row via `filterMatches`.\n * Contrast `blank`, which narrows to blank-only rows where this one widens to include them.\n */\n allowBlank?: InputMaybe<Scalars['Boolean']['input']>;\n /** Exact match. */\n eq?: InputMaybe<Scalars['ID']['input']>;\n /** Match any of these values. Maximum 10000 entries. */\n in?: InputMaybe<Array<Scalars['ID']['input']>>;\n /** Exclude exact match. */\n notEq?: InputMaybe<Scalars['ID']['input']>;\n /** Exclude any of these values. Maximum 10000 entries. */\n notIn?: InputMaybe<Array<Scalars['ID']['input']>>;\n};\n\n/** An IP-to-company identification record. */\nexport type Identification = Node & {\n __typename?: 'Identification';\n /** Confidence score between 0.0 and 1.0. */\n confidenceScore?: Maybe<Scalars['Float']['output']>;\n /** When the identification was created. */\n createdAt?: Maybe<Scalars['ISO8601DateTime']['output']>;\n id: Scalars['ID']['output'];\n /** The identified IP address. */\n ipAddress: Scalars['String']['output'];\n /** Best matching industry name from provided candidates. */\n matchedIndustry?: Maybe<Scalars['String']['output']>;\n /** The identified organization. */\n organization?: Maybe<Organization>;\n /** When the identification was last updated. */\n updatedAt?: Maybe<Scalars['ISO8601DateTime']['output']>;\n};\n\n/** The connection type for Identification. */\nexport type IdentificationConnection = {\n __typename?: 'IdentificationConnection';\n /**\n * Estimated total number of items across all pages. It comes from the query\n * planner rather than a count, so it costs planning time instead of a scan and\n * cannot exceed the statement timeout. It is approximate at every magnitude,\n * including small ones, and it moves when the table's statistics are refreshed.\n * Accuracy depends on the filter: within a few percent on plain column and\n * array-overlap filters, and as much as 30% out on a range filter such as\n * `companySize`. It is not meaningful for the embedding filters `jobTitle` and\n * `industry` — no statistics exist for a vector-distance predicate, so the\n * estimate ignores the distance threshold entirely and approximates only what\n * the other filters admit; it has been measured reporting 241371 for a filter\n * whose true result was empty. Never render it as an exact figure, and use\n * `totalCount` when the figure has to be exact.\n */\n approximateTotalCount: Scalars['Int']['output'];\n /** A list of edges. */\n edges?: Maybe<Array<Maybe<IdentificationEdge>>>;\n /** A list of nodes. */\n nodes?: Maybe<Array<Maybe<Identification>>>;\n /** Information to aid in pagination. */\n pageInfo: PageInfo;\n /** Total number of items across all pages, exact unless `upTo` is given. */\n totalCount: Scalars['Int']['output'];\n};\n\n\n/** The connection type for Identification. */\nexport type IdentificationConnectionTotalCountArgs = {\n upTo?: InputMaybe<Scalars['Int']['input']>;\n};\n\n/** An edge in a connection. */\nexport type IdentificationEdge = Node & {\n __typename?: 'IdentificationEdge';\n /** A cursor for use in pagination. */\n cursor: Scalars['String']['output'];\n id: Scalars['ID']['output'];\n /** The item at the end of the edge. */\n node?: Maybe<Identification>;\n};\n\n/** Filter criteria for identifications. */\nexport type IdentificationFilterInput = {\n /** Filter by confidence score (0.0–1.0). */\n confidenceScore?: InputMaybe<FloatFilterInput>;\n /** Return only matched identifications. */\n valid?: InputMaybe<Scalars['Boolean']['input']>;\n};\n\n/** Autogenerated input type of IdentifyOrganizationByIp */\nexport type IdentifyOrganizationByIpInput = {\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: InputMaybe<Scalars['String']['input']>;\n /**\n * Visitor's ISO 3166-1 alpha-2 country code, which sharpens the match and\n * narrows the decision-makers Atlas looks for to that country.\n */\n countryCode?: InputMaybe<Scalars['String']['input']>;\n /** Caller-supplied identifier keying the `organizationIdentifyResult` subscription. */\n externalId: Scalars['ID']['input'];\n /** The visitor's IPv4 or IPv6 address. */\n ip: Scalars['String']['input'];\n /** Reach dimensions to reveal on the organization, recorded against the company the token acts for. Defaults to none. */\n reveal?: InputMaybe<Array<RevealDimension>>;\n /** Optional URL that also receives the result by webhook. Requires the `atlas/source:write` scope. */\n webhookUrl?: InputMaybe<Scalars['String']['input']>;\n};\n\n/** Autogenerated return type of IdentifyOrganizationByIp. */\nexport type IdentifyOrganizationByIpPayload = {\n __typename?: 'IdentifyOrganizationByIpPayload';\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: Maybe<Scalars['String']['output']>;\n /** One of: received. */\n status: Scalars['String']['output'];\n};\n\n/** Autogenerated input type of ImportLinkedinHistory */\nexport type ImportLinkedinHistoryInput = {\n /** Global id of the account. Must be `RUNNING`. */\n channelAccountId: Scalars['ID']['input'];\n /** Conversations to import. */\n chats?: InputMaybe<Array<LinkedinChatReferenceInput>>;\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: InputMaybe<Scalars['String']['input']>;\n /** Connection requests to import. */\n invitations?: InputMaybe<Array<LinkedinInvitationReferenceInput>>;\n};\n\n/** Autogenerated return type of ImportLinkedinHistory. */\nexport type ImportLinkedinHistoryPayload = Node & {\n __typename?: 'ImportLinkedinHistoryPayload';\n /** The account the import runs on. */\n channelAccount: OutboundChannelAccount;\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: Maybe<Scalars['String']['output']>;\n id: Scalars['ID']['output'];\n};\n\n/** Returned once, at creation. The secret is never retrievable again. */\nexport type IssuedCredential = {\n __typename?: 'IssuedCredential';\n /** Public half of the credential. Paired with clientSecret below. */\n clientId: Scalars['String']['output'];\n /** Store it now; only its digest is kept, so it cannot be shown again. */\n clientSecret: Scalars['String']['output'];\n /** The stored credential the secret belongs to. */\n credential: ApplicationCredential;\n};\n\n/** Returned once, at creation. The code is never retrievable again. */\nexport type IssuedInvitation = {\n __typename?: 'IssuedInvitation';\n /**\n * Give this to the invitee; they run `acceptCompanyInvitation`. Only its digest\n * is kept, so it cannot be shown again — and whoever holds it can join.\n */\n code: Scalars['String']['output'];\n /** When the code stops being redeemable. */\n expiresAt: Scalars['ISO8601DateTime']['output'];\n /** The stored invitation the code belongs to. */\n invitation: CompanyInvitation;\n};\n\n/** A file to attach to a LinkedIn message. The combined size of a message's attachments may not exceed 20 MB, LinkedIn's limit. */\nexport type LinkedinAttachmentInput = {\n /** The file's bytes, base64-encoded. */\n content: Scalars['String']['input'];\n /** MIME type, e.g. `application/pdf`. */\n contentType: Scalars['String']['input'];\n /** File name shown to the recipient. */\n filename: Scalars['String']['input'];\n};\n\n/** Withdraws a connection request the account sent. */\nexport type LinkedinCancelInvitationInput = {\n /** LinkedIn's id of the request, as `channel_action.completed` returned it for the `LINKEDIN_INVITE` action. */\n invitationId: Scalars['String']['input'];\n};\n\n/** A one-to-one LinkedIn conversation Outreach started, or that followed an invitation it sent. */\nexport type LinkedinChat = Node & {\n __typename?: 'LinkedinChat';\n /** LinkedIn's id of the chat. */\n chatId: Scalars['String']['output'];\n /** When recorded. */\n createdAt: Scalars['ISO8601DateTime']['output'];\n id: Scalars['ID']['output'];\n /** The connection request this conversation followed, when there was one. */\n invitation?: Maybe<LinkedinInvitation>;\n /** When the most recent message was sent. */\n lastMessageAt?: Maybe<Scalars['ISO8601DateTime']['output']>;\n /** The other participant, as far as the provider told us. */\n member?: Maybe<LinkedinMember>;\n /** The other participant's member id. */\n memberId: Scalars['String']['output'];\n};\n\n/** The connection type for LinkedinChat. */\nexport type LinkedinChatConnection = {\n __typename?: 'LinkedinChatConnection';\n /** A list of edges. */\n edges?: Maybe<Array<Maybe<LinkedinChatEdge>>>;\n /** A list of nodes. */\n nodes?: Maybe<Array<Maybe<LinkedinChat>>>;\n /** Information to aid in pagination. */\n pageInfo: PageInfo;\n /** Total number of items across all pages. */\n totalCount: Scalars['Int']['output'];\n};\n\n/** An edge in a connection. */\nexport type LinkedinChatEdge = {\n __typename?: 'LinkedinChatEdge';\n /** A cursor for use in pagination. */\n cursor: Scalars['String']['output'];\n /** The item at the end of the edge. */\n node?: Maybe<LinkedinChat>;\n};\n\n/** A conversation the consumer already holds, to import. */\nexport type LinkedinChatReferenceInput = {\n /** LinkedIn's id of the chat. */\n chatId: Scalars['String']['input'];\n /** The other participant's member id (`ACoAA…`). */\n memberId: Scalars['String']['input'];\n /** The messages the consumer holds for it. */\n messages: Array<LinkedinMessageReferenceInput>;\n};\n\n/**\n * The LinkedIn session the account owner is signed in with, as their browser holds\n * it. Either the raw `cookie` header or the `liAt` and `jsessionid` pair.\n */\nexport type LinkedinCookieCredentialsInput = {\n /**\n * The browser's `Cookie` header value for linkedin.com, carrying at least\n * `li_at` and `JSESSIONID`. Write-only, stored encrypted.\n */\n cookie?: InputMaybe<Scalars['String']['input']>;\n /**\n * ISO 3166-1 alpha-2 country the owner uses LinkedIn from, so the gateway exits\n * from that country. Left out, the country on the member's LinkedIn profile is\n * used. A country the gateway cannot exit from falls back to the nearest one it\n * serves, so a sign-in is never refused over its country.\n */\n countryCode?: InputMaybe<Scalars['String']['input']>;\n /** The `JSESSIONID` cookie, LinkedIn's CSRF token. Used with `liAt` when `cookie` is not given. */\n jsessionid?: InputMaybe<Scalars['String']['input']>;\n /** The `li_at` cookie, LinkedIn's session token. Used with `jsessionid` when `cookie` is not given. */\n liAt?: InputMaybe<Scalars['String']['input']>;\n /**\n * The browser's User-Agent, so the gateway looks like the device the session was\n * opened on. Left out, a common desktop browser is used.\n */\n userAgent?: InputMaybe<Scalars['String']['input']>;\n};\n\n/**\n * The LinkedIn member a channel account is connected as. Read from the provider\n * when the account connects; the member id is the identifier LinkedIn keeps stable.\n */\nexport type LinkedinIdentity = {\n __typename?: 'LinkedinIdentity';\n /** Name as displayed on LinkedIn. */\n displayName?: Maybe<Scalars['String']['output']>;\n /** First name. */\n firstName?: Maybe<Scalars['String']['output']>;\n /** Last name. */\n lastName?: Maybe<Scalars['String']['output']>;\n /** LinkedIn member id (`ACoAA…`), the stable identifier of the person across providers. */\n memberId: Scalars['String']['output'];\n /**\n * Whether the member holds a LinkedIn Premium subscription, as read from the\n * provider when the account connected. Premium accounts are not subject to the\n * monthly cap on invitation notes and get higher invitation quotas. Null when\n * the provider did not say.\n */\n premium?: Maybe<Scalars['Boolean']['output']>;\n /** Public profile URL. */\n profileUrl?: Maybe<Scalars['String']['output']>;\n /** Public identifier, the last segment of the profile URL. */\n publicIdentifier?: Maybe<Scalars['String']['output']>;\n};\n\n/** The LinkedIn member an account is for, named by the consumer before any connection confirms it. */\nexport type LinkedinIdentityInput = {\n /** LinkedIn member id (`ACoAA…`), the identifier LinkedIn keeps stable for a person across providers. */\n memberId: Scalars['String']['input'];\n};\n\n/** A connection request sent through Outreach, followed until it settles. */\nexport type LinkedinInvitation = Node & {\n __typename?: 'LinkedinInvitation';\n /** When the member accepted, as far as Outreach saw it. */\n acceptedAt?: Maybe<Scalars['ISO8601DateTime']['output']>;\n /** The action that sent it. */\n channelAction?: Maybe<OutboundChannelAction>;\n /** The conversation LinkedIn opened once the member accepted. */\n chat?: Maybe<LinkedinChat>;\n /** When recorded. */\n createdAt: Scalars['ISO8601DateTime']['output'];\n id: Scalars['ID']['output'];\n /** LinkedIn's id of the request. */\n invitationId: Scalars['String']['output'];\n /** The invited member (`ACoAA…`). */\n memberId: Scalars['String']['output'];\n /** The note sent with it. */\n note?: Maybe<Scalars['String']['output']>;\n /** When it was sent. */\n sentAt: Scalars['ISO8601DateTime']['output'];\n /** Where it stands. */\n state: LinkedinInvitationState;\n /** When Outreach withdrew it. */\n withdrawnAt?: Maybe<Scalars['ISO8601DateTime']['output']>;\n};\n\n/** The connection type for LinkedinInvitation. */\nexport type LinkedinInvitationConnection = {\n __typename?: 'LinkedinInvitationConnection';\n /** A list of edges. */\n edges?: Maybe<Array<Maybe<LinkedinInvitationEdge>>>;\n /** A list of nodes. */\n nodes?: Maybe<Array<Maybe<LinkedinInvitation>>>;\n /** Information to aid in pagination. */\n pageInfo: PageInfo;\n /** Total number of items across all pages. */\n totalCount: Scalars['Int']['output'];\n};\n\n/** An edge in a connection. */\nexport type LinkedinInvitationEdge = {\n __typename?: 'LinkedinInvitationEdge';\n /** A cursor for use in pagination. */\n cursor: Scalars['String']['output'];\n /** The item at the end of the edge. */\n node?: Maybe<LinkedinInvitation>;\n};\n\n/** Narrows `linkedinInvitations`. */\nexport type LinkedinInvitationFilterInput = {\n /** Keep only the invitations in these states. */\n state?: InputMaybe<LinkedinInvitationStateFilterInput>;\n};\n\n/** A connection request the consumer already holds, to import. */\nexport type LinkedinInvitationReferenceInput = {\n /** LinkedIn's id of the request. */\n invitationId: Scalars['String']['input'];\n /** The invited member's id (`ACoAA…`). */\n memberId: Scalars['String']['input'];\n /** The note it carried, if known. */\n note?: InputMaybe<Scalars['String']['input']>;\n /** When it was sent, if known. */\n sentAt?: InputMaybe<Scalars['ISO8601DateTime']['input']>;\n /** Where it stands, as far as the consumer knows. */\n state: LinkedinInvitationState;\n};\n\n/** Where a connection request stands. One of: pending, accepted, withdrawn, gone. */\nexport type LinkedinInvitationState =\n /** The member accepted; a chat followed. */\n | 'ACCEPTED'\n /** No longer pending at LinkedIn, for a reason it does not tell (declined, expired). */\n | 'GONE'\n /** Sent, not answered yet. */\n | 'PENDING'\n /** Withdrawn through `linkedinCancelInvitation`. */\n | 'WITHDRAWN';\n\n/** Filter on invitation state (eq/in/notEq/notIn). */\nexport type LinkedinInvitationStateFilterInput = {\n /** Exact match. */\n eq?: InputMaybe<LinkedinInvitationState>;\n /** Match any of these values. */\n in?: InputMaybe<Array<LinkedinInvitationState>>;\n /** Exclude exact match. */\n notEq?: InputMaybe<LinkedinInvitationState>;\n /** Exclude any of these values. */\n notIn?: InputMaybe<Array<LinkedinInvitationState>>;\n};\n\n/**\n * A LinkedIn connection request to one member. Fails at the provider when the\n * member is already a connection or a request is already pending.\n */\nexport type LinkedinInviteInput = {\n /** LinkedIn member id of the recipient (`ACoAA…`). */\n memberId: Scalars['String']['input'];\n /**\n * Note sent with the request. LinkedIn caps notes at 300 characters and, on free\n * accounts, at a handful of noted requests a month.\n */\n message?: InputMaybe<Scalars['String']['input']>;\n};\n\n/**\n * Reads a member's profile as the account: identity, headline, location, network\n * distance, pending connection request, InMail reachability. Reading does not\n * notify the member; `linkedinVisit` does.\n */\nexport type LinkedinLookupProfileInput = {\n /** Member id (`ACoAA…`) or public identifier (the profile URL's last segment). */\n identifier: Scalars['String']['input'];\n /** Bypass the hour-long cache and read LinkedIn now, against the account's rate limits. */\n noCache?: InputMaybe<Scalars['Boolean']['input']>;\n};\n\n/** A LinkedIn member, as far as the provider has told us about them. */\nexport type LinkedinMember = {\n __typename?: 'LinkedinMember';\n /** Name as displayed on LinkedIn. */\n displayName?: Maybe<Scalars['String']['output']>;\n /** First name. */\n firstName?: Maybe<Scalars['String']['output']>;\n /** Last name. */\n lastName?: Maybe<Scalars['String']['output']>;\n /** LinkedIn member id (`ACoAA…`). */\n memberId?: Maybe<Scalars['String']['output']>;\n /** Public profile URL. */\n profileUrl?: Maybe<Scalars['String']['output']>;\n /** Public identifier. */\n publicIdentifier?: Maybe<Scalars['String']['output']>;\n};\n\n/** A message in a conversation Outreach follows, the shape `message.received` delivers. */\nexport type LinkedinMessage = Node & {\n __typename?: 'LinkedinMessage';\n /** `[{ type, mimetype, filename, file_size, url, url_expires_at }]`. */\n attachments: Scalars['JSON']['output'];\n /** The action that sent it, when Outreach did. */\n channelAction?: Maybe<OutboundChannelAction>;\n /** The conversation. */\n chat: LinkedinChat;\n id: Scalars['ID']['output'];\n /** LinkedIn's id of the message. */\n messageId: Scalars['String']['output'];\n /** True when the account sent it. */\n own: Scalars['Boolean']['output'];\n /** Who sent it. */\n sender?: Maybe<LinkedinMember>;\n /** When it was sent. */\n sentAt: Scalars['ISO8601DateTime']['output'];\n /** The message. */\n text?: Maybe<Scalars['String']['output']>;\n};\n\n/** The connection type for LinkedinMessage. */\nexport type LinkedinMessageConnection = {\n __typename?: 'LinkedinMessageConnection';\n /** A list of edges. */\n edges?: Maybe<Array<Maybe<LinkedinMessageEdge>>>;\n /** A list of nodes. */\n nodes?: Maybe<Array<Maybe<LinkedinMessage>>>;\n /** Information to aid in pagination. */\n pageInfo: PageInfo;\n /** Total number of items across all pages. */\n totalCount: Scalars['Int']['output'];\n};\n\n/** An edge in a connection. */\nexport type LinkedinMessageEdge = {\n __typename?: 'LinkedinMessageEdge';\n /** A cursor for use in pagination. */\n cursor: Scalars['String']['output'];\n /** The item at the end of the edge. */\n node?: Maybe<LinkedinMessage>;\n};\n\n/** A message of a conversation the consumer already holds, to import. */\nexport type LinkedinMessageReferenceInput = {\n /** LinkedIn's id of the message. */\n messageId: Scalars['String']['input'];\n /** Whether the account's owner wrote it. */\n own: Scalars['Boolean']['input'];\n /** When it was sent. */\n sentAt: Scalars['ISO8601DateTime']['input'];\n /** Its text, if any. */\n text?: InputMaybe<Scalars['String']['input']>;\n};\n\n/**\n * A LinkedIn message to one member. Sent in the existing conversation with that\n * member when there is one, otherwise a new one is started.\n */\nexport type LinkedinSendMessageInput = {\n /** Files to attach, 20 MB in all at most. */\n attachments?: InputMaybe<Array<LinkedinAttachmentInput>>;\n /** LinkedIn member id of the recipient (`ACoAA…`). */\n memberId: Scalars['String']['input'];\n /** The message. */\n text: Scalars['String']['input'];\n};\n\n/**\n * A LinkedIn profile visit: the profile is read as the account, and the member is\n * notified of the visit when their settings allow it.\n */\nexport type LinkedinVisitInput = {\n /** LinkedIn member id of the profile (`ACoAA…`). */\n memberId: Scalars['String']['input'];\n};\n\n/**\n * A record placed in Mercator's geography. Mercator resolves `locations` for every\n * type implementing it, from the record's `locationIds`.\n */\nexport type Located = {\n /** Global id of the record. */\n id: Scalars['ID']['output'];\n /** Mercator Location ids of the record's divisions, as stored. Read by the router to resolve `locations` from Mercator. */\n locationIds: Array<Scalars['ID']['output']>;\n /**\n * Mercator divisions of the record, in the order its subgraph stores them: the\n * resolved place first, then its ancestors. Empty until the record's location\n * has been resolved.\n */\n locations: LocationConnection;\n};\n\n\n/**\n * A record placed in Mercator's geography. Mercator resolves `locations` for every\n * type implementing it, from the record's `locationIds`.\n */\nexport type LocatedLocationsArgs = {\n after?: InputMaybe<Scalars['String']['input']>;\n before?: InputMaybe<Scalars['String']['input']>;\n first?: InputMaybe<Scalars['Int']['input']>;\n last?: InputMaybe<Scalars['Int']['input']>;\n subtype?: InputMaybe<LocationSubtypeFilterInput>;\n};\n\n/** Federation reference to a Location owned by another subgraph. */\nexport type Location = Node & {\n __typename?: 'Location';\n /** Numeric hierarchy depth. 0 = country, higher = more granular. */\n adminLevel: Scalars['Int']['output'];\n /**\n * National administrative codes for this division, own codes first, then codes\n * inherited from enclosing divisions — so a locality reports its département's\n * and region's INSEE codes without the caller walking the hierarchy. Each entry\n * names the division it came from via locationId. Empty for divisions in\n * countries without a mapped scheme.\n */\n administrativeCodes: Array<AdministrativeCode>;\n /**\n * Every enclosing division, ordered root-first (highest ancestor first,\n * immediate parent last) so the connection reads as a breadcrumb path. Excludes\n * this location, so a root division returns an empty connection — and so does a\n * freshly imported division whose ancestry is not yet resolved. The two are\n * deliberately indistinguishable here: both mean \"no ancestors to walk\".\n */\n ancestors: LocationConnection;\n /** Center point of the division boundary as a GeoJSON Point. */\n centroid?: Maybe<Coordinate>;\n /** Child divisions in the hierarchy. */\n children: LocationConnection;\n /** ISO 3166-1 alpha-2 country code of the division. */\n countryCode?: Maybe<Scalars['String']['output']>;\n /** GlobalID-encoded Location id. */\n id: Scalars['ID']['output'];\n /**\n * ISO 3166-2 code of the principal subdivision this division belongs to, e.g.\n * \"FR-IDF\", \"BE-WAL\" — the division's own code only on REGION rows; every deeper\n * division carries its enclosing region's. As shipped by Overture; null when the\n * source has none.\n */\n iso31662?: Maybe<Scalars['String']['output']>;\n /**\n * Name in the requested language, e.g. \"Luxembourg\" for EN where name is\n * \"Lëtzebuerg\". Falls back to the English name, and then to name, for the\n * divisions the source publishes neither for — so it is always a usable name\n * rather than sometimes null.\n */\n localizedName: Scalars['String']['output'];\n /**\n * Primary name of the division as Overture publishes it, which is the local\n * endonym for a multilingual country — \"Lëtzebuerg\",\n * \"Schweiz/Suisse/Svizzera/Svizra\". Read localizedName when the name has to be\n * understood, matched or displayed in one language.\n */\n name: Scalars['String']['output'];\n /** Parent administrative division in the hierarchy. */\n parent?: Maybe<Location>;\n /**\n * Name with its administrative wrapper removed — \"Edinburgh\" where name is \"City\n * of Edinburgh\", \"Copenhagen\" where name is \"Københavns Kommune\". Read this\n * instead of name when the value is stored or shown as a city: Overture files\n * many cities under their council's name, and persisting that records a city\n * nobody calls it. Identical to name for divisions whose name carries no\n * wrapper, so a caller already storing name keeps the same value for them.\n */\n shortName: Scalars['String']['output'];\n /** Administrative subdivision level. */\n subtype: LocationSubtype;\n /**\n * True when Overture publishes this division as a point only and Mercator\n * approximates its boundary: a circle sized by population, clipped to the\n * nearest enclosing division at least as large. Containment answers for such a\n * division are approximate, so containingDivisions lists it after the real\n * boundaries of its level.\n */\n syntheticGeometry: Scalars['Boolean']['output'];\n};\n\n\n/** Federation reference to a Location owned by another subgraph. */\nexport type LocationAncestorsArgs = {\n after?: InputMaybe<Scalars['String']['input']>;\n before?: InputMaybe<Scalars['String']['input']>;\n first?: InputMaybe<Scalars['Int']['input']>;\n last?: InputMaybe<Scalars['Int']['input']>;\n};\n\n\n/** Federation reference to a Location owned by another subgraph. */\nexport type LocationChildrenArgs = {\n after?: InputMaybe<Scalars['String']['input']>;\n before?: InputMaybe<Scalars['String']['input']>;\n country?: InputMaybe<Scalars['String']['input']>;\n deep?: InputMaybe<Scalars['Boolean']['input']>;\n first?: InputMaybe<Scalars['Int']['input']>;\n last?: InputMaybe<Scalars['Int']['input']>;\n sort?: InputMaybe<Array<LocationSortInput>>;\n subtype?: InputMaybe<LocationSubtypeFilterInput>;\n};\n\n\n/** Federation reference to a Location owned by another subgraph. */\nexport type LocationLocalizedNameArgs = {\n language: LocationLanguage;\n};\n\n\n/** Federation reference to a Location owned by another subgraph. */\nexport type LocationShortNameArgs = {\n language?: InputMaybe<LocationLanguage>;\n};\n\n/** The identifier scheme a code passed to `resolveByCode` is expressed in. */\nexport type LocationCode =\n /** ISO 3166-1 alpha-2 country code (e.g. \"BE\", \"US\"). */\n | 'COUNTRY_ISO';\n\n/** The connection type for Location. */\nexport type LocationConnection = {\n __typename?: 'LocationConnection';\n /** A list of edges. */\n edges?: Maybe<Array<Maybe<LocationEdge>>>;\n /** A list of nodes. */\n nodes?: Maybe<Array<Maybe<Location>>>;\n /** Information to aid in pagination. */\n pageInfo: PageInfo;\n /** Total number of items across all pages. */\n totalCount: Scalars['Int']['output'];\n};\n\n/** An edge in a connection. */\nexport type LocationEdge = {\n __typename?: 'LocationEdge';\n /** A cursor for use in pagination. */\n cursor: Scalars['String']['output'];\n /** The item at the end of the edge. */\n node?: Maybe<Location>;\n};\n\n/**\n * Language a division's name can be rendered in — the locales Sortlist serves, and\n * the only ones every tier is guaranteed to carry a name for.\n */\nexport type LocationLanguage =\n /** German name of the division. */\n | 'DE'\n /** English name of the division. */\n | 'EN'\n /** Spanish name of the division. */\n | 'ES'\n /** French name of the division. */\n | 'FR'\n /** Italian name of the division. */\n | 'IT'\n /** Dutch name of the division. */\n | 'NL';\n\n/** Fields available for sorting locations. */\nexport type LocationSortField =\n /**\n * Resident population as shipped by Overture. Null on small or minor divisions,\n * which sort after every populated one regardless of direction.\n */\n | 'POPULATION';\n\n/** Sort configuration for locations. */\nexport type LocationSortInput = {\n /** Direction to sort in. Defaults to descending. */\n direction?: InputMaybe<SortDirection>;\n /** Field to sort by. */\n field: LocationSortField;\n};\n\n/** Administrative subdivision level of a geographic location. */\nexport type LocationSubtype =\n /** Borough or city district between the locality and neighborhood levels. */\n | 'BOROUGH'\n /** Sovereign nation (admin_level 0). */\n | 'COUNTRY'\n /** County, department, or second-level subdivision (admin_level 3-4). */\n | 'COUNTY'\n /** Dependent or overseas territory of a country. */\n | 'DEPENDENCY'\n /** Local administrative unit such as a commune or municipality, between the county and locality levels. */\n | 'LOCALADMIN'\n /** City, town, or municipality (admin_level 5-8). */\n | 'LOCALITY'\n /**\n * Continent or business macro-region grouping whole countries, above the country\n * level. Its member countries are exposed through `children`, not through\n * `parent` on the country: a country belongs to several macro-countries at once.\n */\n | 'MACROCOUNTRY'\n /** Grouping of counties between the region and county levels. */\n | 'MACROCOUNTY'\n /** Large area grouping multiple neighborhoods within a locality. */\n | 'MACROHOOD'\n /** Grouping of regions between the country and region levels. */\n | 'MACROREGION'\n /** Neighborhood, district, or sub-municipal area (admin_level 9+). */\n | 'NEIGHBORHOOD'\n /** State, province, or first-level subdivision (admin_level 1-2). */\n | 'REGION';\n\n/** Filter on location subtype with schema-validated enum values. */\nexport type LocationSubtypeFilterInput = {\n /** Exact match. */\n eq?: InputMaybe<LocationSubtype>;\n /** Match any of these subdivision levels. */\n in?: InputMaybe<Array<LocationSubtype>>;\n /** Exclude exact match. */\n notEq?: InputMaybe<LocationSubtype>;\n /** Exclude any of these values. */\n notIn?: InputMaybe<Array<LocationSubtype>>;\n};\n\n/** Root mutation type. Each subgraph contributes its own fields to it. */\nexport type Mutation = {\n __typename?: 'Mutation';\n /** Joins the authenticated caller. The only management mutation a non-member may call. */\n acceptCompanyInvitation?: Maybe<Company>;\n /**\n * Starts one authentication attempt on a channel account, in the shape its\n * provider requires: a hosted sign-in page the owner is sent to (`returnUrl`),\n * or credentials the consumer collected and passes along (`credentials`). Works\n * on a draft account and on a connected or disconnected one alike:\n * re-authenticating is the same call. The account stays in its current status\n * until the identity is read; the outcome arrives as a\n * `channel_account.connected` event.\n */\n authenticateOutboundChannelAccount?: Maybe<AuthenticateOutboundChannelAccountPayload>;\n /**\n * Cancels all of a billing customer's active subscriptions immediately. Used\n * when the owning company is destroyed. Idempotent.\n */\n cancelBillingCustomerSubscriptions?: Maybe<CancelBillingCustomerSubscriptionsPayload>;\n /**\n * Cancels the subscription's pending scheduled plan change (see\n * BillingSubscription.pendingChange) before it applies at the next bill date.\n * Free of charge — the subscription keeps its current plan. Errors when no\n * change is pending.\n */\n cancelBillingSubscriptionChange?: Maybe<CancelBillingSubscriptionChangePayload>;\n /**\n * Ends the subscription immediately, forfeiting the rest of the paid period.\n * Billing offers no cancel-at-period-end, so this exists for a subscription on a\n * withdrawn plan, which cannot be changed instead.\n */\n cancelCompanySubscription?: Maybe<Company>;\n /**\n * Stops actions of the caller's that have not run yet, so an account no longer\n * acts on a prospect the consumer has dropped. Each id is answered on its own:\n * an action still `PENDING` becomes `CANCELLED` and never reaches the provider,\n * one already being performed cannot be stopped, and one that has settled or is\n * not on this account is reported as such. Calling again on an action already\n * cancelled succeeds. A cancelled action releases the day's quota it had booked,\n * though not its place in the account's pace, and reaches an open\n * `outboundChannelActionResult` subscription like any other outcome.\n */\n cancelOutboundChannelActions?: Maybe<CancelOutboundChannelActionsPayload>;\n /**\n * Changes a subscription's plan or periodicity. Unset arguments preserve the\n * current value. Upgrades are invoiced immediately with proration and grant the\n * prorated credit share; downgrades and lateral moves are SCHEDULED at the next\n * bill date (surfaced as BillingSubscription.pendingChange, cancelable for free\n * via cancelBillingSubscriptionChange) — the current plan's credits and limits\n * stay in force until then. Re-targeting the current plan cancels a pending change.\n */\n changeBillingSubscription?: Maybe<ChangeBillingSubscriptionPayload>;\n /**\n * Moves an existing subscription to another plan or periodicity. Upgrades\n * invoice immediately with prorated credits; downgrades are scheduled at the\n * next bill date and readable as `pendingChange` until they apply.\n */\n changeCompanySubscription?: Maybe<Company>;\n /**\n * Completes a sign-in started by `authenticateOutboundChannelAccount` on a\n * provider that returns the owner's browser with an authorization code\n * (`google`, `microsoft`). The consumer's callback, the `returnUrl` of the\n * attempt, receives `code` and `state` and hands both here. The gateway\n * exchanges the code for the mailbox's tokens, which it keeps and never returns,\n * reads the identity and answers with the attempt's outcome;\n * `channel_account.connected` follows as for any other sign-in. Refused as\n * `channel_account.removed`, `state.unknown`, `state.expired`,\n * `state.already_used` (a second call with the same `state`) or\n * `state.unsupported` (a provider that signs in another way). A code the\n * provider refuses or a consent missing a permission is an outcome, not an\n * error: `CODE_REJECTED`, `SCOPES_MISSING`.\n */\n completeOutboundChannelAuthentication?: Maybe<CompleteOutboundChannelAuthenticationPayload>;\n /**\n * Brings what a consumable costs to newCost without rewriting any row or writing\n * a negative amount. A higher cost writes additional positive consumption debits\n * for the difference, each naming the consumable's first debit as its\n * adjustedDebit, drawn like debitCredits: with allowOverage, what credits do not\n * cover is recorded as an overage. A lower cost gives the difference back as\n * CORRECTION credits, the consumable's overage first, then its debits newest\n * first. Each correction is priced at the unit price of what it reduces (the\n * debit's, or the overage price) and cancels that revenue at its original date;\n * an overage that is lowered is still billed, so the customer keeps the credits.\n * Correction credits expire one year after the call. Idempotent per customer and\n * idempotencyKey: a replay answers the rows the first call wrote, whatever the\n * other arguments say. Refused with consumable_id: not_consumed when\n * debitCredits never charged the consumable.\n */\n correctDebit?: Maybe<CorrectDebitPayload>;\n /** Registers an application under a company so it can hold credentials and call the federation. */\n createApplication?: Maybe<Application>;\n /** Returns the secret exactly once. */\n createApplicationCredential?: Maybe<IssuedCredential>;\n /** Creates a hosted Stripe Checkout session for a new subscription and returns the URL the frontend redirects to. */\n createBillingCheckoutSession?: Maybe<CreateBillingCheckoutSessionPayload>;\n /** Creates a billing customer + matching Stripe customer. Caller stores the returned id. */\n createBillingCustomer?: Maybe<CreateBillingCustomerPayload>;\n /**\n * Creates an embedded Stripe Checkout session for a new subscription and returns\n * the clientSecret the frontend passes to Stripe.js.\n */\n createBillingEmbeddedCheckoutSession?: Maybe<CreateBillingEmbeddedCheckoutSessionPayload>;\n /** Creates a Stripe Customer Portal session and returns the hosted URL the frontend redirects to. */\n createBillingPortalSession?: Maybe<CreateBillingPortalSessionPayload>;\n /** Creates a company with the calling user as its first member. */\n createCompany?: Maybe<Company>;\n /** Opens Stripe's hosted portal for card replacement and invoice history. */\n createCompanyBillingPortalSession?: Maybe<BillingPortalSession>;\n /**\n * Subscribes a company to a plan. Billing is never reached directly by a caller:\n * it checks no tenancy of its own, so every write that spends a company's money\n * goes through a membership check here first.\n */\n createCompanyCheckoutSession?: Maybe<BillingCheckoutSession>;\n /**\n * A security grant: whoever redeems the code gains full control of every\n * application and credential the company owns. Refused for a personal company —\n * create a shared one.\n */\n createCompanyInvitation?: Maybe<IssuedInvitation>;\n /**\n * Registers a channel account as a draft on a provider of the channel: the one\n * named in `provider`, or the channel's default when none is. Nothing reaches\n * the provider yet: the account is connected by a later authentication step,\n * whose shape depends on the provider. The consumer stores the returned id\n * before any event can arrive.\n */\n createOutboundChannelAccount?: Maybe<CreateOutboundChannelAccountPayload>;\n /** Create a new enrichment source. */\n createSource?: Maybe<Source>;\n /**\n * Create a Watcher for a given Definition. All providers registered on the\n * Definition are auto-provisioned; the user does not choose providers.\n *\n * By default every provider is set up before this mutation returns, so the\n * Watcher comes back `PROVISIONED` and a provider refusing the request fails the\n * call. Pass `async: true` to instead have the Watcher persisted immediately as\n * `PENDING` and provisioned in the background — a provider outage then delays\n * provisioning rather than failing creation. See `async`.\n *\n * There is no mutation to change a Watcher's `watcherInput` or `icp` afterwards,\n * by design. Both determine *which leads the Watcher returns*, and a Watcher is\n * shared: callers with the same definition and input attach their own webhook to\n * one row, so editing it in place would silently repoint every other webhook\n * attached to it. Those fields are also what the Watcher is keyed on, so\n * changing them means becoming a different Watcher.\n *\n * To change what a Watcher returns, call `createWatcher` again with the new\n * input — an existing match is reused, otherwise a new Watcher is provisioned —\n * then `deleteWatcher` the old one if nothing else needs it.\n * `updateWatcherLeadCaps` and `setWebhookActive` remain available: they bound\n * volume and delivery, not which leads qualify.\n */\n createWatcher?: Maybe<CreateWatcherPayload>;\n /**\n * Draws credits for in-app usage. Idempotent per consumable: a replay for an\n * already-paid consumableType/consumableId returns the original debits as a\n * success instead of drawing again. Returns success=false with\n * errorCode=insufficient_credits when the balance can't cover the cost; raises a\n * GraphQL error if the billingCustomerId is unknown.\n */\n debitCredits?: Maybe<DebitCreditsPayload>;\n /** Deletes an application the caller may manage. */\n deleteApplication?: Maybe<Application>;\n /**\n * Hard-deletes a billing customer and its Stripe customer. Used to compensate a\n * failed sales-offer creation. Refuses a customer that has subscriptions,\n * invoices, credits, or debits.\n */\n deleteBillingCustomer?: Maybe<DeleteBillingCustomerPayload>;\n /** Deletes a company the caller belongs to. Requires `force` while it still owns applications. */\n deleteCompany?: Maybe<Company>;\n /**\n * Cancel a Watcher and tear down its external provider resources. The\n * cancellation is immediate; the external teardown runs asynchronously and is\n * retried across provider outages. Events are preserved.\n */\n deleteWatcher?: Maybe<DeleteWatcherPayload>;\n /** Starts the OAuth device authorization flow and returns the codes to show the person and to poll with. */\n deviceAuthorize?: Maybe<DeviceCodeResponse>;\n /**\n * Polls the device flow for tokens. Instead of failing the request, the\n * provider's error code is returned in `error`: authorization_pending and\n * slow_down mean poll again, expired_token and access_denied mean stop.\n */\n deviceToken?: Maybe<TokenResponse>;\n /**\n * Signs a channel account out without losing it: its connection is retired and\n * released at the provider, the account moves to `DISCONNECTED` and stops\n * performing actions, and the consumer receives `channel_account.disconnected`.\n * Its id, identity and history stay; `authenticateOutboundChannelAccount` on the\n * same account connects it again. Refused as `channel_account.not_connected` on\n * a draft, and as `channel_account.removed` once removed. To be rid of an\n * account for good, use `removeOutboundChannelAccount`.\n */\n disconnectOutboundChannelAccount?: Maybe<DisconnectOutboundChannelAccountPayload>;\n /**\n * Asynchronously merge a raw source payload into the contact record, applying the source's\n * trust score to resolve field conflicts, then recompute the confidence score.\n * Returns `{status: \"received\"}` immediately; the merged Contact arrives via the\n * `contactEnrichmentResult(externalId:)` subscription, so pass an `externalId` and\n * subscribe before calling.\n * Use when pushing enrichment data from a registered source.\n * To discover a contact from a known identifier (email, LinkedIn, name) without raw\n * source data, use `searchContact` instead.\n */\n enrichContact?: Maybe<EnrichContactPayload>;\n /**\n * Asynchronously store or update an IP-to-company identification record from a source\n * payload. Returns `{status: \"received\"}` immediately.\n * Unlike `enrichContact` and `enrichOrganization` there is no result subscription for this\n * one, so a caller learns only that the push was accepted; failures are logged and\n * reported to Sentry rather than broadcast.\n * Use when a source (e.g. Snitcher) has already resolved an IP to a company domain\n * and you want to persist that result. To trigger async resolution from an IP address,\n * use `searchOrganization` with `ip:` instead.\n */\n enrichIdentification?: Maybe<EnrichIdentificationPayload>;\n /**\n * Asynchronously merge a raw source payload into the organization record, applying the\n * source's trust score to resolve field conflicts, then recompute the confidence score.\n * Returns `{status: \"received\"}` immediately; the merged Organization arrives via the\n * `organizationEnrichmentResult(externalId:)` subscription, so pass an `externalId` and\n * subscribe before calling.\n * Use when pushing enrichment data from a registered source.\n * To look up an existing organization without writing data, use `organization(domain:)` instead.\n */\n enrichOrganization?: Maybe<EnrichOrganizationPayload>;\n /**\n * Asks for a page of contacts matching `filter` and `organizationFilter` and returns\n * `{status: \"received\"}` at once. The page arrives on the\n * `contactFindProgress(externalId:)` subscription, which only delivers to a subscriber\n * acting for the same caller, and is sent again as Atlas fills it until it is COMPLETE.\n * Without `page.after`, the call starts a new search; with the `endCursor` of a page it\n * reads on in that search. The filter applies exactly what it states, with no quality floor\n * added.\n */\n findContacts?: Maybe<FindContactsPayload>;\n /**\n * Asks for a page of organizations matching `filter` and returns `{status: \"received\"}` at\n * once. The page arrives on the `organizationFindProgress(externalId:)` subscription,\n * which only delivers to a subscriber acting for the same caller, and is sent again as\n * Atlas fills it until it is COMPLETE. Without `page.after`, the call starts a new search;\n * with the `endCursor` of a page it reads on in that search. The filter applies exactly what\n * it states, with no quality floor added. A `domain: { eq }` Atlas holds no fresh row for is\n * looked up before the page is COMPLETE; a malformed one is refused with\n * `INVALID_INTERACTION`.\n */\n findOrganizations?: Maybe<FindOrganizationsPayload>;\n /**\n * Grants free promotional credits: a PROMO credit at a unit price of 0, so\n * consuming it recognizes no revenue. Idempotent per customer and\n * idempotencyKey: a replay returns the credit the first call granted, whatever\n * the other arguments say, even once its expiresAt has passed.\n */\n grantPromotionalCredits?: Maybe<GrantPromotionalCreditsPayload>;\n /**\n * Asynchronously identifies the organization behind a visitor's IP address. Returns\n * `{status: \"received\"}` immediately; the organization, or null when Atlas cannot tell\n * who it is, arrives on the `organizationIdentifyResult(externalId:)` subscription, which\n * only delivers to a subscriber acting for the same caller. Atlas also starts identifying\n * a handful of the organization's decision-makers in the background. `reveal` defaults\n * to nothing: only fields the company already owns are served unless it names the\n * dimensions it wants.\n */\n identifyOrganizationByIp?: Maybe<IdentifyOrganizationByIpPayload>;\n /**\n * Brings a consumer's existing LinkedIn history under Outreach's watch: the\n * conversations, messages and connection requests it passes are stored as the\n * consumer holds them, then followed like the ones Outreach started. Nothing is\n * read from the provider. Accepted and run in the background;\n * `linkedin_import.completed` reports the counts. Meant for a consumer's first\n * connection of an account, under a scope of its own. Every id must be\n * LinkedIn's own, without a provider's or LinkedIn's own envelope: a value\n * starting with `urn:`, or with a prefix such as `CLASSIC_` or `SENT_`, is\n * refused as `IDENTIFIER_NOT_CANONICAL` before anything is stored, with the\n * offending fields and values in `details`.\n */\n importLinkedinHistory?: Maybe<ImportLinkedinHistoryPayload>;\n /**\n * Asks the gateway to perform one action on a connected account. The action is\n * accepted and executed in the background; its outcome reaches the consumer as\n * `channel_action.completed` or `channel_action.failed`. Repeating the call with\n * the same `externalId` — or, when none is given, with the same account and\n * input — returns the accepted action instead of performing it again.\n */\n performOutboundChannelAction?: Maybe<PerformOutboundChannelActionPayload>;\n /** Exchanges a refresh token for a new access token. */\n refreshToken?: Maybe<TokenResponse>;\n /**\n * Refunds part or all of what was charged for one consumable, as REFUND credits,\n * whether credits paid for it or it went to overage and is not paid yet: one\n * credit per consumption debit and per overage of the consumable, each amount ×\n * row / total charged, rounded up to the cent in the customer's favour and\n * capped at what that row still holds. Each refund credit is priced at the unit\n * price of what it reduces (the debit's, or the overage price), cancels that\n * revenue at its original date (the debit's revenueRecognizedAt or the overage's\n * occurredAt), and expires one year after the call. Refused with amount:\n * exceeds_refundable (and the refundable figure) beyond what remains unrefunded\n * for the consumable, and consumable_id: not_consumed when nothing charged it.\n * Idempotent per customer and idempotencyKey: a replay answers the credits the\n * first call wrote, whatever the other arguments say.\n */\n refundDebit?: Maybe<RefundDebitPayload>;\n /** Also revokes every credential that member created for this company's applications, in one transaction. */\n removeCompanyMember?: Maybe<Company>;\n /**\n * Removes a channel account for good: it becomes `REMOVED` and disappears from\n * `outboundChannelAccount` at once; the provider's connection is deleted in the\n * background and, once the provider has confirmed, the consumer receives\n * `channel_account.removed`. Idempotent: removing a removed account changes\n * nothing. To use the same identity again, register a new account.\n */\n removeOutboundChannelAccount?: Maybe<RemoveOutboundChannelAccountPayload>;\n /** Effective immediately for new token requests; tokens already issued remain valid until they expire. */\n revokeApplicationCredential?: Maybe<ApplicationCredential>;\n /** Revokes a pending invitation so its code can no longer be redeemed. */\n revokeCompanyInvitation?: Maybe<CompanyInvitation>;\n /** Runs a background job inline. Admin-only, intended for E2E test orchestration. */\n runSignalsSynchronousWorker?: Maybe<RunSignalsSynchronousWorkerPayload>;\n /** Run a background job inline. Admin-only, intended for E2E test orchestration. */\n runSynchronousWorker?: Maybe<RunSynchronousWorkerPayload>;\n /**\n * Asynchronously discover an Atlas Contact record.\n * Returns `{status: \"received\"}` immediately. The result arrives via\n * the `contactIdentifyResult(externalId:)` subscription.\n * Provide exactly one lookup mode via `lookup`:\n * `contactId`, `linkedinUrl`, `emailAddress`, or `name`.\n * @deprecated Use `findContacts` with a filter naming the person and `page: { first: 1 }`.\n */\n searchContact?: Maybe<SearchContactPayload>;\n /**\n * Synchronously discover a contact's phone number and merge it into the contact record.\n * Unlike `searchContact` this one blocks and answers on the same round trip, so no\n * subscription is involved.\n * Supply `contactId` when you hold one, otherwise `linkedinUrl`. A LinkedIn URL Atlas\n * has not seen before is identified first, through the same strategy `searchContact`\n * leads with, so the lookup does not require the person to be known already; it\n * answers `contact_not_found` only when identification fails too. The lookup is keyed\n * on the LinkedIn profile, so a contact carrying none answers `missing_linkedin_url`.\n * A number already known is re-validated at most once per revalidation period; inside\n * it the cached number is returned without a new lookup.\n * A `linkedinUrl` that is not a LinkedIn profile URL is refused with\n * `INVALID_INTERACTION` rather than answered as `contact_not_found`, so bad input stays\n * distinguishable from a genuine miss.\n * When the lookup cannot be completed (the upstream source refuses the request, fails\n * or times out), it answers `lookup_failed` instead of `not_found`: nothing was\n * learned about the person, no miss is recorded, and a later call retries. A number\n * Atlas already holds is still answered as `found`.\n * @deprecated Use `findContacts` with a filter naming the person, `page: { first: 1 }` and `reveal: [CONTACT_PHONE_NUMBER]`.\n */\n searchContactPhone?: Maybe<SearchContactPhonePayload>;\n /**\n * Asynchronously searches for contacts matching `filter`/`organizationFilter`, the\n * same criteria accepted by the `contacts` query — but in addition to the local\n * database, this also searches Atlas's third-party sources (currently Coresignal)\n * and persists any new matches as Contact records.\n * Returns `{status: \"received\"}` immediately. The result arrives via the\n * `contactSearchResult(externalId:)` subscription, as a paginated connection —\n * further pages beyond the first are fetched via the `contacts` query using the\n * same filter.\n * @deprecated Use `findContacts`.\n */\n searchContacts?: Maybe<SearchContactsPayload>;\n /**\n * Asynchronously search for an organization by domain or visitor IP.\n * Returns {status: \"received\"} immediately. The matched Organization arrives via\n * the `organizationSearchResult(externalId:)` subscription.\n * Provide exactly one lookup mode via `lookup`: either `domain` or `byIp`.\n * A `lookup.domain` that is not a resolvable hostname is rejected up front with\n * `INVALID_INTERACTION` and no work is queued.\n * @deprecated Use `findOrganizations` with `filter: { domain: { eq } }` and `page: { first: 1 }`, or `identifyOrganizationByIp` for an IP.\n */\n searchOrganization?: Maybe<SearchOrganizationPayload>;\n /** Sets the company the calling user acts for by default, or clears it with null. It must be one the caller belongs to. */\n setDefaultCompany?: Maybe<User>;\n /**\n * Activate or pause delivery for a single webhook on a Watcher. The upstream\n * source's emitting state is reconciled asynchronously, so the call succeeds\n * even while the provider is unreachable. Does not deprovision — the\n * subscription, webhook, and config are preserved.\n */\n setWatcherWebhookActive?: Maybe<SetWatcherWebhookActivePayload>;\n /**\n * Activate or pause delivery for a single webhook on a Watcher. The upstream\n * source's emitting state is reconciled asynchronously, so the call succeeds\n * even while the provider is unreachable. Does not deprovision — the\n * subscription, webhook, and config are preserved.\n * @deprecated Use `setWatcherWebhookActive` instead.\n */\n setWebhookActive?: Maybe<SetWebhookActivePayload>;\n /** Manually fire an ingestion run for a Watcher. Rejects pure-webhook strategies. */\n triggerWatcher?: Maybe<TriggerWatcherPayload>;\n /** Update an existing enrichment source. */\n updateSource?: Maybe<Source>;\n /**\n * Replace the freshness-first per-period lead caps on a Watcher. The new caps\n * take effect in-house immediately and are propagated to Rodz-backed signals as\n * their per-day limit.\n */\n updateWatcherLeadCaps?: Maybe<UpdateWatcherLeadCapsPayload>;\n /**\n * Asynchronously validate that the supplied name, email, and phone are internally consistent\n * for a contact at the given organization.\n * Returns `{status: \"received\"}` immediately. Per-field coherence flags arrive via\n * the `contactValidationResult(externalId:)` subscription.\n */\n validateContact?: Maybe<ValidateContactPayload>;\n /**\n * Asynchronously validate that the supplied company field values are coherent with\n * Atlas's stored data for the given domain.\n * Returns `{status: \"received\"}` immediately. Per-field coherence flags arrive via\n * the `domainValidationResult(externalId:)` subscription.\n * A `domain` that is not a resolvable hostname is rejected up front with\n * `INVALID_INTERACTION` and no work is queued.\n */\n validateDomain?: Maybe<ValidateDomainPayload>;\n /**\n * Asynchronously verifies whether an email address can receive mail. Returns\n * `{status: \"received\"}` immediately; the verdict\n * arrives on the `emailAddressVerificationResult(externalId:)` subscription, which only\n * delivers to a subscriber acting for the same caller.\n * Atlas first checks the addresses it already knows: one it holds as invalid (a reported\n * hard bounce, or an earlier failed verification) answers `invalid` with reason\n * `known_invalid` and spends no provider call. Any other address is checked with the email\n * verification provider. A definitive verdict from the provider (`valid`, `invalid` or\n * `catch_all`) is kept on the contacts that hold that exact address (their email status and a provider source),\n * as email discovery does. When none does and the address is not on a free webmail domain,\n * Atlas creates a contact holding only that address under the organization of its domain,\n * creating the organization when the domain is new, and keeps the verdict there. A webmail\n * address no contact holds is not kept. Neither an `unknown` verdict nor a prescreen\n * rejection (bad format, disposable domain, no mail server) is kept.\n * Each call also records one usage row naming the caller, the verdict and whether the\n * provider was called, never the address. Until the check runs, the address waits in the\n * job queue encrypted, and the ciphertext becomes unreadable after one hour.\n * When the provider cannot be reached, times out or is not configured, the verdict is\n * `lookup_failed`: nothing was learned about the address, and a later call retries.\n */\n verifyEmailAddress?: Maybe<VerifyEmailAddressPayload>;\n};\n\n\n/** Root mutation type. Each subgraph contributes its own fields to it. */\nexport type MutationAcceptCompanyInvitationArgs = {\n input: AcceptCompanyInvitationInput;\n};\n\n\n/** Root mutation type. Each subgraph contributes its own fields to it. */\nexport type MutationAuthenticateOutboundChannelAccountArgs = {\n input: AuthenticateOutboundChannelAccountInput;\n};\n\n\n/** Root mutation type. Each subgraph contributes its own fields to it. */\nexport type MutationCancelBillingCustomerSubscriptionsArgs = {\n input: CancelBillingCustomerSubscriptionsInput;\n};\n\n\n/** Root mutation type. Each subgraph contributes its own fields to it. */\nexport type MutationCancelBillingSubscriptionChangeArgs = {\n input: CancelBillingSubscriptionChangeInput;\n};\n\n\n/** Root mutation type. Each subgraph contributes its own fields to it. */\nexport type MutationCancelCompanySubscriptionArgs = {\n input: CancelCompanySubscriptionInput;\n};\n\n\n/** Root mutation type. Each subgraph contributes its own fields to it. */\nexport type MutationCancelOutboundChannelActionsArgs = {\n input: CancelOutboundChannelActionsInput;\n};\n\n\n/** Root mutation type. Each subgraph contributes its own fields to it. */\nexport type MutationChangeBillingSubscriptionArgs = {\n input: ChangeBillingSubscriptionInput;\n};\n\n\n/** Root mutation type. Each subgraph contributes its own fields to it. */\nexport type MutationChangeCompanySubscriptionArgs = {\n input: ChangeCompanySubscriptionInput;\n};\n\n\n/** Root mutation type. Each subgraph contributes its own fields to it. */\nexport type MutationCompleteOutboundChannelAuthenticationArgs = {\n input: CompleteOutboundChannelAuthenticationInput;\n};\n\n\n/** Root mutation type. Each subgraph contributes its own fields to it. */\nexport type MutationCorrectDebitArgs = {\n input: CorrectDebitInput;\n};\n\n\n/** Root mutation type. Each subgraph contributes its own fields to it. */\nexport type MutationCreateApplicationArgs = {\n input: CreateApplicationInput;\n};\n\n\n/** Root mutation type. Each subgraph contributes its own fields to it. */\nexport type MutationCreateApplicationCredentialArgs = {\n input: CreateApplicationCredentialInput;\n};\n\n\n/** Root mutation type. Each subgraph contributes its own fields to it. */\nexport type MutationCreateBillingCheckoutSessionArgs = {\n input: CreateBillingCheckoutSessionInput;\n};\n\n\n/** Root mutation type. Each subgraph contributes its own fields to it. */\nexport type MutationCreateBillingCustomerArgs = {\n input: CreateBillingCustomerInput;\n};\n\n\n/** Root mutation type. Each subgraph contributes its own fields to it. */\nexport type MutationCreateBillingEmbeddedCheckoutSessionArgs = {\n input: CreateBillingEmbeddedCheckoutSessionInput;\n};\n\n\n/** Root mutation type. Each subgraph contributes its own fields to it. */\nexport type MutationCreateBillingPortalSessionArgs = {\n input: CreateBillingPortalSessionInput;\n};\n\n\n/** Root mutation type. Each subgraph contributes its own fields to it. */\nexport type MutationCreateCompanyArgs = {\n input: CreateCompanyInput;\n};\n\n\n/** Root mutation type. Each subgraph contributes its own fields to it. */\nexport type MutationCreateCompanyBillingPortalSessionArgs = {\n input: CreateCompanyBillingPortalSessionInput;\n};\n\n\n/** Root mutation type. Each subgraph contributes its own fields to it. */\nexport type MutationCreateCompanyCheckoutSessionArgs = {\n input: CreateCompanyCheckoutSessionInput;\n};\n\n\n/** Root mutation type. Each subgraph contributes its own fields to it. */\nexport type MutationCreateCompanyInvitationArgs = {\n input: CreateCompanyInvitationInput;\n};\n\n\n/** Root mutation type. Each subgraph contributes its own fields to it. */\nexport type MutationCreateOutboundChannelAccountArgs = {\n input: CreateOutboundChannelAccountInput;\n};\n\n\n/** Root mutation type. Each subgraph contributes its own fields to it. */\nexport type MutationCreateSourceArgs = {\n input: CreateSourceInput;\n};\n\n\n/** Root mutation type. Each subgraph contributes its own fields to it. */\nexport type MutationCreateWatcherArgs = {\n input: CreateWatcherInput;\n};\n\n\n/** Root mutation type. Each subgraph contributes its own fields to it. */\nexport type MutationDebitCreditsArgs = {\n input: DebitCreditsInput;\n};\n\n\n/** Root mutation type. Each subgraph contributes its own fields to it. */\nexport type MutationDeleteApplicationArgs = {\n input: DeleteApplicationInput;\n};\n\n\n/** Root mutation type. Each subgraph contributes its own fields to it. */\nexport type MutationDeleteBillingCustomerArgs = {\n input: DeleteBillingCustomerInput;\n};\n\n\n/** Root mutation type. Each subgraph contributes its own fields to it. */\nexport type MutationDeleteCompanyArgs = {\n input: DeleteCompanyInput;\n};\n\n\n/** Root mutation type. Each subgraph contributes its own fields to it. */\nexport type MutationDeleteWatcherArgs = {\n input: DeleteWatcherInput;\n};\n\n\n/** Root mutation type. Each subgraph contributes its own fields to it. */\nexport type MutationDeviceAuthorizeArgs = {\n input: DeviceAuthorizeInput;\n};\n\n\n/** Root mutation type. Each subgraph contributes its own fields to it. */\nexport type MutationDeviceTokenArgs = {\n input: DeviceTokenInput;\n};\n\n\n/** Root mutation type. Each subgraph contributes its own fields to it. */\nexport type MutationDisconnectOutboundChannelAccountArgs = {\n input: DisconnectOutboundChannelAccountInput;\n};\n\n\n/** Root mutation type. Each subgraph contributes its own fields to it. */\nexport type MutationEnrichContactArgs = {\n input: EnrichContactInput;\n};\n\n\n/** Root mutation type. Each subgraph contributes its own fields to it. */\nexport type MutationEnrichIdentificationArgs = {\n input: EnrichIdentificationInput;\n};\n\n\n/** Root mutation type. Each subgraph contributes its own fields to it. */\nexport type MutationEnrichOrganizationArgs = {\n input: EnrichOrganizationInput;\n};\n\n\n/** Root mutation type. Each subgraph contributes its own fields to it. */\nexport type MutationFindContactsArgs = {\n input: FindContactsInput;\n};\n\n\n/** Root mutation type. Each subgraph contributes its own fields to it. */\nexport type MutationFindOrganizationsArgs = {\n input: FindOrganizationsInput;\n};\n\n\n/** Root mutation type. Each subgraph contributes its own fields to it. */\nexport type MutationGrantPromotionalCreditsArgs = {\n input: GrantPromotionalCreditsInput;\n};\n\n\n/** Root mutation type. Each subgraph contributes its own fields to it. */\nexport type MutationIdentifyOrganizationByIpArgs = {\n input: IdentifyOrganizationByIpInput;\n};\n\n\n/** Root mutation type. Each subgraph contributes its own fields to it. */\nexport type MutationImportLinkedinHistoryArgs = {\n input: ImportLinkedinHistoryInput;\n};\n\n\n/** Root mutation type. Each subgraph contributes its own fields to it. */\nexport type MutationPerformOutboundChannelActionArgs = {\n input: PerformOutboundChannelActionInput;\n};\n\n\n/** Root mutation type. Each subgraph contributes its own fields to it. */\nexport type MutationRefreshTokenArgs = {\n input: RefreshTokenInput;\n};\n\n\n/** Root mutation type. Each subgraph contributes its own fields to it. */\nexport type MutationRefundDebitArgs = {\n input: RefundDebitInput;\n};\n\n\n/** Root mutation type. Each subgraph contributes its own fields to it. */\nexport type MutationRemoveCompanyMemberArgs = {\n input: RemoveCompanyMemberInput;\n};\n\n\n/** Root mutation type. Each subgraph contributes its own fields to it. */\nexport type MutationRemoveOutboundChannelAccountArgs = {\n input: RemoveOutboundChannelAccountInput;\n};\n\n\n/** Root mutation type. Each subgraph contributes its own fields to it. */\nexport type MutationRevokeApplicationCredentialArgs = {\n input: RevokeApplicationCredentialInput;\n};\n\n\n/** Root mutation type. Each subgraph contributes its own fields to it. */\nexport type MutationRevokeCompanyInvitationArgs = {\n input: RevokeCompanyInvitationInput;\n};\n\n\n/** Root mutation type. Each subgraph contributes its own fields to it. */\nexport type MutationRunSignalsSynchronousWorkerArgs = {\n input: RunSignalsSynchronousWorkerInput;\n};\n\n\n/** Root mutation type. Each subgraph contributes its own fields to it. */\nexport type MutationRunSynchronousWorkerArgs = {\n input: RunSynchronousWorkerInput;\n};\n\n\n/** Root mutation type. Each subgraph contributes its own fields to it. */\nexport type MutationSearchContactArgs = {\n input: SearchContactInput;\n};\n\n\n/** Root mutation type. Each subgraph contributes its own fields to it. */\nexport type MutationSearchContactPhoneArgs = {\n input: SearchContactPhoneInput;\n};\n\n\n/** Root mutation type. Each subgraph contributes its own fields to it. */\nexport type MutationSearchContactsArgs = {\n input: SearchContactsInput;\n};\n\n\n/** Root mutation type. Each subgraph contributes its own fields to it. */\nexport type MutationSearchOrganizationArgs = {\n input: SearchOrganizationInput;\n};\n\n\n/** Root mutation type. Each subgraph contributes its own fields to it. */\nexport type MutationSetDefaultCompanyArgs = {\n input: SetDefaultCompanyInput;\n};\n\n\n/** Root mutation type. Each subgraph contributes its own fields to it. */\nexport type MutationSetWatcherWebhookActiveArgs = {\n input: SetWatcherWebhookActiveInput;\n};\n\n\n/** Root mutation type. Each subgraph contributes its own fields to it. */\nexport type MutationSetWebhookActiveArgs = {\n input: SetWebhookActiveInput;\n};\n\n\n/** Root mutation type. Each subgraph contributes its own fields to it. */\nexport type MutationTriggerWatcherArgs = {\n input: TriggerWatcherInput;\n};\n\n\n/** Root mutation type. Each subgraph contributes its own fields to it. */\nexport type MutationUpdateSourceArgs = {\n input: UpdateSourceInput;\n};\n\n\n/** Root mutation type. Each subgraph contributes its own fields to it. */\nexport type MutationUpdateWatcherLeadCapsArgs = {\n input: UpdateWatcherLeadCapsInput;\n};\n\n\n/** Root mutation type. Each subgraph contributes its own fields to it. */\nexport type MutationValidateContactArgs = {\n input: ValidateContactInput;\n};\n\n\n/** Root mutation type. Each subgraph contributes its own fields to it. */\nexport type MutationValidateDomainArgs = {\n input: ValidateDomainInput;\n};\n\n\n/** Root mutation type. Each subgraph contributes its own fields to it. */\nexport type MutationVerifyEmailAddressArgs = {\n input: VerifyEmailAddressInput;\n};\n\n/** An object with an ID. */\nexport type Node = {\n /** ID of the object. */\n id: Scalars['ID']['output'];\n};\n\n/** A company or organization identified and enriched from multiple data sources. */\nexport type Organization = Located & Node & {\n __typename?: 'Organization';\n /** Annual revenue range in USD (e.g. [1000000, 5000000]). */\n annualRevenue?: Maybe<Scalars['Range']['output']>;\n /** Employee count range (e.g. [10, 50]). */\n companySize?: Maybe<Scalars['Range']['output']>;\n /** Confidence score (0.0–1.0) from source quality, freshness, and diversity. */\n confidenceScore?: Maybe<Scalars['Float']['output']>;\n /** General contact email address. */\n contactEmail?: Maybe<Scalars['String']['output']>;\n /** Known contacts at this organization. */\n contacts: ContactConnection;\n /** When the organization record was first created. */\n createdAt: Scalars['ISO8601DateTime']['output'];\n /** Short company description or tagline. */\n description?: Maybe<Scalars['String']['output']>;\n /** Primary web domain (unique identifier for deduplication). */\n domain: Scalars['String']['output'];\n /** When the domain was last verified as reachable. */\n domainReachableAt?: Maybe<Scalars['ISO8601DateTime']['output']>;\n /** Year the company was founded. */\n foundedYear?: Maybe<Scalars['Int']['output']>;\n /** Global id of the record. */\n id: Scalars['ID']['output'];\n /** Primary industry classification. */\n industry?: Maybe<Scalars['String']['output']>;\n /** Whether the LinkedIn page is claimed by the organization. */\n linkedinClaimed?: Maybe<Scalars['Boolean']['output']>;\n /** LinkedIn company page URL. */\n linkedinUrl?: Maybe<Scalars['String']['output']>;\n /**\n * Mercator Location ids of the organization's divisions, chosen as for\n * `locations`. Read by the router to resolve `locations` from Mercator.\n */\n locationIds: Array<Scalars['ID']['output']>;\n /**\n * Mercator divisions of the record, in the order its subgraph stores them: the\n * resolved place first, then its ancestors. Empty until the record's location\n * has been resolved.\n */\n locations: LocationConnection;\n /** URL to the organization's logo image. */\n logoUrl?: Maybe<Scalars['String']['output']>;\n /** Legal or trade name. */\n name?: Maybe<Scalars['String']['output']>;\n /**\n * Physical office locations.\n * @deprecated Use organization_addresses instead.\n */\n offices: Array<OrganizationAddress>;\n /** Physical addresses. */\n organizationAddresses: OrganizationAddressConnection;\n /** Main phone number. */\n phone?: Maybe<Scalars['String']['output']>;\n /** When the organization record was last modified. */\n updatedAt: Scalars['ISO8601DateTime']['output'];\n /** Unique identifier (UUID) for this organization. */\n uuid: Scalars['String']['output'];\n /** Company website URL. */\n website?: Maybe<Scalars['String']['output']>;\n};\n\n\n/** A company or organization identified and enriched from multiple data sources. */\nexport type OrganizationContactsArgs = {\n after?: InputMaybe<Scalars['String']['input']>;\n before?: InputMaybe<Scalars['String']['input']>;\n filter?: InputMaybe<ContactFilterInput>;\n first?: InputMaybe<Scalars['Int']['input']>;\n last?: InputMaybe<Scalars['Int']['input']>;\n reveal?: InputMaybe<Array<RevealDimension>>;\n sort?: InputMaybe<Array<ContactSortInput>>;\n};\n\n\n/** A company or organization identified and enriched from multiple data sources. */\nexport type OrganizationLocationsArgs = {\n after?: InputMaybe<Scalars['String']['input']>;\n before?: InputMaybe<Scalars['String']['input']>;\n first?: InputMaybe<Scalars['Int']['input']>;\n last?: InputMaybe<Scalars['Int']['input']>;\n subtype?: InputMaybe<LocationSubtypeFilterInput>;\n};\n\n\n/** A company or organization identified and enriched from multiple data sources. */\nexport type OrganizationOrganizationAddressesArgs = {\n after?: InputMaybe<Scalars['String']['input']>;\n before?: InputMaybe<Scalars['String']['input']>;\n first?: InputMaybe<Scalars['Int']['input']>;\n isHeadquarters?: InputMaybe<Scalars['Boolean']['input']>;\n kind?: InputMaybe<OrganizationAddressKind>;\n last?: InputMaybe<Scalars['Int']['input']>;\n};\n\n/** A physical address of an organization. */\nexport type OrganizationAddress = Located & Node & {\n __typename?: 'OrganizationAddress';\n /** City where the office is located. */\n city?: Maybe<Scalars['String']['output']>;\n /** Geographic coordinates of the address as a GeoJSON Point. */\n coordinates?: Maybe<Coordinate>;\n /** When the address was created. */\n createdAt: Scalars['ISO8601DateTime']['output'];\n /** Global id of the record. */\n id: Scalars['ID']['output'];\n /**\n * Whether this is the organization's headquarters.\n * @deprecated Use `kind == HEADQUARTERS` instead.\n */\n isHeadquarters: Scalars['Boolean']['output'];\n /** Classification of this address: headquarters, office, or unattended. */\n kind: OrganizationAddressKind;\n /** Mercator Location ids of the record's divisions, as stored. Read by the router to resolve `locations` from Mercator. */\n locationIds: Array<Scalars['ID']['output']>;\n /**\n * Mercator divisions of the record, in the order its subgraph stores them: the\n * resolved place first, then its ancestors. Empty until the record's location\n * has been resolved.\n */\n locations: LocationConnection;\n /** Postal or ZIP code. */\n postalCode?: Maybe<Scalars['String']['output']>;\n /** State or province. */\n state?: Maybe<Scalars['String']['output']>;\n /** Street address. */\n street?: Maybe<Scalars['String']['output']>;\n /** When the address was last updated. */\n updatedAt: Scalars['ISO8601DateTime']['output'];\n};\n\n\n/** A physical address of an organization. */\nexport type OrganizationAddressLocationsArgs = {\n after?: InputMaybe<Scalars['String']['input']>;\n before?: InputMaybe<Scalars['String']['input']>;\n first?: InputMaybe<Scalars['Int']['input']>;\n last?: InputMaybe<Scalars['Int']['input']>;\n subtype?: InputMaybe<LocationSubtypeFilterInput>;\n};\n\n/** The connection type for OrganizationAddress. */\nexport type OrganizationAddressConnection = {\n __typename?: 'OrganizationAddressConnection';\n /**\n * Estimated total number of items across all pages. It comes from the query\n * planner rather than a count, so it costs planning time instead of a scan and\n * cannot exceed the statement timeout. It is approximate at every magnitude,\n * including small ones, and it moves when the table's statistics are refreshed.\n * Accuracy depends on the filter: within a few percent on plain column and\n * array-overlap filters, and as much as 30% out on a range filter such as\n * `companySize`. It is not meaningful for the embedding filters `jobTitle` and\n * `industry` — no statistics exist for a vector-distance predicate, so the\n * estimate ignores the distance threshold entirely and approximates only what\n * the other filters admit; it has been measured reporting 241371 for a filter\n * whose true result was empty. Never render it as an exact figure, and use\n * `totalCount` when the figure has to be exact.\n */\n approximateTotalCount: Scalars['Int']['output'];\n /** A list of edges. */\n edges?: Maybe<Array<Maybe<OrganizationAddressEdge>>>;\n /** A list of nodes. */\n nodes?: Maybe<Array<Maybe<OrganizationAddress>>>;\n /** Information to aid in pagination. */\n pageInfo: PageInfo;\n /** Total number of items across all pages, exact unless `upTo` is given. */\n totalCount: Scalars['Int']['output'];\n};\n\n\n/** The connection type for OrganizationAddress. */\nexport type OrganizationAddressConnectionTotalCountArgs = {\n upTo?: InputMaybe<Scalars['Int']['input']>;\n};\n\n/** An edge in a connection. */\nexport type OrganizationAddressEdge = Node & {\n __typename?: 'OrganizationAddressEdge';\n /** A cursor for use in pagination. */\n cursor: Scalars['String']['output'];\n id: Scalars['ID']['output'];\n /** The item at the end of the edge. */\n node?: Maybe<OrganizationAddress>;\n};\n\n/** Classification of an organization address. */\nexport type OrganizationAddressKind =\n /** The organization's elected headquarters. */\n | 'HEADQUARTERS'\n /** A staffed office or branch location. */\n | 'OFFICE'\n /** A location with no on-site staff (e.g. an ATM or EV charging station). */\n | 'UNATTENDED';\n\n/** Parameters for an organization search by visitor IP address. */\nexport type OrganizationByIpInput = {\n /** The visitor's IPv4 or IPv6 address to identify. */\n ip: Scalars['String']['input'];\n /**\n * Mercator Location id (Relay global id) whose country Atlas uses. A location\n * inside a country resolves to that country, so a city id is accepted; one above\n * the country level, such as a continent, has no country and is treated as no country.\n */\n locationId?: InputMaybe<Scalars['ID']['input']>;\n};\n\n/**\n * A way to reach an organization that Atlas holds on file. Each one is named after\n * the reveal dimension that hands its value over, minus the subject:\n * `PHONE_NUMBER` here, `ORGANIZATION_PHONE_NUMBER` in `reveal`.\n */\nexport type OrganizationChannel =\n /** A general contact email address. */\n | 'EMAIL_ADDRESS'\n /** A LinkedIn company page. */\n | 'LINKEDIN_URL'\n /** A main phone number. */\n | 'PHONE_NUMBER'\n /** A domain that answered when Atlas last checked it, which a website value on file alone does not prove. */\n | 'WEBSITE';\n\n/**\n * Narrows organizations by the channels Atlas can reach them through: `eq` one\n * channel, `in` any of them, `all` every one of them, `notEq` / `notIn` without\n * them. Filtering on a channel never reveals its value: `reveal` decides that.\n */\nexport type OrganizationChannelFilterInput = {\n /** Match only records holding every one of these values. */\n all?: InputMaybe<Array<OrganizationChannel>>;\n /** Exact match. */\n eq?: InputMaybe<OrganizationChannel>;\n /** Match any of these values. */\n in?: InputMaybe<Array<OrganizationChannel>>;\n /** Exclude exact match. */\n notEq?: InputMaybe<OrganizationChannel>;\n /** Exclude any of these values. */\n notIn?: InputMaybe<Array<OrganizationChannel>>;\n};\n\n/** The connection type for Organization. */\nexport type OrganizationConnection = RevealedPage & {\n __typename?: 'OrganizationConnection';\n /**\n * Estimated total number of items across all pages. It comes from the query\n * planner rather than a count, so it costs planning time instead of a scan and\n * cannot exceed the statement timeout. It is approximate at every magnitude,\n * including small ones, and it moves when the table's statistics are refreshed.\n * Accuracy depends on the filter: within a few percent on plain column and\n * array-overlap filters, and as much as 30% out on a range filter such as\n * `companySize`. It is not meaningful for the embedding filters `jobTitle` and\n * `industry` — no statistics exist for a vector-distance predicate, so the\n * estimate ignores the distance threshold entirely and approximates only what\n * the other filters admit; it has been measured reporting 241371 for a filter\n * whose true result was empty. Never render it as an exact figure, and use\n * `totalCount` when the figure has to be exact.\n */\n approximateTotalCount: Scalars['Int']['output'];\n /**\n * Reports what this page cost in reveal credits. `held` is the ceiling reserved\n * for every requested dimension on every row, and `used` is the units the page\n * consumed. `used` is zero when the query revealed nothing, while `held` still\n * reports the reserved ceiling.\n */\n credits: RevealCredits;\n /** A list of edges. */\n edges?: Maybe<Array<Maybe<OrganizationEdge>>>;\n /** A list of nodes. */\n nodes?: Maybe<Array<Maybe<Organization>>>;\n /** Information to aid in pagination. */\n pageInfo: PageInfo;\n /** Total number of items across all pages, exact unless `upTo` is given. */\n totalCount: Scalars['Int']['output'];\n};\n\n\n/** The connection type for Organization. */\nexport type OrganizationConnectionTotalCountArgs = {\n upTo?: InputMaybe<Scalars['Int']['input']>;\n};\n\n/** An edge in a connection. */\nexport type OrganizationEdge = Node & Revealed & {\n __typename?: 'OrganizationEdge';\n /**\n * Reports what revealing this record cost in reveal credits. `held` is the\n * ceiling reserved for it, one unit per requested dimension, and `used` is the\n * units it consumed. `used` is zero when the query revealed nothing, while\n * `held` still reports the reserved ceiling.\n */\n credits: RevealCredits;\n /** A cursor for use in pagination. */\n cursor: Scalars['String']['output'];\n /**\n * One entry per filter constrained on this query, reporting whether this\n * organization matched on the attribute's value or on its absence. Empty when\n * the connection was resolved without a filter.\n */\n filterMatches: Array<FilterMatch>;\n id: Scalars['ID']['output'];\n /** The item at the end of the edge. */\n node?: Maybe<Organization>;\n /**\n * Lists, per reach dimension this query touched, what this response revealed,\n * what the company already held and what stays locked. The list is empty when\n * the query touched no reach field.\n */\n reveals: Array<RevealDimensionStatus>;\n};\n\n/** Autogenerated return type of OrganizationEnrichmentResult. */\nexport type OrganizationEnrichmentResultPayload = {\n __typename?: 'OrganizationEnrichmentResultPayload';\n /** The externalId the caller passed, naming the request this result answers. */\n externalId: Scalars['ID']['output'];\n /** The enriched organization, or null when enrichment produced nothing. */\n organization?: Maybe<Organization>;\n};\n\n/** Filter criteria for organizations. */\nexport type OrganizationFilterInput = {\n /**\n * Filter on the organization's employee-count range. Use `overlaps` with a\n * [min, max] range (a one-element [min] array means open-ended) — e.g.\n * { overlaps: [0, 100] } for \"fewer than 100 employees\", { overlaps: [1000] }\n * for \"1000+\". Callers targeting several buckets pass a single merged range.\n */\n companySize?: InputMaybe<RangeFilterInput>;\n /** Filter by confidence score (0.0–1.0). */\n confidenceScore?: InputMaybe<FloatFilterInput>;\n /**\n * Description embedding filters. Each entry matches organizations whose\n * description is semantically close to the query. Use a rich phrase rather\n * than a single keyword — e.g. \"B2B SaaS platform for sales teams\" — for a\n * strong centroid. For several distinct concepts, list them in `queries`\n * rather than joining them into one string: each keeps its own centroid,\n * where one merged string averages them into a vector that may match none\n * of them well. Entries AND with each other.\n * Set `match` rather than a raw `distance`: INCLUDED_STRICT resolves to\n * 0.55 (text-embedding-3-small) and INCLUDED_LOOSE to 0.60, measured in the\n * native 1536-dimension space — this axis carries no projection.\n * Thresholds validated by the embedding_calibration test suite.\n * Maximum 25 entries.\n */\n description?: InputMaybe<Array<EmbeddingFilterInput>>;\n /**\n * Filter organizations that have at least one address belonging to any of the\n * given Mercator location division IDs. `eq`/`in` match organizations with at\n * least one overlapping division; `not_eq`/`not_in` exclude them. This is an\n * array-overlap filter against Mercator-encoded division IDs, not a scalar Atlas ID filter.\n */\n divisionIds?: InputMaybe<IdFilterInput>;\n /**\n * Filter on the organization's domain. Values are matched against a normalized\n * form — host downcased, a single leading \"www.\" dropped — so `eq:\n * \"https://www.Acme.com/about\"` matches a stored \"acme.com\". Matching is exact\n * after that normalization, not a substring or suffix search, and no further\n * subdomain stripping happens, so \"barla.synlab.fr\" and \"synlab.fr\" stay\n * distinct organizations. `domain` is unique, so a positive `eq` matches at\n * most one record. A value that cannot yield a host (a bare company name, an IP\n * literal, punctuation) matches no organization rather than silently dropping\n * the constraint — so passing a mixed name/domain list here returns only its\n * domain-shaped entries instead of the whole table. Prefer this for a read-only\n * \"which of these organizations do we already have?\" lookup over a list — it\n * normalizes and batches through `in`. `organization(domain:)` is the\n * single-record equivalent but matches the column raw, so it misses any URL\n * form; `searchOrganization(input: { domain: ... })` is the enriching\n * counterpart and will call paid providers on a miss.\n */\n domain?: InputMaybe<StringFilterInput>;\n /** Filter by organization global id. */\n id?: InputMaybe<IdFilterInput>;\n /**\n * Industry embedding filters. Each entry matches organizations whose\n * industry is semantically close to the query. List related sectors in\n * `queries` (e.g. [\"Marketing Agency\", \"Digital Agency\", \"PR Agency\"]) to\n * match any of them. Multilingual queries work: adding translations\n * (e.g. \"Agence Marketing\", \"Marketingagentur\") widens recall. Entries AND\n * with each other.\n * Set `match` rather than a raw `distance`: this axis is measured in its\n * fitted 512-dimension projection, so its calibrated operating point is\n * 0.777 (text-embedding-3-small) and not the native-space 0.60 — a number a\n * caller cannot derive, and one that moves with every refit.\n * INCLUDED_STRICT resolves to 0.777, INCLUDED_LOOSE to 0.7811; both sit\n * inside the defensible 0.7687-0.7852 interval.\n * Thresholds validated by the embedding_calibration test suite.\n * Maximum 25 entries.\n */\n industry?: InputMaybe<Array<EmbeddingFilterInput>>;\n /**\n * Filter on the organization's LinkedIn company page. Values are matched on\n * the company vanity slug, extracted from both sides of the comparison, so\n * `eq: \"http://fr.linkedin.com/company/acme/?trk=x\"` matches a stored\n * \"https://www.linkedin.com/company/acme\". Slug matching is what makes this\n * usable: unlike `domain` and `name`, the stored URL is never normalized on\n * write, so any URL form may be on file. A slug is globally unique on\n * LinkedIn, so a positive `eq` matches at most one organization. Only the\n * first path segment identifies the company, so a sub-page link resolves the\n * company itself — `eq: \".../company/acme/about/\"` matches a stored\n * \".../company/acme\", and a stored sub-page URL is matched by the plain\n * company URL. Percent-encoded and literal non-ASCII slugs are the same page\n * (\"/company/ko%C3%A7-holding\" matches a stored \"/company/koç-holding\" and\n * the reverse). The slug is **case-sensitive** — scheme, host, sub-pages,\n * percent-encoding and trailing punctuation are normalized away, but\n * \"/company/Acme\" and \"/company/acme\" are two different pages, so pass the\n * slug exactly as LinkedIn spells it. A value yielding no company\n * slug (a `/in/` person profile, a bare slug, a school or showcase page, a\n * non-LinkedIn URL) matches no organization rather than silently dropping the\n * constraint. `presence: true` is a check on the raw column — it returns\n * organizations that have any LinkedIn URL on file, even one this filter's\n * `eq` could not parse — and applies independently of `valid`, so combine\n * `valid: false` with it to reach organizations reachable on LinkedIn but\n * below the quality floor. Note that `notEq`/`notIn` also exclude\n * organizations with no LinkedIn URL at all, matching how every other\n * negative string operator in this schema treats NULL.\n */\n linkedin?: InputMaybe<StringFilterInput>;\n /**\n * Filter on the organization's name. Values are matched against a\n * normalized form — transliterated, downcased, punctuation-stripped and\n * with trailing legal-form tokens dropped — so `eq: \"Acme\"` matches a\n * stored \"ACME, Inc.\" and `eq: \"Sortlist NV/SA\"` matches a stored\n * \"Sortlist\". Matching stays exact *after* that normalization: it is not\n * a substring or fuzzy search, so \"Acme\" does not match \"Acme Widgets\".\n * A name is not unique in Atlas (country subsidiaries, \"<brand> SA\" /\n * \"<brand> NV\" pairs), so every match is returned, ordered by the\n * connection's default confidence_score DESC — use\n * `searchOrganization(input: { domain: ... })` instead when the caller has\n * a domain and needs exactly one record. A value that normalizes to\n * nothing (punctuation only) matches no organization rather than silently\n * dropping the constraint. `presence: true` returns only organizations\n * that have a name, re-expressing `valid`'s name floor on its own, so\n * callers passing `valid: false` can keep it without the confidence and\n * domain-reachability floors.\n */\n name?: InputMaybe<StringFilterInput>;\n /** Return only complete records. */\n valid?: InputMaybe<Scalars['Boolean']['input']>;\n};\n\n/** A page of organizations a `findOrganizations` call asked for, sent again as Atlas fills it; the last version is COMPLETE. */\nexport type OrganizationFindProgress = {\n __typename?: 'OrganizationFindProgress';\n /** The externalId of the call that asked for the page. */\n externalId: Scalars['ID']['output'];\n /**\n * The organizations on the page, revealed as the call asked.\n * `pageInfo.endCursor` is the `page.after` of the call asking for the next page.\n */\n organizations: OrganizationPage;\n /**\n * The state of this page, not of the search: FILLING while Atlas may send it\n * again, COMPLETE on its last version. Whether more records follow is\n * `pageInfo.hasNextPage`.\n */\n status: FindPageStatus;\n};\n\n/** The organization behind the IP an `identifyOrganizationByIp` call named. */\nexport type OrganizationIdentifyResult = {\n __typename?: 'OrganizationIdentifyResult';\n /** The externalId the caller passed, naming the request this result answers. */\n externalId: Scalars['ID']['output'];\n /** The organization identified behind the IP, revealed as the call asked, or null when Atlas could not tell who it is. */\n organization?: Maybe<Organization>;\n /**\n * Per reach dimension the `organization` selection touched: what this result\n * revealed, what the company already held, and what stays locked. Empty when the\n * organization is null or no reach field is selected.\n */\n reveals: Array<RevealDimensionStatus>;\n};\n\n/** OneOf input for searchOrganization — supply exactly one lookup mode. */\nexport type OrganizationLookupInput = {\n /** Look up by visitor IP address. */\n byIp?: InputMaybe<OrganizationByIpInput>;\n /** Look up by company's primary web domain (no scheme, no trailing slash). */\n domain?: InputMaybe<Scalars['String']['input']>;\n};\n\n/**\n * One page of organizations a `findOrganizations` call asked for. Not a\n * connection: it takes no paging arguments, and the next page is asked for with\n * `findOrganizations(page: { after: pageInfo.endCursor })`.\n */\nexport type OrganizationPage = RevealedPage & {\n __typename?: 'OrganizationPage';\n /**\n * Reports what this page cost in reveal credits. `held` is the ceiling reserved\n * for every requested dimension on every row, and `used` is the units the page\n * consumed. `used` is zero when the query revealed nothing, while `held` still\n * reports the reserved ceiling.\n */\n credits: RevealCredits;\n /** The organizations on the page, each with what this page revealed about it. */\n edges: Array<OrganizationEdge>;\n /** The organizations on the page. */\n nodes: Array<Organization>;\n /**\n * Where the page sits in the search: `endCursor` is the `page.after` of the call\n * for the next page, and `hasNextPage` says whether more organizations are\n * listed after it.\n */\n pageInfo: PageInfo;\n /** Number of organizations the search has listed so far, at most 1000. */\n totalCount: Scalars['Int']['output'];\n};\n\n/** Autogenerated return type of OrganizationSearchResult. */\nexport type OrganizationSearchResultPayload = {\n __typename?: 'OrganizationSearchResultPayload';\n /** The externalId the caller passed, naming the request this result answers. */\n externalId: Scalars['ID']['output'];\n /** The organization found for the lookup, or null when nothing matched. */\n organization?: Maybe<Organization>;\n};\n\n/** Fields available for sorting organizations. */\nexport type OrganizationSortField =\n /** Sort by merged confidence score, highest first by default. */\n | 'CONFIDENCE_SCORE'\n /** Sort by creation timestamp. */\n | 'CREATED_AT'\n /** Cosine distance from the description embedding. Requires query. */\n | 'DESCRIPTION_DISTANCE'\n /** Cosine distance from the industry embedding. Requires query. */\n | 'INDUSTRY_DISTANCE'\n /** Sort alphabetically by legal or trade name. */\n | 'NAME';\n\n/** Sort configuration for organizations. */\nexport type OrganizationSortInput = {\n direction?: InputMaybe<SortDirection>;\n field: OrganizationSortField;\n /** Required when field is DESCRIPTION_DISTANCE or INDUSTRY_DISTANCE. Text to embed for distance ordering. */\n query?: InputMaybe<Scalars['String']['input']>;\n};\n\n/**\n * Filter criteria for the find operations' organizations. Applies exactly what it\n * states: no quality floor is added, so an organization with only a name is\n * returned unless a filter here excludes it.\n */\nexport type OrganizationsFilterInput = {\n /** Filters on the employee-count range with `overlaps`, e.g. `{ overlaps: [0, 100] }` for fewer than 100 employees. */\n companySize?: InputMaybe<RangeFilterInput>;\n /** Filters by confidence score (0.0–1.0). */\n confidenceScore?: InputMaybe<FloatFilterInput>;\n /** Description embedding filters, matched exactly as `OrganizationFilterInput.description` matches them. */\n description?: InputMaybe<Array<EmbeddingFilterInput>>;\n /**\n * Keeps organizations with an address in any of the given Mercator location\n * division IDs (`eq`/`in`), or excludes them (`notEq`/`notIn`).\n */\n divisionIds?: InputMaybe<IdFilterInput>;\n /**\n * Filters on the organization's domain, host downcased and a leading \"www.\"\n * dropped before an exact match. A positive `eq` matches at most one organization.\n */\n domain?: InputMaybe<StringFilterInput>;\n /** Filters by organization global id. */\n id?: InputMaybe<IdFilterInput>;\n /** Industry embedding filters, matched exactly as `OrganizationFilterInput.industry` matches them. */\n industry?: InputMaybe<Array<EmbeddingFilterInput>>;\n /** Filters on the organization's LinkedIn company page, matched on its case-sensitive company slug. */\n linkedinUrl?: InputMaybe<StringFilterInput>;\n /** Filters on the organization's normalized name. `presence: true` keeps organizations that have one. */\n name?: InputMaybe<StringFilterInput>;\n /** Keeps organizations Atlas can reach through the listed channels. */\n reachableBy?: InputMaybe<OrganizationChannelFilterInput>;\n};\n\n/** Channel a channel account operates on. One of: linkedin, email. */\nexport type OutboundChannel =\n /** The email channel. */\n | 'EMAIL'\n /** The linkedin channel. */\n | 'LINKEDIN';\n\n/**\n * An account the gateway operates on a channel, for one consumer: who the account\n * is, and the sessions through which it has been reached.\n */\nexport type OutboundChannelAccount = Node & {\n __typename?: 'OutboundChannelAccount';\n /**\n * Every `authenticateOutboundChannelAccount` call made on the account, newest\n * first, with its outcome: the way to tell a sign-in nobody finished from one\n * the gateway refused as `IDENTITY_MISMATCH`.\n */\n authenticationAttempts: OutboundChannelAuthenticationAttemptConnection;\n /** Channel the account operates on. */\n channel: OutboundChannel;\n /**\n * The Hermes company the account belongs to, as the GlobalID Hermes addresses it\n * by: the company the registering request acted for. Null when that request\n * acted for none, as a Cognito service token does, or when the account was\n * registered before companies were recorded.\n */\n companyId?: Maybe<Scalars['ID']['output']>;\n /** When the account was registered. */\n createdAt: Scalars['ISO8601DateTime']['output'];\n /**\n * The reference the consumer registered the account under, in its own terms: the\n * tenant the identity rule applies within. Null when the account was registered without one.\n */\n externalId?: Maybe<Scalars['String']['output']>;\n id: Scalars['ID']['output'];\n /**\n * Who the account is, typed by channel. Populated once a connection has\n * confirmed the identity; null while it is a draft, or when the consumer only\n * claimed an identity that no connection has confirmed yet.\n */\n identity?: Maybe<OutboundChannelAccountIdentity>;\n /**\n * Who the consumer said the account is for at registration, typed by channel,\n * carrying only the identifier it claimed (`memberId` on LinkedIn). Populated\n * from the claim as long as the account lives, confirmed or not; null when the\n * consumer claimed nothing. `identity` is the confirmed one.\n */\n identityClaim?: Maybe<OutboundChannelAccountIdentity>;\n /**\n * Subject of the token that registered the account and owns it: a person's\n * `auth0|…` or an application's `application:<uuid>`, the same value Hermes\n * knows the caller by.\n */\n ownerSub: Scalars['String']['output'];\n /**\n * Until when the provider asked the gateway to hold the account's actions, after\n * a `429`; the pending ones are rebooked after it. Null when the account is not paused.\n */\n pausedUntil?: Maybe<Scalars['ISO8601DateTime']['output']>;\n /**\n * Provider of the running connection, or of the latest one while none runs; the\n * channel's default before any connection exists.\n */\n provider: OutboundChannelProvider;\n /** How the account has been reached over time, newest first: at most one `RUNNING`, the rest drafts, disconnected or retired. */\n sessions: OutboundChannelProviderSessionConnection;\n /** Lifecycle state of the account. */\n status: OutboundChannelAccountStatus;\n /** Address the account's events are delivered to. */\n webhookUrl: Scalars['String']['output'];\n};\n\n\n/**\n * An account the gateway operates on a channel, for one consumer: who the account\n * is, and the sessions through which it has been reached.\n */\nexport type OutboundChannelAccountAuthenticationAttemptsArgs = {\n after?: InputMaybe<Scalars['String']['input']>;\n before?: InputMaybe<Scalars['String']['input']>;\n first?: InputMaybe<Scalars['Int']['input']>;\n last?: InputMaybe<Scalars['Int']['input']>;\n};\n\n\n/**\n * An account the gateway operates on a channel, for one consumer: who the account\n * is, and the sessions through which it has been reached.\n */\nexport type OutboundChannelAccountSessionsArgs = {\n after?: InputMaybe<Scalars['String']['input']>;\n before?: InputMaybe<Scalars['String']['input']>;\n first?: InputMaybe<Scalars['Int']['input']>;\n last?: InputMaybe<Scalars['Int']['input']>;\n};\n\n/**\n * How the account owner authenticates at the provider. One of:\n * OutboundChannelHostedAuthenticationLink, OutboundChannelCredentialsAccepted.\n */\nexport type OutboundChannelAccountAuthentication = OutboundChannelCredentialsAccepted | OutboundChannelHostedAuthenticationLink;\n\n/** The connection type for OutboundChannelAccount. */\nexport type OutboundChannelAccountConnection = {\n __typename?: 'OutboundChannelAccountConnection';\n /** A list of edges. */\n edges?: Maybe<Array<Maybe<OutboundChannelAccountEdge>>>;\n /** A list of nodes. */\n nodes?: Maybe<Array<Maybe<OutboundChannelAccount>>>;\n /** Information to aid in pagination. */\n pageInfo: PageInfo;\n /** Total number of items across all pages. */\n totalCount: Scalars['Int']['output'];\n};\n\n/**\n * The credentials the account owner authenticates with: exactly one of the\n * variants, typed by channel and accepted only by a provider that authenticates this way.\n */\nexport type OutboundChannelAccountCredentialsInput = {\n /** A LinkedIn session cookie. */\n linkedinCookie?: InputMaybe<LinkedinCookieCredentialsInput>;\n};\n\n/** An edge in a connection. */\nexport type OutboundChannelAccountEdge = {\n __typename?: 'OutboundChannelAccountEdge';\n /** A cursor for use in pagination. */\n cursor: Scalars['String']['output'];\n /** The item at the end of the edge. */\n node?: Maybe<OutboundChannelAccount>;\n};\n\n/** Narrows `outboundChannelAccounts`. */\nexport type OutboundChannelAccountFilterInput = {\n /** Keep only the accounts of these channels. */\n channel?: InputMaybe<OutboundChannelFilterInput>;\n /**\n * Keep only the accounts owned by these subjects. Of use to a token carrying\n * `outreach/*:read`, which sees every consumer's accounts.\n */\n ownerSub?: InputMaybe<StringFilterInput>;\n /** Keep only the accounts whose `provider` is one of these: the running connection's, or the latest one's while none runs. */\n provider?: InputMaybe<OutboundChannelProviderFilterInput>;\n /**\n * Keep only the accounts in these states. Naming `REMOVED` in `eq` or `in` is\n * the one way to list removed accounts, which the list leaves out otherwise.\n */\n status?: InputMaybe<OutboundChannelAccountStatusFilterInput>;\n};\n\n/** Who a channel account is connected as, typed by channel. One of: LinkedinIdentity, EmailIdentity. */\nexport type OutboundChannelAccountIdentity = EmailIdentity | LinkedinIdentity;\n\n/** Lifecycle state of a channel account. One of: draft, running, disconnected, removed. */\nexport type OutboundChannelAccountStatus =\n /** The provider session expired or was revoked; a new authentication is needed. */\n | 'DISCONNECTED'\n /** Registered, never authenticated at the provider yet. */\n | 'DRAFT'\n /** Removed for good, by the consumer or at the provider; it no longer resolves by id. */\n | 'REMOVED'\n /** Authenticated and able to perform actions. */\n | 'RUNNING';\n\n/** Filter on an account's lifecycle state (eq/in/notEq/notIn). */\nexport type OutboundChannelAccountStatusFilterInput = {\n /** Exact match. */\n eq?: InputMaybe<OutboundChannelAccountStatus>;\n /** Match any of these values. */\n in?: InputMaybe<Array<OutboundChannelAccountStatus>>;\n /** Exclude exact match. */\n notEq?: InputMaybe<OutboundChannelAccountStatus>;\n /** Exclude any of these values. */\n notIn?: InputMaybe<Array<OutboundChannelAccountStatus>>;\n};\n\n/** One piece of work a consumer asked the gateway to perform on a channel account. */\nexport type OutboundChannelAction = Node & {\n __typename?: 'OutboundChannelAction';\n /** What the action does. */\n actionType: OutboundChannelActionType;\n /** The account the action runs on. */\n channelAccount: OutboundChannelAccount;\n /** When the action settled, completed or failed. */\n completedAt?: Maybe<Scalars['ISO8601DateTime']['output']>;\n /** When the action was accepted. */\n createdAt: Scalars['ISO8601DateTime']['output'];\n /** Why the action failed: `{ code, status, message }`, the same object `channel_action.failed` carries. Null unless `FAILED`. */\n error?: Maybe<Scalars['JSON']['output']>;\n /**\n * The caller's own id for this action on its account, or the one the gateway\n * derived from the input when none was given. Unique per account, dedupes a\n * repeated call, and is what `outboundChannelActionResult` subscribes on; the\n * same word as Atlas's async mutations.\n */\n externalId: Scalars['String']['output'];\n id: Scalars['ID']['output'];\n /** The action's input, as accepted; attachment contents are replaced by their `size` in bytes. */\n input: Scalars['JSON']['output'];\n /**\n * What the provider answered, typed by action — for `LINKEDIN_SEND_MESSAGE`, `{\n * chat_id, message_id }`, LinkedIn's own ids; for `EMAIL_SEND`, `{\n * email_message_id, email_thread_id, rfc_message_id, provider_message_id,\n * provider_thread_id, sent_at }`. Null unless `COMPLETED`.\n */\n result?: Maybe<Scalars['JSON']['output']>;\n /**\n * When the action is due to run, the slot the gateway booked for it within the\n * account's pace; moves later when the provider pauses the account. Null once it\n * has run. A caller decides on it whether to wait on\n * `outboundChannelActionResult` or to rely on the webhook.\n */\n scheduledAt?: Maybe<Scalars['ISO8601DateTime']['output']>;\n /** Where the action stands. */\n state: OutboundChannelActionState;\n};\n\n/** What became of one action the caller asked to cancel. One of: cancelled, already_cancelled, running, settled, unknown. */\nexport type OutboundChannelActionCancellation =\n /** A previous call already stopped it; nothing changed. */\n | 'ALREADY_CANCELLED'\n /** Stopped in time; it will not reach the provider. */\n | 'CANCELLED'\n /** Too late: the provider is being called and the outcome is still open. */\n | 'RUNNING'\n /** Too late: it already completed or failed. */\n | 'SETTLED'\n /** No such action on this account; it may belong to another one. */\n | 'UNKNOWN';\n\n/** What became of one of the actions the caller asked to cancel. */\nexport type OutboundChannelActionCancellationResult = Node & {\n __typename?: 'OutboundChannelActionCancellationResult';\n /** The id the caller passed in, echoed back unchanged. */\n channelActionId: Scalars['ID']['output'];\n id: Scalars['ID']['output'];\n /** Whether it was stopped, and why not when it was not. */\n outcome: OutboundChannelActionCancellation;\n};\n\n/** The connection type for OutboundChannelAction. */\nexport type OutboundChannelActionConnection = {\n __typename?: 'OutboundChannelActionConnection';\n /** A list of edges. */\n edges?: Maybe<Array<Maybe<OutboundChannelActionEdge>>>;\n /** A list of nodes. */\n nodes?: Maybe<Array<Maybe<OutboundChannelAction>>>;\n /** Information to aid in pagination. */\n pageInfo: PageInfo;\n /** Total number of items across all pages. */\n totalCount: Scalars['Int']['output'];\n};\n\n/** An edge in a connection. */\nexport type OutboundChannelActionEdge = {\n __typename?: 'OutboundChannelActionEdge';\n /** A cursor for use in pagination. */\n cursor: Scalars['String']['output'];\n /** The item at the end of the edge. */\n node?: Maybe<OutboundChannelAction>;\n};\n\n/** Narrows `outboundChannelActions`. */\nexport type OutboundChannelActionFilterInput = {\n /** Keep only the actions of these types. */\n actionType?: InputMaybe<OutboundChannelActionTypeFilterInput>;\n /** Keep only the actions in these states. */\n state?: InputMaybe<OutboundChannelActionStateFilterInput>;\n};\n\n/** The action to perform: exactly one of the variants, typed by channel. */\nexport type OutboundChannelActionInput = {\n /** Sends an email from the account's mailbox. */\n emailSend?: InputMaybe<EmailSendInput>;\n /** Withdraw a LinkedIn connection request. */\n linkedinCancelInvitation?: InputMaybe<LinkedinCancelInvitationInput>;\n /** Send a LinkedIn connection request. */\n linkedinInvite?: InputMaybe<LinkedinInviteInput>;\n /** Read a LinkedIn member's profile. */\n linkedinLookupProfile?: InputMaybe<LinkedinLookupProfileInput>;\n /** Send a LinkedIn message. */\n linkedinSendMessage?: InputMaybe<LinkedinSendMessageInput>;\n /** Visit a LinkedIn profile. */\n linkedinVisit?: InputMaybe<LinkedinVisitInput>;\n};\n\n/** Autogenerated return type of OutboundChannelActionResult. */\nexport type OutboundChannelActionResultPayload = {\n __typename?: 'OutboundChannelActionResultPayload';\n /** The settled action, with its `result` or `error`. */\n channelAction: OutboundChannelAction;\n};\n\n/** Where an action stands. One of: pending, executing, completed, failed, cancelled. */\nexport type OutboundChannelActionState =\n /** Stopped by the caller before it ran; it never reached the provider. */\n | 'CANCELLED'\n /** Performed; the result is in `channel_action.completed`. */\n | 'COMPLETED'\n /** Being performed. */\n | 'EXECUTING'\n /** Refused or failed; the error is in `channel_action.failed`. */\n | 'FAILED'\n /** Accepted, not performed yet. */\n | 'PENDING';\n\n/** Filter on where an action stands (eq/in/notEq/notIn). */\nexport type OutboundChannelActionStateFilterInput = {\n /** Exact match. */\n eq?: InputMaybe<OutboundChannelActionState>;\n /** Match any of these values. */\n in?: InputMaybe<Array<OutboundChannelActionState>>;\n /** Exclude exact match. */\n notEq?: InputMaybe<OutboundChannelActionState>;\n /** Exclude any of these values. */\n notIn?: InputMaybe<Array<OutboundChannelActionState>>;\n};\n\n/** What an action does, typed by channel. */\nexport type OutboundChannelActionType =\n /** Sends an email from the account's mailbox. */\n | 'EMAIL_SEND'\n /** Withdraws a LinkedIn connection request. */\n | 'LINKEDIN_CANCEL_INVITATION'\n /** Sends a LinkedIn connection request to a member. */\n | 'LINKEDIN_INVITE'\n /** Reads a LinkedIn member's profile as the account. */\n | 'LINKEDIN_LOOKUP_PROFILE'\n /** Sends a LinkedIn message to a member. */\n | 'LINKEDIN_SEND_MESSAGE'\n /** Visits a LinkedIn profile, notifying the member when they allow it. */\n | 'LINKEDIN_VISIT';\n\n/** Filter on what an action does (eq/in/notEq/notIn). */\nexport type OutboundChannelActionTypeFilterInput = {\n /** Exact match. */\n eq?: InputMaybe<OutboundChannelActionType>;\n /** Match any of these values. */\n in?: InputMaybe<Array<OutboundChannelActionType>>;\n /** Exclude exact match. */\n notEq?: InputMaybe<OutboundChannelActionType>;\n /** Exclude any of these values. */\n notIn?: InputMaybe<Array<OutboundChannelActionType>>;\n};\n\n/**\n * One `authenticateOutboundChannelAccount` call and what became of it: the hosted\n * sign-in or credentials it issued, on which connection, and the outcome once the\n * provider answered. An account keeps every attempt, refused ones included, so an\n * operator can tell a sign-in that never happened from one the gateway turned down.\n */\nexport type OutboundChannelAuthenticationAttempt = Node & {\n __typename?: 'OutboundChannelAuthenticationAttempt';\n /** The account the attempt was made on. */\n channelAccount: OutboundChannelAccount;\n /** When issued. */\n createdAt: Scalars['ISO8601DateTime']['output'];\n /** Until when the provider's answer is accepted. */\n expiresAt: Scalars['ISO8601DateTime']['output'];\n id: Scalars['ID']['output'];\n /** Where it ended up: `PENDING` or `EXPIRED` while unsettled, otherwise what the provider and the identity read decided. */\n outcome: OutboundChannelAuthenticationAttemptOutcome;\n /** The provider signed in with, from the connection. */\n provider?: Maybe<OutboundChannelProvider>;\n /** The connection the attempt was made on; null for attempts recorded before connections existed. */\n providerConnection?: Maybe<OutboundChannelProviderSession>;\n /** When the provider answered; null while pending or expired. */\n settledAt?: Maybe<Scalars['ISO8601DateTime']['output']>;\n};\n\n/** The connection type for OutboundChannelAuthenticationAttempt. */\nexport type OutboundChannelAuthenticationAttemptConnection = {\n __typename?: 'OutboundChannelAuthenticationAttemptConnection';\n /** A list of edges. */\n edges?: Maybe<Array<Maybe<OutboundChannelAuthenticationAttemptEdge>>>;\n /** A list of nodes. */\n nodes?: Maybe<Array<Maybe<OutboundChannelAuthenticationAttempt>>>;\n /** Information to aid in pagination. */\n pageInfo: PageInfo;\n /** Total number of items across all pages. */\n totalCount: Scalars['Int']['output'];\n};\n\n/** An edge in a connection. */\nexport type OutboundChannelAuthenticationAttemptEdge = {\n __typename?: 'OutboundChannelAuthenticationAttemptEdge';\n /** A cursor for use in pagination. */\n cursor: Scalars['String']['output'];\n /** The item at the end of the edge. */\n node?: Maybe<OutboundChannelAuthenticationAttempt>;\n};\n\n/**\n * Where an authentication attempt ended up. One of: pending, expired, connected,\n * provider_account_bound, provider_account_already_connected, identity_mismatch,\n * identity_already_connected, session_invalid, credentials_rejected,\n * code_rejected, scopes_missing, country_unsupported.\n */\nexport type OutboundChannelAuthenticationAttemptOutcome =\n /** The provider refused the authorization code handed in, usually because it was already used or has expired. */\n | 'CODE_REJECTED'\n /** The identity was read and the account now runs through this connection. */\n | 'CONNECTED'\n /**\n * No longer produced: a country the gateway cannot exit from now falls back to\n * the nearest one it serves. Kept for attempts settled before that change.\n */\n | 'COUNTRY_UNSUPPORTED'\n /** The provider refused the credentials handed in. */\n | 'CREDENTIALS_REJECTED'\n /** Never completed before its deadline. */\n | 'EXPIRED'\n /**\n * The member who signed in already runs another live account of the same owner;\n * another owner's account for that member is no obstacle.\n */\n | 'IDENTITY_ALREADY_CONNECTED'\n /**\n * The person who signed in is not the member the account was claimed for; the\n * connection was released and the account left as it was.\n */\n | 'IDENTITY_MISMATCH'\n /** Issued, the owner has not finished signing in; expires ten minutes after issue. */\n | 'PENDING'\n /** The provider account it produced already runs another live account of the gateway. */\n | 'PROVIDER_ACCOUNT_ALREADY_CONNECTED'\n /** The provider confirmed the sign-in; the identity is being read. */\n | 'PROVIDER_ACCOUNT_BOUND'\n /** The owner signed in without granting every permission the gateway asked for; nothing was kept. */\n | 'SCOPES_MISSING'\n /** The provider session died before the identity could be read. */\n | 'SESSION_INVALID';\n\n/**\n * The credentials were verified at the channel and stored; nothing is left for the\n * account owner to do. The account is connected only when the\n * `channel_account.connected` event arrives, a few seconds later.\n */\nexport type OutboundChannelCredentialsAccepted = {\n __typename?: 'OutboundChannelCredentialsAccepted';\n /** When the credentials were verified. */\n acceptedAt: Scalars['ISO8601DateTime']['output'];\n /** The channel-side id the credentials resolved to — for LinkedIn, the member id (`ACoAA…`). */\n providerAccountId: Scalars['String']['output'];\n};\n\n/** One event the gateway sent, or is sending, to the consumer's webhook. */\nexport type OutboundChannelEvent = Node & {\n __typename?: 'OutboundChannelEvent';\n /** How many deliveries were tried. */\n attempts: Scalars['Int']['output'];\n /** The account the event is about. */\n channelAccount: OutboundChannelAccount;\n /** When the gateway recorded the event. */\n createdAt: Scalars['ISO8601DateTime']['output'];\n /** When the gateway gave up delivering it. */\n deadAt?: Maybe<Scalars['ISO8601DateTime']['output']>;\n /** When the consumer's webhook accepted it. */\n deliveredAt?: Maybe<Scalars['ISO8601DateTime']['output']>;\n /** The type the consumer receives, one of the events documented in the API reference (`channel_action.completed`, …). */\n eventType: Scalars['String']['output'];\n id: Scalars['ID']['output'];\n /** HTTP status of the last delivery attempt. */\n lastResponseStatus?: Maybe<Scalars['Int']['output']>;\n /** When the thing the event reports happened. */\n occurredAt: Scalars['ISO8601DateTime']['output'];\n /** The event's payload, as delivered. */\n payload: Scalars['JSON']['output'];\n /** Where the delivery stands. */\n state: OutboundChannelEventState;\n};\n\n/** The connection type for OutboundChannelEvent. */\nexport type OutboundChannelEventConnection = {\n __typename?: 'OutboundChannelEventConnection';\n /** A list of edges. */\n edges?: Maybe<Array<Maybe<OutboundChannelEventEdge>>>;\n /** A list of nodes. */\n nodes?: Maybe<Array<Maybe<OutboundChannelEvent>>>;\n /** Information to aid in pagination. */\n pageInfo: PageInfo;\n /** Total number of items across all pages. */\n totalCount: Scalars['Int']['output'];\n};\n\n/** An edge in a connection. */\nexport type OutboundChannelEventEdge = {\n __typename?: 'OutboundChannelEventEdge';\n /** A cursor for use in pagination. */\n cursor: Scalars['String']['output'];\n /** The item at the end of the edge. */\n node?: Maybe<OutboundChannelEvent>;\n};\n\n/** Narrows `outboundChannelEvents`. */\nexport type OutboundChannelEventFilterInput = {\n /** Keep only these event types, as the consumer receives them (`channel_action.failed`, `message.received`, …). */\n eventType?: InputMaybe<StringFilterInput>;\n /** Keep only the events in these delivery states. */\n state?: InputMaybe<OutboundChannelEventStateFilterInput>;\n};\n\n/** Where an event stands on its way to the consumer's webhook. One of: pending, delivered, dead. */\nexport type OutboundChannelEventState =\n /** Given up: the webhook refused it (4xx) or failed eight times. */\n | 'DEAD'\n /** The consumer's webhook answered 2xx. */\n | 'DELIVERED'\n /** Not delivered yet; the gateway is still trying. */\n | 'PENDING';\n\n/** Filter on an event's delivery state (eq/in/notEq/notIn). Derived from `deliveredAt` and `deadAt`, not a column. */\nexport type OutboundChannelEventStateFilterInput = {\n /** Exact match. */\n eq?: InputMaybe<OutboundChannelEventState>;\n /** Match any of these values. */\n in?: InputMaybe<Array<OutboundChannelEventState>>;\n /** Exclude exact match. */\n notEq?: InputMaybe<OutboundChannelEventState>;\n /** Exclude any of these values. */\n notIn?: InputMaybe<Array<OutboundChannelEventState>>;\n};\n\n/** Filter on channel (eq/in/notEq/notIn). */\nexport type OutboundChannelFilterInput = {\n /** Exact match. */\n eq?: InputMaybe<OutboundChannel>;\n /** Match any of these values. */\n in?: InputMaybe<Array<OutboundChannel>>;\n /** Exclude exact match. */\n notEq?: InputMaybe<OutboundChannel>;\n /** Exclude any of these values. */\n notIn?: InputMaybe<Array<OutboundChannel>>;\n};\n\n/**\n * A short-lived page hosted by the provider where the account owner signs in. Send\n * the user's browser there; the account is connected only when the\n * `channel_account.connected` event arrives, never from the return redirect.\n */\nexport type OutboundChannelHostedAuthenticationLink = {\n __typename?: 'OutboundChannelHostedAuthenticationLink';\n /** Address of the hosted sign-in page. Valid for about ten minutes. */\n url: Scalars['String']['output'];\n};\n\n/** Who the account is for, typed by channel: exactly one variant, which must match the account's channel. */\nexport type OutboundChannelIdentityInput = {\n /** A mailbox. */\n email?: InputMaybe<EmailIdentityInput>;\n /** A LinkedIn member. */\n linkedin?: InputMaybe<LinkedinIdentityInput>;\n};\n\n/** Provider running a channel account behind the gateway. One of: unipile, linkedin_direct, google, microsoft. */\nexport type OutboundChannelProvider =\n /** The google provider. */\n | 'GOOGLE'\n /** The linkedin_direct provider. */\n | 'LINKEDIN_DIRECT'\n /** The microsoft provider. */\n | 'MICROSOFT'\n /** The unipile provider. */\n | 'UNIPILE';\n\n/** One delivery the provider made to the gateway's webhook about an account. */\nexport type OutboundChannelProviderEvent = Node & {\n __typename?: 'OutboundChannelProviderEvent';\n /** When the gateway stored it. */\n createdAt: Scalars['ISO8601DateTime']['output'];\n /** Why processing failed, when it did. */\n error?: Maybe<Scalars['String']['output']>;\n /** The type in the provider's own vocabulary. */\n eventType: Scalars['String']['output'];\n /** The provider's id of the delivery. */\n externalId: Scalars['String']['output'];\n id: Scalars['ID']['output'];\n /** The gateway's own event type it was translated to; null when the gateway stores this type without effect. */\n kind?: Maybe<Scalars['String']['output']>;\n /** The delivery's body, as received. */\n payload: Scalars['JSON']['output'];\n /** When the gateway processed it; null while it waits. */\n processedAt?: Maybe<Scalars['ISO8601DateTime']['output']>;\n /** The provider that sent it. */\n provider: OutboundChannelProvider;\n /** When the gateway received it. */\n receivedAt: Scalars['ISO8601DateTime']['output'];\n};\n\n/** The connection type for OutboundChannelProviderEvent. */\nexport type OutboundChannelProviderEventConnection = {\n __typename?: 'OutboundChannelProviderEventConnection';\n /** A list of edges. */\n edges?: Maybe<Array<Maybe<OutboundChannelProviderEventEdge>>>;\n /** A list of nodes. */\n nodes?: Maybe<Array<Maybe<OutboundChannelProviderEvent>>>;\n /** Information to aid in pagination. */\n pageInfo: PageInfo;\n /** Total number of items across all pages. */\n totalCount: Scalars['Int']['output'];\n};\n\n/** An edge in a connection. */\nexport type OutboundChannelProviderEventEdge = {\n __typename?: 'OutboundChannelProviderEventEdge';\n /** A cursor for use in pagination. */\n cursor: Scalars['String']['output'];\n /** The item at the end of the edge. */\n node?: Maybe<OutboundChannelProviderEvent>;\n};\n\n/** Narrows `outboundChannelProviderEvents`. */\nexport type OutboundChannelProviderEventFilterInput = {\n /** Keep only these types, in the provider's own vocabulary (`message.new`, `account.status.disconnected`, …). */\n eventType?: InputMaybe<StringFilterInput>;\n /**\n * Keep only the deliveries the gateway translated to these event types\n * (`message.received`, `channel_account.disconnected`, …). `blank: true` keeps\n * the ones it stores without effect.\n */\n kind?: InputMaybe<StringFilterInput>;\n};\n\n/** Filter on provider (eq/in/notEq/notIn). */\nexport type OutboundChannelProviderFilterInput = {\n /** Exact match. */\n eq?: InputMaybe<OutboundChannelProvider>;\n /** Match any of these values. */\n in?: InputMaybe<Array<OutboundChannelProvider>>;\n /** Exclude exact match. */\n notEq?: InputMaybe<OutboundChannelProvider>;\n /** Exclude any of these values. */\n notIn?: InputMaybe<Array<OutboundChannelProvider>>;\n};\n\n/**\n * One way an account has been reached: a provider, the id that provider knows the\n * account by, and the life of that link. An account works through one running\n * connection at a time; the others are its history.\n */\nexport type OutboundChannelProviderSession = Node & {\n __typename?: 'OutboundChannelProviderSession';\n /** The account this connection reaches. */\n channelAccount: OutboundChannelAccount;\n /**\n * When its current run began — reset every time the connection starts running\n * again, so it reads as how long the session has been up; null while a draft.\n */\n connectedAt?: Maybe<Scalars['ISO8601DateTime']['output']>;\n /** When opened. */\n createdAt: Scalars['ISO8601DateTime']['output'];\n id: Scalars['ID']['output'];\n /** The provider. */\n provider: OutboundChannelProvider;\n /**\n * The id the provider knows the account by — Unipile's account id, or the\n * LinkedIn member id for the direct provider. Null until bound.\n */\n providerAccountId?: Maybe<Scalars['String']['output']>;\n /** When it was replaced or removed, and released at the provider. */\n retiredAt?: Maybe<Scalars['ISO8601DateTime']['output']>;\n /** Where the connection stands. */\n status: OutboundChannelProviderSessionStatus;\n};\n\n/** The connection type for OutboundChannelProviderSession. */\nexport type OutboundChannelProviderSessionConnection = {\n __typename?: 'OutboundChannelProviderSessionConnection';\n /** A list of edges. */\n edges?: Maybe<Array<Maybe<OutboundChannelProviderSessionEdge>>>;\n /** A list of nodes. */\n nodes?: Maybe<Array<Maybe<OutboundChannelProviderSession>>>;\n /** Information to aid in pagination. */\n pageInfo: PageInfo;\n /** Total number of items across all pages. */\n totalCount: Scalars['Int']['output'];\n};\n\n/** An edge in a connection. */\nexport type OutboundChannelProviderSessionEdge = {\n __typename?: 'OutboundChannelProviderSessionEdge';\n /** A cursor for use in pagination. */\n cursor: Scalars['String']['output'];\n /** The item at the end of the edge. */\n node?: Maybe<OutboundChannelProviderSession>;\n};\n\n/** State of one connection between an account and a provider. One of: draft, running, disconnected, retired. */\nexport type OutboundChannelProviderSessionStatus =\n /** Its provider session expired or was revoked; re-authenticate or switch. */\n | 'DISCONNECTED'\n /** Opened by an authentication attempt, not confirmed yet. */\n | 'DRAFT'\n /** Replaced by another connection or removed with the account; released at the provider. */\n | 'RETIRED'\n /** The connection the account works through. */\n | 'RUNNING';\n\n/** Information about pagination in a connection. */\nexport type PageInfo = {\n __typename?: 'PageInfo';\n /** When paginating forwards, the cursor to continue. */\n endCursor?: Maybe<Scalars['String']['output']>;\n /** When paginating forwards, are there more items? */\n hasNextPage: Scalars['Boolean']['output'];\n /** When paginating backwards, are there more items? */\n hasPreviousPage: Scalars['Boolean']['output'];\n /** When paginating backwards, the cursor to continue. */\n startCursor?: Maybe<Scalars['String']['output']>;\n};\n\n/** Autogenerated input type of PerformOutboundChannelAction */\nexport type PerformOutboundChannelActionInput = {\n /** What to do, exactly one variant. */\n action: OutboundChannelActionInput;\n /** Global id of the account to act with. Must be `RUNNING`. */\n channelAccountId: Scalars['ID']['input'];\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: InputMaybe<Scalars['String']['input']>;\n /**\n * Caller's key for this action. Omitted, the gateway derives one from the\n * account and the input, so an identical retry is a no-op; pass your own to\n * repeat an identical action on purpose.\n */\n externalId?: InputMaybe<Scalars['String']['input']>;\n};\n\n/** Autogenerated return type of PerformOutboundChannelAction. */\nexport type PerformOutboundChannelActionPayload = Node & {\n __typename?: 'PerformOutboundChannelActionPayload';\n /** The accepted action, `PENDING` unless it was already known. */\n channelAction: OutboundChannelAction;\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: Maybe<Scalars['String']['output']>;\n id: Scalars['ID']['output'];\n};\n\n/** Autogenerated return type of Ping. */\nexport type PingPayload = {\n __typename?: 'PingPayload';\n /** The externalId the caller passed, naming the request this result answers. */\n externalId: Scalars['ID']['output'];\n /** The message the trigger carried. */\n message: Scalars['String']['output'];\n};\n\n/** Root query type. Each subgraph contributes its own fields to it. */\nexport type Query = {\n __typename?: 'Query';\n /**\n * Whether a token subject may act for a company right now: a person who is a\n * member of it, or an application it owns. Atlas asks this before recording a\n * reveal, with its service token. Reachable by a **machine token** from the\n * Cognito issuer and by a caller holding `hermes/company:read`; UNKNOWN_SUBJECT\n * for everyone else, so a subject cannot be probed for its memberships.\n */\n actingCheck: ActingCheck;\n /**\n * One application the caller may manage, by global id. Returns null when no\n * company the caller belongs to owns it. A caller holding\n * `hermes/application:read` reaches any application, and for them null means it\n * does not exist.\n */\n application?: Maybe<Application>;\n /**\n * Applications the caller may manage: those owned by every company they belong\n * to. A caller holding `hermes/application:read` reads every application instead\n * — the scope Sortlist staff hold, so support can inspect a customer's.\n */\n applications: ApplicationConnection;\n /**\n * Looks up a billing customer by id, e.g. for a consumer's credit pre-check.\n * Refused unless the caller may read that customer: a service holding\n * billing/customer:read, or staff.\n */\n billingCustomer?: Maybe<BillingCustomer>;\n /** Liveness probe for the billing subgraph. */\n billingPing: Scalars['String']['output'];\n /** Static plan catalog of one product (tiers × monthly / annual). Drives the plan-picker UI without round-tripping Stripe. */\n billingPlanCatalog: Array<BillingPlanCatalogEntry>;\n /**\n * Companies the caller belongs to, including their personal one. A caller\n * holding `hermes/company:read` reads every company instead — the scope Sortlist\n * staff hold, so support can look up a customer they are not a member of.\n */\n companies: CompanyConnection;\n /**\n * One company the caller belongs to, by slug. Returns null when they do not\n * belong to it, so a company that exists and one that does not are\n * indistinguishable. A caller holding `hermes/company:read` reaches any company,\n * and for them null means it does not exist.\n */\n company?: Maybe<Company>;\n /**\n * What an invitation code is for, without redeeming it — accepting hands over\n * full control of a company's applications and credentials, so nobody should\n * have to do it blind. Null for a code that is unknown, spent, revoked or\n * expired; those are indistinguishable on purpose.\n */\n companyInvitationPreview?: Maybe<CompanyInvitationPreview>;\n /**\n * List contacts with optional filtering and sorting.\n * Supports cross-organization filtering via `organizationFilter` — for example, contacts\n * whose organization is in a given industry or country.\n * When you already hold an Organization, prefer `organization { contacts { ... } }` to\n * avoid cross-joins. Maximum page size: 100.\n * Kept for admin lookups: every field is served, organizations under it included, and\n * nothing is revealed, recorded or billed. To reveal reach fields for a company, use\n * `findContacts`.\n */\n contacts: ContactConnection;\n /** Returns all administrative divisions at every hierarchy level that contain the given coordinate. */\n containingDivisions: LocationConnection;\n /**\n * Find a Definition by slug and version.\n * @deprecated Use `watcherDefinition` instead.\n */\n definition?: Maybe<WatcherDefinition>;\n /**\n * List of code-defined Definitions exposed by this subgraph.\n * @deprecated Use `watcherDefinitions` instead.\n */\n definitions: WatcherDefinitionConnection;\n /**\n * Events across every Watcher the caller reads, newest first. Kept ones by\n * default; the refused slice carries the provider's own envelope and takes a\n * service-wide read scope, exactly as `Watcher.events` does.\n * @deprecated Use `watcherEvents` instead.\n */\n events: WatcherEventConnection;\n /**\n * List IP-to-company identification records with optional filtering.\n * Use `filter.valid: true` to restrict to records that successfully matched a company.\n */\n identifications: IdentificationConnection;\n /** The messages of one conversation Outreach follows, newest first. */\n linkedinChatMessages?: Maybe<LinkedinMessageConnection>;\n /**\n * The conversations Outreach follows on one of the caller's accounts, most\n * recent activity first. Only what Outreach started is here.\n */\n linkedinChats?: Maybe<LinkedinChatConnection>;\n /** The connection requests sent through Outreach on one of the caller's accounts, newest first, with where each one stands. */\n linkedinInvitations?: Maybe<LinkedinInvitationConnection>;\n /**\n * Every division level, ordered coarsest to finest. The MACRO* levels group\n * whole levels rather than sitting on one, so they fall *between* the\n * administrative levels — which is why this ordering, and not `adminLevel`, is\n * what a consumer walks to find the nearest level it can express.\n */\n locationSubtypes: Array<LocationSubtype>;\n /** Auth0 logout URL used by the CLI to clear the browser session. */\n logoutUrl: Scalars['String']['output'];\n /**\n * The person calling. Null when the request carries no access token, one this\n * service does not trust, or an application credential's token — an application\n * is not a person, and this service refuses its own tokens by design. A caller\n * holding such a token reads its own `application_id` and `company_id` claims\n * instead; it minted the token, so it needs nothing from here to know that.\n */\n me?: Maybe<User>;\n /**\n * Fetches an object given its ID. Supports all entity types across subgraphs —\n * the gateway hydrates fields from the owning subgraph via federation entity resolution.\n */\n node?: Maybe<Node>;\n /** Fetches a list of objects given a list of IDs. Supports all entity types across subgraphs. */\n nodes: Array<Maybe<Node>>;\n /**\n * Look up an organization by its exact primary domain.\n * Returns null when no record exists for that domain.\n * Use when you have the exact domain. For attribute-based or fuzzy search,\n * use `organizations(filter:, sort:)` instead.\n */\n organization?: Maybe<Organization>;\n /**\n * List organizations with optional filtering and sorting.\n * Supports semantic search via embedding filters on `description` and `industry`.\n * The `name` and `domain` filters both accept `in`, so a whole list of company\n * identifiers can be resolved to records in one read — no enrichment, no external calls.\n * Use `organization(domain:)` for a direct single-domain lookup.\n * Maximum page size: 100.\n * Kept for admin lookups: every field is served, contacts under it included, and nothing\n * is revealed, recorded or billed. To reveal reach fields for a company, use\n * `findOrganizations`.\n */\n organizations: OrganizationConnection;\n /**\n * Looks up a channel account by id. Null when the id is unknown, and for a\n * consumer once the account was removed; an operator holding `outreach/*:read`\n * or `outreach/*:*` still reads a removed account, with its history. Refused\n * when it belongs to another caller.\n */\n outboundChannelAccount?: Maybe<OutboundChannelAccount>;\n /**\n * The caller's channel accounts, newest first, without the removed ones unless\n * `filter.status` names `REMOVED`. A token carrying `outreach/*:read` or\n * `outreach/*:*` sees every consumer's accounts.\n */\n outboundChannelAccounts: OutboundChannelAccountConnection;\n /**\n * Looks up an action by id, for consumers that prefer polling to the\n * `channel_action.*` events. Null when the id is unknown; refused when the\n * action belongs to another caller.\n */\n outboundChannelAction?: Maybe<OutboundChannelAction>;\n /** The actions a consumer asked for on one of the caller's accounts, newest first, with where each one stands. */\n outboundChannelActions?: Maybe<OutboundChannelActionConnection>;\n /**\n * The events the gateway sent to the consumer's webhook about one of the\n * caller's accounts, newest first, with whether each one got through.\n */\n outboundChannelEvents?: Maybe<OutboundChannelEventConnection>;\n /**\n * The deliveries the provider made to the gateway about an account, newest\n * first, with what the gateway made of each one. For operators: the token has to\n * carry `outreach/*:read` or `outreach/*:*`.\n */\n outboundChannelProviderEvents?: Maybe<OutboundChannelProviderEventConnection>;\n /**\n * Liveness probe for the outreach subgraph. Answers \"pong\" to any caller whose\n * token carries `outreach/channel_account:read`.\n */\n ping: Scalars['String']['output'];\n /**\n * What this service would send upstream for every (Definition, provider) pair,\n * rendered without provisioning anything. Exposed so the checks that assert\n * against a provider's live API can run from outside this codebase (see the e2e\n * backend suite) and therefore check the deployed service rather than a copy of its source.\n * @deprecated Use `watcherProvisioningPreviews` instead.\n */\n provisioningPreviews: Array<WatcherProvisioningPreview>;\n /** Looks up a single location by an external code, in the identifier scheme given by `code_type`. */\n resolveByCode?: Maybe<Location>;\n /** Fuzzy text search over location names and aliases. Returns ranked matches. */\n resolveLocations: LocationConnection;\n /**\n * Fetches a contact or an organization given its id, with what this query revealed about\n * it. An id of any other type resolves to null. Selecting a reach field asks about it, and\n * `reveal` decides what may be revealed.\n */\n revealNode?: Maybe<Revealed>;\n /**\n * Fetches contacts and organizations given their ids, each with what this query revealed\n * about it. Ids of any other type resolve to null. Selecting a reach field asks about it,\n * and `reveal` decides what may be revealed.\n */\n revealNodes: Array<Maybe<Revealed>>;\n /**\n * The reveal ledger, newest first: which reach dimensions each company was handed,\n * and in which window. Staff surface for reading usage before it is priced. Maximum page size: 100.\n */\n reveals: RevealRecordConnection;\n /** Liveness probe for the signals subgraph */\n signalsPing: Scalars['String']['output'];\n /**\n * Looks up a user by Auth0 subject. Reachable by a **machine token** from the\n * Cognito issuer — it exists for one of them, the sync_company_ids Auth0 Action,\n * which holds a subject and no way to obtain a global id — and by a caller\n * holding `hermes/user:read`, the scope Sortlist staff hold, since correlating a\n * subject from a log line to a person is the support question it answers. Null\n * for everyone else: a subject is not a secret, so an open lookup is a directory.\n */\n user?: Maybe<User>;\n /**\n * Every person Hermes has provisioned, newest first. Requires `hermes/user:read`\n * — the scope Sortlist staff hold — because a list of people with their emails\n * and companies is exactly the directory `user(sub:)` is closed to avoid handing\n * out. Empty for anyone else.\n */\n users: UserConnection;\n /**\n * Find a Watcher by id.\n * @deprecated use node instead\n */\n watcher?: Maybe<Watcher>;\n /** Find a Definition by slug and version. */\n watcherDefinition?: Maybe<WatcherDefinition>;\n /** List of code-defined Definitions exposed by this subgraph. */\n watcherDefinitions: WatcherDefinitionConnection;\n /**\n * Events across every Watcher the caller reads, newest first. Kept ones by\n * default; the refused slice carries the provider's own envelope and takes a\n * service-wide read scope, exactly as `Watcher.events` does.\n */\n watcherEvents: WatcherEventConnection;\n /**\n * What this service would send upstream for every (Definition, provider) pair,\n * rendered without provisioning anything. Exposed so the checks that assert\n * against a provider's live API can run from outside this codebase (see the e2e\n * backend suite) and therefore check the deployed service rather than a copy of its source.\n */\n watcherProvisioningPreviews: Array<WatcherProvisioningPreview>;\n /**\n * Delivery endpoints across every Watcher the caller reads, newest first. The\n * delivery side of the pipeline read as a whole: an outage is usually shared by\n * host rather than by watcher, which no single Watcher's page can show.\n */\n watcherWebhooks: WatcherWebhookConnection;\n /**\n * Watchers the caller owns. A caller holding a resource-wide read scope reads\n * every watcher instead — the scopes Sortlist staff hold, so support can see\n * what a customer subscribed to.\n */\n watchers: WatcherConnection;\n /**\n * Delivery endpoints across every Watcher the caller reads, newest first. The\n * delivery side of the pipeline read as a whole: an outage is usually shared by\n * host rather than by watcher, which no single Watcher's page can show.\n * @deprecated Use `watcherWebhooks` instead.\n */\n webhooks: WatcherWebhookConnection;\n};\n\n\n/** Root query type. Each subgraph contributes its own fields to it. */\nexport type QueryActingCheckArgs = {\n companyId: Scalars['ID']['input'];\n subject: Scalars['String']['input'];\n};\n\n\n/** Root query type. Each subgraph contributes its own fields to it. */\nexport type QueryApplicationArgs = {\n id: Scalars['ID']['input'];\n};\n\n\n/** Root query type. Each subgraph contributes its own fields to it. */\nexport type QueryApplicationsArgs = {\n after?: InputMaybe<Scalars['String']['input']>;\n before?: InputMaybe<Scalars['String']['input']>;\n first?: InputMaybe<Scalars['Int']['input']>;\n last?: InputMaybe<Scalars['Int']['input']>;\n};\n\n\n/** Root query type. Each subgraph contributes its own fields to it. */\nexport type QueryBillingCustomerArgs = {\n id: Scalars['ID']['input'];\n};\n\n\n/** Root query type. Each subgraph contributes its own fields to it. */\nexport type QueryBillingPlanCatalogArgs = {\n product: BillingProduct;\n};\n\n\n/** Root query type. Each subgraph contributes its own fields to it. */\nexport type QueryCompaniesArgs = {\n after?: InputMaybe<Scalars['String']['input']>;\n before?: InputMaybe<Scalars['String']['input']>;\n first?: InputMaybe<Scalars['Int']['input']>;\n last?: InputMaybe<Scalars['Int']['input']>;\n};\n\n\n/** Root query type. Each subgraph contributes its own fields to it. */\nexport type QueryCompanyArgs = {\n slug: Scalars['String']['input'];\n};\n\n\n/** Root query type. Each subgraph contributes its own fields to it. */\nexport type QueryCompanyInvitationPreviewArgs = {\n code: Scalars['String']['input'];\n};\n\n\n/** Root query type. Each subgraph contributes its own fields to it. */\nexport type QueryContactsArgs = {\n after?: InputMaybe<Scalars['String']['input']>;\n before?: InputMaybe<Scalars['String']['input']>;\n filter?: InputMaybe<ContactFilterInput>;\n first?: InputMaybe<Scalars['Int']['input']>;\n last?: InputMaybe<Scalars['Int']['input']>;\n organizationFilter?: InputMaybe<OrganizationFilterInput>;\n sort?: InputMaybe<Array<ContactSortInput>>;\n};\n\n\n/** Root query type. Each subgraph contributes its own fields to it. */\nexport type QueryContainingDivisionsArgs = {\n after?: InputMaybe<Scalars['String']['input']>;\n before?: InputMaybe<Scalars['String']['input']>;\n coordinate: CoordinateInput;\n first?: InputMaybe<Scalars['Int']['input']>;\n last?: InputMaybe<Scalars['Int']['input']>;\n};\n\n\n/** Root query type. Each subgraph contributes its own fields to it. */\nexport type QueryDefinitionArgs = {\n slug: Scalars['String']['input'];\n version: Scalars['Int']['input'];\n};\n\n\n/** Root query type. Each subgraph contributes its own fields to it. */\nexport type QueryDefinitionsArgs = {\n after?: InputMaybe<Scalars['String']['input']>;\n before?: InputMaybe<Scalars['String']['input']>;\n filter?: InputMaybe<WatcherDefinitionFilterInput>;\n first?: InputMaybe<Scalars['Int']['input']>;\n last?: InputMaybe<Scalars['Int']['input']>;\n};\n\n\n/** Root query type. Each subgraph contributes its own fields to it. */\nexport type QueryEventsArgs = {\n after?: InputMaybe<Scalars['String']['input']>;\n before?: InputMaybe<Scalars['String']['input']>;\n filter?: InputMaybe<WatcherEventFilterInput>;\n first?: InputMaybe<Scalars['Int']['input']>;\n last?: InputMaybe<Scalars['Int']['input']>;\n};\n\n\n/** Root query type. Each subgraph contributes its own fields to it. */\nexport type QueryIdentificationsArgs = {\n after?: InputMaybe<Scalars['String']['input']>;\n before?: InputMaybe<Scalars['String']['input']>;\n filter?: InputMaybe<IdentificationFilterInput>;\n first?: InputMaybe<Scalars['Int']['input']>;\n last?: InputMaybe<Scalars['Int']['input']>;\n};\n\n\n/** Root query type. Each subgraph contributes its own fields to it. */\nexport type QueryLinkedinChatMessagesArgs = {\n after?: InputMaybe<Scalars['String']['input']>;\n before?: InputMaybe<Scalars['String']['input']>;\n chatId: Scalars['ID']['input'];\n first?: InputMaybe<Scalars['Int']['input']>;\n last?: InputMaybe<Scalars['Int']['input']>;\n};\n\n\n/** Root query type. Each subgraph contributes its own fields to it. */\nexport type QueryLinkedinChatsArgs = {\n after?: InputMaybe<Scalars['String']['input']>;\n before?: InputMaybe<Scalars['String']['input']>;\n channelAccountId: Scalars['ID']['input'];\n first?: InputMaybe<Scalars['Int']['input']>;\n last?: InputMaybe<Scalars['Int']['input']>;\n};\n\n\n/** Root query type. Each subgraph contributes its own fields to it. */\nexport type QueryLinkedinInvitationsArgs = {\n after?: InputMaybe<Scalars['String']['input']>;\n before?: InputMaybe<Scalars['String']['input']>;\n channelAccountId: Scalars['ID']['input'];\n filter?: InputMaybe<LinkedinInvitationFilterInput>;\n first?: InputMaybe<Scalars['Int']['input']>;\n last?: InputMaybe<Scalars['Int']['input']>;\n};\n\n\n/** Root query type. Each subgraph contributes its own fields to it. */\nexport type QueryNodeArgs = {\n id: Scalars['ID']['input'];\n};\n\n\n/** Root query type. Each subgraph contributes its own fields to it. */\nexport type QueryNodesArgs = {\n ids: Array<Scalars['ID']['input']>;\n};\n\n\n/** Root query type. Each subgraph contributes its own fields to it. */\nexport type QueryOrganizationArgs = {\n domain: Scalars['String']['input'];\n};\n\n\n/** Root query type. Each subgraph contributes its own fields to it. */\nexport type QueryOrganizationsArgs = {\n after?: InputMaybe<Scalars['String']['input']>;\n before?: InputMaybe<Scalars['String']['input']>;\n filter?: InputMaybe<OrganizationFilterInput>;\n first?: InputMaybe<Scalars['Int']['input']>;\n last?: InputMaybe<Scalars['Int']['input']>;\n sort?: InputMaybe<Array<OrganizationSortInput>>;\n};\n\n\n/** Root query type. Each subgraph contributes its own fields to it. */\nexport type QueryOutboundChannelAccountArgs = {\n id: Scalars['ID']['input'];\n};\n\n\n/** Root query type. Each subgraph contributes its own fields to it. */\nexport type QueryOutboundChannelAccountsArgs = {\n after?: InputMaybe<Scalars['String']['input']>;\n before?: InputMaybe<Scalars['String']['input']>;\n filter?: InputMaybe<OutboundChannelAccountFilterInput>;\n first?: InputMaybe<Scalars['Int']['input']>;\n last?: InputMaybe<Scalars['Int']['input']>;\n};\n\n\n/** Root query type. Each subgraph contributes its own fields to it. */\nexport type QueryOutboundChannelActionArgs = {\n id: Scalars['ID']['input'];\n};\n\n\n/** Root query type. Each subgraph contributes its own fields to it. */\nexport type QueryOutboundChannelActionsArgs = {\n after?: InputMaybe<Scalars['String']['input']>;\n before?: InputMaybe<Scalars['String']['input']>;\n channelAccountId: Scalars['ID']['input'];\n filter?: InputMaybe<OutboundChannelActionFilterInput>;\n first?: InputMaybe<Scalars['Int']['input']>;\n last?: InputMaybe<Scalars['Int']['input']>;\n};\n\n\n/** Root query type. Each subgraph contributes its own fields to it. */\nexport type QueryOutboundChannelEventsArgs = {\n after?: InputMaybe<Scalars['String']['input']>;\n before?: InputMaybe<Scalars['String']['input']>;\n channelAccountId: Scalars['ID']['input'];\n filter?: InputMaybe<OutboundChannelEventFilterInput>;\n first?: InputMaybe<Scalars['Int']['input']>;\n last?: InputMaybe<Scalars['Int']['input']>;\n};\n\n\n/** Root query type. Each subgraph contributes its own fields to it. */\nexport type QueryOutboundChannelProviderEventsArgs = {\n after?: InputMaybe<Scalars['String']['input']>;\n before?: InputMaybe<Scalars['String']['input']>;\n channelAccountId: Scalars['ID']['input'];\n filter?: InputMaybe<OutboundChannelProviderEventFilterInput>;\n first?: InputMaybe<Scalars['Int']['input']>;\n last?: InputMaybe<Scalars['Int']['input']>;\n};\n\n\n/** Root query type. Each subgraph contributes its own fields to it. */\nexport type QueryProvisioningPreviewsArgs = {\n filter?: InputMaybe<WatcherProvisioningPreviewSelectorInput>;\n icp?: InputMaybe<WatcherIcpInput>;\n};\n\n\n/** Root query type. Each subgraph contributes its own fields to it. */\nexport type QueryResolveByCodeArgs = {\n code: Scalars['String']['input'];\n codeType: LocationCode;\n};\n\n\n/** Root query type. Each subgraph contributes its own fields to it. */\nexport type QueryResolveLocationsArgs = {\n after?: InputMaybe<Scalars['String']['input']>;\n before?: InputMaybe<Scalars['String']['input']>;\n exactOnly?: InputMaybe<Scalars['Boolean']['input']>;\n first?: InputMaybe<Scalars['Int']['input']>;\n last?: InputMaybe<Scalars['Int']['input']>;\n query: Scalars['String']['input'];\n subtypes?: InputMaybe<LocationSubtypeFilterInput>;\n within?: InputMaybe<Scalars['ID']['input']>;\n};\n\n\n/** Root query type. Each subgraph contributes its own fields to it. */\nexport type QueryRevealNodeArgs = {\n id: Scalars['ID']['input'];\n reveal?: InputMaybe<Array<RevealDimension>>;\n};\n\n\n/** Root query type. Each subgraph contributes its own fields to it. */\nexport type QueryRevealNodesArgs = {\n ids: Array<Scalars['ID']['input']>;\n reveal?: InputMaybe<Array<RevealDimension>>;\n};\n\n\n/** Root query type. Each subgraph contributes its own fields to it. */\nexport type QueryRevealsArgs = {\n after?: InputMaybe<Scalars['String']['input']>;\n before?: InputMaybe<Scalars['String']['input']>;\n filter?: InputMaybe<RevealFilterInput>;\n first?: InputMaybe<Scalars['Int']['input']>;\n last?: InputMaybe<Scalars['Int']['input']>;\n};\n\n\n/** Root query type. Each subgraph contributes its own fields to it. */\nexport type QueryUserArgs = {\n sub: Scalars['String']['input'];\n};\n\n\n/** Root query type. Each subgraph contributes its own fields to it. */\nexport type QueryUsersArgs = {\n after?: InputMaybe<Scalars['String']['input']>;\n before?: InputMaybe<Scalars['String']['input']>;\n filter?: InputMaybe<UserFilterInput>;\n first?: InputMaybe<Scalars['Int']['input']>;\n last?: InputMaybe<Scalars['Int']['input']>;\n};\n\n\n/** Root query type. Each subgraph contributes its own fields to it. */\nexport type QueryWatcherArgs = {\n id: Scalars['ID']['input'];\n};\n\n\n/** Root query type. Each subgraph contributes its own fields to it. */\nexport type QueryWatcherDefinitionArgs = {\n slug: Scalars['String']['input'];\n version: Scalars['Int']['input'];\n};\n\n\n/** Root query type. Each subgraph contributes its own fields to it. */\nexport type QueryWatcherDefinitionsArgs = {\n after?: InputMaybe<Scalars['String']['input']>;\n before?: InputMaybe<Scalars['String']['input']>;\n filter?: InputMaybe<WatcherDefinitionFilterInput>;\n first?: InputMaybe<Scalars['Int']['input']>;\n last?: InputMaybe<Scalars['Int']['input']>;\n};\n\n\n/** Root query type. Each subgraph contributes its own fields to it. */\nexport type QueryWatcherEventsArgs = {\n after?: InputMaybe<Scalars['String']['input']>;\n before?: InputMaybe<Scalars['String']['input']>;\n filter?: InputMaybe<WatcherEventFilterInput>;\n first?: InputMaybe<Scalars['Int']['input']>;\n last?: InputMaybe<Scalars['Int']['input']>;\n};\n\n\n/** Root query type. Each subgraph contributes its own fields to it. */\nexport type QueryWatcherProvisioningPreviewsArgs = {\n filter?: InputMaybe<WatcherProvisioningPreviewSelectorInput>;\n icp?: InputMaybe<WatcherIcpInput>;\n};\n\n\n/** Root query type. Each subgraph contributes its own fields to it. */\nexport type QueryWatcherWebhooksArgs = {\n after?: InputMaybe<Scalars['String']['input']>;\n before?: InputMaybe<Scalars['String']['input']>;\n filter?: InputMaybe<WatcherWebhookFilterInput>;\n first?: InputMaybe<Scalars['Int']['input']>;\n last?: InputMaybe<Scalars['Int']['input']>;\n};\n\n\n/** Root query type. Each subgraph contributes its own fields to it. */\nexport type QueryWatchersArgs = {\n after?: InputMaybe<Scalars['String']['input']>;\n before?: InputMaybe<Scalars['String']['input']>;\n filter?: InputMaybe<WatcherFilterInput>;\n first?: InputMaybe<Scalars['Int']['input']>;\n last?: InputMaybe<Scalars['Int']['input']>;\n};\n\n\n/** Root query type. Each subgraph contributes its own fields to it. */\nexport type QueryWebhooksArgs = {\n after?: InputMaybe<Scalars['String']['input']>;\n before?: InputMaybe<Scalars['String']['input']>;\n filter?: InputMaybe<WatcherWebhookFilterInput>;\n first?: InputMaybe<Scalars['Int']['input']>;\n last?: InputMaybe<Scalars['Int']['input']>;\n};\n\n/** Filter on an int8range column with range operators. */\nexport type RangeFilterInput = {\n /**\n * When true, a row also matches when the attribute is blank — NULL, an empty\n * string, an empty list, or no related record, depending on the column. The\n * connection edge reports which branch admitted each row via `filterMatches`.\n * Contrast `blank`, which narrows to blank-only rows where this one widens to include them.\n */\n allowBlank?: InputMaybe<Scalars['Boolean']['input']>;\n /** Matches rows whose range is fully within the given [min, max] range. */\n containedBy?: InputMaybe<Scalars['Range']['input']>;\n /** Matches rows whose range contains the given value. */\n contains?: InputMaybe<Scalars['Int']['input']>;\n /** Matches rows whose range overlaps the given [min, max] range. */\n overlaps?: InputMaybe<Scalars['Range']['input']>;\n};\n\n/** Autogenerated input type of RefreshToken */\nexport type RefreshTokenInput = {\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: InputMaybe<Scalars['String']['input']>;\n refreshToken: Scalars['String']['input'];\n};\n\n/** Autogenerated input type of RefundDebit */\nexport type RefundDebitInput = {\n /** Credits to refund, out of the consumable's charge. Greater than 0. */\n amount: Scalars['Float']['input'];\n /** Global id of the billing customer to refund. */\n billingCustomerId: Scalars['ID']['input'];\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: InputMaybe<Scalars['String']['input']>;\n /** Id of the consumed record, as debitCredits received it. */\n consumableId: Scalars['ID']['input'];\n /** Type of the consumed record, as debitCredits received it. */\n consumableType: Scalars['String']['input'];\n /** Caller-chosen key, unique per customer, that makes a retry safe. */\n idempotencyKey: Scalars['String']['input'];\n /** Why the charge is refunded, stored on every refund credit. */\n reason: Scalars['String']['input'];\n /** The caller's own reference for the refund, such as its refund request id, stored on every refund credit. */\n reference?: InputMaybe<Scalars['String']['input']>;\n};\n\n/** Autogenerated return type of RefundDebit. */\nexport type RefundDebitPayload = Node & {\n __typename?: 'RefundDebitPayload';\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: Maybe<Scalars['String']['output']>;\n /** The REFUND credits written, one per debit or overage refunded, each naming it. */\n credits: BillingCreditConnection;\n id: Scalars['ID']['output'];\n /**\n * What can still be refunded for the consumable after the call: its debits and\n * overages minus the refund and correction credits that reduce them.\n */\n refundableAmount: Scalars['Float']['output'];\n /**\n * Credits given back by this call: the sum of the refund credits, which can\n * exceed amount by the cents rounded in the customer's favour.\n */\n refundedAmount: Scalars['Float']['output'];\n /** Customer's credit balance after the call. */\n remainingBalance: Scalars['Float']['output'];\n};\n\n\n/** Autogenerated return type of RefundDebit. */\nexport type RefundDebitPayloadCreditsArgs = {\n after?: InputMaybe<Scalars['String']['input']>;\n before?: InputMaybe<Scalars['String']['input']>;\n first?: InputMaybe<Scalars['Int']['input']>;\n last?: InputMaybe<Scalars['Int']['input']>;\n};\n\n/** Autogenerated input type of RemoveCompanyMember */\nexport type RemoveCompanyMemberInput = {\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: InputMaybe<Scalars['String']['input']>;\n companyId: Scalars['ID']['input'];\n /** The member to remove. `company { members { user { id } } }` lists them. */\n userId: Scalars['ID']['input'];\n};\n\n/** Autogenerated input type of RemoveOutboundChannelAccount */\nexport type RemoveOutboundChannelAccountInput = {\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: InputMaybe<Scalars['String']['input']>;\n /** Global id of the channel account to remove. */\n id: Scalars['ID']['input'];\n};\n\n/** Autogenerated return type of RemoveOutboundChannelAccount. */\nexport type RemoveOutboundChannelAccountPayload = Node & {\n __typename?: 'RemoveOutboundChannelAccountPayload';\n /** The account, now `REMOVED`; it no longer resolves by id. */\n channelAccount: OutboundChannelAccount;\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: Maybe<Scalars['String']['output']>;\n id: Scalars['ID']['output'];\n};\n\n/**\n * What this response cost in reveal credits: the most it could have, and what it\n * actually did. Nothing is charged yet; the figures are what would be.\n */\nexport type RevealCredits = {\n __typename?: 'RevealCredits';\n /** The units used, per dimension this response revealed. Empty when it revealed nothing. */\n byDimension: Array<RevealDimensionCredits>;\n /** The ceiling reserved before the page was read: every requested dimension on every row. */\n held: Scalars['Int']['output'];\n /**\n * Units this response actually consumed: one per dimension revealed on one row.\n * An owned or unavailable dimension costs nothing.\n */\n used: Scalars['Int']['output'];\n};\n\n/**\n * A separately purchasable piece of reach information about a lead. One flat list\n * rather than a subject plus a dimension, so a contact edge can report\n * organization lines under the same vocabulary.\n */\nexport type RevealDimension =\n /** Their email address, its verification status and its pattern. */\n | 'CONTACT_EMAIL_ADDRESS'\n /** The person's name, picture and career history. */\n | 'CONTACT_IDENTITY'\n /** Their LinkedIn profile. */\n | 'CONTACT_LINKEDIN_URL'\n /** Their phone number. */\n | 'CONTACT_PHONE_NUMBER'\n /** The organization's physical addresses and offices. */\n | 'ORGANIZATION_ADDRESS'\n /** The organization's general contact email. */\n | 'ORGANIZATION_EMAIL_ADDRESS'\n /** The organization's industry, description, size, revenue and founding year. */\n | 'ORGANIZATION_FIRMOGRAPHICS'\n /** The organization's name and logo. */\n | 'ORGANIZATION_IDENTITY'\n /** The organization's LinkedIn company page. */\n | 'ORGANIZATION_LINKEDIN_URL'\n /** The organization's main phone number. */\n | 'ORGANIZATION_PHONE_NUMBER'\n /** The organization's website. */\n | 'ORGANIZATION_WEBSITE';\n\n/** Units one dimension cost on this response. */\nexport type RevealDimensionCredits = {\n __typename?: 'RevealDimensionCredits';\n /** The reach dimension these units were spent on. */\n dimension: RevealDimension;\n /** Rows this dimension was revealed on. */\n used: Scalars['Int']['output'];\n};\n\n/** Filter on the reach dimension a reveal handed over (eq/in/notEq/notIn). */\nexport type RevealDimensionFilterInput = {\n /** Exact match. */\n eq?: InputMaybe<RevealDimension>;\n /** Match any of these values. */\n in?: InputMaybe<Array<RevealDimension>>;\n /** Exclude exact match. */\n notEq?: InputMaybe<RevealDimension>;\n /** Exclude any of these values. */\n notIn?: InputMaybe<Array<RevealDimension>>;\n};\n\n/** One dimension of one lead, and what this response did about it. */\nexport type RevealDimensionStatus = {\n __typename?: 'RevealDimensionStatus';\n /** The piece of reach information this entry is about. */\n dimension: RevealDimension;\n /** When this dimension stops being owned and would be charged again. Set on REVEALED and OWNED, null otherwise. */\n ownedUntil?: Maybe<Scalars['ISO8601DateTime']['output']>;\n /** Whether it was revealed now, already owned, locked, or not there. */\n status: RevealStatus;\n};\n\n/** Filter criteria for the reveal ledger. */\nexport type RevealFilterInput = {\n /**\n * Only reveals handed to these companies, as Company ids. An id that is not a\n * company's matches nothing rather than everything.\n */\n companyId?: InputMaybe<IdFilterInput>;\n /** Only reveals of these contacts, as Contact ids: who was handed which of their dimensions. */\n contactId?: InputMaybe<IdFilterInput>;\n /** `true` keeps only rows not yet superseded by a later window. */\n current?: InputMaybe<Scalars['Boolean']['input']>;\n /** Only reveals of these dimensions. */\n dimension?: InputMaybe<RevealDimensionFilterInput>;\n /** Only reveals triggered by these token subjects — an Auth0 subject for a person, `application:<uuid>` for a machine. */\n oauthId?: InputMaybe<StringFilterInput>;\n /** Only reveals of these organizations, as Organization ids: who was handed which of their dimensions. */\n organizationId?: InputMaybe<IdFilterInput>;\n};\n\n/**\n * One row of the reveal ledger: a reach dimension handed to a company, recorded\n * once per window. What the list `reveals` returns, as opposed to the per-edge\n * `Reveal` a query reports back beside each lead.\n */\nexport type RevealRecord = Node & {\n __typename?: 'RevealRecord';\n /** The day this window opened. */\n anchorOn: Scalars['ISO8601Date']['output'];\n /** The application whose token triggered the reveal, resolved by Hermes. Null when a person did. */\n application?: Maybe<Application>;\n /** The company the information was handed to, resolved by Hermes. Null when Hermes no longer knows it. */\n company?: Maybe<Company>;\n /** The identifier a charge would carry: subject, window anchor, dimension. */\n consumableId: Scalars['String']['output'];\n /** The contact the information belongs to. Null when the subject is not a contact or has since been merged away. */\n contact?: Maybe<Contact>;\n /** The piece of reach information recorded. */\n dimension: RevealDimension;\n /** When this window closes and the dimension would be recorded again. */\n expiresAt: Scalars['ISO8601DateTime']['output'];\n /**\n * How many responses served this dimension inside this window, the reveal itself\n * included. Reads inside the window count here and nowhere else: the row is what\n * would be charged, once.\n */\n hits: Scalars['Int']['output'];\n id: Scalars['ID']['output'];\n /** Whether this row is the current, unexpired record for its dimension. */\n live: Scalars['Boolean']['output'];\n /** The token subject that triggered the reveal: a person or an application. */\n oauthId: Scalars['String']['output'];\n /** The organization the information belongs to. Null when the subject is not an organization or has since been merged away. */\n organization?: Maybe<Organization>;\n /** When the information was first handed over in this window. */\n revealedAt: Scalars['ISO8601DateTime']['output'];\n /** When a later window replaced this row. Null on the current row. */\n supersededAt?: Maybe<Scalars['ISO8601DateTime']['output']>;\n /** Why the row was superseded: `rollover` when its window lapsed. */\n supersededReason?: Maybe<Scalars['String']['output']>;\n};\n\n/** The connection type for RevealRecord. */\nexport type RevealRecordConnection = {\n __typename?: 'RevealRecordConnection';\n /**\n * Estimated total number of items across all pages. It comes from the query\n * planner rather than a count, so it costs planning time instead of a scan and\n * cannot exceed the statement timeout. It is approximate at every magnitude,\n * including small ones, and it moves when the table's statistics are refreshed.\n * Accuracy depends on the filter: within a few percent on plain column and\n * array-overlap filters, and as much as 30% out on a range filter such as\n * `companySize`. It is not meaningful for the embedding filters `jobTitle` and\n * `industry` — no statistics exist for a vector-distance predicate, so the\n * estimate ignores the distance threshold entirely and approximates only what\n * the other filters admit; it has been measured reporting 241371 for a filter\n * whose true result was empty. Never render it as an exact figure, and use\n * `totalCount` when the figure has to be exact.\n */\n approximateTotalCount: Scalars['Int']['output'];\n /** A list of edges. */\n edges?: Maybe<Array<Maybe<RevealRecordEdge>>>;\n /** A list of nodes. */\n nodes?: Maybe<Array<Maybe<RevealRecord>>>;\n /** Information to aid in pagination. */\n pageInfo: PageInfo;\n /** Total number of items across all pages, exact unless `upTo` is given. */\n totalCount: Scalars['Int']['output'];\n};\n\n\n/** The connection type for RevealRecord. */\nexport type RevealRecordConnectionTotalCountArgs = {\n upTo?: InputMaybe<Scalars['Int']['input']>;\n};\n\n/** An edge in a connection. */\nexport type RevealRecordEdge = Node & {\n __typename?: 'RevealRecordEdge';\n /** A cursor for use in pagination. */\n cursor: Scalars['String']['output'];\n id: Scalars['ID']['output'];\n /** The item at the end of the edge. */\n node?: Maybe<RevealRecord>;\n};\n\n/** What happened to one dimension of one lead on this response. */\nexport type RevealStatus =\n /**\n * Atlas could not complete the lookup, so nothing was learned. Never recorded or\n * billed, and the next search tries again. Only `findContacts` returns it.\n */\n | 'FAILED'\n /**\n * Atlas has it, but this company has not asked for it: the fields come back null\n * until a response passes the dimension in `reveal:`.\n */\n | 'LOCKED'\n /** Already recorded inside its window, so it is served and counts once, not again. */\n | 'OWNED'\n /** Asked for through `reveal:`, found, and recorded by this response. */\n | 'REVEALED'\n /** Atlas found nothing. Never recorded — an unsuccessful lookup would not be chargeable. */\n | 'UNAVAILABLE';\n\n/**\n * Represents a contact or an organization together with what this particular query\n * revealed about it, reported beside the record rather than on it.\n */\nexport type Revealed = {\n /**\n * Reports what revealing this record cost in reveal credits. `held` is the\n * ceiling reserved for it, one unit per requested dimension, and `used` is the\n * units it consumed. `used` is zero when the query revealed nothing, while\n * `held` still reports the reserved ceiling.\n */\n credits: RevealCredits;\n /**\n * Returns the contact or organization the entry is about. It is never null on\n * `RevealedContact` and `RevealedOrganization`, and is null on a connection edge\n * only when its record could not be loaded.\n */\n node?: Maybe<Node>;\n /**\n * Lists, per reach dimension this query touched, what this response revealed,\n * what the company already held and what stays locked. The list is empty when\n * the query touched no reach field.\n */\n reveals: Array<RevealDimensionStatus>;\n};\n\n/**\n * A contact another subgraph points to, with what this particular query revealed\n * about it. The pointing subgraph returns the key — the contact id and the\n * `reveal:` its caller passed — and Atlas resolves the rest.\n */\nexport type RevealedContact = Revealed & {\n __typename?: 'RevealedContact';\n /** The contact the pointing resource resolved to, as that resource serves it: a Contact GlobalID, or a bare uuid. */\n contactId: Scalars['ID']['output'];\n /**\n * Reports what revealing this record cost in reveal credits. `held` is the\n * ceiling reserved for it, one unit per requested dimension, and `used` is the\n * units it consumed. `used` is zero when the query revealed nothing, while\n * `held` still reports the reserved ceiling.\n */\n credits: RevealCredits;\n /** The contact the resource points to. */\n node: Contact;\n /**\n * Which reach dimensions the caller asked to reveal. Null, every reach field the\n * query selects under `node`. `[]` reveals nothing: the read serves only what\n * the company already owns, the rest comes back null and `reveals` reports it\n * LOCKED. A list reveals exactly those. Recorded against the company the token acts for.\n */\n reveal?: Maybe<Array<RevealDimension>>;\n /**\n * Lists, per reach dimension this query touched, what this response revealed,\n * what the company already held and what stays locked. The list is empty when\n * the query touched no reach field.\n */\n reveals: Array<RevealDimensionStatus>;\n};\n\n/** Represents an organization together with what this particular query revealed about it. */\nexport type RevealedOrganization = Revealed & {\n __typename?: 'RevealedOrganization';\n /**\n * Reports what revealing this record cost in reveal credits. `held` is the\n * ceiling reserved for it, one unit per requested dimension, and `used` is the\n * units it consumed. `used` is zero when the query revealed nothing, while\n * `held` still reports the reserved ceiling.\n */\n credits: RevealCredits;\n /** Returns the organization the entry is about. */\n node: Organization;\n /**\n * Lists, per reach dimension this query touched, what this response revealed,\n * what the company already held and what stays locked. The list is empty when\n * the query touched no reach field.\n */\n reveals: Array<RevealDimensionStatus>;\n};\n\n/**\n * Represents a page of contacts or organizations together with what it cost and,\n * on each edge, what this particular query revealed about the record.\n */\nexport type RevealedPage = {\n /**\n * Reports what this page cost in reveal credits. `held` is the ceiling reserved\n * for every requested dimension on every row, and `used` is the units the page\n * consumed. `used` is zero when the query revealed nothing, while `held` still\n * reports the reserved ceiling.\n */\n credits: RevealCredits;\n /** Lists the records on the page, each with what this query revealed about it. */\n edges?: Maybe<Array<Maybe<Revealed>>>;\n};\n\n/** Autogenerated input type of RevokeApplicationCredential */\nexport type RevokeApplicationCredentialInput = {\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: InputMaybe<Scalars['String']['input']>;\n credentialId: Scalars['ID']['input'];\n};\n\n/** Autogenerated input type of RevokeCompanyInvitation */\nexport type RevokeCompanyInvitationInput = {\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: InputMaybe<Scalars['String']['input']>;\n invitationId: Scalars['ID']['input'];\n};\n\n/** Autogenerated input type of RunSignalsSynchronousWorker */\nexport type RunSignalsSynchronousWorkerInput = {\n /** Positional arguments forwarded to the job's perform. */\n args?: InputMaybe<Array<Scalars['JSON']['input']>>;\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: InputMaybe<Scalars['String']['input']>;\n /** Fully-qualified ActiveJob class name to execute inline. */\n jobName: Scalars['String']['input'];\n /** Keyword arguments forwarded to the job's perform. */\n kwargs?: InputMaybe<Scalars['JSON']['input']>;\n};\n\n/** Autogenerated return type of RunSignalsSynchronousWorker. */\nexport type RunSignalsSynchronousWorkerPayload = Node & {\n __typename?: 'RunSignalsSynchronousWorkerPayload';\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: Maybe<Scalars['String']['output']>;\n /** Indicates whether the job ran to completion without raising. */\n done: Scalars['Boolean']['output'];\n id: Scalars['ID']['output'];\n};\n\n/** Autogenerated input type of RunSynchronousWorker */\nexport type RunSynchronousWorkerInput = {\n /** Positional arguments forwarded to the job's #perform. */\n args?: InputMaybe<Array<Scalars['JSON']['input']>>;\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: InputMaybe<Scalars['String']['input']>;\n /** Fully-qualified ActiveJob class name to execute inline. */\n jobName: Scalars['String']['input'];\n /** Keyword arguments forwarded to the job's #perform. */\n kwargs?: InputMaybe<Scalars['JSON']['input']>;\n};\n\n/** Autogenerated return type of RunSynchronousWorker. */\nexport type RunSynchronousWorkerPayload = {\n __typename?: 'RunSynchronousWorkerPayload';\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: Maybe<Scalars['String']['output']>;\n /** True once the job has finished running inline. */\n done: Scalars['Boolean']['output'];\n};\n\n/** Autogenerated input type of SearchContact */\nexport type SearchContactInput = {\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: InputMaybe<Scalars['String']['input']>;\n /** Caller-supplied identifier used to key the `contactIdentifyResult` subscription. */\n externalId: Scalars['ID']['input'];\n /** Exactly one lookup mode must be provided. */\n lookup: ContactLookupInput;\n};\n\n/** Autogenerated return type of SearchContact. */\nexport type SearchContactPayload = {\n __typename?: 'SearchContactPayload';\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: Maybe<Scalars['String']['output']>;\n /** One of: received. */\n status: Scalars['String']['output'];\n};\n\n/** Autogenerated input type of SearchContactPhone */\nexport type SearchContactPhoneInput = {\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: InputMaybe<Scalars['String']['input']>;\n /** Global id of the contact whose phone number should be discovered. */\n contactId?: InputMaybe<Scalars['ID']['input']>;\n /**\n * LinkedIn profile URL of the person, used when no `contactId` is held. Ignored\n * when `contactId` is supplied. A value that does not normalize to a LinkedIn\n * profile URL is rejected with `INVALID_INTERACTION`.\n */\n linkedinUrl?: InputMaybe<Scalars['String']['input']>;\n};\n\n/** Autogenerated return type of SearchContactPhone. */\nexport type SearchContactPhonePayload = {\n __typename?: 'SearchContactPhonePayload';\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: Maybe<Scalars['String']['output']>;\n /** The contact the lookup resolved to, with `phone` populated when one was found. Null when no contact matched. */\n contact?: Maybe<Contact>;\n /** The discovered phone number, or null when none was found. */\n phoneNumber?: Maybe<Scalars['String']['output']>;\n /** Outcome of the lookup. One of: found, not_found, contact_not_found, missing_linkedin_url, lookup_failed. */\n status: Scalars['String']['output'];\n};\n\n/** Autogenerated input type of SearchContacts */\nexport type SearchContactsInput = {\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: InputMaybe<Scalars['String']['input']>;\n /** Caller-supplied identifier used to key the `contactSearchResult` subscription. */\n externalId: Scalars['ID']['input'];\n /** Filter criteria for contacts, applied to both the local database and, where translatable, the Coresignal search. */\n filter?: InputMaybe<ContactFilterInput>;\n /**\n * Filter criteria for the contacts' organizations, applied to both the local\n * database and, where translatable, the Coresignal search.\n */\n organizationFilter?: InputMaybe<OrganizationFilterInput>;\n /** Sort order applied to the database contacts result set. */\n sort?: InputMaybe<Array<ContactSortInput>>;\n};\n\n/** Autogenerated return type of SearchContacts. */\nexport type SearchContactsPayload = {\n __typename?: 'SearchContactsPayload';\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: Maybe<Scalars['String']['output']>;\n /** One of: received. */\n status: Scalars['String']['output'];\n};\n\n/** Autogenerated input type of SearchOrganization */\nexport type SearchOrganizationInput = {\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: InputMaybe<Scalars['String']['input']>;\n /** Caller-supplied correlation key; pass the same value to `organizationSearchResult(externalId:)` to receive the result. */\n externalId: Scalars['String']['input'];\n /** Lookup mode — provide exactly one of `domain` or `byIp`. */\n lookup: OrganizationLookupInput;\n /**\n * Optional URL to receive the result via webhook instead of the federated\n * subscription. Only used with `lookup.byIp`. Requires the `atlas/source:write` scope.\n */\n webhookUrl?: InputMaybe<Scalars['String']['input']>;\n};\n\n/** Autogenerated return type of SearchOrganization. */\nexport type SearchOrganizationPayload = {\n __typename?: 'SearchOrganizationPayload';\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: Maybe<Scalars['String']['output']>;\n /** One of: received. */\n status: Scalars['String']['output'];\n};\n\n/** Autogenerated input type of SetDefaultCompany */\nexport type SetDefaultCompanyInput = {\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: InputMaybe<Scalars['String']['input']>;\n /** A company the caller is a member of. Null clears the default. */\n companyId?: InputMaybe<Scalars['ID']['input']>;\n};\n\n/** Autogenerated input type of SetWatcherWebhookActive */\nexport type SetWatcherWebhookActiveInput = {\n /** True to resume delivery, false to pause it. */\n active: Scalars['Boolean']['input'];\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: InputMaybe<Scalars['String']['input']>;\n id: Scalars['ID']['input'];\n /** Webhook URL whose delivery state is toggled. */\n webhookUrl: Scalars['String']['input'];\n};\n\n/** Autogenerated return type of SetWatcherWebhookActive. */\nexport type SetWatcherWebhookActivePayload = Node & {\n __typename?: 'SetWatcherWebhookActivePayload';\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: Maybe<Scalars['String']['output']>;\n id: Scalars['ID']['output'];\n /** The reconciled Watcher. */\n watcher: Watcher;\n};\n\n/** Autogenerated input type of SetWebhookActive */\nexport type SetWebhookActiveInput = {\n /** True to resume delivery, false to pause it. */\n active: Scalars['Boolean']['input'];\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: InputMaybe<Scalars['String']['input']>;\n id: Scalars['ID']['input'];\n /** Webhook URL whose delivery state is toggled. */\n webhookUrl: Scalars['String']['input'];\n};\n\n/** Autogenerated return type of SetWebhookActive. */\nexport type SetWebhookActivePayload = Node & {\n __typename?: 'SetWebhookActivePayload';\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: Maybe<Scalars['String']['output']>;\n id: Scalars['ID']['output'];\n /** The reconciled Watcher. */\n watcher: Watcher;\n};\n\n/** Sort direction. */\nexport type SortDirection =\n /** Ascending order (lowest to highest, oldest to newest). */\n | 'ASC'\n /** Descending order (highest to lowest, newest to oldest). */\n | 'DESC';\n\n/** An enrichment data source with trust score and field mappings. */\nexport type Source = Node & {\n __typename?: 'Source';\n /**\n * Maps Atlas canonical contact field names to rawData extraction expressions.\n * Keys: first_name, last_name, email_address, job_title, job_level, job_function,\n * linkedin_url, city, country_code.\n * Values: a string key (\"firstname\"), an array path for nested access\n * ([\"data\", \"email\"]), or an operation hash\n * ({\"op\": \"split\", \"key\": \"full_name\", \"index\": 0}).\n * All referenced keys must exist in contact_schema.\n */\n contactFieldMappings: Scalars['JSON']['output'];\n /** JSON Schema (draft-07) describing the expected shape of contact rawData payloads. */\n contactSchema: Scalars['JSON']['output'];\n /** When the source was registered. */\n createdAt: Scalars['ISO8601DateTime']['output'];\n id: Scalars['ID']['output'];\n /**\n * Maps Atlas canonical identification field names to rawData extraction expressions.\n * Keys: ip_address, organization_domain, confidence_score.\n * Values follow the same expression syntax as contact_field_mappings.\n * All referenced keys must exist in identification_schema.\n */\n identificationFieldMappings: Scalars['JSON']['output'];\n /** JSON Schema (draft-07) describing the expected shape of identification rawData payloads. */\n identificationSchema: Scalars['JSON']['output'];\n /** OAuth subject of the user who registered this source. Null for system-registered sources. */\n oauthId?: Maybe<Scalars['String']['output']>;\n /**\n * Maps address slot names to rawData extraction expressions.\n * The top-level key names an address slot (e.g. \"headquarters\").\n * Each slot maps Atlas address field names (street, city, state, postal_code,\n * country_code, is_headquarters) to extraction expressions or literal values.\n */\n officeFieldMappings: Scalars['JSON']['output'];\n /**\n * Maps Atlas canonical organization field names to rawData extraction expressions.\n * Keys: name, website, phone, contact_email, linkedin_url, description,\n * company_size, founded_year, industry, country_code, annual_revenue.\n * Values: a string key (\"name\"), an array path ([\"company\", \"name\"]),\n * or an operation hash ({\"op\": \"parse_employee_range\", \"path\": [\"size_range\"]}).\n * All referenced keys must exist in organization_schema.\n */\n organizationFieldMappings: Scalars['JSON']['output'];\n /** JSON Schema (draft-07) describing the expected shape of organization rawData payloads. */\n organizationSchema: Scalars['JSON']['output'];\n /** Short machine-readable identifier for this source (e.g. snitcher, hunter). */\n slug: Scalars['String']['output'];\n /** Weight applied during multi-source merging, 0.0–1.0. Higher scores win field conflicts. */\n trustScore: Scalars['Float']['output'];\n /** When the source configuration was last updated. */\n updatedAt: Scalars['ISO8601DateTime']['output'];\n};\n\n/** Filter on a string column with positive and negative matching. */\nexport type StringFilterInput = {\n /**\n * When true, a row also matches when the attribute is blank — NULL, an empty\n * string, an empty list, or no related record, depending on the column. The\n * connection edge reports which branch admitted each row via `filterMatches`.\n * Contrast `blank`, which narrows to blank-only rows where this one widens to include them.\n */\n allowBlank?: InputMaybe<Scalars['Boolean']['input']>;\n /** When true, match only rows where the column is NULL or empty. False or omitted applies no constraint. */\n blank?: InputMaybe<Scalars['Boolean']['input']>;\n /** Exact match. */\n eq?: InputMaybe<Scalars['String']['input']>;\n /** Match any of these values. Maximum 10000 entries. */\n in?: InputMaybe<Array<Scalars['String']['input']>>;\n /** Exclude exact match. */\n notEq?: InputMaybe<Scalars['String']['input']>;\n /** Exclude any of these values. Maximum 10000 entries. */\n notIn?: InputMaybe<Array<Scalars['String']['input']>>;\n /** When true, match only rows where the column is neither NULL nor empty. False or omitted applies no constraint. */\n presence?: InputMaybe<Scalars['Boolean']['input']>;\n};\n\n/** Root subscription type. Each subgraph contributes its own fields to it. */\nexport type Subscription = {\n __typename?: 'Subscription';\n /**\n * Delivers the result of an `enrichContact` call when `externalId` was supplied,\n * keyed by that `externalId`. The payload contains the merged Contact after enrichment,\n * or a null Contact and an `unresolvedReason` when none could be resolved.\n */\n contactEnrichmentResult: ContactEnrichmentResultPayload;\n /**\n * Delivers the result of a `findContacts` call: the page it asked for, keyed by\n * `externalId`, and only to a subscriber acting for the caller that made it. Subscribe\n * with the same `externalId` before calling `findContacts`. A page is sent again as\n * Atlas fills it, until `status` is COMPLETE; asking for the next page stops sending\n * the earlier one.\n */\n contactFindProgress: ContactFindProgress;\n /**\n * Delivers the result of a `searchContact` call, keyed by `externalId`.\n * Subscribe before or immediately after calling `searchContact`, passing the\n * same `externalId`. The payload contains the matched Contact (or null if not found),\n * regardless of which probe mode was used.\n */\n contactIdentifyResult: ContactIdentifyResultPayload;\n /**\n * Delivers the result of a `searchContacts` call, keyed by `externalId`.\n * The payload contains the contacts matching the filter — both\n * pre-existing database matches and newly-discovered, newly-persisted\n * third-party (Coresignal) matches, since Coresignal-sourced contacts\n * are persisted before this query runs.\n */\n contactSearchResult: ContactSearchResultPayload;\n /**\n * Delivers the result of a `validateContact` call, keyed by `externalId`.\n * The payload contains the Contact and per-field coherence flags in `clues`.\n */\n contactValidationResult: ContactValidationResultPayload;\n /**\n * Delivers the result of a `validateDomain` call, keyed by `externalId`.\n * The payload contains the Organization and per-field coherence flags in `clues`.\n */\n domainValidationResult: DomainValidationResultPayload;\n /**\n * Delivers the verdict of a `verifyEmailAddress` call, keyed by `externalId`, and only\n * to a subscriber acting for the caller that made it.\n */\n emailAddressVerificationResult: EmailAddressVerificationResult;\n /**\n * Delivers the result of an `enrichOrganization` call when `externalId` was\n * supplied, keyed by that `externalId`. Fires once the merge has settled,\n * including the embedding columns, so the organization is immediately\n * queryable through embedding filters (e.g. `industry`).\n */\n organizationEnrichmentResult: OrganizationEnrichmentResultPayload;\n /**\n * Delivers the result of a `findOrganizations` call: the page it asked for, keyed by\n * `externalId`, and only to a subscriber acting for the caller that made it. Subscribe\n * with the same `externalId` before calling `findOrganizations`. A page is sent again as\n * Atlas fills it, until `status` is COMPLETE; asking for the next page stops sending\n * the earlier one.\n */\n organizationFindProgress: OrganizationFindProgress;\n /**\n * Delivers the result of an `identifyOrganizationByIp` call, keyed by `externalId`, and\n * only to a subscriber acting for the caller that made it: the organization behind the\n * IP, or null when Atlas could not tell who it is.\n */\n organizationIdentifyResult: OrganizationIdentifyResult;\n /**\n * Delivers the result of a `searchOrganization` call, keyed by `externalId`.\n * The payload contains the Organization once Atlas has looked up or enriched it\n * (whether by domain or IP), or null if no match was found.\n */\n organizationSearchResult: OrganizationSearchResultPayload;\n /**\n * Delivers an action the moment it settles, `COMPLETED` or `FAILED`, to the\n * caller that performed it, keyed by account and `externalId`. Choose the key,\n * subscribe, then call `performOutboundChannelAction`: the result cannot slip by\n * before the subscription exists. The fast path only: a subscription lives\n * minutes, so the webhook event and `outboundChannelAction(id)` remain the paths of record.\n */\n outboundChannelActionResult: OutboundChannelActionResultPayload;\n /** Spike subscription used to validate the callback transport end-to-end. */\n ping: PingPayload;\n /**\n * Delivers each lead as it qualifies, once, to its watcher's owner: one watcher\n * with `watcherId`, every watcher the caller owns without it. Real time only —\n * a lead that qualified while nothing listened is not replayed, so catch up with\n * `watcherEvents(filter: { qualifiedAt: { gt: … } })`.\n */\n watcherEventQualified: WatcherEventQualifiedPayload;\n /**\n * Delivers the outcome of a `createWatcher` call once every provider has\n * settled (provisioned or terminally failed), keyed by the `externalId`\n * the caller passed to the mutation. Subscribe before mutating. Covers\n * the fast path only — a subscription lives minutes, while an upstream\n * outage can keep provisioning pending for hours — so poll the watcher's\n * `provisioningStatus` to cover the long tail.\n */\n watcherProvisioningResult: WatcherProvisioningResultPayload;\n};\n\n\n/** Root subscription type. Each subgraph contributes its own fields to it. */\nexport type SubscriptionContactEnrichmentResultArgs = {\n externalId: Scalars['ID']['input'];\n};\n\n\n/** Root subscription type. Each subgraph contributes its own fields to it. */\nexport type SubscriptionContactFindProgressArgs = {\n externalId: Scalars['ID']['input'];\n};\n\n\n/** Root subscription type. Each subgraph contributes its own fields to it. */\nexport type SubscriptionContactIdentifyResultArgs = {\n externalId: Scalars['ID']['input'];\n};\n\n\n/** Root subscription type. Each subgraph contributes its own fields to it. */\nexport type SubscriptionContactSearchResultArgs = {\n externalId: Scalars['ID']['input'];\n};\n\n\n/** Root subscription type. Each subgraph contributes its own fields to it. */\nexport type SubscriptionContactValidationResultArgs = {\n externalId: Scalars['ID']['input'];\n};\n\n\n/** Root subscription type. Each subgraph contributes its own fields to it. */\nexport type SubscriptionDomainValidationResultArgs = {\n externalId: Scalars['ID']['input'];\n};\n\n\n/** Root subscription type. Each subgraph contributes its own fields to it. */\nexport type SubscriptionEmailAddressVerificationResultArgs = {\n externalId: Scalars['ID']['input'];\n};\n\n\n/** Root subscription type. Each subgraph contributes its own fields to it. */\nexport type SubscriptionOrganizationEnrichmentResultArgs = {\n externalId: Scalars['ID']['input'];\n};\n\n\n/** Root subscription type. Each subgraph contributes its own fields to it. */\nexport type SubscriptionOrganizationFindProgressArgs = {\n externalId: Scalars['ID']['input'];\n};\n\n\n/** Root subscription type. Each subgraph contributes its own fields to it. */\nexport type SubscriptionOrganizationIdentifyResultArgs = {\n externalId: Scalars['ID']['input'];\n};\n\n\n/** Root subscription type. Each subgraph contributes its own fields to it. */\nexport type SubscriptionOrganizationSearchResultArgs = {\n externalId: Scalars['ID']['input'];\n};\n\n\n/** Root subscription type. Each subgraph contributes its own fields to it. */\nexport type SubscriptionOutboundChannelActionResultArgs = {\n channelAccountId: Scalars['ID']['input'];\n externalId: Scalars['String']['input'];\n};\n\n\n/** Root subscription type. Each subgraph contributes its own fields to it. */\nexport type SubscriptionPingArgs = {\n externalId: Scalars['ID']['input'];\n};\n\n\n/** Root subscription type. Each subgraph contributes its own fields to it. */\nexport type SubscriptionWatcherEventQualifiedArgs = {\n watcherId?: InputMaybe<Scalars['ID']['input']>;\n};\n\n\n/** Root subscription type. Each subgraph contributes its own fields to it. */\nexport type SubscriptionWatcherProvisioningResultArgs = {\n externalId: Scalars['ID']['input'];\n};\n\n/** Tokens from the device and refresh flows, or the provider's error code when the device flow has not produced them. */\nexport type TokenResponse = {\n __typename?: 'TokenResponse';\n /** Bearer token for calling the federation, or null whenever `error` is set. */\n accessToken?: Maybe<Scalars['String']['output']>;\n /**\n * OAuth error code from the provider; null on success. authorization_pending and\n * slow_down mean poll again; expired_token and access_denied are final, so start\n * a new device flow.\n */\n error?: Maybe<Scalars['String']['output']>;\n /** Seconds until the access token expires. */\n expiresIn?: Maybe<Scalars['Int']['output']>;\n /** OpenID Connect ID token, when the scope asked for one. */\n idToken?: Maybe<Scalars['String']['output']>;\n /** Token for `refreshToken`, when offline access was granted. */\n refreshToken?: Maybe<Scalars['String']['output']>;\n /** Type of the access token, normally Bearer. */\n tokenType?: Maybe<Scalars['String']['output']>;\n};\n\n/** Autogenerated input type of TriggerWatcher */\nexport type TriggerWatcherInput = {\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: InputMaybe<Scalars['String']['input']>;\n id: Scalars['ID']['input'];\n};\n\n/** Autogenerated return type of TriggerWatcher. */\nexport type TriggerWatcherPayload = Node & {\n __typename?: 'TriggerWatcherPayload';\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: Maybe<Scalars['String']['output']>;\n id: Scalars['ID']['output'];\n /** The watcher the run was fired for. */\n watcher: Watcher;\n};\n\n/** Autogenerated input type of UpdateSource */\nexport type UpdateSourceInput = {\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: InputMaybe<Scalars['String']['input']>;\n /**\n * Maps Atlas canonical contact field names to rawData extraction expressions.\n * Keys: first_name, last_name, email_address, job_title, job_level, job_function,\n * linkedin_url, city, country_code.\n * Values: a string key (\"firstname\"), an array path for nested access\n * ([\"data\", \"email\"]), or an operation hash\n * ({\"op\": \"split\", \"key\": \"full_name\", \"index\": 0}).\n * All referenced keys must exist in contact_schema.\n */\n contactFieldMappings?: InputMaybe<Scalars['JSON']['input']>;\n /** JSON Schema (draft-07) describing the expected shape of contact rawData payloads. */\n contactSchema?: InputMaybe<Scalars['JSON']['input']>;\n /**\n * Maps Atlas canonical identification field names to rawData extraction expressions.\n * Keys: ip_address, organization_domain, confidence_score.\n * Values follow the same expression syntax as contact_field_mappings.\n * All referenced keys must exist in identification_schema.\n */\n identificationFieldMappings?: InputMaybe<Scalars['JSON']['input']>;\n /** JSON Schema (draft-07) describing the expected shape of identification rawData payloads. */\n identificationSchema?: InputMaybe<Scalars['JSON']['input']>;\n /**\n * Maps Atlas canonical organization field names to rawData extraction expressions.\n * Keys: name, website, phone, contact_email, linkedin_url, description,\n * company_size, founded_year, industry, country_code, annual_revenue.\n * Values: a string key (\"name\"), an array path ([\"company\", \"name\"]),\n * or an operation hash ({\"op\": \"parse_employee_range\", \"path\": [\"size_range\"]}).\n * All referenced keys must exist in organization_schema.\n */\n organizationFieldMappings?: InputMaybe<Scalars['JSON']['input']>;\n /** JSON Schema (draft-07) describing the expected shape of organization rawData payloads. */\n organizationSchema?: InputMaybe<Scalars['JSON']['input']>;\n /** Global ID of the source to update. */\n sourceId: Scalars['ID']['input'];\n /** Weight applied during multi-source merging, 0.0–1.0. Higher scores win field conflicts. */\n trustScore?: InputMaybe<Scalars['Float']['input']>;\n};\n\n/** Autogenerated input type of UpdateWatcherLeadCaps */\nexport type UpdateWatcherLeadCapsInput = {\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: InputMaybe<Scalars['String']['input']>;\n /** Global id of the Watcher whose caps are being replaced. */\n id: Scalars['ID']['input'];\n /** The full set of caps for the Watcher. Pass an empty list to remove all caps (leaving the Watcher uncapped). */\n leadCaps: Array<WatcherLeadCapInput>;\n};\n\n/** Autogenerated return type of UpdateWatcherLeadCaps. */\nexport type UpdateWatcherLeadCapsPayload = Node & {\n __typename?: 'UpdateWatcherLeadCapsPayload';\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: Maybe<Scalars['String']['output']>;\n id: Scalars['ID']['output'];\n /** The updated Watcher. */\n watcher: Watcher;\n};\n\n/** Federation reference to a User owned by another subgraph. */\nexport type User = Node & {\n __typename?: 'User';\n /** Companies this user belongs to. Reading this never provisions — only the caller's own first access does, through `me`. */\n companies: CompanyConnection;\n /** When this person first reached Hermes — their row is provisioned on that request, not when they registered with Auth0. */\n createdAt: Scalars['ISO8601DateTime']['output'];\n /**\n * The company this user acts for by default, chosen with `setDefaultCompany`.\n * Only ever resolved for the caller themselves, and null once they no longer belong to it.\n */\n defaultCompany?: Maybe<Company>;\n /** Cached from Auth0 on this user's own requests. May lag; never authoritative. */\n email?: Maybe<Scalars['String']['output']>;\n /** Cached from Auth0. Null when the identity provider does not supply one. */\n firstName?: Maybe<Scalars['String']['output']>;\n /** GlobalID-encoded User id. */\n id: Scalars['ID']['output'];\n /** Cached from Auth0. Null when the identity provider does not supply one. */\n lastName?: Maybe<Scalars['String']['output']>;\n /**\n * The Auth0 subject. It is what a log line and a JWT carry, so it is the handle\n * support correlates on — and the reason `user(sub:)` is not open: a subject is\n * copyable, so an unscoped lookup by it is a directory.\n */\n oauthId: Scalars['String']['output'];\n};\n\n\n/** Federation reference to a User owned by another subgraph. */\nexport type UserCompaniesArgs = {\n after?: InputMaybe<Scalars['String']['input']>;\n before?: InputMaybe<Scalars['String']['input']>;\n first?: InputMaybe<Scalars['Int']['input']>;\n last?: InputMaybe<Scalars['Int']['input']>;\n};\n\n/** The connection type for User. */\nexport type UserConnection = {\n __typename?: 'UserConnection';\n /** A list of edges. */\n edges?: Maybe<Array<Maybe<UserEdge>>>;\n /** A list of nodes. */\n nodes?: Maybe<Array<Maybe<User>>>;\n /** Information to aid in pagination. */\n pageInfo: PageInfo;\n /** Total number of items across all pages. */\n totalCount: Scalars['Int']['output'];\n};\n\n/** An edge in a connection. */\nexport type UserEdge = {\n __typename?: 'UserEdge';\n /** A cursor for use in pagination. */\n cursor: Scalars['String']['output'];\n /** The item at the end of the edge. */\n node?: Maybe<User>;\n};\n\n/** Filter criteria for people. */\nexport type UserFilterInput = {\n /** The Auth0 subjects, as a log line or a ledger row names them. */\n oauthId?: InputMaybe<StringFilterInput>;\n};\n\n/** Autogenerated input type of ValidateContact */\nexport type ValidateContactInput = {\n /** Optional values to cross-check against Atlas data (email, phone). */\n checks?: InputMaybe<ContactValidationChecksInput>;\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: InputMaybe<Scalars['String']['input']>;\n /** Caller-supplied correlation key; pass the same value to `contactValidationResult(externalId:)` to receive the result. */\n externalId: Scalars['String']['input'];\n /** Contact's first name to validate. */\n firstName: Scalars['String']['input'];\n /** Contact's last name to validate. */\n lastName: Scalars['String']['input'];\n /** Global ID of the organization this contact belongs to. */\n organizationId: Scalars['ID']['input'];\n /**\n * Optional URL to receive the result via webhook. Callers consuming results via\n * the federated `contactValidationResult` subscription can omit it. Requires the\n * `atlas/source:write` scope.\n */\n webhookUrl?: InputMaybe<Scalars['String']['input']>;\n};\n\n/** Autogenerated return type of ValidateContact. */\nexport type ValidateContactPayload = {\n __typename?: 'ValidateContactPayload';\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: Maybe<Scalars['String']['output']>;\n /** One of: received. */\n status: Scalars['String']['output'];\n};\n\n/** Autogenerated input type of ValidateDomain */\nexport type ValidateDomainInput = {\n /** Company field values to cross-check against Atlas data. */\n checks?: InputMaybe<ValidationChecksInput>;\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: InputMaybe<Scalars['String']['input']>;\n /** The company's primary web domain to validate. */\n domain: Scalars['String']['input'];\n /** Caller-supplied correlation key; pass the same value to `domainValidationResult(externalId:)` to receive the result. */\n externalId: Scalars['String']['input'];\n /**\n * Optional URL to receive the result via webhook. Callers consuming results via\n * the federated `domainValidationResult` subscription can omit it. Requires the\n * `atlas/source:write` scope.\n */\n webhookUrl?: InputMaybe<Scalars['String']['input']>;\n};\n\n/** Autogenerated return type of ValidateDomain. */\nexport type ValidateDomainPayload = {\n __typename?: 'ValidateDomainPayload';\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: Maybe<Scalars['String']['output']>;\n /** One of: received. */\n status: Scalars['String']['output'];\n};\n\n/** Company field values to cross-check against Atlas's stored organization data. */\nexport type ValidationChecksInput = {\n /** Expected annual revenue string to validate against the stored range. */\n annualRevenue?: InputMaybe<Scalars['String']['input']>;\n /** Expected employee count string to validate against the stored range. */\n companySize?: InputMaybe<Scalars['String']['input']>;\n /** General contact email address to validate. */\n contactEmail?: InputMaybe<Scalars['String']['input']>;\n /** Four-digit founding year to validate against the stored value. */\n foundedYear?: InputMaybe<Scalars['Int']['input']>;\n /** Industry string to validate against the stored classification. */\n industry?: InputMaybe<Scalars['String']['input']>;\n /** IP address to include in identification coherence checks. */\n ip?: InputMaybe<Scalars['String']['input']>;\n /** LinkedIn company page URL to validate. */\n linkedinUrl?: InputMaybe<Scalars['String']['input']>;\n /**\n * Mercator Location id (Relay global id) whose country Atlas uses. A location\n * inside a country resolves to that country, so a city id is accepted; one above\n * the country level, such as a continent, has no country and is treated as no country.\n */\n locationId?: InputMaybe<Scalars['ID']['input']>;\n /** Legal or trade name to validate against the stored value. */\n name?: InputMaybe<Scalars['String']['input']>;\n /** Main phone number to validate. */\n phone?: InputMaybe<Scalars['String']['input']>;\n};\n\n/** Autogenerated input type of VerifyEmailAddress */\nexport type VerifyEmailAddressInput = {\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: InputMaybe<Scalars['String']['input']>;\n /**\n * The email address to verify. Surrounding whitespace and letter case are\n * ignored. A blank value is rejected with `INVALID_INTERACTION`.\n */\n emailAddress: Scalars['String']['input'];\n /** Caller-supplied identifier keying the `emailAddressVerificationResult` subscription. */\n externalId: Scalars['ID']['input'];\n};\n\n/** Autogenerated return type of VerifyEmailAddress. */\nexport type VerifyEmailAddressPayload = {\n __typename?: 'VerifyEmailAddressPayload';\n /** A unique identifier for the client performing the mutation. */\n clientMutationId?: Maybe<Scalars['String']['output']>;\n /** One of: received. */\n status: Scalars['String']['output'];\n};\n\n/** Federation reference to a Watcher owned by another subgraph. */\nexport type Watcher = Node & {\n __typename?: 'Watcher';\n /** Timestamp at which the Watcher was permanently canceled, or null if active or paused. */\n canceledAt?: Maybe<Scalars['ISO8601DateTime']['output']>;\n /**\n * The Hermes company this Watcher belongs to, as the GlobalID hermes addresses\n * it by. Null on a watcher created before companies were recorded, or by a\n * subject that belongs to none. `ownerSub` says who created it; this says who is\n * billed for it, and the two answer different halves of \"whose watcher is this\".\n */\n companyId?: Maybe<Scalars['ID']['output']>;\n /** Timestamp when the Watcher was created. */\n createdAt: Scalars['ISO8601DateTime']['output'];\n /** The signal Definition this Watcher tracks. */\n definition: WatcherDefinition;\n /**\n * Events this Watcher captured, newest first. Kept ones by default: a delivery\n * that was refused — a duplicate, a lead past the cap, an upstream payload\n * carrying no contact — never became a lead. Its reason is operator data, so\n * listing it through `state` takes a service-wide read scope — the one staff\n * hold, not the per-resource scope a customer is granted.\n */\n events: WatcherEventHistoryConnection;\n /**\n * Ideal Customer Profile this Watcher filters its leads by, in the same shape\n * Atlas search uses — including geography, as `contact.divisionIds` /\n * `organization.divisionIds`. Null for a Watcher created without a profile. Part\n * of the Watcher's identity, so it is fixed at creation.\n */\n icp?: Maybe<WatcherIcp>;\n /** GlobalID-encoded Watcher id. */\n id: Scalars['ID']['output'];\n /**\n * User-supplied input that defines what to track (e.g. keywords, domain, post\n * URL). Provider-managed configuration is not included here.\n */\n input: Scalars['JSON']['output'];\n /**\n * Client-side installation artifacts for this Watcher, one entry per provider\n * that publishes one. Each entry is a provider-specific JSON blob. By convention\n * every entry includes an `instructions` markdown field that tells the consumer\n * (agent or UI) how to walk the user through the install, plus the concrete\n * artifacts those instructions reference (e.g. Snitcher exposes `snippet`,\n * `snippet_version`, `wordpress_plugin_url`, `help_article_path`). Empty when no\n * provider requires client-side setup.\n */\n installations: Array<Scalars['JSON']['output']>;\n /** Freshness-first per-period lead caps applied to this Watcher. Empty when the Watcher is uncapped. */\n leadCaps: WatcherLeadCapConnection;\n /**\n * Whether this Watcher is currently producing signals. Reads PAUSED when every\n * registered webhook is paused, which provisioningStatus cannot express.\n */\n lifecycleState: WatcherLifecycleStateEnum;\n /** Human-readable display name of the Watcher, derived from the signal Definition it tracks. */\n name: Scalars['String']['output'];\n /**\n * The subject that created this Watcher — an Auth0 subject for a person,\n * `application:<uuid>` for a machine. It is what ownership is enforced on, so it\n * is also what correlates a Watcher to a log line.\n */\n ownerSub: Scalars['String']['output'];\n /**\n * Identifiers the upstream services assigned to this Watcher, one per provider\n * that holds one. Gated behind `signals/watcher:*` because these are internal\n * vendor ids — unlike `installations`, they are not customer-facing and disclose\n * which third party backs the signal. Empty for providers that keep no external reference.\n */\n providerReferences: Array<WatcherProviderReference>;\n /**\n * Where each provider stands: provisioned or not, torn down or not, and when it\n * next runs. Requires `signals/watcher:read` rather than the wider scope\n * providerReferences needs, because it carries no upstream identifier — only\n * whether the plumbing works.\n */\n providerStates: WatcherProviderStateConnection;\n /**\n * Terminal per-provider provisioning failures, one entry per provider that could\n * not be set up. Entries accumulate as each provider settles, so a still-PENDING\n * watcher can already carry failures for the providers that gave up first; empty\n * when everything provisioned. Gated behind `signals/watcher:*` for the same\n * reason `providerReferences` is: the provider slug discloses which third party\n * backs the signal.\n */\n provisioningFailures: Array<WatcherProvisioningFailure>;\n /**\n * Aggregate provisioning state of this Watcher's providers. `PROVISIONED` on a\n * Watcher created the default synchronous way; a Watcher created with\n * `createWatcher(async: true)` starts `PENDING` and settles once every provider\n * has an answer — poll this field, or subscribe to `watcherProvisioningResult`,\n * to learn the outcome.\n */\n provisioningStatus: WatcherProvisioningStatusEnum;\n /** Timestamp of the most recent change to this Watcher. */\n updatedAt: Scalars['ISO8601DateTime']['output'];\n /** Delivery URLs registered on this watcher. Secrets are never exposed. */\n webhookUrls: Array<Scalars['String']['output']>;\n /**\n * Where each delivery endpoint stands and how it has been answering — paused or\n * not, how many leads reached it, how many failed. Requires\n * `signals/watcher:read`, and each summary is a set of aggregate queries: select\n * it on one Watcher, not across a list. `webhookUrls` stays the customer-facing\n * view of the same endpoints.\n */\n webhooks: WatcherWebhookConnection;\n};\n\n\n/** Federation reference to a Watcher owned by another subgraph. */\nexport type WatcherEventsArgs = {\n after?: InputMaybe<Scalars['String']['input']>;\n before?: InputMaybe<Scalars['String']['input']>;\n first?: InputMaybe<Scalars['Int']['input']>;\n last?: InputMaybe<Scalars['Int']['input']>;\n state?: InputMaybe<WatcherEventStateFilterInput>;\n};\n\n\n/** Federation reference to a Watcher owned by another subgraph. */\nexport type WatcherLeadCapsArgs = {\n after?: InputMaybe<Scalars['String']['input']>;\n before?: InputMaybe<Scalars['String']['input']>;\n first?: InputMaybe<Scalars['Int']['input']>;\n last?: InputMaybe<Scalars['Int']['input']>;\n};\n\n\n/** Federation reference to a Watcher owned by another subgraph. */\nexport type WatcherProviderStatesArgs = {\n after?: InputMaybe<Scalars['String']['input']>;\n before?: InputMaybe<Scalars['String']['input']>;\n first?: InputMaybe<Scalars['Int']['input']>;\n last?: InputMaybe<Scalars['Int']['input']>;\n};\n\n\n/** Federation reference to a Watcher owned by another subgraph. */\nexport type WatcherWebhooksArgs = {\n after?: InputMaybe<Scalars['String']['input']>;\n before?: InputMaybe<Scalars['String']['input']>;\n first?: InputMaybe<Scalars['Int']['input']>;\n last?: InputMaybe<Scalars['Int']['input']>;\n};\n\n/** The connection type for Watcher. */\nexport type WatcherConnection = {\n __typename?: 'WatcherConnection';\n /** A list of edges. */\n edges?: Maybe<Array<Maybe<WatcherEdge>>>;\n /** A list of nodes. */\n nodes?: Maybe<Array<Maybe<Watcher>>>;\n /** Information to aid in pagination. */\n pageInfo: PageInfo;\n /** Total number of items across all pages. */\n totalCount: Scalars['Int']['output'];\n};\n\n/**\n * Person-level ICP criteria, as submitted. Mirrors `WatcherContactIcpInput`, which\n * in turn mirrors the subset of Atlas's `ContactFilterInput` an upstream lead\n * source can enforce.\n */\nexport type WatcherContactIcp = {\n __typename?: 'WatcherContactIcp';\n /** Mercator locations the person had to belong to. */\n divisionIds?: Maybe<WatcherDivisionFilter>;\n /**\n * Job title embedding filters. Only the *direction* of `match` was honoured\n * upstream (`INCLUDED_*` include, `EXCLUDED_*` exclude); the entry is echoed\n * back as the caller sent it, including a deprecated `distance`.\n */\n jobTitle?: Maybe<Array<EmbeddingFilter>>;\n};\n\n/** Person-level ICP criteria, mirroring the subset of Atlas's `ContactFilterInput` that an upstream lead source can enforce. */\nexport type WatcherContactIcpInput = {\n /**\n * Mercator location division IDs the person must belong to. Resolved to place\n * names before being handed upstream, since no source speaks Mercator.\n */\n divisionIds?: InputMaybe<IdFilterInput>;\n /**\n * Job title embedding filters. Each `query` is embedded as a single vector, so\n * keep one string to one semantic neighborhood — packing unrelated roles into it\n * dilutes the vector and forces a looser match, costing precision. To target\n * several distinct roles, list them in `queries`: each keeps its own vector, and\n * the entry matches a person close to any of them. Entries combine with AND (an\n * include plus an exclude). Upstream sources honour only the *direction* of\n * `match` (`INCLUDED_*` include, `EXCLUDED_*` exclude); the threshold behind it\n * is enforced at delivery time. Note that upstream sources OR every included\n * title together, so on their side a `queries` list and separate entries are\n * indistinguishable — the AND is enforced at delivery time.\n */\n jobTitle?: InputMaybe<Array<EmbeddingFilterInput>>;\n};\n\n/** A signal Definition: a code-defined strategy that produces leads from external sources via one or more internal providers. */\nexport type WatcherDefinition = {\n __typename?: 'WatcherDefinition';\n /**\n * JSON Schema describing the shape of `Event.payload` rows produced by this\n * Definition, regardless of which provider delivered them. `Event.payload` is\n * projected onto this schema, so a property it does not declare is never\n * returned. Property names are camelCase, matching the payload; each carries a\n * localized `title` in the caller's locale.\n */\n canonicalEventSchema: Scalars['JSON']['output'];\n /** Whether this Definition version is deprecated. */\n deprecated: Scalars['Boolean']['output'];\n /** Human-readable explanation of the signal this Definition captures. */\n description?: Maybe<Scalars['String']['output']>;\n /**\n * Display-only description localized to the caller's Accept-Language locale, for\n * showing in the UI. Falls back to the English `description` when no translation exists.\n */\n descriptionLocalized?: Maybe<Scalars['String']['output']>;\n /** Stable composite identifier in the form 'slug@version'. */\n id: Scalars['ID']['output'];\n /** Human-readable name of the Definition. */\n name: Scalars['String']['output'];\n /**\n * Display-only name localized to the caller's Accept-Language locale, for\n * showing in the UI. Falls back to the English `name` when no translation exists.\n */\n nameLocalized: Scalars['String']['output'];\n /** Cron expression for scheduled ingestion runs, or null if the Definition is purely webhook-driven. */\n scheduleCron?: Maybe<Scalars['String']['output']>;\n /** URL-safe identifier of the Definition (e.g. 'radar'). */\n slug: Scalars['String']['output'];\n /** Ways this Definition can be triggered (scheduled, webhook, manual). */\n triggers: Array<WatcherDefinitionTriggerEnum>;\n /** Definition version. Bumped when the canonical event shape changes. */\n version: Scalars['Int']['output'];\n /**\n * JSON Schema for the user-supplied watcher input. The same input is fanned out\n * to every internal provider; providers never require additional user input.\n * Each property carries a localized `title` and, for enum-constrained\n * properties, an `x-enumLabels` map of localized option labels in the caller's locale.\n */\n watcherInputSchema: Scalars['JSON']['output'];\n};\n\n/** The connection type for WatcherDefinition. */\nexport type WatcherDefinitionConnection = {\n __typename?: 'WatcherDefinitionConnection';\n /** A list of edges. */\n edges?: Maybe<Array<Maybe<WatcherDefinitionEdge>>>;\n /** A list of nodes. */\n nodes?: Maybe<Array<Maybe<WatcherDefinition>>>;\n /** Information to aid in pagination. */\n pageInfo: PageInfo;\n /** Total number of items across all pages. */\n totalCount: Scalars['Int']['output'];\n};\n\n/** An edge in a connection. */\nexport type WatcherDefinitionEdge = {\n __typename?: 'WatcherDefinitionEdge';\n /** A cursor for use in pagination. */\n cursor: Scalars['String']['output'];\n /** The item at the end of the edge. */\n node?: Maybe<WatcherDefinition>;\n};\n\n/** Filter arguments for the definitions connection. */\nexport type WatcherDefinitionFilterInput = {\n /** Include deprecated definitions. Defaults to false. */\n includeDeprecated?: InputMaybe<Scalars['Boolean']['input']>;\n};\n\n/** How a Watcher run is initiated. */\nexport type WatcherDefinitionTriggerEnum =\n | 'MANUAL'\n | 'SCHEDULE'\n | 'WEBHOOK';\n\n/** A Mercator location filter, as submitted, resolved to Locations. */\nexport type WatcherDivisionFilter = {\n __typename?: 'WatcherDivisionFilter';\n /** Location that had to match exactly. */\n eq?: Maybe<Location>;\n /** Locations any of which had to match. */\n in?: Maybe<Array<Location>>;\n /** Location that was excluded. */\n notEq?: Maybe<Location>;\n /** Locations that were excluded. */\n notIn?: Maybe<Array<Location>>;\n};\n\n/**\n * Policy for a lead the upstream source has already delivered for this Watcher.\n * Omit the whole input to leave the source's own default in place.\n */\nexport type WatcherDuplicateHandlingInput = {\n /** Which policy applies. */\n mode: WatcherDuplicateHandlingModeEnum;\n /**\n * How long a repeat delivery stays refused, as an ISO-8601 duration (e.g. P7D).\n * Required when `mode` is REFUSE_DURING and rejected otherwise. Sources count\n * this in whole days, so a duration that isn't a whole number of days is rejected.\n */\n period?: InputMaybe<Scalars['ISO8601Duration']['input']>;\n};\n\n/** How the upstream source treats a lead it has already delivered for a Watcher. */\nexport type WatcherDuplicateHandlingModeEnum =\n /** Always deliver, even for a lead already seen. */\n | 'ALWAYS'\n /** Never deliver the same lead twice. */\n | 'REFUSE'\n /** Refuse a repeat delivery for `period`, then allow it again. */\n | 'REFUSE_DURING';\n\n/** An edge in a connection. */\nexport type WatcherEdge = {\n __typename?: 'WatcherEdge';\n /** A cursor for use in pagination. */\n cursor: Scalars['String']['output'];\n /** The item at the end of the edge. */\n node?: Maybe<Watcher>;\n};\n\n/** Federation reference to a WatcherEvent owned by another subgraph. */\nexport type WatcherEvent = Node & {\n __typename?: 'WatcherEvent';\n /**\n * Atlas contact this Event resolved to, with the reach dimensions this query\n * revealed about it. Signals hands Atlas the contact id and `reveal`; Atlas\n * serves the contact and meters the reveal. Null when materialization resolved\n * no contact, or when the contact no longer exists. Requires\n * `signals/watcher:read`, and `atlas/organization:read` for what Atlas serves.\n */\n contact?: Maybe<RevealedContact>;\n /** Timestamp when the Event row was persisted. */\n createdAt: Scalars['ISO8601DateTime']['output'];\n /** Key used by the Definition's deduplication strategy. Null when the Definition does not deduplicate. */\n deduplicationKey?: Maybe<Scalars['String']['output']>;\n /**\n * Every attempt made to deliver this Event to its Watcher's webhooks, oldest\n * first. Retries each write their own row, so several attempts against one URL\n * is normal and the last one decides whether the lead arrived. Requires\n * `signals/watcher:read`.\n */\n deliveries: WatcherWebhookDeliveryConnection;\n /**\n * Why this Event never became a lead — a duplicate, or an ICP the payload did\n * not clear. Null for one that was kept. It is the difference between \"nothing\n * arrived\" and \"something arrived and was refused\", which the timestamps alone\n * cannot express.\n */\n discardReason?: Maybe<Scalars['String']['output']>;\n /** When this Event was refused. Null for one that was kept. */\n discardedAt?: Maybe<Scalars['ISO8601DateTime']['output']>;\n /**\n * How the lead cleared each attribute the Watcher's ICP constrains, one entry\n * per attribute, ordered by attribute name. Null when the Event predates the\n * check, never reached it, or its Watcher has no ICP.\n */\n icpAxisVerdicts?: Maybe<Array<WatcherEventIcpAxisVerdict>>;\n /** GlobalID-encoded WatcherEvent id. */\n id: Scalars['ID']['output'];\n /**\n * Why materialization failed, as the pipeline recorded it. Distinct from\n * discardReason: this one is our failure, not a refusal. Requires\n * `signals/watcher:read`.\n */\n materializationFailureReason?: Maybe<Scalars['String']['output']>;\n /**\n * Which route materialization took to turn this Event into a lead — the\n * difference between \"no contact was found\" and \"a contact was found the other\n * way\". Requires `signals/watcher:read`.\n */\n materializationPath?: Maybe<Scalars['String']['output']>;\n /** Timestamp at which the originating ingestion run observed this Event. */\n observedAt: Scalars['ISO8601DateTime']['output'];\n /** Timestamp at which the underlying activity actually happened upstream, when known. */\n occurredAt?: Maybe<Scalars['ISO8601DateTime']['output']>;\n /**\n * Canonical Event payload, projected onto the shape declared by the\n * `canonicalEventSchema` of the Definition version that captured it. A key the\n * schema does not declare is never returned, at any depth, and declared keys are\n * camelCase. An object the schema marks `additionalProperties: true` is returned\n * whole, under the key names its provider sends.\n */\n payload: Scalars['JSON']['output'];\n /** Timestamp of the most recent failed materialization attempt. */\n processingFailedAt?: Maybe<Scalars['ISO8601DateTime']['output']>;\n /** Timestamp at which materialization succeeded. */\n processingSucceededAt?: Maybe<Scalars['ISO8601DateTime']['output']>;\n /**\n * When this Event became a lead: it cleared the ICP and claimed a lead slot.\n * Null until then, and for a refused Event. Replayed leads keep the time they\n * first qualified.\n */\n qualifiedAt?: Maybe<Scalars['ISO8601DateTime']['output']>;\n /**\n * Delivery exactly as the provider sent it, before canonicalization: keys in the\n * provider's own names, the person's contact details and the provider's own ids\n * included. Null when the Event was recorded without one. Requires\n * `signals/*:read`, a service-wide scope Sortlist staff hold and no customer token carries.\n */\n rawPayload?: Maybe<Scalars['JSON']['output']>;\n /**\n * Atlas contact this Event resolved to, as the GlobalID atlas addresses it by —\n * the same form `Events::DeliverWebhookJob` puts on the wire, so a lead can be\n * followed from here into atlas without re-encoding anything. Null when\n * materialization resolved no contact. Requires `signals/watcher:read`.\n * @deprecated Select `contact { node { id } }` instead: it returns the Atlas contact itself, and lets the query choose which reach dimensions to reveal.\n */\n resolvedContactId?: Maybe<Scalars['String']['output']>;\n /**\n * The Watcher that captured this Event. Selected from the root `events`\n * connection, where a page spans many Watchers and a row is unreadable without\n * the one it belongs to.\n */\n watcher: Watcher;\n};\n\n\n/** Federation reference to a WatcherEvent owned by another subgraph. */\nexport type WatcherEventContactArgs = {\n reveal?: InputMaybe<Array<RevealDimension>>;\n};\n\n\n/** Federation reference to a WatcherEvent owned by another subgraph. */\nexport type WatcherEventDeliveriesArgs = {\n after?: InputMaybe<Scalars['String']['input']>;\n before?: InputMaybe<Scalars['String']['input']>;\n first?: InputMaybe<Scalars['Int']['input']>;\n last?: InputMaybe<Scalars['Int']['input']>;\n};\n\n/** The connection type for WatcherEvent. */\nexport type WatcherEventConnection = {\n __typename?: 'WatcherEventConnection';\n /** A list of edges. */\n edges?: Maybe<Array<Maybe<WatcherEventEdge>>>;\n /** A list of nodes. */\n nodes?: Maybe<Array<Maybe<WatcherEvent>>>;\n /** Information to aid in pagination. */\n pageInfo: PageInfo;\n /** Total number of items across all pages. */\n totalCount: Scalars['Int']['output'];\n};\n\n/** An edge in a connection. */\nexport type WatcherEventEdge = {\n __typename?: 'WatcherEventEdge';\n /** A cursor for use in pagination. */\n cursor: Scalars['String']['output'];\n /** The item at the end of the edge. */\n node?: Maybe<WatcherEvent>;\n};\n\n/** Filter arguments for the events connection. */\nexport type WatcherEventFilterInput = {\n /** Keep only the events captured by watchers of this Definition, by its slug, e.g. 'radar-website'. */\n definitionSlug?: InputMaybe<StringFilterInput>;\n /**\n * Keep only the events refused for this reason, e.g. 'icp_mismatch'. A reason is\n * only ever carried by a refused event, so asking for one asks for the DISCARDED\n * slice and takes the same scope.\n */\n discardReason?: InputMaybe<StringFilterInput>;\n /**\n * Keep only the leads that qualified in this window, e.g. `{ gt: <the newest\n * qualifiedAt already read> }` to fetch the leads kept since. An event that has\n * not qualified is never selected.\n */\n qualifiedAt?: InputMaybe<DateTimeFilterInput>;\n /** Which slices to list. Omitted, KEPT alone — the only slice a caller without a service-wide read scope may reach. */\n state?: InputMaybe<WatcherEventStateFilterInput>;\n /**\n * Keep only the events captured by this Watcher, as its GlobalID. The root\n * connection spans every watcher, so this is what narrows it to the one a ticket names.\n */\n watcherId?: InputMaybe<IdFilterInput>;\n};\n\n/** The connection type for WatcherEvent. */\nexport type WatcherEventHistoryConnection = {\n __typename?: 'WatcherEventHistoryConnection';\n /**\n * Events refused before materialization — a duplicate, or a lead the ICP\n * excluded. Never delivered, and excluded from `pending` so a backlog that\n * cannot drain is not reported.\n */\n discarded: Scalars['Int']['output'];\n /** A list of edges. */\n edges?: Maybe<Array<Maybe<WatcherEventEdge>>>;\n /** Events whose processing raised and has not since succeeded. */\n failed: Scalars['Int']['output'];\n /**\n * Delivered leads carrying at least one attribute the ICP could only match on\n * absence — a fit enrichment could not confirm, counted inside `total`.\n */\n icpUnverified: Scalars['Int']['output'];\n /** When the most recent event was observed upstream. Null when none ever arrived. */\n lastObservedAt?: Maybe<Scalars['ISO8601DateTime']['output']>;\n /** When an event last finished processing successfully. */\n lastSucceededAt?: Maybe<Scalars['ISO8601DateTime']['output']>;\n /** A list of nodes. */\n nodes?: Maybe<Array<Maybe<WatcherEvent>>>;\n /** Information to aid in pagination. */\n pageInfo: PageInfo;\n /** Kept events not yet processed and not currently failed — the live backlog. */\n pending: Scalars['Int']['output'];\n /** Events that finished processing successfully. */\n succeeded: Scalars['Int']['output'];\n /**\n * Every event ever ingested for this Watcher, discarded ones included — unlike\n * `totalCount`, which counts the slice `state` selected.\n */\n total: Scalars['Int']['output'];\n /** Total number of items across all pages. */\n totalCount: Scalars['Int']['output'];\n};\n\n/** One attribute the Watcher's ICP constrains, and how the lead cleared it. */\nexport type WatcherEventIcpAxisVerdict = {\n __typename?: 'WatcherEventIcpAxisVerdict';\n /** Attribute the ICP constrains. One of: job_title, contact_divisions, industry, company_size, organization_divisions. */\n axis: Scalars['String']['output'];\n /**\n * What the ICP required of this attribute, as the filter the lead was checked\n * against: a list of `{ queries, distance }` entries for job_title and industry,\n * a range operator for company_size, id operators for the others. Null when the\n * Watcher's ICP no longer constrains the axis.\n */\n criterion?: Maybe<Scalars['JSON']['output']>;\n /** How the lead cleared this attribute. */\n verdict: WatcherIcpAxisVerdictEnum;\n};\n\n/** Autogenerated return type of WatcherEventQualified. */\nexport type WatcherEventQualifiedPayload = {\n __typename?: 'WatcherEventQualifiedPayload';\n /** The qualified lead, as `watcherEvents` returns it. */\n event: WatcherEvent;\n};\n\n/**\n * Which slice of a Watcher's event history to list. Anything other than KEPT is\n * operator data and takes a service-wide read scope: a refused event carries the\n * provider's own envelope rather than a lead.\n */\nexport type WatcherEventStateEnum =\n /** Both, newest first — what a support session reads to tell \"nothing arrived\" from \"everything was refused\". */\n | 'ALL'\n /** Events refused before materialization, carrying the reason they never became a lead. */\n | 'DISCARDED'\n /** Events that became leads. The default, and the only slice a customer-facing caller sees. */\n | 'KEPT';\n\n/**\n * Which slices of an event history to list (eq/in/notEq/notIn). Omitted, only KEPT\n * is listed. Any combination reaching DISCARDED is operator data and takes a\n * service-wide read scope.\n */\nexport type WatcherEventStateFilterInput = {\n /** Exact match. */\n eq?: InputMaybe<WatcherEventStateEnum>;\n /** Match any of these values. */\n in?: InputMaybe<Array<WatcherEventStateEnum>>;\n /** Exclude exact match. */\n notEq?: InputMaybe<WatcherEventStateEnum>;\n /** Exclude any of these values. */\n notIn?: InputMaybe<Array<WatcherEventStateEnum>>;\n};\n\n/**\n * Filter criteria for watchers. Each axis is index-backed: a support session\n * narrows by the thing it was given — a subject from a log line, a company from a\n * ticket, a slug from a definition — not by a phrase it half-remembers.\n */\nexport type WatcherFilterInput = {\n /**\n * Company the watcher belongs to, as the GlobalID hermes addresses one by — the\n * same form `Watcher.companyId` returns, so what is read back is what filters.\n */\n companyId?: InputMaybe<IdFilterInput>;\n /** Slug of the tracked Definition, e.g. 'radar-website'. */\n definitionSlug?: InputMaybe<StringFilterInput>;\n /** Version of the tracked Definition. Pair with definitionSlug to reach one published version. */\n definitionVersion?: InputMaybe<FloatFilterInput>;\n /** Whether the watcher is producing signals. */\n lifecycleState?: InputMaybe<WatcherLifecycleStateFilterInput>;\n /**\n * The subject that created the watcher — an Auth0 subject for a person,\n * `application:<uuid>` for a machine. It is what ownership is enforced on, so it\n * is also what correlates a watcher to a log line.\n */\n ownerSub?: InputMaybe<StringFilterInput>;\n};\n\n/**\n * The Ideal Customer Profile a Watcher filters its leads by, returned in the same\n * vocabulary Atlas search uses. This is what the caller submitted, not what each\n * source could enforce: criteria an individual source cannot express are dropped\n * for that source only, and that translation is not reflected here.\n */\nexport type WatcherIcp = {\n __typename?: 'WatcherIcp';\n /** Person-level criteria. */\n contact?: Maybe<WatcherContactIcp>;\n /** Company-level criteria. */\n organization?: Maybe<WatcherOrganizationIcp>;\n};\n\n/**\n * Whether the delivery-time ICP re-check judged an attribute on the lead's own\n * data, on its absence, or refused the lead on it.\n */\nexport type WatcherIcpAxisVerdictEnum =\n /**\n * This attribute is why the lead was discarded as an ICP mismatch. Only a\n * discarded lead carries it, and it may carry it on more than one attribute.\n */\n | 'REFUSED'\n /** The lead was admitted on this attribute only because no value is held for it, so the attribute says nothing about its fit. */\n | 'UNVERIFIED'\n /** The ICP's own criterion is what admitted the lead on this attribute. */\n | 'VERIFIED';\n\n/**\n * The subscriber's Ideal Customer Profile, expressed in the same vocabulary Atlas\n * search uses so a caller can pass the filters it already built for\n * `searchContacts`. Enforced twice: each Watcher provider translates what it can\n * into whatever its upstream source accepts, so out-of-ICP leads are never\n * streamed — and never billed — and every resolved contact is then re-checked\n * against the full ICP before delivery. Criteria an individual source cannot\n * express are therefore still applied, just later, so the ICP means the same thing\n * whichever provider backs the watcher.\n */\nexport type WatcherIcpInput = {\n /** Person-level criteria. */\n contact?: InputMaybe<WatcherContactIcpInput>;\n /** Company-level criteria. */\n organization?: InputMaybe<WatcherOrganizationIcpInput>;\n};\n\n/**\n * A freshness-first lead cap on a Watcher: at most `maximumLeads` events are\n * surfaced per `period`, counted from `startsAt` and reset at every period boundary.\n */\nexport type WatcherLeadCap = Node & {\n __typename?: 'WatcherLeadCap';\n /** Timestamp when the cap was created. */\n createdAt: Scalars['ISO8601DateTime']['output'];\n /** Start of the window currently accumulating; events are counted from here and the usage resets at the next boundary. */\n currentPeriodStartsAt: Scalars['ISO8601DateTime']['output'];\n /**\n * Number of leads already delivered — or qualified and on their way — in the\n * current window. Leads refused before delivery (duplicates, ICP mismatches,\n * undeliverable endpoints) are not counted. The cap drops further leads once\n * this reaches `maximumLeads`.\n */\n currentUsage: Scalars['Int']['output'];\n id: Scalars['ID']['output'];\n /** Maximum number of events surfaced per period. */\n maximumLeads: Scalars['Int']['output'];\n /** Length of the accumulation window as an ISO-8601 duration, e.g. P1D or P1W. */\n period: Scalars['ISO8601Duration']['output'];\n /** Anchor at which the first period begins; each window is measured forward from here. */\n startsAt: Scalars['ISO8601DateTime']['output'];\n};\n\n/** The connection type for WatcherLeadCap. */\nexport type WatcherLeadCapConnection = {\n __typename?: 'WatcherLeadCapConnection';\n /** A list of edges. */\n edges?: Maybe<Array<Maybe<WatcherLeadCapEdge>>>;\n /** A list of nodes. */\n nodes?: Maybe<Array<Maybe<WatcherLeadCap>>>;\n /** Information to aid in pagination. */\n pageInfo: PageInfo;\n /** Total number of items across all pages. */\n totalCount: Scalars['Int']['output'];\n};\n\n/** An edge in a connection. */\nexport type WatcherLeadCapEdge = {\n __typename?: 'WatcherLeadCapEdge';\n /** A cursor for use in pagination. */\n cursor: Scalars['String']['output'];\n /** The item at the end of the edge. */\n node?: Maybe<WatcherLeadCap>;\n};\n\n/**\n * A single freshness-first lead cap for a Watcher: at most `maximumLeads` events\n * are surfaced per `period`, counted from `startsAt` and reset at every period\n * boundary. Excess events are dropped, never buffered. Combine several caps to\n * constrain multiple periods at once — the most restrictive one wins.\n */\nexport type WatcherLeadCapInput = {\n /** Maximum number of events surfaced per period. Must be greater than zero. */\n maximumLeads: Scalars['Int']['input'];\n /** Length of the accumulation window as an ISO-8601 duration, e.g. P1D (one day) or P1W (one week). */\n period: Scalars['ISO8601Duration']['input'];\n /** Anchor at which the first period begins. Defaults to the moment the cap is created. */\n startsAt?: InputMaybe<Scalars['ISO8601DateTime']['input']>;\n};\n\n/**\n * Whether a Watcher is currently producing signals. Distinct from\n * provisioningStatus, which describes its upstream resources rather than whether\n * it runs: a fully provisioned Watcher whose webhooks were all paused delivers\n * nothing and still reports PROVISIONED.\n */\nexport type WatcherLifecycleStateEnum =\n /** Not canceled, and at least one webhook is active — or it has no webhook yet, which is the state right after creation. */\n | 'ACTIVE'\n /** Terminal: canceledAt is set, providers are deprovisioned upstream and no further event is ingested. */\n | 'CANCELED'\n /** Not canceled, but every registered webhook is paused, so nothing is delivered. Reversible with setWebhookActive. */\n | 'PAUSED';\n\n/**\n * Filter on a Watcher's lifecycle state (eq/in/notEq/notIn). PAUSED is the state\n * provisioningStatus cannot express — every webhook paused on an otherwise\n * provisioned watcher — and is the usual answer to \"it stopped working\".\n */\nexport type WatcherLifecycleStateFilterInput = {\n /** Exact match. */\n eq?: InputMaybe<WatcherLifecycleStateEnum>;\n /** Match any of these values. */\n in?: InputMaybe<Array<WatcherLifecycleStateEnum>>;\n /** Exclude exact match. */\n notEq?: InputMaybe<WatcherLifecycleStateEnum>;\n /** Exclude any of these values. */\n notIn?: InputMaybe<Array<WatcherLifecycleStateEnum>>;\n};\n\n/**\n * How many contacts one matched organization may yield, and the window that is\n * measured over. Left uncapped a source mints a contact per 10% of the\n * organization's headcount — every one billed, every one pitching the same account.\n */\nexport type WatcherMaximumLeadsPerOrganizationInput = {\n /** Maximum number of contacts one matched organization may yield. Must be greater than zero. Defaults to 2. */\n maximum?: InputMaybe<Scalars['Int']['input']>;\n /**\n * Window the maximum is measured over, as an ISO-8601 duration, e.g. P1D (one\n * day). Bounds how many contacts one organization may yield before the source is\n * reported as having ignored the cap — the source itself is only told the\n * maximum, since it accepts no window. Defaults to P1D.\n */\n period?: InputMaybe<Scalars['ISO8601Duration']['input']>;\n};\n\n/**\n * Company-level ICP criteria, as submitted. Mirrors `WatcherOrganizationIcpInput`,\n * which in turn mirrors the subset of Atlas's `OrganizationFilterInput` an\n * upstream lead source can enforce.\n */\nexport type WatcherOrganizationIcp = {\n __typename?: 'WatcherOrganizationIcp';\n /**\n * Employee-count range the organization had to fall in, as `[min, max]`.\n * Flattened from the submitted filter's `overlaps`, the only operator creation\n * accepts — `contains` and `contained_by` describe querying a stored range and\n * are rejected, so there is nothing else to report.\n */\n companySize?: Maybe<Scalars['Range']['output']>;\n /** Mercator locations the organization had to belong to. */\n divisionIds?: Maybe<WatcherDivisionFilter>;\n /** Industry embedding filters, same `match` handling as `WatcherContactIcp.jobTitle`. */\n industry?: Maybe<Array<EmbeddingFilter>>;\n};\n\n/**\n * Company-level ICP criteria, mirroring the subset of Atlas's\n * `OrganizationFilterInput` that an upstream lead source can enforce.\n */\nexport type WatcherOrganizationIcpInput = {\n /**\n * Employee-count range, e.g. `{ overlaps: [0, 100] }` for \"fewer than 100\n * employees\" or `{ overlaps: [1000] }` for \"1000+\". Mapped onto the headcount\n * buckets the upstream source accepts. `contains` / `contained_by` describe\n * querying a stored range and have no meaning at an external source, so they are rejected.\n */\n companySize?: InputMaybe<RangeFilterInput>;\n /** Mercator location division IDs the organization must belong to. Resolved to place names before being handed upstream. */\n divisionIds?: InputMaybe<IdFilterInput>;\n /**\n * Filter by organization global id — the lead's employer. Its chief use is\n * excluding the companies whose employees are not leads: the page a watcher\n * tracks, and the subscriber's own. `notEq`/`notIn` are resolved to the company\n * URLs or domains the upstream source excludes on, so those leads are never\n * streamed nor billed, and re-checked at delivery for the sources that carry no\n * exclusion key. `eq`/`in` have no upstream counterpart at all — no source\n * filters on an employer allowlist — so they narrow at delivery time only. Two\n * caveats: a lead whose employer we cannot resolve is refused rather than\n * admitted, as with every other company-level criterion; and only the positive\n * operators follow organization merges, so exclude by the ids Atlas holds today\n * rather than ones merged away.\n */\n id?: InputMaybe<IdFilterInput>;\n /**\n * Industry embedding filters. Each `query` is embedded as a single vector, so\n * keep one string to one semantic neighborhood — listing many sectors in it\n * dilutes the vector and forces a looser match, costing precision. To target\n * several sectors, list them in `queries`: each keeps its own vector, and the\n * entry matches a company in any of them. Entries combine with AND. Upstream\n * sources honour only the *direction* of `match` (`INCLUDED_*` include,\n * `EXCLUDED_*` exclude); the threshold behind it is enforced at delivery time.\n * Note that upstream sources OR every included industry together, so on their\n * side a `queries` list and separate entries are indistinguishable — the AND is\n * enforced at delivery time.\n */\n industry?: InputMaybe<Array<EmbeddingFilterInput>>;\n};\n\n/**\n * The identifier a provider's upstream service assigned to this Watcher. Internal\n * plumbing rather than customer-facing data: it is only actionable with that\n * provider's own API credentials, and it discloses which third party backs the\n * signal. Exposed for operational reconciliation and end-to-end testing.\n */\nexport type WatcherProviderReference = {\n __typename?: 'WatcherProviderReference';\n /** Identifier the upstream service uses for this Watcher — for Rodz, the provisioned Signal's id. */\n externalId: Scalars['String']['output'];\n /** Slug of the definition provider holding the reference, e.g. 'rodz'. */\n providerSlug: Scalars['String']['output'];\n};\n\n/**\n * Where one of a Watcher's providers stands: whether it was provisioned upstream,\n * when it last was, and when it next runs. Deliberately carries no external\n * identifier — that one is actionable with the provider's own credentials and\n * stays on providerReferences behind a wider scope.\n */\nexport type WatcherProviderState = {\n __typename?: 'WatcherProviderState';\n /** False once the row is deprovisioned. A deprovisioned provider ingests nothing, whatever its provisioning state says. */\n active: Scalars['Boolean']['output'];\n /** When the upstream resource was torn down. Null while it lives. */\n deprovisionedAt?: Maybe<Scalars['ISO8601DateTime']['output']>;\n /**\n * When this provider is next scheduled to pull. Null for a provider driven by\n * webhooks rather than a schedule, and for one already deprovisioned — so a null\n * here separates \"nothing scheduled\" from \"overdue\".\n */\n nextRunAt?: Maybe<Scalars['ISO8601DateTime']['output']>;\n /** Slug of the definition provider, e.g. 'rodz'. */\n providerSlug: Scalars['String']['output'];\n /**\n * When the upstream resource was created. Null when provisioning has not\n * succeeded, which is the usual reason a Watcher delivers nothing at all.\n */\n provisionedAt?: Maybe<Scalars['ISO8601DateTime']['output']>;\n /** What the last provisioning attempt failed with, as the provider reported it. Null when nothing failed. */\n provisioningError?: Maybe<Scalars['JSON']['output']>;\n /** Whether the upstream resource exists yet. */\n provisioningState: WatcherProvisioningStateEnum;\n};\n\n/** The connection type for WatcherProviderState. */\nexport type WatcherProviderStateConnection = {\n __typename?: 'WatcherProviderStateConnection';\n /** A list of edges. */\n edges?: Maybe<Array<Maybe<WatcherProviderStateEdge>>>;\n /** A list of nodes. */\n nodes?: Maybe<Array<Maybe<WatcherProviderState>>>;\n /** Information to aid in pagination. */\n pageInfo: PageInfo;\n /** Total number of items across all pages. */\n totalCount: Scalars['Int']['output'];\n};\n\n/** An edge in a connection. */\nexport type WatcherProviderStateEdge = {\n __typename?: 'WatcherProviderStateEdge';\n /** A cursor for use in pagination. */\n cursor: Scalars['String']['output'];\n /** The item at the end of the edge. */\n node?: Maybe<WatcherProviderState>;\n};\n\n/**\n * A provider's terminal provisioning failure on a Watcher. Gated behind\n * `signals/watcher:*` alongside providerReferences: the provider slug discloses\n * which third party backs the signal.\n */\nexport type WatcherProvisioningFailure = {\n __typename?: 'WatcherProvisioningFailure';\n /**\n * Structured, machine-readable failure data — an Inexpressible refusal's\n * attributes, or the provider / status / upstreamCode of an upstream rejection.\n * Never vendor prose.\n */\n details: Scalars['JSON']['output'];\n /** Slug of the definition provider that failed to provision, e.g. 'rodz'. */\n providerSlug: Scalars['String']['output'];\n /**\n * Symbolic failure code. `upstream_unavailable` (retries exhausted against an\n * outage), `upstream_rejected` (the provider refused the request), or an\n * Inexpressible refusal's own reason (e.g. `unresolvable_locations`).\n */\n reason: Scalars['String']['output'];\n};\n\n/**\n * What this service would send upstream for one (Definition, provider) pair,\n * rendered without provisioning anything. Internal plumbing rather than\n * customer-facing data, exposed so the checks that assert against a provider's\n * live API can run from outside this codebase — the e2e backend suite diffs\n * `sentConfigKeys` against the provider's published schemas and offers\n * `draftRequestBody` to the live API as a draft.\n */\nexport type WatcherProvisioningPreview = {\n __typename?: 'WatcherProvisioningPreview';\n /** Slug of the Definition this preview belongs to. */\n definitionSlug: Scalars['String']['output'];\n /** Version of the Definition this preview belongs to. */\n definitionVersion: Scalars['Int']['output'];\n /**\n * The complete request body this provider's provisioning builds, from a sample\n * input derived from the Definition's own `watcherInputSchema`. Carries `status:\n * \"draft\"` where the provider has one: leads are sourced only once a signal is\n * activated, which is what makes offering this body to a live API free. Null for\n * a provider whose provisioning is a sequence of API calls rather than one\n * declarative body, leaving nothing to render ahead of time. Carries the\n * translation of the query's `icp` argument when one is given, so a caller can\n * see what a given ICP constrains upstream without provisioning a billable signal.\n */\n draftRequestBody?: Maybe<Scalars['JSON']['output']>;\n /**\n * Upstream route this provider provisions against, e.g. 'fundraising' or\n * 'gmb-listing'. Null for a provider with no named per-signal route.\n */\n endpoint?: Maybe<Scalars['String']['output']>;\n /**\n * Whether this is the latest version of the Definition. Deprecated versions\n * share their provisioning with the successor, so a consumer diffing config keys\n * can skip them without losing coverage.\n */\n latest: Scalars['Boolean']['output'];\n /** Slug of the definition provider this preview is for, e.g. 'rodz'. */\n providerSlug: Scalars['String']['output'];\n /**\n * ICP paths this Definition cannot be created without — `createWatcher` refuses\n * a watcher missing any of them, because some endpoints cannot run unfiltered.\n * Values are the caller's to supply: `organization.division_ids` wants real\n * Mercator ids, which only the caller's environment can resolve. Empty when the\n * Definition can be created with no ICP at all.\n */\n requiredIcpPaths: Array<Scalars['String']['output']>;\n /**\n * The watcher input `draftRequestBody` was rendered from, derived from the\n * Definition's own `watcherInputSchema`. Exposed so a consumer driving the real\n * `createWatcher` path needs no second implementation of \"an input this\n * Definition accepts\".\n */\n sampleWatcherInput: Scalars['JSON']['output'];\n /**\n * Every upstream filter-config key this provider's provisioning can emit — the\n * declared set, not the subset this particular sample input rendered. A key the\n * provider no longer accepts is a filter that silently stopped applying, since\n * Rodz (for one) ignores unknown config keys rather than rejecting them. Empty\n * for a provider that sends no filter config upstream and filters locally instead.\n */\n sentConfigKeys: Array<Scalars['String']['output']>;\n};\n\n/**\n * Selection arguments for the provisioning previews query. Each field picks one\n * value rather than filtering a set: an ICP-scoped preview is refused unless\n * exactly one Definition is named.\n */\nexport type WatcherProvisioningPreviewSelectorInput = {\n /**\n * Only preview this Definition, e.g. 'fundraising'. Both versions of a\n * superseded slug are returned — filter on `latest` to keep the current one.\n * Omit for every Definition.\n */\n definitionSlug?: InputMaybe<Scalars['String']['input']>;\n /** Only preview this definition provider, e.g. 'rodz' or 'snitcher'. Omit for every provider. */\n providerSlug?: InputMaybe<Scalars['String']['input']>;\n};\n\n/** Autogenerated return type of WatcherProvisioningResult. */\nexport type WatcherProvisioningResultPayload = {\n __typename?: 'WatcherProvisioningResultPayload';\n /** Echo of the externalId this event is keyed by. */\n externalId: Scalars['ID']['output'];\n /** The watcher whose provisioning settled. Read `provisioningStatus` and `provisioningFailures` off it for the outcome. */\n watcher: Watcher;\n};\n\n/** Where one provider's provisioning stands. */\nexport type WatcherProvisioningStateEnum =\n /** The last attempt failed; provisioningError says why. */\n | 'FAILED'\n /** The upstream resource has not been created yet. */\n | 'PENDING'\n /** The upstream resource exists. */\n | 'PROVISIONED';\n\n/**\n * Aggregate provisioning state of a Watcher's providers. Only a Watcher created\n * with `createWatcher(async: true)` is ever PENDING — the default synchronous\n * creation provisions before it returns, so it is already settled.\n */\nexport type WatcherProvisioningStatusEnum =\n /** Terminal: no provider could be provisioned. The Watcher will deliver nothing. */\n | 'FAILED'\n /** Terminal: some providers provisioned, others failed. The Watcher runs on the ones that succeeded. */\n | 'PARTIALLY_FAILED'\n /**\n * At least one provider is still being provisioned upstream (retried across an\n * outage for about a day). Providers that already failed terminally are visible\n * on provisioningFailures meanwhile.\n */\n | 'PENDING'\n /**\n * Every provider's upstream resource is live. Also reported when there is\n * nothing to provision — a definition with no available provider, or a canceled\n * watcher whose rows are all deprovisioned.\n */\n | 'PROVISIONED';\n\n/**\n * A delivery endpoint registered on a Watcher, with how it has been answering.\n * This is the delivery side of the pipeline: a Watcher that ingests normally and\n * delivers nothing is diagnosed here, not on providerStates.\n */\nexport type WatcherWebhook = Node & {\n __typename?: 'WatcherWebhook';\n /** When the endpoint was registered. */\n createdAt: Scalars['ISO8601DateTime']['output'];\n /** Every attempt against this endpoint, oldest first, with how it has been answering carried on the connection itself. */\n deliveries: WatcherWebhookDeliveryHistoryConnection;\n /** Host of the URL, which is what a delivery-side outage is usually shared by. Null when the URL does not parse. */\n host?: Maybe<Scalars['String']['output']>;\n /** GlobalID of the endpoint, as the `id` filter of `webhooks` takes it. `/debug/webhooks/:id` takes the raw uuid it encodes. */\n id: Scalars['ID']['output'];\n /** When delivery stopped. Null while the endpoint is active. */\n pausedAt?: Maybe<Scalars['ISO8601DateTime']['output']>;\n /**\n * Why delivery stopped — set by PauseBrokenWebhook when an endpoint failed too\n * many times in a row, or by the caller through setWebhookActive.\n */\n pausedReason?: Maybe<Scalars['String']['output']>;\n /** Whether delivery is running. */\n state: WatcherWebhookStateEnum;\n /** The delivery URL. Secrets are never exposed. */\n url: Scalars['String']['output'];\n /**\n * The Watcher this endpoint delivers for. Selected from the root `webhooks`\n * connection, where a page spans many Watchers and an endpoint is unreadable\n * without the one it belongs to.\n */\n watcher: Watcher;\n};\n\n\n/**\n * A delivery endpoint registered on a Watcher, with how it has been answering.\n * This is the delivery side of the pipeline: a Watcher that ingests normally and\n * delivers nothing is diagnosed here, not on providerStates.\n */\nexport type WatcherWebhookDeliveriesArgs = {\n after?: InputMaybe<Scalars['String']['input']>;\n before?: InputMaybe<Scalars['String']['input']>;\n first?: InputMaybe<Scalars['Int']['input']>;\n last?: InputMaybe<Scalars['Int']['input']>;\n};\n\n/** The connection type for WatcherWebhook. */\nexport type WatcherWebhookConnection = {\n __typename?: 'WatcherWebhookConnection';\n /** A list of edges. */\n edges?: Maybe<Array<Maybe<WatcherWebhookEdge>>>;\n /** A list of nodes. */\n nodes?: Maybe<Array<Maybe<WatcherWebhook>>>;\n /** Information to aid in pagination. */\n pageInfo: PageInfo;\n /** Total number of items across all pages. */\n totalCount: Scalars['Int']['output'];\n};\n\n/**\n * One attempt to deliver an Event to one of its Watcher's webhooks.\n * DeliverWebhookJob retries, so a single Event can carry several attempts against\n * the same URL — the last one decides whether the lead arrived.\n */\nexport type WatcherWebhookDelivery = {\n __typename?: 'WatcherWebhookDelivery';\n /** When the attempt was made. */\n attemptedAt: Scalars['ISO8601DateTime']['output'];\n /** What the endpoint or the transport answered with, when the attempt failed. Null for one that succeeded. */\n error?: Maybe<Scalars['String']['output']>;\n /**\n * Global id of the Event this attempt delivered, the same id the webhook body\n * carries as `event_id`, so `node(id:)` resolves it as-is.\n */\n eventId: Scalars['ID']['output'];\n /**\n * Status the endpoint answered with. Null when the request never got an answer —\n * a timeout or a DNS failure, which is not the same as a 5xx.\n */\n httpStatus?: Maybe<Scalars['Int']['output']>;\n /**\n * The JSON body exactly as it was POSTed to the endpoint on this attempt. Null\n * for an attempt made before request bodies were recorded.\n */\n requestBody?: Maybe<Scalars['JSON']['output']>;\n /**\n * What the endpoint answered with, truncated to 2,000 characters. Null when it\n * answered nothing, when the request never got an answer, or for an attempt made\n * before responses were recorded.\n */\n responseBody?: Maybe<Scalars['String']['output']>;\n /** Whether the lead reached the endpoint on this attempt. */\n state: WatcherWebhookDeliveryStateEnum;\n /**\n * The webhook URL this attempt targeted. Secrets are never exposed. Null when\n * the endpoint has since been deleted — deliveries outlive it, being an audit trail.\n */\n url?: Maybe<Scalars['String']['output']>;\n /** Identifier of the webhook this attempt targeted. */\n webhookId: Scalars['ID']['output'];\n};\n\n/** The connection type for WatcherWebhookDelivery. */\nexport type WatcherWebhookDeliveryConnection = {\n __typename?: 'WatcherWebhookDeliveryConnection';\n /** A list of edges. */\n edges?: Maybe<Array<Maybe<WatcherWebhookDeliveryEdge>>>;\n /** A list of nodes. */\n nodes?: Maybe<Array<Maybe<WatcherWebhookDelivery>>>;\n /** Information to aid in pagination. */\n pageInfo: PageInfo;\n /** Total number of items across all pages. */\n totalCount: Scalars['Int']['output'];\n};\n\n/** An edge in a connection. */\nexport type WatcherWebhookDeliveryEdge = {\n __typename?: 'WatcherWebhookDeliveryEdge';\n /** A cursor for use in pagination. */\n cursor: Scalars['String']['output'];\n /** The item at the end of the edge. */\n node?: Maybe<WatcherWebhookDelivery>;\n};\n\n/** The connection type for WatcherWebhookDelivery. */\nexport type WatcherWebhookDeliveryHistoryConnection = {\n __typename?: 'WatcherWebhookDeliveryHistoryConnection';\n /**\n * Whether the consecutive-failure streak has reached the threshold at which\n * PauseBrokenWebhook stops delivering — the difference between \"failing\" and\n * \"about to go quiet\".\n */\n autoPauseThresholdMet: Scalars['Boolean']['output'];\n /** Failed attempts since the last success, or every failed attempt when none ever succeeded. */\n consecutiveFailures: Scalars['Int']['output'];\n /** A list of edges. */\n edges?: Maybe<Array<Maybe<WatcherWebhookDeliveryEdge>>>;\n /** When this webhook was first delivered to. Null when it never was. */\n firstAttemptAt?: Maybe<Scalars['ISO8601DateTime']['output']>;\n /** When it was last delivered to, successfully or not. */\n lastAttemptAt?: Maybe<Scalars['ISO8601DateTime']['output']>;\n /**\n * When a lead last arrived. A recent lastAttemptAt with an old lastSucceededAt\n * is an endpoint that is answering, but not with a 2xx.\n */\n lastSucceededAt?: Maybe<Scalars['ISO8601DateTime']['output']>;\n /** Distinct leads that reached the endpoint at least once. */\n leadsDelivered: Scalars['Int']['output'];\n /** Distinct leads whose every attempt failed. A lead that failed once and then succeeded on a retry is not counted here. */\n leadsFailed: Scalars['Int']['output'];\n /** A list of nodes. */\n nodes?: Maybe<Array<Maybe<WatcherWebhookDelivery>>>;\n /** Information to aid in pagination. */\n pageInfo: PageInfo;\n /** Every HTTP attempt ever made, retries included — the same figure as `totalCount`, named for what it counts. */\n totalAttempts: Scalars['Int']['output'];\n /** Total number of items across all pages. */\n totalCount: Scalars['Int']['output'];\n};\n\n/** How one delivery attempt ended. */\nexport type WatcherWebhookDeliveryStateEnum =\n /** The endpoint answered with a 2xx. */\n | 'DELIVERED'\n /** The endpoint answered with anything else, or never answered at all. */\n | 'FAILED';\n\n/** An edge in a connection. */\nexport type WatcherWebhookEdge = {\n __typename?: 'WatcherWebhookEdge';\n /** A cursor for use in pagination. */\n cursor: Scalars['String']['output'];\n /** The item at the end of the edge. */\n node?: Maybe<WatcherWebhook>;\n};\n\n/** Filter criteria for webhooks. */\nexport type WatcherWebhookFilterInput = {\n /**\n * Host of the delivery URL, anchored: `example.com` does not match\n * `hooks.example.com`. Computed from `url`, so it has no column of its own.\n */\n host?: InputMaybe<WatcherWebhookHostFilterInput>;\n /** Keep only these endpoints, as their GlobalIDs. */\n id?: InputMaybe<IdFilterInput>;\n /** Whether the endpoint is being delivered to. */\n state?: InputMaybe<WatcherWebhookStateFilterInput>;\n /** The delivery URL, exactly or by fragment. */\n url?: InputMaybe<WatcherWebhookUrlFilterInput>;\n /** Keep only the endpoints of this Watcher, as its GlobalID. */\n watcherId?: InputMaybe<IdFilterInput>;\n};\n\n/**\n * Filter on the host of a delivery URL, matched exactly and without its port. A\n * delivery-side outage is usually shared by host rather than by watcher, so this\n * is the axis that separates \"one customer's endpoint is down\" from \"ours stopped\n * sending\". Pass `hooks.example.com`, not a URL.\n */\nexport type WatcherWebhookHostFilterInput = {\n /** When true, match only rows where the column is NULL or empty. False or omitted applies no constraint. */\n blank?: InputMaybe<Scalars['Boolean']['input']>;\n /** Exact match. */\n eq?: InputMaybe<Scalars['String']['input']>;\n /** Match any of these values. Maximum 10000 entries. */\n in?: InputMaybe<Array<Scalars['String']['input']>>;\n /** Exclude exact match. */\n notEq?: InputMaybe<Scalars['String']['input']>;\n /** Exclude any of these values. Maximum 10000 entries. */\n notIn?: InputMaybe<Array<Scalars['String']['input']>>;\n /** When true, match only rows where the column is neither NULL nor empty. False or omitted applies no constraint. */\n presence?: InputMaybe<Scalars['Boolean']['input']>;\n};\n\n/** Delivery endpoint registered on a Watcher. Secrets are write-only — they are never returned by the API. */\nexport type WatcherWebhookInput = {\n /**\n * Whether this webhook should receive deliveries. Defaults to true; pass false\n * to register it without delivering events yet (e.g. for a paused or\n * credit-blocked routine), then activate it later via setWebhookActive.\n */\n active?: InputMaybe<Scalars['Boolean']['input']>;\n /** HMAC-SHA256 secret used to sign deliveries. Store this — it is not returned after creation. */\n secret: Scalars['String']['input'];\n /** URL that receives a POST payload when a signal fires. */\n url: Scalars['String']['input'];\n};\n\n/** Whether an endpoint is being delivered to. */\nexport type WatcherWebhookStateEnum =\n /** Delivery is running. */\n | 'ACTIVE'\n /**\n * Delivery stopped — either requested by the caller, or by PauseBrokenWebhook\n * after too many consecutive failures. Reversible with setWebhookActive.\n */\n | 'PAUSED';\n\n/**\n * Which delivery states to list (eq/in/notEq/notIn). Omitted, every endpoint is\n * listed. Delivery state is a `pausedAt` timestamp rather than a column of states,\n * so the operators resolve to the set of states they reach and then to the model's own scopes.\n */\nexport type WatcherWebhookStateFilterInput = {\n /** Exact match. */\n eq?: InputMaybe<WatcherWebhookStateEnum>;\n /** Match any of these values. */\n in?: InputMaybe<Array<WatcherWebhookStateEnum>>;\n /** Exclude exact match. */\n notEq?: InputMaybe<WatcherWebhookStateEnum>;\n /** Exclude any of these values. */\n notIn?: InputMaybe<Array<WatcherWebhookStateEnum>>;\n};\n\n/**\n * Filter on a delivery URL. `contains` is what a support request usually carries:\n * a webhook's uuid appears nowhere a human can reach, so what comes in is a piece\n * of the callback — a path segment, a routine action id, a host fragment — and\n * none of those is a whole URL.\n */\nexport type WatcherWebhookUrlFilterInput = {\n /** When true, match only rows where the column is NULL or empty. False or omitted applies no constraint. */\n blank?: InputMaybe<Scalars['Boolean']['input']>;\n /**\n * Case-insensitive substring of the URL, wildcard characters taken literally.\n * Not anchored: `sortlist.com` matches `max.sortlist.com`; use `host` for the\n * anchored question.\n */\n contains?: InputMaybe<Scalars['String']['input']>;\n /** Exact match. */\n eq?: InputMaybe<Scalars['String']['input']>;\n /** Match any of these values. Maximum 10000 entries. */\n in?: InputMaybe<Array<Scalars['String']['input']>>;\n /** Exclude exact match. */\n notEq?: InputMaybe<Scalars['String']['input']>;\n /** Exclude any of these values. Maximum 10000 entries. */\n notIn?: InputMaybe<Array<Scalars['String']['input']>>;\n /** When true, match only rows where the column is neither NULL nor empty. False or omitted applies no constraint. */\n presence?: InputMaybe<Scalars['Boolean']['input']>;\n};\n\nexport type Join__ContextArgument = {\n context: Scalars['String']['input'];\n name: Scalars['String']['input'];\n selection: Scalars['join__FieldValue']['input'];\n type: Scalars['String']['input'];\n};\n\nexport type Join__Graph =\n | 'ATLAS'\n | 'BILLING'\n | 'HERMES'\n | 'MERCATOR'\n | 'OUTREACH'\n | 'SIGNALS';\n\nexport type Link__Purpose =\n /** `EXECUTION` features provide metadata necessary for operation execution. */\n | 'EXECUTION'\n /** `SECURITY` features provide metadata necessary to securely resolve fields. */\n | 'SECURITY';\n\nexport type MeQueryVariables = Exact<{ [key: string]: never; }>;\n\n\nexport type MeQuery = { __typename?: 'Query', me?: { __typename?: 'User', id: string, email?: string | null, firstName?: string | null, lastName?: string | null } | null };\n\nexport type LogoutUrlQueryVariables = Exact<{ [key: string]: never; }>;\n\n\nexport type LogoutUrlQuery = { __typename?: 'Query', logoutUrl: string };\n\nexport type DeviceAuthorizeMutationVariables = Exact<{\n input: DeviceAuthorizeInput;\n}>;\n\n\nexport type DeviceAuthorizeMutation = { __typename?: 'Mutation', deviceAuthorize?: { __typename?: 'DeviceCodeResponse', deviceCode: string, expiresIn: number, interval: number, userCode: string, verificationUri: string, verificationUriComplete?: string | null } | null };\n\nexport type DeviceTokenMutationVariables = Exact<{\n input: DeviceTokenInput;\n}>;\n\n\nexport type DeviceTokenMutation = { __typename?: 'Mutation', deviceToken?: { __typename?: 'TokenResponse', accessToken?: string | null, error?: string | null, expiresIn?: number | null, idToken?: string | null, refreshToken?: string | null, tokenType?: string | null } | null };\n\nexport type RefreshTokenMutationVariables = Exact<{\n input: RefreshTokenInput;\n}>;\n\n\nexport type RefreshTokenMutation = { __typename?: 'Mutation', refreshToken?: { __typename?: 'TokenResponse', accessToken?: string | null, error?: string | null, expiresIn?: number | null, idToken?: string | null, refreshToken?: string | null, tokenType?: string | null } | null };\n\n\nexport const MeDocument = {\"kind\":\"Document\",\"definitions\":[{\"kind\":\"OperationDefinition\",\"operation\":\"query\",\"name\":{\"kind\":\"Name\",\"value\":\"Me\"},\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"me\"},\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"id\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"email\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"firstName\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"lastName\"}}]}}]}}]} as unknown as DocumentNode<MeQuery, MeQueryVariables>;\nexport const LogoutUrlDocument = {\"kind\":\"Document\",\"definitions\":[{\"kind\":\"OperationDefinition\",\"operation\":\"query\",\"name\":{\"kind\":\"Name\",\"value\":\"LogoutUrl\"},\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"logoutUrl\"}}]}}]} as unknown as DocumentNode<LogoutUrlQuery, LogoutUrlQueryVariables>;\nexport const DeviceAuthorizeDocument = {\"kind\":\"Document\",\"definitions\":[{\"kind\":\"OperationDefinition\",\"operation\":\"mutation\",\"name\":{\"kind\":\"Name\",\"value\":\"DeviceAuthorize\"},\"variableDefinitions\":[{\"kind\":\"VariableDefinition\",\"variable\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"input\"}},\"type\":{\"kind\":\"NonNullType\",\"type\":{\"kind\":\"NamedType\",\"name\":{\"kind\":\"Name\",\"value\":\"DeviceAuthorizeInput\"}}}}],\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"deviceAuthorize\"},\"arguments\":[{\"kind\":\"Argument\",\"name\":{\"kind\":\"Name\",\"value\":\"input\"},\"value\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"input\"}}}],\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"deviceCode\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"expiresIn\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"interval\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"userCode\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"verificationUri\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"verificationUriComplete\"}}]}}]}}]} as unknown as DocumentNode<DeviceAuthorizeMutation, DeviceAuthorizeMutationVariables>;\nexport const DeviceTokenDocument = {\"kind\":\"Document\",\"definitions\":[{\"kind\":\"OperationDefinition\",\"operation\":\"mutation\",\"name\":{\"kind\":\"Name\",\"value\":\"DeviceToken\"},\"variableDefinitions\":[{\"kind\":\"VariableDefinition\",\"variable\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"input\"}},\"type\":{\"kind\":\"NonNullType\",\"type\":{\"kind\":\"NamedType\",\"name\":{\"kind\":\"Name\",\"value\":\"DeviceTokenInput\"}}}}],\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"deviceToken\"},\"arguments\":[{\"kind\":\"Argument\",\"name\":{\"kind\":\"Name\",\"value\":\"input\"},\"value\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"input\"}}}],\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"accessToken\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"error\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"expiresIn\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"idToken\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"refreshToken\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"tokenType\"}}]}}]}}]} as unknown as DocumentNode<DeviceTokenMutation, DeviceTokenMutationVariables>;\nexport const RefreshTokenDocument = {\"kind\":\"Document\",\"definitions\":[{\"kind\":\"OperationDefinition\",\"operation\":\"mutation\",\"name\":{\"kind\":\"Name\",\"value\":\"RefreshToken\"},\"variableDefinitions\":[{\"kind\":\"VariableDefinition\",\"variable\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"input\"}},\"type\":{\"kind\":\"NonNullType\",\"type\":{\"kind\":\"NamedType\",\"name\":{\"kind\":\"Name\",\"value\":\"RefreshTokenInput\"}}}}],\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"refreshToken\"},\"arguments\":[{\"kind\":\"Argument\",\"name\":{\"kind\":\"Name\",\"value\":\"input\"},\"value\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"input\"}}}],\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"accessToken\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"error\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"expiresIn\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"idToken\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"refreshToken\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"tokenType\"}}]}}]}}]} as unknown as DocumentNode<RefreshTokenMutation, RefreshTokenMutationVariables>;","/* eslint-disable */\nimport * as types from './graphql.js';\nimport type { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core';\n\n/**\n * Map of all GraphQL operations in the project.\n *\n * This map has several performance disadvantages:\n * 1. It is not tree-shakeable, so it will include all operations in the project.\n * 2. It is not minifiable, so the string of a GraphQL query will be multiple times inside the bundle.\n * 3. It does not support dead code elimination, so it will add unused operations.\n *\n * Therefore it is highly recommended to use the babel or swc plugin for production.\n * Learn more about it here: https://the-guild.dev/graphql/codegen/plugins/presets/preset-client#reducing-bundle-size\n */\ntype Documents = {\n \"\\n query Me {\\n me {\\n id\\n email\\n firstName\\n lastName\\n }\\n }\\n\": typeof types.MeDocument,\n \"\\n query LogoutUrl {\\n logoutUrl\\n }\\n\": typeof types.LogoutUrlDocument,\n \"\\n mutation DeviceAuthorize($input: DeviceAuthorizeInput!) {\\n deviceAuthorize(input: $input) {\\n deviceCode\\n expiresIn\\n interval\\n userCode\\n verificationUri\\n verificationUriComplete\\n }\\n }\\n\": typeof types.DeviceAuthorizeDocument,\n \"\\n mutation DeviceToken($input: DeviceTokenInput!) {\\n deviceToken(input: $input) {\\n accessToken\\n error\\n expiresIn\\n idToken\\n refreshToken\\n tokenType\\n }\\n }\\n\": typeof types.DeviceTokenDocument,\n \"\\n mutation RefreshToken($input: RefreshTokenInput!) {\\n refreshToken(input: $input) {\\n accessToken\\n error\\n expiresIn\\n idToken\\n refreshToken\\n tokenType\\n }\\n }\\n\": typeof types.RefreshTokenDocument,\n};\nconst documents: Documents = {\n \"\\n query Me {\\n me {\\n id\\n email\\n firstName\\n lastName\\n }\\n }\\n\": types.MeDocument,\n \"\\n query LogoutUrl {\\n logoutUrl\\n }\\n\": types.LogoutUrlDocument,\n \"\\n mutation DeviceAuthorize($input: DeviceAuthorizeInput!) {\\n deviceAuthorize(input: $input) {\\n deviceCode\\n expiresIn\\n interval\\n userCode\\n verificationUri\\n verificationUriComplete\\n }\\n }\\n\": types.DeviceAuthorizeDocument,\n \"\\n mutation DeviceToken($input: DeviceTokenInput!) {\\n deviceToken(input: $input) {\\n accessToken\\n error\\n expiresIn\\n idToken\\n refreshToken\\n tokenType\\n }\\n }\\n\": types.DeviceTokenDocument,\n \"\\n mutation RefreshToken($input: RefreshTokenInput!) {\\n refreshToken(input: $input) {\\n accessToken\\n error\\n expiresIn\\n idToken\\n refreshToken\\n tokenType\\n }\\n }\\n\": types.RefreshTokenDocument,\n};\n\n/**\n * The gql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.\n *\n *\n * @example\n * ```ts\n * const query = gql(`query GetUser($id: ID!) { user(id: $id) { name } }`);\n * ```\n *\n * The query argument is unknown!\n * Please regenerate the types.\n */\nexport function gql(source: string): unknown;\n\n/**\n * The gql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.\n */\nexport function gql(source: \"\\n query Me {\\n me {\\n id\\n email\\n firstName\\n lastName\\n }\\n }\\n\"): (typeof documents)[\"\\n query Me {\\n me {\\n id\\n email\\n firstName\\n lastName\\n }\\n }\\n\"];\n/**\n * The gql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.\n */\nexport function gql(source: \"\\n query LogoutUrl {\\n logoutUrl\\n }\\n\"): (typeof documents)[\"\\n query LogoutUrl {\\n logoutUrl\\n }\\n\"];\n/**\n * The gql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.\n */\nexport function gql(source: \"\\n mutation DeviceAuthorize($input: DeviceAuthorizeInput!) {\\n deviceAuthorize(input: $input) {\\n deviceCode\\n expiresIn\\n interval\\n userCode\\n verificationUri\\n verificationUriComplete\\n }\\n }\\n\"): (typeof documents)[\"\\n mutation DeviceAuthorize($input: DeviceAuthorizeInput!) {\\n deviceAuthorize(input: $input) {\\n deviceCode\\n expiresIn\\n interval\\n userCode\\n verificationUri\\n verificationUriComplete\\n }\\n }\\n\"];\n/**\n * The gql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.\n */\nexport function gql(source: \"\\n mutation DeviceToken($input: DeviceTokenInput!) {\\n deviceToken(input: $input) {\\n accessToken\\n error\\n expiresIn\\n idToken\\n refreshToken\\n tokenType\\n }\\n }\\n\"): (typeof documents)[\"\\n mutation DeviceToken($input: DeviceTokenInput!) {\\n deviceToken(input: $input) {\\n accessToken\\n error\\n expiresIn\\n idToken\\n refreshToken\\n tokenType\\n }\\n }\\n\"];\n/**\n * The gql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.\n */\nexport function gql(source: \"\\n mutation RefreshToken($input: RefreshTokenInput!) {\\n refreshToken(input: $input) {\\n accessToken\\n error\\n expiresIn\\n idToken\\n refreshToken\\n tokenType\\n }\\n }\\n\"): (typeof documents)[\"\\n mutation RefreshToken($input: RefreshTokenInput!) {\\n refreshToken(input: $input) {\\n accessToken\\n error\\n expiresIn\\n idToken\\n refreshToken\\n tokenType\\n }\\n }\\n\"];\n\nexport function gql(source: string) {\n return (documents as any)[source] ?? {};\n}\n\nexport type DocumentType<TDocumentNode extends DocumentNode<any, any>> = TDocumentNode extends DocumentNode< infer TType, any> ? TType : never;","/**\n * The auth operations, kept by hand.\n *\n * Every other operation is derived from introspection at runtime; these four\n * cannot be, because a caller needs them *before* it holds a token to introspect\n * with. `npm run codegen` types them against the supergraph.\n */\nimport { gql } from '../generated/gql.ts';\n\n// ── Queries ──\n\nexport const LogoutUrl = gql(`\n query LogoutUrl {\n logoutUrl\n }\n`);\n\n// ── Mutations ──\n\nexport const DeviceAuthorize = gql(`\n mutation DeviceAuthorize($input: DeviceAuthorizeInput!) {\n deviceAuthorize(input: $input) {\n deviceCode\n expiresIn\n interval\n userCode\n verificationUri\n verificationUriComplete\n }\n }\n`);\n\nexport const DeviceToken = gql(`\n mutation DeviceToken($input: DeviceTokenInput!) {\n deviceToken(input: $input) {\n accessToken\n error\n expiresIn\n idToken\n refreshToken\n tokenType\n }\n }\n`);\n\nexport const RefreshToken = gql(`\n mutation RefreshToken($input: RefreshTokenInput!) {\n refreshToken(input: $input) {\n accessToken\n error\n expiresIn\n idToken\n refreshToken\n tokenType\n }\n }\n`);\n","/**\n * Runtime GraphQL query builder.\n * Dynamically constructs operations from an introspected schema\n * with user-controlled depth and field selection.\n */\nimport {\n isAbstractType,\n isEnumType,\n isListType,\n isNonNullType,\n isObjectType,\n isScalarType,\n type GraphQLAbstractType,\n type GraphQLField,\n type GraphQLNamedType,\n type GraphQLObjectType,\n type GraphQLOutputType,\n type GraphQLSchema,\n} from 'graphql';\n\nexport const CLI_OPERATION_PREFIX = 'SlCli_';\n\n// ── Helpers ──\n\nfunction unwrap(type: GraphQLOutputType): GraphQLNamedType {\n if (isNonNullType(type)) return unwrap(type.ofType);\n if (isListType(type)) return unwrap(type.ofType);\n return type as GraphQLNamedType;\n}\n\nfunction isLeaf(type: GraphQLNamedType): boolean {\n return isScalarType(type) || isEnumType(type);\n}\n\nfunction ucfirst(s: string): string {\n return s.charAt(0).toUpperCase() + s.slice(1);\n}\n\n// Payload types where `id` often fails at runtime\nconst PAYLOAD_TYPE_PATTERN = /(?:Response|Payload|MutationPayload)$/;\n// What a mutation payload carries besides its result: an id that often fails at runtime, and\n// Relay's echo of an input the CLI never sends.\nconst PAYLOAD_PLUMBING = new Set(['id', 'clientMutationId']);\n\n/**\n * A mutation payload is a wrapper around the result, not a level of it: at the default depth a\n * caller wants the account the mutation returns, not the wrapper's scalars. So the wrapper is\n * crossed for free, the way a connection's `nodes` is.\n */\nfunction effectiveDepth(returnType: GraphQLNamedType, depth: number): number {\n return isObjectType(returnType) && PAYLOAD_TYPE_PATTERN.test(returnType.name) ? depth + 1 : depth;\n}\n\n// ── Selection set builder ──\n\nexport interface QueryOptions {\n /** Max nesting depth for sub-objects (default: 0) */\n depth?: number;\n /** Only include these fields (dot-notation for nested, e.g. \"organization.name\") */\n fields?: string[];\n /** Exclude these fields (dot-notation for nested) */\n exclude?: string[];\n /** Select `totalCount` on connections (default: false) */\n totalCount?: boolean;\n}\n\nfunction buildSelections(\n type: GraphQLNamedType,\n schema: GraphQLSchema,\n depth: number,\n exclude: Set<string>,\n prefix: string,\n totalCount: boolean,\n visited: Set<string>,\n): string[] {\n if (!isObjectType(type)) return [];\n if (visited.has(type.name)) return [];\n visited.add(type.name);\n\n const fields = type.getFields();\n const lines: string[] = [];\n const isPayload = PAYLOAD_TYPE_PATTERN.test(type.name);\n\n // Relay Connection pattern. The connection/`nodes` wrapper is not a semantic\n // nesting level, so the node type inherits the caller's `depth` unchanged —\n // otherwise object fields on the node (e.g. Contact.organization) would never\n // be selected regardless of --depth.\n if (isConnection(type)) {\n const nodesType = unwrap(fields.nodes.type);\n const nodeSelections = buildSelections(\n nodesType,\n schema,\n depth,\n exclude,\n `${prefix}nodes.`,\n totalCount,\n new Set(visited),\n );\n return connectionSelections(type, nodeSelections, totalCount);\n }\n\n for (const [name, field] of Object.entries(fields)) {\n if (name.startsWith('__')) continue;\n if (isPayload && PAYLOAD_PLUMBING.has(name)) continue;\n\n const fullPath = `${prefix}${name}`;\n if (exclude.has(fullPath) || exclude.has(name)) continue;\n\n if (!isAutoSelectable(field)) continue;\n\n const namedType = unwrap(field.type);\n\n if (isLeaf(namedType)) {\n lines.push(name);\n } else if (isObjectType(namedType) && isConnection(namedType) && field.args.length === 0) {\n const pageSelections = buildSelections(\n namedType,\n schema,\n depth,\n exclude,\n `${fullPath}.`,\n totalCount,\n new Set(visited),\n );\n if (pageSelections.length > 0) {\n lines.push(`${name} {`);\n for (const sel of pageSelections) lines.push(` ${sel}`);\n lines.push(`}`);\n }\n } else if (isObjectType(namedType) && depth > 0) {\n const subSelections = buildSelections(\n namedType,\n schema,\n depth - 1,\n exclude,\n `${fullPath}.`,\n totalCount,\n new Set(visited),\n );\n if (subSelections.length > 0) {\n lines.push(`${fieldCall(name, field)} {`);\n for (const sel of subSelections) lines.push(` ${sel}`);\n lines.push(`}`);\n }\n } else if (isAbstractType(namedType) && depth > 0) {\n lines.push(`${name} {`);\n for (const sel of abstractSelections(\n namedType,\n schema,\n depth - 1,\n exclude,\n `${fullPath}.`,\n totalCount,\n visited,\n )) {\n lines.push(` ${sel}`);\n }\n lines.push(`}`);\n }\n }\n\n return lines;\n}\n\n/**\n * A union or interface is read through its members: `__typename` says which one\n * came back, and one inline fragment per possible type carries that type's fields,\n * so a payload's `authentication` renders as the hosted link or the accepted\n * credentials, whichever the subgraph answered.\n */\nfunction abstractSelections(\n type: GraphQLAbstractType,\n schema: GraphQLSchema,\n depth: number,\n exclude: Set<string>,\n prefix: string,\n totalCount: boolean,\n visited: Set<string>,\n): string[] {\n const lines = ['__typename'];\n for (const member of schema.getPossibleTypes(type)) {\n const memberSelections = buildSelections(member, schema, depth, exclude, prefix, totalCount, new Set(visited));\n if (memberSelections.length === 0) continue;\n lines.push(`... on ${member.name} {`);\n for (const sel of memberSelections) lines.push(` ${sel}`);\n lines.push(`}`);\n }\n return lines;\n}\n\n/** A nested connection left unbounded is costed at its max page size per parent row, which blows the complexity budget. */\nconst NESTED_PAGE_SIZE = 10;\n\nfunction fieldCall(name: string, field: GraphQLField<unknown, unknown>): string {\n const named = unwrap(field.type);\n const pageable = isObjectType(named) && isConnection(named) && field.args.some((a) => a.name === 'first');\n return pageable ? `${name}(first: ${NESTED_PAGE_SIZE})` : name;\n}\n\nfunction deliveredPageField(type: GraphQLObjectType): GraphQLField<unknown, unknown> | null {\n const pages = Object.values(type.getFields()).filter((field) => {\n const named = unwrap(field.type);\n return isObjectType(named) && isConnection(named) && field.args.length === 0;\n });\n return pages.length === 1 ? pages[0] : null;\n}\n\nfunction isConnection(type: GraphQLObjectType): boolean {\n const fields = type.getFields();\n return Boolean(fields.nodes) && Boolean(fields.pageInfo);\n}\n\nfunction isAutoSelectable(field: GraphQLField<unknown, unknown>): boolean {\n if (field.name.startsWith('__') || field.deprecationReason != null) return false;\n return !field.args.some((a) => isNonNullType(a.type) && a.defaultValue === undefined);\n}\n\nfunction selectableFields(type: GraphQLObjectType): GraphQLField<unknown, unknown>[] {\n return Object.values(type.getFields()).filter(isAutoSelectable);\n}\n\n/**\n * What the edge carries besides the node — a reveal report, a distance, a\n * filter match. Selected whenever present, one level deep: these are small\n * value objects that describe the row, and losing them for the sake of a\n * shorter query is losing the answer.\n */\nfunction edgeExtras(connection: GraphQLObjectType): { edge: GraphQLObjectType; lines: string[] } | null {\n const edgesField = connection.getFields().edges;\n if (!edgesField) return null;\n const edge = unwrap(edgesField.type);\n if (!isObjectType(edge)) return null;\n\n const lines: string[] = [];\n for (const field of selectableFields(edge)) {\n if (field.name === 'node' || field.name === 'cursor' || field.name === 'id') continue;\n const named = unwrap(field.type);\n if (isLeaf(named)) {\n lines.push(field.name);\n } else if (isObjectType(named)) {\n const leaves = selectableFields(named)\n .filter((sub) => isLeaf(unwrap(sub.type)))\n .map((sub) => sub.name);\n if (leaves.length > 0) lines.push(`${field.name} { ${leaves.join(' ')} }`);\n }\n }\n\n return lines.length === 0 ? null : { edge, lines };\n}\n\n/**\n * `nodes { … }` when the edge is a plain wrapper; `edges { node { … } … }` when\n * it carries more, so what the server says about each row comes along.\n */\nfunction connectionSelections(connection: GraphQLObjectType, nodeSelections: string[], totalCount: boolean): string[] {\n if (nodeSelections.length === 0) return [];\n const lines: string[] = [];\n const extras = edgeExtras(connection);\n\n if (extras) {\n lines.push('edges {');\n lines.push(' node {');\n for (const sel of nodeSelections) lines.push(` ${sel}`);\n lines.push(' }');\n for (const extra of extras.lines) lines.push(` ${extra}`);\n lines.push('}');\n } else {\n lines.push('nodes {');\n for (const sel of nodeSelections) lines.push(` ${sel}`);\n lines.push('}');\n }\n lines.push('pageInfo {');\n lines.push(' hasNextPage');\n lines.push(' endCursor');\n lines.push('}');\n if (totalCount && connection.getFields().totalCount) lines.push('totalCount');\n for (const extra of connectionExtras(connection)) lines.push(extra);\n return lines;\n}\n\nconst CONNECTION_PLUMBING = new Set(['edges', 'nodes', 'pageInfo', 'totalCount', 'approximateTotalCount']);\n\n/**\n * What a connection says about the page as a whole — the bill of a reveal, for\n * one — selected two levels deep so a summary with a per-item split comes along.\n */\nfunction connectionExtras(connection: GraphQLObjectType): string[] {\n return selectableFields(connection)\n .filter((field) => !CONNECTION_PLUMBING.has(field.name))\n .flatMap((field) => {\n const named = unwrap(field.type);\n if (isLeaf(named)) return [field.name];\n if (!isObjectType(named)) return [];\n const inner = selectableFields(named).flatMap((sub) => {\n const subType = unwrap(sub.type);\n if (isLeaf(subType)) return [sub.name];\n if (!isObjectType(subType)) return [];\n const leaves = selectableFields(subType).filter((leaf) => isLeaf(unwrap(leaf.type)));\n return leaves.length === 0 ? [] : [`${sub.name} { ${leaves.map((leaf) => leaf.name).join(' ')} }`];\n });\n return inner.length === 0 ? [] : [`${field.name} { ${inner.join(' ')} }`];\n });\n}\n\n/**\n * A misspelt field used to be dropped silently, so `--fields email` printed\n * every other column and left the caller wondering where the email went.\n */\nfunction fieldNamesOf(type: GraphQLNamedType): string[] {\n return isObjectType(type) ? Object.keys(type.getFields()) : [];\n}\n\nexport class UnknownFieldError extends Error {\n readonly field: string;\n readonly suggestions: string[];\n\n constructor(field: string, type: GraphQLNamedType, candidates: string[] = fieldNamesOf(type)) {\n const names = candidates.filter((name) => !name.startsWith('__'));\n const needle = field.toLowerCase();\n const suggestions = names.filter((name) => {\n const candidate = name.toLowerCase();\n return candidate.includes(needle) || needle.includes(candidate);\n });\n super(`${type.name} has no field \"${field}\".`);\n this.name = 'UnknownFieldError';\n this.field = field;\n this.suggestions = suggestions.length > 0 ? suggestions : names;\n }\n}\n\n// ── Public API ──\n\nexport interface BuiltQuery {\n query: string;\n variables: Record<string, unknown>;\n /** The root field name (e.g. \"agency\", \"createChat\") */\n fieldName: string;\n}\n\n/**\n * Build a GraphQL query/mutation string for a root operation field.\n *\n * @param schema - The introspected GraphQL schema\n * @param kind - \"query\" or \"mutation\"\n * @param fieldName - The root field name (e.g. \"agency\", \"createChat\")\n * @param variables - Variable values to send\n * @param options - Depth, field inclusion/exclusion\n */\nexport type OperationKind = 'query' | 'mutation' | 'subscription';\n\nexport function rootTypeOf(schema: GraphQLSchema, kind: OperationKind): GraphQLObjectType | null | undefined {\n if (kind === 'query') return schema.getQueryType();\n if (kind === 'mutation') return schema.getMutationType();\n return schema.getSubscriptionType();\n}\n\nexport function buildQuery(\n schema: GraphQLSchema,\n kind: OperationKind,\n fieldName: string,\n variables: Record<string, unknown>,\n options: QueryOptions = {},\n): BuiltQuery {\n const rootType = rootTypeOf(schema, kind);\n if (!rootType) throw new Error(`No ${kind} type in schema`);\n\n const field = rootType.getFields()[fieldName];\n if (!field) throw new Error(`Unknown ${kind} field: ${fieldName}`);\n\n const returnType = unwrap(field.type);\n const depth = effectiveDepth(returnType, options.depth ?? 0);\n const exclude = new Set(options.exclude ?? []);\n const wantsTotalCount = options.totalCount === true;\n\n // Build variable definitions from the field's arguments\n const allArgs = field.args;\n\n const varDefsInner = allArgs.map((a) => `$${a.name}: ${a.type.toString()}`).join(', ');\n const fieldArgsInner = allArgs.map((a) => `${a.name}: $${a.name}`).join(', ');\n const varDefs = allArgs.length > 0 ? `(${varDefsInner})` : '';\n const fieldArgs = allArgs.length > 0 ? `(${fieldArgsInner})` : '';\n\n // Build selection set\n let selectionBody: string;\n if (isLeaf(returnType)) {\n selectionBody = ` ${fieldName}${fieldArgs}`;\n } else if (isAbstractType(returnType)) {\n const indent = ' ';\n const body = abstractSelections(returnType, schema, depth, exclude, '', wantsTotalCount, new Set())\n .map((s) => `${indent}${s}`)\n .join('\\n');\n selectionBody = ` ${fieldName}${fieldArgs} {\\n${body}\\n }`;\n } else {\n // Filter fields if --fields is provided\n let selections: string[];\n if (options.fields && options.fields.length > 0) {\n selections = buildFieldsFromList(returnType, schema, options.fields, wantsTotalCount);\n } else {\n selections = buildSelections(returnType, schema, depth, exclude, '', wantsTotalCount, new Set());\n }\n\n if (selections.length === 0) {\n // Fallback: at minimum select __typename\n selectionBody = ` ${fieldName}${fieldArgs} {\\n __typename\\n }`;\n } else {\n const indent = ' ';\n const body = selections.map((s) => `${indent}${s}`).join('\\n');\n selectionBody = ` ${fieldName}${fieldArgs} {\\n${body}\\n }`;\n }\n }\n\n const opName = `${CLI_OPERATION_PREFIX}${ucfirst(fieldName)}`;\n const query = `${kind} ${opName}${varDefs} {\\n${selectionBody}\\n }`;\n\n return { query, variables, fieldName };\n}\n\n/**\n * Build selections from an explicit field list (e.g. --fields id,name,slug).\n */\nfunction buildFieldsFromList(\n type: GraphQLNamedType,\n schema: GraphQLSchema,\n requestedPaths: string[],\n totalCount: boolean,\n): string[] {\n if (!isObjectType(type)) return [];\n const fields = type.getFields();\n const page = deliveredPageField(type);\n const fieldPaths = page\n ? requestedPaths.map((path) => (fields[path.split('.')[0]] ? path : `${page.name}.${path}`))\n : requestedPaths;\n\n // Relay Connection pattern — unwrap to the node type. The id always comes\n // along: it is what a row is titled by and what the next command is pasted.\n if (isConnection(type)) {\n const nodesType = unwrap(fields.nodes.type);\n const withId = isObjectType(nodesType) && nodesType.getFields().id && !fieldPaths.includes('id');\n const nodeSelections = buildFieldsFromList(\n nodesType,\n schema,\n withId ? ['id', ...fieldPaths] : fieldPaths,\n totalCount,\n );\n return connectionSelections(type, nodeSelections, totalCount);\n }\n\n const lines: string[] = [];\n\n // Group by top-level field\n const grouped = new Map<string, string[]>();\n for (const fp of fieldPaths) {\n const [top, ...rest] = fp.split('.');\n if (!grouped.has(top)) grouped.set(top, []);\n if (rest.length > 0) grouped.get(top)!.push(rest.join('.'));\n }\n\n for (const [name, subPaths] of grouped) {\n const field = fields[name];\n if (!field) throw new UnknownFieldError(name, type);\n\n const namedType = unwrap(field.type);\n if (isLeaf(namedType)) {\n lines.push(name);\n } else if (isObjectType(namedType) && subPaths.length > 0) {\n const subSelections = buildFieldsFromList(namedType, schema, subPaths, totalCount);\n if (subSelections.length > 0) {\n lines.push(`${fieldCall(name, field)} {`);\n for (const sel of subSelections) lines.push(` ${sel}`);\n lines.push(`}`);\n }\n } else if (isAbstractType(namedType)) {\n lines.push(`${name} {`);\n for (const sel of abstractFieldsFromList(namedType, schema, subPaths, totalCount)) lines.push(` ${sel}`);\n lines.push(`}`);\n }\n }\n\n return lines;\n}\n\n/**\n * `--fields authentication.url` names a field of one member; each member takes\n * the paths it knows, and a path no member knows is refused against the union\n * itself. Without sub-paths, every member's leaf fields are selected.\n */\nfunction abstractFieldsFromList(\n type: GraphQLAbstractType,\n schema: GraphQLSchema,\n subPaths: string[],\n totalCount: boolean,\n): string[] {\n const members = schema.getPossibleTypes(type);\n if (subPaths.length === 0) {\n return abstractSelections(type, schema, 0, new Set(), '', totalCount, new Set());\n }\n\n const lines = ['__typename'];\n const claimed = new Set<string>();\n for (const member of members) {\n const known = subPaths.filter((fp) => Boolean(member.getFields()[fp.split('.')[0]]));\n if (known.length === 0) continue;\n for (const fp of known) claimed.add(fp);\n lines.push(`... on ${member.name} {`);\n for (const sel of buildFieldsFromList(member, schema, known, totalCount)) lines.push(` ${sel}`);\n lines.push(`}`);\n }\n const unknown = subPaths.find((fp) => !claimed.has(fp));\n if (unknown !== undefined) {\n throw new UnknownFieldError(unknown.split('.')[0], type, members.flatMap(fieldNamesOf));\n }\n\n return lines;\n}\n","/**\n * Human-readable rendering for operation results.\n *\n * Records are printed as aligned key/value blocks rather than a table: a Relay\n * global id runs to sixty characters, so any table wide enough to hold one is\n * unreadable and any table that fits has truncated the one value the caller\n * needs to paste into the next command. `--json` remains the machine path.\n */\nconst INDENT = ' ';\n\ninterface Connection {\n nodes: unknown[];\n totalCount?: number;\n pageInfo?: { hasNextPage?: boolean; endCursor?: string | null };\n}\n\nconst CONNECTION_PLUMBING = new Set([\n 'edges',\n 'nodes',\n 'pageInfo',\n 'totalCount',\n 'approximateTotalCount',\n '__typename',\n]);\n\nfunction isRecord(value: unknown): value is Record<string, unknown> {\n return typeof value === 'object' && value !== null && !Array.isArray(value);\n}\n\n/**\n * The edge's own fields — a reveal report, a distance — are folded into the\n * node they describe, after its fields, so a row reads as one block.\n */\nfunction rowOf(edge: unknown): unknown {\n if (!isRecord(edge) || !isRecord(edge.node)) return isRecord(edge) ? edge.node : edge;\n const { node, cursor: _cursor, __typename: _typename, ...extras } = edge;\n const said = Object.entries(extras).filter(\n ([, value]) => value != null && !(Array.isArray(value) && value.length === 0),\n );\n return { ...node, ...Object.fromEntries(said) };\n}\n\nfunction asConnection(value: unknown): Connection | null {\n if (!isRecord(value)) return null;\n if (Array.isArray(value.nodes)) return value as unknown as Connection;\n if (Array.isArray(value.edges)) return { ...value, nodes: value.edges.map(rowOf) } as unknown as Connection;\n\n return null;\n}\n\n/** An ISO timestamp keeps its time of day, down to the second; a bare date stays a date. */\nfunction formatScalar(value: unknown): string {\n if (value === null || value === undefined) return '—';\n if (typeof value === 'boolean') return value ? 'yes' : 'no';\n if (typeof value === 'string' && /^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}/.test(value)) {\n return value.slice(0, 19).replace('T', ' ');\n }\n\n return String(value);\n}\n\nfunction isFlatRecord(value: unknown): value is Record<string, unknown> {\n return isRecord(value) && Object.values(value).every((v) => !isRecord(v) && !Array.isArray(v));\n}\n\n/**\n * A list of small flat records — one status per dimension, one match per\n * filter — is laid out as aligned sub-rows under its key, values side by side.\n * The keys are dropped: they repeat on every row and the columns say enough.\n */\nconst isDeadline = (key: string) => /Until$/.test(key);\n\n/**\n * `ownedUntil: 2026-12-11T23:59:59Z` reads as `until 2026-12-11 23:59:59`: the\n * key names the relation, so it is folded into the value where the column has\n * no header.\n */\nfunction formatDeadline(value: unknown): string {\n return typeof value === 'string' && value !== '' ? `until ${formatScalar(value)}` : '—';\n}\n\nfunction formatFlatRows(rows: Record<string, unknown>[], indent: string): string {\n const keys = Object.keys(rows[0]).filter((key) => key !== '__typename');\n const ordered = [...keys.filter((key) => !isDeadline(key)), ...keys.filter(isDeadline)];\n const cells = rows.map((row) =>\n ordered.map((key) => (isDeadline(key) ? formatDeadline(row[key]) : formatScalar(row[key]))),\n );\n const widths = ordered.map((_, column) => Math.max(...cells.map((row) => (row[column] ?? '').length)));\n\n return cells\n .map((row) =>\n row.map((cell, column) => (column === row.length - 1 ? cell : cell.padEnd(widths[column]))).join(' '),\n )\n .join(`\\n${indent}`);\n}\n\n/**\n * A nested collection is summarised rather than expanded: expanding it inline\n * loses the alignment that makes the block readable, and the count is what a\n * caller scanning a list actually wants.\n */\nfunction summarise(key: string, value: unknown): string | null {\n const connection = asConnection(value);\n if (connection) {\n const count = connection.totalCount ?? connection.nodes.length;\n return `${count} ${count === 1 ? 'entry' : 'entries'}`;\n }\n if (Array.isArray(value)) return value.length === 0 ? 'none' : `${value.length} items`;\n if (isRecord(value)) {\n const label = value.name ?? value.sub ?? value.id;\n return label === undefined ? null : formatScalar(label);\n }\n\n return null;\n}\n\n/**\n * A nested record with nothing to name it by — a payload's `authentication`,\n * an identity — is what the caller came for, so it opens as an indented block\n * under its key rather than hiding behind an ellipsis.\n */\nfunction isUnlabelledRecord(value: unknown): value is Record<string, unknown> {\n return isRecord(value) && value.name === undefined && value.sub === undefined && value.id === undefined;\n}\n\n/**\n * A row in a list is titled by its id: the one value every row has, whatever\n * the caller may see of it, and the one the next command is pasted. The id\n * line is then not repeated below.\n */\nfunction titleOf(record: Record<string, unknown>): string | null {\n return typeof record.id === 'string' && record.id !== '' ? record.id : null;\n}\n\nfunction formatRecord(record: Record<string, unknown>, indent: string, titled = false): string {\n const title = titled ? titleOf(record) : null;\n const isFlatRows = (value: unknown) => Array.isArray(value) && value.length > 0 && value.every(isFlatRecord);\n const entries = Object.entries(record)\n .filter(([key]) => key !== '__typename' && (title === null || key !== 'id'))\n .sort(([, a], [, b]) => Number(Array.isArray(a)) - Number(Array.isArray(b)));\n const width = Math.max(0, ...entries.map(([key]) => key.length));\n const valueIndent = `${indent}${''.padEnd(width)} `;\n\n const body = entries\n .map(([key, value]) => {\n if (isUnlabelledRecord(value) && !asConnection(value)) {\n const nestedIndent = indent + INDENT;\n return `${indent}${key}\\n${formatRecord(value, nestedIndent)}`;\n }\n const rendered = isFlatRows(value)\n ? formatFlatRows(value as Record<string, unknown>[], valueIndent)\n : (summarise(key, value) ?? formatScalar(value));\n return `${indent}${key.padEnd(width)} ${rendered}`;\n })\n .join('\\n');\n\n return title === null ? body : `${indent.slice(INDENT.length)}${title}\\n${body}`;\n}\n\nfunction formatFooter(connection: Connection): string | null {\n const shown = connection.nodes.length;\n const total = connection.totalCount;\n const more = connection.pageInfo?.hasNextPage === true;\n\n if (total === undefined && !more) return null;\n if (total !== undefined && total === shown && !more) return null;\n\n const counted = total === undefined ? `${shown}` : `${shown} of ${total}`;\n return more ? `${counted} — more available, pass --after ${connection.pageInfo?.endCursor}` : counted;\n}\n\n/**\n * What a connection says about the page as a whole — a reveal's bill — printed\n * after the list, each summary as its own titled block.\n */\nfunction formatConnectionExtras(connection: Record<string, unknown>): string[] {\n return Object.entries(connection)\n .filter(([key, value]) => !CONNECTION_PLUMBING.has(key) && value != null)\n .map(([key, value]) =>\n isRecord(value) ? `${key}\\n${formatRecord(value, INDENT)}` : `${key} ${formatScalar(value)}`,\n );\n}\n\n/** Renders one operation result. Returns null when there is nothing to show. */\nexport function formatResult(result: unknown): string | null {\n const connection = asConnection(result);\n if (connection) {\n if (connection.nodes.length === 0) return 'No results.';\n\n const blocks = connection.nodes.map((node) =>\n isRecord(node) ? formatRecord(node, INDENT, true) : `${INDENT}${formatScalar(node)}`,\n );\n const tail = [formatFooter(connection), ...formatConnectionExtras(result as Record<string, unknown>)].filter(\n (part): part is string => part !== null,\n );\n\n return [blocks.join('\\n\\n'), ...tail].join('\\n\\n');\n }\n\n if (Array.isArray(result)) {\n if (result.length === 0) return 'No results.';\n\n return result.map((item) => (isRecord(item) ? formatRecord(item, INDENT, true) : formatScalar(item))).join('\\n\\n');\n }\n\n if (isRecord(result)) return formatRecord(result, '');\n\n return result === null || result === undefined ? null : formatScalar(result);\n}\n","import { Command, Option } from 'commander';\n\nimport { graphql, graphqlUnauthenticated } from '../graphql/client.ts';\nimport { Me } from '../graphql/operations/common.ts';\nimport { DeviceAuthorize, DeviceToken } from '../graphql/operations/hermes.ts';\nimport {\n clearElevatedCredentials,\n ELEVATION_MAX_SECONDS,\n loadCredentials,\n saveCredentials,\n saveElevatedCredentials,\n type ElevationLevel,\n} from '../lib/auth.ts';\nimport { openBrowser } from '../lib/browser.ts';\nimport { error, hint, info, success, warn } from '../lib/output.ts';\nimport { servicesWithoutScope } from '../lib/token-claims.ts';\n\n// TODO: fetch the set of available API scopes dynamically (e.g. from Hermes'\n// resource server) once the backend exposes them. Auth0 RBAC grants the\n// intersection of requested scopes and the user's assigned permissions by EXACT\n// string match — wildcards are not expanded, and unmatched scopes are dropped\n// silently. The list below must therefore contain every permission name the\n// terraform-auth0 roles can hold (superadmin `*:*`, admin `*:read`, sales\n// granular grants), not just the broadest wildcard per service.\nconst SERVICES = ['atlas', 'core', 'signals', 'billing', 'outreach', 'hermes'];\nconst ADMIN_API_SCOPES = SERVICES.map((service) => `${service}/*:read`);\n\nexport const USER_API_SCOPES = [\n 'atlas/organization:read',\n 'atlas/reveal:read',\n 'outreach/channel_account:read',\n 'outreach/channel_account:write',\n 'signals/watcher:read',\n 'signals/watcher:write',\n];\n\nexport const ELEVATION_API_SCOPES = {\n sales: ['atlas/*:read', 'billing/offer:*'],\n admin: ADMIN_API_SCOPES,\n superadmin: [...ADMIN_API_SCOPES, ...SERVICES.map((service) => `${service}/*:*`)],\n} satisfies Record<ElevationLevel, string[]>;\n\nconst DEFAULT_ELEVATION: ElevationLevel = 'admin';\nconst DEFAULT_SCOPE = `openid profile email offline_access ${USER_API_SCOPES.join(' ')}`;\n\nexport function scopeForLogin(scope: string, scopeIsDefault: boolean, level: ElevationLevel | undefined): string {\n if (!level) return scope;\n\n const requested = scopeIsDefault\n ? `openid profile email ${[...USER_API_SCOPES, ...ELEVATION_API_SCOPES[level]].join(' ')}`\n : scope;\n\n return requested\n .split(' ')\n .filter((name) => name && name !== 'offline_access')\n .join(' ');\n}\n\nfunction sleep(ms: number): Promise<void> {\n return new Promise((resolve) => setTimeout(resolve, ms));\n}\n\nasync function setupUserContext(endpoint?: string): Promise<void> {\n const userData = await graphql(Me, undefined, { endpoint });\n const user = userData.me;\n if (!user) return;\n\n info('');\n info(` User: ${user.firstName} ${user.lastName} <${user.email}>`);\n hint('Run `sl whoami` to verify.');\n}\n\n/**\n * Says so when the identity provider granted nothing for a service.\n *\n * Without this the loss is invisible: login reports success, and the operator\n * meets it much later as `unknown command 'organizations'`, because the CLI\n * builds its commands from the schema the router filters by the token's scopes.\n */\nfunction reportScopeGrant(requestedScope: string, accessToken: string): void {\n const missing = servicesWithoutScope(requestedScope, accessToken);\n if (missing.length === 0) return;\n\n warn(`No scope granted for: ${missing.join(', ')}.`);\n info(' Their commands will not appear in `sl --help`, and their fields are');\n info(' filtered out of the schema this CLI builds itself from.');\n hint('Auth0 grants requested scopes by exact string match against your assigned');\n hint('permissions and drops the rest silently — this is a role assignment in the');\n hint('tenant you logged into, not a CLI setting. Ask an administrator, then re-run `sl login`.');\n}\n\nexport const loginCommand = new Command('login')\n .summary('Log in to your Sortlist account')\n .description(\n 'Log in to your Sortlist account\\n\\n' +\n 'Opens a browser to complete authentication, then saves your\\n' +\n \"credentials locally. If you belong to multiple companies, you'll\\n\" +\n 'be prompted to pick one.\\n\\n' +\n 'Examples:\\n' +\n ' sl login Log in with the user scopes, no staff scope\\n' +\n ' sl login --no-browser Print the login URL instead of opening it\\n' +\n ' sl login --elevate=sales Sales scopes, for a limited time\\n' +\n ' sl login --elevate Admin (read) scopes, for a limited time\\n' +\n ' sl login --elevate=superadmin Superadmin (write) scopes, for a limited time\\n\\n' +\n `An elevated token lasts at most ${ELEVATION_MAX_SECONDS / 60} minutes, is never refreshed, and sits\\n` +\n 'beside your session: once it expires, or after `sl logout --elevated`,\\n' +\n 'commands fall back to the plain login.',\n )\n .option('--scope <scope>', 'OAuth scope', DEFAULT_SCOPE)\n .option('--no-browser', 'Print the login URL instead of opening a browser')\n .addOption(\n new Option('--elevate [level]', 'Get a short-lived token with staff scopes')\n .choices(Object.keys(ELEVATION_API_SCOPES))\n .preset(DEFAULT_ELEVATION),\n )\n .action(async function (this: Command) {\n const opts = this.optsWithGlobals();\n const level: ElevationLevel | undefined = opts.elevate;\n const scope = scopeForLogin(opts.scope, this.getOptionValueSource('scope') === 'default', level);\n\n info(level ? `Starting device authorization for ${level} elevation...` : 'Starting device authorization...');\n\n const authData = await graphqlUnauthenticated(DeviceAuthorize, { input: { scope } }, opts.endpoint);\n\n const device = authData.deviceAuthorize;\n if (!device) {\n error('Device authorization failed — the server returned an empty response.');\n hint('Check your network connection and try again.');\n hint('If the problem persists, verify the endpoint: sl config show');\n process.exit(2);\n }\n\n const url = device.verificationUriComplete ?? device.verificationUri;\n info('');\n info(` Open this URL in your browser:`);\n info(` ${url}`);\n info('');\n info(` Enter code: ${device.userCode}`);\n info('');\n\n if (opts.browser) {\n openBrowser(url);\n info(' (Browser opened automatically)');\n info('');\n }\n\n info('Waiting for you to complete login in the browser...');\n\n let interval = device.interval * 1000;\n const deadline = Date.now() + device.expiresIn * 1000;\n\n while (Date.now() < deadline) {\n await sleep(interval);\n\n const tokenData = await graphqlUnauthenticated(\n DeviceToken,\n { input: { deviceCode: device.deviceCode } },\n opts.endpoint,\n );\n\n const token = tokenData.deviceToken;\n if (!token) {\n error('Token exchange failed — the server returned an empty response.');\n hint('Try running `sl login` again.');\n process.exit(2);\n }\n\n if (token.error === 'authorization_pending') {\n continue;\n }\n\n if (token.error === 'slow_down') {\n interval += 5000;\n continue;\n }\n\n if (token.error === 'expired_token') {\n error('The login code expired before you completed authentication.');\n hint('Run `sl login` to generate a new code.');\n process.exit(2);\n }\n\n if (token.error === 'access_denied') {\n error('Access was denied during authentication.');\n hint('Make sure you approved the request in the browser.');\n hint('If you denied it by mistake, run `sl login` to try again.');\n process.exit(2);\n }\n\n if (token.error) {\n error(`Authentication failed (${token.error}).`);\n hint('Run `sl login` to try again.');\n process.exit(2);\n }\n\n if (level && token.accessToken && token.expiresIn) {\n const elevated = saveElevatedCredentials(token.accessToken, token.expiresIn, level);\n\n success(`Elevated to ${level} until ${new Date(elevated.expiresAt * 1000).toLocaleTimeString()}.`);\n reportScopeGrant(scope, token.accessToken);\n if (!loadCredentials()) hint('You have no regular session: once this expires, run `sl login`.');\n hint('Run `sl logout --elevated` to drop it sooner.');\n return;\n }\n\n if (token.accessToken && token.refreshToken && token.idToken && token.expiresIn) {\n saveCredentials({\n accessToken: token.accessToken,\n refreshToken: token.refreshToken,\n idToken: token.idToken,\n expiresAt: Math.floor(Date.now() / 1000) + token.expiresIn,\n });\n clearElevatedCredentials();\n\n success('Logged in successfully.');\n reportScopeGrant(scope, token.accessToken);\n await setupUserContext(opts.endpoint);\n return;\n }\n }\n\n error('Authentication timed out — no response from the browser.');\n hint('Run `sl login` to start a new session.');\n process.exit(2);\n });\n","/**\n * Hand-maintained typed operations used by non-generated commands.\n * These need gql() for TypedDocumentNode inference.\n */\nimport { gql } from '../generated/gql.ts';\n\nexport const Me = gql(`\n query Me {\n me {\n id\n email\n firstName\n lastName\n }\n }\n`);\n","import { execFile } from 'node:child_process';\n\nexport function openBrowser(url: string): void {\n if (process.platform === 'win32') {\n // `start` is a cmd built-in; the empty string is the window title slot.\n execFile('cmd', ['/c', 'start', '', url], () => {});\n return;\n }\n const cmd = process.platform === 'darwin' ? 'open' : 'xdg-open';\n execFile(cmd, [url], () => {});\n}\n","import { Command } from 'commander';\n\nimport { graphqlUnauthenticated } from '../graphql/client.ts';\nimport { LogoutUrl } from '../graphql/operations/hermes.ts';\nimport { clearApplicationSession } from '../lib/application-session.ts';\nimport { clearCredentials, clearElevatedCredentials } from '../lib/auth.ts';\nimport { openBrowser } from '../lib/browser.ts';\nimport { clearIdentity } from '../lib/config.ts';\nimport { hint, info, success, warn } from '../lib/output.ts';\n\nexport const logoutCommand = new Command('logout')\n .summary('Log out and remove stored credentials')\n .description(\n 'Log out and remove stored credentials\\n\\n' +\n 'Deletes the saved tokens from ~/.sortlist/credentials.json and\\n' +\n 'opens the Auth0 logout URL in your browser so the next `sl login`\\n' +\n \"doesn't silently reuse the previous account.\\n\\n\" +\n 'Examples:\\n' +\n ' sl logout Clear credentials and log out of Auth0\\n' +\n ' sl logout --no-browser Only clear local credentials\\n' +\n ' sl logout --elevated Drop the elevated token, keep your session',\n )\n .option('--no-browser', 'Skip opening the Auth0 logout URL in a browser')\n .option('--elevated', 'Only drop the token from `sl login --elevate`')\n .action(async function (this: Command) {\n const opts = this.optsWithGlobals();\n\n if (opts.elevated) {\n if (clearElevatedCredentials()) success('Elevation dropped — back to your regular session.');\n else info('No elevated token to drop.');\n return;\n }\n\n clearCredentials();\n clearElevatedCredentials();\n clearIdentity();\n // Also the application session: \"logged out\" has to mean no working token of\n // any kind, and its token keeps authenticating until it expires on its own.\n const hadSession = clearApplicationSession();\n success('Logged out — credentials removed.');\n if (hadSession) info('The application session was cleared too.');\n\n if (!opts.browser) {\n hint('Run `sl login` to authenticate again.');\n return;\n }\n\n try {\n const data = await graphqlUnauthenticated(LogoutUrl, {}, opts.endpoint);\n if (data.logoutUrl) {\n openBrowser(data.logoutUrl);\n info('Opened Auth0 logout in your browser.');\n }\n } catch {\n warn('Could not fetch the Auth0 logout URL — skipped browser logout.');\n }\n\n hint('Run `sl login` to authenticate again.');\n });\n","import { Command } from 'commander';\n\nimport { ensureAuthenticated, isExpired, loadElevatedCredentials } from '../lib/auth.ts';\nimport { clientCredentials, fetchClientCredentialsToken } from '../lib/client-credentials.ts';\nimport { error, hint } from '../lib/output.ts';\n\nexport const tokenCommand = new Command('token')\n .summary('Print the current access token to stdout')\n .description(\n 'Print the current access token to stdout\\n\\n' +\n \"Prints the application credential's token when SORTLIST_CLIENT_ID and\\n\" +\n 'SORTLIST_CLIENT_SECRET are set, and yours otherwise — matching what every\\n' +\n 'other command authenticates as.\\n\\n' +\n 'Examples:\\n' +\n ' sl token Print the token\\n' +\n ' curl -H \"Authorization: Bearer $(sl token)\" ...',\n )\n .action(async () => {\n // Every other command prefers the application credential, so this one must\n // too: piping `sl token` into curl otherwise acts as the human while the\n // command beside it acts as the application.\n const machine = clientCredentials();\n if (machine) {\n try {\n process.stdout.write(await fetchClientCredentialsToken(machine));\n } catch (err) {\n error((err as Error).message);\n hint('Check SORTLIST_CLIENT_ID, SORTLIST_CLIENT_SECRET and the token endpoint.');\n process.exit(2);\n }\n return;\n }\n\n const elevated = loadElevatedCredentials();\n if (elevated) {\n process.stdout.write(elevated.accessToken);\n return;\n }\n\n const creds = ensureAuthenticated();\n if (isExpired(creds)) {\n error('Your access token has expired.');\n hint('Run `sl login` to re-authenticate.');\n process.exit(2);\n }\n process.stdout.write(creds.accessToken);\n });\n","import { Command } from 'commander';\n\nimport { graphqlRaw } from '../graphql/client.ts';\nimport { clearApplicationSession, saveApplicationSession } from '../lib/application-session.ts';\nimport { applicationIdentity, fetchClientCredentialsToken } from '../lib/client-credentials.ts';\nimport { error, hint, info, success } from '../lib/output.ts';\n\nconst CREATE = `\n mutation UseApplication($applicationId: ID!, $name: String!) {\n createApplicationCredential(input: { applicationId: $applicationId, name: $name, session: true }) {\n clientId\n clientSecret\n credential { id }\n }\n }\n`;\n\nconst REVOKE = `\n mutation ReleaseSessionCredential($credentialId: ID!) {\n revokeApplicationCredential(input: { credentialId: $credentialId }) { revokedAt }\n }\n`;\n\ninterface IssuedSessionCredential {\n clientId: string;\n clientSecret: string;\n credential: { id: string };\n}\n\nexport const useCommand = new Command('use')\n .summary('Act as an application, or go back to acting as yourself')\n .description(\n 'Act as an application, or go back to acting as yourself\\n\\n' +\n 'Examples:\\n' +\n ' sl use application <id> Act as that application for one token lifetime\\n' +\n ' sl use me Go back to acting as yourself',\n );\n\nuseCommand\n .command('application <id>')\n .description('Act as an application for one token lifetime')\n .action(async function (this: Command, id: string) {\n const opts = this.optsWithGlobals();\n\n // The credential exists only long enough to be exchanged. Revoking it at once\n // means nothing reusable is left anywhere: what lands on disk is a bearer\n // token that expires, and a subgraph verifies it by signature and `exp`\n // against the JWKS, never by asking Hermes whether the credential still lives.\n // asPerson: creating and revoking a credential is a management operation,\n // which Hermes refuses to an application token — so switching straight from\n // one application to another has to authenticate as the person regardless of\n // what is currently active.\n const asPerson = { endpoint: opts.endpoint, throwOnError: true, asPerson: true };\n\n let credential: IssuedSessionCredential | null = null;\n try {\n const issued = (await graphqlRaw(CREATE, { applicationId: id, name: sessionName() }, asPerson)) as {\n createApplicationCredential: IssuedSessionCredential | null;\n };\n credential = issued.createApplicationCredential;\n } catch (err) {\n error(`Could not create a session credential: ${(err as Error).message}`);\n hint('`sl applications` lists the applications you can manage.');\n process.exit(1);\n }\n\n // A refused mutation can arrive as data carrying a null field rather than as\n // a thrown error, so catching is not enough on its own.\n if (!credential) {\n error('The server did not return a session credential.');\n hint('`sl applications` lists the applications you can manage.');\n process.exit(1);\n }\n\n let accessToken: string | null = null;\n try {\n accessToken = await fetchClientCredentialsToken({\n clientId: credential.clientId,\n clientSecret: credential.clientSecret,\n });\n } catch (err) {\n error(`Could not exchange the credential for a token: ${(err as Error).message}`);\n hint('`sl config use-local` / `use-staging` / `use-production` set the token endpoint.');\n } finally {\n // Revoked either way: a credential whose exchange failed must not survive.\n await graphqlRaw(REVOKE, { credentialId: credential.credential.id }, asPerson);\n }\n\n if (!accessToken) process.exit(2);\n\n const identity = applicationIdentity(accessToken);\n if (!identity) {\n error('The token endpoint returned something this CLI could not read.');\n process.exit(1);\n }\n\n saveApplicationSession({\n accessToken,\n applicationId: identity.applicationId,\n expiresAt: identity.expiresAt.getTime(),\n });\n\n success(`Now acting as application ${identity.applicationId}`);\n info(` until ${identity.expiresAt.toISOString()}`);\n hint('The credential behind this token is already revoked, so nothing reusable is stored.');\n hint('Managing companies, applications and credentials is now out of reach: Hermes refuses');\n hint('its own tokens on its management API. Run `sl use me` to act as yourself again.');\n });\n\nuseCommand\n .command('me')\n .description('Go back to acting as yourself')\n .action(() => {\n if (clearApplicationSession()) {\n success('Now acting as yourself again.');\n return;\n }\n info('Already acting as yourself.');\n });\n\nfunction sessionName(): string {\n return `cli-session-${new Date().toISOString().slice(0, 19).replace(/[:T]/g, '')}`;\n}\n","import { Command } from 'commander';\n\nimport { graphql, GraphQLRequestError } from '../graphql/client.ts';\nimport { Me } from '../graphql/operations/common.ts';\nimport { loadApplicationSession } from '../lib/application-session.ts';\nimport { loadElevatedCredentials, storedUserAccessToken } from '../lib/auth.ts';\nimport { applicationIdentity, clientCredentials, fetchClientCredentialsToken } from '../lib/client-credentials.ts';\nimport { error, hint, info, isJsonMode, printJson } from '../lib/output.ts';\nimport { formatResult } from '../lib/render.ts';\nimport { grantedScopes } from '../lib/token-claims.ts';\n\nexport function apiScopes(accessToken: string | null): string[] {\n return accessToken ? grantedScopes(accessToken).filter((scope) => scope.includes('/')) : [];\n}\n\nfunction currentElevation(): { level: string; until: string } | null {\n const elevated = loadElevatedCredentials();\n\n return elevated ? { level: elevated.level, until: new Date(elevated.expiresAt * 1000).toISOString() } : null;\n}\n\nexport const whoamiCommand = new Command('whoami')\n .summary('Show what the CLI is currently acting as')\n .description(\n 'Show what the CLI is currently acting as\\n\\n' +\n 'Reports a person or an application, matching what every command\\n' +\n 'authenticates as. Use --json for machine-readable output.\\n\\n' +\n 'Examples:\\n' +\n ' sl whoami Show the current identity\\n' +\n ' sl whoami --json Output the full object as JSON',\n )\n .action(async function (this: Command) {\n const opts = this.optsWithGlobals();\n\n // An application cannot be identified by asking the API: Hermes refuses its\n // own tokens on the management API, so `me` returns null. The claims of the\n // token we just minted are the only answer available.\n const session = loadApplicationSession();\n if (session) {\n const identity = applicationIdentity(session.accessToken);\n if (isJsonMode(opts)) {\n printJson({ kind: 'application', via: 'session', ...identity });\n return;\n }\n\n info('Acting as an application.\\n');\n info(\n formatResult({\n application: session.applicationId,\n 'acts for company': identity?.companyId,\n subject: identity?.sub,\n 'token expires': new Date(session.expiresAt).toISOString(),\n source: 'sl use application — its credential is already revoked',\n }) ?? '',\n );\n hint('Run `sl use me` to act as yourself again.');\n return;\n }\n\n const machine = clientCredentials();\n if (machine) {\n let identity;\n try {\n identity = applicationIdentity(await fetchClientCredentialsToken(machine));\n } catch (err) {\n error((err as Error).message);\n hint('Check SORTLIST_CLIENT_ID, SORTLIST_CLIENT_SECRET and the token endpoint.');\n process.exit(2);\n }\n if (!identity) {\n error('The token endpoint returned something this CLI could not read.');\n process.exit(1);\n }\n\n if (isJsonMode(opts)) {\n printJson({ kind: 'application', clientId: machine.clientId, ...identity });\n return;\n }\n\n info('Acting as an application.\\n');\n info(\n formatResult({\n application: identity.applicationId,\n 'acts for company': identity.companyId,\n subject: identity.sub,\n credential: `${identity.credentialId} (${machine.clientId})`,\n 'token expires': identity.expiresAt.toISOString(),\n source: 'SORTLIST_CLIENT_ID / SORTLIST_CLIENT_SECRET',\n }) ?? '',\n );\n hint('A credential carries no scopes, so scoped data stays out of reach.');\n hint('Unset both variables to act as yourself again.');\n return;\n }\n\n let data;\n try {\n data = await graphql(Me, undefined, {\n endpoint: opts.endpoint,\n throwOnError: true,\n });\n } catch (err) {\n if (err instanceof GraphQLRequestError) {\n error('Could not verify your identity — the API returned an error:');\n const messages = err.graphqlErrors?.map((e) => e.message) ?? [err.message];\n for (const message of messages) info(` ${message}`);\n hint('This is a server-side or authorization error, not necessarily an expired session.');\n hint('Retry in a moment; if it persists, re-run `sl login` or report it.');\n process.exit(1);\n }\n throw err;\n }\n\n const user = data.me;\n if (!user) {\n // A successful `me` for a logged-in user is never null — the resolver\n // returns the calling user. Null here means the backend could not resolve\n // the account (e.g. an upstream identity/profile lookup failed), not that\n // the local session is invalid, so we do not tell the user to log in again.\n error('The API did not return your user identity.');\n hint('This is usually a temporary backend issue rather than an expired session.');\n hint('Retry in a moment; if it persists, re-run `sl login` or report it.');\n process.exit(1);\n }\n\n const elevation = currentElevation();\n const scopes = apiScopes(storedUserAccessToken());\n\n if (isJsonMode(opts)) {\n printJson({ kind: 'person', ...user, elevation, scopes });\n return;\n }\n\n info(elevation ? `Acting as yourself, elevated to ${elevation.level}.\\n` : 'Acting as yourself.\\n');\n info(\n formatResult({\n name: [user.firstName, user.lastName].filter(Boolean).join(' ') || null,\n email: user.email,\n id: user.id,\n ...(elevation && { 'elevated until': elevation.until }),\n scopes: scopes.length > 0 ? scopes.join(' ') : 'none',\n }) ?? '',\n );\n if (elevation) hint('Run `sl logout --elevated` to drop the elevation now.');\n });\n","/**\n * Runtime schema introspection.\n *\n * Fetches the schema from the federation endpoint via an introspection query,\n * caches it on disk at ~/.sortlist/schema.json, and returns a GraphQLSchema\n * together with a field → subgraph map derived from the `@join__field`\n * directives the router injects into introspection responses.\n */\nimport { createHash } from 'node:crypto';\nimport fs from 'node:fs';\nimport os from 'node:os';\nimport path from 'node:path';\nimport { buildClientSchema, getIntrospectionQuery, type GraphQLSchema, type IntrospectionQuery } from 'graphql';\n\nimport { baseRequestHeaders } from '../lib/api-headers.ts';\nimport { loadApplicationSession } from '../lib/application-session.ts';\nimport { storedUserAccessToken } from '../lib/auth.ts';\nimport { clientCredentials, fetchClientCredentialsToken } from '../lib/client-credentials.ts';\nimport { getEndpoint } from '../lib/config.ts';\n\nconst CACHE_DIR = path.join(os.homedir(), '.sortlist');\nconst CACHE_PATH = path.join(CACHE_DIR, 'schema.json');\nconst CACHE_TTL_MS = 60 * 60 * 1000; // 1 hour\n\nexport type FieldServiceMap = Map<string, Map<string, string>>;\n\nexport interface IntrospectedSchema {\n schema: GraphQLSchema;\n fieldServices: FieldServiceMap;\n /** All subgraph names observed in the supergraph, regardless of scope visibility. */\n services: Set<string>;\n}\n\nlet cached: IntrospectedSchema | null = null;\n\n/**\n * The router injects `appliedDirectives` into introspection responses — this\n * isn't a standard introspection field, so we read it from the raw JSON.\n */\ninterface RawField {\n name: string;\n appliedDirectives?: Array<{\n name: string;\n args: Array<{ name: string; value: unknown }>;\n }>;\n}\n\ninterface RawType {\n name: string;\n fields?: RawField[];\n}\n\ninterface RawIntrospection {\n __schema: {\n queryType?: { name: string } | null;\n mutationType?: { name: string } | null;\n types: RawType[];\n };\n}\n\ninterface CacheEnvelope {\n endpoint: string;\n fetchedAt: number;\n /** Short fingerprint of the access token so schemas for different scopes don't collide. */\n tokenFingerprint: string;\n introspection: IntrospectionQuery;\n raw: RawIntrospection;\n}\n\nfunction tokenFingerprint(token: string | null): string {\n if (!token) return 'anonymous';\n return createHash('sha256').update(token).digest('hex').slice(0, 16);\n}\n\nfunction readCache(\n endpoint: string,\n token: string | null,\n): { introspection: IntrospectionQuery; raw: RawIntrospection } | null {\n try {\n const text = fs.readFileSync(CACHE_PATH, 'utf-8');\n const envelope: CacheEnvelope = JSON.parse(text);\n if (envelope.endpoint !== endpoint) return null;\n if (envelope.tokenFingerprint !== tokenFingerprint(token)) return null;\n if (Date.now() - envelope.fetchedAt > CACHE_TTL_MS) return null;\n if (!envelope.raw) return null;\n return { introspection: envelope.introspection, raw: envelope.raw };\n } catch {\n return null;\n }\n}\n\nfunction writeCache(\n endpoint: string,\n token: string | null,\n introspection: IntrospectionQuery,\n raw: RawIntrospection,\n): void {\n try {\n if (!fs.existsSync(CACHE_DIR)) {\n fs.mkdirSync(CACHE_DIR, { recursive: true });\n }\n const envelope: CacheEnvelope = {\n endpoint,\n fetchedAt: Date.now(),\n tokenFingerprint: tokenFingerprint(token),\n introspection,\n raw,\n };\n fs.writeFileSync(CACHE_PATH, JSON.stringify(envelope));\n } catch {\n // Non-fatal — worst case we re-fetch next time\n }\n}\n\nasync function fetchIntrospection(\n endpoint: string,\n token: string | null,\n): Promise<{ introspection: IntrospectionQuery; raw: RawIntrospection }> {\n const headers: Record<string, string> = baseRequestHeaders();\n if (token) headers['Authorization'] = `Bearer ${token}`;\n\n const res = await fetch(endpoint, {\n method: 'POST',\n headers,\n body: JSON.stringify({ query: getIntrospectionQuery() }),\n });\n\n if (!res.ok) {\n throw new Error(`Introspection failed: HTTP ${res.status} ${res.statusText}`);\n }\n\n const json = (await res.json()) as {\n data?: IntrospectionQuery & RawIntrospection;\n errors?: Array<{ message: string }>;\n };\n\n if (json.errors?.length) {\n throw new Error(`Introspection errors: ${json.errors.map((e) => e.message).join(', ')}`);\n }\n\n if (!json.data) {\n throw new Error('Introspection returned no data');\n }\n\n return { introspection: json.data as IntrospectionQuery, raw: json.data as RawIntrospection };\n}\n\n/**\n * Walk the raw introspection response and build:\n * - a `typeName → fieldName → subgraph` map from `@join__field(graph: ...)` directives\n * - the full set of subgraph names observed anywhere in the response (including types\n * whose root-fields were hidden by scope filtering — still useful so the CLI can\n * expose empty sub-commands that explain the scope gap)\n */\nconst CLI_TAG = 'cli';\n\nfunction isTaggedForCli(field: RawField): boolean {\n return (\n field.appliedDirectives?.some(\n (d) => d.name === 'tag' && d.args.some((a) => a.name === 'name' && a.value === CLI_TAG),\n ) ?? false\n );\n}\n\nfunction parseIntrospection(raw: RawIntrospection): { fieldServices: FieldServiceMap; services: Set<string> } {\n const fieldServices: FieldServiceMap = new Map();\n const services = new Set<string>();\n\n for (const type of raw.__schema.types ?? []) {\n if (!type.fields?.length) continue;\n\n let fieldMap: Map<string, string> | null = null;\n\n for (const field of type.fields) {\n const directive = field.appliedDirectives?.find((d) => d.name === 'join__field');\n if (!directive) continue;\n const graphArg = directive.args.find((a) => a.name === 'graph');\n if (!graphArg || typeof graphArg.value !== 'string') continue;\n services.add(graphArg.value);\n if (!isTaggedForCli(field)) continue;\n fieldMap ??= new Map();\n fieldMap.set(field.name, graphArg.value);\n }\n\n if (fieldMap) fieldServices.set(type.name, fieldMap);\n }\n\n return { fieldServices, services };\n}\n\n/**\n * Fetches and caches the schema via introspection. Returns the built schema\n * along with a map of root-field → subgraph name used for CLI service grouping.\n *\n * @param endpointOverride - Override the configured endpoint URL\n */\nasync function currentAccessToken(): Promise<string | null> {\n const machine = clientCredentials();\n if (machine) return fetchClientCredentialsToken(machine);\n\n return loadApplicationSession()?.accessToken ?? storedUserAccessToken();\n}\n\nexport async function getIntrospectedSchema(endpointOverride?: string): Promise<IntrospectedSchema> {\n if (cached) return cached;\n\n const endpoint = getEndpoint(endpointOverride);\n const token = await currentAccessToken();\n\n const fromCache = readCache(endpoint, token);\n if (fromCache) {\n // A cache that no longer builds is discarded rather than raised: one bad\n // fetch — a subgraph restarting mid-introspection is enough — would otherwise\n // fail every command for the whole TTL, and the error blames the query rather\n // than the file.\n const usable = build(fromCache.introspection, fromCache.raw);\n if (usable) {\n cached = usable;\n return cached;\n }\n discardCache();\n }\n\n const { introspection, raw } = await fetchIntrospection(endpoint, token);\n const built = build(introspection, raw);\n if (!built) {\n throw new Error(\n 'The endpoint returned an introspection result this CLI could not build a schema from. ' +\n 'Nothing was cached; retry, and check that every subgraph is up.',\n );\n }\n\n // Written only once the result is known to build, so a partial response cannot\n // become a sticky failure.\n writeCache(endpoint, token, introspection, raw);\n cached = built;\n return cached;\n}\n\nfunction build(introspection: IntrospectionQuery, raw: RawIntrospection): IntrospectedSchema | null {\n try {\n const { fieldServices, services } = parseIntrospection(raw);\n return { schema: buildClientSchema(introspection), fieldServices, services };\n } catch {\n return null;\n }\n}\n\nfunction discardCache(): void {\n try {\n fs.unlinkSync(CACHE_PATH);\n } catch {\n // already gone\n }\n}\n\n/**\n * Force-refresh the cached schema, bypassing the disk cache.\n */\nexport async function refreshSchema(endpointOverride?: string): Promise<IntrospectedSchema> {\n cached = null;\n discardCache();\n\n const endpoint = getEndpoint(endpointOverride);\n const token = await currentAccessToken();\n const { introspection, raw } = await fetchIntrospection(endpoint, token);\n const built = build(introspection, raw);\n if (!built) {\n throw new Error(\n 'The endpoint returned an introspection result this CLI could not build a schema from. ' +\n 'Nothing was cached; retry, and check that every subgraph is up.',\n );\n }\n\n writeCache(endpoint, token, introspection, raw);\n cached = built;\n return cached;\n}\n","import { execFileSync } from 'node:child_process';\n\nimport { isLocalDev } from './env.ts';\nimport { error, hint, info, success, warn } from './output.ts';\nimport { pkg } from './package-root.ts';\n\nconst PACKAGE_NAME = '@sortlist/cli';\n\nfunction getCurrentVersion(): string {\n return pkg.version;\n}\n\nasync function fetchLatestVersion(): Promise<string | null> {\n try {\n const controller = new AbortController();\n const timeout = setTimeout(() => controller.abort(), 3000);\n const res = await fetch(`https://registry.npmjs.org/${encodeURIComponent(PACKAGE_NAME)}/latest`, {\n signal: controller.signal,\n });\n clearTimeout(timeout);\n if (!res.ok) return null;\n const data = (await res.json()) as { version: string };\n return data.version;\n } catch {\n return null;\n }\n}\n\nfunction parseSemver(version: string): [number, number, number] {\n const [major, minor, patch] = version.split('.').map(Number);\n return [major ?? 0, minor ?? 0, patch ?? 0];\n}\n\nfunction autoUpdate(current: string, latest: string): void {\n info(`Updating ${PACKAGE_NAME}: ${current} \\u2192 ${latest}...`);\n\n try {\n // Clean stale temp directories that cause ENOTEMPTY errors. npm stages a\n // package under a sibling `.<name>-<hash>` dir; for scoped names the dot\n // sits on the final segment, e.g. `@sortlist/.cli-<hash>`.\n const prefix = execFileSync('npm', ['prefix', '-g'], { stdio: 'pipe', encoding: 'utf-8' }).trim();\n const lastSlash = PACKAGE_NAME.lastIndexOf('/');\n const scope = lastSlash === -1 ? '' : `${PACKAGE_NAME.slice(0, lastSlash)}/`;\n const name = lastSlash === -1 ? PACKAGE_NAME : PACKAGE_NAME.slice(lastSlash + 1);\n const staleDir = `${prefix}/lib/node_modules/${scope}.${name}-`;\n execFileSync('sh', ['-c', `rm -rf \"${staleDir}\"* 2>/dev/null || true`], { stdio: 'pipe' });\n\n execFileSync('npm', ['install', '-g', '--prefer-online', `${PACKAGE_NAME}@${latest}`], {\n stdio: 'pipe',\n });\n success(`Updated to ${latest}. Restart \\`sl\\` to use the new version.`);\n } catch (err) {\n const stderr = err && typeof err === 'object' && 'stderr' in err ? String(err.stderr).trim() : '';\n const detail = stderr ? ` (${stderr.split('\\n')[0]})` : '';\n warn(`Auto-update failed${detail}.`);\n hint(`Run \\`npm i -g ${PACKAGE_NAME}\\` to update manually.`);\n }\n}\n\n/**\n * Checks npm for the latest version.\n * - Major mismatch: blocks execution and exits.\n * - Minor/patch mismatch: auto-updates with a spinner, then continues.\n */\nexport async function checkForUpdates(): Promise<void> {\n if (isLocalDev) return;\n\n const current = getCurrentVersion();\n const latest = await fetchLatestVersion();\n if (!latest || latest === current) return;\n\n const [curMajor] = parseSemver(current);\n const [latMajor] = parseSemver(latest);\n\n if (latMajor > curMajor) {\n error(`Breaking update: ${current} \\u2192 ${latest}`);\n info('');\n info(' Your CLI is incompatible with the current API.');\n info(' Update before continuing:');\n info('');\n info(` npm i -g ${PACKAGE_NAME}`);\n info('');\n process.exit(1);\n }\n\n autoUpdate(current, latest);\n}\n"],"mappings":";AAAA,SAAS,WAAAA,gBAAe;;;ACAxB,SAAS,eAAe;;;ACAxB,OAAO,QAAQ;AACf,OAAO,QAAQ;AACf,OAAO,UAAU;AASjB,IAAM,eAAe,KAAK,KAAK,GAAG,QAAQ,GAAG,aAAa,0BAA0B;AAQ7E,SAAS,yBAAoD;AAClE,MAAI;AACF,UAAM,UAA8B,KAAK,MAAM,GAAG,aAAa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Z,EAAAC,kBAAiB,GAAG;AACpB,QAAM,YAAY;AAClB,QAAM;AACR;AAEA,MAAM,YAAY;","names":["Command","fs","os","path","path","os","fs","fs","os","path","ensureDir","tokenEndpoint","fs","path","fs","path","fs","path","Command","isEnumType","isListType","isNonNullType","isObjectType","isScalarType","serviceOf","captureException","error","addBreadcrumb","captureException","error","captureException","addBreadcrumb","personal","path","CONNECTION_PLUMBING","unwrap","isNonNullType","isListType","isEnumType","isObjectType","isScalarType","isRecord","Command","build","query","fName","data","Command","Option","Command","Option","Command","Command","Command","Command","Command","Command","Command","Command","fs","os","path","path","os","cached","fs","endpointOverride","ansi","Command","captureException"]}