import * as Core from 'cloudflare/core';
import { APIResource } from 'cloudflare/resource';
import * as TokensAPI from 'cloudflare/resources/user/tokens/tokens';
import * as PermissionGroupsAPI from 'cloudflare/resources/user/tokens/permission-groups';
import * as ValueAPI from 'cloudflare/resources/user/tokens/value';
import { V4PagePaginationArray, type V4PagePaginationArrayParams } from 'cloudflare/pagination';
export declare class Tokens extends APIResource {
    permissionGroups: PermissionGroupsAPI.PermissionGroups;
    value: ValueAPI.Value;
    /**
     * Create a new access token.
     */
    create(body: TokenCreateParams, options?: Core.RequestOptions): Core.APIPromise<TokenCreateResponse>;
    /**
     * Update an existing token.
     */
    update(tokenId: unknown, body: TokenUpdateParams, options?: Core.RequestOptions): Core.APIPromise<TokenUpdateResponse>;
    /**
     * List all access tokens you created.
     */
    list(query?: TokenListParams, options?: Core.RequestOptions): Core.PagePromise<TokenListResponsesV4PagePaginationArray, TokenListResponse>;
    list(options?: Core.RequestOptions): Core.PagePromise<TokenListResponsesV4PagePaginationArray, TokenListResponse>;
    /**
     * Destroy a token.
     */
    delete(tokenId: unknown, options?: Core.RequestOptions): Core.APIPromise<TokenDeleteResponse | null>;
    /**
     * Get information about a specific token.
     */
    get(tokenId: unknown, options?: Core.RequestOptions): Core.APIPromise<TokenGetResponse>;
    /**
     * Test whether a token works.
     */
    verify(options?: Core.RequestOptions): Core.APIPromise<TokenVerifyResponse>;
}
export declare class TokenListResponsesV4PagePaginationArray extends V4PagePaginationArray<TokenListResponse> {
}
export interface TokenCreateResponse {
    /**
     * The token value.
     */
    value?: ValueAPI.TokenValue;
}
export type TokenUpdateResponse = unknown | string | null;
export type TokenListResponse = unknown;
export interface TokenDeleteResponse {
    /**
     * Identifier
     */
    id: string;
}
export type TokenGetResponse = unknown | string | null;
export interface TokenVerifyResponse {
    /**
     * Token identifier tag.
     */
    id: string;
    /**
     * Status of the token.
     */
    status: 'active' | 'disabled' | 'expired';
    /**
     * The expiration time on or after which the JWT MUST NOT be accepted for
     * processing.
     */
    expires_on?: string;
    /**
     * The time before which the token MUST NOT be accepted for processing.
     */
    not_before?: string;
}
export interface TokenCreateParams {
    /**
     * Token name.
     */
    name: string;
    /**
     * List of access policies assigned to the token.
     */
    policies: Array<TokenCreateParams.Policy>;
    condition?: TokenCreateParams.Condition;
    /**
     * The expiration time on or after which the JWT MUST NOT be accepted for
     * processing.
     */
    expires_on?: string;
    /**
     * The time before which the token MUST NOT be accepted for processing.
     */
    not_before?: string;
}
export declare namespace TokenCreateParams {
    interface Policy {
        /**
         * Allow or deny operations against the resources.
         */
        effect: 'allow' | 'deny';
        /**
         * A set of permission groups that are specified to the policy.
         */
        permission_groups: Array<Policy.PermissionGroup>;
        /**
         * A list of resource names that the policy applies to.
         */
        resources: unknown;
    }
    namespace Policy {
        /**
         * A named group of permissions that map to a group of operations against
         * resources.
         */
        interface PermissionGroup {
        }
    }
    interface Condition {
        /**
         * Client IP restrictions.
         */
        request_ip?: Condition.RequestIP;
    }
    namespace Condition {
        /**
         * Client IP restrictions.
         */
        interface RequestIP {
            /**
             * List of IPv4/IPv6 CIDR addresses.
             */
            in?: Array<string>;
            /**
             * List of IPv4/IPv6 CIDR addresses.
             */
            not_in?: Array<string>;
        }
    }
}
export interface TokenUpdateParams {
    /**
     * Token name.
     */
    name: string;
    /**
     * List of access policies assigned to the token.
     */
    policies: Array<TokenUpdateParams.Policy>;
    /**
     * Status of the token.
     */
    status: 'active' | 'disabled' | 'expired';
    condition?: TokenUpdateParams.Condition;
    /**
     * The expiration time on or after which the JWT MUST NOT be accepted for
     * processing.
     */
    expires_on?: string;
    /**
     * The time before which the token MUST NOT be accepted for processing.
     */
    not_before?: string;
}
export declare namespace TokenUpdateParams {
    interface Policy {
        /**
         * Allow or deny operations against the resources.
         */
        effect: 'allow' | 'deny';
        /**
         * A set of permission groups that are specified to the policy.
         */
        permission_groups: Array<Policy.PermissionGroup>;
        /**
         * A list of resource names that the policy applies to.
         */
        resources: unknown;
    }
    namespace Policy {
        /**
         * A named group of permissions that map to a group of operations against
         * resources.
         */
        interface PermissionGroup {
        }
    }
    interface Condition {
        /**
         * Client IP restrictions.
         */
        request_ip?: Condition.RequestIP;
    }
    namespace Condition {
        /**
         * Client IP restrictions.
         */
        interface RequestIP {
            /**
             * List of IPv4/IPv6 CIDR addresses.
             */
            in?: Array<string>;
            /**
             * List of IPv4/IPv6 CIDR addresses.
             */
            not_in?: Array<string>;
        }
    }
}
export interface TokenListParams extends V4PagePaginationArrayParams {
    /**
     * Direction to order results.
     */
    direction?: 'asc' | 'desc';
}
export declare namespace Tokens {
    export import TokenCreateResponse = TokensAPI.TokenCreateResponse;
    export import TokenUpdateResponse = TokensAPI.TokenUpdateResponse;
    export import TokenListResponse = TokensAPI.TokenListResponse;
    export import TokenDeleteResponse = TokensAPI.TokenDeleteResponse;
    export import TokenGetResponse = TokensAPI.TokenGetResponse;
    export import TokenVerifyResponse = TokensAPI.TokenVerifyResponse;
    export import TokenListResponsesV4PagePaginationArray = TokensAPI.TokenListResponsesV4PagePaginationArray;
    export import TokenCreateParams = TokensAPI.TokenCreateParams;
    export import TokenUpdateParams = TokensAPI.TokenUpdateParams;
    export import TokenListParams = TokensAPI.TokenListParams;
    export import PermissionGroups = PermissionGroupsAPI.PermissionGroups;
    export import PermissionGroupListResponse = PermissionGroupsAPI.PermissionGroupListResponse;
    export import PermissionGroupListResponsesSinglePage = PermissionGroupsAPI.PermissionGroupListResponsesSinglePage;
    export import Value = ValueAPI.Value;
    export import TokenValue = ValueAPI.TokenValue;
    export import ValueUpdateParams = ValueAPI.ValueUpdateParams;
}
//# sourceMappingURL=tokens.d.ts.map