@signskart/shared 1.0.0 → 1.0.1

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 ADDED
@@ -0,0 +1,67 @@
1
+ ## 📦 Publish Instructions
2
+
3
+ To build and publish this package, follow these steps:
4
+
5
+ ### Step 1: Build the Project
6
+
7
+ ```bash
8
+ npm run build
9
+ ```
10
+
11
+ ### Step 2: Publish the Package
12
+
13
+ ```bash
14
+ npm publish --access public
15
+
16
+ npm version patch
17
+ npm publish
18
+ ```
19
+
20
+ ---
21
+
22
+ ## 🚫 Usage Notice
23
+
24
+ > **⚠️ This package is the intellectual property of [Signskart](https://www.signskart.com). Unauthorized use, distribution, modification, or publishing is strictly prohibited.**
25
+
26
+ You **may not**:
27
+
28
+ * Use this package in your projects without written permission from Signskart.
29
+ * Rebrand or redistribute it under your own or another name.
30
+ * Reverse-engineer or repurpose any part of the codebase.
31
+
32
+ All rights reserved © Signskart, 2025.
33
+
34
+ ---
35
+
36
+ ## ✅ Intended Use Case
37
+
38
+ This package is developed exclusively for Signskart’s internal and client-facing projects. It is optimized to support features and workflows aligned with our services, including but not limited to:
39
+
40
+ * Signboard design automation
41
+ * Print-ready file generation
42
+ * Vendor-side tool integration
43
+
44
+ ---
45
+
46
+ ## 🤝 Collaboration & Permission
47
+
48
+ If you are interested in collaborating, contributing, or using this package under a commercial or open-source license, please contact:
49
+
50
+ 📧 **Email**: [support@signskart.com](mailto:support@signskart.com)
51
+
52
+ 🌐 **Website**: [https://www.signskart.com](https://www.signskart.com)
53
+
54
+ We welcome:
55
+
56
+ * Strategic tech partnerships
57
+ * Contributions under an approved contributor license
58
+ * API integrations aligned with our ecosystem
59
+
60
+ ---
61
+
62
+ ## ✍️ Author Signature
63
+
64
+ Warm regards,
65
+ **RAJAN KUMAR**
66
+ | Founder at [Signskart](https://signskart.com)
67
+ 📧 [admin@signskart.com](mailto:admin@signskart.com)
@@ -0,0 +1,513 @@
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
+ prices: IPrices;
132
+ status: boolean;
133
+ store: IStore;
134
+ images?: IImages;
135
+ metaData?: {
136
+ product?: IMetaDataProduct;
137
+ };
138
+ createdAt?: Date;
139
+ updatedAt?: Date;
140
+ variantList?: IVariant[];
141
+ [key: string]: any;
142
+ }
143
+ interface IProductQuery {
144
+ page?: number;
145
+ limit?: number;
146
+ category?: string;
147
+ categories?: string[];
148
+ title?: string;
149
+ price?: string;
150
+ stockStatus?: string;
151
+ published?: string;
152
+ status?: boolean;
153
+ minPrice?: string;
154
+ maxPrice?: string;
155
+ }
156
+ interface IProductResponse {
157
+ products: IProduct[];
158
+ totalDoc: number;
159
+ limits: number;
160
+ pages: number;
161
+ }
162
+ interface IProductUpdate {
163
+ ids: string[];
164
+ [key: string]: any;
165
+ }
166
+
167
+ interface IProductType {
168
+ _id: string;
169
+ name: string;
170
+ slug: string;
171
+ status: boolean;
172
+ pricingChart: IPricingChartDocument;
173
+ shippingChart: IShippingChartDocument;
174
+ variantChart: IVariantChart;
175
+ frameChart: IFrameChartDocument;
176
+ store: IStore;
177
+ }
178
+ interface IPricingTier {
179
+ from: number;
180
+ to: number;
181
+ price: number;
182
+ }
183
+ interface IPricingData {
184
+ label: string;
185
+ tiers: IPricingTier[];
186
+ }
187
+ interface IPricingChartDocument {
188
+ _id: string;
189
+ name: string;
190
+ pricing: IPricingData[];
191
+ status: boolean;
192
+ }
193
+ interface IPricingChartFormProps {
194
+ onClose: () => void;
195
+ pricingChartId?: string | null;
196
+ initialData?: IPricingChartDocument | null;
197
+ }
198
+ interface IFrameChartDocument {
199
+ _id: string;
200
+ name: string;
201
+ pricing: IPricingData[];
202
+ status: boolean;
203
+ }
204
+ interface IFrameChartFormProps {
205
+ onClose: () => void;
206
+ frameChartId?: string | null;
207
+ initialData?: IFrameChartDocument | null;
208
+ }
209
+ interface IShippingTier {
210
+ from: number;
211
+ to: number;
212
+ price: number;
213
+ }
214
+ interface IShippingData {
215
+ label: string;
216
+ day: number;
217
+ tiers: IShippingTier[];
218
+ }
219
+ interface IShippingChartDocument {
220
+ _id: string;
221
+ name: string;
222
+ shipping: IShippingData[];
223
+ status: boolean;
224
+ }
225
+ interface IShippingChartFormProps {
226
+ onClose: () => void;
227
+ shippingChartId?: string | null;
228
+ initialData?: IShippingChartDocument | null;
229
+ }
230
+ interface IVariantOption {
231
+ label: string;
232
+ }
233
+ interface IVariantChart {
234
+ _id: string;
235
+ name: string;
236
+ status: boolean;
237
+ variants: IVariantOption[];
238
+ createdAt?: string;
239
+ updatedAt?: string;
240
+ }
241
+ interface IVariantChartFormProps {
242
+ onClose: () => void;
243
+ variantChartId?: string | null;
244
+ initialData?: IVariantChart | null;
245
+ }
246
+
247
+ interface IGlobalSetting {
248
+ _id: string;
249
+ name: string;
250
+ number_of_image_per_product: number;
251
+ shop_name: string;
252
+ address: string;
253
+ company_name: string;
254
+ vat_number: string;
255
+ post_code: string;
256
+ contact: string;
257
+ email: string;
258
+ website: string;
259
+ default_currency: string;
260
+ default_time_zone: string;
261
+ default_date_format: string;
262
+ receipt_size: string;
263
+ from_email: string;
264
+ email_to_customer: boolean;
265
+ allow_auto_trans: boolean;
266
+ translation_key: string;
267
+ default_language: string;
268
+ floating_number: number;
269
+ createdAt: string;
270
+ updatedAt: string;
271
+ }
272
+
273
+ interface IDiscountType {
274
+ type: string;
275
+ value: number;
276
+ }
277
+ interface ICoupon {
278
+ _id: string;
279
+ title: ILocalizedString;
280
+ logo: string;
281
+ couponCode: string;
282
+ startTime: string;
283
+ endTime: string;
284
+ discountType: IDiscountType;
285
+ minimumAmount: number;
286
+ isPromotional: boolean;
287
+ status: boolean;
288
+ store: IStore;
289
+ createdAt: string;
290
+ updatedAt: string;
291
+ }
292
+
293
+ interface IVariantPrices {
294
+ originalPrice: number;
295
+ price: number;
296
+ discount?: number;
297
+ }
298
+ interface IVariant {
299
+ _id: string;
300
+ productId?: string;
301
+ sku: string;
302
+ barcode?: string;
303
+ title: ILocalizedString;
304
+ description?: ILocalizedString;
305
+ slug: string;
306
+ stock: number;
307
+ sales?: number;
308
+ tag?: string[];
309
+ prices: IVariantPrices;
310
+ image?: string;
311
+ templateJson?: string;
312
+ size: {
313
+ width: number;
314
+ height: number;
315
+ };
316
+ status: boolean;
317
+ createdAt?: Date;
318
+ updatedAt?: Date;
319
+ }
320
+ interface IProductVariantQuery {
321
+ page?: number;
322
+ limit?: number;
323
+ title?: string;
324
+ price?: string;
325
+ stockStatus?: string;
326
+ minPrice?: string;
327
+ maxPrice?: string;
328
+ }
329
+
330
+ interface ISubscriberSegmentRules {
331
+ status?: 'active' | 'unsubscribed' | 'bounced' | 'blocked';
332
+ channels?: 'email' | 'sms' | 'push' | Array<'email' | 'sms' | 'push'>;
333
+ }
334
+ interface ISubscriber {
335
+ _id?: string;
336
+ email?: string;
337
+ phone?: string;
338
+ userId?: string;
339
+ channels: Array<'email' | 'sms' | 'push'>;
340
+ status?: 'active' | 'unsubscribed' | 'bounced' | 'blocked';
341
+ locale?: string;
342
+ store?: IStore | string;
343
+ schemaVersion?: number;
344
+ isDeleted?: boolean;
345
+ createdAt?: Date;
346
+ updatedAt?: Date;
347
+ }
348
+ interface ISubscriberCampaignContent {
349
+ html?: string;
350
+ text?: string;
351
+ }
352
+ interface ISubscriberCampaign {
353
+ _id?: string;
354
+ store?: IStore;
355
+ name: string;
356
+ type: 'email' | 'sms' | 'push';
357
+ segmentId?: string;
358
+ subject?: string;
359
+ content?: ISubscriberCampaignContent;
360
+ status?: 'draft' | 'scheduled' | 'sent' | 'failed';
361
+ scheduledAt?: Date;
362
+ sentAt?: Date;
363
+ createdAt?: Date;
364
+ }
365
+ interface ISubscriberCampaignLogMetaLocation {
366
+ country?: string;
367
+ city?: string;
368
+ }
369
+ interface ISubscriberCampaignLogMeta {
370
+ ip?: string;
371
+ userAgent?: string;
372
+ location?: ISubscriberCampaignLogMetaLocation;
373
+ }
374
+ interface ISubscriberCampaignLog {
375
+ _id?: string;
376
+ campaignId: string;
377
+ subscriberId: string;
378
+ event: 'delivered' | 'opened' | 'clicked' | 'bounced' | 'unsubscribed';
379
+ timestamp?: Date;
380
+ meta?: ISubscriberCampaignLogMeta;
381
+ }
382
+ interface ISubscriberEventBase {
383
+ _id?: string;
384
+ subscriberId: string;
385
+ createdAt?: Date;
386
+ }
387
+ interface ISubscriberEventSubscribed extends ISubscriberEventBase {
388
+ eventType: 'subscribed' | 'unsubscribed' | 'preference_updated' | 'bounced' | 'created' | 'deleted';
389
+ details?: Record<string, any>;
390
+ }
391
+ interface ISubscriberEventUpdated extends ISubscriberEventBase {
392
+ eventType: 'updated';
393
+ details: {
394
+ updatedFields: Record<string, any>;
395
+ };
396
+ }
397
+ type ISubscriberEvent = ISubscriberEventSubscribed | ISubscriberEventUpdated;
398
+ interface ISubscriberList {
399
+ _id?: string;
400
+ store?: IStore;
401
+ name: string;
402
+ description?: string;
403
+ channel: 'email' | 'sms' | 'push';
404
+ defaultOptIn?: boolean;
405
+ createdAt?: Date;
406
+ }
407
+ interface ISubscriberPreference {
408
+ _id?: string;
409
+ subscriberId: string;
410
+ channel: 'email' | 'sms' | 'push';
411
+ topics: string[];
412
+ unsubscribed: boolean;
413
+ updatedAt?: Date;
414
+ }
415
+ interface ISubscriberSegment {
416
+ _id?: string;
417
+ store?: IStore;
418
+ name: string;
419
+ type: 'static' | 'dynamic';
420
+ rules?: ISubscriberSegmentRules;
421
+ subscriberIds?: Array<string>;
422
+ createdAt?: Date;
423
+ }
424
+ interface ISubscriberSubscription {
425
+ _id?: string;
426
+ subscriberId: string;
427
+ listId: string;
428
+ status?: 'subscribed' | 'unsubscribed' | 'pending';
429
+ subscribedAt?: Date;
430
+ unsubscribedAt?: Date;
431
+ isDeleted?: boolean;
432
+ }
433
+
434
+ interface ILanguage {
435
+ _id: string;
436
+ name: string;
437
+ iso_code: string;
438
+ flag: string;
439
+ status: boolean;
440
+ createdAt: string;
441
+ updatedAt: string;
442
+ }
443
+
444
+ type BannerMediaType = 'image' | 'video';
445
+ interface BannerMedia {
446
+ type: BannerMediaType;
447
+ sources: {
448
+ desktop: string;
449
+ mobile?: string;
450
+ tablet?: string;
451
+ };
452
+ altText?: ILocalizedString;
453
+ poster?: string;
454
+ autoplay?: boolean;
455
+ loop?: boolean;
456
+ muted?: boolean;
457
+ }
458
+ type LinkType = 'internal' | 'external';
459
+ interface BannerLink {
460
+ type: LinkType;
461
+ url: string;
462
+ openInNewTab: boolean;
463
+ }
464
+ interface IBannerFormValues extends Omit<IBanner, 'visibility'> {
465
+ visibility: BannerVisibility & {
466
+ scheduledRange?: [Date, Date];
467
+ };
468
+ }
469
+ interface BannerVisibility {
470
+ status: boolean;
471
+ scheduled: {
472
+ from: Date | null;
473
+ to: Date | null;
474
+ };
475
+ }
476
+ interface IBanner {
477
+ _id?: string;
478
+ store: IStore;
479
+ title: ILocalizedString;
480
+ description?: ILocalizedString;
481
+ media: BannerMedia;
482
+ link?: BannerLink;
483
+ visibility: BannerVisibility;
484
+ position: string;
485
+ sortOrder: number;
486
+ createdAt: Date;
487
+ updatedAt: Date;
488
+ }
489
+
490
+ type CustomerPhotoStatus = 'pending' | 'approved' | 'rejected';
491
+ interface ICustomerPhotos {
492
+ _id?: string;
493
+ store: IStore;
494
+ customer: {
495
+ name?: string;
496
+ email?: string;
497
+ comment?: string;
498
+ };
499
+ photos: string[];
500
+ status: CustomerPhotoStatus;
501
+ createdAt: Date;
502
+ updatedAt: Date;
503
+ }
504
+ interface CustomerPhotosQueryParams {
505
+ page?: number;
506
+ limit?: number;
507
+ name?: string;
508
+ email?: string;
509
+ status?: CustomerPhotoStatus;
510
+ store?: string;
511
+ }
512
+
513
+ 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 };