oneentry 1.0.173 → 1.0.174
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/changelog.md +23 -0
- package/dist/admins/adminsApi.d.ts +7 -7
- package/dist/admins/adminsApi.js +7 -7
- package/dist/admins/adminsInterfaces.d.ts +22 -22
- package/dist/attribute-sets/attributeSetsApi.d.ts +8 -8
- package/dist/attribute-sets/attributeSetsApi.js +8 -8
- package/dist/attribute-sets/attributeSetsInterfaces.d.ts +31 -31
- package/dist/auth-provider/authProviderApi.d.ts +29 -29
- package/dist/auth-provider/authProviderApi.js +29 -29
- package/dist/auth-provider/authProvidersInterfaces.d.ts +52 -52
- package/dist/base/asyncModules.d.ts +6 -6
- package/dist/base/asyncModules.js +6 -6
- package/dist/base/syncModules.d.ts +1 -1
- package/dist/base/syncModules.js +1 -1
- package/dist/base/utils.d.ts +3 -3
- package/dist/blocks/blocksApi.d.ts +35 -35
- package/dist/blocks/blocksApi.js +35 -35
- package/dist/blocks/blocksInterfaces.d.ts +55 -55
- package/dist/discounts/discountsApi.d.ts +14 -14
- package/dist/discounts/discountsApi.js +14 -14
- package/dist/discounts/discountsInterfaces.d.ts +52 -52
- package/dist/events/eventsApi.d.ts +13 -13
- package/dist/events/eventsApi.js +13 -13
- package/dist/events/eventsInterfaces.d.ts +18 -18
- package/dist/file-uploading/fileUploadingApi.d.ts +14 -14
- package/dist/file-uploading/fileUploadingApi.js +14 -14
- package/dist/file-uploading/fileUploadingInterfaces.d.ts +25 -25
- package/dist/filters/filtersApi.d.ts +1 -1
- package/dist/filters/filtersApi.js +1 -1
- package/dist/filters/filtersInterfaces.d.ts +7 -7
- package/dist/forms/formsApi.d.ts +3 -3
- package/dist/forms/formsApi.js +3 -3
- package/dist/forms/formsInterfaces.d.ts +42 -42
- package/dist/forms-data/formsDataApi.d.ts +14 -14
- package/dist/forms-data/formsDataApi.js +14 -14
- package/dist/forms-data/formsDataInterfaces.d.ts +67 -68
- package/dist/general-types/generalTypesInterfaces.d.ts +2 -2
- package/dist/integration-collections/integrationCollectionsApi.d.ts +20 -20
- package/dist/integration-collections/integrationCollectionsApi.js +20 -20
- package/dist/integration-collections/integrationCollectionsInterfaces.d.ts +44 -44
- package/dist/locales/localesInterfaces.d.ts +8 -8
- package/dist/menus/menusApi.d.ts +1 -1
- package/dist/menus/menusApi.js +1 -1
- package/dist/menus/menusInterfaces.d.ts +12 -12
- package/dist/orders/ordersApi.d.ts +26 -26
- package/dist/orders/ordersApi.js +26 -26
- package/dist/orders/ordersInterfaces.d.ts +99 -99
- package/dist/pages/pagesApi.d.ts +6 -6
- package/dist/pages/pagesApi.js +6 -6
- package/dist/pages/pagesInterfaces.d.ts +46 -46
- package/dist/payments/paymentsApi.d.ts +8 -8
- package/dist/payments/paymentsApi.js +8 -8
- package/dist/payments/paymentsInterfaces.d.ts +31 -31
- package/dist/product-statuses/productStatusesApi.d.ts +2 -2
- package/dist/product-statuses/productStatusesApi.js +2 -2
- package/dist/product-statuses/productStatusesInterfaces.d.ts +8 -8
- package/dist/products/productsApi.d.ts +37 -37
- package/dist/products/productsApi.js +36 -36
- package/dist/products/productsInterfaces.d.ts +96 -96
- package/dist/search/searchApi.d.ts +3 -3
- package/dist/search/searchApi.js +3 -3
- package/dist/search/searchInterfaces.d.ts +4 -4
- package/dist/sitemap/sitemapApi.d.ts +1 -1
- package/dist/sitemap/sitemapApi.js +1 -1
- package/dist/sitemap/sitemapInterfaces.d.ts +2 -2
- package/dist/subscriptions/subscriptionsApi.d.ts +3 -3
- package/dist/subscriptions/subscriptionsApi.js +3 -3
- package/dist/subscriptions/subscriptionsInterfaces.d.ts +11 -11
- package/dist/templates/templatesApi.d.ts +2 -2
- package/dist/templates/templatesApi.js +2 -2
- package/dist/templates/templatesInterfaces.d.ts +10 -10
- package/dist/templates-preview/templatesPreviewApi.d.ts +1 -1
- package/dist/templates-preview/templatesPreviewApi.js +1 -1
- package/dist/templates-preview/templatesPreviewInterfaces.d.ts +17 -17
- package/dist/user-activity/userActivityApi.d.ts +1 -1
- package/dist/user-activity/userActivityApi.js +1 -1
- package/dist/user-activity/userActivityInterfaces.d.ts +4 -4
- package/dist/user-groups/userGroupsApi.d.ts +1 -1
- package/dist/user-groups/userGroupsApi.js +1 -1
- package/dist/user-groups/userGroupsInterfaces.d.ts +5 -5
- package/dist/users/usersApi.d.ts +7 -7
- package/dist/users/usersApi.js +7 -7
- package/dist/users/usersInterfaces.d.ts +34 -34
- package/esm/admins/adminsApi.d.ts +7 -7
- package/esm/admins/adminsApi.js +7 -7
- package/esm/admins/adminsInterfaces.d.ts +22 -22
- package/esm/attribute-sets/attributeSetsApi.d.ts +8 -8
- package/esm/attribute-sets/attributeSetsApi.js +8 -8
- package/esm/attribute-sets/attributeSetsInterfaces.d.ts +31 -31
- package/esm/auth-provider/authProviderApi.d.ts +29 -29
- package/esm/auth-provider/authProviderApi.js +29 -29
- package/esm/auth-provider/authProvidersInterfaces.d.ts +52 -52
- package/esm/base/asyncModules.d.ts +6 -6
- package/esm/base/asyncModules.js +6 -6
- package/esm/base/syncModules.d.ts +1 -1
- package/esm/base/syncModules.js +1 -1
- package/esm/base/utils.d.ts +3 -3
- package/esm/blocks/blocksApi.d.ts +35 -35
- package/esm/blocks/blocksApi.js +35 -35
- package/esm/blocks/blocksInterfaces.d.ts +55 -55
- package/esm/discounts/discountsApi.d.ts +14 -14
- package/esm/discounts/discountsApi.js +14 -14
- package/esm/discounts/discountsInterfaces.d.ts +52 -52
- package/esm/events/eventsApi.d.ts +13 -13
- package/esm/events/eventsApi.js +13 -13
- package/esm/events/eventsInterfaces.d.ts +18 -18
- package/esm/file-uploading/fileUploadingApi.d.ts +14 -14
- package/esm/file-uploading/fileUploadingApi.js +14 -14
- package/esm/file-uploading/fileUploadingInterfaces.d.ts +25 -25
- package/esm/filters/filtersApi.d.ts +1 -1
- package/esm/filters/filtersApi.js +1 -1
- package/esm/filters/filtersInterfaces.d.ts +7 -7
- package/esm/forms/formsApi.d.ts +3 -3
- package/esm/forms/formsApi.js +3 -3
- package/esm/forms/formsInterfaces.d.ts +42 -42
- package/esm/forms-data/formsDataApi.d.ts +14 -14
- package/esm/forms-data/formsDataApi.js +14 -14
- package/esm/forms-data/formsDataInterfaces.d.ts +67 -68
- package/esm/general-types/generalTypesInterfaces.d.ts +2 -2
- package/esm/integration-collections/integrationCollectionsApi.d.ts +20 -20
- package/esm/integration-collections/integrationCollectionsApi.js +20 -20
- package/esm/integration-collections/integrationCollectionsInterfaces.d.ts +44 -44
- package/esm/locales/localesInterfaces.d.ts +8 -8
- package/esm/menus/menusApi.d.ts +1 -1
- package/esm/menus/menusApi.js +1 -1
- package/esm/menus/menusInterfaces.d.ts +12 -12
- package/esm/orders/ordersApi.d.ts +26 -26
- package/esm/orders/ordersApi.js +26 -26
- package/esm/orders/ordersInterfaces.d.ts +99 -99
- package/esm/pages/pagesApi.d.ts +6 -6
- package/esm/pages/pagesApi.js +6 -6
- package/esm/pages/pagesInterfaces.d.ts +46 -46
- package/esm/payments/paymentsApi.d.ts +8 -8
- package/esm/payments/paymentsApi.js +8 -8
- package/esm/payments/paymentsInterfaces.d.ts +31 -31
- package/esm/product-statuses/productStatusesApi.d.ts +2 -2
- package/esm/product-statuses/productStatusesApi.js +2 -2
- package/esm/product-statuses/productStatusesInterfaces.d.ts +8 -8
- package/esm/products/productsApi.d.ts +37 -37
- package/esm/products/productsApi.js +36 -36
- package/esm/products/productsInterfaces.d.ts +96 -96
- package/esm/search/searchApi.d.ts +3 -3
- package/esm/search/searchApi.js +3 -3
- package/esm/search/searchInterfaces.d.ts +4 -4
- package/esm/sitemap/sitemapApi.d.ts +1 -1
- package/esm/sitemap/sitemapApi.js +1 -1
- package/esm/sitemap/sitemapInterfaces.d.ts +2 -2
- package/esm/subscriptions/subscriptionsApi.d.ts +3 -3
- package/esm/subscriptions/subscriptionsApi.js +3 -3
- package/esm/subscriptions/subscriptionsInterfaces.d.ts +11 -11
- package/esm/templates/templatesApi.d.ts +2 -2
- package/esm/templates/templatesApi.js +2 -2
- package/esm/templates/templatesInterfaces.d.ts +10 -10
- package/esm/templates-preview/templatesPreviewApi.d.ts +1 -1
- package/esm/templates-preview/templatesPreviewApi.js +1 -1
- package/esm/templates-preview/templatesPreviewInterfaces.d.ts +17 -17
- package/esm/user-activity/userActivityApi.d.ts +1 -1
- package/esm/user-activity/userActivityApi.js +1 -1
- package/esm/user-activity/userActivityInterfaces.d.ts +4 -4
- package/esm/user-groups/userGroupsApi.d.ts +1 -1
- package/esm/user-groups/userGroupsApi.js +1 -1
- package/esm/user-groups/userGroupsInterfaces.d.ts +5 -5
- package/esm/users/usersApi.d.ts +7 -7
- package/esm/users/usersApi.js +7 -7
- package/esm/users/usersInterfaces.d.ts +34 -34
- package/package.json +2 -2
|
@@ -59,7 +59,7 @@ class AuthProviderApi extends asyncModules_1.default {
|
|
|
59
59
|
/**
|
|
60
60
|
* User registration.
|
|
61
61
|
* @handleName signUp
|
|
62
|
-
* @param {string} marker -
|
|
62
|
+
* @param {string} marker - Marker of the auth provider. Example: "email".
|
|
63
63
|
* @param {ISignUpData} body - Request body.
|
|
64
64
|
* @example
|
|
65
65
|
{
|
|
@@ -87,7 +87,7 @@ class AuthProviderApi extends asyncModules_1.default {
|
|
|
87
87
|
"phoneSMS": "+99999999999"
|
|
88
88
|
}
|
|
89
89
|
}
|
|
90
|
-
* @param {string} body.formIdentifier -
|
|
90
|
+
* @param {string} body.formIdentifier - Marker of the registration form. Example: "reg".
|
|
91
91
|
* @param {{ marker: string; value: string }[]} body.authData - An array of authentication data objects, each containing a marker and its corresponding value.
|
|
92
92
|
* @example
|
|
93
93
|
[
|
|
@@ -107,7 +107,7 @@ class AuthProviderApi extends asyncModules_1.default {
|
|
|
107
107
|
"type": "string",
|
|
108
108
|
"value": "Name"
|
|
109
109
|
}
|
|
110
|
-
* @param {object} body.notificationData -
|
|
110
|
+
* @param {object} body.notificationData - Notification contacts: `email`, `phonePush` and `phoneSMS`.
|
|
111
111
|
* @example
|
|
112
112
|
{
|
|
113
113
|
"email": "example@oneentry.cloud",
|
|
@@ -134,9 +134,9 @@ class AuthProviderApi extends asyncModules_1.default {
|
|
|
134
134
|
/**
|
|
135
135
|
* Getting a user activation code. The code is returned via the appropriate user notification method.
|
|
136
136
|
* @handleName generateCode
|
|
137
|
-
* @param {string} marker -
|
|
138
|
-
* @param {string} userIdentifier -
|
|
139
|
-
* @param {string} eventIdentifier -
|
|
137
|
+
* @param {string} marker - Marker of the auth provider. Example: "email".
|
|
138
|
+
* @param {string} userIdentifier - Identifier (login) of the user, such as an email address. Example: "example@oneentry.cloud".
|
|
139
|
+
* @param {string} eventIdentifier - Marker of the event the code is generated for. Example: "user_registration".
|
|
140
140
|
* @returns {Promise<void | IError>} Returns void if the code is successfully generated, or an error object if there was an issue.
|
|
141
141
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
142
142
|
* @description Obtaining a code to activate the user.
|
|
@@ -153,10 +153,10 @@ class AuthProviderApi extends asyncModules_1.default {
|
|
|
153
153
|
/**
|
|
154
154
|
* User activation code verification. Returns true (if the code is correct) or false (if it is incorrect).
|
|
155
155
|
* @handleName checkCode
|
|
156
|
-
* @param {string} marker -
|
|
156
|
+
* @param {string} marker - Marker of the auth provider. Example: "email".
|
|
157
157
|
* @param {string} userIdentifier - The text identifier of the user's object (user login). Example: "example@oneentry.cloud".
|
|
158
|
-
* @param {string} eventIdentifier -
|
|
159
|
-
* @param {string} code -
|
|
158
|
+
* @param {string} eventIdentifier - Marker of the event the code is generated for. Example: "user_registration".
|
|
159
|
+
* @param {string} code - One-time code the user received. Example: "123456".
|
|
160
160
|
* @returns {Promise<boolean | IError>} Returns true if the code is correct, or an error object if there was an issue.
|
|
161
161
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
162
162
|
* @description Checking the user activation code
|
|
@@ -174,9 +174,9 @@ class AuthProviderApi extends asyncModules_1.default {
|
|
|
174
174
|
/**
|
|
175
175
|
* User activate.
|
|
176
176
|
* @handleName activateUser
|
|
177
|
-
* @param {string} marker -
|
|
178
|
-
* @param {string} userIdentifier -
|
|
179
|
-
* @param {string} code -
|
|
177
|
+
* @param {string} marker - Marker of the auth provider. Example: "email".
|
|
178
|
+
* @param {string} userIdentifier - Identifier (login) of the user, such as an email address. Example: "example@oneentry.cloud".
|
|
179
|
+
* @param {string} code - One-time code the user received. Example: "123456".
|
|
180
180
|
* @returns {Promise<boolean | IError>} Returns true if the user was successfully activated, or an error object if there was an issue.
|
|
181
181
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
182
182
|
* @description User activation.
|
|
@@ -193,8 +193,8 @@ class AuthProviderApi extends asyncModules_1.default {
|
|
|
193
193
|
/**
|
|
194
194
|
* User authorization.
|
|
195
195
|
* @handleName auth
|
|
196
|
-
* @param {string} marker -
|
|
197
|
-
* @param {IAuthPostBody} body -
|
|
196
|
+
* @param {string} marker - Marker of the auth provider. Example: "email".
|
|
197
|
+
* @param {IAuthPostBody} body - Authentication data.
|
|
198
198
|
* @example
|
|
199
199
|
{
|
|
200
200
|
"authData": [
|
|
@@ -239,7 +239,7 @@ class AuthProviderApi extends asyncModules_1.default {
|
|
|
239
239
|
/**
|
|
240
240
|
* Refresh token.
|
|
241
241
|
* @handleName refresh
|
|
242
|
-
* @param {string} marker -
|
|
242
|
+
* @param {string} marker - Marker of the auth provider. Example: "email".
|
|
243
243
|
* @param {string} token - Refresh token. Example: "abcdef123456".
|
|
244
244
|
* @returns {Promise<IAuthEntity | IError>} Returns an auth entity object with the following values: accessToken, refreshToken, user, and other auth-related data.
|
|
245
245
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
@@ -261,7 +261,7 @@ class AuthProviderApi extends asyncModules_1.default {
|
|
|
261
261
|
/**
|
|
262
262
|
* User account logout.
|
|
263
263
|
* @handleName logout
|
|
264
|
-
* @param {string} marker -
|
|
264
|
+
* @param {string} marker - Marker of the auth provider. Example: "email".
|
|
265
265
|
* @param {string} token - Refresh token. Example: "abcdef123456".
|
|
266
266
|
* @returns {Promise<boolean | IError>} Returns true if the logout was successful, or an error object if there was an issue.
|
|
267
267
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
@@ -286,7 +286,7 @@ class AuthProviderApi extends asyncModules_1.default {
|
|
|
286
286
|
/**
|
|
287
287
|
* Logout of user account on all devices.
|
|
288
288
|
* @handleName logoutAll
|
|
289
|
-
* @param {string} marker -
|
|
289
|
+
* @param {string} marker - Marker of the auth provider. Example: "email".
|
|
290
290
|
* @returns {Promise<boolean | IError>} Returns true if the logout was successful, or an error object if there was an issue.
|
|
291
291
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
292
292
|
* @description This method requires user authorization.
|
|
@@ -307,13 +307,13 @@ class AuthProviderApi extends asyncModules_1.default {
|
|
|
307
307
|
/**
|
|
308
308
|
* Change password.
|
|
309
309
|
* @handleName changePassword
|
|
310
|
-
* @param {string} marker -
|
|
311
|
-
* @param {string} userIdentifier -
|
|
312
|
-
* @param {string} eventIdentifier -
|
|
313
|
-
* @param {number} type - Operation type
|
|
314
|
-
* @param {string} code -
|
|
310
|
+
* @param {string} marker - Marker of the auth provider. Example: "email".
|
|
311
|
+
* @param {string} userIdentifier - Identifier (login) of the user, such as an email address. Example: "example@oneentry.cloud".
|
|
312
|
+
* @param {string} eventIdentifier - Marker of the event the code was generated for (the `eventIdentifier` passed to `generateCode`). Example: "reg".
|
|
313
|
+
* @param {number} type - Operation type: `1` to change the password, `2` to recover it. Example: 1.
|
|
314
|
+
* @param {string} code - One-time code the user received. Example: "123456".
|
|
315
315
|
* @param {string} newPassword - New password. Example: "newPassword123".
|
|
316
|
-
* @param {string} [repeatPassword] -
|
|
316
|
+
* @param {string} [repeatPassword] - New password repeated for confirmation. Optional. Example: "newPassword123".
|
|
317
317
|
* @returns {Promise<boolean | IError>} Returns true if the password was successfully changed, or an error object if there was an issue.
|
|
318
318
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
319
319
|
* @description User password change (only for tariffs with account activation and the Activation feature enabled).
|
|
@@ -335,8 +335,8 @@ class AuthProviderApi extends asyncModules_1.default {
|
|
|
335
335
|
* Get all auth providers objects.
|
|
336
336
|
* @handleName getAuthProviders
|
|
337
337
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
338
|
-
* @param {number} [offset] -
|
|
339
|
-
* @param {number} [limit] -
|
|
338
|
+
* @param {number} [offset] - Number of records to skip. Default: 0.
|
|
339
|
+
* @param {number} [limit] - Maximum number of records to return. Default: 30.
|
|
340
340
|
* @returns {Promise<IAuthProvidersEntity[] | IError>} Returns an array of auth provider objects.
|
|
341
341
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
342
342
|
* @description Getting all objects of authorization providers.
|
|
@@ -351,7 +351,7 @@ class AuthProviderApi extends asyncModules_1.default {
|
|
|
351
351
|
/**
|
|
352
352
|
* Get one auth provider object by marker.
|
|
353
353
|
* @handleName getAuthProviderByMarker
|
|
354
|
-
* @param {string} marker -
|
|
354
|
+
* @param {string} marker - Marker of the auth provider. Example: "email".
|
|
355
355
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
356
356
|
* @returns {Promise<IAuthProvidersEntity | IError>} Returns an auth provider object.
|
|
357
357
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
@@ -365,7 +365,7 @@ class AuthProviderApi extends asyncModules_1.default {
|
|
|
365
365
|
/**
|
|
366
366
|
* Getting active user sessions data.
|
|
367
367
|
* @handleName getActiveSessionsByMarker
|
|
368
|
-
* @param {string} marker -
|
|
368
|
+
* @param {string} marker - Marker of the auth provider. Example: "email".
|
|
369
369
|
* @returns {Promise<IActiveSession[] | IError>} Array of the authenticated user's active sessions for this provider, one per device (`deviceInfo`).
|
|
370
370
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
371
371
|
* @description Getting the authenticated user's active sessions for the authorization provider. This method requires user authorization.
|
|
@@ -378,8 +378,8 @@ class AuthProviderApi extends asyncModules_1.default {
|
|
|
378
378
|
/**
|
|
379
379
|
* User registration (authorization) via OAUTH.
|
|
380
380
|
* @handleName oauth
|
|
381
|
-
* @param {string} marker -
|
|
382
|
-
* @param {IOauthData} body -
|
|
381
|
+
* @param {string} marker - Marker of the auth provider. Example: "email".
|
|
382
|
+
* @param {IOauthData} body - OAuth data for registration.
|
|
383
383
|
* @example
|
|
384
384
|
{
|
|
385
385
|
"client_id": "34346983-luuct343473qdkqidjopdfp3eb3k4thp.apps.googleusercontent.com",
|
|
@@ -133,8 +133,8 @@ interface IAuthProvider {
|
|
|
133
133
|
* Retrieves all authentication providers.
|
|
134
134
|
* @handleName getAuthProviders
|
|
135
135
|
* @param {string} [langCode] - Optional language code for localization. Default: "en_US".
|
|
136
|
-
* @param {number} [offset] -
|
|
137
|
-
* @param {number} [limit] -
|
|
136
|
+
* @param {number} [offset] - Number of records to skip. Default: 0.
|
|
137
|
+
* @param {number} [limit] - Maximum number of records to return. Default: 30.
|
|
138
138
|
* @returns {IAuthProvidersEntity[]} A promise that resolves to an array of auth provider entities or an error.
|
|
139
139
|
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
140
140
|
* @description This method retrieves all authentication providers.
|
|
@@ -162,8 +162,8 @@ interface IAuthProvider {
|
|
|
162
162
|
/**
|
|
163
163
|
* User registration (authorization) via OAUTH.
|
|
164
164
|
* @handleName oauthSignUp
|
|
165
|
-
* @param {string} marker -
|
|
166
|
-
* @param {IOauthData} body -
|
|
165
|
+
* @param {string} marker - Marker of the auth provider. Example: "email".
|
|
166
|
+
* @param {IOauthData} body - OAuth data for registration.
|
|
167
167
|
* @example
|
|
168
168
|
{
|
|
169
169
|
"client_id": "34346983-luuct343473qdkqidjopdfp3eb3k4thp.apps.googleusercontent.com",
|
|
@@ -182,8 +182,8 @@ interface IAuthProvider {
|
|
|
182
182
|
/**
|
|
183
183
|
* Interface representing the structure of authentication form data.
|
|
184
184
|
* @interface IAuthFormData
|
|
185
|
-
* @property {string} marker -
|
|
186
|
-
* @property {string} type -
|
|
185
|
+
* @property {string} marker - Marker of the form field. Example: "email".
|
|
186
|
+
* @property {string} type - Type of the form field, for example `"string"` or `"email"`. Example: "string".
|
|
187
187
|
* @property {string} value - The value entered in the form field. Example: "example@oneentry.cloud".
|
|
188
188
|
* @description This interface defines the structure of authentication form data used in user registration and authentication processes.
|
|
189
189
|
*/
|
|
@@ -195,11 +195,11 @@ interface IAuthFormData {
|
|
|
195
195
|
/**
|
|
196
196
|
* Interface representing the data required for user registration.
|
|
197
197
|
* @interface ISignUpData
|
|
198
|
-
* @property {string} formIdentifier -
|
|
198
|
+
* @property {string} formIdentifier - Marker of the registration form. Example: "reg".
|
|
199
199
|
* @property {string} [langCode] - Language code. Default: "en_US".
|
|
200
|
-
* @property {Array} authData -
|
|
201
|
-
* @property {IAuthFormData | IAuthFormData[]} formData -
|
|
202
|
-
* @property {INotificationData} notificationData -
|
|
200
|
+
* @property {Array} authData - Authentication fields, each with a `marker` and a `value`.
|
|
201
|
+
* @property {IAuthFormData | IAuthFormData[]} formData - Registration form fields.
|
|
202
|
+
* @property {INotificationData} notificationData - Notification contacts: `email`, `phonePush` and `phoneSMS`.
|
|
203
203
|
* @description User registration (❗️For a provider with user activation, the activation code is sent through the corresponding user notification method).
|
|
204
204
|
*/
|
|
205
205
|
interface ISignUpData {
|
|
@@ -211,7 +211,7 @@ interface ISignUpData {
|
|
|
211
211
|
}
|
|
212
212
|
/**
|
|
213
213
|
* @interface INotificationData
|
|
214
|
-
* @property {string} email - User
|
|
214
|
+
* @property {string} email - User email used for notifications. Example: "example@oneentry.cloud".
|
|
215
215
|
* @property {string[]} phonePush - Phone numbers used for push notifications. Example: ["+19999999999"].
|
|
216
216
|
* @property {string} [phoneSMS] - Phone number used for SMS notifications. Example: "+19999999999".
|
|
217
217
|
* @description Notification channels configured for a user.
|
|
@@ -227,7 +227,7 @@ interface INotificationData {
|
|
|
227
227
|
* @property {string} client_id - The client ID for the OAuth application. Example: "34346983-luuct343473qdkqidjopdfp3eb3k4thp.apps.googleusercontent.com".
|
|
228
228
|
* @property {string} client_secret - The client secret for the OAuth application. Example: "43434343434".
|
|
229
229
|
* @property {string} code - The authorization code received from the OAuth provider. Example: "4/0AVMBsJgwewewewewewei4D7T6E_fbswxnL3g".
|
|
230
|
-
* @property {string} grant_type -
|
|
230
|
+
* @property {string} grant_type - OAuth grant type. Example: "authorization_code".
|
|
231
231
|
* @property {string} redirect_uri - The redirect URI for the OAuth application. Example: "http://localhost:3000".
|
|
232
232
|
* @description User registration (❗️For a provider with user activation, the activation code is sent through the corresponding user notification method).
|
|
233
233
|
*/
|
|
@@ -241,12 +241,12 @@ interface IOauthData {
|
|
|
241
241
|
/**
|
|
242
242
|
* Interface representing a sign-up entity.
|
|
243
243
|
* @interface ISignUpEntity
|
|
244
|
-
* @property {number} id -
|
|
245
|
-
* @property {string} updatedDate -
|
|
246
|
-
* @property {number} version -
|
|
247
|
-
* @property {string} identifier -
|
|
248
|
-
* @property {boolean} isActive -
|
|
249
|
-
* @property {IAuthFormData[]} formData - Form
|
|
244
|
+
* @property {number} id - ID of the user created by sign-up. Example: 12345.
|
|
245
|
+
* @property {string} updatedDate - Date the user was last updated. Example: "2023-10-01T12:00:00Z".
|
|
246
|
+
* @property {number} version - Version number of the user; changes with each update. Example: 1.
|
|
247
|
+
* @property {string} identifier - Marker of the user created by sign-up. Example: "signup_12345".
|
|
248
|
+
* @property {boolean} isActive - Whether the user account is active. Example: true.
|
|
249
|
+
* @property {IAuthFormData[]} formData - Form fields.
|
|
250
250
|
* @example
|
|
251
251
|
[
|
|
252
252
|
{
|
|
@@ -254,22 +254,22 @@ interface IOauthData {
|
|
|
254
254
|
"value": "John"
|
|
255
255
|
}
|
|
256
256
|
]
|
|
257
|
-
* @property {INotificationData} notificationData -
|
|
257
|
+
* @property {INotificationData} notificationData - Notification contacts: `email`, `phonePush` and `phoneSMS`.
|
|
258
258
|
* @example
|
|
259
259
|
{
|
|
260
260
|
"email": "example@oneentry.cloud",
|
|
261
261
|
"phonePush": ["+99999999999"],
|
|
262
262
|
"phoneSMS": "+99999999999"
|
|
263
263
|
}
|
|
264
|
-
* @property {string} [locale] -
|
|
265
|
-
* @property {string} [createdDate] -
|
|
264
|
+
* @property {string} [locale] - Locale of the user created by sign-up. Example: "en_US".
|
|
265
|
+
* @property {string} [createdDate] - Creation date of the user record. Example: "2023-10-01T12:00:00Z".
|
|
266
266
|
* @property {unknown} [importId] - Import identifier. Example: null.
|
|
267
|
-
* @property {string | null} [deletedAt] - Deletion date or null
|
|
268
|
-
* @property {boolean} [isDeleted] - Whether the
|
|
269
|
-
* @property {Record<string, unknown>} [state] -
|
|
270
|
-
* @property {IRating} [rating] - Rating data.
|
|
271
|
-
* @property {number | null} [attributeSetId] -
|
|
272
|
-
* @property {Record<string, unknown>} [attributesSets] - Attribute sets attached to the user, keyed by marker; empty object when none. Example: {}.
|
|
267
|
+
* @property {string | null} [deletedAt] - Deletion date, or `null`. Example: null.
|
|
268
|
+
* @property {boolean} [isDeleted] - Whether the user account is deleted. Example: false.
|
|
269
|
+
* @property {Record<string, unknown>} [state] - Custom key-value data stored with the user. Example: {}.
|
|
270
|
+
* @property {IRating} [rating] - Rating data: average value, likes and dislikes, and the calculation method.
|
|
271
|
+
* @property {number | null} [attributeSetId] - ID of the attribute set attached to the user, or `null` when none is attached. Example: null.
|
|
272
|
+
* @property {Record<string, unknown>} [attributesSets] - Attribute sets attached to the user, keyed by marker; an empty object when there are none. Example: {}.
|
|
273
273
|
* @description This interface defines the structure of a sign-up entity.
|
|
274
274
|
*/
|
|
275
275
|
interface ISignUpEntity {
|
|
@@ -304,8 +304,8 @@ interface ICodeEntity {
|
|
|
304
304
|
/**
|
|
305
305
|
* Interface representing an authentication entity.
|
|
306
306
|
* @interface IAuthEntity
|
|
307
|
-
* @property {string} userIdentifier -
|
|
308
|
-
* @property {string} authProviderIdentifier -
|
|
307
|
+
* @property {string} userIdentifier - User identifier (login), for example the email address. Example: "user12345".
|
|
308
|
+
* @property {string} authProviderIdentifier - Marker of the authentication provider. Example: "email".
|
|
309
309
|
* @property {string} accessToken - The access token for the user session. Example: "abcdef123456".
|
|
310
310
|
* @property {string} refreshToken - The refresh token for renewing the access token. Example: "ghijkl789012".
|
|
311
311
|
* @description This interface defines the structure of an authentication entity.
|
|
@@ -319,24 +319,24 @@ interface IAuthEntity {
|
|
|
319
319
|
/**
|
|
320
320
|
* Interface representing an authentication provider entity.
|
|
321
321
|
* @interface IAuthProvidersEntity
|
|
322
|
-
* @property {number} id -
|
|
323
|
-
* @property {ILocalizeInfo} localizeInfos - Localized
|
|
322
|
+
* @property {number} id - ID of the auth provider. Example: 194.
|
|
323
|
+
* @property {ILocalizeInfo} localizeInfos - Localized data of the auth provider.
|
|
324
324
|
* @example
|
|
325
325
|
{
|
|
326
326
|
"key": "value"
|
|
327
327
|
}
|
|
328
|
-
* @property {IAuthProvidersEntityConfig} config -
|
|
328
|
+
* @property {IAuthProvidersEntityConfig} config - Provider configuration as key-value pairs.
|
|
329
329
|
* @example
|
|
330
330
|
{
|
|
331
331
|
"key": "value"
|
|
332
332
|
}
|
|
333
|
-
* @property {number} version -
|
|
334
|
-
* @property {string} identifier -
|
|
335
|
-
* @property {string} type -
|
|
336
|
-
* @property {string | null} formIdentifier -
|
|
337
|
-
* @property {string} userGroupIdentifier -
|
|
338
|
-
* @property {boolean} isActive -
|
|
339
|
-
* @property {boolean} isCheckCode -
|
|
333
|
+
* @property {number} version - Version number of the auth provider; changes with each update. Example: 1.
|
|
334
|
+
* @property {string} identifier - Marker of the auth provider. Example: "email".
|
|
335
|
+
* @property {string} type - Type of the auth provider, for example `"email"`. Example: "email".
|
|
336
|
+
* @property {string | null} formIdentifier - Marker of the form linked to the auth provider, or `null` if there is none. Example: "reg_form".
|
|
337
|
+
* @property {string} userGroupIdentifier - Identifier of the user group linked to the auth provider. Example: "guest".
|
|
338
|
+
* @property {boolean} isActive - Whether the auth provider is active. Example: true.
|
|
339
|
+
* @property {boolean} isCheckCode - Whether the auth provider requires a verification code. Example: false.
|
|
340
340
|
* @description This interface defines the structure of an authentication provider entity.
|
|
341
341
|
*/
|
|
342
342
|
interface IAuthProvidersEntity {
|
|
@@ -355,12 +355,12 @@ interface IAuthProvidersEntity {
|
|
|
355
355
|
* Interface representing an authentication provider config.
|
|
356
356
|
* @interface IAuthProvidersEntityConfig
|
|
357
357
|
* @property {string} accessTokenTtlSec - Access token time to live in seconds. Example: "3600".
|
|
358
|
-
* @property {string} refreshTokenTtlMc -
|
|
359
|
-
* @property {string} deleteNoneActiveUsersAfterDays -
|
|
360
|
-
* @property {string} systemCodeTlsSec -
|
|
361
|
-
* @property {string} systemCodeLength -
|
|
358
|
+
* @property {string} refreshTokenTtlMc - Lifetime of the refresh token, in milliseconds. Example: "86400000".
|
|
359
|
+
* @property {string} deleteNoneActiveUsersAfterDays - Number of days after which inactive users are deleted. Example: "30".
|
|
360
|
+
* @property {string} systemCodeTlsSec - Lifetime of the one-time code, in seconds. Example: "86400".
|
|
361
|
+
* @property {string} systemCodeLength - Length of the one-time code. Example: "6".
|
|
362
362
|
* @property {string | null} oauthAuthUrl - OAuth authorization URL. Example: null.
|
|
363
|
-
* @property {string | null} systemCodeOnlyNumbers -
|
|
363
|
+
* @property {string | null} systemCodeOnlyNumbers - Whether the one-time code uses digits only; `null` when not set. Example: null.
|
|
364
364
|
*/
|
|
365
365
|
interface IAuthProvidersEntityConfig {
|
|
366
366
|
accessTokenTtlSec: string;
|
|
@@ -374,7 +374,7 @@ interface IAuthProvidersEntityConfig {
|
|
|
374
374
|
/**
|
|
375
375
|
* Authentication data object.
|
|
376
376
|
* @interface IAuthData
|
|
377
|
-
* @property {string} marker -
|
|
377
|
+
* @property {string} marker - Marker of the auth form field. Example: "login".
|
|
378
378
|
* @property {string} value - The value of the auth field. Example: "user@example.com".
|
|
379
379
|
*/
|
|
380
380
|
interface IAuthData {
|
|
@@ -384,7 +384,7 @@ interface IAuthData {
|
|
|
384
384
|
/**
|
|
385
385
|
* Interface representing the body used in authentication requests.
|
|
386
386
|
* @interface IAuthPostBody
|
|
387
|
-
* @property {IAuthData[]} authData -
|
|
387
|
+
* @property {IAuthData[]} authData - Authentication fields, each with a `marker` and a `value`.
|
|
388
388
|
* @example
|
|
389
389
|
[
|
|
390
390
|
{
|
|
@@ -400,16 +400,16 @@ interface IAuthPostBody {
|
|
|
400
400
|
/**
|
|
401
401
|
* Interface representing the active session data.
|
|
402
402
|
* @interface IActiveSession
|
|
403
|
-
* @property {object} deviceInfo -
|
|
403
|
+
* @property {object} deviceInfo - Device used in the active session.
|
|
404
404
|
* @example
|
|
405
405
|
{
|
|
406
406
|
"os": "Win32",
|
|
407
407
|
"browser": "Node.js/22",
|
|
408
408
|
"location": "en-US"
|
|
409
409
|
}
|
|
410
|
-
* @property {string} deviceInfo.os -
|
|
411
|
-
* @property {string} deviceInfo.browser -
|
|
412
|
-
* @property {string} deviceInfo.location -
|
|
410
|
+
* @property {string} deviceInfo.os - Operating system of the active session. Example: "Win32".
|
|
411
|
+
* @property {string} deviceInfo.browser - Browser of the active session. Example: "Node.js/22".
|
|
412
|
+
* @property {string} deviceInfo.location - Location of the active session. Example: "en-US".
|
|
413
413
|
* @description This interface defines the structure of the body used in authentication requests, containing an array of authentication data.
|
|
414
414
|
*/
|
|
415
415
|
interface IActiveSession {
|
|
@@ -417,8 +417,8 @@ interface IActiveSession {
|
|
|
417
417
|
}
|
|
418
418
|
/**
|
|
419
419
|
* @interface IDeviceInfo
|
|
420
|
-
* @property {string} os -
|
|
421
|
-
* @property {string} browser -
|
|
420
|
+
* @property {string} os - Operating system of the active session. Example: "Win32".
|
|
421
|
+
* @property {string} browser - Browser of the active session. Example: "Node.js/22".
|
|
422
422
|
* @property {string} location - The locale of the active session. Example: "en-US".
|
|
423
423
|
* @description Information about the device tied to an active authentication session.
|
|
424
424
|
*/
|
|
@@ -82,7 +82,7 @@ export default abstract class AsyncModules extends SyncModules {
|
|
|
82
82
|
*
|
|
83
83
|
* With `isShell` disabled browserResponse throws, and the error is thrown on
|
|
84
84
|
* from here too: returning it would break the `@throws` contract every caller
|
|
85
|
-
* documents, and a `try/catch` around the call would never fire
|
|
85
|
+
* documents, and a `try/catch` around the call would never fire.
|
|
86
86
|
* @param {() => Promise<unknown>} request - Thunk performing the fetch call.
|
|
87
87
|
* @returns {Promise<boolean | IError>} `true` on success, IError on failure when isShell=true.
|
|
88
88
|
* @throws {IError} When isShell=false and the request fails.
|
|
@@ -115,7 +115,7 @@ export default abstract class AsyncModules extends SyncModules {
|
|
|
115
115
|
* so both the success and the error branches handle empty bodies the same way.
|
|
116
116
|
*
|
|
117
117
|
* A body that is present but is not JSON — a gateway's HTML page in front of a
|
|
118
|
-
* 502, the platform's own admin page
|
|
118
|
+
* 502, the platform's own admin page — used to collapse into `{}`,
|
|
119
119
|
* which carries no `statusCode` and therefore does not read as an error at all:
|
|
120
120
|
* a failed request came back looking like an empty success. It is described
|
|
121
121
|
* instead, keeping the status the server actually sent.
|
|
@@ -135,8 +135,8 @@ export default abstract class AsyncModules extends SyncModules {
|
|
|
135
135
|
* Describes a response whose body is not the JSON the API is supposed to send.
|
|
136
136
|
*
|
|
137
137
|
* The platform has been seen answering `200 OK` with `content-type: text/html`
|
|
138
|
-
* and the admin page as the body — every content endpoint at once, for minutes
|
|
139
|
-
*
|
|
138
|
+
* and the admin page as the body — every content endpoint at once, for minutes.
|
|
139
|
+
* A successful status carrying someone else's body is indistinguishable
|
|
140
140
|
* from a real answer by status alone, and the only symptom used to be
|
|
141
141
|
* `SyntaxError: Unexpected token '<'` from the JSON parser: a message about the
|
|
142
142
|
* SDK's own parsing rather than about what the platform did. Callers read that as
|
|
@@ -157,9 +157,9 @@ export default abstract class AsyncModules extends SyncModules {
|
|
|
157
157
|
* With `isShell` on, a failure is returned rather than thrown — and a dropped
|
|
158
158
|
* connection throws a `TypeError`, whose `message` and `stack` are not
|
|
159
159
|
* enumerable. Returned as it was, it serializes to `{}` and reads exactly
|
|
160
|
-
* like an empty answer:
|
|
160
|
+
* like an empty answer: such a value has entered a site's
|
|
161
161
|
* page cache and was served for minutes after the link came back, and
|
|
162
|
-
* `next build` baked a site of 404s while reporting success
|
|
162
|
+
* `next build` baked a site of 404s while reporting success.
|
|
163
163
|
*
|
|
164
164
|
* An object that already carries a `statusCode` is the platform's own error
|
|
165
165
|
* and is passed through untouched. Everything else becomes
|
|
@@ -171,7 +171,7 @@ class AsyncModules extends syncModules_1.default {
|
|
|
171
171
|
*
|
|
172
172
|
* With `isShell` disabled browserResponse throws, and the error is thrown on
|
|
173
173
|
* from here too: returning it would break the `@throws` contract every caller
|
|
174
|
-
* documents, and a `try/catch` around the call would never fire
|
|
174
|
+
* documents, and a `try/catch` around the call would never fire.
|
|
175
175
|
* @param {() => Promise<unknown>} request - Thunk performing the fetch call.
|
|
176
176
|
* @returns {Promise<boolean | IError>} `true` on success, IError on failure when isShell=true.
|
|
177
177
|
* @throws {IError} When isShell=false and the request fails.
|
|
@@ -334,7 +334,7 @@ class AsyncModules extends syncModules_1.default {
|
|
|
334
334
|
* so both the success and the error branches handle empty bodies the same way.
|
|
335
335
|
*
|
|
336
336
|
* A body that is present but is not JSON — a gateway's HTML page in front of a
|
|
337
|
-
* 502, the platform's own admin page
|
|
337
|
+
* 502, the platform's own admin page — used to collapse into `{}`,
|
|
338
338
|
* which carries no `statusCode` and therefore does not read as an error at all:
|
|
339
339
|
* a failed request came back looking like an empty success. It is described
|
|
340
340
|
* instead, keeping the status the server actually sent.
|
|
@@ -458,8 +458,8 @@ class AsyncModules extends syncModules_1.default {
|
|
|
458
458
|
* Describes a response whose body is not the JSON the API is supposed to send.
|
|
459
459
|
*
|
|
460
460
|
* The platform has been seen answering `200 OK` with `content-type: text/html`
|
|
461
|
-
* and the admin page as the body — every content endpoint at once, for minutes
|
|
462
|
-
*
|
|
461
|
+
* and the admin page as the body — every content endpoint at once, for minutes.
|
|
462
|
+
* A successful status carrying someone else's body is indistinguishable
|
|
463
463
|
* from a real answer by status alone, and the only symptom used to be
|
|
464
464
|
* `SyntaxError: Unexpected token '<'` from the JSON parser: a message about the
|
|
465
465
|
* SDK's own parsing rather than about what the platform did. Callers read that as
|
|
@@ -494,9 +494,9 @@ class AsyncModules extends syncModules_1.default {
|
|
|
494
494
|
* With `isShell` on, a failure is returned rather than thrown — and a dropped
|
|
495
495
|
* connection throws a `TypeError`, whose `message` and `stack` are not
|
|
496
496
|
* enumerable. Returned as it was, it serializes to `{}` and reads exactly
|
|
497
|
-
* like an empty answer:
|
|
497
|
+
* like an empty answer: such a value has entered a site's
|
|
498
498
|
* page cache and was served for minutes after the link came back, and
|
|
499
|
-
* `next build` baked a site of 404s while reporting success
|
|
499
|
+
* `next build` baked a site of 404s while reporting success.
|
|
500
500
|
*
|
|
501
501
|
* An object that already carries a `statusCode` is the platform's own error
|
|
502
502
|
* and is passed through untouched. Everything else becomes
|
|
@@ -88,7 +88,7 @@ export default abstract class SyncModules {
|
|
|
88
88
|
* calls, a shared default. Normalizing in place sends the already-wrapped
|
|
89
89
|
* value the second time, it is wrapped again, and the platform answers
|
|
90
90
|
* `400 "formData.en_US[0].marker" is required` about a field the caller
|
|
91
|
-
* never sent
|
|
91
|
+
* never sent.
|
|
92
92
|
* @param {any} body - The body to normalize. Left unchanged.
|
|
93
93
|
* @param {string} [langCode] - The language code for normalization.
|
|
94
94
|
* @returns {any} A normalized copy of the body.
|
package/dist/base/syncModules.js
CHANGED
|
@@ -227,7 +227,7 @@ class SyncModules {
|
|
|
227
227
|
* calls, a shared default. Normalizing in place sends the already-wrapped
|
|
228
228
|
* value the second time, it is wrapped again, and the platform answers
|
|
229
229
|
* `400 "formData.en_US[0].marker" is required` about a field the caller
|
|
230
|
-
* never sent
|
|
230
|
+
* never sent.
|
|
231
231
|
* @param {any} body - The body to normalize. Left unchanged.
|
|
232
232
|
* @param {string} [langCode] - The language code for normalization.
|
|
233
233
|
* @returns {any} A normalized copy of the body.
|
package/dist/base/utils.d.ts
CHANGED
|
@@ -431,7 +431,7 @@ interface IHttpHeaders {
|
|
|
431
431
|
* @interface IHttpOptions
|
|
432
432
|
* @property {string} method - HTTP method
|
|
433
433
|
* @property {IHttpHeaders} headers - HTTP headers
|
|
434
|
-
* @property {string | FormData | Blob} [body] - Request body
|
|
434
|
+
* @property {string | FormData | Blob} [body] - Request body.
|
|
435
435
|
* @description Interface for HTTP request options
|
|
436
436
|
*/
|
|
437
437
|
interface IHttpOptions {
|
|
@@ -443,8 +443,8 @@ interface IHttpOptions {
|
|
|
443
443
|
* Response of a semantic (vector) search: the module's own list container plus `indexReady`.
|
|
444
444
|
* @typedef {object} IVectorSearchResponse
|
|
445
445
|
* @template T
|
|
446
|
-
* @property {boolean} indexReady - `false` when no vectors are built yet for this entity and language: the query was not embedded,
|
|
447
|
-
* @description Every `…/vector/search` endpoint answers with `indexReady` next to its list
|
|
446
|
+
* @property {boolean} indexReady - `false` when no vectors are built yet for this entity and language: the query was not embedded, so empty `items` do not mean that nothing matched. `true` means the result comes from a real search.
|
|
447
|
+
* @description Every `…/vector/search` endpoint answers with `indexReady` next to its list.
|
|
448
448
|
*/
|
|
449
449
|
type IVectorSearchResponse<T> = T & {
|
|
450
450
|
indexReady: boolean;
|