oneentry 1.0.142 → 1.0.144

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 (150) hide show
  1. package/configure.js +2 -2
  2. package/dist/admins/adminsApi.d.ts +50 -0
  3. package/dist/admins/adminsApi.js +65 -0
  4. package/dist/admins/adminsInterfaces.d.ts +98 -0
  5. package/dist/admins/adminsInterfaces.js +2 -0
  6. package/dist/admins/adminsSchemas.d.ts +30 -0
  7. package/dist/admins/adminsSchemas.js +27 -0
  8. package/dist/attribute-sets/attributeSetsApi.d.ts +63 -0
  9. package/dist/attribute-sets/attributeSetsApi.js +98 -0
  10. package/dist/attribute-sets/attributeSetsInterfaces.d.ts +185 -0
  11. package/dist/attribute-sets/attributeSetsInterfaces.js +2 -0
  12. package/dist/attribute-sets/attributeSetsSchemas.d.ts +90 -0
  13. package/dist/attribute-sets/attributeSetsSchemas.js +74 -0
  14. package/dist/auth-provider/authProviderApi.d.ts +249 -0
  15. package/dist/auth-provider/authProviderApi.js +354 -0
  16. package/dist/auth-provider/authProviderSchemas.d.ts +131 -0
  17. package/dist/auth-provider/authProviderSchemas.js +82 -0
  18. package/dist/auth-provider/authProvidersInterfaces.d.ts +412 -0
  19. package/dist/auth-provider/authProvidersInterfaces.js +2 -0
  20. package/dist/base/asyncModules.d.ts +80 -0
  21. package/dist/base/asyncModules.js +448 -0
  22. package/dist/base/result.d.ts +39 -0
  23. package/dist/base/result.js +154 -0
  24. package/dist/base/stateModule.d.ts +41 -0
  25. package/dist/base/stateModule.js +128 -0
  26. package/dist/base/syncModules.d.ts +286 -0
  27. package/dist/base/syncModules.js +716 -0
  28. package/dist/base/utils.d.ts +197 -0
  29. package/dist/base/utils.js +2 -0
  30. package/dist/base/validation.d.ts +118 -0
  31. package/dist/base/validation.js +132 -0
  32. package/dist/blocks/blocksApi.d.ts +88 -0
  33. package/dist/blocks/blocksApi.js +207 -0
  34. package/dist/blocks/blocksInterfaces.d.ts +179 -0
  35. package/dist/blocks/blocksInterfaces.js +2 -0
  36. package/dist/blocks/blocksSchemas.d.ts +195 -0
  37. package/dist/blocks/blocksSchemas.js +43 -0
  38. package/dist/discounts/discountsApi.d.ts +76 -0
  39. package/dist/discounts/discountsApi.js +116 -0
  40. package/dist/discounts/discountsInterfaces.d.ts +217 -0
  41. package/dist/discounts/discountsInterfaces.js +2 -0
  42. package/dist/events/eventsApi.d.ts +60 -0
  43. package/dist/events/eventsApi.js +97 -0
  44. package/dist/events/eventsInterfaces.d.ts +87 -0
  45. package/dist/events/eventsInterfaces.js +2 -0
  46. package/dist/file-uploading/fileUploadingApi.d.ts +88 -0
  47. package/dist/file-uploading/fileUploadingApi.js +129 -0
  48. package/dist/file-uploading/fileUploadingInterfaces.d.ts +114 -0
  49. package/dist/file-uploading/fileUploadingInterfaces.js +2 -0
  50. package/dist/file-uploading/fileUploadingSchemas.d.ts +22 -0
  51. package/dist/file-uploading/fileUploadingSchemas.js +21 -0
  52. package/dist/forms/formsApi.d.ts +42 -0
  53. package/dist/forms/formsApi.js +57 -0
  54. package/dist/forms/formsInterfaces.d.ts +144 -0
  55. package/dist/forms/formsInterfaces.js +2 -0
  56. package/dist/forms/formsSchemas.d.ts +53 -0
  57. package/dist/forms/formsSchemas.js +34 -0
  58. package/dist/forms-data/formsDataApi.d.ts +106 -0
  59. package/dist/forms-data/formsDataApi.js +189 -0
  60. package/dist/forms-data/formsDataInterfaces.d.ts +522 -0
  61. package/dist/forms-data/formsDataInterfaces.js +2 -0
  62. package/dist/forms-data/formsDataSchemas.d.ts +115 -0
  63. package/dist/forms-data/formsDataSchemas.js +86 -0
  64. package/dist/general-types/generalTypesApi.d.ts +28 -0
  65. package/dist/general-types/generalTypesApi.js +38 -0
  66. package/dist/general-types/generalTypesInterfaces.d.ts +29 -0
  67. package/dist/general-types/generalTypesInterfaces.js +2 -0
  68. package/dist/general-types/generalTypesSchemas.d.ts +52 -0
  69. package/dist/general-types/generalTypesSchemas.js +36 -0
  70. package/dist/index.d.ts +124 -0
  71. package/dist/index.js +103 -0
  72. package/dist/integration-collections/integrationCollectionsApi.d.ts +163 -0
  73. package/dist/integration-collections/integrationCollectionsApi.js +220 -0
  74. package/dist/integration-collections/integrationCollectionsInterfaces.d.ts +313 -0
  75. package/dist/integration-collections/integrationCollectionsInterfaces.js +2 -0
  76. package/dist/integration-collections/integrationCollectionsSchemas.d.ts +80 -0
  77. package/dist/integration-collections/integrationCollectionsSchemas.js +61 -0
  78. package/dist/locales/localesApi.d.ts +27 -0
  79. package/dist/locales/localesApi.js +37 -0
  80. package/dist/locales/localesInterfaces.d.ts +40 -0
  81. package/dist/locales/localesInterfaces.js +2 -0
  82. package/dist/locales/localesSchemas.d.ts +32 -0
  83. package/dist/locales/localesSchemas.js +26 -0
  84. package/dist/menus/menusApi.d.ts +29 -0
  85. package/dist/menus/menusApi.js +39 -0
  86. package/dist/menus/menusInterfaces.d.ts +87 -0
  87. package/dist/menus/menusInterfaces.js +3 -0
  88. package/dist/menus/menusSchemas.d.ts +16 -0
  89. package/dist/menus/menusSchemas.js +28 -0
  90. package/dist/orders/ordersApi.d.ts +175 -0
  91. package/dist/orders/ordersApi.js +247 -0
  92. package/dist/orders/ordersInterfaces.d.ts +593 -0
  93. package/dist/orders/ordersInterfaces.js +2 -0
  94. package/dist/orders/ordersSchemas.d.ts +120 -0
  95. package/dist/orders/ordersSchemas.js +101 -0
  96. package/dist/pages/pagesApi.d.ts +151 -0
  97. package/dist/pages/pagesApi.js +390 -0
  98. package/dist/pages/pagesInterfaces.d.ts +286 -0
  99. package/dist/pages/pagesInterfaces.js +2 -0
  100. package/dist/pages/pagesSchemas.d.ts +85 -0
  101. package/dist/pages/pagesSchemas.js +46 -0
  102. package/dist/payments/paymentsApi.d.ts +82 -0
  103. package/dist/payments/paymentsApi.js +121 -0
  104. package/dist/payments/paymentsInterfaces.d.ts +200 -0
  105. package/dist/payments/paymentsInterfaces.js +2 -0
  106. package/dist/payments/paymentsSchemas.d.ts +100 -0
  107. package/dist/payments/paymentsSchemas.js +65 -0
  108. package/dist/product-statuses/productStatusesApi.d.ts +47 -0
  109. package/dist/product-statuses/productStatusesApi.js +70 -0
  110. package/dist/product-statuses/productStatusesInterfaces.d.ts +62 -0
  111. package/dist/product-statuses/productStatusesInterfaces.js +2 -0
  112. package/dist/product-statuses/productStatusesSchemas.d.ts +34 -0
  113. package/dist/product-statuses/productStatusesSchemas.js +30 -0
  114. package/dist/products/productsApi.d.ts +366 -0
  115. package/dist/products/productsApi.js +458 -0
  116. package/dist/products/productsInterfaces.d.ts +593 -0
  117. package/dist/products/productsInterfaces.js +2 -0
  118. package/dist/products/productsSchemas.d.ts +200 -0
  119. package/dist/products/productsSchemas.js +98 -0
  120. package/dist/sitemap/sitemapApi.d.ts +35 -0
  121. package/dist/sitemap/sitemapApi.js +45 -0
  122. package/dist/sitemap/sitemapInterfaces.d.ts +40 -0
  123. package/dist/sitemap/sitemapInterfaces.js +2 -0
  124. package/dist/system/systemApi.d.ts +43 -0
  125. package/dist/system/systemApi.js +56 -0
  126. package/dist/system/systemInterfaces.d.ts +29 -0
  127. package/dist/system/systemInterfaces.js +2 -0
  128. package/dist/templates/templatesApi.d.ts +49 -0
  129. package/dist/templates/templatesApi.js +75 -0
  130. package/dist/templates/templatesInterfaces.d.ts +67 -0
  131. package/dist/templates/templatesInterfaces.js +2 -0
  132. package/dist/templates/templatesSchemas.d.ts +48 -0
  133. package/dist/templates/templatesSchemas.js +31 -0
  134. package/dist/templates-preview/templatesPreviewApi.d.ts +38 -0
  135. package/dist/templates-preview/templatesPreviewApi.js +53 -0
  136. package/dist/templates-preview/templatesPreviewInterfaces.d.ts +119 -0
  137. package/dist/templates-preview/templatesPreviewInterfaces.js +2 -0
  138. package/dist/templates-preview/templatesPreviewSchemas.d.ts +83 -0
  139. package/dist/templates-preview/templatesPreviewSchemas.js +48 -0
  140. package/dist/users/usersApi.d.ts +143 -0
  141. package/dist/users/usersApi.js +171 -0
  142. package/dist/users/usersInterfaces.d.ts +231 -0
  143. package/dist/users/usersInterfaces.js +2 -0
  144. package/dist/users/usersSchemas.d.ts +38 -0
  145. package/dist/users/usersSchemas.js +28 -0
  146. package/dist/web-socket/wsApi.d.ts +25 -0
  147. package/dist/web-socket/wsApi.js +45 -0
  148. package/dist/web-socket/wsInterfaces.d.ts +16 -0
  149. package/dist/web-socket/wsInterfaces.js +2 -0
  150. package/package.json +2 -80
@@ -0,0 +1,90 @@
1
+ /**
2
+ * Validation schemas for AttributeSets module
3
+ * @description Zod schemas for validating attribute sets-related API responses
4
+ */
5
+ import { z } from 'zod';
6
+ /**
7
+ * List title schema for list and radioButton attributes
8
+ */
9
+ export declare const ListTitleSchema: z.ZodObject<{
10
+ title: z.ZodString;
11
+ value: z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>;
12
+ position: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodNull]>;
13
+ extended: z.ZodObject<{
14
+ value: z.ZodNullable<z.ZodString>;
15
+ type: z.ZodNullable<z.ZodString>;
16
+ }, z.core.$strip>;
17
+ }, z.core.$strip>;
18
+ /**
19
+ * Attribute entity schema (single attribute from a set)
20
+ */
21
+ export declare const AttributeEntitySchema: z.ZodObject<{
22
+ type: z.ZodString;
23
+ value: z.ZodOptional<z.ZodAny>;
24
+ initialValue: z.ZodAny;
25
+ marker: z.ZodString;
26
+ position: z.ZodNumber;
27
+ listTitles: z.ZodOptional<z.ZodUnion<readonly [z.ZodArray<z.ZodAny>, z.ZodRecord<z.ZodString, z.ZodAny>]>>;
28
+ validators: z.ZodOptional<z.ZodUnion<readonly [z.ZodRecord<z.ZodString, z.ZodAny>, z.ZodArray<z.ZodAny>]>>;
29
+ localizeInfos: z.ZodUnion<readonly [z.ZodRecord<z.ZodString, z.ZodAny>, z.ZodArray<z.ZodAny>]>;
30
+ additionalFields: z.ZodOptional<z.ZodUnion<readonly [z.ZodRecord<z.ZodString, z.ZodAny>, z.ZodArray<z.ZodAny>]>>;
31
+ settings: z.ZodOptional<z.ZodUnion<readonly [z.ZodRecord<z.ZodString, z.ZodAny>, z.ZodArray<z.ZodAny>]>>;
32
+ }, z.core.$strip>;
33
+ /**
34
+ * Attribute set entity schema (attribute set object)
35
+ */
36
+ export declare const AttributeSetEntitySchema: z.ZodObject<{
37
+ id: z.ZodNumber;
38
+ createdDate: z.ZodString;
39
+ updatedDate: z.ZodString;
40
+ version: z.ZodNumber;
41
+ identifier: z.ZodString;
42
+ typeId: z.ZodNumber;
43
+ title: z.ZodString;
44
+ schema: z.ZodObject<{}, z.core.$loose>;
45
+ isVisible: z.ZodBoolean;
46
+ properties: z.ZodObject<{}, z.core.$loose>;
47
+ type: z.ZodObject<{
48
+ id: z.ZodNumber;
49
+ type: z.ZodString;
50
+ }, z.core.$strip>;
51
+ position: z.ZodNumber;
52
+ }, z.core.$strip>;
53
+ /**
54
+ * Attributes response schema (for getAttributes method)
55
+ */
56
+ export declare const AttributeSetsResponseSchema: z.ZodObject<{
57
+ total: z.ZodNumber;
58
+ items: z.ZodArray<z.ZodObject<{
59
+ id: z.ZodNumber;
60
+ createdDate: z.ZodString;
61
+ updatedDate: z.ZodString;
62
+ version: z.ZodNumber;
63
+ identifier: z.ZodString;
64
+ typeId: z.ZodNumber;
65
+ title: z.ZodString;
66
+ schema: z.ZodObject<{}, z.core.$loose>;
67
+ isVisible: z.ZodBoolean;
68
+ properties: z.ZodObject<{}, z.core.$loose>;
69
+ type: z.ZodObject<{
70
+ id: z.ZodNumber;
71
+ type: z.ZodString;
72
+ }, z.core.$strip>;
73
+ position: z.ZodNumber;
74
+ }, z.core.$strip>>;
75
+ }, z.core.$strip>;
76
+ /**
77
+ * Attributes array response schema (for getAttributesByMarker method)
78
+ */
79
+ export declare const AttributesArrayResponseSchema: z.ZodArray<z.ZodObject<{
80
+ type: z.ZodString;
81
+ value: z.ZodOptional<z.ZodAny>;
82
+ initialValue: z.ZodAny;
83
+ marker: z.ZodString;
84
+ position: z.ZodNumber;
85
+ listTitles: z.ZodOptional<z.ZodUnion<readonly [z.ZodArray<z.ZodAny>, z.ZodRecord<z.ZodString, z.ZodAny>]>>;
86
+ validators: z.ZodOptional<z.ZodUnion<readonly [z.ZodRecord<z.ZodString, z.ZodAny>, z.ZodArray<z.ZodAny>]>>;
87
+ localizeInfos: z.ZodUnion<readonly [z.ZodRecord<z.ZodString, z.ZodAny>, z.ZodArray<z.ZodAny>]>;
88
+ additionalFields: z.ZodOptional<z.ZodUnion<readonly [z.ZodRecord<z.ZodString, z.ZodAny>, z.ZodArray<z.ZodAny>]>>;
89
+ settings: z.ZodOptional<z.ZodUnion<readonly [z.ZodRecord<z.ZodString, z.ZodAny>, z.ZodArray<z.ZodAny>]>>;
90
+ }, z.core.$strip>>;
@@ -0,0 +1,74 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AttributesArrayResponseSchema = exports.AttributeSetsResponseSchema = exports.AttributeSetEntitySchema = exports.AttributeEntitySchema = exports.ListTitleSchema = void 0;
4
+ /**
5
+ * Validation schemas for AttributeSets module
6
+ * @description Zod schemas for validating attribute sets-related API responses
7
+ */
8
+ const zod_1 = require("zod");
9
+ /**
10
+ * List title schema for list and radioButton attributes
11
+ */
12
+ exports.ListTitleSchema = zod_1.z.object({
13
+ title: zod_1.z.string(),
14
+ value: zod_1.z.union([zod_1.z.number(), zod_1.z.string()]),
15
+ position: zod_1.z.union([zod_1.z.string(), zod_1.z.number(), zod_1.z.null()]),
16
+ extended: zod_1.z.object({
17
+ value: zod_1.z.string().nullable(),
18
+ type: zod_1.z.string().nullable(),
19
+ }),
20
+ });
21
+ /**
22
+ * Attribute entity schema (single attribute from a set)
23
+ */
24
+ exports.AttributeEntitySchema = zod_1.z.object({
25
+ type: zod_1.z.string(),
26
+ value: zod_1.z.any().optional(),
27
+ initialValue: zod_1.z.any(),
28
+ marker: zod_1.z.string(),
29
+ position: zod_1.z.number(),
30
+ listTitles: zod_1.z
31
+ .union([zod_1.z.array(zod_1.z.any()), zod_1.z.record(zod_1.z.string(), zod_1.z.any())])
32
+ .optional(),
33
+ validators: zod_1.z
34
+ .union([zod_1.z.record(zod_1.z.string(), zod_1.z.any()), zod_1.z.array(zod_1.z.any())])
35
+ .optional(),
36
+ localizeInfos: zod_1.z.union([zod_1.z.record(zod_1.z.string(), zod_1.z.any()), zod_1.z.array(zod_1.z.any())]),
37
+ additionalFields: zod_1.z
38
+ .union([zod_1.z.record(zod_1.z.string(), zod_1.z.any()), zod_1.z.array(zod_1.z.any())])
39
+ .optional(),
40
+ settings: zod_1.z
41
+ .union([zod_1.z.record(zod_1.z.string(), zod_1.z.any()), zod_1.z.array(zod_1.z.any())])
42
+ .optional(),
43
+ });
44
+ /**
45
+ * Attribute set entity schema (attribute set object)
46
+ */
47
+ exports.AttributeSetEntitySchema = zod_1.z.object({
48
+ id: zod_1.z.number(),
49
+ createdDate: zod_1.z.string(),
50
+ updatedDate: zod_1.z.string(),
51
+ version: zod_1.z.number(),
52
+ identifier: zod_1.z.string(),
53
+ typeId: zod_1.z.number(),
54
+ title: zod_1.z.string(),
55
+ schema: zod_1.z.object({}).passthrough(),
56
+ isVisible: zod_1.z.boolean(),
57
+ properties: zod_1.z.object({}).passthrough(),
58
+ type: zod_1.z.object({
59
+ id: zod_1.z.number(),
60
+ type: zod_1.z.string(),
61
+ }),
62
+ position: zod_1.z.number(),
63
+ });
64
+ /**
65
+ * Attributes response schema (for getAttributes method)
66
+ */
67
+ exports.AttributeSetsResponseSchema = zod_1.z.object({
68
+ total: zod_1.z.number(),
69
+ items: zod_1.z.array(exports.AttributeSetEntitySchema),
70
+ });
71
+ /**
72
+ * Attributes array response schema (for getAttributesByMarker method)
73
+ */
74
+ exports.AttributesArrayResponseSchema = zod_1.z.array(exports.AttributeEntitySchema);
@@ -0,0 +1,249 @@
1
+ import AsyncModules from '../base/asyncModules';
2
+ import type StateModule from '../base/stateModule';
3
+ import type { IError } from '../base/utils';
4
+ import type { IActiveSession, IAuthEntity, IAuthPostBody, IAuthProvider, IAuthProvidersEntity, IOauthData, ISignUpData, ISignUpEntity } from './authProvidersInterfaces';
5
+ /**
6
+ * Controllers for working with auth services.
7
+ * @handle /api/content/users-auth-providers
8
+ * @class AuthProviderApi
9
+ * @augments AsyncModules
10
+ * @implements {IAuthProvider}
11
+ * @description This class provides methods for user registration, authentication, and management of authentication providers.
12
+ */
13
+ export default class AuthProviderApi extends AsyncModules implements IAuthProvider {
14
+ protected state: StateModule;
15
+ protected _url: string;
16
+ /**
17
+ * constructor
18
+ */
19
+ constructor(state: StateModule);
20
+ /**
21
+ * User registration.
22
+ * @handleName signUp
23
+ * @param {string} marker - The text identifier of the authorization provider. Example: "email".
24
+ * @param {ISignUpData} body - Request body.
25
+ * @example
26
+ {
27
+ "formIdentifier": "reg",
28
+ "authData": [
29
+ {
30
+ "marker": "login",
31
+ "value": "example@oneentry.cloud"
32
+ },
33
+ {
34
+ "marker": "password",
35
+ "value": "12345"
36
+ }
37
+ ],
38
+ "formData": [
39
+ {
40
+ "marker": "last_name",
41
+ "type": "string",
42
+ "value": "Name"
43
+ }
44
+ ],
45
+ "notificationData": {
46
+ "email": "example@oneentry.cloud",
47
+ "phonePush": ["+99999999999"],
48
+ "phoneSMS": "+99999999999"
49
+ }
50
+ }
51
+ * @param {string} body.formIdentifier - The identifier for the registration form. Example: "reg".
52
+ * @param {{ marker: string; value: string }[]} body.authData - An array of authentication data objects, each containing a marker and its corresponding value.
53
+ * @example
54
+ [
55
+ {
56
+ "marker": "login",
57
+ "value": "example@oneentry.cloud"
58
+ },
59
+ {
60
+ "marker": "password",
61
+ "value": "12345"
62
+ }
63
+ ]
64
+ * @param {IAuthFormData} body.formData - The form data for the registration, which can be a single object or an array of objects.
65
+ * @example
66
+ {
67
+ "marker": "last_name",
68
+ "type": "string",
69
+ "value": "Name"
70
+ }
71
+ * @param {object} body.notificationData - An object containing notification data, including email, phonePush, and phoneSMS.
72
+ * @example
73
+ {
74
+ "email": "example@oneentry.cloud",
75
+ "phonePush": ["+99999999999"],
76
+ "phoneSMS": "+99999999999"
77
+ }
78
+ * @param {string} body.notificationData.email - The email address to which the notification will be sent.
79
+ * @param {Array<string>} [body.notificationData.phonePush] - An array of phone numbers for push notifications. Optional.
80
+ * @param {string} [body.notificationData.phoneSMS] - The phone number for SMS notifications. Optional.
81
+ * @param {string} [langCode] - Language code. Default: "en_US".
82
+ * @returns {Promise<ISignUpEntity | IError>} Returns a user object.
83
+ * @throws {IError} When isShell=false and an error occurs during the fetch
84
+ * @description User registration (❗️For a provider with user activation, the activation code is sent through the corresponding user notification method).
85
+ */
86
+ signUp(marker: string, body: ISignUpData, langCode?: string): Promise<ISignUpEntity | IError>;
87
+ /**
88
+ * Getting a user activation code. The code is returned via the appropriate user notification method.
89
+ * @handleName generateCode
90
+ * @param {string} marker - The text identifier of the authorization provider. Example: "email".
91
+ * @param {string} userIdentifier - The text identifier of the user's object (user login). Example: "example@oneentry.cloud".
92
+ * @param {string} eventIdentifier - Text identifier of the event object for which the code is generated. Example: "user_registration".
93
+ * @returns {Promise<void | IError>} Returns void if the code is successfully generated, or an error object if there was an issue.
94
+ * @throws {IError} When isShell=false and an error occurs during the fetch
95
+ * @description Obtaining a code to activate the user.
96
+ */
97
+ generateCode(marker: string, userIdentifier: string, eventIdentifier: string): Promise<void | IError>;
98
+ /**
99
+ * User activation code verification. Returns true (if the code is correct) or false (if it is incorrect).
100
+ * @handleName checkCode
101
+ * @param {string} marker - The text identifier of the authorization provider. Example: "email".
102
+ * @param {string} userIdentifier - The text identifier of the user's object (user login). Example: "example@oneentry.cloud".
103
+ * @param {string} eventIdentifier - Text identifier of the event object for which the code is generated. Example: "user_registration".
104
+ * @param {string} code - Service code. Example: "123456".
105
+ * @returns {Promise<boolean | IError>} Returns true if the code is correct, or an error object if there was an issue.
106
+ * @throws {IError} When isShell=false and an error occurs during the fetch
107
+ * @description Checking the user activation code
108
+ */
109
+ checkCode(marker: string, userIdentifier: string, eventIdentifier: string, code: string): Promise<boolean | IError>;
110
+ /**
111
+ * User activate.
112
+ * @handleName activateUser
113
+ * @param {string} marker - The text identifier of the authorization provider. Example: "email".
114
+ * @param {string} userIdentifier - The text identifier of the user's object (user login). Example: "example@oneentry.cloud".
115
+ * @param {string} code - Service code. Example: "123456".
116
+ * @returns {Promise<boolean | IError>} Returns true if the user was successfully activated, or an error object if there was an issue.
117
+ * @throws {IError} When isShell=false and an error occurs during the fetch
118
+ * @description User activation.
119
+ */
120
+ activateUser(marker: string, userIdentifier: string, code: string): Promise<boolean | IError>;
121
+ /**
122
+ * User authorization.
123
+ * @handleName auth
124
+ * @param {string} marker - The text identifier of the authorization provider. Example: "email".
125
+ * @param {IAuthPostBody} body - Objects contains auth information.
126
+ * @example
127
+ {
128
+ "authData": [
129
+ {
130
+ "marker": "login",
131
+ "value": "example@oneentry.cloud"
132
+ },
133
+ {
134
+ "marker": "password",
135
+ "value": "12345"
136
+ }
137
+ ]
138
+ }
139
+ * @param {{ marker: string; value: string | number }[]} body.authData - An array of authentication data objects, each containing a marker and its corresponding value.
140
+ * @example
141
+ [
142
+ {
143
+ "marker": "login",
144
+ "value": "user@example.com"
145
+ }
146
+ ]
147
+ * @param {string} body.authData[index].marker - The marker for the authentication data. Example: "login".
148
+ * @param {string} body.authData[index].value - The value for the authentication data. Example: "user@example.com".
149
+ * @returns {Promise<IAuthEntity | IError>} Returns an auth entity object.
150
+ * @throws {IError} When isShell=false and an error occurs during the fetch
151
+ * @description User authorization.
152
+ */
153
+ auth(marker: string, body: IAuthPostBody): Promise<IAuthEntity | IError>;
154
+ /**
155
+ * Refresh token.
156
+ * @handleName refresh
157
+ * @param {string} marker - The text identifier of the authorization provider. Example: "email".
158
+ * @param {string} token - Refresh token. Example: "abcdef123456".
159
+ * @returns {Promise<IAuthEntity | IError>} Returns an auth entity object with the following values: accessToken, refreshToken, user, and other auth-related data.
160
+ * @throws {IError} When isShell=false and an error occurs during the fetch
161
+ * @description User token refresh.
162
+ */
163
+ refresh(marker: string, token: string): Promise<IAuthEntity | IError>;
164
+ /**
165
+ * User account logout.
166
+ * @handleName logout
167
+ * @param {string} marker - The text identifier of the authorization provider. Example: "email".
168
+ * @param {string} token - Refresh token. Example: "abcdef123456".
169
+ * @returns {Promise<boolean | IError>} Returns true if the logout was successful, or an error object if there was an issue.
170
+ * @throws {IError} When isShell=false and an error occurs during the fetch
171
+ * @description This method requires user authorization.
172
+ * @see For more information about configuring the {@link https://js-sdk.oneentry.cloud/docs/category/authprovider authorization module}, see the documentation in the {@link https://js-sdk.oneentry.cloud/docs/category/authprovider configuration settings section of the SDK}.
173
+ */
174
+ logout(marker: string, token: string): Promise<boolean | IError>;
175
+ /**
176
+ * Logout of user account on all devices.
177
+ * @handleName logoutAll
178
+ * @param {string} marker - The text identifier of the authorization provider. Example: "email".
179
+ * @returns {Promise<boolean | IError>} Returns true if the logout was successful, or an error object if there was an issue.
180
+ * @throws {IError} When isShell=false and an error occurs during the fetch
181
+ * @description This method requires user authorization.
182
+ * @see For more information about configuring the {@link https://js-sdk.oneentry.cloud/docs/category/authprovider authorization module}, see the documentation in the {@link https://js-sdk.oneentry.cloud/docs/category/authprovider configuration settings section of the SDK}.
183
+ */
184
+ logoutAll(marker: string): Promise<boolean | IError>;
185
+ /**
186
+ * Change password.
187
+ * @handleName changePassword
188
+ * @param {string} marker - The text identifier of the authorization provider. Example: "email".
189
+ * @param {string} userIdentifier - The text identifier of the user's object (user login). Example: "example@oneentry.cloud".
190
+ * @param {string} eventIdentifier - The text identifier of the event. Example: "reg".
191
+ * @param {string} type - Operation type (1 - for changing password, 2 - for recovery). Example: 1.
192
+ * @param {string} code - Service code. Example: "123456".
193
+ * @param {string} newPassword - New password. Example: "newPassword123".
194
+ * @param {string} [repeatPassword] - Optional variable contains repeat new password for validation. Example: "newPassword123".
195
+ * @returns {Promise<boolean | IError>} Returns true if the password was successfully changed, or an error object if there was an issue.
196
+ * @throws {IError} When isShell=false and an error occurs during the fetch
197
+ * @description User password change (only for tariffs with account activation and the Activation feature enabled).
198
+ */
199
+ changePassword(marker: string, userIdentifier: string, eventIdentifier: string, type: number, code: string, newPassword: string, repeatPassword?: string): Promise<boolean | IError>;
200
+ /**
201
+ * Get all auth providers objects.
202
+ * @handleName getAuthProviders
203
+ * @param {string} [langCode] - Language code. Default: "en_US".
204
+ * @param {number} [offset] - Parameter for pagination. Default: 0.
205
+ * @param {number} [limit] - Parameter for pagination. Default: 30.
206
+ * @returns {Promise<IAuthProvidersEntity[] | IError>} Returns an array of auth provider objects.
207
+ * @throws {IError} When isShell=false and an error occurs during the fetch
208
+ * @description Getting all objects of authorization providers.
209
+ */
210
+ getAuthProviders(langCode?: string, offset?: number, limit?: number): Promise<IAuthProvidersEntity[] | IError>;
211
+ /**
212
+ * Get one auth provider object by marker.
213
+ * @handleName getAuthProviderByMarker
214
+ * @param {string} marker - The text identifier of the authorization provider. Example: "email".
215
+ * @param {string} [langCode] - Language code. Default: "en_US".
216
+ * @returns {Promise<IAuthProvidersEntity | IError>} Returns an auth provider object.
217
+ * @throws {IError} When isShell=false and an error occurs during the fetch
218
+ * @description Getting a single authorization provider object by marker.
219
+ */
220
+ getAuthProviderByMarker(marker: string, langCode?: string): Promise<IAuthProvidersEntity | IError>;
221
+ /**
222
+ * Getting active user sessions data.
223
+ * @handleName getActiveSessionsByMarker
224
+ * @param {string} marker - The text identifier of the authorization provider. Example: "email".
225
+ * @returns {Promise<IActiveSession[] | IError>} Returns an auth provider object.
226
+ * @throws {IError} When isShell=false and an error occurs during the fetch
227
+ * @description Getting a single authorization provider object by marker.
228
+ */
229
+ getActiveSessionsByMarker(marker: string): Promise<IActiveSession[] | IError>;
230
+ /**
231
+ * User registration (authorization) via OAUTH.
232
+ * @handleName oauth
233
+ * @param {string} marker - The text identifier of the authorization provider. Example: "email".
234
+ * @param {IOauthData} body - Object contains OAuth information for registration.
235
+ * @example
236
+ {
237
+ "client_id": "34346983-luuct343473qdkqidjopdfp3eb3k4thp.apps.googleusercontent.com",
238
+ "client_secret": "43434343434",
239
+ "code": "4/0AVMBsJgwewewewewewei4D7T6E_fbswxnL3g",
240
+ "grant_type": "authorization_code",
241
+ "redirect_uri": "http://localhost:3000"
242
+ }
243
+ * @param {string} [langCode] - Language code. Default: "en_US".
244
+ * @returns {Promise<ISignUpEntity | IError>} Returns a user object.
245
+ * @throws {IError} When isShell=false and an error occurs during the fetch
246
+ * @description User registration (authorization) via OAUTH.
247
+ */
248
+ oauth(marker: string, body: IOauthData, langCode?: string): Promise<IAuthEntity | IError>;
249
+ }