type HttpMethod = 'get' | 'GET' | 'delete' | 'DELETE' | 'head' | 'HEAD' | 'options' | 'OPTIONS' | 'post' | 'POST' | 'put' | 'PUT' | 'patch' | 'PATCH' | 'purge' | 'PURGE' | 'link' | 'LINK' | 'unlink' | 'UNLINK';
/**
 * @deprecated Automatic parsing will be removed in the future to ensure the same behavior of different Fetchers.
 */
type AutomaticResponseParsing = 'automatic';
type ResponseParsing = AutomaticResponseParsing | 'text' | 'json' | 'stream';
type FetchConfig = {
    url: string;
    params: {
        [key: string]: any;
    };
    method: HttpMethod;
    headers: {
        [key: string]: string;
    };
    responseParsing: ResponseParsing;
};

type Fetcher = {
    fetch: (options: FetchConfig) => Promise<{
        data: any;
    }>;
};
type CreateFetcher = (options: CreateFetcherConfig) => Fetcher;
type CreateFetcherConfig = {
    host: string;
};
type FetcherConfig = {
    createFetcher: CreateFetcher;
};
type IClientConfig = CreateFetcherConfig & FetcherConfig;

interface IEndpoints {
    [key: string]: any;
}
declare class Client$1 {
    protected host: string;
    protected fetcher: Fetcher;
    constructor(customOptions: IClientConfig, endpoints: IEndpoints);
}

// TypeScript Version: 3.0

type AxiosRequestHeaders = Record<string, string | number | boolean>;

type AxiosResponseHeaders = Record<string, string> & {
  "set-cookie"?: string[]
};

interface AxiosRequestTransformer {
  (data: any, headers?: AxiosRequestHeaders): any;
}

interface AxiosResponseTransformer {
  (data: any, headers?: AxiosResponseHeaders): any;
}

interface AxiosAdapter {
  (config: AxiosRequestConfig): AxiosPromise;
}

interface AxiosBasicCredentials {
  username: string;
  password: string;
}

interface AxiosProxyConfig {
  host: string;
  port: number;
  auth?: {
    username: string;
    password: string;
  };
  protocol?: string;
}

type Method =
  | 'get' | 'GET'
  | 'delete' | 'DELETE'
  | 'head' | 'HEAD'
  | 'options' | 'OPTIONS'
  | 'post' | 'POST'
  | 'put' | 'PUT'
  | 'patch' | 'PATCH'
  | 'purge' | 'PURGE'
  | 'link' | 'LINK'
  | 'unlink' | 'UNLINK';

type ResponseType =
  | 'arraybuffer'
  | 'blob'
  | 'document'
  | 'json'
  | 'text'
  | 'stream';

  type responseEncoding =
  | 'ascii' | 'ASCII'
  | 'ansi' | 'ANSI'
  | 'binary' | 'BINARY'
  | 'base64' | 'BASE64'
  | 'base64url' | 'BASE64URL'
  | 'hex' | 'HEX'
  | 'latin1' | 'LATIN1'
  | 'ucs-2' | 'UCS-2'
  | 'ucs2' | 'UCS2'
  | 'utf-8' | 'UTF-8'
  | 'utf8' | 'UTF8'
  | 'utf16le' | 'UTF16LE';

interface TransitionalOptions {
  silentJSONParsing?: boolean;
  forcedJSONParsing?: boolean;
  clarifyTimeoutError?: boolean;
}

interface AxiosRequestConfig<D = any> {
  url?: string;
  method?: Method;
  baseURL?: string;
  transformRequest?: AxiosRequestTransformer | AxiosRequestTransformer[];
  transformResponse?: AxiosResponseTransformer | AxiosResponseTransformer[];
  headers?: AxiosRequestHeaders;
  params?: any;
  paramsSerializer?: (params: any) => string;
  data?: D;
  timeout?: number;
  timeoutErrorMessage?: string;
  withCredentials?: boolean;
  adapter?: AxiosAdapter;
  auth?: AxiosBasicCredentials;
  responseType?: ResponseType;
  responseEncoding?: responseEncoding | string;
  xsrfCookieName?: string;
  xsrfHeaderName?: string;
  onUploadProgress?: (progressEvent: any) => void;
  onDownloadProgress?: (progressEvent: any) => void;
  maxContentLength?: number;
  validateStatus?: ((status: number) => boolean) | null;
  maxBodyLength?: number;
  maxRedirects?: number;
  socketPath?: string | null;
  httpAgent?: any;
  httpsAgent?: any;
  proxy?: AxiosProxyConfig | false;
  cancelToken?: CancelToken;
  decompress?: boolean;
  transitional?: TransitionalOptions;
  signal?: AbortSignal;
  insecureHTTPParser?: boolean;
}

interface AxiosResponse<T = any, D = any>  {
  data: T;
  status: number;
  statusText: string;
  headers: AxiosResponseHeaders;
  config: AxiosRequestConfig<D>;
  request?: any;
}

interface AxiosPromise<T = any> extends Promise<AxiosResponse<T>> {
}

interface Cancel {
  message: string | undefined;
}

interface CancelToken {
  promise: Promise<Cancel>;
  reason?: Cancel;
  throwIfRequested(): void;
}

type RawFetchResponse = AxiosResponse | Response | any;

declare class SpreeSDKError extends Error {
    constructor(message: string);
}

declare class SpreeError extends SpreeSDKError {
    serverResponse: RawFetchResponse;
    constructor(serverResponse: RawFetchResponse);
}

declare class BasicSpreeError extends SpreeError {
    summary: string;
    constructor(serverResponse: RawFetchResponse, errorsSummary: string);
}

type FieldErrors = unknown[];
interface Errors {
    [key: string]: Errors | FieldErrors;
}

declare class ExpandedSpreeError extends BasicSpreeError {
    errors: Errors;
    constructor(serverResponse: RawFetchResponse, errorsSummary: string, errors: {
        [fieldPath: string]: FieldErrors;
    });
    /**
     * @deprecated This method will be removed in future versions.
     * Use optional chaining, lodash/get, Final Form's getIn or another
     * 3rd party library to recreate the behavior of this method.
     */
    getErrors(path: string[]): Errors | FieldErrors | null;
}

declare class MisconfigurationError extends SpreeSDKError {
    constructor(message: string);
}

declare class NoResponseError extends SpreeSDKError {
    constructor();
}

type RawFetchRequest = Request | any;

declare class FetchError extends SpreeSDKError {
    response?: RawFetchResponse;
    request?: RawFetchRequest;
    data?: any;
    constructor(response?: RawFetchResponse, request?: unknown, data?: unknown, message?: string);
}

declare class DocumentRelationshipError extends SpreeSDKError {
    constructor(message: string);
}

type ErrorType = 'basic' | 'full' | 'limited';

interface JsonApiDocument {
    id: string;
    type: string;
    attributes: any;
    relationships: any;
}
interface JsonApiResponse {
    data: JsonApiDocument | JsonApiDocument[];
    included?: JsonApiDocument[];
}
interface JsonApiListResponse extends JsonApiResponse {
    data: JsonApiDocument[];
    meta?: {
        total_pages: number;
        total_count: number;
        count: number;
    };
}
interface JsonApiSingleResponse extends JsonApiResponse {
    data: JsonApiDocument;
}

interface Result<F extends Error, S> {
    isSuccess(): boolean;
    isFail(): boolean;
    success(): S;
    fail(): F;
}

interface ResultResponse<SuccessType> extends Result<SpreeSDKError, SuccessType> {
}

/**
 * @deprecated Use
 * {@link RequiredAnyToken},
 * {@link OptionalAnyToken},
 * {@link RequiredAccountToken},
 * {@link OptionalAccountToken} or
 * {@link WithCommonOptions} specific to the endpoint you're attempting to call
 * instead.
 */
interface IToken {
    orderToken?: string;
    bearerToken?: string;
}
type RequiredAnyToken = {
    order_token: string;
    bearer_token?: never;
} | {
    order_token?: never;
    bearer_token: string;
};
type OptionalAnyToken = {
    order_token?: string;
    bearer_token?: never;
} | {
    order_token?: never;
    bearer_token?: string;
};
type RequiredAccountToken = {
    bearer_token: string;
};
type OptionalAccountToken = {
    bearer_token?: string;
};
interface IOAuthToken {
    access_token: string;
    token_type: 'Bearer';
    expires_in: number;
    refresh_token: string;
    created_at: number;
}
interface IPlatformToken {
    access_token: string;
    token_type: 'Bearer';
    expires_in: number;
    scope: string;
    created_at: number;
}
interface IPlatformUserToken extends IPlatformToken {
    refresh_token: string;
}
interface IOAuthTokenResult extends ResultResponse<IOAuthToken> {
}
interface IPlatformTokenResult extends ResultResponse<IPlatformToken> {
}
interface IPlatformUserTokenResult extends ResultResponse<IPlatformUserToken> {
}

type EndpointOptions = {
    fetcher: Fetcher;
};
declare class Http {
    fetcher: Fetcher;
    constructor({ fetcher }: EndpointOptions);
    protected spreeResponse<ResponseType = JsonApiResponse>(method: HttpMethod, url: string, tokens?: IToken, params?: any, responseParsing?: ResponseParsing): Promise<ResultResponse<ResponseType>>;
    /**
     * The HTTP error code returned by Spree is not indicative of its response shape.
     * This function determines the information provided by Spree and uses everything available.
     */
    protected classifySpreeError(error: FetchError): ErrorType;
    protected processError(error: Error): SpreeSDKError;
    protected processSpreeError(error: FetchError): SpreeError;
    protected spreeOrderHeaders(tokens: IToken): {
        [headerName: string]: string;
    };
}

interface RelationType {
    id: string;
    type: string;
}
interface IRelationships {
    [key: string]: {
        data: RelationType | RelationType[];
    };
}

declare const findDocument: <DocumentType_1 extends JsonApiDocument>(spreeSuccessResponse: JsonApiResponse, relationType: RelationType) => DocumentType_1;
declare const findRelationshipDocuments: <DocumentType_1 extends JsonApiDocument>(spreeSuccessResponse: JsonApiResponse, sourceDocument: JsonApiDocument, relationshipName: string) => DocumentType_1[];
declare const findSingleRelationshipDocument: <DocumentType_1 extends JsonApiDocument>(spreeSuccessResponse: JsonApiResponse, sourceDocument: JsonApiDocument, relationshipName: string) => DocumentType_1;

/**
 * Serializes object into a query string understood by Spree.
 * Spree uses the "brackets" format for serializing arrays which
 * is a different format than used by URLSearchParams.
 */
declare const objectToQuerystring: (source: Record<string, any>) => string;

declare const makeSuccess: <F extends Error, S>(value: S) => Result<F, S>;
declare const makeFail: <F extends Error, S>(value: F) => Result<F, S>;
/**
 * Converts a Result instance into its JSON representation.
 * Not all information is preserved from the Result instance.
 * Most notably, non-enumerable properties are skipped.
 */
declare const toJson: <F extends Error, S>(result: Result<F, S>) => {
    type: string;
    subtype: string;
    value?: any;
};
/**
 * Converts JSON to a Result instance.
 * If the JSON represents a fail, converts the error into an instance of SpreeSDKError its subtype.
 */
declare const fromJson: (json: {
    [key: string]: any;
}) => Result<SpreeSDKError, any>;
/**
 * If Spree returns a success response, extracts and returns its data.
 * Otherwise, throws the response's SpreeSDKError. Useful for handling
 * SpreeSDKErrors inside try..catch blocks.
 */
declare const extractSuccess: <ResponseType_1, T extends ResponseType_1>(spreeRequest: Promise<ResultResponse<T>>) => Promise<T>;

declare const split: (source: Record<string, any>, specialKeys: string[]) => [Record<string, any>, Record<string, any>];
/**
 * @deprecated This function is used only to support the old method signatures
 * and will be removed in the future.
 */
declare const squashAndPreparePositionalArguments: (positionalArguments: Record<string, any>[], specialKeys: string[]) => Record<string, any> & {
    token: IToken;
} & {
    params: Record<string, any>;
};

type CreateFetchFetcherConfig = CreateFetcherConfig & {
    fetch: typeof globalThis.fetch | any;
    requestConstructor: typeof globalThis.Request | any;
};
type CreateCustomizedFetchFetcher = (options: CreateFetchFetcherConfig) => Fetcher;

type DeepAnyObject<T> = T extends (...args: any[]) => any ? T : T extends Array<infer U> ? _DeepAnyObjectArray<U> : T extends object ? _DeepAnyObjectObject<T> : T | undefined;
interface _DeepAnyObjectArray<T> extends Array<DeepAnyObject<T>> {
}
type _DeepAnyObjectObject<T> = {
    [P in keyof T]: DeepAnyObject<T[P]>;
} & Record<string, any>;

type EmptyObjectResponse = Record<string, never>;
interface EmptyObjectResult extends ResultResponse<EmptyObjectResponse> {
}

type ImageTransformation = {
    size?: string;
    quality?: number;
};

interface LocalizedSlugs {
    [key: string]: string;
}

type NoContentResponse = '';
interface NoContentResult extends ResultResponse<NoContentResponse> {
}

interface IQuery {
    currency?: string;
    locale?: string;
    include?: string;
    fields?: {
        [key: string]: string;
    };
    filter?: {
        [key: string]: number | string;
    };
    page?: number;
    per_page?: number;
    sort?: string;
    [customSpreeExtensionKey: string]: any;
}
/**
 * @deprecated Use {@link ListOptions} instead.
 */
interface IProductsQuery extends IQuery {
    image_transformation?: {
        size?: string;
        quality?: number;
    };
}

type AllowedCustomizations = {
    suggestToken: boolean;
    suggestQuery: boolean;
    optionalToken: boolean;
    onlyAccountToken: boolean;
};
type DefaultCustomizations = AllowedCustomizations & {
    suggestToken: false;
    suggestQuery: false;
    optionalToken: false;
    onlyAccountToken: false;
};
type WithCommonOptions<CustomizationsOrNull extends Partial<AllowedCustomizations> | null = Partial<AllowedCustomizations> | null, CustomOptions extends Record<string, any> = Record<string, any>, Customizations extends CustomizationsOrNull extends null ? Record<string, unknown> : CustomizationsOrNull = CustomizationsOrNull extends null ? Record<string, unknown> : CustomizationsOrNull, IntersectedCustomizations extends Customizations & DefaultCustomizations = Customizations & DefaultCustomizations, FinalCustomizations extends {
    [P in keyof AllowedCustomizations]: IntersectedCustomizations[P] extends never ? Customizations[P] : DefaultCustomizations[P];
} = {
    [P in keyof AllowedCustomizations]: IntersectedCustomizations[P] extends never ? Customizations[P] : DefaultCustomizations[P];
}> = DeepAnyObject<((FinalCustomizations['suggestToken'] extends true ? FinalCustomizations['onlyAccountToken'] extends true ? FinalCustomizations['optionalToken'] extends true ? OptionalAccountToken : RequiredAccountToken : FinalCustomizations['optionalToken'] extends true ? OptionalAnyToken : RequiredAnyToken : Record<string, unknown>) & (FinalCustomizations['suggestQuery'] extends true ? IQuery : Record<string, unknown>)) & CustomOptions>;

declare const storefrontPath = "api/v2/storefront";
declare const endpoints$1: {
    productsPath: () => string;
    productPath: (id: string) => string;
    taxonsPath: () => string;
    taxonPath: (id: string) => string;
    countriesPath: () => string;
    countryPath: (iso: string) => string;
    cartPath: () => string;
    cartAddItemPath: () => string;
    cartRemoveItemPath: (id: string) => string;
    cartEmptyPath: () => string;
    cartSetItemQuantity: () => string;
    cartApplyCodePath: () => string;
    cartRemoveCodePath: (code?: string) => string;
    cartRemoveAllCoupons: () => string;
    /**
     * @deprecated Use {@link cartEstimateShippingRatesPath} instead.
     */
    cartEstimateShippingMethodsPath: () => string;
    cartEstimateShippingRatesPath: () => string;
    cartAssociatePath: () => string;
    cartChangeCurrencyPath: () => string;
    checkoutPath: () => string;
    checkoutNextPath: () => string;
    checkoutAdvancePath: () => string;
    checkoutCompletePath: () => string;
    checkoutAddStoreCreditsPath: () => string;
    checkoutRemoveStoreCreditsPath: () => string;
    checkoutPaymentMethodsPath: () => string;
    /**
     * @deprecated Use {@link checkoutShippingRatesPath} instead.
     */
    checkoutShippingMethodsPath: () => string;
    checkoutShippingRatesPath: () => string;
    checkoutSelectShippingMethodPath: () => string;
    checkoutAddPaymentPath: () => string;
    checkoutCreateStripeSessionPath: () => string;
    oauthTokenPath: () => string;
    oauthRevokePath: () => string;
    accountPath: () => string;
    accountAddressPath: (id: string) => string;
    accountAddressesPath: () => string;
    accountAddressRemovePath: (id: string) => string;
    accountConfirmPath: (confirmationToken: string) => string;
    accountCreditCardsPath: () => string;
    accountDefaultCreditCardPath: () => string;
    accountCreditCardRemovePath: (id: string) => string;
    accountCompletedOrdersPath: () => string;
    accountCompletedOrderPath: (orderNumber: string) => string;
    forgotPasswordPath: () => string;
    resetPasswordPath: (resetPasswordToken: string) => string;
    orderStatusPath: (orderNumber: string) => string;
    pagesPath: () => string;
    pagePath: (id: string) => string;
    defaultCountryPath: () => string;
    digitalAssetsDownloadPath: (token: string) => string;
    menusPath: () => string;
    menuPath: (id: string) => string;
    wishlistsPath: () => string;
    wishlistPath: (token: string) => string;
    defaultWishlistPath: () => string;
    wishlistsAddWishedItemPath: (token: string) => string;
    wishlistsUpdateWishedItemQuantityPath: (token: string, id: string) => string;
    wishlistsRemoveWishedItemPath: (token: string, id: string) => string;
    vendorsPath: () => string;
    vendorPath: (id: string) => string;
};

interface IAddress {
    firstname: string;
    lastname: string;
    address1: string;
    address2?: string;
    city: string;
    zipcode: string;
    state_name: string;
    country_iso: string;
    phone?: string;
    company?: string;
}

interface AccountAttr extends JsonApiDocument {
    data: {
        id: string;
        type: string;
        attributes: {
            email: string;
            store_credits: number;
            completed_orders: number;
        };
        relationships: IRelationships;
    };
}
interface IAccount extends JsonApiSingleResponse {
    data: AccountAttr;
}
interface IAccountResult extends ResultResponse<IAccount> {
}
interface IAccountConfirmation {
    data: {
        state: string;
    };
}
interface IAccountConfirmationResult extends ResultResponse<IAccountConfirmation> {
}
/**
 * @deprecated Use {@link ForgotPasswordOptions} instead.
 */
interface ForgotPasswordParams extends IQuery {
    user: {
        email: string;
    };
}
/**
 * @deprecated Use {@link ResetPasswordOptions} instead.
 */
interface ResetPasswordParams extends IQuery {
    user: {
        password: string;
        password_confirmation: string;
    };
}
/**
 * @deprecated Use {@link CreateAddressOptions} instead.
 */
interface AccountAddressParams extends IQuery {
    address: IAddress;
}
interface AccountAddressAttr extends JsonApiDocument {
    attributes: IAddress;
}
interface AccountAddressResponse extends JsonApiSingleResponse {
    data: AccountAddressAttr;
}
interface AccountAddressesResponse extends JsonApiListResponse {
    data: AccountAddressAttr[];
}
interface AccountAddressResult extends ResultResponse<AccountAddressResponse> {
}
interface AccountAddressesResult extends ResultResponse<AccountAddressesResponse> {
}
type AccountInfoOptions = WithCommonOptions<{
    suggestToken: true;
    suggestQuery: true;
}>;
type CreditCardsListOptions = WithCommonOptions<{
    suggestToken: true;
    onlyAccountToken: true;
    suggestQuery: true;
}>;
type DefaultCreditCardOptions = WithCommonOptions<{
    suggestToken: true;
    onlyAccountToken: true;
    suggestQuery: true;
}>;
type RemoveCreditCardOptions = WithCommonOptions<{
    suggestToken: true;
    onlyAccountToken: true;
    suggestQuery: true;
}, {
    id: string;
}>;
type CompletedOrdersListOptions = WithCommonOptions<{
    suggestToken: true;
    onlyAccountToken: true;
    suggestQuery: true;
}>;
type CompletedOrderOptions = WithCommonOptions<{
    suggestToken: true;
    onlyAccountToken: true;
    suggestQuery: true;
}, {
    order_number: string;
}>;
type CreateOptions$2 = WithCommonOptions<null, {
    user: {
        email: string;
        password: string;
        password_confirmation: string;
        first_name?: string;
        last_name?: string;
        public_metadata?: {
            [key: string]: string;
        };
        private_metadata?: {
            [key: string]: string;
        };
    };
}>;
type ConfirmOptions = WithCommonOptions<null, {
    confirmation_token: string;
}>;
type ForgotPasswordOptions = WithCommonOptions<null, ForgotPasswordParams>;
type ResetPasswordOptions = WithCommonOptions<null, ResetPasswordParams & {
    reset_password_token: string;
}>;
type UpdateOptions$1 = WithCommonOptions<{
    suggestToken: true;
    onlyAccountToken: true;
}, {
    user: {
        email: string;
        password?: string;
        password_confirmation?: string;
        first_name?: string;
        last_name?: string;
        bill_address_id?: string;
        ship_address_id?: string;
        public_metadata?: {
            [key: string]: string;
        };
        private_metadata?: {
            [key: string]: string;
        };
    };
}>;
type AddressesListOptions = WithCommonOptions<{
    suggestToken: true;
    onlyAccountToken: true;
}>;
type ShowAddressOptions = WithCommonOptions<{
    suggestToken: true;
    onlyAccountToken: true;
    suggestQuery: true;
}, {
    id: string;
}>;
type CreateAddressOptions = WithCommonOptions<{
    suggestToken: true;
    onlyAccountToken: true;
    suggestQuery: true;
}, AccountAddressParams>;
type RemoveAddressOptions = WithCommonOptions<{
    suggestToken: true;
    onlyAccountToken: true;
}, {
    id: string;
}>;
type UpdateAddressOptions = WithCommonOptions<{
    suggestToken: true;
    onlyAccountToken: true;
}, AccountAddressParams & {
    id: string;
}>;

interface CreditCardAttr extends JsonApiDocument {
    type: string;
    id: string;
    attributes: {
        cc_type: string;
        last_digits: string;
        month: number;
        year: number;
        name: string;
        default: boolean;
    };
    relationships: IRelationships;
}
interface ICreditCard extends JsonApiSingleResponse {
    data: CreditCardAttr;
}
interface ICreditCards extends JsonApiListResponse {
    data: CreditCardAttr[];
}
interface ICreditCardResult extends ResultResponse<ICreditCard> {
}
interface ICreditCardsResult extends ResultResponse<ICreditCards> {
}

interface OrderAttr extends JsonApiDocument {
    type: string;
    id: string;
    attributes: {
        number: string;
        item_total: string;
        total: string;
        ship_total: string;
        adjustment_total: string;
        included_tax_total: string;
        additional_tax_total: string;
        display_additional_tax_total: string;
        display_included_tax_total: string;
        tax_total: string;
        currency: string;
        state: string;
        token: string;
        email: string;
        display_item_total: string;
        display_ship_total: string;
        display_adjustment_total: string;
        display_tax_total: string;
        promo_total: string;
        display_promo_total: string;
        item_count: number;
        special_instructions: string;
        display_total: string;
        created_at: Date;
        updated_at: Date;
        completed_at: Date;
    };
    relationships: IRelationships;
}
interface IOrder extends JsonApiSingleResponse {
    data: OrderAttr;
}
interface IOrders extends JsonApiListResponse {
    data: OrderAttr[];
}
interface IOrderResult extends ResultResponse<IOrder> {
}
interface IOrdersResult extends ResultResponse<IOrders> {
}
type StatusOptions = WithCommonOptions<{
    suggestToken: true;
    suggestQuery: true;
}, {
    order_number: string;
}>;

declare class Account extends Http {
    /**
     * Creates new account and returns its attributes. See [api docs](https://api.spreecommerce.org/docs/api-v2/534a12ece987f-create-an-account).
     *
     * **Success response schema:** [Success schema](../pages/response-schema.html#success-schema)
     *
     * **Failure response schema:** [Error schema](../pages/response-schema.html#error-schema)
     *
     * **Example:**
     * ```ts
     * const response = await client.account.create({
     *   user: {
     *     email: 'john@snow.org',
     *     password: 'spree123',
     *     password_confirmation: 'spree123'
     *   }
     * })
     * ```
     */
    create(options: CreateOptions$2): Promise<IAccountResult>;
    /**
     * @hidden
     * @deprecated Use the combined options signature instead.
     * Creates new account and returns its attributes.
     */
    create(params: IQuery): Promise<IAccountResult>;
    /**
     * Confirms new account e-mail and returns account registration status. See [reference](https://github.com/spree/spree_auth_devise/blob/db4ccf202f42cdb713931e9915b213ab9c9b2062/config/routes.rb).
     *
     * **Success response schema:**
     * ```ts
     * {
     *   data: {
     *     state: string
     *   }
     * }
     * ```
     * **Failure response schema:** [Error schema](../pages/response-schema.html#error-schema)
     *
     * **Example:**
     * ```ts
     * const response = await client.account.confirm({ confirmation_token: '2xssfC9Hzf8DJXyRZGmB' })
     * ```
     */
    confirm(option: ConfirmOptions): Promise<IAccountConfirmationResult>;
    /**
     * @hidden
     * @deprecated Use the combined options signature instead.
     */
    confirm(confirmationToken: string): Promise<IAccountConfirmationResult>;
    /**
     * Sends an account recovery link to the provided email address. The link allows resetting the password for the account.
     *
     * **Success response schema:** [Success schema](../pages/response-schema.html#success-schema)
     *
     * **Failure response schema:** [Error schema](../pages/response-schema.html#error-schema)
     *
     * **Example:**
     * ```ts
     * const response = await client.account.forgotPassword({
     *   user: {
     *     email: 'spree@example.com'
     *   }
     * })
     * ```
     */
    forgotPassword(options: ForgotPasswordOptions): Promise<NoContentResult>;
    /**
     * @hidden
     * @deprecated Use the combined options signature instead.
     */
    forgotPassword(params: ForgotPasswordParams): Promise<NoContentResult>;
    /**
     * Changes the password associated with the account using an account recovery token.
     *
     * **Success response schema:** [Success schema](../pages/response-schema.html#success-schema)
     *
     * **Failure response schema:** [Error schema](../pages/response-schema.html#error-schema)
     *
     * **Example:**
     * ```ts
     * const response = await client.account.resetPassword({
     *   reset_password_token: '7381273269536713689562374856',
     *   user: {
     *     password: '123!@#asdASD',
     *     password_confirmation: '123!@#asdASD'
     *   }
     * })
     * ```
     */
    resetPassword(options: ResetPasswordOptions): Promise<NoContentResult>;
    /**
     * @hidden
     * @deprecated Use the combined options signature instead.
     */
    resetPassword(resetPasswordToken: string, params: ResetPasswordParams): Promise<NoContentResult>;
    /**
     * Updates account and returns its attributes. See [api docs](https://api.spreecommerce.org/docs/api-v2/9f8e112bbb91f-update-an-account).
     *
     * **Required token:** [Bearer token](../pages/tokens.html#bearer-token)
     *
     * **Success response schema:** [Success schema](../pages/response-schema.html#success-schema)
     *
     * **Failure response schema:** [Error schema](../pages/response-schema.html#error-schema)
     *
     * **Example:**
     * ```ts
     * const response = await client.account.update({
     *   bearer_token: '7381273269536713689562374856',
     *   user: {
     *     email: 'john@snow.org',
     *     password: 'new_spree123',
     *     password_confirmation: 'new_spree123'
     *   }
     * })
     * ```
     */
    update(options: UpdateOptions$1): Promise<IAccountResult>;
    /**
     * @hidden
     * @deprecated Use the combined options signature instead.
     */
    update(token: IToken, params: IQuery): Promise<IAccountResult>;
    /**
     * Returns current user information. See [api docs](https://api.spreecommerce.org/docs/api-v2/a531029531471-retrieve-an-account).
     *
     * **Required token:** [Bearer token](../pages/tokens.html#bearer-token)
     *
     * **Success response schema:** [Success schema](../pages/response-schema.html#success-schema)
     *
     * **Failure response schema:** [Error schema](../pages/response-schema.html#error-schema)
     *
     * **Example:**
     * ```ts
     * const response = await client.account.accountInfo({ bearer_token: '7381273269536713689562374856' })
     * ```
     */
    accountInfo(options: AccountInfoOptions): Promise<IAccountResult>;
    /**
     * @hidden
     * @deprecated Use the combined options signature instead.
     */
    accountInfo(token: IToken, params?: IQuery): Promise<IAccountResult>;
    /**
     * Returns a list of Credit Cards for the signed in User. See [api docs](https://api.spreecommerce.org/docs/api-v2/eae76f03a90db-list-all-credit-cards).
     *
     * **Required token:** [Bearer token](../pages/tokens.html#bearer-token)
     *
     * **Success response schema:** [Success schema](../pages/response-schema.html#success-schema)
     *
     * **Failure response schema:** [Error schema](../pages/response-schema.html#error-schema)
     *
     * **Example:**
     * ```ts
     * const response = await client.account.creditCardsList({ bearer_token: '7381273269536713689562374856' })
     * ```
     */
    creditCardsList(options: CreditCardsListOptions): Promise<ICreditCardsResult>;
    /**
     * @hidden
     * @deprecated Use the combined options signature instead.
     */
    creditCardsList(token: IToken, params?: IQuery): Promise<ICreditCardsResult>;
    /**
     * Return the User's default Credit Card. See [api docs](https://api.spreecommerce.org/docs/api-v2/1054d9230daf4-retrieve-the-default-credit-card).
     *
     * **Required token:** [Bearer token](../pages/tokens.html#bearer-token)
     *
     * **Success response schema:** [Success schema](../pages/response-schema.html#success-schema)
     *
     * **Failure response schema:** [Error schema](../pages/response-schema.html#error-schema)
     *
     * **Example:**
     * ```ts
     * const response = await client.account.defaultCreditCard({ bearer_token: '7381273269536713689562374856' })
     * ```
     */
    defaultCreditCard(options: DefaultCreditCardOptions): Promise<ICreditCardResult>;
    /**
     * @hidden
     * @deprecated Use the combined options signature instead.
     */
    defaultCreditCard(token: IToken, params?: IQuery): Promise<ICreditCardResult>;
    /**
     * Remove a User's Credit Card. See [api docs](https://api.spreecommerce.org/docs/api-v2/b3A6MTc1NjU3NDM-remove-a-credit-card).
     *
     * **Required token:** [Bearer token](../pages/tokens.html#bearer-token)
     *
     * **Success response schema:** [Success schema](../pages/response-schema.html#success-schema)
     *
     * **Failure response schema:** [Error schema](../pages/response-schema.html#error-schema)
     *
     * **Example:**
     * ```ts
     * const response = await client.account.removeCreditCard({
     *   bearer_token: '7381273269536713689562374856',
     *   id: '14'
     * })
     * ```
     */
    removeCreditCard(options: RemoveCreditCardOptions): Promise<NoContentResult>;
    /**
     * @hidden
     * @deprecated Use the combined options signature instead.
     */
    removeCreditCard(token: IToken, id: string, params?: IQuery): Promise<NoContentResult>;
    /**
     * Returns Orders placed by the User. Only completed ones. See [api docs](https://api.spreecommerce.org/docs/api-v2/94d319dfe8909-list-all-orders).
     *
     * **Required token:** [Bearer token](../pages/tokens.html#bearer-token)
     *
     * **Success response schema:** [Success schema](../pages/response-schema.html#success-schema)
     *
     * **Failure response schema:** [Error schema](../pages/response-schema.html#error-schema)
     *
     * **Example:**
     * ```ts
     * const response = await client.account.completedOrdersList({
     *   bearer_token: '7381273269536713689562374856'
     * })
     * ```
     */
    completedOrdersList(options: CompletedOrdersListOptions): Promise<IOrdersResult>;
    /**
     * @hidden
     * @deprecated Use the combined options signature instead.
     */
    completedOrdersList(token: IToken, params?: IQuery): Promise<IOrdersResult>;
    /**
     * Return the User's completed Order. See [api docs](https://api.spreecommerce.org/docs/api-v2/ab4c5da10fbba-retrieve-an-order).
     *
     * **Required token:** [Bearer token](../pages/tokens.html#bearer-token)
     *
     * **Success response schema:** [Success schema](../pages/response-schema.html#success-schema)
     *
     * **Failure response schema:** [Error schema](../pages/response-schema.html#error-schema)
     *
     * **Example:**
     * ```ts
     * const response = await client.account.completedOrder({
     *   bearer_token: '7381273269536713689562374856',
     *   order_number: 'R653163382'
     * })
     * ```
     */
    completedOrder(options: CompletedOrderOptions): Promise<IOrderResult>;
    /**
     * @hidden
     * @deprecated Use the combined options signature instead.
     */
    completedOrder(token: IToken, orderNumber: string, params?: IQuery): Promise<IOrderResult>;
    /**
     * Returns a list of Addresses for the signed in User. See [api docs](https://api.spreecommerce.org/docs/api-v2/c8ebb212f75bf-list-all-addresses).
     *
     * **Required token:** [Bearer token](../pages/tokens.html#bearer-token)
     *
     * **Success response schema:** [Success schema](../pages/response-schema.html#success-schema)
     *
     * **Failure response schema:** [Error schema](../pages/response-schema.html#error-schema)
     *
     * **Example:**
     * ```ts
     * const response = await client.account.addressesList({
     *   bearer_token: '7381273269536713689562374856'
     * })
     * ```
     */
    addressesList(options: AddressesListOptions): Promise<AccountAddressesResult>;
    /**
     * @hidden
     * @deprecated Use the combined options signature instead.
     */
    addressesList(token: IToken): Promise<AccountAddressesResult>;
    /**
     * Returns a single address for the signed in User.
     *
     * **Required token:** [Bearer token](../pages/tokens.html#bearer-token)
     *
     * **Success response schema:** [Success schema](../pages/response-schema.html#success-schema)
     *
     * **Failure response schema:** [Error schema](../pages/response-schema.html#error-schema)
     *
     * **Example:**
     * ```ts
     * const response = await client.account.showAddress({
     *   bearer_token: '7381273269536713689562374856',
     *   id: '1'
     * })
     * ```
     */
    showAddress(options: ShowAddressOptions): Promise<AccountAddressResult>;
    /**
     * @hidden
     * @deprecated Use the combined options signature instead.
     */
    showAddress(token: IToken, addressId: string, params?: IQuery): Promise<AccountAddressResult>;
    /**
     * Create a new Address for the signed in User. See [api docs](https://api.spreecommerce.org/docs/api-v2/daacab4666dfc-create-an-address).
     *
     * **Required token:** [Bearer token](../pages/tokens.html#bearer-token)
     *
     * **Options schema:**
     * ```ts
     * interface options {
     *   address: {
     *     firstname: string
     *     lastname: string
     *     address1: string
     *     address2?: string
     *     city: string
     *     phone?: string
     *     zipcode: string
     *     state_name: string // State Abbreviations
     *     country_iso: string // Country ISO (2-chars) or ISO3 (3-chars)
     *     company?: string
     *   }
     * }
     * ```
     *
     * **Success response schema:** [Success schema](../pages/response-schema.html#success-schema)
     *
     * **Failure response schema:** [Error schema](../pages/response-schema.html#error-schema)
     *
     * **Example:**
     * ```ts
     * const response = await client.account.createAddress({
     *   bearer_token: '7381273269536713689562374856',
     *   address: {
     *     firstname: 'John',
     *     lastname: 'Snow',
     *     address1: '7735 Old Georgetown Road',
     *     address2: '2nd Floor',
     *     city: 'Bethesda',
     *     phone: '3014445002',
     *     zipcode: '20814',
     *     state_name: 'MD',
     *     country_iso: 'US',
     *     company: 'Spark'
     *   }
     * })
     * ```
     */
    createAddress(options: CreateAddressOptions): Promise<AccountAddressResult>;
    /**
     * @hidden
     * @deprecated Use the combined options signature instead.
     */
    createAddress(token: IToken, params: AccountAddressParams): Promise<AccountAddressResult>;
    /**
     * Removes selected Address for the signed in User. See [api docs](https://api.spreecommerce.org/docs/api-v2/b3A6MTAwNjA3Njg-remove-an-address).
     *
     * **Required token:** [Bearer token](../pages/tokens.html#bearer-token)
     *
     * **Success response schema:** [Success schema](../pages/response-schema.html#success-schema)
     *
     * **Failure response schema:** [Error schema](../pages/response-schema.html#error-schema)
     *
     * **Example:**
     * ```ts
     * const response = await client.account.removeAddress({
     *   bearer_token: '7381273269536713689562374856',
     *   id: '1'
     * })
     * ```
     */
    removeAddress(options: RemoveAddressOptions): Promise<NoContentResult>;
    /**
     * @hidden
     * @deprecated Use the combined options signature instead.
     */
    removeAddress(token: IToken, id: string, params?: IQuery): Promise<NoContentResult>;
    /**
     * Update selected Address for the signed in User. See [api docs](https://api.spreecommerce.org/docs/api-v2/fbae19a10190d-update-an-address).
     *
     * Required token: Bearer token
     *
     * **Options schema:**
     * ```ts
     * interface options {
     *   id: string
     *   address: {
     *     firstname: string
     *     lastname: string
     *     address1: string
     *     address2?: string
     *     city: string
     *     phone?: string
     *     zipcode: string
     *     state_name: string // State Abbreviations
     *     country_iso: string // Country ISO (2-chars) or ISO3 (3-chars)
     *     company?: string
     *   }
     * }
     * ```
     *
     * **Success response schema:** [Success schema](../pages/response-schema.html#success-schema)
     *
     * **Failure response schema:** [Error schema](../pages/response-schema.html#error-schema)
     *
     * **Example:**
     * ```ts
     * const response = await client.account.updateAddress({
     *   bearer_token: '7381273269536713689562374856',
     *   id: '1',
     *   address: {
     *     firstname: 'John',
     *     lastname: 'Snow',
     *     address1: '7735 Old Georgetown Road',
     *     address2: '2nd Floor',
     *     city: 'Bethesda',
     *     phone: '3014445002',
     *     zipcode: '20814',
     *     state_name: 'MD',
     *     country_iso: 'US',
     *     company: 'Spark'
     *   }
     * })
     * ```
     */
    updateAddress(options: UpdateAddressOptions): Promise<AccountAddressResult>;
    /**
     * @hidden
     * @deprecated Use the combined options signature instead.
     */
    updateAddress(token: IToken, addressId: string, params: AccountAddressParams): Promise<AccountAddressResult>;
}

interface AuthTokenAttr {
    username: string;
    password: string;
}
interface RefreshTokenAttr {
    refresh_token: string;
}
interface RevokeTokenAttr {
    token: string;
}
interface AuthTokenParams {
    username: string;
    password: string;
    grant_type: 'password';
}
interface RefreshTokenParams {
    refresh_token: string;
    grant_type: 'refresh_token';
}
interface RevokeTokenParams {
    token: string;
}
type GetTokenOptions = WithCommonOptions<null, AuthTokenAttr>;
type RefreshTokenOptions = WithCommonOptions<null, RefreshTokenAttr>;
type RevokeTokenOptions = WithCommonOptions<null, RevokeTokenAttr>;

declare class Authentication extends Http {
    /**
     * Creates a [Bearer token](../pages/tokens.html#bearer-token) required to authorize OAuth API calls.
     *
     * **Success response schema:**
     * ```ts
     * interface res {
     *   access_token: string
     *   token_type: string = 'Bearer'
     *   expires_in: number
     *   refresh_token: string
     *   created_at: number
     * }
     * ```
     *
     * **Failure response schema:** [Error schema](../pages/response-schema.html#error-schema)
     *
     * **Example:**
     * ```ts
     * const token = await client.authentication.getToken({
     *   username: 'spree@example.com',
     *   password: 'spree123'
     * })
     * ```
     */
    getToken(options: GetTokenOptions): Promise<IOAuthTokenResult>;
    /**
     * @hidden
     * @deprecated Use the combined options signature instead.
     */
    getToken(params: AuthTokenAttr): Promise<IOAuthTokenResult>;
    /**
     * Refreshes the [Bearer token](../pages/tokens.html#bearer-token) required to authorize OAuth API calls.
     *
     * **Success response schema:**
     * ```ts
     * interface res {
     *   access_token: string
     *   token_type: string = 'Bearer'
     *   expires_in: number
     *   refresh_token: string
     *   created_at: number
     * }
     * ```
     *
     * **Failure response schema:** [Error schema](../pages/response-schema.html#error-schema)
     *
     * **Example:**
     * ```ts
     * const token = await client.authentication.refreshToken({
     *   refresh_token: 'aebe2886d7dbba6f769e20043e40cfa3447e23ad9d8e82c632f60ed63a2f0df1'
     * })
     * ```
     */
    refreshToken(options: RefreshTokenOptions): Promise<IOAuthTokenResult>;
    /**
     * @hidden
     * @deprecated Use the combined options signature instead.
     */
    refreshToken(params: RefreshTokenAttr): Promise<IOAuthTokenResult>;
    /**
     * Revokes a [Bearer token (access token)](../pages/tokens.html#bearer-token) or a refresh token.
     *
     * **Success response schema:** [Success schema](../pages/response-schema.html#success-schema)
     *
     * **Failure response schema:** [Error schema](../pages/response-schema.html#error-schema)
     *
     * **Example:**
     * ```ts
     * const response = await client.authentication.revokeToken({
     *   token: 'aebe2886d7dbba6f769e20043e40cfa3447e23ad9d8e82c632f60ed63a2f0df1'
     * })
     * ```
     */
    revokeToken(optons: RevokeTokenOptions): Promise<EmptyObjectResult>;
    /**
     * @hidden
     * @deprecated Use the combined options signature instead.
     */
    revokeToken(params: RevokeTokenAttr): Promise<EmptyObjectResult>;
}

/**
 * @deprecated Use {@link AddItemOptions} instead.
 */
interface AddItem extends IQuery {
    variant_id: string;
    quantity: number;
    options?: {
        [key: string]: string;
    };
}
/**
 * @deprecated Use {@link SetQuantityOptions} instead.
 */
interface SetQuantity extends IQuery {
    line_item_id: string;
    quantity: number;
}
/**
 * @deprecated Use {@link ApplyCouponCodeOptions} instead.
 */
interface CouponCode extends IQuery {
    coupon_code: string;
}
/**
 * @deprecated Use {@link EstimateShippingRates} instead.
 */
interface EstimateShippingMethods extends IQuery {
    country_iso: string;
}
/**
 * @deprecated Use {@link EstimateShippingRatesOptions} instead.
 */
interface EstimateShippingRates extends IQuery {
    country_iso: string;
}
/**
 * @deprecated Use {@link AssociateGuestCartOptions} instead.
 */
interface AssociateCart extends IQuery {
    guest_order_token: string;
}
/**
 * @deprecated Use {@link ChangeCurrencyOptions} instead.
 */
interface ChangeCurrency extends IQuery {
    new_currency: string;
}

interface EstimatedShippingMethodAttr extends JsonApiDocument {
    type: 'shipping_rate';
    id: string;
    attributes: {
        name: string;
        selected: boolean;
        cost: string;
        tax_amount: string;
        shipping_method_id: number;
        final_price: string;
        display_cost: string;
        display_final_price: string;
        display_tax_amount: string;
        free: boolean;
    };
}
/**
 * @deprecated Use {@link EstimatedShippingRates} instead.
 */
interface IEstimatedShippingMethods extends JsonApiListResponse {
    data: EstimatedShippingMethodAttr[];
}
/**
 * @deprecated Use {@link EstimatedShippingRatesResult} instead.
 */
interface IEstimatedShippingMethodsResult extends ResultResponse<IEstimatedShippingMethods> {
}
interface EstimatedShippingRates extends JsonApiListResponse {
    data: EstimatedShippingMethodAttr[];
}
interface EstimatedShippingRatesResult extends ResultResponse<EstimatedShippingRates> {
}

type ShowOptions$7 = WithCommonOptions<{
    suggestToken: true;
    suggestQuery: true;
}>;
type CreateOptions$1 = WithCommonOptions<{
    suggestToken: true;
    onlyAccountToken: true;
    optionalToken: true;
    suggestQuery: true;
}>;
type AddItemOptions = WithCommonOptions<{
    suggestToken: true;
    suggestQuery: true;
}, AddItem>;
type RemoveItemOptions = WithCommonOptions<{
    suggestToken: true;
    suggestQuery: true;
}, {
    id: string;
}>;
type EmptyCartOptions = WithCommonOptions<{
    suggestToken: true;
    suggestQuery: true;
}>;
type RemoveOptions$1 = WithCommonOptions<{
    suggestToken: true;
}>;
type SetQuantityOptions = WithCommonOptions<{
    suggestToken: true;
    suggestQuery: true;
}, SetQuantity>;
type ApplyCouponCodeOptions = WithCommonOptions<{
    suggestToken: true;
    suggestQuery: true;
}, CouponCode>;
type RemoveCouponCodeOptions = WithCommonOptions<{
    suggestToken: true;
    suggestQuery: true;
}, {
    code?: string;
}>;
type RemoveAllCouponsOptions = WithCommonOptions<{
    suggestToken: true;
    suggestQuery: true;
}>;
type EstimateShippingRatesOptions = WithCommonOptions<{
    suggestToken: true;
    suggestQuery: true;
}, EstimateShippingRates>;
type AssociateGuestCartOptions = WithCommonOptions<{
    suggestToken: true;
    suggestQuery: true;
}, AssociateCart>;
type ChangeCurrencyOptions = WithCommonOptions<{
    suggestToken: true;
    suggestQuery: true;
}, ChangeCurrency>;

declare class Cart extends Http {
    /**
     * Creates a new Cart and returns its attributes. See [api docs](https://api.spreecommerce.org/docs/api-v2/6a57a5a49594f-create-a-cart).
     *
     * **Required token:** [Bearer token](../pages/tokens.html#bearer-token) - if logged in user
     *
     * **Success response schema:** [Success schema](../pages/response-schema.html#success-schema)
     *
     * **Failure response schema:** [Error schema](../pages/response-schema.html#error-schema)
     *
     * **Example:**
     * ```ts
     * // Logged in user
     * const response = await client.cart.create({
     *   bearer_token: '7381273269536713689562374856'
     * })
     *
     * // or guest user
     * const response = await client.cart.create()
     * ```
     */
    create(options?: CreateOptions$1): Promise<IOrderResult>;
    /**
     * @hidden
     * @deprecated Use the combined options signature instead.
     */
    create(token?: IToken, params?: IQuery): Promise<IOrderResult>;
    /**
     * Returns contents of the cart. See [api docs](https://api.spreecommerce.org/docs/api-v2/b3A6MzE0Mjc0Ng-retrieve-a-cart).
     *
     * **Required token:** [Bearer token](../pages/tokens.html#bearer-token) or [Order token](../pages/tokens.html#order-token)
     *
     * **Success response schema:** [Success schema](../pages/response-schema.html#success-schema)
     *
     * **Failure response schema:** [Error schema](../pages/response-schema.html#error-schema)
     *
     * **Example:**
     * ```ts
     * // Logged in user
     * const response = await client.cart.show({
     *   bearer_token: '7381273269536713689562374856'
     * })
     *
     * // or guest user
     * const response = await client.cart.show({
     *   order_token: '7381273269536713689562374856'
     * })
     * ```
     */
    show(options: ShowOptions$7): Promise<IOrderResult>;
    /**
     * @hidden
     * @deprecated Use the combined options signature instead.
     */
    show(token: IToken, params?: IQuery): Promise<IOrderResult>;
    /**
     * Adds a Product Variant to the Cart. See [api docs](https://api.spreecommerce.org/docs/api-v2/b3A6MzE0Mjc0Nw-add-an-item-to-cart).
     *
     * **Required token:** [Bearer token](../pages/tokens.html#bearer-token) or [Order token](../pages/tokens.html#order-token)
     *
     * **Options schema:**
     * ```ts
     * interface options {
     *   variant_id: string
     *   quantity: number
     *   options?: {
     *     [key: string]: string
     *   }
     * }
     * ```
     *
     * **Success response schema:** [Success schema](../pages/response-schema.html#success-schema)
     *
     * **Failure response schema:** [Error schema](../pages/response-schema.html#error-schema)
     *
     * **Example:**
     * ```ts
     * // Logged in user
     * const response = await client.cart.addItem({
     *   bearer_token: '7381273269536713689562374856',
     *   variant_id: '1',
     *   quantity: 1
     * })
     *
     * // or guest user
     * const response = await client.cart.addItem({
     *   order_token: '7381273269536713689562374856',
     *   variant_id: '1',
     *   quantity: 1
     * })
     * ```
     */
    addItem(options: AddItemOptions): Promise<IOrderResult>;
    /**
     * @hidden
     * @deprecated Use the combined options signature instead.
     */
    addItem(token: IToken, params: AddItem): Promise<IOrderResult>;
    /**
     * Sets the quantity of a given line item. It has to be a positive integer greater than 0. See [api docs](https://api.spreecommerce.org/docs/api-v2/b3A6MzE0Mjc0OA-set-line-item-quantity).
     *
     * **Required token:** [Bearer token](../pages/tokens.html#bearer-token) or [Order token](../pages/tokens.html#order-token)
     *
     * **Options schema:**
     * ```ts
     * interface options {
     *   line_item_id: string
     *   quantity: number
     * }
     * ```
     *
     * **Success response schema:** [Success schema](../pages/response-schema.html#success-schema)
     *
     * **Failure response schema:** [Error schema](../pages/response-schema.html#error-schema)
     *
     * **Example:**
     * ```ts
     * // Logged in user
     * const response = await client.cart.setQuantity({
     *   bearer_token: '7381273269536713689562374856',
     *   line_item_id: '9',
     *   quantity: 100
     * })
     *
     * // or guest user
     * const response = await client.cart.setQuantity({
     *   order_token: '7381273269536713689562374856',
     *   line_item_id: '9',
     *   quantity: 100
     * })
     * ```
     */
    setQuantity(options: SetQuantityOptions): Promise<IOrderResult>;
    /**
     * @hidden
     * @deprecated Use the combined options signature instead.
     */
    setQuantity(token: IToken, params: SetQuantity): Promise<IOrderResult>;
    /**
     * Removes Line Item from Cart. See [api docs](https://api.spreecommerce.org/docs/api-v2/8b7783ed322f1-remove-a-line-item).
     *
     * **Required token:** [Bearer token](../pages/tokens.html#bearer-token) or [Order token](../pages/tokens.html#order-token)
     *
     * **Options schema:**
     * ```ts
     * interface options {
     *   id: string
     * }
     * ```
     *
     * **Success response schema:** [Success schema](../pages/response-schema.html#success-schema)
     *
     * **Failure response schema:** [Error schema](../pages/response-schema.html#error-schema)
     *
     * **Example:**
     * ```ts
     * // Logged in user
     * const response = await client.cart.removeItem({
     *   bearer_token: '7381273269536713689562374856',
     *   id: '1'
     * })
     *
     * // or guest user
     * const response = await client.cart.removeItem({
     *   order_token: '7381273269536713689562374856',
     *   id: '1'
     * })
     * ```
     */
    removeItem(options: RemoveItemOptions): Promise<IOrderResult>;
    /**
     * @hidden
     * @deprecated Use the combined options signature instead.
     */
    removeItem(token: IToken, id: string, params?: IQuery): Promise<IOrderResult>;
    /**
     * Empties the Cart. See [api docs](https://api.spreecommerce.org/docs/api-v2/b3A6MzE0Mjc1MA-empty-the-cart).
     *
     * **Required token:** [Bearer token](../pages/tokens.html#bearer-token) or [Order token](../pages/tokens.html#order-token)
     *
     * **Success response schema:** [Success schema](../pages/response-schema.html#success-schema)
     *
     * **Failure response schema:** [Error schema](../pages/response-schema.html#error-schema)
     *
     * **Example:**
     * ```ts
     * // Logged in user
     * const response = await client.cart.emptyCart({
     *   bearer_token: '7381273269536713689562374856'
     * })
     *
     * // or guest user
     * const response = await client.cart.emptyCart({
     *   order_token: '7381273269536713689562374856'
     * })
     * ```
     */
    emptyCart(options: EmptyCartOptions): Promise<IOrderResult>;
    /**
     * @hidden
     * @deprecated Use the combined options signature instead.
     */
    emptyCart(token: IToken, params?: IQuery): Promise<IOrderResult>;
    /**
     * Removes the Cart. See [api docs](https://api.spreecommerce.org/docs/api-v2/b3A6MTcyNTA0NDc-delete-a-cart).
     *
     * **Required token:** [Bearer token](../pages/tokens.html#bearer-token) or [Order token](../pages/tokens.html#order-token)
     *
     * **Success response schema:** [Success schema](../pages/response-schema.html#success-schema)
     *
     * **Failure response schema:** [Error schema](../pages/response-schema.html#error-schema)
     *
     * **Example:**
     * ```ts
     * // Logged in user
     * const response = await client.cart.remove({
     *   bearer_token: '7381273269536713689562374856'
     * })
     *
     * // or guest user
     * const response = await client.cart.remove({
     *   order_token: '7381273269536713689562374856'
     * })
     * ```
     */
    remove(options: RemoveOptions$1): Promise<NoContentResult>;
    /**
     * @hidden
     * @deprecated Use the combined options signature instead.
     */
    remove(token: IToken): Promise<NoContentResult>;
    /**
     * Applies a coupon code to the Cart. See [api docs](https://api.spreecommerce.org/docs/api-v2/b3A6MzE0Mjc1MQ-apply-a-coupon-code).
     *
     * **Required token:** [Bearer token](../pages/tokens.html#bearer-token) or [Order token](../pages/tokens.html#order-token)
     *
     * **Options schema:**
     * ```ts
     * interface options {
     *   coupon_code: string
     * }
     * ```
     * **Success response schema:** [Success schema](../pages/response-schema.html#success-schema)
     *
     * **Failure response schema:** [Error schema](../pages/response-schema.html#error-schema)
     *
     * **Example:**
     * ```ts
     * // Logged in user
     * const response = await client.cart.applyCouponCode({
     *   bearer_token: '7381273269536713689562374856',
     *   coupon_code: 'promo_test'
     * })
     *
     * // or guest user
     * const response = await client.cart.applyCouponCode({
     *   order_token: '7381273269536713689562374856',
     *   coupon_code: 'promo_test'
     * })
     * ```
     */
    applyCouponCode(options: ApplyCouponCodeOptions): Promise<IOrderResult>;
    /**
     * @hidden
     * @deprecated Use the combined options signature instead.
     */
    applyCouponCode(token: IToken, params: CouponCode): Promise<IOrderResult>;
    /**
     * Removes a coupon code from the Cart. See [api docs](https://api.spreecommerce.org/docs/api-v2/b3A6MzE0Mjc1Mg-remove-a-coupon).
     *
     * **Required token:** [Bearer token](../pages/tokens.html#bearer-token) or [Order token](../pages/tokens.html#order-token)
     *
     * **Options schema:**
     * ```ts
     * interface options {
     *   code?: string
     * }
     * ```
     *
     * **Success response schema:** [Success schema](../pages/response-schema.html#success-schema)
     *
     * **Failure response schema:** [Error schema](../pages/response-schema.html#error-schema)
     *
     * **Example:**
     * ```ts
     * // Logged in user
     * const response = await client.cart.removeCouponCode({
     *   bearer_token: '7381273269536713689562374856',
     *   code: 'promo_test'
     * })
     *
     * // or guest user
     * const response = await client.cart.removeCouponCode({
     *   order_token: '7381273269536713689562374856',
     *   code: 'promo_test'
     * })
     * ```
     */
    removeCouponCode(options: RemoveCouponCodeOptions): Promise<IOrderResult>;
    /**
     * @hidden
     * @deprecated Use the combined options signature instead.
     */
    removeCouponCode(token: IToken, code: string, params?: IQuery): Promise<IOrderResult>;
    /**
     * Removes all coupon codes from the Cart. See [api docs](https://api.spreecommerce.org/docs/api-v2/b3A6MjM5NTU3NTg-remove-all-coupons).
     *
     * **Required token:** [Bearer token](../pages/tokens.html#bearer-token) or [Order token](../pages/tokens.html#order-token)
     *
     * **Success response schema:** [Success schema](../pages/response-schema.html#success-schema)
     *
     * **Failure response schema:** [Error schema](../pages/response-schema.html#error-schema)
     *
     * **Example:**
     * ```ts
     * // Logged in user
     * const response = await client.cart.removeAllCoupons({
     *   bearer_token: '7381273269536713689562374856'
     * })
     *
     * // or guest user
     * const response = await client.cart.removeAllCoupons({
     *   order_token: '7381273269536713689562374856'
     * })
     * ```
     */
    removeAllCoupons(options: RemoveAllCouponsOptions): Promise<IOrderResult>;
    /**
     * @hidden
     * @deprecated Use the combined options signature instead.
     */
    removeAllCoupons(token: IToken, params: IQuery): Promise<IOrderResult>;
    /**
     * @hidden
     * @deprecated Use {@link estimateShippingRates} instead.
     */
    estimateShippingMethods(token: IToken, params: EstimateShippingMethods): Promise<IEstimatedShippingMethodsResult>;
    /**
     * Returns a list of Estimated Shipping Rates for Cart. See [api docs](https://api.spreecommerce.org/docs/api-v2/b3A6MzE0Mjc1Mw-list-estimated-shipping-rates).
     *
     * **Required token:** [Bearer token](../pages/tokens.html#bearer-token) or [Order token](../pages/tokens.html#order-token)
     *
     * **Options schema:**
     * ```ts
     * interface options {
     *   country_iso: string
     * }
     * ```
     *
     * **Success response schema:** [Success schema](../pages/response-schema.html#success-schema)
     *
     * **Failure response schema:** [Error schema](../pages/response-schema.html#error-schema)
     *
     * **Example:**
     * ```ts
     * // Logged in user
     * const response = await client.cart.estimateShippingRates({
     *   bearer_token: '7381273269536713689562374856',
     *   country_iso: 'USA'
     * })
     *
     * // or guest user
     * const response = await client.cart.estimateShippingRates({
     *   order_token: '7381273269536713689562374856',
     *   country_iso: 'USA'
     * })
     * ```
     */
    estimateShippingRates(options: EstimateShippingRatesOptions): Promise<EstimatedShippingRatesResult>;
    /**
     * @hidden
     * @deprecated Use the combined options signature instead.
     */
    estimateShippingRates(token: IToken, params: EstimateShippingRates): Promise<EstimatedShippingRatesResult>;
    /**
     * Associates a guest cart with the currently signed in user. See [api docs](https://api.spreecommerce.org/docs/api-v2/b3A6MjAxMTAyMzM-associate-a-cart-with-a-user).
     *
     * **Required token:** [Bearer token](../pages/tokens.html#bearer-token)
     *
     * **Options schema:**
     * ```ts
     * interface options {
     *   guest_order_token: string
     * }
     * ```
     *
     * **Success response schema:** [Success schema](../pages/response-schema.html#success-schema)
     *
     * **Failure response schema:** [Error schema](../pages/response-schema.html#error-schema)
     *
     * **Example:**
     * ```ts
     * // Logged in user
     * const response = await client.cart.associateGuestCart({
     *   bearer_token: '7381273269536713689562374856',
     *   guest_order_token: 'aebe2886d7dbba6f769e20043e40cfa3447e23ad9d8e82c632f60ed63a2f0df1'
     * })
     * ```
     */
    associateGuestCart(options: AssociateGuestCartOptions): Promise<IOrderResult>;
    /**
     * @hidden
     * @deprecated Use the combined options signature instead.
     */
    associateGuestCart(token: IToken, params: AssociateCart): Promise<IOrderResult>;
    /**
     * Changes the Cart's currency. See [api docs](https://api.spreecommerce.org/docs/api-v2/b3A6MjA2OTMwMDM-change-cart-currency).
     *
     * **Required token:** [Bearer token](../pages/tokens.html#bearer-token) or [Order token](../pages/tokens.html#order-token)
     *
     * **Options schema:**
     * ```ts
     * interface options {
     *   new_currency: string
     * }
     * ```
     *
     * **Success response schema:** [Success schema](../pages/response-schema.html#success-schema)
     *
     * **Failure response schema:** [Error schema](../pages/response-schema.html#error-schema)
     *
     * **Example:**
     * ```ts
     * // Logged in user
     * const response = await client.cart.changeCurrency({
     *   bearer_token: '7381273269536713689562374856',
     *   new_currency: 'CAD'
     * })
     * ```
     */
    changeCurrency(options: ChangeCurrencyOptions): Promise<IOrderResult>;
    /**
     * @hidden
     * @deprecated Use the combined options signature instead.
     */
    changeCurrency(token: IToken, params: ChangeCurrency): Promise<IOrderResult>;
}

/**
 * @deprecated This type is no longer used
 */
interface IPayment {
    payment_method_id: string;
}

/**
 * @deprecated This type is no longer used
 */
interface IPaymentSource {
    [key: string]: {
        gateway_payment_profile_id?: string;
        number?: string;
        last_digits?: number;
        month: number | string;
        year: number | string;
        verification_value?: string;
        cc_type?: string;
        name: string;
    };
}

interface IShipment {
    id: string;
    selected_shipping_rate_id: string;
}

/**
 * @deprecated Use {@link AddStoreCreditOptions} instead.
 */
interface AddStoreCredit extends IQuery {
    amount: number;
}
/**
 * @deprecated Use {@link OrderUpdateOptions} instead.
 */
interface OrderUpdate extends IQuery {
    order?: {
        email?: string;
        special_instructions?: string;
        bill_address_attributes?: IAddress;
        ship_address_attributes?: IAddress;
        payments_attributes?: AddFullPayment[];
        shipments_attributes?: IShipment[];
    };
}
/**
 * @deprecated This type is no longer used
 */
interface NestedAttributes extends IQuery {
    order?: {
        email?: string;
        special_instructions?: string;
        bill_address_attributes?: IAddress;
        ship_address_attributes?: IAddress;
        payments_attributes?: IPayment[];
        shipments_attributes?: IShipment[];
    };
    payment_source?: IPaymentSource;
}
interface AddFullPayment {
    payment_method_id: string;
    source_attributes?: {
        gateway_payment_profile_id: string;
        cc_type?: string;
        last_digits?: string;
        month?: string;
        year?: string;
        name: string;
    };
}
/**
 * @deprecated Use {@link SelectShippingMethodOptions} instead.
 */
interface SelectShippingMethod extends IQuery {
    shipping_method_id: string;
    shipment_id?: string;
}
/**
 * @deprecated Use {@link AddPaymentOptions} instead.
 */
interface AddPayment extends AddFullPayment, IQuery {
    source_id?: string;
    amount?: number;
}

type CreateStripeSessionOptions = WithCommonOptions<{
    suggestToken: true;
}, {
    success_url: string;
    cancel_url: string;
}>;
type AddPaymentOptions = WithCommonOptions<{
    suggestToken: true;
    suggestQuery: true;
}, AddFullPayment & {
    source_id?: string;
    amount?: number;
}>;
type SelectShippingMethodOptions = WithCommonOptions<{
    suggestToken: true;
    suggestQuery: true;
}, {
    shipping_method_id: string;
    shipment_id?: string;
}>;
type ShippingRatesOptions = WithCommonOptions<{
    suggestToken: true;
    suggestQuery: true;
}>;
type PaymentMethodsOptions = WithCommonOptions<{
    suggestToken: true;
}>;
type RemoveStoreCreditsOptions = WithCommonOptions<{
    suggestToken: true;
    suggestQuery: true;
}>;
type AddStoreCreditOptions = WithCommonOptions<{
    suggestToken: true;
    suggestQuery: true;
}, {
    amount: number;
}>;
type CompleteOptions = WithCommonOptions<{
    suggestToken: true;
    suggestQuery: true;
}>;
type AdvanceOptions = WithCommonOptions<{
    suggestToken: true;
    suggestQuery: true;
}>;
type OrderUpdateOptions = WithCommonOptions<{
    suggestToken: true;
    suggestQuery: true;
}, OrderUpdate>;
type OrderNextOptions = WithCommonOptions<{
    suggestToken: true;
    suggestQuery: true;
}>;

interface PaymentMethodAttr extends JsonApiDocument {
    type: string;
    id: string;
    attributes: {
        type: string;
        name: string;
        description: string;
        preferences: {
            [key: string]: string;
        };
    };
}
interface IPaymentMethods extends JsonApiListResponse {
    data: PaymentMethodAttr[];
}
interface IPaymentMethodsResult extends ResultResponse<IPaymentMethods> {
}

/**
 * @deprecated Use {@link ShippingRateAttr} instead.
 */
interface ShippingMethodAttr extends JsonApiDocument {
    type: string;
    id: string;
    attributes: {
        number: string;
        free: boolean;
        final_price: string;
        display_final_price: string;
        tracking_url: string;
        state: string;
        shipped_at: Date;
    };
    relationships: IRelationships;
}
/**
 * @deprecated Use {@link ShippingRates} instead.
 */
interface IShippingMethods extends JsonApiListResponse {
    data: ShippingMethodAttr[];
}
/**
 * @deprecated Use {@link ShippingRatesResult} instead.
 */
interface IShippingMethodsResult extends ResultResponse<IShippingMethods> {
}
interface ShippingRateAttr extends JsonApiDocument {
    type: string;
    id: string;
    attributes: {
        number: string;
        free: boolean;
        final_price: string;
        display_final_price: string;
        tracking_url: string;
        state: string;
        shipped_at: Date;
    };
    relationships: IRelationships;
}
interface ShippingRates extends JsonApiListResponse {
    data: ShippingRateAttr[];
}
interface ShippingRatesResult extends ResultResponse<ShippingRates> {
}

type StripeCheckoutSessionSummary = {
    session_id: string;
    session_url: string;
};
type StripeCheckoutSessionSummaryResult = ResultResponse<StripeCheckoutSessionSummary>;

declare class Checkout extends Http {
    /**
     * Updates the Checkout. You can run multiple Checkout updates with different data types. See [api docs](https://api.spreecommerce.org/docs/api-v2/b3A6MzE0Mjc1NA-update-checkout).
     *
     * **Required token:** [Bearer token](../pages/tokens.html#bearer-token) or [Order token](../pages/tokens.html#order-token)
     *
     * **Options schema:**
     * ```ts
     * interface options {
     *   order: {
     *     email?: string
     *     special_instructions?: string
     *     bill_address_attributes?: {
     *       firstname: string
     *       lastname: string
     *       address1: string
     *       city: string
     *       phone: string
     *       zipcode: string
     *       state_name: string
     *       country_iso: string
     *     }
     *     ship_address_attributes?: {
     *       firstname: string
     *       lastname: string
     *       address1: string
     *       city: string
     *       phone: string
     *       zipcode: string
     *       state_name: string
     *       country_iso: string
     *     }
     *     shipments_attributes?: [
     *       {
     *         selected_shipping_rate_id: number
     *         id: number
     *       }
     *     ]
     *   }
     * }
     * ```
     *
     * **Success response schema:** [Success schema](../pages/response-schema.html#success-schema)
     *
     * **Failure response schema:** [Error schema](../pages/response-schema.html#error-schema)
     *
     * **Example:**
     * ```ts
     * // Logged in user
     * const response = await client.checkout.orderUpdate({
     *   bearer_token: '7381273269536713689562374856',
     *   order: {
     *     email: 'john@snow.org'
     *   }
     * })
     *
     * // or guest user
     * const response = await client.checkout.orderUpdate({
     *   order_token: '7381273269536713689562374856',
     *   order: {
     *     email: 'john@snow.org'
     *   }
     * })
     * ```
     */
    orderUpdate(options: OrderUpdateOptions): Promise<IOrderResult>;
    /**
     * @hidden
     * @deprecated Use the combined options signature instead.
     */
    orderUpdate(token: IToken, params: OrderUpdate | NestedAttributes): Promise<IOrderResult>;
    /**
     * Goes to the next Checkout step. See [api docs](https://api.spreecommerce.org/docs/api-v2/b3A6MzE0Mjc1NQ-next-checkout-step).
     *
     * **Required token:** [Bearer token](../pages/tokens.html#bearer-token) or [Order token](../pages/tokens.html#order-token)
     *
     * **Success response schema:** [Success schema](../pages/response-schema.html#success-schema)
     *
     * **Failure response schema:** [Error schema](../pages/response-schema.html#error-schema)
     *
     * **Example:**
     * ```ts
     * // Logged in user
     * const response = await client.checkout.orderNext({
     *   bearer_token: '7381273269536713689562374856'
     * })
     *
     * // or guest user
     * const response = await client.checkout.orderNext({
     *   order_token: '7381273269536713689562374856'
     * })
     * ```
     */
    orderNext(options: OrderNextOptions): Promise<IOrderResult>;
    /**
     * @hidden
     * @deprecated Use the combined options signature instead.
     */
    orderNext(token: IToken, params?: IQuery): Promise<IOrderResult>;
    /**
     * Advances Checkout to the furthest Checkout step validation allows, until the Complete step. See [api docs](https://api.spreecommerce.org/docs/api-v2/b3A6MzE0Mjc1Ng-advance-checkout).
     *
     * **Required token:** [Bearer token](../pages/tokens.html#bearer-token) or [Order token](../pages/tokens.html#order-token)
     *
     * **Success response schema:** [Success schema](../pages/response-schema.html#success-schema)
     *
     * **Failure response schema:** [Error schema](../pages/response-schema.html#error-schema)
     *
     * **Example:**
     * ```ts
     * // Logged in user
     * const response = await client.checkout.advance({
     *   bearer_token: '7381273269536713689562374856'
     * })
     *
     * // or guest user
     * const response = await client.checkout.advance({
     *   order_token: '7381273269536713689562374856'
     * })
     * ```
     */
    advance(options: AdvanceOptions): Promise<IOrderResult>;
    /**
     * @hidden
     * @deprecated Use the combined options signature instead.
     */
    advance(token: IToken, params?: IQuery): Promise<IOrderResult>;
    /**
     * Completes the Checkout. See [api docs](https://api.spreecommerce.org/docs/api-v2/b3A6MzE0Mjc1Nw-complete-checkout).
     *
     * **Required token:** [Bearer token](../pages/tokens.html#bearer-token) or [Order token](../pages/tokens.html#order-token)
     *
     * **Success response schema:** [Success schema](../pages/response-schema.html#success-schema)
     *
     * **Failure response schema:** [Error schema](../pages/response-schema.html#error-schema)
     *
     * **Example:**
     * ```ts
     * // Logged in user
     * const response = await client.checkout.complete({
     *   bearer_token: '7381273269536713689562374856'
     * })
     *
     * // or guest user
     * const response = await client.checkout.complete({
     *   order_token: '7381273269536713689562374856'
     * })
     * ```
     */
    complete(options: CompleteOptions): Promise<IOrderResult>;
    /**
     * @hidden
     * @deprecated Use the combined options signature instead.
     */
    complete(token: IToken, params?: IQuery): Promise<IOrderResult>;
    /**
     * Adds Store Credit payments if a user has any. See [api docs](https://api.spreecommerce.org/docs/api-v2/b3A6MzE0Mjc1OA-add-store-credit).
     *
     * **Required token:** [Bearer token](../pages/tokens.html#bearer-token) or [Order token](../pages/tokens.html#order-token)
     *
     * **Options schema:**
     * ```ts
     * interface options {
     *   amount: number
     * }
     * ```
     *
     * **Success response schema:** [Success schema](../pages/response-schema.html#success-schema)
     *
     * **Failure response schema:** [Error schema](../pages/response-schema.html#error-schema)
     *
     * **Example:**
     * ```ts
     * // Logged in user
     * const response = await client.checkout.addStoreCredits({
     *   bearer_token: '7381273269536713689562374856',
     *   amount: 100
     * })
     *
     * // or guest user
     * const response = await client.checkout.addStoreCredits({
     *   order_token: '7381273269536713689562374856',
     *   amount: 100
     * })
     * ```
     */
    addStoreCredits(options: AddStoreCreditOptions): Promise<IOrderResult>;
    /**
     * @hidden
     * @deprecated Use the combined options signature instead.
     */
    addStoreCredits(token: IToken, params: AddStoreCredit): Promise<IOrderResult>;
    /**
     * Remove Store Credit payments if any applied. See [api docs](https://api.spreecommerce.org/docs/api-v2/b3A6MzE0Mjc1OQ-remove-store-credit).
     *
     * **Required token:** [Bearer token](../pages/tokens.html#bearer-token) or [Order token](../pages/tokens.html#order-token)
     *
     * **Success response schema:** [Success schema](../pages/response-schema.html#success-schema)
     *
     * **Failure response schema:** [Error schema](../pages/response-schema.html#error-schema)
     *
     * **Example:**
     * ```ts
     * // Logged in user
     * const response = await client.checkout.removeStoreCredits({
     *   bearer_token: '7381273269536713689562374856'
     * })
     *
     * // or guest user
     * const response = await client.checkout.removeStoreCredits({
     *   order_token: '7381273269536713689562374856'
     * })
     * ```
     */
    removeStoreCredits(options: RemoveStoreCreditsOptions): Promise<IOrderResult>;
    /**
     * @hidden
     * @deprecated Use the combined options signature instead.
     */
    removeStoreCredits(token: IToken, params?: IQuery): Promise<IOrderResult>;
    /**
     * Returns a list of available Payment Methods. See [api docs](https://api.spreecommerce.org/docs/api-v2/b3A6MzE0Mjc2MA-list-payment-methods).
     *
     * **Required token:** [Bearer token](../pages/tokens.html#bearer-token) or [Order token](../pages/tokens.html#order-token)
     *
     * **Success response schema:** [Success schema](../pages/response-schema.html#success-schema)
     *
     * **Failure response schema:** [Error schema](../pages/response-schema.html#error-schema)
     *
     * **Example:**
     * ```ts
     * // Logged in user
     * const response = await client.checkout.paymentMethods({
     *   bearer_token: '7381273269536713689562374856'
     * })
     *
     * // or guest user
     * const response = await client.checkout.paymentMethods({
     *   order_token: '7381273269536713689562374856'
     * })
     * ```
     */
    paymentMethods(options: PaymentMethodsOptions): Promise<IPaymentMethodsResult>;
    /**
     * @hidden
     * @deprecated Use the combined options signature instead.
     */
    paymentMethods(token: IToken): Promise<IPaymentMethodsResult>;
    /**
     * @hidden
     * @deprecated Use {@link shippingRates} instead.
     */
    shippingMethods(token: IToken, params?: IQuery): Promise<IShippingMethodsResult>;
    /**
     * Returns a list of available Shipping Rates for Checkout. Shipping Rates are grouped against Shipments. Each checkout cna have multiple Shipments eg. some products are available in stock and will be send out instantly and some needs to be backordered. See [api docs](https://api.spreecommerce.org/docs/api-v2/ed60ec67b7d90-list-shipping-rates).
     *
     * **Required token:** [Bearer token](../pages/tokens.html#bearer-token) or [Order token](../pages/tokens.html#order-token)
     *
     * **Success response schema:** [Success schema](../pages/response-schema.html#success-schema)
     *
     * **Failure response schema:** [Error schema](../pages/response-schema.html#error-schema)
     *
     * **Example:**
     * ```ts
     * // Logged in user
     * const response = await client.checkout.shippingRates({
     *   bearer_token: '7381273269536713689562374856',
     *   include: 'shipping_rates,stock_location'
     * })
     *
     * // or guest user
     * const response = await client.checkout.shippingRates({
     *   order_token: '7381273269536713689562374856',
     *   include: 'shipping_rates,stock_location'
     * })
     * ```
     */
    shippingRates(options: ShippingRatesOptions): Promise<ShippingRatesResult>;
    /**
     * @hidden
     * @deprecated Use the combined options signature instead.
     */
    shippingRates(token: IToken, params?: IQuery): Promise<ShippingRatesResult>;
    /**
     * Selects a Shipping Method for Shipment(s). See [api docs](https://api.spreecommerce.org/docs/api-v2/b3A6MjY1NTc1NzY-selects-shipping-method-for-shipment-s).
     *
     * **Required token:** [Bearer token](../pages/tokens.html#bearer-token) or [Order token](../pages/tokens.html#order-token)
     *
     * **Options schema:**
     * ```ts
     * interface options {
     *   shipping_method_id: string
     *   shipment_id?: string
     * }
     * ```
     *
     * **Success response schema:** [Success schema](../pages/response-schema.html#success-schema)
     *
     * **Failure response schema:** [Error schema](../pages/response-schema.html#error-schema)
     *
     * **Example:**
     * ```ts
     * const response = await client.checkout.selectShippingMethod({
     *   bearer_token: '7381273269536713689562374856',
     *   shipping_method_id: '42'
     * })
     * ```
     */
    selectShippingMethod(options: SelectShippingMethodOptions): Promise<IOrderResult>;
    /**
     * @hidden
     * @deprecated Use the combined options signature instead.
     */
    selectShippingMethod(token: IToken, params: SelectShippingMethod): Promise<IOrderResult>;
    /**
     * Creates new Payment for the current checkout. See [api docs](https://api.spreecommerce.org/docs/api-v2/b3A6MjYyODA2NTY-create-new-payment).
     *
     * **Required token:** [Bearer token](../pages/tokens.html#bearer-token) or [Order token](../pages/tokens.html#order-token)
     *
     * **Options schema:**
     * ```ts
     * interface options {
     *   payment_method_id: string
     *   source_id?: string
     *   amount?: number
     *   source_attributes?: {
     *     gateway_payment_profile_id: string
     *     cc_type?: string
     *     last_digits?: string
     *     month?: string
     *     year?: string
     *     name: string
     *   }
     * }
     * ```
     *
     * **Success response schema:** [Success schema](../pages/response-schema.html#success-schema)
     *
     * **Failure response schema:** [Error schema](../pages/response-schema.html#error-schema)
     *
     * **Example:**
     * ```ts
     * // Logged in user
     *
     * // Create new credit card
     * const response = await client.checkout.addPayment({
     *   bearer_token: '7381273269536713689562374856',
     *   payment_method_id: '1',
     *   source_attributes: {
     *     gateway_payment_profile_id: 'card_1JqvNB2eZvKYlo2C5OlqLV7S',
     *     cc_type: 'visa',
     *     last_digits: '1111',
     *     month: '10',
     *     year: '2026',
     *     name: 'John Snow'
     *   }
     * })
     *
     * // Use existing credit card
     * const response = await client.checkout.addPayment({
     *   bearer_token: '7381273269536713689562374856',
     *   payment_method_id: '1',
     *   source_id: '1'
     * })
     *
     * // or guest user
     *
     * // Create new credit card
     * const response = await client.checkout.addPayment({
     *   order_token: '7381273269536713689562374856',
     *   payment_method_id: '1',
     *   source_attributes: {
     *     gateway_payment_profile_id: 'card_1JqvNB2eZvKYlo2C5OlqLV7S',
     *     cc_type: 'visa',
     *     last_digits: '1111',
     *     month: '10',
     *     year: '2026',
     *     name: 'John Snow'
     *   }
     * })
     * ```
     */
    addPayment(options: AddPaymentOptions): Promise<IOrderResult>;
    /**
     * @hidden
     * @deprecated Use the combined options signature instead.
     */
    addPayment(token: IToken, addPaymentParams: AddPayment): Promise<IOrderResult>;
    /**
     * @hidden
     */
    createStripeSession(options: CreateStripeSessionOptions): Promise<StripeCheckoutSessionSummaryResult>;
}

interface CountryAttr extends JsonApiDocument {
    type: string;
    id: string;
    attributes: {
        iso: string;
        iso3: string;
        iso_name: string;
        name: string;
        states_required: boolean;
        zipcode_required: boolean;
        default: boolean;
    };
    relationships: IRelationships;
}
interface ICountry extends JsonApiSingleResponse {
    data: CountryAttr;
}
interface ICountries extends JsonApiListResponse {
    data: CountryAttr[];
}
interface ICountryResult extends ResultResponse<ICountry> {
}
interface ICountriesResult extends ResultResponse<ICountries> {
}
type ListOptions$6 = WithCommonOptions;
type ShowOptions$6 = WithCommonOptions<{
    suggestQuery: true;
}, {
    iso: string;
}>;
type DefaultOptions$1 = WithCommonOptions<{
    suggestQuery: true;
}>;

declare class Countries extends Http {
    /**
     * Returns a list of all countries. See [api docs](https://api.spreecommerce.org/docs/api-v2/ca56911efbaab-list-all-countries).
     *
     * **Success response schema:** [Success schema](../pages/response-schema.html#success-schema)
     *
     * **Failure response schema:** [Error schema](../pages/response-schema.html#error-schema)
     *
     * **Example:**
     * ```ts
     * const countries = await client.countries.list()
     * ```
     */
    list(options?: ListOptions$6): Promise<ICountriesResult>;
    /**
     * Returns the details of a specific country. See [api docs](https://api.spreecommerce.org/docs/api-v2/5f5116adb3113-retrieve-a-country).
     *
     * **Options schema:**
     * ```ts
     * interface options {
     *   iso: string
     * }
     * ```
     *
     * **Success response schema:** [Success schema](../pages/response-schema.html#success-schema)
     *
     * **Failure response schema:** [Error schema](../pages/response-schema.html#error-schema)
     *
     * **Example:**
     * ```ts
     * const country = await client.countries.show({
     *   iso: 'USA'
     * })
     * ```
     */
    show(options: ShowOptions$6): Promise<ICountryResult>;
    /**
     * @hidden
     * @deprecated Use the combined options signature instead.
     */
    show(iso: string, params: IQuery): Promise<ICountryResult>;
    /**
     * Returns the default country for the current store. By default this will be the US. See [api docs](https://api.spreecommerce.org/docs/api-v2/7cf807c85c035-get-default-country).
     *
     * **Success response schema:** [Success schema](../pages/response-schema.html#success-schema)
     *
     * **Failure response schema:** [Error schema](../pages/response-schema.html#error-schema)
     *
     * **Example:**
     * ```ts
     * const countries = await client.countries.default()
     * ```
     */
    default(options?: DefaultOptions$1): Promise<ICountryResult>;
    /**
     * @hidden
     * @deprecated Use the combined options signature instead.
     */
    default(params: IQuery): Promise<ICountryResult>;
}

interface DigitalAsset extends ReadableStream {
}
interface DigitalAssetResult extends ResultResponse<DigitalAsset> {
}
type DownloadOptions = WithCommonOptions<{
    suggestToken: true;
    suggestQuery: true;
}, {
    asset_token: string;
}>;

declare class DigitalAssets extends Http {
    /**
     * Returns a stream for downloading a purchased digital product. See [api docs](https://api.spreecommerce.org/docs/api-v2/da2a29db89559-download-a-digital-asset).
     *
     * **Required token:** [Bearer token](../pages/tokens.html#bearer-token) or [Order token](../pages/tokens.html#order-token)
     *
     * **Options schema:**
     * ```ts
     * interface options {
     *   asset_token: string
     * }
     * ```
     *
     * **Success response schema:** [Success schema](../pages/response-schema.html#success-schema)
     *
     * **Failure response schema:** [Error schema](../pages/response-schema.html#error-schema)
     *
     * **Example:**
     * ```ts
     * // Many NodeJS servers allow piping a stream as the response (`digitalAssetStream.pipe(serverResponse);`).
     *
     * // The below example assumes a logged in user using SpreeSDK in the browser and downloading an image asset.
     *
     * // A digital token can be retrieved from a digital link associated to a line item in a completed order.
     * const digitalToken = '1YjXK36ZRj2w4nxtMkJutTGX'
     *
     * const response = await client.digitalAssets.download({
     *   bearer_token: '7381273269536713689562374856',
     *   asset_token: digitalToken
     * })
     *
     * const digitalAssetStream = response.success()
     *
     * // Append an <img> tag to the page to show the asset on the page.
     * const image = new Image()
     *
     * document.body.appendChild(image)
     *
     * // Convert a stream to a Blob for easier processing.
     * const digitalAssetBlob = await new Response(digitalAssetStream).blob()
     *
     * image.src = URL.createObjectURL(digitalAssetBlob)
     * ```
     */
    download(options: DownloadOptions): Promise<DigitalAssetResult>;
    /**
     * @hidden
     * @deprecated Use the combined options signature instead.
     */
    download(token: IToken, assetToken: string, params?: IQuery): Promise<DigitalAssetResult>;
}

interface MenuAttr extends JsonApiDocument {
    type: string;
    id: string;
    attributes: {
        name: string;
        location: 'header' | 'footer' | string;
        locale: string;
    };
    relationships: IRelationships;
}
interface Menu extends JsonApiSingleResponse {
    data: MenuAttr;
}
interface Menus$1 extends JsonApiListResponse {
    data: MenuAttr[];
}
interface MenuResult extends ResultResponse<Menu> {
}
interface MenusResult extends ResultResponse<Menus$1> {
}
/**
 * @deprecated Use {@link ListOptions} instead.
 */
interface MenusList extends IQuery {
    locale?: string;
    filter?: IQuery['filter'] & {
        location?: string;
    };
}
type ListOptions$5 = WithCommonOptions<{
    suggestQuery: true;
}, MenusList>;
type ShowOptions$5 = WithCommonOptions<{
    suggestQuery: true;
}, {
    id: string;
}>;

declare class Menus extends Http {
    /**
     * Returns a list of Menus. See [api docs](https://api.spreecommerce.org/docs/api-v2/1021e86f10cee-list-all-menus).
     *
     * **Options schema:**
     * ```ts
     * interface options {
     *   locale?: string
     *   filter?: {
     *     location?: string
     *   }
     * }
     * ```
     *
     * **Success response schema:** [Success schema](../pages/response-schema.html#success-schema)
     *
     * **Failure response schema:** [Error schema](../pages/response-schema.html#error-schema)
     *
     * **Example:**
     * ```ts
     * const response = await client.menus.list({
     *   locale: 'fr',
     *   filter: {
     *     location: 'header'
     *   }
     * })
     * ```
     */
    list(options?: ListOptions$5): Promise<MenusResult>;
    /**
     * @hidden
     * @deprecated Use the combined options signature instead.
     */
    list(params?: MenusList): Promise<MenusResult>;
    /**
     * Returns a single Menu. See [api docs](https://api.spreecommerce.org/docs/api-v2/b67d067a42bc5-retrieve-a-menu).
     *
     * **Options schema:**
     * ```ts
     * interface options {
     *   id: string
     * }
     * ```
     *
     * **Success response schema:** [Success schema](../pages/response-schema.html#success-schema)
     *
     * **Failure response schema:** [Error schema](../pages/response-schema.html#error-schema)
     *
     * **Example:**
     * ```ts
     * const response = await client.menus.show({
     *   id: '2'
     * })
     * ```
     */
    show(options: ShowOptions$5): Promise<MenuResult>;
    /**
     * @hidden
     * @deprecated Use the combined options signature instead.
     */
    show(id: string, params?: IQuery): Promise<MenuResult>;
}

declare class Order extends Http {
    /**
     * Returns a placed Order.
     *
     * **Required token:** [Order token](../pages/tokens.html#order-token)
     *
     * **Options schema:**
     * ```ts
     * interface options {
     *   order_number: string
     * }
     * ```
     *
     * **Success response schema:** [Success schema](../pages/response-schema.html#success-schema)
     *
     * **Failure response schema:** [Error schema](../pages/response-schema.html#error-schema)
     *
     * **Example:**
     * ```ts
     * const response = await client.order.status({
     *   order_token: '7381273269536713689562374856',
     *   order_number: 'R653163382'
     * })
     * ```
     */
    status(options: StatusOptions): Promise<IOrderResult>;
    /**
     * @hidden
     * @deprecated Use the combined options signature instead.
     */
    status(token: IToken, orderNumber: string, params?: IQuery): Promise<IOrderResult>;
}

interface PageAttr extends JsonApiDocument {
    type: string;
    id: string;
    attributes: {
        title: string;
        content: string;
        locale: string;
        meta_description: string | null;
        meta_title: string | null;
        slug: string;
        type: string;
    };
    relationships: IRelationships;
}
interface IPage extends JsonApiSingleResponse {
    data: PageAttr;
}
interface IPages extends JsonApiListResponse {
    data: PageAttr[];
}
interface IPageResult extends ResultResponse<IPage> {
}
interface IPagesResult extends ResultResponse<IPages> {
}
type ListOptions$4 = WithCommonOptions<{
    suggestQuery: true;
}>;
type ShowOptions$4 = WithCommonOptions<{
    suggestQuery: true;
}, {
    id: string;
}>;

declare class Pages extends Http {
    /**
     * Returns a list of all CMS Pages available in the current store. See [api docs](https://api.spreecommerce.org/docs/api-v2/48dab6913cd0d-list-all-cms-pages).
     *
     * **Success response schema:** [Success schema](../pages/response-schema.html#success-schema)
     *
     * **Failure response schema:** [Error schema](../pages/response-schema.html#error-schema)
     *
     * **Example:**
     * ```ts
     * const pages = await client.pages.list()
     * ```
     */
    list(options?: ListOptions$4): Promise<IPagesResult>;
    /**
     * @hidden
     * @deprecated Use the combined options signature instead.
     */
    list(params?: IQuery): Promise<IPagesResult>;
    /**
     * Returns a single CMS Page. You can use either a CMS Page slug or ID. See [api docs](https://api.spreecommerce.org/docs/api-v2/cedb218a94c4d-retrieve-a-cms-page).
     *
     * **Options schema:**
     * ```ts
     * interface options {
     *   id: string
     * }
     * ```
     *
     * **Success response schema:** [Success schema](../pages/response-schema.html#success-schema)
     *
     * **Failure response schema:** [Error schema](../pages/response-schema.html#error-schema)
     *
     * **Example:**
     * ```ts
     * const page = await client.pages.show({
     *   id: 'about-us'
     * })
     * ```
     */
    show(options: ShowOptions$4): Promise<IPageResult>;
    /**
     * @hidden
     * @deprecated Use the combined options signature instead.
     */
    show(id: string, params?: IQuery): Promise<IPageResult>;
}

interface ProductAttr extends JsonApiDocument {
    type: string;
    id: string;
    attributes: {
        name: string;
        description: string;
        available_on: string;
        slug: string;
        meta_description: string | null;
        meta_keywords: string | null;
        updated_at: string;
        sku: string;
        purchasable: boolean;
        in_stock: boolean;
        backorderable: boolean;
        available: boolean;
        currency: string;
        price: string;
        display_price: string;
        compare_at_price: string | null;
        display_compare_at_price: string | null;
        localized_slugs: LocalizedSlugs;
    };
    relationships: IRelationships;
}
interface IProduct extends JsonApiSingleResponse {
    data: ProductAttr;
}
interface IProducts extends JsonApiListResponse {
    data: ProductAttr[];
}
interface IProductResult extends ResultResponse<IProduct> {
}
interface IProductsResult extends ResultResponse<IProducts> {
}
type ListOptions$3 = WithCommonOptions<{
    suggestToken: true;
    suggestQuery: true;
    optionalToken: true;
}, {
    image_transformation?: ImageTransformation;
}>;
type ShowOptions$3 = WithCommonOptions<{
    suggestToken: true;
    suggestQuery: true;
    optionalToken: true;
}, {
    id: string;
    image_transformation?: ImageTransformation;
}>;

declare class Products extends Http {
    /**
     * Returns a list of Products. See [api docs](https://api.spreecommerce.org/docs/api-v2/b3A6MzE0Mjc2Mg-list-all-products).
     *
     * **Required token:** [Bearer token](../pages/tokens.html#bearer-token) - if logged in user
     *
     * **Options schema:**
     * ```ts
     * interface options {
     *   image_transformation?: {
     *     size?: string
     *     quality?: number
     *   }
     * }
     * ```
     *
     * **Success response schema:** [Success schema](../pages/response-schema.html#success-schema)
     *
     * **Failure response schema:** [Error schema](../pages/response-schema.html#error-schema)
     *
     * **Example:**
     * ```ts
     * const response = await client.products.list({
     *   page: 1,
     *   per_page: 10
     * })
     * ```
     */
    list(options: ListOptions$3): Promise<IProductsResult>;
    /**
     * @hidden
     * @deprecated Use the combined options signature instead.
     */
    list(token: IToken, params: IProductsQuery): Promise<IProductsResult>;
    /**
     * Returns a single product. See [api docs](https://api.spreecommerce.org/docs/api-v2/b3A6MTgwNTI4ODE-retrieve-a-product).
     *
     * **Required token:** [Bearer token](../pages/tokens.html#bearer-token) - if logged in user
     *
     * **Options schema:**
     * ```ts
     * interface options {
     *   image_transformation?: {
     *     size?: string
     *     quality?: number
     *   }
     * }
     * ```
     *
     * **Success response schema:** [Success schema](../pages/response-schema.html#success-schema)
     *
     * **Failure response schema:** [Error schema](../pages/response-schema.html#error-schema)
     *
     * **Example:**
     * ```ts
     * const response = await client.products.show({
     *   id: '123',
     *   include: 'variants'
     * })
     * ```
     */
    show(options: ShowOptions$3): Promise<IProductResult>;
    /**
     * @hidden
     * @deprecated Use the combined options signature instead.
     */
    show(id: string, token: IToken, params: IProductsQuery): Promise<IProductResult>;
}

interface TaxonAttr extends JsonApiDocument {
    type: string;
    id: string;
    attributes: {
        name: string;
        pretty_name: string;
        permalink: string;
        seo_title: string;
        meta_title: string | null;
        meta_description: string | null;
        meta_keywords: string | null;
        left: number;
        right: number;
        position: number;
        depth: number;
        is_root: boolean;
        is_child: boolean;
        is_leaf: string;
        localized_slugs: LocalizedSlugs;
        updated_at: Date;
    };
    relationships: IRelationships;
}
interface ITaxon extends JsonApiSingleResponse {
    data: TaxonAttr;
}
interface ITaxons extends JsonApiListResponse {
    data: TaxonAttr[];
}
interface ITaxonResult extends ResultResponse<ITaxon> {
}
interface ITaxonsResult extends ResultResponse<ITaxons> {
}
type ListOptions$2 = WithCommonOptions<{
    suggestQuery: true;
}>;
type ShowOptions$2 = WithCommonOptions<{
    suggestQuery: true;
}, {
    id: string;
}>;

declare class Taxons extends Http {
    /**
     * Returns a list of Taxons. See [api docs](https://api.spreecommerce.org/docs/api-v2/b3A6MzE0Mjc2NA-list-all-taxons).
     *
     * **Success response schema:** [Success schema](../pages/response-schema.html#success-schema)
     *
     * **Failure response schema:** [Error schema](../pages/response-schema.html#error-schema)
     *
     * **Example:**
     * ```ts
     * const response = await client.taxons.list()
     * ```
     */
    list(options?: ListOptions$2): Promise<ITaxonsResult>;
    /**
     * @hidden
     * @deprecated Use the combined options signature instead.
     */
    list(params?: IQuery): Promise<ITaxonsResult>;
    /**
     * Returns a single Taxon. See [api docs](https://api.spreecommerce.org/docs/api-v2/6e26f7594be8b-retrieve-a-taxon).
     *
     * **Options schema:**
     * ```ts
     * interface options {
     *   id: string
     * }
     * ```
     *
     * **Success response schema:** [Success schema](../pages/response-schema.html#success-schema)
     *
     * **Failure response schema:** [Error schema](../pages/response-schema.html#error-schema)
     *
     * **Example:**
     * ```ts
     * const products = await client.taxons.show({ id: '1' })
     * ```
     */
    show(options: ShowOptions$2): Promise<ITaxonResult>;
    /**
     * @hidden
     * @deprecated Use the combined options signature instead.
     */
    show(id: string, params?: IQuery): Promise<ITaxonResult>;
}

interface VendorAttr extends JsonApiDocument {
    type: string;
    id: string;
    attributes: {
        name: string;
        slug: string;
        instagram: string | null;
        facebook: string | null;
        twitter: string | null;
        about_us: string | null;
        logo_url: string | null;
        logo_small_url: string | null;
        logo_medium_url: string | null;
        logo_large_url: string | null;
        cover_photo_url: string | null;
        cover_photo_small_url: string | null;
        cover_photo_medium_url: string | null;
        cover_photo_large_url: string | null;
    };
    relationships: IRelationships;
}
interface Vendor extends JsonApiSingleResponse {
    data: VendorAttr;
}
interface Vendors$1 extends JsonApiListResponse {
    data: VendorAttr[];
}
interface VendorResult extends ResultResponse<Vendor> {
}
interface VendorsResult extends ResultResponse<Vendors$1> {
}
type ListOptions$1 = WithCommonOptions<{
    suggestToken: true;
    suggestQuery: true;
    optionalToken: true;
}>;
type ShowOptions$1 = WithCommonOptions<{
    suggestToken: true;
    suggestQuery: true;
    optionalToken: true;
}, {
    id: string;
}>;

/**
 * The multi-vendor marketplace feature is only available via [Vendo](https://www.getvendo.com).
 */
declare class Vendors extends Http {
    /**
     * Returns a list of Vendors in a Spree marketplace.
     *
     * **Success response schema:** [Success schema](../pages/response-schema.html#success-schema)
     *
     * **Failure response schema:** [Error schema](../pages/response-schema.html#error-schema)
     *
     * **Example:**
     * ```ts
     * const vendors = await client.vendors.list({
     *   include: 'products'
     * })
     * ```
     */
    list(options?: ListOptions$1): Promise<VendorsResult>;
    /**
     * Returns a single Vendor in a Spree marketplace.
     *
     * **Options schema:**
     * ```ts
     * interface options {
     *   id: string
     * }
     * ```
     *
     * **Success response schema:** [Success schema](../pages/response-schema.html#success-schema)
     *
     * **Failure response schema:** [Error schema](../pages/response-schema.html#error-schema)
     *
     * **Example:**
     * ```ts
     * const vendor = await client.vendors.show({ id: '123' })
     * ```
     */
    show(options: ShowOptions$1): Promise<VendorResult>;
}

interface WishedItemAttr extends JsonApiDocument {
    type: string;
    id: string;
    attributes: {
        variant_id: string;
        quantity: number;
    };
    relationships: IRelationships;
}
interface WishedItem extends JsonApiSingleResponse {
    data: WishedItemAttr;
}
interface WishedItemResult extends ResultResponse<WishedItem> {
}
/**
 * @deprecated Use {@link AddWishedItemOptions} instead.
 */
interface WishlistsAddWishedItem extends IQuery {
    variant_id: string;
    quantity: number;
}
/**
 * @deprecated Use {@link UpdateWishedItemOptions} instead.
 */
interface WishlistsUpdateWishedItem extends IQuery {
    quantity: number;
}
type AddWishedItemOptions = WithCommonOptions<{
    suggestToken: true;
    suggestQuery: true;
}, {
    wishlist_token: string;
} & WishlistsAddWishedItem>;
type UpdateWishedItemOptions = WithCommonOptions<{
    suggestToken: true;
    suggestQuery: true;
}, {
    wishlist_token: string;
    id: string;
} & WishlistsUpdateWishedItem>;
type RemoveWishedItemOptions = WithCommonOptions<{
    suggestToken: true;
}, {
    wishlist_token: string;
    id: string;
}>;

interface WishlistAttr extends JsonApiDocument {
    type: string;
    id: string;
    attributes: {
        token: string;
        name: string;
        is_private: boolean;
        is_default: boolean;
        variant_included: boolean;
    };
    relationships: IRelationships;
}
interface Wishlist extends JsonApiSingleResponse {
    data: WishlistAttr;
}
interface Wishlists$1 extends JsonApiListResponse {
    data: WishlistAttr[];
}
interface WishlistResult extends ResultResponse<Wishlist> {
}
interface WishlistsResult extends ResultResponse<Wishlists$1> {
}
/**
 * @deprecated Use {@link ListOptions} instead.
 */
interface WishlistsList extends IQuery {
    is_variant_included?: string;
}
/**
 * @deprecated Use {@link ShowOptions} instead.
 */
interface WishlistsShow extends IQuery {
    is_variant_included?: string;
}
/**
 * @deprecated Use {@link DefaultOptions} instead.
 */
interface WishlistsDefault extends IQuery {
    is_variant_included?: string;
}
/**
 * @deprecated Use {@link CreateOptions} instead.
 */
interface WishlistsCreate extends IQuery {
    name: string;
    is_private?: boolean;
    is_default?: boolean;
}
/**
 * @deprecated Use {@link UpdateOptions} instead.
 */
interface WishlistsUpdate extends IQuery {
    name: string;
    is_private?: boolean;
    is_default?: boolean;
}
type ListOptions = WithCommonOptions<{
    suggestToken: true;
    suggestQuery: true;
}, WishlistsList>;
type ShowOptions = WithCommonOptions<{
    suggestToken: true;
    suggestQuery: true;
}, {
    wishlist_token: string;
} & WishlistsShow>;
type DefaultOptions = WithCommonOptions<{
    suggestToken: true;
    suggestQuery: true;
}, WishlistsDefault>;
type CreateOptions = WithCommonOptions<{
    suggestToken: true;
    suggestQuery: true;
}, WishlistsCreate>;
type UpdateOptions = WithCommonOptions<{
    suggestToken: true;
    suggestQuery: true;
}, {
    wishlist_token: string;
} & WishlistsUpdate>;
type RemoveOptions = WithCommonOptions<{
    suggestToken: true;
}, {
    wishlist_token: string;
}>;

declare class Wishlists extends Http {
    /**
     * Returns a list of Wishlists. See [api docs](https://api.spreecommerce.org/docs/api-v2/2b6c6c347d14b-list-all-wishlists).
     *
     * **Required token:** [Bearer token](../pages/tokens.html#bearer-token)
     *
     * **Options schema:**
     * ```ts
     * interface options {
     *   is_variant_included?: string
     * }
     * ```
     *
     * **Success response schema:** [Success schema](../pages/response-schema.html#success-schema)
     *
     * **Failure response schema:** [Error schema](../pages/response-schema.html#error-schema)
     *
     * **Example:**
     * ```ts
     * const response = await client.wishlists.list({
     *   bearer_token: '7381273269536713689562374856',
     *   is_variant_included: '456'
     * })
     * ```
     */
    list(options: ListOptions): Promise<WishlistsResult>;
    /**
     * @hidden
     * @deprecated Use the combined options signature instead.
     */
    list(token: IToken, params?: WishlistsList): Promise<WishlistsResult>;
    /**
     * Returns a single Wishlist. See [api docs](https://api.spreecommerce.org/docs/api-v2/b3A6MjE0NTY5NDA-retrieve-a-wishlist).
     *
     * **Required token:** [Bearer token](../pages/tokens.html#bearer-token)
     *
     * **Options schema:**
     * ```ts
     * interface options {
     *   wishlist_token: string
     *   is_variant_included?: string
     * }
     * ```
     *
     * **Success response schema:** [Success schema](../pages/response-schema.html#success-schema)
     *
     * **Failure response schema:** [Error schema](../pages/response-schema.html#error-schema)
     *
     * **Example:**
     * ```ts
     * const response = await client.wishlists.show({
     *   bearer_token: '7381273269536713689562374856',
     *   wishlist_token: '123',
     *   is_variant_included: '456'
     * })
     * ```
     */
    show(options: ShowOptions): Promise<WishlistResult>;
    /**
     * @hidden
     * @deprecated Use the combined options signature instead.
     */
    show(token: IToken, wishlistToken: string, params?: WishlistsShow): Promise<WishlistResult>;
    /**
     * Returns the default Wishlist for the logged in user. It will be created, if the user does not have a default Wishlist for the current store. See [api docs](https://api.spreecommerce.org/docs/api-v2/f29e11140c53c-retrieve-the-default-wishlist).
     *
     * **Required token:** [Bearer token](../pages/tokens.html#bearer-token)
     *
     * **Options schema:**
     * ```ts
     * interface options {
     *   is_variant_included?: string
     * }
     * ```
     *
     * **Success response schema:** [Success schema](../pages/response-schema.html#success-schema)
     *
     * **Failure response schema:** [Error schema](../pages/response-schema.html#error-schema)
     *
     * **Example:**
     * ```ts
     * const response = await client.wishlists.default({
     *   bearer_token: '7381273269536713689562374856',
     *   is_variant_included: '456'
     * })
     * ```
     */
    default(options: DefaultOptions): Promise<WishlistResult>;
    /**
     * @hidden
     * @deprecated Use the combined options signature instead.
     */
    default(token: IToken, params?: WishlistsDefault): Promise<WishlistResult>;
    /**
     * Creates a new Wishlist for the logged in user.
     *
     * **Required token:** [Bearer token](../pages/tokens.html#bearer-token)
     *
     * **Options schema:**
     * ```ts
     * interface options {
     *   name: string
     *   is_private?: boolean
     *   is_default?: boolean
     * }
     * ```
     *
     * **Success response schema:** [Success schema](../pages/response-schema.html#success-schema)
     *
     * **Failure response schema:** [Error schema](../pages/response-schema.html#error-schema)
     *
     * **Example:**
     * ```ts
     * const response = await client.wishlists.create({
     *   bearer_token: '7381273269536713689562374856',
     *   name: 'My wishlist'
     * })
     * ```
     */
    create(options: CreateOptions): Promise<WishlistResult>;
    /**
     * @hidden
     * @deprecated Use the combined options signature instead.
     */
    create(token: IToken, params: WishlistsCreate): Promise<WishlistResult>;
    /**
     * Updates an existing Wishlist.
     *
     * **Required token:** [Bearer token](../pages/tokens.html#bearer-token)
     *
     * **Options schema:**
     * ```ts
     * interface options {
     *   wishlist_token: string
     *   name: string
     *   is_private?: boolean
     *   is_default?: boolean
     * }
     * ```
     *
     * **Success response schema:** [Success schema](../pages/response-schema.html#success-schema)
     *
     * **Failure response schema:** [Error schema](../pages/response-schema.html#error-schema)
     *
     * **Example:**
     * ```ts
     * const response = await client.wishlists.update({
     *   bearer_token: '7381273269536713689562374856',
     *   wishlist_token: '123',
     *   name: 'My updated wishlist',
     *   is_private: true
     * })
     * ```
     */
    update(options: UpdateOptions): Promise<WishlistResult>;
    /**
     * @hidden
     * @deprecated Use the combined options signature instead.
     */
    update(token: IToken, wishlistToken: string, params: WishlistsUpdate): Promise<WishlistResult>;
    /**
     * Removes a Wishlist. See [api docs](https://api.spreecommerce.org/docs/api-v2/74e84b03b47e0-delete-a-wishlist).
     *
     * **Required token:** [Bearer token](../pages/tokens.html#bearer-token)
     *
     * **Options schema:**
     * ```ts
     * interface options {
     *   wishlist_token: string
     * }
     * ```
     *
     * **Success response schema:** [Success schema](../pages/response-schema.html#success-schema)
     *
     * **Failure response schema:** [Error schema](../pages/response-schema.html#error-schema)
     *
     * **Example:**
     * ```ts
     * const response = await client.wishlists.remove({
     *   bearer_token: '7381273269536713689562374856',
     *   wishlist_token: '123'
     * })
     * ```
     */
    remove(options: RemoveOptions): Promise<NoContentResult>;
    /**
     * @hidden
     * @deprecated Use the combined options signature instead.
     */
    remove(token: IToken, wishlistToken: string): Promise<NoContentResult>;
    /**
     * Adds a new Wished Item to a Wishlist for the logged in user. See [api docs](https://api.spreecommerce.org/docs/api-v2/486219cd63ea9-add-item-to-wishlist).
     *
     * **Required token:** [Bearer token](../pages/tokens.html#bearer-token)
     *
     * **Options schema:**
     * ```ts
     * interface options {
     *   wishlist_token: string,
     *   variant_id: string
     *   quantity: number
     * }
     * ```
     *
     * **Success response schema:** [Success schema](../pages/response-schema.html#success-schema)
     *
     * **Failure response schema:** [Error schema](../pages/response-schema.html#error-schema)
     *
     * **Example:**
     * ```ts
     * const response = await client.wishlists.addWishedItem({
     *   bearer_token: '7381273269536713689562374856',
     *   wishlist_token: 'WyZxWS2w3BdDRHcGgtN1LKiY',
     *   variant_id: '1',
     *   quantity: 10
     * })
     * ```
     */
    addWishedItem(options: AddWishedItemOptions): Promise<WishedItemResult>;
    /**
     * @hidden
     * @deprecated Use the combined options signature instead.
     */
    addWishedItem(token: IToken, wishlistToken: string, params: WishlistsAddWishedItem): Promise<WishedItemResult>;
    /**
     * Updates a Wished Item for the logged in user. See [api docs](https://api.spreecommerce.org/docs/api-v2/e6e478e46003d-set-wished-item-quantity).
     *
     * **Required token:** [Bearer token](../pages/tokens.html#bearer-token)
     *
     * **Options schema:**
     * ```ts
     * interface options {
     *   wishlist_token: string,
     *   id: string
     *   quantity: number
     * }
     * ```
     *
     * **Success response schema:** [Success schema](../pages/response-schema.html#success-schema)
     *
     * **Failure response schema:** [Error schema](../pages/response-schema.html#error-schema)
     *
     * **Example:**
     * ```ts
     * const response = await client.wishlists.updateWishedItem({
     *   bearer_token: '7381273269536713689562374856',
     *   wishlist_token: 'WyZxWS2w3BdDRHcGgtN1LKiY',
     *   id: '2',
     *   quantity: 13
     * })
     * ```
     */
    updateWishedItem(options: UpdateWishedItemOptions): Promise<WishedItemResult>;
    /**
     * @hidden
     * @deprecated Use the combined options signature instead.
     */
    updateWishedItem(token: IToken, wishlistToken: string, id: string, params: WishlistsUpdateWishedItem): Promise<WishedItemResult>;
    /**
     * Removes a Wished Item for the logged in user. See [api docs](https://api.spreecommerce.org/docs/api-v2/766b11755bbb0-delete-item-from-wishlist).
     *
     * **Required token:** [Bearer token](../pages/tokens.html#bearer-token)
     *
     * **Options schema:**
     * ```ts
     * interface options {
     *   wishlist_token: string,
     *   id: string
     * }
     * ```
     *
     * **Success response schema:** [Success schema](../pages/response-schema.html#success-schema)
     *
     * **Failure response schema:** [Error schema](../pages/response-schema.html#error-schema)
     *
     * **Example:**
     * ```ts
     * const response = await client.wishlists.removeWishedItem({
     *   bearer_token: '7381273269536713689562374856',
     *   wishlist_token: 'WyZxWS2w3BdDRHcGgtN1LKiY',
     *   id: '2'
     * })
     * ```
     */
    removeWishedItem(options: RemoveWishedItemOptions): Promise<WishedItemResult>;
    /**
     * @hidden
     * @deprecated Use the combined options signature instead.
     */
    removeWishedItem(token: IToken, wishlistToken: string, id: string): Promise<WishedItemResult>;
}

type index_d_Account = Account;
declare const index_d_Account: typeof Account;
type index_d_Authentication = Authentication;
declare const index_d_Authentication: typeof Authentication;
type index_d_Cart = Cart;
declare const index_d_Cart: typeof Cart;
type index_d_Checkout = Checkout;
declare const index_d_Checkout: typeof Checkout;
type index_d_Countries = Countries;
declare const index_d_Countries: typeof Countries;
type index_d_DigitalAssets = DigitalAssets;
declare const index_d_DigitalAssets: typeof DigitalAssets;
type index_d_Menus = Menus;
declare const index_d_Menus: typeof Menus;
type index_d_Order = Order;
declare const index_d_Order: typeof Order;
type index_d_Pages = Pages;
declare const index_d_Pages: typeof Pages;
type index_d_Products = Products;
declare const index_d_Products: typeof Products;
type index_d_Taxons = Taxons;
declare const index_d_Taxons: typeof Taxons;
type index_d_Vendors = Vendors;
declare const index_d_Vendors: typeof Vendors;
type index_d_Wishlists = Wishlists;
declare const index_d_Wishlists: typeof Wishlists;
declare namespace index_d {
  export {
    index_d_Account as Account,
    index_d_Authentication as Authentication,
    index_d_Cart as Cart,
    index_d_Checkout as Checkout,
    index_d_Countries as Countries,
    index_d_DigitalAssets as DigitalAssets,
    index_d_Menus as Menus,
    index_d_Order as Order,
    index_d_Pages as Pages,
    index_d_Products as Products,
    index_d_Taxons as Taxons,
    index_d_Vendors as Vendors,
    index_d_Wishlists as Wishlists,
  };
}

declare const endpoints: {
    account: typeof Account;
    authentication: typeof Authentication;
    cart: typeof Cart;
    checkout: typeof Checkout;
    countries: typeof Countries;
    digitalAssets: typeof DigitalAssets;
    menus: typeof Menus;
    order: typeof Order;
    pages: typeof Pages;
    products: typeof Products;
    taxons: typeof Taxons;
    vendors: typeof Vendors;
    wishlists: typeof Wishlists;
};
type Endpoints = {
    [key in keyof typeof endpoints]: InstanceType<typeof endpoints[key]>;
};
type Client = Client$1 & Endpoints;
declare const makeClient: (config: IClientConfig) => Client;

export { AccountAddressAttr, AccountAddressResponse, AccountAddressResult, AccountAddressesResponse, AccountAddressesResult, AccountAttr, AddFullPayment, AddItem, AddPayment, AddStoreCredit, AllowedCustomizations, AssociateCart, AuthTokenAttr, AuthTokenParams, AutomaticResponseParsing, BasicSpreeError, ChangeCurrency, Client, CountryAttr, CouponCode, CreateCustomizedFetchFetcher, CreateFetchFetcherConfig, CreateFetcher, CreateFetcherConfig, CreditCardAttr, DeepAnyObject, DefaultCustomizations, DigitalAsset, DigitalAssetResult, DocumentRelationshipError, EmptyObjectResponse, EmptyObjectResult, Endpoints, ErrorType, Errors, EstimateShippingMethods, EstimateShippingRates, EstimatedShippingMethodAttr, EstimatedShippingRates, EstimatedShippingRatesResult, ExpandedSpreeError, FetchConfig, FetchError, Fetcher, FetcherConfig, FieldErrors, GetTokenOptions, Http, HttpMethod, IAccount, IAccountConfirmation, IAccountConfirmationResult, IAccountResult, IAddress, IClientConfig, ICountries, ICountriesResult, ICountry, ICountryResult, ICreditCard, ICreditCardResult, ICreditCards, ICreditCardsResult, IEstimatedShippingMethods, IEstimatedShippingMethodsResult, IOAuthToken, IOAuthTokenResult, IOrder, IOrderResult, IOrders, IOrdersResult, IPage, IPageResult, IPages, IPagesResult, IPayment, IPaymentMethods, IPaymentMethodsResult, IPaymentSource, IPlatformToken, IPlatformTokenResult, IPlatformUserToken, IPlatformUserTokenResult, IProduct, IProductResult, IProducts, IProductsQuery, IProductsResult, IQuery, IRelationships, IShipment, IShippingMethods, IShippingMethodsResult, ITaxon, ITaxonResult, ITaxons, ITaxonsResult, IToken, ImageTransformation, JsonApiDocument, JsonApiListResponse, JsonApiResponse, JsonApiSingleResponse, LocalizedSlugs, Menu, MenuAttr, MenuResult, Menus$1 as Menus, MenusResult, MisconfigurationError, NestedAttributes, NoContentResponse, NoContentResult, NoResponseError, OptionalAccountToken, OptionalAnyToken, OrderAttr, OrderUpdate, PageAttr, PaymentMethodAttr, ProductAttr, RawFetchRequest, RawFetchResponse, RefreshTokenAttr, RefreshTokenOptions, RefreshTokenParams, RelationType, RequiredAccountToken, RequiredAnyToken, ResponseParsing, Result, ResultResponse, RevokeTokenAttr, RevokeTokenOptions, RevokeTokenParams, SelectShippingMethod, SetQuantity, ShippingMethodAttr, ShippingRateAttr, ShippingRates, ShippingRatesResult, SpreeError, SpreeSDKError, StripeCheckoutSessionSummary, StripeCheckoutSessionSummaryResult, TaxonAttr, Vendor, VendorAttr, VendorResult, Vendors$1 as Vendors, VendorsResult, WishedItem, WishedItemAttr, WishedItemResult, Wishlist, WishlistAttr, WishlistResult, Wishlists$1 as Wishlists, WishlistsResult, WithCommonOptions, index_d as endpoints, extractSuccess, findDocument, findRelationshipDocuments, findSingleRelationshipDocument, fromJson, makeClient, makeFail, makeSuccess, objectToQuerystring, endpoints$1 as routes, split, squashAndPreparePositionalArguments, storefrontPath, toJson };
