@signskart/shared 1.0.0 → 1.2.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/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/interfaces/banner.d.ts +47 -0
- package/dist/interfaces/banner.js +1 -0
- package/dist/interfaces/category.d.ts +54 -0
- package/dist/interfaces/category.js +1 -0
- package/dist/interfaces/common.d.ts +3 -0
- package/dist/interfaces/common.js +1 -0
- package/dist/interfaces/coupon.d.ts +21 -0
- package/dist/interfaces/coupon.js +1 -0
- package/dist/interfaces/currency.d.ts +9 -0
- package/dist/interfaces/currency.js +1 -0
- package/dist/interfaces/globalSetting.d.ts +25 -0
- package/dist/interfaces/globalSetting.js +1 -0
- package/dist/interfaces/index.d.ts +12 -0
- package/dist/interfaces/index.js +12 -0
- package/dist/interfaces/language.d.ts +9 -0
- package/dist/interfaces/language.js +1 -0
- package/dist/interfaces/product.d.ts +69 -0
- package/dist/interfaces/product.js +1 -0
- package/dist/interfaces/productType.d.ts +80 -0
- package/dist/interfaces/productType.js +1 -0
- package/dist/interfaces/store.d.ts +27 -0
- package/dist/interfaces/store.js +1 -0
- package/dist/interfaces/subscriber.d.ts +104 -0
- package/dist/interfaces/subscriber.js +1 -0
- package/dist/interfaces/variant.d.ts +37 -0
- package/dist/interfaces/variant.js +1 -0
- package/package.json +1 -1
- package/src/index.ts +1 -0
- package/src/interfaces/coupon.ts +2 -3
- package/src/interfaces/product.ts +1 -1
- package/src/interfaces/variant.ts +1 -1
- package/tsconfig.json +4 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './interfaces';
|
package/dist/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './interfaces';
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { ILocalizedString } from './common';
|
|
2
|
+
import { IStore } from './store';
|
|
3
|
+
export type BannerMediaType = 'image' | 'video';
|
|
4
|
+
export interface BannerMedia {
|
|
5
|
+
type: BannerMediaType;
|
|
6
|
+
sources: {
|
|
7
|
+
desktop: string;
|
|
8
|
+
mobile?: string;
|
|
9
|
+
tablet?: string;
|
|
10
|
+
};
|
|
11
|
+
altText?: ILocalizedString;
|
|
12
|
+
poster?: string;
|
|
13
|
+
autoplay?: boolean;
|
|
14
|
+
loop?: boolean;
|
|
15
|
+
muted?: boolean;
|
|
16
|
+
}
|
|
17
|
+
export type LinkType = 'internal' | 'external';
|
|
18
|
+
export interface BannerLink {
|
|
19
|
+
type: LinkType;
|
|
20
|
+
url: string;
|
|
21
|
+
openInNewTab: boolean;
|
|
22
|
+
}
|
|
23
|
+
export interface IBannerFormValues extends Omit<IBanner, 'visibility'> {
|
|
24
|
+
visibility: BannerVisibility & {
|
|
25
|
+
scheduledRange?: [Date, Date];
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
export interface BannerVisibility {
|
|
29
|
+
status: boolean;
|
|
30
|
+
scheduled: {
|
|
31
|
+
from: Date | null;
|
|
32
|
+
to: Date | null;
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
export interface IBanner {
|
|
36
|
+
_id?: string;
|
|
37
|
+
store: IStore;
|
|
38
|
+
title: ILocalizedString;
|
|
39
|
+
description?: ILocalizedString;
|
|
40
|
+
media: BannerMedia;
|
|
41
|
+
link?: BannerLink;
|
|
42
|
+
visibility: BannerVisibility;
|
|
43
|
+
position: string;
|
|
44
|
+
sortOrder: number;
|
|
45
|
+
createdAt: Date;
|
|
46
|
+
updatedAt: Date;
|
|
47
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { ILocalizedString } from "./common";
|
|
2
|
+
import { IStore } from "./store";
|
|
3
|
+
export interface ICategory {
|
|
4
|
+
_id: string;
|
|
5
|
+
name: ILocalizedString;
|
|
6
|
+
description?: ILocalizedString;
|
|
7
|
+
slug?: string;
|
|
8
|
+
parent?: string | null;
|
|
9
|
+
parentName?: string;
|
|
10
|
+
children?: string[];
|
|
11
|
+
level?: number;
|
|
12
|
+
status?: boolean;
|
|
13
|
+
store: IStore;
|
|
14
|
+
skuInitial?: string;
|
|
15
|
+
sortPosition?: number;
|
|
16
|
+
images?: {
|
|
17
|
+
desktopBanner?: string;
|
|
18
|
+
mobileBanner?: string;
|
|
19
|
+
shopPageThumbnail?: string;
|
|
20
|
+
categoryThumbnail?: string;
|
|
21
|
+
};
|
|
22
|
+
metaData?: {
|
|
23
|
+
category?: {
|
|
24
|
+
titleTag?: string;
|
|
25
|
+
headerTag?: string;
|
|
26
|
+
metaDescription?: string;
|
|
27
|
+
csrKeywords?: string;
|
|
28
|
+
};
|
|
29
|
+
product?: {
|
|
30
|
+
titleTag?: string;
|
|
31
|
+
headerTag?: string;
|
|
32
|
+
metaDescription?: string;
|
|
33
|
+
csrKeywords?: string;
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
createdAt?: string;
|
|
37
|
+
updatedAt?: string;
|
|
38
|
+
productCount?: number;
|
|
39
|
+
[key: string]: any;
|
|
40
|
+
}
|
|
41
|
+
export interface CategoryQueryParams {
|
|
42
|
+
page?: number;
|
|
43
|
+
limit?: number;
|
|
44
|
+
name?: string;
|
|
45
|
+
status?: string;
|
|
46
|
+
minLevel?: string;
|
|
47
|
+
maxLevel?: string;
|
|
48
|
+
}
|
|
49
|
+
export interface CategoryResponse {
|
|
50
|
+
categories: ICategory[];
|
|
51
|
+
totalCategories: number;
|
|
52
|
+
totalPages: number;
|
|
53
|
+
currentPage: number;
|
|
54
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ILocalizedString } from './common';
|
|
2
|
+
import { IStore } from './store';
|
|
3
|
+
export interface IDiscountType {
|
|
4
|
+
type: string;
|
|
5
|
+
value: number;
|
|
6
|
+
}
|
|
7
|
+
export interface ICoupon {
|
|
8
|
+
_id: string;
|
|
9
|
+
title: ILocalizedString;
|
|
10
|
+
logo: string;
|
|
11
|
+
couponCode: string;
|
|
12
|
+
startTime: string;
|
|
13
|
+
endTime: string;
|
|
14
|
+
discountType: IDiscountType;
|
|
15
|
+
minimumAmount: number;
|
|
16
|
+
isPromotional: boolean;
|
|
17
|
+
status: boolean;
|
|
18
|
+
store: IStore;
|
|
19
|
+
createdAt: string;
|
|
20
|
+
updatedAt: string;
|
|
21
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export interface IGlobalSetting {
|
|
2
|
+
_id: string;
|
|
3
|
+
name: string;
|
|
4
|
+
number_of_image_per_product: number;
|
|
5
|
+
shop_name: string;
|
|
6
|
+
address: string;
|
|
7
|
+
company_name: string;
|
|
8
|
+
vat_number: string;
|
|
9
|
+
post_code: string;
|
|
10
|
+
contact: string;
|
|
11
|
+
email: string;
|
|
12
|
+
website: string;
|
|
13
|
+
default_currency: string;
|
|
14
|
+
default_time_zone: string;
|
|
15
|
+
default_date_format: string;
|
|
16
|
+
receipt_size: string;
|
|
17
|
+
from_email: string;
|
|
18
|
+
email_to_customer: boolean;
|
|
19
|
+
allow_auto_trans: boolean;
|
|
20
|
+
translation_key: string;
|
|
21
|
+
default_language: string;
|
|
22
|
+
floating_number: number;
|
|
23
|
+
createdAt: string;
|
|
24
|
+
updatedAt: string;
|
|
25
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export * from './category';
|
|
2
|
+
export * from './product';
|
|
3
|
+
export * from './productType';
|
|
4
|
+
export * from './globalSetting';
|
|
5
|
+
export * from './store';
|
|
6
|
+
export * from './currency';
|
|
7
|
+
export * from './coupon';
|
|
8
|
+
export * from './variant';
|
|
9
|
+
export * from './subscriber';
|
|
10
|
+
export * from './language';
|
|
11
|
+
export * from './banner';
|
|
12
|
+
export * from './common';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export * from './category';
|
|
2
|
+
export * from './product';
|
|
3
|
+
export * from './productType';
|
|
4
|
+
export * from './globalSetting';
|
|
5
|
+
export * from './store';
|
|
6
|
+
export * from './currency';
|
|
7
|
+
export * from './coupon';
|
|
8
|
+
export * from './variant';
|
|
9
|
+
export * from './subscriber';
|
|
10
|
+
export * from './language';
|
|
11
|
+
export * from './banner';
|
|
12
|
+
export * from './common';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { ICategory, ILocalizedString, IProductType, IStore, IVariant } from "./";
|
|
2
|
+
export interface IPrices {
|
|
3
|
+
originalPrice: number;
|
|
4
|
+
price: number;
|
|
5
|
+
discount?: number;
|
|
6
|
+
}
|
|
7
|
+
export interface IMetaDataProduct {
|
|
8
|
+
title?: string;
|
|
9
|
+
header?: string;
|
|
10
|
+
description?: string;
|
|
11
|
+
keywords?: string[];
|
|
12
|
+
canonicalUrl?: string;
|
|
13
|
+
}
|
|
14
|
+
export interface IImages {
|
|
15
|
+
productImage?: string;
|
|
16
|
+
seoImage?: string;
|
|
17
|
+
displayImage?: string;
|
|
18
|
+
}
|
|
19
|
+
export interface IProduct {
|
|
20
|
+
_id: string;
|
|
21
|
+
sku?: string;
|
|
22
|
+
barcode?: string;
|
|
23
|
+
title: ILocalizedString;
|
|
24
|
+
description?: ILocalizedString;
|
|
25
|
+
slug: string;
|
|
26
|
+
categories: ICategory[];
|
|
27
|
+
category: ICategory;
|
|
28
|
+
productType?: IProductType;
|
|
29
|
+
image: string[];
|
|
30
|
+
stock: number;
|
|
31
|
+
sales: number;
|
|
32
|
+
tag: string[];
|
|
33
|
+
variants: IVariant[];
|
|
34
|
+
hasVariant: boolean;
|
|
35
|
+
hasSize: boolean;
|
|
36
|
+
isCombination: boolean;
|
|
37
|
+
prices: IPrices;
|
|
38
|
+
status: boolean;
|
|
39
|
+
store: IStore;
|
|
40
|
+
images?: IImages;
|
|
41
|
+
metaData?: {
|
|
42
|
+
product?: IMetaDataProduct;
|
|
43
|
+
};
|
|
44
|
+
createdAt?: Date;
|
|
45
|
+
updatedAt?: Date;
|
|
46
|
+
variantList?: IVariant[];
|
|
47
|
+
[key: string]: any;
|
|
48
|
+
}
|
|
49
|
+
export interface IProductQuery {
|
|
50
|
+
page?: number;
|
|
51
|
+
limit?: number;
|
|
52
|
+
category?: string;
|
|
53
|
+
title?: string;
|
|
54
|
+
price?: string;
|
|
55
|
+
stockStatus?: string;
|
|
56
|
+
published?: string;
|
|
57
|
+
minPrice?: string;
|
|
58
|
+
maxPrice?: string;
|
|
59
|
+
}
|
|
60
|
+
export interface IProductResponse {
|
|
61
|
+
products: IProduct[];
|
|
62
|
+
totalDoc: number;
|
|
63
|
+
limits: number;
|
|
64
|
+
pages: number;
|
|
65
|
+
}
|
|
66
|
+
export interface IProductUpdate {
|
|
67
|
+
ids: string[];
|
|
68
|
+
[key: string]: any;
|
|
69
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { IStore } from "./store";
|
|
2
|
+
export interface IProductType {
|
|
3
|
+
_id: string;
|
|
4
|
+
name: string;
|
|
5
|
+
slug: string;
|
|
6
|
+
status: boolean;
|
|
7
|
+
pricingChart: IPricingChartDocument;
|
|
8
|
+
shippingChart: IShippingChartDocument;
|
|
9
|
+
variantChart: IVariantChart;
|
|
10
|
+
frameChart: IFrameChartDocument;
|
|
11
|
+
store: IStore;
|
|
12
|
+
}
|
|
13
|
+
export interface IPricingTier {
|
|
14
|
+
from: number;
|
|
15
|
+
to: number;
|
|
16
|
+
price: number;
|
|
17
|
+
}
|
|
18
|
+
export interface IPricingData {
|
|
19
|
+
label: string;
|
|
20
|
+
tiers: IPricingTier[];
|
|
21
|
+
}
|
|
22
|
+
export interface IPricingChartDocument {
|
|
23
|
+
_id: string;
|
|
24
|
+
name: string;
|
|
25
|
+
pricing: IPricingData[];
|
|
26
|
+
status: boolean;
|
|
27
|
+
}
|
|
28
|
+
export interface IPricingChartFormProps {
|
|
29
|
+
onClose: () => void;
|
|
30
|
+
pricingChartId?: string | null;
|
|
31
|
+
initialData?: IPricingChartDocument | null;
|
|
32
|
+
}
|
|
33
|
+
export interface IFrameChartDocument {
|
|
34
|
+
_id: string;
|
|
35
|
+
name: string;
|
|
36
|
+
pricing: IPricingData[];
|
|
37
|
+
status: boolean;
|
|
38
|
+
}
|
|
39
|
+
export interface IFrameChartFormProps {
|
|
40
|
+
onClose: () => void;
|
|
41
|
+
frameChartId?: string | null;
|
|
42
|
+
initialData?: IFrameChartDocument | null;
|
|
43
|
+
}
|
|
44
|
+
export interface IShippingTier {
|
|
45
|
+
from: number;
|
|
46
|
+
to: number;
|
|
47
|
+
price: number;
|
|
48
|
+
}
|
|
49
|
+
export interface IShippingData {
|
|
50
|
+
label: string;
|
|
51
|
+
day: number;
|
|
52
|
+
tiers: IShippingTier[];
|
|
53
|
+
}
|
|
54
|
+
export interface IShippingChartDocument {
|
|
55
|
+
_id: string;
|
|
56
|
+
name: string;
|
|
57
|
+
shipping: IShippingData[];
|
|
58
|
+
status: boolean;
|
|
59
|
+
}
|
|
60
|
+
export interface IShippingChartFormProps {
|
|
61
|
+
onClose: () => void;
|
|
62
|
+
shippingChartId?: string | null;
|
|
63
|
+
initialData?: IShippingChartDocument | null;
|
|
64
|
+
}
|
|
65
|
+
export interface IVariantOption {
|
|
66
|
+
label: string;
|
|
67
|
+
}
|
|
68
|
+
export interface IVariantChart {
|
|
69
|
+
_id: string;
|
|
70
|
+
name: string;
|
|
71
|
+
status: boolean;
|
|
72
|
+
variants: IVariantOption[];
|
|
73
|
+
createdAt?: string;
|
|
74
|
+
updatedAt?: string;
|
|
75
|
+
}
|
|
76
|
+
export interface IVariantChartFormProps {
|
|
77
|
+
onClose: () => void;
|
|
78
|
+
variantChartId?: string | null;
|
|
79
|
+
initialData?: IVariantChart | null;
|
|
80
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { ICurrency } from "./currency";
|
|
2
|
+
export interface IStoreSettings {
|
|
3
|
+
logo: string;
|
|
4
|
+
theme: 'light' | 'dark';
|
|
5
|
+
timezone: string;
|
|
6
|
+
}
|
|
7
|
+
export interface IStore {
|
|
8
|
+
_id: string;
|
|
9
|
+
name: string;
|
|
10
|
+
shortName: string;
|
|
11
|
+
slug: string;
|
|
12
|
+
domain: string;
|
|
13
|
+
currency: ICurrency;
|
|
14
|
+
settings: IStoreSettings;
|
|
15
|
+
status: boolean;
|
|
16
|
+
createdAt: string;
|
|
17
|
+
updatedAt: string;
|
|
18
|
+
}
|
|
19
|
+
export interface ICreateStoreDTO {
|
|
20
|
+
name: string;
|
|
21
|
+
shortName: string;
|
|
22
|
+
slug: string;
|
|
23
|
+
domain: string;
|
|
24
|
+
currency: string;
|
|
25
|
+
settings: Partial<IStoreSettings>;
|
|
26
|
+
status: boolean;
|
|
27
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import { IStore } from "./store";
|
|
2
|
+
export interface ISubscriberSegmentRules {
|
|
3
|
+
status?: 'active' | 'unsubscribed' | 'bounced' | 'blocked';
|
|
4
|
+
channels?: 'email' | 'sms' | 'push' | Array<'email' | 'sms' | 'push'>;
|
|
5
|
+
}
|
|
6
|
+
export interface ISubscriber {
|
|
7
|
+
_id?: string;
|
|
8
|
+
email?: string;
|
|
9
|
+
phone?: string;
|
|
10
|
+
userId?: string;
|
|
11
|
+
channels: Array<'email' | 'sms' | 'push'>;
|
|
12
|
+
status?: 'active' | 'unsubscribed' | 'bounced' | 'blocked';
|
|
13
|
+
locale?: string;
|
|
14
|
+
store?: IStore;
|
|
15
|
+
schemaVersion?: number;
|
|
16
|
+
isDeleted?: boolean;
|
|
17
|
+
createdAt?: Date;
|
|
18
|
+
updatedAt?: Date;
|
|
19
|
+
}
|
|
20
|
+
export interface ISubscriberCampaignContent {
|
|
21
|
+
html?: string;
|
|
22
|
+
text?: string;
|
|
23
|
+
}
|
|
24
|
+
export interface ISubscriberCampaign {
|
|
25
|
+
_id?: string;
|
|
26
|
+
store?: IStore;
|
|
27
|
+
name: string;
|
|
28
|
+
type: 'email' | 'sms' | 'push';
|
|
29
|
+
segmentId?: string;
|
|
30
|
+
subject?: string;
|
|
31
|
+
content?: ISubscriberCampaignContent;
|
|
32
|
+
status?: 'draft' | 'scheduled' | 'sent' | 'failed';
|
|
33
|
+
scheduledAt?: Date;
|
|
34
|
+
sentAt?: Date;
|
|
35
|
+
createdAt?: Date;
|
|
36
|
+
}
|
|
37
|
+
export interface ISubscriberCampaignLogMetaLocation {
|
|
38
|
+
country?: string;
|
|
39
|
+
city?: string;
|
|
40
|
+
}
|
|
41
|
+
export interface ISubscriberCampaignLogMeta {
|
|
42
|
+
ip?: string;
|
|
43
|
+
userAgent?: string;
|
|
44
|
+
location?: ISubscriberCampaignLogMetaLocation;
|
|
45
|
+
}
|
|
46
|
+
export interface ISubscriberCampaignLog {
|
|
47
|
+
_id?: string;
|
|
48
|
+
campaignId: string;
|
|
49
|
+
subscriberId: string;
|
|
50
|
+
event: 'delivered' | 'opened' | 'clicked' | 'bounced' | 'unsubscribed';
|
|
51
|
+
timestamp?: Date;
|
|
52
|
+
meta?: ISubscriberCampaignLogMeta;
|
|
53
|
+
}
|
|
54
|
+
export interface ISubscriberEventBase {
|
|
55
|
+
_id?: string;
|
|
56
|
+
subscriberId: string;
|
|
57
|
+
createdAt?: Date;
|
|
58
|
+
}
|
|
59
|
+
export interface ISubscriberEventSubscribed extends ISubscriberEventBase {
|
|
60
|
+
eventType: 'subscribed' | 'unsubscribed' | 'preference_updated' | 'bounced' | 'created' | 'deleted';
|
|
61
|
+
details?: Record<string, any>;
|
|
62
|
+
}
|
|
63
|
+
export interface ISubscriberEventUpdated extends ISubscriberEventBase {
|
|
64
|
+
eventType: 'updated';
|
|
65
|
+
details: {
|
|
66
|
+
updatedFields: Record<string, any>;
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
export type ISubscriberEvent = ISubscriberEventSubscribed | ISubscriberEventUpdated;
|
|
70
|
+
export interface ISubscriberList {
|
|
71
|
+
_id?: string;
|
|
72
|
+
store?: IStore;
|
|
73
|
+
name: string;
|
|
74
|
+
description?: string;
|
|
75
|
+
channel: 'email' | 'sms' | 'push';
|
|
76
|
+
defaultOptIn?: boolean;
|
|
77
|
+
createdAt?: Date;
|
|
78
|
+
}
|
|
79
|
+
export interface ISubscriberPreference {
|
|
80
|
+
_id?: string;
|
|
81
|
+
subscriberId: string;
|
|
82
|
+
channel: 'email' | 'sms' | 'push';
|
|
83
|
+
topics: string[];
|
|
84
|
+
unsubscribed: boolean;
|
|
85
|
+
updatedAt?: Date;
|
|
86
|
+
}
|
|
87
|
+
export interface ISubscriberSegment {
|
|
88
|
+
_id?: string;
|
|
89
|
+
store?: IStore;
|
|
90
|
+
name: string;
|
|
91
|
+
type: 'static' | 'dynamic';
|
|
92
|
+
rules?: ISubscriberSegmentRules;
|
|
93
|
+
subscriberIds?: Array<string>;
|
|
94
|
+
createdAt?: Date;
|
|
95
|
+
}
|
|
96
|
+
export interface ISubscriberSubscription {
|
|
97
|
+
_id?: string;
|
|
98
|
+
subscriberId: string;
|
|
99
|
+
listId: string;
|
|
100
|
+
status?: 'subscribed' | 'unsubscribed' | 'pending';
|
|
101
|
+
subscribedAt?: Date;
|
|
102
|
+
unsubscribedAt?: Date;
|
|
103
|
+
isDeleted?: boolean;
|
|
104
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { ILocalizedString } from "./";
|
|
2
|
+
export interface IVariantPrices {
|
|
3
|
+
originalPrice: number;
|
|
4
|
+
price: number;
|
|
5
|
+
discount?: number;
|
|
6
|
+
}
|
|
7
|
+
export interface IVariant {
|
|
8
|
+
_id: string;
|
|
9
|
+
productId?: string;
|
|
10
|
+
sku: string;
|
|
11
|
+
barcode?: string;
|
|
12
|
+
title: ILocalizedString;
|
|
13
|
+
description?: ILocalizedString;
|
|
14
|
+
slug: string;
|
|
15
|
+
stock: number;
|
|
16
|
+
sales?: number;
|
|
17
|
+
tag?: string[];
|
|
18
|
+
prices: IVariantPrices;
|
|
19
|
+
image?: string;
|
|
20
|
+
templateJson?: string;
|
|
21
|
+
size: {
|
|
22
|
+
width: number;
|
|
23
|
+
height: number;
|
|
24
|
+
};
|
|
25
|
+
status: boolean;
|
|
26
|
+
createdAt?: Date;
|
|
27
|
+
updatedAt?: Date;
|
|
28
|
+
}
|
|
29
|
+
export interface IProductVariantQuery {
|
|
30
|
+
page?: number;
|
|
31
|
+
limit?: number;
|
|
32
|
+
title?: string;
|
|
33
|
+
price?: string;
|
|
34
|
+
stockStatus?: string;
|
|
35
|
+
minPrice?: string;
|
|
36
|
+
maxPrice?: string;
|
|
37
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './interfaces';
|
package/src/interfaces/coupon.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { ILocalizedString } from './common';
|
|
2
2
|
import { IStore } from './store';
|
|
3
|
-
import { Dayjs } from 'dayjs';
|
|
4
3
|
|
|
5
4
|
|
|
6
5
|
export interface IDiscountType {
|
|
@@ -13,8 +12,8 @@ export interface ICoupon {
|
|
|
13
12
|
title: ILocalizedString;
|
|
14
13
|
logo: string;
|
|
15
14
|
couponCode: string;
|
|
16
|
-
startTime: string
|
|
17
|
-
endTime: string
|
|
15
|
+
startTime: string;
|
|
16
|
+
endTime: string;
|
|
18
17
|
discountType: IDiscountType;
|
|
19
18
|
minimumAmount: number;
|
|
20
19
|
isPromotional: boolean;
|
package/tsconfig.json
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
"compilerOptions": {
|
|
3
3
|
"target": "ESNext",
|
|
4
4
|
"module": "ESNext",
|
|
5
|
+
"moduleResolution": "node",
|
|
5
6
|
"declaration": true,
|
|
6
7
|
"outDir": "dist",
|
|
7
8
|
"rootDir": "src",
|
|
@@ -11,6 +12,9 @@
|
|
|
11
12
|
"skipLibCheck": true
|
|
12
13
|
},
|
|
13
14
|
"include": [
|
|
15
|
+
"src/interfaces",
|
|
16
|
+
"src/constants",
|
|
17
|
+
"src/types",
|
|
14
18
|
"src"
|
|
15
19
|
]
|
|
16
20
|
}
|