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.
- package/configure.js +2 -2
- package/dist/admins/adminsApi.d.ts +50 -0
- package/dist/admins/adminsApi.js +65 -0
- package/dist/admins/adminsInterfaces.d.ts +98 -0
- package/dist/admins/adminsInterfaces.js +2 -0
- package/dist/admins/adminsSchemas.d.ts +30 -0
- package/dist/admins/adminsSchemas.js +27 -0
- package/dist/attribute-sets/attributeSetsApi.d.ts +63 -0
- package/dist/attribute-sets/attributeSetsApi.js +98 -0
- package/dist/attribute-sets/attributeSetsInterfaces.d.ts +185 -0
- package/dist/attribute-sets/attributeSetsInterfaces.js +2 -0
- package/dist/attribute-sets/attributeSetsSchemas.d.ts +90 -0
- package/dist/attribute-sets/attributeSetsSchemas.js +74 -0
- package/dist/auth-provider/authProviderApi.d.ts +249 -0
- package/dist/auth-provider/authProviderApi.js +354 -0
- package/dist/auth-provider/authProviderSchemas.d.ts +131 -0
- package/dist/auth-provider/authProviderSchemas.js +82 -0
- package/dist/auth-provider/authProvidersInterfaces.d.ts +412 -0
- package/dist/auth-provider/authProvidersInterfaces.js +2 -0
- package/dist/base/asyncModules.d.ts +80 -0
- package/dist/base/asyncModules.js +448 -0
- package/dist/base/result.d.ts +39 -0
- package/dist/base/result.js +154 -0
- package/dist/base/stateModule.d.ts +41 -0
- package/dist/base/stateModule.js +128 -0
- package/dist/base/syncModules.d.ts +286 -0
- package/dist/base/syncModules.js +716 -0
- package/dist/base/utils.d.ts +197 -0
- package/dist/base/utils.js +2 -0
- package/dist/base/validation.d.ts +118 -0
- package/dist/base/validation.js +132 -0
- package/dist/blocks/blocksApi.d.ts +88 -0
- package/dist/blocks/blocksApi.js +207 -0
- package/dist/blocks/blocksInterfaces.d.ts +179 -0
- package/dist/blocks/blocksInterfaces.js +2 -0
- package/dist/blocks/blocksSchemas.d.ts +195 -0
- package/dist/blocks/blocksSchemas.js +43 -0
- package/dist/discounts/discountsApi.d.ts +76 -0
- package/dist/discounts/discountsApi.js +116 -0
- package/dist/discounts/discountsInterfaces.d.ts +217 -0
- package/dist/discounts/discountsInterfaces.js +2 -0
- package/dist/events/eventsApi.d.ts +60 -0
- package/dist/events/eventsApi.js +97 -0
- package/dist/events/eventsInterfaces.d.ts +87 -0
- package/dist/events/eventsInterfaces.js +2 -0
- package/dist/file-uploading/fileUploadingApi.d.ts +88 -0
- package/dist/file-uploading/fileUploadingApi.js +129 -0
- package/dist/file-uploading/fileUploadingInterfaces.d.ts +114 -0
- package/dist/file-uploading/fileUploadingInterfaces.js +2 -0
- package/dist/file-uploading/fileUploadingSchemas.d.ts +22 -0
- package/dist/file-uploading/fileUploadingSchemas.js +21 -0
- package/dist/forms/formsApi.d.ts +42 -0
- package/dist/forms/formsApi.js +57 -0
- package/dist/forms/formsInterfaces.d.ts +144 -0
- package/dist/forms/formsInterfaces.js +2 -0
- package/dist/forms/formsSchemas.d.ts +53 -0
- package/dist/forms/formsSchemas.js +34 -0
- package/dist/forms-data/formsDataApi.d.ts +106 -0
- package/dist/forms-data/formsDataApi.js +189 -0
- package/dist/forms-data/formsDataInterfaces.d.ts +522 -0
- package/dist/forms-data/formsDataInterfaces.js +2 -0
- package/dist/forms-data/formsDataSchemas.d.ts +115 -0
- package/dist/forms-data/formsDataSchemas.js +86 -0
- package/dist/general-types/generalTypesApi.d.ts +28 -0
- package/dist/general-types/generalTypesApi.js +38 -0
- package/dist/general-types/generalTypesInterfaces.d.ts +29 -0
- package/dist/general-types/generalTypesInterfaces.js +2 -0
- package/dist/general-types/generalTypesSchemas.d.ts +52 -0
- package/dist/general-types/generalTypesSchemas.js +36 -0
- package/dist/index.d.ts +124 -0
- package/dist/index.js +103 -0
- package/dist/integration-collections/integrationCollectionsApi.d.ts +163 -0
- package/dist/integration-collections/integrationCollectionsApi.js +220 -0
- package/dist/integration-collections/integrationCollectionsInterfaces.d.ts +313 -0
- package/dist/integration-collections/integrationCollectionsInterfaces.js +2 -0
- package/dist/integration-collections/integrationCollectionsSchemas.d.ts +80 -0
- package/dist/integration-collections/integrationCollectionsSchemas.js +61 -0
- package/dist/locales/localesApi.d.ts +27 -0
- package/dist/locales/localesApi.js +37 -0
- package/dist/locales/localesInterfaces.d.ts +40 -0
- package/dist/locales/localesInterfaces.js +2 -0
- package/dist/locales/localesSchemas.d.ts +32 -0
- package/dist/locales/localesSchemas.js +26 -0
- package/dist/menus/menusApi.d.ts +29 -0
- package/dist/menus/menusApi.js +39 -0
- package/dist/menus/menusInterfaces.d.ts +87 -0
- package/dist/menus/menusInterfaces.js +3 -0
- package/dist/menus/menusSchemas.d.ts +16 -0
- package/dist/menus/menusSchemas.js +28 -0
- package/dist/orders/ordersApi.d.ts +175 -0
- package/dist/orders/ordersApi.js +247 -0
- package/dist/orders/ordersInterfaces.d.ts +593 -0
- package/dist/orders/ordersInterfaces.js +2 -0
- package/dist/orders/ordersSchemas.d.ts +120 -0
- package/dist/orders/ordersSchemas.js +101 -0
- package/dist/pages/pagesApi.d.ts +151 -0
- package/dist/pages/pagesApi.js +390 -0
- package/dist/pages/pagesInterfaces.d.ts +286 -0
- package/dist/pages/pagesInterfaces.js +2 -0
- package/dist/pages/pagesSchemas.d.ts +85 -0
- package/dist/pages/pagesSchemas.js +46 -0
- package/dist/payments/paymentsApi.d.ts +82 -0
- package/dist/payments/paymentsApi.js +121 -0
- package/dist/payments/paymentsInterfaces.d.ts +200 -0
- package/dist/payments/paymentsInterfaces.js +2 -0
- package/dist/payments/paymentsSchemas.d.ts +100 -0
- package/dist/payments/paymentsSchemas.js +65 -0
- package/dist/product-statuses/productStatusesApi.d.ts +47 -0
- package/dist/product-statuses/productStatusesApi.js +70 -0
- package/dist/product-statuses/productStatusesInterfaces.d.ts +62 -0
- package/dist/product-statuses/productStatusesInterfaces.js +2 -0
- package/dist/product-statuses/productStatusesSchemas.d.ts +34 -0
- package/dist/product-statuses/productStatusesSchemas.js +30 -0
- package/dist/products/productsApi.d.ts +366 -0
- package/dist/products/productsApi.js +458 -0
- package/dist/products/productsInterfaces.d.ts +593 -0
- package/dist/products/productsInterfaces.js +2 -0
- package/dist/products/productsSchemas.d.ts +200 -0
- package/dist/products/productsSchemas.js +98 -0
- package/dist/sitemap/sitemapApi.d.ts +35 -0
- package/dist/sitemap/sitemapApi.js +45 -0
- package/dist/sitemap/sitemapInterfaces.d.ts +40 -0
- package/dist/sitemap/sitemapInterfaces.js +2 -0
- package/dist/system/systemApi.d.ts +43 -0
- package/dist/system/systemApi.js +56 -0
- package/dist/system/systemInterfaces.d.ts +29 -0
- package/dist/system/systemInterfaces.js +2 -0
- package/dist/templates/templatesApi.d.ts +49 -0
- package/dist/templates/templatesApi.js +75 -0
- package/dist/templates/templatesInterfaces.d.ts +67 -0
- package/dist/templates/templatesInterfaces.js +2 -0
- package/dist/templates/templatesSchemas.d.ts +48 -0
- package/dist/templates/templatesSchemas.js +31 -0
- package/dist/templates-preview/templatesPreviewApi.d.ts +38 -0
- package/dist/templates-preview/templatesPreviewApi.js +53 -0
- package/dist/templates-preview/templatesPreviewInterfaces.d.ts +119 -0
- package/dist/templates-preview/templatesPreviewInterfaces.js +2 -0
- package/dist/templates-preview/templatesPreviewSchemas.d.ts +83 -0
- package/dist/templates-preview/templatesPreviewSchemas.js +48 -0
- package/dist/users/usersApi.d.ts +143 -0
- package/dist/users/usersApi.js +171 -0
- package/dist/users/usersInterfaces.d.ts +231 -0
- package/dist/users/usersInterfaces.js +2 -0
- package/dist/users/usersSchemas.d.ts +38 -0
- package/dist/users/usersSchemas.js +28 -0
- package/dist/web-socket/wsApi.d.ts +25 -0
- package/dist/web-socket/wsApi.js +45 -0
- package/dist/web-socket/wsInterfaces.d.ts +16 -0
- package/dist/web-socket/wsInterfaces.js +2 -0
- package/package.json +2 -80
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CreateSessionResponseSchema = exports.PaymentAccountsResponseSchema = exports.PaymentAccountSchema = exports.SinglePaymentSessionSchema = exports.PaymentSessionsResponseSchema = exports.PaymentSessionSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
/**
|
|
6
|
+
* Payment session schema
|
|
7
|
+
* @description Zod schema for validating payment session responses
|
|
8
|
+
*/
|
|
9
|
+
exports.PaymentSessionSchema = zod_1.z.object({
|
|
10
|
+
id: zod_1.z.number(),
|
|
11
|
+
orderId: zod_1.z.number(),
|
|
12
|
+
amount: zod_1.z.number().nullable(),
|
|
13
|
+
status: zod_1.z.string(),
|
|
14
|
+
createdDate: zod_1.z.string(),
|
|
15
|
+
updatedDate: zod_1.z.string(),
|
|
16
|
+
type: zod_1.z.string(),
|
|
17
|
+
paymentAccountId: zod_1.z.number(),
|
|
18
|
+
paymentUrl: zod_1.z.string().nullable(),
|
|
19
|
+
});
|
|
20
|
+
/**
|
|
21
|
+
* Payment sessions response schema
|
|
22
|
+
* @description Paginated response schema for payment sessions
|
|
23
|
+
*/
|
|
24
|
+
exports.PaymentSessionsResponseSchema = zod_1.z.object({
|
|
25
|
+
items: zod_1.z.array(exports.PaymentSessionSchema),
|
|
26
|
+
total: zod_1.z.number(),
|
|
27
|
+
});
|
|
28
|
+
/**
|
|
29
|
+
* Single payment session response schema
|
|
30
|
+
* @description Schema for a single payment session or array of sessions by order
|
|
31
|
+
*/
|
|
32
|
+
exports.SinglePaymentSessionSchema = zod_1.z.union([
|
|
33
|
+
exports.PaymentSessionSchema,
|
|
34
|
+
zod_1.z.array(exports.PaymentSessionSchema),
|
|
35
|
+
]);
|
|
36
|
+
/**
|
|
37
|
+
* Payment account schema
|
|
38
|
+
* @description Schema for a payment account
|
|
39
|
+
*/
|
|
40
|
+
exports.PaymentAccountSchema = zod_1.z.object({
|
|
41
|
+
id: zod_1.z.number(),
|
|
42
|
+
identifier: zod_1.z.string(),
|
|
43
|
+
isVisible: zod_1.z.boolean(),
|
|
44
|
+
isUsed: zod_1.z.boolean(),
|
|
45
|
+
testMode: zod_1.z.boolean(),
|
|
46
|
+
type: zod_1.z.string(),
|
|
47
|
+
settings: zod_1.z.record(zod_1.z.string(), zod_1.z.any()),
|
|
48
|
+
testSettings: zod_1.z.record(zod_1.z.string(), zod_1.z.any()).optional(),
|
|
49
|
+
localizeInfos: zod_1.z.record(zod_1.z.string(), zod_1.z.any()),
|
|
50
|
+
updatedDate: zod_1.z.string(),
|
|
51
|
+
});
|
|
52
|
+
/**
|
|
53
|
+
* Payment accounts response schema
|
|
54
|
+
*/
|
|
55
|
+
exports.PaymentAccountsResponseSchema = zod_1.z.array(exports.PaymentAccountSchema);
|
|
56
|
+
/**
|
|
57
|
+
* Create session response schema
|
|
58
|
+
*/
|
|
59
|
+
exports.CreateSessionResponseSchema = zod_1.z.object({
|
|
60
|
+
id: zod_1.z.number(),
|
|
61
|
+
updatedDate: zod_1.z.string(),
|
|
62
|
+
version: zod_1.z.number(),
|
|
63
|
+
identifier: zod_1.z.string(),
|
|
64
|
+
paymentUrl: zod_1.z.string(),
|
|
65
|
+
});
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import AsyncModules from '../base/asyncModules';
|
|
2
|
+
import type StateModule from '../base/stateModule';
|
|
3
|
+
import type { IError } from '../base/utils';
|
|
4
|
+
import type { IProductStatusEntity, IProductStatusesApi } from './productStatusesInterfaces';
|
|
5
|
+
/**
|
|
6
|
+
* Controllers for working with product statuses
|
|
7
|
+
* @handle /api/content/product-statuses
|
|
8
|
+
* @description Controllers for working with product statuses
|
|
9
|
+
*/
|
|
10
|
+
export default class ProductStatusesApi extends AsyncModules implements IProductStatusesApi {
|
|
11
|
+
protected state: StateModule;
|
|
12
|
+
protected _url: string;
|
|
13
|
+
/**
|
|
14
|
+
* Constructor
|
|
15
|
+
* @param {StateModule} state - State module instance
|
|
16
|
+
* @description Constructor initializes the ProductStatusesApi with a given state.
|
|
17
|
+
*/
|
|
18
|
+
constructor(state: StateModule);
|
|
19
|
+
/**
|
|
20
|
+
* Search for all product status objects.
|
|
21
|
+
* @handleName getProductStatuses
|
|
22
|
+
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
23
|
+
* @returns {Promise<IProductStatusEntity[] | IError>} Returns an array of product status objects.
|
|
24
|
+
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
25
|
+
* @description Search for all product status objects.
|
|
26
|
+
*/
|
|
27
|
+
getProductStatuses(langCode?: string): Promise<IProductStatusEntity[] | IError>;
|
|
28
|
+
/**
|
|
29
|
+
* Search for a product status object by its textual identifier (marker).
|
|
30
|
+
* @handleName getProductsByStatusMarker
|
|
31
|
+
* @param {string} marker - Product marker. Example: "in_stock".
|
|
32
|
+
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
33
|
+
* @returns {Promise<IProductStatusEntity | IError>} Returns a product status object.
|
|
34
|
+
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
35
|
+
* @description Search for a product status object by its textual identifier (marker).
|
|
36
|
+
*/
|
|
37
|
+
getProductsByStatusMarker(marker: string, langCode?: string): Promise<IProductStatusEntity | IError>;
|
|
38
|
+
/**
|
|
39
|
+
* Check the existence of a textual identifier.
|
|
40
|
+
* @handleName validateMarker
|
|
41
|
+
* @param {string} marker - Product marker. Example: "in_stock".
|
|
42
|
+
* @returns {Promise<boolean | IError>} Returns true if the textual identifier (marker) exists or false if it doesn't.
|
|
43
|
+
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
44
|
+
* @description Check the existence of a textual identifier.
|
|
45
|
+
*/
|
|
46
|
+
validateMarker(marker: string): Promise<boolean | IError>;
|
|
47
|
+
}
|
|
@@ -0,0 +1,70 @@
|
|
|
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 productStatusesSchemas_1 = require("./productStatusesSchemas");
|
|
8
|
+
/**
|
|
9
|
+
* Controllers for working with product statuses
|
|
10
|
+
* @handle /api/content/product-statuses
|
|
11
|
+
* @description Controllers for working with product statuses
|
|
12
|
+
*/
|
|
13
|
+
class ProductStatusesApi extends asyncModules_1.default {
|
|
14
|
+
/**
|
|
15
|
+
* Constructor
|
|
16
|
+
* @param {StateModule} state - State module instance
|
|
17
|
+
* @description Constructor initializes the ProductStatusesApi with a given state.
|
|
18
|
+
*/
|
|
19
|
+
constructor(state) {
|
|
20
|
+
super(state);
|
|
21
|
+
this._url = state.url + '/api/content/product-statuses';
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Search for all product status objects.
|
|
25
|
+
* @handleName getProductStatuses
|
|
26
|
+
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
27
|
+
* @returns {Promise<IProductStatusEntity[] | IError>} Returns an array of product status objects.
|
|
28
|
+
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
29
|
+
* @description Search for all product status objects.
|
|
30
|
+
*/
|
|
31
|
+
async getProductStatuses(langCode = this.state.lang) {
|
|
32
|
+
const result = await this._fetchGet('');
|
|
33
|
+
// Validate response if validation is enabled
|
|
34
|
+
const validated = this._validateResponse(result, productStatusesSchemas_1.ProductStatusesResponseSchema);
|
|
35
|
+
return this._normalizeData(validated, langCode);
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Search for a product status object by its textual identifier (marker).
|
|
39
|
+
* @handleName getProductsByStatusMarker
|
|
40
|
+
* @param {string} marker - Product marker. Example: "in_stock".
|
|
41
|
+
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
42
|
+
* @returns {Promise<IProductStatusEntity | IError>} Returns a product status object.
|
|
43
|
+
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
44
|
+
* @description Search for a product status object by its textual identifier (marker).
|
|
45
|
+
*/
|
|
46
|
+
async getProductsByStatusMarker(marker, langCode = this.state.lang) {
|
|
47
|
+
const result = await this._fetchGet(`/marker/${marker}`);
|
|
48
|
+
// Validate response if validation is enabled
|
|
49
|
+
const validated = this._validateResponse(result, productStatusesSchemas_1.ProductStatusEntitySchema);
|
|
50
|
+
return this._normalizeData(validated, langCode);
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Check the existence of a textual identifier.
|
|
54
|
+
* @handleName validateMarker
|
|
55
|
+
* @param {string} marker - Product marker. Example: "in_stock".
|
|
56
|
+
* @returns {Promise<boolean | IError>} Returns true if the textual identifier (marker) exists or false if it doesn't.
|
|
57
|
+
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
58
|
+
* @description Check the existence of a textual identifier.
|
|
59
|
+
*/
|
|
60
|
+
async validateMarker(marker) {
|
|
61
|
+
const result = await this._fetchGet(`/marker-validation/${marker}`);
|
|
62
|
+
// Validate response if validation is enabled
|
|
63
|
+
const validated = this._validateResponse(result, productStatusesSchemas_1.ValidateMarkerResponseSchema);
|
|
64
|
+
// Extract the 'valid' boolean value from the response object
|
|
65
|
+
return typeof validated === 'object' && 'valid' in validated
|
|
66
|
+
? validated.valid
|
|
67
|
+
: validated;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
exports.default = ProductStatusesApi;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import type { IError, ILocalizeInfo } from '../base/utils';
|
|
2
|
+
/**
|
|
3
|
+
* @interface IProductStatuses
|
|
4
|
+
* @description This interface defines methods for retrieving and managing product statuses in the system.
|
|
5
|
+
*/
|
|
6
|
+
interface IProductStatusesApi {
|
|
7
|
+
/**
|
|
8
|
+
* Search for all product status objects.
|
|
9
|
+
* @handleName getProductStatuses
|
|
10
|
+
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
11
|
+
* @returns {IProductStatusEntity[]} Returns an array of product status objects.
|
|
12
|
+
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
13
|
+
* @description This method searches for all product status objects.
|
|
14
|
+
*/
|
|
15
|
+
getProductStatuses(langCode: string): Promise<IProductStatusEntity[] | IError>;
|
|
16
|
+
/**
|
|
17
|
+
* Search for a product status object by its textual identifier (marker).
|
|
18
|
+
* @handleName getProductsByStatusMarker
|
|
19
|
+
* @param {string} marker - Product marker. Example: "in_stock".
|
|
20
|
+
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
21
|
+
* @returns {IProductStatusEntity} Returns a product status object.
|
|
22
|
+
* @throws {IError} If there is an error during the fetch operation, it will return an error object.
|
|
23
|
+
* @description This method searches for a product status object by its textual identifier (marker).
|
|
24
|
+
*/
|
|
25
|
+
getProductsByStatusMarker(marker: string, langCode: string): Promise<IProductStatusEntity | IError>;
|
|
26
|
+
/**
|
|
27
|
+
* Check the existence of a textual identifier.
|
|
28
|
+
* @handleName validateMarker
|
|
29
|
+
* @param {string} marker - Product marker. Example: "in_stock".
|
|
30
|
+
* @returns {boolean} Returns true if the textual identifier (marker) exists or false if it doesn't.
|
|
31
|
+
* @throws {IError} If there is an error during the fetch operation, it will return an error object.
|
|
32
|
+
* @description This method checks the existence of a textual identifier.
|
|
33
|
+
*/
|
|
34
|
+
validateMarker(marker: string): Promise<boolean | IError>;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Product status entity structure
|
|
38
|
+
* @interface IProductStatusEntity
|
|
39
|
+
* @property {number} id - The unique identifier of the position. Example: 12345.
|
|
40
|
+
* @property {string} identifier - The textual identifier for the record field. Example: "in_stock".
|
|
41
|
+
* @property {ILocalizeInfo} localizeInfos - The name of the products statuses, taking into account localization.
|
|
42
|
+
* @example
|
|
43
|
+
{
|
|
44
|
+
"title": "Catalog",
|
|
45
|
+
"plainContent": "Content for catalog",
|
|
46
|
+
"htmlContent": "<b>Content for catalog</b>",
|
|
47
|
+
"menuTitle": "Catalog"
|
|
48
|
+
}
|
|
49
|
+
* @property {boolean} isDefault - Default status flag. Example: true.
|
|
50
|
+
* @property {number} version - The version number of the object. Example: 1.
|
|
51
|
+
* @property {number} position - Position number. Example: 1.
|
|
52
|
+
* @description This interface defines the structure of a product status entity, including its identifiers, localization information, position, and default status flag.
|
|
53
|
+
*/
|
|
54
|
+
interface IProductStatusEntity {
|
|
55
|
+
id: number;
|
|
56
|
+
identifier: string;
|
|
57
|
+
localizeInfos: ILocalizeInfo;
|
|
58
|
+
isDefault: boolean;
|
|
59
|
+
version: number;
|
|
60
|
+
position: number;
|
|
61
|
+
}
|
|
62
|
+
export type { IProductStatusEntity, IProductStatusesApi };
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Validation schemas for ProductStatuses module
|
|
3
|
+
* @description Zod schemas for validating product statuses-related API responses
|
|
4
|
+
*/
|
|
5
|
+
import { z } from 'zod';
|
|
6
|
+
/**
|
|
7
|
+
* Product status entity schema
|
|
8
|
+
* Includes all fields returned by the API
|
|
9
|
+
*/
|
|
10
|
+
export declare const ProductStatusEntitySchema: z.ZodObject<{
|
|
11
|
+
id: z.ZodNumber;
|
|
12
|
+
identifier: z.ZodString;
|
|
13
|
+
localizeInfos: z.ZodRecord<z.ZodString, z.ZodAny>;
|
|
14
|
+
isDefault: z.ZodBoolean;
|
|
15
|
+
version: z.ZodNumber;
|
|
16
|
+
position: z.ZodNumber;
|
|
17
|
+
}, z.core.$strip>;
|
|
18
|
+
/**
|
|
19
|
+
* Product statuses response schema (array of product statuses)
|
|
20
|
+
*/
|
|
21
|
+
export declare const ProductStatusesResponseSchema: z.ZodArray<z.ZodObject<{
|
|
22
|
+
id: z.ZodNumber;
|
|
23
|
+
identifier: z.ZodString;
|
|
24
|
+
localizeInfos: z.ZodRecord<z.ZodString, z.ZodAny>;
|
|
25
|
+
isDefault: z.ZodBoolean;
|
|
26
|
+
version: z.ZodNumber;
|
|
27
|
+
position: z.ZodNumber;
|
|
28
|
+
}, z.core.$strip>>;
|
|
29
|
+
/**
|
|
30
|
+
* Validate marker response schema (object with valid property)
|
|
31
|
+
*/
|
|
32
|
+
export declare const ValidateMarkerResponseSchema: z.ZodObject<{
|
|
33
|
+
valid: z.ZodBoolean;
|
|
34
|
+
}, z.core.$strip>;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ValidateMarkerResponseSchema = exports.ProductStatusesResponseSchema = exports.ProductStatusEntitySchema = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Validation schemas for ProductStatuses module
|
|
6
|
+
* @description Zod schemas for validating product statuses-related API responses
|
|
7
|
+
*/
|
|
8
|
+
const zod_1 = require("zod");
|
|
9
|
+
/**
|
|
10
|
+
* Product status entity schema
|
|
11
|
+
* Includes all fields returned by the API
|
|
12
|
+
*/
|
|
13
|
+
exports.ProductStatusEntitySchema = zod_1.z.object({
|
|
14
|
+
id: zod_1.z.number(),
|
|
15
|
+
identifier: zod_1.z.string(),
|
|
16
|
+
localizeInfos: zod_1.z.record(zod_1.z.string(), zod_1.z.any()),
|
|
17
|
+
isDefault: zod_1.z.boolean(),
|
|
18
|
+
version: zod_1.z.number(),
|
|
19
|
+
position: zod_1.z.number(),
|
|
20
|
+
});
|
|
21
|
+
/**
|
|
22
|
+
* Product statuses response schema (array of product statuses)
|
|
23
|
+
*/
|
|
24
|
+
exports.ProductStatusesResponseSchema = zod_1.z.array(exports.ProductStatusEntitySchema);
|
|
25
|
+
/**
|
|
26
|
+
* Validate marker response schema (object with valid property)
|
|
27
|
+
*/
|
|
28
|
+
exports.ValidateMarkerResponseSchema = zod_1.z.object({
|
|
29
|
+
valid: zod_1.z.boolean(),
|
|
30
|
+
});
|