import type { IExecuteFunctions, IHookFunctions, ILoadOptionsFunctions, IHttpRequestOptions } from 'n8n-workflow'; import type { SinchCredentials, SinchRegion } from '../nodes/Sinch/types'; export declare function clearTokenCache(): void; /** * Return the Econexus base URL for a given region. */ export declare function getEconexusBaseUrl(region: SinchRegion): string; /** * Return a Conversation API endpoint via the Econexus Sinch Build proxy. */ export declare function getConvAPIEndpoint(region: SinchRegion, path: string): string; /** * Return the Econexus ISS subscriptions URL for a given region. */ export declare function getEconexusIssUrl(region: SinchRegion): string; /** * Headers required by the Econexus Sinch Build proxy. */ export declare function buildSinchBuildProxyHeaders(credentials: SinchCredentials): Record; /** * Get OAuth2.0 access token for Sinch Conversations API. * Caches tokens until they expire (typically 1 hour). * Uses 55-minute cache (5-minute buffer before expiry). */ export declare function getAccessToken(context: IHookFunctions | IExecuteFunctions | ILoadOptionsFunctions, credentials: SinchCredentials): Promise; type SinchRequestContext = IHookFunctions | IExecuteFunctions | ILoadOptionsFunctions; /** * Make an authenticated request to the Sinch Provisioning API. * Uses the same OAuth2.0 token as the Conversations API. * Base URL is always https://provisioning.api.sinch.com (region-independent). */ export declare function makeProvisioningRequest(context: IHookFunctions | IExecuteFunctions | ILoadOptionsFunctions, options: { method: 'GET' | 'POST' | 'DELETE' | 'PUT' | 'PATCH'; endpoint: string; body?: IHttpRequestOptions['body']; qs?: IHttpRequestOptions['qs']; }): Promise; /** * Make an authenticated request to the Sinch API via Econexus. * Handles OAuth2.0 token management and regional endpoints. */ export declare function makeSinchRequest(context: SinchRequestContext, options: { method: 'GET' | 'POST' | 'DELETE' | 'PUT' | 'PATCH'; endpoint: string; body?: IHttpRequestOptions['body']; qs?: IHttpRequestOptions['qs']; }): Promise; /** * Make an authenticated request to the Econexus ISS API. */ export declare function makeIssRequest(context: SinchRequestContext, options: { method: 'GET' | 'POST' | 'DELETE' | 'PUT' | 'PATCH'; subscriptionId?: string; body?: IHttpRequestOptions['body']; }): Promise; export {};