cloudflare
Version:
The official TypeScript library for the Cloudflare API
69 lines • 2.37 kB
TypeScript
import * as Core from 'cloudflare/core';
import { APIResource } from 'cloudflare/resource';
import * as SecretsAPI from 'cloudflare/resources/workers-for-platforms/dispatch/namespaces/scripts/secrets';
import { SinglePage } from 'cloudflare/pagination';
export declare class Secrets extends APIResource {
/**
* Put secrets to a script uploaded to a Workers for Platforms namespace.
*/
update(dispatchNamespace: string, scriptName: string, params: SecretUpdateParams, options?: Core.RequestOptions): Core.APIPromise<SecretUpdateResponse>;
/**
* Fetch secrets from a script uploaded to a Workers for Platforms namespace.
*/
list(dispatchNamespace: string, scriptName: string, params: SecretListParams, options?: Core.RequestOptions): Core.PagePromise<SecretListResponsesSinglePage, SecretListResponse>;
}
export declare class SecretListResponsesSinglePage extends SinglePage<SecretListResponse> {
}
export interface SecretUpdateResponse {
/**
* The name of this secret, this is what will be to access it inside the Worker.
*/
name?: string;
/**
* The type of secret to put.
*/
type?: 'secret_text';
}
export interface SecretListResponse {
/**
* The name of this secret, this is what will be to access it inside the Worker.
*/
name?: string;
/**
* The type of secret to put.
*/
type?: 'secret_text';
}
export interface SecretUpdateParams {
/**
* Path param: Identifier
*/
account_id: string;
/**
* Body param: The name of this secret, this is what will be to access it inside
* the Worker.
*/
name?: string;
/**
* Body param: The value of the secret.
*/
text?: string;
/**
* Body param: The type of secret to put.
*/
type?: 'secret_text';
}
export interface SecretListParams {
/**
* Identifier
*/
account_id: string;
}
export declare namespace Secrets {
export import SecretUpdateResponse = SecretsAPI.SecretUpdateResponse;
export import SecretListResponse = SecretsAPI.SecretListResponse;
export import SecretListResponsesSinglePage = SecretsAPI.SecretListResponsesSinglePage;
export import SecretUpdateParams = SecretsAPI.SecretUpdateParams;
export import SecretListParams = SecretsAPI.SecretListParams;
}
//# sourceMappingURL=secrets.d.ts.map