cloudflare
Version:
The official TypeScript library for the Cloudflare API
234 lines • 7.85 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 BaseURLIgnorePatterns extends APIResource {
static readonly _key: readonly ['emailSecurity', 'settings', 'urlIgnorePatterns'];
/**
* Creates a new URL rewrite ignore pattern. URLs matching this pattern will not be
* rewritten.
*
* @example
* ```ts
* const urlIgnorePattern =
* await client.emailSecurity.settings.urlIgnorePatterns.create(
* {
* account_id: '023e105f4ecef8ad9ca31a8372d0c353',
* pattern: 'https://example\\.com/.*',
* },
* );
* ```
*/
create(params: URLIgnorePatternCreateParams, options?: RequestOptions): APIPromise<URLIgnorePatternCreateResponse>;
/**
* Returns a paginated list of URL rewrite ignore patterns for the account. URLs
* matching these patterns will not be rewritten.
*
* @example
* ```ts
* // Automatically fetches more pages as needed.
* for await (const urlIgnorePatternListResponse of client.emailSecurity.settings.urlIgnorePatterns.list(
* { account_id: '023e105f4ecef8ad9ca31a8372d0c353' },
* )) {
* // ...
* }
* ```
*/
list(params: URLIgnorePatternListParams, options?: RequestOptions): PagePromise<URLIgnorePatternListResponsesV4PagePaginationArray, URLIgnorePatternListResponse>;
/**
* Removes a URL rewrite ignore pattern. After deletion, URLs matching this pattern
* will be rewritten again.
*
* @example
* ```ts
* const urlIgnorePattern =
* await client.emailSecurity.settings.urlIgnorePatterns.delete(
* 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415',
* { account_id: '023e105f4ecef8ad9ca31a8372d0c353' },
* );
* ```
*/
delete(patternID: string, params: URLIgnorePatternDeleteParams, options?: RequestOptions): APIPromise<URLIgnorePatternDeleteResponse>;
/**
* Updates an existing URL rewrite ignore pattern. Only provided fields will be
* modified.
*
* @example
* ```ts
* const response =
* await client.emailSecurity.settings.urlIgnorePatterns.edit(
* 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415',
* { account_id: '023e105f4ecef8ad9ca31a8372d0c353' },
* );
* ```
*/
edit(patternID: string, params: URLIgnorePatternEditParams, options?: RequestOptions): APIPromise<URLIgnorePatternEditResponse>;
/**
* Returns a single URL rewrite ignore pattern by its identifier.
*
* @example
* ```ts
* const urlIgnorePattern =
* await client.emailSecurity.settings.urlIgnorePatterns.get(
* 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415',
* { account_id: '023e105f4ecef8ad9ca31a8372d0c353' },
* );
* ```
*/
get(patternID: string, params: URLIgnorePatternGetParams, options?: RequestOptions): APIPromise<URLIgnorePatternGetResponse>;
}
export declare class URLIgnorePatterns extends BaseURLIgnorePatterns {
}
export type URLIgnorePatternListResponsesV4PagePaginationArray = V4PagePaginationArray<URLIgnorePatternListResponse>;
/**
* A URL ignore pattern that exempts matching URLs from Email Security's URL
* rewriting.
*/
export interface URLIgnorePatternCreateResponse {
/**
* URL ignore pattern identifier.
*/
id: string;
created_at: string;
/**
* Regular expression identifying URLs to exempt from rewriting.
*/
pattern: string;
/**
* Optional note describing the reason for the ignore pattern.
*/
comments?: string | null;
/**
* @deprecated Use `modified_at` instead.
*/
last_modified?: string;
modified_at?: string;
}
/**
* A URL ignore pattern that exempts matching URLs from Email Security's URL
* rewriting.
*/
export interface URLIgnorePatternListResponse {
/**
* URL ignore pattern identifier.
*/
id: string;
created_at: string;
/**
* Regular expression identifying URLs to exempt from rewriting.
*/
pattern: string;
/**
* Optional note describing the reason for the ignore pattern.
*/
comments?: string | null;
/**
* @deprecated Use `modified_at` instead.
*/
last_modified?: string;
modified_at?: string;
}
export interface URLIgnorePatternDeleteResponse {
/**
* URL ignore pattern identifier.
*/
id: string;
}
/**
* A URL ignore pattern that exempts matching URLs from Email Security's URL
* rewriting.
*/
export interface URLIgnorePatternEditResponse {
/**
* URL ignore pattern identifier.
*/
id: string;
created_at: string;
/**
* Regular expression identifying URLs to exempt from rewriting.
*/
pattern: string;
/**
* Optional note describing the reason for the ignore pattern.
*/
comments?: string | null;
/**
* @deprecated Use `modified_at` instead.
*/
last_modified?: string;
modified_at?: string;
}
/**
* A URL ignore pattern that exempts matching URLs from Email Security's URL
* rewriting.
*/
export interface URLIgnorePatternGetResponse {
/**
* URL ignore pattern identifier.
*/
id: string;
created_at: string;
/**
* Regular expression identifying URLs to exempt from rewriting.
*/
pattern: string;
/**
* Optional note describing the reason for the ignore pattern.
*/
comments?: string | null;
/**
* @deprecated Use `modified_at` instead.
*/
last_modified?: string;
modified_at?: string;
}
export interface URLIgnorePatternCreateParams {
/**
* Path param: Account identifier tag.
*/
account_id: string;
/**
* Body param: Regular expression identifying URLs to exempt from rewriting.
*/
pattern: string;
/**
* Body param: Optional note describing the reason for the ignore pattern.
*/
comments?: string | null;
}
export interface URLIgnorePatternListParams extends V4PagePaginationArrayParams {
/**
* Path param: Account identifier tag.
*/
account_id: string;
}
export interface URLIgnorePatternDeleteParams {
/**
* Account identifier tag.
*/
account_id: string;
}
export interface URLIgnorePatternEditParams {
/**
* Path param: Account identifier tag.
*/
account_id: string;
/**
* Body param: Optional note describing the reason for the ignore pattern.
*/
comments?: string | null;
/**
* Body param: Regular expression identifying URLs to exempt from rewriting.
*/
pattern?: string;
}
export interface URLIgnorePatternGetParams {
/**
* Account identifier tag.
*/
account_id: string;
}
export declare namespace URLIgnorePatterns {
export { type URLIgnorePatternCreateResponse as URLIgnorePatternCreateResponse, type URLIgnorePatternListResponse as URLIgnorePatternListResponse, type URLIgnorePatternDeleteResponse as URLIgnorePatternDeleteResponse, type URLIgnorePatternEditResponse as URLIgnorePatternEditResponse, type URLIgnorePatternGetResponse as URLIgnorePatternGetResponse, type URLIgnorePatternListResponsesV4PagePaginationArray as URLIgnorePatternListResponsesV4PagePaginationArray, type URLIgnorePatternCreateParams as URLIgnorePatternCreateParams, type URLIgnorePatternListParams as URLIgnorePatternListParams, type URLIgnorePatternDeleteParams as URLIgnorePatternDeleteParams, type URLIgnorePatternEditParams as URLIgnorePatternEditParams, type URLIgnorePatternGetParams as URLIgnorePatternGetParams, };
}
//# sourceMappingURL=url-ignore-patterns.d.ts.map