import { HttpClient, HttpHeaders, HttpResponse, HttpEvent, HttpParameterCodec, HttpContext } from '@angular/common/http'; import { Observable } from 'rxjs'; import { AddItemRequest } from '../model/addItemRequest'; import { AttachCustomerRequest } from '../model/attachCustomerRequest'; import { BulkAddItemsRequest } from '../model/bulkAddItemsRequest'; import { CartResponse } from '../model/cartResponse'; import { RemoveItemRequest } from '../model/removeItemRequest'; import { UpdateCustomerDetailRequest } from '../model/updateCustomerDetailRequest'; import { UpdateItemQuantityRequest } from '../model/updateItemQuantityRequest'; import { UpdateStatusRequest } from '../model/updateStatusRequest'; import { Configuration } from '../configuration'; import * as i0 from "@angular/core"; export declare class CartService { protected httpClient: HttpClient; protected basePath: string; defaultHeaders: HttpHeaders; configuration: Configuration; encoder: HttpParameterCodec; constructor(httpClient: HttpClient, basePath: string, configuration: Configuration); private addToHttpParams; private addToHttpParamsRecursive; /** * Add Item * adds an item to cart * @param cartId the cart UUID * @param body add item to cart * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ addItem(cartId: string, body: AddItemRequest, observe?: 'body', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; }): Observable; addItem(cartId: string, body: AddItemRequest, observe?: 'response', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; }): Observable>; addItem(cartId: string, body: AddItemRequest, observe?: 'events', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; }): Observable>; /** * Attach Customer * attaches a customer to the cart by email * @param cartId the cart UUID * @param body attach customer * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ attachCustomer(cartId: string, body: AttachCustomerRequest, observe?: 'body', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; }): Observable; attachCustomer(cartId: string, body: AttachCustomerRequest, observe?: 'response', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; }): Observable>; attachCustomer(cartId: string, body: AttachCustomerRequest, observe?: 'events', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; }): Observable>; /** * Bulk Add Item * adds multiple items at once to a cart * @param cartId the cart UUID * @param body bulk add items to cart * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ bulkAddItems(cartId: string, body: BulkAddItemsRequest, observe?: 'body', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; }): Observable; bulkAddItems(cartId: string, body: BulkAddItemsRequest, observe?: 'response', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; }): Observable>; bulkAddItems(cartId: string, body: BulkAddItemsRequest, observe?: 'events', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; }): Observable>; /** * Clear Cart * removes all cart items * @param cartId the cart UUID * @param body clear cart * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ clearCart(cartId: string, body: object, observe?: 'body', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; }): Observable; clearCart(cartId: string, body: object, observe?: 'response', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; }): Observable>; clearCart(cartId: string, body: object, observe?: 'events', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; }): Observable>; /** * Create Cart * creates a new shopping cart for the store declared in the request header * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ createCart(observe?: 'body', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; }): Observable; createCart(observe?: 'response', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; }): Observable>; createCart(observe?: 'events', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; }): Observable>; /** * Get By Cart Id * returns a cart from the database * @param cartId the cart UUID * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ getByCartId(cartId: string, observe?: 'body', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; }): Observable; getByCartId(cartId: string, observe?: 'response', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; }): Observable>; getByCartId(cartId: string, observe?: 'events', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; }): Observable>; /** * Get By Session Id * returns a cart from the session object * @param cartId the cart UUID * @param sessionId the cart session id * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ getBySessionId(cartId: string, sessionId: string, observe?: 'body', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; }): Observable; getBySessionId(cartId: string, sessionId: string, observe?: 'response', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; }): Observable>; getBySessionId(cartId: string, sessionId: string, observe?: 'events', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; }): Observable>; /** * Remove Item * removes a cart item * @param cartId the cart UUID * @param sku the item\'s sku * @param body remove item in cart * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ removeItem(cartId: string, sku: string, body: RemoveItemRequest, observe?: 'body', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; }): Observable; removeItem(cartId: string, sku: string, body: RemoveItemRequest, observe?: 'response', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; }): Observable>; removeItem(cartId: string, sku: string, body: RemoveItemRequest, observe?: 'events', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; }): Observable>; /** * Update Customer Detail * updates a cart\'s personal details * @param cartId the cart UUID * @param body update customer detail * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ updateCustomerDetail(cartId: string, body: UpdateCustomerDetailRequest, observe?: 'body', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; }): Observable; updateCustomerDetail(cartId: string, body: UpdateCustomerDetailRequest, observe?: 'response', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; }): Observable>; updateCustomerDetail(cartId: string, body: UpdateCustomerDetailRequest, observe?: 'events', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; }): Observable>; /** * Update Item Quantity * updates an item\'s quantity * @param cartId the cart UUID * @param sku the item\'s sku * @param body update item quantity in cart * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ updateItemQuantity(cartId: string, sku: string, body: UpdateItemQuantityRequest, observe?: 'body', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; }): Observable; updateItemQuantity(cartId: string, sku: string, body: UpdateItemQuantityRequest, observe?: 'response', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; }): Observable>; updateItemQuantity(cartId: string, sku: string, body: UpdateItemQuantityRequest, observe?: 'events', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; }): Observable>; /** * Update Status * updates a cart\'s status to: unknown = 0, new = 1, checkout = 2, paid = 3, complete = 4, abandoned = 5 * @param cartId the cart UUID * @param body update status * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ updateStatus(cartId: string, body: UpdateStatusRequest, observe?: 'body', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; }): Observable; updateStatus(cartId: string, body: UpdateStatusRequest, observe?: 'response', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; }): Observable>; updateStatus(cartId: string, body: UpdateStatusRequest, observe?: 'events', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; }): Observable>; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; }