declare enum AdaptiveDeliveryAction {
    IGNORE = "ignore",
    OPTIMIZE = "optimize"
}

declare interface Address {
    address: string;
    weight?: number | null;
    server_role?: ServerRole;
    is_active?: boolean;
}

declare interface ApiApplication extends ApiBaseApplicationPayload {
    id: number;
}

export declare interface ApiBaseApplicationPayload {
    name: string;
    delivery_protocol?: DeliveryProtocol;
    http3?: boolean;
    http_port?: HttpPort[];
    https_port?: HttpsPort[];
    minimum_tls_version?: TlsVersion;
    active?: boolean;
    debug_rules?: boolean;
    application_acceleration?: boolean;
    caching?: boolean;
    device_detection?: boolean;
    edge_firewall?: boolean;
    edge_functions?: boolean;
    image_optimization?: boolean;
    l2_caching?: boolean;
    load_balancer?: boolean;
    raw_logs?: boolean;
    web_application_firewall?: boolean;
    supported_ciphers?: SupportedCiphers;
}

export declare interface ApiBaseCacheSettingPayload {
    name: string;
    browser_cache_settings?: BrowserCacheSettings;
    browser_cache_settings_maximum_ttl?: number;
    cdn_cache_settings?: CdnCacheSettings;
    cdn_cache_settings_maximum_ttl?: number;
    cache_by_query_string?: CacheByQueryString;
    query_string_fields?: string[];
    enable_query_string_sort?: boolean;
    cache_by_cookies?: CacheByCookies;
    cookie_names?: string[];
    adaptive_delivery_action?: AdaptiveDeliveryAction;
    device_group?: string[];
    enable_caching_for_post?: boolean;
    l2_caching_enabled?: boolean;
    is_slice_configuration_enabled?: boolean;
    is_slice_edge_caching_enabled?: boolean;
    is_slice_l2_caching_enabled?: boolean;
    slice_configuration_range?: number;
    enable_caching_for_options?: boolean;
    enable_stale_cache?: boolean;
    l2_region?: string | null;
}

declare interface ApiBaseDeviceGroupPayload {
    name: string;
    user_agent: string;
}

export declare interface ApiBaseFunctionInstancePayload {
    name: string;
    code: string;
    language: 'JavaScript';
    initiator_type: 'edge_application' | 'edge_firewall';
    active: boolean;
    json_args: Record<string, unknown>;
}

declare interface ApiCacheSetting extends ApiBaseCacheSettingPayload {
    id: number;
}

declare interface ApiCreateApplicationPayload extends ApiBaseApplicationPayload {
}

declare interface ApiCreateCacheSettingPayload extends ApiBaseCacheSettingPayload {
}

declare interface ApiCreateDeviceGroupPayload extends ApiBaseDeviceGroupPayload {
}

declare interface ApiCreateFunctionInstancePayload {
    name: string;
    edge_function_id: number;
    args: Record<string, unknown>;
    active?: boolean;
}

export declare type ApiCreateOriginPayload = Omit<ApiOrigin, 'id' | 'method'> & {
    origin_path?: string;
    hmac_authentication?: boolean;
    hmac_region_name?: string;
    hmac_access_key?: string;
    hmac_secret_key?: string;
    connection_timeout?: number;
    timeout_between_bytes?: number;
};

export declare interface ApiCreateRulePayload {
    name: string;
    phase: 'request' | 'response';
    behaviors: Behavior[];
    criteria: Criterion[][];
    is_active?: boolean;
    order?: number;
    description?: string;
}

export declare interface ApiCreateRulePayload {
    name: string;
    phase: 'request' | 'response';
    behaviors: Behavior[];
    criteria: Criterion[][];
    is_active?: boolean;
    order?: number;
    description?: string;
}

declare interface ApiFunctionInstance extends ApiBaseFunctionInstancePayload {
    id: number;
}

export declare interface ApiListApplicationsParams {
    page?: number;
    page_size?: number;
    sort?: 'name' | 'id';
    order_by?: string;
}

export declare interface ApiListCacheSettingsParams {
    page?: number;
    page_size?: number;
    sort?: 'name' | 'id';
    order?: 'asc' | 'desc';
}

declare interface ApiListDeviceGroupsParams {
    page?: number;
    page_size?: number;
    sort?: 'name' | 'id';
    order?: 'asc' | 'desc';
}

export declare interface ApiListFunctionInstancesParams {
    page?: number;
    page_size?: number;
    sort?: 'name' | 'id';
    order?: 'asc' | 'desc';
    order_by?: string;
    filter?: string;
}

export declare interface ApiListOriginsParams {
    page?: number;
    page_size?: number;
    sort?: 'name' | 'id';
    order?: OrderDirection;
    filter?: string;
}

export declare interface ApiListRulesParams {
    page?: number;
    page_size?: number;
    sort?: string;
    order?: 'asc' | 'desc';
    filter?: string;
}

export declare interface ApiListRulesParams {
    page?: number;
    page_size?: number;
    sort?: string;
    order?: 'asc' | 'desc';
    filter?: string;
}

export declare interface ApiListRulesParams {
    page?: number;
    page_size?: number;
    sort?: string;
    order?: 'asc' | 'desc';
    filter?: string;
}

declare interface ApiOrigin {
    id: number;
    origin_key: string;
    name: string;
    origin_type: OriginType;
    addresses: Address[];
    origin_protocol_policy: OriginProtocolPolicy;
    is_origin_redirection_enabled: boolean;
    host_header: string;
    method: string;
    origin_path: string;
    connection_timeout: number;
    timeout_between_bytes: number;
    hmac_authentication: boolean;
    hmac_region_name: string;
    hmac_access_key: string;
    hmac_secret_key: string;
}

declare interface ApiRuleResponse {
    results: Rule;
    schema_version: number;
}

declare interface ApiRuleResponse {
    results: Rule;
    schema_version: number;
}

export declare interface ApiUpdateApplicationPayload extends Partial<ApiBaseApplicationPayload> {
}

export declare interface ApiUpdateCacheSettingPayload extends Partial<ApiBaseCacheSettingPayload> {
}

declare interface ApiUpdateDeviceGroupPayload extends Partial<ApiBaseDeviceGroupPayload> {
}

export declare interface ApiUpdateFunctionInstancePayload extends Partial<ApiBaseFunctionInstancePayload> {
}

export declare type ApiUpdateOriginRequest = Partial<ApiCreateOriginPayload> & {
    id: number;
};

export declare interface ApiUpdateRulePayload extends Partial<ApiCreateRulePayload> {
}

export declare interface ApiUpdateRulePayload extends Partial<ApiCreateRulePayload> {
}

/**
 * Interface representing an Azion Application with all its associated operations.
 *
 * @interface AzionApplication
 * @extends ApiApplication
 */
export declare interface AzionApplication extends ApiApplication {
    /**
     * Operations related to cache settings for the application.
     * @type {CacheOperations}
     *
     * @example
     * // Creating a new cache setting
     * const { error, data } = await application.cache.createCacheSetting({
     *   data: {
     *     name: 'My Cache Setting',
     *     browser_cache_settings: 'override',
     *     cdn_cache_settings: 'override',
     *     cache_by_query_string: 'ignore'
     *   }
     * });
     * if (error) {
     *   console.error('Error:', error);
     * } else {
     *   console.log('Created cache setting:', data);
     * }
     */
    cache: CacheOperations;
    /**
     * Operations related to origins for the application.
     * @type {OriginOperations}
     *
     * @example
     * // Creating a new origin
     * const { error, data } = await application.origins.createOrigin({
     *   data: {
     *     name: 'My Origin',
     *     addresses: [{ address: 'example.com' }],
     *     origin_type: 'single_origin',
     *     host_header: 'example.com'
     *   }
     * });
     * if (error) {
     *   console.error('Error:', error);
     * } else {
     *   console.log('Created origin:', data);
     * }
     */
    origins: OriginOperations;
    /**
     * Operations related to rules for the application.
     * @type {{ request: RuleOperations; response: RuleOperations }}
     */
    rules: {
        /**
         * Operations for request rules.
         * @type {RuleOperations}
         *
         * @example
         * // Creating a new request rule
         * const { error, data } = await application.rules.request.createRule({
         *   data: {
         *     name: 'My Request Rule',
         *     phase: 'request',
         *     behaviors: [{ name: 'set_origin', target: 'origin1' }],
         *     criteria: [[{ conditional: 'if', input: '${uri}', operator: 'starts_with', value: '/api' }]]
         *   }
         * });
         * if (error) {
         *   console.error('Error:', error);
         * } else {
         *   console.log('Created request rule:', data);
         * }
         */
        request: RuleOperations;
        /**
         * Operations for response rules.
         * @type {RuleOperations}
         *
         * @example
         * // Creating a new response rule
         * const { error, data } = await application.rules.response.createRule({
         *   data: {
         *     name: 'My Response Rule',
         *     phase: 'response',
         *     behaviors: [{ name: 'add_response_header', target: 'X-Custom-Header', value: 'CustomValue' }],
         *     criteria: [[{ conditional: 'if', input: '${status}', operator: 'is_equal', value: '200' }]]
         *   }
         * });
         * if (error) {
         *   console.error('Error:', error);
         * } else {
         *   console.log('Created response rule:', data);
         * }
         */
        response: RuleOperations;
    };
    /**
     * Operations related to device groups for the application.
     * @type {DeviceGroupOperations}
     *
     * @example
     * // Creating a new device group
     * const { error, data } = await application.devices.createDeviceGroup({
     *   data: {
     *     name: 'Mobile Devices',
     *     user_agent: 'Mobile|Android|iPhone|iPad|iPod'
     *   }
     * });
     * if (error) {
     *   console.error('Error:', error);
     * } else {
     *   console.log('Created device group:', data);
     * }
     */
    devices: DeviceGroupOperations;
    /**
     * Operations related to functions for the application.
     * @type {FunctionOperations}
     *
     * @example
     * // Creating a new function instance
     * const { error, data } = await application.functions.createFunctionInstance({
     *   data: {
     *     name: 'My Function',
     *     edge_function_id: 5678,
     *     args: {}
     *   }
     * });
     * if (error) {
     *   console.error('Error:', error);
     * } else {
     *   console.log('Created function instance:', data);
     * }
     */
    functions: FunctionOperations;
}

/**
 * Options for retrieving a collection of Azion applications.
 *
 * @interface AzionApplicationCollectionOptions
 * @property {number} [page] - The page number for pagination.
 * @property {number} [page_size] - The number of items per page.
 * @property {'name' | 'id'} [sort] - The field to sort the results by.
 * @property {string} [order_by] - The order of the sorting (e.g., 'asc' or 'desc').
 */
export declare interface AzionApplicationCollectionOptions {
    page?: number;
    page_size?: number;
    sort?: 'name' | 'id';
    order_by?: string;
}

/**
 * Generic response structure for Azion API calls returning collections.
 *
 * @interface AzionApplicationCollectionResponse
 * @template T - The type of items in the collection.
 * @property {{ count: number; total_pages: number; schema_version: number; links: { previous: string | null; next: string | null }; results: T[] }} [data] - The collection data.
 * @property {{ message: string; operation: string }} [error] - Error information if the call failed.
 */
export declare interface AzionApplicationCollectionResponse<T> {
    data?: {
        count: number;
        total_pages: number;
        schema_version: number;
        links: {
            previous: string | null;
            next: string | null;
        };
        results: T[];
    };
    error?: {
        message: string;
        operation: string;
    };
}

/**
 * Generic response structure for Azion API calls.
 *
 * @interface AzionApplicationResponse
 * @template T - The type of data returned in the response.
 * @property {T} [data] - The response data.
 * @property {{ message: string; operation: string }} [error] - Error information if the call failed.
 */
export declare interface AzionApplicationResponse<T> {
    data?: T;
    error?: {
        message: string;
        operation: string;
    };
}

/**
 * Interface for the Azion Application Client, providing methods to interact with Azion Edge Applications.
 *
 * @interface AzionApplicationsClient
 */
export declare interface AzionApplicationsClient {
    /**
     * Creates a new Azion Edge Application.
     *
     * @function
     * @name AzionApplicationsClient.createApplication
     * @param {Object} params - The parameters for creating an application.
     * @param {ApiCreateApplicationPayload} params.data - The data for the new application.

     * @returns {Promise<AzionApplicationResponse<AzionApplication>>} A promise that resolves with the created application data or an error.
     *
     * @example
     * const { error, data } = await applicationClient.createApplication({
     *   data: {
     *     name: 'My New Application',
     *     delivery_protocol: 'http',
     *     origin_type: 'single_origin',
     *     address: 'example.com'
     *   },
     *   options: { debug: true }
     * });
     * if (error) {
     *   console.error('Error:', error);
     * } else {
     *   console.log('Created application:', data);
     * }
     */
    createApplication: (params: {
        data: ApiCreateApplicationPayload;
        options?: AzionClientOptions;
    }) => Promise<AzionApplicationResponse<AzionApplication>>;
    /**
     * Retrieves a specific Azion Edge Application.
     *
     * @function
     * @name AzionApplicationsClient.getApplication
     * @param {Object} params - The parameters for retrieving an application.
     * @param {number} params.applicationId - The ID of the application to retrieve.

     * @returns {Promise<AzionApplicationResponse<AzionApplication>>} A promise that resolves with the application data or an error.
     *
     * @example
     * const { error, data } = await applicationClient.getApplication({
     *   applicationId: 123,
     *   options: { debug: true }
     * });
     * if (error) {
     *   console.error('Error:', error);
     * } else {
     *   console.log('Retrieved application:', data);
     * }
     */
    getApplication: (params: {
        applicationId: number;
        options?: AzionClientOptions;
    }) => Promise<AzionApplicationResponse<AzionApplication>>;
    /**
     * Retrieves a list of Azion Edge Applications.
     *
     * @function
     * @name AzionApplicationsClient.getApplications
     * @param {Object} params - The parameters for retrieving applications.
     * @param {AzionApplicationCollectionOptions} [params.params] - Optional parameters for filtering and pagination.

     * @returns {Promise<AzionApplicationCollectionResponse<AzionApplication>>} A promise that resolves with a collection of applications or an error.
     *
     * @example
     * const { error, data } = await applicationClient.getApplications({
     *   params: { page: 1, page_size: 20 },
     *   options: { debug: true }
     * });
     * if (error) {
     *   console.error('Error:', error);
     * } else {
     *   console.log('Retrieved applications:', data.results);
     * }
     */
    getApplications: (params: {
        params?: AzionApplicationCollectionOptions;
        options?: AzionClientOptions;
    }) => Promise<AzionApplicationCollectionResponse<AzionApplication>>;
    /**
     * Updates an existing Azion Edge Application.
     *
     * @function
     * @name AzionApplicationsClient.putApplication
     * @param {Object} params - The parameters for updating an application.
     * @param {number} params.applicationId - The ID of the application to update.
     * @param {ApiUpdateApplicationPayload} params.data - The updated data for the application.

     * @returns {Promise<AzionApplicationResponse<AzionApplication>>} A promise that resolves with the updated application data or an error.
     *
     * @example
     * const { error, data } = await applicationClient.putApplication({
     *   applicationId: 123,
     *   data: {
     *     name: 'Updated Application',
     *     delivery_protocol: 'https'
     *   },
     *   options: { debug: true }
     * });
     * if (error) {
     *   console.error('Error:', error);
     * } else {
     *   console.log('Updated application:', data);
     * }
     */
    putApplication: (params: {
        applicationId: number;
        data: ApiUpdateApplicationPayload;
        options?: AzionClientOptions;
    }) => Promise<AzionApplicationResponse<AzionApplication>>;
    /**
     * Deletes an Azion Edge Application.
     *
     * @function
     * @name AzionApplicationsClient.deleteApplication
     * @param {Object} params - The parameters for deleting an application.
     * @param {number} params.applicationId - The ID of the application to delete.

     * @returns {Promise<AzionApplicationResponse<void>>} A promise that resolves when the application is deleted or rejects with an error.
     *
     * @example
     * const { error, data } = await applicationClient.deleteApplication({
     *   applicationId: 123,
     *   options: { debug: true }
     * });
     * if (error) {
     *   console.error('Error:', error);
     * } else {
     *   console.log('Application deleted successfully');
     * }
     */
    deleteApplication: (params: {
        applicationId: number;
        options?: AzionClientOptions;
    }) => Promise<AzionApplicationResponse<void>>;
    /**
     * Partially updates an existing Azion Edge Application.
     *
     * @function
     * @name AzionApplicationsClient.patchApplication
     * @param {Object} params - The parameters for partially updating an application.
     * @param {number} params.applicationId - The ID of the application to update.
     * @param {Partial<ApiUpdateApplicationPayload>} params.data - The partial data for updating the application.

     * @returns {Promise<AzionApplicationResponse<AzionApplication>>} A promise that resolves with the updated application data or an error.
     *
     * @example
     * const { error, data } = await applicationClient.patchApplication({
     *   applicationId: 123,
     *   data: { name: 'Partially Updated Application' },
     *   options: { debug: true }
     * });
     * if (error) {
     *   console.error('Error:', error);
     * } else {
     *   console.log('Partially updated application:', data);
     * }
     */
    patchApplication: (params: {
        applicationId: number;
        data: Partial<ApiUpdateApplicationPayload>;
        options?: AzionClientOptions;
    }) => Promise<AzionApplicationResponse<AzionApplication>>;
}

export declare type AzionApplicationSettings = ApiApplication;

export declare type AzionCacheSetting = ApiCacheSetting;

/**
 * @fileoverview This module defines the types and interfaces used throughout the Azion Application SDK.
 * It includes definitions for client options, response structures, and operation interfaces for various
 * Azion Edge Application features such as cache settings, origins, rules, device groups, and functions.
 * @module application/types
 */
/**
 * Options for configuring the Azion client behavior.
 *
 * @interface AzionClientOptions
 * @property {boolean} [debug] - Enable debug mode for detailed logging.
 * @property {boolean} [force] - Force the operation even if it might be destructive.
 */
export declare interface AzionClientOptions {
    debug?: boolean;
    force?: boolean;
}

export declare interface AzionDeviceGroup {
    id: number;
    name: string;
    user_agent: string;
}

export declare type AzionFunctionInstance = ApiFunctionInstance;

export declare type AzionOrigin = ApiOrigin;

export declare type AzionRule = ApiRuleResponse['results'];

declare interface Behavior {
    name: string;
    target?: string | null | BehaviorTarget;
}

declare interface Behavior {
    name: string;
    target?: string | null | BehaviorTarget;
}

declare interface BehaviorTarget {
    captured_array: string;
    subject: string;
    regex: string;
}

declare interface BehaviorTarget {
    captured_array: string;
    subject: string;
    regex: string;
}

declare enum BrowserCacheSettings {
    HONOR = "honor",
    OVERRIDE = "override",
    IGNORE = "ignore"
}

declare enum CacheByCookies {
    IGNORE = "ignore",
    WHITELIST = "whitelist",
    BLACKLIST = "blacklist",
    ALL = "all"
}

declare enum CacheByQueryString {
    IGNORE = "ignore",
    WHITELIST = "whitelist",
    BLACKLIST = "blacklist",
    ALL = "all"
}

/**
 * Interface for cache setting operations.
 *
 * @interface CacheOperations
 */
export declare interface CacheOperations {
    /**
     * Creates a new cache setting.
     *
     * @function
     * @name CacheOperations.createCacheSetting
     * @param {Object} params - The parameters for creating a cache setting.
     * @param {ApiCreateCacheSettingPayload} params.data - The data for the new cache setting.
     * @returns {Promise<AzionApplicationResponse<AzionCacheSetting>>} A promise that resolves with the created cache setting data or an error.
     *
     * @example
     * const { error, data } = await cacheOperations.createCacheSetting({
     *   data: {
     *     name: 'My Cache Setting',
     *     browser_cache_settings: 'override',
     *     cdn_cache_settings: 'override',
     *     cache_by_query_string: 'ignore',
     *     cookie_names: ['session_id'],
     *     enable_stale_cache: true
     *   },
     *   options: { debug: true }
     * });
     * if (error) {
     *   console.error('Error:', error);
     * } else {
     *   console.log('Created cache setting:', data);
     * }
     */
    createCacheSetting: (params: {
        data: ApiCreateCacheSettingPayload;
        options?: AzionClientOptions;
    }) => Promise<AzionApplicationResponse<AzionCacheSetting>>;
    /**
     * Retrieves a specific cache setting.
     *
     * @function
     * @name CacheOperations.getCacheSetting
     * @param {Object} params - The parameters for retrieving a cache setting.
     * @param {number} params.cacheSettingId - The ID of the cache setting to retrieve.

     * @returns {Promise<AzionApplicationResponse<AzionCacheSetting>>} A promise that resolves with the cache setting data or an error.
     *
     * @example
     * const { error, data } = await cacheOperations.getCacheSetting({
     *   cacheSettingId: 123,
     *   options: { debug: true }
     * });
     * if (error) {
     *   console.error('Error:', error);
     * } else {
     *   console.log('Retrieved cache setting:', data);
     * }
     */
    getCacheSetting: (params: {
        cacheSettingId: number;
        options?: AzionClientOptions;
    }) => Promise<AzionApplicationResponse<AzionCacheSetting>>;
    /**
     * Retrieves a list of cache settings.
     *
     * @function
     * @name CacheOperations.getCacheSettings
     * @param {Object} params - The parameters for retrieving cache settings.
     * @param {ApiListCacheSettingsParams} [params.params] - Optional parameters for filtering and pagination.

     * @returns {Promise<AzionApplicationCollectionResponse<AzionCacheSetting>>} A promise that resolves with a collection of cache settings or an error.
     *
     * @example
     * const { error, data } = await cacheOperations.getCacheSettings({
     *   params: { page: 1, page_size: 20 },
     *   options: { debug: true }
     * });
     * if (error) {
     *   console.error('Error:', error);
     * } else {
     *   console.log('Retrieved cache settings:', data.results);
     * }
     */
    getCacheSettings: (params: {
        params?: ApiListCacheSettingsParams;
        options?: AzionClientOptions;
    }) => Promise<AzionApplicationCollectionResponse<AzionCacheSetting>>;
    /**
     * Updates an existing cache setting.
     *
     * @function
     * @name CacheOperations.updateCacheSetting
     * @param {Object} params - The parameters for updating a cache setting.
     * @param {number} params.cacheSettingId - The ID of the cache setting to update.
     * @param {ApiUpdateCacheSettingPayload} params.data - The updated data for the cache setting.

     * @returns {Promise<AzionApplicationResponse<AzionCacheSetting>>} A promise that resolves with the updated cache setting data or an error.
     *
     * @example
     * const { error, data } = await cacheOperations.updateCacheSetting({
     *   cacheSettingId: 123,
     *   data: {
     *     name: 'Updated Cache Setting',
     *     browser_cache_settings: 'honor',
     *     cdn_cache_settings: 'honor'
     *   },
     *   options: { debug: true }
     * });
     * if (error) {
     *   console.error('Error:', error);
     * } else {
     *   console.log('Updated cache setting:', data);
     * }
     */
    updateCacheSetting: (params: {
        cacheSettingId: number;
        data: ApiUpdateCacheSettingPayload;
        options?: AzionClientOptions;
    }) => Promise<AzionApplicationResponse<AzionCacheSetting>>;
    /**
     * Deletes a cache setting.
     *
     * @function
     * @name CacheOperations.deleteCacheSetting
     * @param {Object} params - The parameters for deleting a cache setting.
     * @param {number} params.cacheSettingId - The ID of the cache setting to delete.

     * @returns {Promise<AzionApplicationResponse<void>>} A promise that resolves when the cache setting is deleted or rejects with an error.
     *
     * @example
     * const { error, data } = await cacheOperations.deleteCacheSetting({
     *   cacheSettingId: 123,
     *   options: { debug: true }
     * });
     * if (error) {
     *   console.error('Error:', error);
     * } else {
     *   console.log('Cache setting deleted successfully');
     * }
     */
    deleteCacheSetting: (params: {
        cacheSettingId: number;
        options?: AzionClientOptions;
    }) => Promise<AzionApplicationResponse<void>>;
}

declare enum CdnCacheSettings {
    HONOR = "honor",
    OVERRIDE = "override"
}

/**
 * Creates a new Azion Edge Application.
 *
 * @async
 * @function
 * @param {Object} params - The parameters for creating an application.
 * @param {ApiCreateApplicationPayload} params.data - The data for the new application.
 * @param {AzionClientOptions} [params.options] - Optional client options.
 * @returns {Promise<AzionApplicationResponse<AzionApplication>>} A promise that resolves with the created application data or an error.
 *
 * @example
 * const result = await createApplication({
 *   data: { name: 'My New App', delivery_protocol: 'http' },
 *   options: { debug: true }
 * });
 * if (result.data) {
 *   console.log('Application created:', result.data);
 * } else {
 *   console.error('Error:', result.error);
 * }
 */
export declare const createApplication: ({ data, options, }: {
    data: ApiCreateApplicationPayload;
    options?: AzionClientOptions;
}) => Promise<AzionApplicationResponse<AzionApplication>>;

/**
 * Function type for creating an Azion Application Client.
 *
 * @param {Object} [config] - Configuration options for the application client.
 * @param {string} [config.token] - Authentication token for Azion API. If not provided,
 * the client will attempt to use the AZION_TOKEN environment variable.
 * @param {AzionClientOptions} [config.options] - Additional client options.
 *
 * @returns {AzionApplicationsClient} An instance of the Azion Application Client.
 *
 * @example
 * // Create an application client with a token and debug mode enabled
 * const appClient = createAzionApplicationClient({
 *   token: 'your-api-token',
 *   options: { debug: true }
 * });
 *
 * @example
 * // Create an application client using environment variables for token
 * const appClient = createAzionApplicationClient();
 */
export declare type CreateAzionApplicationClient = (config?: Partial<{
    token: string;
    options?: AzionClientOptions;
}>) => AzionApplicationsClient;

declare const createAzionApplicationClient: CreateAzionApplicationClient;
export { createAzionApplicationClient }
export default createAzionApplicationClient;

/**
 * Wrapper function to create a new cache setting for a specific application.
 *
 * @param {Object} params - Parameters for creating a cache setting.
 * @param {number} params.applicationId - Application ID.
 * @param {ApiBaseCacheSettingPayload} params.data - Data for the cache setting to be created.
 * @param {AzionClientOptions} [params.options] - Client options including debug mode.
 * @returns {Promise<AzionApplicationResponse<AzionCacheSetting>>} The created cache setting or an error.
 *
 * @example
 * const { error, data } = await createCacheSetting({
 *   applicationId: 1234,
 *   data: { name: 'My Cache Setting', browser_cache_settings: 'override' },
 *   options: { debug: true }
 * });
 * if (error) {
 *   console.error('Failed to create cache setting:', error);
 * } else {
 *   console.log('Cache setting created:', data.name);
 * }
 */
export declare const createCacheSetting: ({ applicationId, data, options, }: {
    applicationId: number;
    data: ApiBaseCacheSettingPayload;
    options?: AzionClientOptions;
}) => Promise<AzionApplicationResponse<AzionCacheSetting>>;

/**
 * Function to create a new device group for a specific application.
 *
 * @param {Object} params - Parameters for creating a device group.
 * @param {number} params.applicationId - Application ID.
 * @param {ApiCreateDeviceGroupPayload} params.data - Data for the device group to be created.
 * @param {AzionClientOptions} [params.options] - Client options including debug mode.
 * @returns {Promise<AzionApplicationResponse<AzionDeviceGroup>>} The created device group or an error.
 *
 * @example
 * const { error, data } = await createDeviceGroup({
 *   applicationId: 1234,
 *   data: { name: 'My Device Group', user_agent: 'Mozilla/5.0' },
 *   options: { debug: true }
 * });
 * if (error) {
 *   console.error('Failed to create device group:', error);
 * } else {
 *   console.log('Device group created:', data.name);
 * }
 */
export declare const createDeviceGroup: ({ applicationId, data, options, }: {
    applicationId: number;
    data: ApiCreateDeviceGroupPayload;
    options?: AzionClientOptions;
}) => Promise<AzionApplicationResponse<AzionDeviceGroup>>;

/**
 * Create a new function instance for a specific application.
 *
 * @param {Object} params - Parameters for creating a function instance.
 * @param {number} params.applicationId - Application ID.
 * @param {ApiCreateFunctionInstancePayload} params.data - Data for the function instance to be created.
 * @param {AzionClientOptions} [params.options] - Client options including debug mode.
 * @returns {Promise<AzionApplicationResponse<AzionFunctionInstance>>} The created function instance or an error.
 *
 * @example
 * const { error, data } = await createFunctionInstance({
 *   applicationId: 1234,
 *   data: {
 *     name: 'My Function Instance',
 *     edge_function_id: 5678,
 *     args: {}
 *   },
 *   options: { debug: true }
 * });
 * if (error) {
 *   console.error('Failed to create function instance:', error);
 * } else {
 *   console.log('Function instance created:', data.name);
 * }
 */
export declare const createFunctionInstance: ({ applicationId, data, options, }: {
    applicationId: number;
    data: ApiCreateFunctionInstancePayload;
    options?: AzionClientOptions;
}) => Promise<AzionApplicationResponse<AzionFunctionInstance>>;

/**
 * Creates a new origin for a specific application.
 *
 * @param {Object} params - Parameters for creating an origin.
 * @param {number} params.applicationId - Application ID.
 * @param {ApiCreateOriginPayload} params.data - Data for the origin to be created.
 * @param {AzionClientOptions} [params.options] - Client options including debug mode.
 * @returns {Promise<AzionApplicationResponse<AzionOrigin>>} The created origin or an error.
 *
 * @example
 * const { error, data } = await createOrigin({
 *   applicationId: 1234,
 *   data: {
 *     name: 'My New Origin',
 *     addresses: [{ address: 'example.com' }],
 *     origin_type: 'single_origin'
 *   },
 *   options: { debug: true }
 * });
 * if (error) {
 *   console.error('Failed to create origin:', error);
 * } else {
 *   console.log('Origin created:', data);
 * }
 */
export declare const createOrigin: ({ applicationId, data, options, }: {
    applicationId: number;
    data: ApiCreateOriginPayload;
    options?: AzionClientOptions;
}) => Promise<AzionApplicationResponse<AzionOrigin>>;

/**
 * Creates a new rule for an Azion Edge Application.
 *
 * @async
 * @function
 * @param {Object} params - The parameters for creating a rule.
 * @param {number} params.applicationId - The ID of the application to create the rule for.
 * @param {'request' | 'response'} params.phase - The phase of the rule (request or response).
 * @param {ApiCreateRulePayload} params.data - The data for the new rule.
 * @param {AzionClientOptions} [params.options] - Optional client options.
 * @returns {Promise<AzionApplicationResponse<AzionRule>>} A promise that resolves with the created rule data or an error.
 *
 * @example
 * const { error, data } = await createRule({
 *   applicationId: 123,
 *   phase: 'request',
 *   data: { name: 'My New Rule', behaviors: [...] },
 *   options: { debug: true }
 * });
 * if (error) {
 *   console.error('Error:', error);
 * } else {
 *   console.log('Rule created:', data);
 * }
 */
export declare const createRule: ({ applicationId, phase, data, options, }: {
    applicationId: number;
    phase: "request" | "response";
    data: ApiCreateRulePayload;
    options?: AzionClientOptions;
}) => Promise<AzionApplicationResponse<AzionRule>>;

declare interface Criterion {
    variable: string;
    operator: string;
    conditional: 'if' | 'and' | 'or';
    input_value: string;
}

declare interface Criterion {
    variable: string;
    operator: string;
    conditional: 'if' | 'and' | 'or';
    input_value: string;
}

/**
 * Deletes an Azion Edge Application.
 *
 * @async
 * @function
 * @param {Object} params - The parameters for deleting an application.
 * @param {number} params.applicationId - The ID of the application to delete.
 * @param {AzionClientOptions} [params.options] - Optional client options.
 * @returns {Promise<AzionApplicationResponse<void>>} A promise that resolves when the application is deleted or rejects with an error.
 *
 * @example
 * const result = await deleteApplication({
 *   applicationId: 123,
 *   options: { debug: true }
 * });
 * if (result.data !== undefined) {
 *   console.log('Application deleted successfully');
 * } else {
 *   console.error('Error:', result.error);
 * }
 */
export declare const deleteApplication: ({ applicationId, options, }: {
    applicationId: number;
    options?: AzionClientOptions;
}) => Promise<AzionApplicationResponse<void>>;

/**
 * Wrapper function to delete a specific cache setting from an application.
 *
 * @param {Object} params - Parameters for deleting a cache setting.
 * @param {number} params.applicationId - Application ID.
 * @param {number} params.cacheSettingId - Cache setting ID to delete.
 * @param {AzionClientOptions} [params.options] - Client options including debug mode.
 * @returns {Promise<AzionApplicationResponse<void>>} A response indicating success or an error.
 *
 * @example
 * const { error, data } = await deleteCacheSetting({
 *   applicationId: 1234,
 *   cacheSettingId: 5678,
 *   options: { debug: true }
 * });
 * if (error) {
 *   console.error('Failed to delete cache setting:', error);
 * } else {
 *   console.log('Cache setting deleted successfully');
 * }
 */
export declare const deleteCacheSetting: ({ applicationId, cacheSettingId, options, }: {
    applicationId: number;
    cacheSettingId: number;
    options?: AzionClientOptions;
}) => Promise<AzionApplicationResponse<void>>;

/**
 * Function to delete a specific device group from an application.
 *
 * @param {Object} params - Parameters for deleting a device group.
 * @param {number} params.applicationId - Application ID.
 * @param {number} params.deviceGroupId - Device group ID to delete.
 * @param {AzionClientOptions} [params.options] - Client options including debug mode.
 * @returns {Promise<AzionApplicationResponse<void>>} A response indicating success or an error.
 *
 * @example
 * const { error, data } = await deleteDeviceGroup({
 *   applicationId: 1234,
 *   deviceGroupId: 5678,
 *   options: { debug: true }
 * });
 * if (error) {
 *   console.error('Failed to delete device group:', error);
 * } else {
 *   console.log('Device group deleted successfully');
 * }
 */
export declare const deleteDeviceGroup: ({ applicationId, deviceGroupId, options, }: {
    applicationId: number;
    deviceGroupId: number;
    options?: AzionClientOptions;
}) => Promise<AzionApplicationResponse<void>>;

/**
 * Delete a function instance from a specific application.
 *
 * @param {Object} params - Parameters for deleting a function instance.
 * @param {number} params.applicationId - Application ID.
 * @param {number} params.functionInstanceId - ID of the function instance to delete.
 * @param {AzionClientOptions} [params.options] - Client options including debug mode.
 * @returns {Promise<AzionApplicationResponse<void>>} Confirmation of deletion or an error.
 *
 * @example
 * const { error, data } = await deleteFunctionInstance({
 *   applicationId: 1234,
 *   functionInstanceId: 5678,
 *   options: { debug: true }
 * });
 * if (error) {
 *   console.error('Failed to delete function instance:', error);
 * } else {
 *   console.log('Function instance deleted successfully');
 * }
 */
export declare const deleteFunctionInstance: ({ applicationId, functionInstanceId, options, }: {
    applicationId: number;
    functionInstanceId: number;
    options?: AzionClientOptions;
}) => Promise<AzionApplicationResponse<void>>;

/**
 * Deletes a specific origin from an application.
 *
 * @param {Object} params - Parameters for deleting an origin.
 * @param {number} params.applicationId - Application ID.
 * @param {string} params.originKey - Key of the origin to delete.
 * @param {AzionClientOptions} [params.options] - Client options including debug mode.
 * @returns {Promise<AzionApplicationResponse<void>>} A response indicating success or an error.
 *
 * @example
 * const { error, data } = await deleteOrigin({
 *   applicationId: 1234,
 *   originKey: 'origin-key',
 *   options: { debug: true }
 * });
 * if (error) {
 *   console.error('Failed to delete origin:', error);
 * } else {
 *   console.log('Origin deleted successfully');
 * }
 */
export declare const deleteOrigin: ({ applicationId, originKey, options, }: {
    applicationId: number;
    originKey: string;
    options?: AzionClientOptions;
}) => Promise<AzionApplicationResponse<void>>;

/**
 * Deletes a rule from an Azion Edge Application.
 *
 * @async
 * @function
 * @param {Object} params - The parameters for deleting a rule.
 * @param {number} params.applicationId - The ID of the application containing the rule.
 * @param {'request' | 'response'} params.phase - The phase of the rule (request or response).
 * @param {number} params.ruleId - The ID of the rule to delete.
 * @param {AzionClientOptions} [params.options] - Optional client options.
 * @returns {Promise<AzionApplicationResponse<void>>} A promise that resolves when the rule is deleted or rejects with an error.
 *
 * @example
 * const { error, data } = await deleteRule({
 *   applicationId: 123,
 *   phase: 'request',
 *   ruleId: 456,
 *   options: { debug: true }
 * });
 * if (error) {
 *   console.error('Error:', error);
 * } else {
 *   console.log('Rule deleted successfully');
 * }
 */
export declare const deleteRule: ({ applicationId, phase, ruleId, options, }: {
    applicationId: number;
    phase: "request" | "response";
    ruleId: number;
    options?: AzionClientOptions;
}) => Promise<AzionApplicationResponse<void>>;

export declare enum DeliveryProtocol {
    HTTP = "http",
    HTTPS = "https",
    HTTP_HTTPS = "http,https"
}

/**
 * Interface for device group operations.
 *
 * @interface DeviceGroupOperations
 */
export declare interface DeviceGroupOperations {
    /**
     * Creates a new device group.
     *
     * @function
     * @name DeviceGroupOperations.createDeviceGroup
     * @param {Object} params - The parameters for creating a device group.
     * @param {ApiCreateDeviceGroupPayload} params.data - The data for the new device group.

     * @returns {Promise<AzionApplicationResponse<AzionDeviceGroup>>} A promise that resolves with the created device group data or an error.
     *
     * @example
     * const { error, data } = await deviceGroupOperations.createDeviceGroup({
     *   data: {
     *     name: 'Mobile Devices',
     *     user_agent: 'Mobile|Android|iPhone|iPad|iPod'
     *   },
     *   options: { debug: true }
     * });
     * if (error) {
     *   console.error('Error:', error);
     * } else {
     *   console.log('Created device group:', data);
     * }
     */
    createDeviceGroup: (params: {
        data: ApiCreateDeviceGroupPayload;
        options?: AzionClientOptions;
    }) => Promise<AzionApplicationResponse<AzionDeviceGroup>>;
    /**
     * Retrieves a specific device group.
     *
     * @function
     * @name DeviceGroupOperations.getDeviceGroup
     * @param {Object} params - The parameters for retrieving a device group.
     * @param {number} params.deviceGroupId - The ID of the device group to retrieve.

     * @returns {Promise<AzionApplicationResponse<AzionDeviceGroup>>} A promise that resolves with the device group data or an error.
     *
     * @example
     * const { error, data } = await deviceGroupOperations.getDeviceGroup({
     *   deviceGroupId: 123,
     *   options: { debug: true }
     * });
     * if (error) {
     *   console.error('Error:', error);
     * } else {
     *   console.log('Retrieved device group:', data);
     * }
     */
    getDeviceGroup: (params: {
        deviceGroupId: number;
        options?: AzionClientOptions;
    }) => Promise<AzionApplicationResponse<AzionDeviceGroup>>;
    /**
     * Retrieves a list of device groups.
     *
     * @function
     * @name DeviceGroupOperations.getDeviceGroups
     * @param {Object} params - The parameters for retrieving device groups.
     * @param {ApiListDeviceGroupsParams} [params.params] - Optional parameters for filtering and pagination.

     * @returns {Promise<AzionApplicationCollectionResponse<AzionDeviceGroup>>} A promise that resolves with a collection of device groups or an error.
     *
     * @example
     * const { error, data } = await deviceGroupOperations.getDeviceGroups({
     *   params: { page: 1, page_size: 20 },
     *   options: { debug: true }
     * });
     * if (error) {
     *   console.error('Error:', error);
     * } else {
     *   console.log('Retrieved device groups:', data.results);
     * }
     */
    getDeviceGroups: (params: {
        params?: ApiListDeviceGroupsParams;
        options?: AzionClientOptions;
    }) => Promise<AzionApplicationCollectionResponse<AzionDeviceGroup>>;
    /**
     * Updates an existing device group.
     *
     * @function
     * @name DeviceGroupOperations.updateDeviceGroup
     * @param {Object} params - The parameters for updating a device group.
     * @param {number} params.deviceGroupId - The ID of the device group to update.
     * @param {ApiUpdateDeviceGroupPayload} params.data - The updated data for the device group.

     * @returns {Promise<AzionApplicationResponse<AzionDeviceGroup>>} A promise that resolves with the updated device group data or an error.
     *
     * @example
     * const { error, data } = await deviceGroupOperations.updateDeviceGroup({
     *   deviceGroupId: 123,
     *   data: {
     *     name: 'Updated Mobile Devices',
     *     user_agent: 'Mobile|Android|iPhone|iPad|iPod|BlackBerry'
     *   },
     *   options: { debug: true }
     * });
     * if (error) {
     *   console.error('Error:', error);
     * } else {
     *   console.log('Updated device group:', data);
     * }
     */
    updateDeviceGroup: (params: {
        deviceGroupId: number;
        data: ApiUpdateDeviceGroupPayload;
        options?: AzionClientOptions;
    }) => Promise<AzionApplicationResponse<AzionDeviceGroup>>;
    /**
     * Deletes a device group.
     *
     * @function
     * @name DeviceGroupOperations.deleteDeviceGroup
     * @param {Object} params - The parameters for deleting a device group.
     * @param {number} params.deviceGroupId - The ID of the device group to delete.

     * @returns {Promise<AzionApplicationResponse<void>>} A promise that resolves when the device group is deleted or rejects with an error.
     *
     * @example
     * const { error, data } = await deviceGroupOperations.deleteDeviceGroup({
     *   deviceGroupId: 123,
     *   options: { debug: true }
     * });
     * if (error) {
     *   console.error('Error:', error);
     * } else {
     *   console.log('Device group deleted successfully');
     * }
     */
    deleteDeviceGroup: (params: {
        deviceGroupId: number;
        options?: AzionClientOptions;
    }) => Promise<AzionApplicationResponse<void>>;
}

/**
 * Interface for function operations.
 *
 * @interface FunctionOperations
 */
export declare interface FunctionOperations {
    /**
     * Creates a new function instance.
     *
     * @function
     * @name FunctionOperations.createFunctionInstance
     * @param {Object} params - The parameters for creating a function instance.
     * @param {ApiCreateFunctionInstancePayload} params.data - The data for the new function instance.

     * @returns {Promise<AzionApplicationResponse<AzionFunctionInstance>>} A promise that resolves with the created function instance data or an error.
     *
     * @example
     * const { error, data } = await functionOperations.createFunctionInstance({
     *   data: {
     *     name: 'My Function',
     *     code: 'async function handleRequest(request) { return new Response("Hello, World!"); }',
     *     language: 'javascript'
     *   },
     *   options: { debug: true }
     * });
     * if (error) {
     *   console.error('Error:', error);
     * } else {
     *   console.log('Created function instance:', data);
     * }
     */
    createFunctionInstance: (params: {
        data: ApiCreateFunctionInstancePayload;
        options?: AzionClientOptions;
    }) => Promise<AzionApplicationResponse<AzionFunctionInstance>>;
    /**
     * Retrieves a specific function instance.
     *
     * @function
     * @name FunctionOperations.getFunctionInstance
     * @param {Object} params - The parameters for retrieving a function instance.
     * @param {number} params.functionInstanceId - The ID of the function instance to retrieve.

     * @returns {Promise<AzionApplicationResponse<AzionFunctionInstance>>} A promise that resolves with the function instance data or an error.
     *
     * @example
     * const { error, data } = await functionOperations.getFunctionInstance({
     *   functionInstanceId: 123,
     *   options: { debug: true }
     * });
     * if (error) {
     *   console.error('Error:', error);
     * } else {
     *   console.log('Retrieved function instance:', data);
     * }
     */
    getFunctionInstance: (params: {
        functionInstanceId: number;
        options?: AzionClientOptions;
    }) => Promise<AzionApplicationResponse<AzionFunctionInstance>>;
    /**
     * Retrieves a list of function instances.
     *
     * @function
     * @name FunctionOperations.getFunctionInstances
     * @param {Object} params - The parameters for retrieving function instances.
     * @param {ApiListFunctionInstancesParams} [params.params] - Optional parameters for filtering and pagination.

     * @returns {Promise<AzionApplicationCollectionResponse<AzionFunctionInstance>>} A promise that resolves with a collection of function instances or an error.
     *
     * @example
     * const { error, data } = await functionOperations.getFunctionInstances({
     *   params: { page: 1, page_size: 20 },
     *   options: { debug: true }
     * });
     * if (error) {
     *   console.error('Error:', error);
     * } else {
     *   console.log('Retrieved function instances:', data.results);
     * }
     */
    getFunctionInstances: (params: {
        params?: ApiListFunctionInstancesParams;
        options?: AzionClientOptions;
    }) => Promise<AzionApplicationCollectionResponse<AzionFunctionInstance>>;
    /**
     * Updates an existing function instance.
     *
     * @function
     * @name FunctionOperations.updateFunctionInstance
     * @param {Object} params - The parameters for updating a function instance.
     * @param {number} params.functionInstanceId - The ID of the function instance to update.
     * @param {ApiUpdateFunctionInstancePayload} params.data - The updated data for the function instance.

     * @returns {Promise<AzionApplicationResponse<AzionFunctionInstance>>} A promise that resolves with the updated function instance data or an error.
     *
     * @example
     * const { error, data } = await functionOperations.updateFunctionInstance({
     *   functionInstanceId: 123,
     *   data: {
     *     name: 'Updated Function',
     *     code: 'async function handleRequest(request) { return new Response("Hello, Updated World!"); }'
     *   },
     *   options: { debug: true }
     * });
     * if (error) {
     *   console.error('Error:', error);
     * } else {
     *   console.log('Updated function instance:', data);
     * }
     */
    updateFunctionInstance: (params: {
        functionInstanceId: number;
        data: ApiUpdateFunctionInstancePayload;
        options?: AzionClientOptions;
    }) => Promise<AzionApplicationResponse<AzionFunctionInstance>>;
    /**
     * Deletes a function instance.
     *
     * @function
     * @name FunctionOperations.deleteFunctionInstance
     * @param {Object} params - The parameters for deleting a function instance.
     * @param {number} params.functionInstanceId - The ID of the function instance to delete.

     * @returns {Promise<AzionApplicationResponse<void>>} A promise that resolves when the function instance is deleted or rejects with an error.
     *
     * @example
     * const { error, data } = await functionOperations.deleteFunctionInstance({
     *   functionInstanceId: 123,
     *   options: { debug: true }
     * });
     * if (error) {
     *   console.error('Error:', error);
     * } else {
     *   console.log('Function instance deleted successfully');
     * }
     */
    deleteFunctionInstance: (params: {
        functionInstanceId: number;
        options?: AzionClientOptions;
    }) => Promise<AzionApplicationResponse<void>>;
}

/**
 * Retrieves a specific Azion Edge Application by ID.
 *
 * @async
 * @function
 * @param {Object} params - The parameters for retrieving an application.
 * @param {number} params.applicationId - The ID of the application to retrieve.
 * @param {AzionClientOptions} [params.options] - Optional client options.
 * @returns {Promise<AzionApplicationResponse<AzionApplication>>} A promise that resolves with the application data or an error.
 *
 * @example
 * const result = await getApplication({
 *   applicationId: 123,
 *   options: { debug: true }
 * });
 * if (result.data) {
 *   console.log('Application retrieved:', result.data);
 * } else {
 *   console.error('Error:', result.error);
 * }
 */
export declare const getApplication: ({ applicationId, options, }: {
    applicationId: number;
    options?: AzionClientOptions;
}) => Promise<AzionApplicationResponse<AzionApplication>>;

/**
 * Retrieves a list of Azion Edge Applications.
 *
 * @async
 * @function
 * @param {Object} [params] - The parameters for retrieving applications.
 * @param {ApiListApplicationsParams} [params.params] - Optional parameters for filtering and pagination.
 * @param {AzionClientOptions} [params.options] - Optional client options.
 * @returns {Promise<AzionApplicationCollectionResponse<AzionApplication>>} A promise that resolves with a collection of applications or an error.
 *
 * @example
 * const result = await getApplicationsWrapper();
 * // ou
 * const result = await getApplicationsWrapper({
 *   params: { page: 1, page_size: 20 },
 *   options: { debug: true }
 * });
 * if (result.data) {
 *   console.log('Applications retrieved:', result.data.results);
 * } else {
 *   console.error('Error:', result.error);
 * }
 */
export declare const getApplications: (params?: {
    params?: ApiListApplicationsParams;
    options?: AzionClientOptions;
}) => Promise<AzionApplicationCollectionResponse<AzionApplication>>;

/**
 * Function to retrieve a specific cache setting from an application.
 *
 * @param {Object} params - Parameters for retrieving a cache setting.
 * @param {number} params.applicationId - Application ID.
 * @param {number} params.cacheSettingId - Cache setting ID.
 * @param {AzionClientOptions} [params.options] - Client options including debug mode.
 * @returns {Promise<AzionApplicationResponse<AzionCacheSetting>>} The retrieved cache setting or an error.
 *
 * @example
 * const { error, data } = await getCacheSetting({
 *   applicationId: 1234,
 *   cacheSettingId: 5678,
 *   options: { debug: true }
 * });
 * if (error) {
 *   console.error('Failed to get cache setting:', error);
 * } else {
 *   console.log('Retrieved cache setting:', data.name);
 * }
 */
export declare const getCacheSetting: ({ applicationId, cacheSettingId, options, }: {
    applicationId: number;
    cacheSettingId: number;
    options?: AzionClientOptions;
}) => Promise<AzionApplicationResponse<AzionCacheSetting>>;

/**
 * Wrapper function to retrieve a list of cache settings for a specific application.
 *
 * @param {Object} params - Parameters for listing cache settings.
 * @param {number} params.applicationId - Application ID.
 * @param {ApiListCacheSettingsParams} [params.params] - Parameters for filtering and pagination.
 * @param {AzionClientOptions} [params.options] - Client options including debug mode.
 * @returns {Promise<AzionApplicationCollectionResponse<AzionCacheSetting>>} A collection of cache settings or an error.
 *
 * @example
 * const { error, data } = await getCacheSettings({
 *   applicationId: 1234,
 *   params: { page: 1, page_size: 20 },
 *   options: { debug: true }
 * });
 * if (error) {
 *   console.error('Failed to get cache settings:', error);
 * } else {
 *   console.log(`Retrieved ${data.results.length} cache settings`);
 * }
 */
export declare const getCacheSettings: ({ applicationId, params, options, }: {
    applicationId: number;
    params?: ApiListCacheSettingsParams;
    options?: AzionClientOptions;
}) => Promise<AzionApplicationCollectionResponse<AzionCacheSetting>>;

/**
 * Function to retrieve a specific device group from an application.
 *
 * @param {Object} params - Parameters for retrieving a device group.
 * @param {number} params.applicationId - Application ID.
 * @param {number} params.deviceGroupId - Device group ID.
 * @param {AzionClientOptions} [params.options] - Client options including debug mode.
 * @returns {Promise<AzionApplicationResponse<AzionDeviceGroup>>} The retrieved device group or an error.
 *
 * @example
 * const { error, data } = await getDeviceGroup({
 *   applicationId: 1234,
 *   deviceGroupId: 5678,
 *   options: { debug: true }
 * });
 * if (error) {
 *   console.error('Failed to get device group:', error);
 * } else {
 *   console.log('Retrieved device group:', data.name);
 * }
 */
export declare const getDeviceGroup: ({ applicationId, deviceGroupId, options, }: {
    applicationId: number;
    deviceGroupId: number;
    options?: AzionClientOptions;
}) => Promise<AzionApplicationResponse<AzionDeviceGroup>>;

/**
 * Function to retrieve a list of device groups for a specific application.
 *
 * @param {Object} params - Parameters for listing device groups.
 * @param {number} params.applicationId - Application ID.
 * @param {ApiListDeviceGroupsParams} [params.params] - Parameters for filtering and pagination.
 * @param {AzionClientOptions} [params.options] - Client options including debug mode.
 * @returns {Promise<AzionApplicationCollectionResponse<AzionDeviceGroup>>} A collection of device groups or an error.
 *
 * @example
 * const { error, data } = await getDeviceGroups({
 *   applicationId: 1234,
 *   params: { page: 1, page_size: 20 },
 *   options: { debug: true }
 * });
 * if (error) {
 *   console.error('Failed to get device groups:', error);
 * } else {
 *   console.log(`Retrieved ${data.results.length} device groups`);
 * }
 */
export declare const getDeviceGroups: ({ applicationId, params, options, }: {
    applicationId: number;
    params?: ApiListDeviceGroupsParams;
    options?: AzionClientOptions;
}) => Promise<AzionApplicationCollectionResponse<AzionDeviceGroup>>;

/**
 * Retrieve a specific function instance from an application.
 *
 * @param {Object} params - Parameters for retrieving a function instance.
 * @param {number} params.applicationId - Application ID.
 * @param {number} params.functionInstanceId - ID of the function instance to retrieve.
 * @param {AzionClientOptions} [params.options] - Client options including debug mode.
 * @returns {Promise<AzionApplicationResponse<AzionFunctionInstance>>} The retrieved function instance or an error.
 *
 * @example
 * const { error, data } = await getFunctionInstance({
 *   applicationId: 1234,
 *   functionInstanceId: 5678,
 *   options: { debug: true }
 * });
 * if (error) {
 *   console.error('Failed to get function instance:', error);
 * } else {
 *   console.log('Retrieved function instance:', data.name);
 * }
 */
export declare const getFunctionInstance: ({ applicationId, functionInstanceId, options, }: {
    applicationId: number;
    functionInstanceId: number;
    options?: AzionClientOptions;
}) => Promise<AzionApplicationResponse<AzionFunctionInstance>>;

/**
 * List all function instances for a specific application.
 *
 * @param {Object} params - Parameters for listing function instances.
 * @param {number} params.applicationId - Application ID.
 * @param {ApiListFunctionInstancesParams} [params.params] - Optional parameters for filtering and pagination.
 * @param {AzionClientOptions} [params.options] - Client options including debug mode.
 * @returns {Promise<AzionApplicationCollectionResponse<AzionFunctionInstance>>} A collection of function instances or an error.
 *
 * @example
 * const { error, data } = await getFunctionInstances({
 *   applicationId: 1234,
 *   params: { page: 1, page_size: 20, sort: 'name', order: 'asc' },
 *   options: { debug: true }
 * });
 * if (error) {
 *   console.error('Failed to get function instances:', error);
 * } else {
 *   console.log('Function instances:', data.results);
 * }
 */
export declare const getFunctionInstances: ({ applicationId, params, options, }: {
    applicationId: number;
    params?: ApiListFunctionInstancesParams;
    options?: AzionClientOptions;
}) => Promise<AzionApplicationCollectionResponse<AzionFunctionInstance>>;

/**
 * Retrieves a specific origin from an application.
 *
 * @param {Object} params - Parameters for retrieving an origin.
 * @param {number} params.applicationId - Application ID.
 * @param {string} params.originKey - Key of the origin to retrieve.
 * @param {AzionClientOptions} [params.options] - Client options including debug mode.
 * @returns {Promise<AzionApplicationResponse<AzionOrigin>>} The retrieved origin or an error.
 *
 * @example
 * const { error, data } = await getOrigin({
 *   applicationId: 1234,
 *   originKey: 'origin-key',
 *   options: { debug: true }
 * });
 * if (error) {
 *   console.error('Failed to get origin:', error);
 * } else {
 *   console.log('Retrieved origin:', data);
 * }
 */
export declare const getOrigin: ({ applicationId, originKey, options, }: {
    applicationId: number;
    originKey: string;
    options?: AzionClientOptions;
}) => Promise<AzionApplicationResponse<AzionOrigin>>;

/**
 * Retrieves a list of origins for a specific application.
 *
 * @param {Object} params - Parameters for listing origins.
 * @param {number} params.applicationId - Application ID.
 * @param {ApiListOriginsParams} [params.params] - Parameters for filtering and pagination.
 * @param {AzionClientOptions} [params.options] - Client options including debug mode.
 * @returns {Promise<AzionApplicationCollectionResponse<AzionOrigin>>} A collection of origins or an error.
 *
 * @example
 * const { error, data } = await getOrigins({
 *   applicationId: 1234,
 *   params: { page: 1, page_size: 20 },
 *   options: { debug: true }
 * });
 * if (error) {
 *   console.error('Failed to get origins:', error);
 * } else {
 *   console.log('Retrieved origins:', data.results);
 * }
 */
export declare const getOrigins: ({ applicationId, params, options, }: {
    applicationId: number;
    params?: ApiListOriginsParams;
    options?: AzionClientOptions;
}) => Promise<AzionApplicationCollectionResponse<AzionOrigin>>;

/**
 * Retrieves a specific rule from an Azion Edge Application.
 *
 * @async
 * @function
 * @param {Object} params - The parameters for retrieving a rule.
 * @param {number} params.applicationId - The ID of the application containing the rule.
 * @param {'request' | 'response'} params.phase - The phase of the rule (request or response).
 * @param {number} params.ruleId - The ID of the rule to retrieve.
 * @param {AzionClientOptions} [params.options] - Optional client options.
 * @returns {Promise<AzionApplicationResponse<AzionRule>>} A promise that resolves with the rule data or an error.
 *
 * @example
 * const { error, data } = await getRule({
 *   applicationId: 123,
 *   phase: 'request',
 *   ruleId: 456,
 *   options: { debug: true }
 * });
 * if (error) {
 *   console.error('Error:', error);
 * } else {
 *   console.log('Rule retrieved:', data);
 * }
 */
export declare const getRule: ({ applicationId, phase, ruleId, options, }: {
    applicationId: number;
    phase: "request" | "response";
    ruleId: number;
    options?: AzionClientOptions;
}) => Promise<AzionApplicationResponse<AzionRule>>;

/**
 * Retrieves a list of rules for an Azion Edge Application.
 *
 * @async
 * @function
 * @param {Object} params - The parameters for retrieving rules.
 * @param {number} params.applicationId - The ID of the application to retrieve rules from.
 * @param {'request' | 'response'} params.phase - The phase of the rules to retrieve (request or response).
 * @param {ApiListRulesParams} [params.params] - Optional parameters for filtering and pagination.
 * @param {AzionClientOptions} [params.options] - Optional client options.
 * @returns {Promise<AzionApplicationCollectionResponse<AzionRule>>} A promise that resolves with a collection of rules or an error.
 *
 * @example
 * const { error, data } = await getRules({
 *   applicationId: 123,
 *   phase: 'request',
 *   params: { page: 1, page_size: 20 },
 *   options: { debug: true }
 * });
 * if (error) {
 *   console.error('Error:', error);
 * } else {
 *   console.log('Rules retrieved:', data.results);
 * }
 */
export declare const getRules: ({ applicationId, phase, params, options, }: {
    applicationId: number;
    phase: "request" | "response";
    params?: ApiListRulesParams;
    options?: AzionClientOptions;
}) => Promise<AzionApplicationCollectionResponse<AzionRule>>;

export declare enum HttpPort {
    PORT_80 = 80,
    PORT_8008 = 8008,
    PORT_8080 = 8080
}

export declare enum HttpsPort {
    PORT_443 = 443,
    PORT_8443 = 8443,
    PORT_9440 = 9440,
    PORT_9441 = 9441,
    PORT_9442 = 9442,
    PORT_9443 = 9443
}

declare enum OrderDirection {
    ASC = "asc",
    DESC = "desc"
}

/**
 * Interface for origin operations.
 *
 * @interface OriginOperations
 */
export declare interface OriginOperations {
    /**
     * Creates a new origin.
     *
     * @function
     * @name OriginOperations.createOrigin
     * @param {Object} params - The parameters for creating an origin.
     * @param {ApiCreateOriginPayload} params.data - The data for the new origin.

     * @returns {Promise<AzionApplicationResponse<AzionOrigin>>} A promise that resolves with the created origin data or an error.
     *
     * @example
     * const { error, data } = await originOperations.createOrigin({
     *   data: {
     *     name: 'My Origin',
     *     origin_type: 'single_origin',
     *     addresses: [{ address: 'example.com' }],
     *     host_header: 'example.com'
     *   },
     *   options: { debug: true }
     * });
     * if (error) {
     *   console.error('Error:', error);
     * } else {
     *   console.log('Created origin:', data);
     * }
     */
    createOrigin: (params: {
        data: ApiCreateOriginPayload;
        options?: AzionClientOptions;
    }) => Promise<AzionApplicationResponse<AzionOrigin>>;
    /**
     * Retrieves a specific origin.
     *
     * @function
     * @name OriginOperations.getOrigin
     * @param {Object} params - The parameters for retrieving an origin.
     * @param {string} params.originKey - The key of the origin to retrieve.

     * @returns {Promise<AzionApplicationResponse<AzionOrigin>>} A promise that resolves with the origin data or an error.
     *
     * @example
     * const { error, data } = await originOperations.getOrigin({
     *   originKey: 'abc123',
     *   options: { debug: true }
     * });
     * if (error) {
     *   console.error('Error:', error);
     * } else {
     *   console.log('Retrieved origin:', data);
     * }
     */
    getOrigin: (params: {
        originKey: string;
        options?: AzionClientOptions;
    }) => Promise<AzionApplicationResponse<AzionOrigin>>;
    /**
     * Retrieves a list of origins.
     *
     * @function
     * @name OriginOperations.getOrigins
     * @param {Object} params - The parameters for retrieving origins.
     * @param {ApiListOriginsParams} [params.params] - Optional parameters for filtering and pagination.

     * @returns {Promise<AzionApplicationCollectionResponse<AzionOrigin>>} A promise that resolves with a collection of origins or an error.
     *
     * @example
     * const { error, data } = await originOperations.getOrigins({
     *   params: { page: 1, page_size: 20 },
     *   options: { debug: true }
     * });
     * if (error) {
     *   console.error('Error:', error);
     * } else {
     *   console.log('Retrieved origins:', data.results);
     * }
     */
    getOrigins: (params: {
        params?: ApiListOriginsParams;
        options?: AzionClientOptions;
    }) => Promise<AzionApplicationCollectionResponse<AzionOrigin>>;
    /**
     * Updates an existing origin.
     *
     * @function
     * @name OriginOperations.updateOrigin
     * @param {Object} params - The parameters for updating an origin.
     * @param {string} params.originKey - The key of the origin to update.
     * @param {ApiUpdateOriginRequest} params.data - The updated data for the origin.

     * @returns {Promise<AzionApplicationResponse<AzionOrigin>>} A promise that resolves with the updated origin data or an error.
     *
     * @example
     * const { error, data } = await originOperations.updateOrigin({
     *   originKey: 'abc123',
     *   data: {
     *     name: 'Updated Origin',
     *     host_header: 'updated-example.com'
     *   },
     *   options: { debug: true }
     * });
     * if (error) {
     *   console.error('Error:', error);
     * } else {
     *   console.log('Updated origin:', data);
     * }
     */
    updateOrigin: (params: {
        originKey: string;
        data: ApiUpdateOriginRequest;
        options?: AzionClientOptions;
    }) => Promise<AzionApplicationResponse<AzionOrigin>>;
    /**
     * Deletes an origin.
     *
     * @function
     * @name OriginOperations.deleteOrigin
     * @param {Object} params - The parameters for deleting an origin.
     * @param {string} params.originKey - The key of the origin to delete.

     * @returns {Promise<AzionApplicationResponse<void>>} A promise that resolves when the origin is deleted or rejects with an error.
     *
     * @example
     * const { error, data } = await originOperations.deleteOrigin({
     *   originKey: 'abc123',
     *   options: { debug: true }
     * });
     * if (error) {
     *   console.error('Error:', error);
     * } else {
     *   console.log('Origin deleted successfully');
     * }
     */
    deleteOrigin: (params: {
        originKey: string;
        options?: AzionClientOptions;
    }) => Promise<AzionApplicationResponse<void>>;
}

declare enum OriginProtocolPolicy {
    PRESERVE = "preserve",
    HTTP = "http",
    HTTPS = "https"
}

declare enum OriginType {
    SINGLE_ORIGIN = "single_origin",
    LOAD_BALANCER = "load_balancer"
}

/**
 * Partially updates an existing Azion Edge Application.
 *
 * @async
 * @function
 * @param {Object} params - The parameters for patching an application.
 * @param {number} params.applicationId - The ID of the application to patch.
 * @param {Partial<ApiUpdateApplicationPayload>} params.data - The partial data to update in the application.
 * @param {AzionClientOptions} [params.options] - Optional client options.
 * @returns {Promise<AzionApplicationResponse<AzionApplication>>} A promise that resolves with the patched application data or an error.
 *
 * @example
 * const result = await patchApplication({
 *   applicationId: 123,
 *   data: { delivery_protocol: 'https' },
 *   options: { debug: true }
 * });
 * if (result.data) {
 *   console.log('Application patched:', result.data);
 * } else {
 *   console.error('Error:', result.error);
 * }
 */
export declare const patchApplication: ({ applicationId, data, options, }: {
    applicationId: number;
    data: Partial<ApiUpdateApplicationPayload>;
    options?: AzionClientOptions;
}) => Promise<AzionApplicationResponse<AzionApplication>>;

/**
 * Updates an existing Azion Edge Application.
 *
 * @async
 * @function
 * @param {Object} params - The parameters for updating an application.
 * @param {number} params.applicationId - The ID of the application to update.
 * @param {ApiUpdateApplicationPayload} params.data - The updated data for the application.
 * @param {AzionClientOptions} [params.options] - Optional client options.
 * @returns {Promise<AzionApplicationResponse<AzionApplication>>} A promise that resolves with the updated application data or an error.
 *
 * @example
 * const result = await putApplication({
 *   applicationId: 123,
 *   data: { name: 'Updated App Name' },
 *   options: { debug: true }
 * });
 * if (result.data) {
 *   console.log('Application updated:', result.data);
 * } else {
 *   console.error('Error:', result.error);
 * }
 */
export declare const putApplication: ({ applicationId, data, options, }: {
    applicationId: number;
    data: ApiUpdateApplicationPayload;
    options?: AzionClientOptions;
}) => Promise<AzionApplicationResponse<AzionApplication>>;

declare interface Rule {
    id: number;
    name: string;
    phase: 'request' | 'response';
    behaviors: Behavior[];
    criteria: Criterion[][];
    is_active: boolean;
    order: number;
    description?: string;
}

declare interface Rule {
    id: number;
    name: string;
    phase: 'request' | 'response';
    behaviors: Behavior[];
    criteria: Criterion[][];
    is_active: boolean;
    order: number;
    description?: string;
}

/**
 * Interface for rule operations.
 *
 * @interface RuleOperations
 */
export declare interface RuleOperations {
    /**
     * Creates a new rule.
     *
     * @function
     * @name RuleOperations.createRule
     * @param {Object} params - The parameters for creating a rule.
     * @param {ApiCreateRulePayload} params.data - The data for the new rule.

     * @returns {Promise<AzionApplicationResponse<AzionRule>>} A promise that resolves with the created rule data or an error.
     *
     * @example
     * const { error, data } = await ruleOperations.createRule({
     *   data: {
     *     name: 'My Rule',
     *     phase: 'request',
     *     behaviors: [{ name: 'set_origin', target: 'origin1' }],
     *     criteria: [[{ conditional: 'if', input: '${uri}', operator: 'starts_with', value: '/api' }]]
     *   },
     *   options: { debug: true }
     * });
     * if (error) {
     *   console.error('Error:', error);
     * } else {
     *   console.log('Created rule:', data);
     * }
     */
    createRule: (params: {
        data: ApiCreateRulePayload;
        options?: AzionClientOptions;
    }) => Promise<AzionApplicationResponse<AzionRule>>;
    /**
     * Retrieves a specific rule.
     *
     * @function
     * @name RuleOperations.getRule
     * @param {Object} params - The parameters for retrieving a rule.
     * @param {number} params.ruleId - The ID of the rule to retrieve.

     * @returns {Promise<AzionApplicationResponse<AzionRule>>} A promise that resolves with the rule data or an error.
     *
     * @example
     * const { error, data } = await ruleOperations.getRule({
     *   ruleId: 123,
     *   options: { debug: true }
     * });
     * if (error) {
     *   console.error('Error:', error);
     * } else {
     *   console.log('Retrieved rule:', data);
     * }
     */
    getRule: (params: {
        ruleId: number;
        options?: AzionClientOptions;
    }) => Promise<AzionApplicationResponse<AzionRule>>;
    /**
     * Retrieves a list of rules.
     *
     * @function
     * @name RuleOperations.getRules
     * @param {Object} params - The parameters for retrieving rules.
     * @param {ApiListRulesParams} [params.params] - Optional parameters for filtering and pagination.

     * @returns {Promise<AzionApplicationCollectionResponse<AzionRule>>} A promise that resolves with a collection of rules or an error.
     *
     * @example
     * const { error, data } = await ruleOperations.getRules({
     *   params: { page: 1, page_size: 20 },
     *   options: { debug: true }
     * });
     * if (error) {
     *   console.error('Error:', error);
     * } else {
     *   console.log('Retrieved rules:', data.results);
     * }
     */
    getRules: (params: {
        params?: ApiListRulesParams;
        options?: AzionClientOptions;
    }) => Promise<AzionApplicationCollectionResponse<AzionRule>>;
    /**
     * Updates an existing rule.
     *
     * @function
     * @name RuleOperations.updateRule
     * @param {Object} params - The parameters for updating a rule.
     * @param {number} params.ruleId - The ID of the rule to update.
     * @param {ApiUpdateRulePayload} params.data - The updated data for the rule.

     * @returns {Promise<AzionApplicationResponse<AzionRule>>} A promise that resolves with the updated rule data or an error.
     *
     * @example
     * const { error, data } = await ruleOperations.updateRule({
     *   ruleId: 123,
     *   data: {
     *     name: 'Updated Rule',
     *     behaviors: [{ name: 'set_origin', target: 'origin2' }]
     *   },
     *   options: { debug: true }
     * });
     * if (error) {
     *   console.error('Error:', error);
     * } else {
     *   console.log('Updated rule:', data);
     * }
     */
    updateRule: (params: {
        ruleId: number;
        data: ApiUpdateRulePayload;
        options?: AzionClientOptions;
    }) => Promise<AzionApplicationResponse<AzionRule>>;
    /**
     * Deletes a rule.
     *
     * @function
     * @name RuleOperations.deleteRule
     * @param {Object} params - The parameters for deleting a rule.
     * @param {number} params.ruleId - The ID of the rule to delete.

     * @returns {Promise<AzionApplicationResponse<void>>} A promise that resolves when the rule is deleted or rejects with an error.
     *
     * @example
     * const { error, data } = await ruleOperations.deleteRule({
     *   ruleId: 123,
     *   options: { debug: true }
     * });
     * if (error) {
     *   console.error('Error:', error);
     * } else {
     *   console.log('Rule deleted successfully');
     * }
     */
    deleteRule: (params: {
        ruleId: number;
        options?: AzionClientOptions;
    }) => Promise<AzionApplicationResponse<void>>;
}

declare enum ServerRole {
    PRIMARY = "primary",
    BACKUP = "backup"
}

export declare enum SupportedCiphers {
    ALL = "all",
    TLSv1_2_2018 = "TLSv1.2_2018",
    TLSv1_2_2019 = "TLSv1.2_2019",
    TLSv1_2_2021 = "TLSv1.2_2021",
    TLSv1_3_2022 = "TLSv1.3_2022"
}

export declare enum TlsVersion {
    TLS_1_0 = "tls_1_0",
    TLS_1_1 = "tls_1_1",
    TLS_1_2 = "tls_1_2",
    TLS_1_3 = "tls_1_3"
}

/**
 * Wrapper function to update an existing cache setting for a specific application.
 *
 * @param {Object} params - Parameters for updating a cache setting.
 * @param {number} params.applicationId - Application ID.
 * @param {number} params.cacheSettingId - Cache setting ID to update.
 * @param {ApiUpdateCacheSettingPayload} params.data - Updated data for the cache setting.
 * @param {AzionClientOptions} [params.options] - Client options including debug mode.
 * @returns {Promise<AzionApplicationResponse<AzionCacheSetting>>} The updated cache setting or an error.
 *
 * @example
 * const { error, data } = await updateCacheSetting({
 *   applicationId: 1234,
 *   cacheSettingId: 5678,
 *   data: { name: 'Updated Cache Setting' },
 *   options: { debug: true }
 * });
 * if (error) {
 *   console.error('Failed to update cache setting:', error);
 * } else {
 *   console.log('Updated cache setting:', data.name);
 * }
 */
export declare const updateCacheSetting: ({ applicationId, cacheSettingId, data, options, }: {
    applicationId: number;
    cacheSettingId: number;
    data: ApiUpdateCacheSettingPayload;
    options?: AzionClientOptions;
}) => Promise<AzionApplicationResponse<AzionCacheSetting>>;

/**
 * Function to update an existing device group for a specific application.
 *
 * @param {Object} params - Parameters for updating a device group.
 * @param {number} params.applicationId - Application ID.
 * @param {number} params.deviceGroupId - Device group ID to update.
 * @param {ApiUpdateDeviceGroupPayload} params.data - Updated data for the device group.
 * @param {AzionClientOptions} [params.options] - Client options including debug mode.
 * @returns {Promise<AzionApplicationResponse<AzionDeviceGroup>>} The updated device group or an error.
 *
 * @example
 * const { error, data } = await updateDeviceGroup({
 *   applicationId: 1234,
 *   deviceGroupId: 5678,
 *   data: { name: 'Updated Device Group' },
 *   options: { debug: true }
 * });
 * if (error) {
 *   console.error('Failed to update device group:', error);
 * } else {
 *   console.log('Updated device group:', data.name);
 * }
 */
export declare const updateDeviceGroup: ({ applicationId, deviceGroupId, data, options, }: {
    applicationId: number;
    deviceGroupId: number;
    data: ApiUpdateDeviceGroupPayload;
    options?: AzionClientOptions;
}) => Promise<AzionApplicationResponse<AzionDeviceGroup>>;

/**
 * Update an existing function instance in a specific application.
 *
 * @param {Object} params - Parameters for updating a function instance.
 * @param {number} params.applicationId - Application ID.
 * @param {number} params.functionInstanceId - ID of the function instance to update.
 * @param {ApiUpdateFunctionInstancePayload} params.data - New data for the function instance.
 * @param {AzionClientOptions} [params.options] - Client options including debug mode.
 * @returns {Promise<AzionApplicationResponse<AzionFunctionInstance>>} The updated function instance or an error.
 *
 * @example
 * const { error, data } = await updateFunctionInstance({
 *   applicationId: 1234,
 *   functionInstanceId: 5678,
 *   data: {
 *     name: 'Updated Function Instance',
 *     args: { key: 'new value' }
 *   },
 *   options: { debug: true }
 * });
 * if (error) {
 *   console.error('Failed to update function instance:', error);
 * } else {
 *   console.log('Updated function instance:', data);
 * }
 */
export declare const updateFunctionInstance: ({ applicationId, functionInstanceId, data, options, }: {
    applicationId: number;
    functionInstanceId: number;
    data: ApiUpdateFunctionInstancePayload;
    options?: AzionClientOptions;
}) => Promise<AzionApplicationResponse<AzionFunctionInstance>>;

/**
 * Updates an existing origin in a specific application.
 *
 * @param {Object} params - Parameters for updating an origin.
 * @param {number} params.applicationId - Application ID.
 * @param {string} params.originKey - Key of the origin to update.
 * @param {ApiUpdateOriginRequest} params.data - Updated data for the origin.
 * @param {AzionClientOptions} [params.options] - Client options including debug mode.
 * @returns {Promise<AzionApplicationResponse<AzionOrigin>>} The updated origin or an error.
 *
 * @example
 * const { error, data } = await updateOrigin({
 *   applicationId: 1234,
 *   originKey: 'origin-key',
 *   data: {
 *     name: 'Updated Origin',
 *     addresses: [{ address: 'updated-example.com' }]
 *   },
 *   options: { debug: true }
 * });
 * if (error) {
 *   console.error('Failed to update origin:', error);
 * } else {
 *   console.log('Updated origin:', data);
 * }
 */
export declare const updateOrigin: ({ applicationId, originKey, data, options, }: {
    applicationId: number;
    originKey: string;
    data: ApiUpdateOriginRequest;
    options?: AzionClientOptions;
}) => Promise<AzionApplicationResponse<AzionOrigin>>;

/**
 * Updates an existing rule in an Azion Edge Application.
 *
 * @async
 * @function
 * @param {Object} params - The parameters for updating a rule.
 * @param {number} params.applicationId - The ID of the application containing the rule.
 * @param {'request' | 'response'} params.phase - The phase of the rule (request or response).
 * @param {number} params.ruleId - The ID of the rule to update.
 * @param {ApiUpdateRulePayload} params.data - The updated data for the rule.
 * @param {AzionClientOptions} [params.options] - Optional client options.
 * @returns {Promise<AzionApplicationResponse<AzionRule>>} A promise that resolves with the updated rule data or an error.
 *
 * @example
 * const { error, data } = await updateRule({
 *   applicationId: 123,
 *   phase: 'request',
 *   ruleId: 456,
 *   data: { name: 'Updated Rule Name', behaviors: [...] },
 *   options: { debug: true }
 * });
 * if (error) {
 *   console.error('Error:', error);
 * } else {
 *   console.log('Rule updated:', data);
 * }
 */
export declare const updateRule: ({ applicationId, phase, ruleId, data, options, }: {
    applicationId: number;
    phase: "request" | "response";
    ruleId: number;
    data: ApiUpdateRulePayload;
    options?: AzionClientOptions;
}) => Promise<AzionApplicationResponse<AzionRule>>;

export { }
