cloudflare
Version:
The official TypeScript library for the Cloudflare API
132 lines • 4.36 kB
TypeScript
import { APIResource } from "../../../../core/resource.js";
import { APIPromise } from "../../../../core/api-promise.js";
import { PagePromise, V4PagePaginationArray, type V4PagePaginationArrayParams } from "../../../../core/pagination.js";
import { RequestOptions } from "../../../../internal/request-options.js";
export declare class BaseExports extends APIResource {
static readonly _key: readonly ['zeroTrust', 'casb', 'posture', 'exports'];
/**
* List all export jobs for a given requestor's organization
*
* @example
* ```ts
* // Automatically fetches more pages as needed.
* for await (const exportListResponse of client.zeroTrust.casb.posture.exports.list(
* { account_id: '46148281d8a93d002ef242d8b0d5f9f6' },
* )) {
* // ...
* }
* ```
*/
list(params: ExportListParams, options?: RequestOptions): PagePromise<ExportListResponsesV4PagePaginationArray, ExportListResponse>;
/**
* Retrieves a single export job by its unique identifier
*
* @example
* ```ts
* const _export =
* await client.zeroTrust.casb.posture.exports.get('id', {
* account_id: '46148281d8a93d002ef242d8b0d5f9f6',
* });
* ```
*/
get(id: string, params: ExportGetParams, options?: RequestOptions): APIPromise<ExportGetResponse>;
}
export declare class Exports extends BaseExports {
}
export type ExportListResponsesV4PagePaginationArray = V4PagePaginationArray<ExportListResponse>;
/**
* Information about an export job.
*/
export interface ExportListResponse {
/**
* Unique identifier for the export job.
*/
id: string;
/**
* Status of an export job.
*/
status: 'Pending' | 'Success' | 'Failure' | 'Rescheduled' | 'In-Progress';
/**
* Type of export job.
*/
type: 'finding' | 'findingInstance' | 'content' | 'remediationJob';
/**
* ID of the export-requesting user.
*/
user_id: string;
/**
* The URL by which the successfully created export can be downloaded by the end
* users.
*/
download_url?: string | null;
/**
* Contains information on errors which may have occurred during export creation.
*/
errors?: string | null;
/**
* The base name of the file that is/was generated by the export job.
*/
file_name?: string | null;
/**
* The full path of the file that is stored within external storage (currently R2).
*/
file_path?: string | null;
}
/**
* Information about an export job.
*/
export interface ExportGetResponse {
/**
* Unique identifier for the export job.
*/
id: string;
/**
* Status of an export job.
*/
status: 'Pending' | 'Success' | 'Failure' | 'Rescheduled' | 'In-Progress';
/**
* Type of export job.
*/
type: 'finding' | 'findingInstance' | 'content' | 'remediationJob';
/**
* ID of the export-requesting user.
*/
user_id: string;
/**
* The URL by which the successfully created export can be downloaded by the end
* users.
*/
download_url?: string | null;
/**
* Contains information on errors which may have occurred during export creation.
*/
errors?: string | null;
/**
* The base name of the file that is/was generated by the export job.
*/
file_name?: string | null;
/**
* The full path of the file that is stored within external storage (currently R2).
*/
file_path?: string | null;
}
export interface ExportListParams extends V4PagePaginationArrayParams {
/**
* Path param: Cloudflare account ID for the user making the request.
*/
account_id: string;
/**
* Query param: Filter on export job's status
*/
status?: 'Pending' | 'Success' | 'Failure' | 'Rescheduled' | 'In-Progress';
}
export interface ExportGetParams {
/**
* Cloudflare account ID for the user making the request.
*/
account_id: string;
}
export declare namespace Exports {
export { type ExportListResponse as ExportListResponse, type ExportGetResponse as ExportGetResponse, type ExportListResponsesV4PagePaginationArray as ExportListResponsesV4PagePaginationArray, type ExportListParams as ExportListParams, type ExportGetParams as ExportGetParams, };
}
//# sourceMappingURL=exports.d.ts.map