oneentry 1.0.126 → 1.0.127
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +0 -2
- package/configure.js +25 -18
- package/dist/admins/adminsApi.d.ts +30 -25
- package/dist/admins/adminsApi.js +30 -25
- package/dist/admins/adminsInterfaces.d.ts +45 -54
- package/dist/attribute-sets/attributeSetsApi.d.ts +26 -27
- package/dist/attribute-sets/attributeSetsApi.js +26 -27
- package/dist/attribute-sets/attributeSetsInterfaces.d.ts +101 -109
- package/dist/auth-provider/authProviderApi.d.ts +132 -158
- package/dist/auth-provider/authProviderApi.js +131 -157
- package/dist/auth-provider/authProvidersInterfaces.d.ts +241 -237
- package/dist/base/asyncModules.d.ts +23 -21
- package/dist/base/asyncModules.js +30 -25
- package/dist/base/result.d.ts +31 -0
- package/dist/base/result.js +32 -1
- package/dist/base/stateModule.d.ts +10 -0
- package/dist/base/stateModule.js +50 -2
- package/dist/base/syncModules.d.ts +41 -49
- package/dist/base/syncModules.js +49 -48
- package/dist/base/utils.d.ts +38 -7
- package/dist/blocks/blocksApi.d.ts +27 -36
- package/dist/blocks/blocksApi.js +27 -36
- package/dist/blocks/blocksInterfaces.d.ts +92 -97
- package/dist/config.d.ts +13 -0
- package/dist/config.js +30 -0
- package/dist/events/eventsApi.d.ts +16 -33
- package/dist/events/eventsApi.js +32 -46
- package/dist/events/eventsInterfaces.d.ts +42 -37
- package/dist/file-uploading/fileUploadingApi.d.ts +42 -47
- package/dist/file-uploading/fileUploadingApi.js +44 -47
- package/dist/file-uploading/fileUploadingInterfaces.d.ts +49 -60
- package/dist/forms/formsApi.d.ts +15 -14
- package/dist/forms/formsApi.js +15 -14
- package/dist/forms/formsInterfaces.d.ts +36 -40
- package/dist/forms-data/formsDataApi.d.ts +40 -44
- package/dist/forms-data/formsDataApi.js +42 -44
- package/dist/forms-data/formsDataInterfaces.d.ts +231 -231
- package/dist/general-types/generalTypesApi.d.ts +5 -5
- package/dist/general-types/generalTypesApi.js +5 -5
- package/dist/general-types/generalTypesInterfaces.d.ts +6 -9
- package/dist/index.d.ts +12 -13
- package/dist/index.js +12 -13
- package/dist/integration-collections/integrationCollectionsApi.d.ts +84 -98
- package/dist/integration-collections/integrationCollectionsApi.js +86 -102
- package/dist/integration-collections/integrationCollectionsInterfaces.d.ts +177 -169
- package/dist/locales/localesApi.d.ts +7 -3
- package/dist/locales/localesApi.js +7 -3
- package/dist/locales/localesInterfaces.d.ts +14 -13
- package/dist/menus/menusApi.d.ts +9 -5
- package/dist/menus/menusApi.js +9 -5
- package/dist/menus/menusInterfaces.d.ts +43 -48
- package/dist/menus/menusInterfaces.js +1 -0
- package/dist/orders/ordersApi.d.ts +62 -70
- package/dist/orders/ordersApi.js +62 -71
- package/dist/orders/ordersInterfaces.d.ts +238 -203
- package/dist/pages/pagesApi.d.ts +67 -80
- package/dist/pages/pagesApi.js +71 -81
- package/dist/pages/pagesInterfaces.d.ts +164 -160
- package/dist/payments/paymentsApi.d.ts +24 -34
- package/dist/payments/paymentsApi.js +24 -38
- package/dist/payments/paymentsInterfaces.d.ts +82 -76
- package/dist/product-statuses/productStatusesApi.d.ts +13 -13
- package/dist/product-statuses/productStatusesApi.js +13 -13
- package/dist/product-statuses/productStatusesInterfaces.d.ts +29 -27
- package/dist/products/productsApi.d.ts +246 -267
- package/dist/products/productsApi.js +247 -267
- package/dist/products/productsInterfaces.d.ts +333 -339
- package/dist/system/systemApi.d.ts +19 -21
- package/dist/system/systemApi.js +20 -21
- package/dist/system/systemInterfaces.d.ts +14 -3
- package/dist/templates/templatesApi.d.ts +13 -16
- package/dist/templates/templatesApi.js +13 -16
- package/dist/templates/templatesInterfaces.d.ts +30 -29
- package/dist/templates-preview/templatesPreviewApi.d.ts +10 -11
- package/dist/templates-preview/templatesPreviewApi.js +10 -11
- package/dist/templates-preview/templatesPreviewInterfaces.d.ts +61 -64
- package/dist/users/usersApi.d.ts +36 -43
- package/dist/users/usersApi.js +36 -43
- package/dist/users/usersInterfaces.d.ts +92 -96
- package/dist/web-socket/wsApi.d.ts +5 -3
- package/dist/web-socket/wsApi.js +6 -3
- package/dist/web-socket/wsInterfaces.d.ts +7 -2
- package/package.json +16 -12
|
@@ -1,41 +1,41 @@
|
|
|
1
1
|
import type { IError, ILocalizeInfo } from '../base/utils';
|
|
2
2
|
/**
|
|
3
|
+
* Interface for retrieving attributes based on markers and language codes.
|
|
3
4
|
* @interface IAttributesSets
|
|
4
|
-
*
|
|
5
|
-
* @property {
|
|
6
|
-
* @property {function} getSingleAttributeByMarkerSet - Get a single attribute with data from the attribute sets.
|
|
7
|
-
*
|
|
5
|
+
* @property {Function} getAttributesByMarker - Get all attributes with data from the attribute sets.
|
|
6
|
+
* @property {Function} getSingleAttributeByMarkerSet - Get a single attribute with data from the attribute sets.
|
|
8
7
|
* @description This interface defines methods for retrieving attributes based on markers and language codes.
|
|
9
8
|
*/
|
|
10
9
|
interface IAttributesSets {
|
|
11
10
|
/**
|
|
12
11
|
* Fetches attributes by a specific marker.
|
|
13
|
-
*
|
|
14
|
-
* @param
|
|
15
|
-
* @param
|
|
16
|
-
* @returns {IAttributeSetsEntity[]}
|
|
12
|
+
* @handleName getAttributesByMarker
|
|
13
|
+
* @param {string} marker - The marker used to identify the attribute set. Example: "productAttributes".
|
|
14
|
+
* @param {string} [langCode] - The language code for localization purposes. Default: 'en_US'.
|
|
15
|
+
* @returns {IAttributeSetsEntity[]} A promise that resolves to an array of attribute set entities or an error.
|
|
17
16
|
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
17
|
+
* @description This method fetches attributes by a specific marker.
|
|
18
18
|
*/
|
|
19
19
|
getAttributesByMarker(marker: string, langCode: string): Promise<IAttributeSetsEntity[] | IError>;
|
|
20
20
|
/**
|
|
21
21
|
* Fetches a single attribute by its marker and the set marker.
|
|
22
|
-
*
|
|
23
|
-
* @param
|
|
24
|
-
* @param
|
|
25
|
-
* @param
|
|
26
|
-
* @returns {IAttributesSetsEntity}
|
|
22
|
+
* @handleName getSingleAttributeByMarkerSet
|
|
23
|
+
* @param {string} attributeMarker - The marker identifying the attribute. Example: "color".
|
|
24
|
+
* @param {string} setMarker - The marker identifying the attribute set. Example: "productAttributes".
|
|
25
|
+
* @param {string} [langCode] - The language code for localization purposes. Default: "en_US".
|
|
26
|
+
* @returns {IAttributesSetsEntity} A promise that resolves to an attribute set entity or an error.
|
|
27
|
+
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
28
|
+
* @description This method fetches a single attribute by its marker and the set marker.
|
|
27
29
|
*/
|
|
28
30
|
getSingleAttributeByMarkerSet(attributeMarker: string, setMarker: string, langCode: string): Promise<IAttributesSetsEntity | IError>;
|
|
29
31
|
}
|
|
30
32
|
/**
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
+
* Represents the structure of a list item.
|
|
33
34
|
* @interface IListTitle
|
|
34
|
-
*
|
|
35
|
-
* @property {string}
|
|
36
|
-
* @property {number |
|
|
37
|
-
* @property {
|
|
38
|
-
* @property {object} extended - An object containing additional properties or metadata related to the list item. This could include any extra details that extend the basic information.
|
|
35
|
+
* @property {string} title - The title or name associated with the list item. Example: "Item Name".
|
|
36
|
+
* @property {number | string} value - The value of the list item, which can be either a number or a string depending on the context. Example: 42.
|
|
37
|
+
* @property {string | number | null} position - The position of the list item, which can be represented as a string, number, or null if not applicable. Example: 1.
|
|
38
|
+
* @property {object} extended - An object containing additional properties or metadata related to the list item. This could include any extra details that extend the basic information.
|
|
39
39
|
* @description This interface defines the structure of a list item, which includes properties for the title, value, position, and extended information.
|
|
40
40
|
*/
|
|
41
41
|
interface IListTitle {
|
|
@@ -48,54 +48,50 @@ interface IListTitle {
|
|
|
48
48
|
};
|
|
49
49
|
}
|
|
50
50
|
/**
|
|
51
|
-
*
|
|
52
|
-
*
|
|
53
|
-
* @type IAdminQuery
|
|
51
|
+
* Defines the possible values for attribute types used in the system.
|
|
54
52
|
* @type {AttributeType}
|
|
55
53
|
* @description This type defines the possible values for attribute types used in the system.
|
|
56
54
|
*/
|
|
57
55
|
type AttributeType = 'string' | 'text' | 'textWithHeader' | 'integer' | 'real' | 'float' | 'dateTime' | 'date' | 'time' | 'file' | 'image' | 'groupOfImages' | 'radioButton' | 'list' | 'button';
|
|
58
56
|
/**
|
|
59
|
-
*
|
|
60
|
-
*
|
|
57
|
+
* Represents an attribute set entity.
|
|
61
58
|
* @interface IAttributesSetsEntity
|
|
62
|
-
*
|
|
63
|
-
* @property {
|
|
64
|
-
* @property {
|
|
65
|
-
* @property {
|
|
66
|
-
* @property {
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
* @property {Record<string, any>}
|
|
98
|
-
* @property {Record<string, any>} [settings] - Additional attribute settings (optional).
|
|
59
|
+
* @property {AttributeType} type - Attribute type. Example: "string", "text", "integer", "etc".
|
|
60
|
+
* @property {any} [value] - Value of the attribute, which can be of any type.
|
|
61
|
+
* @property {string} marker - Textual identifier of the attribute (marker). Example: "color", "size", "etc".
|
|
62
|
+
* @property {number} position - Position number for sorting. Example: 1.
|
|
63
|
+
* @property {IListTitle[] | Record<string, any>} [listTitles] - Array of values (with extended data) for list and radioButton attributes. Example:
|
|
64
|
+
[
|
|
65
|
+
{
|
|
66
|
+
"title": "red",
|
|
67
|
+
"value": 1,
|
|
68
|
+
"position": 1,
|
|
69
|
+
"extendedValue": null,
|
|
70
|
+
"extendedValueType": null
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
"title": "yellow",
|
|
74
|
+
"value": 2,
|
|
75
|
+
"position": 2,
|
|
76
|
+
"extendedValue": null,
|
|
77
|
+
"extendedValueType": null
|
|
78
|
+
}
|
|
79
|
+
]
|
|
80
|
+
* @property {Record<string, any>} [validators] - Set of validators for validation. Example:
|
|
81
|
+
{
|
|
82
|
+
"requiredValidator": {
|
|
83
|
+
"strict": true
|
|
84
|
+
},
|
|
85
|
+
"defaultValueValidator": {
|
|
86
|
+
"fieldDefaultValue": 11
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
* @property {ILocalizeInfo} localizeInfos - The name of the template, taking into account localization. Example:
|
|
90
|
+
{
|
|
91
|
+
"title": "My attribute"
|
|
92
|
+
}
|
|
93
|
+
* @property {Record<string, any>} [additionalFields] - Additional fields for the attribute (optional).
|
|
94
|
+
* @property {Record<string, any>} [settings] - Additional attribute settings (optional).
|
|
99
95
|
* @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.
|
|
100
96
|
*/
|
|
101
97
|
interface IAttributesSetsEntity {
|
|
@@ -110,37 +106,35 @@ interface IAttributesSetsEntity {
|
|
|
110
106
|
settings?: Record<string, any>;
|
|
111
107
|
}
|
|
112
108
|
/**
|
|
113
|
-
*
|
|
114
|
-
*
|
|
109
|
+
* Represents an attribute set entity.
|
|
115
110
|
* @interface IAttributeSetsEntity
|
|
116
|
-
*
|
|
117
|
-
* @property {
|
|
118
|
-
* @property {
|
|
119
|
-
* @property {
|
|
120
|
-
* @property {
|
|
121
|
-
* @property {
|
|
122
|
-
* @property {
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
* @property {
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
* @property {
|
|
143
|
-
* @property {number} position - The position number for sorting the attribute set. Example: 1.
|
|
111
|
+
* @property {number} id - The unique identifier of the attribute set entity. Example: 123.
|
|
112
|
+
* @property {string} updatedDate - The date when the attribute set was last updated, represented as a string. Example: "2023-10-01T12:00:00Z".
|
|
113
|
+
* @property {number} version - The version number of the attribute set, used for tracking changes or updates. Example: 1.
|
|
114
|
+
* @property {string} identifier - A string that uniquely identifies the attribute set. Example: "attributeSet1".
|
|
115
|
+
* @property {number} typeId - The numerical identifier representing the type of the attribute set. Example: 1.
|
|
116
|
+
* @property {string} title - The title or name of the attribute set. Example: "Product Attributes".
|
|
117
|
+
* @property {object} schema - The schema definition associated with the attribute set. This could represent the structure or rules for the data. Example:
|
|
118
|
+
{
|
|
119
|
+
"attribute1": {
|
|
120
|
+
"id": 1,
|
|
121
|
+
"type": "string",
|
|
122
|
+
"isPrice": false,
|
|
123
|
+
"original": true,
|
|
124
|
+
"identifier": "string",
|
|
125
|
+
"localizeInfos": {
|
|
126
|
+
"en_US": { "title": "String" }
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
* @property {boolean} isVisible - Indicates whether the attribute set is visible or not. Example: true.
|
|
131
|
+
* @property {object} properties - Additional properties associated with the attribute set, which can be of any type. Example:
|
|
132
|
+
{
|
|
133
|
+
"color": "red",
|
|
134
|
+
"size": "M"
|
|
135
|
+
}
|
|
136
|
+
* @property {string} type - The type of the attribute set, which could be a specific classification or category. Example: "product", "user", "etc".
|
|
137
|
+
* @property {number} position - The position number for sorting the attribute set. Example: 1.
|
|
144
138
|
* @description This interface defines the structure of an attribute set entity.
|
|
145
139
|
*/
|
|
146
140
|
interface IAttributeSetsEntity {
|
|
@@ -150,29 +144,27 @@ interface IAttributeSetsEntity {
|
|
|
150
144
|
identifier: string;
|
|
151
145
|
typeId: number;
|
|
152
146
|
title: string;
|
|
153
|
-
schema:
|
|
147
|
+
schema: object;
|
|
154
148
|
isVisible: boolean;
|
|
155
|
-
properties:
|
|
156
|
-
type:
|
|
149
|
+
properties: object;
|
|
150
|
+
type: string;
|
|
157
151
|
position: number;
|
|
158
152
|
}
|
|
159
153
|
/**
|
|
160
|
-
*
|
|
161
|
-
*
|
|
154
|
+
* Represents the response structure for attribute sets.
|
|
162
155
|
* @interface IAttributesSetsResponse
|
|
163
|
-
*
|
|
164
|
-
* @property {number} total - Total items. Example: 100.
|
|
156
|
+
* @property {number} total - Total items. Example: 100.
|
|
165
157
|
* @property {IAttributeSetsEntity[]} items - IAttributeSetsEntity array containing attribute set entities. Example:
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
158
|
+
[
|
|
159
|
+
{
|
|
160
|
+
"id": 1,
|
|
161
|
+
"identifier": "set1"
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
"id": 2,
|
|
165
|
+
"identifier": "set2"
|
|
166
|
+
}
|
|
167
|
+
]
|
|
176
168
|
* @description This interface defines the structure of a response object for attribute sets.
|
|
177
169
|
*/
|
|
178
170
|
interface IAttributesSetsResponse {
|