@retaila/shared-types 1.1.6 → 1.1.8
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.mts +211 -164
- package/dist/index.d.ts +211 -164
- package/dist/index.js +60 -40
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +57 -39
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -187,6 +187,7 @@ interface AccountIntegration {
|
|
|
187
187
|
updatedAt: Date;
|
|
188
188
|
deletedAt?: Date | null;
|
|
189
189
|
integration: Integration;
|
|
190
|
+
settings: Record<string, any>;
|
|
190
191
|
}
|
|
191
192
|
|
|
192
193
|
/**
|
|
@@ -319,6 +320,42 @@ declare enum AccountDomainStatus {
|
|
|
319
320
|
INACTIVE = "INACTIVE"
|
|
320
321
|
}
|
|
321
322
|
|
|
323
|
+
/**
|
|
324
|
+
* Entidad Customer
|
|
325
|
+
* Cliente de la tienda
|
|
326
|
+
*/
|
|
327
|
+
|
|
328
|
+
interface Customer {
|
|
329
|
+
id: string;
|
|
330
|
+
accountId: string;
|
|
331
|
+
firstName?: string;
|
|
332
|
+
lastName?: string;
|
|
333
|
+
email: string;
|
|
334
|
+
phone?: Phone;
|
|
335
|
+
status: CustomerStatus;
|
|
336
|
+
createdAt: Date;
|
|
337
|
+
updatedAt: Date;
|
|
338
|
+
deletedAt?: Date | null;
|
|
339
|
+
}
|
|
340
|
+
declare enum CustomerStatus {
|
|
341
|
+
ACTIVE = "ACTIVE",
|
|
342
|
+
INACTIVE = "INACTIVE",
|
|
343
|
+
BLACKLISTED = "BLACKLISTED",// e.g., for fraudulent activity
|
|
344
|
+
PENDING = "PENDING"
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
/**
|
|
348
|
+
* Register or update a customer
|
|
349
|
+
*/
|
|
350
|
+
interface CustomerUpsertDto {
|
|
351
|
+
id?: string;
|
|
352
|
+
accountId: string;
|
|
353
|
+
firstName?: string;
|
|
354
|
+
lastName?: string;
|
|
355
|
+
email: string;
|
|
356
|
+
phone?: Phone;
|
|
357
|
+
}
|
|
358
|
+
|
|
322
359
|
/**
|
|
323
360
|
* Entidad Order
|
|
324
361
|
* Define la orden de compra de un cliente en el sitio web.
|
|
@@ -353,6 +390,7 @@ interface Order {
|
|
|
353
390
|
customerNote?: string;
|
|
354
391
|
internalNote?: string;
|
|
355
392
|
source: OrderSource;
|
|
393
|
+
sourceAccountDomainId?: string;
|
|
356
394
|
demo: boolean;
|
|
357
395
|
createdAt: Date;
|
|
358
396
|
updatedAt: Date;
|
|
@@ -360,6 +398,9 @@ interface Order {
|
|
|
360
398
|
cancelReason?: string;
|
|
361
399
|
deletedAt?: Date;
|
|
362
400
|
items?: OrderItem[];
|
|
401
|
+
customer?: Customer | null;
|
|
402
|
+
paymentMethodIntegration?: AccountIntegration | null;
|
|
403
|
+
accountDomain?: AccountDomain;
|
|
363
404
|
}
|
|
364
405
|
interface OrderItem {
|
|
365
406
|
id: string;
|
|
@@ -432,7 +473,170 @@ interface AdminOrderStatusChangeDto {
|
|
|
432
473
|
status: OrderStatus;
|
|
433
474
|
}
|
|
434
475
|
|
|
435
|
-
|
|
476
|
+
/**
|
|
477
|
+
* Add an item to the cart
|
|
478
|
+
*/
|
|
479
|
+
interface CartItemAddDto {
|
|
480
|
+
cartId: string;
|
|
481
|
+
productId: string;
|
|
482
|
+
variantId?: string;
|
|
483
|
+
quantity: number;
|
|
484
|
+
attributes?: {
|
|
485
|
+
[key: string]: string | number;
|
|
486
|
+
};
|
|
487
|
+
userEmail?: string;
|
|
488
|
+
userId?: string;
|
|
489
|
+
}
|
|
490
|
+
/**
|
|
491
|
+
* Update an item in the cart
|
|
492
|
+
*/
|
|
493
|
+
interface CartItemUpdateDto {
|
|
494
|
+
cartId: string;
|
|
495
|
+
itemId: string;
|
|
496
|
+
quantity: number;
|
|
497
|
+
}
|
|
498
|
+
/**
|
|
499
|
+
* Remove an item from the cart
|
|
500
|
+
*/
|
|
501
|
+
interface CartItemRemoveDto {
|
|
502
|
+
cartId: string;
|
|
503
|
+
itemId: string;
|
|
504
|
+
}
|
|
505
|
+
interface CartUpdateDto {
|
|
506
|
+
cartId: string;
|
|
507
|
+
source: OrderSource;
|
|
508
|
+
sourceUrl?: string;
|
|
509
|
+
customer: {
|
|
510
|
+
email: string;
|
|
511
|
+
};
|
|
512
|
+
delivery: {
|
|
513
|
+
type: 'shipping' | 'pickup';
|
|
514
|
+
deliveryOptionId?: string;
|
|
515
|
+
pickupBranchId?: string;
|
|
516
|
+
firstname: string;
|
|
517
|
+
lastname: string;
|
|
518
|
+
phone: {
|
|
519
|
+
countryCode: string;
|
|
520
|
+
national: string;
|
|
521
|
+
international: string;
|
|
522
|
+
type: string;
|
|
523
|
+
validated: boolean;
|
|
524
|
+
};
|
|
525
|
+
address: {
|
|
526
|
+
country: string;
|
|
527
|
+
department: string;
|
|
528
|
+
locality: string;
|
|
529
|
+
street: string;
|
|
530
|
+
complement?: string;
|
|
531
|
+
notes?: string;
|
|
532
|
+
postalCode: string;
|
|
533
|
+
mapPosition: {
|
|
534
|
+
lat: number;
|
|
535
|
+
lng: number;
|
|
536
|
+
};
|
|
537
|
+
};
|
|
538
|
+
};
|
|
539
|
+
billing: {
|
|
540
|
+
name: string;
|
|
541
|
+
address: string;
|
|
542
|
+
city: string;
|
|
543
|
+
department: string;
|
|
544
|
+
};
|
|
545
|
+
}
|
|
546
|
+
/**
|
|
547
|
+
* Confirm a cart
|
|
548
|
+
*/
|
|
549
|
+
interface CartConfirmDto {
|
|
550
|
+
cartId: string;
|
|
551
|
+
}
|
|
552
|
+
/**
|
|
553
|
+
* Validation information for a cart item
|
|
554
|
+
*/
|
|
555
|
+
interface CartItemValidation {
|
|
556
|
+
hasIssues: boolean;
|
|
557
|
+
issues: string[];
|
|
558
|
+
errorCode?: CartItemErrorCode;
|
|
559
|
+
currentPrice?: number;
|
|
560
|
+
availableStock?: number;
|
|
561
|
+
isProductActive?: boolean;
|
|
562
|
+
}
|
|
563
|
+
/**
|
|
564
|
+
* Error codes for cart items
|
|
565
|
+
*/
|
|
566
|
+
declare enum CartItemErrorCode {
|
|
567
|
+
PRICE_INCREASED = "PRICE_INCREASED",// Precio aumentó
|
|
568
|
+
PRICE_DECREASED = "PRICE_DECREASED",// Precio disminuyó
|
|
569
|
+
PRODUCT_INACTIVE = "PRODUCT_INACTIVE",// Producto ya no está disponible
|
|
570
|
+
STOCK_INSUFFICIENT = "STOCK_INSUFFICIENT",// Stock insuficiente (hay algo disponible)
|
|
571
|
+
STOCK_UNAVAILABLE = "STOCK_UNAVAILABLE",// Sin stock (0 disponible)
|
|
572
|
+
VALIDATION_ERROR = "VALIDATION_ERROR"
|
|
573
|
+
}
|
|
574
|
+
|
|
575
|
+
/**
|
|
576
|
+
* Entidad Cart
|
|
577
|
+
* Define el carrito de compras de un cliente en el sitio web.
|
|
578
|
+
*/
|
|
579
|
+
interface Cart {
|
|
580
|
+
id: string;
|
|
581
|
+
code: string;
|
|
582
|
+
customerId?: string;
|
|
583
|
+
sessionId?: string;
|
|
584
|
+
items: CartItem[];
|
|
585
|
+
subtotal: number;
|
|
586
|
+
total: number;
|
|
587
|
+
currency: string;
|
|
588
|
+
itemCount: number;
|
|
589
|
+
createdAt: Date;
|
|
590
|
+
updatedAt: Date;
|
|
591
|
+
status: CartStatus;
|
|
592
|
+
source: CartSource;
|
|
593
|
+
sourceAccountDomainId?: string;
|
|
594
|
+
recoveryToken?: string;
|
|
595
|
+
customerNote?: string;
|
|
596
|
+
hasIssues: boolean;
|
|
597
|
+
issuesCount: number;
|
|
598
|
+
subtotalPrice?: number;
|
|
599
|
+
totalDiscounts?: number;
|
|
600
|
+
totalShippingPrice?: number;
|
|
601
|
+
totalTax?: number;
|
|
602
|
+
totalPrice?: number;
|
|
603
|
+
taxDetails?: any;
|
|
604
|
+
customer?: Customer | null;
|
|
605
|
+
accountDomain?: AccountDomain;
|
|
606
|
+
}
|
|
607
|
+
interface CartItem {
|
|
608
|
+
id: string;
|
|
609
|
+
productId: string;
|
|
610
|
+
productVariantId: string;
|
|
611
|
+
name: string;
|
|
612
|
+
unitPrice: number;
|
|
613
|
+
quantity: number;
|
|
614
|
+
image?: string;
|
|
615
|
+
thumbnailUrl?: string;
|
|
616
|
+
sku?: string;
|
|
617
|
+
attributeDetails: CartItemAttributeDetail[];
|
|
618
|
+
validation?: CartItemValidation;
|
|
619
|
+
}
|
|
620
|
+
interface CartItemAttributeDetail {
|
|
621
|
+
name: string;
|
|
622
|
+
value: string;
|
|
623
|
+
type?: string;
|
|
624
|
+
}
|
|
625
|
+
declare enum CartStatus {
|
|
626
|
+
ACTIVE = "ACTIVE",
|
|
627
|
+
LOCKED = "LOCKED",
|
|
628
|
+
EXPIRED = "EXPIRED",
|
|
629
|
+
CONVERTED = "CONVERTED",
|
|
630
|
+
ABANDONED = "ABANDONED",
|
|
631
|
+
MERGED = "MERGED"
|
|
632
|
+
}
|
|
633
|
+
declare enum CartSource {
|
|
634
|
+
WEB = "WEB",
|
|
635
|
+
POS = "POS",
|
|
636
|
+
API = "API"
|
|
637
|
+
}
|
|
638
|
+
|
|
639
|
+
declare enum PaymentStatus {
|
|
436
640
|
PENDING = "PENDING",// Pendiente
|
|
437
641
|
PREAUTHORIZED = "PREAUTHORIZED",
|
|
438
642
|
APPROVED = "APPROVED",// Pago aprobado online
|
|
@@ -467,12 +671,10 @@ interface Payment {
|
|
|
467
671
|
amountRefunded: number;
|
|
468
672
|
paidAt?: string | Date;
|
|
469
673
|
refundedAt?: string | Date;
|
|
470
|
-
status:
|
|
674
|
+
status: PaymentStatus;
|
|
471
675
|
cardBrand?: string;
|
|
472
676
|
cardLast4?: string;
|
|
473
|
-
|
|
474
|
-
gatewayMetadata?: Record<string, any>;
|
|
475
|
-
paymentRedirectUrl?: string;
|
|
677
|
+
metadata?: Record<string, any>;
|
|
476
678
|
demo: boolean;
|
|
477
679
|
createdAt: string | Date;
|
|
478
680
|
updatedAt: string | Date;
|
|
@@ -720,164 +922,9 @@ declare enum StorePageType {
|
|
|
720
922
|
OTHER = "OTHER"
|
|
721
923
|
}
|
|
722
924
|
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
interface CartItemAddDto {
|
|
727
|
-
cartId: string;
|
|
728
|
-
productId: string;
|
|
729
|
-
variantId?: string;
|
|
730
|
-
quantity: number;
|
|
731
|
-
attributes?: {
|
|
732
|
-
[key: string]: string | number;
|
|
733
|
-
};
|
|
734
|
-
userEmail?: string;
|
|
735
|
-
userId?: string;
|
|
736
|
-
}
|
|
737
|
-
/**
|
|
738
|
-
* Update an item in the cart
|
|
739
|
-
*/
|
|
740
|
-
interface CartItemUpdateDto {
|
|
741
|
-
cartId: string;
|
|
742
|
-
itemId: string;
|
|
743
|
-
quantity: number;
|
|
744
|
-
}
|
|
745
|
-
/**
|
|
746
|
-
* Remove an item from the cart
|
|
747
|
-
*/
|
|
748
|
-
interface CartItemRemoveDto {
|
|
749
|
-
cartId: string;
|
|
750
|
-
itemId: string;
|
|
751
|
-
}
|
|
752
|
-
interface CartUpdateDto {
|
|
753
|
-
cartId: string;
|
|
754
|
-
customer: {
|
|
755
|
-
email: string;
|
|
756
|
-
};
|
|
757
|
-
delivery: {
|
|
758
|
-
type: 'shipping' | 'pickup';
|
|
759
|
-
deliveryOptionId?: string;
|
|
760
|
-
pickupBranchId?: string;
|
|
761
|
-
firstname: string;
|
|
762
|
-
lastname: string;
|
|
763
|
-
phone: {
|
|
764
|
-
countryCode: string;
|
|
765
|
-
national: string;
|
|
766
|
-
international: string;
|
|
767
|
-
type: string;
|
|
768
|
-
validated: boolean;
|
|
769
|
-
};
|
|
770
|
-
address: {
|
|
771
|
-
country: string;
|
|
772
|
-
department: string;
|
|
773
|
-
locality: string;
|
|
774
|
-
street: string;
|
|
775
|
-
complement?: string;
|
|
776
|
-
notes?: string;
|
|
777
|
-
postalCode: string;
|
|
778
|
-
mapPosition: {
|
|
779
|
-
lat: number;
|
|
780
|
-
lng: number;
|
|
781
|
-
};
|
|
782
|
-
};
|
|
783
|
-
};
|
|
784
|
-
billing: {
|
|
785
|
-
name: string;
|
|
786
|
-
address: string;
|
|
787
|
-
city: string;
|
|
788
|
-
department: string;
|
|
789
|
-
};
|
|
790
|
-
}
|
|
791
|
-
/**
|
|
792
|
-
* Confirm a cart
|
|
793
|
-
*/
|
|
794
|
-
interface CartConfirmDto {
|
|
795
|
-
cartId: string;
|
|
796
|
-
}
|
|
797
|
-
/**
|
|
798
|
-
* Validation information for a cart item
|
|
799
|
-
*/
|
|
800
|
-
interface CartItemValidation {
|
|
801
|
-
hasIssues: boolean;
|
|
802
|
-
issues: string[];
|
|
803
|
-
errorCode?: CartItemErrorCode;
|
|
804
|
-
currentPrice?: number;
|
|
805
|
-
availableStock?: number;
|
|
806
|
-
isProductActive?: boolean;
|
|
807
|
-
}
|
|
808
|
-
/**
|
|
809
|
-
* Error codes for cart items
|
|
810
|
-
*/
|
|
811
|
-
declare enum CartItemErrorCode {
|
|
812
|
-
PRICE_INCREASED = "PRICE_INCREASED",// Precio aumentó
|
|
813
|
-
PRICE_DECREASED = "PRICE_DECREASED",// Precio disminuyó
|
|
814
|
-
PRODUCT_INACTIVE = "PRODUCT_INACTIVE",// Producto ya no está disponible
|
|
815
|
-
STOCK_INSUFFICIENT = "STOCK_INSUFFICIENT",// Stock insuficiente (hay algo disponible)
|
|
816
|
-
STOCK_UNAVAILABLE = "STOCK_UNAVAILABLE",// Sin stock (0 disponible)
|
|
817
|
-
VALIDATION_ERROR = "VALIDATION_ERROR"
|
|
818
|
-
}
|
|
819
|
-
|
|
820
|
-
/**
|
|
821
|
-
* Entidad Cart
|
|
822
|
-
* Define el carrito de compras de un cliente en el sitio web.
|
|
823
|
-
*/
|
|
824
|
-
interface Cart {
|
|
825
|
-
id: string;
|
|
826
|
-
code: string;
|
|
827
|
-
customerId?: string;
|
|
828
|
-
sessionId?: string;
|
|
829
|
-
items: CartItem[];
|
|
830
|
-
subtotal: number;
|
|
831
|
-
total: number;
|
|
832
|
-
currency: string;
|
|
833
|
-
itemCount: number;
|
|
834
|
-
createdAt: Date;
|
|
835
|
-
updatedAt: Date;
|
|
836
|
-
status: CartStatus;
|
|
837
|
-
source: CartSource;
|
|
838
|
-
recoveryToken?: string;
|
|
839
|
-
userEmail?: string;
|
|
840
|
-
userId?: string;
|
|
841
|
-
customerNote?: string;
|
|
842
|
-
hasIssues: boolean;
|
|
843
|
-
issuesCount: number;
|
|
844
|
-
subtotalPrice?: number;
|
|
845
|
-
totalDiscounts?: number;
|
|
846
|
-
totalShippingPrice?: number;
|
|
847
|
-
totalTax?: number;
|
|
848
|
-
totalPrice?: number;
|
|
849
|
-
taxDetails?: any;
|
|
850
|
-
}
|
|
851
|
-
interface CartItem {
|
|
852
|
-
id: string;
|
|
853
|
-
productId: string;
|
|
854
|
-
productVariantId: string;
|
|
855
|
-
name: string;
|
|
856
|
-
unitPrice: number;
|
|
857
|
-
quantity: number;
|
|
858
|
-
image?: string;
|
|
859
|
-
thumbnailUrl?: string;
|
|
860
|
-
sku?: string;
|
|
861
|
-
attributeDetails: CartItemAttributeDetail[];
|
|
862
|
-
validation?: CartItemValidation;
|
|
863
|
-
}
|
|
864
|
-
interface CartItemAttributeDetail {
|
|
865
|
-
name: string;
|
|
866
|
-
value: string;
|
|
867
|
-
type?: string;
|
|
868
|
-
}
|
|
869
|
-
declare enum CartStatus {
|
|
870
|
-
ACTIVE = "ACTIVE",
|
|
871
|
-
LOCKED = "LOCKED",
|
|
872
|
-
EXPIRED = "EXPIRED",
|
|
873
|
-
CONVERTED = "CONVERTED",
|
|
874
|
-
ABANDONED = "ABANDONED",
|
|
875
|
-
MERGED = "MERGED"
|
|
876
|
-
}
|
|
877
|
-
declare enum CartSource {
|
|
878
|
-
WEB = "WEB",
|
|
879
|
-
POS = "POS",
|
|
880
|
-
API = "API"
|
|
925
|
+
declare enum PubSubTopics {
|
|
926
|
+
ORDER_PLACED = "order-placed",
|
|
927
|
+
NOTIFICATION_CREATED = "notification-created"
|
|
881
928
|
}
|
|
882
929
|
|
|
883
|
-
export { type Account, type AccountBranch, type AccountBranchSchedule, AccountBranchScheduleDay, AccountBranchScheduleStatus, AccountBranchStatus, type AccountDeliveryOption, type AccountDeliveryOptionCalculatedCost, AccountDeliveryOptionPriceLogic, AccountDeliveryOptionStatus, type AccountDeliveryOptionZone, AccountDeliveryOptionZoneStatus, type AccountDomain, AccountDomainStatus, type AccountIntegration, type AccountIntegrationConfigDTO, AccountIntegrationConnectionStatus, AccountIntegrationEnvironment, AccountIntegrationStatus, AccountStatus, type Address, type AdminOrderStatusChangeDto, type BaseEntity, type BaseEntityWithAccount, type BaseEntityWithAccountAndUser, type BaseEntityWithUser, type Cart, type CartConfirmDto, type CartItem, type CartItemAddDto, type CartItemAttributeDetail, CartItemErrorCode, type CartItemRemoveDto, type CartItemUpdateDto, type CartItemValidation, CartSource, CartStatus, type CartUpdateDto, Currency, type Integration, IntegrationCategory, IntegrationStatus, type MapPosition, type Media, MediaType, type Order, type OrderCreateFromCartDto, OrderDeliveryType, OrderFulfillmentStatus, type OrderItem, OrderPaymentStatus, OrderSource, OrderStatus, type Payment, PaymentMethodType, type Phone, type Product, type ProductAttribute, type ProductAttributeOption, ProductAttributeStatus, ProductAttributeType, type ProductCategory, ProductCategoryStatus, ProductStatus, ProductType, type ProductVariant, type StandardCategory, StandardCategoryStatus, type StatusChangeHistory, type StoreBanner, StoreBannerStatus, type StorePage, StorePageStatus, StorePageType, type ThemeConfig,
|
|
930
|
+
export { type Account, type AccountBranch, type AccountBranchSchedule, AccountBranchScheduleDay, AccountBranchScheduleStatus, AccountBranchStatus, type AccountDeliveryOption, type AccountDeliveryOptionCalculatedCost, AccountDeliveryOptionPriceLogic, AccountDeliveryOptionStatus, type AccountDeliveryOptionZone, AccountDeliveryOptionZoneStatus, type AccountDomain, AccountDomainStatus, type AccountIntegration, type AccountIntegrationConfigDTO, AccountIntegrationConnectionStatus, AccountIntegrationEnvironment, AccountIntegrationStatus, AccountStatus, type Address, type AdminOrderStatusChangeDto, type BaseEntity, type BaseEntityWithAccount, type BaseEntityWithAccountAndUser, type BaseEntityWithUser, type Cart, type CartConfirmDto, type CartItem, type CartItemAddDto, type CartItemAttributeDetail, CartItemErrorCode, type CartItemRemoveDto, type CartItemUpdateDto, type CartItemValidation, CartSource, CartStatus, type CartUpdateDto, Currency, type Customer, CustomerStatus, type CustomerUpsertDto, type Integration, IntegrationCategory, IntegrationStatus, type MapPosition, type Media, MediaType, type Order, type OrderCreateFromCartDto, OrderDeliveryType, OrderFulfillmentStatus, type OrderItem, OrderPaymentStatus, OrderSource, OrderStatus, type Payment, PaymentMethodType, PaymentStatus, type Phone, type Product, type ProductAttribute, type ProductAttributeOption, ProductAttributeStatus, ProductAttributeType, type ProductCategory, ProductCategoryStatus, ProductStatus, ProductType, type ProductVariant, PubSubTopics, type StandardCategory, StandardCategoryStatus, type StatusChangeHistory, type StoreBanner, StoreBannerStatus, type StorePage, StorePageStatus, StorePageType, type ThemeConfig, getCurrencySymbol };
|
package/dist/index.js
CHANGED
|
@@ -36,6 +36,7 @@ __export(index_exports, {
|
|
|
36
36
|
CartSource: () => CartSource,
|
|
37
37
|
CartStatus: () => CartStatus,
|
|
38
38
|
Currency: () => Currency,
|
|
39
|
+
CustomerStatus: () => CustomerStatus,
|
|
39
40
|
IntegrationCategory: () => IntegrationCategory,
|
|
40
41
|
IntegrationStatus: () => IntegrationStatus,
|
|
41
42
|
MediaType: () => MediaType,
|
|
@@ -45,16 +46,17 @@ __export(index_exports, {
|
|
|
45
46
|
OrderSource: () => OrderSource,
|
|
46
47
|
OrderStatus: () => OrderStatus,
|
|
47
48
|
PaymentMethodType: () => PaymentMethodType,
|
|
49
|
+
PaymentStatus: () => PaymentStatus,
|
|
48
50
|
ProductAttributeStatus: () => ProductAttributeStatus,
|
|
49
51
|
ProductAttributeType: () => ProductAttributeType,
|
|
50
52
|
ProductCategoryStatus: () => ProductCategoryStatus,
|
|
51
53
|
ProductStatus: () => ProductStatus,
|
|
52
54
|
ProductType: () => ProductType,
|
|
55
|
+
PubSubTopics: () => PubSubTopics,
|
|
53
56
|
StandardCategoryStatus: () => StandardCategoryStatus,
|
|
54
57
|
StoreBannerStatus: () => StoreBannerStatus,
|
|
55
58
|
StorePageStatus: () => StorePageStatus,
|
|
56
59
|
StorePageType: () => StorePageType,
|
|
57
|
-
TransactionStatus: () => TransactionStatus,
|
|
58
60
|
getCurrencySymbol: () => getCurrencySymbol
|
|
59
61
|
});
|
|
60
62
|
module.exports = __toCommonJS(index_exports);
|
|
@@ -167,6 +169,43 @@ var AccountIntegrationEnvironment = /* @__PURE__ */ ((AccountIntegrationEnvironm
|
|
|
167
169
|
return AccountIntegrationEnvironment2;
|
|
168
170
|
})(AccountIntegrationEnvironment || {});
|
|
169
171
|
|
|
172
|
+
// src/cart/types.ts
|
|
173
|
+
var CartStatus = /* @__PURE__ */ ((CartStatus2) => {
|
|
174
|
+
CartStatus2["ACTIVE"] = "ACTIVE";
|
|
175
|
+
CartStatus2["LOCKED"] = "LOCKED";
|
|
176
|
+
CartStatus2["EXPIRED"] = "EXPIRED";
|
|
177
|
+
CartStatus2["CONVERTED"] = "CONVERTED";
|
|
178
|
+
CartStatus2["ABANDONED"] = "ABANDONED";
|
|
179
|
+
CartStatus2["MERGED"] = "MERGED";
|
|
180
|
+
return CartStatus2;
|
|
181
|
+
})(CartStatus || {});
|
|
182
|
+
var CartSource = /* @__PURE__ */ ((CartSource2) => {
|
|
183
|
+
CartSource2["WEB"] = "WEB";
|
|
184
|
+
CartSource2["POS"] = "POS";
|
|
185
|
+
CartSource2["API"] = "API";
|
|
186
|
+
return CartSource2;
|
|
187
|
+
})(CartSource || {});
|
|
188
|
+
|
|
189
|
+
// src/cart/dto.ts
|
|
190
|
+
var CartItemErrorCode = /* @__PURE__ */ ((CartItemErrorCode2) => {
|
|
191
|
+
CartItemErrorCode2["PRICE_INCREASED"] = "PRICE_INCREASED";
|
|
192
|
+
CartItemErrorCode2["PRICE_DECREASED"] = "PRICE_DECREASED";
|
|
193
|
+
CartItemErrorCode2["PRODUCT_INACTIVE"] = "PRODUCT_INACTIVE";
|
|
194
|
+
CartItemErrorCode2["STOCK_INSUFFICIENT"] = "STOCK_INSUFFICIENT";
|
|
195
|
+
CartItemErrorCode2["STOCK_UNAVAILABLE"] = "STOCK_UNAVAILABLE";
|
|
196
|
+
CartItemErrorCode2["VALIDATION_ERROR"] = "VALIDATION_ERROR";
|
|
197
|
+
return CartItemErrorCode2;
|
|
198
|
+
})(CartItemErrorCode || {});
|
|
199
|
+
|
|
200
|
+
// src/customer/types.ts
|
|
201
|
+
var CustomerStatus = /* @__PURE__ */ ((CustomerStatus2) => {
|
|
202
|
+
CustomerStatus2["ACTIVE"] = "ACTIVE";
|
|
203
|
+
CustomerStatus2["INACTIVE"] = "INACTIVE";
|
|
204
|
+
CustomerStatus2["BLACKLISTED"] = "BLACKLISTED";
|
|
205
|
+
CustomerStatus2["PENDING"] = "PENDING";
|
|
206
|
+
return CustomerStatus2;
|
|
207
|
+
})(CustomerStatus || {});
|
|
208
|
+
|
|
170
209
|
// src/integration/types.ts
|
|
171
210
|
var IntegrationCategory = /* @__PURE__ */ ((IntegrationCategory2) => {
|
|
172
211
|
IntegrationCategory2["PAYMENT_GATEWAY"] = "PAYMENT_GATEWAY";
|
|
@@ -227,17 +266,17 @@ var OrderDeliveryType = /* @__PURE__ */ ((OrderDeliveryType2) => {
|
|
|
227
266
|
})(OrderDeliveryType || {});
|
|
228
267
|
|
|
229
268
|
// src/payment/types.ts
|
|
230
|
-
var
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
return
|
|
240
|
-
})(
|
|
269
|
+
var PaymentStatus = /* @__PURE__ */ ((PaymentStatus2) => {
|
|
270
|
+
PaymentStatus2["PENDING"] = "PENDING";
|
|
271
|
+
PaymentStatus2["PREAUTHORIZED"] = "PREAUTHORIZED";
|
|
272
|
+
PaymentStatus2["APPROVED"] = "APPROVED";
|
|
273
|
+
PaymentStatus2["PAID"] = "PAID";
|
|
274
|
+
PaymentStatus2["REJECTED"] = "REJECTED";
|
|
275
|
+
PaymentStatus2["REFUND_IN_PROCESS"] = "REFUND_IN_PROCESS";
|
|
276
|
+
PaymentStatus2["PARTIAL_REFUND"] = "PARTIAL_REFUND";
|
|
277
|
+
PaymentStatus2["REFUNDED"] = "REFUNDED";
|
|
278
|
+
return PaymentStatus2;
|
|
279
|
+
})(PaymentStatus || {});
|
|
241
280
|
var PaymentMethodType = /* @__PURE__ */ ((PaymentMethodType2) => {
|
|
242
281
|
PaymentMethodType2["BANK_TRANSFER"] = "BANK_TRANSFER";
|
|
243
282
|
PaymentMethodType2["CREDIT_CARD"] = "CREDIT_CARD";
|
|
@@ -324,33 +363,12 @@ var StorePageType = /* @__PURE__ */ ((StorePageType2) => {
|
|
|
324
363
|
return StorePageType2;
|
|
325
364
|
})(StorePageType || {});
|
|
326
365
|
|
|
327
|
-
// src/
|
|
328
|
-
var
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
CartStatus2["ABANDONED"] = "ABANDONED";
|
|
334
|
-
CartStatus2["MERGED"] = "MERGED";
|
|
335
|
-
return CartStatus2;
|
|
336
|
-
})(CartStatus || {});
|
|
337
|
-
var CartSource = /* @__PURE__ */ ((CartSource2) => {
|
|
338
|
-
CartSource2["WEB"] = "WEB";
|
|
339
|
-
CartSource2["POS"] = "POS";
|
|
340
|
-
CartSource2["API"] = "API";
|
|
341
|
-
return CartSource2;
|
|
342
|
-
})(CartSource || {});
|
|
343
|
-
|
|
344
|
-
// src/cart/dto.ts
|
|
345
|
-
var CartItemErrorCode = /* @__PURE__ */ ((CartItemErrorCode2) => {
|
|
346
|
-
CartItemErrorCode2["PRICE_INCREASED"] = "PRICE_INCREASED";
|
|
347
|
-
CartItemErrorCode2["PRICE_DECREASED"] = "PRICE_DECREASED";
|
|
348
|
-
CartItemErrorCode2["PRODUCT_INACTIVE"] = "PRODUCT_INACTIVE";
|
|
349
|
-
CartItemErrorCode2["STOCK_INSUFFICIENT"] = "STOCK_INSUFFICIENT";
|
|
350
|
-
CartItemErrorCode2["STOCK_UNAVAILABLE"] = "STOCK_UNAVAILABLE";
|
|
351
|
-
CartItemErrorCode2["VALIDATION_ERROR"] = "VALIDATION_ERROR";
|
|
352
|
-
return CartItemErrorCode2;
|
|
353
|
-
})(CartItemErrorCode || {});
|
|
366
|
+
// src/pubsub/types.ts
|
|
367
|
+
var PubSubTopics = /* @__PURE__ */ ((PubSubTopics2) => {
|
|
368
|
+
PubSubTopics2["ORDER_PLACED"] = "order-placed";
|
|
369
|
+
PubSubTopics2["NOTIFICATION_CREATED"] = "notification-created";
|
|
370
|
+
return PubSubTopics2;
|
|
371
|
+
})(PubSubTopics || {});
|
|
354
372
|
// Annotate the CommonJS export names for ESM import in node:
|
|
355
373
|
0 && (module.exports = {
|
|
356
374
|
AccountBranchScheduleDay,
|
|
@@ -368,6 +386,7 @@ var CartItemErrorCode = /* @__PURE__ */ ((CartItemErrorCode2) => {
|
|
|
368
386
|
CartSource,
|
|
369
387
|
CartStatus,
|
|
370
388
|
Currency,
|
|
389
|
+
CustomerStatus,
|
|
371
390
|
IntegrationCategory,
|
|
372
391
|
IntegrationStatus,
|
|
373
392
|
MediaType,
|
|
@@ -377,16 +396,17 @@ var CartItemErrorCode = /* @__PURE__ */ ((CartItemErrorCode2) => {
|
|
|
377
396
|
OrderSource,
|
|
378
397
|
OrderStatus,
|
|
379
398
|
PaymentMethodType,
|
|
399
|
+
PaymentStatus,
|
|
380
400
|
ProductAttributeStatus,
|
|
381
401
|
ProductAttributeType,
|
|
382
402
|
ProductCategoryStatus,
|
|
383
403
|
ProductStatus,
|
|
384
404
|
ProductType,
|
|
405
|
+
PubSubTopics,
|
|
385
406
|
StandardCategoryStatus,
|
|
386
407
|
StoreBannerStatus,
|
|
387
408
|
StorePageStatus,
|
|
388
409
|
StorePageType,
|
|
389
|
-
TransactionStatus,
|
|
390
410
|
getCurrencySymbol
|
|
391
411
|
});
|
|
392
412
|
//# sourceMappingURL=index.js.map
|