@infuro/cms-core 1.0.4 → 1.0.6

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.cts CHANGED
@@ -1,5 +1,5 @@
1
- import { S as StorageService } from './index-DP3LK1XN.cjs';
2
- export { A as AnalyticsHandlerConfig, a as AuthHandlersConfig, B as BlogBySlugConfig, C as ChangePasswordConfig, b as CmsApiHandlerConfig, c as CmsGetter, d as CrudHandlerOptions, D as DashboardStatsConfig, E as EntityMap, F as ForgotPasswordConfig, e as FormBySlugConfig, I as InviteAcceptConfig, f as SetPasswordConfig, g as SettingsApiConfig, U as UploadHandlerConfig, h as UserAuthApiConfig, i as UserAvatarConfig, j as UserProfileConfig, k as UsersApiConfig, l as createAnalyticsHandlers, m as createBlogBySlugHandler, n as createChangePasswordHandler, o as createCmsApiHandler, p as createCrudByIdHandler, q as createCrudHandler, r as createDashboardStatsHandler, s as createForgotPasswordHandler, t as createFormBySlugHandler, u as createInviteAcceptHandler, v as createSetPasswordHandler, w as createSettingsApiHandlers, x as createUploadHandler, y as createUserAuthApiRouter, z as createUserAvatarHandler, G as createUserProfileHandler, H as createUsersApiHandlers } from './index-DP3LK1XN.cjs';
1
+ import { S as StorageService } from './index-BPnATEXW.cjs';
2
+ export { A as AnalyticsHandlerConfig, a as AuthHandlersConfig, B as BlogBySlugConfig, C as ChangePasswordConfig, b as CmsApiHandlerConfig, c as CmsGetter, d as CrudHandlerOptions, D as DashboardStatsConfig, E as EntityMap, F as ForgotPasswordConfig, e as FormBySlugConfig, I as InviteAcceptConfig, f as SetPasswordConfig, g as SettingsApiConfig, U as UploadHandlerConfig, h as UserAuthApiConfig, i as UserAvatarConfig, j as UserProfileConfig, k as UsersApiConfig, l as createAnalyticsHandlers, m as createBlogBySlugHandler, n as createChangePasswordHandler, o as createCmsApiHandler, p as createCrudByIdHandler, q as createCrudHandler, r as createDashboardStatsHandler, s as createForgotPasswordHandler, t as createFormBySlugHandler, u as createInviteAcceptHandler, v as createSetPasswordHandler, w as createSettingsApiHandlers, x as createUploadHandler, y as createUserAuthApiRouter, z as createUserAvatarHandler, G as createUserProfileHandler, H as createUsersApiHandlers } from './index-BPnATEXW.cjs';
3
3
  import { ClassValue } from 'clsx';
4
4
  import * as typeorm from 'typeorm';
5
5
  import { EntityTarget } from 'typeorm';
@@ -235,19 +235,31 @@ interface SmsPluginConfig {
235
235
  /** Stub SMS plugin - no implementation yet. Register and implement in app or extend core later. */
236
236
  declare function smsPlugin(_config?: SmsPluginConfig): CmsPlugin<SmsServiceInterface | null>;
237
237
 
238
- /** Provider-agnostic payment interface. Implementations (Stripe, Razorpay, PayPal) can be added later. */
238
+ interface PaymentIntent {
239
+ id: string;
240
+ clientSecret: string;
241
+ amount: number;
242
+ currency: string;
243
+ status: string;
244
+ }
239
245
  interface PaymentServiceInterface {
240
- createPaymentIntent?(amount: number, currency: string, metadata?: Record<string, string>): Promise<{
241
- clientSecret: string;
242
- } | null>;
243
- capturePayment?(paymentId: string): Promise<boolean>;
246
+ createPaymentIntent(amount: number, currency: string, metadata?: Record<string, string>): Promise<PaymentIntent>;
247
+ capturePayment(paymentId: string, amount?: number): Promise<boolean>;
248
+ verifyWebhookSignature(payload: string | Buffer, signature: string): boolean;
244
249
  }
245
- interface PaymentPluginConfig {
246
- provider?: string;
247
- [key: string]: string | undefined;
250
+ interface StripeConfig {
251
+ provider: 'stripe';
252
+ secretKey: string;
253
+ webhookSecret?: string;
248
254
  }
249
- /** Stub payment plugin - no implementation yet. Register and implement in app or extend core later. */
250
- declare function paymentPlugin(_config?: PaymentPluginConfig): CmsPlugin<PaymentServiceInterface | null>;
255
+ interface RazorpayConfig {
256
+ provider: 'razorpay';
257
+ keyId: string;
258
+ keySecret: string;
259
+ webhookSecret?: string;
260
+ }
261
+ type PaymentPluginConfig = StripeConfig | RazorpayConfig;
262
+ declare function paymentPlugin(config: PaymentPluginConfig): CmsPlugin<PaymentServiceInterface | undefined>;
251
263
 
252
264
  interface S3StoragePluginConfig {
253
265
  region: string;
@@ -472,11 +484,253 @@ declare class FormSubmission {
472
484
  contact: Contact | null;
473
485
  }
474
486
 
487
+ declare class Address {
488
+ id: number;
489
+ contactId: number;
490
+ tag: string | null;
491
+ line1: string | null;
492
+ line2: string | null;
493
+ city: string | null;
494
+ state: string | null;
495
+ postalCode: string | null;
496
+ country: string | null;
497
+ createdAt: Date;
498
+ updatedAt: Date;
499
+ contact: Contact;
500
+ }
501
+
502
+ declare class ProductCategory {
503
+ id: number;
504
+ name: string;
505
+ slug: string;
506
+ parentId: number | null;
507
+ image: string | null;
508
+ description: string | null;
509
+ metadata: Record<string, unknown> | null;
510
+ active: boolean;
511
+ sortOrder: number;
512
+ createdAt: Date;
513
+ updatedAt: Date;
514
+ deletedAt: Date | null;
515
+ deleted: boolean;
516
+ createdBy: number | null;
517
+ updatedBy: number | null;
518
+ deletedBy: number | null;
519
+ parent: ProductCategory | null;
520
+ children: ProductCategory[];
521
+ products: Product[];
522
+ collections: Collection[];
523
+ }
524
+
525
+ declare class Brand {
526
+ id: number;
527
+ name: string;
528
+ slug: string;
529
+ logo: string | null;
530
+ metadata: Record<string, unknown> | null;
531
+ description: string | null;
532
+ active: boolean;
533
+ sortOrder: number;
534
+ createdAt: Date;
535
+ updatedAt: Date;
536
+ deletedAt: Date | null;
537
+ deleted: boolean;
538
+ createdBy: number | null;
539
+ updatedBy: number | null;
540
+ deletedBy: number | null;
541
+ seoId: number | null;
542
+ seo: Seo | null;
543
+ products: Product[];
544
+ collections: Collection[];
545
+ }
546
+
547
+ declare class Collection {
548
+ id: number;
549
+ categoryId: number | null;
550
+ brandId: number | null;
551
+ name: string;
552
+ slug: string;
553
+ description: string | null;
554
+ image: string | null;
555
+ metadata: Record<string, unknown> | null;
556
+ active: boolean;
557
+ sortOrder: number;
558
+ createdAt: Date;
559
+ updatedAt: Date;
560
+ deletedAt: Date | null;
561
+ deleted: boolean;
562
+ createdBy: number | null;
563
+ updatedBy: number | null;
564
+ deletedBy: number | null;
565
+ seoId: number | null;
566
+ seo: Seo | null;
567
+ category: ProductCategory | null;
568
+ brand: Brand | null;
569
+ products: Product[];
570
+ }
571
+
572
+ declare class Attribute {
573
+ id: number;
574
+ name: string;
575
+ slug: string;
576
+ type: 'text' | 'number' | 'select' | 'boolean';
577
+ options: string[] | null;
578
+ metadata: Record<string, unknown> | null;
579
+ active: boolean;
580
+ sortOrder: number;
581
+ createdAt: Date;
582
+ updatedAt: Date;
583
+ deletedAt: Date | null;
584
+ deleted: boolean;
585
+ createdBy: number | null;
586
+ updatedBy: number | null;
587
+ deletedBy: number | null;
588
+ }
589
+
590
+ declare class ProductAttribute {
591
+ id: number;
592
+ productId: number;
593
+ attributeId: number;
594
+ value: string;
595
+ metadata: Record<string, unknown> | null;
596
+ createdAt: Date;
597
+ updatedAt: Date;
598
+ product: Product;
599
+ attribute: Attribute;
600
+ }
601
+
602
+ declare class Tax {
603
+ id: number;
604
+ name: string;
605
+ slug: string;
606
+ rate: number;
607
+ isDefault: boolean;
608
+ description: string | null;
609
+ active: boolean;
610
+ metadata: Record<string, unknown> | null;
611
+ createdAt: Date;
612
+ updatedAt: Date;
613
+ deletedAt: Date | null;
614
+ deleted: boolean;
615
+ createdBy: number | null;
616
+ updatedBy: number | null;
617
+ deletedBy: number | null;
618
+ }
619
+
620
+ declare class ProductTax {
621
+ id: number;
622
+ productId: number;
623
+ taxId: number;
624
+ rate: number | null;
625
+ createdAt: Date;
626
+ updatedAt: Date;
627
+ product: Product;
628
+ tax: Tax;
629
+ }
630
+
631
+ declare class Product {
632
+ id: number;
633
+ collectionId: number | null;
634
+ brandId: number | null;
635
+ categoryId: number | null;
636
+ sku: string | null;
637
+ slug: string | null;
638
+ name: string | null;
639
+ price: number;
640
+ compareAtPrice: number | null;
641
+ quantity: number;
642
+ status: 'draft' | 'available' | 'reserved' | 'sold';
643
+ featured: boolean;
644
+ metadata: Record<string, unknown> | null;
645
+ createdAt: Date;
646
+ updatedAt: Date;
647
+ deletedAt: Date | null;
648
+ deleted: boolean;
649
+ createdBy: number | null;
650
+ updatedBy: number | null;
651
+ deletedBy: number | null;
652
+ seoId: number | null;
653
+ seo: Seo | null;
654
+ collection: Collection | null;
655
+ brand: Brand | null;
656
+ category: ProductCategory | null;
657
+ attributes: ProductAttribute[];
658
+ taxes: ProductTax[];
659
+ }
660
+
661
+ declare class OrderItem {
662
+ id: number;
663
+ orderId: number;
664
+ productId: number;
665
+ quantity: number;
666
+ unitPrice: number;
667
+ tax: number;
668
+ total: number;
669
+ metadata: Record<string, unknown> | null;
670
+ createdAt: Date;
671
+ updatedAt: Date;
672
+ order: Order;
673
+ product: Product;
674
+ }
675
+
676
+ declare class Payment {
677
+ id: number;
678
+ orderId: number;
679
+ contactId: number | null;
680
+ amount: number;
681
+ currency: string;
682
+ status: 'pending' | 'processing' | 'completed' | 'failed' | 'refunded';
683
+ method: string | null;
684
+ externalReference: string | null;
685
+ metadata: Record<string, unknown> | null;
686
+ paidAt: Date | null;
687
+ createdAt: Date;
688
+ updatedAt: Date;
689
+ deletedAt: Date | null;
690
+ deleted: boolean;
691
+ createdBy: number | null;
692
+ updatedBy: number | null;
693
+ deletedBy: number | null;
694
+ order: Order;
695
+ contact: Contact | null;
696
+ }
697
+
698
+ declare class Order {
699
+ id: number;
700
+ orderNumber: string;
701
+ contactId: number;
702
+ billingAddressId: number | null;
703
+ shippingAddressId: number | null;
704
+ status: 'pending' | 'confirmed' | 'processing' | 'completed' | 'cancelled';
705
+ subtotal: number;
706
+ tax: number;
707
+ discount: number;
708
+ total: number;
709
+ currency: string;
710
+ metadata: Record<string, unknown> | null;
711
+ createdAt: Date;
712
+ updatedAt: Date;
713
+ deletedAt: Date | null;
714
+ deleted: boolean;
715
+ createdBy: number | null;
716
+ updatedBy: number | null;
717
+ deletedBy: number | null;
718
+ contact: Contact;
719
+ billingAddress: Address | null;
720
+ shippingAddress: Address | null;
721
+ items: OrderItem[];
722
+ payments: Payment[];
723
+ }
724
+
475
725
  declare class Contact {
476
726
  id: number;
477
727
  name: string;
478
728
  email: string;
479
729
  phone: string | null;
730
+ type: string | null;
731
+ company: string | null;
732
+ taxId: string | null;
733
+ notes: string | null;
480
734
  createdAt: Date;
481
735
  updatedAt: Date;
482
736
  deletedAt: Date | null;
@@ -485,6 +739,9 @@ declare class Contact {
485
739
  updatedBy: number | null;
486
740
  deletedBy: number | null;
487
741
  form_submissions: FormSubmission[];
742
+ addresses: Address[];
743
+ orders: Order[];
744
+ payments: Payment[];
488
745
  }
489
746
 
490
747
  declare class Config {
@@ -540,4 +797,4 @@ declare class Page {
540
797
  /** Map API resource segment (e.g. "blogs", "form_submissions") to entity. Used by CRUD handler. */
541
798
  declare const CMS_ENTITY_MAP: Record<string, EntityTarget<typeorm.ObjectLiteral>>;
542
799
 
543
- export { type AnalyticsPluginConfig, Blog, CMS_ENTITY_MAP, Category, type CmsApp, type CmsPlugin, Comment, Config, Contact, type CreateCmsAppOptions, type ERPPluginConfig, type ERPPluginInstance, type EmailData, type EmailPluginConfig, EmailService, type EmailServiceInterface, Form, FormField, FormSubmission, type LocalStoragePluginConfig, type Logger, Media, Page, PasswordResetToken, Permission, type PluginContext, type S3StoragePluginConfig, Seo, StorageService, Tag, User, UserGroup, analyticsPlugin, cn, createCmsApp, emailPlugin, emailTemplates, erpPlugin, formatDate, formatDateOnly, formatDateTime, generateSlug, localStoragePlugin, paymentPlugin, s3StoragePlugin, smsPlugin, truncateText, validateSlug };
800
+ export { type AnalyticsPluginConfig, Attribute, Blog, Brand, CMS_ENTITY_MAP, Category, type CmsApp, type CmsPlugin, Collection, Comment, Config, Contact, type CreateCmsAppOptions, type ERPPluginConfig, type ERPPluginInstance, type EmailData, type EmailPluginConfig, EmailService, type EmailServiceInterface, Form, FormField, FormSubmission, type LocalStoragePluginConfig, type Logger, Media, Order, OrderItem, Page, PasswordResetToken, Payment, type PaymentIntent, type PaymentPluginConfig, type PaymentServiceInterface, Permission, type PluginContext, Product, ProductAttribute, ProductCategory, ProductTax, type S3StoragePluginConfig, Seo, StorageService, Tag, Tax, User, UserGroup, analyticsPlugin, cn, createCmsApp, emailPlugin, emailTemplates, erpPlugin, formatDate, formatDateOnly, formatDateTime, generateSlug, localStoragePlugin, paymentPlugin, s3StoragePlugin, smsPlugin, truncateText, validateSlug };
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { S as StorageService } from './index-DP3LK1XN.js';
2
- export { A as AnalyticsHandlerConfig, a as AuthHandlersConfig, B as BlogBySlugConfig, C as ChangePasswordConfig, b as CmsApiHandlerConfig, c as CmsGetter, d as CrudHandlerOptions, D as DashboardStatsConfig, E as EntityMap, F as ForgotPasswordConfig, e as FormBySlugConfig, I as InviteAcceptConfig, f as SetPasswordConfig, g as SettingsApiConfig, U as UploadHandlerConfig, h as UserAuthApiConfig, i as UserAvatarConfig, j as UserProfileConfig, k as UsersApiConfig, l as createAnalyticsHandlers, m as createBlogBySlugHandler, n as createChangePasswordHandler, o as createCmsApiHandler, p as createCrudByIdHandler, q as createCrudHandler, r as createDashboardStatsHandler, s as createForgotPasswordHandler, t as createFormBySlugHandler, u as createInviteAcceptHandler, v as createSetPasswordHandler, w as createSettingsApiHandlers, x as createUploadHandler, y as createUserAuthApiRouter, z as createUserAvatarHandler, G as createUserProfileHandler, H as createUsersApiHandlers } from './index-DP3LK1XN.js';
1
+ import { S as StorageService } from './index-BPnATEXW.js';
2
+ export { A as AnalyticsHandlerConfig, a as AuthHandlersConfig, B as BlogBySlugConfig, C as ChangePasswordConfig, b as CmsApiHandlerConfig, c as CmsGetter, d as CrudHandlerOptions, D as DashboardStatsConfig, E as EntityMap, F as ForgotPasswordConfig, e as FormBySlugConfig, I as InviteAcceptConfig, f as SetPasswordConfig, g as SettingsApiConfig, U as UploadHandlerConfig, h as UserAuthApiConfig, i as UserAvatarConfig, j as UserProfileConfig, k as UsersApiConfig, l as createAnalyticsHandlers, m as createBlogBySlugHandler, n as createChangePasswordHandler, o as createCmsApiHandler, p as createCrudByIdHandler, q as createCrudHandler, r as createDashboardStatsHandler, s as createForgotPasswordHandler, t as createFormBySlugHandler, u as createInviteAcceptHandler, v as createSetPasswordHandler, w as createSettingsApiHandlers, x as createUploadHandler, y as createUserAuthApiRouter, z as createUserAvatarHandler, G as createUserProfileHandler, H as createUsersApiHandlers } from './index-BPnATEXW.js';
3
3
  import { ClassValue } from 'clsx';
4
4
  import * as typeorm from 'typeorm';
5
5
  import { EntityTarget } from 'typeorm';
@@ -235,19 +235,31 @@ interface SmsPluginConfig {
235
235
  /** Stub SMS plugin - no implementation yet. Register and implement in app or extend core later. */
236
236
  declare function smsPlugin(_config?: SmsPluginConfig): CmsPlugin<SmsServiceInterface | null>;
237
237
 
238
- /** Provider-agnostic payment interface. Implementations (Stripe, Razorpay, PayPal) can be added later. */
238
+ interface PaymentIntent {
239
+ id: string;
240
+ clientSecret: string;
241
+ amount: number;
242
+ currency: string;
243
+ status: string;
244
+ }
239
245
  interface PaymentServiceInterface {
240
- createPaymentIntent?(amount: number, currency: string, metadata?: Record<string, string>): Promise<{
241
- clientSecret: string;
242
- } | null>;
243
- capturePayment?(paymentId: string): Promise<boolean>;
246
+ createPaymentIntent(amount: number, currency: string, metadata?: Record<string, string>): Promise<PaymentIntent>;
247
+ capturePayment(paymentId: string, amount?: number): Promise<boolean>;
248
+ verifyWebhookSignature(payload: string | Buffer, signature: string): boolean;
244
249
  }
245
- interface PaymentPluginConfig {
246
- provider?: string;
247
- [key: string]: string | undefined;
250
+ interface StripeConfig {
251
+ provider: 'stripe';
252
+ secretKey: string;
253
+ webhookSecret?: string;
248
254
  }
249
- /** Stub payment plugin - no implementation yet. Register and implement in app or extend core later. */
250
- declare function paymentPlugin(_config?: PaymentPluginConfig): CmsPlugin<PaymentServiceInterface | null>;
255
+ interface RazorpayConfig {
256
+ provider: 'razorpay';
257
+ keyId: string;
258
+ keySecret: string;
259
+ webhookSecret?: string;
260
+ }
261
+ type PaymentPluginConfig = StripeConfig | RazorpayConfig;
262
+ declare function paymentPlugin(config: PaymentPluginConfig): CmsPlugin<PaymentServiceInterface | undefined>;
251
263
 
252
264
  interface S3StoragePluginConfig {
253
265
  region: string;
@@ -472,11 +484,253 @@ declare class FormSubmission {
472
484
  contact: Contact | null;
473
485
  }
474
486
 
487
+ declare class Address {
488
+ id: number;
489
+ contactId: number;
490
+ tag: string | null;
491
+ line1: string | null;
492
+ line2: string | null;
493
+ city: string | null;
494
+ state: string | null;
495
+ postalCode: string | null;
496
+ country: string | null;
497
+ createdAt: Date;
498
+ updatedAt: Date;
499
+ contact: Contact;
500
+ }
501
+
502
+ declare class ProductCategory {
503
+ id: number;
504
+ name: string;
505
+ slug: string;
506
+ parentId: number | null;
507
+ image: string | null;
508
+ description: string | null;
509
+ metadata: Record<string, unknown> | null;
510
+ active: boolean;
511
+ sortOrder: number;
512
+ createdAt: Date;
513
+ updatedAt: Date;
514
+ deletedAt: Date | null;
515
+ deleted: boolean;
516
+ createdBy: number | null;
517
+ updatedBy: number | null;
518
+ deletedBy: number | null;
519
+ parent: ProductCategory | null;
520
+ children: ProductCategory[];
521
+ products: Product[];
522
+ collections: Collection[];
523
+ }
524
+
525
+ declare class Brand {
526
+ id: number;
527
+ name: string;
528
+ slug: string;
529
+ logo: string | null;
530
+ metadata: Record<string, unknown> | null;
531
+ description: string | null;
532
+ active: boolean;
533
+ sortOrder: number;
534
+ createdAt: Date;
535
+ updatedAt: Date;
536
+ deletedAt: Date | null;
537
+ deleted: boolean;
538
+ createdBy: number | null;
539
+ updatedBy: number | null;
540
+ deletedBy: number | null;
541
+ seoId: number | null;
542
+ seo: Seo | null;
543
+ products: Product[];
544
+ collections: Collection[];
545
+ }
546
+
547
+ declare class Collection {
548
+ id: number;
549
+ categoryId: number | null;
550
+ brandId: number | null;
551
+ name: string;
552
+ slug: string;
553
+ description: string | null;
554
+ image: string | null;
555
+ metadata: Record<string, unknown> | null;
556
+ active: boolean;
557
+ sortOrder: number;
558
+ createdAt: Date;
559
+ updatedAt: Date;
560
+ deletedAt: Date | null;
561
+ deleted: boolean;
562
+ createdBy: number | null;
563
+ updatedBy: number | null;
564
+ deletedBy: number | null;
565
+ seoId: number | null;
566
+ seo: Seo | null;
567
+ category: ProductCategory | null;
568
+ brand: Brand | null;
569
+ products: Product[];
570
+ }
571
+
572
+ declare class Attribute {
573
+ id: number;
574
+ name: string;
575
+ slug: string;
576
+ type: 'text' | 'number' | 'select' | 'boolean';
577
+ options: string[] | null;
578
+ metadata: Record<string, unknown> | null;
579
+ active: boolean;
580
+ sortOrder: number;
581
+ createdAt: Date;
582
+ updatedAt: Date;
583
+ deletedAt: Date | null;
584
+ deleted: boolean;
585
+ createdBy: number | null;
586
+ updatedBy: number | null;
587
+ deletedBy: number | null;
588
+ }
589
+
590
+ declare class ProductAttribute {
591
+ id: number;
592
+ productId: number;
593
+ attributeId: number;
594
+ value: string;
595
+ metadata: Record<string, unknown> | null;
596
+ createdAt: Date;
597
+ updatedAt: Date;
598
+ product: Product;
599
+ attribute: Attribute;
600
+ }
601
+
602
+ declare class Tax {
603
+ id: number;
604
+ name: string;
605
+ slug: string;
606
+ rate: number;
607
+ isDefault: boolean;
608
+ description: string | null;
609
+ active: boolean;
610
+ metadata: Record<string, unknown> | null;
611
+ createdAt: Date;
612
+ updatedAt: Date;
613
+ deletedAt: Date | null;
614
+ deleted: boolean;
615
+ createdBy: number | null;
616
+ updatedBy: number | null;
617
+ deletedBy: number | null;
618
+ }
619
+
620
+ declare class ProductTax {
621
+ id: number;
622
+ productId: number;
623
+ taxId: number;
624
+ rate: number | null;
625
+ createdAt: Date;
626
+ updatedAt: Date;
627
+ product: Product;
628
+ tax: Tax;
629
+ }
630
+
631
+ declare class Product {
632
+ id: number;
633
+ collectionId: number | null;
634
+ brandId: number | null;
635
+ categoryId: number | null;
636
+ sku: string | null;
637
+ slug: string | null;
638
+ name: string | null;
639
+ price: number;
640
+ compareAtPrice: number | null;
641
+ quantity: number;
642
+ status: 'draft' | 'available' | 'reserved' | 'sold';
643
+ featured: boolean;
644
+ metadata: Record<string, unknown> | null;
645
+ createdAt: Date;
646
+ updatedAt: Date;
647
+ deletedAt: Date | null;
648
+ deleted: boolean;
649
+ createdBy: number | null;
650
+ updatedBy: number | null;
651
+ deletedBy: number | null;
652
+ seoId: number | null;
653
+ seo: Seo | null;
654
+ collection: Collection | null;
655
+ brand: Brand | null;
656
+ category: ProductCategory | null;
657
+ attributes: ProductAttribute[];
658
+ taxes: ProductTax[];
659
+ }
660
+
661
+ declare class OrderItem {
662
+ id: number;
663
+ orderId: number;
664
+ productId: number;
665
+ quantity: number;
666
+ unitPrice: number;
667
+ tax: number;
668
+ total: number;
669
+ metadata: Record<string, unknown> | null;
670
+ createdAt: Date;
671
+ updatedAt: Date;
672
+ order: Order;
673
+ product: Product;
674
+ }
675
+
676
+ declare class Payment {
677
+ id: number;
678
+ orderId: number;
679
+ contactId: number | null;
680
+ amount: number;
681
+ currency: string;
682
+ status: 'pending' | 'processing' | 'completed' | 'failed' | 'refunded';
683
+ method: string | null;
684
+ externalReference: string | null;
685
+ metadata: Record<string, unknown> | null;
686
+ paidAt: Date | null;
687
+ createdAt: Date;
688
+ updatedAt: Date;
689
+ deletedAt: Date | null;
690
+ deleted: boolean;
691
+ createdBy: number | null;
692
+ updatedBy: number | null;
693
+ deletedBy: number | null;
694
+ order: Order;
695
+ contact: Contact | null;
696
+ }
697
+
698
+ declare class Order {
699
+ id: number;
700
+ orderNumber: string;
701
+ contactId: number;
702
+ billingAddressId: number | null;
703
+ shippingAddressId: number | null;
704
+ status: 'pending' | 'confirmed' | 'processing' | 'completed' | 'cancelled';
705
+ subtotal: number;
706
+ tax: number;
707
+ discount: number;
708
+ total: number;
709
+ currency: string;
710
+ metadata: Record<string, unknown> | null;
711
+ createdAt: Date;
712
+ updatedAt: Date;
713
+ deletedAt: Date | null;
714
+ deleted: boolean;
715
+ createdBy: number | null;
716
+ updatedBy: number | null;
717
+ deletedBy: number | null;
718
+ contact: Contact;
719
+ billingAddress: Address | null;
720
+ shippingAddress: Address | null;
721
+ items: OrderItem[];
722
+ payments: Payment[];
723
+ }
724
+
475
725
  declare class Contact {
476
726
  id: number;
477
727
  name: string;
478
728
  email: string;
479
729
  phone: string | null;
730
+ type: string | null;
731
+ company: string | null;
732
+ taxId: string | null;
733
+ notes: string | null;
480
734
  createdAt: Date;
481
735
  updatedAt: Date;
482
736
  deletedAt: Date | null;
@@ -485,6 +739,9 @@ declare class Contact {
485
739
  updatedBy: number | null;
486
740
  deletedBy: number | null;
487
741
  form_submissions: FormSubmission[];
742
+ addresses: Address[];
743
+ orders: Order[];
744
+ payments: Payment[];
488
745
  }
489
746
 
490
747
  declare class Config {
@@ -540,4 +797,4 @@ declare class Page {
540
797
  /** Map API resource segment (e.g. "blogs", "form_submissions") to entity. Used by CRUD handler. */
541
798
  declare const CMS_ENTITY_MAP: Record<string, EntityTarget<typeorm.ObjectLiteral>>;
542
799
 
543
- export { type AnalyticsPluginConfig, Blog, CMS_ENTITY_MAP, Category, type CmsApp, type CmsPlugin, Comment, Config, Contact, type CreateCmsAppOptions, type ERPPluginConfig, type ERPPluginInstance, type EmailData, type EmailPluginConfig, EmailService, type EmailServiceInterface, Form, FormField, FormSubmission, type LocalStoragePluginConfig, type Logger, Media, Page, PasswordResetToken, Permission, type PluginContext, type S3StoragePluginConfig, Seo, StorageService, Tag, User, UserGroup, analyticsPlugin, cn, createCmsApp, emailPlugin, emailTemplates, erpPlugin, formatDate, formatDateOnly, formatDateTime, generateSlug, localStoragePlugin, paymentPlugin, s3StoragePlugin, smsPlugin, truncateText, validateSlug };
800
+ export { type AnalyticsPluginConfig, Attribute, Blog, Brand, CMS_ENTITY_MAP, Category, type CmsApp, type CmsPlugin, Collection, Comment, Config, Contact, type CreateCmsAppOptions, type ERPPluginConfig, type ERPPluginInstance, type EmailData, type EmailPluginConfig, EmailService, type EmailServiceInterface, Form, FormField, FormSubmission, type LocalStoragePluginConfig, type Logger, Media, Order, OrderItem, Page, PasswordResetToken, Payment, type PaymentIntent, type PaymentPluginConfig, type PaymentServiceInterface, Permission, type PluginContext, Product, ProductAttribute, ProductCategory, ProductTax, type S3StoragePluginConfig, Seo, StorageService, Tag, Tax, User, UserGroup, analyticsPlugin, cn, createCmsApp, emailPlugin, emailTemplates, erpPlugin, formatDate, formatDateOnly, formatDateTime, generateSlug, localStoragePlugin, paymentPlugin, s3StoragePlugin, smsPlugin, truncateText, validateSlug };