oneentry 1.0.149 → 1.0.151
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 +8 -0
- package/changelog.md +453 -0
- package/dist/base/asyncModules.js +13 -0
- package/dist/base/stateModule.d.ts +1 -0
- package/dist/base/stateModule.js +3 -0
- package/dist/base/syncModules.d.ts +30 -1
- package/dist/base/syncModules.js +102 -30
- package/dist/base/utils.d.ts +4 -1
- package/dist/blocks/blocksApi.d.ts +124 -3
- package/dist/blocks/blocksApi.js +169 -4
- package/dist/blocks/blocksInterfaces.d.ts +177 -4
- package/dist/blocks/blocksSchemas.d.ts +4 -0
- package/dist/events/eventsApi.d.ts +42 -1
- package/dist/events/eventsApi.js +67 -0
- package/dist/events/eventsInterfaces.d.ts +79 -1
- package/dist/file-uploading/fileUploadingInterfaces.d.ts +2 -0
- package/dist/file-uploading/fileUploadingSchemas.d.ts +2 -0
- package/dist/file-uploading/fileUploadingSchemas.js +1 -0
- package/dist/filters/filtersApi.d.ts +31 -0
- package/dist/filters/filtersApi.js +40 -0
- package/dist/filters/filtersInterfaces.d.ts +56 -0
- package/dist/filters/filtersInterfaces.js +2 -0
- package/dist/filters/filtersSchemas.d.ts +32 -0
- package/dist/filters/filtersSchemas.js +29 -0
- package/dist/forms-data/formsDataInterfaces.d.ts +2 -2
- package/dist/forms-data/formsDataSchemas.d.ts +1 -1
- package/dist/forms-data/formsDataSchemas.js +1 -1
- package/dist/general-types/generalTypesSchemas.d.ts +16 -0
- package/dist/general-types/generalTypesSchemas.js +10 -1
- package/dist/index.d.ts +13 -0
- package/dist/index.js +10 -0
- package/dist/orders/ordersInterfaces.d.ts +51 -3
- package/dist/orders/ordersSchemas.d.ts +127 -31
- package/dist/orders/ordersSchemas.js +53 -30
- package/dist/pages/pagesInterfaces.d.ts +14 -8
- package/dist/pages/pagesSchemas.d.ts +24 -9
- package/dist/pages/pagesSchemas.js +4 -3
- package/dist/products/productsApi.d.ts +19 -1
- package/dist/products/productsApi.js +42 -8
- package/dist/products/productsInterfaces.d.ts +35 -6
- package/dist/products/productsSchemas.d.ts +4 -0
- package/dist/products/productsSchemas.js +1 -0
- package/dist/subscriptions/subscriptionsApi.d.ts +69 -0
- package/dist/subscriptions/subscriptionsApi.js +102 -0
- package/dist/subscriptions/subscriptionsInterfaces.d.ts +90 -0
- package/dist/subscriptions/subscriptionsInterfaces.js +2 -0
- package/dist/subscriptions/subscriptionsSchemas.d.ts +20 -0
- package/dist/subscriptions/subscriptionsSchemas.js +23 -0
- package/dist/user-activity/userActivityApi.d.ts +30 -0
- package/dist/user-activity/userActivityApi.js +42 -0
- package/dist/user-activity/userActivityInterfaces.d.ts +42 -0
- package/dist/user-activity/userActivityInterfaces.js +2 -0
- package/dist/users/usersApi.d.ts +79 -1
- package/dist/users/usersApi.js +110 -0
- package/dist/users/usersInterfaces.d.ts +155 -1
- package/dist/users/usersSchemas.d.ts +40 -0
- package/dist/users/usersSchemas.js +34 -1
- package/package.json +3 -2
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Validation schemas for Filters module
|
|
3
|
+
* @description Zod schemas for validating filters-related API responses (raw API data, before normalization)
|
|
4
|
+
*/
|
|
5
|
+
import { z } from 'zod';
|
|
6
|
+
/**
|
|
7
|
+
* Raw content filter item shape (before normalization), used to type the recursive schema.
|
|
8
|
+
* @description Raw filter item tree node as returned by the API (localizeInfos kept as a locale map).
|
|
9
|
+
*/
|
|
10
|
+
type IContentFilterItemRaw = {
|
|
11
|
+
type: string;
|
|
12
|
+
marker?: string | null;
|
|
13
|
+
url?: string | null;
|
|
14
|
+
localizeInfos?: Record<string, unknown>;
|
|
15
|
+
value?: string | null;
|
|
16
|
+
position?: number;
|
|
17
|
+
children?: IContentFilterItemRaw[];
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* Content filter item schema (recursive)
|
|
21
|
+
* @description Schema for a single filter item tree node; `children` recurses into the same schema
|
|
22
|
+
*/
|
|
23
|
+
export declare const ContentFilterItemSchema: z.ZodType<IContentFilterItemRaw>;
|
|
24
|
+
/**
|
|
25
|
+
* Content filter schema
|
|
26
|
+
* @description Schema for a content filter returned by getFilterByMarker
|
|
27
|
+
*/
|
|
28
|
+
export declare const ContentFilterSchema: z.ZodObject<{
|
|
29
|
+
localizeInfos: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
30
|
+
items: z.ZodOptional<z.ZodArray<z.ZodType<IContentFilterItemRaw, unknown, z.core.$ZodTypeInternals<IContentFilterItemRaw, unknown>>>>;
|
|
31
|
+
}, z.core.$strip>;
|
|
32
|
+
export {};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ContentFilterSchema = exports.ContentFilterItemSchema = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Validation schemas for Filters module
|
|
6
|
+
* @description Zod schemas for validating filters-related API responses (raw API data, before normalization)
|
|
7
|
+
*/
|
|
8
|
+
const zod_1 = require("zod");
|
|
9
|
+
/**
|
|
10
|
+
* Content filter item schema (recursive)
|
|
11
|
+
* @description Schema for a single filter item tree node; `children` recurses into the same schema
|
|
12
|
+
*/
|
|
13
|
+
exports.ContentFilterItemSchema = zod_1.z.lazy(() => zod_1.z.object({
|
|
14
|
+
type: zod_1.z.string(),
|
|
15
|
+
marker: zod_1.z.string().nullable().optional(),
|
|
16
|
+
url: zod_1.z.string().nullable().optional(),
|
|
17
|
+
localizeInfos: zod_1.z.record(zod_1.z.string(), zod_1.z.unknown()).optional(),
|
|
18
|
+
value: zod_1.z.string().nullable().optional(),
|
|
19
|
+
position: zod_1.z.number().optional(),
|
|
20
|
+
children: zod_1.z.array(exports.ContentFilterItemSchema).optional(),
|
|
21
|
+
}));
|
|
22
|
+
/**
|
|
23
|
+
* Content filter schema
|
|
24
|
+
* @description Schema for a content filter returned by getFilterByMarker
|
|
25
|
+
*/
|
|
26
|
+
exports.ContentFilterSchema = zod_1.z.object({
|
|
27
|
+
localizeInfos: zod_1.z.record(zod_1.z.string(), zod_1.z.unknown()),
|
|
28
|
+
items: zod_1.z.array(exports.ContentFilterItemSchema).optional(),
|
|
29
|
+
});
|
|
@@ -253,7 +253,7 @@ interface IPostFormResponse {
|
|
|
253
253
|
* @property {string} formIdentifier - Identifier of the form. Example: "contact_form".
|
|
254
254
|
* @property {string} time - Time of submission. Example: "2023-10-01T12:00:00Z".
|
|
255
255
|
* @property {string} entityIdentifier - Identifier of the entity the form is attached to. Example: "blog".
|
|
256
|
-
* @property {string} fingerprint - Submission fingerprint.
|
|
256
|
+
* @property {string | null} fingerprint - Submission fingerprint, or null for anonymous / app-token submissions.
|
|
257
257
|
* @property {boolean} isUserAdmin - Whether the submitting user is an administrator. Example: false.
|
|
258
258
|
* @property {number} formModuleId - Form module configuration identifier. Example: 2.
|
|
259
259
|
* @property {string | null} userIdentifier - Identifier of the submitting user, or null when anonymous.
|
|
@@ -266,7 +266,7 @@ interface IPostFormResponseData {
|
|
|
266
266
|
formIdentifier: string;
|
|
267
267
|
time: string;
|
|
268
268
|
entityIdentifier: string;
|
|
269
|
-
fingerprint: string;
|
|
269
|
+
fingerprint: string | null;
|
|
270
270
|
isUserAdmin: boolean;
|
|
271
271
|
formModuleId: number;
|
|
272
272
|
userIdentifier: string | null;
|
|
@@ -74,7 +74,7 @@ export declare const PostFormResponseSchema: z.ZodObject<{
|
|
|
74
74
|
formIdentifier: z.ZodString;
|
|
75
75
|
time: z.ZodString;
|
|
76
76
|
entityIdentifier: z.ZodString;
|
|
77
|
-
fingerprint: z.ZodString
|
|
77
|
+
fingerprint: z.ZodNullable<z.ZodString>;
|
|
78
78
|
isUserAdmin: z.ZodBoolean;
|
|
79
79
|
formModuleId: z.ZodNumber;
|
|
80
80
|
userIdentifier: z.ZodNullable<z.ZodString>;
|
|
@@ -58,7 +58,7 @@ exports.PostFormResponseSchema = zod_1.z.object({
|
|
|
58
58
|
formIdentifier: zod_1.z.string(),
|
|
59
59
|
time: zod_1.z.string(),
|
|
60
60
|
entityIdentifier: zod_1.z.string(),
|
|
61
|
-
fingerprint: zod_1.z.string(),
|
|
61
|
+
fingerprint: zod_1.z.string().nullable(),
|
|
62
62
|
isUserAdmin: zod_1.z.boolean(),
|
|
63
63
|
formModuleId: zod_1.z.number(),
|
|
64
64
|
userIdentifier: zod_1.z.string().nullable(),
|
|
@@ -20,6 +20,14 @@ export declare const GeneralTypeEntitySchema: z.ZodObject<{
|
|
|
20
20
|
similar_products_block: "similar_products_block";
|
|
21
21
|
product_block: "product_block";
|
|
22
22
|
frequently_ordered_block: "frequently_ordered_block";
|
|
23
|
+
trending_block: "trending_block";
|
|
24
|
+
recently_viewed_block: "recently_viewed_block";
|
|
25
|
+
repeat_purchase_block: "repeat_purchase_block";
|
|
26
|
+
slider_block: "slider_block";
|
|
27
|
+
personal_recommendations_block: "personal_recommendations_block";
|
|
28
|
+
cart_complement_block: "cart_complement_block";
|
|
29
|
+
cart_similar_block: "cart_similar_block";
|
|
30
|
+
wishlist_similar_block: "wishlist_similar_block";
|
|
23
31
|
common_page: "common_page";
|
|
24
32
|
common_block: "common_block";
|
|
25
33
|
service: "service";
|
|
@@ -43,6 +51,14 @@ export declare const GeneralTypesResponseSchema: z.ZodArray<z.ZodObject<{
|
|
|
43
51
|
similar_products_block: "similar_products_block";
|
|
44
52
|
product_block: "product_block";
|
|
45
53
|
frequently_ordered_block: "frequently_ordered_block";
|
|
54
|
+
trending_block: "trending_block";
|
|
55
|
+
recently_viewed_block: "recently_viewed_block";
|
|
56
|
+
repeat_purchase_block: "repeat_purchase_block";
|
|
57
|
+
slider_block: "slider_block";
|
|
58
|
+
personal_recommendations_block: "personal_recommendations_block";
|
|
59
|
+
cart_complement_block: "cart_complement_block";
|
|
60
|
+
cart_similar_block: "cart_similar_block";
|
|
61
|
+
wishlist_similar_block: "wishlist_similar_block";
|
|
46
62
|
common_page: "common_page";
|
|
47
63
|
common_block: "common_block";
|
|
48
64
|
service: "service";
|
|
@@ -12,6 +12,7 @@ const zod_1 = require("zod");
|
|
|
12
12
|
*/
|
|
13
13
|
exports.GeneralTypeEntitySchema = zod_1.z.object({
|
|
14
14
|
id: zod_1.z.number(),
|
|
15
|
+
// Must stay in sync with BlockType in src/blocks/blocksInterfaces.ts
|
|
15
16
|
type: zod_1.z.enum([
|
|
16
17
|
'product',
|
|
17
18
|
'error_page',
|
|
@@ -19,6 +20,15 @@ exports.GeneralTypeEntitySchema = zod_1.z.object({
|
|
|
19
20
|
'product_preview',
|
|
20
21
|
'similar_products_block',
|
|
21
22
|
'product_block',
|
|
23
|
+
'frequently_ordered_block',
|
|
24
|
+
'trending_block',
|
|
25
|
+
'recently_viewed_block',
|
|
26
|
+
'repeat_purchase_block',
|
|
27
|
+
'slider_block',
|
|
28
|
+
'personal_recommendations_block',
|
|
29
|
+
'cart_complement_block',
|
|
30
|
+
'cart_similar_block',
|
|
31
|
+
'wishlist_similar_block',
|
|
22
32
|
'form',
|
|
23
33
|
'common_page',
|
|
24
34
|
'common_block',
|
|
@@ -26,7 +36,6 @@ exports.GeneralTypeEntitySchema = zod_1.z.object({
|
|
|
26
36
|
'service',
|
|
27
37
|
'external_page',
|
|
28
38
|
'discount',
|
|
29
|
-
'frequently_ordered_block',
|
|
30
39
|
'none',
|
|
31
40
|
]),
|
|
32
41
|
});
|
package/dist/index.d.ts
CHANGED
|
@@ -9,6 +9,7 @@ import BlocksApi from './blocks/blocksApi';
|
|
|
9
9
|
import DiscountsApi from './discounts/discountsApi';
|
|
10
10
|
import EventsApi from './events/eventsApi';
|
|
11
11
|
import FileUploadingApi from './file-uploading/fileUploadingApi';
|
|
12
|
+
import FiltersApi from './filters/filtersApi';
|
|
12
13
|
import FormsApi from './forms/formsApi';
|
|
13
14
|
import FormsDataApi from './forms-data/formsDataApi';
|
|
14
15
|
import GeneralTypesApi from './general-types/generalTypesApi';
|
|
@@ -21,9 +22,11 @@ import PaymentsApi from './payments/paymentsApi';
|
|
|
21
22
|
import ProductStatusesApi from './product-statuses/productStatusesApi';
|
|
22
23
|
import ProductsApi from './products/productsApi';
|
|
23
24
|
import SitemapApi from './sitemap/sitemapApi';
|
|
25
|
+
import SubscriptionsApi from './subscriptions/subscriptionsApi';
|
|
24
26
|
import SystemApi from './system/systemApi';
|
|
25
27
|
import TemplatesApi from './templates/templatesApi';
|
|
26
28
|
import TemplatePreviewsApi from './templates-preview/templatesPreviewApi';
|
|
29
|
+
import UserActivityApi from './user-activity/userActivityApi';
|
|
27
30
|
import UsersApi from './users/usersApi';
|
|
28
31
|
import WsApi from './web-socket/wsApi';
|
|
29
32
|
/**
|
|
@@ -36,6 +39,7 @@ import WsApi from './web-socket/wsApi';
|
|
|
36
39
|
* @property {EventsApi} Events - Events API module.
|
|
37
40
|
* @property {DiscountsApi} Discounts - Discounts API module.
|
|
38
41
|
* @property {FileUploadingApi} FileUploading - File uploading API module.
|
|
42
|
+
* @property {FiltersApi} Filters - Filters API module.
|
|
39
43
|
* @property {FormsApi} Forms - Forms API module.
|
|
40
44
|
* @property {FormsDataApi} FormData - Form data API module.
|
|
41
45
|
* @property {GeneralTypesApi} GeneralTypes - General types API module.
|
|
@@ -48,9 +52,11 @@ import WsApi from './web-socket/wsApi';
|
|
|
48
52
|
* @property {ProductsApi} Products - Products API module.
|
|
49
53
|
* @property {ProductStatusesApi} ProductStatuses - Product statuses API module.
|
|
50
54
|
* @property {SitemapApi} Sitemap - Sitemap API module.
|
|
55
|
+
* @property {SubscriptionsApi} Subscriptions - Subscriptions API module.
|
|
51
56
|
* @property {SystemApi} System - System API module.
|
|
52
57
|
* @property {TemplatesApi} Templates - Templates API module.
|
|
53
58
|
* @property {TemplatePreviewsApi} TemplatePreviews - Template previews API module.
|
|
59
|
+
* @property {UserActivityApi} UserActivity - User activity API module.
|
|
54
60
|
* @property {UsersApi} Users - Users API module.
|
|
55
61
|
* @property {WsApi} WS - WebSocket API module.
|
|
56
62
|
*/
|
|
@@ -69,6 +75,8 @@ interface IDefineApi {
|
|
|
69
75
|
Discounts: DiscountsApi;
|
|
70
76
|
/** File upload helpers: createFileFromUrl */
|
|
71
77
|
FileUploading: FileUploadingApi;
|
|
78
|
+
/** Content filters: getFilterByMarker */
|
|
79
|
+
Filters: FiltersApi;
|
|
72
80
|
/** Form schemas: getFormByMarker — use for rendering dynamic forms */
|
|
73
81
|
Forms: FormsApi;
|
|
74
82
|
/** Submit form data: postFormsData */
|
|
@@ -93,12 +101,16 @@ interface IDefineApi {
|
|
|
93
101
|
ProductStatuses: ProductStatusesApi;
|
|
94
102
|
/** Sitemap generation */
|
|
95
103
|
Sitemap: SitemapApi;
|
|
104
|
+
/** Paid subscriptions: subscribe, cancelSubscription, recoverSubscriptions, getAllSubscriptions, getActiveSubscriptions */
|
|
105
|
+
Subscriptions: SubscriptionsApi;
|
|
96
106
|
/** System info */
|
|
97
107
|
System: SystemApi;
|
|
98
108
|
/** Page templates */
|
|
99
109
|
Templates: TemplatesApi;
|
|
100
110
|
/** Template previews */
|
|
101
111
|
TemplatePreviews: TemplatePreviewsApi;
|
|
112
|
+
/** User/guest activity tracking: trackUserActivity */
|
|
113
|
+
UserActivity: UserActivityApi;
|
|
102
114
|
/** Current authenticated user: getUser, updateUser */
|
|
103
115
|
Users: UsersApi;
|
|
104
116
|
/** WebSocket real-time updates */
|
|
@@ -110,6 +122,7 @@ interface IDefineApi {
|
|
|
110
122
|
* @param {string} url - URl of your project.
|
|
111
123
|
* @param {IConfig} config - Custom configuration settings
|
|
112
124
|
* @param {string} [config.token] - Optional token parameter
|
|
125
|
+
* @param {string} [config.guestId] - Optional guest identifier sent as the `x-guest-id` header for guest cart/wishlist/activity flows (only while unauthenticated). In the browser, if omitted, a stable per-device id is generated and persisted in localStorage. On the server you MUST pass a per-visitor `guestId` (or call `setGuestId`): the SDK never auto-generates a server id, to avoid sharing one guest across visitors.
|
|
113
126
|
* @param {string} [config.langCode] - Optional langCode parameter
|
|
114
127
|
* @param {boolean} [config.traficLimit] - Some methods use multiple queries to make it easier to work with the API. Set this parameter to "false" to save traffic and decide for yourself what data you need.
|
|
115
128
|
* @param {string} [config.auth] - An object with authorization settings.
|
package/dist/index.js
CHANGED
|
@@ -15,6 +15,7 @@ const blocksApi_1 = __importDefault(require("./blocks/blocksApi"));
|
|
|
15
15
|
const discountsApi_1 = __importDefault(require("./discounts/discountsApi"));
|
|
16
16
|
const eventsApi_1 = __importDefault(require("./events/eventsApi"));
|
|
17
17
|
const fileUploadingApi_1 = __importDefault(require("./file-uploading/fileUploadingApi"));
|
|
18
|
+
const filtersApi_1 = __importDefault(require("./filters/filtersApi"));
|
|
18
19
|
const formsApi_1 = __importDefault(require("./forms/formsApi"));
|
|
19
20
|
const formsDataApi_1 = __importDefault(require("./forms-data/formsDataApi"));
|
|
20
21
|
const generalTypesApi_1 = __importDefault(require("./general-types/generalTypesApi"));
|
|
@@ -27,9 +28,11 @@ const paymentsApi_1 = __importDefault(require("./payments/paymentsApi"));
|
|
|
27
28
|
const productStatusesApi_1 = __importDefault(require("./product-statuses/productStatusesApi"));
|
|
28
29
|
const productsApi_1 = __importDefault(require("./products/productsApi"));
|
|
29
30
|
const sitemapApi_1 = __importDefault(require("./sitemap/sitemapApi"));
|
|
31
|
+
const subscriptionsApi_1 = __importDefault(require("./subscriptions/subscriptionsApi"));
|
|
30
32
|
const systemApi_1 = __importDefault(require("./system/systemApi"));
|
|
31
33
|
const templatesApi_1 = __importDefault(require("./templates/templatesApi"));
|
|
32
34
|
const templatesPreviewApi_1 = __importDefault(require("./templates-preview/templatesPreviewApi"));
|
|
35
|
+
const userActivityApi_1 = __importDefault(require("./user-activity/userActivityApi"));
|
|
33
36
|
const usersApi_1 = __importDefault(require("./users/usersApi"));
|
|
34
37
|
const wsApi_1 = __importDefault(require("./web-socket/wsApi"));
|
|
35
38
|
/**
|
|
@@ -38,6 +41,7 @@ const wsApi_1 = __importDefault(require("./web-socket/wsApi"));
|
|
|
38
41
|
* @param {string} url - URl of your project.
|
|
39
42
|
* @param {IConfig} config - Custom configuration settings
|
|
40
43
|
* @param {string} [config.token] - Optional token parameter
|
|
44
|
+
* @param {string} [config.guestId] - Optional guest identifier sent as the `x-guest-id` header for guest cart/wishlist/activity flows (only while unauthenticated). In the browser, if omitted, a stable per-device id is generated and persisted in localStorage. On the server you MUST pass a per-visitor `guestId` (or call `setGuestId`): the SDK never auto-generates a server id, to avoid sharing one guest across visitors.
|
|
41
45
|
* @param {string} [config.langCode] - Optional langCode parameter
|
|
42
46
|
* @param {boolean} [config.traficLimit] - Some methods use multiple queries to make it easier to work with the API. Set this parameter to "false" to save traffic and decide for yourself what data you need.
|
|
43
47
|
* @param {string} [config.auth] - An object with authorization settings.
|
|
@@ -57,6 +61,7 @@ function defineOneEntry(url, config) {
|
|
|
57
61
|
const Discounts = new discountsApi_1.default(stateModule);
|
|
58
62
|
const Events = new eventsApi_1.default(stateModule);
|
|
59
63
|
const FileUploading = new fileUploadingApi_1.default(stateModule);
|
|
64
|
+
const Filters = new filtersApi_1.default(stateModule);
|
|
60
65
|
const Forms = new formsApi_1.default(stateModule);
|
|
61
66
|
const FormData = new formsDataApi_1.default(stateModule);
|
|
62
67
|
const GeneralTypes = new generalTypesApi_1.default(stateModule);
|
|
@@ -69,9 +74,11 @@ function defineOneEntry(url, config) {
|
|
|
69
74
|
const Products = new productsApi_1.default(stateModule);
|
|
70
75
|
const ProductStatuses = new productStatusesApi_1.default(stateModule);
|
|
71
76
|
const Sitemap = new sitemapApi_1.default(stateModule);
|
|
77
|
+
const Subscriptions = new subscriptionsApi_1.default(stateModule);
|
|
72
78
|
const System = new systemApi_1.default(stateModule);
|
|
73
79
|
const Templates = new templatesApi_1.default(stateModule);
|
|
74
80
|
const TemplatePreviews = new templatesPreviewApi_1.default(stateModule);
|
|
81
|
+
const UserActivity = new userActivityApi_1.default(stateModule);
|
|
75
82
|
const Users = new usersApi_1.default(stateModule);
|
|
76
83
|
const WS = new wsApi_1.default(stateModule);
|
|
77
84
|
return {
|
|
@@ -82,6 +89,7 @@ function defineOneEntry(url, config) {
|
|
|
82
89
|
Discounts,
|
|
83
90
|
Events,
|
|
84
91
|
FileUploading,
|
|
92
|
+
Filters,
|
|
85
93
|
Forms,
|
|
86
94
|
FormData,
|
|
87
95
|
GeneralTypes,
|
|
@@ -94,9 +102,11 @@ function defineOneEntry(url, config) {
|
|
|
94
102
|
Products,
|
|
95
103
|
ProductStatuses,
|
|
96
104
|
Sitemap,
|
|
105
|
+
Subscriptions,
|
|
97
106
|
System,
|
|
98
107
|
Templates,
|
|
99
108
|
TemplatePreviews,
|
|
109
|
+
UserActivity,
|
|
100
110
|
Users,
|
|
101
111
|
WS,
|
|
102
112
|
};
|
|
@@ -359,16 +359,24 @@ interface IOrderDiscountBonus {
|
|
|
359
359
|
* @property {boolean} allowGiftStacking - Whether multiple gift discounts can be combined. Example: false.
|
|
360
360
|
* @property {boolean} allowStacking - Whether multiple non-gift discounts can be combined. Example: false.
|
|
361
361
|
* @property {number | null} maxDiscountValue - Hard cap on total discount value, or null if uncapped. Example: null.
|
|
362
|
+
* @property {string} [giftRefundPolicy] - Refund policy applied to gift products (present on newer orders). Example: "refund".
|
|
363
|
+
* @property {number | null} [maxBonusPaymentPercent] - Maximum share of the order payable with bonuses, or null if uncapped (present on newer orders).
|
|
364
|
+
* @property {number | null} [minBonusAmount] - Minimum bonus amount required to apply bonuses, or null when not configured (present on newer orders).
|
|
365
|
+
* @property {number | null} [minOrderAmountForBonus] - Minimum order amount required to earn/spend bonuses, or null when not configured (present on newer orders).
|
|
362
366
|
* @description Stacking and cap settings for the order discount engine.
|
|
363
367
|
*/
|
|
364
368
|
interface IOrderDiscountSettings {
|
|
365
369
|
allowGiftStacking: boolean;
|
|
366
370
|
allowStacking: boolean;
|
|
367
371
|
maxDiscountValue: number | null;
|
|
372
|
+
giftRefundPolicy?: string;
|
|
373
|
+
maxBonusPaymentPercent?: number | null;
|
|
374
|
+
minBonusAmount?: number | null;
|
|
375
|
+
minOrderAmountForBonus?: number | null;
|
|
368
376
|
}
|
|
369
377
|
/**
|
|
370
378
|
* @interface IOrderDiscountConfig
|
|
371
|
-
* @property {IOrderDiscountBonus | null} bonus - Bonus calculation result,
|
|
379
|
+
* @property {IOrderDiscountBonus | null} [bonus] - Bonus calculation result, null when bonuses are not used, or omitted entirely when the order has no bonus context.
|
|
372
380
|
* @property {unknown | null} coupon - Resolved coupon, or null when no coupon is applied.
|
|
373
381
|
* @property {unknown[]} orderDiscounts - Order-level discounts that were matched and applied.
|
|
374
382
|
* @property {unknown[]} productDiscounts - Product-level discounts that were matched and applied.
|
|
@@ -382,7 +390,7 @@ interface IOrderDiscountSettings {
|
|
|
382
390
|
* @description Resolved discount configuration returned alongside an order or order preview. Preview responses include only the calculation inputs (bonus, coupon, orderDiscounts, productDiscounts, settings); created/updated orders also carry the totals and applied markers.
|
|
383
391
|
*/
|
|
384
392
|
interface IOrderDiscountConfig {
|
|
385
|
-
bonus
|
|
393
|
+
bonus?: IOrderDiscountBonus | null;
|
|
386
394
|
coupon: unknown | null;
|
|
387
395
|
orderDiscounts: unknown[];
|
|
388
396
|
productDiscounts: unknown[];
|
|
@@ -485,6 +493,36 @@ interface IOrderData {
|
|
|
485
493
|
additionalDiscountsMarkers?: string[];
|
|
486
494
|
bonusAmount?: number;
|
|
487
495
|
}
|
|
496
|
+
/**
|
|
497
|
+
* @interface IOrderSplitStage
|
|
498
|
+
* @property {string} marker - Stage marker. Example: "stage-1".
|
|
499
|
+
* @property {string | null} sessionId - Payment session identifier for the stage, or null when not yet started. Example: null.
|
|
500
|
+
* @property {number} productId - Identifier of the product covered by the stage. Example: 1.
|
|
501
|
+
* @property {string} title - Stage title. Example: "Deposit".
|
|
502
|
+
* @property {number} value - Stage amount. Example: 100.
|
|
503
|
+
* @property {string} status - Stage status. Example: "pending".
|
|
504
|
+
* @description A single stage of a split (staged) order payment.
|
|
505
|
+
*/
|
|
506
|
+
interface IOrderSplitStage {
|
|
507
|
+
marker: string;
|
|
508
|
+
sessionId: string | null;
|
|
509
|
+
productId: number;
|
|
510
|
+
title: string;
|
|
511
|
+
value: number;
|
|
512
|
+
status: string;
|
|
513
|
+
}
|
|
514
|
+
/**
|
|
515
|
+
* @interface IOrderSplit
|
|
516
|
+
* @property {boolean} completed - Whether all split stages are completed. Example: false.
|
|
517
|
+
* @property {boolean} partial - Whether the split is partially paid. Example: false.
|
|
518
|
+
* @property {IOrderSplitStage[]} stages - Ordered list of split payment stages.
|
|
519
|
+
* @description Split (staged) payment configuration of an order; returned by the by-id order endpoint.
|
|
520
|
+
*/
|
|
521
|
+
interface IOrderSplit {
|
|
522
|
+
completed: boolean;
|
|
523
|
+
partial: boolean;
|
|
524
|
+
stages: IOrderSplitStage[];
|
|
525
|
+
}
|
|
488
526
|
/**
|
|
489
527
|
* Interface representing an order product data.
|
|
490
528
|
* @interface IOrderByMarkerEntity
|
|
@@ -504,6 +542,7 @@ interface IOrderData {
|
|
|
504
542
|
]
|
|
505
543
|
* @property {string | null} [attributeSetIdentifier] - Text identifier of the attribute set. Example: "attribute-set-1".
|
|
506
544
|
* @property {string} totalSum - Total order amount. Example: "100.00".
|
|
545
|
+
* @property {string} [totalSumRaw] - Raw total order amount with full precision. Example: "100.00".
|
|
507
546
|
* @property {string} currency - Currency used to pay for the order. Example: "USD".
|
|
508
547
|
* @property {string | null} [paymentAccountIdentifier] - Textual identifier for the order payment. Example: "payment-1".
|
|
509
548
|
* @property {ILocalizeInfo} [paymentAccountLocalizeInfos] - Payment account name considering localization.
|
|
@@ -522,7 +561,11 @@ interface IOrderData {
|
|
|
522
561
|
]
|
|
523
562
|
* @property {string | null} paymentUrl - Payment link. Example: "https://example.com/pay/123".
|
|
524
563
|
* @property {boolean | null} isCompleted - Indicates that the order has been completed. Example: true.
|
|
564
|
+
* @property {boolean | null} [isPartial] - Indicates that the order is partially paid; null on older orders where it was not tracked. Example: false.
|
|
565
|
+
* @property {string} [paymentStrategy] - Payment strategy of the order. Example: "once".
|
|
525
566
|
* @property {ILocalizeInfo} [statusLocalizeInfos] - Localized status name.
|
|
567
|
+
* @property {IOrderDiscountConfig | null} [discountConfig] - Resolved discount configuration applied to the order (orderDiscounts, productDiscounts, coupon, settings, bonus, totals); null on older orders without a resolved discount config.
|
|
568
|
+
* @property {IOrderSplit} [split] - Split (staged) payment configuration; present on the by-id order endpoint.
|
|
526
569
|
* @description Represents an order storage object created by the user.
|
|
527
570
|
*/
|
|
528
571
|
interface IOrderByMarkerEntity {
|
|
@@ -534,13 +577,18 @@ interface IOrderByMarkerEntity {
|
|
|
534
577
|
formData: IOrdersFormData[];
|
|
535
578
|
attributeSetIdentifier?: string;
|
|
536
579
|
totalSum: string;
|
|
580
|
+
totalSumRaw?: string;
|
|
537
581
|
currency: string;
|
|
538
582
|
paymentAccountIdentifier?: string;
|
|
539
583
|
paymentAccountLocalizeInfos?: ILocalizeInfo;
|
|
540
584
|
paymentUrl: string | null;
|
|
541
585
|
products: IOrderProducts[];
|
|
542
586
|
isCompleted: boolean | null;
|
|
587
|
+
isPartial?: boolean | null;
|
|
588
|
+
paymentStrategy?: string;
|
|
543
589
|
statusLocalizeInfos?: ILocalizeInfo;
|
|
590
|
+
discountConfig?: IOrderDiscountConfig | null;
|
|
591
|
+
split?: IOrderSplit;
|
|
544
592
|
}
|
|
545
593
|
/**
|
|
546
594
|
* Interface representing an order status object.
|
|
@@ -665,4 +713,4 @@ interface ICreateRefundRequest {
|
|
|
665
713
|
products: Record<string, IRefundProduct>;
|
|
666
714
|
note?: string;
|
|
667
715
|
}
|
|
668
|
-
export type { IBaseOrdersEntity, IBaseOrdersEntityResponse, ICreateOrderPreview, ICreateRefundRequest, IOrderByMarkerEntity, IOrderData, IOrderDiscountBonus, IOrderDiscountConfig, IOrderDiscountSettings, IOrderPreviewItem, IOrderPreviewResponse, IOrderProductData, IOrderProducts, IOrdersApi, IOrdersByMarkerEntity, IOrdersEntity, IOrdersFormData, IOrderStatus, IPaymentAccountIdentifiers, IPicture, IPreviewOrderProduct, IRefundProduct, IRefundRequest, };
|
|
716
|
+
export type { IBaseOrdersEntity, IBaseOrdersEntityResponse, ICreateOrderPreview, ICreateRefundRequest, IOrderByMarkerEntity, IOrderData, IOrderDiscountBonus, IOrderDiscountConfig, IOrderDiscountSettings, IOrderPreviewItem, IOrderPreviewResponse, IOrderProductData, IOrderProducts, IOrdersApi, IOrdersByMarkerEntity, IOrdersEntity, IOrdersFormData, IOrderSplit, IOrderSplitStage, IOrderStatus, IPaymentAccountIdentifiers, IPicture, IPreviewOrderProduct, IRefundProduct, IRefundRequest, };
|
|
@@ -15,6 +15,37 @@ export declare const OrderItemSchema: z.ZodObject<{
|
|
|
15
15
|
total: z.ZodNumber;
|
|
16
16
|
attributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
17
17
|
}, z.core.$strip>;
|
|
18
|
+
/**
|
|
19
|
+
* Order discount config schema
|
|
20
|
+
* @description Resolved discount configuration returned with an order or order preview.
|
|
21
|
+
*/
|
|
22
|
+
export declare const OrderDiscountConfigSchema: z.ZodObject<{
|
|
23
|
+
bonus: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
24
|
+
availableBalance: z.ZodNumber;
|
|
25
|
+
bonusApplied: z.ZodNumber;
|
|
26
|
+
maxBonusDiscount: z.ZodNumber;
|
|
27
|
+
minBonusAmount: z.ZodNullable<z.ZodNumber>;
|
|
28
|
+
minOrderAmountForBonus: z.ZodNullable<z.ZodNumber>;
|
|
29
|
+
}, z.core.$strip>>>;
|
|
30
|
+
coupon: z.ZodNullable<z.ZodUnknown>;
|
|
31
|
+
orderDiscounts: z.ZodArray<z.ZodUnknown>;
|
|
32
|
+
productDiscounts: z.ZodArray<z.ZodUnknown>;
|
|
33
|
+
settings: z.ZodObject<{
|
|
34
|
+
allowGiftStacking: z.ZodBoolean;
|
|
35
|
+
allowStacking: z.ZodBoolean;
|
|
36
|
+
maxDiscountValue: z.ZodNullable<z.ZodNumber>;
|
|
37
|
+
giftRefundPolicy: z.ZodOptional<z.ZodString>;
|
|
38
|
+
maxBonusPaymentPercent: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
39
|
+
minBonusAmount: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
40
|
+
minOrderAmountForBonus: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
41
|
+
}, z.core.$strip>;
|
|
42
|
+
additionalDiscountsMarkers: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
43
|
+
bonusApplied: z.ZodOptional<z.ZodNumber>;
|
|
44
|
+
excludedGiftProductIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
45
|
+
totalDue: z.ZodOptional<z.ZodNumber>;
|
|
46
|
+
totalRaw: z.ZodOptional<z.ZodNumber>;
|
|
47
|
+
totalSumWithDiscount: z.ZodOptional<z.ZodNumber>;
|
|
48
|
+
}, z.core.$strip>;
|
|
18
49
|
/**
|
|
19
50
|
* Order entity schema
|
|
20
51
|
* @description Order entity schema for validating orders-related API responses
|
|
@@ -28,13 +59,55 @@ export declare const OrderEntitySchema: z.ZodObject<{
|
|
|
28
59
|
formData: z.ZodUnion<readonly [z.ZodArray<z.ZodAny>, z.ZodRecord<z.ZodString, z.ZodAny>]>;
|
|
29
60
|
attributeSetIdentifier: z.ZodOptional<z.ZodString>;
|
|
30
61
|
totalSum: z.ZodString;
|
|
62
|
+
totalSumRaw: z.ZodOptional<z.ZodString>;
|
|
31
63
|
currency: z.ZodString;
|
|
32
64
|
paymentAccountIdentifier: z.ZodOptional<z.ZodString>;
|
|
33
65
|
paymentAccountLocalizeInfos: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
34
66
|
paymentUrl: z.ZodNullable<z.ZodString>;
|
|
35
67
|
products: z.ZodArray<z.ZodAny>;
|
|
36
68
|
isCompleted: z.ZodNullable<z.ZodBoolean>;
|
|
69
|
+
isPartial: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
70
|
+
paymentStrategy: z.ZodOptional<z.ZodString>;
|
|
37
71
|
statusLocalizeInfos: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
72
|
+
discountConfig: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
73
|
+
bonus: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
74
|
+
availableBalance: z.ZodNumber;
|
|
75
|
+
bonusApplied: z.ZodNumber;
|
|
76
|
+
maxBonusDiscount: z.ZodNumber;
|
|
77
|
+
minBonusAmount: z.ZodNullable<z.ZodNumber>;
|
|
78
|
+
minOrderAmountForBonus: z.ZodNullable<z.ZodNumber>;
|
|
79
|
+
}, z.core.$strip>>>;
|
|
80
|
+
coupon: z.ZodNullable<z.ZodUnknown>;
|
|
81
|
+
orderDiscounts: z.ZodArray<z.ZodUnknown>;
|
|
82
|
+
productDiscounts: z.ZodArray<z.ZodUnknown>;
|
|
83
|
+
settings: z.ZodObject<{
|
|
84
|
+
allowGiftStacking: z.ZodBoolean;
|
|
85
|
+
allowStacking: z.ZodBoolean;
|
|
86
|
+
maxDiscountValue: z.ZodNullable<z.ZodNumber>;
|
|
87
|
+
giftRefundPolicy: z.ZodOptional<z.ZodString>;
|
|
88
|
+
maxBonusPaymentPercent: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
89
|
+
minBonusAmount: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
90
|
+
minOrderAmountForBonus: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
91
|
+
}, z.core.$strip>;
|
|
92
|
+
additionalDiscountsMarkers: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
93
|
+
bonusApplied: z.ZodOptional<z.ZodNumber>;
|
|
94
|
+
excludedGiftProductIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
95
|
+
totalDue: z.ZodOptional<z.ZodNumber>;
|
|
96
|
+
totalRaw: z.ZodOptional<z.ZodNumber>;
|
|
97
|
+
totalSumWithDiscount: z.ZodOptional<z.ZodNumber>;
|
|
98
|
+
}, z.core.$strip>>>;
|
|
99
|
+
split: z.ZodOptional<z.ZodObject<{
|
|
100
|
+
completed: z.ZodBoolean;
|
|
101
|
+
partial: z.ZodBoolean;
|
|
102
|
+
stages: z.ZodArray<z.ZodObject<{
|
|
103
|
+
marker: z.ZodString;
|
|
104
|
+
sessionId: z.ZodNullable<z.ZodString>;
|
|
105
|
+
productId: z.ZodNumber;
|
|
106
|
+
title: z.ZodString;
|
|
107
|
+
value: z.ZodNumber;
|
|
108
|
+
status: z.ZodString;
|
|
109
|
+
}, z.core.$strip>>;
|
|
110
|
+
}, z.core.$strip>>;
|
|
38
111
|
}, z.core.$strip>;
|
|
39
112
|
/**
|
|
40
113
|
* Orders list response schema
|
|
@@ -50,13 +123,55 @@ export declare const OrdersResponseSchema: z.ZodObject<{
|
|
|
50
123
|
formData: z.ZodUnion<readonly [z.ZodArray<z.ZodAny>, z.ZodRecord<z.ZodString, z.ZodAny>]>;
|
|
51
124
|
attributeSetIdentifier: z.ZodOptional<z.ZodString>;
|
|
52
125
|
totalSum: z.ZodString;
|
|
126
|
+
totalSumRaw: z.ZodOptional<z.ZodString>;
|
|
53
127
|
currency: z.ZodString;
|
|
54
128
|
paymentAccountIdentifier: z.ZodOptional<z.ZodString>;
|
|
55
129
|
paymentAccountLocalizeInfos: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
56
130
|
paymentUrl: z.ZodNullable<z.ZodString>;
|
|
57
131
|
products: z.ZodArray<z.ZodAny>;
|
|
58
132
|
isCompleted: z.ZodNullable<z.ZodBoolean>;
|
|
133
|
+
isPartial: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
134
|
+
paymentStrategy: z.ZodOptional<z.ZodString>;
|
|
59
135
|
statusLocalizeInfos: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
136
|
+
discountConfig: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
137
|
+
bonus: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
138
|
+
availableBalance: z.ZodNumber;
|
|
139
|
+
bonusApplied: z.ZodNumber;
|
|
140
|
+
maxBonusDiscount: z.ZodNumber;
|
|
141
|
+
minBonusAmount: z.ZodNullable<z.ZodNumber>;
|
|
142
|
+
minOrderAmountForBonus: z.ZodNullable<z.ZodNumber>;
|
|
143
|
+
}, z.core.$strip>>>;
|
|
144
|
+
coupon: z.ZodNullable<z.ZodUnknown>;
|
|
145
|
+
orderDiscounts: z.ZodArray<z.ZodUnknown>;
|
|
146
|
+
productDiscounts: z.ZodArray<z.ZodUnknown>;
|
|
147
|
+
settings: z.ZodObject<{
|
|
148
|
+
allowGiftStacking: z.ZodBoolean;
|
|
149
|
+
allowStacking: z.ZodBoolean;
|
|
150
|
+
maxDiscountValue: z.ZodNullable<z.ZodNumber>;
|
|
151
|
+
giftRefundPolicy: z.ZodOptional<z.ZodString>;
|
|
152
|
+
maxBonusPaymentPercent: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
153
|
+
minBonusAmount: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
154
|
+
minOrderAmountForBonus: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
155
|
+
}, z.core.$strip>;
|
|
156
|
+
additionalDiscountsMarkers: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
157
|
+
bonusApplied: z.ZodOptional<z.ZodNumber>;
|
|
158
|
+
excludedGiftProductIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
159
|
+
totalDue: z.ZodOptional<z.ZodNumber>;
|
|
160
|
+
totalRaw: z.ZodOptional<z.ZodNumber>;
|
|
161
|
+
totalSumWithDiscount: z.ZodOptional<z.ZodNumber>;
|
|
162
|
+
}, z.core.$strip>>>;
|
|
163
|
+
split: z.ZodOptional<z.ZodObject<{
|
|
164
|
+
completed: z.ZodBoolean;
|
|
165
|
+
partial: z.ZodBoolean;
|
|
166
|
+
stages: z.ZodArray<z.ZodObject<{
|
|
167
|
+
marker: z.ZodString;
|
|
168
|
+
sessionId: z.ZodNullable<z.ZodString>;
|
|
169
|
+
productId: z.ZodNumber;
|
|
170
|
+
title: z.ZodString;
|
|
171
|
+
value: z.ZodNumber;
|
|
172
|
+
status: z.ZodString;
|
|
173
|
+
}, z.core.$strip>>;
|
|
174
|
+
}, z.core.$strip>>;
|
|
60
175
|
}, z.core.$strip>>;
|
|
61
176
|
total: z.ZodNumber;
|
|
62
177
|
}, z.core.$strip>;
|
|
@@ -90,33 +205,6 @@ export declare const OrdersStorageResponseSchema: z.ZodArray<z.ZodObject<{
|
|
|
90
205
|
}, z.core.$strip>>;
|
|
91
206
|
position: z.ZodNullable<z.ZodNumber>;
|
|
92
207
|
}, z.core.$strip>>;
|
|
93
|
-
/**
|
|
94
|
-
* Order discount config schema
|
|
95
|
-
* @description Resolved discount configuration returned with an order or order preview.
|
|
96
|
-
*/
|
|
97
|
-
export declare const OrderDiscountConfigSchema: z.ZodObject<{
|
|
98
|
-
bonus: z.ZodNullable<z.ZodObject<{
|
|
99
|
-
availableBalance: z.ZodNumber;
|
|
100
|
-
bonusApplied: z.ZodNumber;
|
|
101
|
-
maxBonusDiscount: z.ZodNumber;
|
|
102
|
-
minBonusAmount: z.ZodNullable<z.ZodNumber>;
|
|
103
|
-
minOrderAmountForBonus: z.ZodNullable<z.ZodNumber>;
|
|
104
|
-
}, z.core.$strip>>;
|
|
105
|
-
coupon: z.ZodNullable<z.ZodUnknown>;
|
|
106
|
-
orderDiscounts: z.ZodArray<z.ZodUnknown>;
|
|
107
|
-
productDiscounts: z.ZodArray<z.ZodUnknown>;
|
|
108
|
-
settings: z.ZodObject<{
|
|
109
|
-
allowGiftStacking: z.ZodBoolean;
|
|
110
|
-
allowStacking: z.ZodBoolean;
|
|
111
|
-
maxDiscountValue: z.ZodNullable<z.ZodNumber>;
|
|
112
|
-
}, z.core.$strip>;
|
|
113
|
-
additionalDiscountsMarkers: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
114
|
-
bonusApplied: z.ZodOptional<z.ZodNumber>;
|
|
115
|
-
excludedGiftProductIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
116
|
-
totalDue: z.ZodOptional<z.ZodNumber>;
|
|
117
|
-
totalRaw: z.ZodOptional<z.ZodNumber>;
|
|
118
|
-
totalSumWithDiscount: z.ZodOptional<z.ZodNumber>;
|
|
119
|
-
}, z.core.$strip>;
|
|
120
208
|
/**
|
|
121
209
|
* Create order response schema
|
|
122
210
|
* API returns a simplified order object after creation
|
|
@@ -135,13 +223,13 @@ export declare const CreateOrderResponseSchema: z.ZodObject<{
|
|
|
135
223
|
couponCode: z.ZodOptional<z.ZodString>;
|
|
136
224
|
additionalDiscountsMarkers: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
137
225
|
discountConfig: z.ZodOptional<z.ZodObject<{
|
|
138
|
-
bonus: z.ZodNullable<z.ZodObject<{
|
|
226
|
+
bonus: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
139
227
|
availableBalance: z.ZodNumber;
|
|
140
228
|
bonusApplied: z.ZodNumber;
|
|
141
229
|
maxBonusDiscount: z.ZodNumber;
|
|
142
230
|
minBonusAmount: z.ZodNullable<z.ZodNumber>;
|
|
143
231
|
minOrderAmountForBonus: z.ZodNullable<z.ZodNumber>;
|
|
144
|
-
}, z.core.$strip
|
|
232
|
+
}, z.core.$strip>>>;
|
|
145
233
|
coupon: z.ZodNullable<z.ZodUnknown>;
|
|
146
234
|
orderDiscounts: z.ZodArray<z.ZodUnknown>;
|
|
147
235
|
productDiscounts: z.ZodArray<z.ZodUnknown>;
|
|
@@ -149,6 +237,10 @@ export declare const CreateOrderResponseSchema: z.ZodObject<{
|
|
|
149
237
|
allowGiftStacking: z.ZodBoolean;
|
|
150
238
|
allowStacking: z.ZodBoolean;
|
|
151
239
|
maxDiscountValue: z.ZodNullable<z.ZodNumber>;
|
|
240
|
+
giftRefundPolicy: z.ZodOptional<z.ZodString>;
|
|
241
|
+
maxBonusPaymentPercent: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
242
|
+
minBonusAmount: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
243
|
+
minOrderAmountForBonus: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
152
244
|
}, z.core.$strip>;
|
|
153
245
|
additionalDiscountsMarkers: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
154
246
|
bonusApplied: z.ZodOptional<z.ZodNumber>;
|
|
@@ -178,13 +270,13 @@ export declare const UpdateOrderResponseSchema: z.ZodObject<{
|
|
|
178
270
|
couponCode: z.ZodOptional<z.ZodString>;
|
|
179
271
|
additionalDiscountsMarkers: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
180
272
|
discountConfig: z.ZodOptional<z.ZodObject<{
|
|
181
|
-
bonus: z.ZodNullable<z.ZodObject<{
|
|
273
|
+
bonus: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
182
274
|
availableBalance: z.ZodNumber;
|
|
183
275
|
bonusApplied: z.ZodNumber;
|
|
184
276
|
maxBonusDiscount: z.ZodNumber;
|
|
185
277
|
minBonusAmount: z.ZodNullable<z.ZodNumber>;
|
|
186
278
|
minOrderAmountForBonus: z.ZodNullable<z.ZodNumber>;
|
|
187
|
-
}, z.core.$strip
|
|
279
|
+
}, z.core.$strip>>>;
|
|
188
280
|
coupon: z.ZodNullable<z.ZodUnknown>;
|
|
189
281
|
orderDiscounts: z.ZodArray<z.ZodUnknown>;
|
|
190
282
|
productDiscounts: z.ZodArray<z.ZodUnknown>;
|
|
@@ -192,6 +284,10 @@ export declare const UpdateOrderResponseSchema: z.ZodObject<{
|
|
|
192
284
|
allowGiftStacking: z.ZodBoolean;
|
|
193
285
|
allowStacking: z.ZodBoolean;
|
|
194
286
|
maxDiscountValue: z.ZodNullable<z.ZodNumber>;
|
|
287
|
+
giftRefundPolicy: z.ZodOptional<z.ZodString>;
|
|
288
|
+
maxBonusPaymentPercent: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
289
|
+
minBonusAmount: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
290
|
+
minOrderAmountForBonus: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
195
291
|
}, z.core.$strip>;
|
|
196
292
|
additionalDiscountsMarkers: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
197
293
|
bonusApplied: z.ZodOptional<z.ZodNumber>;
|