UNPKG

cloudflare

Version:

The official TypeScript library for the Cloudflare API

208 lines 6.22 kB
import * as Core from 'cloudflare/core'; import { APIResource } from 'cloudflare/resource'; import * as CertificatesAPI from 'cloudflare/resources/origin-tls-client-auth/hostnames/certificates'; import * as HostnamesAPI from 'cloudflare/resources/origin-tls-client-auth/hostnames/hostnames'; import { AuthenticatedOriginPullsSinglePage } from 'cloudflare/resources/origin-tls-client-auth/hostnames/hostnames'; export declare class Certificates extends APIResource { /** * Upload a certificate to be used for client authentication on a hostname. 10 * hostname certificates per zone are allowed. */ create(params: CertificateCreateParams, options?: Core.RequestOptions): Core.APIPromise<CertificateCreateResponse>; /** * List Certificates */ list(params: CertificateListParams, options?: Core.RequestOptions): Core.PagePromise<AuthenticatedOriginPullsSinglePage, HostnamesAPI.AuthenticatedOriginPull>; /** * Delete Hostname Client Certificate */ delete(certificateId: string, params: CertificateDeleteParams, options?: Core.RequestOptions): Core.APIPromise<CertificateDeleteResponse>; /** * Get the certificate by ID to be used for client authentication on a hostname. */ get(certificateId: string, params: CertificateGetParams, options?: Core.RequestOptions): Core.APIPromise<CertificateGetResponse>; } export interface Certificate { /** * Identifier */ id?: string; /** * The hostname certificate. */ certificate?: string; /** * The date when the certificate expires. */ expires_on?: string; /** * The certificate authority that issued the certificate. */ issuer?: string; /** * The serial number on the uploaded certificate. */ serial_number?: string; /** * The type of hash used for the certificate. */ signature?: string; /** * Status of the certificate or the association. */ status?: 'initializing' | 'pending_deployment' | 'pending_deletion' | 'active' | 'deleted' | 'deployment_timed_out' | 'deletion_timed_out'; /** * The time when the certificate was uploaded. */ uploaded_on?: string; } export interface CertificateCreateResponse { /** * Identifier */ id?: string; /** * The hostname certificate. */ certificate?: string; /** * The date when the certificate expires. */ expires_on?: string; /** * The certificate authority that issued the certificate. */ issuer?: string; /** * The serial number on the uploaded certificate. */ serial_number?: string; /** * The type of hash used for the certificate. */ signature?: string; /** * Status of the certificate or the association. */ status?: 'initializing' | 'pending_deployment' | 'pending_deletion' | 'active' | 'deleted' | 'deployment_timed_out' | 'deletion_timed_out'; /** * The time when the certificate was uploaded. */ uploaded_on?: string; } export interface CertificateDeleteResponse { /** * Identifier */ id?: string; /** * The hostname certificate. */ certificate?: string; /** * The date when the certificate expires. */ expires_on?: string; /** * The certificate authority that issued the certificate. */ issuer?: string; /** * The serial number on the uploaded certificate. */ serial_number?: string; /** * The type of hash used for the certificate. */ signature?: string; /** * Status of the certificate or the association. */ status?: 'initializing' | 'pending_deployment' | 'pending_deletion' | 'active' | 'deleted' | 'deployment_timed_out' | 'deletion_timed_out'; /** * The time when the certificate was uploaded. */ uploaded_on?: string; } export interface CertificateGetResponse { /** * Identifier */ id?: string; /** * The hostname certificate. */ certificate?: string; /** * The date when the certificate expires. */ expires_on?: string; /** * The certificate authority that issued the certificate. */ issuer?: string; /** * The serial number on the uploaded certificate. */ serial_number?: string; /** * The type of hash used for the certificate. */ signature?: string; /** * Status of the certificate or the association. */ status?: 'initializing' | 'pending_deployment' | 'pending_deletion' | 'active' | 'deleted' | 'deployment_timed_out' | 'deletion_timed_out'; /** * The time when the certificate was uploaded. */ uploaded_on?: string; } export interface CertificateCreateParams { /** * Path param: Identifier */ zone_id: string; /** * Body param: The hostname certificate. */ certificate: string; /** * Body param: The hostname certificate's private key. */ private_key: string; } export interface CertificateListParams { /** * Identifier */ zone_id: string; } export interface CertificateDeleteParams { /** * Path param: Identifier */ zone_id: string; /** * Body param: */ body: unknown; } export interface CertificateGetParams { /** * Identifier */ zone_id: string; } export declare namespace Certificates { export import Certificate = CertificatesAPI.Certificate; export import CertificateCreateResponse = CertificatesAPI.CertificateCreateResponse; export import CertificateDeleteResponse = CertificatesAPI.CertificateDeleteResponse; export import CertificateGetResponse = CertificatesAPI.CertificateGetResponse; export import CertificateCreateParams = CertificatesAPI.CertificateCreateParams; export import CertificateListParams = CertificatesAPI.CertificateListParams; export import CertificateDeleteParams = CertificatesAPI.CertificateDeleteParams; export import CertificateGetParams = CertificatesAPI.CertificateGetParams; } export { AuthenticatedOriginPullsSinglePage }; //# sourceMappingURL=certificates.d.ts.map