oneentry 1.0.130 → 1.0.131
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/dist/admins/adminsApi.d.ts +2 -2
- package/dist/admins/adminsApi.js +2 -2
- package/dist/admins/adminsInterfaces.d.ts +4 -3
- package/dist/attribute-sets/attributeSetsApi.d.ts +0 -4
- package/dist/attribute-sets/attributeSetsApi.js +0 -4
- package/dist/attribute-sets/attributeSetsInterfaces.d.ts +42 -32
- package/dist/auth-provider/authProviderApi.d.ts +18 -9
- package/dist/auth-provider/authProviderApi.js +18 -9
- package/dist/auth-provider/authProvidersInterfaces.d.ts +20 -10
- package/dist/blocks/blocksApi.d.ts +0 -4
- package/dist/blocks/blocksApi.js +0 -4
- package/dist/config.d.ts +1 -1
- package/dist/config.js +3 -1
- package/dist/events/eventsApi.d.ts +6 -3
- package/dist/events/eventsApi.js +6 -3
- package/dist/events/eventsInterfaces.d.ts +2 -1
- package/dist/file-uploading/fileUploadingApi.d.ts +12 -6
- package/dist/file-uploading/fileUploadingApi.js +12 -6
- package/dist/file-uploading/fileUploadingInterfaces.d.ts +10 -5
- package/dist/forms/formsApi.d.ts +4 -2
- package/dist/forms/formsApi.js +4 -2
- package/dist/forms/formsInterfaces.d.ts +2 -1
- package/dist/forms-data/formsDataApi.d.ts +19 -9
- package/dist/forms-data/formsDataApi.js +19 -9
- package/dist/forms-data/formsDataInterfaces.d.ts +38 -18
- package/dist/integration-collections/integrationCollectionsApi.d.ts +10 -5
- package/dist/integration-collections/integrationCollectionsApi.js +10 -5
- package/dist/integration-collections/integrationCollectionsInterfaces.d.ts +20 -10
- package/dist/menus/menusInterfaces.d.ts +8 -4
- package/dist/orders/ordersApi.d.ts +16 -8
- package/dist/orders/ordersApi.js +16 -8
- package/dist/orders/ordersInterfaces.d.ts +39 -18
- package/dist/pages/pagesApi.d.ts +2 -1
- package/dist/pages/pagesApi.js +2 -1
- package/dist/pages/pagesInterfaces.d.ts +10 -5
- package/dist/payments/paymentsApi.d.ts +20 -12
- package/dist/payments/paymentsApi.js +20 -12
- package/dist/payments/paymentsInterfaces.d.ts +25 -7
- package/dist/product-statuses/productStatusesInterfaces.d.ts +5 -4
- package/dist/products/productsApi.d.ts +28 -15
- package/dist/products/productsApi.js +28 -15
- package/dist/products/productsInterfaces.d.ts +33 -18
- package/dist/system/systemApi.d.ts +2 -1
- package/dist/system/systemApi.js +2 -1
- package/dist/templates/templatesInterfaces.d.ts +3 -2
- package/dist/templates-preview/templatesPreviewInterfaces.d.ts +8 -4
- package/dist/users/usersApi.d.ts +14 -7
- package/dist/users/usersApi.js +14 -7
- package/dist/users/usersInterfaces.d.ts +23 -11
- package/dist/web-socket/wsApi.d.ts +2 -1
- package/dist/web-socket/wsApi.js +2 -1
- 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 [].
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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}
|
|
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.
|
|
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: [].
|
|
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: [].
|
|
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: [].
|
|
304
|
+
* @param {string} body - Body parameters for filter. Deault: [].
|
|
305
|
+
* @example
|
|
296
306
|
[
|
|
297
307
|
{
|
|
298
308
|
"attributeMarker": "price",
|
|
@@ -377,7 +387,8 @@ interface IFilterParams {
|
|
|
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.
|
|
390
|
+
* @property {object} additional - Additional value from the index.
|
|
391
|
+
* @example
|
|
381
392
|
{
|
|
382
393
|
"en": "In Stock",
|
|
383
394
|
"de": "Auf Lager"
|
|
@@ -433,7 +444,8 @@ interface IProductsEntity {
|
|
|
433
444
|
/**
|
|
434
445
|
* @interface IProductsResponse
|
|
435
446
|
* @property {number} total - The total number of products found. Example: 100.
|
|
436
|
-
* @property {IProductsEntity[]} items - An array of product entities.
|
|
447
|
+
* @property {IProductsEntity[]} items - An array of product entities.
|
|
448
|
+
* @example
|
|
437
449
|
[
|
|
438
450
|
{
|
|
439
451
|
"id": 12345,
|
|
@@ -465,7 +477,8 @@ interface IProductsCount {
|
|
|
465
477
|
/**
|
|
466
478
|
* @interface IProductsInfo
|
|
467
479
|
* @property {number} total - The total number of products found. Example: 100.
|
|
468
|
-
* @property {IProductInfo[]} items - An array of product information objects.
|
|
480
|
+
* @property {IProductInfo[]} items - An array of product information objects.
|
|
481
|
+
* @example
|
|
469
482
|
[
|
|
470
483
|
{
|
|
471
484
|
"id": 12345,
|
|
@@ -496,7 +509,8 @@ interface IProductInfo {
|
|
|
496
509
|
* @interface IProductBlock
|
|
497
510
|
* @property {number} id - Unique identifier of the product block. Example: 3289.
|
|
498
511
|
* @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.
|
|
512
|
+
* @property {ILocalizeInfo} localizeInfos - Localization information for the product block.
|
|
513
|
+
* @example
|
|
500
514
|
{
|
|
501
515
|
"title": "Box"
|
|
502
516
|
}
|
|
@@ -508,7 +522,8 @@ interface IProductInfo {
|
|
|
508
522
|
* @property {string | null} templateIdentifier - Identifier for the template used by the product block, or null if not applicable. Example: "template_12345".
|
|
509
523
|
* @property {boolean} isVisible - Indicates whether the product block is visible. Example: true.
|
|
510
524
|
* @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.
|
|
525
|
+
* @property {AttributeType} attributeValues - Array of attribute values from the index, represented as a pair of user attribute id and attribute value.
|
|
526
|
+
* @example
|
|
512
527
|
[
|
|
513
528
|
{
|
|
514
529
|
"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.
|
|
38
|
+
* @param {object} event - The event object containing CAPTCHA data.
|
|
39
|
+
* @example
|
|
39
40
|
{
|
|
40
41
|
"token": "03AGdBq24...",
|
|
41
42
|
"expectedAction": "login",
|
package/dist/system/systemApi.js
CHANGED
|
@@ -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.
|
|
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).
|
|
51
|
-
* @
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
66
|
+
* @property {ISquare} proportions.square - Square proportion of the template preview.
|
|
67
|
+
* @example
|
|
64
68
|
{
|
|
65
69
|
"side": 3,
|
|
66
70
|
"alignmentType": "leftTop"
|
package/dist/users/usersApi.d.ts
CHANGED
|
@@ -22,13 +22,15 @@ 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
|
|
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.
|
|
32
|
+
* @param {IUserBody} body - Request body.
|
|
33
|
+
* @example
|
|
32
34
|
{
|
|
33
35
|
"formIdentifier": "reg",
|
|
34
36
|
"authData": [
|
|
@@ -52,7 +54,8 @@ export default class UsersApi extends AsyncModules implements IUsers {
|
|
|
52
54
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
53
55
|
* @returns {boolean} Returns `true` if the user object was successfully updated; otherwise, returns an error object.
|
|
54
56
|
* @throws {IError} If there is an error during the fetch operation, it will return an error object.
|
|
55
|
-
* @description
|
|
57
|
+
* @description This method updates the user's data. This method requires user authorization.
|
|
58
|
+
* @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}.
|
|
56
59
|
*/
|
|
57
60
|
updateUser(body: IUserBody, langCode?: string): Promise<boolean | IError>;
|
|
58
61
|
/**
|
|
@@ -60,7 +63,8 @@ export default class UsersApi extends AsyncModules implements IUsers {
|
|
|
60
63
|
* @handleName archiveUser
|
|
61
64
|
* @returns {boolean} Returns `true` if the user was successfully deleted; otherwise, returns an error object.
|
|
62
65
|
* @throws {IError} If there is an error during the fetch operation, it will return an error object.
|
|
63
|
-
* @description
|
|
66
|
+
* @description This method archives a user object (marks it for deletion). This method requires user authorization.
|
|
67
|
+
* @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
68
|
*/
|
|
65
69
|
archiveUser(): Promise<boolean | IError>;
|
|
66
70
|
/**
|
|
@@ -68,7 +72,8 @@ export default class UsersApi extends AsyncModules implements IUsers {
|
|
|
68
72
|
* @handleName deleteUser
|
|
69
73
|
* @returns {boolean} Returns `true` if the user was successfully deleted; otherwise, returns an error object.
|
|
70
74
|
* @throws {IError} If there is an error during the fetch operation, it will return an error object.
|
|
71
|
-
* @description This method
|
|
75
|
+
* @description This method deletes the user from the system. This method requires user authorization.
|
|
76
|
+
* @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
77
|
*/
|
|
73
78
|
deleteUser(): Promise<boolean | IError>;
|
|
74
79
|
/**
|
|
@@ -77,7 +82,8 @@ export default class UsersApi extends AsyncModules implements IUsers {
|
|
|
77
82
|
* @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
83
|
* @returns {boolean} Returns `true` if the token was successfully added; otherwise, returns an error object.
|
|
79
84
|
* @throws {IError} If there is an error during the fetch operation, it will return an error object.
|
|
80
|
-
* @description This method
|
|
85
|
+
* @description This method adds an FCM token for sending push notifications. This method requires user authorization.
|
|
86
|
+
* @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
87
|
*/
|
|
82
88
|
addFCMToken(token: string): Promise<boolean | IError>;
|
|
83
89
|
/**
|
|
@@ -86,7 +92,8 @@ export default class UsersApi extends AsyncModules implements IUsers {
|
|
|
86
92
|
* @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
93
|
* @returns {boolean} Returns `true` if the token was successfully deleted; otherwise, returns an error object.
|
|
88
94
|
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
89
|
-
* @description This method
|
|
95
|
+
* @description This method deletes an existing FCM token. This method requires user authorization.
|
|
96
|
+
* @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
97
|
*/
|
|
91
98
|
deleteFCMToken(token: string): Promise<boolean | IError>;
|
|
92
99
|
}
|
package/dist/users/usersApi.js
CHANGED
|
@@ -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
|
|
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,7 +35,8 @@ 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.
|
|
38
|
+
* @param {IUserBody} body - Request body.
|
|
39
|
+
* @example
|
|
38
40
|
{
|
|
39
41
|
"formIdentifier": "reg",
|
|
40
42
|
"authData": [
|
|
@@ -58,7 +60,8 @@ class UsersApi extends asyncModules_1.default {
|
|
|
58
60
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
59
61
|
* @returns {boolean} Returns `true` if the user object was successfully updated; otherwise, returns an error object.
|
|
60
62
|
* @throws {IError} If there is an error during the fetch operation, it will return an error object.
|
|
61
|
-
* @description
|
|
63
|
+
* @description This method updates the user's data. This method requires user authorization.
|
|
64
|
+
* @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}.
|
|
62
65
|
*/
|
|
63
66
|
async updateUser(body, langCode = this.state.lang) {
|
|
64
67
|
if (!('langCode' in body))
|
|
@@ -75,7 +78,8 @@ class UsersApi extends asyncModules_1.default {
|
|
|
75
78
|
* @handleName archiveUser
|
|
76
79
|
* @returns {boolean} Returns `true` if the user was successfully deleted; otherwise, returns an error object.
|
|
77
80
|
* @throws {IError} If there is an error during the fetch operation, it will return an error object.
|
|
78
|
-
* @description
|
|
81
|
+
* @description This method archives a user object (marks it for deletion). This method requires user authorization.
|
|
82
|
+
* @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
83
|
*/
|
|
80
84
|
async archiveUser() {
|
|
81
85
|
const result = await this._fetchDelete('/me');
|
|
@@ -86,7 +90,8 @@ class UsersApi extends asyncModules_1.default {
|
|
|
86
90
|
* @handleName deleteUser
|
|
87
91
|
* @returns {boolean} Returns `true` if the user was successfully deleted; otherwise, returns an error object.
|
|
88
92
|
* @throws {IError} If there is an error during the fetch operation, it will return an error object.
|
|
89
|
-
* @description This method
|
|
93
|
+
* @description This method deletes the user from the system. This method requires user authorization.
|
|
94
|
+
* @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
95
|
*/
|
|
91
96
|
async deleteUser() {
|
|
92
97
|
const result = await this._fetchDelete('/me/account');
|
|
@@ -98,7 +103,8 @@ class UsersApi extends asyncModules_1.default {
|
|
|
98
103
|
* @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
104
|
* @returns {boolean} Returns `true` if the token was successfully added; otherwise, returns an error object.
|
|
100
105
|
* @throws {IError} If there is an error during the fetch operation, it will return an error object.
|
|
101
|
-
* @description This method
|
|
106
|
+
* @description This method adds an FCM token for sending push notifications. 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}.
|
|
102
108
|
*/
|
|
103
109
|
async addFCMToken(token) {
|
|
104
110
|
const result = await this._fetchPost(`/me/fcm-token/${token}`);
|
|
@@ -110,7 +116,8 @@ class UsersApi extends asyncModules_1.default {
|
|
|
110
116
|
* @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
117
|
* @returns {boolean} Returns `true` if the token was successfully deleted; otherwise, returns an error object.
|
|
112
118
|
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
113
|
-
* @description This method
|
|
119
|
+
* @description This method deletes an existing FCM token. 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}.
|
|
114
121
|
*/
|
|
115
122
|
async deleteFCMToken(token) {
|
|
116
123
|
const result = await this._fetchDelete(`/me/fcm-token/${token}`);
|
|
@@ -20,13 +20,15 @@ interface IUsers {
|
|
|
20
20
|
* @param {string} [langCode] - Optional language code for localization. Default: "en_US".
|
|
21
21
|
* @returns {IUserEntity} A promise resolving to the user entity or an error.
|
|
22
22
|
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
23
|
-
* @description This method
|
|
23
|
+
* @description This method requires user authorization.
|
|
24
|
+
* @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}.
|
|
24
25
|
*/
|
|
25
26
|
getUser(langCode?: string): Promise<IUserEntity | IError>;
|
|
26
27
|
/**
|
|
27
28
|
* Updates the user's data.
|
|
28
29
|
* @handleName updateUser
|
|
29
|
-
* @param {IUserBody} data - The new data for the user.
|
|
30
|
+
* @param {IUserBody} data - The new data for the user.
|
|
31
|
+
* @example
|
|
30
32
|
{
|
|
31
33
|
"formIdentifier": "reg",
|
|
32
34
|
"authData": [
|
|
@@ -50,7 +52,8 @@ interface IUsers {
|
|
|
50
52
|
* @param {string} [langCode] - Optional language code for localization. Default: "en_US".
|
|
51
53
|
* @returns {boolean} A promise resolving to true if successful, or an error.
|
|
52
54
|
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
53
|
-
* @description This method updates the user's data.
|
|
55
|
+
* @description This method updates the user's data. This method requires user authorization.
|
|
56
|
+
* @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}.
|
|
54
57
|
*/
|
|
55
58
|
updateUser(data: IUserBody, langCode?: string): Promise<boolean | IError>;
|
|
56
59
|
/**
|
|
@@ -58,7 +61,8 @@ interface IUsers {
|
|
|
58
61
|
* @handleName archiveUser
|
|
59
62
|
* @returns {boolean} A promise resolving to true if successful, or an error.
|
|
60
63
|
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
61
|
-
* @description This method archives a user object (marks it for deletion).
|
|
64
|
+
* @description This method archives a user object (marks it for deletion). This method requires user authorization.
|
|
65
|
+
* @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}.
|
|
62
66
|
*/
|
|
63
67
|
archiveUser(): Promise<boolean | IError>;
|
|
64
68
|
/**
|
|
@@ -66,7 +70,8 @@ interface IUsers {
|
|
|
66
70
|
* @handleName deleteUser
|
|
67
71
|
* @returns {boolean} A promise resolving to true if successful, or an error.
|
|
68
72
|
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
69
|
-
* @description This method deletes the user from the system.
|
|
73
|
+
* @description This method deletes the user from the system. This method requires user authorization.
|
|
74
|
+
* @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}.
|
|
70
75
|
*/
|
|
71
76
|
deleteUser(): Promise<boolean | IError>;
|
|
72
77
|
/**
|
|
@@ -75,7 +80,8 @@ interface IUsers {
|
|
|
75
80
|
* @param {string} token - The FCM token to be added. Example: "fcm_token_1234567890abcdefg".
|
|
76
81
|
* @returns {boolean} A promise resolving to true if successful, or an error.
|
|
77
82
|
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
78
|
-
* @description This method adds an FCM token for sending push notifications.
|
|
83
|
+
* @description This method adds an FCM token for sending push notifications. This method requires user authorization.
|
|
84
|
+
* @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
85
|
*/
|
|
80
86
|
addFCMToken(token: string): Promise<boolean | IError>;
|
|
81
87
|
/**
|
|
@@ -84,7 +90,8 @@ interface IUsers {
|
|
|
84
90
|
* @param {string} token - The FCM token to be deleted. Example: "fcm_token_1234567890abcdefg".
|
|
85
91
|
* @returns {boolean} A promise resolving to true if successful, or an error.
|
|
86
92
|
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
87
|
-
* @description This method deletes an existing FCM token.
|
|
93
|
+
* @description This method deletes an existing FCM token. This method requires user authorization.
|
|
94
|
+
* @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}.
|
|
88
95
|
*/
|
|
89
96
|
deleteFCMToken(token: string): Promise<boolean | IError>;
|
|
90
97
|
}
|
|
@@ -93,7 +100,8 @@ interface IUsers {
|
|
|
93
100
|
* @property {number} id - Object identifier. Example: 12345.
|
|
94
101
|
* @property {string} identifier - Text identifier for record field. Example: "user_12345".
|
|
95
102
|
* @property {string} authProviderIdentifier - Text identifier of the authentication provider. Example: "auth_provider_12345".
|
|
96
|
-
* @property {FormDataType[]} formData - Array of data form objects with the following values.
|
|
103
|
+
* @property {FormDataType[]} formData - Array of data form objects with the following values.
|
|
104
|
+
* @example
|
|
97
105
|
[
|
|
98
106
|
{
|
|
99
107
|
"marker": "last_name",
|
|
@@ -112,6 +120,7 @@ interface IUserEntity {
|
|
|
112
120
|
authProviderIdentifier: string;
|
|
113
121
|
formData: FormDataType[];
|
|
114
122
|
formIdentifier: string;
|
|
123
|
+
total: string;
|
|
115
124
|
groups: Array<string | number>;
|
|
116
125
|
state: Record<string, any>;
|
|
117
126
|
moduleFormConfigs: IFormConfig;
|
|
@@ -120,14 +129,16 @@ interface IUserEntity {
|
|
|
120
129
|
* @interface IUserBody
|
|
121
130
|
* @property {string} formIdentifier - Text identifier of the form. Example: "form_12345".
|
|
122
131
|
* @property {string} [langCode] - Language code for localization. Default: "en_US".
|
|
123
|
-
* @property {{ marker: string; value: string }[]} [authData] - Array of authentication data objects with markers and values.
|
|
132
|
+
* @property {{ marker: string; value: string }[]} [authData] - Array of authentication data objects with markers and values.
|
|
133
|
+
* @example
|
|
124
134
|
[
|
|
125
135
|
{
|
|
126
136
|
"marker": "password",
|
|
127
137
|
"value": "12345"
|
|
128
138
|
}
|
|
129
139
|
]
|
|
130
|
-
* @property {IAuthFormData | IAuthFormData[]} [formData] - Form data object or array of form data objects.
|
|
140
|
+
* @property {IAuthFormData | IAuthFormData[]} [formData] - Form data object or array of form data objects.
|
|
141
|
+
* @example
|
|
131
142
|
[
|
|
132
143
|
{
|
|
133
144
|
"marker": "first_name",
|
|
@@ -140,7 +151,8 @@ interface IUserEntity {
|
|
|
140
151
|
"value": "Doe"
|
|
141
152
|
}
|
|
142
153
|
]
|
|
143
|
-
* @property {object} [notificationData] - Object containing notification data, including email and phone information.
|
|
154
|
+
* @property {object} [notificationData] - Object containing notification data, including email and phone information.
|
|
155
|
+
* @example
|
|
144
156
|
{
|
|
145
157
|
"email": "example@oneentry.cloud",
|
|
146
158
|
"phonePush": ["+99999999999"],
|
|
@@ -15,10 +15,11 @@ export default class WsApi extends AsyncModules implements IWS {
|
|
|
15
15
|
*/
|
|
16
16
|
constructor(state: StateModule);
|
|
17
17
|
/**
|
|
18
|
-
* Creates an instance of an object Socket.io with a connection.
|
|
18
|
+
* Creates an instance of an object Socket.io with a connection.
|
|
19
19
|
* @handleName connect
|
|
20
20
|
* @returns {Socket} Returns a Socket instance.
|
|
21
21
|
* @description Creates an instance of an object Socket.io with a connection. This method requires user authorization.
|
|
22
|
+
* @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}.
|
|
22
23
|
*/
|
|
23
24
|
connect(): Socket;
|
|
24
25
|
}
|
package/dist/web-socket/wsApi.js
CHANGED
|
@@ -19,10 +19,11 @@ class WsApi extends asyncModules_1.default {
|
|
|
19
19
|
this._url = state.url + '/api/content/ws';
|
|
20
20
|
}
|
|
21
21
|
/**
|
|
22
|
-
* Creates an instance of an object Socket.io with a connection.
|
|
22
|
+
* Creates an instance of an object Socket.io with a connection.
|
|
23
23
|
* @handleName connect
|
|
24
24
|
* @returns {Socket} Returns a Socket instance.
|
|
25
25
|
* @description Creates an instance of an object Socket.io with a connection. 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
|
connect() {
|
|
28
29
|
if (!this.state.accessToken) {
|