import { FetchTransportOptions, OperationIndex, Parameters, RequestMethod, Response, Transport } from '../../internal/operation.js'; import type { V2 as reference } from '../../internal/reference/index.js'; import type { Const, RemovePrefix, SimplifyDeep } from '../../internal/type-utils.js'; type Operations = reference.Operation; type RequestLine = keyof Operations; type NoParamsRequestLine = keyof OperationIndex.FilterOptionalParams; type InferResponse = SimplifyDeep; type ResponseData = Response.Success extends { readonly body: infer Data; } ? SimplifyDeep : never; type Config = Omit & { readonly storeHash: string; readonly accessToken: string; }; /** * @description Client for interacting with the BigCommerce V2 Management API * @template CustomEndpoints - A string literal type representing custom API paths * that are not part of the official BigCommerce API specification. This allows * type-safe access to non-standard endpoints. * @example * ```ts * const client = new Client({ storeHash: '1234567890', accessToken: '1234567890' }); */ export declare class Client { constructor(config: Config); constructor(transport: Transport); private readonly transport; send(requestLine: ReqLine): Promise>; send(requestLine: ReqLine, params: Const): Promise>; send(requestLine: string, params?: Parameters): Promise; delete>(requestLine: Path): Promise | null>; delete, Params extends Operations[`DELETE ${Path}`]['parameters']>(path: Path, params: Const): Promise | null>; delete(path: RemovePrefix<'DELETE ', CustomEndpoints>, params?: Parameters): Promise; get>(requestLine: Path): Promise | null>; get, Params extends Operations[`GET ${Path}`]['parameters']>(path: Path, params: Const): Promise | null>; get(path: RemovePrefix<'GET ', CustomEndpoints>, params?: Parameters): Promise; post>(requestLine: Path): Promise>; post, Params extends Operations[`POST ${Path}`]['parameters']>(path: Path, params: Const): Promise>; post(path: RemovePrefix<'POST ', CustomEndpoints>, params?: Parameters): Promise; put>(requestLine: Path): Promise>; put, Params extends Operations[`PUT ${Path}`]['parameters']>(path: Path, params: Const): Promise>; put(path: RemovePrefix<'PUT ', CustomEndpoints>, params?: Parameters): Promise; private checkResponseStatus; } type RequestPath = RequestLine & `${Method} ${any}` extends `${Method} ${infer Path}` ? Path : never; type NoParamsRequestPath = NoParamsRequestLine & `${Method} ${any}` extends `${Method} ${infer Path}` ? Path : never; export {};