getTemplatePreviews
Getting all template objects.
TemplatePreviews?.getTemplatePreviews( langCode? );
Minimal example
const value = await TemplatePreviews.getTemplatePreviews()
Schema
langCode: string
Language code. Default: "en_US"
example: "en_US"
This method retrieves all template objects from the API. It returns a Promise that resolves to an array of TemplatePreviewsEntity template objects.
Example response
[
{
"id": 3,
"title": "Preview Templates",
"proportions": {
"default": {
"horizontal": {
"width": 234,
"height": 324,
"alignmentType": "middleBottom"
},
"vertical": {
"width": 2,
"height": 3,
"alignmentType": "leftTop"
},
"square": {
"side": 3,
"alignmentType": "leftTop"
}
}
},
"identifier": "preview-templates",
"version": 0,
"attributeValues": {},
"position": 1,
"isUsed": false
}
]
Schema
id: number
The unique identifier of the position.
example: 3
title: string
The name of the template preview.
example: "Product Template".
proportions: object
Object contains info by proportions template preview.
identifier: string
The textual identifier for the record field.
example: "preview-templates"
version: number
The version number of the object.
example: 1
attributeValues: AttributeType
Attribute values from index.
example:
{}
position: number
The position of the object.
example: 1
attributeSetIdentifier: string | null
Text identifier used for a set of attributes.
example: "attribute_set_1".