oneentry 1.0.10 → 1.0.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +91 -215
- package/dist/_cjs/admins/adminsApi.d.ts +14 -0
- package/dist/_cjs/admins/adminsApi.js +34 -0
- package/dist/_cjs/admins/adminsApi.js.map +1 -0
- package/dist/_cjs/admins/adminsInterfaces.d.ts +32 -0
- package/dist/_cjs/admins/adminsInterfaces.js +3 -0
- package/dist/_cjs/admins/adminsInterfaces.js.map +1 -0
- package/dist/_cjs/attribute-set/attributeSetApi.d.ts +24 -0
- package/dist/_cjs/attribute-set/attributeSetApi.js +49 -0
- package/dist/_cjs/attribute-set/attributeSetApi.js.map +1 -0
- package/dist/_cjs/attribute-set/attributeSetInterfaces.d.ts +23 -0
- package/dist/_cjs/attribute-set/attributeSetInterfaces.js +3 -0
- package/dist/_cjs/attribute-set/attributeSetInterfaces.js.map +1 -0
- package/dist/_cjs/base/oneEntry.d.ts +9 -0
- package/dist/_cjs/base/oneEntry.js +55 -0
- package/dist/_cjs/base/oneEntry.js.map +1 -0
- package/dist/_cjs/base/utils.d.ts +32 -0
- package/dist/_cjs/base/utils.js +32 -0
- package/dist/_cjs/base/utils.js.map +1 -0
- package/dist/_cjs/forms/formsApi.d.ts +26 -0
- package/dist/_cjs/forms/formsApi.js +56 -0
- package/dist/_cjs/forms/formsApi.js.map +1 -0
- package/dist/_cjs/forms/formsInterfaces.d.ts +28 -0
- package/dist/_cjs/forms/formsInterfaces.js +3 -0
- package/dist/_cjs/forms/formsInterfaces.js.map +1 -0
- package/dist/_cjs/formsData/formsDataApi.d.ts +41 -0
- package/dist/_cjs/formsData/formsDataApi.js +71 -0
- package/dist/_cjs/formsData/formsDataApi.js.map +1 -0
- package/dist/_cjs/formsData/formsDataInterfaces.d.ts +25 -0
- package/dist/_cjs/formsData/formsDataInterfaces.js +3 -0
- package/dist/_cjs/formsData/formsDataInterfaces.js.map +1 -0
- package/dist/_cjs/general-types/generalTypesApi.d.ts +14 -0
- package/dist/_cjs/general-types/generalTypesApi.js +34 -0
- package/dist/_cjs/general-types/generalTypesApi.js.map +1 -0
- package/dist/_cjs/general-types/generalTypesInterfaces.d.ts +9 -0
- package/dist/_cjs/general-types/generalTypesInterfaces.js +3 -0
- package/dist/_cjs/general-types/generalTypesInterfaces.js.map +1 -0
- package/dist/_cjs/index.d.ts +35 -0
- package/dist/_cjs/index.js +55 -0
- package/dist/_cjs/index.js.map +1 -0
- package/dist/_cjs/locales/localesApi.d.ts +14 -0
- package/dist/_cjs/locales/localesApi.js +34 -0
- package/dist/_cjs/locales/localesApi.js.map +1 -0
- package/dist/_cjs/locales/localesInterfaces.d.ts +15 -0
- package/dist/_cjs/locales/localesInterfaces.js +3 -0
- package/dist/_cjs/locales/localesInterfaces.js.map +1 -0
- package/dist/_cjs/markers/markersApi.d.ts +35 -0
- package/dist/_cjs/markers/markersApi.js +65 -0
- package/dist/_cjs/markers/markersApi.js.map +1 -0
- package/dist/_cjs/markers/markersInterfaces.d.ts +16 -0
- package/dist/_cjs/markers/markersInterfaces.js +3 -0
- package/dist/_cjs/markers/markersInterfaces.js.map +1 -0
- package/dist/_cjs/menus/menusApi.d.ts +16 -0
- package/dist/_cjs/menus/menusApi.js +36 -0
- package/dist/_cjs/menus/menusApi.js.map +1 -0
- package/dist/_cjs/menus/menusInterfaces.d.ts +18 -0
- package/dist/_cjs/menus/menusInterfaces.js +3 -0
- package/dist/_cjs/menus/menusInterfaces.js.map +1 -0
- package/dist/_cjs/modules/modulesApi.d.ts +14 -0
- package/dist/_cjs/modules/modulesApi.js +34 -0
- package/dist/_cjs/modules/modulesApi.js.map +1 -0
- package/dist/_cjs/modules/modulesInterfaces.d.ts +19 -0
- package/dist/_cjs/modules/modulesInterfaces.js +3 -0
- package/dist/_cjs/modules/modulesInterfaces.js.map +1 -0
- package/dist/_cjs/pages/pagesApi.d.ts +74 -0
- package/dist/_cjs/pages/pagesApi.js +137 -0
- package/dist/_cjs/pages/pagesApi.js.map +1 -0
- package/dist/_cjs/pages/pagesInterfaces.d.ts +39 -0
- package/dist/_cjs/pages/pagesInterfaces.js +3 -0
- package/dist/_cjs/pages/pagesInterfaces.js.map +1 -0
- package/dist/_cjs/product-statuses/productStatusesApi.d.ts +38 -0
- package/dist/_cjs/product-statuses/productStatusesApi.js +73 -0
- package/dist/_cjs/product-statuses/productStatusesApi.js.map +1 -0
- package/dist/_cjs/product-statuses/productStatusesInterfaces.d.ts +15 -0
- package/dist/_cjs/product-statuses/productStatusesInterfaces.js +3 -0
- package/dist/_cjs/product-statuses/productStatusesInterfaces.js.map +1 -0
- package/dist/_cjs/products/productsApi.d.ts +195 -0
- package/dist/_cjs/products/productsApi.js +295 -0
- package/dist/_cjs/products/productsApi.js.map +1 -0
- package/dist/_cjs/products/productsInterfaces.d.ts +83 -0
- package/dist/_cjs/products/productsInterfaces.js +3 -0
- package/dist/_cjs/products/productsInterfaces.js.map +1 -0
- package/dist/_cjs/templates/templatesApi.d.ts +32 -0
- package/dist/_cjs/templates/templatesApi.js +72 -0
- package/dist/_cjs/templates/templatesApi.js.map +1 -0
- package/dist/_cjs/templates/templatesInterfaces.d.ts +30 -0
- package/dist/_cjs/templates/templatesInterfaces.js +3 -0
- package/dist/_cjs/templates/templatesInterfaces.js.map +1 -0
- package/dist/_cjs/templates-preview/templatesPreviewApi.d.ts +30 -0
- package/dist/_cjs/templates-preview/templatesPreviewApi.js +60 -0
- package/dist/_cjs/templates-preview/templatesPreviewApi.js.map +1 -0
- package/dist/_cjs/templates-preview/templatesPreviewInterfaces.d.ts +27 -0
- package/dist/_cjs/templates-preview/templatesPreviewInterfaces.js +3 -0
- package/dist/_cjs/templates-preview/templatesPreviewInterfaces.js.map +1 -0
- package/dist/_esm/admins/adminsApi.d.ts +14 -0
- package/dist/_esm/admins/adminsApi.js +31 -0
- package/dist/_esm/admins/adminsApi.js.map +1 -0
- package/dist/_esm/admins/adminsInterfaces.d.ts +32 -0
- package/dist/_esm/admins/adminsInterfaces.js +2 -0
- package/dist/_esm/admins/adminsInterfaces.js.map +1 -0
- package/dist/_esm/attribute-set/attributeSetApi.d.ts +24 -0
- package/dist/_esm/attribute-set/attributeSetApi.js +46 -0
- package/dist/_esm/attribute-set/attributeSetApi.js.map +1 -0
- package/dist/_esm/attribute-set/attributeSetInterfaces.d.ts +23 -0
- package/dist/_esm/attribute-set/attributeSetInterfaces.js +2 -0
- package/dist/_esm/attribute-set/attributeSetInterfaces.js.map +1 -0
- package/dist/_esm/base/oneEntry.d.ts +9 -0
- package/dist/_esm/base/oneEntry.js +52 -0
- package/dist/_esm/base/oneEntry.js.map +1 -0
- package/dist/_esm/base/utils.d.ts +32 -0
- package/dist/_esm/base/utils.js +30 -0
- package/dist/_esm/base/utils.js.map +1 -0
- package/dist/_esm/forms/formsApi.d.ts +26 -0
- package/dist/_esm/forms/formsApi.js +53 -0
- package/dist/_esm/forms/formsApi.js.map +1 -0
- package/dist/_esm/forms/formsInterfaces.d.ts +28 -0
- package/dist/_esm/forms/formsInterfaces.js +2 -0
- package/dist/_esm/forms/formsInterfaces.js.map +1 -0
- package/dist/_esm/formsData/formsDataApi.d.ts +41 -0
- package/dist/_esm/formsData/formsDataApi.js +68 -0
- package/dist/_esm/formsData/formsDataApi.js.map +1 -0
- package/dist/_esm/formsData/formsDataInterfaces.d.ts +25 -0
- package/dist/_esm/formsData/formsDataInterfaces.js +2 -0
- package/dist/_esm/formsData/formsDataInterfaces.js.map +1 -0
- package/dist/_esm/general-types/generalTypesApi.d.ts +14 -0
- package/dist/_esm/general-types/generalTypesApi.js +31 -0
- package/dist/_esm/general-types/generalTypesApi.js.map +1 -0
- package/dist/_esm/general-types/generalTypesInterfaces.d.ts +9 -0
- package/dist/_esm/general-types/generalTypesInterfaces.js +2 -0
- package/dist/_esm/general-types/generalTypesInterfaces.js.map +1 -0
- package/dist/_esm/index.d.ts +35 -0
- package/dist/_esm/index.js +51 -0
- package/dist/_esm/index.js.map +1 -0
- package/dist/_esm/locales/localesApi.d.ts +14 -0
- package/dist/_esm/locales/localesApi.js +31 -0
- package/dist/_esm/locales/localesApi.js.map +1 -0
- package/dist/_esm/locales/localesInterfaces.d.ts +15 -0
- package/dist/_esm/locales/localesInterfaces.js +2 -0
- package/dist/_esm/locales/localesInterfaces.js.map +1 -0
- package/dist/_esm/markers/markersApi.d.ts +35 -0
- package/dist/_esm/markers/markersApi.js +62 -0
- package/dist/_esm/markers/markersApi.js.map +1 -0
- package/dist/_esm/markers/markersInterfaces.d.ts +16 -0
- package/dist/_esm/markers/markersInterfaces.js +2 -0
- package/dist/_esm/markers/markersInterfaces.js.map +1 -0
- package/dist/_esm/menus/menusApi.d.ts +16 -0
- package/dist/_esm/menus/menusApi.js +33 -0
- package/dist/_esm/menus/menusApi.js.map +1 -0
- package/dist/_esm/menus/menusInterfaces.d.ts +18 -0
- package/dist/_esm/menus/menusInterfaces.js +2 -0
- package/dist/_esm/menus/menusInterfaces.js.map +1 -0
- package/dist/_esm/modules/modulesApi.d.ts +14 -0
- package/dist/_esm/modules/modulesApi.js +31 -0
- package/dist/_esm/modules/modulesApi.js.map +1 -0
- package/dist/_esm/modules/modulesInterfaces.d.ts +19 -0
- package/dist/_esm/modules/modulesInterfaces.js +2 -0
- package/dist/_esm/modules/modulesInterfaces.js.map +1 -0
- package/dist/_esm/pages/pagesApi.d.ts +74 -0
- package/dist/_esm/pages/pagesApi.js +134 -0
- package/dist/_esm/pages/pagesApi.js.map +1 -0
- package/dist/_esm/pages/pagesInterfaces.d.ts +39 -0
- package/dist/_esm/pages/pagesInterfaces.js +2 -0
- package/dist/_esm/pages/pagesInterfaces.js.map +1 -0
- package/dist/_esm/product-statuses/productStatusesApi.d.ts +38 -0
- package/dist/_esm/product-statuses/productStatusesApi.js +70 -0
- package/dist/_esm/product-statuses/productStatusesApi.js.map +1 -0
- package/dist/_esm/product-statuses/productStatusesInterfaces.d.ts +15 -0
- package/dist/_esm/product-statuses/productStatusesInterfaces.js +2 -0
- package/dist/_esm/product-statuses/productStatusesInterfaces.js.map +1 -0
- package/dist/_esm/products/productsApi.d.ts +195 -0
- package/dist/_esm/products/productsApi.js +292 -0
- package/dist/_esm/products/productsApi.js.map +1 -0
- package/dist/_esm/products/productsInterfaces.d.ts +83 -0
- package/dist/_esm/products/productsInterfaces.js +2 -0
- package/dist/_esm/products/productsInterfaces.js.map +1 -0
- package/dist/_esm/templates/templatesApi.d.ts +32 -0
- package/dist/_esm/templates/templatesApi.js +69 -0
- package/dist/_esm/templates/templatesApi.js.map +1 -0
- package/dist/_esm/templates/templatesInterfaces.d.ts +30 -0
- package/dist/_esm/templates/templatesInterfaces.js +2 -0
- package/dist/_esm/templates/templatesInterfaces.js.map +1 -0
- package/dist/_esm/templates-preview/templatesPreviewApi.d.ts +30 -0
- package/dist/_esm/templates-preview/templatesPreviewApi.js +57 -0
- package/dist/_esm/templates-preview/templatesPreviewApi.js.map +1 -0
- package/dist/_esm/templates-preview/templatesPreviewInterfaces.d.ts +27 -0
- package/dist/_esm/templates-preview/templatesPreviewInterfaces.js +2 -0
- package/dist/_esm/templates-preview/templatesPreviewInterfaces.js.map +1 -0
- package/dist/_types/admins/adminsApi.d.ts +14 -0
- package/dist/_types/admins/adminsInterfaces.d.ts +32 -0
- package/dist/_types/attribute-set/attributeSetApi.d.ts +24 -0
- package/dist/_types/attribute-set/attributeSetInterfaces.d.ts +23 -0
- package/dist/_types/base/oneEntry.d.ts +9 -0
- package/dist/_types/base/utils.d.ts +32 -0
- package/dist/_types/forms/formsApi.d.ts +26 -0
- package/dist/_types/forms/formsInterfaces.d.ts +28 -0
- package/dist/_types/formsData/formsDataApi.d.ts +41 -0
- package/dist/_types/formsData/formsDataInterfaces.d.ts +25 -0
- package/dist/_types/general-types/generalTypesApi.d.ts +14 -0
- package/dist/_types/general-types/generalTypesInterfaces.d.ts +9 -0
- package/dist/_types/index.d.ts +35 -0
- package/dist/_types/locales/localesApi.d.ts +14 -0
- package/dist/_types/locales/localesInterfaces.d.ts +15 -0
- package/dist/_types/markers/markersApi.d.ts +35 -0
- package/dist/_types/markers/markersInterfaces.d.ts +16 -0
- package/dist/_types/menus/menusApi.d.ts +16 -0
- package/dist/_types/menus/menusInterfaces.d.ts +18 -0
- package/dist/_types/modules/modulesApi.d.ts +14 -0
- package/dist/_types/modules/modulesInterfaces.d.ts +19 -0
- package/dist/_types/pages/pagesApi.d.ts +74 -0
- package/dist/_types/pages/pagesInterfaces.d.ts +39 -0
- package/dist/_types/product-statuses/productStatusesApi.d.ts +38 -0
- package/dist/_types/product-statuses/productStatusesInterfaces.d.ts +15 -0
- package/dist/_types/products/productsApi.d.ts +195 -0
- package/dist/_types/products/productsInterfaces.d.ts +83 -0
- package/dist/_types/templates/templatesApi.d.ts +32 -0
- package/dist/_types/templates/templatesInterfaces.d.ts +30 -0
- package/dist/_types/templates-preview/templatesPreviewApi.d.ts +30 -0
- package/dist/_types/templates-preview/templatesPreviewInterfaces.d.ts +27 -0
- package/dist/index.d.ts +0 -4
- package/dist/index.js +0 -8
- package/dist/index.js.map +1 -1
- package/dist/products/productsApi.d.ts +6 -4
- package/dist/products/productsApi.js +34 -7
- package/dist/products/productsApi.js.map +1 -1
- package/dist/products/productsInterfaces.d.ts +14 -3
- package/package.json +3 -2
package/README.md
CHANGED
|
@@ -83,111 +83,13 @@ Example return:
|
|
|
83
83
|
"permissions": {
|
|
84
84
|
"menu.create": true
|
|
85
85
|
},
|
|
86
|
-
"selectedLanguage": "
|
|
87
|
-
"selectedContentLanguage": "
|
|
86
|
+
"selectedLanguage": "en_US",
|
|
87
|
+
"selectedContentLanguage": "en_US",
|
|
88
88
|
"selectedUITheme": "DARK"
|
|
89
89
|
}
|
|
90
90
|
]
|
|
91
91
|
```
|
|
92
92
|
|
|
93
|
-
## AttributeSetApi
|
|
94
|
-
|
|
95
|
-
```
|
|
96
|
-
const { AttributeSet } = defineOneEntry('your-url')
|
|
97
|
-
```
|
|
98
|
-
|
|
99
|
-
### getAttributeSetById
|
|
100
|
-
|
|
101
|
-
```
|
|
102
|
-
const value = await AttributeSet.getAttributeSetById(1)
|
|
103
|
-
```
|
|
104
|
-
|
|
105
|
-
> This method retrieves a single attribute set object based on its identifier (id) from the API. It returns a Promise that resolves to the attribute set object.
|
|
106
|
-
|
|
107
|
-
Example return:
|
|
108
|
-
```
|
|
109
|
-
{
|
|
110
|
-
"id": 1764,
|
|
111
|
-
"updatedDate": "2023-09-23T12:19:44.803Z",
|
|
112
|
-
"version": 10,
|
|
113
|
-
"identifier": "catalog",
|
|
114
|
-
"typeId": 1,
|
|
115
|
-
"localizeInfos": {
|
|
116
|
-
"ru_RU": {
|
|
117
|
-
"title": "Набор для страниц"
|
|
118
|
-
}
|
|
119
|
-
},
|
|
120
|
-
"schema": {
|
|
121
|
-
"attribute1": {
|
|
122
|
-
"id": 1,
|
|
123
|
-
"type": "string",
|
|
124
|
-
"isPrice": false,
|
|
125
|
-
"original": true,
|
|
126
|
-
"identifier": "stroka",
|
|
127
|
-
"localizeInfos": {
|
|
128
|
-
"ru_RU": {
|
|
129
|
-
"title": "Строка"
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
},
|
|
134
|
-
"position": {
|
|
135
|
-
"id": 12,
|
|
136
|
-
"objectId": 1,
|
|
137
|
-
"objectType": "attribute-set",
|
|
138
|
-
"position": "0|hzzzzz:"
|
|
139
|
-
},
|
|
140
|
-
"positionId": "0|hzzzzz:",
|
|
141
|
-
"isVisible": true
|
|
142
|
-
}
|
|
143
|
-
```
|
|
144
|
-
|
|
145
|
-
### getAttributeSetByMarker
|
|
146
|
-
|
|
147
|
-
```
|
|
148
|
-
const value = await AttributeSet.getAttributeSetByMarker('marker')
|
|
149
|
-
```
|
|
150
|
-
|
|
151
|
-
> This method retrieves a single attribute set object based on its marker (marker) from the API. It returns a Promise that resolves to the attribute set object.
|
|
152
|
-
|
|
153
|
-
Example return:
|
|
154
|
-
```
|
|
155
|
-
{
|
|
156
|
-
"id": 1764,
|
|
157
|
-
"updatedDate": "2023-09-23T12:21:39.906Z",
|
|
158
|
-
"version": 10,
|
|
159
|
-
"identifier": "catalog",
|
|
160
|
-
"typeId": 1,
|
|
161
|
-
"localizeInfos": {
|
|
162
|
-
"ru_RU": {
|
|
163
|
-
"title": "Набор для страниц"
|
|
164
|
-
}
|
|
165
|
-
},
|
|
166
|
-
"schema": {
|
|
167
|
-
"attribute1": {
|
|
168
|
-
"id": 1,
|
|
169
|
-
"type": "string",
|
|
170
|
-
"isPrice": false,
|
|
171
|
-
"original": true,
|
|
172
|
-
"identifier": "stroka",
|
|
173
|
-
"localizeInfos": {
|
|
174
|
-
"ru_RU": {
|
|
175
|
-
"title": "Строка"
|
|
176
|
-
}
|
|
177
|
-
}
|
|
178
|
-
}
|
|
179
|
-
},
|
|
180
|
-
"position": {
|
|
181
|
-
"id": 12,
|
|
182
|
-
"objectId": 1,
|
|
183
|
-
"objectType": "attribute-set",
|
|
184
|
-
"position": "0|hzzzzz:"
|
|
185
|
-
},
|
|
186
|
-
"positionId": "0|hzzzzz:",
|
|
187
|
-
"isVisible": true
|
|
188
|
-
}
|
|
189
|
-
```
|
|
190
|
-
|
|
191
93
|
## FormApi
|
|
192
94
|
|
|
193
95
|
const { Forms } = defineOneEntry('your-url');
|
|
@@ -214,8 +116,8 @@ Example return:
|
|
|
214
116
|
"attributeSetId": 0,
|
|
215
117
|
"processingType": "email",
|
|
216
118
|
"localizeInfos": {
|
|
217
|
-
"
|
|
218
|
-
"title": "
|
|
119
|
+
"en_US": {
|
|
120
|
+
"title": "My form",
|
|
219
121
|
"titleForSite": "",
|
|
220
122
|
"successMessage": "",
|
|
221
123
|
"unsuccessMessage": "",
|
|
@@ -264,8 +166,8 @@ Example return:
|
|
|
264
166
|
"attributeSetId": 0,
|
|
265
167
|
"processingType": "email",
|
|
266
168
|
"localizeInfos": {
|
|
267
|
-
"
|
|
268
|
-
"title": "
|
|
169
|
+
"en_US": {
|
|
170
|
+
"title": "My form",
|
|
269
171
|
"titleForSite": "",
|
|
270
172
|
"successMessage": "",
|
|
271
173
|
"unsuccessMessage": "",
|
|
@@ -315,8 +217,8 @@ Example return:
|
|
|
315
217
|
"attributeSetId": 0,
|
|
316
218
|
"processingType": "email",
|
|
317
219
|
"localizeInfos": {
|
|
318
|
-
"
|
|
319
|
-
"title": "
|
|
220
|
+
"en_US": {
|
|
221
|
+
"title": "My form",
|
|
320
222
|
"titleForSite": "",
|
|
321
223
|
"successMessage": "",
|
|
322
224
|
"unsuccessMessage": "",
|
|
@@ -364,9 +266,9 @@ Example return:
|
|
|
364
266
|
"time": "2023-02-12 10:56",
|
|
365
267
|
"formData": [
|
|
366
268
|
{
|
|
367
|
-
"marker": "
|
|
368
|
-
"value": "
|
|
369
|
-
"langCode": "
|
|
269
|
+
"marker": "name_1",
|
|
270
|
+
"value": "Name",
|
|
271
|
+
"langCode": "en_US"
|
|
370
272
|
}
|
|
371
273
|
]
|
|
372
274
|
}
|
|
@@ -390,9 +292,9 @@ Example return:
|
|
|
390
292
|
"time": "2023-02-12 10:56",
|
|
391
293
|
"formData": [
|
|
392
294
|
{
|
|
393
|
-
"marker": "
|
|
394
|
-
"value": "
|
|
395
|
-
"langCode": "
|
|
295
|
+
"marker": "name_1",
|
|
296
|
+
"value": "Name",
|
|
297
|
+
"langCode": "en_US"
|
|
396
298
|
}
|
|
397
299
|
]
|
|
398
300
|
}
|
|
@@ -417,9 +319,9 @@ Example return:
|
|
|
417
319
|
"time": "2023-02-12 10:56",
|
|
418
320
|
"formData": [
|
|
419
321
|
{
|
|
420
|
-
"marker": "
|
|
421
|
-
"value": "
|
|
422
|
-
"langCode": "
|
|
322
|
+
"marker": "name_1",
|
|
323
|
+
"value": "Name",
|
|
324
|
+
"langCode": "en_US"
|
|
423
325
|
}
|
|
424
326
|
]
|
|
425
327
|
}
|
|
@@ -466,8 +368,8 @@ Example return:
|
|
|
466
368
|
[
|
|
467
369
|
{
|
|
468
370
|
"id": 1764,
|
|
469
|
-
"shortCode": "
|
|
470
|
-
"code": "
|
|
371
|
+
"shortCode": "en",
|
|
372
|
+
"code": "en_US",
|
|
471
373
|
"name": "Bengali",
|
|
472
374
|
"nativeName": "বাংলা",
|
|
473
375
|
"isActive": false,
|
|
@@ -498,8 +400,8 @@ Example return:
|
|
|
498
400
|
"id": 1764,
|
|
499
401
|
"identifier": "catalog",
|
|
500
402
|
"localizeInfos": {
|
|
501
|
-
"
|
|
502
|
-
"title": "
|
|
403
|
+
"en_US": {
|
|
404
|
+
"title": "Main menu"
|
|
503
405
|
}
|
|
504
406
|
},
|
|
505
407
|
"pages": [
|
|
@@ -519,49 +421,7 @@ Example return:
|
|
|
519
421
|
]
|
|
520
422
|
}
|
|
521
423
|
```
|
|
522
|
-
## ModulesApi
|
|
523
|
-
|
|
524
|
-
```
|
|
525
|
-
const { Modules } = defineOneEntry('your-url')
|
|
526
|
-
```
|
|
527
424
|
|
|
528
|
-
### getAllModules
|
|
529
|
-
|
|
530
|
-
```
|
|
531
|
-
const value = await Modules.getAllModules()
|
|
532
|
-
```
|
|
533
|
-
|
|
534
|
-
> This method retrieves all modules from the API. It returns a Promise that resolves to an array of BaseModuleDto objects or an empty array [] if there is no data.
|
|
535
|
-
|
|
536
|
-
Example return:
|
|
537
|
-
```
|
|
538
|
-
[
|
|
539
|
-
{
|
|
540
|
-
"identifier": "catalog",
|
|
541
|
-
"isVisible": true,
|
|
542
|
-
"type": null,
|
|
543
|
-
"localizeInfos": {
|
|
544
|
-
"ru_RU": {
|
|
545
|
-
"title": "Каталог"
|
|
546
|
-
}
|
|
547
|
-
},
|
|
548
|
-
"icon": "mdi mdi-account-key",
|
|
549
|
-
"generalTypes": [
|
|
550
|
-
{
|
|
551
|
-
"id": 1,
|
|
552
|
-
"type": "service"
|
|
553
|
-
},
|
|
554
|
-
{
|
|
555
|
-
"id": 2,
|
|
556
|
-
"type": "forCatalogPages"
|
|
557
|
-
}
|
|
558
|
-
],
|
|
559
|
-
"attributeSetTypes": [],
|
|
560
|
-
"position": "0|hzzzzz:",
|
|
561
|
-
"positionId": 12
|
|
562
|
-
}
|
|
563
|
-
]
|
|
564
|
-
```
|
|
565
425
|
## PagesApi
|
|
566
426
|
|
|
567
427
|
```
|
|
@@ -589,10 +449,10 @@ Example return:
|
|
|
589
449
|
"pageUrl": "string",
|
|
590
450
|
"depth": 3,
|
|
591
451
|
"localizeInfos": {
|
|
592
|
-
"
|
|
593
|
-
"title": "
|
|
594
|
-
"content": "
|
|
595
|
-
"menuTitle": "
|
|
452
|
+
"en_US": {
|
|
453
|
+
"title": "Catalog",
|
|
454
|
+
"content": "Content from catalog",
|
|
455
|
+
"menuTitle": "Catalog"
|
|
596
456
|
}
|
|
597
457
|
},
|
|
598
458
|
"isVisible": true,
|
|
@@ -641,10 +501,10 @@ Example return:
|
|
|
641
501
|
"pageUrl": "string",
|
|
642
502
|
"depth": 3,
|
|
643
503
|
"localizeInfos": {
|
|
644
|
-
"
|
|
645
|
-
"title": "
|
|
646
|
-
"content": "
|
|
647
|
-
"menuTitle": "
|
|
504
|
+
"en_US": {
|
|
505
|
+
"title": "Catalog",
|
|
506
|
+
"content": "Content from catalog",
|
|
507
|
+
"menuTitle": "Catalog"
|
|
648
508
|
}
|
|
649
509
|
},
|
|
650
510
|
"isVisible": true,
|
|
@@ -692,10 +552,10 @@ Example return:
|
|
|
692
552
|
"pageUrl": "string",
|
|
693
553
|
"depth": 3,
|
|
694
554
|
"localizeInfos": {
|
|
695
|
-
"
|
|
696
|
-
"title": "
|
|
697
|
-
"content": "
|
|
698
|
-
"menuTitle": "
|
|
555
|
+
"en_US": {
|
|
556
|
+
"title": "Catalog",
|
|
557
|
+
"content": "Content for catalog",
|
|
558
|
+
"menuTitle": "Catalog"
|
|
699
559
|
}
|
|
700
560
|
},
|
|
701
561
|
"isVisible": true,
|
|
@@ -737,10 +597,10 @@ const value = await Pages.getPageById(1, 'en_US')
|
|
|
737
597
|
"pageUrl": "string",
|
|
738
598
|
"depth": 3,
|
|
739
599
|
"localizeInfos": {
|
|
740
|
-
"
|
|
741
|
-
"title": "
|
|
742
|
-
"content": "
|
|
743
|
-
"menuTitle": "
|
|
600
|
+
"en_US": {
|
|
601
|
+
"title": "Catalog",
|
|
602
|
+
"content": "Content from catalog",
|
|
603
|
+
"menuTitle": "Catalog"
|
|
744
604
|
}
|
|
745
605
|
},
|
|
746
606
|
"isVisible": true,
|
|
@@ -780,10 +640,10 @@ Example return:
|
|
|
780
640
|
"pageUrl": "string",
|
|
781
641
|
"depth": 3,
|
|
782
642
|
"localizeInfos": {
|
|
783
|
-
"
|
|
784
|
-
"title": "
|
|
785
|
-
"content": "
|
|
786
|
-
"menuTitle": "
|
|
643
|
+
"en_US": {
|
|
644
|
+
"title": "Catalog",
|
|
645
|
+
"content": "Content from catalog",
|
|
646
|
+
"menuTitle": "Catalog"
|
|
787
647
|
}
|
|
788
648
|
},
|
|
789
649
|
"isVisible": true,
|
|
@@ -837,8 +697,8 @@ Example return:
|
|
|
837
697
|
{
|
|
838
698
|
"id": 1764,
|
|
839
699
|
"localizeInfos": {
|
|
840
|
-
"
|
|
841
|
-
"title": "
|
|
700
|
+
"en_US": {
|
|
701
|
+
"title": "Product"
|
|
842
702
|
}
|
|
843
703
|
},
|
|
844
704
|
"isVisible": true,
|
|
@@ -895,6 +755,22 @@ sortOrder: 'DESC',
|
|
|
895
755
|
sortKey: 'id'
|
|
896
756
|
}
|
|
897
757
|
```
|
|
758
|
+
"conditionMarker" by which values are filtered (not set by default), possible values:
|
|
759
|
+
> 'in' - Contains,
|
|
760
|
+
>
|
|
761
|
+
> 'nin' - Does not contain,
|
|
762
|
+
>
|
|
763
|
+
> 'eq' - Equal,
|
|
764
|
+
>
|
|
765
|
+
> 'neq' - Not equal,
|
|
766
|
+
>
|
|
767
|
+
> 'mth' - Greater than,
|
|
768
|
+
>
|
|
769
|
+
> 'lth' - Less than,
|
|
770
|
+
>
|
|
771
|
+
> 'exs' - Exists,
|
|
772
|
+
>
|
|
773
|
+
> 'nexs' - Does not exist
|
|
898
774
|
|
|
899
775
|
### getProducts
|
|
900
776
|
|
|
@@ -909,8 +785,8 @@ Example return:
|
|
|
909
785
|
{
|
|
910
786
|
"id": 1764,
|
|
911
787
|
"localizeInfos": {
|
|
912
|
-
"
|
|
913
|
-
"title": "
|
|
788
|
+
"en_US": {
|
|
789
|
+
"title": "Product"
|
|
914
790
|
}
|
|
915
791
|
},
|
|
916
792
|
"isVisible": true,
|
|
@@ -958,8 +834,8 @@ Example return:
|
|
|
958
834
|
{
|
|
959
835
|
"id": 1764,
|
|
960
836
|
"localizeInfos": {
|
|
961
|
-
"
|
|
962
|
-
"title": "
|
|
837
|
+
"en_US": {
|
|
838
|
+
"title": "Product"
|
|
963
839
|
}
|
|
964
840
|
},
|
|
965
841
|
"isVisible": true,
|
|
@@ -1007,8 +883,8 @@ Example return:
|
|
|
1007
883
|
{
|
|
1008
884
|
"id": 1764,
|
|
1009
885
|
"localizeInfos": {
|
|
1010
|
-
"
|
|
1011
|
-
"title": "
|
|
886
|
+
"en_US": {
|
|
887
|
+
"title": "Product"
|
|
1012
888
|
}
|
|
1013
889
|
},
|
|
1014
890
|
"isVisible": true,
|
|
@@ -1056,8 +932,8 @@ Example return:
|
|
|
1056
932
|
{
|
|
1057
933
|
"id": 1764,
|
|
1058
934
|
"localizeInfos": {
|
|
1059
|
-
"
|
|
1060
|
-
"title": "
|
|
935
|
+
"en_US": {
|
|
936
|
+
"title": "Product"
|
|
1061
937
|
}
|
|
1062
938
|
},
|
|
1063
939
|
"isVisible": true,
|
|
@@ -1105,8 +981,8 @@ Example return:
|
|
|
1105
981
|
{
|
|
1106
982
|
"id": 1764,
|
|
1107
983
|
"localizeInfos": {
|
|
1108
|
-
"
|
|
1109
|
-
"title": "
|
|
984
|
+
"en_US": {
|
|
985
|
+
"title": "Product"
|
|
1110
986
|
}
|
|
1111
987
|
},
|
|
1112
988
|
"isVisible": true,
|
|
@@ -1153,8 +1029,8 @@ Example return:
|
|
|
1153
1029
|
{
|
|
1154
1030
|
"id": 1764,
|
|
1155
1031
|
"localizeInfos": {
|
|
1156
|
-
"
|
|
1157
|
-
"title": "
|
|
1032
|
+
"en_US": {
|
|
1033
|
+
"title": "Product"
|
|
1158
1034
|
}
|
|
1159
1035
|
},
|
|
1160
1036
|
"isVisible": true,
|
|
@@ -1219,8 +1095,8 @@ Example return:
|
|
|
1219
1095
|
{
|
|
1220
1096
|
"id": 1764,
|
|
1221
1097
|
"localizeInfos": {
|
|
1222
|
-
"
|
|
1223
|
-
"title": "
|
|
1098
|
+
"en_US": {
|
|
1099
|
+
"title": "Product"
|
|
1224
1100
|
}
|
|
1225
1101
|
},
|
|
1226
1102
|
"isVisible": true,
|
|
@@ -1268,8 +1144,8 @@ Example return:
|
|
|
1268
1144
|
{
|
|
1269
1145
|
"id": 1764,
|
|
1270
1146
|
"localizeInfos": {
|
|
1271
|
-
"
|
|
1272
|
-
"title": "
|
|
1147
|
+
"en_US": {
|
|
1148
|
+
"title": "Product"
|
|
1273
1149
|
}
|
|
1274
1150
|
},
|
|
1275
1151
|
"isVisible": true,
|
|
@@ -1346,8 +1222,8 @@ Example return:
|
|
|
1346
1222
|
"version": 10,
|
|
1347
1223
|
"identifier": "catalog",
|
|
1348
1224
|
"localizeInfos": {
|
|
1349
|
-
"
|
|
1350
|
-
"title": "
|
|
1225
|
+
"en_US": {
|
|
1226
|
+
"title": "Status 1"
|
|
1351
1227
|
}
|
|
1352
1228
|
}
|
|
1353
1229
|
}
|
|
@@ -1369,8 +1245,8 @@ Example return:
|
|
|
1369
1245
|
"version": 10,
|
|
1370
1246
|
"identifier": "catalog",
|
|
1371
1247
|
"localizeInfos": {
|
|
1372
|
-
"
|
|
1373
|
-
"title": "
|
|
1248
|
+
"en_US": {
|
|
1249
|
+
"title": "Status 1"
|
|
1374
1250
|
}
|
|
1375
1251
|
}
|
|
1376
1252
|
}
|
|
@@ -1391,8 +1267,8 @@ Example return:
|
|
|
1391
1267
|
"version": 10,
|
|
1392
1268
|
"identifier": "catalog",
|
|
1393
1269
|
"localizeInfos": {
|
|
1394
|
-
"
|
|
1395
|
-
"title": "
|
|
1270
|
+
"en_US": {
|
|
1271
|
+
"title": "Status 1"
|
|
1396
1272
|
}
|
|
1397
1273
|
}
|
|
1398
1274
|
}
|
|
@@ -1453,8 +1329,8 @@ Example return:
|
|
|
1453
1329
|
},
|
|
1454
1330
|
"generalTypeId": 4,
|
|
1455
1331
|
"localizeInfos": {
|
|
1456
|
-
"
|
|
1457
|
-
"title": "
|
|
1332
|
+
"en_US": {
|
|
1333
|
+
"title": "Page template"
|
|
1458
1334
|
}
|
|
1459
1335
|
},
|
|
1460
1336
|
"position": {
|
|
@@ -1493,8 +1369,8 @@ Example return:
|
|
|
1493
1369
|
},
|
|
1494
1370
|
"generalTypeId": 4,
|
|
1495
1371
|
"localizeInfos": {
|
|
1496
|
-
"
|
|
1497
|
-
"title": "
|
|
1372
|
+
"en_US": {
|
|
1373
|
+
"title": "Page template"
|
|
1498
1374
|
}
|
|
1499
1375
|
},
|
|
1500
1376
|
"position": {
|
|
@@ -1534,8 +1410,8 @@ Example return:
|
|
|
1534
1410
|
},
|
|
1535
1411
|
"attributeSetId": 0,
|
|
1536
1412
|
"localizeInfos": {
|
|
1537
|
-
"
|
|
1538
|
-
"title": "
|
|
1413
|
+
"en_US": {
|
|
1414
|
+
"title": "Page tamplate"
|
|
1539
1415
|
}
|
|
1540
1416
|
},
|
|
1541
1417
|
"position": {
|
|
@@ -1570,8 +1446,8 @@ Example return:
|
|
|
1570
1446
|
},
|
|
1571
1447
|
"attributeSetId": 0,
|
|
1572
1448
|
"localizeInfos": {
|
|
1573
|
-
"
|
|
1574
|
-
"title": "
|
|
1449
|
+
"en_US": {
|
|
1450
|
+
"title": "Page template"
|
|
1575
1451
|
}
|
|
1576
1452
|
},
|
|
1577
1453
|
"position": {
|
|
@@ -1605,8 +1481,8 @@ Example return:
|
|
|
1605
1481
|
},
|
|
1606
1482
|
"attributeSetId": 0,
|
|
1607
1483
|
"localizeInfos": {
|
|
1608
|
-
"
|
|
1609
|
-
"title": "
|
|
1484
|
+
"en_US": {
|
|
1485
|
+
"title": "Page template"
|
|
1610
1486
|
}
|
|
1611
1487
|
},
|
|
1612
1488
|
"position": {
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import OneEntry from "../base/oneEntry";
|
|
2
|
+
import { IAdminEntity, IAdmins } from "./adminsInterfaces";
|
|
3
|
+
/**
|
|
4
|
+
* Controllers for working with users - admins
|
|
5
|
+
*/
|
|
6
|
+
export default class AdminsApi extends OneEntry implements IAdmins {
|
|
7
|
+
constructor(url: string);
|
|
8
|
+
/**
|
|
9
|
+
* Get all user objects - admins.
|
|
10
|
+
*
|
|
11
|
+
* @returns Returns all AdminEntity user objects
|
|
12
|
+
*/
|
|
13
|
+
getAdminsInfo(): Promise<IAdminEntity>;
|
|
14
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
const oneEntry_1 = require("../base/oneEntry");
|
|
13
|
+
/**
|
|
14
|
+
* Controllers for working with users - admins
|
|
15
|
+
*/
|
|
16
|
+
class AdminsApi extends oneEntry_1.default {
|
|
17
|
+
constructor(url) {
|
|
18
|
+
super(url);
|
|
19
|
+
this._url += '/api/content/admins';
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Get all user objects - admins.
|
|
23
|
+
*
|
|
24
|
+
* @returns Returns all AdminEntity user objects
|
|
25
|
+
*/
|
|
26
|
+
getAdminsInfo() {
|
|
27
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
28
|
+
const result = yield this._fetchGet('');
|
|
29
|
+
return result;
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
exports.default = AdminsApi;
|
|
34
|
+
//# sourceMappingURL=adminsApi.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"adminsApi.js","sourceRoot":"","sources":["../../../src/admins/adminsApi.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,+CAAwC;AAGxC;;GAEG;AACH,MAAqB,SAAU,SAAQ,kBAAQ;IAC3C,YAAY,GAAW;QACnB,KAAK,CAAC,GAAG,CAAC,CAAA;QACV,IAAI,CAAC,IAAI,IAAI,qBAAqB,CAAA;IACtC,CAAC;IAED;;;;OAIG;IACU,aAAa;;YACtB,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,SAAS,CAAC,EAAE,CAAC,CAAA;YACvC,OAAO,MAAM,CAAA;QACjB,CAAC;KAAA;CACJ;AAfD,4BAeC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
interface IAdmins {
|
|
2
|
+
getAdminsInfo(): Promise<IAdminEntity>;
|
|
3
|
+
}
|
|
4
|
+
interface IPosition {
|
|
5
|
+
id: number;
|
|
6
|
+
position: string;
|
|
7
|
+
objectId: number;
|
|
8
|
+
objectType: string;
|
|
9
|
+
isLocked: boolean;
|
|
10
|
+
objectCategoryId: number;
|
|
11
|
+
}
|
|
12
|
+
interface IAttributesSets {
|
|
13
|
+
[key: string]: string;
|
|
14
|
+
}
|
|
15
|
+
interface IAdminEntity {
|
|
16
|
+
id: number;
|
|
17
|
+
updatedDate: string;
|
|
18
|
+
version: number;
|
|
19
|
+
identifier: string;
|
|
20
|
+
attributesSets: IAttributesSets;
|
|
21
|
+
attributeSetId: number;
|
|
22
|
+
login: string;
|
|
23
|
+
email?: string;
|
|
24
|
+
restorePasswordCode: number;
|
|
25
|
+
position: IPosition;
|
|
26
|
+
positionId: number;
|
|
27
|
+
permissions: Record<string, boolean>;
|
|
28
|
+
selectedLanguage: string;
|
|
29
|
+
selectedContentLanguage: string;
|
|
30
|
+
selectedUITheme: string;
|
|
31
|
+
}
|
|
32
|
+
export { IAdmins, IAdminEntity };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"adminsInterfaces.js","sourceRoot":"","sources":["../../../src/admins/adminsInterfaces.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import OneEntry from "../base/oneEntry";
|
|
2
|
+
import { IAttributeSet, IAttributeSetEntity } from "./attributeSetInterfaces";
|
|
3
|
+
/**
|
|
4
|
+
* Controllers for working with attribute sets
|
|
5
|
+
*/
|
|
6
|
+
export default class AttributeSetApi extends OneEntry implements IAttributeSet {
|
|
7
|
+
constructor(url: string);
|
|
8
|
+
/**
|
|
9
|
+
* Get one attributes set object.
|
|
10
|
+
*
|
|
11
|
+
* @param {number} [id] - Identifier of the attributes set object
|
|
12
|
+
*
|
|
13
|
+
* @returns Returns one attributes set object
|
|
14
|
+
*/
|
|
15
|
+
getAttributeSetById(id: number): Promise<IAttributeSetEntity>;
|
|
16
|
+
/**
|
|
17
|
+
* Get one attributes set object by marker.
|
|
18
|
+
*
|
|
19
|
+
* @param {string} [marker] - Marker of the attributes set object
|
|
20
|
+
*
|
|
21
|
+
* @returns Returns one attributes set object
|
|
22
|
+
*/
|
|
23
|
+
getAttributeSetByMarker(marker: string): Promise<IAttributeSetEntity>;
|
|
24
|
+
}
|