oneentry 1.0.146 → 1.0.147
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/admins/adminsApi.d.ts +4 -3
- package/dist/admins/adminsApi.js +1 -1
- package/dist/admins/adminsInterfaces.d.ts +4 -4
- package/dist/admins/adminsSchemas.d.ts +24 -8
- package/dist/admins/adminsSchemas.js +11 -5
- package/dist/attribute-sets/attributeSetsInterfaces.d.ts +121 -24
- package/dist/auth-provider/authProvidersInterfaces.d.ts +34 -25
- package/dist/base/utils.d.ts +155 -63
- package/dist/blocks/blocksApi.d.ts +3 -3
- package/dist/blocks/blocksApi.js +1 -1
- package/dist/blocks/blocksInterfaces.d.ts +7 -7
- package/dist/blocks/blocksSchemas.d.ts +52 -8
- package/dist/discounts/discountsInterfaces.d.ts +53 -19
- package/dist/forms/formsInterfaces.d.ts +84 -14
- package/dist/forms-data/formsDataInterfaces.d.ts +140 -65
- package/dist/menus/menusInterfaces.d.ts +1 -1
- package/dist/orders/ordersInterfaces.d.ts +81 -19
- package/dist/orders/ordersSchemas.d.ts +73 -2
- package/dist/orders/ordersSchemas.js +32 -3
- package/dist/pages/pagesApi.js +1 -1
- package/dist/pages/pagesInterfaces.d.ts +8 -8
- package/dist/payments/paymentsInterfaces.d.ts +41 -16
- package/dist/products/productsApi.d.ts +26 -19
- package/dist/products/productsApi.js +27 -20
- package/dist/products/productsInterfaces.d.ts +109 -33
- package/dist/products/productsSchemas.d.ts +52 -8
- package/dist/products/productsSchemas.js +15 -2
- package/dist/sitemap/sitemapApi.d.ts +4 -4
- package/dist/sitemap/sitemapApi.js +2 -2
- package/dist/sitemap/sitemapInterfaces.d.ts +13 -11
- package/dist/templates/templatesApi.js +8 -3
- package/dist/templates/templatesInterfaces.d.ts +3 -3
- package/dist/templates-preview/templatesPreviewInterfaces.d.ts +22 -8
- package/dist/users/usersInterfaces.d.ts +4 -8
- package/package.json +2 -2
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import AsyncModules from '../base/asyncModules';
|
|
2
2
|
import type StateModule from '../base/stateModule';
|
|
3
|
-
import type {
|
|
3
|
+
import type { IError } from '../base/utils';
|
|
4
|
+
import type { IFilterParams } from '../products/productsInterfaces';
|
|
4
5
|
import type { IAdminEntity, IAdmins } from './adminsInterfaces';
|
|
5
6
|
/**
|
|
6
7
|
* Controllers for working with users - admins.
|
|
@@ -23,7 +24,7 @@ export default class AdminsApi extends AsyncModules implements IAdmins {
|
|
|
23
24
|
/**
|
|
24
25
|
* Get all admins objects with filters.
|
|
25
26
|
* @handleName getAdminsInfo
|
|
26
|
-
* @param {
|
|
27
|
+
* @param {IFilterParams[]} [body] - Array of filter objects with search conditions. Default: [].
|
|
27
28
|
* @example
|
|
28
29
|
[
|
|
29
30
|
{
|
|
@@ -46,5 +47,5 @@ export default class AdminsApi extends AsyncModules implements IAdmins {
|
|
|
46
47
|
* @returns {Promise<IAdminEntity[] | IError>} Returns an array of admin objects.
|
|
47
48
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
48
49
|
*/
|
|
49
|
-
getAdminsInfo(body?:
|
|
50
|
+
getAdminsInfo(body?: IFilterParams[], langCode?: string, offset?: number, limit?: number): Promise<IAdminEntity[] | IError>;
|
|
50
51
|
}
|
package/dist/admins/adminsApi.js
CHANGED
|
@@ -27,7 +27,7 @@ class AdminsApi extends asyncModules_1.default {
|
|
|
27
27
|
/**
|
|
28
28
|
* Get all admins objects with filters.
|
|
29
29
|
* @handleName getAdminsInfo
|
|
30
|
-
* @param {
|
|
30
|
+
* @param {IFilterParams[]} [body] - Array of filter objects with search conditions. Default: [].
|
|
31
31
|
* @example
|
|
32
32
|
[
|
|
33
33
|
{
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { IAttributeValues, IError } from '../base/utils';
|
|
2
2
|
import type { IFormConfig } from '../forms/formsInterfaces';
|
|
3
|
+
import type { IFilterParams } from '../products/productsInterfaces';
|
|
3
4
|
/**
|
|
4
5
|
* @interface IAdmins
|
|
5
6
|
* @description This interface defines the contract for any class that implements it
|
|
@@ -8,7 +9,7 @@ interface IAdmins {
|
|
|
8
9
|
/**
|
|
9
10
|
* Get all admins objects with filters.
|
|
10
11
|
* @handleName getAdminsInfo
|
|
11
|
-
* @param {
|
|
12
|
+
* @param {IFilterParams[]} [body] - Array of filter objects with search conditions. Default: [].
|
|
12
13
|
* @example
|
|
13
14
|
[
|
|
14
15
|
{
|
|
@@ -31,7 +32,7 @@ interface IAdmins {
|
|
|
31
32
|
* @returns {IAdminEntity[]} Returns an array of admin objects.
|
|
32
33
|
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
33
34
|
*/
|
|
34
|
-
getAdminsInfo(body?:
|
|
35
|
+
getAdminsInfo(body?: IFilterParams[], langCode?: string, offset?: number, limit?: number): Promise<IAdminEntity[] | IError>;
|
|
35
36
|
}
|
|
36
37
|
/**
|
|
37
38
|
* Interface representing a Position entity.
|
|
@@ -83,7 +84,6 @@ interface IAdminEntity {
|
|
|
83
84
|
isSync: boolean;
|
|
84
85
|
attributeValues: IAttributeValues;
|
|
85
86
|
moduleFormConfigs?: IFormConfig[];
|
|
86
|
-
[key: string]: unknown;
|
|
87
87
|
}
|
|
88
88
|
/**
|
|
89
89
|
* Interface representing a query for fetching admin data.
|
|
@@ -3,10 +3,6 @@
|
|
|
3
3
|
* @description Zod schemas for validating admins-related API responses
|
|
4
4
|
*/
|
|
5
5
|
import { z } from 'zod';
|
|
6
|
-
/**
|
|
7
|
-
* Admin entity schema
|
|
8
|
-
* Includes all fields returned by the API
|
|
9
|
-
*/
|
|
10
6
|
export declare const AdminEntitySchema: z.ZodObject<{
|
|
11
7
|
id: z.ZodNumber;
|
|
12
8
|
attributeSetId: z.ZodNullable<z.ZodNumber>;
|
|
@@ -14,9 +10,19 @@ export declare const AdminEntitySchema: z.ZodObject<{
|
|
|
14
10
|
attributeSetIdentifier: z.ZodNullable<z.ZodString>;
|
|
15
11
|
position: z.ZodNullable<z.ZodNumber>;
|
|
16
12
|
isSync: z.ZodBoolean;
|
|
17
|
-
attributeValues: z.ZodRecord<z.ZodString, z.
|
|
13
|
+
attributeValues: z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodType<{
|
|
14
|
+
type: string;
|
|
15
|
+
value: unknown;
|
|
16
|
+
position?: number;
|
|
17
|
+
additionalFields?: Record<string, unknown> | unknown[];
|
|
18
|
+
}, unknown, z.core.$ZodTypeInternals<{
|
|
19
|
+
type: string;
|
|
20
|
+
value: unknown;
|
|
21
|
+
position?: number;
|
|
22
|
+
additionalFields?: Record<string, unknown> | unknown[];
|
|
23
|
+
}, unknown>>>>;
|
|
18
24
|
moduleFormConfigs: z.ZodOptional<z.ZodArray<z.ZodAny>>;
|
|
19
|
-
}, z.core.$
|
|
25
|
+
}, z.core.$strip>;
|
|
20
26
|
/**
|
|
21
27
|
* Admins response schema (array of admin entities)
|
|
22
28
|
*/
|
|
@@ -27,6 +33,16 @@ export declare const AdminsResponseSchema: z.ZodArray<z.ZodObject<{
|
|
|
27
33
|
attributeSetIdentifier: z.ZodNullable<z.ZodString>;
|
|
28
34
|
position: z.ZodNullable<z.ZodNumber>;
|
|
29
35
|
isSync: z.ZodBoolean;
|
|
30
|
-
attributeValues: z.ZodRecord<z.ZodString, z.
|
|
36
|
+
attributeValues: z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodType<{
|
|
37
|
+
type: string;
|
|
38
|
+
value: unknown;
|
|
39
|
+
position?: number;
|
|
40
|
+
additionalFields?: Record<string, unknown> | unknown[];
|
|
41
|
+
}, unknown, z.core.$ZodTypeInternals<{
|
|
42
|
+
type: string;
|
|
43
|
+
value: unknown;
|
|
44
|
+
position?: number;
|
|
45
|
+
additionalFields?: Record<string, unknown> | unknown[];
|
|
46
|
+
}, unknown>>>>;
|
|
31
47
|
moduleFormConfigs: z.ZodOptional<z.ZodArray<z.ZodAny>>;
|
|
32
|
-
}, z.core.$
|
|
48
|
+
}, z.core.$strip>>;
|
|
@@ -10,18 +10,24 @@ const zod_1 = require("zod");
|
|
|
10
10
|
* Admin entity schema
|
|
11
11
|
* Includes all fields returned by the API
|
|
12
12
|
*/
|
|
13
|
-
|
|
14
|
-
.
|
|
13
|
+
const AttributeValueSchema = zod_1.z.object({
|
|
14
|
+
type: zod_1.z.string(),
|
|
15
|
+
value: zod_1.z.unknown(),
|
|
16
|
+
position: zod_1.z.number().optional(),
|
|
17
|
+
additionalFields: zod_1.z
|
|
18
|
+
.union([zod_1.z.record(zod_1.z.string(), zod_1.z.unknown()), zod_1.z.array(zod_1.z.unknown())])
|
|
19
|
+
.optional(),
|
|
20
|
+
});
|
|
21
|
+
exports.AdminEntitySchema = zod_1.z.object({
|
|
15
22
|
id: zod_1.z.number(),
|
|
16
23
|
attributeSetId: zod_1.z.number().nullable(),
|
|
17
24
|
identifier: zod_1.z.string(),
|
|
18
25
|
attributeSetIdentifier: zod_1.z.string().nullable(),
|
|
19
26
|
position: zod_1.z.number().nullable(),
|
|
20
27
|
isSync: zod_1.z.boolean(),
|
|
21
|
-
attributeValues: zod_1.z.record(zod_1.z.string(), zod_1.z.
|
|
28
|
+
attributeValues: zod_1.z.record(zod_1.z.string(), zod_1.z.record(zod_1.z.string(), AttributeValueSchema)),
|
|
22
29
|
moduleFormConfigs: zod_1.z.array(zod_1.z.any()).optional(),
|
|
23
|
-
})
|
|
24
|
-
.catchall(zod_1.z.any());
|
|
30
|
+
});
|
|
25
31
|
/**
|
|
26
32
|
* Admins response schema (array of admin entities)
|
|
27
33
|
*/
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { IError,
|
|
1
|
+
import type { IAttributeLocalizeInfo, IError, ITimeIntervalSchedule } from '../base/utils';
|
|
2
2
|
/**
|
|
3
3
|
* Interface for retrieving attributes based on markers and language codes.
|
|
4
4
|
* @interface IAttributesSets
|
|
@@ -40,12 +40,37 @@ interface IAttributesSets {
|
|
|
40
40
|
*/
|
|
41
41
|
interface IListTitle {
|
|
42
42
|
title: string;
|
|
43
|
-
value: number | string;
|
|
44
|
-
position
|
|
45
|
-
extended
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
43
|
+
value: number | string | IListTitleEntityValue;
|
|
44
|
+
position?: string | number | null;
|
|
45
|
+
extended?: IListTitleExtended;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* @interface IListTitleEntityValue
|
|
49
|
+
* @property {number | string} id - Identifier of the linked entity. Example: 10 or "p-10-2954".
|
|
50
|
+
* @property {number} depth - Nesting depth of the entity. Example: 1.
|
|
51
|
+
* @property {boolean} isPinned - Whether the entry is pinned in the list. Example: false.
|
|
52
|
+
* @property {number | null} parentId - Parent entity id, or null for top-level. Example: 10.
|
|
53
|
+
* @property {number | string} position - Sort position; numeric for products, lex-sortable string for categories.
|
|
54
|
+
* @property {boolean} [selected] - Whether the entry is currently selected. Optional.
|
|
55
|
+
* @description Object value used by `entity`-type {@link IListTitle} entries.
|
|
56
|
+
*/
|
|
57
|
+
interface IListTitleEntityValue {
|
|
58
|
+
id: number | string;
|
|
59
|
+
depth: number;
|
|
60
|
+
isPinned: boolean;
|
|
61
|
+
parentId: number | null;
|
|
62
|
+
position: number | string;
|
|
63
|
+
selected?: boolean;
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* @interface IListTitleExtended
|
|
67
|
+
* @property {string | null} value - Extended value associated with the list option (e.g. a hex color, code or extra label). Example: "#ff0000".
|
|
68
|
+
* @property {string | null} type - Type of the extended value. Example: "color".
|
|
69
|
+
* @description Optional extended payload attached to a {@link IListTitle} option.
|
|
70
|
+
*/
|
|
71
|
+
interface IListTitleExtended {
|
|
72
|
+
value: string | null;
|
|
73
|
+
type: string | null;
|
|
49
74
|
}
|
|
50
75
|
/**
|
|
51
76
|
* Defines the possible values for attribute types used in the system.
|
|
@@ -61,7 +86,7 @@ type AttributeType = 'string' | 'text' | 'textWithHeader' | 'integer' | 'real' |
|
|
|
61
86
|
* @property {unknown} initialValue - Initial value of the attribute.
|
|
62
87
|
* @property {string} marker - Textual identifier of the attribute (marker). Example: "color", "size", "etc".
|
|
63
88
|
* @property {number} position - Position number for sorting. Example: 1.
|
|
64
|
-
* @property {IListTitle[]
|
|
89
|
+
* @property {IListTitle[]} listTitles - Array of values (with extended data) for list and radioButton attributes; empty array for non-list types.
|
|
65
90
|
* @example
|
|
66
91
|
[
|
|
67
92
|
{
|
|
@@ -79,7 +104,7 @@ type AttributeType = 'string' | 'text' | 'textWithHeader' | 'integer' | 'real' |
|
|
|
79
104
|
"extendedValueType": null
|
|
80
105
|
}
|
|
81
106
|
]
|
|
82
|
-
* @property {
|
|
107
|
+
* @property {IAttributeValidators} validators - Set of validators for validation; empty object when no validators are configured.
|
|
83
108
|
* @example
|
|
84
109
|
{
|
|
85
110
|
"requiredValidator": {
|
|
@@ -89,12 +114,12 @@ type AttributeType = 'string' | 'text' | 'textWithHeader' | 'integer' | 'real' |
|
|
|
89
114
|
"fieldDefaultValue": 11
|
|
90
115
|
}
|
|
91
116
|
}
|
|
92
|
-
* @property {
|
|
117
|
+
* @property {IAttributeLocalizeInfo} localizeInfos - The name of the template, taking into account localization.
|
|
93
118
|
* @example
|
|
94
119
|
{
|
|
95
120
|
"title": "My attribute"
|
|
96
121
|
}
|
|
97
|
-
* @property {Record<string,
|
|
122
|
+
* @property {Record<string, IAttributesSetsEntity>} additionalFields - Nested sub-attributes keyed by marker; empty object when none.
|
|
98
123
|
* @description This interface defines the structure of an attribute set entity, including its type, marker, position, validators, localization information, list titles, additional fields, and settings.
|
|
99
124
|
*/
|
|
100
125
|
interface IAttributesSetsEntity {
|
|
@@ -103,10 +128,75 @@ interface IAttributesSetsEntity {
|
|
|
103
128
|
initialValue: unknown;
|
|
104
129
|
marker: string;
|
|
105
130
|
position: number;
|
|
106
|
-
listTitles
|
|
107
|
-
validators
|
|
108
|
-
localizeInfos:
|
|
109
|
-
additionalFields
|
|
131
|
+
listTitles: IListTitle[];
|
|
132
|
+
validators: IAttributeValidators;
|
|
133
|
+
localizeInfos: IAttributeLocalizeInfo;
|
|
134
|
+
additionalFields: Record<string, IAttributesSetsEntity>;
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* @interface IAttributeSchemaItem
|
|
138
|
+
* @property {number} id - Unique identifier of the schema item. Example: 1.
|
|
139
|
+
* @property {string} identifier - Field marker (machine name) within the schema. Example: "name".
|
|
140
|
+
* @property {unknown} initialValue - Default value applied when the field is not filled.
|
|
141
|
+
* @property {boolean} isPrice - Whether the field's numeric value is treated as the price for product entities. Example: false.
|
|
142
|
+
* @property {boolean} isVisible - Whether the field is exposed in the public API/UI. Example: true.
|
|
143
|
+
* @property {IAttributeLocalizeInfo} localizeInfos - Localized labels for the field.
|
|
144
|
+
* @property {boolean} original - Whether the field is part of the original (system) schema, not a user extension. Example: true.
|
|
145
|
+
* @property {AttributeType} type - Attribute data type (e.g. "string", "file").
|
|
146
|
+
* @property {Record<string, IAttributeSchemaItem>} [additionalFields] - Nested sub-fields keyed by marker. Optional.
|
|
147
|
+
* @property {IAttributeValidators} [validators] - Validation rules for the field. Optional.
|
|
148
|
+
* @property {boolean | string} [splitUnit] - Splitting unit configuration; `false` when disabled, otherwise the unit name (e.g. "percent"). Optional, used by numeric fields.
|
|
149
|
+
* @property {boolean} [isCurrency] - Whether the field stores currency values. Optional.
|
|
150
|
+
* @property {boolean} [splitPrice] - Whether the price is split between several fields. Optional.
|
|
151
|
+
* @property {boolean} [isCompress] - Whether uploaded images are compressed. Optional, used by `image`/`groupOfImages` fields.
|
|
152
|
+
* @property {boolean} [receiveValues] - For `timeInterval` fields — whether the field receives precomputed values. Optional.
|
|
153
|
+
* @property {ITimeIntervalSchedule[]} [intervals] - For `timeInterval` fields — top-level schedule definition (separate from `localizeInfos.intervals`). Optional.
|
|
154
|
+
* @property {unknown} [value] - For `timeInterval` fields — current value/state of the schedule. Optional.
|
|
155
|
+
* @description Definition of a single field inside an attribute set's schema.
|
|
156
|
+
*/
|
|
157
|
+
interface IAttributeSchemaItem {
|
|
158
|
+
id: number;
|
|
159
|
+
identifier: string;
|
|
160
|
+
initialValue: unknown;
|
|
161
|
+
isPrice: boolean;
|
|
162
|
+
isVisible: boolean;
|
|
163
|
+
localizeInfos: IAttributeLocalizeInfo;
|
|
164
|
+
original: boolean;
|
|
165
|
+
type: AttributeType;
|
|
166
|
+
additionalFields?: Record<string, IAttributeSchemaItem>;
|
|
167
|
+
validators?: IAttributeValidators;
|
|
168
|
+
splitUnit?: boolean | string;
|
|
169
|
+
isCurrency?: boolean;
|
|
170
|
+
splitPrice?: boolean;
|
|
171
|
+
isCompress?: boolean;
|
|
172
|
+
receiveValues?: boolean;
|
|
173
|
+
intervals?: ITimeIntervalSchedule[];
|
|
174
|
+
value?: unknown;
|
|
175
|
+
}
|
|
176
|
+
/**
|
|
177
|
+
* @interface IAttributeValidators
|
|
178
|
+
* @property {object} [requiredValidator] - Marks the field as required. Shape: `{ strict: boolean }`. Example: `{ strict: true }`.
|
|
179
|
+
* @property {object} [stringInspectionValidator] - Length constraints for string fields. Shape: `{ stringMin: number; stringMax: number; stringLength: number }`.
|
|
180
|
+
* @property {boolean} [emailInspectionValidator] - Toggle for email-format validation.
|
|
181
|
+
* @property {object} [defaultValueValidator] - Default value configuration with optional custom error text. Shape: `{ customErrorText?: string; fieldDefaultValue?: unknown; fieldDefaultValue2?: unknown }`.
|
|
182
|
+
* @description Map of validators applied to an attribute or form field. Set is extensible — additional validator types may be added by the API.
|
|
183
|
+
*/
|
|
184
|
+
interface IAttributeValidators {
|
|
185
|
+
requiredValidator?: {
|
|
186
|
+
strict: boolean;
|
|
187
|
+
};
|
|
188
|
+
stringInspectionValidator?: {
|
|
189
|
+
stringMin: number;
|
|
190
|
+
stringMax: number;
|
|
191
|
+
stringLength: number;
|
|
192
|
+
};
|
|
193
|
+
emailInspectionValidator?: boolean;
|
|
194
|
+
defaultValueValidator?: {
|
|
195
|
+
customErrorText?: string;
|
|
196
|
+
fieldDefaultValue?: unknown;
|
|
197
|
+
fieldDefaultValue2?: unknown;
|
|
198
|
+
};
|
|
199
|
+
[key: string]: unknown;
|
|
110
200
|
}
|
|
111
201
|
/**
|
|
112
202
|
* Represents an attribute set entity.
|
|
@@ -118,7 +208,7 @@ interface IAttributesSetsEntity {
|
|
|
118
208
|
* @property {string} identifier - A string that uniquely identifies the attribute set. Example: "attributeSet1".
|
|
119
209
|
* @property {number} typeId - The numerical identifier representing the type of the attribute set. Example: 1.
|
|
120
210
|
* @property {string} title - The title or name of the attribute set. Example: "Product Attributes".
|
|
121
|
-
* @property {
|
|
211
|
+
* @property {Record<string, IAttributeSchemaItem>} schema - Schema fields keyed by marker.
|
|
122
212
|
* @example
|
|
123
213
|
{
|
|
124
214
|
"attribute1": {
|
|
@@ -133,7 +223,7 @@ interface IAttributesSetsEntity {
|
|
|
133
223
|
}
|
|
134
224
|
}
|
|
135
225
|
* @property {boolean} isVisible - Indicates whether the attribute set is visible or not. Example: true.
|
|
136
|
-
* @property {
|
|
226
|
+
* @property {Record<string, unknown>} properties - Additional properties associated with the attribute set; empty object when none.
|
|
137
227
|
* @example
|
|
138
228
|
{
|
|
139
229
|
"color": "red",
|
|
@@ -151,15 +241,22 @@ interface IAttributeSetsEntity {
|
|
|
151
241
|
identifier: string;
|
|
152
242
|
typeId: number;
|
|
153
243
|
title: string;
|
|
154
|
-
schema:
|
|
244
|
+
schema: Record<string, IAttributeSchemaItem>;
|
|
155
245
|
isVisible: boolean;
|
|
156
|
-
properties:
|
|
157
|
-
type:
|
|
158
|
-
id: number;
|
|
159
|
-
type: string;
|
|
160
|
-
};
|
|
246
|
+
properties: Record<string, unknown>;
|
|
247
|
+
type: IAttributeSetTypeRef;
|
|
161
248
|
position: number;
|
|
162
249
|
}
|
|
250
|
+
/**
|
|
251
|
+
* @interface IAttributeSetTypeRef
|
|
252
|
+
* @property {number} id - Internal type identifier. Example: 1.
|
|
253
|
+
* @property {string} type - Type identifier (e.g. "forAdmins", "forForms", "forProducts"). Example: "forAdmins".
|
|
254
|
+
* @description Reference to the attribute set type — defines what entity the set is bound to.
|
|
255
|
+
*/
|
|
256
|
+
interface IAttributeSetTypeRef {
|
|
257
|
+
id: number;
|
|
258
|
+
type: string;
|
|
259
|
+
}
|
|
163
260
|
/**
|
|
164
261
|
* Represents the response structure for attribute sets.
|
|
165
262
|
* @interface IAttributesSetsResponse
|
|
@@ -182,4 +279,4 @@ interface IAttributesSetsResponse {
|
|
|
182
279
|
total: number;
|
|
183
280
|
items: IAttributeSetsEntity[];
|
|
184
281
|
}
|
|
185
|
-
export type { AttributeType, IAttributeSetsEntity, IAttributesSets, IAttributesSetsEntity, IAttributesSetsResponse, IListTitle, };
|
|
282
|
+
export type { AttributeType, IAttributeSchemaItem, IAttributeSetsEntity, IAttributeSetTypeRef, IAttributesSets, IAttributesSetsEntity, IAttributesSetsResponse, IAttributeValidators, IListTitle, IListTitleEntityValue, IListTitleExtended, };
|
|
@@ -199,22 +199,27 @@ interface IAuthFormData {
|
|
|
199
199
|
* @property {string} [langCode] - Language code. Default: "en_US".
|
|
200
200
|
* @property {Array} authData - An array of authentication data objects, each containing a marker and its corresponding value.
|
|
201
201
|
* @property {IAuthFormData | IAuthFormData[]} formData - The form data for the registration.
|
|
202
|
-
* @property {
|
|
202
|
+
* @property {INotificationData} notificationData - An object containing notification data, including 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 {
|
|
206
206
|
formIdentifier: string;
|
|
207
207
|
langCode?: string;
|
|
208
|
-
authData:
|
|
209
|
-
marker: string;
|
|
210
|
-
value: string;
|
|
211
|
-
}>;
|
|
208
|
+
authData: IAuthData[];
|
|
212
209
|
formData: IAuthFormData | IAuthFormData[];
|
|
213
|
-
notificationData:
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
210
|
+
notificationData: INotificationData;
|
|
211
|
+
}
|
|
212
|
+
/**
|
|
213
|
+
* @interface INotificationData
|
|
214
|
+
* @property {string} email - User's email used for notifications. Example: "example@oneentry.cloud".
|
|
215
|
+
* @property {string[]} phonePush - Phone numbers used for push notifications. Example: ["+19999999999"].
|
|
216
|
+
* @property {string} [phoneSMS] - Phone number used for SMS notifications. Example: "+19999999999".
|
|
217
|
+
* @description Notification channels configured for a user.
|
|
218
|
+
*/
|
|
219
|
+
interface INotificationData {
|
|
220
|
+
email: string;
|
|
221
|
+
phonePush: string[];
|
|
222
|
+
phoneSMS?: string;
|
|
218
223
|
}
|
|
219
224
|
/**
|
|
220
225
|
* Interface representing the data required for user registration via OAUTH.
|
|
@@ -241,7 +246,7 @@ interface IOauthData {
|
|
|
241
246
|
* @property {number} version - The version number of the sign-up entity. Example: 1.
|
|
242
247
|
* @property {string} identifier - A unique string that identifies the sign-up entity. Example: "signup_12345".
|
|
243
248
|
* @property {boolean} isActive - Indicates whether the sign-up entity is active. Example: true.
|
|
244
|
-
* @property {
|
|
249
|
+
* @property {IAuthFormData[]} formData - Form data array.
|
|
245
250
|
* @example
|
|
246
251
|
[
|
|
247
252
|
{
|
|
@@ -249,7 +254,7 @@ interface IOauthData {
|
|
|
249
254
|
"value": "John"
|
|
250
255
|
}
|
|
251
256
|
]
|
|
252
|
-
* @property {
|
|
257
|
+
* @property {INotificationData} notificationData - An object containing notification data, including email, phonePush, and phoneSMS.
|
|
253
258
|
* @example
|
|
254
259
|
{
|
|
255
260
|
"email": "example@oneentry.cloud",
|
|
@@ -271,18 +276,14 @@ interface ISignUpEntity {
|
|
|
271
276
|
version: number;
|
|
272
277
|
identifier: string;
|
|
273
278
|
isActive: boolean;
|
|
274
|
-
formData:
|
|
275
|
-
notificationData:
|
|
276
|
-
email: string;
|
|
277
|
-
phonePush: Array<string>;
|
|
278
|
-
phoneSMS?: string;
|
|
279
|
-
};
|
|
279
|
+
formData: IAuthFormData[];
|
|
280
|
+
notificationData: INotificationData;
|
|
280
281
|
locale?: string;
|
|
281
282
|
createdDate?: string;
|
|
282
283
|
importId?: unknown;
|
|
283
284
|
deletedAt?: string | null;
|
|
284
285
|
isDeleted?: boolean;
|
|
285
|
-
state?: Record<string,
|
|
286
|
+
state?: Record<string, unknown>;
|
|
286
287
|
rating?: IRating;
|
|
287
288
|
}
|
|
288
289
|
/**
|
|
@@ -408,10 +409,18 @@ interface IAuthPostBody {
|
|
|
408
409
|
* @description This interface defines the structure of the body used in authentication requests, containing an array of authentication data.
|
|
409
410
|
*/
|
|
410
411
|
interface IActiveSession {
|
|
411
|
-
deviceInfo:
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
412
|
+
deviceInfo: IDeviceInfo;
|
|
413
|
+
}
|
|
414
|
+
/**
|
|
415
|
+
* @interface IDeviceInfo
|
|
416
|
+
* @property {string} os - The operating system of the active session. Example: "Win32".
|
|
417
|
+
* @property {string} browser - The browser used in the active session. Example: "Node.js/22".
|
|
418
|
+
* @property {string} location - The locale of the active session. Example: "ru-RU".
|
|
419
|
+
* @description Information about the device tied to an active authentication session.
|
|
420
|
+
*/
|
|
421
|
+
interface IDeviceInfo {
|
|
422
|
+
os: string;
|
|
423
|
+
browser: string;
|
|
424
|
+
location: string;
|
|
416
425
|
}
|
|
417
|
-
export type { IActiveSession, IAuthData, IAuthEntity, IAuthFormData, IAuthPostBody, IAuthProvider, IAuthProvidersEntity, ICodeEntity, IOauthData, ISignUpData, ISignUpEntity, };
|
|
426
|
+
export type { IActiveSession, IAuthData, IAuthEntity, IAuthFormData, IAuthPostBody, IAuthProvider, IAuthProvidersEntity, ICodeEntity, IDeviceInfo, INotificationData, IOauthData, ISignUpData, ISignUpEntity, };
|