import { Client } from '../client'; import type { Models } from '../models'; import { CartIoDirection } from '../enums/cart-io-direction'; import { CartIoApplyMode } from '../enums/cart-io-apply-mode'; import { CartIoEntity } from '../enums/cart-io-entity'; import { CartIoFormat } from '../enums/cart-io-format'; import { CartItemType } from '../enums/cart-item-type'; import { CartExportFormat } from '../enums/cart-export-format'; export declare class Carts { client: Client; constructor(client: Client); /** * * @param {string} params.contactId - Filter to one owning contact. * @param {string} params.sessionKey - Filter to one guest session. * @param {string} params.status - Filter by cart status (e.g. active). * @param {number} params.limit - Page size (default 50, max 200). * @param {number} params.offset - Row offset for pagination (default 0). * @param {string} params.order - Sort as 'column.asc' | 'column.desc', e.g. 'created_at.desc'. * @throws {RevenexxException} * @returns {Promise<{}>} */ cartsList(params?: { contactId?: string; sessionKey?: string; status?: string; limit?: number; offset?: number; order?: string; }): Promise<{}>; /** * * @param {string} contactId - Filter to one owning contact. * @param {string} sessionKey - Filter to one guest session. * @param {string} status - Filter by cart status (e.g. active). * @param {number} limit - Page size (default 50, max 200). * @param {number} offset - Row offset for pagination (default 0). * @param {string} order - Sort as 'column.asc' | 'column.desc', e.g. 'created_at.desc'. * @throws {RevenexxException} * @returns {Promise<{}>} * @deprecated Use the object parameter style method for a better developer experience. */ cartsList(contactId?: string, sessionKey?: string, status?: string, limit?: number, offset?: number, order?: string): Promise<{}>; /** * * @param {string} params.channelId - * @param {string} params.contactId - Owning customer contact. * @param {string} params.currency - ISO 4217 code (default EUR). * @param {boolean} params.isCurrent - Make this THE current cart of its owner. * @param {object} params.metadata - Free-form metadata. * @param {string} params.name - Display name (default 'Cart'). * @param {string} params.sessionKey - Owning guest session. * @throws {RevenexxException} * @returns {Promise} */ cartsCreate(params?: { channelId?: string; contactId?: string; currency?: string; isCurrent?: boolean; metadata?: object; name?: string; sessionKey?: string; }): Promise; /** * * @param {string} channelId - * @param {string} contactId - Owning customer contact. * @param {string} currency - ISO 4217 code (default EUR). * @param {boolean} isCurrent - Make this THE current cart of its owner. * @param {object} metadata - Free-form metadata. * @param {string} name - Display name (default 'Cart'). * @param {string} sessionKey - Owning guest session. * @throws {RevenexxException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. */ cartsCreate(channelId?: string, contactId?: string, currency?: string, isCurrent?: boolean, metadata?: object, name?: string, sessionKey?: string): Promise; /** * * @param {string} params.contactId - Contact taking ownership. * @param {string} params.sessionKey - Guest session whose active carts are handed over. * @param {string} params.targetCartId - Merge the session carts into this cart instead of adopting them. * @throws {RevenexxException} * @returns {Promise<{}>} */ cartsClaim(params: { contactId: string; sessionKey: string; targetCartId?: string; }): Promise<{}>; /** * * @param {string} contactId - Contact taking ownership. * @param {string} sessionKey - Guest session whose active carts are handed over. * @param {string} targetCartId - Merge the session carts into this cart instead of adopting them. * @throws {RevenexxException} * @returns {Promise<{}>} * @deprecated Use the object parameter style method for a better developer experience. */ cartsClaim(contactId: string, sessionKey: string, targetCartId?: string): Promise<{}>; /** * * @param {string} params.contactId - Owner of a newly created cart. * @param {string} params.csv - Raw CSV content (alternative to payload for csv profiles). * @param {string} params.name - Name for a newly created cart. * @param {object} params.payload - The import payload: '{cart, items}' object, or a raw JSON/CSV string in the profile's format. * @param {string} params.profileId - Import profile to run; ad-hoc import when omitted. * @param {string} params.sessionKey - Guest owner of a newly created cart. * @param {string} params.targetCartId - Existing active cart to import into. * @throws {RevenexxException} * @returns {Promise<{}>} */ cartsImport(params?: { contactId?: string; csv?: string; name?: string; payload?: object; profileId?: string; sessionKey?: string; targetCartId?: string; }): Promise<{}>; /** * * @param {string} contactId - Owner of a newly created cart. * @param {string} csv - Raw CSV content (alternative to payload for csv profiles). * @param {string} name - Name for a newly created cart. * @param {object} payload - The import payload: '{cart, items}' object, or a raw JSON/CSV string in the profile's format. * @param {string} profileId - Import profile to run; ad-hoc import when omitted. * @param {string} sessionKey - Guest owner of a newly created cart. * @param {string} targetCartId - Existing active cart to import into. * @throws {RevenexxException} * @returns {Promise<{}>} * @deprecated Use the object parameter style method for a better developer experience. */ cartsImport(contactId?: string, csv?: string, name?: string, payload?: object, profileId?: string, sessionKey?: string, targetCartId?: string): Promise<{}>; /** * * @param {number} params.limit - Page size (default 50, max 200). * @param {number} params.offset - Row offset for pagination (default 0). * @param {string} params.order - Sort as 'column.asc' | 'column.desc', e.g. 'created_at.desc'. * @throws {RevenexxException} * @returns {Promise<{}>} */ cartsIoProfilesList(params?: { limit?: number; offset?: number; order?: string; }): Promise<{}>; /** * * @param {number} limit - Page size (default 50, max 200). * @param {number} offset - Row offset for pagination (default 0). * @param {string} order - Sort as 'column.asc' | 'column.desc', e.g. 'created_at.desc'. * @throws {RevenexxException} * @returns {Promise<{}>} * @deprecated Use the object parameter style method for a better developer experience. */ cartsIoProfilesList(limit?: number, offset?: number, order?: string): Promise<{}>; /** * * @param {CartIoDirection} params.direction - * @param {string} params.name - * @param {CartIoApplyMode} params.applyMode - Default 'insert'. * @param {CartIoEntity} params.entity - Default 'carts'. * @param {CartIoFormat} params.format - Default 'json'. * @param {boolean} params.isTemplate - * @param {object} params.mapping - Column mapping (Baseline-IO-compatible). * @param {object} params.options - * @throws {RevenexxException} * @returns {Promise} */ cartsIoProfilesCreate(params: { direction: CartIoDirection; name: string; applyMode?: CartIoApplyMode; entity?: CartIoEntity; format?: CartIoFormat; isTemplate?: boolean; mapping?: object; options?: object; }): Promise; /** * * @param {CartIoDirection} direction - * @param {string} name - * @param {CartIoApplyMode} applyMode - Default 'insert'. * @param {CartIoEntity} entity - Default 'carts'. * @param {CartIoFormat} format - Default 'json'. * @param {boolean} isTemplate - * @param {object} mapping - Column mapping (Baseline-IO-compatible). * @param {object} options - * @throws {RevenexxException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. */ cartsIoProfilesCreate(direction: CartIoDirection, name: string, applyMode?: CartIoApplyMode, entity?: CartIoEntity, format?: CartIoFormat, isTemplate?: boolean, mapping?: object, options?: object): Promise; /** * * @throws {RevenexxException} * @returns {Promise<{}>} */ cartsIoProfilesDefaults(): Promise<{}>; /** * * @param {string} params.id - * @throws {RevenexxException} * @returns {Promise<{}>} */ cartsIoProfilesDelete(params: { id: string; }): Promise<{}>; /** * * @param {string} id - * @throws {RevenexxException} * @returns {Promise<{}>} * @deprecated Use the object parameter style method for a better developer experience. */ cartsIoProfilesDelete(id: string): Promise<{}>; /** * * @param {string} params.id - * @throws {RevenexxException} * @returns {Promise} */ cartsIoProfilesGet(params: { id: string; }): Promise; /** * * @param {string} id - * @throws {RevenexxException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. */ cartsIoProfilesGet(id: string): Promise; /** * * @param {string} params.id - * @param {CartIoApplyMode} params.applyMode - Default 'insert'. * @param {CartIoDirection} params.direction - * @param {CartIoEntity} params.entity - Default 'carts'. * @param {CartIoFormat} params.format - Default 'json'. * @param {boolean} params.isTemplate - * @param {object} params.mapping - Column mapping (Baseline-IO-compatible). * @param {string} params.name - * @param {object} params.options - * @throws {RevenexxException} * @returns {Promise} */ cartsIoProfilesUpdate(params: { id: string; applyMode?: CartIoApplyMode; direction?: CartIoDirection; entity?: CartIoEntity; format?: CartIoFormat; isTemplate?: boolean; mapping?: object; name?: string; options?: object; }): Promise; /** * * @param {string} id - * @param {CartIoApplyMode} applyMode - Default 'insert'. * @param {CartIoDirection} direction - * @param {CartIoEntity} entity - Default 'carts'. * @param {CartIoFormat} format - Default 'json'. * @param {boolean} isTemplate - * @param {object} mapping - Column mapping (Baseline-IO-compatible). * @param {string} name - * @param {object} options - * @throws {RevenexxException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. */ cartsIoProfilesUpdate(id: string, applyMode?: CartIoApplyMode, direction?: CartIoDirection, entity?: CartIoEntity, format?: CartIoFormat, isTemplate?: boolean, mapping?: object, name?: string, options?: object): Promise; /** * * @param {string} params.sourceCartId - Cart whose lines move into the target (becomes status merged). * @param {string} params.targetCartId - Receiving cart (must be active). * @throws {RevenexxException} * @returns {Promise<{}>} */ cartsMerge(params: { sourceCartId: string; targetCartId: string; }): Promise<{}>; /** * * @param {string} sourceCartId - Cart whose lines move into the target (becomes status merged). * @param {string} targetCartId - Receiving cart (must be active). * @throws {RevenexxException} * @returns {Promise<{}>} * @deprecated Use the object parameter style method for a better developer experience. */ cartsMerge(sourceCartId: string, targetCartId: string): Promise<{}>; /** * * @param {string} params.cartId - * @throws {RevenexxException} * @returns {Promise<{}>} */ cartsItemsList(params: { cartId: string; }): Promise<{}>; /** * * @param {string} cartId - * @throws {RevenexxException} * @returns {Promise<{}>} * @deprecated Use the object parameter style method for a better developer experience. */ cartsItemsList(cartId: string): Promise<{}>; /** * * @param {string} params.cartId - * @param {object} params.configuration - Free-form configuration — configured lines never merge. * @param {string} params.currency - Defaults to the cart's currency. * @param {object} params.metadata - Free-form metadata. * @param {string} params.name - Falls back to 'sku' when omitted. * @param {number} params.position - * @param {string} params.productId - * @param {number} params.quantity - Default 1. * @param {string} params.sku - * @param {object} params.snapshot - Loose product snapshot at add-time (price, name, image, …). * @param {number} params.taxRate - * @param {CartItemType} params.type - Line type (default 'product'). Plain product lines merge by product+price; configurations always stand alone. * @param {string} params.unit - * @param {number} params.unitPrice - Per-unit net price — line_total is always derived. * @throws {RevenexxException} * @returns {Promise} */ cartsItemsCreate(params: { cartId: string; configuration?: object; currency?: string; metadata?: object; name?: string; position?: number; productId?: string; quantity?: number; sku?: string; snapshot?: object; taxRate?: number; type?: CartItemType; unit?: string; unitPrice?: number; }): Promise; /** * * @param {string} cartId - * @param {object} configuration - Free-form configuration — configured lines never merge. * @param {string} currency - Defaults to the cart's currency. * @param {object} metadata - Free-form metadata. * @param {string} name - Falls back to 'sku' when omitted. * @param {number} position - * @param {string} productId - * @param {number} quantity - Default 1. * @param {string} sku - * @param {object} snapshot - Loose product snapshot at add-time (price, name, image, …). * @param {number} taxRate - * @param {CartItemType} type - Line type (default 'product'). Plain product lines merge by product+price; configurations always stand alone. * @param {string} unit - * @param {number} unitPrice - Per-unit net price — line_total is always derived. * @throws {RevenexxException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. */ cartsItemsCreate(cartId: string, configuration?: object, currency?: string, metadata?: object, name?: string, position?: number, productId?: string, quantity?: number, sku?: string, snapshot?: object, taxRate?: number, type?: CartItemType, unit?: string, unitPrice?: number): Promise; /** * * @param {string} params.cartId - * @param {Models.CartItemCreateRequest[]} params.items - The complete new item set (set semantics). * @throws {RevenexxException} * @returns {Promise<{}>} */ cartsItemsReplace(params: { cartId: string; items: Models.CartItemCreateRequest[]; }): Promise<{}>; /** * * @param {string} cartId - * @param {Models.CartItemCreateRequest[]} items - The complete new item set (set semantics). * @throws {RevenexxException} * @returns {Promise<{}>} * @deprecated Use the object parameter style method for a better developer experience. */ cartsItemsReplace(cartId: string, items: Models.CartItemCreateRequest[]): Promise<{}>; /** * * @param {string} params.cartId - * @param {string} params.id - * @throws {RevenexxException} * @returns {Promise<{}>} */ cartsItemsDelete(params: { cartId: string; id: string; }): Promise<{}>; /** * * @param {string} cartId - * @param {string} id - * @throws {RevenexxException} * @returns {Promise<{}>} * @deprecated Use the object parameter style method for a better developer experience. */ cartsItemsDelete(cartId: string, id: string): Promise<{}>; /** * * @param {string} params.cartId - * @param {string} params.id - * @throws {RevenexxException} * @returns {Promise} */ cartsItemsGet(params: { cartId: string; id: string; }): Promise; /** * * @param {string} cartId - * @param {string} id - * @throws {RevenexxException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. */ cartsItemsGet(cartId: string, id: string): Promise; /** * * @param {string} params.cartId - * @param {string} params.id - * @param {object} params.configuration - Free-form configuration — configured lines never merge. * @param {string} params.currency - Defaults to the cart's currency. * @param {object} params.metadata - Free-form metadata. * @param {string} params.name - Falls back to 'sku' when omitted. * @param {number} params.position - * @param {string} params.productId - * @param {number} params.quantity - Default 1. * @param {string} params.sku - * @param {object} params.snapshot - Loose product snapshot at add-time (price, name, image, …). * @param {number} params.taxRate - * @param {CartItemType} params.type - Line type (default 'product'). Plain product lines merge by product+price; configurations always stand alone. * @param {string} params.unit - * @param {number} params.unitPrice - Per-unit net price — line_total is always derived. * @throws {RevenexxException} * @returns {Promise} */ cartsItemsUpdate(params: { cartId: string; id: string; configuration?: object; currency?: string; metadata?: object; name?: string; position?: number; productId?: string; quantity?: number; sku?: string; snapshot?: object; taxRate?: number; type?: CartItemType; unit?: string; unitPrice?: number; }): Promise; /** * * @param {string} cartId - * @param {string} id - * @param {object} configuration - Free-form configuration — configured lines never merge. * @param {string} currency - Defaults to the cart's currency. * @param {object} metadata - Free-form metadata. * @param {string} name - Falls back to 'sku' when omitted. * @param {number} position - * @param {string} productId - * @param {number} quantity - Default 1. * @param {string} sku - * @param {object} snapshot - Loose product snapshot at add-time (price, name, image, …). * @param {number} taxRate - * @param {CartItemType} type - Line type (default 'product'). Plain product lines merge by product+price; configurations always stand alone. * @param {string} unit - * @param {number} unitPrice - Per-unit net price — line_total is always derived. * @throws {RevenexxException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. */ cartsItemsUpdate(cartId: string, id: string, configuration?: object, currency?: string, metadata?: object, name?: string, position?: number, productId?: string, quantity?: number, sku?: string, snapshot?: object, taxRate?: number, type?: CartItemType, unit?: string, unitPrice?: number): Promise; /** * * @param {string} params.id - * @throws {RevenexxException} * @returns {Promise<{}>} */ cartsDelete(params: { id: string; }): Promise<{}>; /** * * @param {string} id - * @throws {RevenexxException} * @returns {Promise<{}>} * @deprecated Use the object parameter style method for a better developer experience. */ cartsDelete(id: string): Promise<{}>; /** * * @param {string} params.id - * @throws {RevenexxException} * @returns {Promise} */ cartsGet(params: { id: string; }): Promise; /** * * @param {string} id - * @throws {RevenexxException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. */ cartsGet(id: string): Promise; /** * * @param {string} params.id - * @param {string} params.channelId - * @param {string} params.currency - ISO 4217 code. * @param {object} params.metadata - Free-form metadata. * @param {string} params.name - * @throws {RevenexxException} * @returns {Promise} */ cartsUpdate(params: { id: string; channelId?: string; currency?: string; metadata?: object; name?: string; }): Promise; /** * * @param {string} id - * @param {string} channelId - * @param {string} currency - ISO 4217 code. * @param {object} metadata - Free-form metadata. * @param {string} name - * @throws {RevenexxException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. */ cartsUpdate(id: string, channelId?: string, currency?: string, metadata?: object, name?: string): Promise; /** * * @param {string} params.id - * @throws {RevenexxException} * @returns {Promise} */ cartsAbandon(params: { id: string; }): Promise; /** * * @param {string} id - * @throws {RevenexxException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. */ cartsAbandon(id: string): Promise; /** * * @param {string} params.id - * @throws {RevenexxException} * @returns {Promise} */ cartsActivate(params: { id: string; }): Promise; /** * * @param {string} id - * @throws {RevenexxException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. */ cartsActivate(id: string): Promise; /** * * @param {string} params.id - * @param {CartExportFormat} params.format - Ad-hoc export format (only without profile_id). * @param {string} params.profileId - Export profile to run; ad-hoc JSON/CSV export when omitted. * @throws {RevenexxException} * @returns {Promise<{}>} */ cartsExport(params: { id: string; format?: CartExportFormat; profileId?: string; }): Promise<{}>; /** * * @param {string} id - * @param {CartExportFormat} format - Ad-hoc export format (only without profile_id). * @param {string} profileId - Export profile to run; ad-hoc JSON/CSV export when omitted. * @throws {RevenexxException} * @returns {Promise<{}>} * @deprecated Use the object parameter style method for a better developer experience. */ cartsExport(id: string, format?: CartExportFormat, profileId?: string): Promise<{}>; /** * * @param {string} params.id - * @param {string} params.orderRef - External order reference from order management. * @throws {RevenexxException} * @returns {Promise} */ cartsOrder(params: { id: string; orderRef?: string; }): Promise; /** * * @param {string} id - * @param {string} orderRef - External order reference from order management. * @throws {RevenexxException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. */ cartsOrder(id: string, orderRef?: string): Promise; /** * * @param {string} params.id - * @throws {RevenexxException} * @returns {Promise} */ cartsReopen(params: { id: string; }): Promise; /** * * @param {string} id - * @throws {RevenexxException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. */ cartsReopen(id: string): Promise; }