import { APIResource } from "../../../core/resource.js";
import * as CredentialsAPI from "./credentials.js";
import { BaseCredentials, CredentialEditParams, CredentialEditResponse, CredentialUpdateParams, CredentialUpdateResponse, Credentials as CredentialsAPICredentials } from "./credentials.js";
import { APIPromise } from "../../../core/api-promise.js";
import { PagePromise, V4PagePaginationArray, type V4PagePaginationArrayParams } from "../../../core/pagination.js";
import { RequestOptions } from "../../../internal/request-options.js";
export declare class BaseConfiguration extends APIResource {
    static readonly _key: readonly ['tokenValidation', 'configuration'];
    /**
     * Creates a JWT validation configuration for the zone.
     *
     * @example
     * ```ts
     * const tokenConfig =
     *   await client.tokenValidation.configuration.create({
     *     zone_id: '023e105f4ecef8ad9ca31a8372d0c353',
     *     credentials: {
     *       keys: [
     *         {
     *           alg: 'RS256',
     *           e: 'e',
     *           kid: 'kid',
     *           kty: 'RSA',
     *           n: 'n',
     *         },
     *       ],
     *     },
     *     description:
     *       'Long description for Token Validation Configuration',
     *     title: 'Example Token Validation Configuration',
     *     token_sources: [
     *       'http.request.headers["x-auth"][0]',
     *       'http.request.cookies["Authorization"][0]',
     *     ],
     *     token_type: 'JWT',
     *   });
     * ```
     */
    create(params: ConfigurationCreateParams, options?: RequestOptions): APIPromise<TokenConfig>;
    /**
     * Lists the JWT validation configurations defined for the zone.
     *
     * @example
     * ```ts
     * // Automatically fetches more pages as needed.
     * for await (const tokenConfig of client.tokenValidation.configuration.list(
     *   { zone_id: '023e105f4ecef8ad9ca31a8372d0c353' },
     * )) {
     *   // ...
     * }
     * ```
     */
    list(params: ConfigurationListParams, options?: RequestOptions): PagePromise<TokenConfigsV4PagePaginationArray, TokenConfig>;
    /**
     * Deletes a JWT validation configuration from the zone.
     *
     * @example
     * ```ts
     * const configuration =
     *   await client.tokenValidation.configuration.delete(
     *     '4a7ee8d3-dd63-4ceb-9d5f-c27831854ce7',
     *     { zone_id: '023e105f4ecef8ad9ca31a8372d0c353' },
     *   );
     * ```
     */
    delete(configID: string, params: ConfigurationDeleteParams, options?: RequestOptions): APIPromise<ConfigurationDeleteResponse>;
    /**
     * Updates only the supplied fields on a JWT validation configuration.
     *
     * @example
     * ```ts
     * const response =
     *   await client.tokenValidation.configuration.edit(
     *     '4a7ee8d3-dd63-4ceb-9d5f-c27831854ce7',
     *     { zone_id: '023e105f4ecef8ad9ca31a8372d0c353' },
     *   );
     * ```
     */
    edit(configID: string, params: ConfigurationEditParams, options?: RequestOptions): APIPromise<ConfigurationEditResponse>;
    /**
     * Returns a JWT validation configuration by ID.
     *
     * @example
     * ```ts
     * const tokenConfig =
     *   await client.tokenValidation.configuration.get(
     *     '4a7ee8d3-dd63-4ceb-9d5f-c27831854ce7',
     *     { zone_id: '023e105f4ecef8ad9ca31a8372d0c353' },
     *   );
     * ```
     */
    get(configID: string, params: ConfigurationGetParams, options?: RequestOptions): APIPromise<TokenConfig>;
}
export declare class Configuration extends BaseConfiguration {
    credentials: CredentialsAPI.Credentials;
}
export type TokenConfigsV4PagePaginationArray = V4PagePaginationArray<TokenConfig>;
export interface TokenConfig {
    /**
     * UUID.
     */
    id: string;
    created_at: string;
    credentials: TokenConfig.Credentials;
    description: string;
    last_updated: string;
    title: string;
    token_sources: Array<string>;
    token_type: 'JWT';
}
export declare namespace TokenConfig {
    interface Credentials {
        keys: Array<Credentials.APIShieldCredentialsJWTKeyRSA | Credentials.APIShieldCredentialsJWTKeyEcEs256 | Credentials.APIShieldCredentialsJWTKeyEcEs384 | Credentials.APIShieldCredentialsJWTKeyOctResponse>;
    }
    namespace Credentials {
        /**
         * JSON representation of an RSA key.
         */
        interface APIShieldCredentialsJWTKeyRSA {
            /**
             * Algorithm
             */
            alg: 'RS256' | 'RS384' | 'RS512' | 'PS256' | 'PS384' | 'PS512';
            /**
             * RSA exponent
             */
            e: string;
            /**
             * Key ID
             */
            kid: string;
            /**
             * Key Type
             */
            kty: 'RSA';
            /**
             * RSA modulus
             */
            n: string;
        }
        /**
         * JSON representation of an ES256 key
         */
        interface APIShieldCredentialsJWTKeyEcEs256 {
            /**
             * Algorithm
             */
            alg: 'ES256';
            /**
             * Curve
             */
            crv: 'P-256';
            /**
             * Key ID
             */
            kid: string;
            /**
             * Key Type
             */
            kty: 'EC';
            /**
             * X EC coordinate
             */
            x: string;
            /**
             * Y EC coordinate
             */
            y: string;
        }
        /**
         * JSON representation of an ES384 key
         */
        interface APIShieldCredentialsJWTKeyEcEs384 {
            /**
             * Algorithm
             */
            alg: 'ES384';
            /**
             * Curve
             */
            crv: 'P-384';
            /**
             * Key ID
             */
            kid: string;
            /**
             * Key Type
             */
            kty: 'EC';
            /**
             * X EC coordinate
             */
            x: string;
            /**
             * Y EC coordinate
             */
            y: string;
        }
        /**
         * JSON representation of a symmetric verification key in API responses (secret
         * material is redacted).
         */
        interface APIShieldCredentialsJWTKeyOctResponse {
            /**
             * Algorithm
             */
            alg: 'HS256' | 'HS384' | 'HS512';
            /**
             * Key ID
             */
            kid: string;
            /**
             * Key Type
             */
            kty: 'oct';
        }
    }
}
export interface ConfigurationDeleteResponse {
    /**
     * UUID.
     */
    id?: string;
}
export interface ConfigurationEditResponse {
    /**
     * UUID.
     */
    id?: string;
    description?: string;
    title?: string;
    token_sources?: Array<string>;
}
export interface ConfigurationCreateParams {
    /**
     * Path param: Identifier.
     */
    zone_id: string;
    /**
     * Body param: Request payload for create and PUT credentials operations. Provided
     * keys define the complete stored key set. Key identities (`{alg,kid}`) must be
     * unique.
     */
    credentials: ConfigurationCreateParams.Credentials;
    /**
     * Body param
     */
    description: string;
    /**
     * Body param
     */
    title: string;
    /**
     * Body param
     */
    token_sources: Array<string>;
    /**
     * Body param
     */
    token_type: 'JWT';
}
export declare namespace ConfigurationCreateParams {
    /**
     * Request payload for create and PUT credentials operations. Provided keys define
     * the complete stored key set. Key identities (`{alg,kid}`) must be unique.
     */
    interface Credentials {
        keys: Array<Credentials.APIShieldCredentialsJWTKeyRSA | Credentials.APIShieldCredentialsJWTKeyEcEs256 | Credentials.APIShieldCredentialsJWTKeyEcEs384 | Credentials.APIShieldCredentialsJWTKeyOctRequest>;
    }
    namespace Credentials {
        /**
         * JSON representation of an RSA key.
         */
        interface APIShieldCredentialsJWTKeyRSA {
            /**
             * Algorithm
             */
            alg: 'RS256' | 'RS384' | 'RS512' | 'PS256' | 'PS384' | 'PS512';
            /**
             * RSA exponent
             */
            e: string;
            /**
             * Key ID
             */
            kid: string;
            /**
             * Key Type
             */
            kty: 'RSA';
            /**
             * RSA modulus
             */
            n: string;
        }
        /**
         * JSON representation of an ES256 key
         */
        interface APIShieldCredentialsJWTKeyEcEs256 {
            /**
             * Algorithm
             */
            alg: 'ES256';
            /**
             * Curve
             */
            crv: 'P-256';
            /**
             * Key ID
             */
            kid: string;
            /**
             * Key Type
             */
            kty: 'EC';
            /**
             * X EC coordinate
             */
            x: string;
            /**
             * Y EC coordinate
             */
            y: string;
        }
        /**
         * JSON representation of an ES384 key
         */
        interface APIShieldCredentialsJWTKeyEcEs384 {
            /**
             * Algorithm
             */
            alg: 'ES384';
            /**
             * Curve
             */
            crv: 'P-384';
            /**
             * Key ID
             */
            kid: string;
            /**
             * Key Type
             */
            kty: 'EC';
            /**
             * X EC coordinate
             */
            x: string;
            /**
             * Y EC coordinate
             */
            y: string;
        }
        /**
         * JSON representation of a symmetric key for create/PUT requests.
         */
        interface APIShieldCredentialsJWTKeyOctRequest {
            /**
             * Algorithm
             */
            alg: 'HS256' | 'HS384' | 'HS512';
            /**
             * Symmetric key material. Required for create and PUT update requests.
             */
            k: string;
            /**
             * Key ID
             */
            kid: string;
            /**
             * Key Type
             */
            kty: 'oct';
        }
    }
}
export interface ConfigurationListParams extends V4PagePaginationArrayParams {
    /**
     * Path param: Identifier.
     */
    zone_id: string;
}
export interface ConfigurationDeleteParams {
    /**
     * Identifier.
     */
    zone_id: string;
}
export interface ConfigurationEditParams {
    /**
     * Path param: Identifier.
     */
    zone_id: string;
    /**
     * Body param
     */
    description?: string;
    /**
     * Body param
     */
    title?: string;
    /**
     * Body param
     */
    token_sources?: Array<string>;
}
export interface ConfigurationGetParams {
    /**
     * Identifier.
     */
    zone_id: string;
}
export declare namespace Configuration {
    export { type TokenConfig as TokenConfig, type ConfigurationDeleteResponse as ConfigurationDeleteResponse, type ConfigurationEditResponse as ConfigurationEditResponse, type TokenConfigsV4PagePaginationArray as TokenConfigsV4PagePaginationArray, type ConfigurationCreateParams as ConfigurationCreateParams, type ConfigurationListParams as ConfigurationListParams, type ConfigurationDeleteParams as ConfigurationDeleteParams, type ConfigurationEditParams as ConfigurationEditParams, type ConfigurationGetParams as ConfigurationGetParams, };
    export { CredentialsAPICredentials as Credentials, BaseCredentials as BaseCredentials, type CredentialUpdateResponse as CredentialUpdateResponse, type CredentialEditResponse as CredentialEditResponse, type CredentialUpdateParams as CredentialUpdateParams, type CredentialEditParams as CredentialEditParams, };
}
//# sourceMappingURL=configuration.d.ts.map