{
  "v1": [
    {
      "method": "GET",
      "path": "/v1/auth/oauth-config",
      "auth": "api key middleware; listed auth methods are public-route allowlisted; auth session/bearer where handler requires it",
      "controller": "getOAuthConfig",
      "routeSource": "apps/api-core/src/routes/auth-customer.ts",
      "controllerSource": "apps/api-core/src/controllers/auth/oauth.controller.ts",
      "request": {
        "schemas": [],
        "evidence": "uncertain: no direct named schema call in handler body",
        "fields": [],
        "fieldEvidence": "no direct field extraction; inspect named schema or delegated payload helper",
        "schemaFields": {},
        "types": []
      },
      "response": {
        "fields": [],
        "evidence": "uncertain: response is variable/service result or no direct literal c.json object",
        "types": [
          "import(\"/Users/hm/Projects/One/packages/sdk-shared/dist/index\").OAuthConfig"
        ]
      },
      "notes": "before customer middleware; authLimiter on mutation endpoints",
      "controllerSignature": "export async function getOAuthConfig(c: Context<"
    },
    {
      "method": "GET",
      "path": "/v1/auth/authorize",
      "auth": "api key middleware; listed auth methods are public-route allowlisted; auth session/bearer where handler requires it",
      "controller": "authorize",
      "routeSource": "apps/api-core/src/routes/auth-customer.ts",
      "controllerSource": "apps/api-core/src/controllers/auth/oauth.controller.ts",
      "request": {
        "schemas": [],
        "evidence": "uncertain: no direct named schema call in handler body",
        "fields": [],
        "fieldEvidence": "no direct field extraction; inspect named schema or delegated payload helper",
        "schemaFields": {},
        "types": []
      },
      "response": {
        "fields": [],
        "evidence": "uncertain: response is variable/service result or no direct literal c.json object",
        "types": [
          "{ error: string; message: string; }"
        ]
      },
      "notes": "before customer middleware; authLimiter on mutation endpoints",
      "controllerSignature": "export async function authorize(c: Context<"
    },
    {
      "method": "POST",
      "path": "/v1/auth/oauth/generate-state",
      "auth": "api key middleware; listed auth methods are public-route allowlisted; auth session/bearer where handler requires it",
      "controller": "generateOAuthState",
      "routeSource": "apps/api-core/src/routes/auth-customer.ts",
      "controllerSource": "apps/api-core/src/controllers/auth/oauth.controller.ts",
      "request": {
        "schemas": [],
        "evidence": "uncertain: no direct named schema call in handler body",
        "fields": [],
        "fieldEvidence": "no direct field extraction; inspect named schema or delegated payload helper",
        "schemaFields": {},
        "types": []
      },
      "response": {
        "fields": [],
        "evidence": "uncertain: response is variable/service result or no direct literal c.json object",
        "types": [
          "{ state: string; }"
        ]
      },
      "notes": "before customer middleware; authLimiter on mutation endpoints",
      "controllerSignature": "export async function generateOAuthState(c: Context<"
    },
    {
      "method": "POST",
      "path": "/v1/auth/google",
      "auth": "api key middleware; listed auth methods are public-route allowlisted; auth session/bearer where handler requires it",
      "controller": "googleAuth",
      "routeSource": "apps/api-core/src/routes/auth-customer.ts",
      "controllerSource": "apps/api-core/src/controllers/auth/oauth.controller.ts",
      "request": {
        "schemas": [
          "bodySchema"
        ],
        "evidence": "direct controller validation call",
        "fields": [
          "id_token",
          "customerId",
          "state",
          "oauthState",
          "resume"
        ],
        "fieldEvidence": "direct controller destructuring/query/path read",
        "schemaFields": {
          "bodySchema": {
            "fields": [
              "id_token",
              "customerId",
              "state",
              "oauthState",
              "allowSignUp"
            ],
            "source": "apps/api-core/src/controllers/auth/oauth.controller.ts",
            "evidence": "schema object property keys parsed from source"
          }
        },
        "types": [
          {
            "type": "{ id_token: string; customerId?: string | undefined; state?: string | undefined; oauthState?: string | undefined; allowSignUp?: boolean | undefined; }",
            "source": "apps/api-core/src/controllers/auth/oauth.controller.ts"
          },
          {
            "type": "{ key: string; revision: number; occurrenceId: string; properties: Record<string, string>; attemptId?: string | undefined; sequence?: number | undefined; }",
            "source": "apps/api-core/src/services/events/events.service.ts"
          }
        ]
      },
      "response": {
        "fields": [
          "error",
          "message"
        ],
        "evidence": "literal top-level c.json object keys found in controller",
        "types": [
          "{ error: string; message: string; }",
          "AuthResponse"
        ]
      },
      "notes": "before customer middleware; authLimiter on mutation endpoints",
      "controllerSignature": "export async function googleAuth(c: Context<"
    },
    {
      "method": "POST",
      "path": "/v1/auth/apple",
      "auth": "api key middleware; listed auth methods are public-route allowlisted; auth session/bearer where handler requires it",
      "controller": "appleAuth",
      "routeSource": "apps/api-core/src/routes/auth-customer.ts",
      "controllerSource": "apps/api-core/src/controllers/auth/oauth.controller.ts",
      "request": {
        "schemas": [
          "bodySchema"
        ],
        "evidence": "direct controller validation call",
        "fields": [
          "id_token",
          "authorization_code",
          "nonce",
          "user",
          "customerId",
          "state",
          "oauthState",
          "allowSignUp",
          "resume"
        ],
        "fieldEvidence": "direct controller destructuring/query/path read",
        "schemaFields": {
          "bodySchema": {
            "fields": [
              "id_token",
              "customerId",
              "state",
              "oauthState",
              "allowSignUp"
            ],
            "source": "apps/api-core/src/controllers/auth/oauth.controller.ts",
            "evidence": "schema object property keys parsed from source"
          }
        },
        "types": [
          {
            "type": "{ id_token: string; authorization_code?: string | undefined; nonce?: string | undefined; user?: { name?: { firstName?: string | undefined; lastName?: string | undefined; } | undefined; email?: string | undefined; } | undefined; customerId?: string | undefined; state?: string | undefined; oauthState?: string | undefined; allowSignUp?: boolean | undefined; }",
            "source": "apps/api-core/src/controllers/auth/oauth.controller.ts"
          },
          {
            "type": "{ key: string; revision: number; occurrenceId: string; properties: Record<string, string>; attemptId?: string | undefined; sequence?: number | undefined; }",
            "source": "apps/api-core/src/services/events/events.service.ts"
          }
        ]
      },
      "response": {
        "fields": [
          "error",
          "message"
        ],
        "evidence": "literal top-level c.json object keys found in controller",
        "types": [
          "{ error: string; message: string; }",
          "AuthResponse"
        ]
      },
      "notes": "before customer middleware; authLimiter on mutation endpoints",
      "controllerSignature": "export async function appleAuth(c: Context<"
    },
    {
      "method": "POST",
      "path": "/v1/auth/signup",
      "auth": "api key middleware; listed auth methods are public-route allowlisted; auth session/bearer where handler requires it",
      "controller": "signup",
      "routeSource": "apps/api-core/src/routes/auth-customer.ts",
      "controllerSource": "apps/api-core/src/controllers/auth/email-password.controller.ts",
      "request": {
        "schemas": [
          "registerRequestSchema"
        ],
        "evidence": "direct controller validation call",
        "fields": [
          "email",
          "password",
          "name",
          "firstName",
          "lastName",
          "customerId",
          "resume"
        ],
        "fieldEvidence": "direct controller destructuring/query/path read",
        "schemaFields": {
          "registerRequestSchema": {
            "fields": [
              "email",
              "password",
              "name",
              "firstName",
              "lastName",
              "customerId",
              "state"
            ],
            "source": "packages/sdk-shared/src/validation/index.ts",
            "evidence": "schema object property keys parsed from source"
          }
        },
        "types": [
          {
            "type": "{ email: string; password: string; name?: string | undefined; firstName?: string | undefined; lastName?: string | undefined; customerId?: string | undefined; state?: string | undefined; }",
            "source": "apps/api-core/src/controllers/auth/email-password.controller.ts"
          },
          {
            "type": "{ key: string; revision: number; occurrenceId: string; properties: Record<string, string>; attemptId?: string | undefined; sequence?: number | undefined; }",
            "source": "apps/api-core/src/services/events/events.service.ts"
          }
        ]
      },
      "response": {
        "fields": [],
        "evidence": "uncertain: response is variable/service result or no direct literal c.json object",
        "types": [
          "AuthResponse"
        ]
      },
      "notes": "before customer middleware; authLimiter on mutation endpoints",
      "controllerSignature": "export async function signup(c: Context<"
    },
    {
      "method": "POST",
      "path": "/v1/auth/signin",
      "auth": "api key middleware; listed auth methods are public-route allowlisted; auth session/bearer where handler requires it",
      "controller": "signin",
      "routeSource": "apps/api-core/src/routes/auth-customer.ts",
      "controllerSource": "apps/api-core/src/controllers/auth/email-password.controller.ts",
      "request": {
        "schemas": [
          "signInRequestSchema"
        ],
        "evidence": "direct controller validation call",
        "fields": [
          "email",
          "password",
          "customerId",
          "resume"
        ],
        "fieldEvidence": "direct controller destructuring/query/path read",
        "schemaFields": {
          "signInRequestSchema": {
            "fields": [
              "email",
              "password",
              "customerId",
              "state"
            ],
            "source": "packages/sdk-shared/src/validation/index.ts",
            "evidence": "schema object property keys parsed from source"
          }
        },
        "types": [
          {
            "type": "{ email: string; password: string; customerId?: string | undefined; state?: string | undefined; }",
            "source": "apps/api-core/src/controllers/auth/email-password.controller.ts"
          },
          {
            "type": "{ key: string; revision: number; occurrenceId: string; properties: Record<string, string>; attemptId?: string | undefined; sequence?: number | undefined; }",
            "source": "apps/api-core/src/services/events/events.service.ts"
          }
        ]
      },
      "response": {
        "fields": [],
        "evidence": "uncertain: response is variable/service result or no direct literal c.json object",
        "types": [
          "AuthResponse"
        ]
      },
      "notes": "before customer middleware; authLimiter on mutation endpoints",
      "controllerSignature": "export async function signin(c: Context<"
    },
    {
      "method": "POST",
      "path": "/v1/auth/maxvault/legacy-signin",
      "auth": "api key middleware; listed auth methods are public-route allowlisted; auth session/bearer where handler requires it",
      "controller": "maxVaultLegacySignin",
      "routeSource": "apps/api-core/src/routes/auth-customer.ts",
      "controllerSource": "apps/api-core/src/controllers/auth/legacy-compatibility.controller.ts",
      "request": {
        "schemas": [
          "signInRequestSchema"
        ],
        "evidence": "direct controller validation call",
        "fields": [
          "email",
          "password"
        ],
        "fieldEvidence": "direct controller destructuring/query/path read",
        "schemaFields": {
          "signInRequestSchema": {
            "fields": [
              "email",
              "password",
              "customerId",
              "state"
            ],
            "source": "packages/sdk-shared/src/validation/index.ts",
            "evidence": "schema object property keys parsed from source"
          }
        },
        "types": [
          {
            "type": "{ email: string; password: string; customerId?: string | undefined; state?: string | undefined; }",
            "source": "apps/api-core/src/controllers/auth/legacy-compatibility.controller.ts"
          },
          {
            "type": "{ key: string; revision: number; occurrenceId: string; properties: Record<string, string>; attemptId?: string | undefined; sequence?: number | undefined; }",
            "source": "apps/api-core/src/services/events/events.service.ts"
          }
        ]
      },
      "response": {
        "fields": [],
        "evidence": "uncertain: response is variable/service result or no direct literal c.json object",
        "types": [
          "import(\"/Users/hm/Projects/One/packages/sdk-shared/dist/index\").AuthResponse"
        ]
      },
      "notes": "before customer middleware; authLimiter on mutation endpoints",
      "controllerSignature": "export async function maxVaultLegacySignin(c: AuthContext)"
    },
    {
      "method": "POST",
      "path": "/v1/auth/signout",
      "auth": "api key middleware; listed auth methods are public-route allowlisted; auth session/bearer where handler requires it",
      "controller": "signOut",
      "routeSource": "apps/api-core/src/routes/auth-customer.ts",
      "controllerSource": "apps/api-core/src/controllers/auth/session.controller.ts",
      "request": {
        "schemas": [],
        "evidence": "uncertain: no direct named schema call in handler body",
        "fields": [],
        "fieldEvidence": "no direct field extraction; inspect named schema or delegated payload helper",
        "schemaFields": {},
        "types": [
          {
            "type": "{ key: string; revision: number; occurrenceId: string; properties: Record<string, string>; attemptId?: string | undefined; sequence?: number | undefined; }",
            "source": "apps/api-core/src/services/events/events.service.ts"
          },
          {
            "type": "{ operationId: string; state: \"cancelled\" | \"exhausted\" | \"pending\" | \"started\" | \"retrying\" | \"confirmed\" | \"no_matching_purchase\" | \"interrupted\"; attempt: number; observedAt: string; parentOperationId?: string | null | undefined; }",
            "source": "apps/api-core/src/services/events/events.service.ts"
          },
          {
            "type": "{ version: 1; observedAt: string; policy: \"account\" | \"app_store\"; verification: \"unavailable\" | \"authoritative\" | \"verified_entitlements\" | \"cached\"; benefits: { identifier: string; source: \"manual\" | \"apple\" | \"account\" | \"support_purchaser\" | \"preserved_import\"; effectiveUntil?: number | null | undefined; verifiedAt?: string | null | undefined; }[]; truncated: boolean; providerEnvironment?: \"Production\" | \"Sandbox\" | \"Xcode\" | null | undefined; operationId?: string | null | undefined; attemptId?: string | null | undefined; requestId?: string | null | undefined; accessContextExpiresAt?: number | null | undefined; appleEvidence?: { observedAt: string; acquisition: \"unavailable\" | \"rejected\" | \"app_transaction\" | \"receipt\"; purchaserComparison: \"unavailable\" | \"first_observation\" | \"same\" | \"changed\"; collectionComplete: boolean; priorTransactionCount: number; submittedTransactionCount: number; retainedTransactionCount: number; missingProductIdentifiers: string[]; previousPurchaserHash?: string | null | undefined; currentPurchaserHash?: string | null | undefined; acquisitionFailureStage?: string | null | undefined; } | null | undefined; }",
            "source": "apps/api-core/src/services/events/events.service.ts"
          },
          {
            "type": "{ occurrenceId: string; phase: \"startup\" | \"runtime\"; operation: string; domain: string; code: string; message: string; underlyingErrors: { domain: string; code: string; message: string; }[]; appVersion: string; buildNumber: string; truncated: boolean; stage?: string | undefined; migrationIdentifier?: string | undefined; relatedCrashReportId?: string | undefined; }",
            "source": "apps/api-core/src/services/events/events.service.ts"
          }
        ]
      },
      "response": {
        "fields": [
          "success"
        ],
        "evidence": "literal top-level c.json object keys found in controller",
        "types": [
          "{ success: true; }"
        ]
      },
      "notes": "before customer middleware; authLimiter on mutation endpoints",
      "controllerSignature": "export async function signOut(c: Context<"
    },
    {
      "method": "POST",
      "path": "/v1/auth/forgot-password",
      "auth": "api key middleware; listed auth methods are public-route allowlisted; auth session/bearer where handler requires it",
      "controller": "forgotPassword",
      "routeSource": "apps/api-core/src/routes/auth-customer.ts",
      "controllerSource": "apps/api-core/src/controllers/auth/email-password.controller.ts",
      "request": {
        "schemas": [
          "forgotPasswordRequestSchema"
        ],
        "evidence": "direct controller validation call",
        "fields": [
          "email"
        ],
        "fieldEvidence": "direct controller destructuring/query/path read",
        "schemaFields": {
          "forgotPasswordRequestSchema": {
            "fields": [
              "email",
              "redirectUrl"
            ],
            "source": "packages/sdk-shared/src/validation/index.ts",
            "evidence": "schema object property keys parsed from source"
          }
        },
        "types": [
          {
            "type": "{ email: string; redirectUrl?: string | undefined; }",
            "source": "apps/api-core/src/controllers/auth/email-password.controller.ts"
          }
        ]
      },
      "response": {
        "fields": [
          "success",
          "message"
        ],
        "evidence": "literal top-level c.json object keys found in controller",
        "types": [
          "{ token?: string | undefined; success: true; message: string; }"
        ]
      },
      "notes": "before customer middleware; authLimiter on mutation endpoints",
      "controllerSignature": "export async function forgotPassword(c: Context<"
    },
    {
      "method": "POST",
      "path": "/v1/auth/reset-password",
      "auth": "api key middleware; listed auth methods are public-route allowlisted; auth session/bearer where handler requires it",
      "controller": "resetPassword",
      "routeSource": "apps/api-core/src/routes/auth-customer.ts",
      "controllerSource": "apps/api-core/src/controllers/auth/email-password.controller.ts",
      "request": {
        "schemas": [
          "resetPasswordRequestSchema"
        ],
        "evidence": "direct controller validation call",
        "fields": [
          "token"
        ],
        "fieldEvidence": "direct controller destructuring/query/path read",
        "schemaFields": {
          "resetPasswordRequestSchema": {
            "fields": [
              "token",
              "password"
            ],
            "source": "packages/sdk-shared/src/validation/index.ts",
            "evidence": "schema object property keys parsed from source"
          }
        },
        "types": [
          {
            "type": "{ token: string; password: string; }",
            "source": "apps/api-core/src/controllers/auth/email-password.controller.ts"
          }
        ]
      },
      "response": {
        "fields": [
          "success",
          "message"
        ],
        "evidence": "literal top-level c.json object keys found in controller",
        "types": [
          "{ success: true; message: string; }"
        ]
      },
      "notes": "before customer middleware; authLimiter on mutation endpoints",
      "controllerSignature": "export async function resetPassword(c: Context<"
    },
    {
      "method": "POST",
      "path": "/v1/auth/magic-link/request",
      "auth": "api key middleware; listed auth methods are public-route allowlisted; auth session/bearer where handler requires it",
      "controller": "requestMagicLink",
      "routeSource": "apps/api-core/src/routes/auth-customer.ts",
      "controllerSource": "apps/api-core/src/controllers/auth/magic-link.controller.ts",
      "request": {
        "schemas": [
          "requestMagicLinkSchema"
        ],
        "evidence": "direct controller validation call",
        "fields": [],
        "fieldEvidence": "no direct field extraction; inspect named schema or delegated payload helper",
        "schemaFields": {
          "requestMagicLinkSchema": {
            "fields": [
              "email",
              "redirectUrl",
              "customerId"
            ],
            "source": "packages/sdk-shared/src/validation/index.ts",
            "evidence": "schema object property keys parsed from source"
          }
        },
        "types": [
          {
            "type": "{ email: string; redirectUrl: string; customerId?: string | undefined; }",
            "source": "apps/api-core/src/controllers/auth/magic-link.controller.ts"
          }
        ]
      },
      "response": {
        "fields": [],
        "evidence": "uncertain: response is variable/service result or no direct literal c.json object",
        "types": [
          "MagicLinkRequestResponse"
        ]
      },
      "notes": "before customer middleware; authLimiter on mutation endpoints",
      "controllerSignature": "export async function requestMagicLink(c: AuthContext)"
    },
    {
      "method": "POST",
      "path": "/v1/auth/magic-link/exchange",
      "auth": "api key middleware; listed auth methods are public-route allowlisted; auth session/bearer where handler requires it",
      "controller": "exchangeMagicLink",
      "routeSource": "apps/api-core/src/routes/auth-customer.ts",
      "controllerSource": "apps/api-core/src/controllers/auth/magic-link.controller.ts",
      "request": {
        "schemas": [
          "exchangeMagicLinkSchema"
        ],
        "evidence": "direct controller validation call",
        "fields": [],
        "fieldEvidence": "no direct field extraction; inspect named schema or delegated payload helper",
        "schemaFields": {
          "exchangeMagicLinkSchema": {
            "fields": [
              "token",
              "customerId"
            ],
            "source": "packages/sdk-shared/src/validation/index.ts",
            "evidence": "schema object property keys parsed from source"
          }
        },
        "types": [
          {
            "type": "{ token: string; customerId?: string | undefined; }",
            "source": "apps/api-core/src/controllers/auth/magic-link.controller.ts"
          }
        ]
      },
      "response": {
        "fields": [],
        "evidence": "uncertain: response is variable/service result or no direct literal c.json object",
        "types": [
          "AuthResponse"
        ]
      },
      "notes": "before customer middleware; authLimiter on mutation endpoints",
      "controllerSignature": "export async function exchangeMagicLink(c: AuthContext)"
    },
    {
      "method": "POST",
      "path": "/v1/auth/reauthenticate",
      "auth": "api key middleware; listed auth methods are public-route allowlisted; auth session/bearer where handler requires it",
      "controller": "reauthenticate",
      "routeSource": "apps/api-core/src/routes/auth-customer.ts",
      "controllerSource": "apps/api-core/src/controllers/auth/customer-account-security.controller.ts",
      "request": {
        "schemas": [
          "reauthenticateRequestSchema"
        ],
        "evidence": "direct controller validation call",
        "fields": [],
        "fieldEvidence": "no direct field extraction; inspect named schema or delegated payload helper",
        "schemaFields": {},
        "types": [
          {
            "type": "{ method: \"password\"; password: string; } | { method: \"apple\"; idToken: string; authorizationCode: string; nonce: string; } | { method: \"google\"; idToken: string; } | { method: \"magic_link\"; token: string; }",
            "source": "apps/api-core/src/controllers/auth/customer-account-security.controller.ts"
          }
        ]
      },
      "response": {
        "fields": [
          "session"
        ],
        "evidence": "literal top-level c.json object keys found in controller",
        "types": [
          "{ session: AuthSession; }"
        ]
      },
      "notes": "before customer middleware; authLimiter on mutation endpoints",
      "controllerSignature": "export async function reauthenticate(c: AuthContext)"
    },
    {
      "method": "POST",
      "path": "/v1/auth/email-change/request",
      "auth": "api key middleware; listed auth methods are public-route allowlisted; auth session/bearer where handler requires it",
      "controller": "requestEmailChange",
      "routeSource": "apps/api-core/src/routes/auth-customer.ts",
      "controllerSource": "apps/api-core/src/controllers/auth/customer-account-security.controller.ts",
      "request": {
        "schemas": [
          "requestEmailChangeSchema"
        ],
        "evidence": "direct controller validation call",
        "fields": [],
        "fieldEvidence": "no direct field extraction; inspect named schema or delegated payload helper",
        "schemaFields": {
          "requestEmailChangeSchema": {
            "fields": [
              "newEmail"
            ],
            "source": "packages/sdk-shared/src/validation/index.ts",
            "evidence": "schema object property keys parsed from source"
          }
        },
        "types": [
          {
            "type": "{ newEmail: string; }",
            "source": "apps/api-core/src/controllers/auth/customer-account-security.controller.ts"
          }
        ]
      },
      "response": {
        "fields": [
          "success",
          "expiresAt",
          "emailUnreachable"
        ],
        "evidence": "literal top-level c.json object keys found in controller",
        "types": [
          "{ success: true; expiresAt: number; emailUnreachable: boolean; }"
        ]
      },
      "notes": "before customer middleware; authLimiter on mutation endpoints",
      "controllerSignature": "export async function requestEmailChange(c: AuthContext)"
    },
    {
      "method": "POST",
      "path": "/v1/auth/email-change/password",
      "auth": "api key middleware; listed auth methods are public-route allowlisted; auth session/bearer where handler requires it",
      "controller": "changeEmailWithPassword",
      "routeSource": "apps/api-core/src/routes/auth-customer.ts",
      "controllerSource": "apps/api-core/src/controllers/auth/customer-account-security.controller.ts",
      "request": {
        "schemas": [
          "changeEmailWithPasswordSchema"
        ],
        "evidence": "direct controller validation call",
        "fields": [],
        "fieldEvidence": "no direct field extraction; inspect named schema or delegated payload helper",
        "schemaFields": {
          "changeEmailWithPasswordSchema": {
            "fields": [
              "newEmail",
              "currentPassword"
            ],
            "source": "apps/api-core/src/controllers/auth/customer-account-security.controller.ts",
            "evidence": "schema object property keys parsed from source"
          }
        },
        "types": [
          {
            "type": "{ newEmail: string; currentPassword: string; }",
            "source": "apps/api-core/src/controllers/auth/customer-account-security.controller.ts"
          }
        ]
      },
      "response": {
        "fields": [],
        "evidence": "uncertain: response is variable/service result or no direct literal c.json object",
        "types": [
          "AuthResponse"
        ]
      },
      "notes": "before customer middleware; authLimiter on mutation endpoints",
      "controllerSignature": "export async function changeEmailWithPassword(c: AuthContext)"
    },
    {
      "method": "POST",
      "path": "/v1/auth/email-change/confirm",
      "auth": "api key middleware; listed auth methods are public-route allowlisted; auth session/bearer where handler requires it",
      "controller": "confirmEmailChange",
      "routeSource": "apps/api-core/src/routes/auth-customer.ts",
      "controllerSource": "apps/api-core/src/controllers/auth/customer-account-security.controller.ts",
      "request": {
        "schemas": [
          "confirmEmailChangeSchema"
        ],
        "evidence": "direct controller validation call",
        "fields": [
          "token"
        ],
        "fieldEvidence": "direct controller destructuring/query/path read",
        "schemaFields": {
          "confirmEmailChangeSchema": {
            "fields": [
              "token"
            ],
            "source": "packages/sdk-shared/src/validation/index.ts",
            "evidence": "schema object property keys parsed from source"
          }
        },
        "types": [
          {
            "type": "{ token: string; }",
            "source": "apps/api-core/src/controllers/auth/customer-account-security.controller.ts"
          }
        ]
      },
      "response": {
        "fields": [],
        "evidence": "uncertain: response is variable/service result or no direct literal c.json object",
        "types": [
          "AuthResponse"
        ]
      },
      "notes": "before customer middleware; authLimiter on mutation endpoints",
      "controllerSignature": "export async function confirmEmailChange(c: AuthContext)"
    },
    {
      "method": "POST",
      "path": "/v1/auth/password-change/complete",
      "auth": "api key middleware; listed auth methods are public-route allowlisted; auth session/bearer where handler requires it",
      "controller": "completePasswordChange",
      "routeSource": "apps/api-core/src/routes/auth-customer.ts",
      "controllerSource": "apps/api-core/src/controllers/auth/customer-account-security.controller.ts",
      "request": {
        "schemas": [
          "completePasswordChangeSchema"
        ],
        "evidence": "direct controller validation call",
        "fields": [
          "challengeToken"
        ],
        "fieldEvidence": "direct controller destructuring/query/path read",
        "schemaFields": {
          "completePasswordChangeSchema": {
            "fields": [
              "challengeToken",
              "newPassword"
            ],
            "source": "packages/sdk-shared/src/validation/index.ts",
            "evidence": "schema object property keys parsed from source"
          }
        },
        "types": [
          {
            "type": "{ challengeToken: string; newPassword: string; }",
            "source": "apps/api-core/src/controllers/auth/customer-account-security.controller.ts"
          },
          {
            "type": "{ key: string; revision: number; occurrenceId: string; properties: Record<string, string>; attemptId?: string | undefined; sequence?: number | undefined; }",
            "source": "apps/api-core/src/services/events/events.service.ts"
          }
        ]
      },
      "response": {
        "fields": [],
        "evidence": "uncertain: response is variable/service result or no direct literal c.json object",
        "types": [
          "AuthResponse"
        ]
      },
      "notes": "before customer middleware; authLimiter on mutation endpoints",
      "controllerSignature": "export async function completePasswordChange(c: AuthContext)"
    },
    {
      "method": "POST",
      "path": "/v1/auth/refresh",
      "auth": "api key middleware; listed auth methods are public-route allowlisted; auth session/bearer where handler requires it",
      "controller": "refreshSession",
      "routeSource": "apps/api-core/src/routes/auth-customer.ts",
      "controllerSource": "apps/api-core/src/controllers/auth/session.controller.ts",
      "request": {
        "schemas": [
          "refreshTokenRequestSchema"
        ],
        "evidence": "direct controller validation call",
        "fields": [],
        "fieldEvidence": "no direct field extraction; inspect named schema or delegated payload helper",
        "schemaFields": {
          "refreshTokenRequestSchema": {
            "fields": [
              "refreshToken"
            ],
            "source": "packages/sdk-shared/src/validation/index.ts",
            "evidence": "schema object property keys parsed from source"
          }
        },
        "types": [
          {
            "type": "{ refreshToken: string; }",
            "source": "apps/api-core/src/controllers/auth/session.controller.ts"
          }
        ]
      },
      "response": {
        "fields": [
          "session",
          "token",
          "refreshToken",
          "expiresAt",
          "refreshExpiresAt",
          "familyId",
          "generation",
          "authenticatedAt"
        ],
        "evidence": "literal top-level c.json object keys found in controller",
        "types": [
          "{ session: { token: string; refreshToken: string; expiresAt: number; refreshExpiresAt: number | null; familyId: string; generation: number; authenticatedAt: number; }; }"
        ]
      },
      "notes": "before customer middleware; authLimiter on mutation endpoints",
      "controllerSignature": "export async function refreshSession(c: Context<"
    },
    {
      "method": "GET",
      "path": "/v1/auth/user",
      "auth": "api key middleware; listed auth methods are public-route allowlisted; auth session/bearer where handler requires it",
      "controller": "getCurrentUser",
      "routeSource": "apps/api-core/src/routes/auth-customer.ts",
      "controllerSource": "apps/api-core/src/controllers/auth/session.controller.ts",
      "request": {
        "schemas": [],
        "evidence": "uncertain: no direct named schema call in handler body",
        "fields": [],
        "fieldEvidence": "no direct field extraction; inspect named schema or delegated payload helper",
        "schemaFields": {},
        "types": []
      },
      "response": {
        "fields": [
          "user",
          "customer",
          "isAnonymous",
          "error",
          "message",
          "customerId"
        ],
        "evidence": "literal top-level c.json object keys found in controller",
        "types": [
          "{ user: { id: string; email: string; firstName: string | null; lastName: string | null; name: string; emailVerified: boolean; emailUnreachable: boolean; image: string | null; connectedAccounts: never[]; preferences: UserPreferences; }; customer: { customerId: string; isAnonymous: false; }; }",
          "{ error: string; message: string; }",
          "{ user: import(\"/Users/hm/Projects/One/packages/sdk-shared/dist/index\").CustomerAuthUser; customer: { customerId: string; isAnonymous: false; }; }"
        ]
      },
      "notes": "before customer middleware; authLimiter on mutation endpoints",
      "controllerSignature": "export async function getCurrentUser(c: Context<"
    },
    {
      "method": "PATCH",
      "path": "/v1/auth/user",
      "auth": "api key middleware; listed auth methods are public-route allowlisted; auth session/bearer where handler requires it",
      "controller": "updateUser",
      "routeSource": "apps/api-core/src/routes/auth-customer.ts",
      "controllerSource": "apps/api-core/src/controllers/auth/session.controller.ts",
      "request": {
        "schemas": [
          "bodySchema"
        ],
        "evidence": "direct controller validation call",
        "fields": [
          "name",
          "image"
        ],
        "fieldEvidence": "direct controller destructuring/query/path read",
        "schemaFields": {
          "bodySchema": {
            "fields": [
              "id_token",
              "customerId",
              "state",
              "oauthState",
              "allowSignUp"
            ],
            "source": "apps/api-core/src/controllers/auth/oauth.controller.ts",
            "evidence": "schema object property keys parsed from source"
          }
        },
        "types": [
          {
            "type": "{ firstName?: string | undefined; lastName?: string | undefined; name?: string | undefined; imageUrl?: string | null | undefined; image?: string | null | undefined; }",
            "source": "apps/api-core/src/controllers/auth/session.controller.ts"
          }
        ]
      },
      "response": {
        "fields": [
          "error",
          "message",
          "user"
        ],
        "evidence": "literal top-level c.json object keys found in controller",
        "types": [
          "{ error: string; message: string; }",
          "{ user: { id: string; email: string; firstName: string | null; lastName: string | null; name: string; emailVerified: boolean; emailUnreachable: boolean; image: string | null; connectedAccounts: never[]; preferences: UserPreferences; }; }",
          "{ user: import(\"/Users/hm/Projects/One/packages/sdk-shared/dist/index\").CustomerAuthUser; }"
        ]
      },
      "notes": "before customer middleware; authLimiter on mutation endpoints",
      "controllerSignature": "export async function updateUser(c: Context<"
    },
    {
      "method": "GET",
      "path": "/v1/auth/accounts",
      "auth": "api key middleware; listed auth methods are public-route allowlisted; auth session/bearer where handler requires it",
      "controller": "getAccounts",
      "routeSource": "apps/api-core/src/routes/auth-customer.ts",
      "controllerSource": "apps/api-core/src/controllers/auth/session.controller.ts",
      "request": {
        "schemas": [],
        "evidence": "uncertain: no direct named schema call in handler body",
        "fields": [],
        "fieldEvidence": "no direct field extraction; inspect named schema or delegated payload helper",
        "schemaFields": {},
        "types": []
      },
      "response": {
        "fields": [
          "accounts",
          "error",
          "message"
        ],
        "evidence": "literal top-level c.json object keys found in controller",
        "types": [
          "{ accounts: ConnectedAccount[]; }",
          "{ error: string; message: string; }"
        ]
      },
      "notes": "before customer middleware; authLimiter on mutation endpoints",
      "controllerSignature": "export async function getAccounts(c: Context<"
    },
    {
      "method": "DELETE",
      "path": "/v1/auth/accounts/:id",
      "auth": "api key middleware; listed auth methods are public-route allowlisted; auth session/bearer where handler requires it",
      "controller": "deleteAccount",
      "routeSource": "apps/api-core/src/routes/auth-customer.ts",
      "controllerSource": "apps/api-core/src/controllers/auth/session.controller.ts",
      "request": {
        "schemas": [],
        "evidence": "uncertain: no direct named schema call in handler body",
        "fields": [
          "path.id"
        ],
        "fieldEvidence": "direct controller destructuring/query/path read",
        "schemaFields": {},
        "types": []
      },
      "response": {
        "fields": [
          "error",
          "message",
          "success"
        ],
        "evidence": "literal top-level c.json object keys found in controller",
        "types": [
          "{ error: string; message: string; }",
          "{ success: true; }"
        ]
      },
      "notes": "before customer middleware; authLimiter on mutation endpoints",
      "controllerSignature": "export async function deleteAccount(c: Context<"
    },
    {
      "method": "POST",
      "path": "/v1/auth/password",
      "auth": "api key middleware; listed auth methods are public-route allowlisted; auth session/bearer where handler requires it",
      "controller": "updatePassword",
      "routeSource": "apps/api-core/src/routes/auth-customer.ts",
      "controllerSource": "apps/api-core/src/controllers/auth/session.controller.ts",
      "request": {
        "schemas": [
          "bodySchema"
        ],
        "evidence": "direct controller validation call",
        "fields": [
          "oldPassword"
        ],
        "fieldEvidence": "direct controller destructuring/query/path read",
        "schemaFields": {
          "bodySchema": {
            "fields": [
              "id_token",
              "customerId",
              "state",
              "oauthState",
              "allowSignUp"
            ],
            "source": "apps/api-core/src/controllers/auth/oauth.controller.ts",
            "evidence": "schema object property keys parsed from source"
          }
        },
        "types": [
          {
            "type": "{ newPassword: string; oldPassword?: string | undefined; }",
            "source": "apps/api-core/src/controllers/auth/session.controller.ts"
          },
          {
            "type": "{ key: string; revision: number; occurrenceId: string; properties: Record<string, string>; attemptId?: string | undefined; sequence?: number | undefined; }",
            "source": "apps/api-core/src/services/events/events.service.ts"
          }
        ]
      },
      "response": {
        "fields": [
          "error",
          "message",
          "success",
          "session",
          "token",
          "refreshToken",
          "expiresAt",
          "refreshExpiresAt",
          "familyId",
          "generation",
          "authenticatedAt"
        ],
        "evidence": "literal top-level c.json object keys found in controller",
        "types": [
          "{ error: string; message: string; }",
          "{ success: true; }",
          "{ session?: { token: string; refreshToken: string; expiresAt: number; refreshExpiresAt: number | null; familyId: string; generation: number; authenticatedAt: number; } | undefined; success: true; }"
        ]
      },
      "notes": "before customer middleware; authLimiter on mutation endpoints",
      "controllerSignature": "export async function updatePassword(c: Context<"
    },
    {
      "method": "GET",
      "path": "/v1/auth/has-password",
      "auth": "api key middleware; listed auth methods are public-route allowlisted; auth session/bearer where handler requires it",
      "controller": "hasPassword",
      "routeSource": "apps/api-core/src/routes/auth-customer.ts",
      "controllerSource": "apps/api-core/src/controllers/auth/session.controller.ts",
      "request": {
        "schemas": [],
        "evidence": "uncertain: no direct named schema call in handler body",
        "fields": [],
        "fieldEvidence": "no direct field extraction; inspect named schema or delegated payload helper",
        "schemaFields": {},
        "types": []
      },
      "response": {
        "fields": [
          "hasPassword",
          "error",
          "message"
        ],
        "evidence": "literal top-level c.json object keys found in controller",
        "types": [
          "{ hasPassword: boolean; }",
          "{ error: string; message: string; }"
        ]
      },
      "notes": "before customer middleware; authLimiter on mutation endpoints",
      "controllerSignature": "export async function hasPassword(c: Context<"
    },
    {
      "method": "GET",
      "path": "/v1/auth/preferences",
      "auth": "api key middleware; listed auth methods are public-route allowlisted; auth session/bearer where handler requires it",
      "controller": "getPreferences",
      "routeSource": "apps/api-core/src/routes/auth-customer.ts",
      "controllerSource": "apps/api-core/src/controllers/auth/session.controller.ts",
      "request": {
        "schemas": [],
        "evidence": "uncertain: no direct named schema call in handler body",
        "fields": [],
        "fieldEvidence": "no direct field extraction; inspect named schema or delegated payload helper",
        "schemaFields": {},
        "types": []
      },
      "response": {
        "fields": [
          "preferences",
          "error",
          "message"
        ],
        "evidence": "literal top-level c.json object keys found in controller",
        "types": [
          "{ preferences: UserPreferences; }",
          "{ error: string; message: string; }"
        ]
      },
      "notes": "before customer middleware; authLimiter on mutation endpoints",
      "controllerSignature": "export async function getPreferences(c: Context<"
    },
    {
      "method": "PATCH",
      "path": "/v1/auth/preferences",
      "auth": "api key middleware; listed auth methods are public-route allowlisted; auth session/bearer where handler requires it",
      "controller": "updatePreferences",
      "routeSource": "apps/api-core/src/routes/auth-customer.ts",
      "controllerSource": "apps/api-core/src/controllers/auth/session.controller.ts",
      "request": {
        "schemas": [
          "bodySchema"
        ],
        "evidence": "direct controller validation call",
        "fields": [],
        "fieldEvidence": "no direct field extraction; inspect named schema or delegated payload helper",
        "schemaFields": {
          "bodySchema": {
            "fields": [
              "id_token",
              "customerId",
              "state",
              "oauthState",
              "allowSignUp"
            ],
            "source": "apps/api-core/src/controllers/auth/oauth.controller.ts",
            "evidence": "schema object property keys parsed from source"
          }
        },
        "types": [
          {
            "type": "{ [x: string]: unknown; }",
            "source": "apps/api-core/src/controllers/auth/session.controller.ts"
          }
        ]
      },
      "response": {
        "fields": [
          "error",
          "message",
          "preferences"
        ],
        "evidence": "literal top-level c.json object keys found in controller",
        "types": [
          "{ error: string; message: string; }",
          "{ preferences: UserPreferences; }",
          "{ preferences: Record<string, any>; }"
        ]
      },
      "notes": "before customer middleware; authLimiter on mutation endpoints",
      "controllerSignature": "export async function updatePreferences(c: Context<"
    },
    {
      "method": "POST",
      "path": "/v1/auth/alias-customer",
      "auth": "api key middleware; listed auth methods are public-route allowlisted; auth session/bearer where handler requires it",
      "controller": "aliasCustomer",
      "routeSource": "apps/api-core/src/routes/auth-customer.ts",
      "controllerSource": "apps/api-core/src/controllers/auth/session.controller.ts",
      "request": {
        "schemas": [
          "aliasCustomerSchema"
        ],
        "evidence": "direct controller validation call",
        "fields": [
          "fromCustomerId"
        ],
        "fieldEvidence": "direct controller destructuring/query/path read",
        "schemaFields": {
          "aliasCustomerSchema": {
            "fields": [
              "fromCustomerId",
              "toCustomerId"
            ],
            "source": "packages/sdk-shared/src/validation/index.ts",
            "evidence": "schema object property keys parsed from source"
          }
        },
        "types": [
          {
            "type": "{ fromCustomerId: string; toCustomerId: string; }",
            "source": "apps/api-core/src/controllers/auth/session.controller.ts"
          }
        ]
      },
      "response": {
        "fields": [
          "error",
          "message",
          "success"
        ],
        "evidence": "literal top-level c.json object keys found in controller",
        "types": [
          "{ error: string; message: string; }",
          "{ success: true; }"
        ]
      },
      "notes": "before customer middleware; authLimiter on mutation endpoints",
      "controllerSignature": "export async function aliasCustomer(c: Context<"
    },
    {
      "method": "GET",
      "path": "/v1/auth/account/preflight",
      "auth": "api key middleware; listed auth methods are public-route allowlisted; auth session/bearer where handler requires it",
      "controller": "deleteUserAccountPreflight",
      "routeSource": "apps/api-core/src/routes/auth-customer.ts",
      "controllerSource": "apps/api-core/src/controllers/auth/session.controller.ts",
      "request": {
        "schemas": [],
        "evidence": "uncertain: no direct named schema call in handler body",
        "fields": [],
        "fieldEvidence": "no direct field extraction; inspect named schema or delegated payload helper",
        "schemaFields": {},
        "types": []
      },
      "response": {
        "fields": [
          "canDelete",
          "checks",
          "message",
          "code",
          "type",
          "error"
        ],
        "evidence": "literal top-level c.json object keys found in controller",
        "types": [
          "{ canDelete: false; checks: { message: string; code: string; type: string; }[]; }",
          "{ error: string; message: string; }",
          "{ canDelete: boolean; checks: AccountPreflightCheck[]; }"
        ]
      },
      "notes": "before customer middleware; authLimiter on mutation endpoints",
      "controllerSignature": "export async function deleteUserAccountPreflight(c: Context<"
    },
    {
      "method": "DELETE",
      "path": "/v1/auth/account",
      "auth": "api key middleware; listed auth methods are public-route allowlisted; auth session/bearer where handler requires it",
      "controller": "deleteUserAccount",
      "routeSource": "apps/api-core/src/routes/auth-customer.ts",
      "controllerSource": "apps/api-core/src/controllers/auth/session.controller.ts",
      "request": {
        "schemas": [],
        "evidence": "uncertain: no direct named schema call in handler body",
        "fields": [],
        "fieldEvidence": "no direct field extraction; inspect named schema or delegated payload helper",
        "schemaFields": {},
        "types": [
          {
            "type": "{ password?: string | undefined; }",
            "source": "apps/api-core/src/controllers/auth/session.controller.ts"
          },
          {
            "type": "{ key: string; revision: number; occurrenceId: string; properties: Record<string, string>; attemptId?: string | undefined; sequence?: number | undefined; }",
            "source": "apps/api-core/src/services/events/events.service.ts"
          }
        ]
      },
      "response": {
        "fields": [
          "error",
          "message",
          "success",
          "mode",
          "customerPreserved",
          "customerId",
          "workspaceCustomerDetached",
          "credentialAccountsDeleted",
          "sharedIdentityPreserved",
          "authIdentityDeleted",
          "manualProviderRevocationRequired",
          "scope",
          "deletedAppIds"
        ],
        "evidence": "literal top-level c.json object keys found in controller",
        "types": [
          "{ error: string; message: string; }",
          "{ success: true; mode: string; customerPreserved: boolean; customerId: string | null; workspaceCustomerDetached: boolean; credentialAccountsDeleted: number; sharedIdentityPreserved: boolean; authIdentityDeleted: boolean; manualProviderRevocationRequired: never[]; }",
          "{ success: true; scope: string; deletedAppIds: string[]; authIdentityDeleted: boolean; manualProviderRevocationRequired: string[]; }"
        ]
      },
      "notes": "before customer middleware; authLimiter on mutation endpoints",
      "controllerSignature": "export async function deleteUserAccount(c: Context<"
    },
    {
      "method": "DELETE",
      "path": "/v1/auth/user",
      "auth": "api key middleware; listed auth methods are public-route allowlisted; auth session/bearer where handler requires it",
      "controller": "deleteUserAccount",
      "routeSource": "apps/api-core/src/routes/auth-customer.ts",
      "controllerSource": "apps/api-core/src/controllers/auth/session.controller.ts",
      "request": {
        "schemas": [],
        "evidence": "uncertain: no direct named schema call in handler body",
        "fields": [],
        "fieldEvidence": "no direct field extraction; inspect named schema or delegated payload helper",
        "schemaFields": {},
        "types": [
          {
            "type": "{ password?: string | undefined; }",
            "source": "apps/api-core/src/controllers/auth/session.controller.ts"
          },
          {
            "type": "{ key: string; revision: number; occurrenceId: string; properties: Record<string, string>; attemptId?: string | undefined; sequence?: number | undefined; }",
            "source": "apps/api-core/src/services/events/events.service.ts"
          }
        ]
      },
      "response": {
        "fields": [
          "error",
          "message",
          "success",
          "mode",
          "customerPreserved",
          "customerId",
          "workspaceCustomerDetached",
          "credentialAccountsDeleted",
          "sharedIdentityPreserved",
          "authIdentityDeleted",
          "manualProviderRevocationRequired",
          "scope",
          "deletedAppIds"
        ],
        "evidence": "literal top-level c.json object keys found in controller",
        "types": [
          "{ error: string; message: string; }",
          "{ success: true; mode: string; customerPreserved: boolean; customerId: string | null; workspaceCustomerDetached: boolean; credentialAccountsDeleted: number; sharedIdentityPreserved: boolean; authIdentityDeleted: boolean; manualProviderRevocationRequired: never[]; }",
          "{ success: true; scope: string; deletedAppIds: string[]; authIdentityDeleted: boolean; manualProviderRevocationRequired: string[]; }"
        ]
      },
      "notes": "before customer middleware; authLimiter on mutation endpoints",
      "controllerSignature": "export async function deleteUserAccount(c: Context<"
    },
    {
      "method": "GET",
      "path": "/v1/apps/current",
      "auth": "api key",
      "controller": "inline route handler",
      "routeSource": "apps/api-core/src/routes/apps.ts",
      "controllerSource": "apps/api-core/src/routes/apps.ts",
      "request": {
        "schemas": [],
        "evidence": "uncertain: no direct named schema call in handler body",
        "fields": [],
        "fieldEvidence": "no direct field extraction; inspect named schema or delegated payload helper",
        "schemaFields": {},
        "types": [
          {
            "type": "\"account\" | \"app_store\"",
            "source": "apps/api-core/src/services/products/paid-access-configuration.service.ts"
          },
          {
            "type": "{ version: 1; policy: \"account\"; } | { version: 1; policy: \"app_store\"; products: { productIdentifier: string; kind: \"subscription\" | \"non_consumable\"; entitlementIdentifiers: string[]; familySharingEnabled: boolean; }[]; appPurchaseRules?: { entitlementIdentifiers: string[]; originalAppVersionFormat?: \"integer\" | \"dotted\" | undefined; originalAppVersionBefore?: string | undefined; originalPurchaseDateBefore?: string | undefined; }[] | undefined; }",
            "source": "apps/api-core/src/services/products/paid-access-configuration.service.ts"
          },
          {
            "type": "{ contractVersion: 2; metrics: { key: string; revision: number; label: string; unit: \"duration\" | \"count\" | \"bytes\" | \"credits\"; scale: number; allowedSources: (\"server\" | \"client\")[]; dimensionKeys: string[]; entitlementId: string | null; isActive: boolean; }[]; dimensions: { key: string; allowedValues: string[]; }[]; }",
            "source": "apps/api-core/src/services/usage/usage-metric-registry.service.ts"
          }
        ]
      },
      "response": {
        "fields": [
          "error"
        ],
        "evidence": "literal c.json object keys found in handler; nested/result fields may be dynamic",
        "types": [
          "{ error: string; }",
          "{ auth: { methods: AuthMethodCapability[]; }; support: { contactMode: \"optional_email\" | \"required_email\" | \"authenticated_account\"; emailVerificationMode: \"none\" | \"optional\" | \"required\"; }; usage?: { contractVersion: 2; metrics: { key: string; revision: number; label: string; unit: \"duration\" | \"count\" | \"bytes\" | \"credits\"; scale: number; allowedSources: (\"server\" | \"client\")[]; dimensionKeys: string[]; entitlementId: string | null; isActive: boolean; }[]; dimensions: { key: string; allowedValues: string[]; }[]; } | undefined; appId: string; name: string; appearance: import(\"/Users/hm/Projects/One/packages/sdk-shared/dist/index\").AppAppearance; paidAccess: import(\"/Users/hm/Projects/One/packages/sdk-shared/dist/index\").PaidAccessConfiguration; remoteConfig?: Record<string, import(\"/Users/hm/Projects/One/apps/api-core/src/services/rules/sdk-remote-config.service\").SDKRemoteConfigEntry> | undefined; }"
        ]
      },
      "notes": "before customer middleware",
      "controllerSignature": "async (c) =>"
    },
    {
      "method": "POST",
      "path": "/v1/emails/send",
      "auth": "api key",
      "controller": "handleSendEmail",
      "routeSource": "apps/api-core/src/routes/emails.ts",
      "controllerSource": "apps/api-core/src/controllers/emails.controller.ts",
      "request": {
        "schemas": [],
        "evidence": "uncertain: no direct named schema call in handler body",
        "fields": [],
        "fieldEvidence": "no direct field extraction; inspect named schema or delegated payload helper",
        "schemaFields": {},
        "types": [
          {
            "type": "string",
            "source": "apps/api-core/src/controllers/emails.controller.ts"
          }
        ]
      },
      "response": {
        "fields": [
          "error",
          "message"
        ],
        "evidence": "literal top-level c.json object keys found in controller",
        "types": [
          "{ error: string; message: string; }",
          "{ success: boolean; error: string; message: string; } | { id?: string | undefined; success: boolean; message: string; error?: undefined; }"
        ]
      },
      "notes": "before customer middleware",
      "controllerSignature": "export async function handleSendEmail(c: Context<"
    },
    {
      "method": "GET",
      "path": "/v1/integrations/:provider/runtime-config",
      "auth": "api key",
      "controller": "inline route handler",
      "routeSource": "apps/api-core/src/routes/integrations.ts",
      "controllerSource": "apps/api-core/src/routes/integrations.ts",
      "request": {
        "schemas": [],
        "evidence": "uncertain: no direct named schema call in handler body",
        "fields": [
          "path.provider"
        ],
        "fieldEvidence": "direct controller destructuring/query/path read",
        "schemaFields": {},
        "types": [
          {
            "type": "\"stripe\" | \"apple_app_store\" | \"google_play\" | \"google\" | \"apple\" | \"microsoft\" | \"github\" | \"apns\" | \"fcm\" | \"cloudflare_email\"",
            "source": "apps/api-core/src/routes/integrations.ts"
          }
        ]
      },
      "response": {
        "fields": [
          "error",
          "message",
          "provider",
          "status",
          "publicConfig",
          "secrets"
        ],
        "evidence": "literal c.json object keys found in handler; nested/result fields may be dynamic",
        "types": [
          "{ error: string; message: string; }",
          "{ provider: \"stripe\" | \"apple_app_store\" | \"google_play\" | \"google\" | \"apple\" | \"microsoft\" | \"github\" | \"apns\" | \"fcm\" | \"cloudflare_email\" | \"apple_app_store_connect\"; status: \"active\"; publicConfig: import(\"/Users/hm/Projects/One/packages/db/dist/json-types\").IntegrationPublicConfig; secrets: Record<string, string>; }"
        ]
      },
      "notes": "before customer middleware",
      "controllerSignature": "async (c) =>"
    },
    {
      "method": "POST",
      "path": "/v1/notifications/send",
      "auth": "api key; no customer middleware (server-to-server)",
      "controller": "sendPush",
      "routeSource": "apps/api-core/src/routes/notifications.ts",
      "controllerSource": "apps/api-core/src/controllers/notifications/notifications.controller.ts",
      "request": {
        "schemas": [
          "sendPushNotificationRequestSchema"
        ],
        "evidence": "direct controller validation call",
        "fields": [],
        "fieldEvidence": "no direct field extraction; inspect named schema or delegated payload helper",
        "schemaFields": {
          "sendPushNotificationRequestSchema": {
            "fields": [
              "title",
              "body",
              "customerId",
              "email",
              "emails",
              "apnsTokens",
              "data",
              "badge",
              "sound"
            ],
            "source": "packages/sdk-shared/src/validation/index.ts",
            "evidence": "schema object property keys parsed from source"
          }
        },
        "types": [
          {
            "type": "{ title: string; body: string; customerId?: string | undefined; email?: string | undefined; emails?: string[] | undefined; apnsTokens?: string[] | undefined; data?: Record<string, string> | undefined; badge?: number | undefined; sound?: string | undefined; }",
            "source": "apps/api-core/src/controllers/notifications/notifications.controller.ts"
          }
        ]
      },
      "response": {
        "fields": [
          "error",
          "message",
          "email",
          "customerId"
        ],
        "evidence": "literal top-level c.json object keys found in controller",
        "types": [
          "{ error: string; message: string; }",
          "import(\"/Users/hm/Projects/One/packages/sdk-shared/dist/index\").SendPushNotificationResult"
        ]
      },
      "notes": "before customer middleware",
      "controllerSignature": "static async sendPush(c: Context<"
    },
    {
      "method": "POST",
      "path": "/v1/actions/evaluate",
      "auth": "api key",
      "controller": "handleEvaluateAction",
      "routeSource": "apps/api-core/src/routes/actions.ts",
      "controllerSource": "apps/api-core/src/controllers/actions.controller.ts",
      "request": {
        "schemas": [],
        "evidence": "uncertain: no direct named schema call in handler body",
        "fields": [],
        "fieldEvidence": "no direct field extraction; inspect named schema or delegated payload helper",
        "schemaFields": {},
        "types": [
          {
            "type": "{ identifier: string; input?: Record<string, unknown> | undefined; }",
            "source": "apps/api-core/src/controllers/actions.controller.ts"
          }
        ]
      },
      "response": {
        "fields": [
          "error",
          "message"
        ],
        "evidence": "literal top-level c.json object keys found in controller",
        "types": [
          "{ error: string; message: string; }",
          "{ executed: boolean; result: unknown; reason: string; action?: undefined; } | { executed: boolean; result: unknown; action: { grantId: string; entitlementIdentifier: string; reason?: string | undefined; type: string; status: string; }; reason?: undefined; }",
          "{ result: unknown; }"
        ]
      },
      "notes": "before customer middleware",
      "controllerSignature": "export async function handleEvaluateAction(c: Context<"
    },
    {
      "method": "GET",
      "path": "/v1/paywalls",
      "auth": "api key",
      "controller": "handleListPaywallCatalog",
      "routeSource": "apps/api-core/src/routes/paywalls.ts",
      "controllerSource": "apps/api-core/src/controllers/products/paywall.controller.ts",
      "request": {
        "schemas": [],
        "evidence": "uncertain: no direct named schema call in handler body",
        "fields": [
          "platform"
        ],
        "fieldEvidence": "direct controller destructuring/query/path read",
        "schemaFields": {},
        "types": [
          {
            "type": "\"ios\" | \"android\" | \"web\" | \"windows\" | \"macos\"",
            "source": "apps/api-core/src/controllers/products/paywall.controller.ts"
          },
          {
            "type": "{ paywall: { id: string; identifier: string; name: string; config: unknown; description?: string | null | undefined; }; paywallProducts: { id: string; identifier: string; product: { id: string; identifier: string; name: string; pricingType: \"subscription\" | \"non_consumable\" | \"consumable\" | \"free\"; pricingPeriod: \"month\" | \"year\" | null; description?: string | null | undefined; }; productPrice: { id: string; provider: \"stripe\" | \"apple_app_store\" | \"google_play\" | \"microsoft_store\" | \"custom\"; platform: \"ios\" | \"android\" | \"web\" | \"windows\" | \"macos\" | null; providerProductId: string; providerPriceId?: string | null | undefined; currency?: string | null | undefined; unitAmount?: number | null | undefined; billingPeriod?: \"month\" | \"year\" | null | undefined; trialOffer?: { type: \"free_trial\"; trialPeriodDays?: number | undefined; appleSubscriptionGroupId?: string | undefined; } | null | undefined; } | null; prices?: Partial<Record<\"stripe\" | \"apple_app_store\" | \"google_play\" | \"microsoft_store\" | \"custom\", { amountMinor: number; currency: string; interval: \"month\" | \"year\" | null; intervalCount: number; }>> | undefined; }[]; paywallOffers?: { identifier: string; productIdentifier: string; offerKind: \"subscription_offer_code\" | \"in_app_purchase_offer_code\"; prices: { territory: string; pricePointId: string; customerPrice: string; currency: string; }[]; offerMode?: \"free\" | \"pay_as_you_go\" | \"pay_up_front\" | \"discount\" | null | undefined; duration?: string | null | undefined; numberOfPeriods?: number | null | undefined; autoRenews?: boolean | null | undefined; regularPrice?: { amountMinor: number; currency: string; billingPeriod?: \"month\" | \"year\" | null | undefined; } | undefined; }[] | undefined; campaign?: { placementId: string; placementIdentifier: string; targetType: \"paywall\" | \"in_app_surface\" | \"survey\" | \"custom\" | \"none\"; campaignId?: string | null | undefined; campaignIdentifier?: string | null | undefined; campaignAudienceId?: string | null | undefined; campaignAudienceIdentifier?: string | null | undefined; campaignVariantId?: string | null | undefined; campaignVariantIdentifier?: string | null | undefined; campaignAssignmentId?: string | null | undefined; } | undefined; }",
            "source": "apps/api-core/src/services/creative-compatibility.service.ts"
          }
        ]
      },
      "response": {
        "fields": [
          "error",
          "message",
          "details",
          "paywalls"
        ],
        "evidence": "literal top-level c.json object keys found in controller",
        "types": [
          "{ error: string; message: string; details: import(\"/Users/hm/Projects/One/node_modules/.pnpm/zod@4.3.5/node_modules/zod/index\").ZodFlattenedError<\"ios\" | \"android\" | \"web\" | \"windows\" | \"macos\", string>; }",
          "{ paywalls: never[]; }",
          "{ paywalls: { response: import(\"/Users/hm/Projects/One/packages/sdk-shared/dist/index\").PaywallResponse; id: string; identifier: string; name: string; description: string | null; status: \"active\" | \"inactive\" | \"archived\"; isDefault: boolean; updatedAt: Date; }[]; }"
        ]
      },
      "notes": "before customer middleware",
      "controllerSignature": "export async function handleListPaywallCatalog(c: Context<"
    },
    {
      "method": "GET",
      "path": "/v1/paywalls/:identifier",
      "auth": "api key",
      "controller": "handleEvaluatePaywall",
      "routeSource": "apps/api-core/src/routes/paywalls.ts",
      "controllerSource": "apps/api-core/src/controllers/products/paywall.controller.ts",
      "request": {
        "schemas": [],
        "evidence": "uncertain: no direct named schema call in handler body",
        "fields": [
          "platform",
          "path.identifier"
        ],
        "fieldEvidence": "direct controller destructuring/query/path read",
        "schemaFields": {},
        "types": [
          {
            "type": "{ identifier: string; platform: \"ios\" | \"android\" | \"web\" | \"windows\" | \"macos\"; }",
            "source": "apps/api-core/src/controllers/products/paywall.controller.ts"
          },
          {
            "type": "{ paywall: { id: string; identifier: string; name: string; config: unknown; description?: string | null | undefined; }; paywallProducts: { id: string; identifier: string; product: { id: string; identifier: string; name: string; pricingType: \"subscription\" | \"non_consumable\" | \"consumable\" | \"free\"; pricingPeriod: \"month\" | \"year\" | null; description?: string | null | undefined; }; productPrice: { id: string; provider: \"stripe\" | \"apple_app_store\" | \"google_play\" | \"microsoft_store\" | \"custom\"; platform: \"ios\" | \"android\" | \"web\" | \"windows\" | \"macos\" | null; providerProductId: string; providerPriceId?: string | null | undefined; currency?: string | null | undefined; unitAmount?: number | null | undefined; billingPeriod?: \"month\" | \"year\" | null | undefined; trialOffer?: { type: \"free_trial\"; trialPeriodDays?: number | undefined; appleSubscriptionGroupId?: string | undefined; } | null | undefined; } | null; prices?: Partial<Record<\"stripe\" | \"apple_app_store\" | \"google_play\" | \"microsoft_store\" | \"custom\", { amountMinor: number; currency: string; interval: \"month\" | \"year\" | null; intervalCount: number; }>> | undefined; }[]; paywallOffers?: { identifier: string; productIdentifier: string; offerKind: \"subscription_offer_code\" | \"in_app_purchase_offer_code\"; prices: { territory: string; pricePointId: string; customerPrice: string; currency: string; }[]; offerMode?: \"free\" | \"pay_as_you_go\" | \"pay_up_front\" | \"discount\" | null | undefined; duration?: string | null | undefined; numberOfPeriods?: number | null | undefined; autoRenews?: boolean | null | undefined; regularPrice?: { amountMinor: number; currency: string; billingPeriod?: \"month\" | \"year\" | null | undefined; } | undefined; }[] | undefined; campaign?: { placementId: string; placementIdentifier: string; targetType: \"paywall\" | \"in_app_surface\" | \"survey\" | \"custom\" | \"none\"; campaignId?: string | null | undefined; campaignIdentifier?: string | null | undefined; campaignAudienceId?: string | null | undefined; campaignAudienceIdentifier?: string | null | undefined; campaignVariantId?: string | null | undefined; campaignVariantIdentifier?: string | null | undefined; campaignAssignmentId?: string | null | undefined; } | undefined; }",
            "source": "apps/api-core/src/services/creative-compatibility.service.ts"
          }
        ]
      },
      "response": {
        "fields": [
          "error",
          "message",
          "details"
        ],
        "evidence": "literal top-level c.json object keys found in controller",
        "types": [
          "{ error: string; message: string; details: import(\"/Users/hm/Projects/One/node_modules/.pnpm/zod@4.3.5/node_modules/zod/index\").ZodFlattenedError<{ identifier: string; platform: \"ios\" | \"android\" | \"web\" | \"windows\" | \"macos\"; }, string>; }",
          "{ error: string; message: string; }",
          "import(\"/Users/hm/Projects/One/packages/sdk-shared/dist/index\").PaywallResponse"
        ]
      },
      "notes": "before customer middleware",
      "controllerSignature": "export async function handleEvaluatePaywall(c: Context<"
    },
    {
      "method": "GET",
      "path": "/v1/preview/live",
      "auth": "api key",
      "controller": "inline route handler",
      "routeSource": "apps/api-core/src/routes/preview-live.ts",
      "controllerSource": "apps/api-core/src/routes/preview-live.ts",
      "request": {
        "schemas": [],
        "evidence": "uncertain: no direct named schema call in handler body",
        "fields": [],
        "fieldEvidence": "no direct field extraction; inspect named schema or delegated payload helper",
        "schemaFields": {},
        "types": []
      },
      "response": {
        "fields": [
          "error",
          "message"
        ],
        "evidence": "literal c.json object keys found in handler; nested/result fields may be dynamic",
        "types": [
          "{ error: string; message: string; }"
        ]
      },
      "notes": "before customer middleware",
      "controllerSignature": "(c) =>"
    },
    {
      "method": "GET",
      "path": "/v1/entitlements/catalog",
      "auth": "api key",
      "controller": "handleGetEntitlementCatalog",
      "routeSource": "apps/api-core/src/routes/entitlements.ts",
      "controllerSource": "apps/api-core/src/controllers/products/entitlements.controller.ts",
      "request": {
        "schemas": [],
        "evidence": "uncertain: no direct named schema call in handler body",
        "fields": [],
        "fieldEvidence": "no direct field extraction; inspect named schema or delegated payload helper",
        "schemaFields": {},
        "types": []
      },
      "response": {
        "fields": [],
        "evidence": "uncertain: response is variable/service result or no direct literal c.json object",
        "types": [
          "EntitlementCatalogResponse"
        ]
      },
      "notes": "before customer middleware",
      "controllerSignature": "export async function handleGetEntitlementCatalog(c: Context<"
    },
    {
      "method": "POST",
      "path": "/v1/placements/:identifier/evaluate",
      "auth": "api key + customer middleware",
      "controller": "handleEvaluatePlacement",
      "routeSource": "apps/api-core/src/routes/placements.ts",
      "controllerSource": "apps/api-core/src/controllers/products/placement.controller.ts",
      "request": {
        "schemas": [],
        "evidence": "uncertain: no direct named schema call in handler body",
        "fields": [
          "path.identifier"
        ],
        "fieldEvidence": "direct controller destructuring/query/path read",
        "schemaFields": {},
        "types": [
          {
            "type": "{ requestId: string; mode: \"manual\" | \"automatic\"; }",
            "source": "apps/api-core/src/controllers/products/placement.controller.ts"
          },
          {
            "type": "unknown",
            "source": "apps/api-core/src/services/creative-compatibility.service.ts"
          },
          {
            "type": "{ paywall: { id: string; identifier: string; name: string; config: unknown; description?: string | null | undefined; }; paywallProducts: { id: string; identifier: string; product: { id: string; identifier: string; name: string; pricingType: \"subscription\" | \"non_consumable\" | \"consumable\" | \"free\"; pricingPeriod: \"month\" | \"year\" | null; description?: string | null | undefined; }; productPrice: { id: string; provider: \"stripe\" | \"apple_app_store\" | \"google_play\" | \"microsoft_store\" | \"custom\"; platform: \"ios\" | \"android\" | \"web\" | \"windows\" | \"macos\" | null; providerProductId: string; providerPriceId?: string | null | undefined; currency?: string | null | undefined; unitAmount?: number | null | undefined; billingPeriod?: \"month\" | \"year\" | null | undefined; trialOffer?: { type: \"free_trial\"; trialPeriodDays?: number | undefined; appleSubscriptionGroupId?: string | undefined; } | null | undefined; } | null; prices?: Partial<Record<\"stripe\" | \"apple_app_store\" | \"google_play\" | \"microsoft_store\" | \"custom\", { amountMinor: number; currency: string; interval: \"month\" | \"year\" | null; intervalCount: number; }>> | undefined; }[]; paywallOffers?: { identifier: string; productIdentifier: string; offerKind: \"subscription_offer_code\" | \"in_app_purchase_offer_code\"; prices: { territory: string; pricePointId: string; customerPrice: string; currency: string; }[]; offerMode?: \"free\" | \"pay_as_you_go\" | \"pay_up_front\" | \"discount\" | null | undefined; duration?: string | null | undefined; numberOfPeriods?: number | null | undefined; autoRenews?: boolean | null | undefined; regularPrice?: { amountMinor: number; currency: string; billingPeriod?: \"month\" | \"year\" | null | undefined; } | undefined; }[] | undefined; campaign?: { placementId: string; placementIdentifier: string; targetType: \"paywall\" | \"in_app_surface\" | \"survey\" | \"custom\" | \"none\"; campaignId?: string | null | undefined; campaignIdentifier?: string | null | undefined; campaignAudienceId?: string | null | undefined; campaignAudienceIdentifier?: string | null | undefined; campaignVariantId?: string | null | undefined; campaignVariantIdentifier?: string | null | undefined; campaignAssignmentId?: string | null | undefined; } | undefined; }",
            "source": "apps/api-core/src/services/creative-compatibility.service.ts"
          },
          {
            "type": "unknown",
            "source": "apps/api-core/src/services/creative-compatibility.service.ts"
          }
        ]
      },
      "response": {
        "fields": [
          "id",
          "identifier",
          "targetType"
        ],
        "evidence": "literal top-level c.json object keys found in controller",
        "types": [
          "{ id: string; identifier: string; targetType: string; }",
          "import(\"/Users/hm/Projects/One/packages/sdk-shared/dist/index\").PlacementEvaluationResponse",
          "{ campaign?: { targetType: \"none\"; placementId: string; placementIdentifier: string; campaignId?: string | null; campaignIdentifier?: string | null; campaignAudienceId?: string | null; campaignAudienceIdentifier?: string | null; campaignVariantId?: string | null; campaignVariantIdentifier?: string | null; campaignAssignmentId?: string | null; } | undefined; id: string; identifier: string; targetType: string; }"
        ]
      },
      "notes": "before customer middleware",
      "controllerSignature": "export async function handleEvaluatePlacement(c: Context<"
    },
    {
      "method": "GET",
      "path": "/v1/placements/:identifier/paywall",
      "auth": "api key; no customer middleware",
      "controller": "handlePresentationPaywall",
      "routeSource": "apps/api-core/src/routes/placements.ts",
      "controllerSource": "apps/api-core/src/controllers/products/placement.controller.ts",
      "request": {
        "schemas": [],
        "evidence": "uncertain: no direct named schema call in handler body",
        "fields": [
          "path.identifier"
        ],
        "fieldEvidence": "direct controller destructuring/query/path read",
        "schemaFields": {},
        "types": [
          {
            "type": "\"ios\" | \"android\" | \"web\" | \"windows\" | \"macos\"",
            "source": "apps/api-core/src/controllers/products/placement.controller.ts"
          },
          {
            "type": "{ paywall: { id: string; identifier: string; name: string; config: unknown; description?: string | null | undefined; }; paywallProducts: { id: string; identifier: string; product: { id: string; identifier: string; name: string; pricingType: \"subscription\" | \"non_consumable\" | \"consumable\" | \"free\"; pricingPeriod: \"month\" | \"year\" | null; description?: string | null | undefined; }; productPrice: { id: string; provider: \"stripe\" | \"apple_app_store\" | \"google_play\" | \"microsoft_store\" | \"custom\"; platform: \"ios\" | \"android\" | \"web\" | \"windows\" | \"macos\" | null; providerProductId: string; providerPriceId?: string | null | undefined; currency?: string | null | undefined; unitAmount?: number | null | undefined; billingPeriod?: \"month\" | \"year\" | null | undefined; trialOffer?: { type: \"free_trial\"; trialPeriodDays?: number | undefined; appleSubscriptionGroupId?: string | undefined; } | null | undefined; } | null; prices?: Partial<Record<\"stripe\" | \"apple_app_store\" | \"google_play\" | \"microsoft_store\" | \"custom\", { amountMinor: number; currency: string; interval: \"month\" | \"year\" | null; intervalCount: number; }>> | undefined; }[]; paywallOffers?: { identifier: string; productIdentifier: string; offerKind: \"subscription_offer_code\" | \"in_app_purchase_offer_code\"; prices: { territory: string; pricePointId: string; customerPrice: string; currency: string; }[]; offerMode?: \"free\" | \"pay_as_you_go\" | \"pay_up_front\" | \"discount\" | null | undefined; duration?: string | null | undefined; numberOfPeriods?: number | null | undefined; autoRenews?: boolean | null | undefined; regularPrice?: { amountMinor: number; currency: string; billingPeriod?: \"month\" | \"year\" | null | undefined; } | undefined; }[] | undefined; campaign?: { placementId: string; placementIdentifier: string; targetType: \"paywall\" | \"in_app_surface\" | \"survey\" | \"custom\" | \"none\"; campaignId?: string | null | undefined; campaignIdentifier?: string | null | undefined; campaignAudienceId?: string | null | undefined; campaignAudienceIdentifier?: string | null | undefined; campaignVariantId?: string | null | undefined; campaignVariantIdentifier?: string | null | undefined; campaignAssignmentId?: string | null | undefined; } | undefined; }",
            "source": "apps/api-core/src/services/creative-compatibility.service.ts"
          }
        ]
      },
      "response": {
        "fields": [
          "error",
          "message"
        ],
        "evidence": "literal top-level c.json object keys found in controller",
        "types": [
          "{ error: string; message: string; }",
          "import(\"/Users/hm/Projects/One/packages/sdk-shared/dist/index\").PaywallResponse"
        ]
      },
      "notes": "before customer middleware",
      "controllerSignature": "export async function handlePresentationPaywall(c: Context<"
    },
    {
      "method": "POST",
      "path": "/v1/payments/apple/sync",
      "auth": "api key + customer middleware",
      "controller": "syncAppleTransactions",
      "routeSource": "apps/api-core/src/routes/apple.ts",
      "controllerSource": "apps/api-core/src/controllers/payments/apple-iap.controller.ts",
      "request": {
        "schemas": [
          "appleSyncRequestSchema"
        ],
        "evidence": "direct controller validation call",
        "fields": [],
        "fieldEvidence": "no direct field extraction; inspect named schema or delegated payload helper",
        "schemaFields": {
          "appleSyncRequestSchema": {
            "fields": [
              "customerId",
              "transactions",
              "placementId",
              "campaignId",
              "campaignAudienceId",
              "campaignVariantId",
              "campaignAssignmentId",
              "paywallId",
              "paywallProductId"
            ],
            "source": "packages/sdk-shared/src/validation/index.ts",
            "evidence": "schema object property keys parsed from source"
          }
        },
        "types": [
          {
            "type": "{ customerId: string; transactions: { signedTransactionInfo: string; transactionId?: string | undefined; originalTransactionId?: string | undefined; productId?: string | undefined; purchaseDate?: number | undefined; expiresDate?: number | null | undefined; quantity?: number | undefined; type?: \"purchase\" | \"restore\" | \"renewal\" | undefined; currency?: string | null | undefined; unitAmount?: number | null | undefined; environment?: string | null | undefined; }[]; placementId?: string | undefined; campaignId?: string | undefined; campaignAudienceId?: string | undefined; campaignVariantId?: string | undefined; campaignAssignmentId?: string | undefined; paywallId?: string | undefined; paywallProductId?: string | undefined; }",
            "source": "apps/api-core/src/controllers/payments/apple-iap.controller.ts"
          },
          {
            "type": "\"account\" | \"app_store\"",
            "source": "apps/api-core/src/services/products/paid-access-configuration.service.ts"
          }
        ]
      },
      "response": {
        "fields": [
          "error",
          "message",
          "requestId",
          "operationId",
          "retryable",
          "success"
        ],
        "evidence": "literal top-level c.json object keys found in controller",
        "types": [
          "{ error: string; message: string; }",
          "{ customerId: string; processed: number; skipped: number; mergedCustomers: number; customerLinkConflicts: number; errors: import(\"/Users/hm/Projects/One/apps/api-core/src/services/payments/apple-iap.service\").AppleSyncError[]; error: string; message: string; requestId: string | undefined; operationId: string | undefined; retryable: true; success: false; }",
          "{ customerId: string; processed: number; skipped: number; mergedCustomers: number; customerLinkConflicts: number; errors: import(\"/Users/hm/Projects/One/apps/api-core/src/services/payments/apple-iap.service\").AppleSyncError[]; success: boolean; requestId: string | undefined; operationId: string | undefined; }"
        ]
      },
      "notes": "before customer middleware",
      "controllerSignature": "export async function syncAppleTransactions(\n  c: Context<"
    },
    {
      "method": "POST",
      "path": "/v1/payments/apple/app-account-token",
      "auth": "api key + customer middleware",
      "controller": "getAppleAppAccountToken",
      "routeSource": "apps/api-core/src/routes/apple.ts",
      "controllerSource": "apps/api-core/src/controllers/payments/apple-app-account-token.controller.ts",
      "request": {
        "schemas": [],
        "evidence": "uncertain: no direct named schema call in handler body",
        "fields": [],
        "fieldEvidence": "no direct field extraction; inspect named schema or delegated payload helper",
        "schemaFields": {},
        "types": []
      },
      "response": {
        "fields": [
          "error",
          "message"
        ],
        "evidence": "literal top-level c.json object keys found in controller",
        "types": [
          "{ error: string; message: string; }",
          "{ appAccountToken: string; }"
        ]
      },
      "notes": "before customer middleware",
      "controllerSignature": "export async function getAppleAppAccountToken(\n  c: Context<"
    },
    {
      "method": "GET",
      "path": "/v1/payments/apple/restore-catalog",
      "auth": "api key + customer middleware",
      "controller": "getAppleRestoreCatalog",
      "routeSource": "apps/api-core/src/routes/apple.ts",
      "controllerSource": "apps/api-core/src/controllers/payments/apple-restore-catalog.controller.ts",
      "request": {
        "schemas": [],
        "evidence": "uncertain: no direct named schema call in handler body",
        "fields": [],
        "fieldEvidence": "no direct field extraction; inspect named schema or delegated payload helper",
        "schemaFields": {},
        "types": []
      },
      "response": {
        "fields": [
          "productIds"
        ],
        "evidence": "literal top-level c.json object keys found in controller",
        "types": [
          "{ productIds: string[]; }"
        ]
      },
      "notes": "before customer middleware",
      "controllerSignature": "export async function getAppleRestoreCatalog(\n  c: Context<"
    },
    {
      "method": "POST",
      "path": "/v1/payments/apple/reconcile",
      "auth": "api key + customer middleware",
      "controller": "reconcileAppleTransactions",
      "routeSource": "apps/api-core/src/routes/apple.ts",
      "controllerSource": "apps/api-core/src/controllers/payments/apple-reconcile.controller.ts",
      "request": {
        "schemas": [
          "reconcileRequestSchema"
        ],
        "evidence": "direct controller validation call",
        "fields": [
          "transactions",
          "placementId",
          "campaignId",
          "campaignAudienceId",
          "campaignVariantId",
          "campaignAssignmentId",
          "paywallId",
          "paywallProductId"
        ],
        "fieldEvidence": "direct controller destructuring/query/path read",
        "schemaFields": {
          "reconcileRequestSchema": {
            "fields": [
              "transactions",
              "placementId",
              "campaignId",
              "campaignAudienceId",
              "campaignVariantId",
              "campaignAssignmentId",
              "paywallId",
              "paywallProductId"
            ],
            "source": "apps/api-core/src/controllers/payments/apple-reconcile.controller.ts",
            "evidence": "schema object property keys parsed from source"
          }
        },
        "types": [
          {
            "type": "{ transactions: { signedTransactionInfo: string; transactionId?: string | undefined; originalTransactionId?: string | undefined; productId?: string | undefined; purchaseDate?: number | undefined; expiresDate?: number | null | undefined; quantity?: number | undefined; type?: \"purchase\" | \"restore\" | \"renewal\" | undefined; currency?: string | null | undefined; unitAmount?: number | null | undefined; environment?: string | null | undefined; }[]; placementId?: string | undefined; campaignId?: string | undefined; campaignAudienceId?: string | undefined; campaignVariantId?: string | undefined; campaignAssignmentId?: string | undefined; paywallId?: string | undefined; paywallProductId?: string | undefined; }",
            "source": "apps/api-core/src/controllers/payments/apple-reconcile.controller.ts"
          },
          {
            "type": "\"account\" | \"app_store\"",
            "source": "apps/api-core/src/services/products/paid-access-configuration.service.ts"
          }
        ]
      },
      "response": {
        "fields": [
          "error",
          "message",
          "requestId"
        ],
        "evidence": "literal top-level c.json object keys found in controller",
        "types": [
          "{ error: string; message: string; }",
          "{ requestId: string | undefined; operationId: string | undefined; customerId: string; processed: number; skipped: number; mergedCustomers: number; customerLinkConflicts: number; errors: import(\"/Users/hm/Projects/One/apps/api-core/src/services/payments/apple-iap.service\").AppleSyncError[]; }"
        ]
      },
      "notes": "before customer middleware",
      "controllerSignature": "export async function reconcileAppleTransactions(\n  c: Context<"
    },
    {
      "method": "POST",
      "path": "/v1/payments/apple/access",
      "auth": "api key + customer middleware",
      "controller": "verifyApplePaidAccess",
      "routeSource": "apps/api-core/src/routes/apple.ts",
      "controllerSource": "apps/api-core/src/controllers/payments/apple-paid-access.controller.ts",
      "request": {
        "schemas": [],
        "evidence": "uncertain: no direct named schema call in handler body",
        "fields": [],
        "fieldEvidence": "no direct field extraction; inspect named schema or delegated payload helper",
        "schemaFields": {},
        "types": [
          {
            "type": "{ transactionJws: string[]; deviceVerificationId?: string | undefined; appTransactionJws?: string | undefined; appReceipt?: string | undefined; receiptVendorIdentifier?: string | undefined; renewalInfoJws?: string[] | undefined; }",
            "source": "apps/api-core/src/services/products/apple-paid-access.service.ts"
          },
          {
            "type": "{ deviceVerificationId: string; providerEnvironment: \"Production\" | \"Sandbox\"; transactionJws: string[]; renewalInfoJws: string[]; transactionsComplete: boolean; appTransactionJws?: string | undefined; appReceipt?: string | undefined; receiptVendorIdentifier?: string | undefined; }",
            "source": "apps/api-core/src/services/products/apple-paid-access.service.ts"
          },
          {
            "type": "{ observedAt: string; stage: string; nativeDomain: string; nativeCode: number; storeKitCase?: string | null | undefined; underlying?: { domain: string; code: number; }[] | undefined; }[]",
            "source": "apps/api-core/src/controllers/payments/apple-paid-access.controller.ts"
          },
          {
            "type": "{ version: 1; id: string; requestId: string; operationId: string | null; route: \"access\" | \"evidence\"; receivedAt: string; finishedAt: string; verifiedAt: string | null; policy: \"account\" | \"app_store\" | null; configurationRevision: string | null; providerEnvironment: \"Production\" | \"Sandbox\" | null; outcome: \"failed\" | \"partial\" | \"verified\"; completeness: \"failed\" | \"complete\" | \"partial\" | \"submitted_evidence\"; acquisitionVerified: boolean | null; transactionCounts: { submitted: number; verified: number | null; active: number | null; inactive: number | null; unverified: number | null; unmapped: number | null; } | null; entitlements: { identifier: string; expiresAt: number | null; source: \"manual\" | \"apple\"; }[]; entitlementsTruncated: boolean; responseExpiresAt: number | null; accessContextExpiresAt: number | null; stage: \"completed\" | \"acquisition\" | \"configuration\" | \"transactions\" | \"mapping\" | \"purchaser_link\" | \"context_signing\" | \"contract_validation\"; failure: { code: \"invalid_contract\" | \"verification_rejected\" | \"service_error\"; httpStatus: number; retryable: boolean; } | null; appVersion: string | null; sdkVersion: string | null; deviceModel: string | null; osVersion: string | null; versionProvenance: \"unknown\" | \"request_headers\"; attemptId?: string | null | undefined; evidenceIssues?: { source: \"renewal\" | \"acquisition\" | \"transaction\" | \"mapping\"; reason: \"verification_failed\" | \"claims_invalid\" | \"device_mismatch\" | \"environment_mismatch\" | \"unmatched_renewal\" | \"catalog_mapping_failed\"; index?: number | undefined; }[] | undefined; }",
            "source": "apps/api-core/src/services/products/apple-access-observation.service.ts"
          }
        ]
      },
      "response": {
        "fields": [],
        "evidence": "uncertain: response is variable/service result or no direct literal c.json object",
        "types": [
          "{ entitlements: import(\"/Users/hm/Projects/One/packages/sdk-shared/dist/index\").EntitlementsMap; manualEntitlements: import(\"/Users/hm/Projects/One/packages/sdk-shared/dist/index\").EntitlementsMap; accessContext: string; expiresAt: number; appTransactionId: string; providerEnvironment: string; }",
          "{ version: 2; entitlements: import(\"/Users/hm/Projects/One/packages/sdk-shared/dist/index\").EntitlementsMap; acquisitionEntitlements: import(\"/Users/hm/Projects/One/packages/sdk-shared/dist/index\").EntitlementsMap; manualEntitlements: import(\"/Users/hm/Projects/One/packages/sdk-shared/dist/index\").EntitlementsMap; transactionResults: { index: number; status: typeof import(\"/Users/hm/Projects/One/packages/sdk-shared/dist/constants\").APPLE_EVIDENCE_RESULTS[number]; entitlementIdentifiers: string[]; expiresAt?: number | null; }[]; acquisitionVerified: boolean; complete: boolean; accessContext: string | undefined; expiresAt: number; verifiedAt: number; appTransactionId: string | undefined; providerEnvironment: \"Production\" | \"Sandbox\"; }"
        ]
      },
      "notes": "before customer middleware",
      "controllerSignature": "export async function verifyApplePaidAccess(c: Context<"
    },
    {
      "method": "POST",
      "path": "/v1/payments/apple/access/evidence",
      "auth": "api key + customer middleware",
      "controller": "verifyIndependentApplePaidAccess",
      "routeSource": "apps/api-core/src/routes/apple.ts",
      "controllerSource": "apps/api-core/src/controllers/payments/apple-paid-access.controller.ts",
      "request": {
        "schemas": [],
        "evidence": "uncertain: no direct named schema call in handler body",
        "fields": [],
        "fieldEvidence": "no direct field extraction; inspect named schema or delegated payload helper",
        "schemaFields": {},
        "types": [
          {
            "type": "{ transactionJws: string[]; deviceVerificationId?: string | undefined; appTransactionJws?: string | undefined; appReceipt?: string | undefined; receiptVendorIdentifier?: string | undefined; renewalInfoJws?: string[] | undefined; }",
            "source": "apps/api-core/src/services/products/apple-paid-access.service.ts"
          },
          {
            "type": "{ deviceVerificationId: string; providerEnvironment: \"Production\" | \"Sandbox\"; transactionJws: string[]; renewalInfoJws: string[]; transactionsComplete: boolean; appTransactionJws?: string | undefined; appReceipt?: string | undefined; receiptVendorIdentifier?: string | undefined; }",
            "source": "apps/api-core/src/services/products/apple-paid-access.service.ts"
          },
          {
            "type": "{ observedAt: string; stage: string; nativeDomain: string; nativeCode: number; storeKitCase?: string | null | undefined; underlying?: { domain: string; code: number; }[] | undefined; }[]",
            "source": "apps/api-core/src/controllers/payments/apple-paid-access.controller.ts"
          },
          {
            "type": "{ version: 1; id: string; requestId: string; operationId: string | null; route: \"access\" | \"evidence\"; receivedAt: string; finishedAt: string; verifiedAt: string | null; policy: \"account\" | \"app_store\" | null; configurationRevision: string | null; providerEnvironment: \"Production\" | \"Sandbox\" | null; outcome: \"failed\" | \"partial\" | \"verified\"; completeness: \"failed\" | \"complete\" | \"partial\" | \"submitted_evidence\"; acquisitionVerified: boolean | null; transactionCounts: { submitted: number; verified: number | null; active: number | null; inactive: number | null; unverified: number | null; unmapped: number | null; } | null; entitlements: { identifier: string; expiresAt: number | null; source: \"manual\" | \"apple\"; }[]; entitlementsTruncated: boolean; responseExpiresAt: number | null; accessContextExpiresAt: number | null; stage: \"completed\" | \"acquisition\" | \"configuration\" | \"transactions\" | \"mapping\" | \"purchaser_link\" | \"context_signing\" | \"contract_validation\"; failure: { code: \"invalid_contract\" | \"verification_rejected\" | \"service_error\"; httpStatus: number; retryable: boolean; } | null; appVersion: string | null; sdkVersion: string | null; deviceModel: string | null; osVersion: string | null; versionProvenance: \"unknown\" | \"request_headers\"; attemptId?: string | null | undefined; evidenceIssues?: { source: \"renewal\" | \"acquisition\" | \"transaction\" | \"mapping\"; reason: \"verification_failed\" | \"claims_invalid\" | \"device_mismatch\" | \"environment_mismatch\" | \"unmatched_renewal\" | \"catalog_mapping_failed\"; index?: number | undefined; }[] | undefined; }",
            "source": "apps/api-core/src/services/products/apple-access-observation.service.ts"
          }
        ]
      },
      "response": {
        "fields": [],
        "evidence": "uncertain: response is variable/service result or no direct literal c.json object",
        "types": [
          "{ entitlements: import(\"/Users/hm/Projects/One/packages/sdk-shared/dist/index\").EntitlementsMap; manualEntitlements: import(\"/Users/hm/Projects/One/packages/sdk-shared/dist/index\").EntitlementsMap; accessContext: string; expiresAt: number; appTransactionId: string; providerEnvironment: string; }",
          "{ version: 2; entitlements: import(\"/Users/hm/Projects/One/packages/sdk-shared/dist/index\").EntitlementsMap; acquisitionEntitlements: import(\"/Users/hm/Projects/One/packages/sdk-shared/dist/index\").EntitlementsMap; manualEntitlements: import(\"/Users/hm/Projects/One/packages/sdk-shared/dist/index\").EntitlementsMap; transactionResults: { index: number; status: typeof import(\"/Users/hm/Projects/One/packages/sdk-shared/dist/constants\").APPLE_EVIDENCE_RESULTS[number]; entitlementIdentifiers: string[]; expiresAt?: number | null; }[]; acquisitionVerified: boolean; complete: boolean; accessContext: string | undefined; expiresAt: number; verifiedAt: number; appTransactionId: string | undefined; providerEnvironment: \"Production\" | \"Sandbox\"; }"
        ]
      },
      "notes": "before customer middleware",
      "controllerSignature": "export async function verifyIndependentApplePaidAccess(c: Context<"
    },
    {
      "method": "POST",
      "path": "/v1/payments/apple/access/owner-evidence",
      "auth": "api key; no customer middleware",
      "controller": "verifyAppleOwnerEvidence",
      "routeSource": "apps/api-core/src/routes/apple.ts",
      "controllerSource": "apps/api-core/src/controllers/payments/apple-paid-access.controller.ts",
      "request": {
        "schemas": [
          "appleIndependentAccessRequestSchema"
        ],
        "evidence": "direct controller validation call",
        "fields": [],
        "fieldEvidence": "no direct field extraction; inspect named schema or delegated payload helper",
        "schemaFields": {
          "appleIndependentAccessRequestSchema": {
            "fields": [
              "deviceVerificationId",
              "providerEnvironment",
              "appTransactionJws",
              "appReceipt",
              "receiptVendorIdentifier",
              "transactionJws",
              "renewalInfoJws",
              "transactionsComplete"
            ],
            "source": "packages/sdk-shared/src/validation/paid-access.ts",
            "evidence": "schema object property keys parsed from source"
          }
        },
        "types": [
          {
            "type": "{ deviceVerificationId: string; providerEnvironment: \"Production\" | \"Sandbox\"; transactionJws: string[]; renewalInfoJws: string[]; transactionsComplete: boolean; appTransactionJws?: string | undefined; appReceipt?: string | undefined; receiptVendorIdentifier?: string | undefined; }",
            "source": "apps/api-core/src/services/products/apple-paid-access.service.ts"
          }
        ]
      },
      "response": {
        "fields": [],
        "evidence": "uncertain: response is variable/service result or no direct literal c.json object",
        "types": [
          "{ version: 2; entitlements: import(\"/Users/hm/Projects/One/packages/sdk-shared/dist/index\").EntitlementsMap; acquisitionEntitlements: import(\"/Users/hm/Projects/One/packages/sdk-shared/dist/index\").EntitlementsMap; manualEntitlements: import(\"/Users/hm/Projects/One/packages/sdk-shared/dist/index\").EntitlementsMap; transactionResults: { index: number; status: typeof import(\"/Users/hm/Projects/One/packages/sdk-shared/dist/constants\").APPLE_EVIDENCE_RESULTS[number]; entitlementIdentifiers: string[]; expiresAt?: number | null; }[]; acquisitionVerified: boolean; complete: boolean; accessContext: string | undefined; expiresAt: number; verifiedAt: number; appTransactionId: string | undefined; providerEnvironment: \"Production\" | \"Sandbox\"; }"
        ]
      },
      "notes": "before customer middleware",
      "controllerSignature": "export async function verifyAppleOwnerEvidence(c: Context<"
    },
    {
      "method": "GET",
      "path": "/v1/in-app-surfaces",
      "auth": "api key + customer middleware",
      "controller": "handleListInAppSurfaceCatalog",
      "routeSource": "apps/api-core/src/routes/in-app-surfaces.ts",
      "controllerSource": "apps/api-core/src/controllers/products/in-app-surface.controller.ts",
      "request": {
        "schemas": [],
        "evidence": "uncertain: no direct named schema call in handler body",
        "fields": [],
        "fieldEvidence": "no direct field extraction; inspect named schema or delegated payload helper",
        "schemaFields": {},
        "types": [
          {
            "type": "unknown",
            "source": "apps/api-core/src/services/creative-compatibility.service.ts"
          }
        ]
      },
      "response": {
        "fields": [
          "surfaces"
        ],
        "evidence": "literal top-level c.json object keys found in controller",
        "types": [
          "{ surfaces: never[]; }",
          "{ surfaces: { id: string; identifier: string; name: string; description: string | null; status: \"active\" | \"inactive\" | \"archived\"; updatedAt: Date; response: import(\"/Users/hm/Projects/One/packages/sdk-shared/dist/index\").InAppSurfaceResponse; }[]; }"
        ]
      },
      "notes": "after customer middleware",
      "controllerSignature": "export async function handleListInAppSurfaceCatalog(c: Context<"
    },
    {
      "method": "GET",
      "path": "/v1/entitlements",
      "auth": "api key + customer middleware",
      "controller": "handleGetEntitlements",
      "routeSource": "apps/api-core/src/routes/entitlements.ts",
      "controllerSource": "apps/api-core/src/controllers/products/entitlements.controller.ts",
      "request": {
        "schemas": [],
        "evidence": "uncertain: no direct named schema call in handler body",
        "fields": [
          "force_refresh",
          "sync_provider"
        ],
        "fieldEvidence": "direct controller destructuring/query/path read",
        "schemaFields": {},
        "types": [
          {
            "type": "{ revision: string; enabled: boolean; entitlementIdentifier: string; members: { grantId: string; customerId: string; }[]; }",
            "source": "apps/api-core/src/controllers/products/entitlements.controller.ts"
          },
          {
            "type": "{ version: 2; appId: string; customerId: string; transactionId: string; entitlementId: string; periodStart: string; periodEnd: string | null; }",
            "source": "apps/api-core/src/services/usage/usage-purchase-context.service.ts"
          }
        ]
      },
      "response": {
        "fields": [
          "error",
          "message"
        ],
        "evidence": "literal top-level c.json object keys found in controller",
        "types": [
          "{ error: string; message: string; }",
          "{}",
          "{ [x: string]: import(\"/Users/hm/Projects/One/packages/sdk-shared/dist/index\").EntitlementStatus; }"
        ]
      },
      "notes": "after customer middleware",
      "controllerSignature": "export async function handleGetEntitlements(c: Context<"
    },
    {
      "method": "POST",
      "path": "/v1/checkout/stripe/start",
      "auth": "api key + customer middleware",
      "controller": "startStripeCheckout",
      "routeSource": "apps/api-core/src/routes/stripe.ts",
      "controllerSource": "apps/api-core/src/controllers/payments/stripe-checkout.controller.ts",
      "request": {
        "schemas": [],
        "evidence": "uncertain: no direct named schema call in handler body",
        "fields": [],
        "fieldEvidence": "no direct field extraction; inspect named schema or delegated payload helper",
        "schemaFields": {},
        "types": [
          {
            "type": "{ productPriceId: string; returnUrl: string; placementId?: string | undefined; campaignId?: string | undefined; campaignAudienceId?: string | undefined; campaignVariantId?: string | undefined; campaignAssignmentId?: string | undefined; paywallId?: string | undefined; paywallProductId?: string | undefined; }",
            "source": "apps/api-core/src/controllers/payments/stripe-checkout.controller.ts"
          }
        ]
      },
      "response": {
        "fields": [],
        "evidence": "uncertain: response is variable/service result or no direct literal c.json object",
        "types": [
          "{ url: string; }"
        ]
      },
      "notes": "after customer middleware",
      "controllerSignature": "export async function startStripeCheckout(\n  c: Context<"
    },
    {
      "method": "GET",
      "path": "/v1/checkout/stripe/continue",
      "auth": "api key + customer middleware",
      "controller": "continueStripeCheckout",
      "routeSource": "apps/api-core/src/routes/stripe.ts",
      "controllerSource": "apps/api-core/src/controllers/payments/stripe-checkout.controller.ts",
      "request": {
        "schemas": [],
        "evidence": "uncertain: no direct named schema call in handler body",
        "fields": [
          "state"
        ],
        "fieldEvidence": "direct controller destructuring/query/path read",
        "schemaFields": {},
        "types": []
      },
      "response": {
        "fields": [
          "url"
        ],
        "evidence": "literal top-level c.json object keys found in controller",
        "types": [
          "{ url: string; }"
        ]
      },
      "notes": "after customer middleware",
      "controllerSignature": "export async function continueStripeCheckout(\n  c: Context<"
    },
    {
      "method": "POST",
      "path": "/v1/checkout/stripe/verify",
      "auth": "api key + customer middleware",
      "controller": "verifyStripeSession",
      "routeSource": "apps/api-core/src/routes/stripe.ts",
      "controllerSource": "apps/api-core/src/controllers/payments/stripe-checkout.controller.ts",
      "request": {
        "schemas": [],
        "evidence": "uncertain: no direct named schema call in handler body",
        "fields": [],
        "fieldEvidence": "no direct field extraction; inspect named schema or delegated payload helper",
        "schemaFields": {},
        "types": []
      },
      "response": {
        "fields": [
          "success"
        ],
        "evidence": "literal top-level c.json object keys found in controller",
        "types": [
          "{ purchaseVerified: boolean; success: true; }"
        ]
      },
      "notes": "after customer middleware",
      "controllerSignature": "export async function verifyStripeSession(\n  c: Context<"
    },
    {
      "method": "POST",
      "path": "/v1/checkout/stripe/portal",
      "auth": "api key + customer middleware",
      "controller": "createStripePortalSession",
      "routeSource": "apps/api-core/src/routes/stripe.ts",
      "controllerSource": "apps/api-core/src/controllers/payments/stripe-checkout.controller.ts",
      "request": {
        "schemas": [],
        "evidence": "uncertain: no direct named schema call in handler body",
        "fields": [],
        "fieldEvidence": "no direct field extraction; inspect named schema or delegated payload helper",
        "schemaFields": {},
        "types": []
      },
      "response": {
        "fields": [
          "url"
        ],
        "evidence": "literal top-level c.json object keys found in controller",
        "types": [
          "{ url: string; }"
        ]
      },
      "notes": "after customer middleware",
      "controllerSignature": "export async function createStripePortalSession(\n  c: Context<"
    },
    {
      "method": "POST",
      "path": "/v1/events",
      "auth": "api key + customer middleware",
      "controller": "handleCreateEvent",
      "routeSource": "apps/api-core/src/routes/events.ts",
      "controllerSource": "apps/api-core/src/controllers/events/events.controller.ts",
      "request": {
        "schemas": [],
        "evidence": "uncertain: no direct named schema call in handler body",
        "fields": [],
        "fieldEvidence": "no direct field extraction; inspect named schema or delegated payload helper",
        "schemaFields": {},
        "types": [
          {
            "type": "{ key: string; revision: number; occurrenceId: string; properties: Record<string, string>; attemptId?: string | undefined; sequence?: number | undefined; }",
            "source": "apps/api-core/src/services/events/events.service.ts"
          }
        ]
      },
      "response": {
        "fields": [
          "error",
          "message",
          "eventId",
          "wasDeduped"
        ],
        "evidence": "literal top-level c.json object keys found in controller",
        "types": [
          "{ error: string; message: string; }",
          "{ error: string; message: string; retryAfterSeconds: number; scope: SdkRateLimitScope; }",
          "{ eventId: string; wasDeduped: boolean; }"
        ]
      },
      "notes": "eventIngressPolicy before customer middleware",
      "controllerSignature": "export async function handleCreateEvent(c: Context<"
    },
    {
      "method": "POST",
      "path": "/v1/events/batch",
      "auth": "api key + customer middleware",
      "controller": "handleCreateEventBatch",
      "routeSource": "apps/api-core/src/routes/events.ts",
      "controllerSource": "apps/api-core/src/controllers/events/events.controller.ts",
      "request": {
        "schemas": [],
        "evidence": "uncertain: no direct named schema call in handler body",
        "fields": [],
        "fieldEvidence": "no direct field extraction; inspect named schema or delegated payload helper",
        "schemaFields": {},
        "types": [
          {
            "type": "{ key: string; revision: number; occurrenceId: string; properties: Record<string, string>; attemptId?: string | undefined; sequence?: number | undefined; }",
            "source": "apps/api-core/src/services/events/events.service.ts"
          },
          {
            "type": "{ operationId: string; state: \"cancelled\" | \"exhausted\" | \"pending\" | \"started\" | \"retrying\" | \"confirmed\" | \"no_matching_purchase\" | \"interrupted\"; attempt: number; observedAt: string; parentOperationId?: string | null | undefined; }",
            "source": "apps/api-core/src/services/events/events.service.ts"
          },
          {
            "type": "{ version: 1; observedAt: string; policy: \"account\" | \"app_store\"; verification: \"unavailable\" | \"authoritative\" | \"verified_entitlements\" | \"cached\"; benefits: { identifier: string; source: \"manual\" | \"apple\" | \"account\" | \"support_purchaser\" | \"preserved_import\"; effectiveUntil?: number | null | undefined; verifiedAt?: string | null | undefined; }[]; truncated: boolean; providerEnvironment?: \"Production\" | \"Sandbox\" | \"Xcode\" | null | undefined; operationId?: string | null | undefined; attemptId?: string | null | undefined; requestId?: string | null | undefined; accessContextExpiresAt?: number | null | undefined; appleEvidence?: { observedAt: string; acquisition: \"unavailable\" | \"rejected\" | \"app_transaction\" | \"receipt\"; purchaserComparison: \"unavailable\" | \"first_observation\" | \"same\" | \"changed\"; collectionComplete: boolean; priorTransactionCount: number; submittedTransactionCount: number; retainedTransactionCount: number; missingProductIdentifiers: string[]; previousPurchaserHash?: string | null | undefined; currentPurchaserHash?: string | null | undefined; acquisitionFailureStage?: string | null | undefined; } | null | undefined; }",
            "source": "apps/api-core/src/services/events/events.service.ts"
          },
          {
            "type": "{ occurrenceId: string; phase: \"startup\" | \"runtime\"; operation: string; domain: string; code: string; message: string; underlyingErrors: { domain: string; code: string; message: string; }[]; appVersion: string; buildNumber: string; truncated: boolean; stage?: string | undefined; migrationIdentifier?: string | undefined; relatedCrashReportId?: string | undefined; }",
            "source": "apps/api-core/src/services/events/events.service.ts"
          }
        ]
      },
      "response": {
        "fields": [
          "error",
          "message"
        ],
        "evidence": "literal top-level c.json object keys found in controller",
        "types": [
          "{ error: string; message: string; }",
          "{ error: string; message: string; retryAfterSeconds: number; scope: SdkRateLimitScope; }",
          "{ results: ({ clientId: string; status: \"accepted\" | \"deduped\" | \"rejected\"; eventId?: string; error?: string; } | undefined)[]; }"
        ]
      },
      "notes": "eventIngressPolicy before customer middleware",
      "controllerSignature": "export async function handleCreateEventBatch(c: EventContext)"
    },
    {
      "method": "POST",
      "path": "/v1/usage/daily",
      "auth": "api key + customer middleware",
      "controller": "handleRecordDailyUsage",
      "routeSource": "apps/api-core/src/routes/usage.ts",
      "controllerSource": "apps/api-core/src/controllers/usage/usage.controller.ts",
      "request": {
        "schemas": [
          "recordDailyUsageSchema"
        ],
        "evidence": "direct controller validation call",
        "fields": [],
        "fieldEvidence": "no direct field extraction; inspect named schema or delegated payload helper",
        "schemaFields": {
          "recordDailyUsageSchema": {
            "fields": [
              "usageDate",
              "platform",
              "deviceId",
              "sessionCount",
              "foregroundSeconds",
              "firstActiveAt",
              "lastActiveAt",
              "metadata",
              "device_model",
              "os_version",
              "app_version",
              "sdk_version",
              "source"
            ],
            "source": "packages/sdk-shared/src/validation/index.ts",
            "evidence": "schema object property keys parsed from source"
          }
        },
        "types": [
          {
            "type": "{ usageDate: string; platform: \"ios\" | \"android\" | \"web\" | \"windows\" | \"macos\"; deviceId: string; sessionCount: number; foregroundSeconds: number; firstActiveAt?: string | undefined; lastActiveAt?: string | undefined; metadata?: { device_model?: string | undefined; os_version?: string | undefined; app_version?: string | undefined; sdk_version?: string | undefined; source?: string | undefined; } | undefined; }",
            "source": "apps/api-core/src/controllers/usage/usage.controller.ts"
          }
        ]
      },
      "response": {
        "fields": [
          "error",
          "message",
          "ok",
          "id"
        ],
        "evidence": "literal top-level c.json object keys found in controller",
        "types": [
          "{ error: string; message: string; }",
          "{ ok: true; id: string; }"
        ]
      },
      "notes": "after customer middleware",
      "controllerSignature": "export async function handleRecordDailyUsage(c: Context<"
    },
    {
      "method": "POST",
      "path": "/v1/usage/snapshots",
      "auth": "api key + customer middleware",
      "controller": "handleRecordUsageSnapshots",
      "routeSource": "apps/api-core/src/routes/usage.ts",
      "controllerSource": "apps/api-core/src/controllers/usage/usage.controller.ts",
      "request": {
        "schemas": [
          "usageSnapshotBatchSchema"
        ],
        "evidence": "direct controller validation call",
        "fields": [],
        "fieldEvidence": "no direct field extraction; inspect named schema or delegated payload helper",
        "schemaFields": {
          "usageSnapshotBatchSchema": {
            "fields": [
              "deviceId",
              "snapshots"
            ],
            "source": "packages/sdk-shared/src/validation/usage.ts",
            "evidence": "schema object property keys parsed from source"
          }
        },
        "types": [
          {
            "type": "{ deviceId: string; snapshots: ({ contractVersion: 2; producerId: string; revision: string; usageDate: string; firstObservedAt: string; lastObservedAt: string; instrumentationRevision: string; supportedMetrics: { key: string; definitionRevision: number; }[]; coverage: \"partial\" | \"measured\"; droppedMeasurementCount: number; droppedDiagnosticCount: number; measurements: { key: string; definitionRevision: number; scaledValue: string; firstObservedAt: string; lastObservedAt: string; dimensions: Record<string, string>; purchaseContext?: string | undefined; }[]; diagnostics: { metric: { key: string; definitionRevision: number; }; reasonDimension: string; reason: string; occurrences: number; firstObservedAt: string; lastObservedAt: string; recovered: boolean; affectedItemCount?: string | undefined; }[]; kind: \"daily\"; sessionCount: number; foregroundSeconds: number; legacySessionBaseline?: number | undefined; legacyForegroundBaseline?: number | undefined; } | { contractVersion: 2; producerId: string; revision: string; usageDate: string; firstObservedAt: string; lastObservedAt: string; instrumentationRevision: string; supportedMetrics: { key: string; definitionRevision: number; }[]; coverage: \"partial\" | \"measured\"; droppedMeasurementCount: number; droppedDiagnosticCount: number; measurements: { key: string; definitionRevision: number; scaledValue: string; firstObservedAt: string; lastObservedAt: string; dimensions: Record<string, string>; purchaseContext?: string | undefined; }[]; diagnostics: { metric: { key: string; definitionRevision: number; }; reasonDimension: string; reason: string; occurrences: number; firstObservedAt: string; lastObservedAt: string; recovered: boolean; affectedItemCount?: string | undefined; }[]; kind: \"session\"; sessionId: string; startedAt: string; endedAt: string | null; endReason: \"explicit\" | \"background\" | \"identity_changed\" | null; foregroundSeconds: number; legacySessionBaseline?: number | undefined; legacyForegroundBaseline?: number | undefined; })[]; }",
            "source": "apps/api-core/src/services/usage/usage.service.ts"
          },
          {
            "type": "{ version: 2; appId: string; customerId: string; transactionId: string; entitlementId: string; periodStart: string; periodEnd: string | null; }",
            "source": "apps/api-core/src/services/usage/usage-purchase-context.service.ts"
          }
        ]
      },
      "response": {
        "fields": [],
        "evidence": "uncertain: response is variable/service result or no direct literal c.json object",
        "types": [
          "{ ok: true; records: { sessionId?: string | undefined; id: string; producerId: string; kind: \"session\" | \"daily\"; usageDate: string; revision: string; }[]; }"
        ]
      },
      "notes": "after customer middleware",
      "controllerSignature": "export async function handleRecordUsageSnapshots(c: Context<"
    },
    {
      "method": "POST",
      "path": "/v1/customers/:customerId/attributes",
      "auth": "api key + customer middleware",
      "controller": "handleSetCustomerAttributes",
      "routeSource": "apps/api-core/src/routes/customer-attributes.ts",
      "controllerSource": "apps/api-core/src/controllers/customers/attributes.controller.ts",
      "request": {
        "schemas": [
          "setCustomerAttributesSchema"
        ],
        "evidence": "direct controller validation call",
        "fields": [
          "path.customerId"
        ],
        "fieldEvidence": "direct controller destructuring/query/path read",
        "schemaFields": {
          "setCustomerAttributesSchema": {
            "fields": [
              "attributes"
            ],
            "source": "packages/sdk-shared/src/validation/index.ts",
            "evidence": "schema object property keys parsed from source"
          }
        },
        "types": [
          {
            "type": "{ attributes: Record<string, string | null>; }",
            "source": "apps/api-core/src/controllers/customers/attributes.controller.ts"
          }
        ]
      },
      "response": {
        "fields": [
          "error",
          "message",
          "ok"
        ],
        "evidence": "literal top-level c.json object keys found in controller",
        "types": [
          "{ error: string; message: string; }",
          "{ ok: true; }"
        ]
      },
      "notes": "after customer middleware",
      "controllerSignature": "export async function handleSetCustomerAttributes(c: Context<"
    },
    {
      "method": "GET",
      "path": "/v1/customers/:customerId/attributes",
      "auth": "api key + customer middleware",
      "controller": "handleGetCustomerAttributes",
      "routeSource": "apps/api-core/src/routes/customer-attributes.ts",
      "controllerSource": "apps/api-core/src/controllers/customers/attributes.controller.ts",
      "request": {
        "schemas": [],
        "evidence": "uncertain: no direct named schema call in handler body",
        "fields": [
          "path.customerId"
        ],
        "fieldEvidence": "direct controller destructuring/query/path read",
        "schemaFields": {},
        "types": []
      },
      "response": {
        "fields": [
          "error",
          "message",
          "attributes"
        ],
        "evidence": "literal top-level c.json object keys found in controller",
        "types": [
          "{ error: string; message: string; }",
          "{ attributes: Record<string, string>; }"
        ]
      },
      "notes": "after customer middleware",
      "controllerSignature": "export async function handleGetCustomerAttributes(c: Context<"
    },
    {
      "method": "POST",
      "path": "/v1/customer-links/tokens",
      "auth": "api key + customer middleware",
      "controller": "createWorkspaceCustomerLinkToken",
      "routeSource": "apps/api-core/src/routes/customer-links.ts",
      "controllerSource": "apps/api-core/src/controllers/customers/customer-links.controller.ts",
      "request": {
        "schemas": [
          "createWorkspaceCustomerLinkTokenRequestSchema"
        ],
        "evidence": "direct controller validation call",
        "fields": [],
        "fieldEvidence": "no direct field extraction; inspect named schema or delegated payload helper",
        "schemaFields": {
          "createWorkspaceCustomerLinkTokenRequestSchema": {
            "fields": [
              "ttlSeconds"
            ],
            "source": "packages/sdk-shared/src/validation/index.ts",
            "evidence": "schema object property keys parsed from source"
          }
        },
        "types": [
          {
            "type": "{ ttlSeconds?: number | undefined; }",
            "source": "apps/api-core/src/controllers/customers/customer-links.controller.ts"
          }
        ]
      },
      "response": {
        "fields": [
          "token",
          "expiresAt",
          "workspaceCustomerId"
        ],
        "evidence": "literal top-level c.json object keys found in controller",
        "types": [
          "{ token: string; expiresAt: string; workspaceCustomerId: string; }"
        ]
      },
      "notes": "after customer middleware",
      "controllerSignature": "export async function createWorkspaceCustomerLinkToken(\n  c: Context<"
    },
    {
      "method": "POST",
      "path": "/v1/customer-links/redeem",
      "auth": "api key + customer middleware",
      "controller": "redeemWorkspaceCustomerLinkToken",
      "routeSource": "apps/api-core/src/routes/customer-links.ts",
      "controllerSource": "apps/api-core/src/controllers/customers/customer-links.controller.ts",
      "request": {
        "schemas": [
          "redeemWorkspaceCustomerLinkTokenRequestSchema"
        ],
        "evidence": "direct controller validation call",
        "fields": [],
        "fieldEvidence": "no direct field extraction; inspect named schema or delegated payload helper",
        "schemaFields": {
          "redeemWorkspaceCustomerLinkTokenRequestSchema": {
            "fields": [
              "token"
            ],
            "source": "packages/sdk-shared/src/validation/index.ts",
            "evidence": "schema object property keys parsed from source"
          }
        },
        "types": [
          {
            "type": "{ token: string; }",
            "source": "apps/api-core/src/controllers/customers/customer-links.controller.ts"
          }
        ]
      },
      "response": {
        "fields": [
          "workspaceCustomerId",
          "workspaceCustomerToken",
          "environment",
          "customerId"
        ],
        "evidence": "literal top-level c.json object keys found in controller",
        "types": [
          "{ workspaceCustomerId: string; workspaceCustomerToken: string; environment: import(\"/Users/hm/Projects/One/packages/sdk-shared/dist/index\").IdEnvironment; customerId: string; }"
        ]
      },
      "notes": "after customer middleware",
      "controllerSignature": "export async function redeemWorkspaceCustomerLinkToken(\n  c: Context<"
    },
    {
      "method": "POST",
      "path": "/v1/customer-links/credential",
      "auth": "api key + customer middleware",
      "controller": "createWorkspaceCustomerCredential",
      "routeSource": "apps/api-core/src/routes/customer-links.ts",
      "controllerSource": "apps/api-core/src/controllers/customers/customer-links.controller.ts",
      "request": {
        "schemas": [],
        "evidence": "uncertain: no direct named schema call in handler body",
        "fields": [],
        "fieldEvidence": "no direct field extraction; inspect named schema or delegated payload helper",
        "schemaFields": {},
        "types": []
      },
      "response": {
        "fields": [],
        "evidence": "uncertain: response is variable/service result or no direct literal c.json object",
        "types": [
          "{ workspaceCustomerId: string; workspaceCustomerToken: string; environment: import(\"/Users/hm/Projects/One/packages/sdk-shared/dist/index\").IdEnvironment; }"
        ]
      },
      "notes": "after customer middleware",
      "controllerSignature": "export async function createWorkspaceCustomerCredential(\n  c: Context<"
    },
    {
      "method": "POST",
      "path": "/v1/notifications/devices",
      "auth": "api key + customer middleware",
      "controller": "registerDevice",
      "routeSource": "apps/api-core/src/routes/notifications.ts",
      "controllerSource": "apps/api-core/src/controllers/notifications/notifications.controller.ts",
      "request": {
        "schemas": [
          "registerDeviceTokenRequestSchema"
        ],
        "evidence": "direct controller validation call",
        "fields": [],
        "fieldEvidence": "no direct field extraction; inspect named schema or delegated payload helper",
        "schemaFields": {
          "registerDeviceTokenRequestSchema": {
            "fields": [
              "transport",
              "token",
              "bundleId",
              "pushEnvironment",
              "deviceModel",
              "osVersion",
              "appVersion",
              "ownershipTransition"
            ],
            "source": "packages/sdk-shared/src/validation/index.ts",
            "evidence": "schema object property keys parsed from source"
          }
        },
        "types": [
          {
            "type": "{ transport: \"apns\" | \"fcm\"; token: string; bundleId?: string | undefined; pushEnvironment?: \"production\" | \"development\" | undefined; deviceModel?: string | undefined; osVersion?: string | undefined; appVersion?: string | undefined; ownershipTransition?: \"explicit_sign_out\" | undefined; }",
            "source": "apps/api-core/src/controllers/notifications/notifications.controller.ts"
          }
        ]
      },
      "response": {
        "fields": [
          "error",
          "message",
          "success",
          "id"
        ],
        "evidence": "literal top-level c.json object keys found in controller",
        "types": [
          "{ error: string; message: string; }",
          "{ success: true; id: string; }"
        ]
      },
      "notes": "after customer middleware",
      "controllerSignature": "static async registerDevice(c: Context<"
    },
    {
      "method": "DELETE",
      "path": "/v1/notifications/devices",
      "auth": "api key + customer middleware",
      "controller": "unregisterDevice",
      "routeSource": "apps/api-core/src/routes/notifications.ts",
      "controllerSource": "apps/api-core/src/controllers/notifications/notifications.controller.ts",
      "request": {
        "schemas": [
          "unregisterDeviceTokenRequestSchema"
        ],
        "evidence": "direct controller validation call",
        "fields": [],
        "fieldEvidence": "no direct field extraction; inspect named schema or delegated payload helper",
        "schemaFields": {
          "unregisterDeviceTokenRequestSchema": {
            "fields": [
              "transport",
              "token"
            ],
            "source": "packages/sdk-shared/src/validation/index.ts",
            "evidence": "schema object property keys parsed from source"
          }
        },
        "types": [
          {
            "type": "{ transport: \"apns\" | \"fcm\"; token: string; }",
            "source": "apps/api-core/src/controllers/notifications/notifications.controller.ts"
          }
        ]
      },
      "response": {
        "fields": [
          "error",
          "message",
          "success"
        ],
        "evidence": "literal top-level c.json object keys found in controller",
        "types": [
          "{ error: string; message: string; }",
          "{ success: true; }"
        ]
      },
      "notes": "after customer middleware",
      "controllerSignature": "static async unregisterDevice(c: Context<"
    },
    {
      "method": "POST",
      "path": "/v1/attribution/apple-search-ads",
      "auth": "api key + customer middleware",
      "controller": "handleAppleAttribution",
      "routeSource": "apps/api-core/src/routes/attribution-apple.ts",
      "controllerSource": "apps/api-core/src/controllers/attribution-apple.controller.ts",
      "request": {
        "schemas": [
          "appleSearchAdsAttributionSchema"
        ],
        "evidence": "direct handler validation call",
        "fields": [],
        "fieldEvidence": "no direct field extraction; inspect named schema or delegated payload helper",
        "schemaFields": {
          "appleSearchAdsAttributionSchema": {
            "fields": [
              "customer_id",
              "asa_token",
              "install_id",
              "legacy_recheck"
            ],
            "source": "packages/sdk-shared/src/validation/index.ts",
            "evidence": "schema object property keys parsed from source"
          }
        },
        "types": [
          {
            "type": "{ asa_token: string; customer_id?: string | undefined; install_id?: string | undefined; legacy_recheck?: boolean | undefined; }",
            "source": "apps/api-core/src/controllers/attribution-apple.controller.ts"
          }
        ]
      },
      "response": {
        "fields": [],
        "evidence": "uncertain: response is variable/service result or no direct literal c.json object",
        "types": [
          "AppleSearchAdsAttributionResponse",
          "{ status: \"error\"; reason: string; terminal: false; retryable: true; retryAfterSeconds: number; errorCode: \"internal_error\"; }"
        ]
      },
      "notes": "after customer middleware",
      "controllerSignature": "export async function handleAppleAttribution(c: AppleAttributionContext)"
    },
    {
      "method": "POST",
      "path": "/v1/offers/:offerIdentifier/redemption-link",
      "auth": "api key + customer middleware",
      "controller": "handleClaimProductOffer",
      "routeSource": "apps/api-core/src/routes/product-offers.ts",
      "controllerSource": "apps/api-core/src/controllers/products/product-offer.controller.ts",
      "request": {
        "schemas": [],
        "evidence": "uncertain: no direct named schema call in handler body",
        "fields": [
          "path.offerIdentifier"
        ],
        "fieldEvidence": "direct controller destructuring/query/path read",
        "schemaFields": {},
        "types": [
          {
            "type": "unknown",
            "source": "apps/api-core/src/controllers/products/product-offer.controller.ts"
          },
          {
            "type": "string",
            "source": "apps/api-core/src/controllers/products/product-offer.controller.ts"
          },
          {
            "type": "unknown",
            "source": "apps/api-core/src/controllers/products/product-offer.controller.ts"
          }
        ]
      },
      "response": {
        "fields": [],
        "evidence": "uncertain: response is variable/service result or no direct literal c.json object",
        "types": [
          "import(\"/Users/hm/Projects/One/packages/sdk-shared/dist/index\").ProductOfferRedemptionLinkResponse"
        ]
      },
      "notes": "after customer middleware",
      "controllerSignature": "export async function handleClaimProductOffer(\n  c: Context<"
    },
    {
      "method": "POST",
      "path": "/v1/offers/:offerIdentifier/redemption-presentation",
      "auth": "api key + customer middleware",
      "controller": "handleAcknowledgeProductOfferPresentation",
      "routeSource": "apps/api-core/src/routes/product-offers.ts",
      "controllerSource": "apps/api-core/src/controllers/products/product-offer.controller.ts",
      "request": {
        "schemas": [],
        "evidence": "uncertain: no direct named schema call in handler body",
        "fields": [
          "path.offerIdentifier"
        ],
        "fieldEvidence": "direct controller destructuring/query/path read",
        "schemaFields": {},
        "types": [
          {
            "type": "unknown",
            "source": "apps/api-core/src/controllers/products/product-offer.controller.ts"
          }
        ]
      },
      "response": {
        "fields": [],
        "evidence": "uncertain: response is variable/service result or no direct literal c.json object",
        "types": [
          "{ acknowledged: true; }"
        ]
      },
      "notes": "after customer middleware",
      "controllerSignature": "export async function handleAcknowledgeProductOfferPresentation(\n  c: Context<"
    },
    {
      "method": "GET",
      "path": "/v1/support/threads",
      "auth": "api key + customer middleware",
      "controller": "handleListCustomerSupportThreads",
      "routeSource": "apps/api-core/src/routes/support.ts",
      "controllerSource": "apps/api-core/src/controllers/support/support.controller.ts",
      "request": {
        "schemas": [
          "supportThreadListQuerySchema"
        ],
        "evidence": "direct controller validation call",
        "fields": [],
        "fieldEvidence": "no direct field extraction; inspect named schema or delegated payload helper",
        "schemaFields": {
          "supportThreadListQuerySchema": {
            "fields": [
              "environment",
              "status",
              "category",
              "needsReply",
              "unread",
              "labelId",
              "projectId",
              "appId",
              "search",
              "limit",
              "cursor"
            ],
            "source": "packages/sdk-shared/src/validation/support.ts",
            "evidence": "schema object property keys parsed from source"
          }
        },
        "types": [
          {
            "type": "{ environment?: \"test\" | \"live\" | undefined; status?: \"open\" | \"resolved\" | undefined; category?: \"message\" | \"bug\" | \"feature\" | undefined; needsReply?: \"false\" | \"true\" | undefined; unread?: \"true\" | undefined; labelId?: string | undefined; customerId?: string | undefined; projectId?: string | undefined; appId?: string | undefined; search?: string | undefined; limit?: unknown; cursor?: string | undefined; }",
            "source": "apps/api-core/src/controllers/support/support.controller.ts"
          }
        ]
      },
      "response": {
        "fields": [],
        "evidence": "uncertain: response is variable/service result or no direct literal c.json object",
        "types": [
          "import(\"/Users/hm/Projects/One/apps/api-core/src/services/support/support.service\").SupportThreadPage"
        ]
      },
      "notes": "after customer middleware",
      "controllerSignature": "export async function handleListCustomerSupportThreads(c: SupportContext)"
    },
    {
      "method": "POST",
      "path": "/v1/support/threads",
      "auth": "api key + customer middleware",
      "controller": "handleCreateCustomerSupportThread",
      "routeSource": "apps/api-core/src/routes/support.ts",
      "controllerSource": "apps/api-core/src/controllers/support/support.controller.ts",
      "request": {
        "schemas": [
          "createSupportThreadRequestSchema"
        ],
        "evidence": "direct controller validation call",
        "fields": [],
        "fieldEvidence": "no direct field extraction; inspect named schema or delegated payload helper",
        "schemaFields": {
          "createSupportThreadRequestSchema": {
            "fields": [
              "category",
              "subject",
              "body",
              "clientMessageId",
              "email",
              "clientAccess",
              "diagnostics",
              "diagnosticsAvailable",
              "attachmentTokens"
            ],
            "source": "packages/sdk-shared/src/validation/support.ts",
            "evidence": "schema object property keys parsed from source"
          }
        },
        "types": [
          {
            "type": "{ category: \"message\" | \"bug\" | \"feature\"; subject: string; body: string; clientMessageId: string; email?: string | undefined; clientAccess?: { access: { version: 1; observedAt: string; policy: \"account\" | \"app_store\"; verification: \"unavailable\" | \"authoritative\" | \"verified_entitlements\" | \"cached\"; benefits: { identifier: string; source: \"manual\" | \"apple\" | \"account\" | \"support_purchaser\" | \"preserved_import\"; effectiveUntil?: number | null | undefined; verifiedAt?: string | null | undefined; }[]; truncated: boolean; providerEnvironment?: \"Production\" | \"Sandbox\" | \"Xcode\" | null | undefined; operationId?: string | null | undefined; attemptId?: string | null | undefined; requestId?: string | null | undefined; accessContextExpiresAt?: number | null | undefined; appleEvidence?: { observedAt: string; acquisition: \"unavailable\" | \"rejected\" | \"app_transaction\" | \"receipt\"; purchaserComparison: \"unavailable\" | \"first_observation\" | \"same\" | \"changed\"; collectionComplete: boolean; priorTransactionCount: number; submittedTransactionCount: number; retainedTransactionCount: number; missingProductIdentifiers: string[]; previousPurchaserHash?: string | null | undefined; currentPurchaserHash?: string | null | undefined; acquisitionFailureStage?: string | null | undefined; } | null | undefined; }; appleDiagnostics: { observedAt: string; stage: string; nativeDomain: string; nativeCode: number; storeKitCase?: string | null | undefined; underlying?: { domain: string; code: number; }[] | undefined; }[]; } | undefined; diagnostics?: Record<string, string | number | boolean | null> | undefined; diagnosticsAvailable?: boolean | undefined; attachmentTokens?: string[] | undefined; }",
            "source": "apps/api-core/src/controllers/support/support.controller.ts"
          }
        ]
      },
      "response": {
        "fields": [],
        "evidence": "uncertain: response is variable/service result or no direct literal c.json object",
        "types": [
          "import(\"/Users/hm/Projects/One/apps/api-core/src/services/support/support.service\").SupportWriteResult"
        ]
      },
      "notes": "after customer middleware",
      "controllerSignature": "export async function handleCreateCustomerSupportThread(c: SupportContext)"
    },
    {
      "method": "GET",
      "path": "/v1/support/threads/:threadId",
      "auth": "api key + customer middleware",
      "controller": "handleGetCustomerSupportThread",
      "routeSource": "apps/api-core/src/routes/support.ts",
      "controllerSource": "apps/api-core/src/controllers/support/support.controller.ts",
      "request": {
        "schemas": [],
        "evidence": "uncertain: no direct named schema call in handler body",
        "fields": [
          "path.threadId"
        ],
        "fieldEvidence": "direct controller destructuring/query/path read",
        "schemaFields": {},
        "types": []
      },
      "response": {
        "fields": [],
        "evidence": "uncertain: response is variable/service result or no direct literal c.json object",
        "types": [
          "import(\"/Users/hm/Projects/One/packages/sdk-shared/dist/index\").SupportThreadDetailResponse"
        ]
      },
      "notes": "after customer middleware",
      "controllerSignature": "export async function handleGetCustomerSupportThread(c: SupportContext)"
    },
    {
      "method": "POST",
      "path": "/v1/support/threads/:threadId/messages",
      "auth": "api key + customer middleware",
      "controller": "handleCreateCustomerSupportMessage",
      "routeSource": "apps/api-core/src/routes/support.ts",
      "controllerSource": "apps/api-core/src/controllers/support/support.controller.ts",
      "request": {
        "schemas": [
          "createSupportMessageRequestSchema"
        ],
        "evidence": "direct controller validation call",
        "fields": [
          "path.threadId"
        ],
        "fieldEvidence": "direct controller destructuring/query/path read",
        "schemaFields": {
          "createSupportMessageRequestSchema": {
            "fields": [
              "body",
              "clientMessageId",
              "clientAccess",
              "diagnostics",
              "diagnosticsAvailable",
              "attachmentTokens"
            ],
            "source": "packages/sdk-shared/src/validation/support.ts",
            "evidence": "schema object property keys parsed from source"
          }
        },
        "types": [
          {
            "type": "{ body: string; clientMessageId: string; clientAccess?: { access: { version: 1; observedAt: string; policy: \"account\" | \"app_store\"; verification: \"unavailable\" | \"authoritative\" | \"verified_entitlements\" | \"cached\"; benefits: { identifier: string; source: \"manual\" | \"apple\" | \"account\" | \"support_purchaser\" | \"preserved_import\"; effectiveUntil?: number | null | undefined; verifiedAt?: string | null | undefined; }[]; truncated: boolean; providerEnvironment?: \"Production\" | \"Sandbox\" | \"Xcode\" | null | undefined; operationId?: string | null | undefined; attemptId?: string | null | undefined; requestId?: string | null | undefined; accessContextExpiresAt?: number | null | undefined; appleEvidence?: { observedAt: string; acquisition: \"unavailable\" | \"rejected\" | \"app_transaction\" | \"receipt\"; purchaserComparison: \"unavailable\" | \"first_observation\" | \"same\" | \"changed\"; collectionComplete: boolean; priorTransactionCount: number; submittedTransactionCount: number; retainedTransactionCount: number; missingProductIdentifiers: string[]; previousPurchaserHash?: string | null | undefined; currentPurchaserHash?: string | null | undefined; acquisitionFailureStage?: string | null | undefined; } | null | undefined; }; appleDiagnostics: { observedAt: string; stage: string; nativeDomain: string; nativeCode: number; storeKitCase?: string | null | undefined; underlying?: { domain: string; code: number; }[] | undefined; }[]; } | undefined; diagnostics?: Record<string, string | number | boolean | null> | undefined; diagnosticsAvailable?: boolean | undefined; attachmentTokens?: string[] | undefined; }",
            "source": "apps/api-core/src/controllers/support/support.controller.ts"
          }
        ]
      },
      "response": {
        "fields": [],
        "evidence": "uncertain: response is variable/service result or no direct literal c.json object",
        "types": [
          "import(\"/Users/hm/Projects/One/apps/api-core/src/services/support/support.service\").SupportWriteResult"
        ]
      },
      "notes": "after customer middleware",
      "controllerSignature": "export async function handleCreateCustomerSupportMessage(c: SupportContext)"
    },
    {
      "method": "POST",
      "path": "/v1/support/threads/:threadId/read",
      "auth": "api key + customer middleware",
      "controller": "handleMarkCustomerSupportThreadRead",
      "routeSource": "apps/api-core/src/routes/support.ts",
      "controllerSource": "apps/api-core/src/controllers/support/support.controller.ts",
      "request": {
        "schemas": [],
        "evidence": "uncertain: no direct named schema call in handler body",
        "fields": [
          "path.threadId"
        ],
        "fieldEvidence": "direct controller destructuring/query/path read",
        "schemaFields": {},
        "types": []
      },
      "response": {
        "fields": [
          "success"
        ],
        "evidence": "literal top-level c.json object keys found in controller",
        "types": [
          "{ success: true; }"
        ]
      },
      "notes": "after customer middleware",
      "controllerSignature": "export async function handleMarkCustomerSupportThreadRead(c: SupportContext)"
    },
    {
      "method": "POST",
      "path": "/v1/support/threads/:threadId/resolve",
      "auth": "api key + customer middleware",
      "controller": "handleResolveCustomerSupportThread",
      "routeSource": "apps/api-core/src/routes/support.ts",
      "controllerSource": "apps/api-core/src/controllers/support/support.controller.ts",
      "request": {
        "schemas": [],
        "evidence": "uncertain: no direct named schema call in handler body",
        "fields": [
          "path.threadId"
        ],
        "fieldEvidence": "direct controller destructuring/query/path read",
        "schemaFields": {},
        "types": []
      },
      "response": {
        "fields": [],
        "evidence": "uncertain: response is variable/service result or no direct literal c.json object",
        "types": [
          "import(\"/Users/hm/Projects/One/packages/sdk-shared/dist/index\").SupportThreadDetailResponse"
        ]
      },
      "notes": "after customer middleware",
      "controllerSignature": "export async function handleResolveCustomerSupportThread(c: SupportContext)"
    },
    {
      "method": "GET",
      "path": "/v1/support/contact",
      "auth": "api key + customer middleware",
      "controller": "handleGetCustomerSupportContact",
      "routeSource": "apps/api-core/src/routes/support.ts",
      "controllerSource": "apps/api-core/src/controllers/support/support.controller.ts",
      "request": {
        "schemas": [],
        "evidence": "uncertain: no direct named schema call in handler body",
        "fields": [],
        "fieldEvidence": "no direct field extraction; inspect named schema or delegated payload helper",
        "schemaFields": {},
        "types": []
      },
      "response": {
        "fields": [],
        "evidence": "uncertain: response is variable/service result or no direct literal c.json object",
        "types": [
          "import(\"/Users/hm/Projects/One/packages/sdk-shared/dist/index\").SupportContactResponse"
        ]
      },
      "notes": "after customer middleware",
      "controllerSignature": "export async function handleGetCustomerSupportContact(c: SupportContext)"
    },
    {
      "method": "PUT",
      "path": "/v1/support/contact",
      "auth": "api key + customer middleware",
      "controller": "handleUpdateCustomerSupportContact",
      "routeSource": "apps/api-core/src/routes/support.ts",
      "controllerSource": "apps/api-core/src/controllers/support/support.controller.ts",
      "request": {
        "schemas": [
          "updateSupportContactRequestSchema"
        ],
        "evidence": "direct controller validation call",
        "fields": [],
        "fieldEvidence": "no direct field extraction; inspect named schema or delegated payload helper",
        "schemaFields": {
          "updateSupportContactRequestSchema": {
            "fields": [
              "email",
              "emailNotificationsEnabled",
              "pushNotificationsEnabled"
            ],
            "source": "packages/sdk-shared/src/validation/support.ts",
            "evidence": "schema object property keys parsed from source"
          }
        },
        "types": [
          {
            "type": "{ email?: string | null | undefined; emailNotificationsEnabled?: boolean | undefined; pushNotificationsEnabled?: boolean | undefined; }",
            "source": "apps/api-core/src/controllers/support/support.controller.ts"
          }
        ]
      },
      "response": {
        "fields": [],
        "evidence": "uncertain: response is variable/service result or no direct literal c.json object",
        "types": [
          "import(\"/Users/hm/Projects/One/packages/sdk-shared/dist/index\").SupportContactResponse"
        ]
      },
      "notes": "after customer middleware",
      "controllerSignature": "export async function handleUpdateCustomerSupportContact(c: SupportContext)"
    },
    {
      "method": "POST",
      "path": "/v1/support/attachments/prepare",
      "auth": "api key + customer middleware",
      "controller": "handlePrepareCustomerSupportAttachment",
      "routeSource": "apps/api-core/src/routes/support.ts",
      "controllerSource": "apps/api-core/src/controllers/support/support.controller.ts",
      "request": {
        "schemas": [
          "prepareSupportAttachmentUploadRequestSchema"
        ],
        "evidence": "direct controller validation call",
        "fields": [],
        "fieldEvidence": "no direct field extraction; inspect named schema or delegated payload helper",
        "schemaFields": {
          "prepareSupportAttachmentUploadRequestSchema": {
            "fields": [
              "fileName",
              "contentType",
              "byteSize",
              "checksumSha256"
            ],
            "source": "packages/sdk-shared/src/validation/support.ts",
            "evidence": "schema object property keys parsed from source"
          }
        },
        "types": [
          {
            "type": "{ fileName: string; contentType: string; byteSize: number; checksumSha256: string; }",
            "source": "apps/api-core/src/controllers/support/support.controller.ts"
          }
        ]
      },
      "response": {
        "fields": [],
        "evidence": "uncertain: response is variable/service result or no direct literal c.json object",
        "types": [
          "import(\"/Users/hm/Projects/One/packages/sdk-shared/dist/index\").SupportAttachmentUploadPreparation"
        ]
      },
      "notes": "after customer middleware",
      "controllerSignature": "export async function handlePrepareCustomerSupportAttachment(c: SupportContext)"
    },
    {
      "method": "POST",
      "path": "/v1/crashes",
      "auth": "api key + customer middleware",
      "controller": "handleCreateCrashReport",
      "routeSource": "apps/api-core/src/routes/crash-reports.ts",
      "controllerSource": "apps/api-core/src/controllers/crash-reports/crash-report.controller.ts",
      "request": {
        "schemas": [
          "createCrashReportRequestSchema"
        ],
        "evidence": "direct controller validation call",
        "fields": [],
        "fieldEvidence": "no direct field extraction; inspect named schema or delegated payload helper",
        "schemaFields": {
          "createCrashReportRequestSchema": {
            "fields": [
              "reportId",
              "occurredAt",
              "fingerprint",
              "appVersion",
              "buildNumber",
              "sdkVersion",
              "osVersion",
              "deviceModel",
              "signalName",
              "signalCode",
              "exceptionName",
              "exceptionReason",
              "crashedThreadNumber",
              "frames",
              "rawReportBase64",
              "formattedReport"
            ],
            "source": "packages/sdk-shared/src/validation/crash-reports.ts",
            "evidence": "schema object property keys parsed from source"
          }
        },
        "types": [
          {
            "type": "{ reportId: string; occurredAt: string; fingerprint: string; appVersion: string; buildNumber: string; sdkVersion: string; osVersion: string; deviceModel: string; frames: { imageName: string; imageOffset: string; imageUUID?: string | null | undefined; }[]; rawReportBase64: string; formattedReport: string; signalName?: string | null | undefined; signalCode?: string | null | undefined; exceptionName?: string | null | undefined; exceptionReason?: string | null | undefined; crashedThreadNumber?: number | null | undefined; }",
            "source": "apps/api-core/src/controllers/crash-reports/crash-report.controller.ts"
          },
          {
            "type": "{ key: string; revision: number; occurrenceId: string; properties: Record<string, string>; attemptId?: string | undefined; sequence?: number | undefined; }",
            "source": "apps/api-core/src/services/events/events.service.ts"
          },
          {
            "type": "{ operationId: string; state: \"cancelled\" | \"exhausted\" | \"pending\" | \"started\" | \"retrying\" | \"confirmed\" | \"no_matching_purchase\" | \"interrupted\"; attempt: number; observedAt: string; parentOperationId?: string | null | undefined; }",
            "source": "apps/api-core/src/services/events/events.service.ts"
          },
          {
            "type": "{ version: 1; observedAt: string; policy: \"account\" | \"app_store\"; verification: \"unavailable\" | \"authoritative\" | \"verified_entitlements\" | \"cached\"; benefits: { identifier: string; source: \"manual\" | \"apple\" | \"account\" | \"support_purchaser\" | \"preserved_import\"; effectiveUntil?: number | null | undefined; verifiedAt?: string | null | undefined; }[]; truncated: boolean; providerEnvironment?: \"Production\" | \"Sandbox\" | \"Xcode\" | null | undefined; operationId?: string | null | undefined; attemptId?: string | null | undefined; requestId?: string | null | undefined; accessContextExpiresAt?: number | null | undefined; appleEvidence?: { observedAt: string; acquisition: \"unavailable\" | \"rejected\" | \"app_transaction\" | \"receipt\"; purchaserComparison: \"unavailable\" | \"first_observation\" | \"same\" | \"changed\"; collectionComplete: boolean; priorTransactionCount: number; submittedTransactionCount: number; retainedTransactionCount: number; missingProductIdentifiers: string[]; previousPurchaserHash?: string | null | undefined; currentPurchaserHash?: string | null | undefined; acquisitionFailureStage?: string | null | undefined; } | null | undefined; }",
            "source": "apps/api-core/src/services/events/events.service.ts"
          },
          {
            "type": "{ occurrenceId: string; phase: \"startup\" | \"runtime\"; operation: string; domain: string; code: string; message: string; underlyingErrors: { domain: string; code: string; message: string; }[]; appVersion: string; buildNumber: string; truncated: boolean; stage?: string | undefined; migrationIdentifier?: string | undefined; relatedCrashReportId?: string | undefined; }",
            "source": "apps/api-core/src/services/events/events.service.ts"
          }
        ]
      },
      "response": {
        "fields": [],
        "evidence": "uncertain: response is variable/service result or no direct literal c.json object",
        "types": [
          "{ crashReport: import(\"/Users/hm/Projects/One/packages/sdk-shared/dist/index\").CrashReportSummary; created: boolean; }"
        ]
      },
      "notes": "after customer middleware",
      "controllerSignature": "export async function handleCreateCrashReport(c: CrashReportContext)"
    },
    {
      "method": "GET",
      "path": "/v1/auth/callback/google",
      "auth": "public OAuth callback (no API key middleware)",
      "controller": "inline route handler",
      "routeSource": "apps/api-core/src/routes/auth-callbacks.ts",
      "controllerSource": "apps/api-core/src/routes/auth-callbacks.ts",
      "request": {
        "schemas": [],
        "evidence": "uncertain: no direct named schema call in handler body",
        "fields": [],
        "fieldEvidence": "no direct field extraction; inspect named schema or delegated payload helper",
        "schemaFields": {},
        "types": []
      },
      "response": {
        "fields": [],
        "evidence": "uncertain: response is variable/service result or no direct literal c.json object"
      },
      "notes": "mounted before /v1 apiRoutes; callback validates state/provider response",
      "controllerSignature": "async (c) =>"
    },
    {
      "method": "ALL",
      "path": "/v1/auth/callback/apple",
      "auth": "public OAuth callback (no API key middleware)",
      "controller": "inline route handler",
      "routeSource": "apps/api-core/src/routes/auth-callbacks.ts",
      "controllerSource": "apps/api-core/src/routes/auth-callbacks.ts",
      "request": {
        "schemas": [],
        "evidence": "uncertain: no direct named schema call in handler body",
        "fields": [],
        "fieldEvidence": "no direct field extraction; inspect named schema or delegated payload helper",
        "schemaFields": {},
        "types": []
      },
      "response": {
        "fields": [],
        "evidence": "uncertain: response is variable/service result or no direct literal c.json object"
      },
      "notes": "mounted before /v1 apiRoutes; callback validates state/provider response",
      "controllerSignature": "async (c) =>"
    },
    {
      "method": "GET",
      "path": "/v1/surveys",
      "auth": "api key middleware; customer middleware where route is mounted after the customer boundary",
      "controller": "handleSurveyCatalog",
      "routeSource": "apps/api-core/src/routes/surveys.ts",
      "controllerSource": "apps/api-core/src/controllers/surveys/survey.controller.ts",
      "request": {
        "schemas": [],
        "evidence": "uncertain: no direct named schema call in handler body",
        "fields": [],
        "fieldEvidence": "no direct field extraction; inspect named schema or delegated payload helper",
        "schemaFields": {},
        "types": [
          {
            "type": "unknown",
            "source": "apps/api-core/src/services/surveys/survey.service.ts"
          }
        ]
      },
      "response": {
        "fields": [],
        "evidence": "uncertain: response is variable/service result or no direct literal c.json object",
        "types": [
          "{ surveys: import(\"/Users/hm/Projects/One/packages/sdk-shared/dist/index\").SurveyCatalogItem[]; }"
        ]
      },
      "notes": "before customer middleware; requires x-one-survey-config-version",
      "controllerSignature": "export async function handleSurveyCatalog(c: Ctx): Promise<Response>"
    },
    {
      "method": "POST",
      "path": "/v1/surveys/participations/:participationId/shown",
      "auth": "api key middleware; customer middleware where route is mounted after the customer boundary",
      "controller": "handleSurveyShown",
      "routeSource": "apps/api-core/src/routes/surveys.ts",
      "controllerSource": "apps/api-core/src/controllers/surveys/survey.controller.ts",
      "request": {
        "schemas": [
          "surveyShownSchema"
        ],
        "evidence": "uncertain: no direct named schema call in handler body",
        "fields": [
          "path.participationId"
        ],
        "fieldEvidence": "no direct field extraction; inspect named schema or delegated payload helper",
        "schemaFields": {},
        "types": [
          {
            "type": "{ shownAt: string; }",
            "source": "apps/api-core/src/controllers/surveys/survey.controller.ts"
          }
        ]
      },
      "response": {
        "fields": [],
        "evidence": "uncertain: response is variable/service result or no direct literal c.json object",
        "types": [
          "{ shownAt: string; }"
        ]
      },
      "notes": "after customer middleware; survey display command",
      "controllerSignature": "export async function handleSurveyShown(c: Ctx)"
    },
    {
      "method": "POST",
      "path": "/v1/surveys/participations/:participationId/dismiss",
      "auth": "api key middleware; customer middleware where route is mounted after the customer boundary",
      "controller": "handleSurveyDismiss",
      "routeSource": "apps/api-core/src/routes/surveys.ts",
      "controllerSource": "apps/api-core/src/controllers/surveys/survey.controller.ts",
      "request": {
        "schemas": [
          "surveyDismissSchema"
        ],
        "evidence": "uncertain: no direct named schema call in handler body",
        "fields": [
          "path.participationId"
        ],
        "fieldEvidence": "no direct field extraction; inspect named schema or delegated payload helper",
        "schemaFields": {},
        "types": [
          {
            "type": "{ shownAt?: string | undefined; }",
            "source": "apps/api-core/src/controllers/surveys/survey.controller.ts"
          }
        ]
      },
      "response": {
        "fields": [],
        "evidence": "uncertain: response is variable/service result or no direct literal c.json object",
        "types": [
          "{ success: boolean; }"
        ]
      },
      "notes": "after customer middleware; survey dismissal command",
      "controllerSignature": "export async function handleSurveyDismiss(c: Ctx)"
    },
    {
      "method": "POST",
      "path": "/v1/surveys/participations/:participationId/response",
      "auth": "api key middleware; customer middleware where route is mounted after the customer boundary",
      "controller": "handleSurveySubmission",
      "routeSource": "apps/api-core/src/routes/surveys.ts",
      "controllerSource": "apps/api-core/src/controllers/surveys/survey.controller.ts",
      "request": {
        "schemas": [
          "surveySubmissionSchema"
        ],
        "evidence": "uncertain: no direct named schema call in handler body",
        "fields": [
          "path.participationId"
        ],
        "fieldEvidence": "no direct field extraction; inspect named schema or delegated payload helper",
        "schemaFields": {},
        "types": [
          {
            "type": "{ submissionId: string; answers: { questionId: string; choiceIds?: string[] | undefined; otherText?: string | undefined; text?: string | undefined; rating?: number | undefined; }[]; shownAt?: string | undefined; }",
            "source": "apps/api-core/src/services/surveys/survey.service.ts"
          },
          {
            "type": "unknown",
            "source": "apps/api-core/src/services/surveys/survey.service.ts"
          }
        ]
      },
      "response": {
        "fields": [],
        "evidence": "uncertain: response is variable/service result or no direct literal c.json object",
        "types": [
          "import(\"/Users/hm/Projects/One/packages/sdk-shared/dist/index\").SurveySubmissionReceipt"
        ]
      },
      "notes": "after customer middleware; survey response command",
      "controllerSignature": "export async function handleSurveySubmission(c: Ctx)"
    },
    {
      "method": "GET",
      "path": "/v1/support/unread",
      "auth": "api key + customer middleware",
      "controller": "handleGetSupportUnreadSummary",
      "routeSource": "apps/api-core/src/routes/support.ts",
      "controllerSource": "apps/api-core/src/controllers/support/support.controller.ts",
      "request": {
        "schemas": [],
        "evidence": "no request body; path/query inputs only",
        "fields": [],
        "fieldEvidence": "reviewed controller and mounted route",
        "schemaFields": {},
        "types": []
      },
      "response": {
        "fields": [],
        "evidence": "compiler response extraction from the mounted handler",
        "types": [
          "{ unreadThreadCount: number; }"
        ]
      },
      "notes": "after customer middleware",
      "controllerSignature": "export async function handleGetSupportUnreadSummary(c: SupportContext)"
    },
    {
      "method": "POST",
      "path": "/v1/support/threads/:threadId/read-messages",
      "auth": "api key + customer middleware",
      "controller": "handleMarkSupportMessagesRead",
      "routeSource": "apps/api-core/src/routes/support.ts",
      "controllerSource": "apps/api-core/src/controllers/support/support.controller.ts",
      "request": {
        "schemas": [
          "markSupportMessagesReadRequestSchema"
        ],
        "evidence": "reviewed named shared validation schema",
        "fields": [
          "path.threadId"
        ],
        "fieldEvidence": "reviewed controller and mounted route",
        "schemaFields": {
          "markSupportMessagesReadRequestSchema": {
            "fields": [
              "messageIds"
            ],
            "source": "packages/sdk-shared/src/validation/support.ts",
            "evidence": "schema object property keys reviewed from source"
          }
        },
        "types": [
          {
            "type": "{ messageIds: string[]; }",
            "source": "apps/api-core/src/controllers/support/support.controller.ts"
          }
        ]
      },
      "response": {
        "fields": [],
        "evidence": "compiler response extraction from the mounted handler",
        "types": [
          "{ unreadThreadCount: number; success: boolean; }"
        ]
      },
      "notes": "after customer middleware",
      "controllerSignature": "export async function handleMarkSupportMessagesRead(c: SupportContext)"
    }
  ],
  "agent": [
    {
      "method": "GET",
      "path": "/agent/context",
      "auth": "Bearer One Agent token via agentAuthMiddleware",
      "controller": "handleGetAgentContext",
      "routeSource": "apps/api-core/src/routes/agent.ts",
      "controllerSource": "apps/api-core/src/controllers/agent.controller.ts",
      "request": {
        "schemas": [],
        "evidence": "uncertain: no direct named schema call in handler body",
        "fields": [],
        "fieldEvidence": "no direct field extraction; inspect named schema or delegated payload helper",
        "schemaFields": {},
        "types": []
      },
      "response": {
        "fields": [],
        "evidence": "uncertain: response is variable/service result or no direct literal c.json object",
        "types": [
          "{ providerConnections?: { connections: { connection: import(\"/Users/hm/Projects/One/apps/api-core/src/services/provider-connections/provider-connection.service\").ProviderConnectionDto; accounts: { workspaceId: string; id: string; name: string; createdAt: Date; updatedAt: Date; connectionId: string; parentAccountId: string | null; accountKind: string; externalAccountId: string; role: string | null; permissions: string[]; currency: string | null; timezone: string | null; metadata: import(\"/Users/hm/Projects/One/packages/sdk-shared/dist/index\").ProviderConnectionAccountMetadata; lastDiscoveredAt: Date; }[]; mappings: { appId: string; projectId: string; workspaceId: string; id: string; createdAt: Date; updatedAt: Date; enabled: boolean; connectionId: string; accountId: string; externalAppId: string; externalAppName: string | null; settings: import(\"/Users/hm/Projects/One/packages/sdk-shared/dist/index\").ProviderConnectionAppMappingSettings; }[]; operations: { appId: string | null; workspaceId: string; id: string; createdAt: Date; updatedAt: Date; status: \"failed\" | \"queued\" | \"running\" | \"succeeded\" | \"cancelled\" | \"expired\"; completedAt: Date | null; startedAt: Date | null; connectionId: string; accountId: string | null; appMappingId: string | null; parentOperationId: string | null; actorPlatformUserId: string | null; operationType: \"validate\" | \"sync\" | \"import_preview\" | \"import_apply\" | \"secret_rotate\" | \"connection_revoke\" | \"resource_mutation_preview\" | \"resource_mutation_apply\" | \"resource_destructive_preview\" | \"resource_destructive_apply\"; idempotencyKey: string | null; resourceType: string | null; resourceId: string | null; request: import(\"/Users/hm/Projects/One/packages/sdk-shared/dist/index\").ProviderConnectionOperationData; beforeState: import(\"/Users/hm/Projects/One/packages/sdk-shared/dist/index\").ProviderConnectionOperationData | null; requestedState: import(\"/Users/hm/Projects/One/packages/sdk-shared/dist/index\").ProviderConnectionOperationData | null; providerResponse: import(\"/Users/hm/Projects/One/packages/sdk-shared/dist/index\").ProviderConnectionOperationData | null; errorCode: string | null; errorMessage: string | null; queuedAt: Date; expiresAt: Date | null; appliedAt: Date | null; }[]; }[]; } | undefined; workspace: { id: string; name: string; slug: string; }; token: { id: string; scopes: (\"workspace:read\" | \"workspace:write\" | \"apps:read\" | \"apps:write\" | \"reports:read\" | \"catalog:read\" | \"catalog:write\" | \"paywalls:read\" | \"paywalls:write\" | \"messaging:read\" | \"messaging:write\" | \"campaigns:read\" | \"campaigns:write\" | \"remote_config:read\" | \"remote_config:write\" | \"surfaces:read\" | \"surfaces:write\" | \"surveys:read\" | \"surveys:write\" | \"rules:read\" | \"rules:write\" | \"webhooks:read\" | \"webhooks:write\" | \"integrations:read\" | \"integrations:write\" | \"auth:read\" | \"auth:write\" | \"audit:read\")[]; allowedAppIds: string[] | null | undefined; }; apps: { id: string; name: string; emailChangeMode: string; environment: \"test\" | \"live\"; liveAppId: string | null; }[]; }"
        ]
      },
      "notes": "all endpoint routes require agent token",
      "controllerSignature": "export async function handleGetAgentContext(c: Context<"
    },
    {
      "method": "GET",
      "path": "/agent/apps/:appId/paid-access-settings",
      "auth": "Bearer One Agent token via agentAuthMiddleware",
      "controller": "handleGetAgentPaidAccessSettings",
      "routeSource": "apps/api-core/src/routes/agent.ts",
      "controllerSource": "apps/api-core/src/controllers/agent-paid-access.controller.ts",
      "request": {
        "schemas": [],
        "evidence": "uncertain: no direct named schema call in handler body",
        "fields": [
          "path.appId"
        ],
        "fieldEvidence": "direct controller destructuring/query/path read",
        "schemaFields": {},
        "types": [
          {
            "type": "\"account\" | \"app_store\"",
            "source": "apps/api-core/src/services/products/paid-access-configuration.service.ts"
          }
        ]
      },
      "response": {
        "fields": [],
        "evidence": "uncertain: response is variable/service result or no direct literal c.json object",
        "types": [
          "{ settings: { appId: string; platform: \"ios\" | \"android\" | \"web\" | \"windows\" | \"macos\"; bootstrap: { appId: string; bundleId: string | null; environment: \"test\" | \"live\"; paidAccess: import(\"/Users/hm/Projects/One/packages/sdk-shared/dist/index\").PaidAccessConfiguration; }; policy: \"account\" | \"app_store\"; appPurchaseRules: import(\"/Users/hm/Projects/One/packages/sdk-shared/dist/index\").AppStoreAppPurchaseRule[]; preservedImport: import(\"/Users/hm/Projects/One/packages/sdk-shared/dist/index\").PreservedImportPolicy | null; }; }"
        ]
      },
      "notes": "all endpoint routes require agent token",
      "controllerSignature": "export async function handleGetAgentPaidAccessSettings(c: Context<"
    },
    {
      "method": "GET",
      "path": "/agent/apps/:appId/account-deletion-policy",
      "auth": "Bearer One Agent token via agentAuthMiddleware",
      "controller": "handleGetAgentAccountDeletionPolicy",
      "routeSource": "apps/api-core/src/routes/agent.ts",
      "controllerSource": "apps/api-core/src/controllers/agent.controller.ts",
      "request": {
        "schemas": [],
        "evidence": "uncertain: no direct named schema call in handler body",
        "fields": [
          "path.appId"
        ],
        "fieldEvidence": "direct controller destructuring/query/path read",
        "schemaFields": {},
        "types": [
          {
            "type": "{ mode: \"delete_credential\" | \"delete_customer\"; requireCurrentPassword: boolean; scrubCustomerProfile: boolean; detachCustomerAuthUser: boolean; detachWorkspaceCustomer: boolean; deleteCustomerAuthUserWhenUnused: boolean; credentialProviderIds: string[]; }",
            "source": "apps/api-core/src/controllers/agent.controller.ts"
          }
        ]
      },
      "response": {
        "fields": [],
        "evidence": "uncertain: response is variable/service result or no direct literal c.json object",
        "types": [
          "{ [x: string]: unknown; }"
        ]
      },
      "notes": "all endpoint routes require agent token",
      "controllerSignature": "export async function handleGetAgentAccountDeletionPolicy(\n  c: Context<"
    },
    {
      "method": "GET",
      "path": "/agent/auth-identities/inspect",
      "auth": "Bearer One Agent token via agentAuthMiddleware",
      "controller": "handleInspectAgentAuthIdentity",
      "routeSource": "apps/api-core/src/routes/agent.ts",
      "controllerSource": "apps/api-core/src/controllers/agent.controller.ts",
      "request": {
        "schemas": [],
        "evidence": "uncertain: no direct named schema call in handler body",
        "fields": [
          "environment",
          "email"
        ],
        "fieldEvidence": "direct controller destructuring/query/path read",
        "schemaFields": {},
        "types": [
          {
            "type": "{ environment: \"test\" | \"live\"; email: string; }",
            "source": "apps/api-core/src/controllers/agent.controller.ts"
          }
        ]
      },
      "response": {
        "fields": [],
        "evidence": "uncertain: response is variable/service result or no direct literal c.json object",
        "types": [
          "{ environment: import(\"/Users/hm/Projects/One/packages/sdk-shared/dist/index\").IdEnvironment; normalizedEmail: string; identity: null | { id: string; email: string; emailVerified: boolean; createdAt: string; updatedAt: string; providers: Array<{ providerId: string; accountCount: number; hasPassword: boolean; passwordUpdatedAt: string | null; }>; customerCount: number; linkedAppIds: string[]; workspaceCustomerCount: number; sessionCount: number; activeSessionCount: number; challengeCount: number; activeChallengeCount: number; deletionEligibility: { eligible: boolean; environment: \"test_only\"; reasonCodes: string[]; }; }; }"
        ]
      },
      "notes": "all endpoint routes require agent token",
      "controllerSignature": "export async function handleInspectAgentAuthIdentity(c: Context<"
    },
    {
      "method": "GET",
      "path": "/agent/creative-contract",
      "auth": "Bearer One Agent token via agentAuthMiddleware",
      "controller": "handleGetAgentCreativeContract",
      "routeSource": "apps/api-core/src/routes/agent.ts",
      "controllerSource": "apps/api-core/src/controllers/agent.controller.ts",
      "request": {
        "schemas": [],
        "evidence": "uncertain: no direct named schema call in handler body",
        "fields": [],
        "fieldEvidence": "no direct field extraction; inspect named schema or delegated payload helper",
        "schemaFields": {},
        "types": []
      },
      "response": {
        "fields": [],
        "evidence": "uncertain: response is variable/service result or no direct literal c.json object",
        "types": [
          "{ [x: string]: unknown; }"
        ]
      },
      "notes": "all endpoint routes require agent token",
      "controllerSignature": "export async function handleGetAgentCreativeContract(\n  c: Context<"
    },
    {
      "method": "GET",
      "path": "/agent/apps/:appId/in-app-surfaces",
      "auth": "Bearer One Agent token via agentAuthMiddleware",
      "controller": "handleListAgentInAppSurfaces",
      "routeSource": "apps/api-core/src/routes/agent.ts",
      "controllerSource": "apps/api-core/src/controllers/agent.controller.ts",
      "request": {
        "schemas": [],
        "evidence": "uncertain: no direct named schema call in handler body",
        "fields": [
          "identifier",
          "path.appId"
        ],
        "fieldEvidence": "direct controller destructuring/query/path read",
        "schemaFields": {},
        "types": []
      },
      "response": {
        "fields": [],
        "evidence": "uncertain: response is variable/service result or no direct literal c.json object",
        "types": [
          "{ app: { id: string; name: string; environment: import(\"/Users/hm/Projects/One/packages/sdk-shared/dist/index\").IdEnvironment; liveAppId: string | null; }; surfaces: { appId: string; id: string; name: string; createdAt: Date; updatedAt: Date; identifier: string; status: \"active\" | \"inactive\" | \"archived\"; description: string | null; config: import(\"/Users/hm/Projects/One/packages/sdk-shared/dist/index\").AnyInAppSurfaceConfig; surfaceType: string; }[]; }"
        ]
      },
      "notes": "all endpoint routes require agent token",
      "controllerSignature": "export async function handleListAgentInAppSurfaces(c: Context<"
    },
    {
      "method": "GET",
      "path": "/agent/apps/:appId/in-app-surfaces/:surfaceIdOrIdentifier",
      "auth": "Bearer One Agent token via agentAuthMiddleware",
      "controller": "handleGetAgentInAppSurface",
      "routeSource": "apps/api-core/src/routes/agent.ts",
      "controllerSource": "apps/api-core/src/controllers/agent.controller.ts",
      "request": {
        "schemas": [],
        "evidence": "uncertain: no direct named schema call in handler body",
        "fields": [
          "path.appId",
          "path.surfaceIdOrIdentifier"
        ],
        "fieldEvidence": "direct controller destructuring/query/path read",
        "schemaFields": {},
        "types": []
      },
      "response": {
        "fields": [],
        "evidence": "uncertain: response is variable/service result or no direct literal c.json object",
        "types": [
          "{ app: { id: string; name: string; environment: import(\"/Users/hm/Projects/One/packages/sdk-shared/dist/index\").IdEnvironment; liveAppId: string | null; }; surface: { appId: string; id: string; name: string; createdAt: Date; updatedAt: Date; identifier: string; status: \"active\" | \"inactive\" | \"archived\"; description: string | null; config: import(\"/Users/hm/Projects/One/packages/sdk-shared/dist/index\").AnyInAppSurfaceConfig; surfaceType: string; }; revisions: { appId: string; id: string; createdAt: Date; label: string | null; source: \"publish\" | \"restore\"; config: import(\"/Users/hm/Projects/One/packages/sdk-shared/dist/index\").AnyPaywallConfig | import(\"/Users/hm/Projects/One/packages/sdk-shared/dist/index\").AnyInAppSurfaceConfig | import(\"/Users/hm/Projects/One/packages/sdk-shared/dist/index\").SurveyConfig; creativeType: \"paywall\" | \"in_app_surface\" | \"survey\"; creativeId: string; configVersion: string; createdByPlatformUserId: string | null; }[]; }"
        ]
      },
      "notes": "all endpoint routes require agent token",
      "controllerSignature": "export async function handleGetAgentInAppSurface(c: Context<"
    },
    {
      "method": "GET",
      "path": "/agent/apps/:appId/paywalls",
      "auth": "Bearer One Agent token via agentAuthMiddleware",
      "controller": "handleListAgentPaywalls",
      "routeSource": "apps/api-core/src/routes/agent.ts",
      "controllerSource": "apps/api-core/src/controllers/agent.controller.ts",
      "request": {
        "schemas": [],
        "evidence": "uncertain: no direct named schema call in handler body",
        "fields": [
          "identifier",
          "path.appId"
        ],
        "fieldEvidence": "direct controller destructuring/query/path read",
        "schemaFields": {},
        "types": []
      },
      "response": {
        "fields": [],
        "evidence": "uncertain: response is variable/service result or no direct literal c.json object",
        "types": [
          "{ app: { id: string; name: string; environment: import(\"/Users/hm/Projects/One/packages/sdk-shared/dist/index\").IdEnvironment; liveAppId: string | null; }; paywalls: { appId: string; id: string; name: string; createdAt: Date; updatedAt: Date; identifier: string; status: \"active\" | \"inactive\" | \"archived\"; isDefault: boolean; description: string | null; config: import(\"/Users/hm/Projects/One/packages/sdk-shared/dist/index\").AnyPaywallConfig; }[]; }"
        ]
      },
      "notes": "all endpoint routes require agent token",
      "controllerSignature": "export async function handleListAgentPaywalls(c: Context<"
    },
    {
      "method": "GET",
      "path": "/agent/apps/:appId/paywall-placements",
      "auth": "Bearer One Agent token via agentAuthMiddleware",
      "controller": "handleListAgentPaywallPlacements",
      "routeSource": "apps/api-core/src/routes/agent.ts",
      "controllerSource": "apps/api-core/src/controllers/agent.controller.ts",
      "request": {
        "schemas": [],
        "evidence": "uncertain: no direct named schema call in handler body",
        "fields": [
          "path.appId"
        ],
        "fieldEvidence": "direct controller destructuring/query/path read",
        "schemaFields": {},
        "types": []
      },
      "response": {
        "fields": [],
        "evidence": "uncertain: response is variable/service result or no direct literal c.json object",
        "types": [
          "{ app: { id: string; name: string; environment: import(\"/Users/hm/Projects/One/packages/sdk-shared/dist/index\").IdEnvironment; liveAppId: string | null; }; placements: { id: string; identifier: string; name: string; fallbackPaywall: { id: string; identifier: string; name: string; status: \"active\" | \"inactive\" | \"archived\"; } | null; }[]; }"
        ]
      },
      "notes": "all endpoint routes require agent token",
      "controllerSignature": "export async function handleListAgentPaywallPlacements(\n  c: Context<"
    },
    {
      "method": "GET",
      "path": "/agent/apps/:appId/paywalls/:paywallIdOrIdentifier",
      "auth": "Bearer One Agent token via agentAuthMiddleware",
      "controller": "handleGetAgentPaywall",
      "routeSource": "apps/api-core/src/routes/agent.ts",
      "controllerSource": "apps/api-core/src/controllers/agent.controller.ts",
      "request": {
        "schemas": [],
        "evidence": "uncertain: no direct named schema call in handler body",
        "fields": [
          "path.appId",
          "path.paywallIdOrIdentifier"
        ],
        "fieldEvidence": "direct controller destructuring/query/path read",
        "schemaFields": {},
        "types": []
      },
      "response": {
        "fields": [],
        "evidence": "uncertain: response is variable/service result or no direct literal c.json object",
        "types": [
          "{ app: { id: string; name: string; environment: import(\"/Users/hm/Projects/One/packages/sdk-shared/dist/index\").IdEnvironment; liveAppId: string | null; }; paywall: { appId: string; id: string; name: string; createdAt: Date; updatedAt: Date; identifier: string; status: \"active\" | \"inactive\" | \"archived\"; isDefault: boolean; description: string | null; config: import(\"/Users/hm/Projects/One/packages/sdk-shared/dist/index\").AnyPaywallConfig; }; revisions: { appId: string; id: string; createdAt: Date; label: string | null; source: \"publish\" | \"restore\"; config: import(\"/Users/hm/Projects/One/packages/sdk-shared/dist/index\").AnyPaywallConfig | import(\"/Users/hm/Projects/One/packages/sdk-shared/dist/index\").AnyInAppSurfaceConfig | import(\"/Users/hm/Projects/One/packages/sdk-shared/dist/index\").SurveyConfig; creativeType: \"paywall\" | \"in_app_surface\" | \"survey\"; creativeId: string; configVersion: string; createdByPlatformUserId: string | null; }[]; productLinks: { appId: string; id: string; createdAt: Date; updatedAt: Date; productId: string; paywallId: string; product: { appId: string; id: string; name: string; createdAt: Date; updatedAt: Date; identifier: string; description: string | null; pricingType: \"subscription\" | \"non_consumable\" | \"consumable\" | \"free\"; pricingPeriod: \"month\" | \"year\" | null; prices: { appId: string; active: boolean; platform: \"ios\" | \"android\" | \"web\" | \"windows\" | \"macos\" | null; id: string; createdAt: Date; updatedAt: Date; provider: \"stripe\" | \"apple_app_store\" | \"google_play\" | \"microsoft_store\"; currency: string | null; metadata: Record<string, unknown>; productId: string; isDefault: boolean; providerProductId: string; providerPriceId: string | null; unitAmount: number | null; billingPeriod: \"month\" | \"year\" | null; trialConfig: ProductPriceTrialConfig; familySharingEnabled: boolean; priority: number; }[]; }; }[]; }"
        ]
      },
      "notes": "all endpoint routes require agent token",
      "controllerSignature": "export async function handleGetAgentPaywall(c: Context<"
    },
    {
      "method": "GET",
      "path": "/agent/apps/:appId/email-templates",
      "auth": "Bearer One Agent token via agentAuthMiddleware",
      "controller": "handleListAgentEmailTemplates",
      "routeSource": "apps/api-core/src/routes/agent.ts",
      "controllerSource": "apps/api-core/src/controllers/agent.controller.ts",
      "request": {
        "schemas": [],
        "evidence": "uncertain: no direct named schema call in handler body",
        "fields": [
          "identifier",
          "path.appId"
        ],
        "fieldEvidence": "direct controller destructuring/query/path read",
        "schemaFields": {},
        "types": []
      },
      "response": {
        "fields": [],
        "evidence": "uncertain: response is variable/service result or no direct literal c.json object",
        "types": [
          "{ app: { id: string; name: string; environment: import(\"/Users/hm/Projects/One/packages/sdk-shared/dist/index\").IdEnvironment; liveAppId: string | null; }; emailTemplates: { id: string; name: string; createdAt: Date; updatedAt: Date; identifier: string; category: \"transactional\" | \"lifecycle\" | \"marketing\" | \"system\"; enabled: boolean; channel: \"email\" | \"push\"; locale: string; subject: string | null; contentType: \"push\" | \"mjml\" | \"html\" | \"text\"; }[]; }"
        ]
      },
      "notes": "all endpoint routes require agent token",
      "controllerSignature": "export async function handleListAgentEmailTemplates(c: Context<"
    },
    {
      "method": "GET",
      "path": "/agent/apps/:appId/email-templates/:templateId",
      "auth": "Bearer One Agent token via agentAuthMiddleware",
      "controller": "handleGetAgentEmailTemplate",
      "routeSource": "apps/api-core/src/routes/agent.ts",
      "controllerSource": "apps/api-core/src/controllers/agent.controller.ts",
      "request": {
        "schemas": [],
        "evidence": "uncertain: no direct named schema call in handler body",
        "fields": [
          "path.appId",
          "path.templateId"
        ],
        "fieldEvidence": "direct controller destructuring/query/path read",
        "schemaFields": {},
        "types": []
      },
      "response": {
        "fields": [],
        "evidence": "uncertain: response is variable/service result or no direct literal c.json object",
        "types": [
          "{ app: { id: string; name: string; environment: import(\"/Users/hm/Projects/One/packages/sdk-shared/dist/index\").IdEnvironment; liveAppId: string | null; }; emailTemplate: { appId: string; id: string; name: string; createdAt: Date; updatedAt: Date; identifier: string; category: \"transactional\" | \"lifecycle\" | \"marketing\" | \"system\"; enabled: boolean; channel: \"email\" | \"push\"; locale: string; subject: string | null; title: string | null; bodyText: string | null; contentType: \"push\" | \"mjml\" | \"html\" | \"text\"; contentSource: string | null; contentHtml: string | null; dataPayload: Record<string, unknown> | null; variables: Record<string, unknown> | null; }; }"
        ]
      },
      "notes": "all endpoint routes require agent token",
      "controllerSignature": "export async function handleGetAgentEmailTemplate(c: Context<"
    },
    {
      "method": "GET",
      "path": "/agent/apps/:appId/campaigns",
      "auth": "Bearer One Agent token via agentAuthMiddleware",
      "controller": "handleListAgentCampaigns",
      "routeSource": "apps/api-core/src/routes/agent.ts",
      "controllerSource": "apps/api-core/src/controllers/agent.controller.ts",
      "request": {
        "schemas": [],
        "evidence": "uncertain: no direct named schema call in handler body",
        "fields": [
          "identifier",
          "status",
          "limit",
          "path.appId"
        ],
        "fieldEvidence": "direct controller destructuring/query/path read",
        "schemaFields": {},
        "types": [
          {
            "type": "{ identifier?: string | undefined; status?: \"active\" | \"inactive\" | \"archived\" | undefined; limit?: unknown; }",
            "source": "apps/api-core/src/controllers/agent.controller.ts"
          }
        ]
      },
      "response": {
        "fields": [],
        "evidence": "uncertain: response is variable/service result or no direct literal c.json object",
        "types": [
          "{ app: { id: string; name: string; environment: import(\"/Users/hm/Projects/One/packages/sdk-shared/dist/index\").IdEnvironment; liveAppId: string | null; }; campaigns: { appId: string; id: string; name: string; createdAt: Date; updatedAt: Date; identifier: string; status: \"active\" | \"inactive\" | \"archived\"; description: string | null; priority: number; startsAt: Date | null; endsAt: Date | null; currentExperimentRunId: string | null; placements: { appId: string; createdAt: Date; campaignId: string; placementId: string; placement: { appId: string; id: string; name: string; createdAt: Date; updatedAt: Date; identifier: string; description: string | null; kind: \"paywall\" | \"in_app_surface\" | \"survey\" | \"custom\"; fallbackPaywallId: string | null; firstSeenAt: Date | null; lastSeenAt: Date | null; }; }[]; audiences: { appId: string; id: string; name: string; createdAt: Date; updatedAt: Date; identifier: string; enabled: boolean; audienceRule: RuleLogic | null; cooldownSeconds: number; windowSeconds: number | null; description: string | null; campaignId: string; sortOrder: number; maxMatchesPerCustomer: number | null; maxMatchesPerWindow: number | null; variants: { appId: string; id: string; name: string; createdAt: Date; updatedAt: Date; identifier: string; payload: Record<string, unknown> | null; paywallId: string | null; campaignId: string; campaignAudienceId: string; allocationPercent: number; isControl: boolean; targetType: \"paywall\" | \"in_app_surface\" | \"survey\" | \"custom\" | \"none\"; inAppSurfaceId: string | null; surveyId: string | null; paywall: { appId: string; id: string; name: string; createdAt: Date; updatedAt: Date; identifier: string; status: \"active\" | \"inactive\" | \"archived\"; isDefault: boolean; description: string | null; config: import(\"/Users/hm/Projects/One/packages/sdk-shared/dist/index\").AnyPaywallConfig; } | null; inAppSurface: { appId: string; id: string; name: string; createdAt: Date; updatedAt: Date; identifier: string; status: \"active\" | \"inactive\" | \"archived\"; description: string | null; config: import(\"/Users/hm/Projects/One/packages/sdk-shared/dist/index\").AnyInAppSurfaceConfig; surfaceType: string; } | null; }[]; }[]; currentExperimentRun: { appId: string; id: string; createdAt: Date; startedAt: Date; campaignId: string; configRevision: number; configurationHash: string; randomizationUnit: \"canonical_app_customer\"; conversionEvent: string; conversionWindowSeconds: number; baselineConversionRateBps: number; minimumDetectableEffectBps: number; alphaBps: number; targetPowerBps: number; minimumSamplePerArm: number; endedAt: Date | null; } | null; }[]; limit: number; }"
        ]
      },
      "notes": "all endpoint routes require agent token",
      "controllerSignature": "export async function handleListAgentCampaigns(c: Context<"
    },
    {
      "method": "GET",
      "path": "/agent/apps/:appId/campaigns/:campaignIdOrIdentifier",
      "auth": "Bearer One Agent token via agentAuthMiddleware",
      "controller": "handleGetAgentCampaign",
      "routeSource": "apps/api-core/src/routes/agent.ts",
      "controllerSource": "apps/api-core/src/controllers/agent.controller.ts",
      "request": {
        "schemas": [],
        "evidence": "uncertain: no direct named schema call in handler body",
        "fields": [
          "path.appId",
          "path.campaignIdOrIdentifier"
        ],
        "fieldEvidence": "direct controller destructuring/query/path read",
        "schemaFields": {},
        "types": []
      },
      "response": {
        "fields": [],
        "evidence": "uncertain: response is variable/service result or no direct literal c.json object",
        "types": [
          "{ app: { id: string; name: string; environment: import(\"/Users/hm/Projects/One/packages/sdk-shared/dist/index\").IdEnvironment; liveAppId: string | null; }; campaign: { appId: string; id: string; name: string; createdAt: Date; updatedAt: Date; identifier: string; status: \"active\" | \"inactive\" | \"archived\"; description: string | null; priority: number; startsAt: Date | null; endsAt: Date | null; currentExperimentRunId: string | null; placements: { appId: string; createdAt: Date; campaignId: string; placementId: string; placement: { appId: string; id: string; name: string; createdAt: Date; updatedAt: Date; identifier: string; description: string | null; kind: \"paywall\" | \"in_app_surface\" | \"survey\" | \"custom\"; fallbackPaywallId: string | null; firstSeenAt: Date | null; lastSeenAt: Date | null; }; }[]; audiences: { appId: string; id: string; name: string; createdAt: Date; updatedAt: Date; identifier: string; enabled: boolean; audienceRule: RuleLogic | null; cooldownSeconds: number; windowSeconds: number | null; description: string | null; campaignId: string; sortOrder: number; maxMatchesPerCustomer: number | null; maxMatchesPerWindow: number | null; variants: { appId: string; id: string; name: string; createdAt: Date; updatedAt: Date; identifier: string; payload: Record<string, unknown> | null; paywallId: string | null; campaignId: string; campaignAudienceId: string; allocationPercent: number; isControl: boolean; targetType: \"paywall\" | \"in_app_surface\" | \"survey\" | \"custom\" | \"none\"; inAppSurfaceId: string | null; surveyId: string | null; paywall: { appId: string; id: string; name: string; createdAt: Date; updatedAt: Date; identifier: string; status: \"active\" | \"inactive\" | \"archived\"; isDefault: boolean; description: string | null; config: import(\"/Users/hm/Projects/One/packages/sdk-shared/dist/index\").AnyPaywallConfig; } | null; inAppSurface: { appId: string; id: string; name: string; createdAt: Date; updatedAt: Date; identifier: string; status: \"active\" | \"inactive\" | \"archived\"; description: string | null; config: import(\"/Users/hm/Projects/One/packages/sdk-shared/dist/index\").AnyInAppSurfaceConfig; surfaceType: string; } | null; }[]; }[]; currentExperimentRun: { appId: string; id: string; createdAt: Date; startedAt: Date; campaignId: string; configRevision: number; configurationHash: string; randomizationUnit: \"canonical_app_customer\"; conversionEvent: string; conversionWindowSeconds: number; baselineConversionRateBps: number; minimumDetectableEffectBps: number; alphaBps: number; targetPowerBps: number; minimumSamplePerArm: number; endedAt: Date | null; } | null; }; }"
        ]
      },
      "notes": "all endpoint routes require agent token",
      "controllerSignature": "export async function handleGetAgentCampaign(c: Context<"
    },
    {
      "method": "GET",
      "path": "/agent/apps/:appId/ios-release-readiness",
      "auth": "Bearer One Agent token via agentAuthMiddleware",
      "controller": "handleGetAgentIosReleaseReadiness",
      "routeSource": "apps/api-core/src/routes/agent.ts",
      "controllerSource": "apps/api-core/src/controllers/agent.controller.ts",
      "request": {
        "schemas": [],
        "evidence": "uncertain: no direct named schema call in handler body",
        "fields": [
          "sdkVersion",
          "paywallConfigVersion",
          "inAppSurfaceConfigVersion",
          "path.appId"
        ],
        "fieldEvidence": "direct controller destructuring/query/path read",
        "schemaFields": {},
        "types": [
          {
            "type": "string",
            "source": "apps/api-core/src/controllers/agent.controller.ts"
          },
          {
            "type": "unknown",
            "source": "apps/api-core/src/services/creative-compatibility.service.ts"
          },
          {
            "type": "{ paywall: { id: string; identifier: string; name: string; config: unknown; description?: string | null | undefined; }; paywallProducts: { id: string; identifier: string; product: { id: string; identifier: string; name: string; pricingType: \"subscription\" | \"non_consumable\" | \"consumable\" | \"free\"; pricingPeriod: \"month\" | \"year\" | null; description?: string | null | undefined; }; productPrice: { id: string; provider: \"stripe\" | \"apple_app_store\" | \"google_play\" | \"microsoft_store\" | \"custom\"; platform: \"ios\" | \"android\" | \"web\" | \"windows\" | \"macos\" | null; providerProductId: string; providerPriceId?: string | null | undefined; currency?: string | null | undefined; unitAmount?: number | null | undefined; billingPeriod?: \"month\" | \"year\" | null | undefined; trialOffer?: { type: \"free_trial\"; trialPeriodDays?: number | undefined; appleSubscriptionGroupId?: string | undefined; } | null | undefined; } | null; prices?: Partial<Record<\"stripe\" | \"apple_app_store\" | \"google_play\" | \"microsoft_store\" | \"custom\", { amountMinor: number; currency: string; interval: \"month\" | \"year\" | null; intervalCount: number; }>> | undefined; }[]; paywallOffers?: { identifier: string; productIdentifier: string; offerKind: \"subscription_offer_code\" | \"in_app_purchase_offer_code\"; prices: { territory: string; pricePointId: string; customerPrice: string; currency: string; }[]; offerMode?: \"free\" | \"pay_as_you_go\" | \"pay_up_front\" | \"discount\" | null | undefined; duration?: string | null | undefined; numberOfPeriods?: number | null | undefined; autoRenews?: boolean | null | undefined; regularPrice?: { amountMinor: number; currency: string; billingPeriod?: \"month\" | \"year\" | null | undefined; } | undefined; }[] | undefined; campaign?: { placementId: string; placementIdentifier: string; targetType: \"paywall\" | \"in_app_surface\" | \"survey\" | \"custom\" | \"none\"; campaignId?: string | null | undefined; campaignIdentifier?: string | null | undefined; campaignAudienceId?: string | null | undefined; campaignAudienceIdentifier?: string | null | undefined; campaignVariantId?: string | null | undefined; campaignVariantIdentifier?: string | null | undefined; campaignAssignmentId?: string | null | undefined; } | undefined; }",
            "source": "apps/api-core/src/services/release-readiness/ios-release-readiness.service.ts"
          },
          {
            "type": "unknown",
            "source": "apps/api-core/src/services/release-readiness/ios-release-readiness.service.ts"
          },
          {
            "type": "unknown",
            "source": "apps/api-core/src/services/release-readiness/ios-release-readiness.service.ts"
          }
        ]
      },
      "response": {
        "fields": [],
        "evidence": "uncertain: response is variable/service result or no direct literal c.json object",
        "types": [
          "{ report: import(\"/Users/hm/Projects/One/packages/sdk-shared/dist/index\").IosReleaseReadinessReport; }"
        ]
      },
      "notes": "all endpoint routes require agent token",
      "controllerSignature": "export async function handleGetAgentIosReleaseReadiness(\n  c: Context<"
    },
    {
      "method": "GET",
      "path": "/agent/apps/:appId/provider-events",
      "auth": "Bearer One Agent token via agentAuthMiddleware",
      "controller": "handleListAgentProviderEvents",
      "routeSource": "apps/api-core/src/routes/agent.ts",
      "controllerSource": "apps/api-core/src/controllers/agent.controller.ts",
      "request": {
        "schemas": [],
        "evidence": "uncertain: no direct named schema call in handler body",
        "fields": [
          "provider",
          "status",
          "providerEventType",
          "replayable",
          "limit",
          "offset",
          "path.appId"
        ],
        "fieldEvidence": "direct controller destructuring/query/path read",
        "schemaFields": {},
        "types": [
          {
            "type": "{ provider?: \"stripe\" | \"google_play\" | \"apple\" | undefined; status?: \"failed\" | \"received\" | \"processing\" | \"processed\" | \"ignored\" | undefined; providerEventType?: string | undefined; replayable?: \"false\" | \"true\" | undefined; limit?: unknown; offset?: unknown; }",
            "source": "apps/api-core/src/controllers/agent.controller.ts"
          }
        ]
      },
      "response": {
        "fields": [],
        "evidence": "uncertain: response is variable/service result or no direct literal c.json object",
        "types": [
          "{ events: { canReplay: boolean; diagnostic?: { exactPurchase: { providerTransactionId: string | null; id: string; customerId: string; ownershipType: \"purchased\" | \"family_shared\" | \"unknown\"; } | null; originalChain: { originalTransactionId: string | null; count: number; familySharedCount: number; } | null; notificationType: string | null; notificationSubtype: string | null; appleEnvironment: string | null; bundleId: string | null; signedDate: string | null; transactionId: string | null; originalTransactionId: string | null; appTransactionId: string | null; offerIdentifier: string | null; offerType: number | null; offerDiscountType: string | null; productId: string | null; ownershipType: string | null; transactionType: string | null; transactionReason: string | null; appAccountTokenPresent: boolean; purchaseDate: number | null; originalPurchaseDate: number | null; expiresDate: number | null; revocationDate: number | null; revocationType: string | null; } | undefined; id: string; provider: \"stripe\" | \"google_play\" | \"apple\"; providerEventType: string | null; status: \"failed\" | \"received\" | \"processing\" | \"processed\" | \"ignored\"; attemptCount: number; receivedAt: Date; processedAt: Date; lastError: string | null; replayCount: number; lastReplayedAt: Date | null; lastReplayedByPlatformUserId: string | null; }[]; hasMore: boolean; app: { id: string; name: string; environment: import(\"/Users/hm/Projects/One/packages/sdk-shared/dist/index\").IdEnvironment; liveAppId: string | null; }; }"
        ]
      },
      "notes": "all endpoint routes require agent token",
      "controllerSignature": "export async function handleListAgentProviderEvents(\n  c: Context<"
    },
    {
      "method": "GET",
      "path": "/agent/apps/:appId/crash-reports/groups",
      "auth": "Bearer One Agent token via agentAuthMiddleware",
      "controller": "handleListAgentCrashReportGroups",
      "routeSource": "apps/api-core/src/routes/agent.ts",
      "controllerSource": "apps/api-core/src/controllers/agent.controller.ts",
      "request": {
        "schemas": [],
        "evidence": "uncertain: no direct named schema call in handler body",
        "fields": [
          "appVersion",
          "buildNumber",
          "startAt",
          "endAt",
          "limit",
          "path.appId"
        ],
        "fieldEvidence": "direct controller destructuring/query/path read",
        "schemaFields": {},
        "types": [
          {
            "type": "{ environment?: \"test\" | \"live\" | undefined; appVersion?: string | undefined; buildNumber?: string | undefined; startAt?: string | undefined; endAt?: string | undefined; limit?: unknown; }",
            "source": "apps/api-core/src/controllers/agent.controller.ts"
          }
        ]
      },
      "response": {
        "fields": [],
        "evidence": "uncertain: response is variable/service result or no direct literal c.json object",
        "types": [
          "{ legacySignals: import(\"/Users/hm/Projects/One/packages/sdk-shared/dist/index\").LegacyCrashSignalSummary; groups: import(\"/Users/hm/Projects/One/packages/sdk-shared/dist/index\").CrashReportGroup[]; versions: import(\"/Users/hm/Projects/One/packages/sdk-shared/dist/index\").CrashReportVersionSummary[]; totals: { crashCount: number; groupCount: number; affectedCustomers: number; }; app: { id: string; name: string; environment: import(\"/Users/hm/Projects/One/packages/sdk-shared/dist/index\").IdEnvironment; liveAppId: string | null; }; }"
        ]
      },
      "notes": "all endpoint routes require agent token",
      "controllerSignature": "export async function handleListAgentCrashReportGroups(\n  c: Context<"
    },
    {
      "method": "GET",
      "path": "/agent/apps/:appId/crash-reports/groups/:fingerprint",
      "auth": "Bearer One Agent token via agentAuthMiddleware",
      "controller": "handleGetAgentCrashReportGroup",
      "routeSource": "apps/api-core/src/routes/agent.ts",
      "controllerSource": "apps/api-core/src/controllers/agent.controller.ts",
      "request": {
        "schemas": [],
        "evidence": "uncertain: no direct named schema call in handler body",
        "fields": [
          "appVersion",
          "buildNumber",
          "path.appId",
          "path.fingerprint"
        ],
        "fieldEvidence": "direct controller destructuring/query/path read",
        "schemaFields": {},
        "types": [
          {
            "type": "string",
            "source": "apps/api-core/src/controllers/agent.controller.ts"
          },
          {
            "type": "{ appVersion: string; buildNumber: string; environment?: \"test\" | \"live\" | undefined; }",
            "source": "apps/api-core/src/controllers/agent.controller.ts"
          }
        ]
      },
      "response": {
        "fields": [],
        "evidence": "uncertain: response is variable/service result or no direct literal c.json object",
        "types": [
          "{ group: import(\"/Users/hm/Projects/One/packages/sdk-shared/dist/index\").CrashReportGroup; representative: import(\"/Users/hm/Projects/One/packages/sdk-shared/dist/index\").CrashReportSummary & { formattedReport: string; }; osVersions: import(\"/Users/hm/Projects/One/packages/sdk-shared/dist/index\").CrashReportBreakdownItem[]; devices: import(\"/Users/hm/Projects/One/packages/sdk-shared/dist/index\").CrashReportBreakdownItem[]; app: { id: string; name: string; environment: import(\"/Users/hm/Projects/One/packages/sdk-shared/dist/index\").IdEnvironment; liveAppId: string | null; }; }"
        ]
      },
      "notes": "all endpoint routes require agent token",
      "controllerSignature": "export async function handleGetAgentCrashReportGroup(\n  c: Context<"
    },
    {
      "method": "GET",
      "path": "/agent/apps/:appId/query",
      "auth": "Bearer One Agent token via agentAuthMiddleware",
      "controller": "handleQueryAgentAppData",
      "routeSource": "apps/api-core/src/routes/agent.ts",
      "controllerSource": "apps/api-core/src/controllers/agent.controller.ts",
      "request": {
        "schemas": [],
        "evidence": "uncertain: no direct named schema call in handler body",
        "fields": [
          "resource",
          "id",
          "customerId",
          "billingTransactionId",
          "providerTransactionId",
          "status",
          "type",
          "provider",
          "search",
          "includeDebugMetadata",
          "from",
          "to",
          "limit",
          "offset",
          "path.appId"
        ],
        "fieldEvidence": "direct controller destructuring/query/path read",
        "schemaFields": {},
        "types": [
          {
            "type": "{ resource: \"products\" | \"customers\" | \"subscriptions\" | \"support_threads\" | \"webhook_deliveries\" | \"notification_deliveries\" | \"events\" | \"billing_identity_conflicts\" | \"apple_purchaser_links\" | \"transactions\" | \"entitlement_grants\" | \"acquisition_touchpoints\"; id?: string | undefined; customerId?: string | undefined; billingTransactionId?: string | undefined; providerTransactionId?: string | undefined; status?: string | undefined; type?: string | undefined; provider?: string | undefined; search?: string | undefined; includeDebugMetadata?: boolean | \"false\" | \"true\" | undefined; from?: string | undefined; to?: string | undefined; limit?: unknown; offset?: unknown; }",
            "source": "apps/api-core/src/controllers/agent.controller.ts"
          },
          {
            "type": "\"account\" | \"app_store\"",
            "source": "apps/api-core/src/services/products/paid-access-configuration.service.ts"
          },
          {
            "type": "{ version: 1; observedAt: string; policy: \"account\" | \"app_store\"; verification: \"unavailable\" | \"authoritative\" | \"verified_entitlements\" | \"cached\"; benefits: { identifier: string; source: \"manual\" | \"apple\" | \"account\" | \"support_purchaser\" | \"preserved_import\"; effectiveUntil?: number | null | undefined; verifiedAt?: string | null | undefined; }[]; truncated: boolean; providerEnvironment?: \"Production\" | \"Sandbox\" | \"Xcode\" | null | undefined; operationId?: string | null | undefined; attemptId?: string | null | undefined; requestId?: string | null | undefined; accessContextExpiresAt?: number | null | undefined; appleEvidence?: { observedAt: string; acquisition: \"unavailable\" | \"rejected\" | \"app_transaction\" | \"receipt\"; purchaserComparison: \"unavailable\" | \"first_observation\" | \"same\" | \"changed\"; collectionComplete: boolean; priorTransactionCount: number; submittedTransactionCount: number; retainedTransactionCount: number; missingProductIdentifiers: string[]; previousPurchaserHash?: string | null | undefined; currentPurchaserHash?: string | null | undefined; acquisitionFailureStage?: string | null | undefined; } | null | undefined; }",
            "source": "apps/api-core/src/services/dashboard/customer-access-observations.service.ts"
          },
          {
            "type": "{ version: 1; id: string; requestId: string; operationId: string | null; route: \"access\" | \"evidence\"; receivedAt: string; finishedAt: string; verifiedAt: string | null; policy: \"account\" | \"app_store\" | null; configurationRevision: string | null; providerEnvironment: \"Production\" | \"Sandbox\" | null; outcome: \"failed\" | \"partial\" | \"verified\"; completeness: \"failed\" | \"complete\" | \"partial\" | \"submitted_evidence\"; acquisitionVerified: boolean | null; transactionCounts: { submitted: number; verified: number | null; active: number | null; inactive: number | null; unverified: number | null; unmapped: number | null; } | null; entitlements: { identifier: string; expiresAt: number | null; source: \"manual\" | \"apple\"; }[]; entitlementsTruncated: boolean; responseExpiresAt: number | null; accessContextExpiresAt: number | null; stage: \"completed\" | \"acquisition\" | \"configuration\" | \"transactions\" | \"mapping\" | \"purchaser_link\" | \"context_signing\" | \"contract_validation\"; failure: { code: \"invalid_contract\" | \"verification_rejected\" | \"service_error\"; httpStatus: number; retryable: boolean; } | null; appVersion: string | null; sdkVersion: string | null; deviceModel: string | null; osVersion: string | null; versionProvenance: \"unknown\" | \"request_headers\"; attemptId?: string | null | undefined; evidenceIssues?: { source: \"renewal\" | \"acquisition\" | \"transaction\" | \"mapping\"; reason: \"verification_failed\" | \"claims_invalid\" | \"device_mismatch\" | \"environment_mismatch\" | \"unmatched_renewal\" | \"catalog_mapping_failed\"; index?: number | undefined; }[] | undefined; }",
            "source": "apps/api-core/src/services/dashboard/customer-access-observations.service.ts"
          }
        ]
      },
      "response": {
        "fields": [],
        "evidence": "uncertain: response is variable/service result or no direct literal c.json object",
        "types": [
          "{ paidAccessPolicy?: \"account\" | \"app_store\" | undefined; applePurchasers?: { id: string; appId: string; customerId: string; providerEnvironment: \"sandbox\" | \"production\"; appTransactionId: string; originalAppVersion: string | null; originalPurchaseDate: Date | null; deviceName: string | null; firstVerifiedAt: Date; lastVerifiedAt: Date; }[] | undefined; accessObservations?: import(\"/Users/hm/Projects/One/packages/sdk-shared/dist/index\").CustomerAccessObservations | undefined; resource: import(\"/Users/hm/Projects/One/apps/api-core/src/services/agent/agent-app-query.service\").AgentAppQueryResource; items: Array<Record<string, unknown>>; pagination: { limit: number; offset: number; returned: number; hasMore: boolean; }; app: { id: string; name: string; environment: import(\"/Users/hm/Projects/One/packages/sdk-shared/dist/index\").IdEnvironment; liveAppId: string | null; }; }"
        ]
      },
      "notes": "all endpoint routes require agent token",
      "controllerSignature": "export async function handleQueryAgentAppData(\n  c: Context<"
    },
    {
      "method": "POST",
      "path": "/agent/apps/:appId/customers/:customerId/usage/query",
      "auth": "Bearer One Agent token via agentAuthMiddleware",
      "controller": "handleQueryAgentCustomerUsage",
      "routeSource": "apps/api-core/src/routes/agent.ts",
      "controllerSource": "apps/api-core/src/controllers/agent-usage.controller.ts",
      "request": {
        "schemas": [],
        "evidence": "uncertain: no direct named schema call in handler body",
        "fields": [
          "path.appId",
          "path.customerId"
        ],
        "fieldEvidence": "direct controller destructuring/query/path read",
        "schemaFields": {},
        "types": [
          {
            "type": "{ appId: string; customerId: string; query: { from: string; to: string; view: \"summary\"; metrics?: { key: string; definitionRevision: number; }[] | undefined; } | { from: string; to: string; kind: \"session\" | \"daily\"; limit: number; view: \"records\"; cursor?: { usageDate: string; lastObservedAt: string; id: string; } | undefined; }; }",
            "source": "apps/api-core/src/controllers/agent-usage.controller.ts"
          },
          {
            "type": "{ from: string; to: string; metrics?: { key: string; definitionRevision: number; }[] | undefined; }",
            "source": "apps/api-core/src/services/usage/usage-summary.ts"
          },
          {
            "type": "{ from: string; to: string; kind: \"session\" | \"daily\"; limit: number; cursor?: { usageDate: string; lastObservedAt: string; id: string; } | undefined; }",
            "source": "apps/api-core/src/services/usage/usage-read.service.ts"
          }
        ]
      },
      "response": {
        "fields": [],
        "evidence": "uncertain: response is variable/service result or no direct literal c.json object",
        "types": [
          "{ app: { id: string; name: string; environment: import(\"/Users/hm/Projects/One/packages/sdk-shared/dist/index\").IdEnvironment; }; customerId: string; metrics: { key: string; revision: number; label: string; unit: \"duration\" | \"count\" | \"bytes\" | \"credits\"; scale: number; allowedSources: (\"server\" | \"client\")[]; dimensionKeys: string[]; entitlementId: string | null; isActive: boolean; }[]; usage: import(\"/Users/hm/Projects/One/packages/sdk-shared/dist/index\").UsageReadPage | import(\"/Users/hm/Projects/One/packages/sdk-shared/dist/index\").UsageSummary; }"
        ]
      },
      "notes": "all endpoint routes require agent token",
      "controllerSignature": "export async function handleQueryAgentCustomerUsage(c: AgentContext): Promise<Response>"
    },
    {
      "method": "GET",
      "path": "/agent/apps/:appId/app-store/catalog-audit",
      "auth": "Bearer One Agent token via agentAuthMiddleware",
      "controller": "handleAuditAgentAppStoreCatalog",
      "routeSource": "apps/api-core/src/routes/agent.ts",
      "controllerSource": "apps/api-core/src/controllers/agent.controller.ts",
      "request": {
        "schemas": [],
        "evidence": "uncertain: no direct named schema call in handler body",
        "fields": [
          "productId",
          "productKind",
          "referenceTerritory",
          "path.appId"
        ],
        "fieldEvidence": "direct controller destructuring/query/path read",
        "schemaFields": {},
        "types": [
          {
            "type": "{ productId?: string | undefined; productKind?: \"subscription\" | \"in_app_purchase\" | undefined; referenceTerritory?: string | undefined; }",
            "source": "apps/api-core/src/controllers/agent.controller.ts"
          }
        ]
      },
      "response": {
        "fields": [],
        "evidence": "uncertain: response is variable/service result or no direct literal c.json object",
        "types": [
          "{ app: { id: string; name: string; environment: import(\"/Users/hm/Projects/One/packages/sdk-shared/dist/index\").IdEnvironment; liveAppId: string | null; }; audit: { operationId: string; appId: string; externalAppId: string; products: import(\"/Users/hm/Projects/One/apps/api-core/src/services/app-store-connect/app-store-connect.client\").AppStoreConnectProduct[]; currentSchedules: { productId: string; productKind: \"subscription\" | \"in_app_purchase\"; productResourceId: string; prices: import(\"/Users/hm/Projects/One/apps/api-core/src/services/app-store-connect/app-store-connect.client\").AppStoreConnectCurrentPrice[]; }[]; referencePricePoints: { productId: string; productKind: import(\"/Users/hm/Projects/One/apps/api-core/src/services/app-store-connect/app-store-connect.client\").AppStoreConnectProduct[\"kind\"]; territory: string; pricePoints: import(\"/Users/hm/Projects/One/apps/api-core/src/services/app-store-connect/app-store-connect.client\").AppStoreConnectPricePoint[]; } | null; issues: { code: string; productId: string; message: string; }[]; pricingReferences: { purchasingPowerParity: { version: string; indicator: string; source: string; lastUpdated: string; priceLevelIndicator: string; priceLevelSource: string; priceLevelLastUpdated: string; }; fourTierRegional: { version: string; source: string; }; missingPppTerritories: string[]; }; }; }"
        ]
      },
      "notes": "all endpoint routes require agent token",
      "controllerSignature": "export async function handleAuditAgentAppStoreCatalog(\n  c: Context<"
    },
    {
      "method": "POST",
      "path": "/agent/apps/:appId/app-store/pricing-previews",
      "auth": "Bearer One Agent token via agentAuthMiddleware",
      "controller": "handlePreviewAgentAppStorePricing",
      "routeSource": "apps/api-core/src/routes/agent.ts",
      "controllerSource": "apps/api-core/src/controllers/agent.controller.ts",
      "request": {
        "schemas": [],
        "evidence": "uncertain: no direct named schema call in handler body",
        "fields": [
          "path.appId"
        ],
        "fieldEvidence": "direct controller destructuring/query/path read",
        "schemaFields": {},
        "types": [
          {
            "type": "{ productId: string; productKind: \"subscription\" | \"in_app_purchase\"; effectiveDate: string; strategy: { kind: \"apple_equalized\"; referenceTerritory: string; referencePricePointId: string; } | { kind: \"purchasing_power_parity\"; referenceTerritory: string; referencePricePointId: string; datasetVersion: string; overrides?: { territory: string; pricePointId: string; }[] | undefined; } | { kind: \"four_tier_regional\"; referenceTerritory: string; classificationVersion: string; pricePointIds: { high: string; upperMiddle: string; lowerMiddle: string; low: string; }; overrides?: { territory: string; pricePointId: string; }[] | undefined; }; subscriberPricePolicy?: \"preserve_existing\" | \"change_existing\" | undefined; }",
            "source": "apps/api-core/src/controllers/agent.controller.ts"
          }
        ]
      },
      "response": {
        "fields": [],
        "evidence": "uncertain: response is variable/service result or no direct literal c.json object",
        "types": [
          "{ plan: { appId: string | null; workspaceId: string; id: string; createdAt: Date; updatedAt: Date; status: \"failed\" | \"queued\" | \"running\" | \"succeeded\" | \"cancelled\" | \"expired\"; completedAt: Date | null; startedAt: Date | null; connectionId: string; accountId: string | null; appMappingId: string | null; parentOperationId: string | null; actorPlatformUserId: string | null; operationType: \"validate\" | \"sync\" | \"import_preview\" | \"import_apply\" | \"secret_rotate\" | \"connection_revoke\" | \"resource_mutation_preview\" | \"resource_mutation_apply\" | \"resource_destructive_preview\" | \"resource_destructive_apply\"; idempotencyKey: string | null; resourceType: string | null; resourceId: string | null; request: import(\"/Users/hm/Projects/One/packages/sdk-shared/dist/index\").ProviderConnectionOperationData; beforeState: import(\"/Users/hm/Projects/One/packages/sdk-shared/dist/index\").ProviderConnectionOperationData | null; requestedState: import(\"/Users/hm/Projects/One/packages/sdk-shared/dist/index\").ProviderConnectionOperationData | null; providerResponse: import(\"/Users/hm/Projects/One/packages/sdk-shared/dist/index\").ProviderConnectionOperationData | null; errorCode: string | null; errorMessage: string | null; queuedAt: Date; expiresAt: Date | null; appliedAt: Date | null; }; preview: import(\"/Users/hm/Projects/One/packages/sdk-shared/dist/index\").AppStorePricingPreview; app: { id: string; name: string; environment: import(\"/Users/hm/Projects/One/packages/sdk-shared/dist/index\").IdEnvironment; liveAppId: string | null; }; }"
        ]
      },
      "notes": "all endpoint routes require agent token",
      "controllerSignature": "export async function handlePreviewAgentAppStorePricing(\n  c: Context<"
    },
    {
      "method": "GET",
      "path": "/agent/apps/:appId/app-store/pricing-previews/:planId",
      "auth": "Bearer One Agent token via agentAuthMiddleware",
      "controller": "handleGetAgentAppStorePricingPlan",
      "routeSource": "apps/api-core/src/routes/agent.ts",
      "controllerSource": "apps/api-core/src/controllers/agent.controller.ts",
      "request": {
        "schemas": [],
        "evidence": "uncertain: no direct named schema call in handler body",
        "fields": [
          "path.appId",
          "path.planId"
        ],
        "fieldEvidence": "direct controller destructuring/query/path read",
        "schemaFields": {},
        "types": []
      },
      "response": {
        "fields": [],
        "evidence": "uncertain: response is variable/service result or no direct literal c.json object",
        "types": [
          "{ plan: { appId: string | null; workspaceId: string; id: string; createdAt: Date; updatedAt: Date; status: \"failed\" | \"queued\" | \"running\" | \"succeeded\" | \"cancelled\" | \"expired\"; completedAt: Date | null; startedAt: Date | null; connectionId: string; accountId: string | null; appMappingId: string | null; parentOperationId: string | null; actorPlatformUserId: string | null; operationType: \"validate\" | \"sync\" | \"import_preview\" | \"import_apply\" | \"secret_rotate\" | \"connection_revoke\" | \"resource_mutation_preview\" | \"resource_mutation_apply\" | \"resource_destructive_preview\" | \"resource_destructive_apply\"; idempotencyKey: string | null; resourceType: string | null; resourceId: string | null; request: import(\"/Users/hm/Projects/One/packages/sdk-shared/dist/index\").ProviderConnectionOperationData; beforeState: import(\"/Users/hm/Projects/One/packages/sdk-shared/dist/index\").ProviderConnectionOperationData | null; requestedState: import(\"/Users/hm/Projects/One/packages/sdk-shared/dist/index\").ProviderConnectionOperationData | null; providerResponse: import(\"/Users/hm/Projects/One/packages/sdk-shared/dist/index\").ProviderConnectionOperationData | null; errorCode: string | null; errorMessage: string | null; queuedAt: Date; expiresAt: Date | null; appliedAt: Date | null; }; preview: import(\"/Users/hm/Projects/One/packages/sdk-shared/dist/index\").AppStorePricingPreview; app: { id: string; name: string; environment: import(\"/Users/hm/Projects/One/packages/sdk-shared/dist/index\").IdEnvironment; liveAppId: string | null; }; }"
        ]
      },
      "notes": "all endpoint routes require agent token",
      "controllerSignature": "export async function handleGetAgentAppStorePricingPlan(\n  c: Context<"
    },
    {
      "method": "GET",
      "path": "/agent/apps/:appId/app-store/pricing-operations/:operationId",
      "auth": "Bearer One Agent token via agentAuthMiddleware",
      "controller": "handleGetAgentAppStorePricingOperation",
      "routeSource": "apps/api-core/src/routes/agent.ts",
      "controllerSource": "apps/api-core/src/controllers/agent.controller.ts",
      "request": {
        "schemas": [],
        "evidence": "uncertain: no direct named schema call in handler body",
        "fields": [
          "path.appId",
          "path.operationId"
        ],
        "fieldEvidence": "direct controller destructuring/query/path read",
        "schemaFields": {},
        "types": []
      },
      "response": {
        "fields": [],
        "evidence": "uncertain: response is variable/service result or no direct literal c.json object",
        "types": [
          "{ app: { id: string; name: string; environment: import(\"/Users/hm/Projects/One/packages/sdk-shared/dist/index\").IdEnvironment; liveAppId: string | null; }; operation: { appId: string | null; workspaceId: string; id: string; createdAt: Date; updatedAt: Date; status: \"failed\" | \"queued\" | \"running\" | \"succeeded\" | \"cancelled\" | \"expired\"; completedAt: Date | null; startedAt: Date | null; connectionId: string; accountId: string | null; appMappingId: string | null; parentOperationId: string | null; actorPlatformUserId: string | null; operationType: \"validate\" | \"sync\" | \"import_preview\" | \"import_apply\" | \"secret_rotate\" | \"connection_revoke\" | \"resource_mutation_preview\" | \"resource_mutation_apply\" | \"resource_destructive_preview\" | \"resource_destructive_apply\"; idempotencyKey: string | null; resourceType: string | null; resourceId: string | null; request: import(\"/Users/hm/Projects/One/packages/sdk-shared/dist/index\").ProviderConnectionOperationData; beforeState: import(\"/Users/hm/Projects/One/packages/sdk-shared/dist/index\").ProviderConnectionOperationData | null; requestedState: import(\"/Users/hm/Projects/One/packages/sdk-shared/dist/index\").ProviderConnectionOperationData | null; providerResponse: import(\"/Users/hm/Projects/One/packages/sdk-shared/dist/index\").ProviderConnectionOperationData | null; errorCode: string | null; errorMessage: string | null; queuedAt: Date; expiresAt: Date | null; appliedAt: Date | null; }; }"
        ]
      },
      "notes": "all endpoint routes require agent token",
      "controllerSignature": "export async function handleGetAgentAppStorePricingOperation(\n  c: Context<"
    },
    {
      "method": "GET",
      "path": "/agent/apps/:appId/product-offers",
      "auth": "Bearer One Agent token via agentAuthMiddleware",
      "controller": "handleListAgentProductOffers",
      "routeSource": "apps/api-core/src/routes/agent.ts",
      "controllerSource": "apps/api-core/src/controllers/agent.controller.ts",
      "request": {
        "schemas": [],
        "evidence": "uncertain: no direct named schema call in handler body",
        "fields": [
          "path.appId"
        ],
        "fieldEvidence": "direct controller destructuring/query/path read",
        "schemaFields": {},
        "types": []
      },
      "response": {
        "fields": [],
        "evidence": "uncertain: response is variable/service result or no direct literal c.json object",
        "types": [
          "{ app: { id: string; name: string; environment: import(\"/Users/hm/Projects/One/packages/sdk-shared/dist/index\").IdEnvironment; liveAppId: string | null; }; offers: { codeBatches: { id: string; productOfferId: string; providerBatchId: string | null; providerEnvironment: \"sandbox\" | \"production\"; requestedCodeCount: number; ingestedCodeCount: number; expiresAt: Date; allocatableAt: Date; status: \"failed\" | \"provisioning\" | \"deactivated\" | \"ready\" | \"expired\"; ingestionAttemptCount: number; lastIngestionErrorCode: string | null; lastIngestedAt: Date | null; lastSyncedAt: Date | null; createdAt: Date; readyCodeCount: number; assignedCodeCount: number; redeemedCodeCount: number; expiredCodeCount: number; supersededCodeCount: number; }[]; readyCodeCount: number; assignedCodeCount: number; redeemedCodeCount: number; expiredCodeCount: number; supersededCodeCount: number; id: string; identifier: string; productId: string; productPriceId: string; productName: string; productIdentifier: string; providerProductId: string; regularUnitAmount: number | null; regularCurrency: string | null; regularBillingPeriod: \"month\" | \"year\" | null; provider: \"apple_app_store\"; providerOfferId: string | null; providerReferenceName: string | null; offerKind: \"subscription_offer_code\" | \"in_app_purchase_offer_code\"; status: \"active\" | \"failed\" | \"draft\" | \"provisioning\" | \"paused\" | \"deactivated\"; exclusiveGroupIdentifier: string | null; providerConfig: import(\"/Users/hm/Projects/One/packages/sdk-shared/dist/index\").ProductOfferProviderConfig | null; createdAt: Date; updatedAt: Date; }[]; }"
        ]
      },
      "notes": "all endpoint routes require agent token",
      "controllerSignature": "export async function handleListAgentProductOffers(\n  c: Context<"
    },
    {
      "method": "GET",
      "path": "/agent/apps/:appId/product-offers-discovery",
      "auth": "Bearer One Agent token via agentAuthMiddleware",
      "controller": "handleDiscoverAgentProductOffers",
      "routeSource": "apps/api-core/src/routes/agent.ts",
      "controllerSource": "apps/api-core/src/controllers/agent.controller.ts",
      "request": {
        "schemas": [],
        "evidence": "uncertain: no direct named schema call in handler body",
        "fields": [
          "path.appId"
        ],
        "fieldEvidence": "direct controller destructuring/query/path read",
        "schemaFields": {},
        "types": []
      },
      "response": {
        "fields": [],
        "evidence": "uncertain: response is variable/service result or no direct literal c.json object",
        "types": [
          "{ app: { id: string; name: string; environment: import(\"/Users/hm/Projects/One/packages/sdk-shared/dist/index\").IdEnvironment; liveAppId: string | null; }; discovery: { appId: string; externalAppId: string; products: { productId: string; productResourceId: string; name: string; kind: import(\"/Users/hm/Projects/One/apps/api-core/src/services/app-store-connect/app-store-connect.client\").AppStoreConnectProduct[\"kind\"]; state: string; oneProductId: string | null; oneProductPriceId: string | null; offers: import(\"/Users/hm/Projects/One/apps/api-core/src/services/app-store-connect/app-store-connect.client\").AppStoreConnectOfferCode[]; }[]; localOfferCount: number; appleOfferCount: number; issues: { code: string; productId: string; offerReferenceName: string; message: string; }[]; }; }"
        ]
      },
      "notes": "all endpoint routes require agent token",
      "controllerSignature": "export async function handleDiscoverAgentProductOffers(\n  c: Context<"
    },
    {
      "method": "GET",
      "path": "/agent/apps/:appId/product-offers/:productOfferId",
      "auth": "Bearer One Agent token via agentAuthMiddleware",
      "controller": "handleGetAgentProductOffer",
      "routeSource": "apps/api-core/src/routes/agent.ts",
      "controllerSource": "apps/api-core/src/controllers/agent.controller.ts",
      "request": {
        "schemas": [],
        "evidence": "uncertain: no direct named schema call in handler body",
        "fields": [
          "path.appId",
          "path.productOfferId"
        ],
        "fieldEvidence": "direct controller destructuring/query/path read",
        "schemaFields": {},
        "types": []
      },
      "response": {
        "fields": [],
        "evidence": "uncertain: response is variable/service result or no direct literal c.json object",
        "types": [
          "{ app: { id: string; name: string; environment: import(\"/Users/hm/Projects/One/packages/sdk-shared/dist/index\").IdEnvironment; liveAppId: string | null; }; offer: { codeBatches: { id: string; productOfferId: string; providerBatchId: string | null; providerEnvironment: \"sandbox\" | \"production\"; requestedCodeCount: number; ingestedCodeCount: number; expiresAt: Date; allocatableAt: Date; status: \"failed\" | \"provisioning\" | \"deactivated\" | \"ready\" | \"expired\"; ingestionAttemptCount: number; lastIngestionErrorCode: string | null; lastIngestedAt: Date | null; lastSyncedAt: Date | null; createdAt: Date; readyCodeCount: number; assignedCodeCount: number; redeemedCodeCount: number; expiredCodeCount: number; supersededCodeCount: number; }[]; readyCodeCount: number; assignedCodeCount: number; redeemedCodeCount: number; expiredCodeCount: number; supersededCodeCount: number; id: string; identifier: string; productId: string; productPriceId: string; productName: string; productIdentifier: string; providerProductId: string; regularUnitAmount: number | null; regularCurrency: string | null; regularBillingPeriod: \"month\" | \"year\" | null; provider: \"apple_app_store\"; providerOfferId: string | null; providerReferenceName: string | null; offerKind: \"subscription_offer_code\" | \"in_app_purchase_offer_code\"; status: \"active\" | \"failed\" | \"draft\" | \"provisioning\" | \"paused\" | \"deactivated\"; exclusiveGroupIdentifier: string | null; providerConfig: import(\"/Users/hm/Projects/One/packages/sdk-shared/dist/index\").ProductOfferProviderConfig | null; createdAt: Date; updatedAt: Date; }; }"
        ]
      },
      "notes": "all endpoint routes require agent token",
      "controllerSignature": "export async function handleGetAgentProductOffer(\n  c: Context<"
    },
    {
      "method": "POST",
      "path": "/agent/apps/:appId/product-offer-operation-previews",
      "auth": "Bearer One Agent token via agentAuthMiddleware",
      "controller": "handlePreviewAgentProductOfferOperation",
      "routeSource": "apps/api-core/src/routes/agent.ts",
      "controllerSource": "apps/api-core/src/controllers/agent.controller.ts",
      "request": {
        "schemas": [],
        "evidence": "uncertain: no direct named schema call in handler body",
        "fields": [
          "path.appId"
        ],
        "fieldEvidence": "direct controller destructuring/query/path read",
        "schemaFields": {},
        "types": [
          {
            "type": "{ operation: \"create_offer\"; identifier: string; productPriceId: string; referenceName: string; terms: { kind: \"in_app_purchase\"; customerEligibilities: (\"NON_SPENDER\" | \"ACTIVE_SPENDER\" | \"CHURNED_SPENDER\")[]; prices: { territory: string; pricePointId: string; }[]; } | { kind: \"subscription\"; customerEligibilities: (\"NEW\" | \"EXISTING\" | \"EXPIRED\")[]; offerEligibility: \"STACK_WITH_INTRO_OFFERS\" | \"REPLACE_INTRO_OFFERS\"; duration: \"THREE_DAYS\" | \"ONE_WEEK\" | \"TWO_WEEKS\" | \"ONE_MONTH\" | \"TWO_MONTHS\" | \"THREE_MONTHS\" | \"SIX_MONTHS\" | \"ONE_YEAR\"; offerMode: \"FREE_TRIAL\" | \"PAY_AS_YOU_GO\" | \"PAY_UP_FRONT\"; numberOfPeriods: number; prices: { territory: string; pricePointId: string; }[]; autoRenewEnabled?: boolean | undefined; targetSubscriptionPlanType?: \"MONTHLY\" | \"UPFRONT\" | undefined; }; exclusiveGroupIdentifier?: string | undefined; } | { operation: \"create_batch\"; productOfferId: string; providerEnvironment: \"sandbox\" | \"production\"; requestedCodeCount: number; expirationDate: string; } | { operation: \"refresh_offer\"; productOfferId: string; } | { operation: \"deactivate_offer\"; productOfferId: string; } | { operation: \"deactivate_batch\"; productOfferId: string; batchId: string; }",
            "source": "apps/api-core/src/controllers/agent.controller.ts"
          }
        ]
      },
      "response": {
        "fields": [],
        "evidence": "uncertain: response is variable/service result or no direct literal c.json object",
        "types": [
          "{ preview: { id: string; operationType: \"validate\" | \"sync\" | \"import_preview\" | \"import_apply\" | \"secret_rotate\" | \"connection_revoke\" | \"resource_mutation_preview\" | \"resource_mutation_apply\" | \"resource_destructive_preview\" | \"resource_destructive_apply\"; status: \"failed\" | \"queued\" | \"running\" | \"succeeded\" | \"cancelled\" | \"expired\"; resourceType: string | null; resourceId: string | null; beforeState: import(\"/Users/hm/Projects/One/packages/sdk-shared/dist/index\").ProviderConnectionOperationData | null; requestedState: import(\"/Users/hm/Projects/One/packages/sdk-shared/dist/index\").ProviderConnectionOperationData | null; createdAt: Date; expiresAt: Date | null; }; digest: string; expiresAt: Date; plan: ({ version: 1; kind: \"apple_product_offer_mutation\"; workspaceId: string; appId: string; connectionId: string; accountId: string; appMappingId: string; externalAppId: string; connectionUpdatedAt: string; mappingUpdatedAt: string; providerFingerprint: string; blockers: Array<{ code: string; message: string; }>; } & { operation: \"create_offer\"; productOfferId: string; identifier: string; productId: string; productPriceId: string; providerProductId: string; providerProductResourceId: string; referenceName: string; exclusiveGroupIdentifier?: string; terms: z.infer<z.ZodDiscriminatedUnion<[z.ZodObject<{ kind: z.ZodLiteral<\"in_app_purchase\">; customerEligibilities: z.ZodArray<z.ZodEnum<{ NON_SPENDER: \"NON_SPENDER\"; ACTIVE_SPENDER: \"ACTIVE_SPENDER\"; CHURNED_SPENDER: \"CHURNED_SPENDER\"; }>>; prices: z.ZodArray<z.ZodObject<{ territory: z.ZodString; pricePointId: z.ZodString; }, z.core.$strict>>; }, z.core.$strict>, z.ZodObject<{ kind: z.ZodLiteral<\"subscription\">; customerEligibilities: z.ZodArray<z.ZodEnum<{ NEW: \"NEW\"; EXISTING: \"EXISTING\"; EXPIRED: \"EXPIRED\"; }>>; offerEligibility: z.ZodEnum<{ STACK_WITH_INTRO_OFFERS: \"STACK_WITH_INTRO_OFFERS\"; REPLACE_INTRO_OFFERS: \"REPLACE_INTRO_OFFERS\"; }>; duration: z.ZodEnum<{ THREE_DAYS: \"THREE_DAYS\"; ONE_WEEK: \"ONE_WEEK\"; TWO_WEEKS: \"TWO_WEEKS\"; ONE_MONTH: \"ONE_MONTH\"; TWO_MONTHS: \"TWO_MONTHS\"; THREE_MONTHS: \"THREE_MONTHS\"; SIX_MONTHS: \"SIX_MONTHS\"; ONE_YEAR: \"ONE_YEAR\"; }>; offerMode: z.ZodEnum<{ FREE_TRIAL: \"FREE_TRIAL\"; PAY_AS_YOU_GO: \"PAY_AS_YOU_GO\"; PAY_UP_FRONT: \"PAY_UP_FRONT\"; }>; numberOfPeriods: z.ZodNumber; autoRenewEnabled: z.ZodOptional<z.ZodBoolean>; targetSubscriptionPlanType: z.ZodOptional<z.ZodEnum<{ MONTHLY: \"MONTHLY\"; UPFRONT: \"UPFRONT\"; }>>; prices: z.ZodArray<z.ZodObject<{ territory: z.ZodString; pricePointId: z.ZodString; }, z.core.$strict>>; }, z.core.$strict>], \"kind\">>; existingProviderOfferIds: string[]; }) | ({ version: 1; kind: \"apple_product_offer_mutation\"; workspaceId: string; appId: string; connectionId: string; accountId: string; appMappingId: string; externalAppId: string; connectionUpdatedAt: string; mappingUpdatedAt: string; providerFingerprint: string; blockers: Array<{ code: string; message: string; }>; } & { productOfferId: string; providerOfferId: string; providerProductResourceId: string; productKind: import(\"/Users/hm/Projects/One/apps/api-core/src/services/app-store-connect/app-store-connect.client\").AppStoreConnectProduct[\"kind\"]; } & { operation: \"create_batch\"; batchId: string; providerEnvironment: import(\"/Users/hm/Projects/One/packages/sdk-shared/dist/constants\").AppleProviderEnvironment; requestedCodeCount: number; expirationDate: string; existingProviderBatchIds: string[]; }) | ({ version: 1; kind: \"apple_product_offer_mutation\"; workspaceId: string; appId: string; connectionId: string; accountId: string; appMappingId: string; externalAppId: string; connectionUpdatedAt: string; mappingUpdatedAt: string; providerFingerprint: string; blockers: Array<{ code: string; message: string; }>; } & { productOfferId: string; providerOfferId: string; providerProductResourceId: string; productKind: import(\"/Users/hm/Projects/One/apps/api-core/src/services/app-store-connect/app-store-connect.client\").AppStoreConnectProduct[\"kind\"]; } & { operation: \"refresh_offer\"; priceSchedule: import(\"/Users/hm/Projects/One/apps/api-core/src/services/app-store-connect/app-store-connect.client\").AppStoreConnectOfferPriceDetails[]; }) | ({ version: 1; kind: \"apple_product_offer_mutation\"; workspaceId: string; appId: string; connectionId: string; accountId: string; appMappingId: string; externalAppId: string; connectionUpdatedAt: string; mappingUpdatedAt: string; providerFingerprint: string; blockers: Array<{ code: string; message: string; }>; } & { productOfferId: string; providerOfferId: string; providerProductResourceId: string; productKind: import(\"/Users/hm/Projects/One/apps/api-core/src/services/app-store-connect/app-store-connect.client\").AppStoreConnectProduct[\"kind\"]; } & { operation: \"deactivate_offer\"; priceSchedule: import(\"/Users/hm/Projects/One/apps/api-core/src/services/app-store-connect/app-store-connect.client\").AppStoreConnectOfferPriceDetails[]; }) | ({ version: 1; kind: \"apple_product_offer_mutation\"; workspaceId: string; appId: string; connectionId: string; accountId: string; appMappingId: string; externalAppId: string; connectionUpdatedAt: string; mappingUpdatedAt: string; providerFingerprint: string; blockers: Array<{ code: string; message: string; }>; } & { productOfferId: string; providerOfferId: string; providerProductResourceId: string; productKind: import(\"/Users/hm/Projects/One/apps/api-core/src/services/app-store-connect/app-store-connect.client\").AppStoreConnectProduct[\"kind\"]; } & { operation: \"deactivate_batch\"; batchId: string; providerBatchId: string; }); app: { id: string; name: string; environment: import(\"/Users/hm/Projects/One/packages/sdk-shared/dist/index\").IdEnvironment; liveAppId: string | null; }; }"
        ]
      },
      "notes": "all endpoint routes require agent token",
      "controllerSignature": "export async function handlePreviewAgentProductOfferOperation(\n  c: Context<"
    },
    {
      "method": "GET",
      "path": "/agent/apps/:appId/product-offer-operation-previews/:previewId",
      "auth": "Bearer One Agent token via agentAuthMiddleware",
      "controller": "handleGetAgentProductOfferOperationPreview",
      "routeSource": "apps/api-core/src/routes/agent.ts",
      "controllerSource": "apps/api-core/src/controllers/agent.controller.ts",
      "request": {
        "schemas": [],
        "evidence": "uncertain: no direct named schema call in handler body",
        "fields": [
          "path.appId",
          "path.previewId"
        ],
        "fieldEvidence": "direct controller destructuring/query/path read",
        "schemaFields": {},
        "types": []
      },
      "response": {
        "fields": [],
        "evidence": "uncertain: response is variable/service result or no direct literal c.json object",
        "types": [
          "{ preview: { id: string; operationType: \"validate\" | \"sync\" | \"import_preview\" | \"import_apply\" | \"secret_rotate\" | \"connection_revoke\" | \"resource_mutation_preview\" | \"resource_mutation_apply\" | \"resource_destructive_preview\" | \"resource_destructive_apply\"; status: \"failed\" | \"queued\" | \"running\" | \"succeeded\" | \"cancelled\" | \"expired\"; resourceType: string | null; resourceId: string | null; beforeState: import(\"/Users/hm/Projects/One/packages/sdk-shared/dist/index\").ProviderConnectionOperationData | null; requestedState: import(\"/Users/hm/Projects/One/packages/sdk-shared/dist/index\").ProviderConnectionOperationData | null; createdAt: Date; expiresAt: Date | null; }; digest: string; expiresAt: Date | null; plan: ({ version: 1; kind: \"apple_product_offer_mutation\"; workspaceId: string; appId: string; connectionId: string; accountId: string; appMappingId: string; externalAppId: string; connectionUpdatedAt: string; mappingUpdatedAt: string; providerFingerprint: string; blockers: Array<{ code: string; message: string; }>; } & { operation: \"create_offer\"; productOfferId: string; identifier: string; productId: string; productPriceId: string; providerProductId: string; providerProductResourceId: string; referenceName: string; exclusiveGroupIdentifier?: string; terms: z.infer<z.ZodDiscriminatedUnion<[z.ZodObject<{ kind: z.ZodLiteral<\"in_app_purchase\">; customerEligibilities: z.ZodArray<z.ZodEnum<{ NON_SPENDER: \"NON_SPENDER\"; ACTIVE_SPENDER: \"ACTIVE_SPENDER\"; CHURNED_SPENDER: \"CHURNED_SPENDER\"; }>>; prices: z.ZodArray<z.ZodObject<{ territory: z.ZodString; pricePointId: z.ZodString; }, z.core.$strict>>; }, z.core.$strict>, z.ZodObject<{ kind: z.ZodLiteral<\"subscription\">; customerEligibilities: z.ZodArray<z.ZodEnum<{ NEW: \"NEW\"; EXISTING: \"EXISTING\"; EXPIRED: \"EXPIRED\"; }>>; offerEligibility: z.ZodEnum<{ STACK_WITH_INTRO_OFFERS: \"STACK_WITH_INTRO_OFFERS\"; REPLACE_INTRO_OFFERS: \"REPLACE_INTRO_OFFERS\"; }>; duration: z.ZodEnum<{ THREE_DAYS: \"THREE_DAYS\"; ONE_WEEK: \"ONE_WEEK\"; TWO_WEEKS: \"TWO_WEEKS\"; ONE_MONTH: \"ONE_MONTH\"; TWO_MONTHS: \"TWO_MONTHS\"; THREE_MONTHS: \"THREE_MONTHS\"; SIX_MONTHS: \"SIX_MONTHS\"; ONE_YEAR: \"ONE_YEAR\"; }>; offerMode: z.ZodEnum<{ FREE_TRIAL: \"FREE_TRIAL\"; PAY_AS_YOU_GO: \"PAY_AS_YOU_GO\"; PAY_UP_FRONT: \"PAY_UP_FRONT\"; }>; numberOfPeriods: z.ZodNumber; autoRenewEnabled: z.ZodOptional<z.ZodBoolean>; targetSubscriptionPlanType: z.ZodOptional<z.ZodEnum<{ MONTHLY: \"MONTHLY\"; UPFRONT: \"UPFRONT\"; }>>; prices: z.ZodArray<z.ZodObject<{ territory: z.ZodString; pricePointId: z.ZodString; }, z.core.$strict>>; }, z.core.$strict>], \"kind\">>; existingProviderOfferIds: string[]; }) | ({ version: 1; kind: \"apple_product_offer_mutation\"; workspaceId: string; appId: string; connectionId: string; accountId: string; appMappingId: string; externalAppId: string; connectionUpdatedAt: string; mappingUpdatedAt: string; providerFingerprint: string; blockers: Array<{ code: string; message: string; }>; } & { productOfferId: string; providerOfferId: string; providerProductResourceId: string; productKind: import(\"/Users/hm/Projects/One/apps/api-core/src/services/app-store-connect/app-store-connect.client\").AppStoreConnectProduct[\"kind\"]; } & { operation: \"create_batch\"; batchId: string; providerEnvironment: import(\"/Users/hm/Projects/One/packages/sdk-shared/dist/constants\").AppleProviderEnvironment; requestedCodeCount: number; expirationDate: string; existingProviderBatchIds: string[]; }) | ({ version: 1; kind: \"apple_product_offer_mutation\"; workspaceId: string; appId: string; connectionId: string; accountId: string; appMappingId: string; externalAppId: string; connectionUpdatedAt: string; mappingUpdatedAt: string; providerFingerprint: string; blockers: Array<{ code: string; message: string; }>; } & { productOfferId: string; providerOfferId: string; providerProductResourceId: string; productKind: import(\"/Users/hm/Projects/One/apps/api-core/src/services/app-store-connect/app-store-connect.client\").AppStoreConnectProduct[\"kind\"]; } & { operation: \"refresh_offer\"; priceSchedule: import(\"/Users/hm/Projects/One/apps/api-core/src/services/app-store-connect/app-store-connect.client\").AppStoreConnectOfferPriceDetails[]; }) | ({ version: 1; kind: \"apple_product_offer_mutation\"; workspaceId: string; appId: string; connectionId: string; accountId: string; appMappingId: string; externalAppId: string; connectionUpdatedAt: string; mappingUpdatedAt: string; providerFingerprint: string; blockers: Array<{ code: string; message: string; }>; } & { productOfferId: string; providerOfferId: string; providerProductResourceId: string; productKind: import(\"/Users/hm/Projects/One/apps/api-core/src/services/app-store-connect/app-store-connect.client\").AppStoreConnectProduct[\"kind\"]; } & { operation: \"deactivate_offer\"; priceSchedule: import(\"/Users/hm/Projects/One/apps/api-core/src/services/app-store-connect/app-store-connect.client\").AppStoreConnectOfferPriceDetails[]; }) | ({ version: 1; kind: \"apple_product_offer_mutation\"; workspaceId: string; appId: string; connectionId: string; accountId: string; appMappingId: string; externalAppId: string; connectionUpdatedAt: string; mappingUpdatedAt: string; providerFingerprint: string; blockers: Array<{ code: string; message: string; }>; } & { productOfferId: string; providerOfferId: string; providerProductResourceId: string; productKind: import(\"/Users/hm/Projects/One/apps/api-core/src/services/app-store-connect/app-store-connect.client\").AppStoreConnectProduct[\"kind\"]; } & { operation: \"deactivate_batch\"; batchId: string; providerBatchId: string; }); app: { id: string; name: string; environment: import(\"/Users/hm/Projects/One/packages/sdk-shared/dist/index\").IdEnvironment; liveAppId: string | null; }; }"
        ]
      },
      "notes": "all endpoint routes require agent token",
      "controllerSignature": "export async function handleGetAgentProductOfferOperationPreview(\n  c: Context<"
    },
    {
      "method": "GET",
      "path": "/agent/apps/:appId/product-offer-operations/:operationId",
      "auth": "Bearer One Agent token via agentAuthMiddleware",
      "controller": "handleGetAgentProductOfferOperation",
      "routeSource": "apps/api-core/src/routes/agent.ts",
      "controllerSource": "apps/api-core/src/controllers/agent.controller.ts",
      "request": {
        "schemas": [],
        "evidence": "uncertain: no direct named schema call in handler body",
        "fields": [
          "path.appId",
          "path.operationId"
        ],
        "fieldEvidence": "direct controller destructuring/query/path read",
        "schemaFields": {},
        "types": []
      },
      "response": {
        "fields": [],
        "evidence": "uncertain: response is variable/service result or no direct literal c.json object",
        "types": [
          "{ app: { id: string; name: string; environment: import(\"/Users/hm/Projects/One/packages/sdk-shared/dist/index\").IdEnvironment; liveAppId: string | null; }; operation: { appId: string | null; workspaceId: string; id: string; createdAt: Date; updatedAt: Date; status: \"failed\" | \"queued\" | \"running\" | \"succeeded\" | \"cancelled\" | \"expired\"; completedAt: Date | null; startedAt: Date | null; connectionId: string; accountId: string | null; appMappingId: string | null; parentOperationId: string | null; actorPlatformUserId: string | null; operationType: \"validate\" | \"sync\" | \"import_preview\" | \"import_apply\" | \"secret_rotate\" | \"connection_revoke\" | \"resource_mutation_preview\" | \"resource_mutation_apply\" | \"resource_destructive_preview\" | \"resource_destructive_apply\"; idempotencyKey: string | null; resourceType: string | null; resourceId: string | null; request: import(\"/Users/hm/Projects/One/packages/sdk-shared/dist/index\").ProviderConnectionOperationData; beforeState: import(\"/Users/hm/Projects/One/packages/sdk-shared/dist/index\").ProviderConnectionOperationData | null; requestedState: import(\"/Users/hm/Projects/One/packages/sdk-shared/dist/index\").ProviderConnectionOperationData | null; providerResponse: import(\"/Users/hm/Projects/One/packages/sdk-shared/dist/index\").ProviderConnectionOperationData | null; errorCode: string | null; errorMessage: string | null; queuedAt: Date; expiresAt: Date | null; appliedAt: Date | null; }; }"
        ]
      },
      "notes": "all endpoint routes require agent token",
      "controllerSignature": "export async function handleGetAgentProductOfferOperation(\n  c: Context<"
    },
    {
      "method": "GET",
      "path": "/agent/apps/:appId/app-store-reviews",
      "auth": "Bearer One Agent token via agentAuthMiddleware",
      "controller": "handleListAgentAppReviews",
      "routeSource": "apps/api-core/src/routes/agent.ts",
      "controllerSource": "apps/api-core/src/controllers/agent-app-reviews.controller.ts",
      "request": {
        "schemas": [],
        "evidence": "uncertain: no direct named schema call in handler body",
        "fields": [
          "from",
          "to",
          "timeZone",
          "path.appId"
        ],
        "fieldEvidence": "direct controller destructuring/query/path read",
        "schemaFields": {},
        "types": []
      },
      "response": {
        "fields": [],
        "evidence": "uncertain: response is variable/service result or no direct literal c.json object",
        "types": [
          "{ reviews: import(\"/Users/hm/Projects/One/apps/api-core/src/services/app-store-connect/app-store-reviews.service\").AppStoreReview[]; complete: boolean; fetchedAt: string; }"
        ]
      },
      "notes": "all endpoint routes require agent token",
      "controllerSignature": "export async function handleListAgentAppReviews(c: Context<"
    },
    {
      "method": "GET",
      "path": "/agent/app-store-reports/sources",
      "auth": "Bearer One Agent token via agentAuthMiddleware",
      "controller": "handleListAgentAppStoreReportingSources",
      "routeSource": "apps/api-core/src/routes/agent.ts",
      "controllerSource": "apps/api-core/src/controllers/agent.controller.ts",
      "request": {
        "schemas": [],
        "evidence": "uncertain: no direct named schema call in handler body",
        "fields": [],
        "fieldEvidence": "no direct field extraction; inspect named schema or delegated payload helper",
        "schemaFields": {},
        "types": []
      },
      "response": {
        "fields": [],
        "evidence": "uncertain: response is variable/service result or no direct literal c.json object",
        "types": [
          "{ sources: { oneAppId: string; appleAppId: string; name: string; bundleId: string | null; sku: string | null; vendorNumber: string; }[]; }"
        ]
      },
      "notes": "all endpoint routes require agent token",
      "controllerSignature": "export async function handleListAgentAppStoreReportingSources(\n  c: Context<"
    },
    {
      "method": "GET",
      "path": "/agent/apps/:appId/app-store-reports/analytics/requests",
      "auth": "Bearer One Agent token via agentAuthMiddleware",
      "controller": "handleListAgentAppStoreAnalyticsRequests",
      "routeSource": "apps/api-core/src/routes/agent.ts",
      "controllerSource": "apps/api-core/src/controllers/agent.controller.ts",
      "request": {
        "schemas": [],
        "evidence": "uncertain: no direct named schema call in handler body",
        "fields": [
          "accessType",
          "path.appId"
        ],
        "fieldEvidence": "direct controller destructuring/query/path read",
        "schemaFields": {},
        "types": [
          {
            "type": "\"ONGOING\" | \"ONE_TIME_SNAPSHOT\" | undefined",
            "source": "apps/api-core/src/controllers/agent.controller.ts"
          }
        ]
      },
      "response": {
        "fields": [
          "app"
        ],
        "evidence": "literal top-level c.json object keys found in controller",
        "types": [
          "{ app: { id: string; name: string; environment: import(\"/Users/hm/Projects/One/packages/sdk-shared/dist/index\").IdEnvironment; liveAppId: string | null; }; requests: import(\"/Users/hm/Projects/One/apps/api-core/src/services/app-store-connect/app-store-reporting.client\").AnalyticsReportRequest[]; }"
        ]
      },
      "notes": "all endpoint routes require agent token",
      "controllerSignature": "export async function handleListAgentAppStoreAnalyticsRequests(\n  c: Context<"
    },
    {
      "method": "GET",
      "path": "/agent/apps/:appId/app-store-reports/analytics/reports",
      "auth": "Bearer One Agent token via agentAuthMiddleware",
      "controller": "handleListAgentAppStoreAnalyticsReports",
      "routeSource": "apps/api-core/src/routes/agent.ts",
      "controllerSource": "apps/api-core/src/controllers/agent.controller.ts",
      "request": {
        "schemas": [],
        "evidence": "uncertain: no direct named schema call in handler body",
        "fields": [
          "requestId",
          "path.appId"
        ],
        "fieldEvidence": "direct controller destructuring/query/path read",
        "schemaFields": {},
        "types": [
          {
            "type": "string",
            "source": "apps/api-core/src/controllers/agent.controller.ts"
          }
        ]
      },
      "response": {
        "fields": [
          "app"
        ],
        "evidence": "literal top-level c.json object keys found in controller",
        "types": [
          "{ app: { id: string; name: string; environment: import(\"/Users/hm/Projects/One/packages/sdk-shared/dist/index\").IdEnvironment; liveAppId: string | null; }; reports: import(\"/Users/hm/Projects/One/apps/api-core/src/services/app-store-connect/app-store-reporting.client\").AnalyticsReport[]; }"
        ]
      },
      "notes": "all endpoint routes require agent token",
      "controllerSignature": "export async function handleListAgentAppStoreAnalyticsReports(\n  c: Context<"
    },
    {
      "method": "GET",
      "path": "/agent/apps/:appId/app-store-reports/analytics/instances",
      "auth": "Bearer One Agent token via agentAuthMiddleware",
      "controller": "handleListAgentAppStoreAnalyticsInstances",
      "routeSource": "apps/api-core/src/routes/agent.ts",
      "controllerSource": "apps/api-core/src/controllers/agent.controller.ts",
      "request": {
        "schemas": [],
        "evidence": "uncertain: no direct named schema call in handler body",
        "fields": [
          "requestId",
          "reportId",
          "granularity",
          "processingDate",
          "path.appId"
        ],
        "fieldEvidence": "direct controller destructuring/query/path read",
        "schemaFields": {},
        "types": [
          {
            "type": "{ requestId: string; reportId: string; granularity?: \"MONTHLY\" | \"DAILY\" | \"WEEKLY\" | undefined; processingDate?: string | undefined; }",
            "source": "apps/api-core/src/controllers/agent.controller.ts"
          }
        ]
      },
      "response": {
        "fields": [
          "app"
        ],
        "evidence": "literal top-level c.json object keys found in controller",
        "types": [
          "{ app: { id: string; name: string; environment: import(\"/Users/hm/Projects/One/packages/sdk-shared/dist/index\").IdEnvironment; liveAppId: string | null; }; instances: import(\"/Users/hm/Projects/One/apps/api-core/src/services/app-store-connect/app-store-reporting.client\").AnalyticsReportInstance[]; }"
        ]
      },
      "notes": "all endpoint routes require agent token",
      "controllerSignature": "export async function handleListAgentAppStoreAnalyticsInstances(\n  c: Context<"
    },
    {
      "method": "GET",
      "path": "/agent/apps/:appId/app-store-reports/analytics/segments",
      "auth": "Bearer One Agent token via agentAuthMiddleware",
      "controller": "handleListAgentAppStoreAnalyticsSegments",
      "routeSource": "apps/api-core/src/routes/agent.ts",
      "controllerSource": "apps/api-core/src/controllers/agent.controller.ts",
      "request": {
        "schemas": [],
        "evidence": "uncertain: no direct named schema call in handler body",
        "fields": [
          "requestId",
          "reportId",
          "instanceId",
          "path.appId"
        ],
        "fieldEvidence": "direct controller destructuring/query/path read",
        "schemaFields": {},
        "types": [
          {
            "type": "{ requestId: string; reportId: string; instanceId: string; }",
            "source": "apps/api-core/src/controllers/agent.controller.ts"
          }
        ]
      },
      "response": {
        "fields": [
          "app"
        ],
        "evidence": "literal top-level c.json object keys found in controller",
        "types": [
          "{ app: { id: string; name: string; environment: import(\"/Users/hm/Projects/One/packages/sdk-shared/dist/index\").IdEnvironment; liveAppId: string | null; }; segments: { id: string; checksum?: string; sizeInBytes?: number; }[]; }"
        ]
      },
      "notes": "all endpoint routes require agent token",
      "controllerSignature": "export async function handleListAgentAppStoreAnalyticsSegments(\n  c: Context<"
    },
    {
      "method": "GET",
      "path": "/agent/apps/:appId/app-store-reports/analytics/download",
      "auth": "Bearer One Agent token via agentAuthMiddleware",
      "controller": "handleDownloadAgentAppStoreAnalyticsSegment",
      "routeSource": "apps/api-core/src/routes/agent.ts",
      "controllerSource": "apps/api-core/src/controllers/agent.controller.ts",
      "request": {
        "schemas": [],
        "evidence": "uncertain: no direct named schema call in handler body",
        "fields": [
          "requestId",
          "reportId",
          "instanceId",
          "segmentId",
          "path.appId"
        ],
        "fieldEvidence": "direct controller destructuring/query/path read",
        "schemaFields": {},
        "types": [
          {
            "type": "{ requestId: string; reportId: string; instanceId: string; segmentId: string; }",
            "source": "apps/api-core/src/controllers/agent.controller.ts"
          }
        ]
      },
      "response": {
        "fields": [],
        "evidence": "uncertain: response is variable/service result or no direct literal c.json object"
      },
      "notes": "all endpoint routes require agent token",
      "controllerSignature": "export async function handleDownloadAgentAppStoreAnalyticsSegment(\n  c: Context<"
    },
    {
      "method": "GET",
      "path": "/agent/apps/:appId/app-store-reports/sales",
      "auth": "Bearer One Agent token via agentAuthMiddleware",
      "controller": "handleDownloadAgentAppStoreSalesReport",
      "routeSource": "apps/api-core/src/routes/agent.ts",
      "controllerSource": "apps/api-core/src/controllers/agent.controller.ts",
      "request": {
        "schemas": [],
        "evidence": "uncertain: no direct named schema call in handler body",
        "fields": [
          "reportType",
          "reportSubType",
          "frequency",
          "reportDate",
          "version",
          "path.appId"
        ],
        "fieldEvidence": "direct controller destructuring/query/path read",
        "schemaFields": {},
        "types": [
          {
            "type": "{ reportType: \"SALES\" | \"PRE_ORDER\" | \"SUBSCRIPTION\" | \"SUBSCRIPTION_EVENT\"; reportSubType: \"SUMMARY\" | \"DETAILED\" | \"OPT_IN\"; frequency: \"MONTHLY\" | \"DAILY\" | \"WEEKLY\" | \"YEARLY\"; reportDate: string; version: string; }",
            "source": "apps/api-core/src/controllers/agent.controller.ts"
          }
        ]
      },
      "response": {
        "fields": [],
        "evidence": "uncertain: response is variable/service result or no direct literal c.json object"
      },
      "notes": "all endpoint routes require agent token",
      "controllerSignature": "export async function handleDownloadAgentAppStoreSalesReport(\n  c: Context<"
    },
    {
      "method": "GET",
      "path": "/agent/apps/:appId/support/threads",
      "auth": "Bearer One Agent token via agentAuthMiddleware",
      "controller": "handleListAgentSupportThreads",
      "routeSource": "apps/api-core/src/routes/agent.ts",
      "controllerSource": "apps/api-core/src/controllers/agent-support.controller.ts",
      "request": {
        "schemas": [
          "agentSupportThreadListQuerySchema"
        ],
        "evidence": "direct controller validation call",
        "fields": [
          "path.appId"
        ],
        "fieldEvidence": "direct controller destructuring/query/path read",
        "schemaFields": {
          "agentSupportThreadListQuerySchema": {
            "fields": [
              "status",
              "category",
              "needsReply",
              "limit",
              "cursor"
            ],
            "source": "apps/api-core/src/controllers/agent-support.controller.ts",
            "evidence": "schema object property keys parsed from source"
          }
        },
        "types": [
          {
            "type": "{ status?: \"open\" | \"resolved\" | undefined; category?: \"message\" | \"bug\" | \"feature\" | undefined; needsReply?: \"false\" | \"true\" | undefined; limit?: unknown; cursor?: string | undefined; }",
            "source": "apps/api-core/src/controllers/agent-support.controller.ts"
          }
        ]
      },
      "response": {
        "fields": [
          "app"
        ],
        "evidence": "literal top-level c.json object keys found in controller",
        "types": [
          "{ threads: import(\"/Users/hm/Projects/One/apps/api-core/src/services/support/support.service\").WorkspaceSupportThreadListItem[]; nextCursor: string | null; app: { id: string; name: string; environment: import(\"/Users/hm/Projects/One/packages/sdk-shared/dist/index\").IdEnvironment; liveAppId: string | null; }; }"
        ]
      },
      "notes": "all endpoint routes require agent token",
      "controllerSignature": "export async function handleListAgentSupportThreads(c: AgentSupportContext)"
    },
    {
      "method": "GET",
      "path": "/agent/apps/:appId/support/threads/:threadId",
      "auth": "Bearer One Agent token via agentAuthMiddleware",
      "controller": "handleGetAgentSupportThread",
      "routeSource": "apps/api-core/src/routes/agent.ts",
      "controllerSource": "apps/api-core/src/controllers/agent-support.controller.ts",
      "request": {
        "schemas": [],
        "evidence": "uncertain: no direct named schema call in handler body",
        "fields": [
          "path.appId",
          "path.threadId"
        ],
        "fieldEvidence": "direct controller destructuring/query/path read",
        "schemaFields": {},
        "types": []
      },
      "response": {
        "fields": [
          "app"
        ],
        "evidence": "literal top-level c.json object keys found in controller",
        "types": [
          "{ app: { id: string; name: string; environment: import(\"/Users/hm/Projects/One/packages/sdk-shared/dist/index\").IdEnvironment; liveAppId: string | null; }; thread: import(\"/Users/hm/Projects/One/packages/sdk-shared/dist/index\").SupportThreadDetailResponse & { projectId: string; messages: Array<import(\"/Users/hm/Projects/One/packages/sdk-shared/dist/index\").SupportMessageResponse & { customerReadAt: string | null; }>; appId: string; appName: string; environment: \"test\" | \"live\"; labels: import(\"/Users/hm/Projects/One/apps/api-core/src/services/support/workspace-support-label.service\").WorkspaceSupportLabel[]; workspaceMarkedUnreadAt: string | null; }; }"
        ]
      },
      "notes": "all endpoint routes require agent token",
      "controllerSignature": "export async function handleGetAgentSupportThread(c: AgentSupportContext)"
    },
    {
      "method": "GET",
      "path": "/agent/apps/:appId/support/threads/:threadId/investigation",
      "auth": "Bearer One Agent token via agentAuthMiddleware",
      "controller": "handleAgentSupportInvestigation",
      "routeSource": "apps/api-core/src/routes/agent.ts",
      "controllerSource": "apps/api-core/src/controllers/agent-support.controller.ts",
      "request": {
        "schemas": [],
        "evidence": "uncertain: no direct named schema call in handler body",
        "fields": [
          "resource",
          "search",
          "offset",
          "eventId",
          "path.appId",
          "path.threadId"
        ],
        "fieldEvidence": "direct controller destructuring/query/path read",
        "schemaFields": {},
        "types": [
          {
            "type": "{ resource: \"subscriptions\" | \"notification_deliveries\" | \"events\" | \"transactions\" | \"messages\" | \"entitlement_grants\" | \"related_threads\" | \"related_thread\" | \"crash_groups\" | \"crash_group\"; search: string | null; offset: number; eventId: string | null; appIndex: number; threadId: string; }",
            "source": "apps/api-core/src/services/support/support-ai.service.ts"
          },
          {
            "type": "{ [x: string]: unknown; appIndex: number; threadId: string; }",
            "source": "apps/api-core/src/services/support/support-ai.service.ts"
          },
          {
            "type": "{ reply: string; appIndex: number; threadId: string; }",
            "source": "apps/api-core/src/services/support/support-ai.service.ts"
          },
          {
            "type": "{ attachmentId: string; offset: number; appIndex: number; threadId: string; }",
            "source": "apps/api-core/src/services/support/support-ai.service.ts"
          }
        ]
      },
      "response": {
        "fields": [],
        "evidence": "uncertain: response is variable/service result or no direct literal c.json object",
        "types": [
          "{ app: { id: string; name: string; environment: import(\"/Users/hm/Projects/One/packages/sdk-shared/dist/index\").IdEnvironment; liveAppId: string | null; }; evidence: import(\"/Users/hm/Projects/One/packages/sdk-shared/dist/index\").AskOneContentBlock[]; }"
        ]
      },
      "notes": "all endpoint routes require agent token",
      "controllerSignature": "export async function handleAgentSupportInvestigation(c: AgentSupportContext)"
    },
    {
      "method": "GET",
      "path": "/agent/apps/:appId/support/threads/:threadId/attachments/:attachmentId",
      "auth": "Bearer One Agent token via agentAuthMiddleware",
      "controller": "handleReadAgentSupportAttachment",
      "routeSource": "apps/api-core/src/routes/agent.ts",
      "controllerSource": "apps/api-core/src/controllers/agent-support.controller.ts",
      "request": {
        "schemas": [
          "z"
        ],
        "evidence": "direct controller validation call",
        "fields": [
          "path.appId",
          "path.threadId",
          "path.attachmentId"
        ],
        "fieldEvidence": "direct controller destructuring/query/path read",
        "schemaFields": {},
        "types": [
          {
            "type": "{ offset?: unknown; length?: unknown; }",
            "source": "apps/api-core/src/controllers/agent-support.controller.ts"
          }
        ]
      },
      "response": {
        "fields": [
          "appId",
          "threadId",
          "attachmentId",
          "fileName",
          "contentType",
          "byteSize",
          "offset",
          "returnedBytes",
          "hasMore",
          "dataBase64"
        ],
        "evidence": "literal top-level c.json object keys found in controller",
        "types": [
          "{ appId: string; threadId: string; attachmentId: string; fileName: string; contentType: string; byteSize: number; offset: number; returnedBytes: number; hasMore: boolean; dataBase64: string; }"
        ]
      },
      "notes": "all endpoint routes require agent token",
      "controllerSignature": "export async function handleReadAgentSupportAttachment(c: AgentSupportContext)"
    },
    {
      "method": "POST",
      "path": "/agent/apps/:appId/support/threads/:threadId/notes",
      "auth": "Bearer One Agent token via agentAuthMiddleware",
      "controller": "handleCreateAgentSupportNote",
      "routeSource": "apps/api-core/src/routes/agent.ts",
      "controllerSource": "apps/api-core/src/controllers/agent-support.controller.ts",
      "request": {
        "schemas": [
          "agentSupportNoteRequestSchema"
        ],
        "evidence": "direct controller validation call",
        "fields": [
          "path.appId",
          "path.threadId"
        ],
        "fieldEvidence": "direct controller destructuring/query/path read",
        "schemaFields": {
          "agentSupportNoteRequestSchema": {
            "fields": [
              "body",
              "clientMessageId"
            ],
            "source": "apps/api-core/src/controllers/agent-support.controller.ts",
            "evidence": "schema object property keys parsed from source"
          }
        },
        "types": [
          {
            "type": "{ body: string; clientMessageId?: string | undefined; }",
            "source": "apps/api-core/src/controllers/agent-support.controller.ts"
          }
        ]
      },
      "response": {
        "fields": [],
        "evidence": "uncertain: response is variable/service result or no direct literal c.json object",
        "types": [
          "{ app: { id: string; name: string; environment: import(\"/Users/hm/Projects/One/packages/sdk-shared/dist/index\").IdEnvironment; liveAppId: string | null; }; thread: import(\"/Users/hm/Projects/One/packages/sdk-shared/dist/index\").SupportThreadDetailResponse & { projectId: string; messages: Array<import(\"/Users/hm/Projects/One/packages/sdk-shared/dist/index\").SupportMessageResponse & { customerReadAt: string | null; }>; appId: string; appName: string; environment: \"test\" | \"live\"; labels: import(\"/Users/hm/Projects/One/apps/api-core/src/services/support/workspace-support-label.service\").WorkspaceSupportLabel[]; workspaceMarkedUnreadAt: string | null; }; message: import(\"/Users/hm/Projects/One/packages/sdk-shared/dist/index\").SupportMessageResponse; created: boolean; }"
        ]
      },
      "notes": "all endpoint routes require agent token",
      "controllerSignature": "export async function handleCreateAgentSupportNote(c: AgentSupportContext)"
    },
    {
      "method": "POST",
      "path": "/agent/action-plans",
      "auth": "Bearer One Agent token via agentAuthMiddleware",
      "controller": "handleCreateAgentActionPlan",
      "routeSource": "apps/api-core/src/routes/agent.ts",
      "controllerSource": "apps/api-core/src/controllers/agent.controller.ts",
      "request": {
        "schemas": [
          "createAgentActionPlanSchema"
        ],
        "evidence": "direct controller validation call",
        "fields": [],
        "fieldEvidence": "no direct field extraction; inspect named schema or delegated payload helper",
        "schemaFields": {
          "createAgentActionPlanSchema": {
            "fields": [
              "action",
              "appId",
              "environment",
              "request",
              "plan",
              "expiresAt"
            ],
            "source": "packages/sdk-shared/src/validation/agents.ts",
            "evidence": "schema object property keys parsed from source"
          }
        },
        "types": [
          {
            "type": "{ action: string; request: Record<string, unknown>; plan: Record<string, unknown>; expiresAt: string; appId?: string | null | undefined; environment?: \"test\" | \"live\" | null | undefined; }",
            "source": "apps/api-core/src/controllers/agent.controller.ts"
          },
          {
            "type": "{ operation: \"delete\"; resource?: \"product\" | undefined; id?: string | undefined; identifier?: string | undefined; key?: string | undefined; }",
            "source": "apps/api-core/src/services/agent/agent-deletion-policy.ts"
          },
          {
            "type": "{ name?: string | undefined; emailPasswordEnabled?: boolean | undefined; magicLinkEnabled?: boolean | undefined; emailChangeMode?: \"verification_link\" | \"password_confirmed\" | undefined; allowedRedirectUris?: string[] | undefined; accountDeletion?: { mode: \"delete_credential\" | \"delete_customer\"; requireCurrentPassword: boolean; scrubCustomerProfile: boolean; detachCustomerAuthUser: boolean; detachWorkspaceCustomer: boolean; deleteCustomerAuthUserWhenUnused: boolean; credentialProviderIds: string[]; } | undefined; restoreDeletedCredentialsOnSignup?: boolean | undefined; expectedAccountDeletion?: { mode: \"delete_credential\" | \"delete_customer\"; requireCurrentPassword: boolean; scrubCustomerProfile: boolean; detachCustomerAuthUser: boolean; detachWorkspaceCustomer: boolean; deleteCustomerAuthUserWhenUnused: boolean; credentialProviderIds: string[]; } | null | undefined; expectedAccountDeletionConfigurationStatus?: \"invalid\" | \"absent\" | \"configured\" | undefined; expectedAccountDeletionFingerprint?: string | undefined; expectedRestoreDeletedCredentialsOnSignup?: boolean | null | undefined; expectedAppUpdatedAt?: string | undefined; }",
            "source": "apps/api-core/src/controllers/agent.controller.ts"
          },
          {
            "type": "{ enabled: boolean; appVersions: string[]; customerIds: string[]; captureHours: number; retentionDays: number; maxCaptures: number; successSampleLimit?: number | undefined; }",
            "source": "apps/api-core/src/controllers/agent-purchase-capture.controller.ts"
          },
          {
            "type": "{ name?: string | undefined; appearance?: unknown; bundleId?: string | null | undefined; webOrigin?: string | null | undefined; } | { emailPasswordEnabled?: boolean | undefined; magicLinkEnabled?: boolean | undefined; redirectUrls?: string[] | undefined; sessionMode?: \"persistent\" | \"rolling\" | \"absolute\" | undefined; sessionInactivityDays?: number | null | undefined; sessionAbsoluteDays?: number | null | undefined; recentAuthenticationWindowSeconds?: number | null | undefined; passwordMaxAgeDays?: number | null | undefined; accountDeletion?: { mode: \"delete_credential\" | \"delete_customer\"; requireCurrentPassword: boolean; scrubCustomerProfile: boolean; detachCustomerAuthUser: boolean; detachWorkspaceCustomer: boolean; deleteCustomerAuthUserWhenUnused: boolean; credentialProviderIds: string[]; } | undefined; restoreDeletedCredentialsOnSignup?: boolean | undefined; emailChangeMode?: \"verification_link\" | \"password_confirmed\" | undefined; } | { contactMode: \"optional_email\" | \"required_email\" | \"authenticated_account\"; emailVerificationMode: \"none\" | \"optional\" | \"required\"; } | { operation: \"create\"; values: { identifier: string; name: string; description?: string | null | undefined; }; } | { operation: \"update\"; id: string; values: { name?: string | undefined; description?: string | null | undefined; }; } | { operation: \"create\"; values: { identifier: string; name: string; title?: string | null | undefined; enabled?: boolean | undefined; contentType?: \"push\" | \"mjml\" | \"html\" | \"text\" | undefined; category?: \"transactional\" | \"lifecycle\" | \"marketing\" | \"system\" | undefined; subject?: string | null | undefined; variables?: string | Record<string, unknown> | null | undefined; channel?: \"email\" | \"push\" | undefined; locale?: string | undefined; bodyText?: string | null | undefined; contentSource?: string | null | undefined; contentHtml?: string | undefined; dataPayload?: string | Record<string, unknown> | null | undefined; }; } | { operation: \"update\"; id: string; values: { title?: string | null | undefined; name?: string | undefined; enabled?: boolean | undefined; contentType?: \"push\" | \"mjml\" | \"html\" | \"text\" | undefined; category?: \"transactional\" | \"lifecycle\" | \"marketing\" | \"system\" | undefined; subject?: string | null | undefined; variables?: string | Record<string, unknown> | null | undefined; locale?: string | undefined; bodyText?: string | null | undefined; contentSource?: string | null | undefined; contentHtml?: string | undefined; dataPayload?: string | Record<string, unknown> | null | undefined; }; } | { operation: \"create\"; values: { identifier: string; name: string; source?: \"manual\" | \"auth\" | \"event\" | \"billing\" | \"api\" | undefined; eventType?: string | null | undefined; enabled?: boolean | undefined; delaySeconds?: number | undefined; cooldownSeconds?: number | undefined; }; } | { operation: \"update\"; id: string; values: { identifier?: string | undefined; name?: string | undefined; source?: \"manual\" | \"auth\" | \"event\" | \"billing\" | \"api\" | undefined; eventType?: string | null | undefined; enabled?: boolean | undefined; delaySeconds?: number | undefined; cooldownSeconds?: number | undefined; }; } | { id: string; triggerId: string | null; } | { operation: \"create\"; values: { name: string; url: string; enabled?: boolean | undefined; eventTypes?: (\"identity_attached\" | \"signin\" | \"signup\" | \"signout\" | \"paywall_shown\" | \"paywall_product_selected\" | \"checkout_started\" | \"purchase_started\" | \"customer_first_seen\" | \"email_changed\" | \"password_changed\" | \"account_deleted\" | \"purchase_revoked\" | \"purchase_refunded\" | \"billing_operation_failed\" | \"apple_access_observed\" | \"subscription_cancellation_scheduled\" | \"subscription_reactivated\" | \"subscription_started\" | \"purchase_verified\" | \"app_activity\" | \"session_start\" | \"session_end\" | \"deep_link_open\" | \"milestone_recorded\" | \"onboarding_step_viewed\" | \"paywall_requested\" | \"paywall_closed\" | \"paywall_screen_changed\" | \"product_offer_redemption_updated\" | \"paywall_checkout_requested\" | \"purchase_already_entitled\" | \"purchase_cancelled\" | \"purchase_pending\" | \"purchase_failed\" | \"purchase_sync_failed\" | \"purchase_succeeded\" | \"restore_started\" | \"restore_succeeded\" | \"restore_failed\" | \"sdk_access_observed\" | \"restore_operation_updated\" | \"apple_order_recovery_succeeded\" | \"surface_impression\" | \"subscription_trial_started\" | \"subscription_trial_converted\" | \"purchase_refund_reversed\" | \"purchase_refund_declined\" | \"subscription_renewed\" | \"subscription_renewal_extended\" | \"subscription_renewal_preference_changed\" | \"subscription_renewal_failed\" | \"subscription_expired\" | \"subscription_cancelled\" | \"subscription_paused\" | \"subscription_resumed\" | \"price_change_detected\" | \"grace_period_started\" | \"grace_period_ended\" | \"purchase_refund_requested\" | \"offer_redeemed\" | \"entitlement_granted\" | \"entitlement_revoked\" | \"notification_sent\" | \"notification_opened\" | \"webhook_delivered\" | \"webhook_failed\" | \"customer_note_added\" | \"app_crash_reported\" | \"app_error_reported\")[] | undefined; }; } | { operation: \"update\"; id: string; values: { name?: string | undefined; url?: string | undefined; enabled?: boolean | undefined; eventTypes?: (\"identity_attached\" | \"signin\" | \"signup\" | \"signout\" | \"paywall_shown\" | \"paywall_product_selected\" | \"checkout_started\" | \"purchase_started\" | \"customer_first_seen\" | \"email_changed\" | \"password_changed\" | \"account_deleted\" | \"purchase_revoked\" | \"purchase_refunded\" | \"billing_operation_failed\" | \"apple_access_observed\" | \"subscription_cancellation_scheduled\" | \"subscription_reactivated\" | \"subscription_started\" | \"purchase_verified\" | \"app_activity\" | \"session_start\" | \"session_end\" | \"deep_link_open\" | \"milestone_recorded\" | \"onboarding_step_viewed\" | \"paywall_requested\" | \"paywall_closed\" | \"paywall_screen_changed\" | \"product_offer_redemption_updated\" | \"paywall_checkout_requested\" | \"purchase_already_entitled\" | \"purchase_cancelled\" | \"purchase_pending\" | \"purchase_failed\" | \"purchase_sync_failed\" | \"purchase_succeeded\" | \"restore_started\" | \"restore_succeeded\" | \"restore_failed\" | \"sdk_access_observed\" | \"restore_operation_updated\" | \"apple_order_recovery_succeeded\" | \"surface_impression\" | \"subscription_trial_started\" | \"subscription_trial_converted\" | \"purchase_refund_reversed\" | \"purchase_refund_declined\" | \"subscription_renewed\" | \"subscription_renewal_extended\" | \"subscription_renewal_preference_changed\" | \"subscription_renewal_failed\" | \"subscription_expired\" | \"subscription_cancelled\" | \"subscription_paused\" | \"subscription_resumed\" | \"price_change_detected\" | \"grace_period_started\" | \"grace_period_ended\" | \"purchase_refund_requested\" | \"offer_redeemed\" | \"entitlement_granted\" | \"entitlement_revoked\" | \"notification_sent\" | \"notification_opened\" | \"webhook_delivered\" | \"webhook_failed\" | \"customer_note_added\" | \"app_crash_reported\" | \"app_error_reported\")[] | undefined; }; } | { id: string; } | { id: string; } | { name?: string | undefined; slug?: string | undefined; } | { id: string; name: string; } | { id: string; role: \"owner\" | \"admin\" | \"member\"; } | { id: string; } | { id: string; values: { name?: string | undefined; status?: \"active\" | \"disabled\" | undefined; }; } | { id: string; connectionId: string; values: { externalAppName?: string | undefined; enabled?: boolean | undefined; }; } | { enabled: boolean; replaceCredentials: boolean; publicConfig: { accountId: string; sendingDomain: string; fromAddress: string; fromName?: string | undefined; replyTo?: string | undefined; }; } | { enabled: boolean; replaceCredentials: false; useExistingBinding: true; publicConfig: { fromAddress: string; fromName?: string | undefined; replyTo?: string | undefined; }; } | { operation: \"create\"; values: { title: string; color: \"slate\" | \"blue\" | \"green\" | \"amber\" | \"rose\" | \"violet\"; }; } | { operation: \"update\"; id: string; values: { title: string; color: \"slate\" | \"blue\" | \"green\" | \"amber\" | \"rose\" | \"violet\"; }; } | { id: string; status: \"open\" | \"resolved\"; } | { id: string; read: boolean; } | { id: string; labelIds: string[]; }",
            "source": "apps/api-core/src/services/agent/agent-admin.service.ts"
          },
          {
            "type": "{ id: string; triggerId: string | null; }",
            "source": "apps/api-core/src/services/agent/agent-admin.service.ts"
          },
          {
            "type": "{ enabled: boolean; replaceCredentials: boolean; publicConfig: { accountId: string; sendingDomain: string; fromAddress: string; fromName?: string | undefined; replyTo?: string | undefined; }; } | { enabled: boolean; replaceCredentials: false; useExistingBinding: true; publicConfig: { fromAddress: string; fromName?: string | undefined; replyTo?: string | undefined; }; }",
            "source": "apps/api-core/src/services/agent/agent-admin.service.ts"
          },
          {
            "type": "{ operation: \"create\"; values: { identifier: string; name: string; title?: string | null | undefined; enabled?: boolean | undefined; contentType?: \"push\" | \"mjml\" | \"html\" | \"text\" | undefined; category?: \"transactional\" | \"lifecycle\" | \"marketing\" | \"system\" | undefined; subject?: string | null | undefined; variables?: string | Record<string, unknown> | null | undefined; channel?: \"email\" | \"push\" | undefined; locale?: string | undefined; bodyText?: string | null | undefined; contentSource?: string | null | undefined; contentHtml?: string | undefined; dataPayload?: string | Record<string, unknown> | null | undefined; }; } | { operation: \"update\"; id: string; values: { title?: string | null | undefined; name?: string | undefined; enabled?: boolean | undefined; contentType?: \"push\" | \"mjml\" | \"html\" | \"text\" | undefined; category?: \"transactional\" | \"lifecycle\" | \"marketing\" | \"system\" | undefined; subject?: string | null | undefined; variables?: string | Record<string, unknown> | null | undefined; locale?: string | undefined; bodyText?: string | null | undefined; contentSource?: string | null | undefined; contentHtml?: string | undefined; dataPayload?: string | Record<string, unknown> | null | undefined; }; }",
            "source": "apps/api-core/src/services/agent/agent-admin.service.ts"
          },
          {
            "type": "{ id: string; labelIds: string[]; }",
            "source": "apps/api-core/src/services/agent/agent-admin.service.ts"
          },
          {
            "type": "{ definition: { key: string; revision: number; label: string; unit: \"duration\" | \"count\" | \"bytes\" | \"credits\"; scale: number; allowedSources: (\"server\" | \"client\")[]; dimensionKeys: string[]; entitlementId: string | null; isActive: boolean; }; }",
            "source": "apps/api-core/src/services/agent/agent-usage-plans.ts"
          },
          {
            "type": "{ definition: { key: string; allowedValues: string[]; }; }",
            "source": "apps/api-core/src/services/agent/agent-usage-plans.ts"
          },
          {
            "type": "{ policy: \"account\" | \"app_store\"; preservedImport?: { revision: string; enabled: boolean; entitlementIdentifier: string; members: { grantId: string; customerId: string; }[]; } | null | undefined; appPurchaseRules?: { entitlementIdentifiers: string[]; originalAppVersionFormat?: \"integer\" | \"dotted\" | undefined; originalAppVersionBefore?: string | undefined; originalPurchaseDateBefore?: string | undefined; }[] | undefined; }",
            "source": "apps/api-core/src/services/products/paid-access-settings.service.ts"
          },
          {
            "type": "\"account\" | \"app_store\"",
            "source": "apps/api-core/src/services/products/paid-access-configuration.service.ts"
          },
          {
            "type": "{ operation: \"create\"; values: { identifier: string; name: string; status: \"active\" | \"inactive\" | \"archived\"; config: unknown; delivery: { maxPresentationsPerCustomer: number; cooldownSeconds: number; allowManualRepeats: boolean; }; description?: string | null | undefined; }; } | { operation: \"update\"; id: string; values: { status?: \"active\" | \"inactive\" | \"archived\" | undefined; name?: string | undefined; description?: string | null | undefined; config?: unknown; delivery?: { maxPresentationsPerCustomer: number; cooldownSeconds: number; allowManualRepeats: boolean; } | undefined; }; } | { operation: \"new_round\"; id: string; }",
            "source": "apps/api-core/src/services/agent/agent-survey-plans.ts"
          },
          {
            "type": "{ provider: \"apple_app_store_connect\"; category: \"catalog\"; resource: \"app_store_pricing_plan\"; operation: \"apply\"; providerPlanId: string; digest: string; }",
            "source": "apps/api-core/src/controllers/agent.controller.ts"
          },
          {
            "type": "{ provider: \"google\"; category: \"auth\"; publicConfig: { clientId: string; }; enabled?: boolean | undefined; } | { provider: \"apple\"; category: \"auth\"; publicConfig: { clientId: string; teamId?: string | undefined; keyId?: string | undefined; }; enabled?: boolean | undefined; }",
            "source": "apps/api-core/src/controllers/agent.controller.ts"
          },
          {
            "type": "{ operation: \"update\"; resource: \"product_offer\"; id: string; values: { paused: boolean; }; }",
            "source": "apps/api-core/src/controllers/agent.controller.ts"
          },
          {
            "type": "{ operation: \"update\" | \"delete\" | \"create\"; resource?: \"paywall\" | undefined; id?: string | undefined; identifier?: string | undefined; values?: { identifier?: string | undefined; name?: string | undefined; description?: string | null | undefined; config?: unknown; status?: \"active\" | \"inactive\" | \"archived\" | undefined; isDefault?: boolean | undefined; productIdentifiers?: string[] | undefined; } | undefined; } | { operation: \"update\"; resource: \"placement_fallback\"; placementIdentifier: string; fallbackPaywallIdentifier: string; } | { operation: \"upsert\"; resource: \"placement\"; identifier: string; name: string; fallbackPaywallIdentifier: string; description?: string | null | undefined; } | { operation: \"update\" | \"delete\" | \"create\"; id?: string | undefined; identifier?: string | undefined; values?: { identifier?: string | undefined; name?: string | undefined; description?: string | null | undefined; surfaceType?: string | undefined; status?: \"active\" | \"inactive\" | \"archived\" | undefined; enabled?: boolean | undefined; config?: unknown; } | undefined; }",
            "source": "apps/api-core/src/controllers/agent.controller.ts"
          },
          {
            "type": "{ operation: \"update\" | \"delete\" | \"create\"; resource?: \"paywall\" | undefined; id?: string | undefined; identifier?: string | undefined; values?: { identifier?: string | undefined; name?: string | undefined; description?: string | null | undefined; config?: unknown; status?: \"active\" | \"inactive\" | \"archived\" | undefined; isDefault?: boolean | undefined; productIdentifiers?: string[] | undefined; } | undefined; }",
            "source": "apps/api-core/src/controllers/agent.controller.ts"
          },
          {
            "type": "{ operation: \"upsert\"; resource: \"placement\"; identifier: string; name: string; fallbackPaywallIdentifier: string; description?: string | null | undefined; }",
            "source": "apps/api-core/src/controllers/agent.controller.ts"
          },
          {
            "type": "{ operation: \"update\" | \"delete\" | \"create\"; id?: string | undefined; expectedUpdatedAt?: string | undefined; values?: { identifier?: string | null | undefined; name?: string | undefined; subject?: string | null | undefined; channel?: \"email\" | undefined; category?: \"transactional\" | \"lifecycle\" | \"marketing\" | \"system\" | undefined; locale?: string | undefined; enabled?: boolean | undefined; contentType?: \"push\" | \"mjml\" | \"html\" | \"text\" | undefined; contentSource?: string | undefined; contentHtml?: string | undefined; variables?: unknown; } | undefined; }",
            "source": "apps/api-core/src/controllers/agent.controller.ts"
          },
          {
            "type": "{ providerTransactionId: string; billingTransactionId: string; subscriptionId: string; customerId: string; canonicalEventId: string; expectedPurchasedAt: string; expectedPeriodEnd: string; duplicateEventIds?: string[] | undefined; }",
            "source": "apps/api-core/src/controllers/agent.controller.ts"
          },
          {
            "type": "{ customerId: string; grantId: string; entitlementIdentifier: string; sourceBillingTransactionId: string | null; expectedRevokedAt: null; }",
            "source": "apps/api-core/src/controllers/agent.controller.ts"
          },
          {
            "type": "{ entitlementId: string; startsAt: any; endsAt: any; customerId: string; expectedPolicy: \"account\" | \"app_store\"; source: \"manual\"; applePurchaserLinkId?: string | undefined; note?: string | undefined; }",
            "source": "apps/api-core/src/controllers/agent.controller.ts"
          },
          {
            "type": "{ entitlementIdentifiers: string[]; originalAppVersionFormat?: \"integer\" | \"dotted\" | undefined; originalAppVersionBefore?: string | undefined; originalPurchaseDateBefore?: string | undefined; }[]",
            "source": "apps/api-core/src/services/products/apple-purchaser-grant.service.ts"
          },
          {
            "type": "{ authUserId: string; normalizedEmail: string; expectedUpdatedAt: string; expectedProviders: { providerId: string; accountCount: number; hasPassword: boolean; passwordUpdatedAt: string | null; }[]; expectedCustomerCount: 0; expectedWorkspaceCustomerCount: 0; expectedSessionCount: number; expectedActiveSessionCount: 0; expectedChallengeCount: number; expectedActiveChallengeCount: 0; }",
            "source": "apps/api-core/src/controllers/agent.controller.ts"
          }
        ]
      },
      "response": {
        "fields": [],
        "evidence": "uncertain: response is variable/service result or no direct literal c.json object",
        "types": [
          "{ plan: { appId: string | null; environment: \"test\" | \"live\" | null; platformUserId: string; workspaceId: string; agentAccessTokenId: string; action: string; id: string; createdAt: Date; updatedAt: Date; request: Record<string, unknown>; expiresAt: Date; appliedAt: Date | null; plan: Record<string, unknown>; }; requiredScope: \"workspace:read\" | \"workspace:write\" | \"apps:read\" | \"apps:write\" | \"reports:read\" | \"catalog:read\" | \"catalog:write\" | \"paywalls:read\" | \"paywalls:write\" | \"messaging:read\" | \"messaging:write\" | \"campaigns:read\" | \"campaigns:write\" | \"remote_config:read\" | \"remote_config:write\" | \"surfaces:read\" | \"surfaces:write\" | \"surveys:read\" | \"surveys:write\" | \"rules:read\" | \"rules:write\" | \"webhooks:read\" | \"webhooks:write\" | \"integrations:read\" | \"integrations:write\" | \"auth:read\" | \"auth:write\" | \"audit:read\"; }"
        ]
      },
      "notes": "all endpoint routes require agent token",
      "controllerSignature": "export async function handleCreateAgentActionPlan(c: Context<"
    },
    {
      "method": "POST",
      "path": "/agent/action-plans/:planId/apply",
      "auth": "Bearer One Agent token via agentAuthMiddleware",
      "controller": "handleApplyAgentActionPlan",
      "routeSource": "apps/api-core/src/routes/agent.ts",
      "controllerSource": "apps/api-core/src/controllers/agent.controller.ts",
      "request": {
        "schemas": [],
        "evidence": "uncertain: no direct named schema call in handler body",
        "fields": [
          "path.planId"
        ],
        "fieldEvidence": "direct controller destructuring/query/path read",
        "schemaFields": {},
        "types": [
          {
            "type": "{ secrets?: Record<string, unknown> | undefined; } | undefined",
            "source": "apps/api-core/src/controllers/agent.controller.ts"
          },
          {
            "type": "{ operation: \"delete\"; resource?: \"product\" | undefined; id?: string | undefined; identifier?: string | undefined; key?: string | undefined; }",
            "source": "apps/api-core/src/services/agent/agent-deletion-policy.ts"
          },
          {
            "type": "{ operation: \"create\"; values: { identifier: string; name: string; status: \"active\" | \"inactive\" | \"archived\"; config: unknown; delivery: { maxPresentationsPerCustomer: number; cooldownSeconds: number; allowManualRepeats: boolean; }; description?: string | null | undefined; }; } | { operation: \"update\"; id: string; values: { status?: \"active\" | \"inactive\" | \"archived\" | undefined; name?: string | undefined; description?: string | null | undefined; config?: unknown; delivery?: { maxPresentationsPerCustomer: number; cooldownSeconds: number; allowManualRepeats: boolean; } | undefined; }; } | { operation: \"new_round\"; id: string; }",
            "source": "apps/api-core/src/services/agent/agent-survey-plans.ts"
          },
          {
            "type": "{ updatedAt: string; collectionRound: number; }",
            "source": "apps/api-core/src/services/agent/agent-survey-plans.ts"
          },
          {
            "type": "{ definition: { key: string; revision: number; label: string; unit: \"duration\" | \"count\" | \"bytes\" | \"credits\"; scale: number; allowedSources: (\"server\" | \"client\")[]; dimensionKeys: string[]; entitlementId: string | null; isActive: boolean; }; }",
            "source": "apps/api-core/src/services/agent/agent-usage-plans.ts"
          },
          {
            "type": "{ definition: { key: string; allowedValues: string[]; }; }",
            "source": "apps/api-core/src/services/agent/agent-usage-plans.ts"
          },
          {
            "type": "{ projectId: string; name: string; platform: \"ios\" | \"android\" | \"web\" | \"windows\" | \"macos\"; bundleId?: string | null | undefined; webOrigin?: string | null | undefined; }",
            "source": "apps/api-core/src/controllers/agent.controller.ts"
          },
          {
            "type": "{ name?: string | undefined; emailPasswordEnabled?: boolean | undefined; magicLinkEnabled?: boolean | undefined; emailChangeMode?: \"verification_link\" | \"password_confirmed\" | undefined; allowedRedirectUris?: string[] | undefined; accountDeletion?: { mode: \"delete_credential\" | \"delete_customer\"; requireCurrentPassword: boolean; scrubCustomerProfile: boolean; detachCustomerAuthUser: boolean; detachWorkspaceCustomer: boolean; deleteCustomerAuthUserWhenUnused: boolean; credentialProviderIds: string[]; } | undefined; restoreDeletedCredentialsOnSignup?: boolean | undefined; expectedAccountDeletion?: { mode: \"delete_credential\" | \"delete_customer\"; requireCurrentPassword: boolean; scrubCustomerProfile: boolean; detachCustomerAuthUser: boolean; detachWorkspaceCustomer: boolean; deleteCustomerAuthUserWhenUnused: boolean; credentialProviderIds: string[]; } | null | undefined; expectedAccountDeletionConfigurationStatus?: \"invalid\" | \"absent\" | \"configured\" | undefined; expectedAccountDeletionFingerprint?: string | undefined; expectedRestoreDeletedCredentialsOnSignup?: boolean | null | undefined; expectedAppUpdatedAt?: string | undefined; }",
            "source": "apps/api-core/src/controllers/agent.controller.ts"
          },
          {
            "type": "{ provider: \"apple_app_store_connect\"; category: \"catalog\"; resource: \"app_store_pricing_plan\"; operation: \"apply\"; providerPlanId: string; digest: string; } | { provider: \"google\"; category: \"auth\"; publicConfig: { clientId: string; }; enabled?: boolean | undefined; } | { provider: \"apple\"; category: \"auth\"; publicConfig: { clientId: string; teamId?: string | undefined; keyId?: string | undefined; }; enabled?: boolean | undefined; } | { provider: \"apple_ads\"; category: \"acquisition\"; resource: \"workspace_provider_connection\"; operation: \"validate\"; connectionId: string; } | { provider: \"apple_ads\"; category: \"acquisition\"; resource: \"workspace_provider_connection\"; operation: \"map_app\"; connectionId: string; accountExternalId: string; externalAppId: string; settings: { [x: string]: unknown; acquisition?: { roasTargetBps?: number | undefined; roasWindowDays?: number | undefined; paybackTargetDays?: number | undefined; minimumAttributedAcquisitionOpens?: number | undefined; minimumFirstTimePayers?: number | undefined; scaleThresholdBps?: number | undefined; reduceThresholdBps?: number | undefined; } | undefined; appleAds?: { basicPromotionIds?: string[] | undefined; } | undefined; }; externalAppName?: string | undefined; } | { provider: \"apple_ads\"; category: \"acquisition\"; resource: \"workspace_provider_connection\"; operation: \"backfill_attribution\"; connectionId: string; limit?: number | undefined; } | { provider: \"apple_ads\"; category: \"acquisition\"; resource: \"workspace_provider_connection\"; operation: \"reconcile\"; connectionId: string; fromDate?: string | undefined; } | { provider: \"apple_ads\"; category: \"acquisition\"; resource: \"workspace_provider_connection\"; operation: \"sync\"; connectionId: string; kind: \"incremental\" | \"backfill\"; asOfDate?: string | undefined; } | { provider: \"apple_ads\"; category: \"acquisition\"; resource: \"workspace_provider_connection\"; operation: \"cancel_sync\"; connectionId: string; operationId: string; } | { provider: \"apns\"; category: \"messaging\"; publicConfig: { bundleId: string; environment: \"production\" | \"development\"; environments?: (\"production\" | \"development\")[] | undefined; keyId?: string | undefined; teamId?: string | undefined; }; enabled?: boolean | undefined; } | { provider: \"stripe\"; category: \"payments\"; enabled?: boolean | undefined; publicConfig?: { publishableKey?: string | undefined; } | undefined; } | { provider: \"apple_app_store_connect\"; category: \"catalog\"; resource: \"product_offer_operation\"; operation: \"apply\"; providerPreviewId: string; digest: string; }",
            "source": "apps/api-core/src/controllers/agent.controller.ts"
          },
          {
            "type": "{ previewId: string; digest: string; }",
            "source": "apps/api-core/src/controllers/agent.controller.ts"
          },
          {
            "type": "{ stripeSecretKey: string; stripeWebhookSecret?: string | undefined; }",
            "source": "apps/api-core/src/controllers/agent.controller.ts"
          },
          {
            "type": "{ keyId: string; teamId: string; apnsPrivateKey: string; }",
            "source": "apps/api-core/src/controllers/agent.controller.ts"
          },
          {
            "type": "{ operation: \"update\"; resource: \"product_offer\"; id: string; values: { paused: boolean; }; } | { operation: \"update\"; resource: \"product_price\"; id?: string | undefined; productIdentifier?: string | undefined; provider?: \"stripe\" | \"apple_app_store\" | \"google_play\" | \"microsoft_store\" | undefined; values?: { active?: boolean | undefined; providerProductId?: string | undefined; providerPriceId?: string | null | undefined; currency?: string | null | undefined; unitAmount?: number | null | undefined; billingPeriod?: \"month\" | \"year\" | null | undefined; trialConfig?: Record<string, unknown> | undefined; familySharingEnabled?: boolean | undefined; isDefault?: boolean | undefined; priority?: number | undefined; } | undefined; } | { operation: \"update\" | \"delete\" | \"create\"; resource: \"product\"; id?: string | undefined; identifier?: string | undefined; values?: { identifier?: string | undefined; name?: string | undefined; description?: string | null | undefined; pricingType?: \"subscription\" | \"non_consumable\" | \"consumable\" | \"free\" | undefined; pricingPeriod?: \"month\" | \"year\" | null | undefined; variants?: { provider: \"stripe\" | \"apple_app_store\" | \"google_play\" | \"microsoft_store\"; providerProductId: string; trialConfig?: Record<string, unknown> | undefined; familySharingEnabled?: boolean | undefined; }[] | undefined; entitlementIdentifiers?: string[] | undefined; } | undefined; } | { operation: \"create\"; resource: \"product_price\"; values: { productId: string; provider: \"stripe\" | \"apple_app_store\" | \"google_play\" | \"microsoft_store\"; providerProductId: string; platform?: \"ios\" | \"android\" | \"web\" | \"windows\" | \"macos\" | null | undefined; providerPriceId?: string | null | undefined; currency?: string | null | undefined; unitAmount?: number | null | undefined; billingPeriod?: \"month\" | \"year\" | null | undefined; trialConfig?: { version: \"1.0\"; enabled: false; } | { version: \"1.0\"; enabled: true; trialPeriodDays: number; } | { version: \"1.0\"; enabled: true; appleSubscriptionGroupId: string; } | undefined; familySharingEnabled?: boolean | undefined; active?: boolean | undefined; isDefault?: boolean | undefined; priority?: number | undefined; }; }",
            "source": "apps/api-core/src/controllers/agent.controller.ts"
          },
          {
            "type": "{ operation: \"update\" | \"delete\" | \"create\"; resource?: \"paywall\" | undefined; id?: string | undefined; identifier?: string | undefined; values?: { identifier?: string | undefined; name?: string | undefined; description?: string | null | undefined; config?: unknown; status?: \"active\" | \"inactive\" | \"archived\" | undefined; isDefault?: boolean | undefined; productIdentifiers?: string[] | undefined; } | undefined; } | { operation: \"update\"; resource: \"placement_fallback\"; placementIdentifier: string; fallbackPaywallIdentifier: string; } | { operation: \"upsert\"; resource: \"placement\"; identifier: string; name: string; fallbackPaywallIdentifier: string; description?: string | null | undefined; }",
            "source": "apps/api-core/src/controllers/agent.controller.ts"
          },
          {
            "type": "{ operation: \"update\" | \"delete\" | \"create\"; id?: string | undefined; expectedUpdatedAt?: string | undefined; values?: { identifier?: string | null | undefined; name?: string | undefined; subject?: string | null | undefined; channel?: \"email\" | undefined; category?: \"transactional\" | \"lifecycle\" | \"marketing\" | \"system\" | undefined; locale?: string | undefined; enabled?: boolean | undefined; contentType?: \"push\" | \"mjml\" | \"html\" | \"text\" | undefined; contentSource?: string | undefined; contentHtml?: string | undefined; variables?: unknown; } | undefined; }",
            "source": "apps/api-core/src/controllers/agent.controller.ts"
          },
          {
            "type": "{ operation: \"update\" | \"delete\" | \"create\"; id?: string | undefined; identifier?: string | undefined; values?: { identifier?: string | undefined; name?: string | undefined; description?: string | null | undefined; priority?: number | undefined; status?: \"active\" | \"inactive\" | \"archived\" | undefined; isActive?: boolean | undefined; placements?: string[] | undefined; audiences?: { identifier: string; name: string; id?: string | undefined; description?: string | null | undefined; sortOrder?: number | undefined; enabled?: boolean | undefined; audienceRule?: Record<string, unknown> | null | undefined; cooldownSeconds?: number | undefined; maxMatchesPerCustomer?: number | null | undefined; maxMatchesPerWindow?: number | null | undefined; windowSeconds?: number | null | undefined; variants?: { identifier: string; name: string; id?: string | undefined; targetType?: \"paywall\" | \"in_app_surface\" | \"survey\" | \"custom\" | \"none\" | undefined; surveyId?: string | undefined; paywallId?: string | undefined; paywallIdentifier?: string | undefined; inAppSurfaceId?: string | undefined; inAppSurfaceIdentifier?: string | undefined; trafficPercent?: number | undefined; allocationPercent?: number | undefined; isControl?: boolean | undefined; payload?: Record<string, unknown> | null | undefined; }[] | undefined; }[] | undefined; variants?: { identifier: string; name: string; id?: string | undefined; targetType?: \"paywall\" | \"in_app_surface\" | \"survey\" | \"custom\" | \"none\" | undefined; surveyId?: string | undefined; paywallId?: string | undefined; paywallIdentifier?: string | undefined; inAppSurfaceId?: string | undefined; inAppSurfaceIdentifier?: string | undefined; trafficPercent?: number | undefined; allocationPercent?: number | undefined; isControl?: boolean | undefined; payload?: Record<string, unknown> | null | undefined; }[] | undefined; } | undefined; }",
            "source": "apps/api-core/src/controllers/agent.controller.ts"
          },
          {
            "type": "{ operation: \"update\" | \"delete\" | \"upsert\"; key: string; value?: string | undefined; description?: string | null | undefined; }",
            "source": "apps/api-core/src/controllers/agent.controller.ts"
          },
          {
            "type": "{ operation: \"update\" | \"delete\" | \"create\"; id?: string | undefined; identifier?: string | undefined; values?: { identifier?: string | undefined; name?: string | undefined; description?: string | null | undefined; surfaceType?: string | undefined; status?: \"active\" | \"inactive\" | \"archived\" | undefined; enabled?: boolean | undefined; config?: unknown; } | undefined; }",
            "source": "apps/api-core/src/controllers/agent.controller.ts"
          },
          {
            "type": "{ operation: \"update\" | \"delete\" | \"create\"; id?: string | undefined; identifier?: string | undefined; values?: { name?: string | undefined; identifier?: string | undefined; enabled?: boolean | undefined; eventTypes?: string[] | null | undefined; trigger?: \"event\" | \"sdk_call\" | undefined; rule?: Record<string, unknown> | undefined; actionConfig?: Record<string, unknown> | null | undefined; webhookConfig?: { url: string; method?: \"POST\" | \"PUT\" | \"PATCH\" | undefined; headers?: Record<string, string> | undefined; } | null | undefined; } | undefined; }",
            "source": "apps/api-core/src/controllers/agent.controller.ts"
          },
          {
            "type": "{ operation: \"update\" | \"delete\" | \"create\"; id?: string | undefined; identifier?: string | undefined; values?: { identifier?: string | undefined; name?: string | undefined; type?: \"action\" | \"webhook\" | \"check\" | undefined; trigger?: \"event\" | \"sdk_call\" | undefined; rule?: Record<string, unknown> | undefined; eventTypes?: string[] | null | undefined; actionConfig?: Record<string, unknown> | null | undefined; webhookConfig?: { url: string; method?: \"POST\" | \"PUT\" | \"PATCH\" | undefined; headers?: Record<string, string> | undefined; } | null | undefined; enabled?: boolean | undefined; } | undefined; }",
            "source": "apps/api-core/src/controllers/agent.controller.ts"
          },
          {
            "type": "{ provider: \"apple\"; eventIds: string[]; }",
            "source": "apps/api-core/src/controllers/agent.controller.ts"
          },
          {
            "type": "{ providerTransactionId: string; billingTransactionId: string; subscriptionId: string; customerId: string; canonicalEventId: string; expectedPurchasedAt: string; expectedPeriodEnd: string; duplicateEventIds?: string[] | undefined; }",
            "source": "apps/api-core/src/controllers/agent.controller.ts"
          },
          {
            "type": "{ entitlementId: string; startsAt: any; endsAt: any; customerId: string; expectedPolicy: \"account\" | \"app_store\"; source: \"manual\"; applePurchaserLinkId?: string | undefined; note?: string | undefined; }",
            "source": "apps/api-core/src/controllers/agent.controller.ts"
          },
          {
            "type": "{ customerId: string; grantId: string; entitlementIdentifier: string; sourceBillingTransactionId: string | null; expectedRevokedAt: null; }",
            "source": "apps/api-core/src/controllers/agent.controller.ts"
          },
          {
            "type": "{ authUserId: string; normalizedEmail: string; expectedUpdatedAt: string; expectedProviders: { providerId: string; accountCount: number; hasPassword: boolean; passwordUpdatedAt: string | null; }[]; expectedCustomerCount: 0; expectedWorkspaceCustomerCount: 0; expectedSessionCount: number; expectedActiveSessionCount: 0; expectedChallengeCount: number; expectedActiveChallengeCount: 0; }",
            "source": "apps/api-core/src/controllers/agent.controller.ts"
          }
        ]
      },
      "response": {
        "fields": [],
        "evidence": "uncertain: response is variable/service result or no direct literal c.json object",
        "types": [
          "{ plan: { appId: string | null; environment: \"test\" | \"live\" | null; platformUserId: string; workspaceId: string; agentAccessTokenId: string; action: string; id: string; createdAt: Date; updatedAt: Date; request: Record<string, unknown>; expiresAt: Date; appliedAt: Date | null; plan: Record<string, unknown>; }; result: Record<string, unknown>; requiredScope: \"workspace:read\" | \"workspace:write\" | \"apps:read\" | \"apps:write\" | \"reports:read\" | \"catalog:read\" | \"catalog:write\" | \"paywalls:read\" | \"paywalls:write\" | \"messaging:read\" | \"messaging:write\" | \"campaigns:read\" | \"campaigns:write\" | \"remote_config:read\" | \"remote_config:write\" | \"surfaces:read\" | \"surfaces:write\" | \"surveys:read\" | \"surveys:write\" | \"rules:read\" | \"rules:write\" | \"webhooks:read\" | \"webhooks:write\" | \"integrations:read\" | \"integrations:write\" | \"auth:read\" | \"auth:write\" | \"audit:read\"; }"
        ]
      },
      "notes": "all endpoint routes require agent token",
      "controllerSignature": "export async function handleApplyAgentActionPlan(c: Context<"
    },
    {
      "method": "GET",
      "path": "/agent/action-plans/:planId",
      "auth": "Bearer One Agent token via agentAuthMiddleware",
      "controller": "handleGetAgentActionPlan",
      "routeSource": "apps/api-core/src/routes/agent.ts",
      "controllerSource": "apps/api-core/src/controllers/dashboard/agent.controller.ts",
      "request": {
        "schemas": [],
        "evidence": "uncertain: no direct named schema call in handler body",
        "fields": [
          "path.planId"
        ],
        "fieldEvidence": "direct controller destructuring/query/path read",
        "schemaFields": {},
        "types": []
      },
      "response": {
        "fields": [],
        "evidence": "uncertain: response is variable/service result or no direct literal c.json object",
        "types": [
          "{ plan: { appId: string | null; environment: \"test\" | \"live\" | null; platformUserId: string; workspaceId: string; agentAccessTokenId: string; action: string; id: string; createdAt: Date; updatedAt: Date; request: Record<string, unknown>; expiresAt: Date; appliedAt: Date | null; plan: Record<string, unknown>; }; }"
        ]
      },
      "notes": "all endpoint routes require agent token",
      "controllerSignature": "export async function handleGetAgentActionPlan(c: Context<"
    },
    {
      "method": "GET",
      "path": "/agent/apps/:appId/usage/definitions",
      "auth": "Bearer One Agent token via agentAuthMiddleware",
      "controller": "handleGetAgentUsageDefinitions",
      "routeSource": "apps/api-core/src/routes/agent.ts",
      "controllerSource": "apps/api-core/src/controllers/agent-usage.controller.ts",
      "request": {
        "schemas": [],
        "evidence": "uncertain: no direct named schema call in handler body",
        "fields": [
          "path.appId"
        ],
        "fieldEvidence": "direct controller destructuring/query/path read",
        "schemaFields": {},
        "types": [
          {
            "type": "{ appId: string; }",
            "source": "apps/api-core/src/controllers/agent-usage.controller.ts"
          }
        ]
      },
      "response": {
        "fields": [],
        "evidence": "uncertain: response is variable/service result or no direct literal c.json object",
        "types": [
          "{ categories: { key: string; allowedValues: string[] | null; }[]; entitlements: { id: string; name: string; }[]; app: { id: string; name: string; environment: import(\"/Users/hm/Projects/One/packages/sdk-shared/dist/index\").IdEnvironment; }; metrics: { key: string; revision: number; label: string; unit: \"duration\" | \"count\" | \"bytes\" | \"credits\"; scale: number; allowedSources: (\"server\" | \"client\")[]; dimensionKeys: string[]; entitlementId: string | null; isActive: boolean; }[]; }"
        ]
      },
      "notes": "all endpoint routes require agent token",
      "controllerSignature": "export async function handleGetAgentUsageDefinitions(c: AgentContext)"
    },
    {
      "method": "GET",
      "path": "/agent/apps/:appId/refunds/requests",
      "auth": "Bearer One Agent token via agentAuthMiddleware",
      "controller": "handleGetAgentRefundRequests",
      "routeSource": "apps/api-core/src/routes/agent.ts",
      "controllerSource": "apps/api-core/src/controllers/agent-usage.controller.ts",
      "request": {
        "schemas": [],
        "evidence": "uncertain: no direct named schema call in handler body",
        "fields": [
          "path.appId"
        ],
        "fieldEvidence": "direct controller destructuring/query/path read",
        "schemaFields": {},
        "types": [
          {
            "type": "{ appId: string; transactionId?: string | undefined; cursor?: string | undefined; }",
            "source": "apps/api-core/src/controllers/agent-usage.controller.ts"
          },
          {
            "type": "{ version: number; mode: \"disabled\" | \"preview\"; disclosureVersion: string; effectiveAt: string; consentProcessEvidence: string; eligibleCustomerCreatedAfter: string | null; rules: { id: string; metric: { key: string; definitionRevision: number; }; minimumScaledValue: string; deliveryStatus: \"DELIVERED\" | \"UNDELIVERED_QUALITY_ISSUE\" | \"UNDELIVERED_WRONG_ITEM\" | \"UNDELIVERED_SERVER_OUTAGE\" | \"UNDELIVERED_OTHER\"; deliveryEvidence: string; sampleContentProvided: boolean; sampleEvidence: string; refundPreference: \"GRANT_FULL\" | \"DECLINE\"; }[]; }",
            "source": "apps/api-core/src/services/payments/apple-refund-preview.service.ts"
          }
        ]
      },
      "response": {
        "fields": [],
        "evidence": "uncertain: response is variable/service result or no direct literal c.json object",
        "types": [
          "{ requests: { id: string; transactionId: string | null; customerId: string | null; deadlineAt: Date; receivedAt: Date; status: \"failed\" | \"sent\" | \"pending\" | \"skipped_no_consent_or_disabled\"; snapshot: Record<string, unknown> | null; }[]; nextCursor: string | null; sendingEnabled: boolean; policy: { version: number; mode: \"disabled\" | \"preview\"; disclosureVersion: string; effectiveAt: string; consentProcessEvidence: string; eligibleCustomerCreatedAfter: string | null; rules: { id: string; metric: { key: string; definitionRevision: number; }; minimumScaledValue: string; deliveryStatus: \"DELIVERED\" | \"UNDELIVERED_QUALITY_ISSUE\" | \"UNDELIVERED_WRONG_ITEM\" | \"UNDELIVERED_SERVER_OUTAGE\" | \"UNDELIVERED_OTHER\"; deliveryEvidence: string; sampleContentProvided: boolean; sampleEvidence: string; refundPreference: \"GRANT_FULL\" | \"DECLINE\"; }[]; } | null; app: { id: string; name: string; environment: import(\"/Users/hm/Projects/One/packages/sdk-shared/dist/index\").IdEnvironment; }; }"
        ]
      },
      "notes": "all endpoint routes require agent token",
      "controllerSignature": "export async function handleGetAgentRefundRequests(c: AgentContext)"
    },
    {
      "method": "POST",
      "path": "/agent/admin/query",
      "auth": "Bearer One Agent token via agentAuthMiddleware",
      "controller": "handleQueryAgentAdminConfiguration",
      "routeSource": "apps/api-core/src/routes/agent.ts",
      "controllerSource": "apps/api-core/src/controllers/agent-admin.controller.ts",
      "request": {
        "schemas": [
          "agentAdminQuerySchema"
        ],
        "evidence": "direct controller validation call",
        "fields": [],
        "fieldEvidence": "no direct field extraction; inspect named schema or delegated payload helper",
        "schemaFields": {
          "agentAdminQuerySchema": {
            "fields": [
              "resource",
              "appId",
              "id",
              "connectionId",
              "limit"
            ],
            "source": "packages/sdk-shared/src/validation/index.ts",
            "evidence": "schema object property keys parsed from source"
          }
        },
        "types": [
          {
            "type": "{ resource: \"projects\" | \"entitlements\" | \"api_keys\" | \"support_labels\" | \"notification_senders\" | \"webhook_destinations\" | \"webhook_deliveries\" | \"notification_templates\" | \"notification_triggers\" | \"workspace\" | \"members\" | \"app_settings\" | \"auth_settings\" | \"support_settings\" | \"agent_tokens\" | \"provider_connections\" | \"provider_accounts\" | \"provider_mappings\" | \"support_thread_state\" | \"email_integration\"; appId?: string | undefined; id?: string | undefined; connectionId?: string | undefined; limit?: number | undefined; }",
            "source": "apps/api-core/src/controllers/agent-admin.controller.ts"
          }
        ]
      },
      "response": {
        "fields": [],
        "evidence": "uncertain: delegated controller payload",
        "types": [
          "{ records: unknown[]; hasMore: boolean; }"
        ]
      },
      "notes": "all /agent routes require agentAuthMiddleware",
      "controllerSignature": "export async function handleQueryAgentAdminConfiguration(c: AgentContext)"
    },
    {
      "method": "GET",
      "path": "/agent/admin/contract",
      "auth": "Bearer One Agent token via agentAuthMiddleware",
      "controller": "handleGetAgentAdminContract",
      "routeSource": "apps/api-core/src/routes/agent.ts",
      "controllerSource": "apps/api-core/src/controllers/agent-admin.controller.ts",
      "request": {
        "schemas": [],
        "evidence": "route/controller inspection",
        "fields": [
          "action"
        ],
        "fieldEvidence": "direct controller destructuring/query/path read",
        "schemaFields": {},
        "types": []
      },
      "response": {
        "fields": [],
        "evidence": "uncertain: delegated controller payload",
        "types": [
          "{ actions: string[]; resources: readonly [\"app_settings\", \"auth_settings\", \"support_settings\", \"entitlements\", \"notification_templates\", \"notification_triggers\", \"notification_senders\", \"webhook_destinations\", \"webhook_deliveries\", \"workspace\", \"projects\", \"members\", \"api_keys\", \"agent_tokens\", \"provider_connections\", \"provider_accounts\", \"provider_mappings\", \"support_labels\", \"support_thread_state\", \"email_integration\"]; snapshotActions: readonly [\"apps.configure\", \"apps.configure_auth\", \"apps.configure_support\", \"catalog.manage_entitlement\", \"messaging.manage_template\", \"messaging.manage_trigger\", \"messaging.bind_template_trigger\", \"webhooks.manage_destination\", \"webhooks.test_destination\", \"webhooks.retry_delivery\", \"workspace.update_settings\", \"workspace.update_project\", \"workspace.update_member_role\", \"integrations.validate_connection\", \"integrations.update_connection\", \"integrations.update_mapping\", \"integrations.configure_email\", \"messaging.manage_support_label\", \"messaging.set_support_status\", \"messaging.set_support_read_state\", \"messaging.set_support_labels\"]; rules: string[]; action?: undefined; requestSchema?: undefined; validation?: undefined; } | { action: string; requestSchema: z.core.ZodStandardJSONSchemaPayload<z.ZodObject<{ name: z.ZodOptional<z.ZodString>; appearance: z.ZodOptional<z.ZodType<import(\"/Users/hm/Projects/One/packages/sdk-shared/dist/index\").AppAppearance, unknown, z.core.$ZodTypeInternals<import(\"/Users/hm/Projects/One/packages/sdk-shared/dist/index\").AppAppearance, unknown>>>; bundleId: z.ZodOptional<z.ZodNullable<z.ZodString>>; webOrigin: z.ZodOptional<z.ZodNullable<z.ZodURL>>; }, z.core.$strict> | z.ZodObject<{ emailPasswordEnabled: z.ZodOptional<z.ZodBoolean>; magicLinkEnabled: z.ZodOptional<z.ZodBoolean>; redirectUrls: z.ZodOptional<z.ZodArray<z.ZodURL>>; sessionMode: z.ZodOptional<z.ZodEnum<{ persistent: \"persistent\"; rolling: \"rolling\"; absolute: \"absolute\"; }>>; sessionInactivityDays: z.ZodOptional<z.ZodNullable<z.ZodNumber>>; sessionAbsoluteDays: z.ZodOptional<z.ZodNullable<z.ZodNumber>>; recentAuthenticationWindowSeconds: z.ZodOptional<z.ZodNullable<z.ZodNumber>>; passwordMaxAgeDays: z.ZodOptional<z.ZodNullable<z.ZodNumber>>; accountDeletion: z.ZodOptional<z.ZodObject<{ mode: z.ZodEnum<{ delete_customer: \"delete_customer\"; delete_credential: \"delete_credential\"; }>; requireCurrentPassword: z.ZodBoolean; scrubCustomerProfile: z.ZodBoolean; detachCustomerAuthUser: z.ZodBoolean; detachWorkspaceCustomer: z.ZodBoolean; deleteCustomerAuthUserWhenUnused: z.ZodBoolean; credentialProviderIds: z.ZodArray<z.ZodString>; }, z.core.$strict>>; restoreDeletedCredentialsOnSignup: z.ZodOptional<z.ZodBoolean>; emailChangeMode: z.ZodOptional<z.ZodEnum<{ verification_link: \"verification_link\"; password_confirmed: \"password_confirmed\"; }>>; }, z.core.$strict> | z.ZodObject<{ contactMode: z.ZodEnum<{ optional_email: \"optional_email\"; required_email: \"required_email\"; authenticated_account: \"authenticated_account\"; }>; emailVerificationMode: z.ZodEnum<{ none: \"none\"; optional: \"optional\"; required: \"required\"; }>; }, z.core.$strict> | z.ZodDiscriminatedUnion<[z.ZodObject<{ operation: z.ZodLiteral<\"create\">; values: z.ZodObject<{ identifier: z.ZodString; name: z.ZodString; description: z.ZodNullable<z.ZodOptional<z.ZodString>>; }, z.core.$strict>; }, z.core.$strict>, z.ZodObject<{ operation: z.ZodLiteral<\"update\">; id: z.ZodString; values: z.ZodObject<{ name: z.ZodOptional<z.ZodString>; description: z.ZodNullable<z.ZodOptional<z.ZodString>>; }, z.core.$strict>; }, z.core.$strict>], \"operation\"> | z.ZodDiscriminatedUnion<[z.ZodObject<{ operation: z.ZodLiteral<\"create\">; values: z.ZodObject<{ title: z.ZodNullable<z.ZodOptional<z.ZodString>>; identifier: z.ZodString; name: z.ZodString; enabled: z.ZodDefault<z.ZodBoolean>; contentType: z.ZodDefault<z.ZodEnum<{ text: \"text\"; push: \"push\"; mjml: \"mjml\"; html: \"html\"; }>>; category: z.ZodDefault<z.ZodEnum<{ system: \"system\"; transactional: \"transactional\"; lifecycle: \"lifecycle\"; marketing: \"marketing\"; }>>; subject: z.ZodNullable<z.ZodOptional<z.ZodString>>; variables: z.ZodNullable<z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnknown>]>>>; channel: z.ZodDefault<z.ZodEnum<{ email: \"email\"; push: \"push\"; }>>; locale: z.ZodDefault<z.ZodString>; bodyText: z.ZodNullable<z.ZodOptional<z.ZodString>>; contentSource: z.ZodNullable<z.ZodOptional<z.ZodString>>; contentHtml: z.ZodOptional<z.ZodString>; dataPayload: z.ZodNullable<z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnknown>]>>>; }, z.core.$strict>; }, z.core.$strict>, z.ZodObject<{ operation: z.ZodLiteral<\"update\">; id: z.ZodString; values: z.ZodObject<{ title: z.ZodNullable<z.ZodOptional<z.ZodString>>; name: z.ZodOptional<z.ZodString>; enabled: z.ZodOptional<z.ZodBoolean>; contentType: z.ZodOptional<z.ZodEnum<{ text: \"text\"; push: \"push\"; mjml: \"mjml\"; html: \"html\"; }>>; category: z.ZodOptional<z.ZodEnum<{ system: \"system\"; transactional: \"transactional\"; lifecycle: \"lifecycle\"; marketing: \"marketing\"; }>>; subject: z.ZodNullable<z.ZodOptional<z.ZodString>>; variables: z.ZodNullable<z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnknown>]>>>; locale: z.ZodOptional<z.ZodString>; bodyText: z.ZodNullable<z.ZodOptional<z.ZodString>>; contentSource: z.ZodNullable<z.ZodOptional<z.ZodString>>; contentHtml: z.ZodOptional<z.ZodString>; dataPayload: z.ZodNullable<z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnknown>]>>>; }, z.core.$strict>; }, z.core.$strict>], \"operation\"> | z.ZodDiscriminatedUnion<[z.ZodObject<{ operation: z.ZodLiteral<\"create\">; values: z.ZodObject<{ identifier: z.ZodString; name: z.ZodString; source: z.ZodDefault<z.ZodEnum<{ billing: \"billing\"; manual: \"manual\"; auth: \"auth\"; api: \"api\"; event: \"event\"; }>>; eventType: z.ZodNullable<z.ZodOptional<z.ZodString>>; enabled: z.ZodDefault<z.ZodBoolean>; delaySeconds: z.ZodDefault<z.ZodNumber>; cooldownSeconds: z.ZodDefault<z.ZodNumber>; }, z.core.$strict>; }, z.core.$strict>, z.ZodObject<{ operation: z.ZodLiteral<\"update\">; id: z.ZodString; values: z.ZodObject<{ identifier: z.ZodOptional<z.ZodString>; name: z.ZodOptional<z.ZodString>; source: z.ZodOptional<z.ZodEnum<{ billing: \"billing\"; manual: \"manual\"; auth: \"auth\"; api: \"api\"; event: \"event\"; }>>; eventType: z.ZodNullable<z.ZodOptional<z.ZodString>>; enabled: z.ZodOptional<z.ZodBoolean>; delaySeconds: z.ZodOptional<z.ZodNumber>; cooldownSeconds: z.ZodOptional<z.ZodNumber>; }, z.core.$strict>; }, z.core.$strict>], \"operation\"> | z.ZodObject<{ id: z.ZodString; triggerId: z.ZodNullable<z.ZodString>; }, z.core.$strict> | z.ZodDiscriminatedUnion<[z.ZodObject<{ operation: z.ZodLiteral<\"create\">; values: z.ZodObject<{ name: z.ZodString; url: z.ZodURL; enabled: z.ZodOptional<z.ZodBoolean>; eventTypes: z.ZodOptional<z.ZodArray<z.ZodEnum<{ session_start: \"session_start\"; session_end: \"session_end\"; deep_link_open: \"deep_link_open\"; app_activity: \"app_activity\"; milestone_recorded: \"milestone_recorded\"; onboarding_step_viewed: \"onboarding_step_viewed\"; paywall_requested: \"paywall_requested\"; paywall_shown: \"paywall_shown\"; paywall_closed: \"paywall_closed\"; paywall_product_selected: \"paywall_product_selected\"; paywall_screen_changed: \"paywall_screen_changed\"; product_offer_redemption_updated: \"product_offer_redemption_updated\"; paywall_checkout_requested: \"paywall_checkout_requested\"; checkout_started: \"checkout_started\"; purchase_started: \"purchase_started\"; purchase_already_entitled: \"purchase_already_entitled\"; purchase_cancelled: \"purchase_cancelled\"; purchase_pending: \"purchase_pending\"; purchase_failed: \"purchase_failed\"; purchase_sync_failed: \"purchase_sync_failed\"; purchase_succeeded: \"purchase_succeeded\"; restore_started: \"restore_started\"; restore_succeeded: \"restore_succeeded\"; restore_failed: \"restore_failed\"; sdk_access_observed: \"sdk_access_observed\"; restore_operation_updated: \"restore_operation_updated\"; apple_order_recovery_succeeded: \"apple_order_recovery_succeeded\"; apple_access_observed: \"apple_access_observed\"; billing_operation_failed: \"billing_operation_failed\"; surface_impression: \"surface_impression\"; subscription_started: \"subscription_started\"; subscription_trial_started: \"subscription_trial_started\"; subscription_trial_converted: \"subscription_trial_converted\"; purchase_verified: \"purchase_verified\"; purchase_refunded: \"purchase_refunded\"; purchase_refund_reversed: \"purchase_refund_reversed\"; purchase_refund_declined: \"purchase_refund_declined\"; subscription_renewed: \"subscription_renewed\"; subscription_renewal_extended: \"subscription_renewal_extended\"; subscription_renewal_preference_changed: \"subscription_renewal_preference_changed\"; subscription_renewal_failed: \"subscription_renewal_failed\"; subscription_expired: \"subscription_expired\"; subscription_cancelled: \"subscription_cancelled\"; subscription_cancellation_scheduled: \"subscription_cancellation_scheduled\"; subscription_reactivated: \"subscription_reactivated\"; subscription_paused: \"subscription_paused\"; subscription_resumed: \"subscription_resumed\"; purchase_revoked: \"purchase_revoked\"; price_change_detected: \"price_change_detected\"; grace_period_started: \"grace_period_started\"; grace_period_ended: \"grace_period_ended\"; purchase_refund_requested: \"purchase_refund_requested\"; offer_redeemed: \"offer_redeemed\"; entitlement_granted: \"entitlement_granted\"; entitlement_revoked: \"entitlement_revoked\"; notification_sent: \"notification_sent\"; notification_opened: \"notification_opened\"; webhook_delivered: \"webhook_delivered\"; webhook_failed: \"webhook_failed\"; email_changed: \"email_changed\"; password_changed: \"password_changed\"; signup: \"signup\"; signin: \"signin\"; signout: \"signout\"; account_deleted: \"account_deleted\"; customer_note_added: \"customer_note_added\"; app_crash_reported: \"app_crash_reported\"; app_error_reported: \"app_error_reported\"; identity_attached: \"identity_attached\"; customer_first_seen: \"customer_first_seen\"; }>>>; }, z.core.$strict>; }, z.core.$strict>, z.ZodObject<{ operation: z.ZodLiteral<\"update\">; id: z.ZodString; values: z.ZodObject<{ name: z.ZodOptional<z.ZodString>; url: z.ZodOptional<z.ZodURL>; enabled: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>; eventTypes: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodEnum<{ session_start: \"session_start\"; session_end: \"session_end\"; deep_link_open: \"deep_link_open\"; app_activity: \"app_activity\"; milestone_recorded: \"milestone_recorded\"; onboarding_step_viewed: \"onboarding_step_viewed\"; paywall_requested: \"paywall_requested\"; paywall_shown: \"paywall_shown\"; paywall_closed: \"paywall_closed\"; paywall_product_selected: \"paywall_product_selected\"; paywall_screen_changed: \"paywall_screen_changed\"; product_offer_redemption_updated: \"product_offer_redemption_updated\"; paywall_checkout_requested: \"paywall_checkout_requested\"; checkout_started: \"checkout_started\"; purchase_started: \"purchase_started\"; purchase_already_entitled: \"purchase_already_entitled\"; purchase_cancelled: \"purchase_cancelled\"; purchase_pending: \"purchase_pending\"; purchase_failed: \"purchase_failed\"; purchase_sync_failed: \"purchase_sync_failed\"; purchase_succeeded: \"purchase_succeeded\"; restore_started: \"restore_started\"; restore_succeeded: \"restore_succeeded\"; restore_failed: \"restore_failed\"; sdk_access_observed: \"sdk_access_observed\"; restore_operation_updated: \"restore_operation_updated\"; apple_order_recovery_succeeded: \"apple_order_recovery_succeeded\"; apple_access_observed: \"apple_access_observed\"; billing_operation_failed: \"billing_operation_failed\"; surface_impression: \"surface_impression\"; subscription_started: \"subscription_started\"; subscription_trial_started: \"subscription_trial_started\"; subscription_trial_converted: \"subscription_trial_converted\"; purchase_verified: \"purchase_verified\"; purchase_refunded: \"purchase_refunded\"; purchase_refund_reversed: \"purchase_refund_reversed\"; purchase_refund_declined: \"purchase_refund_declined\"; subscription_renewed: \"subscription_renewed\"; subscription_renewal_extended: \"subscription_renewal_extended\"; subscription_renewal_preference_changed: \"subscription_renewal_preference_changed\"; subscription_renewal_failed: \"subscription_renewal_failed\"; subscription_expired: \"subscription_expired\"; subscription_cancelled: \"subscription_cancelled\"; subscription_cancellation_scheduled: \"subscription_cancellation_scheduled\"; subscription_reactivated: \"subscription_reactivated\"; subscription_paused: \"subscription_paused\"; subscription_resumed: \"subscription_resumed\"; purchase_revoked: \"purchase_revoked\"; price_change_detected: \"price_change_detected\"; grace_period_started: \"grace_period_started\"; grace_period_ended: \"grace_period_ended\"; purchase_refund_requested: \"purchase_refund_requested\"; offer_redeemed: \"offer_redeemed\"; entitlement_granted: \"entitlement_granted\"; entitlement_revoked: \"entitlement_revoked\"; notification_sent: \"notification_sent\"; notification_opened: \"notification_opened\"; webhook_delivered: \"webhook_delivered\"; webhook_failed: \"webhook_failed\"; email_changed: \"email_changed\"; password_changed: \"password_changed\"; signup: \"signup\"; signin: \"signin\"; signout: \"signout\"; account_deleted: \"account_deleted\"; customer_note_added: \"customer_note_added\"; app_crash_reported: \"app_crash_reported\"; app_error_reported: \"app_error_reported\"; identity_attached: \"identity_attached\"; customer_first_seen: \"customer_first_seen\"; }>>>>; }, z.core.$strict>; }, z.core.$strict>], \"operation\"> | z.ZodObject<{ id: z.ZodString; }, z.core.$strict> | z.ZodObject<{ id: z.ZodString; }, z.core.$strict> | z.ZodObject<{ name: z.ZodOptional<z.ZodString>; slug: z.ZodOptional<z.ZodString>; }, z.core.$strict> | z.ZodObject<{ id: z.ZodString; name: z.ZodString; }, z.core.$strict> | z.ZodObject<{ id: z.ZodString; role: z.ZodEnum<{ owner: \"owner\"; admin: \"admin\"; member: \"member\"; }>; }, z.core.$strict> | z.ZodObject<{ id: z.ZodString; }, z.core.$strict> | z.ZodObject<{ id: z.ZodString; values: z.ZodObject<{ name: z.ZodOptional<z.ZodString>; status: z.ZodOptional<z.ZodEnum<{ active: \"active\"; disabled: \"disabled\"; }>>; }, z.core.$strict>; }, z.core.$strict> | z.ZodObject<{ id: z.ZodString; connectionId: z.ZodString; values: z.ZodObject<{ externalAppName: z.ZodOptional<z.ZodString>; enabled: z.ZodOptional<z.ZodBoolean>; }, z.core.$strict>; }, z.core.$strict> | z.ZodUnion<readonly [z.ZodObject<{ enabled: z.ZodBoolean; replaceCredentials: z.ZodBoolean; publicConfig: z.ZodObject<{ accountId: z.ZodString; sendingDomain: z.ZodString; fromAddress: z.ZodEmail; fromName: z.ZodOptional<z.ZodString>; replyTo: z.ZodOptional<z.ZodEmail>; }, z.core.$strict>; }, z.core.$strict>, z.ZodObject<{ enabled: z.ZodBoolean; replaceCredentials: z.ZodLiteral<false>; useExistingBinding: z.ZodLiteral<true>; publicConfig: z.ZodObject<{ fromAddress: z.ZodEmail; fromName: z.ZodOptional<z.ZodString>; replyTo: z.ZodOptional<z.ZodEmail>; }, z.core.$strict>; }, z.core.$strict>]> | z.ZodDiscriminatedUnion<[z.ZodObject<{ operation: z.ZodLiteral<\"create\">; values: z.ZodObject<{ title: z.ZodString; color: z.ZodEnum<{ slate: \"slate\"; blue: \"blue\"; green: \"green\"; amber: \"amber\"; rose: \"rose\"; violet: \"violet\"; }>; }, z.core.$strict>; }, z.core.$strict>, z.ZodObject<{ operation: z.ZodLiteral<\"update\">; id: z.ZodString; values: z.ZodObject<{ title: z.ZodString; color: z.ZodEnum<{ slate: \"slate\"; blue: \"blue\"; green: \"green\"; amber: \"amber\"; rose: \"rose\"; violet: \"violet\"; }>; }, z.core.$strict>; }, z.core.$strict>], \"operation\"> | z.ZodObject<{ id: z.ZodString; status: z.ZodEnum<{ open: \"open\"; resolved: \"resolved\"; }>; }, z.core.$strict> | z.ZodObject<{ id: z.ZodString; read: z.ZodBoolean; }, z.core.$strict> | z.ZodObject<{ id: z.ZodString; labelIds: z.ZodArray<z.ZodString>; }, z.core.$strict> | z.ZodObject<{ operation: z.ZodEnum<{ update: \"update\"; delete: \"delete\"; create: \"create\"; }>; id: z.ZodOptional<z.ZodString>; identifier: z.ZodOptional<z.ZodString>; values: z.ZodOptional<z.ZodObject<{ identifier: z.ZodOptional<z.ZodString>; name: z.ZodOptional<z.ZodString>; description: z.ZodNullable<z.ZodOptional<z.ZodString>>; priority: z.ZodOptional<z.ZodNumber>; status: z.ZodOptional<z.ZodEnum<{ active: \"active\"; inactive: \"inactive\"; archived: \"archived\"; }>>; isActive: z.ZodOptional<z.ZodBoolean>; placements: z.ZodOptional<z.ZodArray<z.ZodString>>; audiences: z.ZodOptional<z.ZodArray<z.ZodObject<{ id: z.ZodOptional<z.ZodString>; identifier: z.ZodString; name: z.ZodString; description: z.ZodNullable<z.ZodOptional<z.ZodString>>; sortOrder: z.ZodOptional<z.ZodNumber>; enabled: z.ZodOptional<z.ZodBoolean>; audienceRule: z.ZodNullable<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>>; cooldownSeconds: z.ZodOptional<z.ZodNumber>; maxMatchesPerCustomer: z.ZodNullable<z.ZodOptional<z.ZodNumber>>; maxMatchesPerWindow: z.ZodNullable<z.ZodOptional<z.ZodNumber>>; windowSeconds: z.ZodNullable<z.ZodOptional<z.ZodNumber>>; variants: z.ZodOptional<z.ZodArray<z.ZodObject<{ id: z.ZodOptional<z.ZodString>; identifier: z.ZodString; name: z.ZodString; targetType: z.ZodOptional<z.ZodEnum<{ paywall: \"paywall\"; in_app_surface: \"in_app_surface\"; survey: \"survey\"; custom: \"custom\"; none: \"none\"; }>>; surveyId: z.ZodOptional<z.ZodString>; paywallId: z.ZodOptional<z.ZodString>; paywallIdentifier: z.ZodOptional<z.ZodString>; inAppSurfaceId: z.ZodOptional<z.ZodString>; inAppSurfaceIdentifier: z.ZodOptional<z.ZodString>; trafficPercent: z.ZodOptional<z.ZodNumber>; allocationPercent: z.ZodOptional<z.ZodNumber>; isControl: z.ZodOptional<z.ZodBoolean>; payload: z.ZodNullable<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>>; }, z.core.$strip>>>; }, z.core.$strip>>>; variants: z.ZodOptional<z.ZodArray<z.ZodObject<{ id: z.ZodOptional<z.ZodString>; identifier: z.ZodString; name: z.ZodString; targetType: z.ZodOptional<z.ZodEnum<{ paywall: \"paywall\"; in_app_surface: \"in_app_surface\"; survey: \"survey\"; custom: \"custom\"; none: \"none\"; }>>; surveyId: z.ZodOptional<z.ZodString>; paywallId: z.ZodOptional<z.ZodString>; paywallIdentifier: z.ZodOptional<z.ZodString>; inAppSurfaceId: z.ZodOptional<z.ZodString>; inAppSurfaceIdentifier: z.ZodOptional<z.ZodString>; trafficPercent: z.ZodOptional<z.ZodNumber>; allocationPercent: z.ZodOptional<z.ZodNumber>; isControl: z.ZodOptional<z.ZodBoolean>; payload: z.ZodNullable<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>>; }, z.core.$strip>>>; }, z.core.$strip>>; }, z.core.$strip> | z.ZodObject<{ operation: z.ZodEnum<{ update: \"update\"; delete: \"delete\"; upsert: \"upsert\"; }>; key: z.ZodString; value: z.ZodOptional<z.ZodString>; description: z.ZodNullable<z.ZodOptional<z.ZodString>>; }, z.core.$strip> | z.ZodObject<{ operation: z.ZodEnum<{ update: \"update\"; delete: \"delete\"; create: \"create\"; }>; id: z.ZodOptional<z.ZodString>; identifier: z.ZodOptional<z.ZodString>; values: z.ZodOptional<z.ZodObject<{ identifier: z.ZodOptional<z.ZodString>; name: z.ZodOptional<z.ZodString>; type: z.ZodOptional<z.ZodEnum<{ action: \"action\"; webhook: \"webhook\"; check: \"check\"; }>>; trigger: z.ZodOptional<z.ZodEnum<{ event: \"event\"; sdk_call: \"sdk_call\"; }>>; rule: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>; eventTypes: z.ZodNullable<z.ZodOptional<z.ZodArray<z.ZodString>>>; actionConfig: z.ZodNullable<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>>; webhookConfig: z.ZodNullable<z.ZodOptional<z.ZodObject<{ url: z.ZodURL; method: z.ZodOptional<z.ZodEnum<{ POST: \"POST\"; PUT: \"PUT\"; PATCH: \"PATCH\"; }>>; headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>; }, z.core.$strip>>>; enabled: z.ZodOptional<z.ZodBoolean>; }, z.core.$strip>>; }, z.core.$strip>>; validation: string; actions?: undefined; resources?: undefined; snapshotActions?: undefined; rules?: undefined; }"
        ]
      },
      "notes": "all /agent routes require agentAuthMiddleware",
      "controllerSignature": "export async function handleGetAgentAdminContract(c: AgentContext)"
    },
    {
      "method": "POST",
      "path": "/agent/admin/plans",
      "auth": "Bearer One Agent token via agentAuthMiddleware",
      "controller": "handlePlanAgentAdminChange",
      "routeSource": "apps/api-core/src/routes/agent.ts",
      "controllerSource": "apps/api-core/src/controllers/agent-admin.controller.ts",
      "request": {
        "schemas": [
          "agentAdminPlanInputSchema"
        ],
        "evidence": "direct controller validation call",
        "fields": [],
        "fieldEvidence": "no direct field extraction; inspect named schema or delegated payload helper",
        "schemaFields": {
          "agentAdminPlanInputSchema": {
            "fields": [
              "action",
              "appId",
              "environment",
              "request",
              "expiresAt"
            ],
            "source": "packages/sdk-shared/src/validation/index.ts",
            "evidence": "schema object property keys parsed from source"
          }
        },
        "types": [
          {
            "type": "{ action: \"apps.configure\" | \"apps.configure_auth\" | \"apps.configure_support\" | \"catalog.manage_entitlement\" | \"messaging.manage_template\" | \"messaging.manage_trigger\" | \"messaging.bind_template_trigger\" | \"webhooks.manage_destination\" | \"webhooks.test_destination\" | \"webhooks.retry_delivery\" | \"workspace.update_settings\" | \"workspace.update_project\" | \"workspace.update_member_role\" | \"integrations.validate_connection\" | \"integrations.update_connection\" | \"integrations.update_mapping\" | \"integrations.configure_email\" | \"messaging.manage_support_label\" | \"messaging.set_support_status\" | \"messaging.set_support_read_state\" | \"messaging.set_support_labels\"; request: Record<string, unknown>; expiresAt: string; appId?: string | undefined; environment?: \"test\" | \"live\" | undefined; }",
            "source": "apps/api-core/src/controllers/agent-admin.controller.ts"
          },
          {
            "type": "{ operation: \"delete\"; resource?: \"product\" | undefined; id?: string | undefined; identifier?: string | undefined; key?: string | undefined; }",
            "source": "apps/api-core/src/services/agent/agent-deletion-policy.ts"
          },
          {
            "type": "{ name?: string | undefined; emailPasswordEnabled?: boolean | undefined; magicLinkEnabled?: boolean | undefined; emailChangeMode?: \"verification_link\" | \"password_confirmed\" | undefined; allowedRedirectUris?: string[] | undefined; accountDeletion?: { mode: \"delete_credential\" | \"delete_customer\"; requireCurrentPassword: boolean; scrubCustomerProfile: boolean; detachCustomerAuthUser: boolean; detachWorkspaceCustomer: boolean; deleteCustomerAuthUserWhenUnused: boolean; credentialProviderIds: string[]; } | undefined; restoreDeletedCredentialsOnSignup?: boolean | undefined; expectedAccountDeletion?: { mode: \"delete_credential\" | \"delete_customer\"; requireCurrentPassword: boolean; scrubCustomerProfile: boolean; detachCustomerAuthUser: boolean; detachWorkspaceCustomer: boolean; deleteCustomerAuthUserWhenUnused: boolean; credentialProviderIds: string[]; } | null | undefined; expectedAccountDeletionConfigurationStatus?: \"invalid\" | \"absent\" | \"configured\" | undefined; expectedAccountDeletionFingerprint?: string | undefined; expectedRestoreDeletedCredentialsOnSignup?: boolean | null | undefined; expectedAppUpdatedAt?: string | undefined; }",
            "source": "apps/api-core/src/controllers/agent.controller.ts"
          },
          {
            "type": "{ enabled: boolean; appVersions: string[]; customerIds: string[]; captureHours: number; retentionDays: number; maxCaptures: number; successSampleLimit?: number | undefined; }",
            "source": "apps/api-core/src/controllers/agent-purchase-capture.controller.ts"
          },
          {
            "type": "{ name?: string | undefined; appearance?: unknown; bundleId?: string | null | undefined; webOrigin?: string | null | undefined; } | { emailPasswordEnabled?: boolean | undefined; magicLinkEnabled?: boolean | undefined; redirectUrls?: string[] | undefined; sessionMode?: \"persistent\" | \"rolling\" | \"absolute\" | undefined; sessionInactivityDays?: number | null | undefined; sessionAbsoluteDays?: number | null | undefined; recentAuthenticationWindowSeconds?: number | null | undefined; passwordMaxAgeDays?: number | null | undefined; accountDeletion?: { mode: \"delete_credential\" | \"delete_customer\"; requireCurrentPassword: boolean; scrubCustomerProfile: boolean; detachCustomerAuthUser: boolean; detachWorkspaceCustomer: boolean; deleteCustomerAuthUserWhenUnused: boolean; credentialProviderIds: string[]; } | undefined; restoreDeletedCredentialsOnSignup?: boolean | undefined; emailChangeMode?: \"verification_link\" | \"password_confirmed\" | undefined; } | { contactMode: \"optional_email\" | \"required_email\" | \"authenticated_account\"; emailVerificationMode: \"none\" | \"optional\" | \"required\"; } | { operation: \"create\"; values: { identifier: string; name: string; description?: string | null | undefined; }; } | { operation: \"update\"; id: string; values: { name?: string | undefined; description?: string | null | undefined; }; } | { operation: \"create\"; values: { identifier: string; name: string; title?: string | null | undefined; enabled?: boolean | undefined; contentType?: \"push\" | \"mjml\" | \"html\" | \"text\" | undefined; category?: \"transactional\" | \"lifecycle\" | \"marketing\" | \"system\" | undefined; subject?: string | null | undefined; variables?: string | Record<string, unknown> | null | undefined; channel?: \"email\" | \"push\" | undefined; locale?: string | undefined; bodyText?: string | null | undefined; contentSource?: string | null | undefined; contentHtml?: string | undefined; dataPayload?: string | Record<string, unknown> | null | undefined; }; } | { operation: \"update\"; id: string; values: { title?: string | null | undefined; name?: string | undefined; enabled?: boolean | undefined; contentType?: \"push\" | \"mjml\" | \"html\" | \"text\" | undefined; category?: \"transactional\" | \"lifecycle\" | \"marketing\" | \"system\" | undefined; subject?: string | null | undefined; variables?: string | Record<string, unknown> | null | undefined; locale?: string | undefined; bodyText?: string | null | undefined; contentSource?: string | null | undefined; contentHtml?: string | undefined; dataPayload?: string | Record<string, unknown> | null | undefined; }; } | { operation: \"create\"; values: { identifier: string; name: string; source?: \"manual\" | \"auth\" | \"event\" | \"billing\" | \"api\" | undefined; eventType?: string | null | undefined; enabled?: boolean | undefined; delaySeconds?: number | undefined; cooldownSeconds?: number | undefined; }; } | { operation: \"update\"; id: string; values: { identifier?: string | undefined; name?: string | undefined; source?: \"manual\" | \"auth\" | \"event\" | \"billing\" | \"api\" | undefined; eventType?: string | null | undefined; enabled?: boolean | undefined; delaySeconds?: number | undefined; cooldownSeconds?: number | undefined; }; } | { id: string; triggerId: string | null; } | { operation: \"create\"; values: { name: string; url: string; enabled?: boolean | undefined; eventTypes?: (\"identity_attached\" | \"signin\" | \"signup\" | \"signout\" | \"paywall_shown\" | \"paywall_product_selected\" | \"checkout_started\" | \"purchase_started\" | \"customer_first_seen\" | \"email_changed\" | \"password_changed\" | \"account_deleted\" | \"purchase_revoked\" | \"purchase_refunded\" | \"billing_operation_failed\" | \"apple_access_observed\" | \"subscription_cancellation_scheduled\" | \"subscription_reactivated\" | \"subscription_started\" | \"purchase_verified\" | \"app_activity\" | \"session_start\" | \"session_end\" | \"deep_link_open\" | \"milestone_recorded\" | \"onboarding_step_viewed\" | \"paywall_requested\" | \"paywall_closed\" | \"paywall_screen_changed\" | \"product_offer_redemption_updated\" | \"paywall_checkout_requested\" | \"purchase_already_entitled\" | \"purchase_cancelled\" | \"purchase_pending\" | \"purchase_failed\" | \"purchase_sync_failed\" | \"purchase_succeeded\" | \"restore_started\" | \"restore_succeeded\" | \"restore_failed\" | \"sdk_access_observed\" | \"restore_operation_updated\" | \"apple_order_recovery_succeeded\" | \"surface_impression\" | \"subscription_trial_started\" | \"subscription_trial_converted\" | \"purchase_refund_reversed\" | \"purchase_refund_declined\" | \"subscription_renewed\" | \"subscription_renewal_extended\" | \"subscription_renewal_preference_changed\" | \"subscription_renewal_failed\" | \"subscription_expired\" | \"subscription_cancelled\" | \"subscription_paused\" | \"subscription_resumed\" | \"price_change_detected\" | \"grace_period_started\" | \"grace_period_ended\" | \"purchase_refund_requested\" | \"offer_redeemed\" | \"entitlement_granted\" | \"entitlement_revoked\" | \"notification_sent\" | \"notification_opened\" | \"webhook_delivered\" | \"webhook_failed\" | \"customer_note_added\" | \"app_crash_reported\" | \"app_error_reported\")[] | undefined; }; } | { operation: \"update\"; id: string; values: { name?: string | undefined; url?: string | undefined; enabled?: boolean | undefined; eventTypes?: (\"identity_attached\" | \"signin\" | \"signup\" | \"signout\" | \"paywall_shown\" | \"paywall_product_selected\" | \"checkout_started\" | \"purchase_started\" | \"customer_first_seen\" | \"email_changed\" | \"password_changed\" | \"account_deleted\" | \"purchase_revoked\" | \"purchase_refunded\" | \"billing_operation_failed\" | \"apple_access_observed\" | \"subscription_cancellation_scheduled\" | \"subscription_reactivated\" | \"subscription_started\" | \"purchase_verified\" | \"app_activity\" | \"session_start\" | \"session_end\" | \"deep_link_open\" | \"milestone_recorded\" | \"onboarding_step_viewed\" | \"paywall_requested\" | \"paywall_closed\" | \"paywall_screen_changed\" | \"product_offer_redemption_updated\" | \"paywall_checkout_requested\" | \"purchase_already_entitled\" | \"purchase_cancelled\" | \"purchase_pending\" | \"purchase_failed\" | \"purchase_sync_failed\" | \"purchase_succeeded\" | \"restore_started\" | \"restore_succeeded\" | \"restore_failed\" | \"sdk_access_observed\" | \"restore_operation_updated\" | \"apple_order_recovery_succeeded\" | \"surface_impression\" | \"subscription_trial_started\" | \"subscription_trial_converted\" | \"purchase_refund_reversed\" | \"purchase_refund_declined\" | \"subscription_renewed\" | \"subscription_renewal_extended\" | \"subscription_renewal_preference_changed\" | \"subscription_renewal_failed\" | \"subscription_expired\" | \"subscription_cancelled\" | \"subscription_paused\" | \"subscription_resumed\" | \"price_change_detected\" | \"grace_period_started\" | \"grace_period_ended\" | \"purchase_refund_requested\" | \"offer_redeemed\" | \"entitlement_granted\" | \"entitlement_revoked\" | \"notification_sent\" | \"notification_opened\" | \"webhook_delivered\" | \"webhook_failed\" | \"customer_note_added\" | \"app_crash_reported\" | \"app_error_reported\")[] | undefined; }; } | { id: string; } | { id: string; } | { name?: string | undefined; slug?: string | undefined; } | { id: string; name: string; } | { id: string; role: \"owner\" | \"admin\" | \"member\"; } | { id: string; } | { id: string; values: { name?: string | undefined; status?: \"active\" | \"disabled\" | undefined; }; } | { id: string; connectionId: string; values: { externalAppName?: string | undefined; enabled?: boolean | undefined; }; } | { enabled: boolean; replaceCredentials: boolean; publicConfig: { accountId: string; sendingDomain: string; fromAddress: string; fromName?: string | undefined; replyTo?: string | undefined; }; } | { enabled: boolean; replaceCredentials: false; useExistingBinding: true; publicConfig: { fromAddress: string; fromName?: string | undefined; replyTo?: string | undefined; }; } | { operation: \"create\"; values: { title: string; color: \"slate\" | \"blue\" | \"green\" | \"amber\" | \"rose\" | \"violet\"; }; } | { operation: \"update\"; id: string; values: { title: string; color: \"slate\" | \"blue\" | \"green\" | \"amber\" | \"rose\" | \"violet\"; }; } | { id: string; status: \"open\" | \"resolved\"; } | { id: string; read: boolean; } | { id: string; labelIds: string[]; }",
            "source": "apps/api-core/src/services/agent/agent-admin.service.ts"
          },
          {
            "type": "{ id: string; triggerId: string | null; }",
            "source": "apps/api-core/src/services/agent/agent-admin.service.ts"
          },
          {
            "type": "{ enabled: boolean; replaceCredentials: boolean; publicConfig: { accountId: string; sendingDomain: string; fromAddress: string; fromName?: string | undefined; replyTo?: string | undefined; }; } | { enabled: boolean; replaceCredentials: false; useExistingBinding: true; publicConfig: { fromAddress: string; fromName?: string | undefined; replyTo?: string | undefined; }; }",
            "source": "apps/api-core/src/services/agent/agent-admin.service.ts"
          },
          {
            "type": "{ operation: \"create\"; values: { identifier: string; name: string; title?: string | null | undefined; enabled?: boolean | undefined; contentType?: \"push\" | \"mjml\" | \"html\" | \"text\" | undefined; category?: \"transactional\" | \"lifecycle\" | \"marketing\" | \"system\" | undefined; subject?: string | null | undefined; variables?: string | Record<string, unknown> | null | undefined; channel?: \"email\" | \"push\" | undefined; locale?: string | undefined; bodyText?: string | null | undefined; contentSource?: string | null | undefined; contentHtml?: string | undefined; dataPayload?: string | Record<string, unknown> | null | undefined; }; } | { operation: \"update\"; id: string; values: { title?: string | null | undefined; name?: string | undefined; enabled?: boolean | undefined; contentType?: \"push\" | \"mjml\" | \"html\" | \"text\" | undefined; category?: \"transactional\" | \"lifecycle\" | \"marketing\" | \"system\" | undefined; subject?: string | null | undefined; variables?: string | Record<string, unknown> | null | undefined; locale?: string | undefined; bodyText?: string | null | undefined; contentSource?: string | null | undefined; contentHtml?: string | undefined; dataPayload?: string | Record<string, unknown> | null | undefined; }; }",
            "source": "apps/api-core/src/services/agent/agent-admin.service.ts"
          },
          {
            "type": "{ id: string; labelIds: string[]; }",
            "source": "apps/api-core/src/services/agent/agent-admin.service.ts"
          },
          {
            "type": "{ definition: { key: string; revision: number; label: string; unit: \"duration\" | \"count\" | \"bytes\" | \"credits\"; scale: number; allowedSources: (\"server\" | \"client\")[]; dimensionKeys: string[]; entitlementId: string | null; isActive: boolean; }; }",
            "source": "apps/api-core/src/services/agent/agent-usage-plans.ts"
          },
          {
            "type": "{ definition: { key: string; allowedValues: string[]; }; }",
            "source": "apps/api-core/src/services/agent/agent-usage-plans.ts"
          },
          {
            "type": "{ policy: \"account\" | \"app_store\"; preservedImport?: { revision: string; enabled: boolean; entitlementIdentifier: string; members: { grantId: string; customerId: string; }[]; } | null | undefined; appPurchaseRules?: { entitlementIdentifiers: string[]; originalAppVersionFormat?: \"integer\" | \"dotted\" | undefined; originalAppVersionBefore?: string | undefined; originalPurchaseDateBefore?: string | undefined; }[] | undefined; }",
            "source": "apps/api-core/src/controllers/agent.controller.ts"
          },
          {
            "type": "{ operation: \"create\"; values: { identifier: string; name: string; status: \"active\" | \"inactive\" | \"archived\"; config: unknown; delivery: { maxPresentationsPerCustomer: number; cooldownSeconds: number; allowManualRepeats: boolean; }; description?: string | null | undefined; }; } | { operation: \"update\"; id: string; values: { status?: \"active\" | \"inactive\" | \"archived\" | undefined; name?: string | undefined; description?: string | null | undefined; config?: unknown; delivery?: { maxPresentationsPerCustomer: number; cooldownSeconds: number; allowManualRepeats: boolean; } | undefined; }; } | { operation: \"new_round\"; id: string; }",
            "source": "apps/api-core/src/services/agent/agent-survey-plans.ts"
          },
          {
            "type": "{ provider: \"apple_app_store_connect\"; category: \"catalog\"; resource: \"app_store_pricing_plan\"; operation: \"apply\"; providerPlanId: string; digest: string; }",
            "source": "apps/api-core/src/controllers/agent.controller.ts"
          },
          {
            "type": "{ provider: \"google\"; category: \"auth\"; publicConfig: { clientId: string; }; enabled?: boolean | undefined; } | { provider: \"apple\"; category: \"auth\"; publicConfig: { clientId: string; teamId?: string | undefined; keyId?: string | undefined; }; enabled?: boolean | undefined; }",
            "source": "apps/api-core/src/controllers/agent.controller.ts"
          },
          {
            "type": "{ operation: \"update\"; resource: \"product_offer\"; id: string; values: { paused: boolean; }; }",
            "source": "apps/api-core/src/controllers/agent.controller.ts"
          },
          {
            "type": "{ operation: \"update\" | \"delete\" | \"create\"; resource?: \"paywall\" | undefined; id?: string | undefined; identifier?: string | undefined; values?: { identifier?: string | undefined; name?: string | undefined; description?: string | null | undefined; config?: unknown; status?: \"active\" | \"inactive\" | \"archived\" | undefined; isDefault?: boolean | undefined; productIdentifiers?: string[] | undefined; } | undefined; } | { operation: \"update\"; resource: \"placement_fallback\"; placementIdentifier: string; fallbackPaywallIdentifier: string; } | { operation: \"upsert\"; resource: \"placement\"; identifier: string; name: string; fallbackPaywallIdentifier: string; description?: string | null | undefined; } | { operation: \"update\" | \"delete\" | \"create\"; id?: string | undefined; identifier?: string | undefined; values?: { identifier?: string | undefined; name?: string | undefined; description?: string | null | undefined; surfaceType?: string | undefined; status?: \"active\" | \"inactive\" | \"archived\" | undefined; enabled?: boolean | undefined; config?: unknown; } | undefined; }",
            "source": "apps/api-core/src/controllers/agent.controller.ts"
          },
          {
            "type": "{ operation: \"update\" | \"delete\" | \"create\"; resource?: \"paywall\" | undefined; id?: string | undefined; identifier?: string | undefined; values?: { identifier?: string | undefined; name?: string | undefined; description?: string | null | undefined; config?: unknown; status?: \"active\" | \"inactive\" | \"archived\" | undefined; isDefault?: boolean | undefined; productIdentifiers?: string[] | undefined; } | undefined; }",
            "source": "apps/api-core/src/controllers/agent.controller.ts"
          },
          {
            "type": "{ operation: \"upsert\"; resource: \"placement\"; identifier: string; name: string; fallbackPaywallIdentifier: string; description?: string | null | undefined; }",
            "source": "apps/api-core/src/controllers/agent.controller.ts"
          },
          {
            "type": "{ operation: \"update\" | \"delete\" | \"create\"; id?: string | undefined; expectedUpdatedAt?: string | undefined; values?: { identifier?: string | null | undefined; name?: string | undefined; subject?: string | null | undefined; channel?: \"email\" | undefined; category?: \"transactional\" | \"lifecycle\" | \"marketing\" | \"system\" | undefined; locale?: string | undefined; enabled?: boolean | undefined; contentType?: \"push\" | \"mjml\" | \"html\" | \"text\" | undefined; contentSource?: string | undefined; contentHtml?: string | undefined; variables?: unknown; } | undefined; }",
            "source": "apps/api-core/src/controllers/agent.controller.ts"
          },
          {
            "type": "{ providerTransactionId: string; billingTransactionId: string; subscriptionId: string; customerId: string; canonicalEventId: string; expectedPurchasedAt: string; expectedPeriodEnd: string; duplicateEventIds?: string[] | undefined; }",
            "source": "apps/api-core/src/controllers/agent.controller.ts"
          },
          {
            "type": "{ customerId: string; grantId: string; entitlementIdentifier: string; sourceBillingTransactionId: string | null; expectedRevokedAt: null; }",
            "source": "apps/api-core/src/controllers/agent.controller.ts"
          },
          {
            "type": "{ entitlementId: string; startsAt: any; endsAt: any; customerId: string; expectedPolicy: \"account\" | \"app_store\"; source: \"manual\"; applePurchaserLinkId?: string | undefined; note?: string | undefined; }",
            "source": "apps/api-core/src/controllers/agent.controller.ts"
          },
          {
            "type": "{ authUserId: string; normalizedEmail: string; expectedUpdatedAt: string; expectedProviders: { providerId: string; accountCount: number; hasPassword: boolean; passwordUpdatedAt: string | null; }[]; expectedCustomerCount: 0; expectedWorkspaceCustomerCount: 0; expectedSessionCount: number; expectedActiveSessionCount: 0; expectedChallengeCount: number; expectedActiveChallengeCount: 0; }",
            "source": "apps/api-core/src/controllers/agent.controller.ts"
          }
        ]
      },
      "response": {
        "fields": [],
        "evidence": "uncertain: delegated controller payload",
        "types": [
          "{ plan: { appId: string | null; environment: \"test\" | \"live\" | null; platformUserId: string; workspaceId: string; agentAccessTokenId: string; action: string; id: string; createdAt: Date; updatedAt: Date; request: Record<string, unknown>; expiresAt: Date; appliedAt: Date | null; plan: Record<string, unknown>; }; requiredScope: \"workspace:read\" | \"workspace:write\" | \"apps:read\" | \"apps:write\" | \"reports:read\" | \"catalog:read\" | \"catalog:write\" | \"paywalls:read\" | \"paywalls:write\" | \"messaging:read\" | \"messaging:write\" | \"campaigns:read\" | \"campaigns:write\" | \"remote_config:read\" | \"remote_config:write\" | \"surfaces:read\" | \"surfaces:write\" | \"surveys:read\" | \"surveys:write\" | \"rules:read\" | \"rules:write\" | \"webhooks:read\" | \"webhooks:write\" | \"integrations:read\" | \"integrations:write\" | \"auth:read\" | \"auth:write\" | \"audit:read\"; }"
        ]
      },
      "notes": "all /agent routes require agentAuthMiddleware",
      "controllerSignature": "export async function handlePlanAgentAdminChange(c: AgentContext)"
    },
    {
      "method": "GET",
      "path": "/agent/apps/:appId/surveys",
      "auth": "Bearer One Agent token via agentAuthMiddleware",
      "controller": "handleListAgentSurveys",
      "routeSource": "apps/api-core/src/routes/agent.ts",
      "controllerSource": "apps/api-core/src/controllers/agent-surveys.controller.ts",
      "request": {
        "schemas": [],
        "evidence": "uncertain: no direct named schema call in handler body",
        "fields": [
          "path.appId"
        ],
        "fieldEvidence": "no direct field extraction; inspect named schema or delegated payload helper",
        "schemaFields": {},
        "types": []
      },
      "response": {
        "fields": [],
        "evidence": "uncertain: response is variable/service result or no direct literal c.json object",
        "types": [
          "{ app: { id: string; name: string; environment: import(\"/Users/hm/Projects/One/packages/sdk-shared/dist/index\").IdEnvironment; liveAppId: string | null; }; surveys: { id: string; appId: string; identifier: string; name: string; description: string | null; status: \"active\" | \"inactive\" | \"archived\"; config: import(\"/Users/hm/Projects/One/packages/sdk-shared/dist/index\").SurveyConfig; delivery: import(\"/Users/hm/Projects/One/packages/sdk-shared/dist/index\").SurveyDeliverySettings; collectionRound: number; createdAt: Date; updatedAt: Date; }[]; }"
        ]
      },
      "notes": "all endpoint routes require agent token; surveys:read scope",
      "controllerSignature": "async (c: Ctx): Promise<Response> => c.json(await getAgentSurveys(c, c.req.param('appId')!))"
    },
    {
      "method": "GET",
      "path": "/agent/apps/:appId/surveys/:surveyId",
      "auth": "Bearer One Agent token via agentAuthMiddleware",
      "controller": "handleGetAgentSurvey",
      "routeSource": "apps/api-core/src/routes/agent.ts",
      "controllerSource": "apps/api-core/src/controllers/agent-surveys.controller.ts",
      "request": {
        "schemas": [],
        "evidence": "uncertain: no direct named schema call in handler body",
        "fields": [
          "path.appId",
          "path.surveyId"
        ],
        "fieldEvidence": "no direct field extraction; inspect named schema or delegated payload helper",
        "schemaFields": {},
        "types": []
      },
      "response": {
        "fields": [],
        "evidence": "uncertain: response is variable/service result or no direct literal c.json object",
        "types": [
          "{ app: { id: string; name: string; environment: import(\"/Users/hm/Projects/One/packages/sdk-shared/dist/index\").IdEnvironment; liveAppId: string | null; }; survey: { id: string; appId: string; identifier: string; name: string; description: string | null; status: \"active\" | \"inactive\" | \"archived\"; config: import(\"/Users/hm/Projects/One/packages/sdk-shared/dist/index\").SurveyConfig; delivery: import(\"/Users/hm/Projects/One/packages/sdk-shared/dist/index\").SurveyDeliverySettings; collectionRound: number; createdAt: Date; updatedAt: Date; }; revisions: { appId: string; id: string; createdAt: Date; label: string | null; source: \"publish\" | \"restore\"; config: import(\"/Users/hm/Projects/One/packages/sdk-shared/dist/index\").AnyPaywallConfig | import(\"/Users/hm/Projects/One/packages/sdk-shared/dist/index\").AnyInAppSurfaceConfig | import(\"/Users/hm/Projects/One/packages/sdk-shared/dist/index\").SurveyConfig; creativeType: \"paywall\" | \"in_app_surface\" | \"survey\"; creativeId: string; configVersion: string; createdByPlatformUserId: string | null; }[]; }"
        ]
      },
      "notes": "all endpoint routes require agent token; surveys:read scope",
      "controllerSignature": "async (c: Ctx): Promise<Response> => c.json(await getAgentSurvey(c, c.req.param('appId')!, c.req.param('surveyId')!))"
    },
    {
      "method": "GET",
      "path": "/agent/apps/:appId/surveys/:surveyId/results",
      "auth": "Bearer One Agent token via agentAuthMiddleware",
      "controller": "handleGetAgentSurveyResults",
      "routeSource": "apps/api-core/src/routes/agent.ts",
      "controllerSource": "apps/api-core/src/controllers/agent-surveys.controller.ts",
      "request": {
        "schemas": [
          "surveyResultsQuerySchema"
        ],
        "evidence": "uncertain: no direct named schema call in handler body",
        "fields": [
          "path.appId",
          "path.surveyId",
          "query"
        ],
        "fieldEvidence": "no direct field extraction; inspect named schema or delegated payload helper",
        "schemaFields": {},
        "types": [
          {
            "type": "{ includeQuestionSummary?: \"false\" | \"true\" | undefined; limit?: unknown; before?: string | undefined; revisionId?: string | undefined; collectionRound?: unknown; platform?: \"ios\" | \"android\" | \"web\" | \"windows\" | \"macos\" | undefined; }",
            "source": "apps/api-core/src/services/surveys/survey-results.service.ts"
          },
          {
            "type": "unknown",
            "source": "apps/api-core/src/services/surveys/survey-results.service.ts"
          }
        ]
      },
      "response": {
        "fields": [],
        "evidence": "uncertain: response is variable/service result or no direct literal c.json object",
        "types": [
          "import(\"/Users/hm/Projects/One/packages/sdk-shared/dist/index\").SurveyResultsPage | { format: string; csv: string; nextCursor: string | null; responseCount: number; }"
        ]
      },
      "notes": "all endpoint routes require agent token; surveys:read scope",
      "controllerSignature": "async (c: Ctx): Promise<Response> => c.json(await getAgentSurveyResults(c, c.req.param('appId')!, c.req.param('surveyId')!, c.req.query()))"
    },
    {
      "method": "GET",
      "path": "/agent/apps/:appId/surveys/:surveyId/results/export",
      "auth": "Bearer One Agent token via agentAuthMiddleware",
      "controller": "handleExportAgentSurveyResults",
      "routeSource": "apps/api-core/src/routes/agent.ts",
      "controllerSource": "apps/api-core/src/controllers/agent-surveys.controller.ts",
      "request": {
        "schemas": [
          "surveyResultsQuerySchema"
        ],
        "evidence": "uncertain: no direct named schema call in handler body",
        "fields": [
          "path.appId",
          "path.surveyId",
          "query"
        ],
        "fieldEvidence": "no direct field extraction; inspect named schema or delegated payload helper",
        "schemaFields": {},
        "types": [
          {
            "type": "{ includeQuestionSummary?: \"false\" | \"true\" | undefined; limit?: unknown; before?: string | undefined; revisionId?: string | undefined; collectionRound?: unknown; platform?: \"ios\" | \"android\" | \"web\" | \"windows\" | \"macos\" | undefined; }",
            "source": "apps/api-core/src/services/surveys/survey-results.service.ts"
          },
          {
            "type": "unknown",
            "source": "apps/api-core/src/services/surveys/survey-results.service.ts"
          }
        ]
      },
      "response": {
        "fields": [],
        "evidence": "uncertain: response is variable/service result or no direct literal c.json object",
        "types": [
          "import(\"/Users/hm/Projects/One/packages/sdk-shared/dist/index\").SurveyResultsPage | { format: string; csv: string; nextCursor: string | null; responseCount: number; }"
        ]
      },
      "notes": "all endpoint routes require agent token; surveys:read scope",
      "controllerSignature": "async (c: Ctx): Promise<Response> => c.json(await getAgentSurveyResults(c, c.req.param('appId')!, c.req.param('surveyId')!, c.req.query(), true))"
    },
    {
      "method": "GET",
      "path": "/agent/apps/:appId/purchase-health",
      "auth": "Scoped Agent bearer token via agentAuthMiddleware; requires apps:read and reports:read",
      "controller": "handleGetAgentPurchaseHealth",
      "routeSource": "apps/api-core/src/routes/agent.ts",
      "controllerSource": "apps/api-core/src/controllers/agent-reports.controller.ts",
      "request": {
        "schemas": [
          "purchaseHealthQuerySchema"
        ],
        "evidence": "reviewed named shared validation schema",
        "fields": [
          "path.appId",
          "query.days"
        ],
        "fieldEvidence": "reviewed controller and mounted route",
        "schemaFields": {
          "purchaseHealthQuerySchema": {
            "fields": [
              "days"
            ],
            "source": "packages/sdk-shared/src/validation/access-observations.ts",
            "evidence": "schema object property keys reviewed from source"
          }
        },
        "types": [
          {
            "type": "{ days?: \"1\" | \"7\" | \"30\" | undefined; }",
            "source": "apps/api-core/src/controllers/agent-reports.controller.ts"
          }
        ]
      },
      "response": {
        "fields": [],
        "evidence": "compiler response extraction from the mounted handler",
        "types": [
          "{ app: { id: string; name: string; environment: import(\"/Users/hm/Projects/One/packages/sdk-shared/dist/index\").IdEnvironment; liveAppId: string | null; }; report: import(\"/Users/hm/Projects/One/packages/sdk-shared/dist/index\").PurchaseHealthReport; }"
        ]
      },
      "notes": "all endpoint routes require agent token",
      "controllerSignature": "export async function handleGetAgentPurchaseHealth(c: AgentContext): Promise<Response>"
    },
    {
      "method": "GET",
      "path": "/agent/apps/:appId/purchase-captures",
      "auth": "Scoped Agent bearer token via agentAuthMiddleware; requires apps:read and reports:read",
      "controller": "inline route handler",
      "routeSource": "apps/api-core/src/routes/agent.ts",
      "controllerSource": "apps/api-core/src/routes/agent.ts",
      "request": {
        "schemas": [],
        "evidence": "no request body; path/query inputs only",
        "fields": [
          "path.appId"
        ],
        "fieldEvidence": "reviewed controller and mounted route",
        "schemaFields": {},
        "types": [
          {
            "type": "{ version: 1; id: string; requestId: string; operationId: string | null; route: \"access\" | \"evidence\"; receivedAt: string; finishedAt: string; verifiedAt: string | null; policy: \"account\" | \"app_store\" | null; configurationRevision: string | null; providerEnvironment: \"Production\" | \"Sandbox\" | null; outcome: \"failed\" | \"partial\" | \"verified\"; completeness: \"failed\" | \"complete\" | \"partial\" | \"submitted_evidence\"; acquisitionVerified: boolean | null; transactionCounts: { submitted: number; verified: number | null; active: number | null; inactive: number | null; unverified: number | null; unmapped: number | null; } | null; entitlements: { identifier: string; expiresAt: number | null; source: \"manual\" | \"apple\"; }[]; entitlementsTruncated: boolean; responseExpiresAt: number | null; accessContextExpiresAt: number | null; stage: \"completed\" | \"acquisition\" | \"configuration\" | \"transactions\" | \"mapping\" | \"purchaser_link\" | \"context_signing\" | \"contract_validation\"; failure: { code: \"invalid_contract\" | \"verification_rejected\" | \"service_error\"; httpStatus: number; retryable: boolean; } | null; appVersion: string | null; sdkVersion: string | null; deviceModel: string | null; osVersion: string | null; versionProvenance: \"unknown\" | \"request_headers\"; attemptId?: string | null | undefined; evidenceIssues?: { source: \"renewal\" | \"acquisition\" | \"transaction\" | \"mapping\"; reason: \"verification_failed\" | \"claims_invalid\" | \"device_mismatch\" | \"environment_mismatch\" | \"unmatched_renewal\" | \"catalog_mapping_failed\"; index?: number | undefined; }[] | undefined; }",
            "source": "apps/api-core/src/services/dashboard/customer-access-observations.service.ts"
          }
        ]
      },
      "response": {
        "fields": [],
        "evidence": "compiler response extraction from the mounted handler",
        "types": [
          "{ app: { id: string; name: string; environment: import(\"/Users/hm/Projects/One/packages/sdk-shared/dist/index\").IdEnvironment; liveAppId: string | null; }; policy: { appId: string; revision: string; enabled: boolean; appVersions: string[]; customerIds: string[]; captureUntil: Date; retentionDays: number; maxCaptures: number; successSampleLimit: number; successSampleCount: number; capturedCount: number; updatedBy: string; updatedAt: Date; } | null; captures: { serverDecision: { accessReturned: boolean; complete: boolean; failed: boolean; } | null; id: string; customerId: string; appVersion: string | null; sdkVersion: string | null; operationId: string | null; requestId: string; route: string; status: \"failed\" | \"ready\" | \"pending\"; outcome: string; createdAt: Date; expiresAt: Date; sizeBytes: number | null; failureCode: string | null; }[]; }"
        ]
      },
      "notes": "all endpoint routes require agent token",
      "controllerSignature": "c => getAgentPurchaseCaptures(c, c.req.param('appId')).then(value => c.json(value))"
    },
    {
      "method": "GET",
      "path": "/agent/apps/:appId/purchase-captures/:captureId",
      "auth": "Scoped Agent bearer token via agentAuthMiddleware; requires apps:read and reports:read",
      "controller": "inline route handler",
      "routeSource": "apps/api-core/src/routes/agent.ts",
      "controllerSource": "apps/api-core/src/routes/agent.ts",
      "request": {
        "schemas": [],
        "evidence": "no request body; path/query inputs only",
        "fields": [
          "path.appId",
          "path.captureId"
        ],
        "fieldEvidence": "reviewed controller and mounted route",
        "schemaFields": {},
        "types": [
          {
            "type": "{ observedAt: string; stage: string; nativeDomain: string; nativeCode: number; storeKitCase?: string | null | undefined; underlying?: { domain: string; code: number; }[] | undefined; }[]",
            "source": "apps/api-core/src/services/products/purchase-capture-inspection.service.ts"
          }
        ]
      },
      "response": {
        "fields": [],
        "evidence": "compiler response extraction from the mounted handler",
        "types": [
          "{ customerId: string; headline: string; explanation: string; evidence: { environment: \"live\" | \"test\"; route: \"access\" | \"evidence\"; failed: boolean; failureStage?: string; clientDiagnostics?: import(\"/Users/hm/Projects/One/packages/sdk-shared/dist/index\").AppleClientDiagnostic[]; failure?: { code: string; statusCode?: number; }; serverFailures?: Array<{ kind: string; failure?: { code: string; statusCode?: number; }; }>; submittedTransactions: number; hasAppTransaction: boolean; hasReceipt: boolean; transactionsComplete: boolean; acquisition?: { source: \"app_transaction\" | \"receipt\"; originalAppVersion?: string; originalPurchaseDate?: string; purchaserComparable: boolean; }; decision: { complete: boolean; acquisitionVerified: boolean; entitlementIdentifiers: string[]; acquisitionEntitlementIdentifiers: string[]; manualEntitlementIdentifiers: string[]; }; limitation: string; }; historicalPurchases: unknown; receiptPurchases?: import(\"/Users/hm/Projects/One/packages/sdk-shared/dist/index\").ReceiptPurchaseInspection; app: { id: string; name: string; environment: import(\"/Users/hm/Projects/One/packages/sdk-shared/dist/index\").IdEnvironment; liveAppId: string | null; }; captureId: string; }"
        ]
      },
      "notes": "all endpoint routes require agent token",
      "controllerSignature": "c => getAgentPurchaseCapture(c, c.req.param('appId'), c.req.param('captureId')).then(value => c.json(value))"
    },
    {
      "method": "POST",
      "path": "/agent/apps/:appId/purchase-captures/:captureId/replay",
      "auth": "Scoped Agent bearer token via agentAuthMiddleware; requires apps:read and reports:read",
      "controller": "inline route handler",
      "routeSource": "apps/api-core/src/routes/agent.ts",
      "controllerSource": "apps/api-core/src/routes/agent.ts",
      "request": {
        "schemas": [],
        "evidence": "no request body; path/query inputs only",
        "fields": [
          "path.appId",
          "path.captureId"
        ],
        "fieldEvidence": "reviewed controller and mounted route",
        "schemaFields": {},
        "types": []
      },
      "response": {
        "fields": [],
        "evidence": "compiler response extraction from the mounted handler",
        "types": [
          "{ app: { id: string; name: string; environment: import(\"/Users/hm/Projects/One/packages/sdk-shared/dist/index\").IdEnvironment; liveAppId: string | null; }; captureId: string; replay: { original: { complete: boolean; acquisitionVerified: boolean; entitlementIdentifiers: string[]; acquisitionEntitlementIdentifiers: string[]; manualEntitlementIdentifiers: string[]; transactionResults: { index: number | undefined; status: string | undefined; entitlementIdentifiers: string[]; expiresAt: string | null | undefined; }[]; }; replayed: { complete: boolean; acquisitionVerified: boolean; entitlementIdentifiers: string[]; acquisitionEntitlementIdentifiers: string[]; manualEntitlementIdentifiers: string[]; transactionResults: { index: number | undefined; status: string | undefined; entitlementIdentifiers: string[]; expiresAt: string | null | undefined; }[]; }; mode: \"recorded-inputs\"; signatureVerification: \"recorded-outcome\"; matches: boolean; sequenceMatches: boolean; failed: boolean; stage: string | undefined; originalFailed: boolean; originalStage: string | undefined; originalFailure: import(\"/Users/hm/Projects/One/apps/api-core/src/services/products/apple-access-replay\").CapturedAppleFailure | undefined; recordedFailures: { kind: string; failure: import(\"/Users/hm/Projects/One/apps/api-core/src/services/products/apple-access-replay\").CapturedAppleFailure | undefined; }[]; limitation: string; }; }"
        ]
      },
      "notes": "all endpoint routes require agent token",
      "controllerSignature": "c => replayAgentPurchaseCapture(c, c.req.param('appId'), c.req.param('captureId')).then(value => c.json(value))"
    },
    {
      "method": "GET",
      "path": "/agent/apps/:appId/purchases/apple-order",
      "auth": "Bearer One Agent token via agentAuthMiddleware",
      "controller": "handleLookupAgentAppleOrder",
      "routeSource": "apps/api-core/src/routes/agent.ts",
      "controllerSource": "apps/api-core/src/controllers/agent-apple-order.controller.ts",
      "request": {
        "schemas": [
          "agentAppleOrderLookupInputSchema"
        ],
        "evidence": "strict appId and orderId validation",
        "fields": [
          "path.appId",
          "query.orderId"
        ],
        "fieldEvidence": "direct controller query/path read",
        "schemaFields": {},
        "types": [
          {
            "type": "{ appId: string; orderId?: string | undefined; providerEventId?: string | undefined; }",
            "source": "apps/api-core/src/controllers/agent-apple-order.controller.ts"
          }
        ]
      },
      "response": {
        "fields": [],
        "evidence": "compiler extracted scoped lookup response",
        "types": [
          "{ customerId: string | null; transactionIds: string[]; originalTransactionIds: string[]; appId: string; environment: \"live\"; applePurchaseFound: boolean; }"
        ]
      },
      "notes": "Requires apps:read and reports:read. Live only. Verifies Apple-signed order transactions without importing purchases or changing access.",
      "controllerSignature": "export async function handleLookupAgentAppleOrder(c: Context<"
    },
    {
      "method": "POST",
      "path": "/agent/apple-ads/report",
      "auth": "Bearer One Agent token via agentAuthMiddleware",
      "controller": "inline POST /apple-ads/report",
      "routeSource": "apps/api-core/src/routes/agent.ts",
      "controllerSource": "apps/api-core/src/routes/agent.ts",
      "request": {
        "schemas": [
          "agentAppleAdsReportSchema"
        ],
        "evidence": "strict shared schema validation in scoped report payload helper",
        "fields": [
          "appId",
          "from",
          "to",
          "view",
          "dimension",
          "limit",
          "offset"
        ],
        "fieldEvidence": "shared input schema",
        "schemaFields": {
          "appId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128
          },
          "from": {
            "type": "string",
            "format": "date",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
          },
          "to": {
            "type": "string",
            "format": "date",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
          },
          "view": {
            "type": "string",
            "enum": [
              "summary",
              "breakdown",
              "cohorts"
            ]
          },
          "dimension": {
            "type": "string",
            "enum": [
              "app",
              "campaign",
              "ad_group",
              "keyword",
              "search_term",
              "ad",
              "country",
              "placement"
            ]
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 500
          },
          "offset": {
            "type": "integer",
            "minimum": 0,
            "maximum": 10000
          }
        },
        "types": [
          {
            "type": "{ appId: string; from: string; to: string; view: \"provider\" | \"summary\" | \"breakdown\" | \"cohorts\"; connectionId?: string | undefined; dimension?: \"campaign\" | \"app\" | \"country\" | \"placement\" | \"ad_group\" | \"ad\" | \"keyword\" | \"search_term\" | undefined; limit?: number | undefined; offset?: number | undefined; }",
            "source": "apps/api-core/src/controllers/agent-apple-ads.controller.ts"
          }
        ]
      },
      "response": {
        "fields": [],
        "evidence": "compiler extracted scoped acquisition report response",
        "types": [
          "{ rows: { campaignId: string; campaignName: string; country: string | null; spendMinorUnits: number; impressions: number; taps: number; installs: number; newDownloads: number; redownloads: number; }[]; totalRows: number; hasMore: boolean; nextOffset: number | null; source: \"apple_ads_api\"; appId: string; connectionId: string; from: string; to: string; fetchedAt: string; currency: string; timezone: string; campaignCount: number; totals: { spendMinorUnits: number; impressions: number; taps: number; installs: number; newDownloads: number; redownloads: number; }; warnings: string[]; view: \"provider\"; } | { provider: \"apple_ads\" | \"meta_ads\" | \"google_ads\" | \"tiktok_ads\"; appIds: string[]; period: { startDate: string; endDate: string; }; metrics: { spendUsdCents: number; providerInstallCount: number; providerAcquisitionInstallCount: number; providerReactivationInstallCount: number; attributedOpenCount: number; matchedAttributedOpenCount: number; matchedFirstTimePayerCount: number; decisionProviderInstallCount: number; decisionAttributedOpenCount: number; decisionFirstTimePayerCount: number; decisionD30GrossRevenueUsdCents: number; newDownloadCount: number; redownloadCount: number; payerCacUsdCents: number | null; d0RoasBps: number | null; d7RoasBps: number | null; d30RoasBps: number | null; d90RoasBps: number | null; paybackDays: number | null; paybackResolution: \"checkpoint\"; attributionCoverageBps: number | null; proceedsCoverage: \"unavailable\" | \"actual\" | \"estimated\" | \"mixed\"; decisionProceedsCoverage: \"unavailable\" | \"actual\" | \"estimated\" | \"mixed\"; decisionSpendUsdCents: number; paywallViewCount: number; trialStartCount: number; firstTimePayerCount: number; refundCount: number; d0GrossRevenueUsdCents: number; d7GrossRevenueUsdCents: number; d30GrossRevenueUsdCents: number; d90GrossRevenueUsdCents: number; d0RefundUsdCents: number; d7RefundUsdCents: number; d30RefundUsdCents: number; d90RefundUsdCents: number; d0ProceedsUsdCents: number | null; d7ProceedsUsdCents: number | null; d30ProceedsUsdCents: number | null; d90ProceedsUsdCents: number | null; d0NetProceedsUsdCents: number | null; d7NetProceedsUsdCents: number | null; d30NetProceedsUsdCents: number | null; d90NetProceedsUsdCents: number | null; unpaidPositiveSpendCount: number; spendFxIncompleteCount: number; proceedsActualCount: number; proceedsEstimatedCount: number; proceedsMixedCount: number; proceedsUnavailableCount: number; latestComputedAt: Date | null; }; decisionPeriod: { coverageStartDate: string | null; startDate: string; matureEndDate: string; }; recommendation: import(\"/Users/hm/Projects/One/apps/api-core/src/services/provider-connections/acquisition-recommendation\").AcquisitionRecommendation | null; recommendationCounts: { scale: number; hold: number; reduce: number; insufficientData: number; }; mappingRecommendations: { appId: string; appMappingId: string; recommendation: import(\"/Users/hm/Projects/One/apps/api-core/src/services/provider-connections/acquisition-recommendation\").AcquisitionRecommendation; }[]; decisionWarnings: string[]; sourceCoverage: { [k: string]: { spendUsdCents: number; providerInstallCount: number; attributedOpenCount: number; newDownloadCount: number; redownloadCount: number; }; }; exactPeriodWarnings: { code: \"exact_period_excluded\"; reportSource: \"api\" | \"file_import\" | \"unresolved\"; granularity: \"period\" | \"day\" | \"week\"; excludedRowCount: number; }[]; dataFreshness: { reportsPublishedAt: Date | null; cohortsComputedAt: Date | null; }; dataQuality: { attemptedCount: number; attributedCount: number; developerTestExcludedCount: number; retryableErrorCount: number; diagnosticMetadataCount: number; advancedReportingAvailable: boolean; basicReportingAvailable: boolean; basicImportedSpendUsdCents: number; basicImportedInstallCount: number; basicImportedPeriodStart: string | null; basicImportedPeriodEnd: string | null; }; appId: string; view: \"summary\"; } | { rows: { spendUsdCents: number; providerInstallCount: number; attributedOpenCount: number; proceedsCoverage: \"unavailable\" | \"actual\" | \"estimated\" | \"mixed\"; paybackDays: number | null; paybackResolution: \"checkpoint\"; recommendation: import(\"/Users/hm/Projects/One/apps/api-core/src/services/provider-connections/acquisition-recommendation\").AcquisitionRecommendation; observedSpendUsdCents: number; observedProviderInstallCount: number; observedAttributedOpenCount: number; observedFirstTimePayerCount: number; observedD30GrossRevenueUsdCents: number; observedSpendFxComplete: boolean; controlsEnabled: boolean; allowedActions: string[]; resourceControl: Record<string, unknown> | null; providerAcquisitionInstallCount: number; providerReactivationInstallCount: number; newDownloadCount: number; redownloadCount: number; paywallViewCount: number; trialStartCount: number; firstTimePayerCount: number; refundCount: number; d0GrossRevenueUsdCents: number; d7GrossRevenueUsdCents: number; d30GrossRevenueUsdCents: number; d90GrossRevenueUsdCents: number; d0RefundUsdCents: number; d7RefundUsdCents: number; d30RefundUsdCents: number; d90RefundUsdCents: number; d0ProceedsUsdCents: number | null; d7ProceedsUsdCents: number | null; d30ProceedsUsdCents: number | null; d90ProceedsUsdCents: number | null; d0NetProceedsUsdCents: number | null; d7NetProceedsUsdCents: number | null; d30NetProceedsUsdCents: number | null; d90NetProceedsUsdCents: number | null; unpaidPositiveSpendCount: number; spendFxIncompleteCount: number; proceedsActualCount: number; proceedsEstimatedCount: number; proceedsMixedCount: number; proceedsUnavailableCount: number; latestComputedAt: Date | null; appId: string; appMappingId: string | null; reportSource: \"api\" | \"file_import\" | \"unresolved\"; cohortType: \"acquisition\" | \"reactivation\"; dimension: \"campaign\" | \"app\" | \"country\" | \"placement\" | \"ad_group\" | \"ad\" | \"keyword\" | \"search_term\"; dimensionKey: string; dimensionLabel: string | null; parentDimension: \"campaign\" | \"app\" | \"country\" | \"placement\" | \"ad_group\" | \"ad\" | \"keyword\" | \"search_term\" | null; parentDimensionKey: string | null; parentDimensionLabel: string | null; }[] | { paybackDays: number | null; paybackResolution: \"checkpoint\"; spendUsdCents: number; providerInstallCount: number; providerAcquisitionInstallCount: number; providerReactivationInstallCount: number; attributedOpenCount: number; newDownloadCount: number; redownloadCount: number; paywallViewCount: number; trialStartCount: number; firstTimePayerCount: number; refundCount: number; d0GrossRevenueUsdCents: number; d7GrossRevenueUsdCents: number; d30GrossRevenueUsdCents: number; d90GrossRevenueUsdCents: number; d0RefundUsdCents: number; d7RefundUsdCents: number; d30RefundUsdCents: number; d90RefundUsdCents: number; d0ProceedsUsdCents: number | null; d7ProceedsUsdCents: number | null; d30ProceedsUsdCents: number | null; d90ProceedsUsdCents: number | null; d0NetProceedsUsdCents: number | null; d7NetProceedsUsdCents: number | null; d30NetProceedsUsdCents: number | null; d90NetProceedsUsdCents: number | null; unpaidPositiveSpendCount: number; spendFxIncompleteCount: number; proceedsActualCount: number; proceedsEstimatedCount: number; proceedsMixedCount: number; proceedsUnavailableCount: number; latestComputedAt: Date | null; appId: string; appMappingId: string | null; reportSource: \"api\" | \"file_import\" | \"unresolved\"; periodStart: string; periodEnd: string; granularity: \"period\" | \"day\" | \"week\"; cohortType: \"acquisition\" | \"reactivation\"; }[]; totalRows: number; hasMore: boolean; nextOffset: number | null; provider: \"apple_ads\" | \"meta_ads\" | \"google_ads\" | \"tiktok_ads\"; decisionWarnings: never[]; sourceCoverage: Record<string, { rowCount: number; spendUsdCents: number; attributedOpenCount: number; }>; exactPeriodWarnings: { code: \"exact_period_excluded\"; reportSource: \"api\" | \"file_import\" | \"unresolved\"; granularity: \"period\" | \"day\" | \"week\"; excludedRowCount: number; }[]; appId: string; view: \"breakdown\" | \"cohorts\"; } | { rows: { spendUsdCents: number; providerInstallCount: number; attributedOpenCount: number; proceedsCoverage: \"unavailable\" | \"actual\" | \"estimated\" | \"mixed\"; paybackDays: number | null; paybackResolution: \"checkpoint\"; recommendation: import(\"/Users/hm/Projects/One/apps/api-core/src/services/provider-connections/acquisition-recommendation\").AcquisitionRecommendation; observedSpendUsdCents: number; observedProviderInstallCount: number; observedAttributedOpenCount: number; observedFirstTimePayerCount: number; observedD30GrossRevenueUsdCents: number; observedSpendFxComplete: boolean; controlsEnabled: boolean; allowedActions: string[]; resourceControl: Record<string, unknown> | null; providerAcquisitionInstallCount: number; providerReactivationInstallCount: number; newDownloadCount: number; redownloadCount: number; paywallViewCount: number; trialStartCount: number; firstTimePayerCount: number; refundCount: number; d0GrossRevenueUsdCents: number; d7GrossRevenueUsdCents: number; d30GrossRevenueUsdCents: number; d90GrossRevenueUsdCents: number; d0RefundUsdCents: number; d7RefundUsdCents: number; d30RefundUsdCents: number; d90RefundUsdCents: number; d0ProceedsUsdCents: number | null; d7ProceedsUsdCents: number | null; d30ProceedsUsdCents: number | null; d90ProceedsUsdCents: number | null; d0NetProceedsUsdCents: number | null; d7NetProceedsUsdCents: number | null; d30NetProceedsUsdCents: number | null; d90NetProceedsUsdCents: number | null; unpaidPositiveSpendCount: number; spendFxIncompleteCount: number; proceedsActualCount: number; proceedsEstimatedCount: number; proceedsMixedCount: number; proceedsUnavailableCount: number; latestComputedAt: Date | null; appId: string; appMappingId: string | null; reportSource: \"api\" | \"file_import\" | \"unresolved\"; cohortType: \"acquisition\" | \"reactivation\"; dimension: \"campaign\" | \"app\" | \"country\" | \"placement\" | \"ad_group\" | \"ad\" | \"keyword\" | \"search_term\"; dimensionKey: string; dimensionLabel: string | null; parentDimension: \"campaign\" | \"app\" | \"country\" | \"placement\" | \"ad_group\" | \"ad\" | \"keyword\" | \"search_term\" | null; parentDimensionKey: string | null; parentDimensionLabel: string | null; }[] | { paybackDays: number | null; paybackResolution: \"checkpoint\"; spendUsdCents: number; providerInstallCount: number; providerAcquisitionInstallCount: number; providerReactivationInstallCount: number; attributedOpenCount: number; newDownloadCount: number; redownloadCount: number; paywallViewCount: number; trialStartCount: number; firstTimePayerCount: number; refundCount: number; d0GrossRevenueUsdCents: number; d7GrossRevenueUsdCents: number; d30GrossRevenueUsdCents: number; d90GrossRevenueUsdCents: number; d0RefundUsdCents: number; d7RefundUsdCents: number; d30RefundUsdCents: number; d90RefundUsdCents: number; d0ProceedsUsdCents: number | null; d7ProceedsUsdCents: number | null; d30ProceedsUsdCents: number | null; d90ProceedsUsdCents: number | null; d0NetProceedsUsdCents: number | null; d7NetProceedsUsdCents: number | null; d30NetProceedsUsdCents: number | null; d90NetProceedsUsdCents: number | null; unpaidPositiveSpendCount: number; spendFxIncompleteCount: number; proceedsActualCount: number; proceedsEstimatedCount: number; proceedsMixedCount: number; proceedsUnavailableCount: number; latestComputedAt: Date | null; appId: string; appMappingId: string | null; reportSource: \"api\" | \"file_import\" | \"unresolved\"; periodStart: string; periodEnd: string; granularity: \"period\" | \"day\" | \"week\"; cohortType: \"acquisition\" | \"reactivation\"; }[]; totalRows: number; hasMore: boolean; nextOffset: number | null; provider: \"apple_ads\" | \"meta_ads\" | \"google_ads\" | \"tiktok_ads\"; dimension: \"campaign\" | \"app\" | \"country\" | \"placement\" | \"ad_group\" | \"ad\" | \"keyword\" | \"search_term\"; decisionWarnings: string[]; sourceCoverage: Record<string, { rowCount: number; spendUsdCents: number; attributedOpenCount: number; }>; exactPeriodWarnings: { code: \"exact_period_excluded\"; reportSource: \"api\" | \"file_import\" | \"unresolved\"; granularity: \"period\" | \"day\" | \"week\"; excludedRowCount: number; }[]; decisionPeriod: { coverageStartDate: string | null; startDate: string; matureEndDate: string; }; appId: string; view: \"breakdown\" | \"cohorts\"; }"
        ]
      },
      "notes": "Read only. Requires reports:read and integrations:read for one allowed Live app. Summary, paginated breakdown and dated cohorts preserve source, maturity, freshness and coverage warnings. Maximum 366 days; imported Basic periods are never prorated.",
      "controllerSignature": "async c => c.json(await getAgentAppleAdsReportPayload(c, await c.req.json().catch(() => null)))"
    }
  ]
}