Class: EcomRemoteApi
Server module of the Frontend API for Connect for Commerce.
Export
Constructors
constructor
• new EcomRemoteApi(fsxaConfig)
Parameters
| Name | Type |
|---|---|
fsxaConfig |
FSXARemoteApiConfig & { fields: FieldsConfig } |
Properties
contentMode
• contentMode: "release" | "preview"
Methods
fetchByFilter
▸ fetchByFilter(filter): Promise\<null | FetchResponse>
Fetches by filter.
Parameters
| Name | Type | Description |
|---|---|---|
filter |
FetchByFilterParams |
Filters to use to fetch item(s). |
Returns
Promise\<null | FetchResponse>
Details about the filtered item(s).
fetchNavigation
▸ fetchNavigation(params): Promise\<null | NavigationData>
Fetches the navigation service.
Parameters
| Name | Type | Description |
|---|---|---|
params |
FetchNavigationParams |
Parameters to use to fetch the service. |
Returns
Promise\<null | NavigationData>
The navigation returned by the navigation service.
fetchProjectProperties
▸ fetchProjectProperties(params): Promise\<null | ProjectProperties>
Fetches the project properties from CaaS.
Parameters
| Name | Type | Description |
|---|---|---|
params |
FetchProjectPropertiesParams |
Parameters to use to fetch project properties. |
Returns
Promise\<null | ProjectProperties>
The project properties returned by the CaaS.
findElement
▸ findElement\<T>(params): Promise\<T>
Looks up an element from the CaaS.
Type parameters
| Name | Type |
|---|---|
T |
any |
Parameters
| Name | Type | Description |
|---|---|---|
params |
FindElementParams |
Parameters to use to find the element. |
Returns
Promise\<T>
Details about the element.
findPage
▸ findPage(params): Promise\<null | Page>
Finds a CaaS page.
Parameters
| Name | Type | Description |
|---|---|---|
params |
FindPageParams |
Parameters to use to find the page |
Returns
Promise\<null | Page>
Details about the page.
getAvailableLocales
▸ getAvailableLocales(): Promise\<string[]>
Gets available locales.
Returns
Promise\<string[]>
Available locales.