cloudflare
Version:
The official TypeScript library for the Cloudflare API
174 lines • 4.95 kB
TypeScript
import * as Core from 'cloudflare/core';
import { APIResource } from 'cloudflare/resource';
import * as ListsAPI from 'cloudflare/resources/zero-trust/gateway/lists/lists';
import * as ItemsAPI from 'cloudflare/resources/zero-trust/gateway/lists/items';
import { SinglePage } from 'cloudflare/pagination';
export declare class Lists extends APIResource {
items: ItemsAPI.Items;
/**
* Creates a new Zero Trust list.
*/
create(params: ListCreateParams, options?: Core.RequestOptions): Core.APIPromise<ListCreateResponse>;
/**
* Updates a configured Zero Trust list.
*/
update(listId: string, params: ListUpdateParams, options?: Core.RequestOptions): Core.APIPromise<GatewayList>;
/**
* Fetches all Zero Trust lists for an account.
*/
list(params: ListListParams, options?: Core.RequestOptions): Core.PagePromise<GatewayListsSinglePage, GatewayList>;
/**
* Deletes a Zero Trust list.
*/
delete(listId: string, params: ListDeleteParams, options?: Core.RequestOptions): Core.APIPromise<ListDeleteResponse>;
/**
* Appends or removes an item from a configured Zero Trust list.
*/
edit(listId: string, params: ListEditParams, options?: Core.RequestOptions): Core.APIPromise<GatewayList>;
/**
* Fetches a single Zero Trust list.
*/
get(listId: string, params: ListGetParams, options?: Core.RequestOptions): Core.APIPromise<GatewayList>;
}
export declare class GatewayListsSinglePage extends SinglePage<GatewayList> {
}
export interface GatewayItem {
created_at?: string;
/**
* The value of the item in a list.
*/
value?: string;
}
export interface GatewayList {
/**
* API Resource UUID tag.
*/
id?: string;
/**
* The number of items in the list.
*/
count?: number;
created_at?: string;
/**
* The description of the list.
*/
description?: string;
/**
* The name of the list.
*/
name?: string;
/**
* The type of list.
*/
type?: 'SERIAL' | 'URL' | 'DOMAIN' | 'EMAIL' | 'IP';
updated_at?: string;
}
export interface ListCreateResponse {
/**
* API Resource UUID tag.
*/
id?: string;
created_at?: string;
/**
* The description of the list.
*/
description?: string;
/**
* The items in the list.
*/
items?: Array<GatewayItem>;
/**
* The name of the list.
*/
name?: string;
/**
* The type of list.
*/
type?: 'SERIAL' | 'URL' | 'DOMAIN' | 'EMAIL' | 'IP';
updated_at?: string;
}
export type ListDeleteResponse = unknown | string | null;
export interface ListCreateParams {
/**
* Path param:
*/
account_id: string;
/**
* Body param: The name of the list.
*/
name: string;
/**
* Body param: The type of list.
*/
type: 'SERIAL' | 'URL' | 'DOMAIN' | 'EMAIL' | 'IP';
/**
* Body param: The description of the list.
*/
description?: string;
/**
* Body param: The items in the list.
*/
items?: Array<GatewayItem>;
}
export interface ListUpdateParams {
/**
* Path param:
*/
account_id: string;
/**
* Body param: The name of the list.
*/
name: string;
/**
* Body param: The description of the list.
*/
description?: string;
}
export interface ListListParams {
account_id: string;
}
export interface ListDeleteParams {
/**
* Path param:
*/
account_id: string;
/**
* Body param:
*/
body: unknown;
}
export interface ListEditParams {
/**
* Path param:
*/
account_id: string;
/**
* Body param: The items in the list.
*/
append?: Array<GatewayItem>;
/**
* Body param: A list of the item values you want to remove.
*/
remove?: Array<string>;
}
export interface ListGetParams {
account_id: string;
}
export declare namespace Lists {
export import GatewayItem = ListsAPI.GatewayItem;
export import GatewayList = ListsAPI.GatewayList;
export import ListCreateResponse = ListsAPI.ListCreateResponse;
export import ListDeleteResponse = ListsAPI.ListDeleteResponse;
export import GatewayListsSinglePage = ListsAPI.GatewayListsSinglePage;
export import ListCreateParams = ListsAPI.ListCreateParams;
export import ListUpdateParams = ListsAPI.ListUpdateParams;
export import ListListParams = ListsAPI.ListListParams;
export import ListDeleteParams = ListsAPI.ListDeleteParams;
export import ListEditParams = ListsAPI.ListEditParams;
export import ListGetParams = ListsAPI.ListGetParams;
export import Items = ItemsAPI.Items;
export import ItemListResponse = ItemsAPI.ItemListResponse;
export import ItemListResponsesSinglePage = ItemsAPI.ItemListResponsesSinglePage;
export import ItemListParams = ItemsAPI.ItemListParams;
}
//# sourceMappingURL=lists.d.ts.map