import { APIResource } from "../core/resource.mjs"; import * as ListsAPI from "./lists.mjs"; import { APIPromise } from "../core/api-promise.mjs"; import { RequestOptions } from "../internal/request-options.mjs"; export declare class Lists extends APIResource { /** * Create a new list */ create(body: ListCreateParams, options?: RequestOptions): APIPromise; /** * Get a specific list */ retrieve(id: number, options?: RequestOptions): APIPromise; /** * Update a list */ update(id: number, body: ListUpdateParams, options?: RequestOptions): APIPromise; /** * Get all lists */ list(query?: ListListParams | null | undefined, options?: RequestOptions): APIPromise; /** * Delete a list */ delete(id: number, options?: RequestOptions): APIPromise; } export interface List { id?: number; created_at?: string; name?: string; optin?: 'single' | 'double'; subscriber_count?: number; tags?: Array; type?: 'public' | 'private'; updated_at?: string; uuid?: string; } export interface ListInput { name: string; optin: 'single' | 'double'; type: 'public' | 'private'; tags?: Array; } export interface ListCreateResponse { data?: List; } export interface ListRetrieveResponse { data?: List; } export interface ListListResponse { data?: ListListResponse.Data; } export declare namespace ListListResponse { interface Data { page?: number; per_page?: number; results?: Array; total?: number; } } export interface ListCreateParams { name: string; optin: 'single' | 'double'; type: 'public' | 'private'; tags?: Array; } export interface ListUpdateParams { name: string; optin: 'single' | 'double'; type: 'public' | 'private'; tags?: Array; } export interface ListListParams { /** * Sort order */ order?: 'asc' | 'desc'; /** * Field to order by */ order_by?: 'name' | 'created_at' | 'updated_at'; page?: number; per_page?: number; /** * Optional search query */ query?: string; } export declare namespace Lists { export { type List as List, type ListInput as ListInput, type ListCreateResponse as ListCreateResponse, type ListRetrieveResponse as ListRetrieveResponse, type ListListResponse as ListListResponse, type ListCreateParams as ListCreateParams, type ListUpdateParams as ListUpdateParams, type ListListParams as ListListParams, }; } //# sourceMappingURL=lists.d.mts.map