oneentry 1.0.126 → 1.0.127

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 +30 -25
  4. package/dist/admins/adminsApi.js +30 -25
  5. package/dist/admins/adminsInterfaces.d.ts +45 -54
  6. package/dist/attribute-sets/attributeSetsApi.d.ts +26 -27
  7. package/dist/attribute-sets/attributeSetsApi.js +26 -27
  8. package/dist/attribute-sets/attributeSetsInterfaces.d.ts +101 -109
  9. package/dist/auth-provider/authProviderApi.d.ts +132 -158
  10. package/dist/auth-provider/authProviderApi.js +131 -157
  11. package/dist/auth-provider/authProvidersInterfaces.d.ts +241 -237
  12. package/dist/base/asyncModules.d.ts +23 -21
  13. package/dist/base/asyncModules.js +30 -25
  14. package/dist/base/result.d.ts +31 -0
  15. package/dist/base/result.js +32 -1
  16. package/dist/base/stateModule.d.ts +10 -0
  17. package/dist/base/stateModule.js +50 -2
  18. package/dist/base/syncModules.d.ts +41 -49
  19. package/dist/base/syncModules.js +49 -48
  20. package/dist/base/utils.d.ts +38 -7
  21. package/dist/blocks/blocksApi.d.ts +27 -36
  22. package/dist/blocks/blocksApi.js +27 -36
  23. package/dist/blocks/blocksInterfaces.d.ts +92 -97
  24. package/dist/config.d.ts +13 -0
  25. package/dist/config.js +30 -0
  26. package/dist/events/eventsApi.d.ts +16 -33
  27. package/dist/events/eventsApi.js +32 -46
  28. package/dist/events/eventsInterfaces.d.ts +42 -37
  29. package/dist/file-uploading/fileUploadingApi.d.ts +42 -47
  30. package/dist/file-uploading/fileUploadingApi.js +44 -47
  31. package/dist/file-uploading/fileUploadingInterfaces.d.ts +49 -60
  32. package/dist/forms/formsApi.d.ts +15 -14
  33. package/dist/forms/formsApi.js +15 -14
  34. package/dist/forms/formsInterfaces.d.ts +36 -40
  35. package/dist/forms-data/formsDataApi.d.ts +40 -44
  36. package/dist/forms-data/formsDataApi.js +42 -44
  37. package/dist/forms-data/formsDataInterfaces.d.ts +231 -231
  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 +6 -9
  41. package/dist/index.d.ts +12 -13
  42. package/dist/index.js +12 -13
  43. package/dist/integration-collections/integrationCollectionsApi.d.ts +84 -98
  44. package/dist/integration-collections/integrationCollectionsApi.js +86 -102
  45. package/dist/integration-collections/integrationCollectionsInterfaces.d.ts +177 -169
  46. package/dist/locales/localesApi.d.ts +7 -3
  47. package/dist/locales/localesApi.js +7 -3
  48. package/dist/locales/localesInterfaces.d.ts +14 -13
  49. package/dist/menus/menusApi.d.ts +9 -5
  50. package/dist/menus/menusApi.js +9 -5
  51. package/dist/menus/menusInterfaces.d.ts +43 -48
  52. package/dist/menus/menusInterfaces.js +1 -0
  53. package/dist/orders/ordersApi.d.ts +62 -70
  54. package/dist/orders/ordersApi.js +62 -71
  55. package/dist/orders/ordersInterfaces.d.ts +238 -203
  56. package/dist/pages/pagesApi.d.ts +67 -80
  57. package/dist/pages/pagesApi.js +71 -81
  58. package/dist/pages/pagesInterfaces.d.ts +164 -160
  59. package/dist/payments/paymentsApi.d.ts +24 -34
  60. package/dist/payments/paymentsApi.js +24 -38
  61. package/dist/payments/paymentsInterfaces.d.ts +82 -76
  62. package/dist/product-statuses/productStatusesApi.d.ts +13 -13
  63. package/dist/product-statuses/productStatusesApi.js +13 -13
  64. package/dist/product-statuses/productStatusesInterfaces.d.ts +29 -27
  65. package/dist/products/productsApi.d.ts +246 -267
  66. package/dist/products/productsApi.js +247 -267
  67. package/dist/products/productsInterfaces.d.ts +333 -339
  68. package/dist/system/systemApi.d.ts +19 -21
  69. package/dist/system/systemApi.js +20 -21
  70. package/dist/system/systemInterfaces.d.ts +14 -3
  71. package/dist/templates/templatesApi.d.ts +13 -16
  72. package/dist/templates/templatesApi.js +13 -16
  73. package/dist/templates/templatesInterfaces.d.ts +30 -29
  74. package/dist/templates-preview/templatesPreviewApi.d.ts +10 -11
  75. package/dist/templates-preview/templatesPreviewApi.js +10 -11
  76. package/dist/templates-preview/templatesPreviewInterfaces.d.ts +61 -64
  77. package/dist/users/usersApi.d.ts +36 -43
  78. package/dist/users/usersApi.js +36 -43
  79. package/dist/users/usersInterfaces.d.ts +92 -96
  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
@@ -1,182 +1,190 @@
1
1
  import type { IError, ILocalizeInfo } from '../base/utils';
2
2
  /**
3
3
  * @interface IAuthProvider
4
- *
5
- * @property {function} signUp - User registration.
6
- * @property {function} generateCode - Getting a user activation code.
7
- * @property {function} checkCode - User activation code verification.
8
- * @property {function} activateUser - User activate.
9
- * @property {function} auth - User authorization.
10
- * @property {function} refresh - Refresh token.
11
- * @property {function} logout - User logout.
12
- * @property {function} logoutAll - User logout.
13
- * @property {function} changePassword - Change password.
14
- * @property {function} getAuthProviders - Get all auth providers objects.
15
- * @property {function} getAuthProviderByMarker - Get one auth provider object by marker.
16
- * @property {function} getActiveSessionsByMarker - Get one auth provider object by marker.
17
- * @property {function} oauthSignUp - User registration (authorization) via OAUTH.
18
- *
4
+ * @property {Function} signUp - User registration.
5
+ * @property {Function} generateCode - Getting a user activation code.
6
+ * @property {Function} checkCode - User activation code verification.
7
+ * @property {Function} activateUser - User activate.
8
+ * @property {Function} auth - User authorization.
9
+ * @property {Function} refresh - Refresh token.
10
+ * @property {Function} logout - User logout.
11
+ * @property {Function} logoutAll - User logout.
12
+ * @property {Function} changePassword - Change password.
13
+ * @property {Function} getAuthProviders - Get all auth providers objects.
14
+ * @property {Function} getAuthProviderByMarker - Get one auth provider object by marker.
15
+ * @property {Function} getActiveSessionsByMarker - Get one auth provider object by marker.
16
+ * @property {Function} oauthSignUp - User registration (authorization) via OAUTH.
19
17
  * @description This interface defines methods for user authentication and registration through various auth providers.
20
18
  */
21
19
  interface IAuthProvider {
22
20
  /**
23
21
  * Registers a new user.
24
- *
25
- * @param {string} marker - The marker identifying the auth provider. Example: "email".
26
- * @param {ISignUpData} data - The data required for user registration. Example:
27
- {
28
- "formIdentifier": "reg",
29
- "authData": [
30
- {
31
- "marker": "login",
32
- "value": "example@oneentry.cloud"
33
- },
34
- {
35
- "marker": "password",
36
- "value": "12345"
37
- }
38
- ],
39
- "formData": [
40
- {
41
- "marker": "last_name",
42
- "type": "string",
43
- "value": "Name"
44
- }
45
- ],
46
- "notificationData": {
47
- "email": "example@oneentry.cloud",
48
- "phonePush": ["+99999999999"],
49
- "phoneSMS": "+99999999999"
50
- }
51
- }
52
- * @param {string} [langCode] - Optional language code for localization. Default: "en_US".
53
- * @return {ISignUpEntity} A promise that resolves to a sign-up entity or an error.
22
+ * @handleName signUp
23
+ * @param {string} marker - The marker identifying the auth provider. Example: "email".
24
+ * @param {ISignUpData} data - The data required for user registration. Example:
25
+ {
26
+ "formIdentifier": "reg",
27
+ "authData": [
28
+ {
29
+ "marker": "login",
30
+ "value": "example@oneentry.cloud"
31
+ },
32
+ {
33
+ "marker": "password",
34
+ "value": "12345"
35
+ }
36
+ ],
37
+ "formData": [
38
+ {
39
+ "marker": "last_name",
40
+ "type": "string",
41
+ "value": "Name"
42
+ }
43
+ ],
44
+ "notificationData": {
45
+ "email": "example@oneentry.cloud",
46
+ "phonePush": ["+99999999999"],
47
+ "phoneSMS": "+99999999999"
48
+ }
49
+ }
50
+ * @param {string} [langCode] - Optional language code for localization. Default: "en_US".
51
+ * @returns {ISignUpEntity} A promise that resolves to a sign-up entity or an error.
54
52
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
53
+ * @description This method registers a new user.
55
54
  */
56
55
  signUp(marker: string, data: ISignUpData, langCode?: string): Promise<ISignUpEntity | IError>;
57
56
  /**
58
57
  * Generates an activation code for a user.
59
- *
60
- * @param {string} marker - The marker identifying the auth provider. Example: "email".
61
- * @param {string} userIdentifier - The user's identifier. Example: "example@oneentry.cloud".
62
- * @param {string} eventIdentifier - The event identifier related to the code generation. Example: "user_registration".
63
- * @return {void} A promise that resolves to void or an error.
58
+ * @handleName generateCode
59
+ * @param {string} marker - The marker identifying the auth provider. Example: "email".
60
+ * @param {string} userIdentifier - The user's identifier. Example: "example@oneentry.cloud".
61
+ * @param {string} eventIdentifier - The event identifier related to the code generation. Example: "user_registration".
62
+ * @returns {void} A promise that resolves to void or an error.
64
63
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
64
+ * @description This method generates an activation code for a user.
65
65
  */
66
66
  generateCode(marker: string, userIdentifier: string, eventIdentifier: string): Promise<void | IError>;
67
67
  /**
68
68
  * Verifies a user activation code.
69
- *
70
- * @param {string} marker - The marker identifying the auth provider. Example: "email".
71
- * @param {string} userIdentifier - The user's identifier. Example: "example@oneentry.cloud".
72
- * @param {string} eventIdentifier - The event identifier related to the code verification. Example: "user_registration".
73
- * @param {string} code - The activation code to verify. Example: "123456".
74
- * @return {boolean} A promise that resolves to a boolean indicating success or failure, or an error.
69
+ * @handleName checkCode
70
+ * @param {string} marker - The marker identifying the auth provider. Example: "email".
71
+ * @param {string} userIdentifier - The user's identifier. Example: "example@oneentry.cloud".
72
+ * @param {string} eventIdentifier - The event identifier related to the code verification. Example: "user_registration".
73
+ * @param {string} code - The activation code to verify. Example: "123456".
74
+ * @returns {boolean} A promise that resolves to a boolean indicating success or failure, or an error.
75
75
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
76
+ * @description This method verifies a user activation code.
76
77
  */
77
78
  checkCode(marker: string, userIdentifier: string, eventIdentifier: string, code: string): Promise<boolean | IError>;
78
79
  /**
79
80
  * Activates a user account.
80
- *
81
- * @param {string} marker - The marker identifying the auth provider. Example: "email".
82
- * @param {string} userIdentifier - The user's identifier. Example: "example@oneentry.cloud".
83
- * @param {string} code - The activation code. Example: "123456".
84
- *
85
- * @return {boolean} A promise that resolves to a boolean indicating success or failure, or an error.
81
+ * @handleName activateUser
82
+ * @param {string} marker - The marker identifying the auth provider. Example: "email".
83
+ * @param {string} userIdentifier - The user's identifier. Example: "example@oneentry.cloud".
84
+ * @param {string} code - The activation code. Example: "123456".
85
+ * @returns {boolean} A promise that resolves to a boolean indicating success or failure, or an error.
86
86
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
87
+ * @description This method activates a user account.
87
88
  */
88
89
  activateUser(marker: string, userIdentifier: string, code: string): Promise<boolean | IError>;
89
90
  /**
90
91
  * Authorizes a user.
91
- *
92
- * @param {string} marker - The marker identifying the auth provider. Example: "email".
93
- * @param {IAuthPostBody} data - The data required for user authorization. Example: .
94
- * @return {IAuthEntity} A promise that resolves to an auth entity or an error.
92
+ * @handleName auth
93
+ * @param {string} marker - The marker identifying the auth provider. Example: "email".
94
+ * @param {IAuthPostBody} data - The data required for user authorization. Example: .
95
+ * @returns {IAuthEntity} A promise that resolves to an auth entity or an error.
95
96
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
97
+ * @description This method authorizes a user.
96
98
  */
97
99
  auth(marker: string, data: IAuthPostBody): Promise<IAuthEntity | IError>;
98
100
  /**
99
101
  * Refreshes a user's access token.
100
- *
101
- * @param {string} marker - The marker identifying the auth provider. Example: "email".
102
- * @param {string} token - The refresh token. Example: "abcdef123456".
103
- * @return {IAuthEntity} A promise that resolves to an auth entity or an error.
102
+ * @handleName refresh
103
+ * @param {string} marker - The marker identifying the auth provider. Example: "email".
104
+ * @param {string} token - The refresh token. Example: "abcdef123456".
105
+ * @returns {IAuthEntity} A promise that resolves to an auth entity or an error.
104
106
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
107
+ * @description This method refreshes a user's access token.
105
108
  */
106
109
  refresh(marker: string, token: string): Promise<IAuthEntity | IError>;
107
110
  /**
108
111
  * Logs out a user.
109
- *
110
- * @param {string} marker - The marker identifying the auth provider. Example: "email".
111
- * @param {string} token - The access token. Example: "abcdef123456".
112
- * @return {boolean} A promise that resolves to a boolean indicating success or failure, or an error.
112
+ * @handleName logout
113
+ * @param {string} marker - The marker identifying the auth provider. Example: "email".
114
+ * @param {string} token - The access token. Example: "abcdef123456".
115
+ * @returns {boolean} A promise that resolves to a boolean indicating success or failure, or an error.
113
116
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
117
+ * @description This method logs out a user.
114
118
  */
115
119
  logout(marker: string, token: string): Promise<boolean | IError>;
116
120
  /**
117
121
  * Logout of user account on all devices.
118
- *
119
- * @param {string} marker - The marker identifying the auth provider. Example: "email".
120
- * @return {boolean} A promise that resolves to a boolean indicating success or failure, or an error.
122
+ * @handleName logoutAll
123
+ * @param {string} marker - The marker identifying the auth provider. Example: "email".
124
+ * @returns {boolean} A promise that resolves to a boolean indicating success or failure, or an error.
121
125
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
126
+ * @description This method logs out a user account on all devices.
122
127
  */
123
128
  logoutAll(marker: string): Promise<boolean | IError>;
124
129
  /**
125
130
  * Changes a user's password.
126
- *
127
- * @param {string} marker - The marker identifying the auth provider. Example: "email".
128
- * @param {string} userIdentifier - The user's identifier. Example: "example@oneentry.cloud".
129
- * @param {number} type - The type of password change. 1 for changing password, 2 for recovery. Example: 1.
130
- * @param {string} code - The code for password change verification. Example: "123456".
131
- * @param {string} newPassword - The new password. Example: "newPassword123".
132
- * @param {string} [repeatPassword] - Optional repeat of the new password for confirmation. Example: "newPassword123".
133
- * @return {boolean} A promise that resolves to a boolean indicating success or failure, or an error.
131
+ * @handleName changePassword
132
+ * @param {string} marker - The marker identifying the auth provider. Example: "email".
133
+ * @param {string} userIdentifier - The user's identifier. Example: "example@oneentry.cloud".
134
+ * @param {string} eventIdentifier - The event identifier. Example: "reg".
135
+ * @param {number} type - The type of password change. 1 for changing password, 2 for recovery. Example: 1.
136
+ * @param {string} code - The code for password change verification. Example: "123456".
137
+ * @param {string} newPassword - The new password. Example: "newPassword123".
138
+ * @param {string} [repeatPassword] - Optional repeat of the new password for confirmation. Example: "newPassword123".
139
+ * @returns {boolean} A promise that resolves to a boolean indicating success or failure, or an error.
134
140
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
141
+ * @description This method changes a user's password.
135
142
  */
136
143
  changePassword(marker: string, userIdentifier: string, eventIdentifier: string, type: number, code: string, newPassword: string, repeatPassword?: string): Promise<boolean | IError>;
137
144
  /**
138
145
  * Retrieves all authentication providers.
139
- *
140
- * @param {string} [langCode] - Optional language code for localization. Default: "en_US".
141
- * @param {number} [offset] - Optional offset for pagination. Default: 0.
142
- * @param {number} [limit] - Optional limit for pagination. Default: 30.
143
- * @return {IAuthProvidersEntity[]} A promise that resolves to an array of auth provider entities or an error.
146
+ * @handleName getAuthProviders
147
+ * @param {string} [langCode] - Optional language code for localization. Default: "en_US".
148
+ * @param {number} [offset] - Optional offset for pagination. Default: 0.
149
+ * @param {number} [limit] - Optional limit for pagination. Default: 30.
150
+ * @returns {IAuthProvidersEntity[]} A promise that resolves to an array of auth provider entities or an error.
144
151
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
152
+ * @description This method retrieves all authentication providers.
145
153
  */
146
154
  getAuthProviders(langCode?: string, offset?: number, limit?: number): Promise<IAuthProvidersEntity[] | IError>;
147
155
  /**
148
156
  * Retrieves a specific auth provider by its marker.
149
- *
150
- * @param {string} marker - The marker identifying the auth provider. Example: "email".
151
- * @param {string} [langCode] - Optional language code for localization. Default: "en_US".
152
- * @return {IAuthProvidersEntity} A promise that resolves to an auth provider entity or an error.
157
+ * @handleName getAuthProviderByMarker
158
+ * @param {string} marker - The marker identifying the auth provider. Example: "email".
159
+ * @param {string} [langCode] - Optional language code for localization. Default: "en_US".
160
+ * @returns {IAuthProvidersEntity} A promise that resolves to an auth provider entity or an error.
153
161
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
162
+ * @description This method retrieves a specific auth provider by its marker.
154
163
  */
155
164
  getAuthProviderByMarker(marker: string, langCode?: string): Promise<IAuthProvidersEntity | IError>;
156
165
  /**
157
166
  * Retrieves active user sessions data object.
158
- *
159
- * @param {string} marker - The marker identifying the auth provider. Example: "email".
160
- * @return {any} A promise that resolves to active user sessions data object.
167
+ * @handleName getActiveSessionsByMarker
168
+ * @param {string} marker - The marker identifying the auth provider. Example: "email".
169
+ * @returns {any} A promise that resolves to active user sessions data object.
161
170
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
171
+ * @description This method retrieves active user sessions data object.
162
172
  */
163
173
  getActiveSessionsByMarker(marker: string): Promise<any | IError>;
164
174
  /**
165
175
  * User registration (authorization) via OAUTH.
166
- *
167
176
  * @handleName oauthSignUp
168
- *
169
- * @param {string} marker - The text identifier of the authorization provider. Example: "email".
170
- * @param {IOAuthSignUpData} body - Object contains OAuth information for registration. Example:
171
- {
172
- "client_id": "34346983-luuct343473qdkqidjopdfp3eb3k4thp.apps.googleusercontent.com",
173
- "client_secret": "43434343434",
174
- "code": "4/0AVMBsJgwewewewewewei4D7T6E_fbswxnL3g",
175
- "grant_type": "authorization_code",
176
- "redirect_uri": "http://localhost:3000"
177
- }
178
- * @param {string} [langCode] - Language code. Default: "en_US".
179
- * @return {ISignUpEntity} Returns a user object.
177
+ * @param {string} marker - The text identifier of the authorization provider. Example: "email".
178
+ * @param {IOAuthSignUpData} body - Object contains OAuth information for registration. Example:
179
+ {
180
+ "client_id": "34346983-luuct343473qdkqidjopdfp3eb3k4thp.apps.googleusercontent.com",
181
+ "client_secret": "43434343434",
182
+ "code": "4/0AVMBsJgwewewewewewei4D7T6E_fbswxnL3g",
183
+ "grant_type": "authorization_code",
184
+ "redirect_uri": "http://localhost:3000"
185
+ }
186
+ * @param {string} [langCode] - Language code. Default: "en_US".
187
+ * @returns {ISignUpEntity} Returns a user object.
180
188
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
181
189
  * @description User registration (authorization) via OAUTH.
182
190
  */
@@ -184,12 +192,10 @@ interface IAuthProvider {
184
192
  }
185
193
  /**
186
194
  * Interface representing the structure of authentication form data.
187
- *
188
195
  * @interface IAuthFormData
189
- *
190
196
  * @property {string} marker - A unique identifier for the form field. Example: "email".
191
- * @property {string} type - The type of the form field, such as 'string', 'email', etc. Example: "string".
192
- * @property {string} value - The value entered in the form field. Example: "example@oneentry.cloud".
197
+ * @property {string} type - The type of the form field, such as 'string', 'email', etc. Example: "string".
198
+ * @property {string} value - The value entered in the form field. Example: "example@oneentry.cloud".
193
199
  * @description This interface defines the structure of authentication form data used in user registration and authentication processes.
194
200
  */
195
201
  interface IAuthFormData {
@@ -199,61 +205,59 @@ interface IAuthFormData {
199
205
  }
200
206
  /**
201
207
  * Interface representing the data required for user registration.
202
- *
203
208
  * @interface ISignUpData
204
- *
205
- * @property {string} marker - The text identifier of the authorization provider. Example: "email".
206
- * @property {ISignUpData} body - Request body. Example:
207
- {
208
- "formIdentifier": "reg",
209
- "authData": [
210
- {
211
- "marker": "login",
212
- "value": "example@oneentry.cloud"
213
- },
214
- {
215
- "marker": "password",
216
- "value": "12345"
217
- }
218
- ],
219
- "formData": [
220
- {
221
- "marker": "last_name",
222
- "type": "string",
223
- "value": "Name"
224
- }
225
- ],
226
- "notificationData": {
227
- "email": "example@oneentry.cloud",
228
- "phonePush": ["+99999999999"],
229
- "phoneSMS": "+99999999999"
230
- }
231
- }
232
- * @property {string} body.formIdentifier - The identifier for the registration form. Example: "reg".
233
- * @property {{ marker: string; value: string }[]} body.authData - An array of authentication data objects, each containing a marker and its corresponding value. Example:
234
- [
235
- {
236
- "marker": "login",
237
- "value": "example@oneentry.cloud"
238
- },
239
- {
240
- "marker": "password",
241
- "value": "12345"
242
- }
243
- ]
244
- * @property {IAuthFormData | IAuthFormData[]} body.formData - The form data for the registration, which can be a single object or an array of objects. Example:
245
- {
246
- "marker": "last_name",
247
- "type": "string",
248
- "value": "Name"
249
- }
250
- * @property {Object} body.notificationData - An object containing notification data, including email, phonePush, and phoneSMS. Example:
251
- {
252
- "email": "example@oneentry.cloud",
253
- "phonePush": ["+99999999999"],
254
- "phoneSMS": "+99999999999"
255
- }
256
- * @property {string} [langCode] - Language code. Default: "en_US".
209
+ * @property {string} marker - The text identifier of the authorization provider. Example: "email".
210
+ * @property {ISignUpData} body - Request body. Example:
211
+ {
212
+ "formIdentifier": "reg",
213
+ "authData": [
214
+ {
215
+ "marker": "login",
216
+ "value": "example@oneentry.cloud"
217
+ },
218
+ {
219
+ "marker": "password",
220
+ "value": "12345"
221
+ }
222
+ ],
223
+ "formData": [
224
+ {
225
+ "marker": "last_name",
226
+ "type": "string",
227
+ "value": "Name"
228
+ }
229
+ ],
230
+ "notificationData": {
231
+ "email": "example@oneentry.cloud",
232
+ "phonePush": ["+99999999999"],
233
+ "phoneSMS": "+99999999999"
234
+ }
235
+ }
236
+ * @property {string} body.formIdentifier - The identifier for the registration form. Example: "reg".
237
+ * @property {{ marker: string; value: string }[]} body.authData - An array of authentication data objects, each containing a marker and its corresponding value. Example:
238
+ [
239
+ {
240
+ "marker": "login",
241
+ "value": "example@oneentry.cloud"
242
+ },
243
+ {
244
+ "marker": "password",
245
+ "value": "12345"
246
+ }
247
+ ]
248
+ * @property {IAuthFormData | IAuthFormData[]} body.formData - The form data for the registration, which can be a single object or an array of objects. Example:
249
+ {
250
+ "marker": "last_name",
251
+ "type": "string",
252
+ "value": "Name"
253
+ }
254
+ * @property {object} body.notificationData - An object containing notification data, including email, phonePush, and phoneSMS. Example:
255
+ {
256
+ "email": "example@oneentry.cloud",
257
+ "phonePush": ["+99999999999"],
258
+ "phoneSMS": "+99999999999"
259
+ }
260
+ * @property {string} [langCode] - Language code. Default: "en_US".
257
261
  * @description User registration (❗️For a provider with user activation, the activation code is sent through the corresponding user notification method).
258
262
  */
259
263
  interface ISignUpData {
@@ -272,15 +276,12 @@ interface ISignUpData {
272
276
  }
273
277
  /**
274
278
  * Interface representing the data required for user registration via OAUTH.
275
- *
276
279
  * @interface IOAuthSignUpData
277
- *
278
- * @property {string} client_id - The client ID for the OAuth application. Example: "34346983-luuct343473qdkqidjopdfp3eb3k4thp.apps.googleusercontent.com".
280
+ * @property {string} client_id - The client ID for the OAuth application. Example: "34346983-luuct343473qdkqidjopdfp3eb3k4thp.apps.googleusercontent.com".
279
281
  * @property {string} client_secret - The client secret for the OAuth application. Example: "43434343434".
280
- * @property {string} code - The authorization code received from the OAuth provider. Example: "4/0AVMBsJgwewewewewewei4D7T6E_fbswxnL3g".
281
- * @property {string} grant_type - The grant type for the OAuth request. Example: "authorization_code".
282
- * @property {string} redirect_uri - The redirect URI for the OAuth application. Example: "http://localhost:3000".
283
- *
282
+ * @property {string} code - The authorization code received from the OAuth provider. Example: "4/0AVMBsJgwewewewewewei4D7T6E_fbswxnL3g".
283
+ * @property {string} grant_type - The grant type for the OAuth request. Example: "authorization_code".
284
+ * @property {string} redirect_uri - The redirect URI for the OAuth application. Example: "http://localhost:3000".
284
285
  * @description User registration (❗️For a provider with user activation, the activation code is sent through the corresponding user notification method).
285
286
  */
286
287
  interface IOAuthSignUpData {
@@ -292,32 +293,30 @@ interface IOAuthSignUpData {
292
293
  }
293
294
  /**
294
295
  * Interface representing a sign-up entity.
295
- *
296
296
  * @interface ISignUpEntity
297
- *
298
- * @property {number} id - The unique identifier of the sign-up entity. Example: 12345.
299
- * @property {string} updatedDate - The date when the sign-up entity was last updated. Example: "2023-10-01T12:00:00Z".
300
- * @property {number} version - The version number of the sign-up entity. Example: 1.
301
- * @property {string} identifier - A unique string that identifies the sign-up entity. Example: "signup_12345".
302
- * @property {boolean} isActive - Indicates whether the sign-up entity is active. Example: true.
303
- * @property {{ marker: string; value: string }[]} formData - An array of objects representing the form data, each containing a marker and its corresponding value. Example:
304
- [
305
- {
306
- "marker": "first_name",
307
- "value": "John"
308
- },
309
- {
310
- "marker": "last_name",
311
- "value": "Doe"
312
- }
313
- ]
314
- * @property {Object} notificationData - An object containing notification data, including email, phonePush, and phoneSMS. Example:
315
- {
316
- "email": "example@oneentry.cloud",
317
- "phonePush": ["+99999999999"],
318
- "phoneSMS": "+99999999999"
319
- }
320
- * @property {string} [locale] - The locale or language code associated with the sign-up entity. Example: "en_US".
297
+ * @property {number} id - The unique identifier of the sign-up entity. Example: 12345.
298
+ * @property {string} updatedDate - The date when the sign-up entity was last updated. Example: "2023-10-01T12:00:00Z".
299
+ * @property {number} version - The version number of the sign-up entity. Example: 1.
300
+ * @property {string} identifier - A unique string that identifies the sign-up entity. Example: "signup_12345".
301
+ * @property {boolean} isActive - Indicates whether the sign-up entity is active. Example: true.
302
+ * @property {{ marker: string; value: string }[]} formData - An array of objects representing the form data, each containing a marker and its corresponding value. Example:
303
+ [
304
+ {
305
+ "marker": "first_name",
306
+ "value": "John"
307
+ },
308
+ {
309
+ "marker": "last_name",
310
+ "value": "Doe"
311
+ }
312
+ ]
313
+ * @property {object} notificationData - An object containing notification data, including email, phonePush, and phoneSMS. Example:
314
+ {
315
+ "email": "example@oneentry.cloud",
316
+ "phonePush": ["+99999999999"],
317
+ "phoneSMS": "+99999999999"
318
+ }
319
+ * @property {string} [locale] - The locale or language code associated with the sign-up entity. Example: "en_US".
321
320
  * @description This interface defines the structure of a sign-up entity.
322
321
  */
323
322
  interface ISignUpEntity {
@@ -339,10 +338,8 @@ interface ISignUpEntity {
339
338
  }
340
339
  /**
341
340
  * Interface representing a code entity used for user registration or verification processes.
342
- *
343
341
  * @interface ICodeEntity
344
- *
345
- * @property {string} code - The activation code for user registration or verification. Example: "123456".
342
+ * @property {string} code - The activation code for user registration or verification. Example: "123456".
346
343
  * @property {string} expiredDate - The date when the activation code expires. Example: "2023-10-01T12:00:00Z".
347
344
  * @description This interface defines the structure of a code entity used for user registration or verification processes.
348
345
  */
@@ -352,13 +349,11 @@ interface ICodeEntity {
352
349
  }
353
350
  /**
354
351
  * Interface representing an authentication entity.
355
- *
356
352
  * @interface IAuthEntity
357
- *
358
- * @property {string} userIdentifier - The unique identifier for the user. Example: "user12345".
353
+ * @property {string} userIdentifier - The unique identifier for the user. Example: "user12345".
359
354
  * @property {string} authProviderIdentifier - The identifier for the authentication provider. Example: "email".
360
- * @property {string} accessToken - The access token for the user session. Example: "abcdef123456".
361
- * @property {string} refreshToken - The refresh token for renewing the access token. Example: "ghijkl789012".
355
+ * @property {string} accessToken - The access token for the user session. Example: "abcdef123456".
356
+ * @property {string} refreshToken - The refresh token for renewing the access token. Example: "ghijkl789012".
362
357
  * @description This interface defines the structure of an authentication entity.
363
358
  */
364
359
  interface IAuthEntity {
@@ -369,19 +364,17 @@ interface IAuthEntity {
369
364
  }
370
365
  /**
371
366
  * Interface representing an authentication provider entity.
372
- *
373
367
  * @interface IAuthProvidersEntity
374
- *
375
- * @property {number} id - The unique identifier of the auth provider entity. Example: 194.
376
- * @property {ILocalizeInfo} localizeInfos - Localized information for the auth provider. Example: {"key": "value"}.
377
- * @property {IAuthProvidersEntityConfig} config - Configuration settings for the auth provider, stored as a key-value pair object. Example: { "key": "value" }
378
- * @property {number} version - The version number of the auth provider entity. Example: 1.
379
- * @property {string} identifier - A unique string that identifies the auth provider. Example: "email".
380
- * @property {string} type - The type of the auth provider (e.g., 'email', 'google', etc.). Example: "email".
381
- * @property {string | null} formIdentifier - The identifier for the form associated with the auth provider, or null if not applicable. Example: "reg_form".
382
- * @property {string} userGroupIdentifier - The identifier for the userGroup associated with the auth provider. Example: "guest".
383
- * @property {boolean} isActive - Indicates whether the auth provider is active. Example: true.
384
- * @property {boolean} isCheckCode - Indicates whether the auth provider requires code verification. Example: false.
368
+ * @property {number} id - The unique identifier of the auth provider entity. Example: 194.
369
+ * @property {ILocalizeInfo} localizeInfos - Localized information for the auth provider. Example: {"key": "value"}.
370
+ * @property {IAuthProvidersEntityConfig} config - Configuration settings for the auth provider, stored as a key-value pair object. Example: { "key": "value" }
371
+ * @property {number} version - The version number of the auth provider entity. Example: 1.
372
+ * @property {string} identifier - A unique string that identifies the auth provider. Example: "email".
373
+ * @property {string} type - The type of the auth provider (e.g., 'email', 'google', etc.). Example: "email".
374
+ * @property {string | null} formIdentifier - The identifier for the form associated with the auth provider, or null if not applicable. Example: "reg_form".
375
+ * @property {string} userGroupIdentifier - The identifier for the userGroup associated with the auth provider. Example: "guest".
376
+ * @property {boolean} isActive - Indicates whether the auth provider is active. Example: true.
377
+ * @property {boolean} isCheckCode - Indicates whether the auth provider requires code verification. Example: false.
385
378
  * @description This interface defines the structure of an authentication provider entity.
386
379
  */
387
380
  interface IAuthProvidersEntity {
@@ -398,15 +391,13 @@ interface IAuthProvidersEntity {
398
391
  }
399
392
  /**
400
393
  * Interface representing an authentication provider config.
401
- *
402
394
  * @interface IAuthProvidersEntityConfig
403
- *
404
- * @property {string} accessTokenTtlSec
405
- * @property {string} refreshTokenTtlMc
406
- * @property {string} tokenSecretKey
407
- * @property {string} deleteNoneActiveUsersAfterDays
408
- * @property {string} systemCodeTlsSec
409
- * @property {string} systemCodeLength
395
+ * @property {string} accessTokenTtlSec - Access token time to live in seconds.
396
+ * @property {string} refreshTokenTtlMc - Refresh token time to live in milliseconds.
397
+ * @property {string} tokenSecretKey - Token secret key.
398
+ * @property {string} deleteNoneActiveUsersAfterDays - Delete none active users after days.
399
+ * @property {string} systemCodeTlsSec - System code time to live in seconds.
400
+ * @property {string} systemCodeLength - System code length.
410
401
  */
411
402
  interface IAuthProvidersEntityConfig {
412
403
  accessTokenTtlSec: string;
@@ -418,16 +409,14 @@ interface IAuthProvidersEntityConfig {
418
409
  }
419
410
  /**
420
411
  * Interface representing the body used in authentication requests.
421
- *
422
412
  * @interface IAuthPostBody
423
- *
424
413
  * @property {{ marker: string; value: string | number }[]} authData - An array of authentication data objects, each containing a marker and its corresponding value. Example:
425
- [
426
- {
427
- "marker": "login",
428
- "value": "user@example.com"
429
- }
430
- ]
414
+ [
415
+ {
416
+ "marker": "login",
417
+ "value": "user@example.com"
418
+ }
419
+ ]
431
420
  * @description This interface defines the structure of the body used in authentication requests, containing an array of authentication data.
432
421
  */
433
422
  interface IAuthPostBody {
@@ -436,4 +425,19 @@ interface IAuthPostBody {
436
425
  value: string | number;
437
426
  }>;
438
427
  }
439
- export type { IAuthEntity, IAuthFormData, IAuthPostBody, IAuthProvider, IAuthProvidersEntity, ICodeEntity, IOAuthSignUpData, ISignUpData, ISignUpEntity, };
428
+ /**
429
+ * Interface representing the active session data.
430
+ * @interface IActiveSession
431
+ * @property {string} os - The operating system of the active session. Example: "Win32".
432
+ * @property {string} browser - The browser used in the active session. Example: "Node.js/22".
433
+ * @property {string} location - The location of the active session. Example: "ru-RU".
434
+ * @description This interface defines the structure of the body used in authentication requests, containing an array of authentication data.
435
+ */
436
+ interface IActiveSession {
437
+ deviceInfo: {
438
+ os: string;
439
+ browser: string;
440
+ location: string;
441
+ };
442
+ }
443
+ export type { IActiveSession, IAuthEntity, IAuthFormData, IAuthPostBody, IAuthProvider, IAuthProvidersEntity, ICodeEntity, IOAuthSignUpData, ISignUpData, ISignUpEntity, };