oneentry 1.0.138 → 1.0.140

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 (143) hide show
  1. package/README.md +16 -1
  2. package/configure.js +40 -21
  3. package/package.json +15 -12
  4. package/dist/admins/adminsApi.d.ts +0 -50
  5. package/dist/admins/adminsApi.js +0 -65
  6. package/dist/admins/adminsInterfaces.d.ts +0 -99
  7. package/dist/admins/adminsInterfaces.js +0 -2
  8. package/dist/admins/adminsSchemas.d.ts +0 -30
  9. package/dist/admins/adminsSchemas.js +0 -27
  10. package/dist/attribute-sets/attributeSetsApi.d.ts +0 -63
  11. package/dist/attribute-sets/attributeSetsApi.js +0 -98
  12. package/dist/attribute-sets/attributeSetsInterfaces.d.ts +0 -187
  13. package/dist/attribute-sets/attributeSetsInterfaces.js +0 -2
  14. package/dist/attribute-sets/attributeSetsSchemas.d.ts +0 -90
  15. package/dist/attribute-sets/attributeSetsSchemas.js +0 -74
  16. package/dist/auth-provider/authProviderApi.d.ts +0 -249
  17. package/dist/auth-provider/authProviderApi.js +0 -351
  18. package/dist/auth-provider/authProviderSchemas.d.ts +0 -137
  19. package/dist/auth-provider/authProviderSchemas.js +0 -85
  20. package/dist/auth-provider/authProvidersInterfaces.d.ts +0 -417
  21. package/dist/auth-provider/authProvidersInterfaces.js +0 -2
  22. package/dist/base/asyncModules.d.ts +0 -80
  23. package/dist/base/asyncModules.js +0 -440
  24. package/dist/base/result.d.ts +0 -39
  25. package/dist/base/result.js +0 -154
  26. package/dist/base/stateModule.d.ts +0 -41
  27. package/dist/base/stateModule.js +0 -128
  28. package/dist/base/syncModules.d.ts +0 -148
  29. package/dist/base/syncModules.js +0 -530
  30. package/dist/base/utils.d.ts +0 -197
  31. package/dist/base/utils.js +0 -2
  32. package/dist/base/validation.d.ts +0 -118
  33. package/dist/base/validation.js +0 -132
  34. package/dist/blocks/blocksApi.d.ts +0 -74
  35. package/dist/blocks/blocksApi.js +0 -184
  36. package/dist/blocks/blocksInterfaces.d.ts +0 -173
  37. package/dist/blocks/blocksInterfaces.js +0 -2
  38. package/dist/blocks/blocksSchemas.d.ts +0 -187
  39. package/dist/blocks/blocksSchemas.js +0 -43
  40. package/dist/events/eventsApi.d.ts +0 -60
  41. package/dist/events/eventsApi.js +0 -97
  42. package/dist/events/eventsInterfaces.d.ts +0 -87
  43. package/dist/events/eventsInterfaces.js +0 -2
  44. package/dist/file-uploading/fileUploadingApi.d.ts +0 -88
  45. package/dist/file-uploading/fileUploadingApi.js +0 -132
  46. package/dist/file-uploading/fileUploadingInterfaces.d.ts +0 -117
  47. package/dist/file-uploading/fileUploadingInterfaces.js +0 -2
  48. package/dist/file-uploading/fileUploadingSchemas.d.ts +0 -22
  49. package/dist/file-uploading/fileUploadingSchemas.js +0 -21
  50. package/dist/forms/formsApi.d.ts +0 -42
  51. package/dist/forms/formsApi.js +0 -57
  52. package/dist/forms/formsInterfaces.d.ts +0 -132
  53. package/dist/forms/formsInterfaces.js +0 -2
  54. package/dist/forms/formsSchemas.d.ts +0 -65
  55. package/dist/forms/formsSchemas.js +0 -36
  56. package/dist/forms-data/formsDataApi.d.ts +0 -106
  57. package/dist/forms-data/formsDataApi.js +0 -189
  58. package/dist/forms-data/formsDataInterfaces.d.ts +0 -525
  59. package/dist/forms-data/formsDataInterfaces.js +0 -2
  60. package/dist/forms-data/formsDataSchemas.d.ts +0 -115
  61. package/dist/forms-data/formsDataSchemas.js +0 -86
  62. package/dist/general-types/generalTypesApi.d.ts +0 -28
  63. package/dist/general-types/generalTypesApi.js +0 -38
  64. package/dist/general-types/generalTypesInterfaces.d.ts +0 -30
  65. package/dist/general-types/generalTypesInterfaces.js +0 -2
  66. package/dist/general-types/generalTypesSchemas.d.ts +0 -50
  67. package/dist/general-types/generalTypesSchemas.js +0 -35
  68. package/dist/index.d.ts +0 -94
  69. package/dist/index.js +0 -97
  70. package/dist/integration-collections/integrationCollectionsApi.d.ts +0 -173
  71. package/dist/integration-collections/integrationCollectionsApi.js +0 -220
  72. package/dist/integration-collections/integrationCollectionsInterfaces.d.ts +0 -313
  73. package/dist/integration-collections/integrationCollectionsInterfaces.js +0 -2
  74. package/dist/integration-collections/integrationCollectionsSchemas.d.ts +0 -84
  75. package/dist/integration-collections/integrationCollectionsSchemas.js +0 -63
  76. package/dist/locales/localesApi.d.ts +0 -27
  77. package/dist/locales/localesApi.js +0 -37
  78. package/dist/locales/localesInterfaces.d.ts +0 -41
  79. package/dist/locales/localesInterfaces.js +0 -2
  80. package/dist/locales/localesSchemas.d.ts +0 -32
  81. package/dist/locales/localesSchemas.js +0 -26
  82. package/dist/menus/menusApi.d.ts +0 -29
  83. package/dist/menus/menusApi.js +0 -39
  84. package/dist/menus/menusInterfaces.d.ts +0 -88
  85. package/dist/menus/menusInterfaces.js +0 -4
  86. package/dist/menus/menusSchemas.d.ts +0 -16
  87. package/dist/menus/menusSchemas.js +0 -28
  88. package/dist/orders/ordersApi.d.ts +0 -126
  89. package/dist/orders/ordersApi.js +0 -169
  90. package/dist/orders/ordersInterfaces.d.ts +0 -427
  91. package/dist/orders/ordersInterfaces.js +0 -2
  92. package/dist/orders/ordersSchemas.d.ts +0 -158
  93. package/dist/orders/ordersSchemas.js +0 -120
  94. package/dist/pages/pagesApi.d.ts +0 -151
  95. package/dist/pages/pagesApi.js +0 -390
  96. package/dist/pages/pagesInterfaces.d.ts +0 -292
  97. package/dist/pages/pagesInterfaces.js +0 -2
  98. package/dist/pages/pagesSchemas.d.ts +0 -85
  99. package/dist/pages/pagesSchemas.js +0 -46
  100. package/dist/payments/paymentsApi.d.ts +0 -82
  101. package/dist/payments/paymentsApi.js +0 -121
  102. package/dist/payments/paymentsInterfaces.d.ts +0 -206
  103. package/dist/payments/paymentsInterfaces.js +0 -2
  104. package/dist/payments/paymentsSchemas.d.ts +0 -137
  105. package/dist/payments/paymentsSchemas.js +0 -78
  106. package/dist/product-statuses/productStatusesApi.d.ts +0 -47
  107. package/dist/product-statuses/productStatusesApi.js +0 -70
  108. package/dist/product-statuses/productStatusesInterfaces.d.ts +0 -66
  109. package/dist/product-statuses/productStatusesInterfaces.js +0 -2
  110. package/dist/product-statuses/productStatusesSchemas.d.ts +0 -34
  111. package/dist/product-statuses/productStatusesSchemas.js +0 -30
  112. package/dist/products/productsApi.d.ts +0 -365
  113. package/dist/products/productsApi.js +0 -464
  114. package/dist/products/productsInterfaces.d.ts +0 -583
  115. package/dist/products/productsInterfaces.js +0 -2
  116. package/dist/products/productsSchemas.d.ts +0 -212
  117. package/dist/products/productsSchemas.js +0 -85
  118. package/dist/system/systemApi.d.ts +0 -65
  119. package/dist/system/systemApi.js +0 -82
  120. package/dist/system/systemInterfaces.d.ts +0 -23
  121. package/dist/system/systemInterfaces.js +0 -2
  122. package/dist/templates/templatesApi.d.ts +0 -49
  123. package/dist/templates/templatesApi.js +0 -75
  124. package/dist/templates/templatesInterfaces.d.ts +0 -70
  125. package/dist/templates/templatesInterfaces.js +0 -2
  126. package/dist/templates/templatesSchemas.d.ts +0 -48
  127. package/dist/templates/templatesSchemas.js +0 -31
  128. package/dist/templates-preview/templatesPreviewApi.d.ts +0 -38
  129. package/dist/templates-preview/templatesPreviewApi.js +0 -53
  130. package/dist/templates-preview/templatesPreviewInterfaces.d.ts +0 -121
  131. package/dist/templates-preview/templatesPreviewInterfaces.js +0 -2
  132. package/dist/templates-preview/templatesPreviewSchemas.d.ts +0 -83
  133. package/dist/templates-preview/templatesPreviewSchemas.js +0 -48
  134. package/dist/users/usersApi.d.ts +0 -143
  135. package/dist/users/usersApi.js +0 -174
  136. package/dist/users/usersInterfaces.d.ts +0 -235
  137. package/dist/users/usersInterfaces.js +0 -2
  138. package/dist/users/usersSchemas.d.ts +0 -38
  139. package/dist/users/usersSchemas.js +0 -28
  140. package/dist/web-socket/wsApi.d.ts +0 -25
  141. package/dist/web-socket/wsApi.js +0 -45
  142. package/dist/web-socket/wsInterfaces.d.ts +0 -17
  143. package/dist/web-socket/wsInterfaces.js +0 -2
@@ -1,98 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- const asyncModules_1 = __importDefault(require("../base/asyncModules"));
7
- const attributeSetsSchemas_1 = require("./attributeSetsSchemas");
8
- /**
9
- * Controllers for working with attributes - AttributesSetsApi.
10
- * @class AttributesSetsApi
11
- * @augments AsyncModules
12
- * @implements {IAttributesSets}
13
- * @description This class provides methods to interact with attribute sets, including fetching attributes, getting attributes by marker, and retrieving single attributes by marker and set.
14
- */
15
- class AttributesSetsApi extends asyncModules_1.default {
16
- /**
17
- * Initializes the AttributesSetsApi with the provided state module.
18
- * @class
19
- * @class AttributesSetsApi
20
- * @param {StateModule} state - The state module containing configuration data.
21
- * @description Constructor initializes the AttributesSetsApi with a given state.
22
- */
23
- constructor(state) {
24
- super(state);
25
- this._url = state.url + '/api/content/attributes-sets';
26
- }
27
- /**
28
- * Getting all attribute sets objects.
29
- * @handleName getAttributes
30
- * @param {string} [langCode] - Language code. Default: "en_US".
31
- * @param {number} [offset] - parameter offset of record selection. Default: 0.
32
- * @param {number} [limit] - parameter limiting the selection of records. Default: 30.
33
- * @param {number} [typeId] - identifier of the attribute set type. Default: null.
34
- * @param {string} [sortBy] - identifier of the attribute set type. Default: "id".
35
- * @returns {Promise<IAttributesSetsResponse | IError>} Returns object with array of IAttributeSetsEntity and total items count.
36
- * @throws {IError} When isShell=false and an error occurs during the fetch
37
- */
38
- async getAttributes(langCode = this.state.lang, offset = 0, limit = 30,
39
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
40
- typeId = null, sortBy = 'id') {
41
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
42
- const query = {
43
- langCode,
44
- offset,
45
- limit,
46
- typeId,
47
- sortBy,
48
- };
49
- const result = await this._fetchGet(`?` + this._queryParamsToString(query));
50
- // Validate response if validation is enabled
51
- const validated = this._validateResponse(result, attributeSetsSchemas_1.AttributeSetsResponseSchema);
52
- return this._dataPostProcess(validated, langCode);
53
- }
54
- /**
55
- * Getting all attributes with data from the attribute set.
56
- * @handleName getAttributesByMarker
57
- * @param {string} marker - Attribute marker. Example: "productAttributes".
58
- * @param {string} [langCode] - Language code. Default: "en_US".
59
- * @returns {Promise<IAttributeSetsEntity[] | IError>} Returns an array of Attributes objects.
60
- * @throws {IError} When isShell=false and an error occurs during the fetch
61
- */
62
- async getAttributesByMarker(marker, langCode = this.state.lang) {
63
- const result = await this._fetchGet(`/${marker}/attributes?langCode=${langCode}`);
64
- // Validate response if validation is enabled
65
- const validated = this._validateResponse(result, attributeSetsSchemas_1.AttributesArrayResponseSchema);
66
- return this._dataPostProcess(validated, langCode);
67
- }
68
- /**
69
- * Get a single attribute with data from the attribute sets.
70
- * @handleName getSingleAttributeByMarkerSet
71
- * @param {string} setMarker - Text identifier (marker) of the attribute set. Example: "productAttributes".
72
- * @param {string} attributeMarker - Text identifier (marker) of the attribute in the set. Example: "color".
73
- * @param {string} [langCode] - Language code. Default: "en_US".
74
- * @returns {Promise<IAttributesSetsEntity | IError>} Returns a single attribute object from the attribute set.
75
- * @throws {IError} When isShell=false and an error occurs during the fetch
76
- */
77
- async getSingleAttributeByMarkerSet(setMarker, attributeMarker, langCode = this.state.lang) {
78
- const result = await this._fetchGet(`/${setMarker}/attributes/${attributeMarker}?langCode=${langCode}`);
79
- // Validate response if validation is enabled
80
- const validated = this._validateResponse(result, attributeSetsSchemas_1.AttributeEntitySchema);
81
- return this._dataPostProcess(validated, langCode);
82
- }
83
- /**
84
- * Getting a single object from a set of attributes by marker.
85
- * @handleName getAttributeSetByMarker
86
- * @param {string} marker - marker of the attribute set object. Example: "productAttributes".
87
- * @param {string} [langCode] - Language code. Default: "en_US".
88
- * @returns {Promise<IAttributeSetsEntity | IError>} Returns one object of the attribute set.
89
- * @throws {IError} When isShell=false and an error occurs during the fetch
90
- */
91
- async getAttributeSetByMarker(marker, langCode = this.state.lang) {
92
- const result = await this._fetchGet(`/marker/${marker}?langCode=${langCode}`);
93
- // Validate response if validation is enabled
94
- const validated = this._validateResponse(result, attributeSetsSchemas_1.AttributeSetEntitySchema);
95
- return this._dataPostProcess(validated, langCode);
96
- }
97
- }
98
- exports.default = AttributesSetsApi;
@@ -1,187 +0,0 @@
1
- import type { IError, ILocalizeInfo } from '../base/utils';
2
- /**
3
- * Interface for retrieving attributes based on markers and language codes.
4
- * @interface IAttributesSets
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.
7
- * @description This interface defines methods for retrieving attributes based on markers and language codes.
8
- */
9
- interface IAttributesSets {
10
- /**
11
- * Fetches attributes by a specific marker.
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.
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
- */
19
- getAttributesByMarker(marker: string, langCode: string): Promise<IAttributeSetsEntity[] | IError>;
20
- /**
21
- * Fetches a single attribute by its marker and the set marker.
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.
29
- */
30
- getSingleAttributeByMarkerSet(attributeMarker: string, setMarker: string, langCode: string): Promise<IAttributesSetsEntity | IError>;
31
- }
32
- /**
33
- * Represents the structure of a list item.
34
- * @interface IListTitle
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
- * @property {string | null} extended.value - The extended value, which can be a string or null. Example: "extra_value".
40
- * @property {string | null} extended.type - The type of the extended value, which can be a string or null. Example: "color".
41
- * @description This interface defines the structure of a list item, which includes properties for the title, value, position, and extended information.
42
- */
43
- interface IListTitle {
44
- title: string;
45
- value: number | string;
46
- position: string | number | null;
47
- extended: {
48
- value: string | null;
49
- type: string | null;
50
- };
51
- }
52
- /**
53
- * Defines the possible values for attribute types used in the system.
54
- * @type {AttributeType}
55
- * @description This type defines the possible values for attribute types used in the system.
56
- */
57
- type AttributeType = 'string' | 'text' | 'textWithHeader' | 'integer' | 'real' | 'float' | 'dateTime' | 'date' | 'time' | 'file' | 'image' | 'groupOfImages' | 'radioButton' | 'list' | 'button';
58
- /**
59
- * Represents an attribute set entity.
60
- * @interface IAttributesSetsEntity
61
- * @property {AttributeType} type - Attribute type. Example: "string", "text", "integer", "etc".
62
- * @property {any} [value] - Value of the attribute, which can be of any type.
63
- * @property {any} initialValue - Initial value of the attribute.
64
- * @property {string} marker - Textual identifier of the attribute (marker). Example: "color", "size", "etc".
65
- * @property {number} position - Position number for sorting. Example: 1.
66
- * @property {IListTitle[] | Record<string, any>} [listTitles] - Array of values (with extended data) for list and radioButton attributes.
67
- * @example
68
- [
69
- {
70
- "title": "red",
71
- "value": 1,
72
- "position": 1,
73
- "extendedValue": null,
74
- "extendedValueType": null
75
- },
76
- {
77
- "title": "yellow",
78
- "value": 2,
79
- "position": 2,
80
- "extendedValue": null,
81
- "extendedValueType": null
82
- }
83
- ]
84
- * @property {Record<string, any>} [validators] - Set of validators for validation.
85
- * @example
86
- {
87
- "requiredValidator": {
88
- "strict": true
89
- },
90
- "defaultValueValidator": {
91
- "fieldDefaultValue": 11
92
- }
93
- }
94
- * @property {ILocalizeInfo} localizeInfos - The name of the template, taking into account localization.
95
- * @example
96
- {
97
- "title": "My attribute"
98
- }
99
- * @property {Record<string, any>} [additionalFields] - Additional fields for the attribute (optional).
100
- * @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.
101
- */
102
- interface IAttributesSetsEntity {
103
- type: AttributeType;
104
- value?: any;
105
- initialValue: any;
106
- marker: string;
107
- position: number;
108
- listTitles?: IListTitle[] | Record<string, any>;
109
- validators?: Record<string, any>;
110
- localizeInfos: ILocalizeInfo;
111
- additionalFields?: Record<string, any>;
112
- }
113
- /**
114
- * Represents an attribute set entity.
115
- * @interface IAttributeSetsEntity
116
- * @property {number} id - The unique identifier of the attribute set entity. Example: 123.
117
- * @property {string} createdDate - The date when the attribute set was created. Example: "2023-10-01T12:00:00Z".
118
- * @property {string} updatedDate - The date when the attribute set was last updated. Example: "2023-10-01T12:00:00Z".
119
- * @property {number} version - The version number of the attribute set, used for tracking changes or updates. Example: 1.
120
- * @property {string} identifier - A string that uniquely identifies the attribute set. Example: "attributeSet1".
121
- * @property {number} typeId - The numerical identifier representing the type of the attribute set. Example: 1.
122
- * @property {string} title - The title or name of the attribute set. Example: "Product Attributes".
123
- * @property {object} schema - The schema definition associated with the attribute set. This could represent the structure or rules for the data.
124
- * @example
125
- {
126
- "attribute1": {
127
- "id": 1,
128
- "type": "string",
129
- "isPrice": false,
130
- "original": true,
131
- "identifier": "string",
132
- "localizeInfos": {
133
- "en_US": { "title": "String" }
134
- }
135
- }
136
- }
137
- * @property {boolean} isVisible - Indicates whether the attribute set is visible or not. Example: true.
138
- * @property {object} properties - Additional properties associated with the attribute set, which can be of any type.
139
- * @example
140
- {
141
- "color": "red",
142
- "size": "M"
143
- }
144
- * @property {string} type - The type of the attribute set, which could be a specific classification or category. Example: "product", "user", "etc".
145
- * @property {number} position - The position number for sorting the attribute set. Example: 1.
146
- * @description This interface defines the structure of an attribute set entity.
147
- */
148
- interface IAttributeSetsEntity {
149
- id: number;
150
- createdDate: string;
151
- updatedDate: string;
152
- version: number;
153
- identifier: string;
154
- typeId: number;
155
- title: string;
156
- schema: object;
157
- isVisible: boolean;
158
- properties: object;
159
- type: {
160
- id: number;
161
- type: string;
162
- };
163
- position: number;
164
- }
165
- /**
166
- * Represents the response structure for attribute sets.
167
- * @interface IAttributesSetsResponse
168
- * @property {number} total - Total items. Example: 100.
169
- * @property {IAttributeSetsEntity[]} items - IAttributeSetsEntity array containing attribute set entities.
170
- * @example
171
- [
172
- {
173
- "id": 1,
174
- "identifier": "set1"
175
- },
176
- {
177
- "id": 2,
178
- "identifier": "set2"
179
- }
180
- ]
181
- * @description This interface defines the structure of a response object for attribute sets.
182
- */
183
- interface IAttributesSetsResponse {
184
- total: number;
185
- items: IAttributeSetsEntity[];
186
- }
187
- export type { AttributeType, IAttributeSetsEntity, IAttributesSets, IAttributesSetsEntity, IAttributesSetsResponse, IListTitle, };
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,90 +0,0 @@
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>>;
@@ -1,74 +0,0 @@
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);