import * as Core from 'cloudflare/core';
import { APIResource } from 'cloudflare/resource';
import * as ServiceTokensAPI from 'cloudflare/resources/zero-trust/access/service-tokens';
export declare class ServiceTokens extends APIResource {
    /**
     * Generates a new service token. **Note:** This is the only time you can get the
     * Client Secret. If you lose the Client Secret, you will have to rotate the Client
     * Secret or create a new service token.
     */
    create(params: ServiceTokenCreateParams, options?: Core.RequestOptions): Core.APIPromise<ServiceTokenCreateResponse>;
    /**
     * Updates a configured service token.
     */
    update(uuid: string, params: ServiceTokenUpdateParams, options?: Core.RequestOptions): Core.APIPromise<AccessServiceTokens>;
    /**
     * Lists all service tokens.
     */
    list(params?: ServiceTokenListParams, options?: Core.RequestOptions): Core.APIPromise<ServiceTokenListResponse | null>;
    list(options?: Core.RequestOptions): Core.APIPromise<ServiceTokenListResponse | null>;
    /**
     * Deletes a service token.
     */
    delete(uuid: string, params?: ServiceTokenDeleteParams, options?: Core.RequestOptions): Core.APIPromise<AccessServiceTokens>;
    delete(uuid: string, options?: Core.RequestOptions): Core.APIPromise<AccessServiceTokens>;
    /**
     * Refreshes the expiration of a service token.
     */
    refresh(identifier: string, uuid: string, options?: Core.RequestOptions): Core.APIPromise<AccessServiceTokens>;
    /**
     * Generates a new Client Secret for a service token and revokes the old one.
     */
    rotate(identifier: string, uuid: string, options?: Core.RequestOptions): Core.APIPromise<ServiceTokenRotateResponse>;
}
export interface AccessServiceTokens {
    /**
     * The ID of the service token.
     */
    id?: unknown;
    /**
     * The Client ID for the service token. Access will check for this value in the
     * `CF-Access-Client-ID` request header.
     */
    client_id?: string;
    created_at?: string;
    /**
     * The duration for how long the service token will be valid. Must be in the format
     * `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms, s, m, h. The
     * default is 1 year in hours (8760h).
     */
    duration?: string;
    /**
     * The name of the service token.
     */
    name?: string;
    updated_at?: string;
}
export interface ServiceTokenCreateResponse {
    /**
     * The ID of the service token.
     */
    id?: unknown;
    /**
     * The Client ID for the service token. Access will check for this value in the
     * `CF-Access-Client-ID` request header.
     */
    client_id?: string;
    /**
     * The Client Secret for the service token. Access will check for this value in the
     * `CF-Access-Client-Secret` request header.
     */
    client_secret?: string;
    created_at?: string;
    /**
     * The duration for how long the service token will be valid. Must be in the format
     * `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms, s, m, h. The
     * default is 1 year in hours (8760h).
     */
    duration?: string;
    /**
     * The name of the service token.
     */
    name?: string;
    updated_at?: string;
}
export type ServiceTokenListResponse = Array<AccessServiceTokens>;
export interface ServiceTokenRotateResponse {
    /**
     * The ID of the service token.
     */
    id?: unknown;
    /**
     * The Client ID for the service token. Access will check for this value in the
     * `CF-Access-Client-ID` request header.
     */
    client_id?: string;
    /**
     * The Client Secret for the service token. Access will check for this value in the
     * `CF-Access-Client-Secret` request header.
     */
    client_secret?: string;
    created_at?: string;
    /**
     * The duration for how long the service token will be valid. Must be in the format
     * `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms, s, m, h. The
     * default is 1 year in hours (8760h).
     */
    duration?: string;
    /**
     * The name of the service token.
     */
    name?: string;
    updated_at?: string;
}
export interface ServiceTokenCreateParams {
    /**
     * Body param: The name of the service token.
     */
    name: string;
    /**
     * Path param: The Account ID to use for this endpoint. Mutually exclusive with the
     * Zone ID.
     */
    account_id?: string;
    /**
     * Path param: The Zone ID to use for this endpoint. Mutually exclusive with the
     * Account ID.
     */
    zone_id?: string;
    /**
     * Body param: The duration for how long the service token will be valid. Must be
     * in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms, s,
     * m, h. The default is 1 year in hours (8760h).
     */
    duration?: string;
}
export interface ServiceTokenUpdateParams {
    /**
     * Path param: The Account ID to use for this endpoint. Mutually exclusive with the
     * Zone ID.
     */
    account_id?: string;
    /**
     * Path param: The Zone ID to use for this endpoint. Mutually exclusive with the
     * Account ID.
     */
    zone_id?: string;
    /**
     * Body param: The duration for how long the service token will be valid. Must be
     * in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms, s,
     * m, h. The default is 1 year in hours (8760h).
     */
    duration?: string;
    /**
     * Body param: The name of the service token.
     */
    name?: string;
}
export interface ServiceTokenListParams {
    /**
     * The Account ID to use for this endpoint. Mutually exclusive with the Zone ID.
     */
    account_id?: string;
    /**
     * The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.
     */
    zone_id?: string;
}
export interface ServiceTokenDeleteParams {
    /**
     * The Account ID to use for this endpoint. Mutually exclusive with the Zone ID.
     */
    account_id?: string;
    /**
     * The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.
     */
    zone_id?: string;
}
export declare namespace ServiceTokens {
    export import AccessServiceTokens = ServiceTokensAPI.AccessServiceTokens;
    export import ServiceTokenCreateResponse = ServiceTokensAPI.ServiceTokenCreateResponse;
    export import ServiceTokenListResponse = ServiceTokensAPI.ServiceTokenListResponse;
    export import ServiceTokenRotateResponse = ServiceTokensAPI.ServiceTokenRotateResponse;
    export import ServiceTokenCreateParams = ServiceTokensAPI.ServiceTokenCreateParams;
    export import ServiceTokenUpdateParams = ServiceTokensAPI.ServiceTokenUpdateParams;
    export import ServiceTokenListParams = ServiceTokensAPI.ServiceTokenListParams;
    export import ServiceTokenDeleteParams = ServiceTokensAPI.ServiceTokenDeleteParams;
}
//# sourceMappingURL=service-tokens.d.ts.map