oneentry 1.0.130 → 1.0.133

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.
Files changed (55) hide show
  1. package/dist/admins/adminsApi.d.ts +2 -2
  2. package/dist/admins/adminsApi.js +2 -2
  3. package/dist/admins/adminsInterfaces.d.ts +4 -3
  4. package/dist/attribute-sets/attributeSetsApi.d.ts +0 -4
  5. package/dist/attribute-sets/attributeSetsApi.js +1 -5
  6. package/dist/attribute-sets/attributeSetsInterfaces.d.ts +43 -32
  7. package/dist/auth-provider/authProviderApi.d.ts +18 -9
  8. package/dist/auth-provider/authProviderApi.js +18 -9
  9. package/dist/auth-provider/authProvidersInterfaces.d.ts +36 -18
  10. package/dist/base/syncModules.js +7 -3
  11. package/dist/blocks/blocksApi.d.ts +0 -4
  12. package/dist/blocks/blocksApi.js +0 -4
  13. package/dist/blocks/blocksInterfaces.d.ts +25 -17
  14. package/dist/config.d.ts +1 -1
  15. package/dist/config.js +3 -1
  16. package/dist/events/eventsApi.d.ts +6 -3
  17. package/dist/events/eventsApi.js +6 -3
  18. package/dist/events/eventsInterfaces.d.ts +2 -1
  19. package/dist/file-uploading/fileUploadingApi.d.ts +14 -6
  20. package/dist/file-uploading/fileUploadingApi.js +22 -6
  21. package/dist/file-uploading/fileUploadingInterfaces.d.ts +21 -13
  22. package/dist/forms/formsApi.d.ts +0 -2
  23. package/dist/forms/formsApi.js +0 -2
  24. package/dist/forms/formsInterfaces.d.ts +12 -3
  25. package/dist/forms-data/formsDataApi.d.ts +14 -20
  26. package/dist/forms-data/formsDataApi.js +17 -22
  27. package/dist/forms-data/formsDataInterfaces.d.ts +46 -37
  28. package/dist/integration-collections/integrationCollectionsApi.d.ts +10 -10
  29. package/dist/integration-collections/integrationCollectionsApi.js +10 -10
  30. package/dist/integration-collections/integrationCollectionsInterfaces.d.ts +20 -10
  31. package/dist/menus/menusInterfaces.d.ts +13 -5
  32. package/dist/orders/ordersApi.d.ts +16 -8
  33. package/dist/orders/ordersApi.js +16 -8
  34. package/dist/orders/ordersInterfaces.d.ts +50 -30
  35. package/dist/pages/pagesApi.d.ts +2 -1
  36. package/dist/pages/pagesApi.js +2 -1
  37. package/dist/pages/pagesInterfaces.d.ts +29 -12
  38. package/dist/payments/paymentsApi.d.ts +20 -12
  39. package/dist/payments/paymentsApi.js +20 -12
  40. package/dist/payments/paymentsInterfaces.d.ts +25 -7
  41. package/dist/product-statuses/productStatusesInterfaces.d.ts +5 -4
  42. package/dist/products/productsApi.d.ts +28 -15
  43. package/dist/products/productsApi.js +28 -15
  44. package/dist/products/productsInterfaces.d.ts +53 -25
  45. package/dist/system/systemApi.d.ts +2 -1
  46. package/dist/system/systemApi.js +2 -1
  47. package/dist/templates/templatesInterfaces.d.ts +3 -2
  48. package/dist/templates-preview/templatesPreviewInterfaces.d.ts +8 -4
  49. package/dist/users/usersApi.d.ts +65 -14
  50. package/dist/users/usersApi.js +65 -14
  51. package/dist/users/usersInterfaces.d.ts +95 -26
  52. package/dist/web-socket/wsApi.d.ts +2 -1
  53. package/dist/web-socket/wsApi.js +2 -1
  54. package/dist/web-socket/wsInterfaces.d.ts +3 -2
  55. package/package.json +1 -1
@@ -21,7 +21,8 @@ interface IProductApi {
21
21
  /**
22
22
  * Search for all products with pagination and filter.
23
23
  * @handleName getProducts
24
- * @param {IFilterParams[]} [body] - Request body. Default []. Example:
24
+ * @param {IFilterParams[]} [body] - Request body. Default [].
25
+ * @example
25
26
  [
26
27
  {
27
28
  "attributeMarker": "price",
@@ -46,7 +47,8 @@ interface IProductApi {
46
47
  }
47
48
  ]
48
49
  * @param {string} [langCode] - Language code. Default: "en_US".
49
- * @param {IProductsQuery} [userQuery] - Optional set query parameters. Example:
50
+ * @param {IProductsQuery} [userQuery] - Optional set query parameters.
51
+ * @example
50
52
  {
51
53
  "limit": 30,
52
54
  "offset": 0,
@@ -60,14 +62,14 @@ interface IProductApi {
60
62
  }
61
63
  * @returns {IProductsResponse} Array with ProductEntity objects
62
64
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
63
- * @description This method requires user authorization. For more information about configuring the authorization module, see the documentation in the configuration settings section of the SDK.
64
65
  */
65
66
  getProducts(body?: IFilterParams[], langCode?: string, userQuery?: IProductsQuery): Promise<IProductsResponse | IError>;
66
67
  /**
67
68
  * Search for all product page objects with pagination that do not have a category.
68
69
  * @handleName getProductsEmptyPage
69
70
  * @param {string} [langCode] - Language code. Default: "en_US".
70
- * @param {IProductsQuery} [userQuery] - Optional set query parameters. Example:
71
+ * @param {IProductsQuery} [userQuery] - Optional set query parameters.
72
+ * @example
71
73
  {
72
74
  "limit": 30,
73
75
  "offset": 0,
@@ -90,7 +92,8 @@ interface IProductApi {
90
92
  * @param {number} id - Page id. Example: 12345.
91
93
  * @param {IFilterParams[]} [body] - Request body. Default: [].
92
94
  * @param {string} [langCode] - Language code. Default "en_US".
93
- * @param {IProductsQuery} [userQuery] - Optional set query parameters. Example:
95
+ * @param {IProductsQuery} [userQuery] - Optional set query parameters.
96
+ * @example
94
97
  {
95
98
  "limit": 30,
96
99
  "offset": 0,
@@ -112,7 +115,8 @@ interface IProductApi {
112
115
  * @handleName getProductsPriceByPageUrl
113
116
  * @param {string} [url] - Page url. Example: "23-laminat-floorwood-maxima".
114
117
  * @param {string} [langCode] - Language code. Default: "en_US".
115
- * @param {IProductsQuery} [userQuery] - Optional set query parameters. Example:
118
+ * @param {IProductsQuery} [userQuery] - Optional set query parameters.
119
+ * @example
116
120
  {
117
121
  "limit": 30,
118
122
  "offset": 0,
@@ -135,7 +139,8 @@ interface IProductApi {
135
139
  * @param {string} url - Page url. Example: "23-laminat-floorwood-maxima".
136
140
  * @param {IFilterParams[]} [body] - Request body. Default: [].
137
141
  * @param {string} [langCode] - Language code. Default: "en_US".
138
- * @param {IProductsQuery} [userQuery] - Optional set query parameters. Example:
142
+ * @param {IProductsQuery} [userQuery] - Optional set query parameters.
143
+ * @example
139
144
  {
140
145
  "limit": 30,
141
146
  "offset": 0,
@@ -157,7 +162,8 @@ interface IProductApi {
157
162
  * @handleName getRelatedProductsById
158
163
  * @param {number} [id] - Product page identifier for which to find relationship. Example: 12345.
159
164
  * @param {string} [langCode] - Language code. Default: "en_US".
160
- * @param {IProductsQuery} [userQuery] - Optional set query parameters. Example:
165
+ * @param {IProductsQuery} [userQuery] - Optional set query parameters.
166
+ * @example
161
167
  {
162
168
  "limit": 30,
163
169
  "offset": 0,
@@ -177,9 +183,10 @@ interface IProductApi {
177
183
  /**
178
184
  * Find products by its ids.
179
185
  * @handleName getProductsByIds
180
- * @param {string} [ids] - Product page identifiers for which to find relationships. Example: "12345,67890".
186
+ * @param {string} ids - Product page identifiers for which to find relationships. Example: "12345,67890".
181
187
  * @param {string} [langCode] - Language code. Default: "en_US".
182
- * @param {IProductsQuery} [userQuery] - Optional set query parameters. Example:
188
+ * @param {IProductsQuery} [userQuery] - Optional set query parameters.
189
+ * @example
183
190
  {
184
191
  "limit": 30,
185
192
  "offset": 0,
@@ -228,7 +235,8 @@ interface IProductApi {
228
235
  /**
229
236
  * Getting the number of products for the entire catalog.
230
237
  * @handleName getProductsCount
231
- * @param {string} [body] - Body parameters for filter. Deault: []. Example:
238
+ * @param {string} [body] - Body parameters for filter. Deault: [].
239
+ * @example
232
240
  [
233
241
  {
234
242
  "attributeMarker": "price",
@@ -260,7 +268,8 @@ interface IProductApi {
260
268
  * Getting the number of products on a catalog page by page ID.
261
269
  * @handleName getProductsCountByPageId
262
270
  * @param {string} id - Page id. Example: 12345.
263
- * @param {string} body - Body parameters for filter. Deault: []. Example:
271
+ * @param {string} body - Body parameters for filter. Deault: [].
272
+ * @example
264
273
  [
265
274
  {
266
275
  "attributeMarker": "price",
@@ -292,7 +301,8 @@ interface IProductApi {
292
301
  * Getting the number of products on a catalog page by page URL.
293
302
  * @handleName getProductsCountByPageUrl
294
303
  * @param {string} url - Page url. Example: "catalog".
295
- * @param {string} body - Body parameters for filter. Deault: []. Example:
304
+ * @param {string} body - Body parameters for filter. Deault: [].
305
+ * @example
296
306
  [
297
307
  {
298
308
  "attributeMarker": "price",
@@ -369,38 +379,52 @@ interface IFilterParams {
369
379
  /**
370
380
  * @interface IProductsEntity
371
381
  * @property {number} id - The unique identifier. Example: 12345.
372
- * @property {ILocalizeInfo} localizeInfos - The name of the products, taking into account localization. Example:
382
+ * @property {ILocalizeInfo} localizeInfos - The name of the products, taking into account localization. Example: {}.
373
383
  * @property {string | null} statusIdentifier - Product page status identifiers (may be null). Example: "in_stock".
374
- * @property {any} statusLocalizeInfos - JSON description of the item status object, taking into account the language. Example:
384
+ * @property {any} statusLocalizeInfos - JSON description of the item status object, taking into account the language. Example: {}.
375
385
  * @property {string | null} attributeSetIdentifier - Set of attributes id. Example: "set_12345".
376
386
  * @property {number} position - Item number (for sorting). Example: 1.
377
387
  * @property {string | null} [templateIdentifier] - User id of the linked template. Example: "template_12345".
378
388
  * @property {string | null} [shortDescTemplateIdentifier] - User id of the linked template for a short description. Example: "short_desc_template_12345".
379
389
  * @property {number} price - The value of the product page price taken from the index. Example: 150.00.
380
- * @property {object} additional - Additional value from the index. Example:
390
+ * @property {object} additional - Additional value from the index.
391
+ * @example
381
392
  {
382
393
  "en": "In Stock",
383
394
  "de": "Auf Lager"
384
395
  }
385
396
  * @property {string | null} sku - Product SKU (Stock Keeping Unit), may be null. Example: "SKU_12345".
386
397
  * @property {boolean} isSync - Indication of page indexing. Example: true.
387
- * @property {AttributeType} attributeValues - Array of attribute values from the index, represented. Example:
398
+ * @property {AttributeType} attributeValues - Array of attribute values from the index, represented.
399
+ * @example
388
400
  [
389
401
  {
390
402
  "id": "color",
391
403
  "value": "red"
392
404
  }
393
405
  ]
394
- * @property {string[]} categories - Product categories. Example: [1, 2, 3]
406
+ * @property {string[]} categories - Product categories.
407
+ * @example
408
+ [
409
+ 1,
410
+ 2,
411
+ 3
412
+ ]
395
413
  * @property {boolean} isVisible - A sign of page visibility. Example: true.
396
- * @property {any[]} [productPages] - Array of product pages or a single product page object. Example:
397
- * @property {string[]} [blocks] - Array of block identifiers. Example:
414
+ * @property {any} [productPages] - Array of product pages or a single product page object. Example: [].
415
+ * @property {string[]} [blocks] - Array of block identifiers.
416
+ * @example
398
417
  [
399
418
  "block_12345",
400
419
  "block_67890"
401
420
  ]
402
421
  * @property {boolean} isPositionLocked - Sorting position lock indicator (optional). Example: false.
403
- * @property {number[]} relatedIds - Ids of related product pages. Example: [12345, 67890].
422
+ * @property {number[]} relatedIds - Ids of related product pages.
423
+ * @example
424
+ [
425
+ 12345,
426
+ 67890
427
+ ]
404
428
  * @description This interface defines the structure of a product entity, including its identifiers, attributes, and related information.
405
429
  */
406
430
  interface IProductsEntity {
@@ -433,7 +457,8 @@ interface IProductsEntity {
433
457
  /**
434
458
  * @interface IProductsResponse
435
459
  * @property {number} total - The total number of products found. Example: 100.
436
- * @property {IProductsEntity[]} items - An array of product entities. Example:
460
+ * @property {IProductsEntity[]} items - An array of product entities.
461
+ * @example
437
462
  [
438
463
  {
439
464
  "id": 12345,
@@ -465,7 +490,8 @@ interface IProductsCount {
465
490
  /**
466
491
  * @interface IProductsInfo
467
492
  * @property {number} total - The total number of products found. Example: 100.
468
- * @property {IProductInfo[]} items - An array of product information objects. Example:
493
+ * @property {IProductInfo[]} items - An array of product information objects.
494
+ * @example
469
495
  [
470
496
  {
471
497
  "id": 12345,
@@ -496,7 +522,8 @@ interface IProductInfo {
496
522
  * @interface IProductBlock
497
523
  * @property {number} id - Unique identifier of the product block. Example: 3289.
498
524
  * @property {number | null} attributeSetIdentifier - Identifier of the attribute set used in the product block, or null if not applicable. Example: 67890.
499
- * @property {ILocalizeInfo} localizeInfos - Localization information for the product block. Example:
525
+ * @property {ILocalizeInfo} localizeInfos - Localization information for the product block.
526
+ * @example
500
527
  {
501
528
  "title": "Box"
502
529
  }
@@ -508,7 +535,8 @@ interface IProductInfo {
508
535
  * @property {string | null} templateIdentifier - Identifier for the template used by the product block, or null if not applicable. Example: "template_12345".
509
536
  * @property {boolean} isVisible - Indicates whether the product block is visible. Example: true.
510
537
  * @property {boolean} isSync - Indicates whether the product block is synchronized. Example: false.
511
- * @property {AttributeType} attributeValues - Array of attribute values from the index, represented as a pair of user attribute id and attribute value. Example:
538
+ * @property {AttributeType} attributeValues - Array of attribute values from the index, represented as a pair of user attribute id and attribute value.
539
+ * @example
512
540
  [
513
541
  {
514
542
  "id": "color",
@@ -35,7 +35,8 @@ export default class SystemApi extends AsyncModules implements ISystem {
35
35
  /**
36
36
  * Validates a CAPTCHA token by sending it to the server for verification.
37
37
  * @handleName validateCapcha
38
- * @param {object} event - The event object containing CAPTCHA data. Example:
38
+ * @param {object} event - The event object containing CAPTCHA data.
39
+ * @example
39
40
  {
40
41
  "token": "03AGdBq24...",
41
42
  "expectedAction": "login",
@@ -46,7 +46,8 @@ class SystemApi extends asyncModules_1.default {
46
46
  /**
47
47
  * Validates a CAPTCHA token by sending it to the server for verification.
48
48
  * @handleName validateCapcha
49
- * @param {object} event - The event object containing CAPTCHA data. Example:
49
+ * @param {object} event - The event object containing CAPTCHA data.
50
+ * @example
50
51
  {
51
52
  "token": "03AGdBq24...",
52
53
  "expectedAction": "login",
@@ -47,12 +47,13 @@ interface ITemplatesApi {
47
47
  * @property {string} identifier - The textual identifier for the record field. Example: "template_12345".
48
48
  * @property {number} version - The version number of the object. Example: 1.
49
49
  * @property {Types} generalTypeName - General type name. Example: "product".
50
- * @property {AttributeType} attributeValues - Attribute values from the index (represented as a pair of user attribute id: attribute value). Example:
51
- * @property {number} position - The position of the object. Example: 1.
50
+ * @property {AttributeType} attributeValues - Attribute values from the index (represented as a pair of user attribute id: attribute value).
51
+ * @example
52
52
  {
53
53
  "id": 1,
54
54
  "value": "some"
55
55
  }
56
+ * @property {number} position - The position of the object. Example: 1.
56
57
  * @description This interface defines the structure of a template entity, including its identifiers, attributes, and general type information.
57
58
  */
58
59
  interface ITemplateEntity {
@@ -29,7 +29,8 @@ interface ITemplatesPreview {
29
29
  * @interface ITemplatesPreviewEntity
30
30
  * @property {number} id - The unique identifier of the position. Example: 3.
31
31
  * @property {string} title - The name of the template preview. Example: "Product Template"..
32
- * @property {object} proportions - Object contains info by proportions template preview. Example:
32
+ * @property {object} proportions - Object contains info by proportions template preview.
33
+ * @example
33
34
  {
34
35
  "default": {
35
36
  "horizontal": {
@@ -48,19 +49,22 @@ interface ITemplatesPreview {
48
49
  }
49
50
  }
50
51
  }
51
- * @property {IProportion | null} proportions.horizontal - Horizontal proportion of the template preview. Example:
52
+ * @property {IProportion | null} proportions.horizontal - Horizontal proportion of the template preview.
53
+ * @example
52
54
  {
53
55
  "width": 234,
54
56
  "height": 324,
55
57
  "alignmentType": "middleBottom"
56
58
  }
57
- * @property {IProportion | null} proportions.vertical - Vertical proportion of the template preview. Example:
59
+ * @property {IProportion | null} proportions.vertical - Vertical proportion of the template preview.
60
+ * @example
58
61
  {
59
62
  "width": 2,
60
63
  "height": 3,
61
64
  "alignmentType": "leftTop"
62
65
  }
63
- * @property {ISquare} proportions.square - Square proportion of the template preview. Example:
66
+ * @property {ISquare} proportions.square - Square proportion of the template preview.
67
+ * @example
64
68
  {
65
69
  "side": 3,
66
70
  "alignmentType": "leftTop"
@@ -22,26 +22,34 @@ export default class UsersApi extends AsyncModules implements IUsers {
22
22
  * @param {string} [langCode] - Language code. Default: "en_US".
23
23
  * @returns {IUserEntity} Returns a promise that resolves to the user entity object if successful; otherwise, returns an error object.
24
24
  * @throws {IError} If there is an error during the fetch operation, it will return an error object.
25
- * @description Getting the data of an authorized user. This method requires user authorization. For more information about configuring the authorization module, see the documentation in the configuration settings section of the SDK.
25
+ * @description This method requires user authorization.
26
+ * @see For more information about configuring the {@link https://js-sdk.oneentry.cloud/docs/category/authprovider authorization module}, see the documentation in the {@link https://js-sdk.oneentry.cloud/docs/category/authprovider configuration settings section of the SDK}.
26
27
  */
27
28
  getUser(langCode?: string): Promise<IUserEntity | IError>;
28
29
  /**
29
30
  * Updating a single user object.
30
31
  * @handleName updateUser
31
- * @param {IUserBody} body - Request body. Example:
32
+ * @param {IUserBody} body - Request body.
33
+ * @example
32
34
  {
33
35
  "formIdentifier": "reg",
34
36
  "authData": [
35
37
  {
36
- "marker": "password",
37
- "value": "12345"
38
+ "marker": "email_reg",
39
+ "value": "your-email@oneentery.cloud"
40
+ },
41
+ {
42
+ "marker": "password_reg",
43
+ "value": "12345"
44
+ }
45
+ ],
46
+ "formData": [
47
+ {
48
+ "marker": "last_name",
49
+ "type": "string",
50
+ "value": "Username"
38
51
  }
39
52
  ],
40
- "formData": {
41
- "marker": "last_name",
42
- "type": "string",
43
- "value": "Username"
44
- },
45
53
  "notificationData": {
46
54
  "email": "example@oneentry.cloud",
47
55
  "phonePush": ["+99999999999"],
@@ -49,10 +57,49 @@ export default class UsersApi extends AsyncModules implements IUsers {
49
57
  },
50
58
  "state": {}
51
59
  }
60
+ * @param {string} body.formIdentifier - Identifies the registration form being used. Example: "reg_form".
61
+ * @param {string} body.authData - Contains authentication credentials for the user. Example:
62
+ * @example
63
+ [
64
+ {
65
+ "marker": "email_reg",
66
+ "value": "example@oneentry.cloud"
67
+ },
68
+ {
69
+ "marker": "password_reg",
70
+ "value": "password"
71
+ }
72
+ ]
73
+ * @param {string} body.authData[index].marker - Identifies the field being used. Example: "email_reg".
74
+ * @param {string} body.authData[index].value - Contains the value of the field. Example: "example@oneentry.cloud".
75
+ * @param {string} body.formData - Contains additional data for the user.
76
+ * @example
77
+ [
78
+ {
79
+ "marker": "last_name",
80
+ "type": "string",
81
+ "value": "Username"
82
+ }
83
+ ]
84
+ * @param {string} body.formData[index].marker - The marker of the field. Example: "last_name".
85
+ * @param {string} body.formData[index].type - The type of the field. Example: "string".
86
+ * @param {string} body.formData[index].value - The value of the field. Example: "Username".
87
+ * @param {string} body.notificationData - The notification data.
88
+ * @example
89
+ {
90
+ "email": "example@oneentry.cloud",
91
+ "phonePush": ["+99999999999"],
92
+ "phoneSMS": "+99999999999"
93
+ }
94
+ * @param {string} body.notificationData.email - The email address of the user. Example: "example@oneentry.cloud".
95
+ * @param {string} body.notificationData.phonePush - An array of phone numbers for push notifications. Example: ["+99999999999"].
96
+ * @param {string} body.notificationData.phoneSMS - The phone number for SMS notifications. Example: "+99999999999".
52
97
  * @param {string} [langCode] - Language code. Default: "en_US".
53
98
  * @returns {boolean} Returns `true` if the user object was successfully updated; otherwise, returns an error object.
54
99
  * @throws {IError} If there is an error during the fetch operation, it will return an error object.
55
- * @description Updating a single user object. This method requires user authorization. For more information about configuring the authorization module, see the documentation in the configuration settings section of the SDK.
100
+ * @description This method updates the user's data. This method requires user authorization.
101
+ * @see For more information about configuring the {@link https://js-sdk.oneentry.cloud/docs/category/authprovider authorization module}, see the documentation in the {@link https://js-sdk.oneentry.cloud/docs/category/authprovider configuration settings section of the SDK}.
102
+ * @see For more information about {@link https://doc.oneentry.cloud/docs/forms/create-form registration forms}, see the documentation in the {@link https://doc.oneentry.cloud/docs/forms/create-form forms configuration section}.
56
103
  */
57
104
  updateUser(body: IUserBody, langCode?: string): Promise<boolean | IError>;
58
105
  /**
@@ -60,7 +107,8 @@ export default class UsersApi extends AsyncModules implements IUsers {
60
107
  * @handleName archiveUser
61
108
  * @returns {boolean} Returns `true` if the user was successfully deleted; otherwise, returns an error object.
62
109
  * @throws {IError} If there is an error during the fetch operation, it will return an error object.
63
- * @description Archiving one user object (marked for deletion). This method requires user authorization. For more information about configuring the authorization module, see the documentation in the configuration settings section of the SDK.
110
+ * @description This method archives a user object (marks it for deletion). This method requires user authorization.
111
+ * @see For more information about configuring the {@link https://js-sdk.oneentry.cloud/docs/category/authprovider authorization module}, see the documentation in the {@link https://js-sdk.oneentry.cloud/docs/category/authprovider configuration settings section of the SDK}.
64
112
  */
65
113
  archiveUser(): Promise<boolean | IError>;
66
114
  /**
@@ -68,7 +116,8 @@ export default class UsersApi extends AsyncModules implements IUsers {
68
116
  * @handleName deleteUser
69
117
  * @returns {boolean} Returns `true` if the user was successfully deleted; otherwise, returns an error object.
70
118
  * @throws {IError} If there is an error during the fetch operation, it will return an error object.
71
- * @description This method requires user authorization. For more information about configuring the authorization module, see the documentation in the configuration settings section of the SDK.
119
+ * @description This method deletes the user from the system. This method requires user authorization.
120
+ * @see For more information about configuring the {@link https://js-sdk.oneentry.cloud/docs/category/authprovider authorization module}, see the documentation in the {@link https://js-sdk.oneentry.cloud/docs/category/authprovider configuration settings section of the SDK}.
72
121
  */
73
122
  deleteUser(): Promise<boolean | IError>;
74
123
  /**
@@ -77,7 +126,8 @@ export default class UsersApi extends AsyncModules implements IUsers {
77
126
  * @param {string} token - The cloud messaging token to be added. This token is used to identify the user's device for push notifications. Example: "fcm_token_1234567890abcdefg".
78
127
  * @returns {boolean} Returns `true` if the token was successfully added; otherwise, returns an error object.
79
128
  * @throws {IError} If there is an error during the fetch operation, it will return an error object.
80
- * @description This method requires user authorization. For more information about configuring the authorization module, see the documentation in the configuration settings section of the SDK.
129
+ * @description This method adds an FCM token for sending push notifications. This method requires user authorization.
130
+ * @see For more information about configuring the {@link https://js-sdk.oneentry.cloud/docs/category/authprovider authorization module}, see the documentation in the {@link https://js-sdk.oneentry.cloud/docs/category/authprovider configuration settings section of the SDK}.
81
131
  */
82
132
  addFCMToken(token: string): Promise<boolean | IError>;
83
133
  /**
@@ -86,7 +136,8 @@ export default class UsersApi extends AsyncModules implements IUsers {
86
136
  * @param {string} token - The cloud messaging token to be deleted. This token is used to identify the user's device for push notifications and will be removed. Example: "fcm_token_1234567890abcdefg".
87
137
  * @returns {boolean} Returns `true` if the token was successfully deleted; otherwise, returns an error object.
88
138
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
89
- * @description This method requires user authorization. For more information about configuring the authorization module, see the documentation in the configuration settings section of the SDK.
139
+ * @description This method deletes an existing FCM token. This method requires user authorization.
140
+ * @see For more information about configuring the {@link https://js-sdk.oneentry.cloud/docs/category/authprovider authorization module}, see the documentation in the {@link https://js-sdk.oneentry.cloud/docs/category/authprovider configuration settings section of the SDK}.
90
141
  */
91
142
  deleteFCMToken(token: string): Promise<boolean | IError>;
92
143
  }
@@ -25,7 +25,8 @@ class UsersApi extends asyncModules_1.default {
25
25
  * @param {string} [langCode] - Language code. Default: "en_US".
26
26
  * @returns {IUserEntity} Returns a promise that resolves to the user entity object if successful; otherwise, returns an error object.
27
27
  * @throws {IError} If there is an error during the fetch operation, it will return an error object.
28
- * @description Getting the data of an authorized user. This method requires user authorization. For more information about configuring the authorization module, see the documentation in the configuration settings section of the SDK.
28
+ * @description This method requires user authorization.
29
+ * @see For more information about configuring the {@link https://js-sdk.oneentry.cloud/docs/category/authprovider authorization module}, see the documentation in the {@link https://js-sdk.oneentry.cloud/docs/category/authprovider configuration settings section of the SDK}.
29
30
  */
30
31
  async getUser(langCode = this.state.lang) {
31
32
  const result = await this._fetchGet(`/me?langCode=${langCode}`);
@@ -34,20 +35,27 @@ class UsersApi extends asyncModules_1.default {
34
35
  /**
35
36
  * Updating a single user object.
36
37
  * @handleName updateUser
37
- * @param {IUserBody} body - Request body. Example:
38
+ * @param {IUserBody} body - Request body.
39
+ * @example
38
40
  {
39
41
  "formIdentifier": "reg",
40
42
  "authData": [
41
43
  {
42
- "marker": "password",
43
- "value": "12345"
44
+ "marker": "email_reg",
45
+ "value": "your-email@oneentery.cloud"
46
+ },
47
+ {
48
+ "marker": "password_reg",
49
+ "value": "12345"
50
+ }
51
+ ],
52
+ "formData": [
53
+ {
54
+ "marker": "last_name",
55
+ "type": "string",
56
+ "value": "Username"
44
57
  }
45
58
  ],
46
- "formData": {
47
- "marker": "last_name",
48
- "type": "string",
49
- "value": "Username"
50
- },
51
59
  "notificationData": {
52
60
  "email": "example@oneentry.cloud",
53
61
  "phonePush": ["+99999999999"],
@@ -55,10 +63,49 @@ class UsersApi extends asyncModules_1.default {
55
63
  },
56
64
  "state": {}
57
65
  }
66
+ * @param {string} body.formIdentifier - Identifies the registration form being used. Example: "reg_form".
67
+ * @param {string} body.authData - Contains authentication credentials for the user. Example:
68
+ * @example
69
+ [
70
+ {
71
+ "marker": "email_reg",
72
+ "value": "example@oneentry.cloud"
73
+ },
74
+ {
75
+ "marker": "password_reg",
76
+ "value": "password"
77
+ }
78
+ ]
79
+ * @param {string} body.authData[index].marker - Identifies the field being used. Example: "email_reg".
80
+ * @param {string} body.authData[index].value - Contains the value of the field. Example: "example@oneentry.cloud".
81
+ * @param {string} body.formData - Contains additional data for the user.
82
+ * @example
83
+ [
84
+ {
85
+ "marker": "last_name",
86
+ "type": "string",
87
+ "value": "Username"
88
+ }
89
+ ]
90
+ * @param {string} body.formData[index].marker - The marker of the field. Example: "last_name".
91
+ * @param {string} body.formData[index].type - The type of the field. Example: "string".
92
+ * @param {string} body.formData[index].value - The value of the field. Example: "Username".
93
+ * @param {string} body.notificationData - The notification data.
94
+ * @example
95
+ {
96
+ "email": "example@oneentry.cloud",
97
+ "phonePush": ["+99999999999"],
98
+ "phoneSMS": "+99999999999"
99
+ }
100
+ * @param {string} body.notificationData.email - The email address of the user. Example: "example@oneentry.cloud".
101
+ * @param {string} body.notificationData.phonePush - An array of phone numbers for push notifications. Example: ["+99999999999"].
102
+ * @param {string} body.notificationData.phoneSMS - The phone number for SMS notifications. Example: "+99999999999".
58
103
  * @param {string} [langCode] - Language code. Default: "en_US".
59
104
  * @returns {boolean} Returns `true` if the user object was successfully updated; otherwise, returns an error object.
60
105
  * @throws {IError} If there is an error during the fetch operation, it will return an error object.
61
- * @description Updating a single user object. This method requires user authorization. For more information about configuring the authorization module, see the documentation in the configuration settings section of the SDK.
106
+ * @description This method updates the user's data. This method requires user authorization.
107
+ * @see For more information about configuring the {@link https://js-sdk.oneentry.cloud/docs/category/authprovider authorization module}, see the documentation in the {@link https://js-sdk.oneentry.cloud/docs/category/authprovider configuration settings section of the SDK}.
108
+ * @see For more information about {@link https://doc.oneentry.cloud/docs/forms/create-form registration forms}, see the documentation in the {@link https://doc.oneentry.cloud/docs/forms/create-form forms configuration section}.
62
109
  */
63
110
  async updateUser(body, langCode = this.state.lang) {
64
111
  if (!('langCode' in body))
@@ -75,7 +122,8 @@ class UsersApi extends asyncModules_1.default {
75
122
  * @handleName archiveUser
76
123
  * @returns {boolean} Returns `true` if the user was successfully deleted; otherwise, returns an error object.
77
124
  * @throws {IError} If there is an error during the fetch operation, it will return an error object.
78
- * @description Archiving one user object (marked for deletion). This method requires user authorization. For more information about configuring the authorization module, see the documentation in the configuration settings section of the SDK.
125
+ * @description This method archives a user object (marks it for deletion). This method requires user authorization.
126
+ * @see For more information about configuring the {@link https://js-sdk.oneentry.cloud/docs/category/authprovider authorization module}, see the documentation in the {@link https://js-sdk.oneentry.cloud/docs/category/authprovider configuration settings section of the SDK}.
79
127
  */
80
128
  async archiveUser() {
81
129
  const result = await this._fetchDelete('/me');
@@ -86,7 +134,8 @@ class UsersApi extends asyncModules_1.default {
86
134
  * @handleName deleteUser
87
135
  * @returns {boolean} Returns `true` if the user was successfully deleted; otherwise, returns an error object.
88
136
  * @throws {IError} If there is an error during the fetch operation, it will return an error object.
89
- * @description This method requires user authorization. For more information about configuring the authorization module, see the documentation in the configuration settings section of the SDK.
137
+ * @description This method deletes the user from the system. This method requires user authorization.
138
+ * @see For more information about configuring the {@link https://js-sdk.oneentry.cloud/docs/category/authprovider authorization module}, see the documentation in the {@link https://js-sdk.oneentry.cloud/docs/category/authprovider configuration settings section of the SDK}.
90
139
  */
91
140
  async deleteUser() {
92
141
  const result = await this._fetchDelete('/me/account');
@@ -98,7 +147,8 @@ class UsersApi extends asyncModules_1.default {
98
147
  * @param {string} token - The cloud messaging token to be added. This token is used to identify the user's device for push notifications. Example: "fcm_token_1234567890abcdefg".
99
148
  * @returns {boolean} Returns `true` if the token was successfully added; otherwise, returns an error object.
100
149
  * @throws {IError} If there is an error during the fetch operation, it will return an error object.
101
- * @description This method requires user authorization. For more information about configuring the authorization module, see the documentation in the configuration settings section of the SDK.
150
+ * @description This method adds an FCM token for sending push notifications. This method requires user authorization.
151
+ * @see For more information about configuring the {@link https://js-sdk.oneentry.cloud/docs/category/authprovider authorization module}, see the documentation in the {@link https://js-sdk.oneentry.cloud/docs/category/authprovider configuration settings section of the SDK}.
102
152
  */
103
153
  async addFCMToken(token) {
104
154
  const result = await this._fetchPost(`/me/fcm-token/${token}`);
@@ -110,7 +160,8 @@ class UsersApi extends asyncModules_1.default {
110
160
  * @param {string} token - The cloud messaging token to be deleted. This token is used to identify the user's device for push notifications and will be removed. Example: "fcm_token_1234567890abcdefg".
111
161
  * @returns {boolean} Returns `true` if the token was successfully deleted; otherwise, returns an error object.
112
162
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
113
- * @description This method requires user authorization. For more information about configuring the authorization module, see the documentation in the configuration settings section of the SDK.
163
+ * @description This method deletes an existing FCM token. This method requires user authorization.
164
+ * @see For more information about configuring the {@link https://js-sdk.oneentry.cloud/docs/category/authprovider authorization module}, see the documentation in the {@link https://js-sdk.oneentry.cloud/docs/category/authprovider configuration settings section of the SDK}.
114
165
  */
115
166
  async deleteFCMToken(token) {
116
167
  const result = await this._fetchDelete(`/me/fcm-token/${token}`);