UNPKG

@mcp-abap-adt/connection

Version:

ABAP connection layer for MCP ABAP ADT server

46 lines 1.57 kB
/** * CSRF Token Configuration * * Centralized constants for CSRF token fetching to ensure consistency * across different connection implementations. */ export declare const CSRF_CONFIG: { /** * Number of retry attempts for CSRF token fetch * Default: 3 attempts (total of 4 requests: initial + 3 retries) */ readonly RETRY_COUNT: 3; /** * Delay between retry attempts (milliseconds) * Default: 1000ms (1 second) */ readonly RETRY_DELAY: 1000; /** * CSRF token endpoint path (primary) * Standard SAP ADT core discovery endpoint (newer systems, returns smaller response) */ readonly ENDPOINT: "/sap/bc/adt/core/discovery"; /** * CSRF token endpoint path (fallback) * Legacy SAP ADT discovery endpoint for older systems (e.g. BASIS < 7.52) * that don't have /sap/bc/adt/core/discovery */ readonly FALLBACK_ENDPOINT: "/sap/bc/adt/discovery"; /** * Required headers for CSRF token fetch */ readonly REQUIRED_HEADERS: { readonly 'x-csrf-token': "fetch"; readonly Accept: "application/atomsvc+xml"; }; }; /** * CSRF token error messages * Standardized error messages for consistent error reporting */ export declare const CSRF_ERROR_MESSAGES: { readonly FETCH_FAILED: (attempts: number, cause: string) => string; readonly NOT_IN_HEADERS: "No CSRF token in response headers"; readonly REQUIRED_FOR_MUTATION: "CSRF token is required for POST/PUT requests but could not be fetched"; }; //# sourceMappingURL=csrfConfig.d.ts.map