@retaila/shared-types 1.1.21 → 1.1.23
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 +364 -134
- package/dist/index.d.ts +364 -134
- package/dist/index.js +120 -11
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +108 -9
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -356,6 +356,184 @@ interface CustomerUpsertDto {
|
|
|
356
356
|
phone?: Phone;
|
|
357
357
|
}
|
|
358
358
|
|
|
359
|
+
interface StatusInfo {
|
|
360
|
+
text: string;
|
|
361
|
+
class: string;
|
|
362
|
+
actionText?: string;
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
/**
|
|
366
|
+
* Entidad StandardCategory
|
|
367
|
+
* Define las categorías estándar de productos.
|
|
368
|
+
* Estas categorías estan pensadas para unificar o agrupar productos de diferentes cuentas.
|
|
369
|
+
*/
|
|
370
|
+
interface StandardCategory {
|
|
371
|
+
id: string;
|
|
372
|
+
parentId?: string;
|
|
373
|
+
name: string;
|
|
374
|
+
slug: string;
|
|
375
|
+
description?: string;
|
|
376
|
+
imageId?: string | null;
|
|
377
|
+
order: number;
|
|
378
|
+
status: StandardCategoryStatus;
|
|
379
|
+
metadata?: {
|
|
380
|
+
icon?: string;
|
|
381
|
+
displayInMenu?: boolean;
|
|
382
|
+
seoTitle?: string;
|
|
383
|
+
seoDescription?: string;
|
|
384
|
+
attributes?: string[];
|
|
385
|
+
};
|
|
386
|
+
createdAt: Date;
|
|
387
|
+
updatedAt: Date;
|
|
388
|
+
deletedAt?: Date | null;
|
|
389
|
+
children: StandardCategory[];
|
|
390
|
+
parent: StandardCategory | null;
|
|
391
|
+
}
|
|
392
|
+
declare enum StandardCategoryStatus {
|
|
393
|
+
ACTIVE = "ACTIVE",
|
|
394
|
+
INACTIVE = "INACTIVE"
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
/**
|
|
398
|
+
* Entidad ProductCategory
|
|
399
|
+
* Define las categorías de productos.
|
|
400
|
+
* Soporta una estructura jerárquica (categorías y subcategorías) mediante el campo parentId.
|
|
401
|
+
* Cada categoría debe estar asociada a una categoría estándar del sistema.
|
|
402
|
+
*/
|
|
403
|
+
interface ProductCategory {
|
|
404
|
+
id: string;
|
|
405
|
+
accountId: string;
|
|
406
|
+
parentId?: string;
|
|
407
|
+
standardCategoryId: string;
|
|
408
|
+
name: string;
|
|
409
|
+
slug: string;
|
|
410
|
+
description?: string;
|
|
411
|
+
imageId?: string | null;
|
|
412
|
+
order: number;
|
|
413
|
+
isFeatured: boolean;
|
|
414
|
+
status: ProductCategoryStatus;
|
|
415
|
+
createdAt: Date;
|
|
416
|
+
updatedAt: Date;
|
|
417
|
+
deletedAt?: Date | null;
|
|
418
|
+
children: ProductCategory[];
|
|
419
|
+
parent: ProductCategory | null;
|
|
420
|
+
standardCategory: StandardCategory;
|
|
421
|
+
}
|
|
422
|
+
declare enum ProductCategoryStatus {
|
|
423
|
+
ACTIVE = "ACTIVE",
|
|
424
|
+
INACTIVE = "INACTIVE"
|
|
425
|
+
}
|
|
426
|
+
|
|
427
|
+
/**
|
|
428
|
+
* Entidad Product
|
|
429
|
+
* Representa un producto vendible en la tienda. Es la entidad base que puede tener múltiples variantes.
|
|
430
|
+
*/
|
|
431
|
+
interface Product {
|
|
432
|
+
id: string;
|
|
433
|
+
accountId: string;
|
|
434
|
+
code: string;
|
|
435
|
+
brandId?: string | null;
|
|
436
|
+
supplierId?: string | null;
|
|
437
|
+
productType: ProductType;
|
|
438
|
+
sku?: string | null;
|
|
439
|
+
barcode?: string | null;
|
|
440
|
+
name: string;
|
|
441
|
+
slug: string;
|
|
442
|
+
description?: string | null;
|
|
443
|
+
isFeatured: boolean;
|
|
444
|
+
allowBackorder: boolean;
|
|
445
|
+
weight?: number | null;
|
|
446
|
+
weightUnit?: string | null;
|
|
447
|
+
height?: number | null;
|
|
448
|
+
width?: number | null;
|
|
449
|
+
depth?: number | null;
|
|
450
|
+
dimensionUnit?: string | null;
|
|
451
|
+
shippingLeadTime?: string | null;
|
|
452
|
+
status: ProductStatus;
|
|
453
|
+
statusInfo?: StatusInfo;
|
|
454
|
+
createdAt: Date;
|
|
455
|
+
updatedAt: Date;
|
|
456
|
+
deletedAt?: Date | null;
|
|
457
|
+
media?: Media[];
|
|
458
|
+
variants?: ProductVariant[];
|
|
459
|
+
categories?: ProductCategory[];
|
|
460
|
+
}
|
|
461
|
+
declare enum ProductStatus {
|
|
462
|
+
ACTIVE = "ACTIVE",// Available for sale
|
|
463
|
+
INACTIVE = "INACTIVE",// Not visible/purchasable
|
|
464
|
+
ARCHIVED = "ARCHIVED",// Not visible, kept for records
|
|
465
|
+
DRAFT = "DRAFT"
|
|
466
|
+
}
|
|
467
|
+
declare enum ProductType {
|
|
468
|
+
SIMPLE = "SIMPLE",// Product without variants (may have a default hidden variant)
|
|
469
|
+
VARIABLE = "VARIABLE",// Product with distinct variants (color, size, etc.)
|
|
470
|
+
BUNDLE = "BUNDLE",// A package of other products/variants
|
|
471
|
+
GIFT_CARD = "GIFT_CARD"
|
|
472
|
+
}
|
|
473
|
+
interface ProductVariant {
|
|
474
|
+
id: string;
|
|
475
|
+
accountId: string;
|
|
476
|
+
productId: string;
|
|
477
|
+
sku?: string | null;
|
|
478
|
+
barcode?: string | null;
|
|
479
|
+
currency: string;
|
|
480
|
+
price: number;
|
|
481
|
+
compareAtPrice?: number;
|
|
482
|
+
allowBackorder?: boolean;
|
|
483
|
+
stock: number;
|
|
484
|
+
weight?: number | null;
|
|
485
|
+
weightUnit?: string | null;
|
|
486
|
+
height?: number | null;
|
|
487
|
+
width?: number | null;
|
|
488
|
+
depth?: number | null;
|
|
489
|
+
dimensionUnit?: string | null;
|
|
490
|
+
shippingLeadTime?: string | null;
|
|
491
|
+
order: number;
|
|
492
|
+
createdAt: Date;
|
|
493
|
+
updatedAt: Date;
|
|
494
|
+
deletedAt?: Date;
|
|
495
|
+
}
|
|
496
|
+
|
|
497
|
+
declare function getProductStatusInfo(status: ProductStatus): StatusInfo;
|
|
498
|
+
|
|
499
|
+
type FulfillmentItem = {
|
|
500
|
+
id: string;
|
|
501
|
+
fulfillmentId: string;
|
|
502
|
+
orderItemId: string;
|
|
503
|
+
quantity: number;
|
|
504
|
+
};
|
|
505
|
+
|
|
506
|
+
type CreateFulfillmentItemDto = {
|
|
507
|
+
orderItemId: string;
|
|
508
|
+
quantity: string;
|
|
509
|
+
};
|
|
510
|
+
|
|
511
|
+
declare enum FulfillmentStatus {
|
|
512
|
+
PENDING = "pending",
|
|
513
|
+
PACKED = "packed",
|
|
514
|
+
SHIPPED = "shipped",
|
|
515
|
+
DELIVERED = "delivered",
|
|
516
|
+
CANCELLED = "cancelled"
|
|
517
|
+
}
|
|
518
|
+
type Fulfillment = {
|
|
519
|
+
id: string;
|
|
520
|
+
accountId: string;
|
|
521
|
+
orderId: string;
|
|
522
|
+
accountBranchId: string;
|
|
523
|
+
carrier: string;
|
|
524
|
+
trackingNumber: string | null;
|
|
525
|
+
items: FulfillmentItem[];
|
|
526
|
+
status: FulfillmentStatus;
|
|
527
|
+
data: Record<string, unknown> | null;
|
|
528
|
+
packedAt: Date | null;
|
|
529
|
+
shippedAt: Date | null;
|
|
530
|
+
deliveredAt: Date | null;
|
|
531
|
+
cancelledAt: Date | null;
|
|
532
|
+
createdAt: Date;
|
|
533
|
+
updatedAt: Date;
|
|
534
|
+
deletedAt?: Date;
|
|
535
|
+
};
|
|
536
|
+
|
|
359
537
|
/**
|
|
360
538
|
* Entidad Order
|
|
361
539
|
* Define la orden de compra de un cliente en el sitio web.
|
|
@@ -376,6 +554,7 @@ interface Order {
|
|
|
376
554
|
paymentMethodIntegrationId?: string;
|
|
377
555
|
billingInformation?: any;
|
|
378
556
|
currency: Currency;
|
|
557
|
+
currencySymbol?: string;
|
|
379
558
|
subtotalPrice: number;
|
|
380
559
|
totalDiscounts: number;
|
|
381
560
|
totalShippingPrice: number;
|
|
@@ -384,8 +563,9 @@ interface Order {
|
|
|
384
563
|
totalPrice: number;
|
|
385
564
|
totalRefunded: number;
|
|
386
565
|
status: OrderStatus;
|
|
566
|
+
statusInfo?: StatusInfo;
|
|
387
567
|
paymentStatus: OrderPaymentStatus;
|
|
388
|
-
fulfillmentStatus:
|
|
568
|
+
fulfillmentStatus: FulfillmentStatus;
|
|
389
569
|
statusHistory?: StatusChangeHistory[];
|
|
390
570
|
customerNote?: string;
|
|
391
571
|
internalNote?: string;
|
|
@@ -401,6 +581,8 @@ interface Order {
|
|
|
401
581
|
customer?: Customer | null;
|
|
402
582
|
paymentMethodIntegration?: AccountIntegration | null;
|
|
403
583
|
accountDomain?: AccountDomain;
|
|
584
|
+
statusChangeNext?: OrderStatus;
|
|
585
|
+
statusChangeAllowed?: OrderStatus[];
|
|
404
586
|
}
|
|
405
587
|
interface OrderItem {
|
|
406
588
|
id: string;
|
|
@@ -412,6 +594,7 @@ interface OrderItem {
|
|
|
412
594
|
productName: string;
|
|
413
595
|
variantName?: string;
|
|
414
596
|
currency: Currency;
|
|
597
|
+
currencySymbol?: string;
|
|
415
598
|
unitPrice: number;
|
|
416
599
|
totalDiscount: number;
|
|
417
600
|
totalPrice: number;
|
|
@@ -423,6 +606,8 @@ interface OrderItem {
|
|
|
423
606
|
taxName?: string;
|
|
424
607
|
createdAt: Date;
|
|
425
608
|
updatedAt: Date;
|
|
609
|
+
productSnapshot?: OrderItemSnapshot;
|
|
610
|
+
product?: Product;
|
|
426
611
|
}
|
|
427
612
|
declare enum OrderStatus {
|
|
428
613
|
PENDING = "PENDING",// Order placed, awaiting payment confirmation
|
|
@@ -442,11 +627,6 @@ declare enum OrderPaymentStatus {
|
|
|
442
627
|
REFUNDED = "REFUNDED",
|
|
443
628
|
PARTIALLY_REFUNDED = "PARTIALLY_REFUNDED"
|
|
444
629
|
}
|
|
445
|
-
declare enum OrderFulfillmentStatus {
|
|
446
|
-
PENDING = "PENDING",
|
|
447
|
-
PARTIAL = "PARTIAL",
|
|
448
|
-
FULFILLED = "FULFILLED"
|
|
449
|
-
}
|
|
450
630
|
declare enum OrderSource {
|
|
451
631
|
WEB = "WEB",
|
|
452
632
|
POS = "POS",
|
|
@@ -463,6 +643,12 @@ interface StatusChangeHistory {
|
|
|
463
643
|
userId?: string;
|
|
464
644
|
metadata?: Record<string, any>;
|
|
465
645
|
}
|
|
646
|
+
interface OrderItemSnapshot {
|
|
647
|
+
sku?: string;
|
|
648
|
+
productName: string;
|
|
649
|
+
variantName?: string;
|
|
650
|
+
media?: Media[];
|
|
651
|
+
}
|
|
466
652
|
|
|
467
653
|
interface OrderCreateFromCartDto {
|
|
468
654
|
cartId: string;
|
|
@@ -473,6 +659,8 @@ interface AdminOrderStatusChangeDto {
|
|
|
473
659
|
status: OrderStatus;
|
|
474
660
|
}
|
|
475
661
|
|
|
662
|
+
declare function getOrderStatusInfo(status: OrderStatus): StatusInfo;
|
|
663
|
+
|
|
476
664
|
/**
|
|
477
665
|
* Add an item to the cart
|
|
478
666
|
*/
|
|
@@ -586,6 +774,12 @@ interface Cart {
|
|
|
586
774
|
subtotal: number;
|
|
587
775
|
total: number;
|
|
588
776
|
deliveryType: CartDeliveryType;
|
|
777
|
+
deliveryFirstName?: string;
|
|
778
|
+
deliveryLastName?: string;
|
|
779
|
+
deliveryAddress?: string;
|
|
780
|
+
deliveryPhone?: string;
|
|
781
|
+
deliveryOptionId?: string;
|
|
782
|
+
pickupBranchId?: string;
|
|
589
783
|
itemCount: number;
|
|
590
784
|
createdAt: Date;
|
|
591
785
|
updatedAt: Date;
|
|
@@ -602,8 +796,8 @@ interface Cart {
|
|
|
602
796
|
totalTax?: number;
|
|
603
797
|
totalPrice?: number;
|
|
604
798
|
taxDetails?: any;
|
|
605
|
-
customer?: Customer | null;
|
|
606
|
-
accountDomain?: AccountDomain;
|
|
799
|
+
customer?: Partial<Customer> | null;
|
|
800
|
+
accountDomain?: Partial<AccountDomain> | null;
|
|
607
801
|
}
|
|
608
802
|
interface CartItem {
|
|
609
803
|
id: string;
|
|
@@ -637,7 +831,7 @@ declare enum CartSource {
|
|
|
637
831
|
API = "API"
|
|
638
832
|
}
|
|
639
833
|
declare enum CartDeliveryType {
|
|
640
|
-
|
|
834
|
+
SHIPPING = "shipping",
|
|
641
835
|
PICKUP = "pickup"
|
|
642
836
|
}
|
|
643
837
|
|
|
@@ -649,7 +843,8 @@ declare enum PaymentStatus {
|
|
|
649
843
|
REJECTED = "REJECTED",// Pago rechazado
|
|
650
844
|
REFUND_IN_PROCESS = "REFUND_IN_PROCESS",// En proceso de reembolso con la plataforma de pagos
|
|
651
845
|
PARTIAL_REFUND = "PARTIAL_REFUND",// Pago parcialmente reembolsado
|
|
652
|
-
REFUNDED = "REFUNDED"
|
|
846
|
+
REFUNDED = "REFUNDED",// Pago reembolsado
|
|
847
|
+
ERROR = "ERROR"
|
|
653
848
|
}
|
|
654
849
|
declare enum PaymentMethodType {
|
|
655
850
|
BANK_TRANSFER = "BANK_TRANSFER",
|
|
@@ -679,77 +874,54 @@ interface Payment {
|
|
|
679
874
|
status: PaymentStatus;
|
|
680
875
|
cardBrand?: string;
|
|
681
876
|
cardLast4?: string;
|
|
877
|
+
data?: Record<string, unknown>;
|
|
682
878
|
metadata?: Record<string, any>;
|
|
683
879
|
demo: boolean;
|
|
684
880
|
createdAt: string | Date;
|
|
685
881
|
updatedAt: string | Date;
|
|
686
882
|
deletedAt?: string | Date;
|
|
687
883
|
}
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
accountId: string;
|
|
696
|
-
code: string;
|
|
697
|
-
brandId?: string | null;
|
|
698
|
-
supplierId?: string | null;
|
|
699
|
-
productType: ProductType;
|
|
700
|
-
sku?: string | null;
|
|
701
|
-
barcode?: string | null;
|
|
702
|
-
name: string;
|
|
703
|
-
slug: string;
|
|
704
|
-
description?: string | null;
|
|
705
|
-
isFeatured: boolean;
|
|
706
|
-
allowBackorder: boolean;
|
|
707
|
-
weight?: number | null;
|
|
708
|
-
weightUnit?: string | null;
|
|
709
|
-
height?: number | null;
|
|
710
|
-
width?: number | null;
|
|
711
|
-
depth?: number | null;
|
|
712
|
-
dimensionUnit?: string | null;
|
|
713
|
-
shippingLeadTime?: string | null;
|
|
714
|
-
status: ProductStatus;
|
|
715
|
-
createdAt: Date;
|
|
716
|
-
updatedAt: Date;
|
|
717
|
-
deletedAt?: Date | null;
|
|
884
|
+
type PaymentProviderKey = 'MERCADOPAGO';
|
|
885
|
+
interface PaymentProviderContext {
|
|
886
|
+
db: unknown;
|
|
887
|
+
accountIntegrationId: string;
|
|
888
|
+
providerKey: PaymentProviderKey;
|
|
889
|
+
environment: 'PRODUCTION' | 'DEVELOPMENT';
|
|
890
|
+
credentials: Record<string, any>;
|
|
718
891
|
}
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
INACTIVE = "INACTIVE",// Not visible/purchasable
|
|
722
|
-
ARCHIVED = "ARCHIVED",// Not visible, kept for records
|
|
723
|
-
DRAFT = "DRAFT"
|
|
892
|
+
interface PaymentProviderInitInput {
|
|
893
|
+
data: Record<string, any>;
|
|
724
894
|
}
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
BUNDLE = "BUNDLE",// A package of other products/variants
|
|
729
|
-
GIFT_CARD = "GIFT_CARD"
|
|
895
|
+
interface PaymentProviderInitOutput {
|
|
896
|
+
data: Record<string, any>;
|
|
897
|
+
status: PaymentStatus;
|
|
730
898
|
}
|
|
731
|
-
interface
|
|
732
|
-
|
|
899
|
+
interface PaymentProviderRefundInput {
|
|
900
|
+
amount: number;
|
|
901
|
+
data: Record<string, any>;
|
|
902
|
+
}
|
|
903
|
+
interface PaymentProviderRefundOutput {
|
|
904
|
+
data: Record<string, any>;
|
|
905
|
+
}
|
|
906
|
+
interface PaymentProviderWebhookResult {
|
|
907
|
+
order_code: string | null;
|
|
908
|
+
status: PaymentStatus;
|
|
909
|
+
data: Record<string, unknown>;
|
|
910
|
+
}
|
|
911
|
+
interface WebhookPayload {
|
|
912
|
+
provider: string;
|
|
733
913
|
accountId: string;
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
width?: number | null;
|
|
746
|
-
depth?: number | null;
|
|
747
|
-
dimensionUnit?: string | null;
|
|
748
|
-
shippingLeadTime?: string | null;
|
|
749
|
-
order: number;
|
|
750
|
-
createdAt: Date;
|
|
751
|
-
updatedAt: Date;
|
|
752
|
-
deletedAt?: Date;
|
|
914
|
+
payload: {
|
|
915
|
+
query: Record<string, unknown>;
|
|
916
|
+
body: Record<string, unknown>;
|
|
917
|
+
headers: Record<string, unknown>;
|
|
918
|
+
};
|
|
919
|
+
}
|
|
920
|
+
interface PaymentProviderAdapter {
|
|
921
|
+
readonly key: PaymentProviderKey;
|
|
922
|
+
initPayment(input: PaymentProviderInitInput): Promise<PaymentProviderInitOutput>;
|
|
923
|
+
refund(input: PaymentProviderRefundInput): Promise<PaymentProviderRefundOutput>;
|
|
924
|
+
processWebhook(input: WebhookPayload['payload']): Promise<PaymentProviderWebhookResult>;
|
|
753
925
|
}
|
|
754
926
|
|
|
755
927
|
/**
|
|
@@ -757,6 +929,7 @@ interface ProductVariant {
|
|
|
757
929
|
* Define los atributos disponibles que se pueden asignar a las variantes de producto (ej. Color, Talla).
|
|
758
930
|
* Especifica el nombre y tipo del atributo para ayudar en la representación y filtrado.
|
|
759
931
|
*/
|
|
932
|
+
|
|
760
933
|
interface ProductAttribute {
|
|
761
934
|
id: string;
|
|
762
935
|
accountId: string;
|
|
@@ -770,6 +943,12 @@ interface ProductAttribute {
|
|
|
770
943
|
createdAt: Date;
|
|
771
944
|
updatedAt: Date;
|
|
772
945
|
deletedAt?: Date | null;
|
|
946
|
+
productCategories: ProductCategory[];
|
|
947
|
+
productCategoryLinks: Array<{
|
|
948
|
+
categoryId: string;
|
|
949
|
+
isRequired: boolean;
|
|
950
|
+
displayOrder: number;
|
|
951
|
+
}>;
|
|
773
952
|
options: ProductAttributeOption[];
|
|
774
953
|
displayOrder: number;
|
|
775
954
|
}
|
|
@@ -800,68 +979,6 @@ interface ProductAttributeOption {
|
|
|
800
979
|
count: number;
|
|
801
980
|
}
|
|
802
981
|
|
|
803
|
-
/**
|
|
804
|
-
* Entidad StandardCategory
|
|
805
|
-
* Define las categorías estándar de productos.
|
|
806
|
-
* Estas categorías estan pensadas para unificar o agrupar productos de diferentes cuentas.
|
|
807
|
-
*/
|
|
808
|
-
interface StandardCategory {
|
|
809
|
-
id: string;
|
|
810
|
-
parentId?: string;
|
|
811
|
-
name: string;
|
|
812
|
-
slug: string;
|
|
813
|
-
description?: string;
|
|
814
|
-
imageId?: string | null;
|
|
815
|
-
order: number;
|
|
816
|
-
status: StandardCategoryStatus;
|
|
817
|
-
metadata?: {
|
|
818
|
-
icon?: string;
|
|
819
|
-
displayInMenu?: boolean;
|
|
820
|
-
seoTitle?: string;
|
|
821
|
-
seoDescription?: string;
|
|
822
|
-
attributes?: string[];
|
|
823
|
-
};
|
|
824
|
-
createdAt: Date;
|
|
825
|
-
updatedAt: Date;
|
|
826
|
-
deletedAt?: Date | null;
|
|
827
|
-
children: StandardCategory[];
|
|
828
|
-
parent: StandardCategory | null;
|
|
829
|
-
}
|
|
830
|
-
declare enum StandardCategoryStatus {
|
|
831
|
-
ACTIVE = "ACTIVE",
|
|
832
|
-
INACTIVE = "INACTIVE"
|
|
833
|
-
}
|
|
834
|
-
|
|
835
|
-
/**
|
|
836
|
-
* Entidad ProductCategory
|
|
837
|
-
* Define las categorías de productos.
|
|
838
|
-
* Soporta una estructura jerárquica (categorías y subcategorías) mediante el campo parentId.
|
|
839
|
-
* Cada categoría debe estar asociada a una categoría estándar del sistema.
|
|
840
|
-
*/
|
|
841
|
-
interface ProductCategory {
|
|
842
|
-
id: string;
|
|
843
|
-
accountId: string;
|
|
844
|
-
parentId?: string;
|
|
845
|
-
standardCategoryId: string;
|
|
846
|
-
name: string;
|
|
847
|
-
slug: string;
|
|
848
|
-
description?: string;
|
|
849
|
-
imageId?: string | null;
|
|
850
|
-
order: number;
|
|
851
|
-
isFeatured: boolean;
|
|
852
|
-
status: ProductCategoryStatus;
|
|
853
|
-
createdAt: Date;
|
|
854
|
-
updatedAt: Date;
|
|
855
|
-
deletedAt?: Date | null;
|
|
856
|
-
children: ProductCategory[];
|
|
857
|
-
parent: ProductCategory | null;
|
|
858
|
-
standardCategory: StandardCategory;
|
|
859
|
-
}
|
|
860
|
-
declare enum ProductCategoryStatus {
|
|
861
|
-
ACTIVE = "ACTIVE",
|
|
862
|
-
INACTIVE = "INACTIVE"
|
|
863
|
-
}
|
|
864
|
-
|
|
865
982
|
/**
|
|
866
983
|
* Entidad StoreBanner
|
|
867
984
|
* Banners para la portada de la web de la tienda
|
|
@@ -929,8 +1046,121 @@ declare enum StorePageType {
|
|
|
929
1046
|
|
|
930
1047
|
declare enum PubSubTopics {
|
|
931
1048
|
ORDER_PLACED = "order-placed",
|
|
1049
|
+
ORDER_CONFIRMED = "order-confirmed",
|
|
1050
|
+
ORDER_PROCESSING = "order-processing",
|
|
1051
|
+
ORDER_PROCESSED = "order-processed",
|
|
1052
|
+
ORDER_COMPLETED = "order-completed",
|
|
932
1053
|
PAYMENT_PAID = "payment-paid",
|
|
933
1054
|
NOTIFICATION_CREATED = "notification-created"
|
|
934
1055
|
}
|
|
935
1056
|
|
|
936
|
-
|
|
1057
|
+
declare enum SupportConversationChannel {
|
|
1058
|
+
WEB = "WEB",
|
|
1059
|
+
EMAIL = "EMAIL",
|
|
1060
|
+
WHATSAPP = "WHATSAPP"
|
|
1061
|
+
}
|
|
1062
|
+
declare enum SupportConversationVisibility {
|
|
1063
|
+
INTERNAL = "INTERNAL",
|
|
1064
|
+
MERCHANT = "MERCHANT"
|
|
1065
|
+
}
|
|
1066
|
+
declare enum SupportConversationPriority {
|
|
1067
|
+
LOW = "LOW",
|
|
1068
|
+
MEDIUM = "MEDIUM",
|
|
1069
|
+
HIGH = "HIGH",
|
|
1070
|
+
URGENT = "URGENT"
|
|
1071
|
+
}
|
|
1072
|
+
declare enum SupportConversationStatus {
|
|
1073
|
+
OPEN = "OPEN",
|
|
1074
|
+
CLOSED = "CLOSED",
|
|
1075
|
+
PENDING = "PENDING"
|
|
1076
|
+
}
|
|
1077
|
+
declare enum SupportConversationMessageDeliveryStatus {
|
|
1078
|
+
QUEUED = "QUEUED",
|
|
1079
|
+
SENT = "SENT",
|
|
1080
|
+
DELIVERED = "DELIVERED",
|
|
1081
|
+
READ = "READ",
|
|
1082
|
+
FAILED = "FAILED"
|
|
1083
|
+
}
|
|
1084
|
+
declare enum SupportConversationMessageAiAnalysisStatus {
|
|
1085
|
+
PENDING = "PENDING",
|
|
1086
|
+
PROCESSING = "PROCESSING",
|
|
1087
|
+
COMPLETED = "COMPLETED",
|
|
1088
|
+
FAILED = "FAILED"
|
|
1089
|
+
}
|
|
1090
|
+
declare enum SupportConversationMessageDirection {
|
|
1091
|
+
INBOUND = "INBOUND",
|
|
1092
|
+
OUTBOUND = "OUTBOUND"
|
|
1093
|
+
}
|
|
1094
|
+
declare enum SupportConversationMessageSenderType {
|
|
1095
|
+
CUSTOMER = "CUSTOMER",
|
|
1096
|
+
ACCOUNT_USER = "ACCOUNT_USER",
|
|
1097
|
+
ANONYMOUS = "ANONYMOUS",
|
|
1098
|
+
SYSTEM = "SYSTEM",
|
|
1099
|
+
AI = "AI"
|
|
1100
|
+
}
|
|
1101
|
+
interface SupportConversation {
|
|
1102
|
+
id: string;
|
|
1103
|
+
accountId: string;
|
|
1104
|
+
subject?: string | null;
|
|
1105
|
+
channel: SupportConversationChannel;
|
|
1106
|
+
assigneeId?: string | null;
|
|
1107
|
+
visibility: SupportConversationVisibility;
|
|
1108
|
+
priority: SupportConversationPriority;
|
|
1109
|
+
requiresMerchantAction: boolean;
|
|
1110
|
+
requiresInternalAction: boolean;
|
|
1111
|
+
customerId?: string | null;
|
|
1112
|
+
customerName?: string | null;
|
|
1113
|
+
customerLastname?: string | null;
|
|
1114
|
+
customerEmail?: string | null;
|
|
1115
|
+
customerPhone?: string | null;
|
|
1116
|
+
status: SupportConversationStatus;
|
|
1117
|
+
lastMessageAt?: Date | null;
|
|
1118
|
+
unreadForAgent: number;
|
|
1119
|
+
unreadForCustomer: number;
|
|
1120
|
+
metadata?: Object | null;
|
|
1121
|
+
aiSuggestion?: Object | null;
|
|
1122
|
+
createdAt: Date;
|
|
1123
|
+
updatedAt: Date;
|
|
1124
|
+
deletedAt?: Date | null;
|
|
1125
|
+
account: Account;
|
|
1126
|
+
customer: Customer | null;
|
|
1127
|
+
messages: SupportConversationMessage[];
|
|
1128
|
+
}
|
|
1129
|
+
interface SupportConversationMessage {
|
|
1130
|
+
id: string;
|
|
1131
|
+
accountId: string;
|
|
1132
|
+
conversationId: string;
|
|
1133
|
+
direction: SupportConversationMessageDirection;
|
|
1134
|
+
senderType: SupportConversationMessageSenderType;
|
|
1135
|
+
senderId?: string | null;
|
|
1136
|
+
body: string;
|
|
1137
|
+
isAiGenerated: boolean;
|
|
1138
|
+
isSystem: boolean;
|
|
1139
|
+
deliveryStatus: SupportConversationMessageDeliveryStatus;
|
|
1140
|
+
requiresAiAnalysis: boolean;
|
|
1141
|
+
aiAnalysisStatus: SupportConversationMessageAiAnalysisStatus;
|
|
1142
|
+
aiAnalyzedAt?: Date | null;
|
|
1143
|
+
externalMessageId?: string | null;
|
|
1144
|
+
externalThreadId?: string | null;
|
|
1145
|
+
attachments?: Array<{
|
|
1146
|
+
url: string;
|
|
1147
|
+
type?: string;
|
|
1148
|
+
name?: string;
|
|
1149
|
+
sizeBytes?: number;
|
|
1150
|
+
}>;
|
|
1151
|
+
metadata?: Object | null;
|
|
1152
|
+
createdAt: Date;
|
|
1153
|
+
updatedAt: Date;
|
|
1154
|
+
deletedAt?: Date | null;
|
|
1155
|
+
}
|
|
1156
|
+
|
|
1157
|
+
type CreateFulfillmentDto = {
|
|
1158
|
+
accountId: string;
|
|
1159
|
+
orderId: string;
|
|
1160
|
+
accountBranchId: string;
|
|
1161
|
+
carrier: string;
|
|
1162
|
+
items: CreateFulfillmentItemDto[];
|
|
1163
|
+
data?: Record<string, unknown>;
|
|
1164
|
+
};
|
|
1165
|
+
|
|
1166
|
+
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, CartDeliveryType, type CartItem, type CartItemAddDto, type CartItemAttributeDetail, CartItemErrorCode, type CartItemRemoveDto, type CartItemUpdateDto, type CartItemValidation, CartSource, CartStatus, type CartUpdateDto, type CreateFulfillmentDto, Currency, type Customer, CustomerStatus, type CustomerUpsertDto, type Fulfillment, FulfillmentStatus, type Integration, IntegrationCategory, IntegrationStatus, type MapPosition, type Media, MediaType, type Order, type OrderCreateFromCartDto, OrderDeliveryType, type OrderItem, type OrderItemSnapshot, OrderPaymentStatus, OrderSource, OrderStatus, type Payment, PaymentMethodType, type PaymentProviderAdapter, type PaymentProviderContext, type PaymentProviderInitInput, type PaymentProviderInitOutput, type PaymentProviderKey, type PaymentProviderRefundInput, type PaymentProviderRefundOutput, type PaymentProviderWebhookResult, 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 SupportConversation, SupportConversationChannel, type SupportConversationMessage, SupportConversationMessageAiAnalysisStatus, SupportConversationMessageDeliveryStatus, SupportConversationMessageDirection, SupportConversationMessageSenderType, SupportConversationPriority, SupportConversationStatus, SupportConversationVisibility, type ThemeConfig, type WebhookPayload, getCurrencySymbol, getOrderStatusInfo, getProductStatusInfo };
|