UNPKG

ordercloud-javascript-sdk

Version:

The offical Javascript SDK for the Ordercloud ecommerce API

629 lines 97.6 kB
import { MeUser } from '../models/MeUser'; import { ListPage } from '../models/ListPage'; import { Searchable } from '../models/Searchable'; import { Sortable } from '../models/Sortable'; import { Filters } from '../models/Filters'; import { BuyerAddress } from '../models/BuyerAddress'; import { Catalog } from '../models/Catalog'; import { Category } from '../models/Category'; import { CostCenter } from '../models/CostCenter'; import { BuyerCreditCard } from '../models/BuyerCreditCard'; import { GroupOrderInvitation } from '../models/GroupOrderInvitation'; import { Order } from '../models/Order'; import { SearchType } from '../models/SearchType'; import { TokenPasswordReset } from '../models/TokenPasswordReset'; import { ProductCollection } from '../models/ProductCollection'; import { ProductCollectionInvitation } from '../models/ProductCollectionInvitation'; import { ListPageWithFacets } from '../models/ListPageWithFacets'; import { ProductCollectionBuyerProduct } from '../models/ProductCollectionBuyerProduct'; import { ProductCollectionEntry } from '../models/ProductCollectionEntry'; import { BuyerProduct } from '../models/BuyerProduct'; import { InventoryRecord } from '../models/InventoryRecord'; import { ProductSeller } from '../models/ProductSeller'; import { Spec } from '../models/Spec'; import { Variant } from '../models/Variant'; import { Promotion } from '../models/Promotion'; import { AccessTokenBasic } from '../models/AccessTokenBasic'; import { BuyerSupplier } from '../models/BuyerSupplier'; import { Shipment } from '../models/Shipment'; import { ShipmentItem } from '../models/ShipmentItem'; import { SpendingAccount } from '../models/SpendingAccount'; import { Subscription } from '../models/Subscription'; import { LineItem } from '../models/LineItem'; import { BundleItems } from '../models/BundleItems'; import { UserGroup } from '../models/UserGroup'; import { PartialDeep } from '../models/PartialDeep'; import { RequiredDeep } from '../models/RequiredDeep'; import { RequestOptions } from '../models/RequestOptions'; declare class Me { private impersonating; /** * @ignore * not part of public api, don't include in generated docs */ constructor(); /** * Get the currently authenticated user * Check out the {@link https://ordercloud.io/api-reference/me-and-my-stuff/me/get|api docs} for more info * * @param requestOptions.accessToken Provide an alternative token to the one stored in the sdk instance (useful for impersonation). * @param requestOptions.cancelToken Provide an [axios cancelToken](https://github.com/axios/axios#cancellation) that can be used to cancel the request. * @param requestOptions.requestType Provide a value that can be used to identify the type of request. Useful for error logs. */ Get<TMeUser extends MeUser>(requestOptions?: RequestOptions): Promise<RequiredDeep<TMeUser>>; /** * Update the currently authenticated user If an object with the same ID already exists, it will be overwritten. * Check out the {@link https://ordercloud.io/api-reference/me-and-my-stuff/me/save|api docs} for more info * * @param meUser Required fields: Username, FirstName, LastName, Email, Active * @param requestOptions.accessToken Provide an alternative token to the one stored in the sdk instance (useful for impersonation). * @param requestOptions.cancelToken Provide an [axios cancelToken](https://github.com/axios/axios#cancellation) that can be used to cancel the request. * @param requestOptions.requestType Provide a value that can be used to identify the type of request. Useful for error logs. */ Save<TMeUser extends MeUser>(meUser: MeUser, requestOptions?: RequestOptions): Promise<RequiredDeep<TMeUser>>; /** * Patch the currently authenticated user * Check out the {@link https://ordercloud.io/api-reference/me-and-my-stuff/me/patch|api docs} for more info * * @param meUser * @param requestOptions.accessToken Provide an alternative token to the one stored in the sdk instance (useful for impersonation). * @param requestOptions.cancelToken Provide an [axios cancelToken](https://github.com/axios/axios#cancellation) that can be used to cancel the request. * @param requestOptions.requestType Provide a value that can be used to identify the type of request. Useful for error logs. */ Patch<TMeUser extends MeUser>(meUser: PartialDeep<MeUser>, requestOptions?: RequestOptions): Promise<RequiredDeep<TMeUser>>; /** * List addresses visible to this user Only available to Buyer Users. * Check out the {@link https://ordercloud.io/api-reference/me-and-my-stuff/me/list-addresses|api docs} for more info * * @param listOptions.search Word or phrase to search for. * @param listOptions.searchOn Comma-delimited list of fields to search on. * @param listOptions.sortBy Comma-delimited list of fields to sort by. * @param listOptions.page Page of results to return. When paginating through many items (> page 30), we recommend the "Last ID" method, as outlined in the Advanced Querying documentation. * @param listOptions.pageSize Number of results to return per page. * @param listOptions.filters An object or dictionary representing key/value pairs to apply as filters. Valid keys are top-level properties of the returned model or 'xp.???' * @param requestOptions.accessToken Provide an alternative token to the one stored in the sdk instance (useful for impersonation). * @param requestOptions.cancelToken Provide an [axios cancelToken](https://github.com/axios/axios#cancellation) that can be used to cancel the request. * @param requestOptions.requestType Provide a value that can be used to identify the type of request. Useful for error logs. */ ListAddresses<TBuyerAddress extends BuyerAddress>(listOptions?: { search?: string; searchOn?: Searchable<'Me.ListAddresses'>; sortBy?: Sortable<'Me.ListAddresses'>; page?: number; pageSize?: number; filters?: Filters; }, requestOptions?: RequestOptions): Promise<RequiredDeep<ListPage<TBuyerAddress>>>; /** * Create an address Only available to Buyer Users. Addresses created using this endpoint are considered private, and only accessible to the user who created them. * Check out the {@link https://ordercloud.io/api-reference/me-and-my-stuff/me/create-address|api docs} for more info * * @param buyerAddress Required fields: Street1, City, Country * @param requestOptions.accessToken Provide an alternative token to the one stored in the sdk instance (useful for impersonation). * @param requestOptions.cancelToken Provide an [axios cancelToken](https://github.com/axios/axios#cancellation) that can be used to cancel the request. * @param requestOptions.requestType Provide a value that can be used to identify the type of request. Useful for error logs. */ CreateAddress<TBuyerAddress extends BuyerAddress>(buyerAddress: BuyerAddress, requestOptions?: RequestOptions): Promise<RequiredDeep<TBuyerAddress>>; /** * Retrieve an address Only available to Buyer Users. * Check out the {@link https://ordercloud.io/api-reference/me-and-my-stuff/me/get-address|api docs} for more info * * @param addressID ID of the address. * @param requestOptions.accessToken Provide an alternative token to the one stored in the sdk instance (useful for impersonation). * @param requestOptions.cancelToken Provide an [axios cancelToken](https://github.com/axios/axios#cancellation) that can be used to cancel the request. * @param requestOptions.requestType Provide a value that can be used to identify the type of request. Useful for error logs. */ GetAddress<TBuyerAddress extends BuyerAddress>(addressID: string, requestOptions?: RequestOptions): Promise<RequiredDeep<TBuyerAddress>>; /** * Update an address Only available to Buyer Users. * Check out the {@link https://ordercloud.io/api-reference/me-and-my-stuff/me/save-address|api docs} for more info * * @param addressID ID of the address. * @param buyerAddress Required fields: Street1, City, Country * @param requestOptions.accessToken Provide an alternative token to the one stored in the sdk instance (useful for impersonation). * @param requestOptions.cancelToken Provide an [axios cancelToken](https://github.com/axios/axios#cancellation) that can be used to cancel the request. * @param requestOptions.requestType Provide a value that can be used to identify the type of request. Useful for error logs. */ SaveAddress<TBuyerAddress extends BuyerAddress>(addressID: string, buyerAddress: BuyerAddress, requestOptions?: RequestOptions): Promise<RequiredDeep<TBuyerAddress>>; /** * Delete an address Only available to Buyer Users. * Check out the {@link https://ordercloud.io/api-reference/me-and-my-stuff/me/delete-address|api docs} for more info * * @param addressID ID of the address. * @param requestOptions.accessToken Provide an alternative token to the one stored in the sdk instance (useful for impersonation). * @param requestOptions.cancelToken Provide an [axios cancelToken](https://github.com/axios/axios#cancellation) that can be used to cancel the request. * @param requestOptions.requestType Provide a value that can be used to identify the type of request. Useful for error logs. */ DeleteAddress(addressID: string, requestOptions?: RequestOptions): Promise<void>; /** * Partially update an address Only available to Buyer Users. * Check out the {@link https://ordercloud.io/api-reference/me-and-my-stuff/me/patch-address|api docs} for more info * * @param addressID ID of the address. * @param buyerAddress * @param requestOptions.accessToken Provide an alternative token to the one stored in the sdk instance (useful for impersonation). * @param requestOptions.cancelToken Provide an [axios cancelToken](https://github.com/axios/axios#cancellation) that can be used to cancel the request. * @param requestOptions.requestType Provide a value that can be used to identify the type of request. Useful for error logs. */ PatchAddress(addressID: string, buyerAddress: PartialDeep<BuyerAddress>, requestOptions?: RequestOptions): Promise<void>; /** * List catalogs visible to this user Only available to Buyer Users. * Check out the {@link https://ordercloud.io/api-reference/me-and-my-stuff/me/list-catalogs|api docs} for more info * * @param listOptions.search Word or phrase to search for. * @param listOptions.searchOn Comma-delimited list of fields to search on. * @param listOptions.sortBy Comma-delimited list of fields to sort by. * @param listOptions.page Page of results to return. When paginating through many items (> page 30), we recommend the "Last ID" method, as outlined in the Advanced Querying documentation. * @param listOptions.pageSize Number of results to return per page. * @param listOptions.filters An object or dictionary representing key/value pairs to apply as filters. Valid keys are top-level properties of the returned model or 'xp.???' * @param listOptions.sellerID ID of the seller. * @param requestOptions.accessToken Provide an alternative token to the one stored in the sdk instance (useful for impersonation). * @param requestOptions.cancelToken Provide an [axios cancelToken](https://github.com/axios/axios#cancellation) that can be used to cancel the request. * @param requestOptions.requestType Provide a value that can be used to identify the type of request. Useful for error logs. */ ListCatalogs<TCatalog extends Catalog>(listOptions?: { search?: string; searchOn?: Searchable<'Me.ListCatalogs'>; sortBy?: Sortable<'Me.ListCatalogs'>; page?: number; pageSize?: number; filters?: Filters; sellerID?: string; }, requestOptions?: RequestOptions): Promise<RequiredDeep<ListPage<TCatalog>>>; /** * Retrieve a catalog Only available to Buyer Users. * Check out the {@link https://ordercloud.io/api-reference/me-and-my-stuff/me/get-catalog|api docs} for more info * * @param catalogID ID of the catalog. * @param requestOptions.accessToken Provide an alternative token to the one stored in the sdk instance (useful for impersonation). * @param requestOptions.cancelToken Provide an [axios cancelToken](https://github.com/axios/axios#cancellation) that can be used to cancel the request. * @param requestOptions.requestType Provide a value that can be used to identify the type of request. Useful for error logs. */ GetCatalog<TCatalog extends Catalog>(catalogID: string, requestOptions?: RequestOptions): Promise<RequiredDeep<TCatalog>>; /** * List categories visible to this user Only available to Buyer Users. * Check out the {@link https://ordercloud.io/api-reference/me-and-my-stuff/me/list-categories|api docs} for more info * * @param listOptions.depth Indicates how deep down the hierarchy to return results. Valid values are a number of 1 or greater, or 'all'. Relative to ParentID if specified. Default is 1. * @param listOptions.catalogID The user’s default CatalogID will be used to return categories if you do not pass another CatalogID explicitly. Listing categories across multiple catalogs is not supported. * @param listOptions.productID ID of the product. * @param listOptions.search Word or phrase to search for. * @param listOptions.searchOn Comma-delimited list of fields to search on. * @param listOptions.sortBy Comma-delimited list of fields to sort by. * @param listOptions.page Page of results to return. When paginating through many items (> page 30), we recommend the "Last ID" method, as outlined in the Advanced Querying documentation. * @param listOptions.pageSize Number of results to return per page. * @param listOptions.filters An object or dictionary representing key/value pairs to apply as filters. Valid keys are top-level properties of the returned model or 'xp.???' * @param requestOptions.accessToken Provide an alternative token to the one stored in the sdk instance (useful for impersonation). * @param requestOptions.cancelToken Provide an [axios cancelToken](https://github.com/axios/axios#cancellation) that can be used to cancel the request. * @param requestOptions.requestType Provide a value that can be used to identify the type of request. Useful for error logs. */ ListCategories<TCategory extends Category>(listOptions?: { depth?: string; catalogID?: string; productID?: string; search?: string; searchOn?: Searchable<'Me.ListCategories'>; sortBy?: Sortable<'Me.ListCategories'>; page?: number; pageSize?: number; filters?: Filters; }, requestOptions?: RequestOptions): Promise<RequiredDeep<ListPage<TCategory>>>; /** * Retrieve a category Only available to Buyer Users. * Check out the {@link https://ordercloud.io/api-reference/me-and-my-stuff/me/get-category|api docs} for more info * * @param categoryID ID of the category. * @param listOptions.catalogID ID of the catalog. * @param requestOptions.accessToken Provide an alternative token to the one stored in the sdk instance (useful for impersonation). * @param requestOptions.cancelToken Provide an [axios cancelToken](https://github.com/axios/axios#cancellation) that can be used to cancel the request. * @param requestOptions.requestType Provide a value that can be used to identify the type of request. Useful for error logs. */ GetCategory<TCategory extends Category>(categoryID: string, listOptions?: { catalogID?: string; }, requestOptions?: RequestOptions): Promise<RequiredDeep<TCategory>>; /** * List cost centers visible to this user Only available to Buyer Users. * Check out the {@link https://ordercloud.io/api-reference/me-and-my-stuff/me/list-cost-centers|api docs} for more info * * @param listOptions.search Word or phrase to search for. * @param listOptions.searchOn Comma-delimited list of fields to search on. * @param listOptions.sortBy Comma-delimited list of fields to sort by. * @param listOptions.page Page of results to return. When paginating through many items (> page 30), we recommend the "Last ID" method, as outlined in the Advanced Querying documentation. * @param listOptions.pageSize Number of results to return per page. * @param listOptions.filters An object or dictionary representing key/value pairs to apply as filters. Valid keys are top-level properties of the returned model or 'xp.???' * @param requestOptions.accessToken Provide an alternative token to the one stored in the sdk instance (useful for impersonation). * @param requestOptions.cancelToken Provide an [axios cancelToken](https://github.com/axios/axios#cancellation) that can be used to cancel the request. * @param requestOptions.requestType Provide a value that can be used to identify the type of request. Useful for error logs. */ ListCostCenters<TCostCenter extends CostCenter>(listOptions?: { search?: string; searchOn?: Searchable<'Me.ListCostCenters'>; sortBy?: Sortable<'Me.ListCostCenters'>; page?: number; pageSize?: number; filters?: Filters; }, requestOptions?: RequestOptions): Promise<RequiredDeep<ListPage<TCostCenter>>>; /** * List credit cards visible to this user Only available to Buyer Users. * Check out the {@link https://ordercloud.io/api-reference/me-and-my-stuff/me/list-credit-cards|api docs} for more info * * @param listOptions.search Word or phrase to search for. * @param listOptions.searchOn Comma-delimited list of fields to search on. * @param listOptions.sortBy Comma-delimited list of fields to sort by. * @param listOptions.page Page of results to return. When paginating through many items (> page 30), we recommend the "Last ID" method, as outlined in the Advanced Querying documentation. * @param listOptions.pageSize Number of results to return per page. * @param listOptions.filters An object or dictionary representing key/value pairs to apply as filters. Valid keys are top-level properties of the returned model or 'xp.???' * @param requestOptions.accessToken Provide an alternative token to the one stored in the sdk instance (useful for impersonation). * @param requestOptions.cancelToken Provide an [axios cancelToken](https://github.com/axios/axios#cancellation) that can be used to cancel the request. * @param requestOptions.requestType Provide a value that can be used to identify the type of request. Useful for error logs. */ ListCreditCards<TBuyerCreditCard extends BuyerCreditCard>(listOptions?: { search?: string; searchOn?: Searchable<'Me.ListCreditCards'>; sortBy?: Sortable<'Me.ListCreditCards'>; page?: number; pageSize?: number; filters?: Filters; }, requestOptions?: RequestOptions): Promise<RequiredDeep<ListPage<TBuyerCreditCard>>>; /** * Create a credit card Only available to Buyer Users. Credit Cards created using this endpoint are considered private, and only accessible to the user who created them. * Check out the {@link https://ordercloud.io/api-reference/me-and-my-stuff/me/create-credit-card|api docs} for more info * * @param buyerCreditCard * @param requestOptions.accessToken Provide an alternative token to the one stored in the sdk instance (useful for impersonation). * @param requestOptions.cancelToken Provide an [axios cancelToken](https://github.com/axios/axios#cancellation) that can be used to cancel the request. * @param requestOptions.requestType Provide a value that can be used to identify the type of request. Useful for error logs. */ CreateCreditCard<TBuyerCreditCard extends BuyerCreditCard>(buyerCreditCard: BuyerCreditCard, requestOptions?: RequestOptions): Promise<RequiredDeep<TBuyerCreditCard>>; /** * Retrieve a credit card Only available to Buyer Users. * Check out the {@link https://ordercloud.io/api-reference/me-and-my-stuff/me/get-credit-card|api docs} for more info * * @param creditcardID ID of the creditcard. * @param requestOptions.accessToken Provide an alternative token to the one stored in the sdk instance (useful for impersonation). * @param requestOptions.cancelToken Provide an [axios cancelToken](https://github.com/axios/axios#cancellation) that can be used to cancel the request. * @param requestOptions.requestType Provide a value that can be used to identify the type of request. Useful for error logs. */ GetCreditCard<TBuyerCreditCard extends BuyerCreditCard>(creditcardID: string, requestOptions?: RequestOptions): Promise<RequiredDeep<TBuyerCreditCard>>; /** * Update a credit card Only available to Buyer Users. * Check out the {@link https://ordercloud.io/api-reference/me-and-my-stuff/me/save-credit-card|api docs} for more info * * @param creditcardID ID of the creditcard. * @param buyerCreditCard * @param requestOptions.accessToken Provide an alternative token to the one stored in the sdk instance (useful for impersonation). * @param requestOptions.cancelToken Provide an [axios cancelToken](https://github.com/axios/axios#cancellation) that can be used to cancel the request. * @param requestOptions.requestType Provide a value that can be used to identify the type of request. Useful for error logs. */ SaveCreditCard<TBuyerCreditCard extends BuyerCreditCard>(creditcardID: string, buyerCreditCard: BuyerCreditCard, requestOptions?: RequestOptions): Promise<RequiredDeep<TBuyerCreditCard>>; /** * Delete a credit card Only available to Buyer Users. * Check out the {@link https://ordercloud.io/api-reference/me-and-my-stuff/me/delete-credit-card|api docs} for more info * * @param creditcardID ID of the creditcard. * @param requestOptions.accessToken Provide an alternative token to the one stored in the sdk instance (useful for impersonation). * @param requestOptions.cancelToken Provide an [axios cancelToken](https://github.com/axios/axios#cancellation) that can be used to cancel the request. * @param requestOptions.requestType Provide a value that can be used to identify the type of request. Useful for error logs. */ DeleteCreditCard(creditcardID: string, requestOptions?: RequestOptions): Promise<void>; /** * Partially update a credit card Only available to Buyer Users. * Check out the {@link https://ordercloud.io/api-reference/me-and-my-stuff/me/patch-credit-card|api docs} for more info * * @param creditcardID ID of the creditcard. * @param buyerCreditCard * @param requestOptions.accessToken Provide an alternative token to the one stored in the sdk instance (useful for impersonation). * @param requestOptions.cancelToken Provide an [axios cancelToken](https://github.com/axios/axios#cancellation) that can be used to cancel the request. * @param requestOptions.requestType Provide a value that can be used to identify the type of request. Useful for error logs. */ PatchCreditCard(creditcardID: string, buyerCreditCard: PartialDeep<BuyerCreditCard>, requestOptions?: RequestOptions): Promise<void>; /** * List group order invitations visible to this user * Check out the {@link https://ordercloud.io/api-reference/me-and-my-stuff/me/list-group-order-invitations|api docs} for more info * * @param listOptions.search Word or phrase to search for. * @param listOptions.searchOn Comma-delimited list of fields to search on. * @param listOptions.sortBy Comma-delimited list of fields to sort by. * @param listOptions.page Page of results to return. When paginating through many items (> page 30), we recommend the "Last ID" method, as outlined in the Advanced Querying documentation. * @param listOptions.pageSize Number of results to return per page. * @param listOptions.filters An object or dictionary representing key/value pairs to apply as filters. Valid keys are top-level properties of the returned model or 'xp.???' * @param requestOptions.accessToken Provide an alternative token to the one stored in the sdk instance (useful for impersonation). * @param requestOptions.cancelToken Provide an [axios cancelToken](https://github.com/axios/axios#cancellation) that can be used to cancel the request. * @param requestOptions.requestType Provide a value that can be used to identify the type of request. Useful for error logs. */ ListGroupOrderInvitations<TGroupOrderInvitation extends GroupOrderInvitation>(listOptions?: { search?: string; searchOn?: Searchable<'Me.ListGroupOrderInvitations'>; sortBy?: Sortable<'Me.ListGroupOrderInvitations'>; page?: number; pageSize?: number; filters?: Filters; }, requestOptions?: RequestOptions): Promise<RequiredDeep<ListPage<TGroupOrderInvitation>>>; /** * Create a group order invitation A group order invitation allows other users to contribute to an existing order. Contributors may request an access token with the invitation ID that allows them to add line items and modify those line items. * Check out the {@link https://ordercloud.io/api-reference/me-and-my-stuff/me/create-group-order-invitation|api docs} for more info * * @param groupOrderInvitation Required fields: ExpirationDate, OrderID * @param requestOptions.accessToken Provide an alternative token to the one stored in the sdk instance (useful for impersonation). * @param requestOptions.cancelToken Provide an [axios cancelToken](https://github.com/axios/axios#cancellation) that can be used to cancel the request. * @param requestOptions.requestType Provide a value that can be used to identify the type of request. Useful for error logs. */ CreateGroupOrderInvitation<TGroupOrderInvitation extends GroupOrderInvitation>(groupOrderInvitation: GroupOrderInvitation, requestOptions?: RequestOptions): Promise<RequiredDeep<TGroupOrderInvitation>>; /** * Retrieve a group order invitation * Check out the {@link https://ordercloud.io/api-reference/me-and-my-stuff/me/get-group-order-invitation|api docs} for more info * * @param invitationID ID of the invitation. * @param requestOptions.accessToken Provide an alternative token to the one stored in the sdk instance (useful for impersonation). * @param requestOptions.cancelToken Provide an [axios cancelToken](https://github.com/axios/axios#cancellation) that can be used to cancel the request. * @param requestOptions.requestType Provide a value that can be used to identify the type of request. Useful for error logs. */ GetGroupOrderInvitation<TGroupOrderInvitation extends GroupOrderInvitation>(invitationID: string, requestOptions?: RequestOptions): Promise<RequiredDeep<TGroupOrderInvitation>>; /** * Delete a group order invitation * Check out the {@link https://ordercloud.io/api-reference/me-and-my-stuff/me/delete-group-order-invitation|api docs} for more info * * @param invitationID ID of the invitation. * @param requestOptions.accessToken Provide an alternative token to the one stored in the sdk instance (useful for impersonation). * @param requestOptions.cancelToken Provide an [axios cancelToken](https://github.com/axios/axios#cancellation) that can be used to cancel the request. * @param requestOptions.requestType Provide a value that can be used to identify the type of request. Useful for error logs. */ DeleteGroupOrderInvitation(invitationID: string, requestOptions?: RequestOptions): Promise<void>; /** * Partially update a group order invitation * Check out the {@link https://ordercloud.io/api-reference/me-and-my-stuff/me/patch-group-order-invitation|api docs} for more info * * @param invitationID ID of the invitation. * @param groupOrderInvitation * @param requestOptions.accessToken Provide an alternative token to the one stored in the sdk instance (useful for impersonation). * @param requestOptions.cancelToken Provide an [axios cancelToken](https://github.com/axios/axios#cancellation) that can be used to cancel the request. * @param requestOptions.requestType Provide a value that can be used to identify the type of request. Useful for error logs. */ PatchGroupOrderInvitation<TGroupOrderInvitation extends GroupOrderInvitation>(invitationID: string, groupOrderInvitation: PartialDeep<GroupOrderInvitation>, requestOptions?: RequestOptions): Promise<RequiredDeep<TGroupOrderInvitation>>; /** * List orders visible to this user List orders created by this user. * Check out the {@link https://ordercloud.io/api-reference/me-and-my-stuff/me/list-orders|api docs} for more info * * @param listOptions.from Lower bound of date range that the order was created (if outgoing) or submitted (if incoming). * @param listOptions.to Upper bound of date range that the order was created (if outgoing) or submitted (if incoming). * @param listOptions.search Word or phrase to search for. * @param listOptions.searchOn Comma-delimited list of fields to search on. * @param listOptions.searchType Type of search to perform. * @param listOptions.sortBy Comma-delimited list of fields to sort by. * @param listOptions.page Page of results to return. When paginating through many items (> page 30), we recommend the "Last ID" method, as outlined in the Advanced Querying documentation. * @param listOptions.pageSize Number of results to return per page. * @param listOptions.filters An object or dictionary representing key/value pairs to apply as filters. Valid keys are top-level properties of the returned model or 'xp.???' * @param requestOptions.accessToken Provide an alternative token to the one stored in the sdk instance (useful for impersonation). * @param requestOptions.cancelToken Provide an [axios cancelToken](https://github.com/axios/axios#cancellation) that can be used to cancel the request. * @param requestOptions.requestType Provide a value that can be used to identify the type of request. Useful for error logs. */ ListOrders<TOrder extends Order>(listOptions?: { from?: string; to?: string; search?: string; searchOn?: Searchable<'Me.ListOrders'>; searchType?: SearchType; sortBy?: Sortable<'Me.ListOrders'>; page?: number; pageSize?: number; filters?: Filters; }, requestOptions?: RequestOptions): Promise<RequiredDeep<ListPage<TOrder>>>; /** * Transfer an anon user order If a user begins an order as the anonymous shopper and later logs in, use this endpoint to transfer that order to them. * Check out the {@link https://ordercloud.io/api-reference/me-and-my-stuff/me/transfer-anon-user-order|api docs} for more info * * @param listOptions.anonUserToken Anon user token of the me. * @param requestOptions.accessToken Provide an alternative token to the one stored in the sdk instance (useful for impersonation). * @param requestOptions.cancelToken Provide an [axios cancelToken](https://github.com/axios/axios#cancellation) that can be used to cancel the request. * @param requestOptions.requestType Provide a value that can be used to identify the type of request. Useful for error logs. */ TransferAnonUserOrder(listOptions?: { anonUserToken?: string; }, requestOptions?: RequestOptions): Promise<void>; /** * Get a list of orders that this user can approve * Check out the {@link https://ordercloud.io/api-reference/me-and-my-stuff/me/list-approvable-orders|api docs} for more info * * @param listOptions.from Lower bound of date range that the order was created (if outgoing) or submitted (if incoming). * @param listOptions.to Upper bound of date range that the order was created (if outgoing) or submitted (if incoming). * @param listOptions.search Word or phrase to search for. * @param listOptions.searchOn Comma-delimited list of fields to search on. * @param listOptions.sortBy Comma-delimited list of fields to sort by. * @param listOptions.page Page of results to return. When paginating through many items (> page 30), we recommend the "Last ID" method, as outlined in the Advanced Querying documentation. * @param listOptions.pageSize Number of results to return per page. * @param listOptions.filters An object or dictionary representing key/value pairs to apply as filters. Valid keys are top-level properties of the returned model or 'xp.???' * @param requestOptions.accessToken Provide an alternative token to the one stored in the sdk instance (useful for impersonation). * @param requestOptions.cancelToken Provide an [axios cancelToken](https://github.com/axios/axios#cancellation) that can be used to cancel the request. * @param requestOptions.requestType Provide a value that can be used to identify the type of request. Useful for error logs. */ ListApprovableOrders<TOrder extends Order>(listOptions?: { from?: string; to?: string; search?: string; searchOn?: Searchable<'Me.ListApprovableOrders'>; sortBy?: Sortable<'Me.ListApprovableOrders'>; page?: number; pageSize?: number; filters?: Filters; }, requestOptions?: RequestOptions): Promise<RequiredDeep<ListPage<TOrder>>>; /** * Reset a password by token * Check out the {@link https://ordercloud.io/api-reference/me-and-my-stuff/me/reset-password-by-token|api docs} for more info * * @param tokenPasswordReset Required fields: NewPassword * @param requestOptions.accessToken Provide an alternative token to the one stored in the sdk instance (useful for impersonation). * @param requestOptions.cancelToken Provide an [axios cancelToken](https://github.com/axios/axios#cancellation) that can be used to cancel the request. * @param requestOptions.requestType Provide a value that can be used to identify the type of request. Useful for error logs. */ ResetPasswordByToken(tokenPasswordReset: TokenPasswordReset, requestOptions?: RequestOptions): Promise<void>; /** * List product collections visible to this user Only available to Buyer Users. * Check out the {@link https://ordercloud.io/api-reference/me-and-my-stuff/me/list-product-collections|api docs} for more info * * @param listOptions.search Word or phrase to search for. * @param listOptions.searchOn Comma-delimited list of fields to search on. * @param listOptions.sortBy Comma-delimited list of fields to sort by. * @param listOptions.page Page of results to return. When paginating through many items (> page 30), we recommend the "Last ID" method, as outlined in the Advanced Querying documentation. * @param listOptions.pageSize Number of results to return per page. * @param listOptions.filters An object or dictionary representing key/value pairs to apply as filters. Valid keys are top-level properties of the returned model or 'xp.???' * @param requestOptions.accessToken Provide an alternative token to the one stored in the sdk instance (useful for impersonation). * @param requestOptions.cancelToken Provide an [axios cancelToken](https://github.com/axios/axios#cancellation) that can be used to cancel the request. * @param requestOptions.requestType Provide a value that can be used to identify the type of request. Useful for error logs. */ ListProductCollections<TProductCollection extends ProductCollection>(listOptions?: { search?: string; searchOn?: Searchable<'Me.ListProductCollections'>; sortBy?: Sortable<'Me.ListProductCollections'>; page?: number; pageSize?: number; filters?: Filters; }, requestOptions?: RequestOptions): Promise<RequiredDeep<ListPage<TProductCollection>>>; /** * Create a product collection Only available to Buyer Users. * Check out the {@link https://ordercloud.io/api-reference/me-and-my-stuff/me/create-product-collection|api docs} for more info * * @param productCollection Required fields: Name * @param requestOptions.accessToken Provide an alternative token to the one stored in the sdk instance (useful for impersonation). * @param requestOptions.cancelToken Provide an [axios cancelToken](https://github.com/axios/axios#cancellation) that can be used to cancel the request. * @param requestOptions.requestType Provide a value that can be used to identify the type of request. Useful for error logs. */ CreateProductCollection<TProductCollection extends ProductCollection>(productCollection: ProductCollection, requestOptions?: RequestOptions): Promise<RequiredDeep<TProductCollection>>; /** * Retrieve a product collection Only available to Buyer Users. * Check out the {@link https://ordercloud.io/api-reference/me-and-my-stuff/me/get-product-collection|api docs} for more info * * @param productCollectionID ID of the product collection. * @param requestOptions.accessToken Provide an alternative token to the one stored in the sdk instance (useful for impersonation). * @param requestOptions.cancelToken Provide an [axios cancelToken](https://github.com/axios/axios#cancellation) that can be used to cancel the request. * @param requestOptions.requestType Provide a value that can be used to identify the type of request. Useful for error logs. */ GetProductCollection<TProductCollection extends ProductCollection>(productCollectionID: string, requestOptions?: RequestOptions): Promise<RequiredDeep<TProductCollection>>; /** * Create or update a product collection Only available to Buyer Users. * Check out the {@link https://ordercloud.io/api-reference/me-and-my-stuff/me/save-product-collection|api docs} for more info * * @param productCollectionID ID of the product collection. * @param productCollection Required fields: Name * @param requestOptions.accessToken Provide an alternative token to the one stored in the sdk instance (useful for impersonation). * @param requestOptions.cancelToken Provide an [axios cancelToken](https://github.com/axios/axios#cancellation) that can be used to cancel the request. * @param requestOptions.requestType Provide a value that can be used to identify the type of request. Useful for error logs. */ SaveProductCollection<TProductCollection extends ProductCollection>(productCollectionID: string, productCollection: ProductCollection, requestOptions?: RequestOptions): Promise<RequiredDeep<TProductCollection>>; /** * Delete a product collection Only available to Buyer Users. * Check out the {@link https://ordercloud.io/api-reference/me-and-my-stuff/me/delete-product-collection|api docs} for more info * * @param productCollectionID ID of the product collection. * @param requestOptions.accessToken Provide an alternative token to the one stored in the sdk instance (useful for impersonation). * @param requestOptions.cancelToken Provide an [axios cancelToken](https://github.com/axios/axios#cancellation) that can be used to cancel the request. * @param requestOptions.requestType Provide a value that can be used to identify the type of request. Useful for error logs. */ DeleteProductCollection(productCollectionID: string, requestOptions?: RequestOptions): Promise<void>; /** * Partially update a product collection Only available to Buyer Users. * Check out the {@link https://ordercloud.io/api-reference/me-and-my-stuff/me/patch-product-collection|api docs} for more info * * @param productCollectionID ID of the product collection. * @param productCollection * @param requestOptions.accessToken Provide an alternative token to the one stored in the sdk instance (useful for impersonation). * @param requestOptions.cancelToken Provide an [axios cancelToken](https://github.com/axios/axios#cancellation) that can be used to cancel the request. * @param requestOptions.requestType Provide a value that can be used to identify the type of request. Useful for error logs. */ PatchProductCollection<TProductCollection extends ProductCollection>(productCollectionID: string, productCollection: PartialDeep<ProductCollection>, requestOptions?: RequestOptions): Promise<RequiredDeep<TProductCollection>>; /** * Create a product collection entry Only available to Buyer Users. * Check out the {@link https://ordercloud.io/api-reference/me-and-my-stuff/me/create-product-collection-entry|api docs} for more info * * @param productCollectionID ID of the product collection. * @param productID ID of the product. * @param requestOptions.accessToken Provide an alternative token to the one stored in the sdk instance (useful for impersonation). * @param requestOptions.cancelToken Provide an [axios cancelToken](https://github.com/axios/axios#cancellation) that can be used to cancel the request. * @param requestOptions.requestType Provide a value that can be used to identify the type of request. Useful for error logs. */ CreateProductCollectionEntry(productCollectionID: string, productID: string, requestOptions?: RequestOptions): Promise<void>; /** * Delete a product collection entry Only available to Buyer Users. * Check out the {@link https://ordercloud.io/api-reference/me-and-my-stuff/me/delete-product-collection-entry|api docs} for more info * * @param productCollectionID ID of the product collection. * @param productID ID of the product. * @param requestOptions.accessToken Provide an alternative token to the one stored in the sdk instance (useful for impersonation). * @param requestOptions.cancelToken Provide an [axios cancelToken](https://github.com/axios/axios#cancellation) that can be used to cancel the request. * @param requestOptions.requestType Provide a value that can be used to identify the type of request. Useful for error logs. */ DeleteProductCollectionEntry(productCollectionID: string, productID: string, requestOptions?: RequestOptions): Promise<void>; /** * List product collection invitations visible to this user Only available to Buyer Users. * Check out the {@link https://ordercloud.io/api-reference/me-and-my-stuff/me/list-product-collection-invitations|api docs} for more info * * @param productCollectionID ID of the product collection. * @param listOptions.search Word or phrase to search for. * @param listOptions.searchOn Comma-delimited list of fields to search on. * @param listOptions.searchType Type of search to perform. * @param listOptions.sortBy Comma-delimited list of fields to sort by. * @param listOptions.page Page of results to return. When paginating through many items (> page 30), we recommend the "Last ID" method, as outlined in the Advanced Querying documentation. * @param listOptions.pageSize Number of results to return per page. * @param listOptions.filters An object or dictionary representing key/value pairs to apply as filters. Valid keys are top-level properties of the returned model or 'xp.???' * @param requestOptions.accessToken Provide an alternative token to the one stored in the sdk instance (useful for impersonation). * @param requestOptions.cancelToken Provide an [axios cancelToken](https://github.com/axios/axios#cancellation) that can be used to cancel the request. * @param requestOptions.requestType Provide a value that can be used to identify the type of request. Useful for error logs. */ ListProductCollectionInvitations<TProductCollectionInvitation extends ProductCollectionInvitation>(productCollectionID: string, listOptions?: { search?: string; searchOn?: Searchable<'Me.ListProductCollectionInvitations'>; searchType?: SearchType; sortBy?: Sortable<'Me.ListProductCollectionInvitations'>; page?: number; pageSize?: number; filters?: Filters; }, requestOptions?: RequestOptions): Promise<RequiredDeep<ListPage<TProductCollectionInvitation>>>; /** * Create a product collection invitation Only available to Buyer Users. * Check out the {@link https://ordercloud.io/api-reference/me-and-my-stuff/me/create-product-collection-invitation|api docs} for more info * * @param productCollectionID ID of the product collection. * @param productCollectionInvitation Required fields: Name * @param requestOptions.accessToken Provide an alternative token to the one stored in the sdk instance (useful for impersonation). * @param requestOptions.cancelToken Provide an [axios cancelToken](https://github.com/axios/axios#cancellation) that can be used to cancel the request. * @param requestOptions.requestType Provide a value that can be used to identify the type of request. Useful for error logs. */ CreateProductCollectionInvitation<TProductCollectionInvitation extends ProductCollectionInvitation>(productCollectionID: string, productCollectionInvitation: ProductCollectionInvitation, requestOptions?: RequestOptions): Promise<RequiredDeep<TProductCollectionInvitation>>; /** * Retrieve a product collection invitation Only available to Buyer Users. * Check out the {@link https://ordercloud.io/api-reference/me-and-my-stuff/me/get-product-collection-invitation|api docs} for more info * * @param productCollectionID ID of the product collection. * @param invitationID ID of the invitation. * @param requestOptions.accessToken Provide an alternative token to the one stored in the sdk instance (useful for impersonation). * @param requestOptions.cancelToken Provide an [axios cancelToken](https://github.com/axios/axios#cancellation) that can be used to cancel the request. * @param requestOptions.requestType Provide a value that can be used to identify the type of request. Useful for error logs. */ GetProductCollectionInvitation<TProductCollectionInvitation extends ProductCollectionInvitation>(productCollectionID: string, invitationID: string, requestOptions?: RequestOptions): Promise<RequiredDeep<TProductCollectionInvitation>>; /** * Delete a product collection invitation Only available to Buyer Users. * Check out the {@link https://ordercloud.io/api-reference/me-and-my-stuff/me/delete-product-collection-invitation|api docs} for more info * * @param productCollectionID ID of the product collection. * @param invitationID ID of the invitation. * @param requestOptions.accessToken Provide an alternative token to the one stored in the sdk instance (useful for impersonation). * @param requestOptions.cancelToken Provide an [axios cancelToken](https://github.com/axios/axios#cancellation) that can be used to cancel the request. * @param requestOptions.requestType Provide a value that can be used to identify the type of request. Useful for error logs. */ DeleteProductCollectionInvitation(productCollectionID: string, invitationID: string, requestOptions?: RequestOptions): Promise<void>; /** * Partially update a product collection invitation Only available to Buyer Users. * Check out the {@link https://ordercloud.io/api-reference/me-and-my-stuff/me/patch-product-collection-invitation|api docs} for more info * * @param productCollectionID ID of the product collection. * @param invitationID ID of the invitation. * @param productCollectionInvitation * @param requestOptions.accessToken Provide an alternative token to the one stored in the sdk instance (useful for impersonation). * @param requestOptions.cancelToken Provide an [axios cancelToken](https://github.com/axios/axios#cancellation) that can be used to cancel the request. * @param requestOptions.requestType Provide a value that can be used to identify the type of request. Useful for error logs. */ PatchProductCollectionInvitation<TProductCollectionInvitation extends ProductCollectionInvitation>(productCollectionID: string, invitationID: string, productCollectionInvitation: PartialDeep<ProductCollectionInvitation>, requestOptions?: RequestOptions): Promise<RequiredDeep<TProductCollectionInvitation>>; /** * Accept a product collection invitation * Check out the {@link https://ordercloud.io/api-reference/me-and-my-stuff/me/accept-product-collection-invitation|api docs} for more info * * @param productCollectionID ID of the product collection. * @param invitationID ID of the inv