cloudflare
Version:
The official TypeScript library for the Cloudflare API
155 lines • 4.8 kB
TypeScript
import * as Core from 'cloudflare/core';
import { APIResource } from 'cloudflare/resource';
import * as ConfigsAPI from 'cloudflare/resources/hyperdrive/configs';
import { SinglePage } from 'cloudflare/pagination';
export declare class Configs extends APIResource {
/**
* Creates and returns a new Hyperdrive configuration.
*/
create(params: ConfigCreateParams, options?: Core.RequestOptions): Core.APIPromise<ConfigCreateResponse | null>;
/**
* Updates and returns the specified Hyperdrive configuration.
*/
update(hyperdriveId: string, params: ConfigUpdateParams, options?: Core.RequestOptions): Core.APIPromise<ConfigUpdateResponse | null>;
/**
* Returns a list of Hyperdrives
*/
list(params: ConfigListParams, options?: Core.RequestOptions): Core.PagePromise<ConfigListResponsesSinglePage, ConfigListResponse>;
/**
* Deletes the specified Hyperdrive.
*/
delete(hyperdriveId: string, params: ConfigDeleteParams, options?: Core.RequestOptions): Core.APIPromise<ConfigDeleteResponse | null>;
/**
* Patches and returns the specified Hyperdrive configuration. Updates to the
* origin and caching settings are applied with an all-or-nothing approach.
*/
edit(hyperdriveId: string, params: ConfigEditParams, options?: Core.RequestOptions): Core.APIPromise<ConfigEditResponse | null>;
/**
* Returns the specified Hyperdrive configuration.
*/
get(hyperdriveId: string, params: ConfigGetParams, options?: Core.RequestOptions): Core.APIPromise<ConfigGetResponse | null>;
}
export declare class ConfigListResponsesSinglePage extends SinglePage<ConfigListResponse> {
}
export interface ConfigCreateResponse {
/**
* Identifier
*/
id?: string;
}
export interface ConfigUpdateResponse {
/**
* Identifier
*/
id?: string;
}
export interface ConfigListResponse {
/**
* Identifier
*/
id?: string;
}
export type ConfigDeleteResponse = unknown | string;
export interface ConfigEditResponse {
/**
* Identifier
*/
id?: string;
}
export interface ConfigGetResponse {
/**
* Identifier
*/
id?: string;
}
export interface ConfigCreateParams {
/**
* Path param: Identifier
*/
account_id: string;
/**
* Body param:
*/
origin: ConfigCreateParams.Origin;
}
export declare namespace ConfigCreateParams {
interface Origin {
/**
* The password required to access your origin database. This value is write-only
* and never returned by the API.
*/
password: string;
}
}
export interface ConfigUpdateParams {
/**
* Path param: Identifier
*/
account_id: string;
/**
* Body param:
*/
origin: ConfigUpdateParams.Origin;
}
export declare namespace ConfigUpdateParams {
interface Origin {
/**
* The password required to access your origin database. This value is write-only
* and never returned by the API.
*/
password: string;
}
}
export interface ConfigListParams {
/**
* Identifier
*/
account_id: string;
}
export interface ConfigDeleteParams {
/**
* Identifier
*/
account_id: string;
}
export interface ConfigEditParams {
/**
* Path param: Identifier
*/
account_id: string;
/**
* Body param:
*/
origin?: ConfigEditParams.Origin;
}
export declare namespace ConfigEditParams {
interface Origin {
/**
* The password required to access your origin database. This value is write-only
* and never returned by the API.
*/
password: string;
}
}
export interface ConfigGetParams {
/**
* Identifier
*/
account_id: string;
}
export declare namespace Configs {
export import ConfigCreateResponse = ConfigsAPI.ConfigCreateResponse;
export import ConfigUpdateResponse = ConfigsAPI.ConfigUpdateResponse;
export import ConfigListResponse = ConfigsAPI.ConfigListResponse;
export import ConfigDeleteResponse = ConfigsAPI.ConfigDeleteResponse;
export import ConfigEditResponse = ConfigsAPI.ConfigEditResponse;
export import ConfigGetResponse = ConfigsAPI.ConfigGetResponse;
export import ConfigListResponsesSinglePage = ConfigsAPI.ConfigListResponsesSinglePage;
export import ConfigCreateParams = ConfigsAPI.ConfigCreateParams;
export import ConfigUpdateParams = ConfigsAPI.ConfigUpdateParams;
export import ConfigListParams = ConfigsAPI.ConfigListParams;
export import ConfigDeleteParams = ConfigsAPI.ConfigDeleteParams;
export import ConfigEditParams = ConfigsAPI.ConfigEditParams;
export import ConfigGetParams = ConfigsAPI.ConfigGetParams;
}
//# sourceMappingURL=configs.d.ts.map