import { APIResource } from "../../../resource.js"; import * as Core from "../../../core.js"; import { SinglePage } from "../../../pagination.js"; export declare class Labels extends APIResource { /** * Attach label(s) on an operation in endpoint management * * @example * ```ts * const label = * await client.apiGateway.operations.labels.create( * 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415', * { zone_id: '023e105f4ecef8ad9ca31a8372d0c353' }, * ); * ``` */ create(operationId: string, params: LabelCreateParams, options?: Core.RequestOptions): Core.APIPromise; /** * Replace label(s) on an operation in endpoint management * * @example * ```ts * const label = * await client.apiGateway.operations.labels.update( * 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415', * { zone_id: '023e105f4ecef8ad9ca31a8372d0c353' }, * ); * ``` */ update(operationId: string, params: LabelUpdateParams, options?: Core.RequestOptions): Core.APIPromise; /** * Remove label(s) on an operation in endpoint management * * @example * ```ts * const label = * await client.apiGateway.operations.labels.delete( * 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415', * { zone_id: '023e105f4ecef8ad9ca31a8372d0c353' }, * ); * ``` */ delete(operationId: string, params: LabelDeleteParams, options?: Core.RequestOptions): Core.APIPromise; /** * Bulk attach label(s) on operation(s) in endpoint management * * @example * ```ts * // Automatically fetches more pages as needed. * for await (const labelBulkCreateResponse of client.apiGateway.operations.labels.bulkCreate( * { * zone_id: '023e105f4ecef8ad9ca31a8372d0c353', * selector: { * include: { * operation_ids: [ * 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415', * ], * }, * }, * }, * )) { * // ... * } * ``` */ bulkCreate(params: LabelBulkCreateParams, options?: Core.RequestOptions): Core.PagePromise; /** * Bulk remove label(s) on operation(s) in endpoint management * * @example * ```ts * // Automatically fetches more pages as needed. * for await (const labelBulkDeleteResponse of client.apiGateway.operations.labels.bulkDelete( * { zone_id: '023e105f4ecef8ad9ca31a8372d0c353' }, * )) { * // ... * } * ``` */ bulkDelete(params: LabelBulkDeleteParams, options?: Core.RequestOptions): Core.PagePromise; /** * Bulk replace label(s) on operation(s) in endpoint management * * @example * ```ts * // Automatically fetches more pages as needed. * for await (const labelBulkUpdateResponse of client.apiGateway.operations.labels.bulkUpdate( * { * zone_id: '023e105f4ecef8ad9ca31a8372d0c353', * managed: { labels: ['login'] }, * selector: { * include: { * operation_ids: [ * 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415', * ], * }, * }, * user: { labels: ['login'] }, * }, * )) { * // ... * } * ``` */ bulkUpdate(params: LabelBulkUpdateParams, options?: Core.RequestOptions): Core.PagePromise; } export declare class LabelBulkCreateResponsesSinglePage extends SinglePage { } export declare class LabelBulkDeleteResponsesSinglePage extends SinglePage { } export declare class LabelBulkUpdateResponsesSinglePage extends SinglePage { } export interface LabelCreateResponse { /** * The endpoint which can contain path parameter templates in curly braces, each * will be replaced from left to right with {varN}, starting with {var1}, during * insertion. This will further be Cloudflare-normalized upon insertion. See: * https://developers.cloudflare.com/rules/normalization/how-it-works/. */ endpoint: string; /** * RFC3986-compliant host. */ host: string; last_updated: string; /** * The HTTP method used to access the endpoint. */ method: 'GET' | 'POST' | 'HEAD' | 'OPTIONS' | 'PUT' | 'DELETE' | 'CONNECT' | 'PATCH' | 'TRACE'; /** * UUID. */ operation_id: string; labels?: Array; } export declare namespace LabelCreateResponse { interface Label { created_at: string; /** * The description of the label */ description: string; last_updated: string; /** * Metadata for the label */ metadata: unknown; /** * The name of the label */ name: string; /** * - `user` - label is owned by the user * - `managed` - label is owned by cloudflare */ source: 'user' | 'managed'; } } export interface LabelUpdateResponse { /** * The endpoint which can contain path parameter templates in curly braces, each * will be replaced from left to right with {varN}, starting with {var1}, during * insertion. This will further be Cloudflare-normalized upon insertion. See: * https://developers.cloudflare.com/rules/normalization/how-it-works/. */ endpoint: string; /** * RFC3986-compliant host. */ host: string; last_updated: string; /** * The HTTP method used to access the endpoint. */ method: 'GET' | 'POST' | 'HEAD' | 'OPTIONS' | 'PUT' | 'DELETE' | 'CONNECT' | 'PATCH' | 'TRACE'; /** * UUID. */ operation_id: string; labels?: Array; } export declare namespace LabelUpdateResponse { interface Label { created_at: string; /** * The description of the label */ description: string; last_updated: string; /** * Metadata for the label */ metadata: unknown; /** * The name of the label */ name: string; /** * - `user` - label is owned by the user * - `managed` - label is owned by cloudflare */ source: 'user' | 'managed'; } } export interface LabelDeleteResponse { /** * The endpoint which can contain path parameter templates in curly braces, each * will be replaced from left to right with {varN}, starting with {var1}, during * insertion. This will further be Cloudflare-normalized upon insertion. See: * https://developers.cloudflare.com/rules/normalization/how-it-works/. */ endpoint: string; /** * RFC3986-compliant host. */ host: string; last_updated: string; /** * The HTTP method used to access the endpoint. */ method: 'GET' | 'POST' | 'HEAD' | 'OPTIONS' | 'PUT' | 'DELETE' | 'CONNECT' | 'PATCH' | 'TRACE'; /** * UUID. */ operation_id: string; labels?: Array; } export declare namespace LabelDeleteResponse { interface Label { created_at: string; /** * The description of the label */ description: string; last_updated: string; /** * Metadata for the label */ metadata: unknown; /** * The name of the label */ name: string; /** * - `user` - label is owned by the user * - `managed` - label is owned by cloudflare */ source: 'user' | 'managed'; } } export interface LabelBulkCreateResponse { /** * The endpoint which can contain path parameter templates in curly braces, each * will be replaced from left to right with {varN}, starting with {var1}, during * insertion. This will further be Cloudflare-normalized upon insertion. See: * https://developers.cloudflare.com/rules/normalization/how-it-works/. */ endpoint: string; /** * RFC3986-compliant host. */ host: string; last_updated: string; /** * The HTTP method used to access the endpoint. */ method: 'GET' | 'POST' | 'HEAD' | 'OPTIONS' | 'PUT' | 'DELETE' | 'CONNECT' | 'PATCH' | 'TRACE'; /** * UUID. */ operation_id: string; labels?: Array; } export declare namespace LabelBulkCreateResponse { interface Label { created_at: string; /** * The description of the label */ description: string; last_updated: string; /** * Metadata for the label */ metadata: unknown; /** * The name of the label */ name: string; /** * - `user` - label is owned by the user * - `managed` - label is owned by cloudflare */ source: 'user' | 'managed'; } } export interface LabelBulkDeleteResponse { /** * The endpoint which can contain path parameter templates in curly braces, each * will be replaced from left to right with {varN}, starting with {var1}, during * insertion. This will further be Cloudflare-normalized upon insertion. See: * https://developers.cloudflare.com/rules/normalization/how-it-works/. */ endpoint: string; /** * RFC3986-compliant host. */ host: string; last_updated: string; /** * The HTTP method used to access the endpoint. */ method: 'GET' | 'POST' | 'HEAD' | 'OPTIONS' | 'PUT' | 'DELETE' | 'CONNECT' | 'PATCH' | 'TRACE'; /** * UUID. */ operation_id: string; labels?: Array; } export declare namespace LabelBulkDeleteResponse { interface Label { created_at: string; /** * The description of the label */ description: string; last_updated: string; /** * Metadata for the label */ metadata: unknown; /** * The name of the label */ name: string; /** * - `user` - label is owned by the user * - `managed` - label is owned by cloudflare */ source: 'user' | 'managed'; } } export interface LabelBulkUpdateResponse { /** * The endpoint which can contain path parameter templates in curly braces, each * will be replaced from left to right with {varN}, starting with {var1}, during * insertion. This will further be Cloudflare-normalized upon insertion. See: * https://developers.cloudflare.com/rules/normalization/how-it-works/. */ endpoint: string; /** * RFC3986-compliant host. */ host: string; last_updated: string; /** * The HTTP method used to access the endpoint. */ method: 'GET' | 'POST' | 'HEAD' | 'OPTIONS' | 'PUT' | 'DELETE' | 'CONNECT' | 'PATCH' | 'TRACE'; /** * UUID. */ operation_id: string; labels?: Array; } export declare namespace LabelBulkUpdateResponse { interface Label { created_at: string; /** * The description of the label */ description: string; last_updated: string; /** * Metadata for the label */ metadata: unknown; /** * The name of the label */ name: string; /** * - `user` - label is owned by the user * - `managed` - label is owned by cloudflare */ source: 'user' | 'managed'; } } export interface LabelCreateParams { /** * Path param: Identifier. */ zone_id: string; /** * Body param: List of managed label names. */ managed?: Array; /** * Body param: List of user label names. */ user?: Array; } export interface LabelUpdateParams { /** * Path param: Identifier. */ zone_id: string; /** * Body param: List of managed label names. Omitting this property or passing an * empty array will result in all managed labels being removed from the operation */ managed?: Array; /** * Body param: List of user label names. Omitting this property or passing an empty * array will result in all user labels being removed from the operation */ user?: Array; } export interface LabelDeleteParams { /** * Identifier. */ zone_id: string; } export interface LabelBulkCreateParams { /** * Path param: Identifier. */ zone_id: string; /** * Body param: Operation IDs selector */ selector: LabelBulkCreateParams.Selector; /** * Body param */ managed?: LabelBulkCreateParams.Managed; /** * Body param */ user?: LabelBulkCreateParams.User; } export declare namespace LabelBulkCreateParams { /** * Operation IDs selector */ interface Selector { include: Selector.Include; } namespace Selector { interface Include { operation_ids: Array; } } interface Managed { /** * List of managed label names. */ labels?: Array; } interface User { /** * List of user label names. */ labels?: Array; } } export interface LabelBulkDeleteParams { /** * Identifier. */ zone_id: string; } export interface LabelBulkUpdateParams { /** * Path param: Identifier. */ zone_id: string; /** * Body param: Managed labels to replace for all affected operations */ managed: LabelBulkUpdateParams.Managed; /** * Body param: Operation IDs selector */ selector: LabelBulkUpdateParams.Selector; /** * Body param: User labels to replace for all affected operations */ user: LabelBulkUpdateParams.User; } export declare namespace LabelBulkUpdateParams { /** * Managed labels to replace for all affected operations */ interface Managed { /** * List of managed label names. Providing an empty array will result in all managed * labels being removed from all affected operations */ labels: Array; } /** * Operation IDs selector */ interface Selector { include: Selector.Include; } namespace Selector { interface Include { operation_ids: Array; } } /** * User labels to replace for all affected operations */ interface User { /** * List of user label names. Providing an empty array will result in all user * labels being removed from all affected operations */ labels: Array; } } export declare namespace Labels { export { type LabelCreateResponse as LabelCreateResponse, type LabelUpdateResponse as LabelUpdateResponse, type LabelDeleteResponse as LabelDeleteResponse, type LabelBulkCreateResponse as LabelBulkCreateResponse, type LabelBulkDeleteResponse as LabelBulkDeleteResponse, type LabelBulkUpdateResponse as LabelBulkUpdateResponse, LabelBulkCreateResponsesSinglePage as LabelBulkCreateResponsesSinglePage, LabelBulkDeleteResponsesSinglePage as LabelBulkDeleteResponsesSinglePage, LabelBulkUpdateResponsesSinglePage as LabelBulkUpdateResponsesSinglePage, type LabelCreateParams as LabelCreateParams, type LabelUpdateParams as LabelUpdateParams, type LabelDeleteParams as LabelDeleteParams, type LabelBulkCreateParams as LabelBulkCreateParams, type LabelBulkDeleteParams as LabelBulkDeleteParams, type LabelBulkUpdateParams as LabelBulkUpdateParams, }; } //# sourceMappingURL=labels.d.ts.map