sap-commerce-sdk
Version:
A TypeScript SDK for SAP Commerce Cloud storefront integration.
1,755 lines (1,753 loc) • 366 kB
text/typescript
/* eslint-disable */
/* tslint:disable */
/*
* ---------------------------------------------------------------
* ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API ##
* ## ##
* ## AUTHOR: acacode ##
* ## SOURCE: https://github.com/acacode/swagger-typescript-api ##
* ---------------------------------------------------------------
*/
import {
AccountSummary,
Address,
AddressList,
AddressValidation,
AddToCartParams,
AnnualExpensesSummary,
ApplePayPayment,
ApplePayPaymentContact,
ApplePayPaymentRequest,
ApplePayShippingMethod,
ApplePayShippingMethodUpdate,
B2BApprovalProcessList,
B2BCostCenter,
B2BCostCenterList,
B2BPaymentTypeList,
B2BSelectionData,
B2BUnit,
B2BUnitNode,
B2BUnitNodeList,
BaseStore,
BasicnotificationPreferenceList,
Budget,
BudgetList,
CancellationRequestEntryInputList,
CardTypeList,
Cart,
CartGeneratorParameter,
CartList,
CartModification,
CartModificationList,
Catalog,
CatalogList,
CatalogVersion,
CategoryHierarchy,
CategorySpendSummary,
CDSConfiguration,
CMSPage,
CMSPageList,
Component,
ComponentIDList,
ComponentList,
ConsentTemplate,
ConsentTemplateList,
ConsignmentTracking,
Conversation,
ConversationList,
ConversationMessageList,
CountryList,
CouponRedemptionResponseList,
CreateComment,
CreateVerificationTokenInput,
CurrencyList,
CustomerCoupon2Customer,
CustomerCouponNotification,
CustomerCouponSearchResult,
CustomerInterestsSearchPage,
CxaiConfigData,
DeliveryMode,
DeliveryModeList,
EmarsysConfig,
EnumData,
ErrorList,
GdmCdpConfiguration,
GiftCard,
GiftCardList,
GiftCardPayment,
GigyaConfig,
GooglePayConfig,
GooglePayIntermediateAddress,
GooglePayResponsePayment,
GooglePayShippingMethodConfig,
GTMConfig,
Image,
LanguageList,
LocalizedLabel,
LoyaltyConfig,
LoyaltyPlanType,
MemberList,
MerchantSession,
MultiValueMapStringString,
MyRecipesSummary,
NestedFlexibleRuleData,
Notification,
NotificationList,
NotificationPreferenceList,
NutritionFacts,
Order,
OrderApproval,
OrderApprovalDecision,
OrderApprovalList,
OrderApprovalPermission,
OrderApprovalPermissionList,
OrderApprovalPermissionTypeList,
OrderEntry,
OrderEntryList,
OrderHistoryList,
OrderImproveParameter,
OrderStatusUpdateElementList,
OrgCustomerCreation,
OrgCustomerModification,
OrgDocumentList,
OrgUnitUserGroup,
OrgUnitUserGroupList,
OrgUnitUserList,
OrgUserRegistrationData,
PasswordRestoreTokenInput,
PaymentDetails,
PaymentDetailsList,
PaymentModeList,
PaymentRequest,
PickUpInStore,
PointOfService,
PointOfServiceList,
PPSCustomerLoyaltyCard,
PPSProductPrice,
Product,
ProductExpressUpdateElementList,
ProductFutureStocks,
ProductFutureStocksList,
ProductInterestRelation,
ProductList,
ProductReferenceList,
ProductSearchPage,
Promotion,
PromotionList,
PromotionResultList,
PropertyList,
PurchaseHistoryList,
PurchaseSummaryList,
QualtricsConfiguration,
Quote,
QuoteAction,
QuoteDiscount,
QuoteList,
QuoteMetadata,
QuoteStarter,
Recipe,
RegionList,
ReplaceLoginIdInput,
ReplacePasswordInput,
ReplenishmentEdit,
ReplenishmentOrder,
ReplenishmentOrderList,
ResetPassword,
ReturnRequest,
ReturnRequestEntryInputList,
ReturnRequestList,
ReturnRequestModification,
Review,
ReviewList,
SAPAccessCode,
SAPAccessCodePublicKey,
SAPAvailability,
SAPCustomerCouponOperationRequest,
SAPGuestUserRequest,
SAPInvoiceList,
SAPSavedCartRequest,
SAPVoucherOperationRequest,
SAPVoucherRequest,
SaveCartResult,
ScheduleReplenishmentForm,
SiteMessageSearchResult,
SopPaymentDetails,
StartSessionRequest,
Stock,
StoreCountList,
StoreFinderSearchPage,
StoreFinderStockSearchPage,
StoryBookItem,
StoryBookLayout,
Stylesheet,
SuggestionList,
Ticket,
TicketAssociatedObjectList,
TicketCategoryList,
TicketEvent,
TicketEventAttachment,
TicketList,
TicketStarter,
TitleList,
User,
UserGroup,
UserGroupList,
UserSignUp,
VerificationToken,
Voucher,
VoucherList,
WeeklyMealPlanner,
WeeklyMealPlannerDay,
} from "./data-contracts";
import { ContentType, HttpClient, RequestParams } from "./http-client";
export class BaseSiteId<SecurityDataType = unknown> extends HttpClient<SecurityDataType> {
/**
* @description Retrieves the public key used to verify the authenticity and integrity of the generated accessCode. AccessCodes are used to securely enable access to resources supporting the generation of an accessCode.
*
* @tags Access Code
* @name GetAccessCodePublicKey
* @summary Retrieves the public key to verify the access code.
* @request GET:/{baseSiteId}/accessCode/publicKey
* @secure
*/
getAccessCodePublicKey = (baseSiteId: string, params: RequestParams = {}) =>
this.request<SAPAccessCodePublicKey, ErrorList>({
path: `/${baseSiteId}/accessCode/publicKey`,
method: "GET",
secure: true,
format: "json",
...params,
});
/**
* No description
*
* @tags apple-pay-controller
* @name GetMerchantIdentifier
* @request GET:/{baseSiteId}/applepay/merchantIdentifier
* @secure
*/
getMerchantIdentifier = (baseSiteId: string, params: RequestParams = {}) =>
this.request<string, ErrorList>({
path: `/${baseSiteId}/applepay/merchantIdentifier`,
method: "GET",
secure: true,
format: "json",
...params,
});
/**
* No description
*
* @tags apple-pay-controller
* @name CreateSession
* @request POST:/{baseSiteId}/applepay/session/create
* @secure
*/
createSession = (baseSiteId: string, data: StartSessionRequest, params: RequestParams = {}) =>
this.request<MerchantSession, ErrorList>({
path: `/${baseSiteId}/applepay/session/create`,
method: "POST",
body: data,
secure: true,
type: ContentType.Json,
format: "json",
...params,
});
/**
* @description Retrieves the details of the base store.
*
* @tags Base Stores
* @name GetBaseStore
* @summary Retrieves a base store.
* @request GET:/{baseSiteId}/basestores/{baseStoreUid}
* @secure
*/
getBaseStore = (
baseSiteId: string,
baseStoreUid: string,
query?: {
/**
* Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
* @default "DEFAULT"
*/
fields?: string;
},
params: RequestParams = {},
) =>
this.request<BaseStore, ErrorList>({
path: `/${baseSiteId}/basestores/${baseStoreUid}`,
method: "GET",
query: query,
secure: true,
format: "json",
...params,
});
/**
* @description Retrieves the payment card types defined for the base store.
*
* @tags Miscs
* @name GetCardTypes
* @summary Retrieves a list of supported payment card types.
* @request GET:/{baseSiteId}/cardtypes
* @secure
*/
getCardTypes = (
baseSiteId: string,
query?: {
/**
* Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
* @default "DEFAULT"
*/
fields?: string;
},
params: RequestParams = {},
) =>
this.request<CardTypeList, ErrorList>({
path: `/${baseSiteId}/cardtypes`,
method: "GET",
query: query,
secure: true,
format: "json",
...params,
});
/**
* No description
*
* @tags Cart Generator Controller
* @name Generate1
* @request POST:/{baseSiteId}/cart-generator/generate
* @secure
*/
generate1 = (baseSiteId: string, data: CartGeneratorParameter, params: RequestParams = {}) =>
this.request<Record<string, string>, ErrorList>({
path: `/${baseSiteId}/cart-generator/generate`,
method: "POST",
body: data,
secure: true,
type: ContentType.Json,
format: "json",
...params,
});
/**
* No description
*
* @tags Catalogs
* @name GetCatalogs
* @summary Retrieves a list of catalogs.
* @request GET:/{baseSiteId}/catalogs
* @secure
*/
getCatalogs = (
baseSiteId: string,
query?: {
/**
* Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
* @default "DEFAULT"
*/
fields?: string;
},
params: RequestParams = {},
) =>
this.request<CatalogList, ErrorList>({
path: `/${baseSiteId}/catalogs`,
method: "GET",
query: query,
secure: true,
format: "json",
...params,
});
/**
* @description Retrieves information about the catalog using catalog identifier.
*
* @tags Catalogs
* @name GetCatalog
* @summary Retrieves a catalog.
* @request GET:/{baseSiteId}/catalogs/{catalogId}
* @secure
*/
getCatalog = (
baseSiteId: string,
catalogId: string,
query?: {
/**
* Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
* @default "DEFAULT"
*/
fields?: string;
},
params: RequestParams = {},
) =>
this.request<Catalog, ErrorList>({
path: `/${baseSiteId}/catalogs/${catalogId}`,
method: "GET",
query: query,
secure: true,
format: "json",
...params,
});
/**
* @description Retrieves information about the catalog version using catalog identifier and catalog version identifier.
*
* @tags Catalogs
* @name GetCatalogVersion
* @summary Retrieves information about the catalog version.
* @request GET:/{baseSiteId}/catalogs/{catalogId}/{catalogVersionId}
* @secure
*/
getCatalogVersion = (
baseSiteId: string,
catalogId: string,
catalogVersionId: string,
query?: {
/**
* Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
* @default "DEFAULT"
*/
fields?: string;
},
params: RequestParams = {},
) =>
this.request<CatalogVersion, ErrorList>({
path: `/${baseSiteId}/catalogs/${catalogId}/${catalogVersionId}`,
method: "GET",
query: query,
secure: true,
format: "json",
...params,
});
/**
* @description Retrieves information about the category that exists in a catalog version available.
*
* @tags Catalogs
* @name GetCategories
* @summary Retrieves information about the category.
* @request GET:/{baseSiteId}/catalogs/{catalogId}/{catalogVersionId}/categories/{categoryId}
* @secure
*/
getCategories = (
baseSiteId: string,
catalogId: string,
catalogVersionId: string,
categoryId: string,
query?: {
/**
* Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
* @default "DEFAULT"
*/
fields?: string;
},
params: RequestParams = {},
) =>
this.request<CategoryHierarchy, ErrorList>({
path: `/${baseSiteId}/catalogs/${catalogId}/${catalogVersionId}/categories/${categoryId}`,
method: "GET",
query: query,
secure: true,
format: "json",
...params,
});
/**
* @description Retrieves a list of products and related product search data, such as available facets, available sorting, and spelling suggestions, for a category. To enable spelling suggestions, you need to have indexed properties configured to be used for spell checking.
*
* @tags B2B Categories
* @name GetProductsByCategory
* @summary Retrieves a list of products for a category.
* @request GET:/{baseSiteId}/categories/{categoryId}/products
* @secure
*/
getProductsByCategory = (
baseSiteId: string,
categoryId: string,
query?: {
/**
* Current result page. Default value is 0.
* @format int32
* @default 0
*/
currentPage?: number;
/**
* Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
* @default "DEFAULT"
*/
fields?: string;
/**
* Number of results returned per page.
* @format int32
* @default 20
*/
pageSize?: number;
/** Formatted query string. It contains query criteria like free text search, facet. The format is <freeTextSearch>:<sort>:<facetKey1>:<facetValue1>:...:<facetKeyN>:<facetValueN>. */
query?: string;
/** Sorting method applied to the return results. */
sort?: string;
},
params: RequestParams = {},
) =>
this.request<ProductSearchPage, ErrorList>({
path: `/${baseSiteId}/categories/${categoryId}/products`,
method: "GET",
query: query,
secure: true,
format: "json",
...params,
});
/**
* No description
*
* @tags cds-configuration-controller
* @name GetCdsConfiguration1
* @request GET:/{baseSiteId}/cds/configuration
* @secure
*/
getCdsConfiguration1 = (baseSiteId: string, params: RequestParams = {}) =>
this.request<CDSConfiguration, ErrorList>({
path: `/${baseSiteId}/cds/configuration`,
method: "GET",
secure: true,
format: "json",
...params,
});
/**
* @description Retrieves the CMS components using the specified identifiers. If you don't provide any component identifiers, all of the components will be retrieved. The components list is filtered by the specified catalog, product, or category restrictions. The result is sorted according to the sort parameter.
*
* @tags Components
* @name GetComponentsByIds
* @summary Retrieves the component data.
* @request GET:/{baseSiteId}/cms/components
* @deprecated
* @secure
*/
getComponentsByIds = (
baseSiteId: string,
query?: {
/**
* Catalog code
* @example "electronics"
*/
catalogCode?: string;
/**
* Category code
* @example 576
*/
categoryCode?: string;
/**
* List of Component identifiers
* @example "FacebookLink,ContactUsLink"
*/
componentIds?: string[];
/**
* Current result page. Default value is 0.
* @format int32
* @default 0
*/
currentPage?: number;
/** Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC, DEFAULT, FULL. */
fields?: "BASIC" | "DEFAULT" | "FULL";
/**
* Number of results returned per page. Default value: 10.
* @format int32
* @default 10
*/
pageSize?: number;
/**
* Product code
* @example 553637
*/
productCode?: string;
/**
* Sorting method applied to the return results.
* @example "uid:asc"
*/
sort?: string;
},
params: RequestParams = {},
) =>
this.request<ComponentList, ErrorList>({
path: `/${baseSiteId}/cms/components`,
method: "GET",
query: query,
secure: true,
format: "json",
...params,
});
/**
* No description
*
* @tags Components
* @name SearchComponentsByIds
* @summary Retrieves the component data.
* @request POST:/{baseSiteId}/cms/components
* @deprecated
* @secure
*/
searchComponentsByIds = (
baseSiteId: string,
data: ComponentIDList,
query?: {
/**
* Catalog code
* @example "electronics"
*/
catalogCode?: string;
/**
* Category code
* @example 576
*/
categoryCode?: string;
/**
* Current result page. Default value is 0.
* @format int32
* @default 0
*/
currentPage?: number;
/** Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC, DEFAULT, FULL. */
fields?: "BASIC" | "DEFAULT" | "FULL";
/**
* Number of results returned per page. Default value: 10.
* @format int32
* @default 10
*/
pageSize?: number;
/**
* Product code
* @example 553637
*/
productCode?: string;
/**
* Sorting method applied to the return results.
* @example "uid:asc"
*/
sort?: string;
},
params: RequestParams = {},
) =>
this.request<ComponentList, ErrorList>({
path: `/${baseSiteId}/cms/components`,
method: "POST",
query: query,
body: data,
secure: true,
type: ContentType.Json,
format: "json",
...params,
});
/**
* @description Retrieves the CMS component data.
*
* @tags Components
* @name GetComponentById
* @summary Retrieves the component data.
* @request GET:/{baseSiteId}/cms/components/{componentId}
* @deprecated
* @secure
*/
getComponentById = (
baseSiteId: string,
componentId: string,
query?: {
/**
* Catalog code
* @example "electronics"
*/
catalogCode?: string;
/**
* Category code
* @example 576
*/
categoryCode?: string;
/** Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC, DEFAULT, FULL. */
fields?: "BASIC" | "DEFAULT" | "FULL";
/**
* Product code
* @example 553637
*/
productCode?: string;
},
params: RequestParams = {},
) =>
this.request<Component, ErrorList>({
path: `/${baseSiteId}/cms/components/${componentId}`,
method: "GET",
query: query,
secure: true,
format: "json",
...params,
});
/**
* @description Retrieves the page data and CMS content slots using the pageLabel/pageId or the code parameter. If you don't provide a value for one of these parameters, the homepage CMS content slots are retrieved. Content pages can be filtered using pageLabel/pageId while the other page types can be filtered using the specified code.
*
* @tags Pages
* @name GetPage
* @summary Retrieves the page data and the CMS content slots.
* @request GET:/{baseSiteId}/cms/pages
* @deprecated
* @secure
*/
getPage = (
baseSiteId: string,
query?: {
/** Page code. Examples: homepage, electronics, cameras, 585. */
code?: string;
/** Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC, DEFAULT, FULL. */
fields?: "BASIC" | "DEFAULT" | "FULL";
/**
* Page id. When pageId is provided, pageLabelOrId will be ignored.
* @example "cartPage"
*/
pageId?: string;
/**
* Page label. If no page has a label that matches the page label exactly, try to find pages whose label starts with a section of the page label.
* Note: URL encoding on the page label should be applied when the label contains special characters. When pageLabel is provided, pageLabelOrId will be ignored.
* @example "/cart"
*/
pageLabel?: string;
/**
* Page Label or Id. If no page has a label that matches the page label exactly, try to find pages whose label starts with a section of the page label. Otherwise, try to find the page by id.
* When label and ID values can match, passing in the pageId parameter may result in obtaining variation pages with the same pageLabel but different pageId. Therefore, it is advisable to use both the pageId and pageLabel parameters to ensure accuracy.Note: URL encoding on the page label should be applied when the label contains special characters.
* @deprecated
* @example "/cart"
*/
pageLabelOrId?: string;
/** Page type */
pageType?: "ContentPage" | "ProductPage" | "CategoryPage" | "CatalogPage";
},
params: RequestParams = {},
) =>
this.request<CMSPage, ErrorList>({
path: `/${baseSiteId}/cms/pages`,
method: "GET",
query: query,
secure: true,
format: "json",
...params,
});
/**
* @description Retrieves the page data and CMS content slots, each of which contains a list of CMS component data. The page identifier is required.
*
* @tags Pages
* @name GetPageById
* @summary Retrieves the page data and CMS content slots using the page identifier.
* @request GET:/{baseSiteId}/cms/pages/{pageId}
* @deprecated
* @secure
*/
getPageById = (
baseSiteId: string,
pageId: string,
query?: {
/**
* Category code
* @example 576
*/
categoryCode?: string;
/** Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC, DEFAULT, FULL. */
fields?: "BASIC" | "DEFAULT" | "FULL";
/**
* Product code
* @example 553637
*/
productCode?: string;
},
params: RequestParams = {},
) =>
this.request<CMSPage, ErrorList>({
path: `/${baseSiteId}/cms/pages/${pageId}`,
method: "GET",
query: query,
secure: true,
format: "json",
...params,
});
/**
* No description
*
* @tags Pages
* @name GetAllPages
* @summary Retrieves the page data.
* @request GET:/{baseSiteId}/cms/sitepages
* @deprecated
* @secure
*/
getAllPages = (
baseSiteId: string,
query?: {
/**
* Current result page. Default value is 0.
* @format int32
* @default 0
*/
currentPage?: number;
/** Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC, DEFAULT, FULL. */
fields?: "BASIC" | "DEFAULT" | "FULL";
/**
* Number of results returned per page. Default value: 10.
* @format int32
* @default 10
*/
pageSize?: number;
/** Page type. */
pageType?: "ContentPage" | "ProductPage" | "CategoryPage" | "CatalogPage";
/**
* Sorting method applied to the return results.
* @example "uid:asc"
*/
sort?: string;
},
params: RequestParams = {},
) =>
this.request<CMSPageList, ErrorList>({
path: `/${baseSiteId}/cms/sitepages`,
method: "GET",
query: query,
secure: true,
format: "json",
...params,
});
/**
* No description
*
* @tags B2B Cost Centers
* @name GetActiveCostCenters
* @summary Retrieves active cost centers.
* @request GET:/{baseSiteId}/costcenters
* @secure
*/
getActiveCostCenters = (
baseSiteId: string,
query?: {
/**
* Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
* @default "DEFAULT"
*/
fields?: string;
},
params: RequestParams = {},
) =>
this.request<B2BCostCenterList, ErrorList>({
path: `/${baseSiteId}/costcenters`,
method: "GET",
query: query,
secure: true,
format: "json",
...params,
});
/**
* No description
*
* @tags B2B Cost Centers
* @name CreateCostCenter
* @summary Creates a cost center.
* @request POST:/{baseSiteId}/costcenters
* @secure
*/
createCostCenter = (
baseSiteId: string,
data: B2BCostCenter,
query?: {
/**
* Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
* @default "DEFAULT"
*/
fields?: string;
},
params: RequestParams = {},
) =>
this.request<B2BCostCenter, ErrorList>({
path: `/${baseSiteId}/costcenters`,
method: "POST",
query: query,
body: data,
secure: true,
type: ContentType.Json,
format: "json",
...params,
});
/**
* @description Retrieves the cost center details.
*
* @tags B2B Cost Centers
* @name GetCostCenter
* @summary Retrieves the cost center.
* @request GET:/{baseSiteId}/costcenters/{costCenterCode}
* @secure
*/
getCostCenter = (
baseSiteId: string,
costCenterCode: string,
query?: {
/**
* Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
* @default "DEFAULT"
*/
fields?: string;
},
params: RequestParams = {},
) =>
this.request<B2BCostCenter, ErrorList>({
path: `/${baseSiteId}/costcenters/${costCenterCode}`,
method: "GET",
query: query,
secure: true,
format: "json",
...params,
});
/**
* @description Updates the cost center. Only the attributes provided in the request body will be changed.
*
* @tags B2B Cost Centers
* @name UpdateCostCenter
* @summary Updates the cost center.
* @request PATCH:/{baseSiteId}/costcenters/{costCenterCode}
* @secure
*/
updateCostCenter = (
baseSiteId: string,
costCenterCode: string,
data: B2BCostCenter,
query?: {
/**
* Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
* @default "DEFAULT"
*/
fields?: string;
},
params: RequestParams = {},
) =>
this.request<B2BCostCenter, ErrorList>({
path: `/${baseSiteId}/costcenters/${costCenterCode}`,
method: "PATCH",
query: query,
body: data,
secure: true,
type: ContentType.Json,
format: "json",
...params,
});
/**
* No description
*
* @tags B2B Cost Centers
* @name GetBudgetsForCostCenter
* @summary Retrieves all budgets and certain budgets associated with the specified cost center.
* @request GET:/{baseSiteId}/costcenters/{costCenterCode}/budgets
* @secure
*/
getBudgetsForCostCenter = (
baseSiteId: string,
costCenterCode: string,
query?: {
/**
* Current result page. Default value is 0.
* @format int32
* @default 0
*/
currentPage?: number;
/**
* Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
* @default "DEFAULT"
*/
fields?: string;
/**
* Number of results returned per page.
* @format int32
* @default 20
* @example 20
*/
pageSize?: number;
/**
* Sorting method applied to the return results.
* @example "name"
*/
sort?: string;
},
params: RequestParams = {},
) =>
this.request<BudgetList, ErrorList>({
path: `/${baseSiteId}/costcenters/${costCenterCode}/budgets`,
method: "GET",
query: query,
secure: true,
format: "json",
...params,
});
/**
* No description
*
* @tags B2B Cost Centers
* @name DoAddBudgetToCostCenter
* @summary Creates a budget for the cost center.
* @request POST:/{baseSiteId}/costcenters/{costCenterCode}/budgets
* @secure
*/
doAddBudgetToCostCenter = (
baseSiteId: string,
costCenterCode: string,
query: {
/**
* Budget that will be added to a specific cost center.
* @example "Weekly_2_5K_USD"
*/
budgetCode: string;
/**
* Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
* @default "DEFAULT"
*/
fields?: string;
},
params: RequestParams = {},
) =>
this.request<B2BSelectionData, ErrorList>({
path: `/${baseSiteId}/costcenters/${costCenterCode}/budgets`,
method: "POST",
query: query,
secure: true,
format: "json",
...params,
});
/**
* No description
*
* @tags B2B Cost Centers
* @name RemoveBudgetFromCostCenter
* @summary Deletes the budget from a cost center.
* @request DELETE:/{baseSiteId}/costcenters/{costCenterCode}/budgets/{budgetCode}
* @secure
*/
removeBudgetFromCostCenter = (
baseSiteId: string,
budgetCode: string,
costCenterCode: string,
query?: {
/**
* Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
* @default "DEFAULT"
*/
fields?: string;
},
params: RequestParams = {},
) =>
this.request<B2BSelectionData, ErrorList>({
path: `/${baseSiteId}/costcenters/${costCenterCode}/budgets/${budgetCode}`,
method: "DELETE",
query: query,
secure: true,
format: "json",
...params,
});
/**
* @description Retrieves a list of cost centers.
*
* @tags B2B Cost Centers
* @name GetCostCenters
* @summary Retrieves the cost centers.
* @request GET:/{baseSiteId}/costcentersall
* @secure
*/
getCostCenters = (
baseSiteId: string,
query?: {
/**
* Current result page. Default value is 0.
* @format int32
* @default 0
*/
currentPage?: number;
/**
* Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
* @default "DEFAULT"
*/
fields?: string;
/**
* Number of results returned per page.
* @format int32
* @default 20
* @example 20
*/
pageSize?: number;
/**
* Sorting method applied to the return results.
* @example "name"
*/
sort?: string;
},
params: RequestParams = {},
) =>
this.request<B2BCostCenterList, ErrorList>({
path: `/${baseSiteId}/costcentersall`,
method: "GET",
query: query,
secure: true,
format: "json",
...params,
});
/**
* @description Retrieves a list of shipping or billing countries. Set the type parameter to SHIPPING to retrieve the shipping countries. Set the type parameter to BILLING to retrieve the billing countries. Leave the type parameter blank to retrieve all of the countries. The list is sorted alphabetically.
*
* @tags Countries
* @name GetCountries
* @summary Retrieves a list of countries.
* @request GET:/{baseSiteId}/countries
* @secure
*/
getCountries = (
baseSiteId: string,
query?: {
/**
* Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
* @default "DEFAULT"
*/
fields?: string;
/** The type of countries. */
type?: "SHIPPING" | "BILLING";
},
params: RequestParams = {},
) =>
this.request<CountryList, ErrorList>({
path: `/${baseSiteId}/countries`,
method: "GET",
query: query,
secure: true,
format: "json",
...params,
});
/**
* @description Retrieves the list of regions in a country.
*
* @tags Countries
* @name GetCountryRegions
* @summary Retrieves a list of regions.
* @request GET:/{baseSiteId}/countries/{countyIsoCode}/regions
* @secure
*/
getCountryRegions = (
baseSiteId: string,
countyIsoCode: string,
query?: {
/**
* Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
* @default "DEFAULT"
*/
fields?: string;
},
params: RequestParams = {},
) =>
this.request<RegionList, ErrorList>({
path: `/${baseSiteId}/countries/${countyIsoCode}/regions`,
method: "GET",
query: query,
secure: true,
format: "json",
...params,
});
/**
* @description Retrieves a list of available currencies for the current base store. If the currency list is empty, all of the currencies available in the system are returned.
*
* @tags Miscs
* @name GetCurrencies
* @summary Retrieves a list of available currencies.
* @request GET:/{baseSiteId}/currencies
* @secure
*/
getCurrencies = (
baseSiteId: string,
query?: {
/**
* Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
* @default "DEFAULT"
*/
fields?: string;
},
params: RequestParams = {},
) =>
this.request<CurrencyList, ErrorList>({
path: `/${baseSiteId}/currencies`,
method: "GET",
query: query,
secure: true,
format: "json",
...params,
});
/**
* @description Retrieves the subgroup information of a customer group. To perform this call, you must be an authorized member of the customermanagergroup.
*
* @tags Customer Groups
* @name GetCustomerGroups
* @summary Retrieves the subgroups of a customer group.
* @request GET:/{baseSiteId}/customergroups
* @secure
*/
getCustomerGroups = (
baseSiteId: string,
query?: {
/**
* Current result page. Default value is 0.
* @format int32
* @default 0
*/
currentPage?: number;
/**
* Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
* @default "BASIC"
*/
fields?: string;
/**
* Number of results returned per page.
* @format int32
* @default 20
*/
pageSize?: number;
},
params: RequestParams = {},
) =>
this.request<UserGroupList, ErrorList>({
path: `/${baseSiteId}/customergroups`,
method: "GET",
query: query,
secure: true,
format: "json",
...params,
});
/**
* @description Creates a new customer group that is a direct subgroup of a customergroup. To try out the methods of the Customer Groups controller, you must authorize a user who belongs to the “customermanagergroup”.
*
* @tags Customer Groups
* @name CreateCustomerGroup
* @summary Creates a new customer group.
* @request POST:/{baseSiteId}/customergroups
* @secure
*/
createCustomerGroup = (baseSiteId: string, data: UserGroup, params: RequestParams = {}) =>
this.request<void, ErrorList>({
path: `/${baseSiteId}/customergroups`,
method: "POST",
body: data,
secure: true,
type: ContentType.Json,
...params,
});
/**
* @description Retrieves a customer group. To try out the methods of the customer groups controller, authorize a customer who belongs to the customermanagergroup.
*
* @tags Customer Groups
* @name GetCustomerGroup
* @summary Retrieves a customer group.
* @request GET:/{baseSiteId}/customergroups/{groupId}
* @secure
*/
getCustomerGroup = (
baseSiteId: string,
groupId: string,
query?: {
/**
* Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
* @default "BASIC"
*/
fields?: string;
},
params: RequestParams = {},
) =>
this.request<UserGroup, ErrorList>({
path: `/${baseSiteId}/customergroups/${groupId}`,
method: "GET",
query: query,
secure: true,
format: "json",
...params,
});
/**
* @description Sets members for a user group. The list of existing members is overwritten with a new one. To try out the methods of the Customer Groups controller, you must authorize a user who belongs to the “customermanagergroup”.
*
* @tags Customer Groups
* @name ReplaceUsersForCustomerGroup
* @summary Sets members for a user group.
* @request PUT:/{baseSiteId}/customergroups/{groupId}/members
* @secure
*/
replaceUsersForCustomerGroup = (baseSiteId: string, groupId: string, data: MemberList, params: RequestParams = {}) =>
this.request<void, ErrorList>({
path: `/${baseSiteId}/customergroups/${groupId}/members`,
method: "PUT",
body: data,
secure: true,
type: ContentType.Json,
...params,
});
/**
* @description Assigns members to a customer group. To perform this call, you must be an authorized member of the customermanagergroup.
*
* @tags Customer Groups
* @name UpdateCustomerGroupWithUsers
* @summary Assigns members to a customer group.
* @request PATCH:/{baseSiteId}/customergroups/{groupId}/members
* @secure
*/
updateCustomerGroupWithUsers = (baseSiteId: string, groupId: string, data: MemberList, params: RequestParams = {}) =>
this.request<void, ErrorList>({
path: `/${baseSiteId}/customergroups/${groupId}/members`,
method: "PATCH",
body: data,
secure: true,
type: ContentType.Json,
...params,
});
/**
* @description Deletes the customer from a customer group. To try out the methods in the customer groups controller, authorize a customer who belongs to the customermanagergroup.
*
* @tags Customer Groups
* @name RemoveUsersFromCustomerGroup
* @summary Deletes the customer from a customer group.
* @request DELETE:/{baseSiteId}/customergroups/{groupId}/members/{userId}
* @secure
*/
removeUsersFromCustomerGroup = (baseSiteId: string, groupId: string, userId: string, params: RequestParams = {}) =>
this.request<void, ErrorList>({
path: `/${baseSiteId}/customergroups/${groupId}/members/${userId}`,
method: "DELETE",
secure: true,
...params,
});
/**
* No description
*
* @tags ask-product-api-controller
* @name HandleRequest
* @request POST:/{baseSiteId}/cxai/ask-product
* @secure
*/
handleRequest = (baseSiteId: string, params: RequestParams = {}) =>
this.request<object, ErrorList>({
path: `/${baseSiteId}/cxai/ask-product`,
method: "POST",
secure: true,
format: "json",
...params,
});
/**
* No description
*
* @tags assistant-api-controller
* @name HandleRequest15
* @request GET:/{baseSiteId}/cxai/assistant/**
* @secure
*/
handleRequest15 = (baseSiteId: string, params: RequestParams = {}) =>
this.request<object, ErrorList>({
path: `/${baseSiteId}/cxai/assistant/**`,
method: "GET",
secure: true,
format: "json",
...params,
});
/**
* No description
*
* @tags assistant-api-controller
* @name HandleRequest18
* @request PUT:/{baseSiteId}/cxai/assistant/**
* @secure
*/
handleRequest18 = (baseSiteId: string, params: RequestParams = {}) =>
this.request<object, ErrorList>({
path: `/${baseSiteId}/cxai/assistant/**`,
method: "PUT",
secure: true,
format: "json",
...params,
});
/**
* No description
*
* @tags assistant-api-controller
* @name HandleRequest17
* @request POST:/{baseSiteId}/cxai/assistant/**
* @secure
*/
handleRequest17 = (baseSiteId: string, params: RequestParams = {}) =>
this.request<object, ErrorList>({
path: `/${baseSiteId}/cxai/assistant/**`,
method: "POST",
secure: true,
format: "json",
...params,
});
/**
* No description
*
* @tags assistant-api-controller
* @name HandleRequest20
* @request DELETE:/{baseSiteId}/cxai/assistant/**
* @secure
*/
handleRequest20 = (baseSiteId: string, params: RequestParams = {}) =>
this.request<object, ErrorList>({
path: `/${baseSiteId}/cxai/assistant/**`,
method: "DELETE",
secure: true,
format: "json",
...params,
});
/**
* No description
*
* @tags assistant-api-controller
* @name HandleRequest21
* @request OPTIONS:/{baseSiteId}/cxai/assistant/**
* @secure
*/
handleRequest21 = (baseSiteId: string, params: RequestParams = {}) =>
this.request<object, ErrorList>({
path: `/${baseSiteId}/cxai/assistant/**`,
method: "OPTIONS",
secure: true,
format: "json",
...params,
});
/**
* No description
*
* @tags assistant-api-controller
* @name HandleRequest16
* @request HEAD:/{baseSiteId}/cxai/assistant/**
* @secure
*/
handleRequest16 = (baseSiteId: string, params: RequestParams = {}) =>
this.request<object, ErrorList>({
path: `/${baseSiteId}/cxai/assistant/**`,
method: "HEAD",
secure: true,
format: "json",
...params,
});
/**
* No description
*
* @tags assistant-api-controller
* @name HandleRequest19
* @request PATCH:/{baseSiteId}/cxai/assistant/**
* @secure
*/
handleRequest19 = (baseSiteId: string, params: RequestParams = {}) =>
this.request<object, ErrorList>({
path: `/${baseSiteId}/cxai/assistant/**`,
method: "PATCH",
secure: true,
format: "json",
...params,
});
/**
* No description
*
* @tags cxaiocc-controller
* @name GetConfig1
* @request GET:/{baseSiteId}/cxai/config
* @secure
*/
getConfig1 = (
baseSiteId: string,
query?: {
/**
* Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
* @default "DEFAULT"
*/
fields?: string;
},
params: RequestParams = {},
) =>
this.request<CxaiConfigData, ErrorList>({
path: `/${baseSiteId}/cxai/config`,
method: "GET",
query: query,
secure: true,
format: "json",
...params,
});
/**
* No description
*
* @tags cxaiocc-controller
* @name GetConfigForCode
* @request GET:/{baseSiteId}/cxai/config/{code}
* @secure
*/
getConfigForCode = (
code: string,
baseSiteId: string,
query?: {
/**
* Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
* @default "DEFAULT"
*/
fields?: string;
},
params: RequestParams = {},
) =>
this.request<CxaiConfigData, ErrorList>({
path: `/${baseSiteId}/cxai/config/${code}`,
method: "GET",
query: query,
secure: true,
format: "json",
...params,
});
/**
* No description
*
* @tags cx-ai-image-controller
* @name UploadImage2
* @request POST:/{baseSiteId}/cxai/image/upload/{sid}
* @secure
*/
uploadImage2 = (
sid: string,
baseSiteId: string,
data: {
/** @format binary */
file: File;
},
params: RequestParams = {},
) =>
this.request<Record<string, object>, ErrorList>({
path: `/${baseSiteId}/cxai/image/upload/${sid}`,
method: "POST",
body: data,
secure: true,
type: ContentType.FormData,
format: "json",
...params,
});
/**
* No description
*
* @tags cx-ai-image-controller
* @name GetImage2
* @request GET:/{baseSiteId}/cxai/image/{sid}
* @secure
*/
getImage2 = (sid: string, baseSiteId: string, params: RequestParams = {}) =>
this.request<Image, ErrorList>({
path: `/${baseSiteId}/cxai/image/${sid}`,
method: "GET",
secure: true,
format: "json",
...params,
});
/**
* No description
*
* @tags cx-ai-image-controller
* @name DeleteImage2
* @request DELETE:/{baseSiteId}/cxai/image/{sid}
* @secure
*/
deleteImage2 = (sid: string, baseSiteId: string, params: RequestParams = {}) =>
this.request<Record<string, string>, ErrorList>({
path: `/${baseSiteId}/cxai/image/${sid}`,
method: "DELETE",
secure: true,
format: "json",
...params,
});
/**
* @description Retrieves a list of the supported delivery countries for the current store. The list is sorted alphabetically.
*
* @tags Miscs
* @name GetDeliveryCountries
* @summary Retrieves a list of shipping countries.
* @request GET:/{baseSiteId}/deliverycountries
* @deprecated
* @secure
*/
getDeliveryCountries = (
baseSiteId: string,
query?: {
/**
* Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
* @default "DEFAULT"
*/
fields?: string;
},
params: RequestParams = {},
) =>
this.request<CountryList, ErrorList>({
path: `/${baseSiteId}/deliverycountries`,
method: "GET",
query: query,
secure: true,
format: "json",
...params,
});
/**
* No description
*
* @tags emarsys-automation-controller
* @name CreateEmarsysConfig
* @request POST:/{baseSiteId}/emarsys/automation/create-emarsys-config
* @secure
*/
createEmarsysConfig = (
baseSiteId: string,
query: {
merchantId: string;
secretId?: string;
userName?: string;
},
params: RequestParams = {},
) =>
this.request<void, ErrorList>({
path: `/${baseSiteId}/emarsys/automation/create-emarsys-config`,
method: "POST",
query: query,
secure: true,
...params,
});
/**
* No description
*
* @tags emarsys-automation-controller
* @name CreateUser1
* @request POST:/{baseSiteId}/emarsys/automation/create-user
* @secure
*/
createUser1 = (
baseSiteId: string,
query: {
password: string;
userName: string;
},
params: RequestParams = {},
) =>
this.request<void, ErrorList>({
path: `/${baseSiteId}/emarsys/automation/create-user`,
method: "POST",
query: query,
secure: true,
...params,
});
/**
* No description
*
* @tags emarsys-automation-controller
* @name DeleteEmarsysConfig
* @request DELETE:/{baseSiteId}/emarsys/automation/delete-emarsys-config
* @secure
*/
deleteEmarsysConfig = (baseSiteId: string, params: RequestParams = {}) =>
this.request<void, ErrorList>({
path: `/${baseSiteId}/emarsys/automation/delete-emarsys-config`,
method: "DELETE",
secure: true,
...params,
});
/**
* No description
*
* @tags emarsys-data-controller
* @name GetCategoryPath
* @request GET:/{baseSiteId}/emarsys/category-path/{categoryCode}
* @secure
*/
getCategoryPath = (categoryCode: string, baseSiteId: string, params: RequestParams = {}) =>
this.request<string, ErrorList>({
path: `/${baseSiteId}/emarsys/category-path/${categoryCode}`,
method: "GET",
secure: true,
format: "json",
...params,
});
/**
* No description
*
* @tags emarsys-data-controller
* @name GetLoyaltyPlanTypes
* @request GET:/{baseSiteId}/emarsys/loyalty/plan-types
* @secure
*/
getLoyaltyPlanTypes = (baseSiteId: string, params: RequestParams = {}) =>
this.request<LoyaltyPlanType[], ErrorList>({
path: `/${baseSiteId}/emarsys/loyalty/plan-types`,
method: "GET",
secure: true,
format: "json",
...params,
});
/**
* @description Retrieves all of the products or only the products that were modified after the time in the timestamp parameter.
*
* @tags Export
* @name GetExportedProducts
* @summary Retrieves a list of exported products.
* @request GET:/{baseSiteId}/export/products
* @secure
*/
getExportedProducts = (
baseSiteId: string,
query?: {
/** Only products from this catalog are returned. The catalog must be provided along with the version. */
catalog?: string;
/**
* Current result page. Default value is 0.
* @format int32
* @default 0
*/
currentPage?: number;
/**
* Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
* @default "DEFAULT"
*/
fields?: string;
/**
* Number of results returned per page.
* @format int32
* @default 20
*/
pageSize?: number;
/** Only products that are more recent than the given parameter are returned. The value should be in ISO-8601 format: 2018-01-09T16:28:45+0000. */
timestamp?: string;
/** Only products from this catalog version are returned. The catalog version must be provided along with the catalog. */
version?: string;
},
params: RequestParams = {},
) =>
this.request<ProductList, ErrorList>({
path: `/${baseSiteId}/export/products`,
method: "GET",
query: query,
secure: true,
format: "json",
...params,
});
/**
* @description Retrieves the orders that have changed status. Only the properties from the current baseSite that have been updated after the specified timestamp are returned.
*
* @tags Feeds
* @name GetOrderStatusFeed
* @summary Retrieves a list of orders with status updates.
* @request GET:/{baseSiteId}/feeds/orders/statusfeed
* @secure
*/
getOrderStatusFeed = (
baseSiteId: string,
query: {
/**
* Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
* @default "DEFAULT"
*/
fields?: string;
/** Only items newer than the given parameter are retrieved. This parameter should be in ISO-8601 format (for example, 2018-01-09T16:28:45+0000). */
timestamp: string;
},
params: RequestParams = {},
) =>
this.request<OrderStatusUpdateElementList, ErrorList>({
path: `/${baseSiteId}/feeds/orders/statusfeed`,
method: "GET",
query: query,
secure: true,
format: "json",
...params,
});
/**
* @description Creates a token so that customers can restore their forgotten passwords. This endpoint is deprecated in the 2211.24 update and its deletion is planned. Please use the POST /{baseSiteId}/passwordRestoreToken instead.
*
* @tags Forgotten Passwords
* @name DoRestorePassword
* @summary Creates a toke