oneentry 1.0.126 → 1.0.128

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 (83) hide show
  1. package/README.md +0 -2
  2. package/configure.js +25 -18
  3. package/dist/admins/adminsApi.d.ts +18 -13
  4. package/dist/admins/adminsApi.js +18 -13
  5. package/dist/admins/adminsInterfaces.d.ts +16 -25
  6. package/dist/attribute-sets/attributeSetsApi.d.ts +14 -15
  7. package/dist/attribute-sets/attributeSetsApi.js +14 -15
  8. package/dist/attribute-sets/attributeSetsInterfaces.d.ts +78 -84
  9. package/dist/auth-provider/authProviderApi.d.ts +53 -79
  10. package/dist/auth-provider/authProviderApi.js +52 -78
  11. package/dist/auth-provider/authProvidersInterfaces.d.ts +98 -94
  12. package/dist/base/asyncModules.d.ts +23 -21
  13. package/dist/base/asyncModules.js +39 -29
  14. package/dist/base/result.d.ts +31 -0
  15. package/dist/base/result.js +32 -5
  16. package/dist/base/stateModule.d.ts +10 -0
  17. package/dist/base/stateModule.js +50 -2
  18. package/dist/base/syncModules.d.ts +42 -50
  19. package/dist/base/syncModules.js +106 -58
  20. package/dist/base/utils.d.ts +33 -2
  21. package/dist/blocks/blocksApi.d.ts +9 -18
  22. package/dist/blocks/blocksApi.js +9 -18
  23. package/dist/blocks/blocksInterfaces.d.ts +41 -46
  24. package/dist/config.d.ts +13 -0
  25. package/dist/config.js +30 -0
  26. package/dist/events/eventsApi.d.ts +10 -27
  27. package/dist/events/eventsApi.js +26 -40
  28. package/dist/events/eventsInterfaces.d.ts +33 -28
  29. package/dist/file-uploading/fileUploadingApi.d.ts +12 -17
  30. package/dist/file-uploading/fileUploadingApi.js +14 -17
  31. package/dist/file-uploading/fileUploadingInterfaces.d.ts +8 -19
  32. package/dist/forms/formsApi.d.ts +10 -9
  33. package/dist/forms/formsApi.js +10 -9
  34. package/dist/forms/formsInterfaces.d.ts +20 -12
  35. package/dist/forms-data/formsDataApi.d.ts +24 -28
  36. package/dist/forms-data/formsDataApi.js +25 -28
  37. package/dist/forms-data/formsDataInterfaces.d.ts +71 -71
  38. package/dist/general-types/generalTypesApi.d.ts +5 -5
  39. package/dist/general-types/generalTypesApi.js +5 -5
  40. package/dist/general-types/generalTypesInterfaces.d.ts +5 -8
  41. package/dist/index.d.ts +3 -4
  42. package/dist/index.js +3 -4
  43. package/dist/integration-collections/integrationCollectionsApi.d.ts +29 -47
  44. package/dist/integration-collections/integrationCollectionsApi.js +31 -51
  45. package/dist/integration-collections/integrationCollectionsInterfaces.d.ts +62 -58
  46. package/dist/locales/localesApi.d.ts +7 -3
  47. package/dist/locales/localesApi.js +7 -3
  48. package/dist/locales/localesInterfaces.d.ts +6 -5
  49. package/dist/menus/menusApi.d.ts +7 -3
  50. package/dist/menus/menusApi.js +7 -3
  51. package/dist/menus/menusInterfaces.d.ts +5 -10
  52. package/dist/menus/menusInterfaces.js +1 -0
  53. package/dist/orders/ordersApi.d.ts +17 -25
  54. package/dist/orders/ordersApi.js +17 -26
  55. package/dist/orders/ordersInterfaces.d.ts +94 -53
  56. package/dist/pages/pagesApi.d.ts +47 -60
  57. package/dist/pages/pagesApi.js +51 -61
  58. package/dist/pages/pagesInterfaces.d.ts +44 -48
  59. package/dist/payments/paymentsApi.d.ts +17 -27
  60. package/dist/payments/paymentsApi.js +17 -31
  61. package/dist/payments/paymentsInterfaces.d.ts +35 -29
  62. package/dist/product-statuses/productStatusesApi.d.ts +9 -9
  63. package/dist/product-statuses/productStatusesApi.js +9 -9
  64. package/dist/product-statuses/productStatusesInterfaces.d.ts +14 -12
  65. package/dist/products/productsApi.d.ts +23 -44
  66. package/dist/products/productsApi.js +24 -44
  67. package/dist/products/productsInterfaces.d.ts +51 -57
  68. package/dist/system/systemApi.d.ts +11 -13
  69. package/dist/system/systemApi.js +12 -13
  70. package/dist/system/systemInterfaces.d.ts +14 -3
  71. package/dist/templates/templatesApi.d.ts +8 -11
  72. package/dist/templates/templatesApi.js +8 -11
  73. package/dist/templates/templatesInterfaces.d.ts +13 -12
  74. package/dist/templates-preview/templatesPreviewApi.d.ts +7 -8
  75. package/dist/templates-preview/templatesPreviewApi.js +7 -8
  76. package/dist/templates-preview/templatesPreviewInterfaces.d.ts +15 -18
  77. package/dist/users/usersApi.d.ts +13 -20
  78. package/dist/users/usersApi.js +13 -20
  79. package/dist/users/usersInterfaces.d.ts +26 -30
  80. package/dist/web-socket/wsApi.d.ts +5 -3
  81. package/dist/web-socket/wsApi.js +6 -3
  82. package/dist/web-socket/wsInterfaces.d.ts +7 -2
  83. package/package.json +16 -12
@@ -3,46 +3,46 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
+ /* eslint-disable jsdoc/no-undefined-types */
6
7
  const asyncModules_1 = __importDefault(require("../base/asyncModules"));
7
8
  /**
8
9
  * Controllers for working with auth services.
9
- *
10
10
  * @handle /api/content/users-auth-providers
11
11
  * @class AuthProviderApi
12
- * @extends AsyncModules
12
+ * @augments AsyncModules
13
13
  * @implements {IAuthProvider}
14
- *
15
14
  * @description This class provides methods for user registration, authentication, and management of authentication providers.
16
15
  */
17
16
  class AuthProviderApi extends asyncModules_1.default {
17
+ /**
18
+ *
19
+ */
18
20
  constructor(state) {
19
21
  super(state);
20
22
  this._url = state.url + '/api/content/users-auth-providers';
21
23
  }
22
24
  /**
23
25
  * User registration.
24
- *
25
26
  * @handleName signUp
26
- *
27
27
  * @param {string} marker - The text identifier of the authorization provider. Example: "email".
28
28
  * @param {ISignUpData} body - Request body. Example:
29
29
  {
30
30
  "formIdentifier": "reg",
31
31
  "authData": [
32
32
  {
33
- "marker": "login",
34
- "value": "example@oneentry.cloud"
33
+ "marker": "login",
34
+ "value": "example@oneentry.cloud"
35
35
  },
36
36
  {
37
- "marker": "password",
38
- "value": "12345"
37
+ "marker": "password",
38
+ "value": "12345"
39
39
  }
40
40
  ],
41
41
  "formData": [
42
42
  {
43
- "marker": "last_name",
44
- "type": "string",
45
- "value": "Name"
43
+ "marker": "last_name",
44
+ "type": "string",
45
+ "value": "Name"
46
46
  }
47
47
  ],
48
48
  "notificationData": {
@@ -51,32 +51,32 @@ class AuthProviderApi extends asyncModules_1.default {
51
51
  "phoneSMS": "+99999999999"
52
52
  }
53
53
  }
54
- * @param {string} body.formIdentifier - The identifier for the registration form. Example: "reg".
55
- * @param {{ marker: string; value: string }[]} body.authData - An array of authentication data objects, each containing a marker and its corresponding value. Example:
56
- [
57
- {
58
- "marker": "login",
59
- "value": "example@oneentry.cloud"
60
- },
61
- {
62
- "marker": "password",
63
- "value": "12345"
64
- }
65
- ]
66
- * @param {IAuthFormData | IAuthFormData[]} body.formData - The form data for the registration, which can be a single object or an array of objects. Example:
54
+ * @param {string} body.formIdentifier - The identifier for the registration form. Example: "reg".
55
+ * @param {{ marker: string; value: string }[]} body.authData - An array of authentication data objects, each containing a marker and its corresponding value. Example:
56
+ [
67
57
  {
68
- "marker": "last_name",
69
- "type": "string",
70
- "value": "Name"
71
- }
72
- * @param {Object} body.notificationData - An object containing notification data, including email, phonePush, and phoneSMS. Example:
58
+ "marker": "login",
59
+ "value": "example@oneentry.cloud"
60
+ },
73
61
  {
74
- "email": "example@oneentry.cloud",
75
- "phonePush": ["+99999999999"],
76
- "phoneSMS": "+99999999999"
62
+ "marker": "password",
63
+ "value": "12345"
77
64
  }
65
+ ]
66
+ * @param {IAuthFormData} body.formData - The form data for the registration, which can be a single object or an array of objects. Example:
67
+ {
68
+ "marker": "last_name",
69
+ "type": "string",
70
+ "value": "Name"
71
+ }
72
+ * @param {object} body.notificationData - An object containing notification data, including email, phonePush, and phoneSMS. Example:
73
+ {
74
+ "email": "example@oneentry.cloud",
75
+ "phonePush": ["+99999999999"],
76
+ "phoneSMS": "+99999999999"
77
+ }
78
78
  * @param {string} [langCode] - Language code. Default: "en_US".
79
- * @return {ISignUpEntity} Returns a user object.
79
+ * @returns {ISignUpEntity} Returns a user object.
80
80
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
81
81
  * @description User registration (❗️For a provider with user activation, the activation code is sent through the corresponding user notification method).
82
82
  */
@@ -87,13 +87,11 @@ class AuthProviderApi extends asyncModules_1.default {
87
87
  }
88
88
  /**
89
89
  * Getting a user activation code. The code is returned via the appropriate user notification method.
90
- *
91
90
  * @handleName generateCode
92
- *
93
91
  * @param {string} marker - The text identifier of the authorization provider. Example: "email".
94
92
  * @param {string} userIdentifier - The text identifier of the user's object (user login). Example: "example@oneentry.cloud".
95
93
  * @param {string} eventIdentifier - Text identifier of the event object for which the code is generated. Example: "user_registration".
96
- * @return {void} Returns void if the code is successfully generated, or an error object if there was an issue.
94
+ * @returns {void} Returns void if the code is successfully generated, or an error object if there was an issue.
97
95
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
98
96
  * @description Obtaining a code to activate the user.
99
97
  */
@@ -102,20 +100,17 @@ class AuthProviderApi extends asyncModules_1.default {
102
100
  userIdentifier,
103
101
  eventIdentifier,
104
102
  };
105
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
106
103
  const result = await this._fetchPost(`/marker/${marker}/users/generate-code`, data);
107
104
  return result;
108
105
  }
109
106
  /**
110
107
  * User activation code verification. Returns true (if the code is correct) or false (if it is incorrect).
111
- *
112
108
  * @handleName checkCode
113
- *
114
109
  * @param {string} marker - The text identifier of the authorization provider. Example: "email".
115
- * @param {string} userIdentifier - The text identifier of the user's object (user login). Example: "example@oneentry.cloud".
110
+ * @param {string} userIdentifier - The text identifier of the user's object (user login). Example: "example@oneentry.cloud".
116
111
  * @param {string} eventIdentifier - Text identifier of the event object for which the code is generated. Example: "user_registration".
117
112
  * @param {string} code - Service code. Example: "123456".
118
- * @return {boolean} Returns true if the code is correct, or an error object if there was an issue.
113
+ * @returns {boolean} Returns true if the code is correct, or an error object if there was an issue.
119
114
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
120
115
  * @description Checking the user activation code
121
116
  */
@@ -130,13 +125,11 @@ class AuthProviderApi extends asyncModules_1.default {
130
125
  }
131
126
  /**
132
127
  * User activate.
133
- *
134
128
  * @handleName activateUser
135
- *
136
129
  * @param {string} marker - The text identifier of the authorization provider. Example: "email".
137
130
  * @param {string} userIdentifier - The text identifier of the user's object (user login). Example: "example@oneentry.cloud".
138
131
  * @param {string} code - Service code. Example: "123456".
139
- * @return {boolean} Returns true if the user was successfully activated, or an error object if there was an issue.
132
+ * @returns {boolean} Returns true if the user was successfully activated, or an error object if there was an issue.
140
133
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
141
134
  * @description User activation.
142
135
  */
@@ -150,20 +143,18 @@ class AuthProviderApi extends asyncModules_1.default {
150
143
  }
151
144
  /**
152
145
  * User authorization.
153
- *
154
146
  * @handleName auth
155
- *
156
147
  * @param {string} marker - The text identifier of the authorization provider. Example: "email".
157
148
  * @param {IAuthPostBody} body - Objects contains auth information. Example:
158
149
  {
159
150
  "authData": [
160
151
  {
161
- "marker": "login",
162
- "value": "example@oneentry.cloud"
152
+ "marker": "login",
153
+ "value": "example@oneentry.cloud"
163
154
  },
164
155
  {
165
- "marker": "password",
166
- "value": "12345"
156
+ "marker": "password",
157
+ "value": "12345"
167
158
  }
168
159
  ]
169
160
  }
@@ -175,9 +166,8 @@ class AuthProviderApi extends asyncModules_1.default {
175
166
  }
176
167
  ]
177
168
  * @param {string} body.authData[index].marker - The marker for the authentication data. Example: "login".
178
- * @param {string} body.authData[index].value - The value for the authentication data. Example: "user@example.com".
179
- *
180
- * @return {IAuthEntity} Returns an auth entity object.
169
+ * @param {string} body.authData[index].value - The value for the authentication data. Example: "user@example.com".
170
+ * @returns {IAuthEntity} Returns an auth entity object.
181
171
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
182
172
  * @description User authorization.
183
173
  */
@@ -193,12 +183,10 @@ class AuthProviderApi extends asyncModules_1.default {
193
183
  }
194
184
  /**
195
185
  * Refresh token.
196
- *
197
186
  * @handleName refresh
198
- *
199
187
  * @param {string} marker - The text identifier of the authorization provider. Example: "email".
200
188
  * @param {string} token - Refresh token. Example: "abcdef123456".
201
- * @return {IAuthEntity} Returns an auth entity object with the following values: accessToken, refreshToken, user, and other auth-related data.
189
+ * @returns {IAuthEntity} Returns an auth entity object with the following values: accessToken, refreshToken, user, and other auth-related data.
202
190
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
203
191
  * @description User token refresh.
204
192
  */
@@ -214,12 +202,10 @@ class AuthProviderApi extends asyncModules_1.default {
214
202
  }
215
203
  /**
216
204
  * User account logout.
217
- *
218
205
  * @handleName logout
219
- *
220
206
  * @param {string} marker - The text identifier of the authorization provider. Example: "email".
221
207
  * @param {string} token - Refresh token. Example: "abcdef123456".
222
- * @return {boolean} Returns true if the logout was successful, or an error object if there was an issue.
208
+ * @returns {boolean} Returns true if the logout was successful, or an error object if there was an issue.
223
209
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
224
210
  * @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.
225
211
  */
@@ -239,11 +225,9 @@ class AuthProviderApi extends asyncModules_1.default {
239
225
  }
240
226
  /**
241
227
  * Logout of user account on all devices.
242
- *
243
228
  * @handleName logoutAll
244
- *
245
229
  * @param {string} marker - The text identifier of the authorization provider. Example: "email".
246
- * @return {boolean} Returns true if the logout was successful, or an error object if there was an issue.
230
+ * @returns {boolean} Returns true if the logout was successful, or an error object if there was an issue.
247
231
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
248
232
  * @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.
249
233
  */
@@ -260,9 +244,7 @@ class AuthProviderApi extends asyncModules_1.default {
260
244
  }
261
245
  /**
262
246
  * Change password.
263
- *
264
247
  * @handleName changePassword
265
- *
266
248
  * @param {string} marker - The text identifier of the authorization provider. Example: "email".
267
249
  * @param {string} userIdentifier - The text identifier of the user's object (user login). Example: "example@oneentry.cloud".
268
250
  * @param {string} eventIdentifier - The text identifier of the event. Example: "reg".
@@ -270,7 +252,7 @@ class AuthProviderApi extends asyncModules_1.default {
270
252
  * @param {string} code - Service code. Example: "123456".
271
253
  * @param {string} newPassword - New password. Example: "newPassword123".
272
254
  * @param {string} [repeatPassword] - Optional variable contains repeat new password for validation. Example: "newPassword123".
273
- * @return {boolean} Returns true if the password was successfully changed, or an error object if there was an issue.
255
+ * @returns {boolean} Returns true if the password was successfully changed, or an error object if there was an issue.
274
256
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
275
257
  * @description User password change (only for tariffs with account activation and the Activation feature enabled).
276
258
  */
@@ -288,13 +270,11 @@ class AuthProviderApi extends asyncModules_1.default {
288
270
  }
289
271
  /**
290
272
  * Get all auth providers objects.
291
- *
292
273
  * @handleName getAuthProviders
293
- *
294
274
  * @param {string} [langCode] - Language code. Default: "en_US".
295
275
  * @param {number} [offset] - Parameter for pagination. Default: 0.
296
276
  * @param {number} [limit] - Parameter for pagination. Default: 30.
297
- * @return {IAuthProvidersEntity[]} Returns an array of auth provider objects.
277
+ * @returns {IAuthProvidersEntity[]} Returns an array of auth provider objects.
298
278
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
299
279
  * @description Getting all objects of authorization providers.
300
280
  */
@@ -304,12 +284,10 @@ class AuthProviderApi extends asyncModules_1.default {
304
284
  }
305
285
  /**
306
286
  * Get one auth provider object by marker.
307
- *
308
287
  * @handleName getAuthProviderByMarker
309
- *
310
288
  * @param {string} marker - The text identifier of the authorization provider. Example: "email".
311
289
  * @param {string} [langCode] - Language code. Default: "en_US".
312
- * @return {IAuthProvidersEntity} Returns an auth provider object.
290
+ * @returns {IAuthProvidersEntity} Returns an auth provider object.
313
291
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
314
292
  * @description Getting a single authorization provider object by marker.
315
293
  */
@@ -319,11 +297,9 @@ class AuthProviderApi extends asyncModules_1.default {
319
297
  }
320
298
  /**
321
299
  * Getting active user sessions data.
322
- *
323
300
  * @handleName getActiveSessions
324
- *
325
301
  * @param {string} marker - The text identifier of the authorization provider. Example: "email".
326
- * @return {IAuthProvidersEntity} Returns an auth provider object.
302
+ * @returns {IActiveSession[]} Returns an auth provider object.
327
303
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
328
304
  * @description Getting a single authorization provider object by marker.
329
305
  */
@@ -333,9 +309,7 @@ class AuthProviderApi extends asyncModules_1.default {
333
309
  }
334
310
  /**
335
311
  * User registration (authorization) via OAUTH.
336
- *
337
312
  * @handleName oauthSignUp
338
- *
339
313
  * @param {string} marker - The text identifier of the authorization provider. Example: "email".
340
314
  * @param {IOAuthSignUpData} body - Object contains OAuth information for registration. Example:
341
315
  {
@@ -346,7 +320,7 @@ class AuthProviderApi extends asyncModules_1.default {
346
320
  "redirect_uri": "http://localhost:3000"
347
321
  }
348
322
  * @param {string} [langCode] - Language code. Default: "en_US".
349
- * @return {ISignUpEntity} Returns a user object.
323
+ * @returns {ISignUpEntity} Returns a user object.
350
324
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
351
325
  * @description User registration (authorization) via OAUTH.
352
326
  */