@signskart/shared 1.3.7 → 1.3.9
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 +3 -0
- package/dist/index.d.mts +514 -0
- package/dist/index.d.ts +514 -1
- package/dist/index.js +33 -1
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +6 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +36 -9
- package/dist/interfaces/banner.d.ts +0 -47
- package/dist/interfaces/banner.js +0 -1
- package/dist/interfaces/category.d.ts +0 -57
- package/dist/interfaces/category.js +0 -1
- package/dist/interfaces/common.d.ts +0 -3
- package/dist/interfaces/common.js +0 -1
- package/dist/interfaces/coupon.d.ts +0 -21
- package/dist/interfaces/coupon.js +0 -1
- package/dist/interfaces/currency.d.ts +0 -9
- package/dist/interfaces/currency.js +0 -1
- package/dist/interfaces/customerPhotos.d.ts +0 -23
- package/dist/interfaces/customerPhotos.js +0 -1
- package/dist/interfaces/globalSetting.d.ts +0 -25
- package/dist/interfaces/globalSetting.js +0 -1
- package/dist/interfaces/index.d.ts +0 -13
- package/dist/interfaces/index.js +0 -13
- package/dist/interfaces/language.d.ts +0 -9
- package/dist/interfaces/language.js +0 -1
- package/dist/interfaces/product.d.ts +0 -71
- package/dist/interfaces/product.js +0 -1
- package/dist/interfaces/productType.d.ts +0 -80
- package/dist/interfaces/productType.js +0 -1
- package/dist/interfaces/store.d.ts +0 -27
- package/dist/interfaces/store.js +0 -1
- package/dist/interfaces/subscriber.d.ts +0 -104
- package/dist/interfaces/subscriber.js +0 -1
- package/dist/interfaces/variant.d.ts +0 -37
- package/dist/interfaces/variant.js +0 -1
- package/src/index.ts +0 -1
- package/src/interfaces/banner.ts +0 -60
- package/src/interfaces/category.ts +0 -66
- package/src/interfaces/common.ts +0 -3
- package/src/interfaces/coupon.ts +0 -24
- package/src/interfaces/currency.ts +0 -11
- package/src/interfaces/customerPhotos.ts +0 -26
- package/src/interfaces/globalSetting.ts +0 -25
- package/src/interfaces/index.ts +0 -13
- package/src/interfaces/language.ts +0 -9
- package/src/interfaces/product.ts +0 -79
- package/src/interfaces/productType.ts +0 -100
- package/src/interfaces/store.ts +0 -30
- package/src/interfaces/subscriber.ts +0 -129
- package/src/interfaces/variant.ts +0 -40
- package/tsconfig.json +0 -20
package/dist/index.d.ts
CHANGED
|
@@ -1 +1,514 @@
|
|
|
1
|
-
|
|
1
|
+
interface ILocalizedString {
|
|
2
|
+
[languageCode: string]: string;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
interface ICurrency {
|
|
6
|
+
_id?: string;
|
|
7
|
+
name: string;
|
|
8
|
+
symbol: string;
|
|
9
|
+
status: boolean;
|
|
10
|
+
live_exchange_rates?: 'show' | 'hide';
|
|
11
|
+
createdAt?: string;
|
|
12
|
+
updatedAt?: string;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
interface IStoreSettings {
|
|
16
|
+
logo: string;
|
|
17
|
+
theme: 'light' | 'dark';
|
|
18
|
+
timezone: string;
|
|
19
|
+
}
|
|
20
|
+
interface IStore {
|
|
21
|
+
_id?: string;
|
|
22
|
+
name: string;
|
|
23
|
+
shortName: string;
|
|
24
|
+
slug: string;
|
|
25
|
+
domain: string;
|
|
26
|
+
currency: ICurrency;
|
|
27
|
+
settings: IStoreSettings;
|
|
28
|
+
status: boolean;
|
|
29
|
+
createdAt?: string;
|
|
30
|
+
updatedAt?: string;
|
|
31
|
+
}
|
|
32
|
+
interface ICreateStoreDTO {
|
|
33
|
+
name: string;
|
|
34
|
+
shortName: string;
|
|
35
|
+
slug: string;
|
|
36
|
+
domain: string;
|
|
37
|
+
currency: string;
|
|
38
|
+
settings: Partial<IStoreSettings>;
|
|
39
|
+
status: boolean;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
declare const TAGS: readonly ["new", "hot", "sale", "featured", "exclusive"];
|
|
43
|
+
type Tag = typeof TAGS[number];
|
|
44
|
+
interface ICategory {
|
|
45
|
+
_id?: string;
|
|
46
|
+
name: ILocalizedString;
|
|
47
|
+
description?: ILocalizedString;
|
|
48
|
+
slug: string;
|
|
49
|
+
parent?: string | null;
|
|
50
|
+
parentName?: string;
|
|
51
|
+
children?: string[];
|
|
52
|
+
level?: number;
|
|
53
|
+
status: boolean;
|
|
54
|
+
store: IStore;
|
|
55
|
+
skuInitial?: string;
|
|
56
|
+
sortPosition?: number;
|
|
57
|
+
tags: Tag[];
|
|
58
|
+
images: {
|
|
59
|
+
desktopBanner?: string;
|
|
60
|
+
mobileBanner?: string;
|
|
61
|
+
shopPageThumbnail?: string;
|
|
62
|
+
categoryThumbnail?: string;
|
|
63
|
+
};
|
|
64
|
+
metaData?: {
|
|
65
|
+
category?: {
|
|
66
|
+
titleTag?: string;
|
|
67
|
+
headerTag?: string;
|
|
68
|
+
metaDescription?: string;
|
|
69
|
+
csrKeywords?: string;
|
|
70
|
+
};
|
|
71
|
+
product?: {
|
|
72
|
+
titleTag?: string;
|
|
73
|
+
headerTag?: string;
|
|
74
|
+
metaDescription?: string;
|
|
75
|
+
csrKeywords?: string;
|
|
76
|
+
};
|
|
77
|
+
};
|
|
78
|
+
createdAt?: string;
|
|
79
|
+
updatedAt?: string;
|
|
80
|
+
productCount?: number;
|
|
81
|
+
[key: string]: any;
|
|
82
|
+
}
|
|
83
|
+
interface CategoryQueryParams {
|
|
84
|
+
page?: number;
|
|
85
|
+
limit?: number;
|
|
86
|
+
name?: string;
|
|
87
|
+
status?: string;
|
|
88
|
+
minLevel?: string;
|
|
89
|
+
maxLevel?: string;
|
|
90
|
+
}
|
|
91
|
+
interface CategoryResponse {
|
|
92
|
+
categories: ICategory[];
|
|
93
|
+
totalCategories: number;
|
|
94
|
+
totalPages: number;
|
|
95
|
+
currentPage: number;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
interface IPrices {
|
|
99
|
+
originalPrice: number;
|
|
100
|
+
price: number;
|
|
101
|
+
discount?: number;
|
|
102
|
+
}
|
|
103
|
+
interface IMetaDataProduct {
|
|
104
|
+
title?: string;
|
|
105
|
+
header?: string;
|
|
106
|
+
description?: string;
|
|
107
|
+
keywords?: string[];
|
|
108
|
+
canonicalUrl?: string;
|
|
109
|
+
}
|
|
110
|
+
interface IImages {
|
|
111
|
+
productImage?: string;
|
|
112
|
+
seoImage?: string;
|
|
113
|
+
displayImage?: string;
|
|
114
|
+
}
|
|
115
|
+
interface IProduct {
|
|
116
|
+
_id: string;
|
|
117
|
+
sku?: string;
|
|
118
|
+
barcode?: string;
|
|
119
|
+
title: ILocalizedString;
|
|
120
|
+
description?: ILocalizedString;
|
|
121
|
+
slug: string;
|
|
122
|
+
categories: ICategory[];
|
|
123
|
+
category: ICategory;
|
|
124
|
+
productType: IProductType;
|
|
125
|
+
image: string[];
|
|
126
|
+
stock: number;
|
|
127
|
+
sales: number;
|
|
128
|
+
tag: string[];
|
|
129
|
+
variants: IVariant[];
|
|
130
|
+
hasVariant: boolean;
|
|
131
|
+
hasSize: boolean;
|
|
132
|
+
prices: IPrices;
|
|
133
|
+
status: boolean;
|
|
134
|
+
store: IStore;
|
|
135
|
+
images?: IImages;
|
|
136
|
+
metaData?: {
|
|
137
|
+
product?: IMetaDataProduct;
|
|
138
|
+
};
|
|
139
|
+
createdAt?: Date;
|
|
140
|
+
updatedAt?: Date;
|
|
141
|
+
variantList?: IVariant[];
|
|
142
|
+
[key: string]: any;
|
|
143
|
+
}
|
|
144
|
+
interface IProductQuery {
|
|
145
|
+
page?: number;
|
|
146
|
+
limit?: number;
|
|
147
|
+
category?: string;
|
|
148
|
+
categories?: string[];
|
|
149
|
+
title?: string;
|
|
150
|
+
price?: string;
|
|
151
|
+
stockStatus?: string;
|
|
152
|
+
published?: string;
|
|
153
|
+
status?: boolean;
|
|
154
|
+
minPrice?: string;
|
|
155
|
+
maxPrice?: string;
|
|
156
|
+
}
|
|
157
|
+
interface IProductResponse {
|
|
158
|
+
products: IProduct[];
|
|
159
|
+
totalDoc: number;
|
|
160
|
+
limits: number;
|
|
161
|
+
pages: number;
|
|
162
|
+
}
|
|
163
|
+
interface IProductUpdate {
|
|
164
|
+
ids: string[];
|
|
165
|
+
[key: string]: any;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
interface IProductType {
|
|
169
|
+
_id: string;
|
|
170
|
+
name: string;
|
|
171
|
+
slug: string;
|
|
172
|
+
status: boolean;
|
|
173
|
+
pricingChart: IPricingChartDocument;
|
|
174
|
+
shippingChart: IShippingChartDocument;
|
|
175
|
+
variantChart: IVariantChart;
|
|
176
|
+
frameChart: IFrameChartDocument;
|
|
177
|
+
store: IStore;
|
|
178
|
+
}
|
|
179
|
+
interface IPricingTier {
|
|
180
|
+
from: number;
|
|
181
|
+
to: number;
|
|
182
|
+
price: number;
|
|
183
|
+
}
|
|
184
|
+
interface IPricingData {
|
|
185
|
+
label: string;
|
|
186
|
+
tiers: IPricingTier[];
|
|
187
|
+
}
|
|
188
|
+
interface IPricingChartDocument {
|
|
189
|
+
_id: string;
|
|
190
|
+
name: string;
|
|
191
|
+
pricing: IPricingData[];
|
|
192
|
+
status: boolean;
|
|
193
|
+
}
|
|
194
|
+
interface IPricingChartFormProps {
|
|
195
|
+
onClose: () => void;
|
|
196
|
+
pricingChartId?: string | null;
|
|
197
|
+
initialData?: IPricingChartDocument | null;
|
|
198
|
+
}
|
|
199
|
+
interface IFrameChartDocument {
|
|
200
|
+
_id: string;
|
|
201
|
+
name: string;
|
|
202
|
+
pricing: IPricingData[];
|
|
203
|
+
status: boolean;
|
|
204
|
+
}
|
|
205
|
+
interface IFrameChartFormProps {
|
|
206
|
+
onClose: () => void;
|
|
207
|
+
frameChartId?: string | null;
|
|
208
|
+
initialData?: IFrameChartDocument | null;
|
|
209
|
+
}
|
|
210
|
+
interface IShippingTier {
|
|
211
|
+
from: number;
|
|
212
|
+
to: number;
|
|
213
|
+
price: number;
|
|
214
|
+
}
|
|
215
|
+
interface IShippingData {
|
|
216
|
+
label: string;
|
|
217
|
+
day: number;
|
|
218
|
+
tiers: IShippingTier[];
|
|
219
|
+
}
|
|
220
|
+
interface IShippingChartDocument {
|
|
221
|
+
_id: string;
|
|
222
|
+
name: string;
|
|
223
|
+
shipping: IShippingData[];
|
|
224
|
+
status: boolean;
|
|
225
|
+
}
|
|
226
|
+
interface IShippingChartFormProps {
|
|
227
|
+
onClose: () => void;
|
|
228
|
+
shippingChartId?: string | null;
|
|
229
|
+
initialData?: IShippingChartDocument | null;
|
|
230
|
+
}
|
|
231
|
+
interface IVariantOption {
|
|
232
|
+
label: string;
|
|
233
|
+
}
|
|
234
|
+
interface IVariantChart {
|
|
235
|
+
_id: string;
|
|
236
|
+
name: string;
|
|
237
|
+
status: boolean;
|
|
238
|
+
variants: IVariantOption[];
|
|
239
|
+
createdAt?: string;
|
|
240
|
+
updatedAt?: string;
|
|
241
|
+
}
|
|
242
|
+
interface IVariantChartFormProps {
|
|
243
|
+
onClose: () => void;
|
|
244
|
+
variantChartId?: string | null;
|
|
245
|
+
initialData?: IVariantChart | null;
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
interface IGlobalSetting {
|
|
249
|
+
_id: string;
|
|
250
|
+
name: string;
|
|
251
|
+
number_of_image_per_product: number;
|
|
252
|
+
shop_name: string;
|
|
253
|
+
address: string;
|
|
254
|
+
company_name: string;
|
|
255
|
+
vat_number: string;
|
|
256
|
+
post_code: string;
|
|
257
|
+
contact: string;
|
|
258
|
+
email: string;
|
|
259
|
+
website: string;
|
|
260
|
+
default_currency: string;
|
|
261
|
+
default_time_zone: string;
|
|
262
|
+
default_date_format: string;
|
|
263
|
+
receipt_size: string;
|
|
264
|
+
from_email: string;
|
|
265
|
+
email_to_customer: boolean;
|
|
266
|
+
allow_auto_trans: boolean;
|
|
267
|
+
translation_key: string;
|
|
268
|
+
default_language: string;
|
|
269
|
+
floating_number: number;
|
|
270
|
+
createdAt: string;
|
|
271
|
+
updatedAt: string;
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
interface IDiscountType {
|
|
275
|
+
type: string;
|
|
276
|
+
value: number;
|
|
277
|
+
}
|
|
278
|
+
interface ICoupon {
|
|
279
|
+
_id: string;
|
|
280
|
+
title: ILocalizedString;
|
|
281
|
+
logo: string;
|
|
282
|
+
couponCode: string;
|
|
283
|
+
startTime: string;
|
|
284
|
+
endTime: string;
|
|
285
|
+
discountType: IDiscountType;
|
|
286
|
+
minimumAmount: number;
|
|
287
|
+
isPromotional: boolean;
|
|
288
|
+
status: boolean;
|
|
289
|
+
store: IStore;
|
|
290
|
+
createdAt: string;
|
|
291
|
+
updatedAt: string;
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
interface IVariantPrices {
|
|
295
|
+
originalPrice: number;
|
|
296
|
+
price: number;
|
|
297
|
+
discount?: number;
|
|
298
|
+
}
|
|
299
|
+
interface IVariant {
|
|
300
|
+
_id: string;
|
|
301
|
+
productId?: string;
|
|
302
|
+
sku: string;
|
|
303
|
+
barcode?: string;
|
|
304
|
+
title: ILocalizedString;
|
|
305
|
+
description?: ILocalizedString;
|
|
306
|
+
slug: string;
|
|
307
|
+
stock: number;
|
|
308
|
+
sales?: number;
|
|
309
|
+
tag?: string[];
|
|
310
|
+
prices: IVariantPrices;
|
|
311
|
+
image?: string;
|
|
312
|
+
templateJson?: string;
|
|
313
|
+
size: {
|
|
314
|
+
width: number;
|
|
315
|
+
height: number;
|
|
316
|
+
};
|
|
317
|
+
status: boolean;
|
|
318
|
+
createdAt?: Date;
|
|
319
|
+
updatedAt?: Date;
|
|
320
|
+
}
|
|
321
|
+
interface IProductVariantQuery {
|
|
322
|
+
page?: number;
|
|
323
|
+
limit?: number;
|
|
324
|
+
title?: string;
|
|
325
|
+
price?: string;
|
|
326
|
+
stockStatus?: string;
|
|
327
|
+
minPrice?: string;
|
|
328
|
+
maxPrice?: string;
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
interface ISubscriberSegmentRules {
|
|
332
|
+
status?: 'active' | 'unsubscribed' | 'bounced' | 'blocked';
|
|
333
|
+
channels?: 'email' | 'sms' | 'push' | Array<'email' | 'sms' | 'push'>;
|
|
334
|
+
}
|
|
335
|
+
interface ISubscriber {
|
|
336
|
+
_id?: string;
|
|
337
|
+
email?: string;
|
|
338
|
+
phone?: string;
|
|
339
|
+
userId?: string;
|
|
340
|
+
channels: Array<'email' | 'sms' | 'push'>;
|
|
341
|
+
status?: 'active' | 'unsubscribed' | 'bounced' | 'blocked';
|
|
342
|
+
locale?: string;
|
|
343
|
+
store?: IStore | string;
|
|
344
|
+
schemaVersion?: number;
|
|
345
|
+
isDeleted?: boolean;
|
|
346
|
+
createdAt?: Date;
|
|
347
|
+
updatedAt?: Date;
|
|
348
|
+
}
|
|
349
|
+
interface ISubscriberCampaignContent {
|
|
350
|
+
html?: string;
|
|
351
|
+
text?: string;
|
|
352
|
+
}
|
|
353
|
+
interface ISubscriberCampaign {
|
|
354
|
+
_id?: string;
|
|
355
|
+
store?: IStore;
|
|
356
|
+
name: string;
|
|
357
|
+
type: 'email' | 'sms' | 'push';
|
|
358
|
+
segmentId?: string;
|
|
359
|
+
subject?: string;
|
|
360
|
+
content?: ISubscriberCampaignContent;
|
|
361
|
+
status?: 'draft' | 'scheduled' | 'sent' | 'failed';
|
|
362
|
+
scheduledAt?: Date;
|
|
363
|
+
sentAt?: Date;
|
|
364
|
+
createdAt?: Date;
|
|
365
|
+
}
|
|
366
|
+
interface ISubscriberCampaignLogMetaLocation {
|
|
367
|
+
country?: string;
|
|
368
|
+
city?: string;
|
|
369
|
+
}
|
|
370
|
+
interface ISubscriberCampaignLogMeta {
|
|
371
|
+
ip?: string;
|
|
372
|
+
userAgent?: string;
|
|
373
|
+
location?: ISubscriberCampaignLogMetaLocation;
|
|
374
|
+
}
|
|
375
|
+
interface ISubscriberCampaignLog {
|
|
376
|
+
_id?: string;
|
|
377
|
+
campaignId: string;
|
|
378
|
+
subscriberId: string;
|
|
379
|
+
event: 'delivered' | 'opened' | 'clicked' | 'bounced' | 'unsubscribed';
|
|
380
|
+
timestamp?: Date;
|
|
381
|
+
meta?: ISubscriberCampaignLogMeta;
|
|
382
|
+
}
|
|
383
|
+
interface ISubscriberEventBase {
|
|
384
|
+
_id?: string;
|
|
385
|
+
subscriberId: string;
|
|
386
|
+
createdAt?: Date;
|
|
387
|
+
}
|
|
388
|
+
interface ISubscriberEventSubscribed extends ISubscriberEventBase {
|
|
389
|
+
eventType: 'subscribed' | 'unsubscribed' | 'preference_updated' | 'bounced' | 'created' | 'deleted';
|
|
390
|
+
details?: Record<string, any>;
|
|
391
|
+
}
|
|
392
|
+
interface ISubscriberEventUpdated extends ISubscriberEventBase {
|
|
393
|
+
eventType: 'updated';
|
|
394
|
+
details: {
|
|
395
|
+
updatedFields: Record<string, any>;
|
|
396
|
+
};
|
|
397
|
+
}
|
|
398
|
+
type ISubscriberEvent = ISubscriberEventSubscribed | ISubscriberEventUpdated;
|
|
399
|
+
interface ISubscriberList {
|
|
400
|
+
_id?: string;
|
|
401
|
+
store?: IStore;
|
|
402
|
+
name: string;
|
|
403
|
+
description?: string;
|
|
404
|
+
channel: 'email' | 'sms' | 'push';
|
|
405
|
+
defaultOptIn?: boolean;
|
|
406
|
+
createdAt?: Date;
|
|
407
|
+
}
|
|
408
|
+
interface ISubscriberPreference {
|
|
409
|
+
_id?: string;
|
|
410
|
+
subscriberId: string;
|
|
411
|
+
channel: 'email' | 'sms' | 'push';
|
|
412
|
+
topics: string[];
|
|
413
|
+
unsubscribed: boolean;
|
|
414
|
+
updatedAt?: Date;
|
|
415
|
+
}
|
|
416
|
+
interface ISubscriberSegment {
|
|
417
|
+
_id?: string;
|
|
418
|
+
store?: IStore;
|
|
419
|
+
name: string;
|
|
420
|
+
type: 'static' | 'dynamic';
|
|
421
|
+
rules?: ISubscriberSegmentRules;
|
|
422
|
+
subscriberIds?: Array<string>;
|
|
423
|
+
createdAt?: Date;
|
|
424
|
+
}
|
|
425
|
+
interface ISubscriberSubscription {
|
|
426
|
+
_id?: string;
|
|
427
|
+
subscriberId: string;
|
|
428
|
+
listId: string;
|
|
429
|
+
status?: 'subscribed' | 'unsubscribed' | 'pending';
|
|
430
|
+
subscribedAt?: Date;
|
|
431
|
+
unsubscribedAt?: Date;
|
|
432
|
+
isDeleted?: boolean;
|
|
433
|
+
}
|
|
434
|
+
|
|
435
|
+
interface ILanguage {
|
|
436
|
+
_id: string;
|
|
437
|
+
name: string;
|
|
438
|
+
iso_code: string;
|
|
439
|
+
flag: string;
|
|
440
|
+
status: boolean;
|
|
441
|
+
createdAt: string;
|
|
442
|
+
updatedAt: string;
|
|
443
|
+
}
|
|
444
|
+
|
|
445
|
+
type BannerMediaType = 'image' | 'video';
|
|
446
|
+
interface BannerMedia {
|
|
447
|
+
type: BannerMediaType;
|
|
448
|
+
sources: {
|
|
449
|
+
desktop: string;
|
|
450
|
+
mobile?: string;
|
|
451
|
+
tablet?: string;
|
|
452
|
+
};
|
|
453
|
+
altText?: ILocalizedString;
|
|
454
|
+
poster?: string;
|
|
455
|
+
autoplay?: boolean;
|
|
456
|
+
loop?: boolean;
|
|
457
|
+
muted?: boolean;
|
|
458
|
+
}
|
|
459
|
+
type LinkType = 'internal' | 'external';
|
|
460
|
+
interface BannerLink {
|
|
461
|
+
type: LinkType;
|
|
462
|
+
url: string;
|
|
463
|
+
openInNewTab: boolean;
|
|
464
|
+
}
|
|
465
|
+
interface IBannerFormValues extends Omit<IBanner, 'visibility'> {
|
|
466
|
+
visibility: BannerVisibility & {
|
|
467
|
+
scheduledRange?: [Date, Date];
|
|
468
|
+
};
|
|
469
|
+
}
|
|
470
|
+
interface BannerVisibility {
|
|
471
|
+
status: boolean;
|
|
472
|
+
scheduled: {
|
|
473
|
+
from: Date | null;
|
|
474
|
+
to: Date | null;
|
|
475
|
+
};
|
|
476
|
+
}
|
|
477
|
+
interface IBanner {
|
|
478
|
+
_id?: string;
|
|
479
|
+
store: IStore;
|
|
480
|
+
title: ILocalizedString;
|
|
481
|
+
description?: ILocalizedString;
|
|
482
|
+
media: BannerMedia;
|
|
483
|
+
link?: BannerLink;
|
|
484
|
+
visibility: BannerVisibility;
|
|
485
|
+
position: string;
|
|
486
|
+
sortOrder: number;
|
|
487
|
+
createdAt: Date;
|
|
488
|
+
updatedAt: Date;
|
|
489
|
+
}
|
|
490
|
+
|
|
491
|
+
type CustomerPhotoStatus = 'pending' | 'approved' | 'rejected';
|
|
492
|
+
interface ICustomerPhotos {
|
|
493
|
+
_id?: string;
|
|
494
|
+
store: IStore;
|
|
495
|
+
customer: {
|
|
496
|
+
name?: string;
|
|
497
|
+
email?: string;
|
|
498
|
+
comment?: string;
|
|
499
|
+
};
|
|
500
|
+
photos: string[];
|
|
501
|
+
status: CustomerPhotoStatus;
|
|
502
|
+
createdAt: Date;
|
|
503
|
+
updatedAt: Date;
|
|
504
|
+
}
|
|
505
|
+
interface CustomerPhotosQueryParams {
|
|
506
|
+
page?: number;
|
|
507
|
+
limit?: number;
|
|
508
|
+
name?: string;
|
|
509
|
+
email?: string;
|
|
510
|
+
status?: CustomerPhotoStatus;
|
|
511
|
+
store?: string;
|
|
512
|
+
}
|
|
513
|
+
|
|
514
|
+
export { type BannerLink, type BannerMedia, type BannerMediaType, type BannerVisibility, type CategoryQueryParams, type CategoryResponse, type CustomerPhotoStatus, type CustomerPhotosQueryParams, type IBanner, type IBannerFormValues, type ICategory, type ICoupon, type ICreateStoreDTO, type ICurrency, type ICustomerPhotos, type IDiscountType, type IFrameChartDocument, type IFrameChartFormProps, type IGlobalSetting, type IImages, type ILanguage, type ILocalizedString, type IMetaDataProduct, type IPrices, type IPricingChartDocument, type IPricingChartFormProps, type IPricingData, type IPricingTier, type IProduct, type IProductQuery, type IProductResponse, type IProductType, type IProductUpdate, type IProductVariantQuery, type IShippingChartDocument, type IShippingChartFormProps, type IShippingData, type IShippingTier, type IStore, type IStoreSettings, type ISubscriber, type ISubscriberCampaign, type ISubscriberCampaignContent, type ISubscriberCampaignLog, type ISubscriberCampaignLogMeta, type ISubscriberCampaignLogMetaLocation, type ISubscriberEvent, type ISubscriberEventBase, type ISubscriberEventSubscribed, type ISubscriberEventUpdated, type ISubscriberList, type ISubscriberPreference, type ISubscriberSegment, type ISubscriberSegmentRules, type ISubscriberSubscription, type IVariant, type IVariantChart, type IVariantChartFormProps, type IVariantOption, type IVariantPrices, type LinkType, TAGS, type Tag };
|
package/dist/index.js
CHANGED
|
@@ -1 +1,33 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/index.ts
|
|
21
|
+
var index_exports = {};
|
|
22
|
+
__export(index_exports, {
|
|
23
|
+
TAGS: () => TAGS
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(index_exports);
|
|
26
|
+
|
|
27
|
+
// src/interfaces/category.ts
|
|
28
|
+
var TAGS = ["new", "hot", "sale", "featured", "exclusive"];
|
|
29
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
30
|
+
0 && (module.exports = {
|
|
31
|
+
TAGS
|
|
32
|
+
});
|
|
33
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/index.ts","../src/interfaces/category.ts"],"sourcesContent":["export * from './interfaces';\n","import { ILocalizedString } from \"./common\";\nimport { IStore } from \"./store\";\n\nexport const TAGS = ['new', 'hot', 'sale', 'featured', 'exclusive'] as const;\n\nexport type Tag = typeof TAGS[number];\n\nexport interface ICategory {\n _id?: string;\n name: ILocalizedString;\n description?: ILocalizedString;\n slug: string;\n parent?: string | null;\n parentName?: string;\n children?: string[];\n level?: number;\n status: boolean;\n store: IStore;\n skuInitial?: string;\n sortPosition?: number;\n tags: Tag[];\n\n images: {\n desktopBanner?: string;\n mobileBanner?: string;\n shopPageThumbnail?: string;\n categoryThumbnail?: string;\n };\n\n metaData?: {\n category?: {\n titleTag?: string;\n headerTag?: string;\n metaDescription?: string;\n csrKeywords?: string;\n };\n product?: {\n titleTag?: string;\n headerTag?: string;\n metaDescription?: string;\n csrKeywords?: string;\n };\n };\n\n createdAt?: string;\n updatedAt?: string;\n productCount?: number;\n\n [key: string]: any; // Optional catch-all for dynamic properties\n}\n\nexport interface CategoryQueryParams {\n page?: number;\n limit?: number;\n name?: string;\n status?: string;\n minLevel?: string;\n maxLevel?: string;\n}\n\nexport interface CategoryResponse {\n categories: ICategory[];\n totalCategories: number;\n totalPages: number;\n currentPage: number;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACGO,IAAM,OAAO,CAAC,OAAO,OAAO,QAAQ,YAAY,WAAW;","names":[]}
|
package/dist/index.mjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/interfaces/category.ts"],"sourcesContent":["import { ILocalizedString } from \"./common\";\nimport { IStore } from \"./store\";\n\nexport const TAGS = ['new', 'hot', 'sale', 'featured', 'exclusive'] as const;\n\nexport type Tag = typeof TAGS[number];\n\nexport interface ICategory {\n _id?: string;\n name: ILocalizedString;\n description?: ILocalizedString;\n slug: string;\n parent?: string | null;\n parentName?: string;\n children?: string[];\n level?: number;\n status: boolean;\n store: IStore;\n skuInitial?: string;\n sortPosition?: number;\n tags: Tag[];\n\n images: {\n desktopBanner?: string;\n mobileBanner?: string;\n shopPageThumbnail?: string;\n categoryThumbnail?: string;\n };\n\n metaData?: {\n category?: {\n titleTag?: string;\n headerTag?: string;\n metaDescription?: string;\n csrKeywords?: string;\n };\n product?: {\n titleTag?: string;\n headerTag?: string;\n metaDescription?: string;\n csrKeywords?: string;\n };\n };\n\n createdAt?: string;\n updatedAt?: string;\n productCount?: number;\n\n [key: string]: any; // Optional catch-all for dynamic properties\n}\n\nexport interface CategoryQueryParams {\n page?: number;\n limit?: number;\n name?: string;\n status?: string;\n minLevel?: string;\n maxLevel?: string;\n}\n\nexport interface CategoryResponse {\n categories: ICategory[];\n totalCategories: number;\n totalPages: number;\n currentPage: number;\n}\n"],"mappings":";AAGO,IAAM,OAAO,CAAC,OAAO,OAAO,QAAQ,YAAY,WAAW;","names":[]}
|
package/package.json
CHANGED
|
@@ -1,10 +1,37 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
2
|
+
"name": "@signskart/shared",
|
|
3
|
+
"version": "1.3.9",
|
|
4
|
+
"description": "Production-grade upload manager SDK with queue, progress tracking, retry logic, and multi-provider support (S3, Cloudinary).",
|
|
5
|
+
"author": "Signskart",
|
|
6
|
+
"license": "UNLICENSED",
|
|
7
|
+
"main": "dist/index.cjs",
|
|
8
|
+
"module": "dist/index.js",
|
|
9
|
+
"types": "dist/index.d.ts",
|
|
10
|
+
"files": [
|
|
11
|
+
"dist"
|
|
12
|
+
],
|
|
13
|
+
"exports": {
|
|
14
|
+
".": {
|
|
15
|
+
"import": "./dist/index.js",
|
|
16
|
+
"require": "./dist/index.cjs"
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
"scripts": {
|
|
20
|
+
"build": "tsup",
|
|
21
|
+
"prepublishOnly": "npm run build"
|
|
22
|
+
},
|
|
23
|
+
"keywords": [
|
|
24
|
+
"signskart",
|
|
25
|
+
"upload",
|
|
26
|
+
"s3",
|
|
27
|
+
"cloudinary",
|
|
28
|
+
"upload-manager",
|
|
29
|
+
"typescript",
|
|
30
|
+
"file-upload",
|
|
31
|
+
"sdk"
|
|
32
|
+
],
|
|
33
|
+
"devDependencies": {
|
|
34
|
+
"tsup": "^8.0.0",
|
|
35
|
+
"typescript": "^5.0.0"
|
|
36
|
+
}
|
|
37
|
+
}
|
|
@@ -1,47 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|