oneentry 1.0.102 → 1.0.105
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 +1322 -506
- package/configure.js +24 -33
- package/dist/admins/adminsApi.d.ts +11 -7
- package/dist/admins/adminsApi.js +17 -5
- package/dist/admins/adminsInterfaces.d.ts +33 -19
- package/dist/attribute-sets/attributeSetsApi.d.ts +35 -10
- package/dist/attribute-sets/attributeSetsApi.js +49 -7
- package/dist/attribute-sets/attributeSetsInterfaces.d.ts +42 -11
- package/dist/auth-provider/authProviderApi.d.ts +17 -5
- package/dist/auth-provider/authProviderApi.js +31 -14
- package/dist/auth-provider/authProvidersInterfaces.d.ts +23 -2
- package/dist/base/asyncModules.d.ts +2 -2
- package/dist/base/asyncModules.js +26 -17
- package/dist/base/result.js +26 -12
- package/dist/base/stateModule.d.ts +1 -1
- package/dist/base/stateModule.js +20 -11
- package/dist/base/syncModules.d.ts +4 -4
- package/dist/base/syncModules.js +16 -12
- package/dist/base/utils.d.ts +2 -2
- package/dist/blocks/blocksApi.d.ts +8 -5
- package/dist/blocks/blocksApi.js +30 -8
- package/dist/blocks/blocksInterfaces.d.ts +38 -5
- package/dist/events/eventsApi.d.ts +7 -7
- package/dist/events/eventsApi.js +14 -9
- package/dist/events/eventsInterfaces.d.ts +5 -2
- package/dist/{file-uploding → file-uploading}/fileUploadingApi.d.ts +3 -3
- package/dist/{file-uploding → file-uploading}/fileUploadingApi.js +9 -5
- package/dist/{file-uploding → file-uploading}/fileUploadingInterfaces.d.ts +8 -5
- package/dist/forms/formsApi.d.ts +4 -4
- package/dist/forms/formsApi.js +4 -1
- package/dist/forms/formsInterfaces.d.ts +2 -3
- package/dist/formsData/formsDataApi.d.ts +5 -5
- package/dist/formsData/formsDataApi.js +10 -4
- package/dist/formsData/formsDataInterfaces.d.ts +2 -2
- package/dist/general-types/{typesApi.d.ts → generalTypesApi.d.ts} +4 -4
- package/dist/general-types/{typesApi.js → generalTypesApi.js} +4 -1
- package/dist/general-types/generalTypesInterfaces.d.ts +2 -2
- package/dist/index.d.ts +33 -21
- package/dist/index.js +37 -26
- package/dist/integration-collections/integrationCollectionsApi.d.ts +128 -0
- package/dist/integration-collections/integrationCollectionsApi.js +161 -0
- package/dist/integration-collections/integrationCollectionsInterfaces.d.ts +57 -0
- package/dist/integration-collections/integrationCollectionsInterfaces.js +2 -0
- package/dist/locales/localesApi.d.ts +4 -4
- package/dist/locales/localesApi.js +4 -1
- package/dist/locales/localesInterfaces.d.ts +2 -2
- package/dist/menus/menusApi.d.ts +4 -4
- package/dist/menus/menusApi.js +4 -1
- package/dist/menus/menusInterfaces.d.ts +6 -4
- package/dist/menus/menusInterfaces.js +1 -0
- package/dist/orders/ordersApi.d.ts +8 -8
- package/dist/orders/ordersApi.js +15 -7
- package/dist/orders/ordersInterfaces.d.ts +13 -3
- package/dist/pages/pagesApi.d.ts +4 -10
- package/dist/pages/pagesApi.js +14 -10
- package/dist/pages/pagesInterfaces.d.ts +13 -22
- package/dist/payments/paymentsApi.d.ts +6 -6
- package/dist/payments/paymentsApi.js +14 -6
- package/dist/payments/paymentsInterfaces.d.ts +20 -5
- package/dist/product-statuses/productStatusesApi.d.ts +3 -3
- package/dist/product-statuses/productStatusesApi.js +4 -1
- package/dist/product-statuses/productStatusesInterfaces.d.ts +2 -5
- package/dist/products/productsApi.d.ts +38 -54
- package/dist/products/productsApi.js +63 -61
- package/dist/products/productsInterfaces.d.ts +50 -38
- package/dist/system/systemApi.d.ts +3 -3
- package/dist/system/systemApi.js +5 -1
- package/dist/system/systemInterfaces.d.ts +1 -1
- package/dist/templates/templatesApi.d.ts +6 -3
- package/dist/templates/templatesApi.js +10 -2
- package/dist/templates/templatesInterfaces.d.ts +2 -2
- package/dist/templates-preview/templatesPreviewApi.d.ts +5 -4
- package/dist/templates-preview/templatesPreviewApi.js +5 -1
- package/dist/templates-preview/templatesPreviewInterfaces.d.ts +21 -10
- package/dist/users/usersApi.d.ts +15 -4
- package/dist/users/usersApi.js +29 -2
- package/dist/users/usersInterfaces.d.ts +10 -4
- package/dist/web-socket/wsApi.d.ts +4 -4
- package/dist/web-socket/wsApi.js +15 -14
- package/dist/web-socket/wsInterfaces.d.ts +2 -2
- package/package.json +45 -9
- /package/dist/{file-uploding → file-uploading}/fileUploadingInterfaces.js +0 -0
package/README.md
CHANGED
|
@@ -10,7 +10,7 @@ Visit the official AsyncModules website at [https://oneentry.cloud](https://onee
|
|
|
10
10
|
|
|
11
11
|
To get started with AsyncModules, sign up for an account at [https://account.oneentry.cloud/authentication/register](https://account.oneentry.cloud/authentication/register).
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
## Installation
|
|
14
14
|
|
|
15
15
|
To install the AsyncModules Headless CMS SDK in your project, run the following command:
|
|
16
16
|
|
|
@@ -21,30 +21,32 @@ npm install oneentry
|
|
|
21
21
|
## Get Started
|
|
22
22
|
|
|
23
23
|
To use the AsyncModules Headless CMS SDK in your project, import the defineOneEntry function:
|
|
24
|
+
|
|
24
25
|
```js
|
|
25
26
|
import { defineOneEntry } from 'oneentry'
|
|
26
27
|
|
|
27
28
|
const {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
29
|
+
Admins,
|
|
30
|
+
AttributesSets,
|
|
31
|
+
AuthProvider,
|
|
32
|
+
Blocks,
|
|
33
|
+
Events,
|
|
34
|
+
Forms,
|
|
35
|
+
FormData,
|
|
36
|
+
FileUploading,
|
|
37
|
+
GeneralTypes,
|
|
38
|
+
IntegrationCollections,
|
|
39
|
+
Locales,
|
|
40
|
+
Menus,
|
|
41
|
+
Orders,
|
|
42
|
+
Pages,
|
|
43
|
+
Products,
|
|
44
|
+
ProductStatuses,
|
|
45
|
+
System,
|
|
46
|
+
Templates,
|
|
47
|
+
TemplatePreviews,
|
|
48
|
+
Users,
|
|
49
|
+
WS
|
|
48
50
|
} = defineOneEntry('your-url');
|
|
49
51
|
```
|
|
50
52
|
|
|
@@ -53,9 +55,11 @@ Or
|
|
|
53
55
|
```js
|
|
54
56
|
const api = defineOneEntry('your-url');
|
|
55
57
|
```
|
|
58
|
+
|
|
56
59
|
---
|
|
57
60
|
|
|
58
61
|
### Config
|
|
62
|
+
|
|
59
63
|
The second parameter of the constructor takes the 'config'. It contains the following values:
|
|
60
64
|
|
|
61
65
|
- 'token' - Set the token key if your project secure "Security API Token". If you are using certificate protection, do not pass this variable. You can read more about the security of your project [here](https://oneentry.cloud/instructions).
|
|
@@ -75,36 +79,39 @@ The 'auth' contains the following settings:
|
|
|
75
79
|
- 'customAuth' - If you want to configure authorization and work with tokens yourself, set this flag to true. If you want to use the sdk settings, set it to false or do not transfer it at all.
|
|
76
80
|
|
|
77
81
|
An example of a configuration with token protection and automatic authentication that stores state between sessions
|
|
82
|
+
|
|
78
83
|
```js
|
|
79
84
|
const tokenFunction = (token) => {
|
|
80
|
-
|
|
85
|
+
localStorage.setItem('refreshToken', token)
|
|
81
86
|
}
|
|
82
87
|
|
|
83
88
|
const api = defineOneEntry('https://my-project.oneentry.cloud', {
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
89
|
+
token:'my-token',
|
|
90
|
+
langCode:'en_US',
|
|
91
|
+
auth: {
|
|
92
|
+
refreshToken: localStorage.getItem('refreshToken'),
|
|
93
|
+
saveFunction: tokenFunction
|
|
94
|
+
}
|
|
90
95
|
})
|
|
91
96
|
```
|
|
92
97
|
|
|
93
98
|
An example of a configuration that is protected with a certificate allows you to configure the authorization system yourself and saves data on requests.
|
|
99
|
+
|
|
94
100
|
```js
|
|
95
101
|
const api = defineOneEntry('https://my-project.oneentry.cloud', {
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
+
langCode:'en_US',
|
|
103
|
+
traficLimit: true,
|
|
104
|
+
auth: {
|
|
105
|
+
customAuth: true,
|
|
106
|
+
refreshToken: localStorage.getItem('refreshToken')
|
|
107
|
+
}
|
|
102
108
|
})
|
|
103
109
|
```
|
|
104
110
|
|
|
105
111
|
If you have chosen to configure tokens yourself, you can pass the token to the method as follows.
|
|
106
112
|
The intermediate method allows you to pass an access token to the request. Then call the required method.
|
|
107
113
|
This method (setAccessToken) should not be called if the method does not require user authorization.
|
|
114
|
+
|
|
108
115
|
```js
|
|
109
116
|
const user = api.Users.setAccessToken('my.access.token').getUser()
|
|
110
117
|
```
|
|
@@ -112,6 +119,7 @@ const user = api.Users.setAccessToken('my.access.token').getUser()
|
|
|
112
119
|
>If you chose token protection to ensure connection security, just pass your token to the function as an optional parameter.
|
|
113
120
|
|
|
114
121
|
You can get a token as follows
|
|
122
|
+
|
|
115
123
|
1) Log in to your personal account
|
|
116
124
|
2) Go to the "Projects" tab and select a project
|
|
117
125
|
3) Go to the "Access" tab
|
|
@@ -122,8 +130,7 @@ You can get a token as follows
|
|
|
122
130
|
You can also connect a tls certificate to protect your project. In this case, do not pass the "token" at all. When using the certificate, set up a proxy in your project. Pass an empty string as an url parameter.
|
|
123
131
|
[Learn more about security](https://oneentry.cloud/instructions)
|
|
124
132
|
|
|
125
|
-
|
|
126
|
-
```js
|
|
133
|
+
```js
|
|
127
134
|
const saveTokenFromLocalStorage = (token) => {
|
|
128
135
|
localStorage.setItem('refreshToken', token)
|
|
129
136
|
}
|
|
@@ -151,7 +158,7 @@ In this case, you need to handle the error using "try {} catch(e) {}".
|
|
|
151
158
|
Also, you can pass custom functions that will be called inside the sdk with the appropriate error code.
|
|
152
159
|
These functions receive an error object as an argument. You can process it yourself.
|
|
153
160
|
|
|
154
|
-
```js
|
|
161
|
+
```js
|
|
155
162
|
const api = defineOneEntry('your-url', {
|
|
156
163
|
token: 'my-token',
|
|
157
164
|
langCode:'my-langCode',
|
|
@@ -166,8 +173,8 @@ const api = defineOneEntry('your-url', {
|
|
|
166
173
|
})
|
|
167
174
|
```
|
|
168
175
|
|
|
169
|
-
|
|
170
176
|
Now you can use the following links to jump to specific entries:
|
|
177
|
+
|
|
171
178
|
- [Admins](#admins)
|
|
172
179
|
- [AttributesSets](#attributessets)
|
|
173
180
|
- [AuthProvider](#authprovider)
|
|
@@ -177,6 +184,7 @@ Now you can use the following links to jump to specific entries:
|
|
|
177
184
|
- [FormData](#formdata)
|
|
178
185
|
- [FileUploading](#fileuploading)
|
|
179
186
|
- [GeneralTypes](#generaltypes)
|
|
187
|
+
- [IntegrationCollections](#integrationcollections)
|
|
180
188
|
- [Locales](#locales)
|
|
181
189
|
- [Menus](#menus)
|
|
182
190
|
- [Orders](#orders)
|
|
@@ -190,24 +198,57 @@ Now you can use the following links to jump to specific entries:
|
|
|
190
198
|
- [Users](#users)
|
|
191
199
|
- [WS](#ws)
|
|
192
200
|
|
|
193
|
-
|
|
194
201
|
## <h2 id="admins"> Admins </h2>
|
|
195
202
|
|
|
196
|
-
|
|
197
203
|
```js
|
|
198
204
|
const { Admins } = defineOneEntry('your-url');
|
|
199
205
|
```
|
|
200
206
|
|
|
201
|
-
|
|
207
|
+
> Method accept the body as a parameter for filtering. If you don't want to set up sorting, pass an empty array or don't pass anything.
|
|
202
208
|
|
|
209
|
+
Parameters:
|
|
203
210
|
|
|
204
211
|
```js
|
|
205
|
-
const
|
|
212
|
+
const body = [
|
|
213
|
+
{
|
|
214
|
+
"attributeMarker": "num",
|
|
215
|
+
"conditionMarker": "mth",
|
|
216
|
+
"conditionValue": 1
|
|
217
|
+
},
|
|
218
|
+
{
|
|
219
|
+
"attributeMarker": "num",
|
|
220
|
+
"conditionMarker": "lth",
|
|
221
|
+
"conditionValue": 3
|
|
222
|
+
}
|
|
223
|
+
]
|
|
206
224
|
```
|
|
207
225
|
|
|
226
|
+
><details>
|
|
227
|
+
><summary>Schema: {body}</summary>
|
|
228
|
+
>
|
|
229
|
+
>**attributeMarker:** string <br>
|
|
230
|
+
>*text identifier attribute* <br>
|
|
231
|
+
>example: price <br>
|
|
232
|
+
>
|
|
233
|
+
>**conditionMarker:** string <br>
|
|
234
|
+
>*text identifier condition, possible values: 'in' - contains, 'nin' - does not contain, 'eq' - equal, 'neq' - not equal, 'mth' - more than, 'lth' - less than, 'exs' - exists, 'nexs' - does not exist, 'pat' - pattern, for example **-**, where '*' any character, 'same' - same value as the selected attribute* <br>
|
|
235
|
+
>example: in <br>
|
|
236
|
+
>Enum: <br>
|
|
237
|
+
>[ in, nin, eq, neq, mth, lth, exs, nexs, pat, same ] <br>
|
|
238
|
+
>
|
|
239
|
+
>**conditionValue:** number <br>
|
|
240
|
+
>*condition value* <br>
|
|
241
|
+
>example: 1 <br>
|
|
242
|
+
>
|
|
243
|
+
></details>
|
|
244
|
+
|
|
245
|
+
### Admins.getAdminsInfo(body, langCode, offset, limit)
|
|
208
246
|
|
|
209
|
-
|
|
247
|
+
```js
|
|
248
|
+
const value = await Admins.getAdminsInfo([], 'en_US', 30, 0 )
|
|
249
|
+
```
|
|
210
250
|
|
|
251
|
+
> This method retrieves user objects of type admin from the API. It returns a Promise that resolves to an array of AdminEntity objects.
|
|
211
252
|
|
|
212
253
|
Example return:
|
|
213
254
|
|
|
@@ -229,24 +270,23 @@ Example return:
|
|
|
229
270
|
]
|
|
230
271
|
```
|
|
231
272
|
|
|
232
|
-
|
|
233
273
|
><details>
|
|
234
|
-
><summary
|
|
274
|
+
><summary>Schema</summary>
|
|
235
275
|
>
|
|
236
|
-
>**id:**
|
|
276
|
+
>**id:** number <br>
|
|
237
277
|
>*object identifier*<br>
|
|
238
278
|
>example: 1764 <br>
|
|
239
279
|
>
|
|
240
|
-
>**identifier:**
|
|
280
|
+
>**identifier:** string <br>
|
|
241
281
|
>*textual identifier for the record field* <br>
|
|
242
282
|
>example: admin1 <br>
|
|
243
283
|
>default: admin1 <br>
|
|
244
284
|
>
|
|
245
|
-
>**attributeSetId:**
|
|
285
|
+
>**attributeSetId:** number <br>
|
|
246
286
|
>*Attribute set identifier* <br>
|
|
247
287
|
>example: 7<br>
|
|
248
288
|
>
|
|
249
|
-
>**isSync**
|
|
289
|
+
>**isSync** boolean <br>
|
|
250
290
|
>*Page indexing flag (true or false)* <br>
|
|
251
291
|
>example: false <br>
|
|
252
292
|
>
|
|
@@ -260,12 +300,8 @@ Example return:
|
|
|
260
300
|
>
|
|
261
301
|
></details>
|
|
262
302
|
|
|
263
|
-
|
|
264
|
-
|
|
265
303
|
---
|
|
266
304
|
|
|
267
|
-
|
|
268
|
-
|
|
269
305
|
## <h2 id="attributessets"> AttributesSets </h2>
|
|
270
306
|
|
|
271
307
|
```js
|
|
@@ -280,10 +316,8 @@ const value = await AttributesSets.getAttributesByMarker('my-marker', 'en_US')
|
|
|
280
316
|
|
|
281
317
|
> This method return all attributes with data from the attribute sets.
|
|
282
318
|
|
|
283
|
-
|
|
284
319
|
Example return:
|
|
285
320
|
|
|
286
|
-
|
|
287
321
|
```json
|
|
288
322
|
[
|
|
289
323
|
{
|
|
@@ -325,7 +359,6 @@ Example return:
|
|
|
325
359
|
]
|
|
326
360
|
```
|
|
327
361
|
|
|
328
|
-
|
|
329
362
|
><details>
|
|
330
363
|
><summary>Schema</summary>
|
|
331
364
|
>
|
|
@@ -333,7 +366,7 @@ Example return:
|
|
|
333
366
|
>*attribute type* <br>
|
|
334
367
|
>example: list <br>
|
|
335
368
|
>
|
|
336
|
-
>**marker:**
|
|
369
|
+
>**marker:** string <br>
|
|
337
370
|
>*textual identifier of the attribute (marker)* <br>
|
|
338
371
|
>Enum:
|
|
339
372
|
>[ string, text, textWithHeader, integer, real, float, dateTime, date, time, file, image, groupOfImages, radioButton, list, button ] <br>
|
|
@@ -343,21 +376,20 @@ Example return:
|
|
|
343
376
|
>*position number for sorting* <br>
|
|
344
377
|
>example: 192 <br>
|
|
345
378
|
>
|
|
346
|
-
>**validators:**
|
|
379
|
+
>**validators:** Record<string, any> <br>
|
|
347
380
|
>*set of validators for validation* <br>
|
|
348
381
|
>example: OrderedMap { "requiredValidator": OrderedMap { "strict": true }, "defaultValueValidator": OrderedMap { "fieldDefaultValue": 11 } } <br>
|
|
349
382
|
>
|
|
350
|
-
>**localizeInfos:**
|
|
383
|
+
>**localizeInfos:** Record<string, any> <br>
|
|
351
384
|
>*localization data for the set (name)* <br>
|
|
352
385
|
>example: OrderedMap { "title": "My attribute" } <br>
|
|
353
386
|
>
|
|
354
|
-
>**listTitles**
|
|
387
|
+
>**listTitles** Record<string, any> <br>
|
|
355
388
|
>*array of values (with extended data) for list and radioButton attributes* <br>
|
|
356
389
|
>example: List [ OrderedMap { "title": "red", "value": 1, "position": 1, "extendedValue": null, "extendedValueType": null }, OrderedMap { "title": "yellow", "value": 2, "position": 2, "extendedValue": null, "extendedValueType": null } ] <br>
|
|
357
390
|
>
|
|
358
391
|
></details>
|
|
359
392
|
|
|
360
|
-
|
|
361
393
|
### AttributesSets.getSingleAttributeByMarkerSet(attributeMarker, setMarker, langCode)
|
|
362
394
|
|
|
363
395
|
```js
|
|
@@ -366,7 +398,6 @@ const value = await AttributesSets.getSingleAttributeByMarkerSet('list1', 'list1
|
|
|
366
398
|
|
|
367
399
|
> This method return a single attribute with data from the attribute sets.
|
|
368
400
|
|
|
369
|
-
|
|
370
401
|
Example return:
|
|
371
402
|
|
|
372
403
|
```json
|
|
@@ -415,7 +446,7 @@ Example return:
|
|
|
415
446
|
>*attribute type* <br>
|
|
416
447
|
>example: list <br>
|
|
417
448
|
>
|
|
418
|
-
>**marker:**
|
|
449
|
+
>**marker:** string <br>
|
|
419
450
|
>*textual identifier of the attribute (marker)* <br>
|
|
420
451
|
>example: list1 <br>
|
|
421
452
|
>
|
|
@@ -423,15 +454,15 @@ Example return:
|
|
|
423
454
|
>*position number for sorting* <br>
|
|
424
455
|
>example: 192 <br>
|
|
425
456
|
>
|
|
426
|
-
>**validators:**
|
|
457
|
+
>**validators:** Record<string, any> <br>
|
|
427
458
|
>*set of validators for validation* <br>
|
|
428
459
|
>example: OrderedMap { "requiredValidator": OrderedMap { "strict": true }, "defaultValueValidator": OrderedMap { "fieldDefaultValue": 11 } } <br>
|
|
429
460
|
>
|
|
430
|
-
>**localizeInfos:**
|
|
461
|
+
>**localizeInfos:** Record<string, any> <br>
|
|
431
462
|
>*localization data for the set (name)* <br>
|
|
432
463
|
>example: OrderedMap { "title": "My attribute" } <br>
|
|
433
464
|
>
|
|
434
|
-
>**listTitles**
|
|
465
|
+
>**listTitles** Record<string, any> <br>
|
|
435
466
|
>*array of values (with extended data) for list and radioButton attributes* <br>
|
|
436
467
|
>example: List [ OrderedMap { "title": "red", "value": 1, "position": 1, "extendedValue": null, "extendedValueType": null }, OrderedMap { "title": "yellow", "value": 2, "position": 2, "extendedValue": null, "extendedValueType": null } ] <br>
|
|
437
468
|
>
|
|
@@ -439,145 +470,551 @@ Example return:
|
|
|
439
470
|
|
|
440
471
|
---
|
|
441
472
|
|
|
442
|
-
|
|
443
473
|
## <h2 id="authprovider"> User Auth Provider </h2>
|
|
444
474
|
|
|
445
475
|
```js
|
|
446
476
|
const { AuthProvider } = defineOneEntry('your-url');
|
|
447
477
|
```
|
|
448
478
|
|
|
449
|
-
### AuthProvider.signUp(marker,
|
|
479
|
+
### AuthProvider.signUp(marker, body, langCode)
|
|
450
480
|
|
|
481
|
+
>
|
|
482
|
+
> Method accept the body as a parameter.
|
|
483
|
+
>
|
|
451
484
|
|
|
452
|
-
|
|
485
|
+
Examples for body parameter with different types data:
|
|
453
486
|
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
"marker": "last_name",
|
|
469
|
-
"type": "string",
|
|
470
|
-
"value": "Username"
|
|
471
|
-
}
|
|
472
|
-
],
|
|
473
|
-
"notificationData": {
|
|
474
|
-
"email": "test@test.com",
|
|
475
|
-
"phonePush": [],
|
|
476
|
-
"phoneSMS": "+99999999999"
|
|
487
|
+
Example with attributes of simple types formData "string", "integer", "float".
|
|
488
|
+
|
|
489
|
+
```json
|
|
490
|
+
{
|
|
491
|
+
"formIdentifier": "reg",
|
|
492
|
+
"langCode": "en_US",
|
|
493
|
+
"authData": [
|
|
494
|
+
{
|
|
495
|
+
"marker": "login",
|
|
496
|
+
"value": "test"
|
|
497
|
+
},
|
|
498
|
+
{
|
|
499
|
+
"marker": "password",
|
|
500
|
+
"value": "12345"
|
|
477
501
|
}
|
|
502
|
+
],
|
|
503
|
+
"formData": {
|
|
504
|
+
"en_US": [
|
|
505
|
+
{
|
|
506
|
+
"marker": "last_name",
|
|
507
|
+
"type": "string",
|
|
508
|
+
"value": "Fyodor Ivanov"
|
|
509
|
+
}
|
|
510
|
+
]
|
|
511
|
+
},
|
|
512
|
+
"notificationData": {
|
|
513
|
+
"email": "test@test.zone",
|
|
514
|
+
"phonePush": [],
|
|
515
|
+
"phoneSMS": "+79991234567"
|
|
516
|
+
}
|
|
478
517
|
}
|
|
479
|
-
|
|
480
|
-
const value = await AuthProvider.signUp('email', data)
|
|
481
518
|
```
|
|
482
519
|
|
|
483
|
-
|
|
484
|
-
><summary>Schema</summary>
|
|
485
|
-
>
|
|
486
|
-
>**formIdentifier:** string <br>
|
|
487
|
-
>*textual identifier of the authorization provider's form*
|
|
488
|
-
>example: reg_form <br>
|
|
489
|
-
>
|
|
490
|
-
>**formData:**<br>
|
|
491
|
-
>*form data attached to the authorization provider* <br>
|
|
492
|
-
>
|
|
493
|
-
>**authData:**<br>
|
|
494
|
-
>*authorization data taken from the form attached to the authorization provider* <br>
|
|
495
|
-
>example: List [ OrderedMap { "marker": "login", "value": "test" }, OrderedMap { "marker": "password", "value": "12345" } ]<br>
|
|
496
|
-
>
|
|
497
|
-
>**notificationData:**<br>
|
|
498
|
-
>*user notification data* <br>
|
|
520
|
+
Example with attributes of types "date", "dateTime", "time"
|
|
499
521
|
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
522
|
+
```json
|
|
523
|
+
{
|
|
524
|
+
"formIdentifier": "reg",
|
|
525
|
+
"langCode": "en_US",
|
|
526
|
+
"authData": [
|
|
527
|
+
{
|
|
528
|
+
"marker": "login",
|
|
529
|
+
"value": "test"
|
|
530
|
+
},
|
|
531
|
+
{
|
|
532
|
+
"marker": "password",
|
|
533
|
+
"value": "12345"
|
|
534
|
+
}
|
|
535
|
+
],
|
|
536
|
+
"formData": {
|
|
537
|
+
"en_US": [
|
|
538
|
+
{
|
|
539
|
+
"marker": "birthday",
|
|
540
|
+
"type": "date",
|
|
541
|
+
"value": {
|
|
542
|
+
"fullDate": "2024-05-07T21:02:00.000Z",
|
|
543
|
+
"formattedValue": "08-05-2024 00:02",
|
|
544
|
+
"formatString": "DD-MM-YYYY HH:mm"
|
|
545
|
+
}
|
|
546
|
+
}
|
|
547
|
+
]
|
|
548
|
+
},
|
|
549
|
+
"notificationData": {
|
|
550
|
+
"email": "test@test.zone",
|
|
551
|
+
"phonePush": [],
|
|
552
|
+
"phoneSMS": "+79991234567"
|
|
553
|
+
}
|
|
554
|
+
}
|
|
555
|
+
```
|
|
530
556
|
|
|
557
|
+
Example with attribute of type "text"
|
|
531
558
|
|
|
532
|
-
|
|
559
|
+
```json
|
|
560
|
+
{
|
|
561
|
+
"formIdentifier": "reg",
|
|
562
|
+
"langCode": "en_US",
|
|
563
|
+
"authData": [
|
|
564
|
+
{
|
|
565
|
+
"marker": "login",
|
|
566
|
+
"value": "test"
|
|
567
|
+
},
|
|
568
|
+
{
|
|
569
|
+
"marker": "password",
|
|
570
|
+
"value": "12345"
|
|
571
|
+
}
|
|
572
|
+
],
|
|
573
|
+
"formData": {
|
|
574
|
+
"en_US": [
|
|
575
|
+
{
|
|
576
|
+
"marker": "about",
|
|
577
|
+
"type": "text",
|
|
578
|
+
"value": {
|
|
579
|
+
"htmlValue": "<p>This is me</p>",
|
|
580
|
+
"plainValue": "",
|
|
581
|
+
"params": {
|
|
582
|
+
"isEditorDisabled": false,
|
|
583
|
+
"isImageCompressed": true
|
|
584
|
+
}
|
|
585
|
+
}
|
|
586
|
+
}
|
|
587
|
+
]
|
|
588
|
+
},
|
|
589
|
+
"notificationData": {
|
|
590
|
+
"email": "test@test.zone",
|
|
591
|
+
"phonePush": [],
|
|
592
|
+
"phoneSMS": "+79991234567"
|
|
593
|
+
}
|
|
594
|
+
}
|
|
595
|
+
```
|
|
533
596
|
|
|
534
|
-
Example
|
|
597
|
+
Example with attribute type "textWithHeader"
|
|
535
598
|
|
|
536
599
|
```json
|
|
537
600
|
{
|
|
538
|
-
"
|
|
539
|
-
"
|
|
540
|
-
"
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
601
|
+
"formIdentifier": "reg",
|
|
602
|
+
"langCode": "en_US",
|
|
603
|
+
"authData": [
|
|
604
|
+
{
|
|
605
|
+
"marker": "login",
|
|
606
|
+
"value": "test"
|
|
607
|
+
},
|
|
608
|
+
{
|
|
609
|
+
"marker": "password",
|
|
610
|
+
"value": "12345"
|
|
611
|
+
}
|
|
612
|
+
],
|
|
613
|
+
"formData": {
|
|
614
|
+
"en_US": [
|
|
549
615
|
{
|
|
550
|
-
"marker": "
|
|
551
|
-
"
|
|
616
|
+
"marker": "about",
|
|
617
|
+
"type": "textWithHeader",
|
|
618
|
+
"value": {
|
|
619
|
+
"header": "Header",
|
|
620
|
+
"htmlValue": "<p>This is me</p>",
|
|
621
|
+
"plainValue": "",
|
|
622
|
+
"params": {
|
|
623
|
+
"isEditorDisabled": false,
|
|
624
|
+
"isImageCompressed": true
|
|
625
|
+
}
|
|
626
|
+
}
|
|
552
627
|
}
|
|
628
|
+
]
|
|
629
|
+
},
|
|
630
|
+
"notificationData": {
|
|
631
|
+
"email": "test@test.zone",
|
|
632
|
+
"phonePush": [],
|
|
633
|
+
"phoneSMS": "+79991234567"
|
|
634
|
+
}
|
|
635
|
+
}
|
|
636
|
+
```
|
|
637
|
+
|
|
638
|
+
Example with attributes type "image" and "groupOfImages"
|
|
639
|
+
|
|
640
|
+
```json
|
|
641
|
+
{
|
|
642
|
+
"formIdentifier": "reg",
|
|
643
|
+
"langCode": "en_US",
|
|
644
|
+
"authData": [
|
|
645
|
+
{
|
|
646
|
+
"marker": "login",
|
|
647
|
+
"value": "test"
|
|
648
|
+
},
|
|
649
|
+
{
|
|
650
|
+
"marker": "password",
|
|
651
|
+
"value": "12345"
|
|
652
|
+
}
|
|
553
653
|
],
|
|
654
|
+
"formData": {
|
|
655
|
+
"en_US": [
|
|
656
|
+
{
|
|
657
|
+
"marker": "avatar",
|
|
658
|
+
"type": "image",
|
|
659
|
+
"value": [
|
|
660
|
+
{
|
|
661
|
+
"filename": "files/project/page/10/image/Screenshot-from-2024-05-02-15-23-14.png",
|
|
662
|
+
"downloadLink": "http://my-site.zone/cloud-static/files/project/page/10/image/Screenshot-from-2024-05-02-15-23-14.png",
|
|
663
|
+
"size": 392585,
|
|
664
|
+
"previewLink": "",
|
|
665
|
+
"params": {
|
|
666
|
+
"isImageCompressed": true
|
|
667
|
+
}
|
|
668
|
+
}
|
|
669
|
+
]
|
|
670
|
+
}
|
|
671
|
+
]
|
|
672
|
+
},
|
|
554
673
|
"notificationData": {
|
|
555
|
-
"email": "test@test.
|
|
556
|
-
"phonePush": [
|
|
557
|
-
"phoneSMS": "+
|
|
674
|
+
"email": "test@test.zone",
|
|
675
|
+
"phonePush": [],
|
|
676
|
+
"phoneSMS": "+79991234567"
|
|
677
|
+
}
|
|
678
|
+
}
|
|
679
|
+
```
|
|
680
|
+
|
|
681
|
+
Example with attribute type "file"
|
|
682
|
+
|
|
683
|
+
```json
|
|
684
|
+
{
|
|
685
|
+
"formIdentifier": "reg",
|
|
686
|
+
"langCode": "en_US",
|
|
687
|
+
"authData": [
|
|
688
|
+
{
|
|
689
|
+
"marker": "login",
|
|
690
|
+
"value": "test"
|
|
691
|
+
},
|
|
692
|
+
{
|
|
693
|
+
"marker": "password",
|
|
694
|
+
"value": "12345"
|
|
695
|
+
}
|
|
696
|
+
],
|
|
697
|
+
"formData": {
|
|
698
|
+
"en_US": [
|
|
699
|
+
{
|
|
700
|
+
"marker": "picture",
|
|
701
|
+
"type": "file",
|
|
702
|
+
"value": [
|
|
703
|
+
{
|
|
704
|
+
"filename": "files/project/page/10/image/Screenshot-from-2024-05-02-15-23-14.png",
|
|
705
|
+
"downloadLink": "http://my-site.zone/cloud-static/files/project/page/10/image/Screenshot-from-2024-05-02-15-23-14.png",
|
|
706
|
+
"size": 392585
|
|
707
|
+
}
|
|
708
|
+
]
|
|
709
|
+
}
|
|
710
|
+
]
|
|
558
711
|
},
|
|
559
|
-
"
|
|
560
|
-
"
|
|
561
|
-
"
|
|
712
|
+
"notificationData": {
|
|
713
|
+
"email": "test@test.zone",
|
|
714
|
+
"phonePush": [],
|
|
715
|
+
"phoneSMS": "+79991234567"
|
|
562
716
|
}
|
|
563
717
|
}
|
|
564
718
|
```
|
|
565
719
|
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
720
|
+
Example with attributes type "radioButton" and "list"
|
|
721
|
+
|
|
722
|
+
```json
|
|
723
|
+
{
|
|
724
|
+
"formIdentifier": "reg",
|
|
725
|
+
"langCode": "en_US",
|
|
726
|
+
"authData": [
|
|
727
|
+
{
|
|
728
|
+
"marker": "login",
|
|
729
|
+
"value": "test"
|
|
730
|
+
},
|
|
731
|
+
{
|
|
732
|
+
"marker": "password",
|
|
733
|
+
"value": "12345"
|
|
734
|
+
}
|
|
735
|
+
],
|
|
736
|
+
"formData": {
|
|
737
|
+
"en_US": [
|
|
738
|
+
{
|
|
739
|
+
"marker": "selector",
|
|
740
|
+
"type": "list",
|
|
741
|
+
"value": [
|
|
742
|
+
{
|
|
743
|
+
"title": "red",
|
|
744
|
+
"value": "1",
|
|
745
|
+
"extended": {
|
|
746
|
+
"value": "red",
|
|
747
|
+
"type": "string"
|
|
748
|
+
}
|
|
749
|
+
}
|
|
750
|
+
]
|
|
751
|
+
}
|
|
752
|
+
]
|
|
753
|
+
},
|
|
754
|
+
"notificationData": {
|
|
755
|
+
"email": "test@test.zone",
|
|
756
|
+
"phonePush": [],
|
|
757
|
+
"phoneSMS": "+79991234567"
|
|
758
|
+
}
|
|
759
|
+
}
|
|
760
|
+
```
|
|
761
|
+
|
|
762
|
+
Example with attribute type "entity" (nested list)
|
|
763
|
+
|
|
764
|
+
```json
|
|
765
|
+
{
|
|
766
|
+
"formIdentifier": "reg",
|
|
767
|
+
"langCode": "en_US",
|
|
768
|
+
"authData": [
|
|
769
|
+
{
|
|
770
|
+
"marker": "login",
|
|
771
|
+
"value": "test"
|
|
772
|
+
},
|
|
773
|
+
{
|
|
774
|
+
"marker": "password",
|
|
775
|
+
"value": "12345"
|
|
776
|
+
}
|
|
777
|
+
],
|
|
778
|
+
"formData": {
|
|
779
|
+
"en_US": [
|
|
780
|
+
{
|
|
781
|
+
"marker": "entity-selector",
|
|
782
|
+
"type": "entity",
|
|
783
|
+
"value": [
|
|
784
|
+
{
|
|
785
|
+
"id": "1",
|
|
786
|
+
"title": "red",
|
|
787
|
+
"value": "1",
|
|
788
|
+
"parentId": "null"
|
|
789
|
+
}
|
|
790
|
+
]
|
|
791
|
+
}
|
|
792
|
+
]
|
|
793
|
+
},
|
|
794
|
+
"notificationData": {
|
|
795
|
+
"email": "test@test.zone",
|
|
796
|
+
"phonePush": [],
|
|
797
|
+
"phoneSMS": "+79991234567"
|
|
798
|
+
}
|
|
799
|
+
}
|
|
800
|
+
```
|
|
801
|
+
|
|
802
|
+
Example with one push identifier
|
|
803
|
+
|
|
804
|
+
```json
|
|
805
|
+
{
|
|
806
|
+
"formIdentifier": "reg",
|
|
807
|
+
"langCode": "en_US",
|
|
808
|
+
"authData": [
|
|
809
|
+
{
|
|
810
|
+
"marker": "login",
|
|
811
|
+
"value": "test"
|
|
812
|
+
},
|
|
813
|
+
{
|
|
814
|
+
"marker": "password",
|
|
815
|
+
"value": "12345"
|
|
816
|
+
}
|
|
817
|
+
],
|
|
818
|
+
"formData": {
|
|
819
|
+
"en_US": [
|
|
820
|
+
{
|
|
821
|
+
"marker": "selector",
|
|
822
|
+
"type": "list",
|
|
823
|
+
"value": [
|
|
824
|
+
{
|
|
825
|
+
"title": "red",
|
|
826
|
+
"value": "1",
|
|
827
|
+
"extended": {
|
|
828
|
+
"value": "red",
|
|
829
|
+
"type": "string"
|
|
830
|
+
}
|
|
831
|
+
}
|
|
832
|
+
]
|
|
833
|
+
}
|
|
834
|
+
]
|
|
835
|
+
},
|
|
836
|
+
"notificationData": {
|
|
837
|
+
"email": "test@test.zone",
|
|
838
|
+
"phonePush": [
|
|
839
|
+
"7DD987F846400079F4B03C058365A4869047B4A0."
|
|
840
|
+
],
|
|
841
|
+
"phoneSMS": "+79991234567"
|
|
842
|
+
}
|
|
843
|
+
}
|
|
844
|
+
```
|
|
845
|
+
|
|
846
|
+
Example with multiple push identifiers
|
|
847
|
+
|
|
848
|
+
```json
|
|
849
|
+
{
|
|
850
|
+
"formIdentifier": "reg",
|
|
851
|
+
"langCode": "en_US",
|
|
852
|
+
"authData": [
|
|
853
|
+
{
|
|
854
|
+
"marker": "login",
|
|
855
|
+
"value": "test"
|
|
856
|
+
},
|
|
857
|
+
{
|
|
858
|
+
"marker": "password",
|
|
859
|
+
"value": "12345"
|
|
860
|
+
}
|
|
861
|
+
],
|
|
862
|
+
"formData": {
|
|
863
|
+
"en_US": [
|
|
864
|
+
{
|
|
865
|
+
"marker": "selector",
|
|
866
|
+
"type": "list",
|
|
867
|
+
"value": [
|
|
868
|
+
{
|
|
869
|
+
"title": "red",
|
|
870
|
+
"value": "1",
|
|
871
|
+
"extended": {
|
|
872
|
+
"value": "red",
|
|
873
|
+
"type": "string"
|
|
874
|
+
}
|
|
875
|
+
}
|
|
876
|
+
]
|
|
877
|
+
}
|
|
878
|
+
]
|
|
879
|
+
},
|
|
880
|
+
"notificationData": {
|
|
881
|
+
"email": "test@test.zone",
|
|
882
|
+
"phonePush": [
|
|
883
|
+
"7DD987F846400079F4B03C058365A4869047B4A0",
|
|
884
|
+
"7DD987F846400079F4B03C058365A4869047B4A0",
|
|
885
|
+
"7DD987F846400079F4B03C058365A4869047B4A0."
|
|
886
|
+
],
|
|
887
|
+
"phoneSMS": "+79991234567"
|
|
888
|
+
}
|
|
889
|
+
}
|
|
890
|
+
```
|
|
891
|
+
|
|
892
|
+
```js
|
|
893
|
+
|
|
894
|
+
const body = {
|
|
895
|
+
"formIdentifier": "reg",
|
|
896
|
+
"authData": [
|
|
897
|
+
{
|
|
898
|
+
"marker": "login",
|
|
899
|
+
"value": "test"
|
|
900
|
+
},
|
|
901
|
+
{
|
|
902
|
+
"marker": "password",
|
|
903
|
+
"value": "12345"
|
|
904
|
+
}
|
|
905
|
+
],
|
|
906
|
+
"formData": [
|
|
907
|
+
{
|
|
908
|
+
"marker": "last_name",
|
|
909
|
+
"type": "string",
|
|
910
|
+
"value": "Username"
|
|
911
|
+
}
|
|
912
|
+
],
|
|
913
|
+
"notificationData": {
|
|
914
|
+
"email": "test@test.com",
|
|
915
|
+
"phonePush": [],
|
|
916
|
+
"phoneSMS": "+99999999999"
|
|
917
|
+
}
|
|
918
|
+
}
|
|
919
|
+
|
|
920
|
+
const value = await AuthProvider.signUp('email', body)
|
|
921
|
+
```
|
|
922
|
+
|
|
923
|
+
><details>
|
|
924
|
+
><summary>Schema</summary>
|
|
925
|
+
>
|
|
926
|
+
>**formIdentifier:** string <br>
|
|
927
|
+
>*textual identifier of the authorization provider's form*
|
|
928
|
+
>example: reg_form <br>
|
|
929
|
+
>
|
|
930
|
+
>**formData:**<br>
|
|
931
|
+
>*form data attached to the authorization provider* <br>
|
|
932
|
+
>
|
|
933
|
+
>**authData:**<br>
|
|
934
|
+
>*authorization data taken from the form attached to the authorization provider* <br>
|
|
935
|
+
>example: List [ OrderedMap { "marker": "login", "value": "test" }, OrderedMap { "marker": "password", "value": "12345" } ]<br>
|
|
936
|
+
>
|
|
937
|
+
>**notificationData:**<br>
|
|
938
|
+
>*user notification data* <br>
|
|
939
|
+
>
|
|
940
|
+
>**attributeSetId:** number <br>
|
|
941
|
+
>*identifier for the used attribute set* <br>
|
|
942
|
+
>example: 7 <br>
|
|
943
|
+
>
|
|
944
|
+
>**formData:** FormDataLangType <br>
|
|
945
|
+
>*Data submitted by the form* <br>
|
|
946
|
+
>example: OrderedMap { "en_US": List [ OrderedMap { "marker": "naimenovanie_1", "value": "Name" } ] } <br>
|
|
947
|
+
>
|
|
948
|
+
>**notificationData:** UserNotificationDataType <br>
|
|
949
|
+
>*data for notifying the user* <br>
|
|
950
|
+
>example: OrderedMap { "email": "test@test.zone", "phonePush": "", "phoneSMS": "+79991234567" } <br>
|
|
951
|
+
>
|
|
952
|
+
>**systemCode:** string <br>
|
|
953
|
+
>*system code for performing official actions (password reset, activation)* <br>
|
|
954
|
+
>example: OrderedMap { "value": "90BDCX", "expiredDate": "2024-05-07T21:02:00.000Z" } <br>
|
|
955
|
+
>
|
|
956
|
+
>**formIdentifier:** string <br>
|
|
957
|
+
>*the text identifier of the authorization provider's form* <br>
|
|
958
|
+
>example: reg_form <br>
|
|
959
|
+
>
|
|
960
|
+
>**authData:** FormAuthDataType <br>
|
|
961
|
+
>*authorization data taken from the form linked to the authorization provider* <br>
|
|
962
|
+
>example: List [ OrderedMap { "marker": "login", "value": "test" }, OrderedMap { "marker": "password", "value": "12345" } ] <br>
|
|
963
|
+
>
|
|
964
|
+
>**authProviderId:** number <br>
|
|
965
|
+
>*ID of the authorization provider* <br>
|
|
966
|
+
>example: 1 <br>
|
|
967
|
+
>
|
|
968
|
+
></details>
|
|
969
|
+
> This method will register a new user. Returns the registered user's object.
|
|
970
|
+
|
|
971
|
+
Example return:
|
|
972
|
+
|
|
973
|
+
```json
|
|
974
|
+
{
|
|
975
|
+
"id": 1764,
|
|
976
|
+
"updatedDate": "2024-05-23T12:43:00.169Z",
|
|
977
|
+
"version": 10,
|
|
978
|
+
"identifier": "catalog",
|
|
979
|
+
"isActive": false,
|
|
980
|
+
"authProviderId": 1,
|
|
981
|
+
"formData": [
|
|
982
|
+
{
|
|
983
|
+
"marker": "login",
|
|
984
|
+
"value": "test"
|
|
985
|
+
},
|
|
986
|
+
{
|
|
987
|
+
"marker": "f-name",
|
|
988
|
+
"value": "Second name"
|
|
989
|
+
}
|
|
990
|
+
],
|
|
991
|
+
"notificationData": {
|
|
992
|
+
"email": "test@test.com",
|
|
993
|
+
"phonePush": ["+999999999"],
|
|
994
|
+
"phoneSMS": "+9999999999"
|
|
995
|
+
},
|
|
996
|
+
"systemCode": {
|
|
997
|
+
"value": "90BDCX",
|
|
998
|
+
"expiredDate": "2024-05-07T21:02:00.000Z"
|
|
999
|
+
}
|
|
1000
|
+
}
|
|
1001
|
+
```
|
|
1002
|
+
|
|
1003
|
+
><details>
|
|
1004
|
+
><summary>Schema</summary>
|
|
1005
|
+
>
|
|
1006
|
+
>**id:** number <br>
|
|
1007
|
+
>*object identifier*
|
|
1008
|
+
>example: 1764 <br>
|
|
1009
|
+
>
|
|
1010
|
+
>**updatedDate:** string <br>
|
|
574
1011
|
>*object modification date* <br>
|
|
575
1012
|
>
|
|
576
1013
|
>**version:** number <br>
|
|
577
1014
|
>*object version number* <br>
|
|
578
1015
|
>example: 10 <br>
|
|
579
1016
|
>
|
|
580
|
-
>**identifier:**
|
|
1017
|
+
>**identifier:** string <br>
|
|
581
1018
|
>*textual identifier for the field record* <br>
|
|
582
1019
|
>example: catalog <br>
|
|
583
1020
|
>default: marker <br>
|
|
@@ -590,11 +1027,11 @@ Example return:
|
|
|
590
1027
|
>*Data submitted by the form* <br>
|
|
591
1028
|
>example: OrderedMap { "en_US": List [ OrderedMap { "marker": "naimenovanie_1", "value": "Name" } ] } <br>
|
|
592
1029
|
>
|
|
593
|
-
>**notificationData:**
|
|
1030
|
+
>**notificationData:** UserNotificationDataType <br>
|
|
594
1031
|
>*data for notifying the user* <br>
|
|
595
1032
|
>example: OrderedMap { "email": "test@test.zone", "phonePush": "", "phoneSMS": "+79991234567" } <br>
|
|
596
1033
|
>
|
|
597
|
-
>**systemCode:**
|
|
1034
|
+
>**systemCode:** string <br>
|
|
598
1035
|
>*system code for performing official actions (password reset, activation)* <br>
|
|
599
1036
|
>example: OrderedMap { "value": "90BDCX", "expiredDate": "2024-05-07T21:02:00.000Z" } <br>
|
|
600
1037
|
>
|
|
@@ -602,7 +1039,7 @@ Example return:
|
|
|
602
1039
|
>*the text identifier of the authorization provider's form* <br>
|
|
603
1040
|
>example: reg_form <br>
|
|
604
1041
|
>
|
|
605
|
-
>**authData:**
|
|
1042
|
+
>**authData:** FormAuthDataType <br>
|
|
606
1043
|
>*authorization data taken from the form linked to the authorization provider* <br>
|
|
607
1044
|
>example: List [ OrderedMap { "marker": "login", "value": "test" }, OrderedMap { "marker": "password", "value": "12345" } ] <br>
|
|
608
1045
|
>
|
|
@@ -612,17 +1049,14 @@ Example return:
|
|
|
612
1049
|
>
|
|
613
1050
|
></details>
|
|
614
1051
|
|
|
615
|
-
|
|
616
1052
|
### AuthProvider.generateCode(marker, userIdentifier, eventIdentifier)
|
|
617
1053
|
|
|
618
|
-
|
|
619
1054
|
```js
|
|
620
1055
|
const value = await AuthProvider.generateCode('email', 'test@trer.com', 'auth')
|
|
621
1056
|
```
|
|
622
1057
|
|
|
623
1058
|
> This method receives a code to activate the user. Code is returned through the corresponding user notification method
|
|
624
1059
|
|
|
625
|
-
|
|
626
1060
|
### AuthProvider.checkCode(marker, userIdentifier, code)
|
|
627
1061
|
|
|
628
1062
|
```js
|
|
@@ -637,7 +1071,6 @@ Example return:
|
|
|
637
1071
|
true
|
|
638
1072
|
```
|
|
639
1073
|
|
|
640
|
-
|
|
641
1074
|
### AuthProvider.activateUser(marker, userIdentifier, code)
|
|
642
1075
|
|
|
643
1076
|
```js
|
|
@@ -656,16 +1089,16 @@ true
|
|
|
656
1089
|
|
|
657
1090
|
```js
|
|
658
1091
|
const data = {
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
1092
|
+
authData: [
|
|
1093
|
+
{
|
|
1094
|
+
marker: "login",
|
|
1095
|
+
value: "example@oneentry.cloud"
|
|
1096
|
+
},
|
|
1097
|
+
{
|
|
1098
|
+
marker: "password",
|
|
1099
|
+
value: "12345"
|
|
1100
|
+
}
|
|
1101
|
+
]
|
|
669
1102
|
}
|
|
670
1103
|
|
|
671
1104
|
const value = await AuthProvider.auth('email', data)
|
|
@@ -674,12 +1107,11 @@ const value = await AuthProvider.auth('email', data)
|
|
|
674
1107
|
><details>
|
|
675
1108
|
><summary>Schema</summary>
|
|
676
1109
|
>
|
|
677
|
-
>**authData:**
|
|
1110
|
+
>**authData:** string <br>
|
|
678
1111
|
>*Authorization data taken from the form attached to the authorization provider*
|
|
679
1112
|
>example: List [ OrderedMap { "marker": "login", "value": "test" }, OrderedMap { "marker": "password", "value": "12345" } ] <br>
|
|
680
1113
|
>
|
|
681
1114
|
></details>
|
|
682
|
-
|
|
683
1115
|
> This method performs user authorization. Returns an object with a set of tokens.
|
|
684
1116
|
|
|
685
1117
|
Example return:
|
|
@@ -696,7 +1128,7 @@ Example return:
|
|
|
696
1128
|
><details>
|
|
697
1129
|
><summary>Schema</summary>
|
|
698
1130
|
>
|
|
699
|
-
>**userIdentifier:**
|
|
1131
|
+
>**userIdentifier:** string <br>
|
|
700
1132
|
>*user identifier*
|
|
701
1133
|
>example: example@oneentry.cloud <br>
|
|
702
1134
|
>
|
|
@@ -736,7 +1168,7 @@ Example return:
|
|
|
736
1168
|
><details>
|
|
737
1169
|
><summary >Schema</summary>
|
|
738
1170
|
>
|
|
739
|
-
>**userIdentifier:**
|
|
1171
|
+
>**userIdentifier:** string <br>
|
|
740
1172
|
>*user identifier*
|
|
741
1173
|
>example: example@oneentry.cloud <br>
|
|
742
1174
|
>
|
|
@@ -754,7 +1186,6 @@ Example return:
|
|
|
754
1186
|
>
|
|
755
1187
|
></details>
|
|
756
1188
|
|
|
757
|
-
|
|
758
1189
|
### AuthProvider.logout(marker, token)
|
|
759
1190
|
|
|
760
1191
|
```js
|
|
@@ -783,7 +1214,6 @@ Example return:
|
|
|
783
1214
|
true
|
|
784
1215
|
```
|
|
785
1216
|
|
|
786
|
-
|
|
787
1217
|
### AuthProvider.getAuthProviders(langCode, offset, limit)
|
|
788
1218
|
|
|
789
1219
|
```js
|
|
@@ -820,11 +1250,11 @@ Example return:
|
|
|
820
1250
|
><details>
|
|
821
1251
|
><summary >Schema</summary>
|
|
822
1252
|
>
|
|
823
|
-
>**id:**
|
|
1253
|
+
>**id:** number <br>
|
|
824
1254
|
>*object identifier*
|
|
825
1255
|
>example: 1764 <br>
|
|
826
1256
|
>
|
|
827
|
-
>**localizeInfos:**
|
|
1257
|
+
>**localizeInfos:** CommonLocalizeInfos <br>
|
|
828
1258
|
>*block name with localization* <br>
|
|
829
1259
|
>example: OrderedMap { "en_US": OrderedMap { "title": "My block" } } <br>
|
|
830
1260
|
>
|
|
@@ -832,24 +1262,24 @@ Example return:
|
|
|
832
1262
|
>*object version number* <br>
|
|
833
1263
|
>example: 10 <br>
|
|
834
1264
|
>
|
|
835
|
-
>**identifier:**
|
|
1265
|
+
>**identifier:** string <br>
|
|
836
1266
|
>*textual identifier for the field record* <br>
|
|
837
1267
|
>example: catalog <br>
|
|
838
1268
|
>default: marker <br>
|
|
839
1269
|
>
|
|
840
|
-
>**isActive:**
|
|
1270
|
+
>**isActive:** boolean <br>
|
|
841
1271
|
>*Flag of usage* <br>
|
|
842
1272
|
>example: false <br>
|
|
843
1273
|
>
|
|
844
|
-
>**isCheckCode:**
|
|
1274
|
+
>**isCheckCode:** boolean <br>
|
|
845
1275
|
>*a sign of user activation via a code* <br>
|
|
846
1276
|
>example: false <br>
|
|
847
1277
|
>
|
|
848
|
-
>**type:**
|
|
1278
|
+
>**type:** string <br>
|
|
849
1279
|
>*type of providere* <br>
|
|
850
1280
|
>example: email <br>
|
|
851
1281
|
>
|
|
852
|
-
>**formIdentifier:**
|
|
1282
|
+
>**formIdentifier:** string <br>
|
|
853
1283
|
>*the marker of the form used by the provider (may be null)* <br>
|
|
854
1284
|
>example: email <br>
|
|
855
1285
|
>
|
|
@@ -891,11 +1321,11 @@ Example return:
|
|
|
891
1321
|
><details>
|
|
892
1322
|
><summary>Schema</summary>
|
|
893
1323
|
>
|
|
894
|
-
>**id:**
|
|
1324
|
+
>**id:** number <br>
|
|
895
1325
|
>*object identifier*
|
|
896
1326
|
>example: 1764 <br>
|
|
897
1327
|
>
|
|
898
|
-
>**localizeInfos:**
|
|
1328
|
+
>**localizeInfos:** CommonLocalizeInfos <br>
|
|
899
1329
|
>*block name with localization* <br>
|
|
900
1330
|
>example: OrderedMap { "en_US": OrderedMap { "title": "My block" } } <br>
|
|
901
1331
|
>
|
|
@@ -903,24 +1333,24 @@ Example return:
|
|
|
903
1333
|
>*object version number* <br>
|
|
904
1334
|
>example: 10 <br>
|
|
905
1335
|
>
|
|
906
|
-
>**identifier:**
|
|
1336
|
+
>**identifier:** string <br>
|
|
907
1337
|
>*textual identifier for the field record* <br>
|
|
908
1338
|
>example: catalog <br>
|
|
909
1339
|
>default: marker <br>
|
|
910
1340
|
>
|
|
911
|
-
>**isActive:**
|
|
1341
|
+
>**isActive:** boolean <br>
|
|
912
1342
|
>*Flag of usage* <br>
|
|
913
1343
|
>example: false <br>
|
|
914
1344
|
>
|
|
915
|
-
>**isCheckCode:**
|
|
1345
|
+
>**isCheckCode:** boolean <br>
|
|
916
1346
|
>*a sign of user activation via a code* <br>
|
|
917
1347
|
>example: false <br>
|
|
918
1348
|
>
|
|
919
|
-
>**type:**
|
|
1349
|
+
>**type:** string <br>
|
|
920
1350
|
>*type of providere* <br>
|
|
921
1351
|
>example: email <br>
|
|
922
1352
|
>
|
|
923
|
-
>**formIdentifier:**
|
|
1353
|
+
>**formIdentifier:** string <br>
|
|
924
1354
|
>*the marker of the form used by the provider (may be null)* <br>
|
|
925
1355
|
>example: email <br>
|
|
926
1356
|
>
|
|
@@ -928,7 +1358,6 @@ Example return:
|
|
|
928
1358
|
|
|
929
1359
|
---
|
|
930
1360
|
|
|
931
|
-
|
|
932
1361
|
## <h2 id="blocks"> Blocks </h2>
|
|
933
1362
|
|
|
934
1363
|
```js
|
|
@@ -969,11 +1398,11 @@ Example return:
|
|
|
969
1398
|
><details>
|
|
970
1399
|
><summary >Schema</summary>
|
|
971
1400
|
>
|
|
972
|
-
>**total:**
|
|
1401
|
+
>**total:** number <br>
|
|
973
1402
|
>*total number of found records* <br>
|
|
974
1403
|
>example: 100 <br>
|
|
975
1404
|
>
|
|
976
|
-
>**id:**
|
|
1405
|
+
>**id:** number <br>
|
|
977
1406
|
>*object identifier*
|
|
978
1407
|
>example: 1764 <br>
|
|
979
1408
|
>
|
|
@@ -981,11 +1410,11 @@ Example return:
|
|
|
981
1410
|
>*identifier for the used attribute set* <br>
|
|
982
1411
|
>example: 7 <br>
|
|
983
1412
|
>
|
|
984
|
-
>**localizeInfos:**
|
|
1413
|
+
>**localizeInfos:** CommonLocalizeInfos <br>
|
|
985
1414
|
>*block name with localization* <br>
|
|
986
1415
|
>example: OrderedMap { "en_US": OrderedMap { "title": "My block" } } <br>
|
|
987
1416
|
>
|
|
988
|
-
>**customSettings:**
|
|
1417
|
+
>**customSettings:** BlockCustomSettings <br>
|
|
989
1418
|
>*custom settings for different block types* <br>
|
|
990
1419
|
>example: OrderedMap { "sliderDelay": 0, "sliderDelayType": "", "productQuantity": 4, "productSortType": "By_ID", "productSortOrder": "Descending", "productCountElementsPerRow": 10, "similarProductRules": List [ OrderedMap { "property": "Descending", "includes": "", "keywords": "", "strict": "" } ] } <br>
|
|
991
1420
|
>
|
|
@@ -993,7 +1422,7 @@ Example return:
|
|
|
993
1422
|
>*object version number* <br>
|
|
994
1423
|
>example: 10 <br>
|
|
995
1424
|
>
|
|
996
|
-
>**identifier:**
|
|
1425
|
+
>**identifier:** string <br>
|
|
997
1426
|
>*textual identifier for the field record* <br>
|
|
998
1427
|
>example: catalog <br>
|
|
999
1428
|
>default: marker <br>
|
|
@@ -1002,7 +1431,7 @@ Example return:
|
|
|
1002
1431
|
>*position number (for sorting)* <br>
|
|
1003
1432
|
>example: 192 <br>
|
|
1004
1433
|
>
|
|
1005
|
-
>**attributeValues:**
|
|
1434
|
+
>**attributeValues:** Record<string, string> <br>
|
|
1006
1435
|
>*array of attribute values from the index (presented as a pair of custom attribute identifier: attribute value)* <br>
|
|
1007
1436
|
>example: OrderedMap { "en_US": OrderedMap { "marker": OrderedMap { "value": "", "type": "string" } } } <br>
|
|
1008
1437
|
>
|
|
@@ -1010,7 +1439,7 @@ Example return:
|
|
|
1010
1439
|
>*block type* <br>
|
|
1011
1440
|
>example: forNewsPage <br>
|
|
1012
1441
|
>
|
|
1013
|
-
>**templateIdentifier:**
|
|
1442
|
+
>**templateIdentifier:** string <br>
|
|
1014
1443
|
>*template marker used by the block (can be null)* <br>
|
|
1015
1444
|
>Enum:
|
|
1016
1445
|
>[ forCatalogProducts, forBasketPage, forErrorPage, forCatalogPages, forProductPreview, forProductPage, forSimilarProductBlock, forStatisticProductBlock, forProductBlock, forForm, forFormField, forNewsPage, forNewsBlock, forNewsPreview, forOneNewsPage, forUsualPage, forTextBlock, forSlider, service ] <br>
|
|
@@ -1020,7 +1449,6 @@ Example return:
|
|
|
1020
1449
|
|
|
1021
1450
|
---
|
|
1022
1451
|
|
|
1023
|
-
|
|
1024
1452
|
### Blocks.getBlockByMarker(marker, langCode, offset, limit)
|
|
1025
1453
|
|
|
1026
1454
|
```js
|
|
@@ -1033,109 +1461,85 @@ Example return:
|
|
|
1033
1461
|
|
|
1034
1462
|
```json
|
|
1035
1463
|
{
|
|
1036
|
-
"
|
|
1037
|
-
"
|
|
1038
|
-
{
|
|
1039
|
-
"
|
|
1040
|
-
"localizeInfos": {
|
|
1041
|
-
"title": "Similar"
|
|
1042
|
-
},
|
|
1043
|
-
"version": 0,
|
|
1044
|
-
"position": 1,
|
|
1045
|
-
"identifier": "similar",
|
|
1046
|
-
"type": "forSimilarProductBlock",
|
|
1047
|
-
"templateIdentifier": "block-template",
|
|
1048
|
-
"isVisible": true,
|
|
1049
|
-
"attributeValues": {
|
|
1050
|
-
"block-text": {
|
|
1051
|
-
"type": "string",
|
|
1052
|
-
"value": "",
|
|
1053
|
-
"position": 0,
|
|
1054
|
-
"isProductPreview": false
|
|
1055
|
-
}
|
|
1056
|
-
},
|
|
1057
|
-
"countElementsPerRow": "1",
|
|
1058
|
-
"quantity": "2",
|
|
1059
|
-
"similarProducts": [
|
|
1060
|
-
{
|
|
1061
|
-
"id": 2,
|
|
1062
|
-
"localizeInfos": {
|
|
1063
|
-
"title": "Box"
|
|
1064
|
-
},
|
|
1065
|
-
"statusIdentifier": "sold",
|
|
1066
|
-
"statusLocalizeInfos": {
|
|
1067
|
-
"title": "Sold"
|
|
1068
|
-
},
|
|
1069
|
-
"attributeSetIdentifier": "products",
|
|
1070
|
-
"position": 2,
|
|
1071
|
-
"templateIdentifier": null,
|
|
1072
|
-
"shortDescTemplateIdentifier": null,
|
|
1073
|
-
"price": 148,
|
|
1074
|
-
"additional": {
|
|
1075
|
-
"prices": {
|
|
1076
|
-
"min": 120,
|
|
1077
|
-
"max": 150
|
|
1078
|
-
}
|
|
1079
|
-
},
|
|
1080
|
-
"sku": null,
|
|
1081
|
-
"isSync": true,
|
|
1082
|
-
"attributeValues": {
|
|
1083
|
-
"price": {
|
|
1084
|
-
"type": "integer",
|
|
1085
|
-
"value": 148,
|
|
1086
|
-
"position": 1,
|
|
1087
|
-
"isProductPreview": false
|
|
1088
|
-
},
|
|
1089
|
-
"product-name": {
|
|
1090
|
-
"type": "string",
|
|
1091
|
-
"value": "Box text",
|
|
1092
|
-
"position": 0,
|
|
1093
|
-
"isProductPreview": false
|
|
1094
|
-
},
|
|
1095
|
-
"currency_products": {
|
|
1096
|
-
"type": "string",
|
|
1097
|
-
"value": "$",
|
|
1098
|
-
"position": 2,
|
|
1099
|
-
"isProductPreview": false
|
|
1100
|
-
}
|
|
1101
|
-
},
|
|
1102
|
-
"isVisible": true
|
|
1103
|
-
}
|
|
1104
|
-
]
|
|
1464
|
+
"id": 1764,
|
|
1465
|
+
"localizeInfos": {
|
|
1466
|
+
"en_US": {
|
|
1467
|
+
"title": "My block"
|
|
1105
1468
|
}
|
|
1106
|
-
|
|
1469
|
+
},
|
|
1470
|
+
"customSettings": {
|
|
1471
|
+
"sliderDelay": 0,
|
|
1472
|
+
"sliderDelayType": "",
|
|
1473
|
+
"productConfig": {
|
|
1474
|
+
"quantity": 2,
|
|
1475
|
+
"sortType": "By_ID",
|
|
1476
|
+
"sortOrder": "DESC",
|
|
1477
|
+
"countElementsPerRow": 10
|
|
1478
|
+
},
|
|
1479
|
+
"similarProductRules": [
|
|
1480
|
+
{
|
|
1481
|
+
"property": "Descending",
|
|
1482
|
+
"includes": "",
|
|
1483
|
+
"keywords": "",
|
|
1484
|
+
"strict": ""
|
|
1485
|
+
}
|
|
1486
|
+
],
|
|
1487
|
+
"condition": {
|
|
1488
|
+
"name": "title"
|
|
1489
|
+
}
|
|
1490
|
+
},
|
|
1491
|
+
"version": 10,
|
|
1492
|
+
"identifier": "catalog",
|
|
1493
|
+
"position": 192,
|
|
1494
|
+
"productPageUrls": [
|
|
1495
|
+
"23-laminat-floorwood-maxima"
|
|
1496
|
+
],
|
|
1497
|
+
"isVisible": true,
|
|
1498
|
+
"attributeValues": {
|
|
1499
|
+
"en_US": {
|
|
1500
|
+
"marker": {
|
|
1501
|
+
"value": "",
|
|
1502
|
+
"type": "string",
|
|
1503
|
+
"position": 1,
|
|
1504
|
+
"isProductPreview": false,
|
|
1505
|
+
"isIcon": false,
|
|
1506
|
+
"attributeFields": {
|
|
1507
|
+
"marker": {
|
|
1508
|
+
"type": "string",
|
|
1509
|
+
"value": "test"
|
|
1510
|
+
}
|
|
1511
|
+
}
|
|
1512
|
+
}
|
|
1513
|
+
}
|
|
1514
|
+
},
|
|
1515
|
+
"type": "forNewsPage",
|
|
1516
|
+
"templateIdentifier": null,
|
|
1517
|
+
"attributeSetIdentifier": "my-attributes-sets"
|
|
1107
1518
|
}
|
|
1108
1519
|
```
|
|
1109
1520
|
|
|
1110
1521
|
><details>
|
|
1111
1522
|
><summary>Schema</summary>
|
|
1112
1523
|
>
|
|
1113
|
-
>**
|
|
1114
|
-
>*
|
|
1115
|
-
>example: 100 <br>
|
|
1116
|
-
>
|
|
1117
|
-
>**id:** number <br>
|
|
1118
|
-
>*object identifier*
|
|
1524
|
+
>**id:** number <br>
|
|
1525
|
+
>*object identifier* <br>
|
|
1119
1526
|
>example: 1764 <br>
|
|
1120
1527
|
>
|
|
1121
|
-
>**
|
|
1122
|
-
>*
|
|
1123
|
-
>example: 7 <br>
|
|
1124
|
-
>
|
|
1125
|
-
>**localizeInfos:** CommonLocalizeInfos <br>
|
|
1126
|
-
>*block name with localization* <br>
|
|
1528
|
+
>**localizeInfos:** CommonLocalizeInfos <br>
|
|
1529
|
+
>*block name considering localization* <br>
|
|
1127
1530
|
>example: OrderedMap { "en_US": OrderedMap { "title": "My block" } } <br>
|
|
1128
1531
|
>
|
|
1129
|
-
>**customSettings:**
|
|
1130
|
-
>*
|
|
1131
|
-
>
|
|
1532
|
+
>**customSettings:** BlockCustomSettings <br>
|
|
1533
|
+
>*individual settings for different types of blocks* <br>
|
|
1534
|
+
>BlockCustomSettings
|
|
1535
|
+
example: OrderedMap { "sliderDelay": 0, "sliderDelayType": "", "productConfig": OrderedMap { "quantity": 2, "sortType": "By_ID", "sortOrder": "DESC", "countElementsPerRow": 10 }, "similarProductRules": List [ OrderedMap { "property": "Descending", "includes": "", "keywords": "", "strict": "" } ], "condition": OrderedMap { "name": "title" } } <br>
|
|
1132
1536
|
>
|
|
1133
1537
|
>**version:** number <br>
|
|
1134
|
-
>*
|
|
1538
|
+
>*version number of the object change* <br>
|
|
1135
1539
|
>example: 10 <br>
|
|
1136
1540
|
>
|
|
1137
|
-
>**identifier:**
|
|
1138
|
-
>*textual identifier for the field
|
|
1541
|
+
>**identifier:** string <br>
|
|
1542
|
+
>*textual identifier for the recording field* <br>
|
|
1139
1543
|
>example: catalog <br>
|
|
1140
1544
|
>default: marker <br>
|
|
1141
1545
|
>
|
|
@@ -1143,18 +1547,34 @@ Example return:
|
|
|
1143
1547
|
>*position number (for sorting)* <br>
|
|
1144
1548
|
>example: 192 <br>
|
|
1145
1549
|
>
|
|
1146
|
-
>**
|
|
1147
|
-
>*array of
|
|
1148
|
-
>example:
|
|
1550
|
+
>**productPageUrls:** any <br>
|
|
1551
|
+
>*array of unique parts of the URL page (after the last "/") - categories from where products can be taken (optional)* <br>
|
|
1552
|
+
>example: List [ "23-laminat-floorwood-maxima" ] <br>
|
|
1553
|
+
>
|
|
1554
|
+
>**isVisible:** boolean <br>
|
|
1555
|
+
>*visibility (availability) indicator of the block* <br>
|
|
1556
|
+
>example: true <br>
|
|
1557
|
+
>
|
|
1558
|
+
>**attributeValues:** Record<string, string> <br>
|
|
1559
|
+
>*Array of attribute values from the index (type, value, array of additional fields for the attribute)* <br>
|
|
1560
|
+
>example: OrderedMap { "en_US": OrderedMap { "marker": OrderedMap { "value": "", "type": "string", "position": 1, "isProductPreview": false, "isIcon": false, "attributeFields": OrderedMap { "marker": OrderedMap { "type": "string", "value": "test" } } } } } <br>
|
|
1149
1561
|
>
|
|
1150
1562
|
>**type:** string <br>
|
|
1151
1563
|
>*block type* <br>
|
|
1152
1564
|
>example: forNewsPage <br>
|
|
1153
|
-
>
|
|
1154
|
-
>**templateIdentifier:** string <br>
|
|
1155
|
-
>*template marker used by the block (can be null)* <br>
|
|
1156
1565
|
>Enum:
|
|
1157
|
-
|
|
1566
|
+
[ forCatalogProducts, forBasketPage, forErrorPage, forCatalogPages, forProductPreview, forProductPage, forSimilarProductBlock, forStatisticProductBlock, forProductBlock, forForm, forFormField, forNewsPage, forNewsBlock, forNewsPreview, forOneNewsPage, forUsualPage, forTextBlock, forSlider, forOrder, service ] <br>
|
|
1567
|
+
>
|
|
1568
|
+
>**attributeSetId:** number <br>
|
|
1569
|
+
>*identifier for the used attribute set* <br>
|
|
1570
|
+
>example: 7 <br>
|
|
1571
|
+
>
|
|
1572
|
+
>**position:** number <br>
|
|
1573
|
+
>*position number (for sorting)* <br>
|
|
1574
|
+
>example: 192 <br>
|
|
1575
|
+
>
|
|
1576
|
+
>**templateIdentifier:** string <br>
|
|
1577
|
+
>*Template marker used by the block (can be null)* <br>
|
|
1158
1578
|
>example: null <br>
|
|
1159
1579
|
>
|
|
1160
1580
|
></details>
|
|
@@ -1181,7 +1601,6 @@ Example return:
|
|
|
1181
1601
|
]
|
|
1182
1602
|
```
|
|
1183
1603
|
|
|
1184
|
-
|
|
1185
1604
|
---
|
|
1186
1605
|
|
|
1187
1606
|
## <h2 id="events"> Events </h2>
|
|
@@ -1190,7 +1609,7 @@ Example return:
|
|
|
1190
1609
|
const { Events } = defineOneEntry('your-url');
|
|
1191
1610
|
```
|
|
1192
1611
|
|
|
1193
|
-
### Events.getAllSubscriptions(
|
|
1612
|
+
### Events.getAllSubscriptions(offset, limit)
|
|
1194
1613
|
|
|
1195
1614
|
```js
|
|
1196
1615
|
const value = await Events.getAllSubscriptions('test_event', 1, 1)
|
|
@@ -1198,7 +1617,8 @@ const value = await Events.getAllSubscriptions('test_event', 1, 1)
|
|
|
1198
1617
|
|
|
1199
1618
|
> This method return all subscriptions to product.
|
|
1200
1619
|
|
|
1201
|
-
Example return:
|
|
1620
|
+
Example return:
|
|
1621
|
+
|
|
1202
1622
|
```json
|
|
1203
1623
|
{
|
|
1204
1624
|
"total": 100,
|
|
@@ -1225,7 +1645,6 @@ Example return:
|
|
|
1225
1645
|
>
|
|
1226
1646
|
></details>
|
|
1227
1647
|
|
|
1228
|
-
|
|
1229
1648
|
### Events.subscribeByMarker(marker, userId, productId)
|
|
1230
1649
|
|
|
1231
1650
|
```js
|
|
@@ -1234,7 +1653,6 @@ const value = await Events.subscribeByMarker('test_event', 1, 1)
|
|
|
1234
1653
|
|
|
1235
1654
|
> This method unsubscribes to the product event. Returns nothing if the unsubscription was successful.
|
|
1236
1655
|
|
|
1237
|
-
|
|
1238
1656
|
### Events.unsubscribeByMarker(marker, userId, productId)
|
|
1239
1657
|
|
|
1240
1658
|
```js
|
|
@@ -1245,7 +1663,6 @@ const value = await Events.subscribeByMarker('test_event', 1, 1)
|
|
|
1245
1663
|
|
|
1246
1664
|
---
|
|
1247
1665
|
|
|
1248
|
-
|
|
1249
1666
|
## <h2 id="fileuploading"> FileUploading </h2>
|
|
1250
1667
|
|
|
1251
1668
|
```js
|
|
@@ -1329,11 +1746,8 @@ Example return:
|
|
|
1329
1746
|
|
|
1330
1747
|
---
|
|
1331
1748
|
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
1749
|
## <h2 id="forms"> Forms </h2>
|
|
1335
1750
|
|
|
1336
|
-
|
|
1337
1751
|
```js
|
|
1338
1752
|
const { Forms } = defineOneEntry('your-url');
|
|
1339
1753
|
```
|
|
@@ -1403,31 +1817,31 @@ Example return:
|
|
|
1403
1817
|
><details>
|
|
1404
1818
|
><summary >Schema</summary>
|
|
1405
1819
|
>
|
|
1406
|
-
>**id:**
|
|
1820
|
+
>**id:** number <br>
|
|
1407
1821
|
>*object identifier* <br>
|
|
1408
1822
|
>example: 1764 <br>
|
|
1409
1823
|
>
|
|
1410
|
-
>**attributeSetId:**
|
|
1824
|
+
>**attributeSetId:** number <br>
|
|
1411
1825
|
>*identifier of the attribute set used* <br>
|
|
1412
1826
|
>
|
|
1413
|
-
>**processingType:**
|
|
1827
|
+
>**processingType:** string <br>
|
|
1414
1828
|
>*form processing type* <br>
|
|
1415
1829
|
>example: email <br>
|
|
1416
1830
|
>
|
|
1417
|
-
>**localizeInfos:**
|
|
1831
|
+
>**localizeInfos:** FormLocalizeInfos <br>
|
|
1418
1832
|
>*form name with localization* <br>
|
|
1419
1833
|
>Enum:
|
|
1420
1834
|
>[ db, email, script ]
|
|
1421
1835
|
>example: OrderedMap { "en_US": OrderedMap { "title": "My Form", "titleForSite": "", "successMessage": "", "unsuccessMessage": "", "urlAddress": "", "database": "0", "script": "0" } } <br>
|
|
1422
1836
|
>
|
|
1423
|
-
>**processingData:**
|
|
1837
|
+
>**processingData:** ProcessingData <br>
|
|
1424
1838
|
>*form data* <br>
|
|
1425
1839
|
>
|
|
1426
1840
|
>**version:** number <br>
|
|
1427
1841
|
>*object version number* <br>
|
|
1428
1842
|
>example: 10 <br>
|
|
1429
1843
|
>
|
|
1430
|
-
>**identifier:**
|
|
1844
|
+
>**identifier:** string <br>
|
|
1431
1845
|
>*textual identifier for the record field* <br>
|
|
1432
1846
|
>example: catalog <br>
|
|
1433
1847
|
>default: marker <br>
|
|
@@ -1440,13 +1854,12 @@ Example return:
|
|
|
1440
1854
|
>*Form type* <br>
|
|
1441
1855
|
>example: 'data' <br>
|
|
1442
1856
|
>
|
|
1443
|
-
>**attributes:**
|
|
1857
|
+
>**attributes:** <br>
|
|
1444
1858
|
>*array of attribute values from the used attribute set for displaying the form (taking into account the specified language)* <br>
|
|
1445
1859
|
>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" } } ] <br>
|
|
1446
1860
|
>
|
|
1447
1861
|
></details>
|
|
1448
1862
|
|
|
1449
|
-
|
|
1450
1863
|
### Forms.getFormByMarker(marker, langCode)
|
|
1451
1864
|
|
|
1452
1865
|
```js
|
|
@@ -1510,31 +1923,31 @@ Example return:
|
|
|
1510
1923
|
><details>
|
|
1511
1924
|
><summary >Schema</summary>
|
|
1512
1925
|
>
|
|
1513
|
-
>**id:**
|
|
1926
|
+
>**id:** number <br>
|
|
1514
1927
|
>*object identifier* <br>
|
|
1515
1928
|
>example: 1764 <br>
|
|
1516
1929
|
>
|
|
1517
|
-
>**attributeSetId:**
|
|
1930
|
+
>**attributeSetId:** number <br>
|
|
1518
1931
|
>*identifier of the attribute set used* <br>
|
|
1519
1932
|
>
|
|
1520
|
-
>**processingType:**
|
|
1933
|
+
>**processingType:** string <br>
|
|
1521
1934
|
>*form processing type* <br>
|
|
1522
1935
|
>example: email <br>
|
|
1523
1936
|
>
|
|
1524
|
-
>**localizeInfos:**
|
|
1937
|
+
>**localizeInfos:** FormLocalizeInfos <br>
|
|
1525
1938
|
>*form name with localization* <br>
|
|
1526
1939
|
>Enum:
|
|
1527
1940
|
>[ db, email, script ]
|
|
1528
1941
|
>example: OrderedMap { "en_US": OrderedMap { "title": "My Form", "titleForSite": "", "successMessage": "", "unsuccessMessage": "", "urlAddress": "", "database": "0", "script": "0" } } <br>
|
|
1529
1942
|
>
|
|
1530
|
-
>**processingData:**
|
|
1943
|
+
>**processingData:** ProcessingData <br>
|
|
1531
1944
|
>*form data* <br>
|
|
1532
1945
|
>
|
|
1533
1946
|
>**version:** number <br>
|
|
1534
1947
|
>*object version number* <br>
|
|
1535
1948
|
>example: 10 <br>
|
|
1536
1949
|
>
|
|
1537
|
-
>**identifier:**
|
|
1950
|
+
>**identifier:** string <br>
|
|
1538
1951
|
>*textual identifier for the record field* <br>
|
|
1539
1952
|
>example: catalog <br>
|
|
1540
1953
|
>default: marker <br>
|
|
@@ -1547,7 +1960,7 @@ Example return:
|
|
|
1547
1960
|
>*Form type* <br>
|
|
1548
1961
|
>example: 'data' <br>
|
|
1549
1962
|
>
|
|
1550
|
-
>**attributes:**
|
|
1963
|
+
>**attributes:** <br>
|
|
1551
1964
|
>*array of attribute values from the used attribute set for displaying the form (taking into account the specified language)* <br>
|
|
1552
1965
|
>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" } } ] <br>
|
|
1553
1966
|
>
|
|
@@ -1555,7 +1968,6 @@ Example return:
|
|
|
1555
1968
|
|
|
1556
1969
|
---
|
|
1557
1970
|
|
|
1558
|
-
|
|
1559
1971
|
## <h2 id="formdata"> FormData </h2>
|
|
1560
1972
|
|
|
1561
1973
|
```js
|
|
@@ -1567,6 +1979,7 @@ The following are examples of form data objects for different data types.
|
|
|
1567
1979
|
|
|
1568
1980
|
---
|
|
1569
1981
|
Example with a simple type attribute "string", "number", "float"
|
|
1982
|
+
|
|
1570
1983
|
```json
|
|
1571
1984
|
{
|
|
1572
1985
|
"marker": "last_name",
|
|
@@ -1577,6 +1990,7 @@ Example with a simple type attribute "string", "number", "float"
|
|
|
1577
1990
|
|
|
1578
1991
|
---
|
|
1579
1992
|
Example with a simple type attribute "date", "dateTime", "time"
|
|
1993
|
+
|
|
1580
1994
|
```json
|
|
1581
1995
|
{
|
|
1582
1996
|
"marker": "birthday",
|
|
@@ -1590,7 +2004,9 @@ Example with a simple type attribute "date", "dateTime", "time"
|
|
|
1590
2004
|
```
|
|
1591
2005
|
|
|
1592
2006
|
---
|
|
2007
|
+
|
|
1593
2008
|
Example with a simple type attribute "text"
|
|
2009
|
+
|
|
1594
2010
|
```json
|
|
1595
2011
|
{
|
|
1596
2012
|
"marker": "about",
|
|
@@ -1607,7 +2023,9 @@ Example with a simple type attribute "text"
|
|
|
1607
2023
|
```
|
|
1608
2024
|
|
|
1609
2025
|
---
|
|
2026
|
+
|
|
1610
2027
|
Example with a simple type attribute "text"
|
|
2028
|
+
|
|
1611
2029
|
```json
|
|
1612
2030
|
{
|
|
1613
2031
|
"marker": "about",
|
|
@@ -1624,7 +2042,9 @@ Example with a simple type attribute "text"
|
|
|
1624
2042
|
```
|
|
1625
2043
|
|
|
1626
2044
|
---
|
|
2045
|
+
|
|
1627
2046
|
Example with a simple type attribute "textWithHeader"
|
|
2047
|
+
|
|
1628
2048
|
```json
|
|
1629
2049
|
{
|
|
1630
2050
|
"marker": "about",
|
|
@@ -1642,7 +2062,9 @@ Example with a simple type attribute "textWithHeader"
|
|
|
1642
2062
|
```
|
|
1643
2063
|
|
|
1644
2064
|
---
|
|
2065
|
+
|
|
1645
2066
|
Example with a simple type attribute "image" or "groupOfImages"
|
|
2067
|
+
|
|
1646
2068
|
```json
|
|
1647
2069
|
{
|
|
1648
2070
|
"marker": "avatar",
|
|
@@ -1662,7 +2084,9 @@ Example with a simple type attribute "image" or "groupOfImages"
|
|
|
1662
2084
|
```
|
|
1663
2085
|
|
|
1664
2086
|
---
|
|
2087
|
+
|
|
1665
2088
|
Example with a simple type attribute "files"
|
|
2089
|
+
|
|
1666
2090
|
```json
|
|
1667
2091
|
{
|
|
1668
2092
|
"marker": "picture",
|
|
@@ -1678,7 +2102,9 @@ Example with a simple type attribute "files"
|
|
|
1678
2102
|
```
|
|
1679
2103
|
|
|
1680
2104
|
---
|
|
2105
|
+
|
|
1681
2106
|
Example with a simple type attribute "radioButton" or "list"
|
|
2107
|
+
|
|
1682
2108
|
```json
|
|
1683
2109
|
{
|
|
1684
2110
|
"marker": "selector",
|
|
@@ -1696,7 +2122,32 @@ Example with a simple type attribute "radioButton" or "list"
|
|
|
1696
2122
|
}
|
|
1697
2123
|
```
|
|
1698
2124
|
|
|
2125
|
+
---
|
|
1699
2126
|
|
|
2127
|
+
Example with attribute type "entity" (nested list)
|
|
2128
|
+
|
|
2129
|
+
```json
|
|
2130
|
+
{
|
|
2131
|
+
"formIdentifier": "reg",
|
|
2132
|
+
"formData": {
|
|
2133
|
+
"en_US": [
|
|
2134
|
+
{
|
|
2135
|
+
"marker": "entity-marker",
|
|
2136
|
+
"type": "entity",
|
|
2137
|
+
"value": [
|
|
2138
|
+
{
|
|
2139
|
+
"id": 1,
|
|
2140
|
+
"title": "red",
|
|
2141
|
+
"value": "1",
|
|
2142
|
+
"parentId": null,
|
|
2143
|
+
"depth": 0,
|
|
2144
|
+
}
|
|
2145
|
+
]
|
|
2146
|
+
}
|
|
2147
|
+
]
|
|
2148
|
+
}
|
|
2149
|
+
}
|
|
2150
|
+
```
|
|
1700
2151
|
|
|
1701
2152
|
### FormData.postFormsData(data, langCode)
|
|
1702
2153
|
|
|
@@ -1716,225 +2167,604 @@ const value = await FormData.postFormsData(body)
|
|
|
1716
2167
|
><details>
|
|
1717
2168
|
><summary >Schema</summary>
|
|
1718
2169
|
>
|
|
1719
|
-
>**id:**
|
|
2170
|
+
>**id:** number <br>
|
|
1720
2171
|
>*object identifier* <br>
|
|
1721
2172
|
>example: 1764 <br>
|
|
1722
2173
|
>
|
|
1723
|
-
>**formIdentifier:**
|
|
2174
|
+
>**formIdentifier:** string <br>
|
|
1724
2175
|
>*text identifier of form object (marker)* <br>
|
|
1725
2176
|
>example: my-form <br>
|
|
1726
|
-
>
|
|
1727
|
-
>**time:**
|
|
2177
|
+
>
|
|
2178
|
+
>**time:** Date <br>
|
|
1728
2179
|
>*form change date and time* <br>
|
|
1729
2180
|
>example: 2023-02-12 10:56<br>
|
|
1730
|
-
>
|
|
2181
|
+
>
|
|
1731
2182
|
>**formData:** <br>
|
|
1732
2183
|
>*Data submitted by the form* <br>
|
|
1733
2184
|
>example: OrderedMap { "en_US": List [ OrderedMap { "marker": "naimenovanie_1", "type": "string", "value": "Name" } ] }<br>
|
|
1734
2185
|
></details>
|
|
2186
|
+
> This method retrieves all form data objects from the API. It returns a Promise that resolves to an array of objects of type CreateFormData. The method will add the default language to the request body. If you want to change the language, just pass it with the second argument
|
|
2187
|
+
|
|
2188
|
+
Example return:
|
|
2189
|
+
|
|
2190
|
+
```json
|
|
2191
|
+
{
|
|
2192
|
+
"id": 1764,
|
|
2193
|
+
"formIdentifier": "my-form",
|
|
2194
|
+
"time": "2023-02-12 10:56",
|
|
2195
|
+
"formData": {
|
|
2196
|
+
"marker": "name_1",
|
|
2197
|
+
"value": "Name",
|
|
2198
|
+
"type": "string"
|
|
2199
|
+
}
|
|
2200
|
+
}
|
|
2201
|
+
```
|
|
2202
|
+
|
|
2203
|
+
><details>
|
|
2204
|
+
><summary >Schema</summary>
|
|
2205
|
+
>
|
|
2206
|
+
>**id:** number <br>
|
|
2207
|
+
>*object identifier* <br>
|
|
2208
|
+
>example: 1764 <br>
|
|
2209
|
+
>
|
|
2210
|
+
>**formIdentifier:** string <br>
|
|
2211
|
+
>*Text identifier of the form object (marker)* <br>
|
|
2212
|
+
>example: my-form <br>
|
|
2213
|
+
>
|
|
2214
|
+
>**time:** Date <br>
|
|
2215
|
+
>*Date and time of form modification* <br>
|
|
2216
|
+
>example: 2023-02-12 10:56 <br>
|
|
2217
|
+
>
|
|
2218
|
+
>**formData:** FormDataLangType <br>
|
|
2219
|
+
>*Data submitted by the form* <br>
|
|
2220
|
+
>example: OrderedMap { "en_US": List [ OrderedMap { "marker": "naimenovanie_1", "value": "Name" } ] } <br>
|
|
2221
|
+
>
|
|
2222
|
+
></details>
|
|
2223
|
+
|
|
2224
|
+
### FormData.getFormsData(langCode, offset, limit)
|
|
2225
|
+
|
|
2226
|
+
```js
|
|
2227
|
+
const value = await FormData.getFormsData('en_US', 0, 30)
|
|
2228
|
+
```
|
|
2229
|
+
|
|
2230
|
+
> 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.
|
|
2231
|
+
|
|
2232
|
+
Example return:
|
|
2233
|
+
|
|
2234
|
+
```json
|
|
2235
|
+
{
|
|
2236
|
+
"total": 1,
|
|
2237
|
+
"items": [
|
|
2238
|
+
{
|
|
2239
|
+
"id": 1764,
|
|
2240
|
+
"formIdentifier": "my-form",
|
|
2241
|
+
"time": "2023-02-12 10:56",
|
|
2242
|
+
"formData": {
|
|
2243
|
+
"marker": "name_1",
|
|
2244
|
+
"value": "Name",
|
|
2245
|
+
"type": "string"
|
|
2246
|
+
},
|
|
2247
|
+
"attributeSetIdentifier": "test-form"
|
|
2248
|
+
}
|
|
2249
|
+
]
|
|
2250
|
+
}
|
|
2251
|
+
```
|
|
2252
|
+
|
|
2253
|
+
><details>
|
|
2254
|
+
><summary >Schema</summary>
|
|
2255
|
+
>
|
|
2256
|
+
>**total:** number <br>
|
|
2257
|
+
>*total number of found records* <br>
|
|
2258
|
+
>example: 100 <br>
|
|
2259
|
+
>
|
|
2260
|
+
>**id:** number <br>
|
|
2261
|
+
>*object identifier* <br>
|
|
2262
|
+
>example: 1764 <br>
|
|
2263
|
+
>
|
|
2264
|
+
>**formIdentifier:** string <br>
|
|
2265
|
+
>*Text identifier of the form object (marker)* <br>
|
|
2266
|
+
>example: my-form <br>
|
|
2267
|
+
>
|
|
2268
|
+
>**time:** Date <br>
|
|
2269
|
+
>*Date and time of form modification* <br>
|
|
2270
|
+
>example: 2023-02-12 10:56 <br>
|
|
2271
|
+
>
|
|
2272
|
+
>**formData:** FormDataLangType <br>
|
|
2273
|
+
>*Data submitted by the form* <br>
|
|
2274
|
+
>example: OrderedMap { "en_US": List [ OrderedMap { "marker": "naimenovanie_1", "value": "Name" } ] } <br>
|
|
2275
|
+
>
|
|
2276
|
+
>**attributeSetIdentifier:** string <br>
|
|
2277
|
+
>*text identifier (marker) of the used attribute set* <br>
|
|
2278
|
+
>example: test-form <br>
|
|
2279
|
+
>
|
|
2280
|
+
></details>
|
|
2281
|
+
|
|
2282
|
+
### FormData.getFormsDataByMarker(marker, langCode, offset, limit)
|
|
2283
|
+
|
|
2284
|
+
```js
|
|
2285
|
+
const value = await FormData.getFormsDataByMarker('my-marker', 'en_US', 0, 30)
|
|
2286
|
+
```
|
|
2287
|
+
|
|
2288
|
+
> 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.
|
|
2289
|
+
|
|
2290
|
+
Example return:
|
|
2291
|
+
|
|
2292
|
+
```json
|
|
2293
|
+
{
|
|
2294
|
+
"total": 1,
|
|
2295
|
+
"items": [
|
|
2296
|
+
{
|
|
2297
|
+
"id": 1764,
|
|
2298
|
+
"formIdentifier": "my-form",
|
|
2299
|
+
"time": "2023-02-12 10:56",
|
|
2300
|
+
"formData": {
|
|
2301
|
+
"marker": "name_1",
|
|
2302
|
+
"value": "Name",
|
|
2303
|
+
"type": "string"
|
|
2304
|
+
},
|
|
2305
|
+
"attributeSetIdentifier": "test-form"
|
|
2306
|
+
}
|
|
2307
|
+
]
|
|
2308
|
+
}
|
|
2309
|
+
```
|
|
2310
|
+
|
|
2311
|
+
><details>
|
|
2312
|
+
><summary>Schema</summary>
|
|
2313
|
+
>
|
|
2314
|
+
>
|
|
2315
|
+
>**total:** number <br>
|
|
2316
|
+
>*total number of found records* <br>
|
|
2317
|
+
>example: 100 <br>
|
|
2318
|
+
>
|
|
2319
|
+
>**id:** number <br>
|
|
2320
|
+
>*object identifier* <br>
|
|
2321
|
+
>example: 1764 <br>
|
|
2322
|
+
>
|
|
2323
|
+
>**formIdentifier:** string <br>
|
|
2324
|
+
>*Text identifier of the form object (marker)* <br>
|
|
2325
|
+
>example: my-form <br>
|
|
2326
|
+
>
|
|
2327
|
+
>**time:** Date <br>
|
|
2328
|
+
>*Date and time of form modification* <br>
|
|
2329
|
+
>example: 2023-02-12 10:56 <br>
|
|
2330
|
+
>
|
|
2331
|
+
>**formData:** FormDataLangType <br>
|
|
2332
|
+
>*Data submitted by the form* <br>
|
|
2333
|
+
>example: OrderedMap { "en_US": List [ OrderedMap { "marker": "naimenovanie_1", "value": "Name" } ] } <br>
|
|
2334
|
+
>
|
|
2335
|
+
>**attributeSetIdentifier:** string <br>
|
|
2336
|
+
>*text identifier (marker) of the used attribute set* <br>
|
|
2337
|
+
>example: test-form <br>
|
|
2338
|
+
>
|
|
2339
|
+
></details>
|
|
2340
|
+
|
|
2341
|
+
---
|
|
2342
|
+
|
|
2343
|
+
## <h2 id="generaltypes"> GeneralTypes </h2>
|
|
2344
|
+
|
|
2345
|
+
```js
|
|
2346
|
+
const { GeneralTypes } = defineOneEntry('your-url');
|
|
2347
|
+
```
|
|
2348
|
+
|
|
2349
|
+
### GeneralTypes.getAllTypes()
|
|
2350
|
+
|
|
2351
|
+
```js
|
|
2352
|
+
const value = await GeneralTypes.getAllTypes()
|
|
2353
|
+
```
|
|
2354
|
+
|
|
2355
|
+
> This method retrieves all objects of type GeneralTypeEntity from the API. It returns a Promise that resolves to an array of GeneralTypeEntity objects.
|
|
2356
|
+
|
|
2357
|
+
Example return:
|
|
2358
|
+
|
|
2359
|
+
```json
|
|
2360
|
+
[
|
|
2361
|
+
{
|
|
2362
|
+
"id": 1,
|
|
2363
|
+
"type": "forNewsPage"
|
|
2364
|
+
}
|
|
2365
|
+
]
|
|
2366
|
+
```
|
|
2367
|
+
|
|
2368
|
+
><details>
|
|
2369
|
+
><summary>Schema</summary>
|
|
2370
|
+
>
|
|
2371
|
+
>**id:** number <br>
|
|
2372
|
+
>*object identifier* <br>
|
|
2373
|
+
>example: 1764 <br>
|
|
2374
|
+
>
|
|
2375
|
+
>**type:** string <br>
|
|
2376
|
+
>*type value* <br>
|
|
2377
|
+
>example: forNewsPage <br>
|
|
2378
|
+
>Enum:
|
|
2379
|
+
>[ forCatalogProducts, forBasketPage, forErrorPage, forCatalogPages, forProductPreview, forProductPage, forSimilarProductBlock, forStatisticProductBlock, forProductBlock, forForm, forFormField, forNewsPage, forNewsBlock, forNewsPreview, forOneNewsPage, forUsualPage, forTextBlock, forSlider, service ] <br>
|
|
2380
|
+
>
|
|
2381
|
+
></details>
|
|
2382
|
+
|
|
2383
|
+
---
|
|
2384
|
+
|
|
2385
|
+
## <h2 id="integrationcollections">IntegrationCollections</h2>
|
|
2386
|
+
|
|
2387
|
+
```js
|
|
2388
|
+
const { IntegrationCollections } = defineOneEntry('your-url');
|
|
2389
|
+
```
|
|
2390
|
+
|
|
2391
|
+
### IntegrationCollections.getICollections()
|
|
2392
|
+
|
|
2393
|
+
```js
|
|
2394
|
+
const result = await IntegrationCollections.getICollections();
|
|
2395
|
+
```
|
|
2396
|
+
|
|
2397
|
+
> Get all collections.
|
|
2398
|
+
|
|
2399
|
+
Example return:
|
|
2400
|
+
|
|
2401
|
+
```json
|
|
2402
|
+
[
|
|
2403
|
+
{
|
|
2404
|
+
"id": 1764,
|
|
2405
|
+
"localizeInfos": {
|
|
2406
|
+
"en_US": {
|
|
2407
|
+
"title": "Collection 1"
|
|
2408
|
+
}
|
|
2409
|
+
},
|
|
2410
|
+
"identifier": "collection",
|
|
2411
|
+
"formId": 1,
|
|
2412
|
+
"attributeSetId": "1",
|
|
2413
|
+
"selectedAttributeMarkers": "marker1, marker2"
|
|
2414
|
+
}
|
|
2415
|
+
]
|
|
2416
|
+
```
|
|
2417
|
+
|
|
2418
|
+
><details>
|
|
2419
|
+
><summary>Schema</summary>
|
|
2420
|
+
>
|
|
2421
|
+
>**id:** number <br>
|
|
2422
|
+
>*object identifier* <br>
|
|
2423
|
+
>example: 1764 <br>
|
|
2424
|
+
>
|
|
2425
|
+
>**localizeInfos:** CommonLocalizeInfos <br>
|
|
2426
|
+
>*Name considering localization* <br>
|
|
2427
|
+
>example: OrderedMap { "en_US": OrderedMap { "title": "Collection 1" } } <br>
|
|
2428
|
+
>
|
|
2429
|
+
>**identifier:** string <br>
|
|
2430
|
+
>*Text identifier for record field* <br>
|
|
2431
|
+
>example: 1 <br>
|
|
2432
|
+
>default: marker <br>
|
|
2433
|
+
>
|
|
2434
|
+
>**formId:** number <br>
|
|
2435
|
+
>*Identifier for the form used by the order storage* <br>
|
|
2436
|
+
>default: <br>
|
|
2437
|
+
>
|
|
2438
|
+
>**attributeSetId:** string <br>
|
|
2439
|
+
>*Identifier of the set of attributes used by the form attached to the collection* <br>
|
|
2440
|
+
>example: 1 <br>
|
|
2441
|
+
>default: <br>
|
|
2442
|
+
>
|
|
2443
|
+
>**selectedAttributeMarkers:** string <br>
|
|
2444
|
+
>*Text identifiers of form object attributes for display in the data table* <br>
|
|
2445
|
+
>example: marker1, marker2 <br>
|
|
2446
|
+
>default: <br>
|
|
2447
|
+
>
|
|
2448
|
+
></details>
|
|
1735
2449
|
|
|
1736
|
-
|
|
2450
|
+
### IntegrationCollections.getICollectionById(id, langCode)
|
|
1737
2451
|
|
|
2452
|
+
```js
|
|
2453
|
+
const result = await IntegrationCollections.getICollectionById(1);
|
|
2454
|
+
```
|
|
1738
2455
|
|
|
2456
|
+
> Get collection by id.
|
|
1739
2457
|
|
|
1740
2458
|
Example return:
|
|
1741
2459
|
|
|
1742
2460
|
```json
|
|
1743
2461
|
{
|
|
1744
2462
|
"id": 1764,
|
|
1745
|
-
"
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
|
|
2463
|
+
"localizeInfos": {
|
|
2464
|
+
"en_US": {
|
|
2465
|
+
"title": "Collection 1"
|
|
2466
|
+
}
|
|
2467
|
+
},
|
|
2468
|
+
"identifier": "collection",
|
|
2469
|
+
"formId": 1,
|
|
2470
|
+
"attributeSetId": "1",
|
|
2471
|
+
"selectedAttributeMarkers": "marker1, marker2"
|
|
1752
2472
|
}
|
|
1753
2473
|
```
|
|
1754
2474
|
|
|
1755
2475
|
><details>
|
|
1756
|
-
><summary
|
|
2476
|
+
><summary>Schema</summary>
|
|
1757
2477
|
>
|
|
1758
|
-
>**id:**
|
|
2478
|
+
>**id:** number <br>
|
|
1759
2479
|
>*object identifier* <br>
|
|
1760
2480
|
>example: 1764 <br>
|
|
1761
2481
|
>
|
|
1762
|
-
>**
|
|
1763
|
-
>*
|
|
1764
|
-
>example:
|
|
2482
|
+
>**localizeInfos:** CommonLocalizeInfos <br>
|
|
2483
|
+
>*Name considering localization* <br>
|
|
2484
|
+
>example: OrderedMap { "en_US": OrderedMap { "title": "Collection 1" } } <br>
|
|
1765
2485
|
>
|
|
1766
|
-
>**
|
|
1767
|
-
>*
|
|
1768
|
-
>example:
|
|
2486
|
+
>**identifier:** string <br>
|
|
2487
|
+
>*Text identifier for record field* <br>
|
|
2488
|
+
>example: collection <br>
|
|
2489
|
+
>default: marker <br>
|
|
1769
2490
|
>
|
|
1770
|
-
>**
|
|
1771
|
-
>*
|
|
1772
|
-
>example:
|
|
2491
|
+
>**formId:** number <br>
|
|
2492
|
+
>*Identifier for the form used by the order storage* <br>
|
|
2493
|
+
>example: 1 <br>
|
|
2494
|
+
>default: <br>
|
|
2495
|
+
>
|
|
2496
|
+
>**attributeSetId:** string <br>
|
|
2497
|
+
>*Identifier of the set of attributes used by the form attached to the collection* <br>
|
|
2498
|
+
>example: 1 <br>
|
|
2499
|
+
>default: <br>
|
|
2500
|
+
>
|
|
2501
|
+
>**selectedAttributeMarkers:** string <br>
|
|
2502
|
+
>*Text identifiers of form object attributes for display in the data table* <br>
|
|
2503
|
+
>example: marker1, marker2 <br>
|
|
1773
2504
|
>
|
|
1774
2505
|
></details>
|
|
1775
2506
|
|
|
1776
|
-
###
|
|
2507
|
+
### IntegrationCollections.getICollectionRowsById(id, langCode, userQuery)
|
|
1777
2508
|
|
|
1778
2509
|
```js
|
|
1779
|
-
const
|
|
2510
|
+
const result = await IntegrationCollections.getICollectionRowsById(1);
|
|
1780
2511
|
```
|
|
1781
2512
|
|
|
1782
|
-
>
|
|
2513
|
+
> Get all records belonging to the collection by collection id.
|
|
1783
2514
|
|
|
1784
2515
|
Example return:
|
|
1785
2516
|
|
|
1786
2517
|
```json
|
|
1787
2518
|
{
|
|
1788
|
-
"total":
|
|
2519
|
+
"total": 100,
|
|
1789
2520
|
"items": [
|
|
1790
2521
|
{
|
|
1791
2522
|
"id": 1764,
|
|
1792
|
-
"
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
"value": "Name",
|
|
1797
|
-
"type": "string"
|
|
2523
|
+
"localizeInfos": {
|
|
2524
|
+
"en_US": {
|
|
2525
|
+
"title": "Collection 1"
|
|
2526
|
+
}
|
|
1798
2527
|
},
|
|
1799
|
-
"
|
|
2528
|
+
"identifier": "collection",
|
|
2529
|
+
"formId": 1,
|
|
2530
|
+
"attributeSetId": "1",
|
|
2531
|
+
"selectedAttributeMarkers": "marker1, marker2"
|
|
1800
2532
|
}
|
|
1801
2533
|
]
|
|
1802
2534
|
}
|
|
1803
2535
|
```
|
|
1804
2536
|
|
|
1805
2537
|
><details>
|
|
1806
|
-
><summary
|
|
2538
|
+
><summary>Schema</summary>
|
|
1807
2539
|
>
|
|
1808
|
-
>**total:**
|
|
1809
|
-
>*
|
|
2540
|
+
>**total:** number <br>
|
|
2541
|
+
>*Total number of found records* <br>
|
|
1810
2542
|
>example: 100 <br>
|
|
1811
2543
|
>
|
|
1812
|
-
>**
|
|
1813
|
-
>*
|
|
2544
|
+
>**items:** ICollection <br>
|
|
2545
|
+
>*CollectionDto* <br>
|
|
2546
|
+
>
|
|
2547
|
+
>**id:** number <br>
|
|
2548
|
+
>*Object identifier* <br>
|
|
1814
2549
|
>example: 1764 <br>
|
|
1815
2550
|
>
|
|
1816
|
-
>**
|
|
1817
|
-
>*
|
|
1818
|
-
>example:
|
|
2551
|
+
>**localizeInfos:** CommonLocalizeInfos <br>
|
|
2552
|
+
>*Name considering localization* <br>
|
|
2553
|
+
>example: OrderedMap { "en_US": OrderedMap { "title": "Collection 1" } } <br>
|
|
1819
2554
|
>
|
|
1820
|
-
>**
|
|
1821
|
-
>*
|
|
1822
|
-
>example:
|
|
2555
|
+
>**identifier:** string <br>
|
|
2556
|
+
>*Text identifier for record field* <br>
|
|
2557
|
+
>example: collection <br>
|
|
2558
|
+
>default: marker <br>
|
|
1823
2559
|
>
|
|
1824
|
-
>**
|
|
1825
|
-
>*
|
|
1826
|
-
>example:
|
|
2560
|
+
>**formId:** number <br>
|
|
2561
|
+
>*Identifier for the form used by the order storage* <br>
|
|
2562
|
+
>example: 1 <br>
|
|
2563
|
+
>default: <br>
|
|
1827
2564
|
>
|
|
1828
|
-
>**
|
|
1829
|
-
>*
|
|
1830
|
-
>example:
|
|
2565
|
+
>**attributeSetId:** string <br>
|
|
2566
|
+
>*Identifier of the set of attributes used by the form attached to the collection* <br>
|
|
2567
|
+
>example: 1 <br>
|
|
2568
|
+
>default: <br>
|
|
2569
|
+
>
|
|
2570
|
+
>**selectedAttributeMarkers:** string <br>
|
|
2571
|
+
>*Text identifiers of form object attributes for display in the data table* <br>
|
|
2572
|
+
>example: marker1, marker2 <br>
|
|
1831
2573
|
>
|
|
1832
2574
|
></details>
|
|
1833
2575
|
|
|
1834
|
-
|
|
1835
|
-
### FormData.getFormsDataByMarker(marker, langCode, offset, limit)
|
|
2576
|
+
### IntegrationCollections.validateICollectionMarker(marker)
|
|
1836
2577
|
|
|
1837
2578
|
```js
|
|
1838
|
-
const
|
|
2579
|
+
const result = await IntegrationCollections.validateICollectionMarker('test_collection');
|
|
1839
2580
|
```
|
|
1840
2581
|
|
|
1841
|
-
>
|
|
2582
|
+
> Check for the existence of a text identifier (marker)
|
|
1842
2583
|
|
|
1843
2584
|
Example return:
|
|
1844
2585
|
|
|
1845
2586
|
```json
|
|
1846
2587
|
{
|
|
1847
|
-
"
|
|
1848
|
-
"items": [
|
|
1849
|
-
{
|
|
1850
|
-
"id": 1764,
|
|
1851
|
-
"formIdentifier": "my-form",
|
|
1852
|
-
"time": "2023-02-12 10:56",
|
|
1853
|
-
"formData": {
|
|
1854
|
-
"marker": "name_1",
|
|
1855
|
-
"value": "Name",
|
|
1856
|
-
"type": "string"
|
|
1857
|
-
},
|
|
1858
|
-
"attributeSetIdentifier": "test-form"
|
|
1859
|
-
}
|
|
1860
|
-
]
|
|
2588
|
+
"valid": true
|
|
1861
2589
|
}
|
|
1862
2590
|
```
|
|
1863
2591
|
|
|
1864
2592
|
><details>
|
|
1865
2593
|
><summary>Schema</summary>
|
|
1866
2594
|
>
|
|
2595
|
+
>**valid:** boolean <br>
|
|
2596
|
+
>*Valid marker* <br>
|
|
2597
|
+
>example: <br>
|
|
1867
2598
|
>
|
|
1868
|
-
|
|
1869
|
-
|
|
1870
|
-
|
|
2599
|
+
></details>
|
|
2600
|
+
|
|
2601
|
+
### IntegrationCollections.getICollectionRowByMarkerAndId(marker, id, langCode)
|
|
2602
|
+
|
|
2603
|
+
```js
|
|
2604
|
+
const result = await IntegrationCollections.getICollectionRowByMarkerAndId('test_collection', 1);
|
|
2605
|
+
```
|
|
2606
|
+
|
|
2607
|
+
> Getting one record from the collection.
|
|
2608
|
+
|
|
2609
|
+
Example return:
|
|
2610
|
+
|
|
2611
|
+
```json
|
|
2612
|
+
{
|
|
2613
|
+
"id": 1764,
|
|
2614
|
+
"createdDate": "2025-01-26T17:17:23.013Z",
|
|
2615
|
+
"updatedDate": "2025-01-26T17:17:23.013Z",
|
|
2616
|
+
"collectionId": 1,
|
|
2617
|
+
"langCode": "en_US",
|
|
2618
|
+
"formData": {
|
|
2619
|
+
"en_US": [
|
|
2620
|
+
{
|
|
2621
|
+
"marker": "naimenovanie_1",
|
|
2622
|
+
"type": "string",
|
|
2623
|
+
"value": "Title"
|
|
2624
|
+
}
|
|
2625
|
+
]
|
|
2626
|
+
}
|
|
2627
|
+
}
|
|
2628
|
+
```
|
|
2629
|
+
|
|
2630
|
+
><details>
|
|
2631
|
+
><summary>Schema</summary>
|
|
1871
2632
|
>
|
|
1872
|
-
>**id:**
|
|
1873
|
-
>*
|
|
2633
|
+
>**id:** number <br>
|
|
2634
|
+
>*Object identifier* <br>
|
|
1874
2635
|
>example: 1764 <br>
|
|
1875
2636
|
>
|
|
1876
|
-
>**
|
|
1877
|
-
>*
|
|
1878
|
-
>example: my-form <br>
|
|
2637
|
+
>**createdDate:** string($date-time) <br>
|
|
2638
|
+
>*Date of record creation in the collection* <br>
|
|
1879
2639
|
>
|
|
1880
|
-
>**
|
|
1881
|
-
>*Date
|
|
1882
|
-
>example: 2023-02-12 10:56 <br>
|
|
2640
|
+
>**updatedDate:** string($date-time) <br>
|
|
2641
|
+
>*Date of object modification* <br>
|
|
1883
2642
|
>
|
|
1884
|
-
>**
|
|
1885
|
-
>*
|
|
1886
|
-
>example:
|
|
2643
|
+
>**collectionId:** number <br>
|
|
2644
|
+
>*Object identifier of the collection* <br>
|
|
2645
|
+
>example: 1 <br>
|
|
1887
2646
|
>
|
|
1888
|
-
>**
|
|
1889
|
-
>*
|
|
1890
|
-
>example:
|
|
2647
|
+
>**langCode:** string <br>
|
|
2648
|
+
>*Language code in which the record in the collection was created* <br>
|
|
2649
|
+
>example: en_US <br>
|
|
2650
|
+
>
|
|
2651
|
+
>**formData:** FormDataLangType <br>
|
|
2652
|
+
>*Data submitted by the form attached to the collection* <br>
|
|
2653
|
+
>example: OrderedMap { "en_US": List [ OrderedMap { "marker": "naimenovanie_1", "type": "string", "value": "Title" } ] } <br>
|
|
1891
2654
|
>
|
|
1892
2655
|
></details>
|
|
1893
2656
|
|
|
1894
|
-
|
|
2657
|
+
### IntegrationCollections.createICollectionRow(marker, body, langCode)
|
|
1895
2658
|
|
|
2659
|
+
```js
|
|
2660
|
+
const body = {
|
|
2661
|
+
"formIdentifier": "collection-form",
|
|
2662
|
+
"formData": {
|
|
2663
|
+
"en_US": [
|
|
2664
|
+
{
|
|
2665
|
+
"marker": "naimenovanie_1",
|
|
2666
|
+
"type": "string",
|
|
2667
|
+
"value": "Наименование"
|
|
2668
|
+
}
|
|
2669
|
+
]
|
|
2670
|
+
}
|
|
2671
|
+
}
|
|
2672
|
+
const result = await IntegrationCollections.createICollectionRow('test_collection', body);
|
|
2673
|
+
```
|
|
1896
2674
|
|
|
1897
|
-
|
|
2675
|
+
> Create a record in the collection
|
|
1898
2676
|
|
|
1899
|
-
|
|
1900
|
-
|
|
2677
|
+
Example return:
|
|
2678
|
+
|
|
2679
|
+
```json
|
|
2680
|
+
{
|
|
2681
|
+
"formIdentifier": "collection_form",
|
|
2682
|
+
"formData": {
|
|
2683
|
+
"en_US": [
|
|
2684
|
+
{
|
|
2685
|
+
"marker": "naimenovanie_1",
|
|
2686
|
+
"type": "string",
|
|
2687
|
+
"value": "Name"
|
|
2688
|
+
}
|
|
2689
|
+
]
|
|
2690
|
+
}
|
|
2691
|
+
}
|
|
1901
2692
|
```
|
|
1902
2693
|
|
|
1903
|
-
|
|
2694
|
+
><details>
|
|
2695
|
+
><summary>Schema</summary>
|
|
2696
|
+
>
|
|
2697
|
+
>**formIdentifier:** string <br>
|
|
2698
|
+
>*Text identifier of the form object attached to the order storage* <br>
|
|
2699
|
+
>example: collection_form <br>
|
|
2700
|
+
>
|
|
2701
|
+
>**formData:** FormDataLangType <br>
|
|
2702
|
+
>*Data submitted by the form attached to the collection* <br>
|
|
2703
|
+
>example: OrderedMap { "en_US": List [ OrderedMap { "marker": "naimenovanie_1", "type": "string", "value": "Name" } ] } <br>
|
|
2704
|
+
>
|
|
2705
|
+
></details>
|
|
2706
|
+
|
|
2707
|
+
### IntegrationCollections.updateICollectionRow(marker, body, langCode)
|
|
1904
2708
|
|
|
1905
2709
|
```js
|
|
1906
|
-
const
|
|
2710
|
+
const body = {
|
|
2711
|
+
"formIdentifier": "collection-form",
|
|
2712
|
+
"formData": {
|
|
2713
|
+
"en_US": [
|
|
2714
|
+
{
|
|
2715
|
+
"marker": "naimenovanie_1",
|
|
2716
|
+
"type": "string",
|
|
2717
|
+
"value": "Наименование"
|
|
2718
|
+
}
|
|
2719
|
+
]
|
|
2720
|
+
}
|
|
2721
|
+
}
|
|
2722
|
+
const result = await IntegrationCollections.updateICollectionRow('test_collection', body);
|
|
1907
2723
|
```
|
|
1908
2724
|
|
|
1909
|
-
>
|
|
2725
|
+
> Edit a record in the collection
|
|
1910
2726
|
|
|
1911
2727
|
Example return:
|
|
1912
2728
|
|
|
1913
2729
|
```json
|
|
1914
|
-
|
|
1915
|
-
|
|
1916
|
-
|
|
1917
|
-
"
|
|
2730
|
+
{
|
|
2731
|
+
"formIdentifier": "collection_form",
|
|
2732
|
+
"formData": {
|
|
2733
|
+
"en_US": [
|
|
2734
|
+
{
|
|
2735
|
+
"marker": "naimenovanie_1",
|
|
2736
|
+
"type": "string",
|
|
2737
|
+
"value": "Name"
|
|
2738
|
+
}
|
|
2739
|
+
]
|
|
1918
2740
|
}
|
|
1919
|
-
|
|
2741
|
+
}
|
|
1920
2742
|
```
|
|
2743
|
+
|
|
1921
2744
|
><details>
|
|
1922
2745
|
><summary>Schema</summary>
|
|
1923
2746
|
>
|
|
1924
|
-
>**
|
|
1925
|
-
>*object
|
|
1926
|
-
>example:
|
|
2747
|
+
>**formIdentifier:** string <br>
|
|
2748
|
+
>*Text identifier of the form object attached to the order storage* <br>
|
|
2749
|
+
>example: collection_form <br>
|
|
1927
2750
|
>
|
|
1928
|
-
>**
|
|
1929
|
-
>*
|
|
1930
|
-
>example:
|
|
1931
|
-
>Enum:
|
|
1932
|
-
>[ forCatalogProducts, forBasketPage, forErrorPage, forCatalogPages, forProductPreview, forProductPage, forSimilarProductBlock, forStatisticProductBlock, forProductBlock, forForm, forFormField, forNewsPage, forNewsBlock, forNewsPreview, forOneNewsPage, forUsualPage, forTextBlock, forSlider, service ] <br>
|
|
2751
|
+
>**formData:** FormDataLangType <br>
|
|
2752
|
+
>*Data submitted by the form attached to the collection* <br>
|
|
2753
|
+
>example: OrderedMap { "en_US": List [ OrderedMap { "marker": "naimenovanie_1", "type": "string", "value": "Name" } ] } <br>
|
|
1933
2754
|
>
|
|
1934
2755
|
></details>
|
|
1935
2756
|
|
|
1936
|
-
|
|
2757
|
+
### IntegrationCollections.deleteCollectionRowByMarker(id, marker)
|
|
2758
|
+
|
|
2759
|
+
```js
|
|
2760
|
+
const result = await IntegrationCollections.deleteCollectionRowByMarker(1, 'test_collection');
|
|
2761
|
+
```
|
|
1937
2762
|
|
|
2763
|
+
> Deletion of collection record object
|
|
2764
|
+
|
|
2765
|
+
> Returns true (in case of successful deletion) or false (in case of unsuccessful deletion) (permission "collections.row.delete" required for access)
|
|
2766
|
+
|
|
2767
|
+
---
|
|
1938
2768
|
|
|
1939
2769
|
## <h2 id="locales"> Locales </h2>
|
|
1940
2770
|
|
|
@@ -1970,15 +2800,15 @@ Example return:
|
|
|
1970
2800
|
><details>
|
|
1971
2801
|
><summary >Schema</summary>
|
|
1972
2802
|
>
|
|
1973
|
-
>**id:**
|
|
2803
|
+
>**id:** number <br>
|
|
1974
2804
|
>*object identifier* <br>
|
|
1975
2805
|
>example: 1764 <br>
|
|
1976
2806
|
>
|
|
1977
|
-
>**shortCode:**
|
|
2807
|
+
>**shortCode:** string <br>
|
|
1978
2808
|
>*language code (short)* <br>
|
|
1979
2809
|
>example: en <br>
|
|
1980
2810
|
>
|
|
1981
|
-
>**code:**
|
|
2811
|
+
>**code:** string <br>
|
|
1982
2812
|
>*language code with country code* <br>
|
|
1983
2813
|
>example: en_US <br>
|
|
1984
2814
|
>
|
|
@@ -1986,19 +2816,19 @@ Example return:
|
|
|
1986
2816
|
>*Language name (in English)* <br>
|
|
1987
2817
|
>example: Bengali <br>
|
|
1988
2818
|
>
|
|
1989
|
-
>**nativeName**
|
|
2819
|
+
>**nativeName** string <br>
|
|
1990
2820
|
>*Language name (in native language)* <br>
|
|
1991
2821
|
>example: বাংলা <br>
|
|
1992
2822
|
>
|
|
1993
|
-
>**isActive:**
|
|
2823
|
+
>**isActive:** boolean <br>
|
|
1994
2824
|
>*Flag of usage* <br>
|
|
1995
2825
|
>example: false <br>
|
|
1996
2826
|
>
|
|
1997
|
-
>**image:**
|
|
2827
|
+
>**image:** string <br>
|
|
1998
2828
|
>*Graphic image of the language (under development)* <br>
|
|
1999
2829
|
>example: 🇦🇨 <br>
|
|
2000
2830
|
>
|
|
2001
|
-
>**position:**
|
|
2831
|
+
>**position:** {
|
|
2002
2832
|
>description:position number
|
|
2003
2833
|
>} <br>
|
|
2004
2834
|
>
|
|
@@ -2006,11 +2836,8 @@ Example return:
|
|
|
2006
2836
|
|
|
2007
2837
|
---
|
|
2008
2838
|
|
|
2009
|
-
|
|
2010
|
-
|
|
2011
2839
|
## <h2 id="menus"> Menus </h2>
|
|
2012
2840
|
|
|
2013
|
-
|
|
2014
2841
|
```js
|
|
2015
2842
|
const { Menus } = defineOneEntry('your-url')
|
|
2016
2843
|
```
|
|
@@ -2071,8 +2898,6 @@ Example return:
|
|
|
2071
2898
|
|
|
2072
2899
|
---
|
|
2073
2900
|
|
|
2074
|
-
|
|
2075
|
-
|
|
2076
2901
|
## <h2 id="orders"> Orders </h2>
|
|
2077
2902
|
|
|
2078
2903
|
```js
|
|
@@ -2088,6 +2913,7 @@ const value = await Orders.getOrderByMarker('my-order')
|
|
|
2088
2913
|
> This method retrieves one order storage object by marker.
|
|
2089
2914
|
|
|
2090
2915
|
Example return:
|
|
2916
|
+
|
|
2091
2917
|
```json
|
|
2092
2918
|
{
|
|
2093
2919
|
"id": 2,
|
|
@@ -2461,7 +3287,7 @@ Example return:
|
|
|
2461
3287
|
></details>
|
|
2462
3288
|
|
|
2463
3289
|
|
|
2464
|
-
### Orders.getAllOrdersStorage(langCode,
|
|
3290
|
+
### Orders.getAllOrdersStorage(langCode, offset, limit)
|
|
2465
3291
|
|
|
2466
3292
|
```js
|
|
2467
3293
|
const value = await Orders.getAllOrdersStorage()
|
|
@@ -2519,7 +3345,7 @@ Example return:
|
|
|
2519
3345
|
></details>
|
|
2520
3346
|
|
|
2521
3347
|
|
|
2522
|
-
### Orders.getAllOrdersByMarker(marker, langCode,
|
|
3348
|
+
### Orders.getAllOrdersByMarker(marker, langCode, offset, limit)
|
|
2523
3349
|
|
|
2524
3350
|
```js
|
|
2525
3351
|
const value = await Orders.getAllOrdersByMarker('my-order')
|
|
@@ -2632,7 +3458,6 @@ Example return:
|
|
|
2632
3458
|
|
|
2633
3459
|
## <h2 id="pages"> Pages </h2>
|
|
2634
3460
|
|
|
2635
|
-
|
|
2636
3461
|
```js
|
|
2637
3462
|
const { Pages } = defineOneEntry('your-url');
|
|
2638
3463
|
```
|
|
@@ -3453,7 +4278,7 @@ Example return:
|
|
|
3453
4278
|
const { Payments } = defineOneEntry('your-url');
|
|
3454
4279
|
```
|
|
3455
4280
|
|
|
3456
|
-
### Payments.getSessions(
|
|
4281
|
+
### Payments.getSessions(offset, limit)
|
|
3457
4282
|
|
|
3458
4283
|
```js
|
|
3459
4284
|
const value = await Payments.getSessions()
|
|
@@ -3883,7 +4708,6 @@ const value = await Payments.webhookStripe()
|
|
|
3883
4708
|
|
|
3884
4709
|
## <h2 id="products"> Products </h2>
|
|
3885
4710
|
|
|
3886
|
-
|
|
3887
4711
|
```js
|
|
3888
4712
|
const { Products } = defineOneEntry('your-url');
|
|
3889
4713
|
```
|
|
@@ -3894,10 +4718,10 @@ Parameters:
|
|
|
3894
4718
|
|
|
3895
4719
|
```js
|
|
3896
4720
|
const userQuery = {
|
|
3897
|
-
|
|
3898
|
-
|
|
3899
|
-
|
|
3900
|
-
|
|
4721
|
+
offset: 0,
|
|
4722
|
+
limit: 30,
|
|
4723
|
+
sortOrder: 'DESC',
|
|
4724
|
+
sortKey: 'id'
|
|
3901
4725
|
}
|
|
3902
4726
|
```
|
|
3903
4727
|
|
|
@@ -3923,22 +4747,14 @@ const userQuery = {
|
|
|
3923
4747
|
></details>
|
|
3924
4748
|
|
|
3925
4749
|
"conditionMarker" by which values are filtered (not set by default), possible values:
|
|
3926
|
-
> 'in' - Contains
|
|
3927
|
-
>
|
|
3928
|
-
> '
|
|
3929
|
-
>
|
|
3930
|
-
> '
|
|
3931
|
-
>
|
|
3932
|
-
> '
|
|
3933
|
-
>
|
|
3934
|
-
> 'mth' - Greater than,
|
|
3935
|
-
>
|
|
3936
|
-
> 'lth' - Less than,
|
|
3937
|
-
>
|
|
3938
|
-
> 'exs' - Exists,
|
|
3939
|
-
>
|
|
3940
|
-
> 'nexs' - Does not exist
|
|
3941
|
-
|
|
4750
|
+
> 'in' - Contains,<br>
|
|
4751
|
+
> 'nin' - Does not contain,<br>
|
|
4752
|
+
> 'eq' - Equal,<br>
|
|
4753
|
+
> 'neq' - Not equal,<br>
|
|
4754
|
+
> 'mth' - Greater than,<br>
|
|
4755
|
+
> 'lth' - Less than,<br>
|
|
4756
|
+
> 'exs' - Exists,<br>
|
|
4757
|
+
> 'nexs' - Does not exist<br>
|
|
3942
4758
|
|
|
3943
4759
|
### Products.getProducts(body, langCode, userQuery)
|
|
3944
4760
|
|
|
@@ -4519,27 +5335,27 @@ Example return:
|
|
|
4519
5335
|
|
|
4520
5336
|
```js
|
|
4521
5337
|
const body = [
|
|
4522
|
-
|
|
4523
|
-
|
|
4524
|
-
|
|
4525
|
-
|
|
4526
|
-
|
|
4527
|
-
|
|
4528
|
-
|
|
4529
|
-
|
|
4530
|
-
|
|
4531
|
-
|
|
4532
|
-
|
|
4533
|
-
|
|
4534
|
-
|
|
4535
|
-
|
|
4536
|
-
|
|
4537
|
-
|
|
4538
|
-
|
|
4539
|
-
|
|
4540
|
-
|
|
4541
|
-
|
|
4542
|
-
|
|
5338
|
+
{
|
|
5339
|
+
"attributeMarker": "price",
|
|
5340
|
+
"conditionMarker": "mth",
|
|
5341
|
+
"statusMarker": "waiting",
|
|
5342
|
+
"conditionValue": 1,
|
|
5343
|
+
"pageUrls": [
|
|
5344
|
+
"23-laminat-floorwood-maxima"
|
|
5345
|
+
],
|
|
5346
|
+
"isNested": false,
|
|
5347
|
+
"title": ""
|
|
5348
|
+
},
|
|
5349
|
+
{
|
|
5350
|
+
"attributeMarker": "price",
|
|
5351
|
+
"conditionMarker": "lth",
|
|
5352
|
+
"conditionValue": 3,
|
|
5353
|
+
"pageUrls": [
|
|
5354
|
+
"23-laminat-floorwood-maxima"
|
|
5355
|
+
],
|
|
5356
|
+
"isNested": false,
|
|
5357
|
+
"title": ""
|
|
5358
|
+
}
|
|
4543
5359
|
]
|
|
4544
5360
|
|
|
4545
5361
|
const value = await Products.getProductsByPageUrl('catalog', body)
|
|
@@ -4652,7 +5468,7 @@ Example return:
|
|
|
4652
5468
|
>
|
|
4653
5469
|
>**statusLocalizeInfos:** CommonLocalizeInfos <br>
|
|
4654
5470
|
>*json description of the item status object, taking into account the language* <br>
|
|
4655
|
-
>example: { "title": "Product" <br>
|
|
5471
|
+
>example: { "title": "Product" } <br>
|
|
4656
5472
|
>
|
|
4657
5473
|
>**localizeInfos:** Record<string, any> <br>
|
|
4658
5474
|
>*json description of the main page data object taking into account the language "en_US" (for example)* <br>
|
|
@@ -4715,10 +5531,10 @@ Example return:
|
|
|
4715
5531
|
### Products.getRelatedProductsById(id, langCode, userQuery)
|
|
4716
5532
|
|
|
4717
5533
|
```js
|
|
4718
|
-
const value = await Products.getRelatedProductsById(1, 'en_US', {
|
|
5534
|
+
const value = await Products.getRelatedProductsById(1, 'en_US', {offset: 1, limit: 20})
|
|
4719
5535
|
```
|
|
4720
5536
|
|
|
4721
|
-
> This method retrieves all related product page objects for a specific product based on its identifier (id) from the API. It accepts an optional userQuery parameter for additional query parameters such as
|
|
5537
|
+
> This method retrieves all related product page objects for a specific product based on its identifier (id) from the API. It accepts an optional userQuery parameter for additional query parameters such as offset, limit, sortOrder, and sortKey. It returns a Promise that resolves to an array of ContentIndexedProductDto objects.
|
|
4722
5538
|
|
|
4723
5539
|
Example return:
|
|
4724
5540
|
|
|
@@ -6194,7 +7010,7 @@ true
|
|
|
6194
7010
|
```
|
|
6195
7011
|
|
|
6196
7012
|
|
|
6197
|
-
## <h2 id="
|
|
7013
|
+
## <h2 id="ws"> WebSocket </h2>
|
|
6198
7014
|
|
|
6199
7015
|
You can subscribe to events via the WebSocket to receive notifications
|
|
6200
7016
|
|