1.0.503 • Published 10 months ago

lavss v1.0.503

Weekly downloads
-
License
ISC
Repository
-
Last release
10 months ago

OneEntry SDK

OneEntry Headless CMS SDK is an SDK that provides an easy way to interact with the OneEntry Headless CMS API.

Official Site

Visit the official OneEntry website at https://oneentry.cloud to learn more about the OneEntry Headless CMS.

Sign Up

To get started with OneEntry, sign up for an account at https://account.oneentry.cloud/authentication/register.

Installation

To install the OneEntry Headless CMS SDK in your project, run the following command:

npm install oneentry

Usage

To use the OneEntry Headless CMS SDK in your project, import the defineOneEntry function:

import { defineOneEntry } from 'oneentry'

const {
        Admins,
        AttributesSets,
        Blocks,
        Forms,
        FormData,
        FileUploading,
        GeneralTypes,
        Locales,
        Markers,
        Menus,
        Pages,
        Products,
        ProductStatuses,
        System,
        Templates,
        TemplatePreviews
} = defineOneEntry('your-url')

Or

const api = defineOneEntry('your-url')

If you chose token protection to ensure connection security, just pass your token to the function as an optional parameter.

You can get a token as follows 1) Log in to your personal account 2) Go to the "Projects" tab and select a project 3) Go to the "Access" tab 4) Set the switch to "Security API Token" 5) Log in to the project, go to the settings section and open the token tab 6) Get and copy the token of your project

Also, you can connect a tls certificate to secure your project. In this case, do not transfer the "token" at all. Learn more about security

const api = defineOneEntry('your-url', 'your-token')

Admins

const { Admins } = defineOneEntry('your-url')

Admins.getAdminsInfo(langCode, offset, limit)

const value = await Admins.getAdminsInfo('en_US', 0, 30)

This method retrieves all user objects of type admin from the API. It returns a Promise that resolves to an array of AdminEntity objects.

Example return:

[
  {
    "id": 1764,
    "identifier": "admin1",
    "attributeSetId": 7,
    "isSync": false,
    "attributeValues": {
      "marker": {
        "value": "",
        "type": "string"
      }
    },
    "position": 192
  }
]

id: number object identifier example: 1764

identifier: string textual identifier for the record field example: admin1 default: admin1

attributeSetId: number Attribute set identifier example: 7

isSync boolean Page indexing flag (true or false) example: false

attributeValues: Record<string, string> Array of attribute values from the index (presented as a pair of user attribute identifier: attribute value) example: OrderedMap { "en_US": OrderedMap { "marker": OrderedMap { "value": "", "type": "string" } } }

position: number Position number (for sorting) example: 192


AttributesSets

const { AttributesSets } = defineOneEntry('your-url');

AttributesSets.getAttributesByMarker(marker, langCode)

const value = await AttributesSets.getAttributesByMarker('my-marker', 'en_US')

This method return all attributes with data from the attribute sets.

Example return:

[
  {
    "type": "list",
    "marker": "list1",
    "position": 192,
    "validators": {
      "requiredValidator": {
        "strict": true
      },
      "defaultValueValidator": {
        "fieldDefaultValue": 11
      }
    },
    "localizeInfos": {
      "title": "My attribute"
    },
    "listTitles": [
      {
        "title": "red",
        "value": 1,
        "position": 1,
        "extendedValue": null,
        "extendedValueType": null
      },
      {
        "title": "yellow",
        "value": 2,
        "position": 2,
        "extendedValue": null,
        "extendedValueType": null
      }
    ]
  }
]

type: string attribute type example: list

marker: string textual identifier of the attribute (marker) Enum: string, text, textWithHeader, integer, real, float, dateTime, date, time, file, image, groupOfImages, radioButton, list, button example: list1

position: number position number for sorting example: 192

validators: Record<string, any> set of validators for validation example: OrderedMap { "requiredValidator": OrderedMap { "strict": true }, "defaultValueValidator": OrderedMap { "fieldDefaultValue": 11 } }

localizeInfos: Record<string, any> localization data for the set (name) example: OrderedMap { "title": "My attribute" }

listTitles Record<string, any> array of values (with extended data) for list and radioButton attributes example: List OrderedMap { "title": "red", "value": 1, "position": 1, "extendedValue": null, "extendedValueType": null }, OrderedMap { "title": "yellow", "value": 2, "position": 2, "extendedValue": null, "extendedValueType": null }

AttributesSets.getSingleAttributeByMarkerSet(attributeMarker, setMarker, langCode)

const value = await AttributesSets.getSingleAttributeByMarkerSet('list1', 'list1', 'en_US')

This method return a single attribute with data from the attribute sets.

Example return:

{
  "type": "list",
  "marker": "list1",
  "position": 192,
  "validators": {
    "requiredValidator": {
      "strict": true
    },
    "defaultValueValidator": {
      "fieldDefaultValue": 11
    }
  },
  "localizeInfos": {
    "title": "My attribute"
  },
  "listTitles": [
    {
      "title": "red",
      "value": 1,
      "position": 1,
      "extendedValue": null,
      "extendedValueType": null
    },
    {
      "title": "yellow",
      "value": 2,
      "position": 2,
      "extendedValue": null,
      "extendedValueType": null
    }
  ]
}

type: string attribute type example: list

marker: string textual identifier of the attribute (marker) Enum: string, text, textWithHeader, integer, real, float, dateTime, date, time, file, image, groupOfImages, radioButton, list, button example: list1

position: number position number for sorting example: 192

validators: Record<string, any> set of validators for validation example: OrderedMap { "requiredValidator": OrderedMap { "strict": true }, "defaultValueValidator": OrderedMap { "fieldDefaultValue": 11 } }

localizeInfos: Record<string, any> localization data for the set (name) example: OrderedMap { "title": "My attribute" }

listTitles Record<string, any> array of values (with extended data) for list and radioButton attributes example: List OrderedMap { "title": "red", "value": 1, "position": 1, "extendedValue": null, "extendedValueType": null }, OrderedMap { "title": "yellow", "value": 2, "position": 2, "extendedValue": null, "extendedValueType": null }


Blocks

const { Blocks } = defineOneEntry('your-url');

Blocks.getBlockByMarker(marker, langCode)

const value = await Blocks.getBlockByMarker('my-marker', 'en_US')

This method return one blocks object by marker.

Example return:

{
  "id": 1764,
  "attributeSetId": 7,
  "localizeInfos": {
    "title": "My block"
  },
  "customSettings": {
    "sliderDelay": 0,
    "sliderDelayType": "",
    "productQuantity": 4,
    "productSortType": "By_ID",
    "productSortOrder": "Descending",
    "productCountElementsPerRow": 10,
    "similarProductRules": [
      {
        "property": "Descending",
        "includes": "",
        "keywords": "",
        "strict": ""
      }
    ]
  },
  "version": 10,
  "identifier": "catalog",
  "position": 192,
  "attributeValues": {
    "marker": {
      "value": "",
      "type": "string"
    }
  },
  "type": "forNewsPage",
  "templateIdentifier": null
}

id: number object identifier example: 1764

attributeSetId: number identifier for the used attribute set example: 7

localizeInfos: CommonLocalizeInfos block name with localization example: OrderedMap { "en_US": OrderedMap { "title": "My block" } }

customSettings: BlockCustomSettings custom settings for different block types example: OrderedMap { "sliderDelay": 0, "sliderDelayType": "", "productQuantity": 4, "productSortType": "By_ID", "productSortOrder": "Descending", "productCountElementsPerRow": 10, "similarProductRules": List OrderedMap { "property": "Descending", "includes": "", "keywords": "", "strict": "" } }

version: number object version number example: 10

identifier: string textual identifier for the field record example: catalog default: marker

position: number position number (for sorting) example: 192

attributeValues: Record<string, string> array of attribute values from the index (presented as a pair of custom attribute identifier: attribute value) example: OrderedMap { "en_US": OrderedMap { "marker": OrderedMap { "value": "", "type": "string" } } }

type: string block type example: forNewsPage

templateIdentifier: string template marker used by the block (can be null) Enum: forCatalogProducts, forBasketPage, forErrorPage, forCatalogPages, forProductPreview, forProductPage, forSimilarProductBlock, forStatisticProductBlock, forProductBlock, forForm, forFormField, forNewsPage, forNewsBlock, forNewsPreview, forOneNewsPage, forUsualPage, forTextBlock, forSlider, service example: null

FileUploading

const { FileUploading } = defineOneEntry('your-url');

FileUploading.upload(data, fileQuery)

const query = {
        type:"page",
        entity:"editor",
        id:3787,
        width:0,
        height:0,
        compress:true,
    }

const value = await FileUploading.upload(data, query)

This method uploads a file to a cloud file storage. Pass to the date the value obtained from input type "file". Data is file object (or array), learn more - File Object

Example return:

[
  {
    "filename": "string",
    "downloadLink": "string",
    "size": 0
  }
]

filename: string filename with relative path

downloadLink: string link for downloading the file

size number size of the file in bytes

FileUploading.delete(filename, fileQuery)

const query = {
        type:"page",
        entity:"editor",
        id:3787
    }


const value = await FileUploading.delete("file.png", query)

This void method delete a file from the cloud file storage.

FileUploading.getFile(id, type, entity, filename)

const value = await FileUploading.getFile(123, 'page', 'editor', 'file.png')

This method return file object by parameters.

Example return:

{
  "file": "string"
}

Forms

const { Forms } = defineOneEntry('your-url');

Forms.getAllForms(langCode, offset, limit)

const value = await Forms.getAllForms('en_US', 0, 30)

This method retrieves all form objects from the API. It returns a Promise that resolves to an array of FormEntity objects.

Example return:

[
  {
    "id": 1764,
    "attributeSetId": 0,
    "processingType": "email",
    "localizeInfos": {
      "title": "My Form",
      "titleForSite": "",
      "successMessage": "",
      "unsuccessMessage": "",
      "urlAddress": "",
      "database": "0",
      "script": "0"
    },
    "processingData": "Unknown Type: ProcessingData",
    "version": 10,
    "identifier": "catalog",
    "position": 192,
    "attributes": [
      {
        "type": "list",
        "marker": "l1",
        "position": 2,
        "listTitles": [
          {
            "title": "red",
            "value": 1,
            "position": 1,
            "extendedValue": null,
            "extendedValueType": null
          },
          {
            "title": "yellow",
            "value": 2,
            "position": 2,
            "extendedValue": null,
            "extendedValueType": null
          }
        ],
        "validators": {},
        "localizeInfos": {
          "title": "l1"
        }
      }
    ]
  }
]

id: number object identifier example: 1764

attributeSetId: number identifier of the attribute set used

processingType: string form processing type example: email

localizeInfos: FormLocalizeInfos form name with localization Enum: db, email, script example: OrderedMap { "en_US": OrderedMap { "title": "My Form", "titleForSite": "", "successMessage": "", "unsuccessMessage": "", "urlAddress": "", "database": "0", "script": "0" } }

processingData: ProcessingData form data

version: number object version number example: 10

identifier: string textual identifier for the record field example: catalog default: marker

position: number position number (for sorting) example: 192

attributes: array of attribute values from the used attribute set for displaying the form (taking into account the specified language) example: List [ OrderedMap { "type": "list", "marker": "l1", "position": 2, "listTitles": List OrderedMap { "title": "red", "value": 1, "position": 1, "extendedValue": null, "extendedValueType": null }, OrderedMap { "title": "yellow", "value": 2, "position": 2, "extendedValue": null, "extendedValueType": null } , "validators": OrderedMap {}, "localizeInfos": OrderedMap { "title": "l1" } } ]

Forms.getFormByMarker(marker, langCode)

const value = await Forms.getFormByMarker('My form', 'en_US')

This method retrieves a single form object based on its textual identifier (marker) from the API. It returns a Promise that resolves to a FormEntity object.

Example return:

{
  "id": 1764,
  "attributeSetId": 0,
  "processingType": "email",
  "localizeInfos": {
    "title": "My Form",
    "titleForSite": "",
    "successMessage": "",
    "unsuccessMessage": "",
    "urlAddress": "",
    "database": "0",
    "script": "0"
  },
  "processingData": "Unknown Type: ProcessingData",
  "version": 10,
  "identifier": "catalog",
  "position": 192,
  "attributes": [
    {
      "type": "list",
      "marker": "l1",
      "position": 2,
      "listTitles": [
        {
          "title": "red",
          "value": 1,
          "position": 1,
          "extendedValue": null,
          "extendedValueType": null
        },
        {
          "title": "yellow",
          "value": 2,
          "position": 2,
          "extendedValue": null,
          "extendedValueType": null
        }
      ],
      "validators": {},
      "localizeInfos": {
        "title": "l1"
      }
    }
  ]
}

id: number object identifier example: 1764

attributeSetId: number identifier of the attribute set used

processingType: string form processing type example: email

localizeInfos: FormLocalizeInfos form name with localization Enum: db, email, script example: OrderedMap { "en_US": OrderedMap { "title": "My Form", "titleForSite": "", "successMessage": "", "unsuccessMessage": "", "urlAddress": "", "database": "0", "script": "0" } }

processingData: ProcessingData form data

version: number object version number example: 10

identifier: string textual identifier for the record field example: catalog default: marker

position: number position number (for sorting) example: 192

attributes: array of attribute values from the used attribute set for displaying the form (taking into account the specified language) example: List [ OrderedMap { "type": "list", "marker": "l1", "position": 2, "listTitles": List OrderedMap { "title": "red", "value": 1, "position": 1, "extendedValue": null, "extendedValueType": null }, OrderedMap { "title": "yellow", "value": 2, "position": 2, "extendedValue": null, "extendedValueType": null } , "validators": OrderedMap {}, "localizeInfos": OrderedMap { "title": "l1" } } ]


FormData

const { FormData } = defineOneEntry('your-url');

FormData.postFormsData(data)

const value = await FormData.postFormsData(data)

This method retrieves all form data objects from the API. It returns a Promise that resolves to an array of objects of type CreateFormDataDto.

Example return:

{
  "id": 1764,
  "formIdentifier": "my-form",
  "time": "2023-02-12 10:56",
  "formData": {
    "marker": "name_1",
    "value": "Name"
  }
}

id: number object identifier example: 1764

formIdentifier: string Text identifier of the form object (marker) example: my-form

time: Date Date and time of form modification example: 2023-02-12 10:56

formData: FormDataLangType Data submitted by the form example: OrderedMap { "en_US": List OrderedMap { "marker": "naimenovanie_1", "value": "Name" } }

FormData.getFormsData(langCode, offset, limit)

const value = await FormData.getFormsData('en_US', 0, 30)

This method creates form data objects by sending a request to the API. It accepts an array of objects of type IFormsPost as the request body to provide the necessary form data. It returns a Promise that resolves to the created CreateFormDataDto objects.

Example return:

{
  "id": 1764,
  "formIdentifier": "my-form",
  "time": "2023-02-12 10:56",
  "formData": {
    "marker": "name_1",
    "value": "Name"
  },
  "attributeSetIdentifier": "test-form"
}

id: number object identifier example: 1764

formIdentifier: string Text identifier of the form object (marker) example: my-form

time: Date Date and time of form modification example: 2023-02-12 10:56

formData: FormDataLangType Data submitted by the form example: OrderedMap { "en_US": List OrderedMap { "marker": "naimenovanie_1", "value": "Name" } }

attributeSetIdentifier: string text identifier (marker) of the used attribute set example: test-form

FormData.getFormsDataByMarker(marker, langCode, offset, limit)

const value = await FormData.getFormsDataByMarker('my-marker', 'en_US', 0, 30)

This method retrieves a specific form data object by its marker from the API. It accepts a marker parameter as the marker of the form data. It returns a Promise that resolves to an array of objects of type FormDataEntity.

Example return:

{
  "id": 1764,
  "formIdentifier": "my-form",
  "time": "2023-02-12 10:56",
  "formData": {
     "marker": "name_1",
     "value": "Name"
  },
  "attributeSetIdentifier": "test-form"
}

id: number object identifier example: 1764

formIdentifier: string Text identifier of the form object (marker) example: my-form

time: Date Date and time of form modification example: 2023-02-12 10:56

formData: FormDataLangType Data submitted by the form example: OrderedMap { "en_US": List OrderedMap { "marker": "naimenovanie_1", "value": "Name" } }

attributeSetIdentifier: string text identifier (marker) of the used attribute set example: test-form


GeneralTypes

const { GeneralTypes } = defineOneEntry('your-url');

GeneralTypes.getAllTypes()

const value = await GeneralTypes.getAllTypes()

This method retrieves all objects of type GeneralTypeEntity from the API. It returns a Promise that resolves to an array of GeneralTypeEntity objects.

Example return:

[
  {
    "id": 1,
    "type": "forNewsPage"
  }
]

id: number object identifier example: 1764

type: string type value example: forNewsPage Enum: forCatalogProducts, forBasketPage, forErrorPage, forCatalogPages, forProductPreview, forProductPage, forSimilarProductBlock, forStatisticProductBlock, forProductBlock, forForm, forFormField, forNewsPage, forNewsBlock, forNewsPreview, forOneNewsPage, forUsualPage, forTextBlock, forSlider, service

Locales

const { Locales } = defineOneEntry('your-url')

Locales.getLocales()

const value = await Locales.getLocales()

This method retrieves all active language localization objects from the API. It returns a Promise that resolves to an array of LocaleEntity objects.

Example return:

[
    {
      "id": 1764,
      "shortCode": "en",
      "code": "en_US",
      "name": "Bengali",
      "nativeName": "বাংলা",
      "isActive": false,
      "image": "🇦🇨",
      "position": 1
    }
]

id: number object identifier example: 1764

shortCode: string language code (short) example: en

code: string language code with country code example: en_US

name string Language name (in English) example: Bengali

nativeName string Language name (in native language) example: বাংলা

isActive: boolean Flag of usage example: false

image: string Graphic image of the language (under development) example: 🇦🇨

position: { description:position number }

Markers

const { Markers } = defineOneEntry('your-url')

Markers.getMarkers(offset, limit)

const value = await Markers.getMarkers(0, 30)

This method return an array of all objects MarkerEntity.

Example return:

[
  {
    "id": 17,
    "updatedDate": "2023-12-18T08:53:37.422Z",
    "version": 10,
    "identifier": "catalog",
    "name": "string",
    "marker": "string",
    "localizeInfos": {
      "title": "My marker"
    }
  }
]

id: number object identifier example: 1764

updatedDate: string($date-time) object modification date

version: number version number of the object change example: 10

identifier?: string textual identifier for a record field example: catalog

name?: string name

marker?: string textual identifier

localizeInfos: CommonLocalizeInfos localized marker name example: OrderedMap { "en_US": OrderedMap { "title": "My marker" } }

Markers.getMarkerById(id)

const value = await Markers.getMarkerById(1)

This method return one object of MarkerEntity by id.

Example return:

{
  "id": 17,
  "updatedDate": "2023-12-18T08:55:22.581Z",
  "version": 10,
  "identifier": "catalog",
  "name": "string",
  "marker": "string",
  "localizeInfos": {
    "title": "My marker"
  }
}

id: number object identifier example: 1764

updatedDate: string($date-time) object modification date

version: number version number of the object change example: 10

identifier?: string textual identifier for a record field example: catalog

name?: string name

marker?: string textual identifier

localizeInfos: CommonLocalizeInfos localized marker name example: OrderedMap { "en_US": OrderedMap { "title": "My marker" } }

Markers.getMarkerByMarker(marker)

const value = await Markers.getMarkerByMarker('my-marker')

This method return one object of MarkerEntity by marker.

Example return:

{
  "id": 17,
  "updatedDate": "2023-12-18T08:59:42.006Z",
  "version": 10,
  "identifier": "catalog",
  "name": "string",
  "marker": "string",
  "localizeInfos": {
    "title": "My marker"
  }
}

id: number object identifier example: 1764

updatedDate: string($date-time) object modification date

version: number version number of the object change example: 10

identifier?: string textual identifier for a record field example: catalog

name?: string name

marker?: string textual identifier

localizeInfos: CommonLocalizeInfos localized marker name example: OrderedMap { "en_US": OrderedMap { "title": "My marker" } }


Menus

const { Menus } = defineOneEntry('your-url')

Menus.getMenusByMarker(marker)

const value = await Menus.getMenusByMarker('my-marker')

This method retrieves a single menu object based on its marker (marker) from the API. It returns a Promise that resolves to a single menu object as a ContentMenuDto object with included pages.

Example return:

{
  "id": 1764,
  "identifier": "catalog",
  "localizeInfos": {
    "title": "Main Menu"
  },
  "pages": [
    {
      "id": 11,
      "pageUrl": "122",
      "localizeInfos": {
        "en_US": {
          "title": "12",
          "content": "",
          "menuTitle": "12"
        }
      },
      "position": 0,
      "parentId": null
    }
  ]
}

id: number object identifier example: 1764

identifier: string textual identifier for a record field example: catalog

localizeInfos Record<string, any> json object description of the menu item with the language "en_US" (for example) example: OrderedMap { "en_US": OrderedMap { "title": "Main Menu" } }

pages: data of the pages included in the menu example: List OrderedMap { "id": 11, "pageUrl": "122", "localizeInfos": OrderedMap { "en_US": OrderedMap { "title": "12", "plainContent": "Content for catalog", "htmlContent": "Content for catalog", "menuTitle": "12" } }, "position": 0, "parentId": null }


Pages

const { Pages } = defineOneEntry('your-url')

In some methods, the langcode parameter can be either a string or an array of strings. It depends on which set of values will contain "attributeValues" and "localizeInfos"

Example:

 const value = await Pages.getRootPages('en_US')
 
 "localizeInfos": {
      {
        "title": "Catalog",
        "content": "Content from catalog",
        "menuTitle": "Catalog"
      }
 },
 "attributeValues": {
      {
        "marker": {
          "value": "Value",
          "type": "string"
        }
      }
 }   

Or

const value = await Pages.getRootPages([ 'en_US', 'it_IT' ])

 "localizeInfos": {
      en_US: {
        "title": "Catalog",
        "content": "Content from catalog",
        "menuTitle": "Catalog"
      },
      it_IT: {
        "title": "Catalogo",
        "content": "Contenuto dal catalogo",
        "menuTitle": "Catalogo"
      }
 },
 "attributeValues": {
      en_US: {
        "marker": {
          "value": "Value",
          "type": "string"
        }
      },
      it_IT: {
        "marker": {
          "value": "Valore",
          "type": "string"
        }
      }
 }

Pages.getRootPages(langCode)

const value = await Pages.getRootPages('en_US')

This method retrieves all top-level page objects from the API. It returns a Promise that resolves to an array of ContentIndexedPageDto objects or an empty array [] if there is no data. Get required language parameter.

Example return:

[
  {
      "id": 1764,
      "parentId": null,
      "config": {
        "rowsPerPage": 1,
        "productsPerRow": 1
      },
      "pageUrl": "string",
      "depth": 3,
      "localizeInfos": {
        "title": "Catalog",
        "content": "Content for catalog",
        "menuTitle": "Catalog"
      },
      "isVisible": true,
      "products": 0,
      "attributeSetId": 7,
      "isSync": false,
      "templateIdentifier": "my-template",
      "attributeValues": {
        "marker": {
          "value": "",
          "type": "string"
        }
      },
      "position": 192,
      "type": "forNewsPage",
      "childrenCount": 0
  }
]

id: number object identifier example: 1764

parentId number parent page identifier, if null, it is a top-level page example: null

config Record<string, number> output settings for catalog pages example: OrderedMap { "rowsPerPage": 1, "productsPerRow": 1 }

pageUrl string unique page URL

depth number page nesting depth relative to parentId example: 3

localizeInfos: Record<string, any> json description of the main page data object taking into account the language "en_US" (for example) example: OrderedMap { "en_US": OrderedMap { "title": "Catalog", "plainContent": "Content for catalog", "htmlContent": "Content for catalog", "menuTitle": "Catalog" } }

isVisible: boolean Page visibility flag example: true

products number Number of products linked to the page example: 0

attributeSetId: number attribute set identifier example: 7

forms Array of FormEntity object identifier values linked to the page (optional)

blocks Array of BlockEntity object identifier values linked to the page (optional)

isSync: boolean indicator of page indexing (true or false) example: false

templateIdentifier: string Custom identifier of the linked template example: my-template

attributeValues: Record<string, string> Array of attribute values from the index (presented as a pair of custom attribute identifier: attribute value) example: OrderedMap { "en_US": OrderedMap { "marker": OrderedMap { "value": "", "type": "string" } } }

position: number position number for sorting (optional) example: 192

type: string Page type example: forNewsPage Enum: forCatalogProducts, forBasketPage, forErrorPage, forCatalogPages, forProductPreview, forProductPage, forSimilarProductBlock, forStatisticProductBlock, forProductBlock, forForm, forFormField, forNewsPage, forNewsBlock, forNewsPreview, forOneNewsPage, forUsualPage, forTextBlock, forSlider, service

childrenCount: number number of nested pages example: 0

Pages.getCatalogPages(langCode, limit, offset)

const value = await Pages.getCatalogPages('en_US', 0, 30)

This method retrieves all page objects with product information as an array from the API. It accepts two optional parameters limit and offset for pagination and language code parameter. It returns a Promise that resolves to an array of ContentIndexedPageDto objects or an empty array [] if there is no data.

Example return:

[
  {
      "id": 1764,
      "parentId": null,
      "config": {
        "rowsPerPage": 1,
        "productsPerRow": 1
      },
      "pageUrl": "string",
      "depth": 3,
      "localizeInfos": {
        "title": "Catalog",
        "content": "Content for catalog",
        "menuTitle": "Catalog"
      },
      "isVisible": true,
      "products": 0,
      "attributeSetId": 7,
      "isSync": false,
      "templateIdentifier": "my-template",
      "attributeValues": {
        "marker": {
          "value": "",
          "type": "string"
        }
      },
      "position": 192,
      "type": "forNewsPage",
      "childrenCount": 0
  }
]

id: number object identifier example: 1764

parentId number parent page identifier, if null, it is a top-level page example: null

config Record<string, number> output settings for catalog pages example: OrderedMap { "rowsPerPage": 1, "productsPerRow": 1 }

pageUrl string unique page URL

depth number page nesting depth relative to parentId example: 3

localizeInfos: Record<string, any> json description of the main page data object taking into account the language "en_US" (for example) example: OrderedMap { "en_US": OrderedMap { "title": "Catalog", "plainContent": "Content for catalog", "htmlContent": "Content for catalog", "menuTitle": "Catalog" } }

isVisible: boolean Page visibility flag example: true

products number Number of products linked to the page example: 0

attributeSetId: number attribute set identifier example: 7

forms Array of FormEntity object identifier values linked to the page (optional)

blocks Array of BlockEntity object identifier values linked to the page (optional)

isSync: boolean indicator of page indexing (true or false) example: false

templateIdentifier: string Custom identifier of the linked template example: my-template

attributeValues: Record<string, string> Array of attribute values from the index (presented as a pair of custom attribute identifier: attribute value) example: OrderedMap { "en_US": OrderedMap { "marker": OrderedMap { "value": "", "type": "string" } } }

position: number position number for sorting (optional) example: 192

type: string Page type example: forNewsPage Enum: forCatalogProducts, forBasketPage, forErrorPage, forCatalogPages, forProductPreview, forProductPage, forSimilarProductBlock, forStatisticProductBlock, forProductBlock, forForm, forFormField, forNewsPage, forNewsBlock, forNewsPreview, forOneNewsPage, forUsualPage, forTextBlock, forSlider, service

childrenCount: number number of nested pages example: 0

Pages.getPages(langCode)

const value = await Pages.getPages('en_US')

This method retrieves all created pages as an array from the API. It returns a Promise that resolves to an array of ContentIndexedPageDto objects or an empty array [] if there is no data. Get required language parameter.

Example return:

[
  {
      "id": 1764,
      "parentId": null,
      "config": {
        "rowsPerPage": 1,
        "productsPerRow": 1
      },
      "pageUrl": "string",
      "depth": 3,
      "localizeInfos": {
        "title": "Catalog",
        "content": "Content for catalog",
        "menuTitle": "Catalog"
      },
      "isVisible": true,
      "products": 0,
      "attributeSetId": 7,
      "isSync": false,
      "templateIdentifier": "my-template",
      "attributeValues": {
        "marker": {
          "value": "",
          "type": "string"
        }
      },
      "position": 192,
      "type": "forNewsPage",
      "childrenCount": 0
  }
]

id: number object identifier example: 1764

parentId number parent page identifier, if null, it is a top-level page example: null

config Record<string, number> output settings for catalog pages example: OrderedMap { "rowsPerPage": 1, "productsPerRow": 1 }

pageUrl string unique page URL

depth number page nesting depth relative to parentId example: 3

localizeInfos: Record<string, any> json description of the main page data object taking into account the language "en_US" (for example) example: OrderedMap { "en_US": OrderedMap { "title": "Catalog", "plainContent": "Content for catalog", "htmlContent": "Content for catalog", "menuTitle": "Catalog" } }

isVisible: boolean Page visibility flag example: true

products number Number of products linked to the page example: 0

attributeSetId: number attribute set identifier example: 7

forms Array of FormEntity object identifier values linked to the page (optional)

blocks Array of BlockEntity object identifier values linked to the page (optional)

isSync: boolean indicator of page indexing (true or false) example: false

templateIdentifier: string Custom identifier of the linked template example: my-template

attributeValues: Record<string, string> Array of attribute values from the index (presented as a pair of custom attribute identifier: attribute value) example: OrderedMap { "en_US": OrderedMap { "marker": OrderedMap { "value": "", "type": "string" } } }

position: number position number for sorting (optional) example: 192

type: string Page type example: forNewsPage Enum: forCatalogProducts, forBasketPage, forErrorPage, forCatalogPages, forProductPreview, forProductPage, forSimilarProductBlock, forStatisticProductBlock, forProductBlock, forForm, forFormField, forNewsPage, forNewsBlock, forNewsPreview, forOneNewsPage, forUsualPage, forTextBlock, forSlider, service

childrenCount: number number of nested pages example: 0

Pages.getPageById(id, langCode)

const value = await Pages.getPageById(1, 'en_US')

This method retrieves a single page object based on its identifier (id) from the API. It returns a Promise that resolves to the page object, with the specific DTO depending on the type of page being returned. Get required language parameter.

Example return:

{
  "id": 1764,
  "parentId": null,
  "pageUrl": "string",
  "depth": 3,
  "localizeInfos": {
    "title": "Catalog",
    "content": "Content for catalog",
    "menuTitle": "Catalog"
  },
  "isVisible": true,
  "position": 192,
  "type": "forNewsPage",
  "templateIdentifier": "my-template",
  "attributeSetId": 7,
  "attributeValues": {
    "marker": "description",
    "type": "string",
    "value": ""
  },
  "isSync": false,
  "products": 0
}

id: number object identifier example: 1764

parentId number parent page identifier, if null, it is a top-level page example: null

pageUrl string unique page URL

depth number page nesting depth relative to parentId example: 3

localizeInfos: Record<string, any> json description of the main page data object taking into account the language "en_US" (for example) example: OrderedMap { "en_US": OrderedMap { "title": "Catalog", "plainContent": "Content for catalog", "htmlContent": "Content for catalog", "menuTitle": "Catalog" } }

isVisible: boolean Page visibility flag example: true

position: number position number (for sorting) example: 192

type string page type: example: forNewsPage Enum: forCatalogProducts, forBasketPage, forErrorPage, forCatalogPages, forProductPreview, forProductPage, forSimilarProductBlock, forStatisticProductBlock, forProductBlock, forForm, forFormField, forNewsPage, forNewsBlock, forNewsPreview, forOneNewsPage, forUsualPage, forTextBlock, forSlider, service

templateIdentifier: string custom identifier of the associated template example: my-template

attributeSetId: number attribute set identifier example: 7

forms Array of FormEntity object identifier values linked to the page (optional)

blocks Array of BlockEntity object identifier values linked to the page (optional)

isSync: boolean indicator of page indexing (true or false) example: false

products number number of products associated with the page example: 0

Pages.getPageByUrl(url, langCode)

const value = await Pages.getPageByUrl('shop', 'en_US')

This method retrieves a single page object based on its URL (url) from the API. It returns a Promise that resolves to the page object, with the specific DTO depending on the type of page being returned. Get required language parameter.

Example return:

{
  "id": 1764,
  "parentId": null,
  "pageUrl": "string",
  "depth": 3,
  "localizeInfos": {
    "title": "Catalog",
    "content": "Content for catalog",
    "menuTitle": "Catalog"
  },
  "isVisible": true,
  "position": 192,
  "type": "forNewsPage",
  "templateIdentifier": "my-template",
  "attributeSetId": 7,
  "attributeValues": {
    "marker": "description",
    "type": "string",
    "value": ""
  },
  "isSync": false,
  "products": 0
}

id: number object identifier example: 1764

parentId number parent page identifier, if null, it is a top-level page example: null

pageUrl string unique page URL

depth number page nesting depth relative to parentId example: 3

localizeInfos: Record<string, any> json description of the main page data object taking into account the language "en_US" (for example) example: OrderedMap { "en_US": OrderedMap { "title": "Catalog", "plainContent": "Content for catalog", "htmlContent": "Content for catalog", "menuTitle": "Catalog" } }

isVisible: boolean Page visibility flag example: true

position: number position number (for sorting) example: 192

type string page type: example: forNewsPage Enum: forCatalogProducts, forBasketPage, forErrorPage, forCatalogPages, forProductPreview, forProductPage, forSimilarProductBlock, forStatisticProductBlock, forProductBlock, forForm, forFormField, forNewsPage, forNewsBlock, forNewsPreview, forOneNewsPage, forUsualPage, forTextBlock, forSlider, service

templateIdentifier: string custom identifier of the associated template example: my-template

attributeSetId: number attribute set identifier example: 7

forms Array of FormEntity object identifier values linked to the page (optional)

blocks Array of BlockEntity object identifier values linked to the page (optional)

isSync: boolean indicator of page indexing (true or false) example: false

products number number of products associated with the page example: 0

Pages.getChildPagesByParentUrl(url, langCode)

const value = await Pages.getChildPagesByParentUrl('shop', 'en_US')

Getting child pages with information about products in the form of an array. Returns all created pages as an array of AdminIndexedPageDto objects or an empty array [] (if there is no data) for the selected parent.

Example return:

[
  {
    "id": 1764,
    "parentId": null,
    "config": {
      "rowsPerPage": 1,
      "productsPerRow": 1
    },
    "pageUrl": "string",
    "depth": 3,
    "localizeInfos": {
      "title": "Catalog",
      "plainContent": "Content for catalog",
      "htmlContent": "<b>Content for catalog</b>",
      "menuTitle": "Catalog"
    },
    "isVisible": true,
    "products": 0,
    "attributeSetId": 7,
    "forms": [
      null
    ],
    "blocks": [
      null
    ],
    "isSync": false,
    "templateIdentifier": "my-template",
    "attributeValues": {
      "marker": {
        "value": "",
        "type": "string"
      }
    },
    "position": 192,
    "type": "forNewsPage",
    "childrenCount": 0
  }
]

id: number object identifier example: 1764

parentId number parent page identifier, if null, it is a top-level page example: null

config Record<string, number> output settings for catalog pages example: OrderedMap { "rowsPerPage": 1, "productsPerRow": 1 }

pageUrl string unique page URL

depth number page nesting depth relative to parentId example: 3

localizeInfos: Record<string, any> json description of the main page data object taking into account the language "en_US" (for example) example: OrderedMap { "en_US": OrderedMap { "title": "Catalog", "plainContent": "Content for catalog", "htmlContent": "Content for catalog", "menuTitle": "Catalog" } }

isVisible: boolean Page visibility flag example: true

products number Number of products linked to the page example: 0

attributeSetId: number attribute set identifier example: 7

forms Array of FormEntity object identifier values linked to the page (optional)

blocks Array of BlockEntity object identifier values linked to the page (optional)

isSync: boolean indicator of page indexing (true or false) example: false

templateIdentifier: string Custom identifier of the linked template example: my-template

attributeValues: Record<string, string> Array of attribute values from the index (presented as a pair of custom attribute identifier: attribute value) example: OrderedMap { "en_US": OrderedMap { "marker": OrderedMap { "value": "", "type": "string" } } }

position: number position number for sorting (optional) example: 192

type: string Page type example: forNewsPage Enum: forCatalogProducts, forBasketPage, forErrorPage, forCatalogPages, forProductPreview, forProductPage, forSimilarProductBlock, forStatisticProductBlock, forProductBlock, forForm, forFormField, forNewsPage, forNewsBlock, forNewsPreview, forOneNewsPage, forUsualPage, forTextBlock, forSlider, service

childrenCount: number number of nested pages example: 0

Pages.getBlocksByPageUrl(url, langCode)

const value = await Pages.getFormsByPageUrl('shop', 'en_US')

Get PositionBlock objects for a related form by url. Returns an array of PositionBlock objects.

Example return:

[
  {
    "id": 1764,
    "version": 10,
    "identifier": "catalog",
    "attributeSetId": 0,
    "localizeInfos": {
      "title": "My block"
    },
    "customSettings": {
      "sliderDelay": 0,
      "sliderDelayType": "",
      "productQuantity": 4,
      "productSortType": "By_ID",
      "productSortOrder": "Descending",
      "productCountElementsPerRow": 10,
      "similarProductRules": [
        {
          "property": "Descending",
          "includes": "",
          "keywords": "",
          "strict": ""
        }
      ]
    },
    "position": 0,
    "isSync": false,
    "attributeValues": {
      "marker": {
        "value": "",
        "type": "string"
      }
    },
    "type": "forNewsPage",
    "templateIdentifier": null
  }
]

id: number object identifier example: 1764

version number object version number example: 10

identifier: string text identifier for the record field example: catalog

attributeSetId: number attribute set identifier example: 7

localizeInfos: Record<string, any> json description of the main page data object taking into account the language "en_US" (for example) example: OrderedMap { "en_US": OrderedMap { "title": "Catalog", "plainContent": "Content for catalog", "htmlContent": "Content for catalog", "menuTitle": "Catalog" } }

customSettings: BlockCustomSettings custom settings for different types of blocks example: OrderedMap { "sliderDelay": 0, "sliderDelayType": "", "productQuantity": 4, "productSortType": "By_ID", "productSortOrder": "Descending", "productCountElementsPerRow": 10, "similarProductRules": List OrderedMap { "property": "Descending", "includes": "", "keywords": "", "strict": "" } }

isSync: boolean indicator of page indexing (true or false) example: false

attributeValues: Record<string, string> Array of attribute values from the index (presented as a pair of custom attribute identifier: attribute value) example: OrderedMap { "en_US": OrderedMap { "marker": OrderedMap { "value": "", "type": "string" } } }

position: number position number for sorting (optional) example: 192

type: string Page type example: forNewsPage Enum: forCatalogProducts, forBasketPage, forErrorPage, forCatalogPages, forProductPreview, forProductPage, forSimilarProductBlock, forStatisticProductBlock, forProductBlock, forForm, forFormField, forNewsPage, forNewsBlock, forNewsPreview, forOneNewsPage, forUsualPage, forTextBlock, forSlider, service

templateIdentifier: string marker of the template used by the block (can be null) example: null

Pages.getFormsByPageUrl(url, langCode)

const value = await Pages.getFormsByPageUrl('shop', 'en_US')

Get PositionForm objects for a related form by url. Returns an array of PositionForm objects.

Example return:

[
  {
    "id": 1764,
    "version": 10,
    "identifier": "catalog",
    "attributeSetId": 0,
    "processingType": "email",
    "localizeInfos": {
      "title": "My form",
      "titleForSite": "",
      "successMessage": "",
      "unsuccessMessage": "",
      "urlAddress": "",
      "database": "0",
      "script": "0"
    },
    "processingData": {},
    "position": 0,
    "attributes": [
      {
        "type": "list",
        "marker": "l1",
        "position": 2,
        "listTitles": [
          {
            "title": "red",
            "value": 1,
            "position": 1,
            "extendedValue": null,
            "extendedValueType": null
          },
          {
            "title": "yellow",
            "value": 2,
            "position": 2,
            "extendedValue": null,
            "extendedValueType": null
          }
        ],
        "validators": {},
        "localizeInfos": {
          "title": "l1"
        }
      }
    ]
  }
]

id: number object identifier example: 1764

version number object version number example: 10

identifier: string text identifier for the record field example: catalog

attributeSetId: number attribute set identifier example: 7

processingType: string form processing type example: email Enum: db, email, script

localizeInfos: Record<string, any> json description of the main page data object taking into account the language "en_US" (for example) example: OrderedMap { "en_US": OrderedMap { "title": "Catalog", "plainContent": "Content for catalog", "htmlContent": "Content for catalog", "menuTitle": "Catalog" } }

processingData: form data

attributes: Record<string, string> array of attribute values from the used attribute set for displaying the form (taking into account the specified language) example: List [ OrderedMap { "type": "list", "marker": "l1", "position": 2, "listTitles": List OrderedMap { "title": "red", "value": 1, "position": 1, "extendedValue": null, "extendedValueType": null }, OrderedMap { "title": "yellow", "value": 2, "position": 2, "extendedValue": null, "extendedValueType": null } , "validators": OrderedMap {}, "localizeInfos": OrderedMap { "title": "l1" } } ]

position: number position number for sorting (optional) example: 192

Pages.getConfigPageByUrl(url)

const value = await Pages.getConfigPageByUrl('shop')

This method retrieves the settings for a specific page based on its URL (url). It returns a Promise that resolves to a ConfigPageDto object with page display settings.

Example return:

{
  "rowsPerPage": 10,
  "productsPerRow": 10
}

rowsPerPage: number Number of rows per page example: 10

productsPerRow number Number of products per row example: 10

Pages.searchPage(name, langCode)

const value = await Pages.searchPage('cup', 'en_US')

This method performs a quick search for page objects based on a text query (name). It returns a Promise that resolves to a ContentIndexedPageDto objects or an empty array []. Get required language parameter.

Example return:

[
  {
      "id": 1764,
      "parentId": null,
      "pageUrl": "string",
      "depth": 3,
      "localizeInfos": {
        "title": "Catalog",
        "content": "Content for catalog",
        "menuTitle": "Catalog"
      },
      "isVisible": true,
      "position": 192,
      "type": "forNewsPage",
      "templateIdentifier": "my-template",
      "attributeSetId": 7,
      "attributeValues": {
        "marker": "description",
        "type": "string",
        "value": ""
      },
      "isSync": false,
      "products": 0
    }
]

Products

const { Products } = defineOneEntry('your-url')

This module accepts a set of user parameters called userQuery. If the parameters are not passed to the method, the default value will be applied.

Parameters:

const userQuery = {
    offset: 0,
    limit: 30,
    statusMarker: null,
    conditionValue: null,
    conditionMarker: null,
    attributeMarker: null,
    sortOrder: 'DESC',
    sortKey: 'id'
}

"conditionMarker" by which values are filtered (not set by default), possible values:

'in' - Contains,

'nin' - Does not contain,

'eq' - Equal,

'neq' - Not equal,

'mth' - Greater than,

'lth' - Less than,

'exs' - Exists,

'nexs' - Does not exist

In some methods, the langcode parameter (default 'en_US') can be either a string or an array of strings. It depends on which set of values will contain "attributeValues" and "localizeInfos"

Example

 const value = await Products.getProducts('en_US')
 
 "localizeInfos": {
      {
        "title": "Catalog",
        "content": "Content from catalog",
        "menuTitle": "Catalog"
      }
 },
 "attributeValues": {
      {
        "marker": {
          "value": "Value",
          "type": "string"
        }
      }
 }   

Or

const value = await Products.getProducts([ 'en_US', 'it_IT' ])

 "localizeInfos": {
      en_US: {
        "title": "Catalog",
        "content": "Content from catalog",
        "menuTitle": "Catalog"
      },
      it_IT: {
        "title": "Catalogo",
        "content": "Contenuto dal catalogo",
        "menuTitle": "Catalogo"
      }
 },
 "attributeValues": {
      en_US: {
        "marker": {
          "value": "Value",
          "type": "string"
        }
      },
      it_IT: {
        "marker": {
          "value": "Valore",
          "type": "string"
        }
      }
 }

Products.getProducts(langCode, userQuery)

const value = await Products.getProducts('en_US', userQuery)

This method searches for product page objects with pagination and filtering based on the provided query parameters (userQuery). It returns a Promise that resolves to a list of products (IProduct[]).

Example return:

[
    {
      "id": 1764,
      "localizeInfos": {
        "title": "Product"
      },
      "isVisible": true,
      "statusId": 1,
      "relatedIds": [
        1,
        2,
        3
      ],
      "attributeSetId": 7,
      "isSync": true,
      "price": 0,
      "templateIdentifier": "my-template",
      "shortDescTemplateIdentifier": "my-template-short",
      "attributeValues": {
        "marker": {
          "value": "",
          "type": "string"
        }
      },
      "position": 1
    }
]

id: number object identifier example: 1764

localizeInfos: Record<string, any> json description of the main page data object taking into account the language "en_US" (for example) example: OrderedMap { "en_US": OrderedMap { "title": "Catalog", "plainContent": "Content for catalog", "htmlContent": "Content for catalog", "menuTitle": "Catalog" } }

isVisible: boolean Page visibility flag example: true

position: number position number (for sorting) example: 192

templateIdentifier: string custom identifier of the associated template example: my-template

attributeSetId: number attribute set identifier example: 7

isSync: boolean indicator of page indexing (true or false) example: false

attributeValues: Record<string, string> Array of attribute values from the index (presented as a pair of custom attribute identifier: attribute value) example: OrderedMap { "en_US": OrderedMap { "marker": OrderedMap { "value": "", "type": "string" } } }

statusId: number status identifiers of the product page (can be null) example: 1

relatedIds: array identifiers of related product pages example: List 1, 2, 3

price: number price value of the product page taken from the index example: 0

templateIdentifier string custom identifier of the associated template example: my-template

shortDescTemplateIdentifier string custom identifier of the associated template for short description example: my-template-short

Products.getProductsEmptyPage(langCode, userQuery)

const value = await Products.getProductsEmptyPage('en_US', userQuery)

This method searches for product page objects with pagination that do not have a category, based on the provided query parameters (userQuery). It returns a Promise that resolves to an array of items, where each item is a ContentIndexedProductDto object.

Example return:

[
    {
      "id": 1764,
      "localizeInfos": {
        "title": "Product"
      },
      "isVisible": true,
      "statusId": 1,
      "relatedIds": [
        1,
        2,
        3
      ],
      "attributeSetId": 7,
      "isSync": true,
      "price": 0,
      "templateIdentifier": "my-template",
      "shortDescTemplateIdentifier": "my-template-short",
      "attributeValues": {
        "marker": {
          "value": "",
          "type": "string"
        }
      },
      "position": 1
    }
]

id: number object identifier example: 1764

localizeInfos: Record<string, any> json description of the main page data object taking into account the language "en_US" (for example) example: OrderedMap { "en_US": OrderedMap { "title": "Catalog", "plainContent": "Content for catalog", "htmlContent": "Content for catalog", "menuTitle": "Catalog" } }

isVisible: boolean Page visibility flag example: true

position: number position number (for sorting) example: 192

templateIdentifier: string custom identifier of the associated template example: my-template

attributeSetId: number attribute set identifier example: 7

isSync: boolean indicator of page indexing (true or false) example: false

attributeValues: Record<string, string> Array of attribute values from the index (presented as a pair of custom attribute identifier: attribute value) example: OrderedMap { "en_US": OrderedMap { "marker": OrderedMap { "value": "", "type": "string" } } }

statusId: number status identifiers of the product page (can be null) example: 1

relatedIds: array identifiers of related product pages example: List 1, 2, 3

price: number price value of the product page taken from the index example: 0

templateIdentifier string custom identifier of the associated template example: my-template

shortDescTemplateIdentifier string custom identifier of the associated template for short description example: my-template-short

Products.getProductsPageById(id, langCode, userQuery)

const value = await Products.getProductsPageById(1, 'en_US', userQuery)

This method searches for all product page objects with pagination for the selected category based on the page identifier (id). It accepts an optional userQuery parameter to set query parameters for the search. The query parameters include limit, offset, statusMarker, conditionValue, conditionMarker, attributeMarker, sortOrder, and sortKey. It returns a Promise that resolves to an array of ContentIndexedProductDto objects.

Example return:

{
  "id": 1764,
  "localizeInfos": {
    "title": "Product"
  },
  "isVisible": true,
  "statusId": 1,
  "relatedIds": [
    1,
    2,
    3
  ],
  "productPages": [
    {
      "id": 8997,
      "pageId": 1176,
      "productId": 8872
    }
  ],
  "attributeSetId": 7,
  "version": 10,
  "isSync": 0,
  "price": 0,
  "templateIdentifier": "my-template",
  "shortDescTemplateIdentifier": "my-template-short",
  "attributeValues": {
    "marker": {
      "value": "",
      "type": "string"
    }
  },
  "position": 1
}

id: number object identifier example: 1764

localizeInfos: Record<string, any> json description of the main page data object taking into account the language "en_US" (for example) example: OrderedMap { "en_US": OrderedMap { "title": "Catalog", "plainContent": "Content for catalog", "htmlContent": "Content for catalog", "menuTitle": "Catalog" } }

isVisible: boolean Page visibility flag example: true

position: number position number (for sorting) example: 192

templateIdentifier: string custom identifier of the associated template example: my-template

attributeSetId: number attribute set identifier example: 7

isSync: boolean indicator of page indexing (true or false) example: false

attributeValues: Record<string, string> Array of attribute values from the index (presented as a pair of custom attribute identifier: attribute value) example: OrderedMap { "en_US": OrderedMap { "marker": OrderedMap { "value": "", "type": "string" } } }

statusId: number status identifiers of the product page (can be null) example: 1

relatedIds: array identifiers of related product pages example: List 1, 2, 3

price: number price value of the product page taken from the index example: 0

templateIdentifier string custom identifier of the associated template example: my-template

shortDescTemplateIdentifier string custom identifier of the associated template for short description example: my-template-short

Products.getProductsPageByUrl(url, langCode, userQuery)

const value = await Products.getProductsPageByUrl('cup', 'en_US', userQuery)
1.0.503

10 months ago

1.0.502

10 months ago

1.0.501

10 months ago

1.0.500

10 months ago

1.0.495

10 months ago

1.0.494

10 months ago

1.0.497

10 months ago

1.0.496

10 months ago

1.0.491

10 months ago

1.0.490

10 months ago

1.0.493

10 months ago

1.0.492

10 months ago

1.0.499

10 months ago

1.0.498

10 months ago

1.0.489

10 months ago

1.0.486

10 months ago

1.0.488

10 months ago

1.0.487

10 months ago

1.0.440

11 months ago

1.0.442

11 months ago

1.0.441

11 months ago

1.0.448

11 months ago

1.0.447

11 months ago

1.0.449

11 months ago

1.0.444

11 months ago

1.0.443

11 months ago

1.0.446

11 months ago

1.0.445

11 months ago

1.0.431

12 months ago

1.0.437

12 months ago

1.0.436

12 months ago

1.0.439

11 months ago

1.0.438

11 months ago

1.0.433

12 months ago

1.0.432

12 months ago

1.0.435

12 months ago

1.0.434

12 months ago

1.0.462

11 months ago

1.0.461

11 months ago

1.0.464

11 months ago

1.0.463

11 months ago

1.0.460

11 months ago

1.0.469

11 months ago

1.0.466

11 months ago

1.0.465

11 months ago

1.0.468

11 months ago

1.0.467

11 months ago

1.0.451

11 months ago

1.0.450

11 months ago

1.0.453

11 months ago

1.0.452

11 months ago

1.0.459

11 months ago

1.0.458

11 months ago

1.0.455

11 months ago

1.0.454

11 months ago

1.0.457

11 months ago

1.0.456

11 months ago

1.0.483

11 months ago

1.0.480

11 months ago

1.0.482

11 months ago

1.0.481

11 months ago

1.0.473

11 months ago

1.0.472

11 months ago

1.0.475

11 months ago

1.0.474

11 months ago

1.0.471

11 months ago

1.0.470

11 months ago

1.0.477

11 months ago

1.0.476

11 months ago

1.0.479

11 months ago

1.0.478

11 months ago

1.0.420

1 year ago

1.0.426

1 year ago

1.0.425

1 year ago

1.0.428

1 year ago

1.0.427

1 year ago

1.0.422

1 year ago

1.0.421

1 year ago

1.0.424

1 year ago

1.0.423

1 year ago

1.0.419

1 year ago

1.0.418

1 year ago

1.0.415

1 year ago

1.0.414

1 year ago

1.0.417

1 year ago

1.0.416

1 year ago

1.0.411

1 year ago

1.0.410

1 year ago

1.0.413

1 year ago

1.0.412

1 year ago

1.0.408

1 year ago

1.0.407

1 year ago

1.0.409

1 year ago

1.0.321

1 year ago

1.0.320

1 year ago

1.0.327

1 year ago

1.0.326

1 year ago

1.0.329

1 year ago

1.0.328

1 year ago

1.0.323

1 year ago

1.0.322

1 year ago

1.0.325

1 year ago

1.0.324

1 year ago

1.0.319

1 year ago

1.0.310

1 year ago

1.0.430

1 year ago

1.0.316

1 year ago

1.0.315

1 year ago

1.0.318

1 year ago

1.0.317

1 year ago

1.0.312

1 year ago

1.0.311

1 year ago

1.0.314

1 year ago

1.0.313

1 year ago

1.0.429

1 year ago

1.0.404

1 year ago

1.0.403

1 year ago

1.0.406

1 year ago

1.0.405

1 year ago

1.0.400

1 year ago

1.0.402

1 year ago

1.0.401

1 year ago

1.0.385

1 year ago

1.0.384

1 year ago

1.0.387

1 year ago

1.0.386

1 year ago

1.0.381

1 year ago

1.0.380

1 year ago

1.0.383

1 year ago

1.0.382

1 year ago

1.0.389

1 year ago

1.0.388

1 year ago

1.0.374

1 year ago

1.0.373

1 year ago

1.0.376

1 year ago

1.0.375

1 year ago

1.0.370

1 year ago

1.0.372

1 year ago

1.0.371

1 year ago

1.0.378

1 year ago

1.0.377

1 year ago

1.0.379

1 year ago

1.0.396

1 year ago

1.0.395

1 year ago

1.0.398

1 year ago

1.0.397

1 year ago

1.0.392

1 year ago

1.0.391

1 year ago

1.0.394

1 year ago

1.0.399

1 year ago

1.0.390

1 year ago

1.0.341

1 year ago

1.0.340

1 year ago

1.0.343

1 year ago

1.0.342

1 year ago

1.0.349

1 year ago

1.0.348

1 year ago

1.0.345

1 year ago

1.0.344

1 year ago

1.0.347

1 year ago

1.0.346

1 year ago

1.0.330

1 year ago

1.0.332

1 year ago

1.0.331

1 year ago

1.0.338

1 year ago

1.0.337

1 year ago

1.0.339

1 year ago

1.0.334

1 year ago

1.0.333

1 year ago

1.0.336

1 year ago

1.0.335

1 year ago

1.0.363

1 year ago

1.0.362

1 year ago

1.0.365

1 year ago

1.0.364

1 year ago

1.0.361

1 year ago

1.0.360

1 year ago

1.0.367

1 year ago

1.0.366

1 year ago

1.0.369

1 year ago

1.0.368

1 year ago

1.0.352

1 year ago

1.0.351

1 year ago

1.0.354

1 year ago

1.0.353

1 year ago

1.0.350

1 year ago

1.0.359

1 year ago

1.0.356

1 year ago

1.0.355

1 year ago

1.0.358

1 year ago

1.0.357

1 year ago

1.0.309

1 year ago

1.0.308

1 year ago

1.0.305

1 year ago

1.0.304

1 year ago

1.0.307

1 year ago

1.0.306

1 year ago

1.0.301

1 year ago

1.0.300

1 year ago

1.0.303

1 year ago

1.0.302

1 year ago

1.0.297

1 year ago

1.0.296

1 year ago

1.0.299

1 year ago

1.0.298

1 year ago

1.0.295

1 year ago

1.0.294

1 year ago

1.0.293

1 year ago

1.0.292

1 year ago

1.0.291

1 year ago

1.0.290

1 year ago

1.0.288

1 year ago

1.0.287

1 year ago

1.0.289

1 year ago

1.0.286

1 year ago

1.0.285

2 years ago

1.0.282

2 years ago

1.0.281

2 years ago

1.0.284

2 years ago

1.0.283

2 years ago

1.0.280

2 years ago

1.0.275

2 years ago

1.0.274

2 years ago

1.0.277

2 years ago

1.0.276

2 years ago

1.0.273

2 years ago

1.0.272

2 years ago

1.0.279

2 years ago

1.0.278

2 years ago

1.0.271

2 years ago

1.0.270

2 years ago

1.0.268

2 years ago

1.0.269

2 years ago

1.0.264

2 years ago

1.0.266

2 years ago

1.0.265

2 years ago

1.0.267

2 years ago

1.0.263

2 years ago

1.0.260

2 years ago

1.0.262

2 years ago

1.0.261

2 years ago

1.0.253

2 years ago

1.0.252

2 years ago

1.0.255

2 years ago

1.0.254

2 years ago

1.0.251

2 years ago

1.0.250

2 years ago

1.0.257

2 years ago

1.0.256

2 years ago

1.0.259

2 years ago

1.0.258

2 years ago

1.0.228

2 years ago

1.0.227

2 years ago

1.0.229

2 years ago

1.0.226

2 years ago

1.0.225

2 years ago

1.0.242

2 years ago

1.0.241

2 years ago

1.0.244

2 years ago

1.0.243

2 years ago

1.0.240

2 years ago

1.0.249

2 years ago

1.0.246

2 years ago

1.0.245

2 years ago

1.0.248

2 years ago

1.0.247

2 years ago

1.0.231

2 years ago

1.0.230

2 years ago

1.0.233

2 years ago

1.0.232

2 years ago

1.0.239

2 years ago

1.0.238

2 years ago

1.0.235

2 years ago

1.0.234

2 years ago

1.0.237

2 years ago

1.0.236

2 years ago

1.0.220

2 years ago

1.0.222

2 years ago

1.0.221

2 years ago

1.0.224

2 years ago

1.0.223

2 years ago

1.0.219

2 years ago

1.0.217

2 years ago

1.0.216

2 years ago

1.0.213

2 years ago

1.0.215

2 years ago

1.0.214

2 years ago

1.0.211

2 years ago

1.0.212

2 years ago

1.0.210

2 years ago

1.0.200

2 years ago

1.0.206

2 years ago

1.0.205

2 years ago

1.0.208

2 years ago

1.0.207

2 years ago

1.0.202

2 years ago

1.0.201

2 years ago

1.0.204

2 years ago

1.0.203

2 years ago

1.0.198

2 years ago

1.0.197

2 years ago

1.0.199

2 years ago

1.0.196

2 years ago

1.0.195

2 years ago

1.0.209

2 years ago

1.0.194

2 years ago

1.0.193

2 years ago

1.0.190

2 years ago

1.0.192

2 years ago

1.0.191

2 years ago

1.0.187

2 years ago

1.0.186

2 years ago

1.0.189

2 years ago

1.0.188

2 years ago

1.0.183

2 years ago

1.0.182

2 years ago

1.0.185

2 years ago

1.0.184

2 years ago

1.0.181

2 years ago

1.0.180

2 years ago

1.0.179

2 years ago

1.0.176

2 years ago

1.0.175

2 years ago

1.0.178

2 years ago

1.0.177

2 years ago

1.0.172

2 years ago

1.0.171

2 years ago

1.0.174

2 years ago

1.0.173

2 years ago

1.0.170

2 years ago

1.0.164

2 years ago

1.0.161

2 years ago

1.0.160

2 years ago

1.0.163

2 years ago

1.0.162

2 years ago

1.0.154

2 years ago

1.0.153

2 years ago

1.0.156

2 years ago

1.0.155

2 years ago

1.0.152

2 years ago

1.0.151

2 years ago

1.0.158

2 years ago

1.0.157

2 years ago

1.0.159

2 years ago

1.0.149

2 years ago

1.0.150

2 years ago

1.0.143

2 years ago

1.0.142

2 years ago

1.0.145

2 years ago

1.0.144

2 years ago

1.0.141

2 years ago

1.0.140

2 years ago

1.0.147

2 years ago

1.0.146

2 years ago

1.0.148

2 years ago

1.0.139

2 years ago

1.0.138

2 years ago

1.0.137

2 years ago

1.0.136

2 years ago

1.0.135

2 years ago

1.0.132

2 years ago

1.0.131

2 years ago

1.0.134

2 years ago

1.0.133

2 years ago

1.0.130

2 years ago

1.0.107

2 years ago

1.0.106

2 years ago

1.0.109

2 years ago

1.0.108

2 years ago

1.0.121

2 years ago

1.0.120

2 years ago

1.0.123

2 years ago

1.0.122

2 years ago

1.0.129

2 years ago

1.0.128

2 years ago

1.0.125

2 years ago

1.0.124

2 years ago

1.0.127

2 years ago

1.0.126

2 years ago

1.0.110

2 years ago

1.0.112

2 years ago

1.0.111

2 years ago

1.0.118

2 years ago

1.0.117

2 years ago

1.0.119

2 years ago

1.0.114

2 years ago

1.0.113

2 years ago

1.0.116

2 years ago

1.0.115

2 years ago

1.0.105

2 years ago

1.0.104

2 years ago

1.0.103

2 years ago

1.0.102

2 years ago

1.0.101

2 years ago

1.0.100

2 years ago

1.0.99

2 years ago

1.0.98

2 years ago

1.0.97

2 years ago

1.0.96

2 years ago

1.0.95

2 years ago

1.0.94

2 years ago

1.0.93

2 years ago

1.0.92

2 years ago

1.0.91

2 years ago

1.0.90

2 years ago

1.0.89

2 years ago

1.0.87

2 years ago

1.0.86

2 years ago

1.0.85

2 years ago

1.0.84

2 years ago

1.0.83

2 years ago

1.0.82

2 years ago

1.0.81

2 years ago

1.0.80

2 years ago

1.0.79

2 years ago

1.0.78

2 years ago

1.0.77

2 years ago

1.0.76

2 years ago

1.0.75

2 years ago

1.0.74

2 years ago

1.0.73

2 years ago

1.0.72

2 years ago

1.0.71

2 years ago

1.0.70

2 years ago

1.0.69

2 years ago

1.0.68

2 years ago

1.0.67

2 years ago

1.0.66

2 years ago

1.0.65

2 years ago

1.0.64

2 years ago

1.0.63

2 years ago

1.0.62

2 years ago

1.0.61

2 years ago

1.0.60

2 years ago

1.0.59

2 years ago

1.0.58

2 years ago

1.0.57

2 years ago

1.0.56

2 years ago

1.0.55

2 years ago

1.0.54

2 years ago

1.0.53

2 years ago

1.0.52

2 years ago

1.0.51

2 years ago

1.0.50

2 years ago

1.0.49

2 years ago

1.0.48

2 years ago

1.0.47

2 years ago

1.0.46

2 years ago

1.0.45

2 years ago

1.0.44

2 years ago

1.0.43

2 years ago

1.0.42

2 years ago

1.0.41

2 years ago

1.0.40

2 years ago

1.0.38

2 years ago

1.0.37

2 years ago

1.0.36

2 years ago

1.0.35

2 years ago

1.0.34

2 years ago

1.0.33

2 years ago

1.0.30

2 years ago

1.0.29

2 years ago

1.0.28

2 years ago

1.0.27

2 years ago

1.0.26

2 years ago

1.0.25

2 years ago

1.0.24

2 years ago

1.0.23

2 years ago

1.0.22

2 years ago

1.0.20

2 years ago

1.0.19

2 years ago

1.0.18

2 years ago

1.0.17

2 years ago

1.0.16

2 years ago

1.0.15

2 years ago

1.0.13

2 years ago

1.0.12

2 years ago

1.0.11

2 years ago

1.0.10

2 years ago

1.0.9

2 years ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago