import { APIResource } from "../../resource.js"; import * as Core from "../../core.js"; import { V4PagePaginationArray, type V4PagePaginationArrayParams } from "../../pagination.js"; export declare class TargetEnvironments extends APIResource { /** * Creates a new target environment for the account. * * @example * ```ts * const targetEnvironment = * await client.vulnerabilityScanner.targetEnvironments.create( * { * account_id: '023e105f4ecef8ad9ca31a8372d0c353', * name: 'Production Zone', * target: { * type: 'zone', * zone_tag: 'd8e8fca2dc0f896fd7cb4cb0031ba249', * }, * }, * ); * ``` */ create(params: TargetEnvironmentCreateParams, options?: Core.RequestOptions): Core.APIPromise; /** * Replaces a target environment. All fields must be provided. * * @example * ```ts * const targetEnvironment = * await client.vulnerabilityScanner.targetEnvironments.update( * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', * { * account_id: '023e105f4ecef8ad9ca31a8372d0c353', * name: 'Production Zone', * target: { * type: 'zone', * zone_tag: 'd8e8fca2dc0f896fd7cb4cb0031ba249', * }, * }, * ); * ``` */ update(targetEnvironmentId: string, params: TargetEnvironmentUpdateParams, options?: Core.RequestOptions): Core.APIPromise; /** * Returns all target environments for the account. * * @example * ```ts * // Automatically fetches more pages as needed. * for await (const targetEnvironmentListResponse of client.vulnerabilityScanner.targetEnvironments.list( * { account_id: '023e105f4ecef8ad9ca31a8372d0c353' }, * )) { * // ... * } * ``` */ list(params: TargetEnvironmentListParams, options?: Core.RequestOptions): Core.PagePromise; /** * Removes a target environment. * * @example * ```ts * const targetEnvironment = * await client.vulnerabilityScanner.targetEnvironments.delete( * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', * { account_id: '023e105f4ecef8ad9ca31a8372d0c353' }, * ); * ``` */ delete(targetEnvironmentId: string, params: TargetEnvironmentDeleteParams, options?: Core.RequestOptions): Core.APIPromise; /** * Updates a target environment with only the provided fields; omitted fields * remain unchanged. * * @example * ```ts * const response = * await client.vulnerabilityScanner.targetEnvironments.edit( * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', * { account_id: '023e105f4ecef8ad9ca31a8372d0c353' }, * ); * ``` */ edit(targetEnvironmentId: string, params: TargetEnvironmentEditParams, options?: Core.RequestOptions): Core.APIPromise; /** * Returns a single target environment by ID. * * @example * ```ts * const targetEnvironment = * await client.vulnerabilityScanner.targetEnvironments.get( * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', * { account_id: '023e105f4ecef8ad9ca31a8372d0c353' }, * ); * ``` */ get(targetEnvironmentId: string, params: TargetEnvironmentGetParams, options?: Core.RequestOptions): Core.APIPromise; } export declare class TargetEnvironmentListResponsesV4PagePaginationArray extends V4PagePaginationArray { } export interface TargetEnvironmentCreateResponse { /** * Target environment identifier. */ id: string; /** * Human-readable name. */ name: string; /** * Identifies the Cloudflare asset to scan. Uses a `type` discriminator. Currently * the service supports only `zone` targets. */ target: TargetEnvironmentCreateResponse.Target; /** * Optional description providing additional context. */ description?: string | null; } export declare namespace TargetEnvironmentCreateResponse { /** * Identifies the Cloudflare asset to scan. Uses a `type` discriminator. Currently * the service supports only `zone` targets. */ interface Target { type: 'zone'; /** * Cloudflare zone tag. The zone must belong to the account. */ zone_tag: string; } } export interface TargetEnvironmentUpdateResponse { /** * Target environment identifier. */ id: string; /** * Human-readable name. */ name: string; /** * Identifies the Cloudflare asset to scan. Uses a `type` discriminator. Currently * the service supports only `zone` targets. */ target: TargetEnvironmentUpdateResponse.Target; /** * Optional description providing additional context. */ description?: string | null; } export declare namespace TargetEnvironmentUpdateResponse { /** * Identifies the Cloudflare asset to scan. Uses a `type` discriminator. Currently * the service supports only `zone` targets. */ interface Target { type: 'zone'; /** * Cloudflare zone tag. The zone must belong to the account. */ zone_tag: string; } } export interface TargetEnvironmentListResponse { /** * Target environment identifier. */ id: string; /** * Human-readable name. */ name: string; /** * Identifies the Cloudflare asset to scan. Uses a `type` discriminator. Currently * the service supports only `zone` targets. */ target: TargetEnvironmentListResponse.Target; /** * Optional description providing additional context. */ description?: string | null; } export declare namespace TargetEnvironmentListResponse { /** * Identifies the Cloudflare asset to scan. Uses a `type` discriminator. Currently * the service supports only `zone` targets. */ interface Target { type: 'zone'; /** * Cloudflare zone tag. The zone must belong to the account. */ zone_tag: string; } } export type TargetEnvironmentDeleteResponse = unknown; export interface TargetEnvironmentEditResponse { /** * Target environment identifier. */ id: string; /** * Human-readable name. */ name: string; /** * Identifies the Cloudflare asset to scan. Uses a `type` discriminator. Currently * the service supports only `zone` targets. */ target: TargetEnvironmentEditResponse.Target; /** * Optional description providing additional context. */ description?: string | null; } export declare namespace TargetEnvironmentEditResponse { /** * Identifies the Cloudflare asset to scan. Uses a `type` discriminator. Currently * the service supports only `zone` targets. */ interface Target { type: 'zone'; /** * Cloudflare zone tag. The zone must belong to the account. */ zone_tag: string; } } export interface TargetEnvironmentGetResponse { /** * Target environment identifier. */ id: string; /** * Human-readable name. */ name: string; /** * Identifies the Cloudflare asset to scan. Uses a `type` discriminator. Currently * the service supports only `zone` targets. */ target: TargetEnvironmentGetResponse.Target; /** * Optional description providing additional context. */ description?: string | null; } export declare namespace TargetEnvironmentGetResponse { /** * Identifies the Cloudflare asset to scan. Uses a `type` discriminator. Currently * the service supports only `zone` targets. */ interface Target { type: 'zone'; /** * Cloudflare zone tag. The zone must belong to the account. */ zone_tag: string; } } export interface TargetEnvironmentCreateParams { /** * Path param: Identifier. */ account_id: string; /** * Body param: Human-readable name. */ name: string; /** * Body param: Identifies the Cloudflare asset to scan. Uses a `type` * discriminator. Currently the service supports only `zone` targets. */ target: TargetEnvironmentCreateParams.Target; /** * Body param: Optional description. */ description?: string | null; } export declare namespace TargetEnvironmentCreateParams { /** * Identifies the Cloudflare asset to scan. Uses a `type` discriminator. Currently * the service supports only `zone` targets. */ interface Target { type: 'zone'; /** * Cloudflare zone tag. The zone must belong to the account. */ zone_tag: string; } } export interface TargetEnvironmentUpdateParams { /** * Path param: Identifier. */ account_id: string; /** * Body param: Human-readable name. */ name: string; /** * Body param: Identifies the Cloudflare asset to scan. Uses a `type` * discriminator. Currently the service supports only `zone` targets. */ target: TargetEnvironmentUpdateParams.Target; /** * Body param: Optional description. */ description?: string | null; } export declare namespace TargetEnvironmentUpdateParams { /** * Identifies the Cloudflare asset to scan. Uses a `type` discriminator. Currently * the service supports only `zone` targets. */ interface Target { type: 'zone'; /** * Cloudflare zone tag. The zone must belong to the account. */ zone_tag: string; } } export interface TargetEnvironmentListParams extends V4PagePaginationArrayParams { /** * Path param: Identifier. */ account_id: string; } export interface TargetEnvironmentDeleteParams { /** * Identifier. */ account_id: string; } export interface TargetEnvironmentEditParams { /** * Path param: Identifier. */ account_id: string; /** * Body param: Optional description. Omit to leave unchanged, set to `null` to * clear, or provide a string to update. */ description?: string | null; /** * Body param: Human-readable name. */ name?: string; /** * Body param: Identifies the Cloudflare asset to scan. Uses a `type` * discriminator. Currently the service supports only `zone` targets. */ target?: TargetEnvironmentEditParams.Target; } export declare namespace TargetEnvironmentEditParams { /** * Identifies the Cloudflare asset to scan. Uses a `type` discriminator. Currently * the service supports only `zone` targets. */ interface Target { type: 'zone'; /** * Cloudflare zone tag. The zone must belong to the account. */ zone_tag: string; } } export interface TargetEnvironmentGetParams { /** * Identifier. */ account_id: string; } export declare namespace TargetEnvironments { export { type TargetEnvironmentCreateResponse as TargetEnvironmentCreateResponse, type TargetEnvironmentUpdateResponse as TargetEnvironmentUpdateResponse, type TargetEnvironmentListResponse as TargetEnvironmentListResponse, type TargetEnvironmentDeleteResponse as TargetEnvironmentDeleteResponse, type TargetEnvironmentEditResponse as TargetEnvironmentEditResponse, type TargetEnvironmentGetResponse as TargetEnvironmentGetResponse, TargetEnvironmentListResponsesV4PagePaginationArray as TargetEnvironmentListResponsesV4PagePaginationArray, type TargetEnvironmentCreateParams as TargetEnvironmentCreateParams, type TargetEnvironmentUpdateParams as TargetEnvironmentUpdateParams, type TargetEnvironmentListParams as TargetEnvironmentListParams, type TargetEnvironmentDeleteParams as TargetEnvironmentDeleteParams, type TargetEnvironmentEditParams as TargetEnvironmentEditParams, type TargetEnvironmentGetParams as TargetEnvironmentGetParams, }; } //# sourceMappingURL=target-environments.d.ts.map