@merkaly/api 0.30.0 → 0.31.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/app.schemas.d.ts +3 -0
- package/dist/content/page/blocks.types.d.ts +33 -0
- package/dist/content/page/home.page.types.d.ts +16 -0
- package/dist/content/page/index.d.ts +5 -0
- package/dist/content/page/index.js +1 -0
- package/dist/content/page/page.entity.d.ts +5 -0
- package/dist/content/page/page.enum.d.ts +23 -0
- package/dist/content/page/page.enum.js +26 -0
- package/dist/content/page/page.types.d.ts +21 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/settings/organization/request.validator.js +2 -1
- package/package.json +1 -1
package/dist/app.schemas.d.ts
CHANGED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { ContentFeatureIconEnum } from './page.enum.js';
|
|
2
|
+
export interface ContentImage {
|
|
3
|
+
key: string;
|
|
4
|
+
url: string;
|
|
5
|
+
}
|
|
6
|
+
export interface ContentAction {
|
|
7
|
+
label?: string;
|
|
8
|
+
url?: string;
|
|
9
|
+
}
|
|
10
|
+
export interface ContentBannerBlock {
|
|
11
|
+
action?: ContentAction;
|
|
12
|
+
enabled?: boolean;
|
|
13
|
+
image?: ContentImage;
|
|
14
|
+
subtitle?: string;
|
|
15
|
+
title?: string;
|
|
16
|
+
}
|
|
17
|
+
export interface ContentProductsBlock {
|
|
18
|
+
enabled?: boolean;
|
|
19
|
+
title?: string;
|
|
20
|
+
}
|
|
21
|
+
export interface ContentFeatureItem {
|
|
22
|
+
icon: ContentFeatureIconEnum;
|
|
23
|
+
text: string;
|
|
24
|
+
title: string;
|
|
25
|
+
}
|
|
26
|
+
export interface ContentFeaturesBlock {
|
|
27
|
+
enabled?: boolean;
|
|
28
|
+
items?: ContentFeatureItem[];
|
|
29
|
+
}
|
|
30
|
+
export interface ContentBrandsBlock {
|
|
31
|
+
brands?: string[];
|
|
32
|
+
enabled?: boolean;
|
|
33
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { ContentBannerBlock, ContentBrandsBlock, ContentFeaturesBlock, ContentProductsBlock } from './blocks.types.js';
|
|
2
|
+
export interface ContentHomePage {
|
|
3
|
+
brands?: ContentBrandsBlock;
|
|
4
|
+
features?: ContentFeaturesBlock;
|
|
5
|
+
hero?: ContentBannerBlock;
|
|
6
|
+
newArrivals?: ContentProductsBlock & {
|
|
7
|
+
banner?: ContentBannerBlock;
|
|
8
|
+
};
|
|
9
|
+
offers?: ContentProductsBlock & {
|
|
10
|
+
endsAt?: Date;
|
|
11
|
+
};
|
|
12
|
+
sale?: ContentBannerBlock & {
|
|
13
|
+
code?: string;
|
|
14
|
+
};
|
|
15
|
+
trending?: ContentProductsBlock;
|
|
16
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './page.enum.js';
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export declare enum ContentPageEnum {
|
|
2
|
+
HOME = "home"
|
|
3
|
+
}
|
|
4
|
+
export declare enum ContentPageImageEnum {
|
|
5
|
+
HERO = "hero",
|
|
6
|
+
NEW_ARRIVALS = "new-arrivals",
|
|
7
|
+
SALE = "sale"
|
|
8
|
+
}
|
|
9
|
+
export declare enum ContentFeatureIconEnum {
|
|
10
|
+
AWARD = "award",
|
|
11
|
+
CHAT = "chat",
|
|
12
|
+
CREDIT_CARD = "credit-card",
|
|
13
|
+
DELIVERY = "delivery",
|
|
14
|
+
GIFT = "gift",
|
|
15
|
+
HEADPHONES = "headphones",
|
|
16
|
+
LOCK = "lock",
|
|
17
|
+
PACKAGE = "package",
|
|
18
|
+
PERCENT = "percent",
|
|
19
|
+
REFRESH_CW = "refresh-cw",
|
|
20
|
+
SHIELD = "shield",
|
|
21
|
+
TAG = "tag",
|
|
22
|
+
TRUCK = "truck"
|
|
23
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export var ContentPageEnum;
|
|
2
|
+
(function (ContentPageEnum) {
|
|
3
|
+
ContentPageEnum["HOME"] = "home";
|
|
4
|
+
})(ContentPageEnum || (ContentPageEnum = {}));
|
|
5
|
+
export var ContentPageImageEnum;
|
|
6
|
+
(function (ContentPageImageEnum) {
|
|
7
|
+
ContentPageImageEnum["HERO"] = "hero";
|
|
8
|
+
ContentPageImageEnum["NEW_ARRIVALS"] = "new-arrivals";
|
|
9
|
+
ContentPageImageEnum["SALE"] = "sale";
|
|
10
|
+
})(ContentPageImageEnum || (ContentPageImageEnum = {}));
|
|
11
|
+
export var ContentFeatureIconEnum;
|
|
12
|
+
(function (ContentFeatureIconEnum) {
|
|
13
|
+
ContentFeatureIconEnum["AWARD"] = "award";
|
|
14
|
+
ContentFeatureIconEnum["CHAT"] = "chat";
|
|
15
|
+
ContentFeatureIconEnum["CREDIT_CARD"] = "credit-card";
|
|
16
|
+
ContentFeatureIconEnum["DELIVERY"] = "delivery";
|
|
17
|
+
ContentFeatureIconEnum["GIFT"] = "gift";
|
|
18
|
+
ContentFeatureIconEnum["HEADPHONES"] = "headphones";
|
|
19
|
+
ContentFeatureIconEnum["LOCK"] = "lock";
|
|
20
|
+
ContentFeatureIconEnum["PACKAGE"] = "package";
|
|
21
|
+
ContentFeatureIconEnum["PERCENT"] = "percent";
|
|
22
|
+
ContentFeatureIconEnum["REFRESH_CW"] = "refresh-cw";
|
|
23
|
+
ContentFeatureIconEnum["SHIELD"] = "shield";
|
|
24
|
+
ContentFeatureIconEnum["TAG"] = "tag";
|
|
25
|
+
ContentFeatureIconEnum["TRUCK"] = "truck";
|
|
26
|
+
})(ContentFeatureIconEnum || (ContentFeatureIconEnum = {}));
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { CatalogBrandEntity } from '../../inventory/catalog/brand';
|
|
2
|
+
import type { CatalogProductEntity } from '../../inventory/catalog/product';
|
|
3
|
+
import type { ContentPageEnum } from './page.enum.js';
|
|
4
|
+
import type { ContentHomePage } from './home.page.types.js';
|
|
5
|
+
export interface ContentPageValues {
|
|
6
|
+
[ContentPageEnum.HOME]: ContentHomePage;
|
|
7
|
+
}
|
|
8
|
+
export type ContentPageKey = keyof ContentPageValues;
|
|
9
|
+
type WithItems<B, I> = B & {
|
|
10
|
+
items: I[];
|
|
11
|
+
};
|
|
12
|
+
export interface ContentStoreHomePage extends Omit<ContentHomePage, 'brands' | 'newArrivals' | 'offers' | 'trending'> {
|
|
13
|
+
brands?: WithItems<ContentHomePage['brands'], CatalogBrandEntity>;
|
|
14
|
+
newArrivals: WithItems<ContentHomePage['newArrivals'], CatalogProductEntity>;
|
|
15
|
+
offers: WithItems<ContentHomePage['offers'], CatalogProductEntity>;
|
|
16
|
+
trending: WithItems<ContentHomePage['trending'], CatalogProductEntity>;
|
|
17
|
+
}
|
|
18
|
+
export interface ContentStorePageValues {
|
|
19
|
+
[ContentPageEnum.HOME]: ContentStoreHomePage;
|
|
20
|
+
}
|
|
21
|
+
export {};
|
package/dist/index.d.ts
CHANGED
|
@@ -30,6 +30,7 @@ export * from './logistics/shipment';
|
|
|
30
30
|
export * from './order/purchase';
|
|
31
31
|
export * from './order/sale';
|
|
32
32
|
export * from './order/item';
|
|
33
|
+
export * from './content/page';
|
|
33
34
|
export * from './settings/organization';
|
|
34
35
|
export * from './settings/authentication';
|
|
35
36
|
export type { SaveEntityArgs } from './repository.types';
|
package/dist/index.js
CHANGED
|
@@ -21,5 +21,6 @@ export * from './logistics/shipment/index.js';
|
|
|
21
21
|
export * from './order/purchase/index.js';
|
|
22
22
|
export * from './order/sale/index.js';
|
|
23
23
|
export * from './order/item/index.js';
|
|
24
|
+
export * from './content/page/index.js';
|
|
24
25
|
export * from './settings/organization/index.js';
|
|
25
26
|
export * from './settings/authentication/index.js';
|
|
@@ -215,7 +215,8 @@ __decorate([
|
|
|
215
215
|
__metadata("design:type", String)
|
|
216
216
|
], UpdateOrganizationBrandingRequestValidator.prototype, "description", void 0);
|
|
217
217
|
__decorate([
|
|
218
|
-
(0, class_validator_1.
|
|
218
|
+
(0, class_validator_1.IsHexColor)(),
|
|
219
|
+
(0, class_validator_1.ValidateIf)((_, value) => value !== ''),
|
|
219
220
|
(0, class_validator_1.IsOptional)(),
|
|
220
221
|
__metadata("design:type", String)
|
|
221
222
|
], UpdateOrganizationBrandingRequestValidator.prototype, "primaryColor", void 0);
|