oneentry 1.0.17 → 1.0.18
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 +147 -262
- package/dist/admins/adminsApi.d.ts +1 -1
- package/dist/admins/adminsInterfaces.d.ts +4 -11
- package/dist/forms/formsApi.d.ts +1 -1
- package/dist/forms/formsInterfaces.d.ts +2 -2
- package/dist/formsData/formsDataApi.d.ts +1 -1
- package/dist/formsData/formsDataApi.js +1 -1
- package/dist/pages/pagesApi.d.ts +1 -1
- package/dist/pages/pagesInterfaces.d.ts +1 -1
- package/dist/templates/templatesApi.d.ts +4 -11
- package/dist/templates/templatesApi.js +4 -17
- package/dist/templates/templatesApi.js.map +1 -1
- package/dist/templates/templatesInterfaces.d.ts +6 -12
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -50,7 +50,7 @@ const api = defineOneEntry('your-url')
|
|
|
50
50
|
|
|
51
51
|
The OneEntry Headless CMS SDK contains two classes: ProductApi and PageApi.
|
|
52
52
|
|
|
53
|
-
##
|
|
53
|
+
## Admins
|
|
54
54
|
|
|
55
55
|
```
|
|
56
56
|
const { Admins } = defineOneEntry('your-url')
|
|
@@ -70,35 +70,25 @@ Example return:
|
|
|
70
70
|
[
|
|
71
71
|
{
|
|
72
72
|
"id": 1764,
|
|
73
|
-
"
|
|
74
|
-
"
|
|
75
|
-
"
|
|
76
|
-
"attributesSets": {
|
|
77
|
-
"string_id19": "",
|
|
78
|
-
"string_id18": ""
|
|
79
|
-
},
|
|
80
|
-
"attributeSetId": 0,
|
|
73
|
+
"identifier": "admin1",
|
|
74
|
+
"attributeSetId": 7,
|
|
75
|
+
"isSync": false,
|
|
81
76
|
"login": "meteor",
|
|
82
77
|
"email": "meteor@mydomen.com",
|
|
83
|
-
"
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
"positionId": 1,
|
|
91
|
-
"permissions": {
|
|
92
|
-
"menu.create": true
|
|
78
|
+
"attributeValues": {
|
|
79
|
+
"en_US": {
|
|
80
|
+
"marker": {
|
|
81
|
+
"value": "",
|
|
82
|
+
"type": "string"
|
|
83
|
+
}
|
|
84
|
+
}
|
|
93
85
|
},
|
|
94
|
-
"
|
|
95
|
-
"selectedContentLanguage": "en_US",
|
|
96
|
-
"selectedUITheme": "DARK"
|
|
86
|
+
"position": 192
|
|
97
87
|
}
|
|
98
88
|
]
|
|
99
89
|
```
|
|
100
90
|
|
|
101
|
-
##
|
|
91
|
+
## Forms
|
|
102
92
|
|
|
103
93
|
const { Forms } = defineOneEntry('your-url');
|
|
104
94
|
|
|
@@ -112,94 +102,36 @@ const value = await Forms.getAllForms()
|
|
|
112
102
|
|
|
113
103
|
Example return:
|
|
114
104
|
```
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
"titleForSite": "",
|
|
130
|
-
"successMessage": "",
|
|
131
|
-
"unsuccessMessage": "",
|
|
132
|
-
"urlAddress": "",
|
|
133
|
-
"database": "0",
|
|
134
|
-
"script": "0"
|
|
135
|
-
}
|
|
136
|
-
},
|
|
137
|
-
"processingData": {},
|
|
138
|
-
"formPages": [
|
|
139
|
-
{
|
|
140
|
-
"id": 1764,
|
|
141
|
-
"pageId": 1764,
|
|
142
|
-
"formId": 164,
|
|
143
|
-
"positionId": null,
|
|
144
|
-
"position": {
|
|
145
|
-
"id": 12,
|
|
146
|
-
"objectId": 1,
|
|
147
|
-
"objectType": "page",
|
|
148
|
-
"position": 1
|
|
105
|
+
[
|
|
106
|
+
{
|
|
107
|
+
"id": 1764,
|
|
108
|
+
"attributeSetId": 0,
|
|
109
|
+
"processingType": "email",
|
|
110
|
+
"localizeInfos": {
|
|
111
|
+
"ru_RU": {
|
|
112
|
+
"title": "My form",
|
|
113
|
+
"titleForSite": "",
|
|
114
|
+
"successMessage": "",
|
|
115
|
+
"unsuccessMessage": "",
|
|
116
|
+
"urlAddress": "",
|
|
117
|
+
"database": "0",
|
|
118
|
+
"script": "0"
|
|
149
119
|
}
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
const value = await Forms.getFormById(1)
|
|
159
|
-
```
|
|
160
|
-
|
|
161
|
-
> This method retrieves a single form object based on its identifier (id) from the API. It returns a Promise that resolves to a FormEntity object.
|
|
162
|
-
|
|
163
|
-
Example return:
|
|
164
|
-
```
|
|
165
|
-
{
|
|
166
|
-
"id": 1764,
|
|
167
|
-
"updatedDate": "2023-09-27T20:10:37.321Z",
|
|
168
|
-
"version": 10,
|
|
169
|
-
"identifier": "catalog",
|
|
170
|
-
"attributesSets": {
|
|
171
|
-
"string_id19": "",
|
|
172
|
-
"string_id18": ""
|
|
173
|
-
},
|
|
174
|
-
"attributeSetId": 0,
|
|
175
|
-
"processingType": "email",
|
|
176
|
-
"localizeInfos": {
|
|
177
|
-
"en_US": {
|
|
178
|
-
"title": "My form",
|
|
179
|
-
"titleForSite": "",
|
|
180
|
-
"successMessage": "",
|
|
181
|
-
"unsuccessMessage": "",
|
|
182
|
-
"urlAddress": "",
|
|
183
|
-
"database": "0",
|
|
184
|
-
"script": "0"
|
|
185
|
-
}
|
|
186
|
-
},
|
|
187
|
-
"processingData": {},
|
|
188
|
-
"formPages": [
|
|
189
|
-
{
|
|
190
|
-
"id": 1764,
|
|
191
|
-
"pageId": 1764,
|
|
192
|
-
"formId": 164,
|
|
193
|
-
"positionId": null,
|
|
194
|
-
"position": {
|
|
195
|
-
"id": 12,
|
|
196
|
-
"objectId": 1,
|
|
197
|
-
"objectType": "page",
|
|
198
|
-
"position": 1
|
|
120
|
+
},
|
|
121
|
+
"processingData": "Unknown Type: ProcessingData",
|
|
122
|
+
"attributeValues": {
|
|
123
|
+
"en_US": {
|
|
124
|
+
"marker": {
|
|
125
|
+
"value": "",
|
|
126
|
+
"type": "string"
|
|
127
|
+
}
|
|
199
128
|
}
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
|
|
129
|
+
},
|
|
130
|
+
"version": 10,
|
|
131
|
+
"identifier": "catalog",
|
|
132
|
+
"position": 192
|
|
133
|
+
}
|
|
134
|
+
]
|
|
203
135
|
```
|
|
204
136
|
|
|
205
137
|
### getFormByMarker
|
|
@@ -215,18 +147,11 @@ Example return:
|
|
|
215
147
|
```
|
|
216
148
|
{
|
|
217
149
|
"id": 1764,
|
|
218
|
-
"updatedDate": "2023-09-27T20:14:05.333Z",
|
|
219
|
-
"version": 10,
|
|
220
|
-
"identifier": "catalog",
|
|
221
|
-
"attributesSets": {
|
|
222
|
-
"string_id19": "",
|
|
223
|
-
"string_id18": ""
|
|
224
|
-
},
|
|
225
150
|
"attributeSetId": 0,
|
|
226
151
|
"processingType": "email",
|
|
227
152
|
"localizeInfos": {
|
|
228
|
-
"
|
|
229
|
-
"title": "
|
|
153
|
+
"ru_RU": {
|
|
154
|
+
"title": "Моя форма",
|
|
230
155
|
"titleForSite": "",
|
|
231
156
|
"successMessage": "",
|
|
232
157
|
"unsuccessMessage": "",
|
|
@@ -235,25 +160,22 @@ Example return:
|
|
|
235
160
|
"script": "0"
|
|
236
161
|
}
|
|
237
162
|
},
|
|
238
|
-
"processingData":
|
|
239
|
-
"
|
|
240
|
-
{
|
|
241
|
-
"
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
"positionId": null,
|
|
245
|
-
"position": {
|
|
246
|
-
"id": 12,
|
|
247
|
-
"objectId": 1,
|
|
248
|
-
"objectType": "page",
|
|
249
|
-
"position": 1
|
|
163
|
+
"processingData": "Unknown Type: ProcessingData",
|
|
164
|
+
"attributeValues": {
|
|
165
|
+
"en_US": {
|
|
166
|
+
"marker": {
|
|
167
|
+
"value": "",
|
|
168
|
+
"type": "string"
|
|
250
169
|
}
|
|
251
170
|
}
|
|
252
|
-
|
|
171
|
+
},
|
|
172
|
+
"version": 10,
|
|
173
|
+
"identifier": "catalog",
|
|
174
|
+
"position": 192
|
|
253
175
|
}
|
|
254
176
|
```
|
|
255
177
|
|
|
256
|
-
##
|
|
178
|
+
## FormsData
|
|
257
179
|
|
|
258
180
|
const { FormsData } = defineOneEntry('your-url');
|
|
259
181
|
|
|
@@ -272,13 +194,14 @@ Example return:
|
|
|
272
194
|
"id": 1764,
|
|
273
195
|
"formIdentifier": "my-form",
|
|
274
196
|
"time": "2023-02-12 10:56",
|
|
275
|
-
"formData":
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
197
|
+
"formData": {
|
|
198
|
+
"en_US": [
|
|
199
|
+
{
|
|
200
|
+
"marker": "naimenovanie_1",
|
|
201
|
+
"value": "Name"
|
|
202
|
+
}
|
|
203
|
+
]
|
|
204
|
+
}
|
|
282
205
|
}
|
|
283
206
|
```
|
|
284
207
|
|
|
@@ -298,13 +221,14 @@ Example return:
|
|
|
298
221
|
"id": 1764,
|
|
299
222
|
"formIdentifier": "my-form",
|
|
300
223
|
"time": "2023-02-12 10:56",
|
|
301
|
-
"formData":
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
224
|
+
"formData": {
|
|
225
|
+
"en_US": [
|
|
226
|
+
{
|
|
227
|
+
"marker": "naimenovanie_1",
|
|
228
|
+
"value": "Name"
|
|
229
|
+
}
|
|
230
|
+
]
|
|
231
|
+
}
|
|
308
232
|
}
|
|
309
233
|
]
|
|
310
234
|
```
|
|
@@ -320,23 +244,22 @@ const value = await FormsData.getFormsDataByMarker('my-marker')
|
|
|
320
244
|
Example return:
|
|
321
245
|
|
|
322
246
|
```
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
"
|
|
247
|
+
{
|
|
248
|
+
"id": 1764,
|
|
249
|
+
"formIdentifier": "my-form",
|
|
250
|
+
"time": "2023-02-12 10:56",
|
|
251
|
+
"formData": {
|
|
252
|
+
"en_US": [
|
|
329
253
|
{
|
|
330
|
-
"marker": "
|
|
331
|
-
"value": "Name"
|
|
332
|
-
"langCode": "en_US"
|
|
254
|
+
"marker": "naimenovanie_1",
|
|
255
|
+
"value": "Name"
|
|
333
256
|
}
|
|
334
257
|
]
|
|
335
258
|
}
|
|
336
|
-
|
|
259
|
+
}
|
|
337
260
|
```
|
|
338
261
|
|
|
339
|
-
##
|
|
262
|
+
## GeneralTypes
|
|
340
263
|
|
|
341
264
|
const { GeneralTypes } = defineOneEntry('your-url');
|
|
342
265
|
|
|
@@ -357,7 +280,7 @@ Example return:
|
|
|
357
280
|
}
|
|
358
281
|
]
|
|
359
282
|
```
|
|
360
|
-
##
|
|
283
|
+
## Locales
|
|
361
284
|
|
|
362
285
|
```
|
|
363
286
|
const { Locales } = defineOneEntry('your-url')
|
|
@@ -366,7 +289,7 @@ const { Locales } = defineOneEntry('your-url')
|
|
|
366
289
|
### getLocales
|
|
367
290
|
|
|
368
291
|
```
|
|
369
|
-
const value = Locales.
|
|
292
|
+
const value = await Locales.getLocales()
|
|
370
293
|
```
|
|
371
294
|
|
|
372
295
|
> This method retrieves all active language localization objects from the API. It returns a Promise that resolves to an array of LocaleEntity objects.
|
|
@@ -387,7 +310,7 @@ Example return:
|
|
|
387
310
|
]
|
|
388
311
|
```
|
|
389
312
|
|
|
390
|
-
##
|
|
313
|
+
## Menus
|
|
391
314
|
|
|
392
315
|
```
|
|
393
316
|
const { Menus } = defineOneEntry('your-url')
|
|
@@ -430,7 +353,7 @@ Example return:
|
|
|
430
353
|
}
|
|
431
354
|
```
|
|
432
355
|
|
|
433
|
-
##
|
|
356
|
+
## Pages
|
|
434
357
|
|
|
435
358
|
```
|
|
436
359
|
const { Pages } = defineOneEntry('your-url')
|
|
@@ -742,7 +665,7 @@ Example return:
|
|
|
742
665
|
]
|
|
743
666
|
```
|
|
744
667
|
|
|
745
|
-
##
|
|
668
|
+
## Products
|
|
746
669
|
|
|
747
670
|
```
|
|
748
671
|
const { Products } = defineOneEntry('your-url')
|
|
@@ -752,15 +675,15 @@ This module accepts a set of user parameters called userQuery. If the parameters
|
|
|
752
675
|
|
|
753
676
|
```
|
|
754
677
|
{
|
|
755
|
-
offset: 0,
|
|
756
|
-
limit: 30,
|
|
757
|
-
statusMarker: null,
|
|
758
|
-
conditionValue: null,
|
|
759
|
-
conditionMarker: null,
|
|
760
|
-
attributeMarker: null,
|
|
761
|
-
langCode: 'en_US',
|
|
762
|
-
sortOrder: 'DESC',
|
|
763
|
-
sortKey: 'id'
|
|
678
|
+
offset: 0,
|
|
679
|
+
limit: 30,
|
|
680
|
+
statusMarker: null,
|
|
681
|
+
conditionValue: null,
|
|
682
|
+
conditionMarker: null,
|
|
683
|
+
attributeMarker: null,
|
|
684
|
+
langCode: 'en_US',
|
|
685
|
+
sortOrder: 'DESC',
|
|
686
|
+
sortKey: 'id'
|
|
764
687
|
}
|
|
765
688
|
```
|
|
766
689
|
"conditionMarker" by which values are filtered (not set by default), possible values:
|
|
@@ -1188,26 +1111,8 @@ Example return:
|
|
|
1188
1111
|
}
|
|
1189
1112
|
]
|
|
1190
1113
|
```
|
|
1191
|
-
### getAttributesByProductId
|
|
1192
|
-
|
|
1193
|
-
```
|
|
1194
|
-
const value = await Products.getAttributesByProductId(1)
|
|
1195
|
-
```
|
|
1196
1114
|
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
Example return:
|
|
1200
|
-
```
|
|
1201
|
-
{
|
|
1202
|
-
"en_US": {
|
|
1203
|
-
"marker": {
|
|
1204
|
-
"value": "",
|
|
1205
|
-
"type": "string"
|
|
1206
|
-
}
|
|
1207
|
-
}
|
|
1208
|
-
}
|
|
1209
|
-
```
|
|
1210
|
-
## ProductStatusApi
|
|
1115
|
+
## ProductStatus
|
|
1211
1116
|
|
|
1212
1117
|
```
|
|
1213
1118
|
const { ProductStatus } = defineOneEntry('your-url');
|
|
@@ -1293,7 +1198,7 @@ Example return:
|
|
|
1293
1198
|
```
|
|
1294
1199
|
true
|
|
1295
1200
|
```
|
|
1296
|
-
##
|
|
1201
|
+
## Templates
|
|
1297
1202
|
|
|
1298
1203
|
```
|
|
1299
1204
|
const { Templates } = defineOneEntry('your-url')
|
|
@@ -1309,88 +1214,68 @@ const value = await Templates.getAllTemplates()
|
|
|
1309
1214
|
|
|
1310
1215
|
Example return:
|
|
1311
1216
|
```
|
|
1312
|
-
|
|
1217
|
+
[
|
|
1218
|
+
{
|
|
1219
|
+
"id": 1764,
|
|
1220
|
+
"identifier": "admin1",
|
|
1221
|
+
"attributeSetId": 7,
|
|
1222
|
+
"generalTypeId": 2,
|
|
1223
|
+
"generalTypeName": "forProductPreview",
|
|
1224
|
+
"localizeInfos": {
|
|
1225
|
+
"ru_RU": {
|
|
1226
|
+
"title": "Product"
|
|
1227
|
+
}
|
|
1228
|
+
},
|
|
1229
|
+
"isSync": false,
|
|
1230
|
+
"attributeValues": {
|
|
1231
|
+
"en_US": {
|
|
1232
|
+
"marker": {
|
|
1233
|
+
"value": "",
|
|
1234
|
+
"type": "string"
|
|
1235
|
+
}
|
|
1236
|
+
}
|
|
1237
|
+
},
|
|
1238
|
+
"position": 192
|
|
1239
|
+
}
|
|
1240
|
+
]
|
|
1313
1241
|
```
|
|
1314
|
-
###
|
|
1242
|
+
### getTemplateByType
|
|
1315
1243
|
|
|
1316
1244
|
```
|
|
1317
|
-
const value = await Templates.getTemplateById(
|
|
1245
|
+
const value = await Templates.getTemplateById('forCatalogProducts')
|
|
1318
1246
|
```
|
|
1319
1247
|
|
|
1320
1248
|
> This method retrieves a single template object based on its identifier (id) from the API. It returns a Promise that resolves to a template object.
|
|
1321
1249
|
|
|
1322
1250
|
Example return:
|
|
1323
1251
|
```
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
"
|
|
1331
|
-
"
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
"
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
"
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
"position": 1
|
|
1349
|
-
},
|
|
1350
|
-
"positionId": 1
|
|
1351
|
-
}
|
|
1352
|
-
```
|
|
1353
|
-
### getTemplateByMarker
|
|
1354
|
-
|
|
1355
|
-
```
|
|
1356
|
-
const value = await Templates.getTemplateByMarker(1)
|
|
1252
|
+
[
|
|
1253
|
+
{
|
|
1254
|
+
"id": 1764,
|
|
1255
|
+
"identifier": "admin1",
|
|
1256
|
+
"attributeSetId": 7,
|
|
1257
|
+
"generalTypeId": 2,
|
|
1258
|
+
"generalTypeName": "forCatalogProducts",
|
|
1259
|
+
"localizeInfos": {
|
|
1260
|
+
"ru_RU": {
|
|
1261
|
+
"title": "Product"
|
|
1262
|
+
}
|
|
1263
|
+
},
|
|
1264
|
+
"isSync": false,
|
|
1265
|
+
"attributeValues": {
|
|
1266
|
+
"en_US": {
|
|
1267
|
+
"marker": {
|
|
1268
|
+
"value": "",
|
|
1269
|
+
"type": "string"
|
|
1270
|
+
}
|
|
1271
|
+
}
|
|
1272
|
+
},
|
|
1273
|
+
"position": 192
|
|
1274
|
+
}
|
|
1275
|
+
]
|
|
1357
1276
|
```
|
|
1358
1277
|
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
Example return:
|
|
1362
|
-
|
|
1363
|
-
```
|
|
1364
|
-
{
|
|
1365
|
-
"id": 1764,
|
|
1366
|
-
"updatedDate": "2023-09-25T13:49:43.355Z",
|
|
1367
|
-
"version": 10,
|
|
1368
|
-
"identifier": "catalog",
|
|
1369
|
-
"attributesSets": {
|
|
1370
|
-
"string_id19": "",
|
|
1371
|
-
"string_id18": ""
|
|
1372
|
-
},
|
|
1373
|
-
"attributeSetId": 0,
|
|
1374
|
-
"generalType": {
|
|
1375
|
-
"id": 4,
|
|
1376
|
-
"type": "forCatalogPages"
|
|
1377
|
-
},
|
|
1378
|
-
"generalTypeId": 4,
|
|
1379
|
-
"localizeInfos": {
|
|
1380
|
-
"en_US": {
|
|
1381
|
-
"title": "Page template"
|
|
1382
|
-
}
|
|
1383
|
-
},
|
|
1384
|
-
"position": {
|
|
1385
|
-
"id": 12,
|
|
1386
|
-
"objectId": 1,
|
|
1387
|
-
"objectType": "module",
|
|
1388
|
-
"position": 1
|
|
1389
|
-
},
|
|
1390
|
-
"positionId": 1
|
|
1391
|
-
}
|
|
1392
|
-
```
|
|
1393
|
-
## TemplatesPreviewApi
|
|
1278
|
+
## TemplatesPreview
|
|
1394
1279
|
|
|
1395
1280
|
```
|
|
1396
1281
|
const { TemplatesPreview } = defineOneEntry('your-url')
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* @property {function} getAdminsInfo - Get all user objects - admins.
|
|
5
5
|
*/
|
|
6
6
|
interface IAdmins {
|
|
7
|
-
getAdminsInfo(): Promise<IAdminEntity
|
|
7
|
+
getAdminsInfo(): Promise<Array<IAdminEntity>>;
|
|
8
8
|
}
|
|
9
9
|
/**
|
|
10
10
|
* Represents a position object.
|
|
@@ -56,19 +56,12 @@ interface IAttributesSets {
|
|
|
56
56
|
*/
|
|
57
57
|
interface IAdminEntity {
|
|
58
58
|
id: number;
|
|
59
|
-
updatedDate: string;
|
|
60
|
-
version: number;
|
|
61
59
|
identifier: string;
|
|
62
60
|
attributesSets: IAttributesSets;
|
|
63
|
-
|
|
64
|
-
|
|
61
|
+
isSync: boolean;
|
|
62
|
+
attributeSetId: number | null;
|
|
63
|
+
login?: string;
|
|
65
64
|
email?: string;
|
|
66
|
-
restorePasswordCode: number;
|
|
67
65
|
position: IPosition;
|
|
68
|
-
positionId: number;
|
|
69
|
-
permissions: Record<string, boolean>;
|
|
70
|
-
selectedLanguage: string;
|
|
71
|
-
selectedContentLanguage: string;
|
|
72
|
-
selectedUITheme: string;
|
|
73
66
|
}
|
|
74
67
|
export { IAdmins, IAdminEntity, IPosition };
|
package/dist/forms/formsApi.d.ts
CHANGED
|
@@ -10,7 +10,7 @@ export default class FormsApi extends OneEntry implements IForms {
|
|
|
10
10
|
*
|
|
11
11
|
* @returns Returns array for all objects of type FormEntity
|
|
12
12
|
*/
|
|
13
|
-
getAllForms(): Promise<IFormsEntity
|
|
13
|
+
getAllForms(): Promise<Array<IFormsEntity>>;
|
|
14
14
|
/**
|
|
15
15
|
* Get one form by form marker.
|
|
16
16
|
*
|
|
@@ -8,7 +8,7 @@ import { IAttributeSet } from "../attribute-set/attributeSetInterfaces";
|
|
|
8
8
|
* @property {function} getFormByMarker - Get one form by form marker.
|
|
9
9
|
*/
|
|
10
10
|
interface IForms {
|
|
11
|
-
getAllForms(): Promise<IFormsEntity
|
|
11
|
+
getAllForms(): Promise<Array<IFormsEntity>>;
|
|
12
12
|
getFormByMarker(marker: string): Promise<IFormsEntity>;
|
|
13
13
|
}
|
|
14
14
|
/**
|
|
@@ -30,7 +30,7 @@ interface IFormsEntity {
|
|
|
30
30
|
attributeSetId: number;
|
|
31
31
|
processingType: string;
|
|
32
32
|
localizeInfos: ILocalizeInfos;
|
|
33
|
-
processingData: object;
|
|
33
|
+
processingData: object | string;
|
|
34
34
|
attributesValues: IAttributeSet;
|
|
35
35
|
version: number;
|
|
36
36
|
identifier: string;
|
package/dist/pages/pagesApi.d.ts
CHANGED
|
@@ -90,5 +90,5 @@ export default class PageApi extends OneEntry implements IPageApi {
|
|
|
90
90
|
*
|
|
91
91
|
* @returns Returns all created pages as an array of ContentIndexedPageDto objects or an empty array [] (if there is no data)
|
|
92
92
|
*/
|
|
93
|
-
searchPage(name: string, langCode: string): Promise<IPagesEntity
|
|
93
|
+
searchPage(name: string, langCode: string): Promise<Array<IPagesEntity>>;
|
|
94
94
|
}
|
|
@@ -31,7 +31,7 @@ interface IPageApi {
|
|
|
31
31
|
getChildPagesByParentUrl(url: string, langCode: string): Promise<IPagesEntity>;
|
|
32
32
|
getFormsByPageUrl(url: string, langCode: string): Promise<Array<IPositionForm>>;
|
|
33
33
|
getConfigPageByUrl(url: string): Promise<IPageConfig>;
|
|
34
|
-
searchPage(name: string, langCode: string): Promise<IPagesEntity
|
|
34
|
+
searchPage(name: string, langCode: string): Promise<Array<IPagesEntity>>;
|
|
35
35
|
}
|
|
36
36
|
/**
|
|
37
37
|
* Represents a config object.
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import OneEntry from '../base/oneEntry';
|
|
2
2
|
import { ITemplatesApi, ITemplateEntity } from './templatesInterfaces';
|
|
3
|
+
import { Types } from "../base/utils";
|
|
3
4
|
/**
|
|
4
5
|
* Controllers for working with template objects
|
|
5
6
|
*/
|
|
@@ -12,19 +13,11 @@ export default class TemplatesPreviewApi extends OneEntry implements ITemplatesA
|
|
|
12
13
|
*/
|
|
13
14
|
getAllTemplates(): Promise<Array<ITemplateEntity>>;
|
|
14
15
|
/**
|
|
15
|
-
* Get
|
|
16
|
+
* Get template objects by type.
|
|
16
17
|
*
|
|
17
|
-
* @param {
|
|
18
|
+
* @param {Types} [type] - Product marker
|
|
18
19
|
*
|
|
19
20
|
* @returns Returns a TemplateEntity object
|
|
20
21
|
*/
|
|
21
|
-
|
|
22
|
-
/**
|
|
23
|
-
* Get a single template object by marker.
|
|
24
|
-
*
|
|
25
|
-
* @param {string} [marker] - Product marker
|
|
26
|
-
*
|
|
27
|
-
* @returns Returns a TemplateEntity object
|
|
28
|
-
*/
|
|
29
|
-
getTemplateByMarker(marker: string): Promise<ITemplateEntity>;
|
|
22
|
+
getTemplateByType(type: Types): Promise<Array<ITemplateEntity>>;
|
|
30
23
|
}
|
|
@@ -30,28 +30,15 @@ class TemplatesPreviewApi extends oneEntry_1.default {
|
|
|
30
30
|
});
|
|
31
31
|
}
|
|
32
32
|
/**
|
|
33
|
-
* Get
|
|
33
|
+
* Get template objects by type.
|
|
34
34
|
*
|
|
35
|
-
* @param {
|
|
35
|
+
* @param {Types} [type] - Product marker
|
|
36
36
|
*
|
|
37
37
|
* @returns Returns a TemplateEntity object
|
|
38
38
|
*/
|
|
39
|
-
|
|
39
|
+
getTemplateByType(type) {
|
|
40
40
|
return __awaiter(this, void 0, void 0, function* () {
|
|
41
|
-
const result = yield this._fetchGet(
|
|
42
|
-
return result;
|
|
43
|
-
});
|
|
44
|
-
}
|
|
45
|
-
/**
|
|
46
|
-
* Get a single template object by marker.
|
|
47
|
-
*
|
|
48
|
-
* @param {string} [marker] - Product marker
|
|
49
|
-
*
|
|
50
|
-
* @returns Returns a TemplateEntity object
|
|
51
|
-
*/
|
|
52
|
-
getTemplateByMarker(marker) {
|
|
53
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
54
|
-
const result = yield this._fetchGet(`/marker/${marker}`);
|
|
41
|
+
const result = yield this._fetchGet(`?type=${type}`);
|
|
55
42
|
return result;
|
|
56
43
|
});
|
|
57
44
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"templatesApi.js","sourceRoot":"","sources":["../../src/templates/templatesApi.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,+CAAuC;
|
|
1
|
+
{"version":3,"file":"templatesApi.js","sourceRoot":"","sources":["../../src/templates/templatesApi.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,+CAAuC;AAIvC;;GAEG;AACH,MAAqB,mBAAoB,SAAQ,kBAAQ;IACrD,YAAY,GAAW;QACnB,KAAK,CAAC,GAAG,CAAC,CAAA;QACV,IAAI,CAAC,IAAI,IAAI,wBAAwB,CAAA;IACzC,CAAC;IAED;;;;OAIG;IACU,eAAe;;YACxB,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAA;YAC3C,OAAO,MAAM,CAAA;QACjB,CAAC;KAAA;IAED;;;;;;OAMG;IACU,iBAAiB,CAAC,IAAU;;YACrC,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,SAAS,CAAC,SAAS,IAAI,EAAE,CAAC,CAAA;YACpD,OAAO,MAAM,CAAA;QACjB,CAAC;KAAA;CAEJ;AA5BD,sCA4BC"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { ILocalizeInfos } from "../base/utils";
|
|
1
|
+
import { ILocalizeInfos, Types } from "../base/utils";
|
|
3
2
|
import { IPosition } from "../admins/adminsInterfaces";
|
|
4
3
|
import { IAttributeSet } from "../attribute-set/attributeSetInterfaces";
|
|
5
4
|
/**
|
|
@@ -7,14 +6,11 @@ import { IAttributeSet } from "../attribute-set/attributeSetInterfaces";
|
|
|
7
6
|
*
|
|
8
7
|
* @property {function} getAllTemplates - Get all template objects grouped by types.
|
|
9
8
|
*
|
|
10
|
-
* @property {function}
|
|
11
|
-
*
|
|
12
|
-
* @property {function} getTemplateByMarker - Get a single template object by marker.
|
|
9
|
+
* @property {function} getTemplateByType - Get template objects by type.
|
|
13
10
|
*/
|
|
14
11
|
interface ITemplatesApi {
|
|
15
12
|
getAllTemplates(): Promise<Array<ITemplateEntity>>;
|
|
16
|
-
|
|
17
|
-
getTemplateByMarker(marker: string): Promise<ITemplateEntity>;
|
|
13
|
+
getTemplateByType(type: Types): Promise<Array<ITemplateEntity>>;
|
|
18
14
|
}
|
|
19
15
|
/**
|
|
20
16
|
* Represents a template entity object.
|
|
@@ -35,15 +31,13 @@ interface ITemplatesApi {
|
|
|
35
31
|
*/
|
|
36
32
|
interface ITemplateEntity {
|
|
37
33
|
id: number;
|
|
38
|
-
updatedDate: string;
|
|
39
|
-
version: number;
|
|
40
34
|
identifier: string;
|
|
41
|
-
|
|
35
|
+
attributesValues: IAttributeSet;
|
|
42
36
|
attributeSetId: number;
|
|
43
|
-
|
|
37
|
+
isSync: boolean;
|
|
38
|
+
generalTypeName: string;
|
|
44
39
|
generalTypeId: number;
|
|
45
40
|
localizeInfos: ILocalizeInfos;
|
|
46
41
|
position: IPosition;
|
|
47
|
-
positionId: number | string;
|
|
48
42
|
}
|
|
49
43
|
export { ITemplatesApi, ITemplateEntity };
|