@retaila/shared-types 1.1.51 → 1.1.53

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 CHANGED
@@ -65,11 +65,16 @@ interface Phone {
65
65
  }
66
66
 
67
67
  declare enum Currency {
68
- USD = "USD",
69
- EUR = "EUR",
70
- UYU = "UYU",
71
- ARS = "ARS",
72
- BRL = "BRL"
68
+ ARS = "ARS",// Peso argentino
69
+ BRL = "BRL",// Real brasileño
70
+ CLP = "CLP",// Peso chileno
71
+ COP = "COP",// Peso colombiano
72
+ EUR = "EUR",// Euro
73
+ MXN = "MXN",// Peso mexicano
74
+ PEN = "PEN",// Sol peruano
75
+ PYG = "PYG",// Guaraní paraguayo
76
+ USD = "USD",// Dólar estadounidense
77
+ UYU = "UYU"
73
78
  }
74
79
  declare function getCurrencySymbol(currencyCode: Currency): string;
75
80
 
@@ -149,6 +154,8 @@ interface Integration {
149
154
  logoUrl?: string;
150
155
  requiredParamsSchema?: any;
151
156
  supportedPaymentMethods?: string[];
157
+ paymentCanRecapture?: boolean;
158
+ paymentCanRefund?: boolean;
152
159
  status: IntegrationStatus;
153
160
  createdAt: Date;
154
161
  updatedAt: Date;
@@ -335,22 +342,15 @@ declare enum AccountPaymentMethodStatus {
335
342
  ACTIVE = "ACTIVE",// Active
336
343
  INACTIVE = "INACTIVE"
337
344
  }
338
- declare enum AccountPaymentMethodType {
339
- ONLINE = "ONLINE",
340
- BANK_TRANSFER = "BANK_TRANSFER",
341
- CASH = "CASH",
342
- CASH_ON_DELIVERY = "CASH_ON_DELIVERY",
343
- OTHER = "OTHER"
344
- }
345
345
  interface AccountPaymentMethod {
346
346
  id: string;
347
347
  accountId: string;
348
348
  accountIntegrationId?: string;
349
- type: AccountPaymentMethodType;
350
349
  name: string;
351
350
  description?: string;
352
351
  customerInstructions?: string;
353
352
  order: number;
353
+ availableForWeb?: boolean;
354
354
  status: AccountPaymentMethodStatus;
355
355
  demo: boolean;
356
356
  createdAt: Date;
@@ -363,7 +363,6 @@ interface AccountPaymentMethod {
363
363
  }
364
364
 
365
365
  declare function getAccountPaymentMethodStatusInfo(status: AccountPaymentMethodStatus): StatusInfo;
366
- declare function getAccountPaymentMethodTypeName(type: AccountPaymentMethodType): string;
367
366
 
368
367
  /**
369
368
  * Entidad Customer
@@ -601,7 +600,7 @@ interface Payment {
601
600
  orderId: string;
602
601
  invoiceId?: string;
603
602
  accountPaymentMethodId?: string;
604
- gatewayPaymentId?: string;
603
+ accountIntegrationId?: string;
605
604
  referenceCode?: string;
606
605
  paymentMethodType?: PaymentMethodType;
607
606
  currency: Currency;
@@ -614,13 +613,15 @@ interface Payment {
614
613
  cardBrand?: string;
615
614
  cardBrandInfo?: PaymentCardBrand;
616
615
  cardLast4?: string;
617
- data?: Record<string, unknown>;
616
+ data?: Record<string, any>;
618
617
  metadata?: Record<string, any>;
618
+ internalComment?: string;
619
619
  demo: boolean;
620
620
  createdAt: string | Date;
621
621
  updatedAt: string | Date;
622
622
  deletedAt?: string | Date;
623
623
  accountPaymentMethod?: Partial<AccountPaymentMethod> | null;
624
+ order?: Order;
624
625
  }
625
626
  type PaymentProviderKey = 'MERCADOPAGO' | 'MANUAL';
626
627
  interface PaymentProviderContext {
@@ -789,7 +790,8 @@ declare enum OrderDeliveryType {
789
790
  PICKUP = "PICKUP"
790
791
  }
791
792
  interface StatusChangeHistory {
792
- status: OrderStatus;
793
+ type: 'order' | 'fulfillment' | 'payment';
794
+ status: OrderStatus | FulfillmentStatus | PaymentStatus;
793
795
  timestamp: Date;
794
796
  reason?: string;
795
797
  userId?: string;
@@ -1346,4 +1348,4 @@ interface StoreCustomizationSeo {
1346
1348
  favicon?: Media | null;
1347
1349
  }
1348
1350
 
1349
- 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, type AccountPaymentMethod, AccountPaymentMethodStatus, AccountPaymentMethodType, AccountStatus, type Address, type AdminOrderStatusChangeDto, type BaseEntity, type BaseEntityWithAccount, type BaseEntityWithAccountAndUser, type BaseEntityWithUser, type ButtonStyle, 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 NextStatusAction, type Order, type OrderCreateFromCartDto, OrderDeliveryType, type OrderItem, type OrderItemSnapshot, OrderPaymentStatus, OrderSource, OrderStatus, type Payment, type PaymentCardBrand, PaymentCardBrandKey, PaymentMethodType, type PaymentProviderAdapter, type PaymentProviderCaptureInput, type PaymentProviderCaptureOutput, 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 StatusFlow, type StoreBanner, StoreBannerStatus, type StoreCustomization, type StoreCustomizationComponentSettings, type StoreCustomizationLayoutComponent, type StoreCustomizationPage, type StoreCustomizationPageComponent, type StoreCustomizationSeo, type StoreCustomizationThemeButtons, type StoreCustomizationThemeColors, type StoreCustomizationThemeTypography, type StorePage, StorePageStatus, StorePageType, type SupportConversation, SupportConversationChannel, type SupportConversationMessage, SupportConversationMessageAiAnalysisStatus, SupportConversationMessageDeliveryStatus, SupportConversationMessageDirection, SupportConversationMessageSenderType, SupportConversationPriority, SupportConversationStatus, SupportConversationVisibility, type ThemeConfig, type WebhookPayload, getAccountPaymentMethodStatusInfo, getAccountPaymentMethodTypeName, getCurrencySymbol, getFulfillmentStatusInfo, getOrderStatusInfo, getPaymentCardBrand, getPaymentStatusInfo, getProductStatusInfo };
1351
+ 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, type AccountPaymentMethod, AccountPaymentMethodStatus, AccountStatus, type Address, type AdminOrderStatusChangeDto, type BaseEntity, type BaseEntityWithAccount, type BaseEntityWithAccountAndUser, type BaseEntityWithUser, type ButtonStyle, 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 NextStatusAction, type Order, type OrderCreateFromCartDto, OrderDeliveryType, type OrderItem, type OrderItemSnapshot, OrderPaymentStatus, OrderSource, OrderStatus, type Payment, type PaymentCardBrand, PaymentCardBrandKey, PaymentMethodType, type PaymentProviderAdapter, type PaymentProviderCaptureInput, type PaymentProviderCaptureOutput, 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 StatusFlow, type StoreBanner, StoreBannerStatus, type StoreCustomization, type StoreCustomizationComponentSettings, type StoreCustomizationLayoutComponent, type StoreCustomizationPage, type StoreCustomizationPageComponent, type StoreCustomizationSeo, type StoreCustomizationThemeButtons, type StoreCustomizationThemeColors, type StoreCustomizationThemeTypography, type StorePage, StorePageStatus, StorePageType, type SupportConversation, SupportConversationChannel, type SupportConversationMessage, SupportConversationMessageAiAnalysisStatus, SupportConversationMessageDeliveryStatus, SupportConversationMessageDirection, SupportConversationMessageSenderType, SupportConversationPriority, SupportConversationStatus, SupportConversationVisibility, type ThemeConfig, type WebhookPayload, getAccountPaymentMethodStatusInfo, getCurrencySymbol, getFulfillmentStatusInfo, getOrderStatusInfo, getPaymentCardBrand, getPaymentStatusInfo, getProductStatusInfo };
package/dist/index.d.ts CHANGED
@@ -65,11 +65,16 @@ interface Phone {
65
65
  }
66
66
 
67
67
  declare enum Currency {
68
- USD = "USD",
69
- EUR = "EUR",
70
- UYU = "UYU",
71
- ARS = "ARS",
72
- BRL = "BRL"
68
+ ARS = "ARS",// Peso argentino
69
+ BRL = "BRL",// Real brasileño
70
+ CLP = "CLP",// Peso chileno
71
+ COP = "COP",// Peso colombiano
72
+ EUR = "EUR",// Euro
73
+ MXN = "MXN",// Peso mexicano
74
+ PEN = "PEN",// Sol peruano
75
+ PYG = "PYG",// Guaraní paraguayo
76
+ USD = "USD",// Dólar estadounidense
77
+ UYU = "UYU"
73
78
  }
74
79
  declare function getCurrencySymbol(currencyCode: Currency): string;
75
80
 
@@ -149,6 +154,8 @@ interface Integration {
149
154
  logoUrl?: string;
150
155
  requiredParamsSchema?: any;
151
156
  supportedPaymentMethods?: string[];
157
+ paymentCanRecapture?: boolean;
158
+ paymentCanRefund?: boolean;
152
159
  status: IntegrationStatus;
153
160
  createdAt: Date;
154
161
  updatedAt: Date;
@@ -335,22 +342,15 @@ declare enum AccountPaymentMethodStatus {
335
342
  ACTIVE = "ACTIVE",// Active
336
343
  INACTIVE = "INACTIVE"
337
344
  }
338
- declare enum AccountPaymentMethodType {
339
- ONLINE = "ONLINE",
340
- BANK_TRANSFER = "BANK_TRANSFER",
341
- CASH = "CASH",
342
- CASH_ON_DELIVERY = "CASH_ON_DELIVERY",
343
- OTHER = "OTHER"
344
- }
345
345
  interface AccountPaymentMethod {
346
346
  id: string;
347
347
  accountId: string;
348
348
  accountIntegrationId?: string;
349
- type: AccountPaymentMethodType;
350
349
  name: string;
351
350
  description?: string;
352
351
  customerInstructions?: string;
353
352
  order: number;
353
+ availableForWeb?: boolean;
354
354
  status: AccountPaymentMethodStatus;
355
355
  demo: boolean;
356
356
  createdAt: Date;
@@ -363,7 +363,6 @@ interface AccountPaymentMethod {
363
363
  }
364
364
 
365
365
  declare function getAccountPaymentMethodStatusInfo(status: AccountPaymentMethodStatus): StatusInfo;
366
- declare function getAccountPaymentMethodTypeName(type: AccountPaymentMethodType): string;
367
366
 
368
367
  /**
369
368
  * Entidad Customer
@@ -601,7 +600,7 @@ interface Payment {
601
600
  orderId: string;
602
601
  invoiceId?: string;
603
602
  accountPaymentMethodId?: string;
604
- gatewayPaymentId?: string;
603
+ accountIntegrationId?: string;
605
604
  referenceCode?: string;
606
605
  paymentMethodType?: PaymentMethodType;
607
606
  currency: Currency;
@@ -614,13 +613,15 @@ interface Payment {
614
613
  cardBrand?: string;
615
614
  cardBrandInfo?: PaymentCardBrand;
616
615
  cardLast4?: string;
617
- data?: Record<string, unknown>;
616
+ data?: Record<string, any>;
618
617
  metadata?: Record<string, any>;
618
+ internalComment?: string;
619
619
  demo: boolean;
620
620
  createdAt: string | Date;
621
621
  updatedAt: string | Date;
622
622
  deletedAt?: string | Date;
623
623
  accountPaymentMethod?: Partial<AccountPaymentMethod> | null;
624
+ order?: Order;
624
625
  }
625
626
  type PaymentProviderKey = 'MERCADOPAGO' | 'MANUAL';
626
627
  interface PaymentProviderContext {
@@ -789,7 +790,8 @@ declare enum OrderDeliveryType {
789
790
  PICKUP = "PICKUP"
790
791
  }
791
792
  interface StatusChangeHistory {
792
- status: OrderStatus;
793
+ type: 'order' | 'fulfillment' | 'payment';
794
+ status: OrderStatus | FulfillmentStatus | PaymentStatus;
793
795
  timestamp: Date;
794
796
  reason?: string;
795
797
  userId?: string;
@@ -1346,4 +1348,4 @@ interface StoreCustomizationSeo {
1346
1348
  favicon?: Media | null;
1347
1349
  }
1348
1350
 
1349
- 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, type AccountPaymentMethod, AccountPaymentMethodStatus, AccountPaymentMethodType, AccountStatus, type Address, type AdminOrderStatusChangeDto, type BaseEntity, type BaseEntityWithAccount, type BaseEntityWithAccountAndUser, type BaseEntityWithUser, type ButtonStyle, 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 NextStatusAction, type Order, type OrderCreateFromCartDto, OrderDeliveryType, type OrderItem, type OrderItemSnapshot, OrderPaymentStatus, OrderSource, OrderStatus, type Payment, type PaymentCardBrand, PaymentCardBrandKey, PaymentMethodType, type PaymentProviderAdapter, type PaymentProviderCaptureInput, type PaymentProviderCaptureOutput, 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 StatusFlow, type StoreBanner, StoreBannerStatus, type StoreCustomization, type StoreCustomizationComponentSettings, type StoreCustomizationLayoutComponent, type StoreCustomizationPage, type StoreCustomizationPageComponent, type StoreCustomizationSeo, type StoreCustomizationThemeButtons, type StoreCustomizationThemeColors, type StoreCustomizationThemeTypography, type StorePage, StorePageStatus, StorePageType, type SupportConversation, SupportConversationChannel, type SupportConversationMessage, SupportConversationMessageAiAnalysisStatus, SupportConversationMessageDeliveryStatus, SupportConversationMessageDirection, SupportConversationMessageSenderType, SupportConversationPriority, SupportConversationStatus, SupportConversationVisibility, type ThemeConfig, type WebhookPayload, getAccountPaymentMethodStatusInfo, getAccountPaymentMethodTypeName, getCurrencySymbol, getFulfillmentStatusInfo, getOrderStatusInfo, getPaymentCardBrand, getPaymentStatusInfo, getProductStatusInfo };
1351
+ 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, type AccountPaymentMethod, AccountPaymentMethodStatus, AccountStatus, type Address, type AdminOrderStatusChangeDto, type BaseEntity, type BaseEntityWithAccount, type BaseEntityWithAccountAndUser, type BaseEntityWithUser, type ButtonStyle, 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 NextStatusAction, type Order, type OrderCreateFromCartDto, OrderDeliveryType, type OrderItem, type OrderItemSnapshot, OrderPaymentStatus, OrderSource, OrderStatus, type Payment, type PaymentCardBrand, PaymentCardBrandKey, PaymentMethodType, type PaymentProviderAdapter, type PaymentProviderCaptureInput, type PaymentProviderCaptureOutput, 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 StatusFlow, type StoreBanner, StoreBannerStatus, type StoreCustomization, type StoreCustomizationComponentSettings, type StoreCustomizationLayoutComponent, type StoreCustomizationPage, type StoreCustomizationPageComponent, type StoreCustomizationSeo, type StoreCustomizationThemeButtons, type StoreCustomizationThemeColors, type StoreCustomizationThemeTypography, type StorePage, StorePageStatus, StorePageType, type SupportConversation, SupportConversationChannel, type SupportConversationMessage, SupportConversationMessageAiAnalysisStatus, SupportConversationMessageDeliveryStatus, SupportConversationMessageDirection, SupportConversationMessageSenderType, SupportConversationPriority, SupportConversationStatus, SupportConversationVisibility, type ThemeConfig, type WebhookPayload, getAccountPaymentMethodStatusInfo, getCurrencySymbol, getFulfillmentStatusInfo, getOrderStatusInfo, getPaymentCardBrand, getPaymentStatusInfo, getProductStatusInfo };
package/dist/index.js CHANGED
@@ -32,7 +32,6 @@ __export(index_exports, {
32
32
  AccountIntegrationEnvironment: () => AccountIntegrationEnvironment,
33
33
  AccountIntegrationStatus: () => AccountIntegrationStatus,
34
34
  AccountPaymentMethodStatus: () => AccountPaymentMethodStatus,
35
- AccountPaymentMethodType: () => AccountPaymentMethodType,
36
35
  AccountStatus: () => AccountStatus,
37
36
  CartDeliveryType: () => CartDeliveryType,
38
37
  CartItemErrorCode: () => CartItemErrorCode,
@@ -70,7 +69,6 @@ __export(index_exports, {
70
69
  SupportConversationStatus: () => SupportConversationStatus,
71
70
  SupportConversationVisibility: () => SupportConversationVisibility,
72
71
  getAccountPaymentMethodStatusInfo: () => getAccountPaymentMethodStatusInfo,
73
- getAccountPaymentMethodTypeName: () => getAccountPaymentMethodTypeName,
74
72
  getCurrencySymbol: () => getCurrencySymbol,
75
73
  getFulfillmentStatusInfo: () => getFulfillmentStatusInfo,
76
74
  getOrderStatusInfo: () => getOrderStatusInfo,
@@ -94,11 +92,16 @@ var MediaType = /* @__PURE__ */ ((MediaType2) => {
94
92
 
95
93
  // src/common/Currency.ts
96
94
  var Currency = /* @__PURE__ */ ((Currency2) => {
97
- Currency2["USD"] = "USD";
98
- Currency2["EUR"] = "EUR";
99
- Currency2["UYU"] = "UYU";
100
95
  Currency2["ARS"] = "ARS";
101
96
  Currency2["BRL"] = "BRL";
97
+ Currency2["CLP"] = "CLP";
98
+ Currency2["COP"] = "COP";
99
+ Currency2["EUR"] = "EUR";
100
+ Currency2["MXN"] = "MXN";
101
+ Currency2["PEN"] = "PEN";
102
+ Currency2["PYG"] = "PYG";
103
+ Currency2["USD"] = "USD";
104
+ Currency2["UYU"] = "UYU";
102
105
  return Currency2;
103
106
  })(Currency || {});
104
107
  function getCurrencySymbol(currencyCode) {
@@ -195,14 +198,6 @@ var AccountPaymentMethodStatus = /* @__PURE__ */ ((AccountPaymentMethodStatus2)
195
198
  AccountPaymentMethodStatus2["INACTIVE"] = "INACTIVE";
196
199
  return AccountPaymentMethodStatus2;
197
200
  })(AccountPaymentMethodStatus || {});
198
- var AccountPaymentMethodType = /* @__PURE__ */ ((AccountPaymentMethodType2) => {
199
- AccountPaymentMethodType2["ONLINE"] = "ONLINE";
200
- AccountPaymentMethodType2["BANK_TRANSFER"] = "BANK_TRANSFER";
201
- AccountPaymentMethodType2["CASH"] = "CASH";
202
- AccountPaymentMethodType2["CASH_ON_DELIVERY"] = "CASH_ON_DELIVERY";
203
- AccountPaymentMethodType2["OTHER"] = "OTHER";
204
- return AccountPaymentMethodType2;
205
- })(AccountPaymentMethodType || {});
206
201
 
207
202
  // src/accountPaymentMethod/helpers.ts
208
203
  function getAccountPaymentMethodStatusInfo(status) {
@@ -212,16 +207,6 @@ function getAccountPaymentMethodStatusInfo(status) {
212
207
  };
213
208
  return map[status] ?? { text: String(status), class: "secondary" };
214
209
  }
215
- function getAccountPaymentMethodTypeName(type) {
216
- const map = {
217
- ONLINE: "Online",
218
- BANK_TRANSFER: "Transferencia bancaria",
219
- CASH: "Efectivo",
220
- CASH_ON_DELIVERY: "Efectivo en la entrega",
221
- OTHER: "Otro"
222
- };
223
- return map[type] ?? type;
224
- }
225
210
 
226
211
  // src/cart/types.ts
227
212
  var CartStatus = /* @__PURE__ */ ((CartStatus2) => {
@@ -578,7 +563,6 @@ function getFulfillmentStatusInfo(status) {
578
563
  AccountIntegrationEnvironment,
579
564
  AccountIntegrationStatus,
580
565
  AccountPaymentMethodStatus,
581
- AccountPaymentMethodType,
582
566
  AccountStatus,
583
567
  CartDeliveryType,
584
568
  CartItemErrorCode,
@@ -616,7 +600,6 @@ function getFulfillmentStatusInfo(status) {
616
600
  SupportConversationStatus,
617
601
  SupportConversationVisibility,
618
602
  getAccountPaymentMethodStatusInfo,
619
- getAccountPaymentMethodTypeName,
620
603
  getCurrencySymbol,
621
604
  getFulfillmentStatusInfo,
622
605
  getOrderStatusInfo,
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts","../src/common/Media.ts","../src/common/Currency.ts","../src/account/types.ts","../src/accountBranch/types.ts","../src/accountDeliveryOption/types.ts","../src/accountDomain/types.ts","../src/accountIntegration/types.ts","../src/accountPaymentMethod/types.ts","../src/accountPaymentMethod/helpers.ts","../src/cart/types.ts","../src/cart/dto.ts","../src/customer/types.ts","../src/integration/types.ts","../src/order/types.ts","../src/order/helpers.ts","../src/payment/types.ts","../src/payment/helpers.ts","../src/product/types.ts","../src/product/helpers.ts","../src/productAttribute/types.ts","../src/productCategory/types.ts","../src/standardCategory/types.ts","../src/storeBanner/types.ts","../src/storePage/types.ts","../src/pubsub/types.ts","../src/supportConversation/types.ts","../src/fulfillment/types.ts","../src/fulfillment/helpers.ts"],"sourcesContent":["// shared-types/src/index.ts - Main exports for shared types package\n\n// Common types\nexport * from './common';\n\n// Entity-specific exports\nexport * from './account';\nexport * from './accountBranch';\nexport * from './accountDeliveryOption';\nexport * from './accountDomain';\nexport * from './accountIntegration';\nexport * from './accountPaymentMethod';\nexport * from './cart';\nexport * from './customer';\nexport * from './integration';\nexport * from './order';\nexport * from './payment'\nexport * from './product';\nexport * from './productAttribute';\nexport * from './productCategory';\nexport * from './standardCategory';\nexport * from './storeBanner';\nexport * from './storePage';\nexport * from './pubsub';\nexport * from './supportConversation';\nexport * from './fulfillment';\nexport * from './storeCustomization';\n\n","/**\n * Entidad Media\n * Se utiliza para almacenar y gestionar archivos y recursos multimedia.\n */\n\nexport interface Media {\n id: string;\n accountId: string;\n filename: string;\n url: string;\n thumbnailUrl: string;\n mimeType: string;\n extension: string;\n size: number;\n type: MediaType;\n altText: string;\n createdAt: Date;\n updatedAt: Date;\n deletedAt?: Date | null;\n}\n\nexport enum MediaType {\n IMAGE = 'IMAGE',\n VIDEO = 'VIDEO',\n FAVICON = 'FAVICON',\n DOCUMENT = 'DOCUMENT',\n AUDIO = 'AUDIO',\n ARCHIVE = 'ARCHIVE',\n OTHER = 'OTHER',\n}\n\n\n","export enum Currency {\n USD = 'USD',\n EUR = 'EUR',\n UYU = 'UYU',\n ARS = 'ARS',\n BRL = 'BRL'\n}\n\nexport function getCurrencySymbol(currencyCode: Currency): string {\n const currencySymbols: { [key: string]: string } = {\n [Currency.USD]: 'U$S',\n [Currency.EUR]: '€',\n [Currency.UYU]: '$',\n [Currency.ARS]: '$',\n [Currency.BRL]: 'R$',\n };\n \n return currencySymbols[currencyCode] || currencyCode.toString();\n} \n\n\n","// shared-types/src/account/types.ts - Account entity types\n\nexport interface Account {\n id: string;\n name: string;\n slug: string;\n address?: string;\n logoId?: string;\n currency: string;\n instagram?: string;\n facebook?: string;\n whatsapp?: string;\n phone?: string;\n email: string;\n timezone: string;\n hasDelivery: boolean;\n status: AccountStatus;\n themeConfig?: ThemeConfig;\n privateKey?: string;\n demo: boolean;\n createdAt: Date;\n updatedAt: Date;\n deletedAt?: Date;\n}\n\nexport enum AccountStatus {\n ACTIVE = 'ACTIVE',\n INACTIVE = 'INACTIVE',\n PENDING = 'PENDING',\n SUSPENDED = 'SUSPENDED',\n}\n\nexport interface ThemeConfig {\n backgroundColor: string;\n textColor: string;\n primaryColor: string;\n secondaryColor: string;\n}\n ","import { AccountDeliveryOption } from \"../accountDeliveryOption/types\";\nimport { Address, MapPosition, Phone } from \"../common\";\n\n/**\n * Entidad AccountBranch\n * Representa una sucursal de una cuenta.\n */\n\nexport interface AccountBranch {\n id: string;\n accountId: string;\n name: string;\n address?: Address; \n addressInstructions?: string;\n addressCoordinates?: MapPosition | null;\n phone?: Phone | null;\n email?: string | null;\n demo:boolean;\n status: AccountBranchStatus; \n createdAt: Date;\n updatedAt: Date;\n deletedAt?: Date | null;\n\n schedule: AccountBranchSchedule[];\n deliveryOptions: AccountDeliveryOption[];\n}\n\nexport enum AccountBranchStatus {\n ACTIVE = \"ACTIVE\",\n INACTIVE = \"INACTIVE\"\n}\n\n \nexport interface AccountBranchSchedule {\n id: string;\n accountBranchId: string;\n day: AccountBranchScheduleDay;\n start: number;\n end: number;\n status: AccountBranchScheduleStatus;\n demo:boolean;\n createdAt: Date;\n updatedAt: Date;\n deletedAt?: Date | null;\n}\n\nexport enum AccountBranchScheduleStatus {\n ACTIVE = \"ACTIVE\",\n INACTIVE = \"INACTIVE\"\n}\n\nexport enum AccountBranchScheduleDay {\n MONDAY = \"MONDAY\",\n TUESDAY = \"TUESDAY\",\n WEDNESDAY = \"WEDNESDAY\",\n THURSDAY = \"THURSDAY\",\n FRIDAY = \"FRIDAY\",\n SATURDAY = \"SATURDAY\",\n SUNDAY = \"SUNDAY\"\n}","import { Address, MapPosition } from \"../common\";\nimport { AccountIntegration } from \"../accountIntegration/types\";\nimport { AccountBranch } from \"../accountBranch/types\";\n\n/**\n * Entidad AccountDeliveryOption\n * Representa una opción de envío de una cuenta.\n */\n\nexport interface AccountDeliveryOption {\n\tid: string;\n\taccountId: string;\n\taccountBranchId: string;\n\tname: string;\n\tintegrationId?: string;\n\tisScheduled: boolean;\n\tpriceLogic: AccountDeliveryOptionPriceLogic;\n\tstatus: AccountDeliveryOptionStatus;\n\tdemo:boolean;\n\tcreatedAt: Date;\n\tupdatedAt: Date;\n\tdeletedAt?: Date | null;\n\n\tzones: AccountDeliveryOptionZone[];\n\tintegration?: AccountIntegration | null;\n\tcalculatedCost?: AccountDeliveryOptionCalculatedCost | null;\n\taccountBranch?: AccountBranch | null;\n}\n\nexport enum AccountDeliveryOptionPriceLogic {\n\tFIXED = \"FIXED\",\n\tPER_KM = \"PER_KM\",\n}\n\nexport enum AccountDeliveryOptionStatus {\n\tACTIVE = \"ACTIVE\",\n\tINACTIVE = \"INACTIVE\",\n}\n\nexport interface AccountDeliveryOptionCalculatedCost {\n\tbasePrice: number;\n\tdistanceKm: number;\n\tfinalPrice: number;\n\tpriceLogic: AccountDeliveryOptionPriceLogic;\n\tcurrency: string;\n}\n\n\nexport interface AccountDeliveryOptionZone {\n\tid: string;\n\taccountId: string;\n\taccountDeliveryOptionId: string;\n\tname: string;\n\tprice: number;\n\tpriceMin: number;\n\tarea: string;\n\tstatus: AccountDeliveryOptionZoneStatus;\n\tdemo:boolean;\n\tcreatedAt: Date;\n\tupdatedAt: Date;\n\tdeletedAt?: Date | null;\n}\n\nexport enum AccountDeliveryOptionZoneStatus {\n\tACTIVE = \"ACTIVE\",\n\tINACTIVE = \"INACTIVE\",\n}","/**\n * Entidad AccountDomain\n * Representa un dominio personalizado asociado a una cuenta.\n * Permite dominios completos y subdominios, con control de estado y verificación.\n */\n\nexport interface AccountDomain {\n id: string;\n accountId: string;\n domain: string; /** Dominio completo (ej: example.com) */\n subdomain?: string;/** Subdominio opcional (ej: shop, blog) */\n isPrimary: boolean; /** Indica si este es el dominio principal de la cuenta */\n status: AccountDomainStatus; /** Estado del dominio: PENDING, ACTIVE, INACTIVE */\n verifiedAt?: Date; /** Fecha de verificación del dominio */\n \n createdAt: Date;\n updatedAt: Date;\n deletedAt?: Date | null;\n}\n\nexport enum AccountDomainStatus {\n PENDING = \"PENDING\",\n ACTIVE = \"ACTIVE\",\n INACTIVE = \"INACTIVE\"\n}\n\n ","import { Integration } from \"../integration\";\n/**\n * Entidad AccountIntegration\n * Contiene información de la integración y sus credenciales.\n */\n\nexport enum AccountIntegrationStatus {\n\tACTIVE = 'ACTIVE',\n\tINACTIVE = 'INACTIVE',\n\tBETA = 'BETA',\n\tDEPRECATED = 'DEPRECATED',\n}\nexport enum AccountIntegrationConnectionStatus {\n\tCONNECTED = 'CONNECTED',\n\tDISCONNECTED = 'DISCONNECTED',\n\tERROR = 'ERROR',\n\tWARNING = 'WARNING',\n}\n\nexport enum AccountIntegrationEnvironment {\n\tPRODUCTION = 'PRODUCTION',\n\tDEVELOPMENT = 'DEVELOPMENT',\n}\n\nexport interface AccountIntegration {\n\tid: string;\n\taccountId: string;\n\tintegrationId: string;\n\tsettingsProduction: Object | null;\n\tsettingsDevelopment: Object | null;\n\tenvironment: AccountIntegrationEnvironment;\n\tproductionStatus: AccountIntegrationConnectionStatus;\n\tdevelopmentStatus: AccountIntegrationConnectionStatus;\n\tstatus: AccountIntegrationStatus;\n\tdemo: boolean;\n\tcreatedAt: Date;\n\tupdatedAt: Date;\n\tdeletedAt?: Date | null;\n\n\tintegration: Integration;\n\n\tsettings: Record<string, any>; // settings for requested environment\n}","// shared-types/src/accountPaymentMethod/types.ts\n\nimport { Account } from \"../account\";\nimport { AccountIntegration } from \"../accountIntegration\";\nimport { StatusInfo } from \"../common/Status\";\n\nexport enum AccountPaymentMethodStatus {\n ACTIVE = 'ACTIVE', // Active\n INACTIVE = 'INACTIVE', // Disabled\n}\n\nexport enum AccountPaymentMethodType {\n ONLINE = 'ONLINE',\n BANK_TRANSFER = 'BANK_TRANSFER',\n CASH = 'CASH',\n CASH_ON_DELIVERY = 'CASH_ON_DELIVERY',\n OTHER = 'OTHER',\n}\n\nexport interface AccountPaymentMethod {\n id: string;\n accountId: string;\n accountIntegrationId?: string;\n type: AccountPaymentMethodType;\n name: string;\n description?: string;\n customerInstructions?: string;\n order: number;\n status: AccountPaymentMethodStatus;\n demo: boolean;\n createdAt: Date;\n updatedAt: Date;\n deletedAt?: Date;\n\n accountIntegration?: AccountIntegration;\n account?: Account;\n statusInfo?: StatusInfo;\n typeName?: string;\n}","import { StatusInfo } from \"../common/Status\";\nimport { AccountPaymentMethodStatus, AccountPaymentMethodType } from \"./types\";\n\nexport function getAccountPaymentMethodStatusInfo(status: AccountPaymentMethodStatus): StatusInfo {\n\tconst map: Record<AccountPaymentMethodStatus, StatusInfo> = {\n\t\tACTIVE: { text: 'Activo', class: 'success', actionText: '' },\n\t\tINACTIVE: { text: 'Inactivo', class: 'danger', actionText: '' },\n\t};\n\n\treturn map[status] ?? { text: String(status), class: 'secondary' };\n}\n\nexport function getAccountPaymentMethodTypeName(type: AccountPaymentMethodType): string {\n\tconst map: Record<AccountPaymentMethodType, string> = {\n\t\tONLINE: 'Online',\n\t\tBANK_TRANSFER: 'Transferencia bancaria',\n\t\tCASH: 'Efectivo',\n\t\tCASH_ON_DELIVERY: 'Efectivo en la entrega',\n\t\tOTHER: 'Otro',\n\t};\n\treturn map[type] ?? type;\n}","import { CartItemValidation } from \"./dto\";\nimport { Customer } from \"../customer\";\nimport { AccountDomain } from \"../accountDomain\";\nimport { AccountPaymentMethod } from \"../accountPaymentMethod\";\n\n/**\n * Entidad Cart\n * Define el carrito de compras de un cliente en el sitio web.\n */\n\nexport interface Cart {\n id: string;\n code: string;\n customerId?: string;\n sessionId?: string;\n items: CartItem[];\n currency: string;\n subtotal: number;\n total: number;\n accountPaymentMethodId?: string;\n deliveryType: CartDeliveryType;\n deliveryFirstName?: string;\n deliveryLastName?: string;\n deliveryAddress?: string;\n deliveryPhone?: string;\n deliveryOptionId?: string;\n pickupBranchId?: string;\n itemCount: number;\n createdAt: Date;\n updatedAt: Date;\n status: CartStatus;\n source: CartSource;\n sourceAccountDomainId?: string;\n recoveryToken?: string;\n customerNote?: string;\n hasIssues: boolean; // Indica si el carrito tiene problemas que resolver\n issuesCount: number; // Número de items con problemas\n // Nuevos campos de precios\n subtotalPrice?: number;\n totalDiscounts?: number;\n totalShippingPrice?: number;\n totalTax?: number;\n totalPrice?: number;\n taxDetails?: any;\n\n customer?: Partial<Customer> | null;\n accountDomain?: Partial<AccountDomain> | null;\n accountPaymentMethod?: Partial<AccountPaymentMethod> | null;\n}\n\nexport interface CartItem {\n id: string;\n productId: string;\n productVariantId: string;\n name: string;\n unitPrice: number; // Precio cuando se agregó al carrito\n quantity: number;\n image?: string;\n thumbnailUrl?: string; // URL del thumbnail de la variante\n sku?: string;\n attributeDetails: CartItemAttributeDetail[]; // Detalles legibles de atributos\n \n validation?: CartItemValidation; // Información de validación del item en dto\n}\n\n\nexport interface CartItemAttributeDetail {\n name: string; // Nombre del atributo (ej: \"Talle\", \"Color\")\n alias: string; // Alias del atributo (ej: \"size\", \"color\")\n value: string; // Valor del atributo (ej: \"M\", \"Rojo\")\n type?: string; // Tipo del atributo (opcional)\n}\n\nexport enum CartStatus {\n ACTIVE = 'ACTIVE',\n LOCKED = 'LOCKED',\n EXPIRED = 'EXPIRED',\n CONVERTED = 'CONVERTED',\n ABANDONED = 'ABANDONED',\n MERGED = 'MERGED'\n}\n\nexport enum CartSource {\n WEB = 'WEB',\n POS = 'POS',\n API = 'API'\n}\n\nexport enum CartDeliveryType {\n SHIPPING = 'SHIPPING',\n PICKUP = 'PICKUP'\n}\n\n\n\n\n","import { OrderSource } from \"../order\";\n\n/**\n * Add an item to the cart\n*/\nexport interface CartItemAddDto {\n cartId: string;\n productId: string;\n variantId?: string;\n quantity: number;\n attributes?: { [key: string]: string | number; };\n userEmail?: string;\n userId?: string;\n}\n\n/**\n * Update an item in the cart\n */\nexport interface CartItemUpdateDto {\n cartId: string;\n itemId: string;\n quantity: number;\n}\n\n/**\n * Remove an item from the cart\n */\nexport interface CartItemRemoveDto {\n cartId: string;\n itemId: string;\n}\n\nexport interface CartUpdateDto {\n cartId: string;\n source: OrderSource;\n accountDomainId?: string;\n customer: {\n email: string;\n };\n delivery: {\n type: 'SHIPPING' | 'PICKUP';\n deliveryOptionId?: string;\n pickupBranchId?: string;\n firstname: string;\n lastname: string;\n phone: {\n countryCode: string;\n national: string;\n international: string;\n type: string;\n validated: boolean;\n };\n address: {\n country: string;\n department: string;\n locality: string;\n street: string;\n complement?: string;\n notes?: string;\n postalCode: string;\n mapPosition: {\n lat: number;\n lng: number;\n };\n };\n };\n billing: {\n name: string;\n address: string;\n city: string;\n department: string;\n };\n}\n\n/**\n * Confirm a cart\n */\nexport interface CartConfirmDto {\n cartId: string;\n}\n\n/**\n * Validation information for a cart item\n */\nexport interface CartItemValidation {\n hasIssues: boolean; // Indica si hay problemas con este item\n issues: string[]; // Lista de problemas encontrados (mensajes legibles)\n errorCode?: CartItemErrorCode; // Código específico del error principal\n currentPrice?: number; // Precio actual del producto (si cambió)\n availableStock?: number; // Stock disponible actual\n isProductActive?: boolean; // Si el producto está activo\n}\n\n/**\n * Error codes for cart items\n */\nexport enum CartItemErrorCode {\n PRICE_INCREASED = 'PRICE_INCREASED', // Precio aumentó\n PRICE_DECREASED = 'PRICE_DECREASED', // Precio disminuyó \n PRODUCT_INACTIVE = 'PRODUCT_INACTIVE', // Producto ya no está disponible\n STOCK_INSUFFICIENT = 'STOCK_INSUFFICIENT', // Stock insuficiente (hay algo disponible)\n STOCK_UNAVAILABLE = 'STOCK_UNAVAILABLE', // Sin stock (0 disponible)\n VALIDATION_ERROR = 'VALIDATION_ERROR' // Error general de validación\n}\n","/**\n * Entidad Customer\n * Cliente de la tienda\n*/\nimport { Phone } from \"../common/Phone\";\n\nexport interface Customer {\n id: string;\n accountId: string;\n firstName?: string;\n lastName?: string;\n email: string;\n phone?: Phone;\n status: CustomerStatus;\n createdAt: Date;\n updatedAt: Date;\n deletedAt?: Date | null;\n}\n\nexport enum CustomerStatus {\n ACTIVE = 'ACTIVE',\n INACTIVE = 'INACTIVE',\n BLACKLISTED = 'BLACKLISTED', // e.g., for fraudulent activity\n PENDING = 'PENDING', // e.g., email verification needed\n}","import { AccountIntegration } from \"../accountIntegration\";\n/**\n * Entidad Integration\n * Define las integraciones de terceros disponibles en la plataforma (ej. pasarelas de pago, transportistas).\n * Almacena información sobre el proveedor, categoría y esquema de parámetros requeridos.\n */\n\nexport enum IntegrationCategory {\n\tPAYMENT_GATEWAY = 'PAYMENT_GATEWAY',\n\tSHIPPING_CARRIER = 'SHIPPING_CARRIER',\n\tMARKETPLACE = 'MARKETPLACE',\n\tEMAIL_MARKETING = 'EMAIL_MARKETING',\n\tANALYTICS = 'ANALYTICS',\n\tACCOUNTING = 'ACCOUNTING',\n\tSOCIAL_MEDIA = 'SOCIAL_MEDIA',\n\tOTHER = 'OTHER',\n}\n\nexport enum IntegrationStatus {\n\tACTIVE = 'ACTIVE',\n\tINACTIVE = 'INACTIVE',\n\tBETA = 'BETA',\n\tDEPRECATED = 'DEPRECATED',\n}\n\nexport interface Integration {\n\tid: string;\n\tcategory: IntegrationCategory;\n\tproviderKey: string; // Unique identifier key (e.g., 'stripe', 'mercadopago')\n\tname: string; // Human-readable name (e.g., \"Stripe\", \"Mercado Pago\")\n\tslug: string;\n\tdescription?: string;\n\tsetupInstructions?: string; // General instructions or link to docs\n\tlogoUrl?: string; // URL to the integration's logo\n\trequiredParamsSchema?: any; // Define required parameters/credentials structure\n\tsupportedPaymentMethods?: string[]; // List of supported payment methods (e.g., 'visa', 'mastercard', 'american_express', 'bank_transfer', 'cash')\n\tstatus: IntegrationStatus;\n\tcreatedAt: Date;\n\tupdatedAt: Date;\n\tdeletedAt?: Date | null;\n\torder: number;\n\n\taccountIntegration: AccountIntegration | null;\n}","import { Currency, Media } from \"../common\";\nimport { Customer } from \"../customer\";\nimport { AccountIntegration } from \"../accountIntegration\";\nimport { AccountDomain } from \"../accountDomain\";\nimport { Product } from \"../product\";\nimport { FulfillmentStatus } from \"../fulfillment/types\";\nimport { StatusInfo } from \"../common/Status\";\nimport { PaymentStatus } from \"../payment\";\nimport { AccountPaymentMethod } from \"../accountPaymentMethod\";\n\n/**\n * Entidad Order\n * Define la orden de compra de un cliente en el sitio web.\n */\n\nexport interface Order {\n id: string;\n accountId: string;\n customerId: string;\n cartId?: string;\n code: string;\n deliveryType: OrderDeliveryType;\n deliveryFirstName?: string;\n deliveryLastName?: string;\n deliveryAddress?: any;\n deliveryPhone?: any;\n deliveryOptionId?: string;\n pickupBranchId?: string;\n accountPaymentMethodId?: string;\n paymentMethodIntegrationId?: string;\n billingInformation?: any;\n currency: Currency;\n currencySymbol?: string;\n subtotalPrice: number;\n totalDiscounts: number;\n totalShippingPrice: number;\n totalTax: number;\n taxDetails?: any;\n totalPrice: number;\n totalRefunded: number;\n status: OrderStatus;\n statusInfo?: StatusInfo;\n paymentStatus: OrderPaymentStatus;\n paymentStatusInfo?: StatusInfo;\n fulfillmentStatus: FulfillmentStatus;\n statusHistory?: StatusChangeHistory[];\n customerNote?: string;\n internalNote?: string;\n source: OrderSource;\n sourceAccountDomainId?: string;\n demo: boolean;\n createdAt: Date;\n updatedAt: Date;\n cancelledAt?: Date;\n cancelReason?: string;\n deletedAt?: Date;\n items?: OrderItem[];\n\n customer?: Customer | null;\n paymentMethodIntegration?: AccountIntegration | null;\n accountDomain?: AccountDomain;\n accountPaymentMethod?: Partial<AccountPaymentMethod> | null;\n\n statusFlow?: StatusFlow[];\n // Estados permitidos para cambiar el estado de la orden\n statusChangeAllowed?: OrderStatus[];\n}\n\nexport interface OrderItem {\n id: string;\n accountId: string;\n orderId: string;\n productId: string;\n productVariantId: string;\n sku?: string;\n productName: string;\n variantName?: string;\n currency: Currency;\n currencySymbol?: string;\n unitPrice: number;\n totalDiscount: number;\n totalPrice: number;\n quantity: number;\n quantityFulfilled: number;\n quantityRefunded: number;\n quantityReturned: number;\n totalTax: number;\n taxName?: string;\n createdAt: Date;\n updatedAt: Date;\n\n // Snapshot del producto en el momento de la compra\n productSnapshot?: OrderItemSnapshot;\n\n product?: Product;\n}\n\nexport enum OrderStatus {\n PENDING = 'PENDING', // Order placed, awaiting payment confirmation\n CONFIRMED = 'CONFIRMED', // Payment received, order confirmed\n PROCESSING = 'PROCESSING', // Order being prepared\n PROCESSED = 'PROCESSED', // Order ready to be shipped\n ON_HOLD = 'ON_HOLD', // Order temporarily paused\n COMPLETED = 'COMPLETED', // Order finished (e.g., after return period)\n CANCELLED = 'CANCELLED', // Order cancelled before fulfillment\n FAILED = 'FAILED', // Order failed (e.g., payment failed irrecoverably)\n}\n\nexport enum OrderPaymentStatus {\n PENDING = 'PENDING',\n PARTIAL = 'PARTIAL',\n PAID = 'PAID',\n OVERPAID = 'OVERPAID',\n REFUNDED = 'REFUNDED',\n PARTIALLY_REFUNDED = 'PARTIALLY_REFUNDED'\n}\n\nexport enum OrderSource {\n WEB = 'WEB',\n POS = 'POS',\n API = 'API'\n}\n\nexport enum OrderDeliveryType {\n SHIPPING = 'SHIPPING',\n PICKUP = 'PICKUP',\n}\n\nexport interface StatusChangeHistory {\n status: OrderStatus;\n timestamp: Date;\n reason?: string;\n userId?: string;\n metadata?: Record<string, any>;\n}\n\nexport interface OrderItemSnapshot {\n sku?: string;\n productName: string;\n variantName?: string;\n media?: Media[];\n}\n\ntype StatusByType = {\n order: OrderStatus;\n fulfillment: FulfillmentStatus;\n payment: PaymentStatus;\n};\n\nexport type StatusFlow<T extends keyof StatusByType = keyof StatusByType> = {\n type: T;\n status: StatusByType[T];\n text?: string;\n doneAt: Date | null;\n};\n\nexport type NextStatusAction<T extends keyof StatusByType = keyof StatusByType> = {\n type: T;\n status: StatusByType[T];\n text: string;\n};","import { StatusInfo } from \"../common/Status\";\nimport { OrderStatus } from \"./types\";\n\nexport function getOrderStatusInfo(status: OrderStatus): StatusInfo {\n\tconst map: Record<OrderStatus, StatusInfo> = {\n\t\tPENDING: { text: 'Pendiente', class: 'secondary', actionText: '' },\n\t\tCONFIRMED: { text: 'Confirmada', class: 'info', actionText: 'Confirmar orden' },\n\t\tPROCESSING: { text: 'En proceso', class: 'warning', actionText: 'Procesar orden' },\n\t\tPROCESSED: { text: 'Procesada', class: 'primary', actionText: 'Orden procesada' },\n\t\tON_HOLD: { text: 'En espera', class: 'secondary', actionText: 'Orden en espera' },\n\t\tCOMPLETED: { text: 'Completada', class: 'success', actionText: 'Completar orden' }, \n\t\tCANCELLED: { text: 'Cancelada', class: 'danger', actionText: 'Cancelar orden' },\n\t\tFAILED: { text: 'Fallida', class: 'danger', actionText: '' },\n\t};\n\n\treturn map[status] ?? { text: String(status), class: 'secondary' };\n}","// shared-types/src/payment/types.ts\n\nimport { Currency } from \"../common\";\nimport { AccountPaymentMethod } from \"../accountPaymentMethod\";\n\nexport enum PaymentStatus {\n PENDING = 'PENDING', // Pendiente\n PREAUTHORIZED = 'PREAUTHORIZED',\n APPROVED = 'APPROVED', // Pago aprobado online\n PAID = 'PAID', // Pago realizado por redes fisicas\n REJECTED = 'REJECTED', // Pago rechazado\n REFUND_IN_PROCESS = 'REFUND_IN_PROCESS', // En proceso de reembolso con la plataforma de pagos\n PARTIAL_REFUND = 'PARTIAL_REFUND', // Pago parcialmente reembolsado\n REFUNDED = 'REFUNDED', // Pago reembolsado\n ERROR = 'ERROR' // Represents an error in porcessing the payment. Ex: a webhook comes without an esternal reference, so we can't match in our system\n}\n\nexport enum PaymentMethodType {\n BANK_TRANSFER = 'BANK_TRANSFER',\n CREDIT_CARD = 'CREDIT_CARD',\n DEBIT_CARD = 'DEBIT_CARD',\n MERCADOPAGO = 'MERCADOPAGO',\n PHYSICAL = 'PHYSICAL',\n INTERNATIONAL = 'INTERNATIONAL',\n PAYPAL = 'PAYPAL',\n CASH = 'CASH',\n OTHER = 'OTHER', // Added for flexibility\n}\nexport interface Payment {\n id: string;\n accountId: string;\n orderId: string;\n invoiceId?: string;\n accountPaymentMethodId?: string;\n gatewayPaymentId?: string;\n referenceCode?: string;\n paymentMethodType?: PaymentMethodType;\n currency: Currency;\n amount: number;\n amountReceived: number;\n amountRefunded: number;\n paidAt?: string | Date;\n refundedAt?: string | Date;\n status: PaymentStatus;\n cardBrand?: string;\n cardBrandInfo?: PaymentCardBrand;\n cardLast4?: string;\n data?: Record<string, unknown>\n metadata?: Record<string, any>;\n demo: boolean;\n createdAt: string | Date;\n updatedAt: string | Date;\n deletedAt?: string | Date;\n\n accountPaymentMethod?: Partial<AccountPaymentMethod> | null;\n}\n\n// Provider-level types (entity-agnostic, reusable across projects)\nexport type PaymentProviderKey = 'MERCADOPAGO' | 'MANUAL';\n\n// TODO: Eventually refactor what is passed to the payment provider constructor, as it most likely just need\nexport interface PaymentProviderContext {\n data: Record<string, unknown>\n}\n\nexport interface PaymentProviderInitInput {\n // Arbitrary provider input. Caller builds this from their domain data\n data: Record<string, any>;\n}\n\nexport interface PaymentProviderInitOutput {\n data: Record<string, any>;\n status: PaymentStatus\n}\n\nexport interface PaymentProviderCaptureInput {\n data: Record<string, any>;\n}\n\nexport interface PaymentProviderCaptureOutput {\n data: Record<string, any>;\n}\n\nexport interface PaymentProviderRefundInput {\n amount: number;\n data: Record<string, any>;\n}\n\nexport interface PaymentProviderRefundOutput {\n data: Record<string, any>;\n}\n\nexport interface PaymentProviderWebhookResult {\n //TODO: Ideally, if later an order can have multiple payments, the way to link thrid party payments with our own payment entity, should be throu something like a \n // payment session in our system, that would be set as the external reference in the third party payment\n order_code: string | null\n status: PaymentStatus\n data: Record<string, unknown>\n // TODO: Ideally i think this should live inside the data field, not have separate columns and just let the consumer know what\n // attributes to query to resolve them\n paymentDetails: {\n method?: string,\n last4?: string\n }\n}\n\nexport interface WebhookPayload {\n // Id of payment provider webhook belongs to, to pass data for processing\n provider: string;\n accountId: string;\n payload: {\n query: Record<string, unknown>\n body: Record<string, unknown>\n headers: Record<string, unknown>\n }\n}\n\nexport enum PaymentCardBrandKey {\n mp_account_money = 'mp_account_money',\n}\n\nexport interface PaymentCardBrand {\n key: string;\n name: string;\n image: string;\n}\n\nexport function getPaymentCardBrand(key: PaymentCardBrandKey): PaymentCardBrand {\n const map: Record<PaymentCardBrandKey, PaymentCardBrand> = {\n mp_account_money: {\n key: PaymentCardBrandKey.mp_account_money,\n name: 'Mercado Pago',\n image: 'https://storage.googleapis.com/retaila-assets/payments/mercadopago.png',\n },\n }\n return map[key] || {\n key,\n name: '',\n image: null,\n }\n}\n\nexport interface PaymentProviderAdapter {\n readonly key: PaymentProviderKey;\n initPayment(input: PaymentProviderInitInput): Promise<PaymentProviderInitOutput>;\n capture(input: PaymentProviderCaptureInput): Promise<PaymentProviderCaptureOutput>\n refund(input: PaymentProviderRefundInput): Promise<PaymentProviderRefundOutput>;\n processWebhook(input: WebhookPayload['payload']): Promise<PaymentProviderWebhookResult>\n}","import { StatusInfo } from \"../common/Status\";\nimport { PaymentStatus } from \"./types\";\n\nexport function getPaymentStatusInfo(status: PaymentStatus): StatusInfo {\n\tconst map: Record<PaymentStatus, StatusInfo> = {\n\t\tPENDING: { text: 'Pago pendiente', class: 'warning', actionText: '' },\n\t\tPREAUTHORIZED: { text: 'Pago preautorizado', class: 'info', actionText: 'Preautorizar pago' },\n\t\tAPPROVED: { text: 'Pago aprobado', class: 'success', actionText: 'Aprobar pago' },\n\t\tPAID: { text: 'Pago realizado', class: 'success', actionText: 'Pago realizado' },\n\t\tREJECTED: { text: 'Pago rechazado', class: 'danger', actionText: 'Rechazar pago' },\n\t\tREFUND_IN_PROCESS: { text: 'Pago en proceso de reembolso', class: 'warning', actionText: 'Reembolsar pago' },\n\t\tPARTIAL_REFUND: { text: 'Pago parcialmente reembolsado', class: 'warning', actionText: 'Reembolsar pago' },\n\t\tREFUNDED: { text: 'Pago reembolsado', class: 'success', actionText: 'Reembolsado' },\n\t\tERROR: { text: 'Error en pago', class: 'danger', actionText: 'Error en pago' },\n\t};\n\n\treturn map[status] ?? { text: String(status), class: 'secondary' };\n}","import { Media } from \"../common\";\nimport { StatusInfo } from \"../common/Status\";\nimport { ProductCategory } from \"../productCategory\";\n\n/**\n * Entidad Product\n * Representa un producto vendible en la tienda. Es la entidad base que puede tener múltiples variantes.\n */\n\nexport interface Product {\n id: string;\n accountId: string;\n code: string;\n brandId?: string | null;\n supplierId?: string | null;\n productType: ProductType;\n sku?: string | null;\n barcode?: string | null;\n name: string; // e.g., \"Zapatos\", \"Pantalones\", \"Camisas\"\n slug: string;\n description?: string | null;\n isFeatured: boolean;\n\n // Inventory & Shipping\n allowBackorder: boolean; // Permite realizar pedidos aunque no haya stock disponible. Se aplica a las variantes si no está definido allí\n weight?: number | null;\n weightUnit?: string | null; // e.g., \"kg\"\n height?: number | null;\n width?: number | null;\n depth?: number | null; \n dimensionUnit?: string | null; // e.g., \"cm\"\n shippingLeadTime?: string | null; // e.g., \"1-3 days\"\n\n status: ProductStatus; // ACTIVE, INACTIVE\n statusInfo?: StatusInfo;\n \n createdAt: Date;\n updatedAt: Date;\n deletedAt?: Date | null;\n\n media?: Media[]\n\n variants?: ProductVariant[];\n categories?: ProductCategory[];\n}\n\nexport enum ProductStatus {\n ACTIVE = 'ACTIVE', // Available for sale\n INACTIVE = 'INACTIVE', // Not visible/purchasable\n ARCHIVED = 'ARCHIVED', // Not visible, kept for records\n DRAFT = 'DRAFT', // Incomplete product setup\n}\n\nexport enum ProductType {\n SIMPLE = 'SIMPLE', // Product without variants (may have a default hidden variant)\n VARIABLE = 'VARIABLE', // Product with distinct variants (color, size, etc.)\n BUNDLE = 'BUNDLE', // A package of other products/variants\n GIFT_CARD = 'GIFT_CARD', // Virtual or physical gift card\n}\n\n\nexport interface ProductVariant {\n id: string;\n accountId: string;\n productId: string;\n\n sku?: string | null;\n barcode?: string | null; // EAN, UPC, etc.\n\n // Pricing\n currency: string; // ISO 4217 currency code\n price: number;\n compareAtPrice?: number;\n allowBackorder?: boolean;\n \n // Inventory & Shipping\n stock: number;\n weight?: number | null;\n weightUnit?: string | null;\n height?: number | null;\n width?: number | null;\n depth?: number | null;\n dimensionUnit?: string | null;\n shippingLeadTime?: string | null; // e.g., \"1-3 days\"\n \n order: number;\n\n createdAt: Date;\n updatedAt: Date;\n deletedAt?: Date;\n\n}","import { StatusInfo } from \"../common/Status\";\nimport { ProductStatus } from \"./types\";\n\nexport function getProductStatusInfo(status: ProductStatus): StatusInfo {\n\tconst map: Record<ProductStatus, StatusInfo> = {\n\t\tACTIVE: { text: 'Activo', class: 'success' },\n\t\tINACTIVE: { text: 'Inactivo', class: 'danger' },\n\t\tARCHIVED: { text: 'Archivado', class: 'secondary' },\n\t\tDRAFT: { text: 'Borrador', class: 'secondary' },\n\t};\n\n\treturn map[status] ?? { text: String(status), class: 'secondary' };\n}","/**\n * Entidad ProductAttribute\n * Define los atributos disponibles que se pueden asignar a las variantes de producto (ej. Color, Talla).\n * Especifica el nombre y tipo del atributo para ayudar en la representación y filtrado.\n */\n\nimport { ProductCategory } from \"../productCategory/types\";\n\nexport interface ProductAttribute {\n id: string;\n accountId: string;\n name: string; // e.g., \"Color de zapatos\", \"Talle de pantalones\", \"Material\"\n alias: string; // e.g., \"Color\", \"Talla\", \"Material\"\n slug: string;\n type: ProductAttributeType; // Helps frontend render appropriate controls\n isRequired: boolean; // isRequired for product variant\n suffix: string; // suffix for number type\n status: ProductAttributeStatus; // ACTIVE, INACTIVE\n \n createdAt: Date;\n updatedAt: Date;\n deletedAt?: Date | null;\n\n // dejo las categorias planas y los links de la tabla pivot por si necesito acceder a ellas\n productCategories: ProductCategory[]; // conveniente\n productCategoryLinks: Array<{ categoryId: string; isRequired: boolean; displayOrder: number }>;\n\n options: ProductAttributeOption[];\n displayOrder: number; // order to display the attribute in the frontend\n}\n\nexport enum ProductAttributeStatus {\n ACTIVE = 'ACTIVE',\n INACTIVE = 'INACTIVE',\n}\n\n\nexport enum ProductAttributeType {\n TEXT = 'TEXT', // text input\n NUMBER = 'NUMBER', // number input\n COLOR = 'COLOR', // Special type for color swatches\n SELECT = 'SELECT', // Dropdown list\n BOOLEAN = 'BOOLEAN', // checkbox input\n}\n\n/**\n * Una opción específica para un atributo (ej. \"Talle 42\" para el atributo \"Talle\").\n */\nexport interface ProductAttributeOption {\n id: string;\n accountId: string;\n productAttributeId: string;\n value: string;\n imageId?: string | null;\n order: number;\n createdAt: Date;\n updatedAt: Date;\n deletedAt?: Date | null;\n\n count: number; // number of options\n}","import { StandardCategory } from \"../standardCategory\";\n\n/**\n * Entidad ProductCategory\n * Define las categorías de productos.\n * Soporta una estructura jerárquica (categorías y subcategorías) mediante el campo parentId.\n * Cada categoría debe estar asociada a una categoría estándar del sistema.\n */\n\nexport interface ProductCategory {\n id: string;\n accountId: string;\n parentId?: string;\n standardCategoryId: string;\n name: string; // e.g., \"Zapatos\", \"Pantalones\", \"Camisas\"\n slug: string;\n description?: string;\n imageId?: string | null;\n order: number;\n isFeatured: boolean;\n status: ProductCategoryStatus; // ACTIVE, INACTIVE\n createdAt: Date;\n updatedAt: Date;\n deletedAt?: Date | null;\n\n children: ProductCategory[];\n parent: ProductCategory | null;\n standardCategory: StandardCategory;\n}\n\n\nexport enum ProductCategoryStatus {\n ACTIVE = 'ACTIVE',\n INACTIVE = 'INACTIVE',\n}\n\n","/**\n * Entidad StandardCategory\n * Define las categorías estándar de productos.\n * Estas categorías estan pensadas para unificar o agrupar productos de diferentes cuentas.\n */\n\nexport interface StandardCategory {\n id: string;\n parentId?: string;\n name: string; // e.g., \"Zapatos\", \"Pantalones\", \"Camisas\"\n slug: string;\n description?: string;\n imageId?: string | null;\n order: number;\n status: StandardCategoryStatus; // ACTIVE, INACTIVE\n metadata?: {\n icon?: string;\n displayInMenu?: boolean;\n seoTitle?: string;\n seoDescription?: string;\n attributes?: string[];\n };\n createdAt: Date;\n updatedAt: Date;\n deletedAt?: Date | null;\n\n children: StandardCategory[];\n parent: StandardCategory | null;\n}\n\nexport enum StandardCategoryStatus {\n ACTIVE = 'ACTIVE',\n INACTIVE = 'INACTIVE'\n}\n\n","/**\n * Entidad StoreBanner\n * Banners para la portada de la web de la tienda\n */\n\nimport { Media } from \"../common\";\n\nexport interface StoreBanner {\n id: string;\n accountId: string;\n title: string;\n desktopMediaId: string;\n mobileMediaId?: string | null;\n linkUrl?: string | null;\n altText?: string | null;\n displayOrder: number;\n startDate?: Date | null;\n endDate?: Date | null;\n status: StoreBannerStatus;\n createdAt: Date;\n updatedAt: Date;\n deletedAt?: Date | null;\n\n // Relationships\n desktopMedia?: Partial<Media> | null;\n mobileMedia?: Partial<Media> | null;\n}\n\nexport enum StoreBannerStatus {\n ACTIVE = \"ACTIVE\",\n INACTIVE = \"INACTIVE\"\n}\n\n ","/**\n * Entidad StorePage\n * Páginas de la web de la tienda\n */\n\nexport interface StorePage {\n id: string;\n accountId: string;\n type: StorePageType;\n title: string;\n slug: string;\n content?: string | null;\n seoTitle?: string | null;\n seoDescription?: string | null;\n \n status: StorePageStatus;\n canDelete: boolean;\n createdAt: Date;\n updatedAt: Date;\n deletedAt?: Date | null;\n}\n\nexport enum StorePageStatus {\n PUBLISHED = 'PUBLISHED',\n DRAFT = 'DRAFT',\n ARCHIVED = 'ARCHIVED',\n}\n\nexport enum StorePageType {\n ABOUT_US = 'ABOUT_US',\n CONTACT = 'CONTACT',\n FAQ = 'FAQ',\n TERMS_AND_CONDITIONS = 'TERMS_AND_CONDITIONS',\n PRIVACY_POLICY = 'PRIVACY_POLICY',\n RETURN_POLICY = 'RETURN_POLICY',\n SHIPPING_POLICY = 'SHIPPING_POLICY',\n BRANCHES = 'BRANCHES',\n JOBS = 'JOBS',\n OTHER = 'OTHER',\n}\n\n\n ","export enum PubSubTopics {\n ORDER_PLACED = 'order-placed',\n ORDER_CONFIRMED = 'order-confirmed',\n ORDER_PROCESSING = 'order-processing',\n ORDER_PROCESSED = 'order-processed',\n ORDER_COMPLETED = 'order-completed',\n ORDER_CANCELLED = 'order-cancelled',\n PAYMENT_PAID = 'payment-paid',\n NOTIFICATION_CREATED = 'notification-created',\n }","import { Account } from \"../account/types\";\nimport { Customer } from \"../customer/types\";\n\n\n// origen principal del hilo de conversación\nexport enum SupportConversationChannel {\n\tWEB = 'WEB',\n\tEMAIL = 'EMAIL',\n\tWHATSAPP = 'WHATSAPP'\n}\n\n// quién puede ver el hilo en el tenant\nexport enum SupportConversationVisibility {\n\tINTERNAL = 'INTERNAL',\n\tMERCHANT = 'MERCHANT'\n}\n\nexport enum SupportConversationPriority {\n\tLOW = 'LOW',\n\tMEDIUM = 'MEDIUM',\n\tHIGH = 'HIGH',\n\tURGENT = 'URGENT'\n}\n\nexport enum SupportConversationStatus {\n\tOPEN = 'OPEN',\n\tCLOSED = 'CLOSED',\n\tPENDING = 'PENDING'\n}\n\nexport enum SupportConversationMessageDeliveryStatus {\n\tQUEUED = 'QUEUED',\n\tSENT = 'SENT',\n\tDELIVERED = 'DELIVERED',\n\tREAD = 'READ',\n\tFAILED = 'FAILED'\n}\n\nexport enum SupportConversationMessageAiAnalysisStatus {\n\tPENDING = 'PENDING',\n\tPROCESSING = 'PROCESSING',\n\tCOMPLETED = 'COMPLETED',\n\tFAILED = 'FAILED'\n}\n\n// Dirección del mensaje con respecto al sistema: entrante o saliente\nexport enum SupportConversationMessageDirection {\n\tINBOUND = 'INBOUND',\n\tOUTBOUND = 'OUTBOUND'\n }\n \n // Tipo de emisor del mensaje\n export enum SupportConversationMessageSenderType {\n\tCUSTOMER = 'CUSTOMER',\n\tACCOUNT_USER = 'ACCOUNT_USER',\n\tANONYMOUS = 'ANONYMOUS',\n\tSYSTEM = 'SYSTEM',\n\tAI = 'AI'\n }\n\nexport interface SupportConversation {\n\tid: string;\n\taccountId: string;\n\tsubject?: string | null; // Asunto opcional del hilo (para email o contacto web)\n\tchannel: SupportConversationChannel; // Canal principal de la conversación (email/whatsapp/web, etc.)\n\tassigneeId?: string | null; // Asignación interna (agente/usuario de la cuenta que atiende la conversación)\n\tvisibility: SupportConversationVisibility;\n\tpriority: SupportConversationPriority; // Priorización operativa\n\trequiresMerchantAction: boolean; // Indica si el comercio debe responder o tomar acción\n\trequiresInternalAction: boolean; // Indica si el equipo interno debe intervenir (respuesta, etc.)\n\tcustomerId?: string | null; // Identificador del cliente si está registrado en el sistema\n\tcustomerName?: string | null; // Nombre del contacto (snapshot, no necesariamente el del Customer)\n\tcustomerLastname?: string | null; // Apellido del contacto (snapshot)\n\tcustomerEmail?: string | null; // Email del contacto (snapshot)\n\tcustomerPhone?: string | null; // Teléfono del contacto (snapshot)\n\tstatus: SupportConversationStatus; // Estado simple (string para mantenerlo liviano)\n\tlastMessageAt?: Date | null;\n\tunreadForAgent: number; // Mensajes no leídos por el agente interno\n\tunreadForCustomer: number; // Mensajes no leídos por el cliente/comercio\n\tmetadata?: Object | null; // Metadatos flexibles (headers email, ids de chat, etc.)\n\taiSuggestion?: Object | null; // Sugerencias/Resumen asistidos por IA\n\tcreatedAt: Date;\n\tupdatedAt: Date;\n\tdeletedAt?: Date | null;\n\n\taccount: Account;\n\t// assignee: AccountUser | null;\n\tcustomer: Customer | null;\n\tmessages: SupportConversationMessage[];\n}\n\n\nexport interface SupportConversationMessage {\n id: string;\n accountId: string;\n conversationId: string;\n direction: SupportConversationMessageDirection; // Dirección simple (entrante/saliente)\n senderType: SupportConversationMessageSenderType; // Tipo de emisor del mensaje (cliente, usuario interno, anónimo, sistema o IA)\n senderId?: string | null; // Identificador del emisor cuando aplica (Customer o AccountUser). Puede ser null para anónimos, sistema o IA\n body: string;\n isAiGenerated: boolean;\n isSystem: boolean;\n deliveryStatus: SupportConversationMessageDeliveryStatus; // Estado de entrega (para OUTBOUND). Por defecto QUEUED para ser enviado por el canal.\n requiresAiAnalysis: boolean;\n aiAnalysisStatus: SupportConversationMessageAiAnalysisStatus;\n aiAnalyzedAt?: Date | null;\n externalMessageId?: string | null; // Identificadores de proveedor externo (messageId, threadId)\n externalThreadId?: string | null;\n attachments?: Array<{\n url: string;\n type?: string;\n name?: string;\n sizeBytes?: number;\n }>; // Adjuntos simples (urls o descriptores livianos) \n metadata?: Object | null; // Metadatos flexibles (headers, payloads originales, etc.)\n createdAt: Date;\n updatedAt: Date;\n deletedAt?: Date | null;\n}\n","import { FulfillmentItem } from \"../fulfillmentItem\";\n\nexport enum FulfillmentStatus {\n PENDING = 'pending',\n PACKED = 'packed',\n SHIPPED = 'shipped',\n DELIVERED = 'delivered',\n CANCELLED = 'cancelled',\n}\n\nexport type Fulfillment = {\n id: string;\n accountId: string;\n orderId: string;\n accountBranchId: string;\n carrier: string;\n trackingNumber: string | null;\n items: FulfillmentItem[];\n status: FulfillmentStatus;\n data: Record<string, unknown> | null;\n packedAt: Date | null;\n shippedAt: Date | null;\n deliveredAt: Date | null;\n cancelledAt: Date | null;\n createdAt: Date;\n updatedAt: Date;\n deletedAt?: Date;\n}","import { StatusInfo } from \"../common/Status\";\nimport { FulfillmentStatus } from \"./types\";\n\nexport function getFulfillmentStatusInfo(status: FulfillmentStatus): StatusInfo {\n\tconst map: Record<FulfillmentStatus, StatusInfo> = {\n\t\tpending: { text: 'Pendiente', class: 'warning', actionText: '' },\n\t\tpacked: { text: 'Paquete listo', class: 'info', actionText: 'Paquete listo' },\n\t\tshipped: { text: 'Enviado', class: 'warning', actionText: 'Enviado' },\n\t\tdelivered: { text: 'Entregado', class: 'success', actionText: 'Entregado' },\n\t\tcancelled: { text: 'Cancelado', class: 'danger', actionText: 'Cancelado' },\n\t};\n\n\treturn map[status] ?? { text: String(status), class: 'secondary' };\n}"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACqBO,IAAK,YAAL,kBAAKA,eAAL;AACL,EAAAA,WAAA,WAAQ;AACR,EAAAA,WAAA,WAAQ;AACR,EAAAA,WAAA,aAAU;AACV,EAAAA,WAAA,cAAW;AACX,EAAAA,WAAA,WAAQ;AACR,EAAAA,WAAA,aAAU;AACV,EAAAA,WAAA,WAAQ;AAPE,SAAAA;AAAA,GAAA;;;ACrBL,IAAK,WAAL,kBAAKC,cAAL;AACL,EAAAA,UAAA,SAAM;AACN,EAAAA,UAAA,SAAM;AACN,EAAAA,UAAA,SAAM;AACN,EAAAA,UAAA,SAAM;AACN,EAAAA,UAAA,SAAM;AALI,SAAAA;AAAA,GAAA;AAQL,SAAS,kBAAkB,cAAgC;AAChE,QAAM,kBAA6C;AAAA,IAC/C,CAAC,eAAY,GAAG;AAAA,IAChB,CAAC,eAAY,GAAG;AAAA,IAChB,CAAC,eAAY,GAAG;AAAA,IAChB,CAAC,eAAY,GAAG;AAAA,IAChB,CAAC,eAAY,GAAG;AAAA,EACpB;AAEA,SAAO,gBAAgB,YAAY,KAAK,aAAa,SAA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AAA,mBAAA,aAAU;AACV,EAAAA,mBAAA,YAAS;AACT,EAAAA,mBAAA,aAAU;AACV,EAAAA,mBAAA,eAAY;AACZ,EAAAA,mBAAA,eAAY;AALJ,SAAAA;AAAA,GAAA;;;ACCL,SAAS,yBAAyB,QAAuC;AAC/E,QAAM,MAA6C;AAAA,IAClD,SAAS,EAAE,MAAM,aAAa,OAAO,WAAW,YAAY,GAAG;AAAA,IAC/D,QAAQ,EAAE,MAAM,iBAAiB,OAAO,QAAQ,YAAY,gBAAgB;AAAA,IAC5E,SAAS,EAAE,MAAM,WAAW,OAAO,WAAW,YAAY,UAAU;AAAA,IACpE,WAAW,EAAE,MAAM,aAAa,OAAO,WAAW,YAAY,YAAY;AAAA,IAC1E,WAAW,EAAE,MAAM,aAAa,OAAO,UAAU,YAAY,YAAY;AAAA,EAC1E;AAEA,SAAO,IAAI,MAAM,KAAK,EAAE,MAAM,OAAO,MAAM,GAAG,OAAO,YAAY;AAClE;","names":["MediaType","Currency","AccountStatus","AccountBranchStatus","AccountBranchScheduleStatus","AccountBranchScheduleDay","AccountDeliveryOptionPriceLogic","AccountDeliveryOptionStatus","AccountDeliveryOptionZoneStatus","AccountDomainStatus","AccountIntegrationStatus","AccountIntegrationConnectionStatus","AccountIntegrationEnvironment","AccountPaymentMethodStatus","AccountPaymentMethodType","CartStatus","CartSource","CartDeliveryType","CartItemErrorCode","CustomerStatus","IntegrationCategory","IntegrationStatus","OrderStatus","OrderPaymentStatus","OrderSource","OrderDeliveryType","PaymentStatus","PaymentMethodType","PaymentCardBrandKey","ProductStatus","ProductType","ProductAttributeStatus","ProductAttributeType","ProductCategoryStatus","StandardCategoryStatus","StoreBannerStatus","StorePageStatus","StorePageType","PubSubTopics","SupportConversationChannel","SupportConversationVisibility","SupportConversationPriority","SupportConversationStatus","SupportConversationMessageDeliveryStatus","SupportConversationMessageAiAnalysisStatus","SupportConversationMessageDirection","SupportConversationMessageSenderType","FulfillmentStatus"]}
1
+ {"version":3,"sources":["../src/index.ts","../src/common/Media.ts","../src/common/Currency.ts","../src/account/types.ts","../src/accountBranch/types.ts","../src/accountDeliveryOption/types.ts","../src/accountDomain/types.ts","../src/accountIntegration/types.ts","../src/accountPaymentMethod/types.ts","../src/accountPaymentMethod/helpers.ts","../src/cart/types.ts","../src/cart/dto.ts","../src/customer/types.ts","../src/integration/types.ts","../src/order/types.ts","../src/order/helpers.ts","../src/payment/types.ts","../src/payment/helpers.ts","../src/product/types.ts","../src/product/helpers.ts","../src/productAttribute/types.ts","../src/productCategory/types.ts","../src/standardCategory/types.ts","../src/storeBanner/types.ts","../src/storePage/types.ts","../src/pubsub/types.ts","../src/supportConversation/types.ts","../src/fulfillment/types.ts","../src/fulfillment/helpers.ts"],"sourcesContent":["// shared-types/src/index.ts - Main exports for shared types package\n\n// Common types\nexport * from './common';\n\n// Entity-specific exports\nexport * from './account';\nexport * from './accountBranch';\nexport * from './accountDeliveryOption';\nexport * from './accountDomain';\nexport * from './accountIntegration';\nexport * from './accountPaymentMethod';\nexport * from './cart';\nexport * from './customer';\nexport * from './integration';\nexport * from './order';\nexport * from './payment'\nexport * from './product';\nexport * from './productAttribute';\nexport * from './productCategory';\nexport * from './standardCategory';\nexport * from './storeBanner';\nexport * from './storePage';\nexport * from './pubsub';\nexport * from './supportConversation';\nexport * from './fulfillment';\nexport * from './storeCustomization';\n\n","/**\n * Entidad Media\n * Se utiliza para almacenar y gestionar archivos y recursos multimedia.\n */\n\nexport interface Media {\n id: string;\n accountId: string;\n filename: string;\n url: string;\n thumbnailUrl: string;\n mimeType: string;\n extension: string;\n size: number;\n type: MediaType;\n altText: string;\n createdAt: Date;\n updatedAt: Date;\n deletedAt?: Date | null;\n}\n\nexport enum MediaType {\n IMAGE = 'IMAGE',\n VIDEO = 'VIDEO',\n FAVICON = 'FAVICON',\n DOCUMENT = 'DOCUMENT',\n AUDIO = 'AUDIO',\n ARCHIVE = 'ARCHIVE',\n OTHER = 'OTHER',\n}\n\n\n","export enum Currency {\n ARS = 'ARS', // Peso argentino\n BRL = 'BRL', // Real brasileño\n CLP = 'CLP', // Peso chileno\n COP = 'COP', // Peso colombiano\n EUR = 'EUR', // Euro\n MXN = 'MXN', // Peso mexicano\n PEN = 'PEN', // Sol peruano\n PYG = 'PYG', // Guaraní paraguayo\n USD = 'USD', // Dólar estadounidense\n UYU = 'UYU', // Peso uruguayo\n}\n\n\n\nexport function getCurrencySymbol(currencyCode: Currency): string {\n const currencySymbols: { [key: string]: string } = {\n [Currency.USD]: 'U$S',\n [Currency.EUR]: '€',\n [Currency.UYU]: '$',\n [Currency.ARS]: '$',\n [Currency.BRL]: 'R$',\n };\n \n return currencySymbols[currencyCode] || currencyCode.toString();\n} \n\n\n","// shared-types/src/account/types.ts - Account entity types\n\nexport interface Account {\n id: string;\n name: string;\n slug: string;\n address?: string;\n logoId?: string;\n currency: string;\n instagram?: string;\n facebook?: string;\n whatsapp?: string;\n phone?: string;\n email: string;\n timezone: string;\n hasDelivery: boolean;\n status: AccountStatus;\n themeConfig?: ThemeConfig;\n privateKey?: string;\n demo: boolean;\n createdAt: Date;\n updatedAt: Date;\n deletedAt?: Date;\n}\n\nexport enum AccountStatus {\n ACTIVE = 'ACTIVE',\n INACTIVE = 'INACTIVE',\n PENDING = 'PENDING',\n SUSPENDED = 'SUSPENDED',\n}\n\nexport interface ThemeConfig {\n backgroundColor: string;\n textColor: string;\n primaryColor: string;\n secondaryColor: string;\n}\n ","import { AccountDeliveryOption } from \"../accountDeliveryOption/types\";\nimport { Address, MapPosition, Phone } from \"../common\";\n\n/**\n * Entidad AccountBranch\n * Representa una sucursal de una cuenta.\n */\n\nexport interface AccountBranch {\n id: string;\n accountId: string;\n name: string;\n address?: Address; \n addressInstructions?: string;\n addressCoordinates?: MapPosition | null;\n phone?: Phone | null;\n email?: string | null;\n demo:boolean;\n status: AccountBranchStatus; \n createdAt: Date;\n updatedAt: Date;\n deletedAt?: Date | null;\n\n schedule: AccountBranchSchedule[];\n deliveryOptions: AccountDeliveryOption[];\n}\n\nexport enum AccountBranchStatus {\n ACTIVE = \"ACTIVE\",\n INACTIVE = \"INACTIVE\"\n}\n\n \nexport interface AccountBranchSchedule {\n id: string;\n accountBranchId: string;\n day: AccountBranchScheduleDay;\n start: number;\n end: number;\n status: AccountBranchScheduleStatus;\n demo:boolean;\n createdAt: Date;\n updatedAt: Date;\n deletedAt?: Date | null;\n}\n\nexport enum AccountBranchScheduleStatus {\n ACTIVE = \"ACTIVE\",\n INACTIVE = \"INACTIVE\"\n}\n\nexport enum AccountBranchScheduleDay {\n MONDAY = \"MONDAY\",\n TUESDAY = \"TUESDAY\",\n WEDNESDAY = \"WEDNESDAY\",\n THURSDAY = \"THURSDAY\",\n FRIDAY = \"FRIDAY\",\n SATURDAY = \"SATURDAY\",\n SUNDAY = \"SUNDAY\"\n}","import { Address, MapPosition } from \"../common\";\nimport { AccountIntegration } from \"../accountIntegration/types\";\nimport { AccountBranch } from \"../accountBranch/types\";\n\n/**\n * Entidad AccountDeliveryOption\n * Representa una opción de envío de una cuenta.\n */\n\nexport interface AccountDeliveryOption {\n\tid: string;\n\taccountId: string;\n\taccountBranchId: string;\n\tname: string;\n\tintegrationId?: string;\n\tisScheduled: boolean;\n\tpriceLogic: AccountDeliveryOptionPriceLogic;\n\tstatus: AccountDeliveryOptionStatus;\n\tdemo:boolean;\n\tcreatedAt: Date;\n\tupdatedAt: Date;\n\tdeletedAt?: Date | null;\n\n\tzones: AccountDeliveryOptionZone[];\n\tintegration?: AccountIntegration | null;\n\tcalculatedCost?: AccountDeliveryOptionCalculatedCost | null;\n\taccountBranch?: AccountBranch | null;\n}\n\nexport enum AccountDeliveryOptionPriceLogic {\n\tFIXED = \"FIXED\",\n\tPER_KM = \"PER_KM\",\n}\n\nexport enum AccountDeliveryOptionStatus {\n\tACTIVE = \"ACTIVE\",\n\tINACTIVE = \"INACTIVE\",\n}\n\nexport interface AccountDeliveryOptionCalculatedCost {\n\tbasePrice: number;\n\tdistanceKm: number;\n\tfinalPrice: number;\n\tpriceLogic: AccountDeliveryOptionPriceLogic;\n\tcurrency: string;\n}\n\n\nexport interface AccountDeliveryOptionZone {\n\tid: string;\n\taccountId: string;\n\taccountDeliveryOptionId: string;\n\tname: string;\n\tprice: number;\n\tpriceMin: number;\n\tarea: string;\n\tstatus: AccountDeliveryOptionZoneStatus;\n\tdemo:boolean;\n\tcreatedAt: Date;\n\tupdatedAt: Date;\n\tdeletedAt?: Date | null;\n}\n\nexport enum AccountDeliveryOptionZoneStatus {\n\tACTIVE = \"ACTIVE\",\n\tINACTIVE = \"INACTIVE\",\n}","/**\n * Entidad AccountDomain\n * Representa un dominio personalizado asociado a una cuenta.\n * Permite dominios completos y subdominios, con control de estado y verificación.\n */\n\nexport interface AccountDomain {\n id: string;\n accountId: string;\n domain: string; /** Dominio completo (ej: example.com) */\n subdomain?: string;/** Subdominio opcional (ej: shop, blog) */\n isPrimary: boolean; /** Indica si este es el dominio principal de la cuenta */\n status: AccountDomainStatus; /** Estado del dominio: PENDING, ACTIVE, INACTIVE */\n verifiedAt?: Date; /** Fecha de verificación del dominio */\n \n createdAt: Date;\n updatedAt: Date;\n deletedAt?: Date | null;\n}\n\nexport enum AccountDomainStatus {\n PENDING = \"PENDING\",\n ACTIVE = \"ACTIVE\",\n INACTIVE = \"INACTIVE\"\n}\n\n ","import { Integration } from \"../integration\";\n/**\n * Entidad AccountIntegration\n * Contiene información de la integración y sus credenciales.\n */\n\nexport enum AccountIntegrationStatus {\n\tACTIVE = 'ACTIVE',\n\tINACTIVE = 'INACTIVE',\n\tBETA = 'BETA',\n\tDEPRECATED = 'DEPRECATED',\n}\nexport enum AccountIntegrationConnectionStatus {\n\tCONNECTED = 'CONNECTED',\n\tDISCONNECTED = 'DISCONNECTED',\n\tERROR = 'ERROR',\n\tWARNING = 'WARNING',\n}\n\nexport enum AccountIntegrationEnvironment {\n\tPRODUCTION = 'PRODUCTION',\n\tDEVELOPMENT = 'DEVELOPMENT',\n}\n\nexport interface AccountIntegration {\n\tid: string;\n\taccountId: string;\n\tintegrationId: string;\n\tsettingsProduction: Object | null;\n\tsettingsDevelopment: Object | null;\n\tenvironment: AccountIntegrationEnvironment;\n\tproductionStatus: AccountIntegrationConnectionStatus;\n\tdevelopmentStatus: AccountIntegrationConnectionStatus;\n\tstatus: AccountIntegrationStatus;\n\tdemo: boolean;\n\tcreatedAt: Date;\n\tupdatedAt: Date;\n\tdeletedAt?: Date | null;\n\n\tintegration: Integration;\n\n\tsettings: Record<string, any>; // settings for requested environment\n}","// shared-types/src/accountPaymentMethod/types.ts\n\nimport { Account } from \"../account\";\nimport { AccountIntegration } from \"../accountIntegration\";\nimport { StatusInfo } from \"../common/Status\";\n\nexport enum AccountPaymentMethodStatus {\n ACTIVE = 'ACTIVE', // Active\n INACTIVE = 'INACTIVE', // Disabled\n}\n\nexport interface AccountPaymentMethod {\n id: string;\n accountId: string;\n accountIntegrationId?: string;\n name: string;\n description?: string;\n customerInstructions?: string;\n order: number;\n availableForWeb?: boolean;\n \n status: AccountPaymentMethodStatus;\n demo: boolean;\n createdAt: Date;\n updatedAt: Date;\n deletedAt?: Date;\n\n accountIntegration?: AccountIntegration;\n account?: Account;\n statusInfo?: StatusInfo;\n typeName?: string;\n}","import { StatusInfo } from \"../common/Status\";\nimport { AccountPaymentMethodStatus } from \"./types\";\n\nexport function getAccountPaymentMethodStatusInfo(status: AccountPaymentMethodStatus): StatusInfo {\n\tconst map: Record<AccountPaymentMethodStatus, StatusInfo> = {\n\t\tACTIVE: { text: 'Activo', class: 'success', actionText: '' },\n\t\tINACTIVE: { text: 'Inactivo', class: 'danger', actionText: '' },\n\t};\n\n\treturn map[status] ?? { text: String(status), class: 'secondary' };\n}","import { CartItemValidation } from \"./dto\";\nimport { Customer } from \"../customer\";\nimport { AccountDomain } from \"../accountDomain\";\nimport { AccountPaymentMethod } from \"../accountPaymentMethod\";\n\n/**\n * Entidad Cart\n * Define el carrito de compras de un cliente en el sitio web.\n */\n\nexport interface Cart {\n id: string;\n code: string;\n customerId?: string;\n sessionId?: string;\n items: CartItem[];\n currency: string;\n subtotal: number;\n total: number;\n accountPaymentMethodId?: string;\n deliveryType: CartDeliveryType;\n deliveryFirstName?: string;\n deliveryLastName?: string;\n deliveryAddress?: string;\n deliveryPhone?: string;\n deliveryOptionId?: string;\n pickupBranchId?: string;\n itemCount: number;\n createdAt: Date;\n updatedAt: Date;\n status: CartStatus;\n source: CartSource;\n sourceAccountDomainId?: string;\n recoveryToken?: string;\n customerNote?: string;\n hasIssues: boolean; // Indica si el carrito tiene problemas que resolver\n issuesCount: number; // Número de items con problemas\n // Nuevos campos de precios\n subtotalPrice?: number;\n totalDiscounts?: number;\n totalShippingPrice?: number;\n totalTax?: number;\n totalPrice?: number;\n taxDetails?: any;\n\n customer?: Partial<Customer> | null;\n accountDomain?: Partial<AccountDomain> | null;\n accountPaymentMethod?: Partial<AccountPaymentMethod> | null;\n}\n\nexport interface CartItem {\n id: string;\n productId: string;\n productVariantId: string;\n name: string;\n unitPrice: number; // Precio cuando se agregó al carrito\n quantity: number;\n image?: string;\n thumbnailUrl?: string; // URL del thumbnail de la variante\n sku?: string;\n attributeDetails: CartItemAttributeDetail[]; // Detalles legibles de atributos\n \n validation?: CartItemValidation; // Información de validación del item en dto\n}\n\n\nexport interface CartItemAttributeDetail {\n name: string; // Nombre del atributo (ej: \"Talle\", \"Color\")\n alias: string; // Alias del atributo (ej: \"size\", \"color\")\n value: string; // Valor del atributo (ej: \"M\", \"Rojo\")\n type?: string; // Tipo del atributo (opcional)\n}\n\nexport enum CartStatus {\n ACTIVE = 'ACTIVE',\n LOCKED = 'LOCKED',\n EXPIRED = 'EXPIRED',\n CONVERTED = 'CONVERTED',\n ABANDONED = 'ABANDONED',\n MERGED = 'MERGED'\n}\n\nexport enum CartSource {\n WEB = 'WEB',\n POS = 'POS',\n API = 'API'\n}\n\nexport enum CartDeliveryType {\n SHIPPING = 'SHIPPING',\n PICKUP = 'PICKUP'\n}\n\n\n\n\n","import { OrderSource } from \"../order\";\n\n/**\n * Add an item to the cart\n*/\nexport interface CartItemAddDto {\n cartId: string;\n productId: string;\n variantId?: string;\n quantity: number;\n attributes?: { [key: string]: string | number; };\n userEmail?: string;\n userId?: string;\n}\n\n/**\n * Update an item in the cart\n */\nexport interface CartItemUpdateDto {\n cartId: string;\n itemId: string;\n quantity: number;\n}\n\n/**\n * Remove an item from the cart\n */\nexport interface CartItemRemoveDto {\n cartId: string;\n itemId: string;\n}\n\nexport interface CartUpdateDto {\n cartId: string;\n source: OrderSource;\n accountDomainId?: string;\n customer: {\n email: string;\n };\n delivery: {\n type: 'SHIPPING' | 'PICKUP';\n deliveryOptionId?: string;\n pickupBranchId?: string;\n firstname: string;\n lastname: string;\n phone: {\n countryCode: string;\n national: string;\n international: string;\n type: string;\n validated: boolean;\n };\n address: {\n country: string;\n department: string;\n locality: string;\n street: string;\n complement?: string;\n notes?: string;\n postalCode: string;\n mapPosition: {\n lat: number;\n lng: number;\n };\n };\n };\n billing: {\n name: string;\n address: string;\n city: string;\n department: string;\n };\n}\n\n/**\n * Confirm a cart\n */\nexport interface CartConfirmDto {\n cartId: string;\n}\n\n/**\n * Validation information for a cart item\n */\nexport interface CartItemValidation {\n hasIssues: boolean; // Indica si hay problemas con este item\n issues: string[]; // Lista de problemas encontrados (mensajes legibles)\n errorCode?: CartItemErrorCode; // Código específico del error principal\n currentPrice?: number; // Precio actual del producto (si cambió)\n availableStock?: number; // Stock disponible actual\n isProductActive?: boolean; // Si el producto está activo\n}\n\n/**\n * Error codes for cart items\n */\nexport enum CartItemErrorCode {\n PRICE_INCREASED = 'PRICE_INCREASED', // Precio aumentó\n PRICE_DECREASED = 'PRICE_DECREASED', // Precio disminuyó \n PRODUCT_INACTIVE = 'PRODUCT_INACTIVE', // Producto ya no está disponible\n STOCK_INSUFFICIENT = 'STOCK_INSUFFICIENT', // Stock insuficiente (hay algo disponible)\n STOCK_UNAVAILABLE = 'STOCK_UNAVAILABLE', // Sin stock (0 disponible)\n VALIDATION_ERROR = 'VALIDATION_ERROR' // Error general de validación\n}\n","/**\n * Entidad Customer\n * Cliente de la tienda\n*/\nimport { Phone } from \"../common/Phone\";\n\nexport interface Customer {\n id: string;\n accountId: string;\n firstName?: string;\n lastName?: string;\n email: string;\n phone?: Phone;\n status: CustomerStatus;\n createdAt: Date;\n updatedAt: Date;\n deletedAt?: Date | null;\n}\n\nexport enum CustomerStatus {\n ACTIVE = 'ACTIVE',\n INACTIVE = 'INACTIVE',\n BLACKLISTED = 'BLACKLISTED', // e.g., for fraudulent activity\n PENDING = 'PENDING', // e.g., email verification needed\n}","import { AccountIntegration } from \"../accountIntegration\";\n/**\n * Entidad Integration\n * Define las integraciones de terceros disponibles en la plataforma (ej. pasarelas de pago, transportistas).\n * Almacena información sobre el proveedor, categoría y esquema de parámetros requeridos.\n */\n\nexport enum IntegrationCategory {\n\tPAYMENT_GATEWAY = 'PAYMENT_GATEWAY',\n\tSHIPPING_CARRIER = 'SHIPPING_CARRIER',\n\tMARKETPLACE = 'MARKETPLACE',\n\tEMAIL_MARKETING = 'EMAIL_MARKETING',\n\tANALYTICS = 'ANALYTICS',\n\tACCOUNTING = 'ACCOUNTING',\n\tSOCIAL_MEDIA = 'SOCIAL_MEDIA',\n\tOTHER = 'OTHER',\n}\n\nexport enum IntegrationStatus {\n\tACTIVE = 'ACTIVE',\n\tINACTIVE = 'INACTIVE',\n\tBETA = 'BETA',\n\tDEPRECATED = 'DEPRECATED',\n}\n\nexport interface Integration {\n\tid: string;\n\tcategory: IntegrationCategory;\n\tproviderKey: string; // Unique identifier key (e.g., 'stripe', 'mercadopago')\n\tname: string; // Human-readable name (e.g., \"Stripe\", \"Mercado Pago\")\n\tslug: string;\n\tdescription?: string;\n\tsetupInstructions?: string; // General instructions or link to docs\n\tlogoUrl?: string; // URL to the integration's logo\n\trequiredParamsSchema?: any; // Define required parameters/credentials structure\n\tsupportedPaymentMethods?: string[]; // List of supported payment methods (e.g., 'visa', 'mastercard', 'american_express', 'bank_transfer', 'cash')\n\tpaymentCanRecapture?: boolean; // Can the payment be recaptured by the provider?\n\tpaymentCanRefund?: boolean; // Can the payment be refunded by the provider?\n\tstatus: IntegrationStatus;\n\tcreatedAt: Date;\n\tupdatedAt: Date;\n\tdeletedAt?: Date | null;\n\torder: number;\n\n\taccountIntegration: AccountIntegration | null;\n}","import { Currency, Media } from \"../common\";\nimport { Customer } from \"../customer\";\nimport { AccountIntegration } from \"../accountIntegration\";\nimport { AccountDomain } from \"../accountDomain\";\nimport { Product } from \"../product\";\nimport { FulfillmentStatus } from \"../fulfillment/types\";\nimport { StatusInfo } from \"../common/Status\";\nimport { PaymentStatus } from \"../payment\";\nimport { AccountPaymentMethod } from \"../accountPaymentMethod\";\n\n/**\n * Entidad Order\n * Define la orden de compra de un cliente en el sitio web.\n */\n\nexport interface Order {\n id: string;\n accountId: string;\n customerId: string;\n cartId?: string;\n code: string;\n deliveryType: OrderDeliveryType;\n deliveryFirstName?: string;\n deliveryLastName?: string;\n deliveryAddress?: any;\n deliveryPhone?: any;\n deliveryOptionId?: string;\n pickupBranchId?: string;\n accountPaymentMethodId?: string;\n paymentMethodIntegrationId?: string;\n billingInformation?: any;\n currency: Currency;\n currencySymbol?: string;\n subtotalPrice: number;\n totalDiscounts: number;\n totalShippingPrice: number;\n totalTax: number;\n taxDetails?: any;\n totalPrice: number;\n totalRefunded: number;\n status: OrderStatus;\n statusInfo?: StatusInfo;\n paymentStatus: OrderPaymentStatus;\n paymentStatusInfo?: StatusInfo;\n fulfillmentStatus: FulfillmentStatus;\n statusHistory?: StatusChangeHistory[];\n customerNote?: string;\n internalNote?: string;\n source: OrderSource;\n sourceAccountDomainId?: string;\n demo: boolean;\n createdAt: Date;\n updatedAt: Date;\n cancelledAt?: Date;\n cancelReason?: string;\n deletedAt?: Date;\n items?: OrderItem[];\n\n customer?: Customer | null;\n paymentMethodIntegration?: AccountIntegration | null;\n accountDomain?: AccountDomain;\n accountPaymentMethod?: Partial<AccountPaymentMethod> | null;\n\n statusFlow?: StatusFlow[];\n // Estados permitidos para cambiar el estado de la orden\n statusChangeAllowed?: OrderStatus[];\n}\n\nexport interface OrderItem {\n id: string;\n accountId: string;\n orderId: string;\n productId: string;\n productVariantId: string;\n sku?: string;\n productName: string;\n variantName?: string;\n currency: Currency;\n currencySymbol?: string;\n unitPrice: number;\n totalDiscount: number;\n totalPrice: number;\n quantity: number;\n quantityFulfilled: number;\n quantityRefunded: number;\n quantityReturned: number;\n totalTax: number;\n taxName?: string;\n createdAt: Date;\n updatedAt: Date;\n\n // Snapshot del producto en el momento de la compra\n productSnapshot?: OrderItemSnapshot;\n\n product?: Product;\n}\n\nexport enum OrderStatus {\n PENDING = 'PENDING', // Order placed, awaiting payment confirmation\n CONFIRMED = 'CONFIRMED', // Payment received, order confirmed\n PROCESSING = 'PROCESSING', // Order being prepared\n PROCESSED = 'PROCESSED', // Order ready to be shipped\n ON_HOLD = 'ON_HOLD', // Order temporarily paused\n COMPLETED = 'COMPLETED', // Order finished (e.g., after return period)\n CANCELLED = 'CANCELLED', // Order cancelled before fulfillment\n FAILED = 'FAILED', // Order failed (e.g., payment failed irrecoverably)\n}\n\nexport enum OrderPaymentStatus {\n PENDING = 'PENDING',\n PARTIAL = 'PARTIAL',\n PAID = 'PAID',\n OVERPAID = 'OVERPAID',\n REFUNDED = 'REFUNDED',\n PARTIALLY_REFUNDED = 'PARTIALLY_REFUNDED'\n}\n\nexport enum OrderSource {\n WEB = 'WEB',\n POS = 'POS',\n API = 'API'\n}\n\nexport enum OrderDeliveryType {\n SHIPPING = 'SHIPPING',\n PICKUP = 'PICKUP',\n}\n\nexport interface StatusChangeHistory {\n type: 'order' | 'fulfillment' | 'payment';\n status: OrderStatus | FulfillmentStatus | PaymentStatus;\n timestamp: Date;\n reason?: string;\n userId?: string;\n metadata?: Record<string, any>;\n}\n\nexport interface OrderItemSnapshot {\n sku?: string;\n productName: string;\n variantName?: string;\n media?: Media[];\n}\n\ntype StatusByType = {\n order: OrderStatus;\n fulfillment: FulfillmentStatus;\n payment: PaymentStatus;\n};\n\nexport type StatusFlow<T extends keyof StatusByType = keyof StatusByType> = {\n type: T;\n status: StatusByType[T];\n text?: string;\n doneAt: Date | null;\n};\n\nexport type NextStatusAction<T extends keyof StatusByType = keyof StatusByType> = {\n type: T;\n status: StatusByType[T];\n text: string;\n};","import { StatusInfo } from \"../common/Status\";\nimport { OrderStatus } from \"./types\";\n\nexport function getOrderStatusInfo(status: OrderStatus): StatusInfo {\n\tconst map: Record<OrderStatus, StatusInfo> = {\n\t\tPENDING: { text: 'Pendiente', class: 'secondary', actionText: '' },\n\t\tCONFIRMED: { text: 'Confirmada', class: 'info', actionText: 'Confirmar orden' },\n\t\tPROCESSING: { text: 'En proceso', class: 'warning', actionText: 'Procesar orden' },\n\t\tPROCESSED: { text: 'Procesada', class: 'primary', actionText: 'Orden procesada' },\n\t\tON_HOLD: { text: 'En espera', class: 'secondary', actionText: 'Orden en espera' },\n\t\tCOMPLETED: { text: 'Completada', class: 'success', actionText: 'Completar orden' }, \n\t\tCANCELLED: { text: 'Cancelada', class: 'danger', actionText: 'Cancelar orden' },\n\t\tFAILED: { text: 'Fallida', class: 'danger', actionText: '' },\n\t};\n\n\treturn map[status] ?? { text: String(status), class: 'secondary' };\n}","// shared-types/src/payment/types.ts\n\nimport { Currency } from \"../common\";\nimport { AccountPaymentMethod } from \"../accountPaymentMethod\";\nimport { Order } from \"../order\";\n\n\nexport enum PaymentStatus {\n PENDING = 'PENDING', // Pendiente\n PREAUTHORIZED = 'PREAUTHORIZED',\n APPROVED = 'APPROVED', // Pago aprobado online\n PAID = 'PAID', // Pago realizado por redes fisicas\n REJECTED = 'REJECTED', // Pago rechazado\n REFUND_IN_PROCESS = 'REFUND_IN_PROCESS', // En proceso de reembolso con la plataforma de pagos\n PARTIAL_REFUND = 'PARTIAL_REFUND', // Pago parcialmente reembolsado\n REFUNDED = 'REFUNDED', // Pago reembolsado\n ERROR = 'ERROR' // Represents an error in porcessing the payment. Ex: a webhook comes without an esternal reference, so we can't match in our system\n}\n\nexport enum PaymentMethodType {\n BANK_TRANSFER = 'BANK_TRANSFER',\n CREDIT_CARD = 'CREDIT_CARD',\n DEBIT_CARD = 'DEBIT_CARD',\n MERCADOPAGO = 'MERCADOPAGO',\n PHYSICAL = 'PHYSICAL',\n INTERNATIONAL = 'INTERNATIONAL',\n PAYPAL = 'PAYPAL',\n CASH = 'CASH',\n OTHER = 'OTHER', // Added for flexibility\n}\nexport interface Payment {\n id: string;\n accountId: string;\n orderId: string;\n invoiceId?: string;\n accountPaymentMethodId?: string;\n accountIntegrationId?: string;\n referenceCode?: string;\n paymentMethodType?: PaymentMethodType;\n currency: Currency;\n amount: number;\n amountReceived: number;\n amountRefunded: number;\n paidAt?: string | Date;\n refundedAt?: string | Date;\n status: PaymentStatus;\n cardBrand?: string;\n cardBrandInfo?: PaymentCardBrand;\n cardLast4?: string;\n data?: Record<string, any>\n metadata?: Record<string, any>;\n internalComment?: string;\n demo: boolean;\n createdAt: string | Date;\n updatedAt: string | Date;\n deletedAt?: string | Date;\n\n accountPaymentMethod?: Partial<AccountPaymentMethod> | null;\n order?: Order;\n}\n\n// Provider-level types (entity-agnostic, reusable across projects)\nexport type PaymentProviderKey = 'MERCADOPAGO' | 'MANUAL';\n\n// TODO: Eventually refactor what is passed to the payment provider constructor, as it most likely just need\nexport interface PaymentProviderContext {\n data: Record<string, unknown>\n}\n\nexport interface PaymentProviderInitInput {\n // Arbitrary provider input. Caller builds this from their domain data\n data: Record<string, any>;\n}\n\nexport interface PaymentProviderInitOutput {\n data: Record<string, any>;\n status: PaymentStatus\n}\n\nexport interface PaymentProviderCaptureInput {\n data: Record<string, any>;\n}\n\nexport interface PaymentProviderCaptureOutput {\n data: Record<string, any>;\n}\n\nexport interface PaymentProviderRefundInput {\n amount: number;\n data: Record<string, any>;\n}\n\nexport interface PaymentProviderRefundOutput {\n data: Record<string, any>;\n}\n\nexport interface PaymentProviderWebhookResult {\n //TODO: Ideally, if later an order can have multiple payments, the way to link thrid party payments with our own payment entity, should be throu something like a \n // payment session in our system, that would be set as the external reference in the third party payment\n order_code: string | null\n status: PaymentStatus\n data: Record<string, unknown>\n // TODO: Ideally i think this should live inside the data field, not have separate columns and just let the consumer know what\n // attributes to query to resolve them\n paymentDetails: {\n method?: string,\n last4?: string\n }\n}\n\nexport interface WebhookPayload {\n // Id of payment provider webhook belongs to, to pass data for processing\n provider: string;\n accountId: string;\n payload: {\n query: Record<string, unknown>\n body: Record<string, unknown>\n headers: Record<string, unknown>\n }\n}\n\nexport enum PaymentCardBrandKey {\n mp_account_money = 'mp_account_money',\n}\n\nexport interface PaymentCardBrand {\n key: string;\n name: string;\n image: string;\n}\n\nexport function getPaymentCardBrand(key: PaymentCardBrandKey): PaymentCardBrand {\n const map: Record<PaymentCardBrandKey, PaymentCardBrand> = {\n mp_account_money: {\n key: PaymentCardBrandKey.mp_account_money,\n name: 'Mercado Pago',\n image: 'https://storage.googleapis.com/retaila-assets/payments/mercadopago.png',\n },\n }\n return map[key] || {\n key,\n name: '',\n image: null,\n }\n}\n\nexport interface PaymentProviderAdapter {\n readonly key: PaymentProviderKey;\n initPayment(input: PaymentProviderInitInput): Promise<PaymentProviderInitOutput>;\n capture(input: PaymentProviderCaptureInput): Promise<PaymentProviderCaptureOutput>\n refund(input: PaymentProviderRefundInput): Promise<PaymentProviderRefundOutput>;\n processWebhook(input: WebhookPayload['payload']): Promise<PaymentProviderWebhookResult>\n}","import { StatusInfo } from \"../common/Status\";\nimport { PaymentStatus } from \"./types\";\n\nexport function getPaymentStatusInfo(status: PaymentStatus): StatusInfo {\n\tconst map: Record<PaymentStatus, StatusInfo> = {\n\t\tPENDING: { text: 'Pago pendiente', class: 'warning', actionText: '' },\n\t\tPREAUTHORIZED: { text: 'Pago preautorizado', class: 'info', actionText: 'Preautorizar pago' },\n\t\tAPPROVED: { text: 'Pago aprobado', class: 'success', actionText: 'Aprobar pago' },\n\t\tPAID: { text: 'Pago realizado', class: 'success', actionText: 'Pago realizado' },\n\t\tREJECTED: { text: 'Pago rechazado', class: 'danger', actionText: 'Rechazar pago' },\n\t\tREFUND_IN_PROCESS: { text: 'Pago en proceso de reembolso', class: 'warning', actionText: 'Reembolsar pago' },\n\t\tPARTIAL_REFUND: { text: 'Pago parcialmente reembolsado', class: 'warning', actionText: 'Reembolsar pago' },\n\t\tREFUNDED: { text: 'Pago reembolsado', class: 'success', actionText: 'Reembolsado' },\n\t\tERROR: { text: 'Error en pago', class: 'danger', actionText: 'Error en pago' },\n\t};\n\n\treturn map[status] ?? { text: String(status), class: 'secondary' };\n}","import { Media } from \"../common\";\nimport { StatusInfo } from \"../common/Status\";\nimport { ProductCategory } from \"../productCategory\";\n\n/**\n * Entidad Product\n * Representa un producto vendible en la tienda. Es la entidad base que puede tener múltiples variantes.\n */\n\nexport interface Product {\n id: string;\n accountId: string;\n code: string;\n brandId?: string | null;\n supplierId?: string | null;\n productType: ProductType;\n sku?: string | null;\n barcode?: string | null;\n name: string; // e.g., \"Zapatos\", \"Pantalones\", \"Camisas\"\n slug: string;\n description?: string | null;\n isFeatured: boolean;\n\n // Inventory & Shipping\n allowBackorder: boolean; // Permite realizar pedidos aunque no haya stock disponible. Se aplica a las variantes si no está definido allí\n weight?: number | null;\n weightUnit?: string | null; // e.g., \"kg\"\n height?: number | null;\n width?: number | null;\n depth?: number | null; \n dimensionUnit?: string | null; // e.g., \"cm\"\n shippingLeadTime?: string | null; // e.g., \"1-3 days\"\n\n status: ProductStatus; // ACTIVE, INACTIVE\n statusInfo?: StatusInfo;\n \n createdAt: Date;\n updatedAt: Date;\n deletedAt?: Date | null;\n\n media?: Media[]\n\n variants?: ProductVariant[];\n categories?: ProductCategory[];\n}\n\nexport enum ProductStatus {\n ACTIVE = 'ACTIVE', // Available for sale\n INACTIVE = 'INACTIVE', // Not visible/purchasable\n ARCHIVED = 'ARCHIVED', // Not visible, kept for records\n DRAFT = 'DRAFT', // Incomplete product setup\n}\n\nexport enum ProductType {\n SIMPLE = 'SIMPLE', // Product without variants (may have a default hidden variant)\n VARIABLE = 'VARIABLE', // Product with distinct variants (color, size, etc.)\n BUNDLE = 'BUNDLE', // A package of other products/variants\n GIFT_CARD = 'GIFT_CARD', // Virtual or physical gift card\n}\n\n\nexport interface ProductVariant {\n id: string;\n accountId: string;\n productId: string;\n\n sku?: string | null;\n barcode?: string | null; // EAN, UPC, etc.\n\n // Pricing\n currency: string; // ISO 4217 currency code\n price: number;\n compareAtPrice?: number;\n allowBackorder?: boolean;\n \n // Inventory & Shipping\n stock: number;\n weight?: number | null;\n weightUnit?: string | null;\n height?: number | null;\n width?: number | null;\n depth?: number | null;\n dimensionUnit?: string | null;\n shippingLeadTime?: string | null; // e.g., \"1-3 days\"\n \n order: number;\n\n createdAt: Date;\n updatedAt: Date;\n deletedAt?: Date;\n\n}","import { StatusInfo } from \"../common/Status\";\nimport { ProductStatus } from \"./types\";\n\nexport function getProductStatusInfo(status: ProductStatus): StatusInfo {\n\tconst map: Record<ProductStatus, StatusInfo> = {\n\t\tACTIVE: { text: 'Activo', class: 'success' },\n\t\tINACTIVE: { text: 'Inactivo', class: 'danger' },\n\t\tARCHIVED: { text: 'Archivado', class: 'secondary' },\n\t\tDRAFT: { text: 'Borrador', class: 'secondary' },\n\t};\n\n\treturn map[status] ?? { text: String(status), class: 'secondary' };\n}","/**\n * Entidad ProductAttribute\n * Define los atributos disponibles que se pueden asignar a las variantes de producto (ej. Color, Talla).\n * Especifica el nombre y tipo del atributo para ayudar en la representación y filtrado.\n */\n\nimport { ProductCategory } from \"../productCategory/types\";\n\nexport interface ProductAttribute {\n id: string;\n accountId: string;\n name: string; // e.g., \"Color de zapatos\", \"Talle de pantalones\", \"Material\"\n alias: string; // e.g., \"Color\", \"Talla\", \"Material\"\n slug: string;\n type: ProductAttributeType; // Helps frontend render appropriate controls\n isRequired: boolean; // isRequired for product variant\n suffix: string; // suffix for number type\n status: ProductAttributeStatus; // ACTIVE, INACTIVE\n \n createdAt: Date;\n updatedAt: Date;\n deletedAt?: Date | null;\n\n // dejo las categorias planas y los links de la tabla pivot por si necesito acceder a ellas\n productCategories: ProductCategory[]; // conveniente\n productCategoryLinks: Array<{ categoryId: string; isRequired: boolean; displayOrder: number }>;\n\n options: ProductAttributeOption[];\n displayOrder: number; // order to display the attribute in the frontend\n}\n\nexport enum ProductAttributeStatus {\n ACTIVE = 'ACTIVE',\n INACTIVE = 'INACTIVE',\n}\n\n\nexport enum ProductAttributeType {\n TEXT = 'TEXT', // text input\n NUMBER = 'NUMBER', // number input\n COLOR = 'COLOR', // Special type for color swatches\n SELECT = 'SELECT', // Dropdown list\n BOOLEAN = 'BOOLEAN', // checkbox input\n}\n\n/**\n * Una opción específica para un atributo (ej. \"Talle 42\" para el atributo \"Talle\").\n */\nexport interface ProductAttributeOption {\n id: string;\n accountId: string;\n productAttributeId: string;\n value: string;\n imageId?: string | null;\n order: number;\n createdAt: Date;\n updatedAt: Date;\n deletedAt?: Date | null;\n\n count: number; // number of options\n}","import { StandardCategory } from \"../standardCategory\";\n\n/**\n * Entidad ProductCategory\n * Define las categorías de productos.\n * Soporta una estructura jerárquica (categorías y subcategorías) mediante el campo parentId.\n * Cada categoría debe estar asociada a una categoría estándar del sistema.\n */\n\nexport interface ProductCategory {\n id: string;\n accountId: string;\n parentId?: string;\n standardCategoryId: string;\n name: string; // e.g., \"Zapatos\", \"Pantalones\", \"Camisas\"\n slug: string;\n description?: string;\n imageId?: string | null;\n order: number;\n isFeatured: boolean;\n status: ProductCategoryStatus; // ACTIVE, INACTIVE\n createdAt: Date;\n updatedAt: Date;\n deletedAt?: Date | null;\n\n children: ProductCategory[];\n parent: ProductCategory | null;\n standardCategory: StandardCategory;\n}\n\n\nexport enum ProductCategoryStatus {\n ACTIVE = 'ACTIVE',\n INACTIVE = 'INACTIVE',\n}\n\n","/**\n * Entidad StandardCategory\n * Define las categorías estándar de productos.\n * Estas categorías estan pensadas para unificar o agrupar productos de diferentes cuentas.\n */\n\nexport interface StandardCategory {\n id: string;\n parentId?: string;\n name: string; // e.g., \"Zapatos\", \"Pantalones\", \"Camisas\"\n slug: string;\n description?: string;\n imageId?: string | null;\n order: number;\n status: StandardCategoryStatus; // ACTIVE, INACTIVE\n metadata?: {\n icon?: string;\n displayInMenu?: boolean;\n seoTitle?: string;\n seoDescription?: string;\n attributes?: string[];\n };\n createdAt: Date;\n updatedAt: Date;\n deletedAt?: Date | null;\n\n children: StandardCategory[];\n parent: StandardCategory | null;\n}\n\nexport enum StandardCategoryStatus {\n ACTIVE = 'ACTIVE',\n INACTIVE = 'INACTIVE'\n}\n\n","/**\n * Entidad StoreBanner\n * Banners para la portada de la web de la tienda\n */\n\nimport { Media } from \"../common\";\n\nexport interface StoreBanner {\n id: string;\n accountId: string;\n title: string;\n desktopMediaId: string;\n mobileMediaId?: string | null;\n linkUrl?: string | null;\n altText?: string | null;\n displayOrder: number;\n startDate?: Date | null;\n endDate?: Date | null;\n status: StoreBannerStatus;\n createdAt: Date;\n updatedAt: Date;\n deletedAt?: Date | null;\n\n // Relationships\n desktopMedia?: Partial<Media> | null;\n mobileMedia?: Partial<Media> | null;\n}\n\nexport enum StoreBannerStatus {\n ACTIVE = \"ACTIVE\",\n INACTIVE = \"INACTIVE\"\n}\n\n ","/**\n * Entidad StorePage\n * Páginas de la web de la tienda\n */\n\nexport interface StorePage {\n id: string;\n accountId: string;\n type: StorePageType;\n title: string;\n slug: string;\n content?: string | null;\n seoTitle?: string | null;\n seoDescription?: string | null;\n \n status: StorePageStatus;\n canDelete: boolean;\n createdAt: Date;\n updatedAt: Date;\n deletedAt?: Date | null;\n}\n\nexport enum StorePageStatus {\n PUBLISHED = 'PUBLISHED',\n DRAFT = 'DRAFT',\n ARCHIVED = 'ARCHIVED',\n}\n\nexport enum StorePageType {\n ABOUT_US = 'ABOUT_US',\n CONTACT = 'CONTACT',\n FAQ = 'FAQ',\n TERMS_AND_CONDITIONS = 'TERMS_AND_CONDITIONS',\n PRIVACY_POLICY = 'PRIVACY_POLICY',\n RETURN_POLICY = 'RETURN_POLICY',\n SHIPPING_POLICY = 'SHIPPING_POLICY',\n BRANCHES = 'BRANCHES',\n JOBS = 'JOBS',\n OTHER = 'OTHER',\n}\n\n\n ","export enum PubSubTopics {\n ORDER_PLACED = 'order-placed',\n ORDER_CONFIRMED = 'order-confirmed',\n ORDER_PROCESSING = 'order-processing',\n ORDER_PROCESSED = 'order-processed',\n ORDER_COMPLETED = 'order-completed',\n ORDER_CANCELLED = 'order-cancelled',\n PAYMENT_PAID = 'payment-paid',\n NOTIFICATION_CREATED = 'notification-created',\n }","import { Account } from \"../account/types\";\nimport { Customer } from \"../customer/types\";\n\n\n// origen principal del hilo de conversación\nexport enum SupportConversationChannel {\n\tWEB = 'WEB',\n\tEMAIL = 'EMAIL',\n\tWHATSAPP = 'WHATSAPP'\n}\n\n// quién puede ver el hilo en el tenant\nexport enum SupportConversationVisibility {\n\tINTERNAL = 'INTERNAL',\n\tMERCHANT = 'MERCHANT'\n}\n\nexport enum SupportConversationPriority {\n\tLOW = 'LOW',\n\tMEDIUM = 'MEDIUM',\n\tHIGH = 'HIGH',\n\tURGENT = 'URGENT'\n}\n\nexport enum SupportConversationStatus {\n\tOPEN = 'OPEN',\n\tCLOSED = 'CLOSED',\n\tPENDING = 'PENDING'\n}\n\nexport enum SupportConversationMessageDeliveryStatus {\n\tQUEUED = 'QUEUED',\n\tSENT = 'SENT',\n\tDELIVERED = 'DELIVERED',\n\tREAD = 'READ',\n\tFAILED = 'FAILED'\n}\n\nexport enum SupportConversationMessageAiAnalysisStatus {\n\tPENDING = 'PENDING',\n\tPROCESSING = 'PROCESSING',\n\tCOMPLETED = 'COMPLETED',\n\tFAILED = 'FAILED'\n}\n\n// Dirección del mensaje con respecto al sistema: entrante o saliente\nexport enum SupportConversationMessageDirection {\n\tINBOUND = 'INBOUND',\n\tOUTBOUND = 'OUTBOUND'\n }\n \n // Tipo de emisor del mensaje\n export enum SupportConversationMessageSenderType {\n\tCUSTOMER = 'CUSTOMER',\n\tACCOUNT_USER = 'ACCOUNT_USER',\n\tANONYMOUS = 'ANONYMOUS',\n\tSYSTEM = 'SYSTEM',\n\tAI = 'AI'\n }\n\nexport interface SupportConversation {\n\tid: string;\n\taccountId: string;\n\tsubject?: string | null; // Asunto opcional del hilo (para email o contacto web)\n\tchannel: SupportConversationChannel; // Canal principal de la conversación (email/whatsapp/web, etc.)\n\tassigneeId?: string | null; // Asignación interna (agente/usuario de la cuenta que atiende la conversación)\n\tvisibility: SupportConversationVisibility;\n\tpriority: SupportConversationPriority; // Priorización operativa\n\trequiresMerchantAction: boolean; // Indica si el comercio debe responder o tomar acción\n\trequiresInternalAction: boolean; // Indica si el equipo interno debe intervenir (respuesta, etc.)\n\tcustomerId?: string | null; // Identificador del cliente si está registrado en el sistema\n\tcustomerName?: string | null; // Nombre del contacto (snapshot, no necesariamente el del Customer)\n\tcustomerLastname?: string | null; // Apellido del contacto (snapshot)\n\tcustomerEmail?: string | null; // Email del contacto (snapshot)\n\tcustomerPhone?: string | null; // Teléfono del contacto (snapshot)\n\tstatus: SupportConversationStatus; // Estado simple (string para mantenerlo liviano)\n\tlastMessageAt?: Date | null;\n\tunreadForAgent: number; // Mensajes no leídos por el agente interno\n\tunreadForCustomer: number; // Mensajes no leídos por el cliente/comercio\n\tmetadata?: Object | null; // Metadatos flexibles (headers email, ids de chat, etc.)\n\taiSuggestion?: Object | null; // Sugerencias/Resumen asistidos por IA\n\tcreatedAt: Date;\n\tupdatedAt: Date;\n\tdeletedAt?: Date | null;\n\n\taccount: Account;\n\t// assignee: AccountUser | null;\n\tcustomer: Customer | null;\n\tmessages: SupportConversationMessage[];\n}\n\n\nexport interface SupportConversationMessage {\n id: string;\n accountId: string;\n conversationId: string;\n direction: SupportConversationMessageDirection; // Dirección simple (entrante/saliente)\n senderType: SupportConversationMessageSenderType; // Tipo de emisor del mensaje (cliente, usuario interno, anónimo, sistema o IA)\n senderId?: string | null; // Identificador del emisor cuando aplica (Customer o AccountUser). Puede ser null para anónimos, sistema o IA\n body: string;\n isAiGenerated: boolean;\n isSystem: boolean;\n deliveryStatus: SupportConversationMessageDeliveryStatus; // Estado de entrega (para OUTBOUND). Por defecto QUEUED para ser enviado por el canal.\n requiresAiAnalysis: boolean;\n aiAnalysisStatus: SupportConversationMessageAiAnalysisStatus;\n aiAnalyzedAt?: Date | null;\n externalMessageId?: string | null; // Identificadores de proveedor externo (messageId, threadId)\n externalThreadId?: string | null;\n attachments?: Array<{\n url: string;\n type?: string;\n name?: string;\n sizeBytes?: number;\n }>; // Adjuntos simples (urls o descriptores livianos) \n metadata?: Object | null; // Metadatos flexibles (headers, payloads originales, etc.)\n createdAt: Date;\n updatedAt: Date;\n deletedAt?: Date | null;\n}\n","import { FulfillmentItem } from \"../fulfillmentItem\";\n\nexport enum FulfillmentStatus {\n PENDING = 'pending',\n PACKED = 'packed',\n SHIPPED = 'shipped',\n DELIVERED = 'delivered',\n CANCELLED = 'cancelled',\n}\n\nexport type Fulfillment = {\n id: string;\n accountId: string;\n orderId: string;\n accountBranchId: string;\n carrier: string;\n trackingNumber: string | null;\n items: FulfillmentItem[];\n status: FulfillmentStatus;\n data: Record<string, unknown> | null;\n packedAt: Date | null;\n shippedAt: Date | null;\n deliveredAt: Date | null;\n cancelledAt: Date | null;\n createdAt: Date;\n updatedAt: Date;\n deletedAt?: Date;\n}","import { StatusInfo } from \"../common/Status\";\nimport { FulfillmentStatus } from \"./types\";\n\nexport function getFulfillmentStatusInfo(status: FulfillmentStatus): StatusInfo {\n\tconst map: Record<FulfillmentStatus, StatusInfo> = {\n\t\tpending: { text: 'Pendiente', class: 'warning', actionText: '' },\n\t\tpacked: { text: 'Paquete listo', class: 'info', actionText: 'Paquete listo' },\n\t\tshipped: { text: 'Enviado', class: 'warning', actionText: 'Enviado' },\n\t\tdelivered: { text: 'Entregado', class: 'success', actionText: 'Entregado' },\n\t\tcancelled: { text: 'Cancelado', class: 'danger', actionText: 'Cancelado' },\n\t};\n\n\treturn map[status] ?? { text: String(status), class: 'secondary' };\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,YAAY,YAAY;AAAA,IAC1E,WAAW,EAAE,MAAM,aAAa,OAAO,UAAU,YAAY,YAAY;AAAA,EAC1E;AAEA,SAAO,IAAI,MAAM,KAAK,EAAE,MAAM,OAAO,MAAM,GAAG,OAAO,YAAY;AAClE;","names":["MediaType","Currency","AccountStatus","AccountBranchStatus","AccountBranchScheduleStatus","AccountBranchScheduleDay","AccountDeliveryOptionPriceLogic","AccountDeliveryOptionStatus","AccountDeliveryOptionZoneStatus","AccountDomainStatus","AccountIntegrationStatus","AccountIntegrationConnectionStatus","AccountIntegrationEnvironment","AccountPaymentMethodStatus","CartStatus","CartSource","CartDeliveryType","CartItemErrorCode","CustomerStatus","IntegrationCategory","IntegrationStatus","OrderStatus","OrderPaymentStatus","OrderSource","OrderDeliveryType","PaymentStatus","PaymentMethodType","PaymentCardBrandKey","ProductStatus","ProductType","ProductAttributeStatus","ProductAttributeType","ProductCategoryStatus","StandardCategoryStatus","StoreBannerStatus","StorePageStatus","StorePageType","PubSubTopics","SupportConversationChannel","SupportConversationVisibility","SupportConversationPriority","SupportConversationStatus","SupportConversationMessageDeliveryStatus","SupportConversationMessageAiAnalysisStatus","SupportConversationMessageDirection","SupportConversationMessageSenderType","FulfillmentStatus"]}
package/dist/index.mjs CHANGED
@@ -14,11 +14,16 @@ var MediaType = /* @__PURE__ */ ((MediaType2) => {
14
14
 
15
15
  // src/common/Currency.ts
16
16
  var Currency = /* @__PURE__ */ ((Currency2) => {
17
- Currency2["USD"] = "USD";
18
- Currency2["EUR"] = "EUR";
19
- Currency2["UYU"] = "UYU";
20
17
  Currency2["ARS"] = "ARS";
21
18
  Currency2["BRL"] = "BRL";
19
+ Currency2["CLP"] = "CLP";
20
+ Currency2["COP"] = "COP";
21
+ Currency2["EUR"] = "EUR";
22
+ Currency2["MXN"] = "MXN";
23
+ Currency2["PEN"] = "PEN";
24
+ Currency2["PYG"] = "PYG";
25
+ Currency2["USD"] = "USD";
26
+ Currency2["UYU"] = "UYU";
22
27
  return Currency2;
23
28
  })(Currency || {});
24
29
  function getCurrencySymbol(currencyCode) {
@@ -115,14 +120,6 @@ var AccountPaymentMethodStatus = /* @__PURE__ */ ((AccountPaymentMethodStatus2)
115
120
  AccountPaymentMethodStatus2["INACTIVE"] = "INACTIVE";
116
121
  return AccountPaymentMethodStatus2;
117
122
  })(AccountPaymentMethodStatus || {});
118
- var AccountPaymentMethodType = /* @__PURE__ */ ((AccountPaymentMethodType2) => {
119
- AccountPaymentMethodType2["ONLINE"] = "ONLINE";
120
- AccountPaymentMethodType2["BANK_TRANSFER"] = "BANK_TRANSFER";
121
- AccountPaymentMethodType2["CASH"] = "CASH";
122
- AccountPaymentMethodType2["CASH_ON_DELIVERY"] = "CASH_ON_DELIVERY";
123
- AccountPaymentMethodType2["OTHER"] = "OTHER";
124
- return AccountPaymentMethodType2;
125
- })(AccountPaymentMethodType || {});
126
123
 
127
124
  // src/accountPaymentMethod/helpers.ts
128
125
  function getAccountPaymentMethodStatusInfo(status) {
@@ -132,16 +129,6 @@ function getAccountPaymentMethodStatusInfo(status) {
132
129
  };
133
130
  return map[status] ?? { text: String(status), class: "secondary" };
134
131
  }
135
- function getAccountPaymentMethodTypeName(type) {
136
- const map = {
137
- ONLINE: "Online",
138
- BANK_TRANSFER: "Transferencia bancaria",
139
- CASH: "Efectivo",
140
- CASH_ON_DELIVERY: "Efectivo en la entrega",
141
- OTHER: "Otro"
142
- };
143
- return map[type] ?? type;
144
- }
145
132
 
146
133
  // src/cart/types.ts
147
134
  var CartStatus = /* @__PURE__ */ ((CartStatus2) => {
@@ -497,7 +484,6 @@ export {
497
484
  AccountIntegrationEnvironment,
498
485
  AccountIntegrationStatus,
499
486
  AccountPaymentMethodStatus,
500
- AccountPaymentMethodType,
501
487
  AccountStatus,
502
488
  CartDeliveryType,
503
489
  CartItemErrorCode,
@@ -535,7 +521,6 @@ export {
535
521
  SupportConversationStatus,
536
522
  SupportConversationVisibility,
537
523
  getAccountPaymentMethodStatusInfo,
538
- getAccountPaymentMethodTypeName,
539
524
  getCurrencySymbol,
540
525
  getFulfillmentStatusInfo,
541
526
  getOrderStatusInfo,
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/common/Media.ts","../src/common/Currency.ts","../src/account/types.ts","../src/accountBranch/types.ts","../src/accountDeliveryOption/types.ts","../src/accountDomain/types.ts","../src/accountIntegration/types.ts","../src/accountPaymentMethod/types.ts","../src/accountPaymentMethod/helpers.ts","../src/cart/types.ts","../src/cart/dto.ts","../src/customer/types.ts","../src/integration/types.ts","../src/order/types.ts","../src/order/helpers.ts","../src/payment/types.ts","../src/payment/helpers.ts","../src/product/types.ts","../src/product/helpers.ts","../src/productAttribute/types.ts","../src/productCategory/types.ts","../src/standardCategory/types.ts","../src/storeBanner/types.ts","../src/storePage/types.ts","../src/pubsub/types.ts","../src/supportConversation/types.ts","../src/fulfillment/types.ts","../src/fulfillment/helpers.ts"],"sourcesContent":["/**\n * Entidad Media\n * Se utiliza para almacenar y gestionar archivos y recursos multimedia.\n */\n\nexport interface Media {\n id: string;\n accountId: string;\n filename: string;\n url: string;\n thumbnailUrl: string;\n mimeType: string;\n extension: string;\n size: number;\n type: MediaType;\n altText: string;\n createdAt: Date;\n updatedAt: Date;\n deletedAt?: Date | null;\n}\n\nexport enum MediaType {\n IMAGE = 'IMAGE',\n VIDEO = 'VIDEO',\n FAVICON = 'FAVICON',\n DOCUMENT = 'DOCUMENT',\n AUDIO = 'AUDIO',\n ARCHIVE = 'ARCHIVE',\n OTHER = 'OTHER',\n}\n\n\n","export enum Currency {\n USD = 'USD',\n EUR = 'EUR',\n UYU = 'UYU',\n ARS = 'ARS',\n BRL = 'BRL'\n}\n\nexport function getCurrencySymbol(currencyCode: Currency): string {\n const currencySymbols: { [key: string]: string } = {\n [Currency.USD]: 'U$S',\n [Currency.EUR]: '€',\n [Currency.UYU]: '$',\n [Currency.ARS]: '$',\n [Currency.BRL]: 'R$',\n };\n \n return currencySymbols[currencyCode] || currencyCode.toString();\n} \n\n\n","// shared-types/src/account/types.ts - Account entity types\n\nexport interface Account {\n id: string;\n name: string;\n slug: string;\n address?: string;\n logoId?: string;\n currency: string;\n instagram?: string;\n facebook?: string;\n whatsapp?: string;\n phone?: string;\n email: string;\n timezone: string;\n hasDelivery: boolean;\n status: AccountStatus;\n themeConfig?: ThemeConfig;\n privateKey?: string;\n demo: boolean;\n createdAt: Date;\n updatedAt: Date;\n deletedAt?: Date;\n}\n\nexport enum AccountStatus {\n ACTIVE = 'ACTIVE',\n INACTIVE = 'INACTIVE',\n PENDING = 'PENDING',\n SUSPENDED = 'SUSPENDED',\n}\n\nexport interface ThemeConfig {\n backgroundColor: string;\n textColor: string;\n primaryColor: string;\n secondaryColor: string;\n}\n ","import { AccountDeliveryOption } from \"../accountDeliveryOption/types\";\nimport { Address, MapPosition, Phone } from \"../common\";\n\n/**\n * Entidad AccountBranch\n * Representa una sucursal de una cuenta.\n */\n\nexport interface AccountBranch {\n id: string;\n accountId: string;\n name: string;\n address?: Address; \n addressInstructions?: string;\n addressCoordinates?: MapPosition | null;\n phone?: Phone | null;\n email?: string | null;\n demo:boolean;\n status: AccountBranchStatus; \n createdAt: Date;\n updatedAt: Date;\n deletedAt?: Date | null;\n\n schedule: AccountBranchSchedule[];\n deliveryOptions: AccountDeliveryOption[];\n}\n\nexport enum AccountBranchStatus {\n ACTIVE = \"ACTIVE\",\n INACTIVE = \"INACTIVE\"\n}\n\n \nexport interface AccountBranchSchedule {\n id: string;\n accountBranchId: string;\n day: AccountBranchScheduleDay;\n start: number;\n end: number;\n status: AccountBranchScheduleStatus;\n demo:boolean;\n createdAt: Date;\n updatedAt: Date;\n deletedAt?: Date | null;\n}\n\nexport enum AccountBranchScheduleStatus {\n ACTIVE = \"ACTIVE\",\n INACTIVE = \"INACTIVE\"\n}\n\nexport enum AccountBranchScheduleDay {\n MONDAY = \"MONDAY\",\n TUESDAY = \"TUESDAY\",\n WEDNESDAY = \"WEDNESDAY\",\n THURSDAY = \"THURSDAY\",\n FRIDAY = \"FRIDAY\",\n SATURDAY = \"SATURDAY\",\n SUNDAY = \"SUNDAY\"\n}","import { Address, MapPosition } from \"../common\";\nimport { AccountIntegration } from \"../accountIntegration/types\";\nimport { AccountBranch } from \"../accountBranch/types\";\n\n/**\n * Entidad AccountDeliveryOption\n * Representa una opción de envío de una cuenta.\n */\n\nexport interface AccountDeliveryOption {\n\tid: string;\n\taccountId: string;\n\taccountBranchId: string;\n\tname: string;\n\tintegrationId?: string;\n\tisScheduled: boolean;\n\tpriceLogic: AccountDeliveryOptionPriceLogic;\n\tstatus: AccountDeliveryOptionStatus;\n\tdemo:boolean;\n\tcreatedAt: Date;\n\tupdatedAt: Date;\n\tdeletedAt?: Date | null;\n\n\tzones: AccountDeliveryOptionZone[];\n\tintegration?: AccountIntegration | null;\n\tcalculatedCost?: AccountDeliveryOptionCalculatedCost | null;\n\taccountBranch?: AccountBranch | null;\n}\n\nexport enum AccountDeliveryOptionPriceLogic {\n\tFIXED = \"FIXED\",\n\tPER_KM = \"PER_KM\",\n}\n\nexport enum AccountDeliveryOptionStatus {\n\tACTIVE = \"ACTIVE\",\n\tINACTIVE = \"INACTIVE\",\n}\n\nexport interface AccountDeliveryOptionCalculatedCost {\n\tbasePrice: number;\n\tdistanceKm: number;\n\tfinalPrice: number;\n\tpriceLogic: AccountDeliveryOptionPriceLogic;\n\tcurrency: string;\n}\n\n\nexport interface AccountDeliveryOptionZone {\n\tid: string;\n\taccountId: string;\n\taccountDeliveryOptionId: string;\n\tname: string;\n\tprice: number;\n\tpriceMin: number;\n\tarea: string;\n\tstatus: AccountDeliveryOptionZoneStatus;\n\tdemo:boolean;\n\tcreatedAt: Date;\n\tupdatedAt: Date;\n\tdeletedAt?: Date | null;\n}\n\nexport enum AccountDeliveryOptionZoneStatus {\n\tACTIVE = \"ACTIVE\",\n\tINACTIVE = \"INACTIVE\",\n}","/**\n * Entidad AccountDomain\n * Representa un dominio personalizado asociado a una cuenta.\n * Permite dominios completos y subdominios, con control de estado y verificación.\n */\n\nexport interface AccountDomain {\n id: string;\n accountId: string;\n domain: string; /** Dominio completo (ej: example.com) */\n subdomain?: string;/** Subdominio opcional (ej: shop, blog) */\n isPrimary: boolean; /** Indica si este es el dominio principal de la cuenta */\n status: AccountDomainStatus; /** Estado del dominio: PENDING, ACTIVE, INACTIVE */\n verifiedAt?: Date; /** Fecha de verificación del dominio */\n \n createdAt: Date;\n updatedAt: Date;\n deletedAt?: Date | null;\n}\n\nexport enum AccountDomainStatus {\n PENDING = \"PENDING\",\n ACTIVE = \"ACTIVE\",\n INACTIVE = \"INACTIVE\"\n}\n\n ","import { Integration } from \"../integration\";\n/**\n * Entidad AccountIntegration\n * Contiene información de la integración y sus credenciales.\n */\n\nexport enum AccountIntegrationStatus {\n\tACTIVE = 'ACTIVE',\n\tINACTIVE = 'INACTIVE',\n\tBETA = 'BETA',\n\tDEPRECATED = 'DEPRECATED',\n}\nexport enum AccountIntegrationConnectionStatus {\n\tCONNECTED = 'CONNECTED',\n\tDISCONNECTED = 'DISCONNECTED',\n\tERROR = 'ERROR',\n\tWARNING = 'WARNING',\n}\n\nexport enum AccountIntegrationEnvironment {\n\tPRODUCTION = 'PRODUCTION',\n\tDEVELOPMENT = 'DEVELOPMENT',\n}\n\nexport interface AccountIntegration {\n\tid: string;\n\taccountId: string;\n\tintegrationId: string;\n\tsettingsProduction: Object | null;\n\tsettingsDevelopment: Object | null;\n\tenvironment: AccountIntegrationEnvironment;\n\tproductionStatus: AccountIntegrationConnectionStatus;\n\tdevelopmentStatus: AccountIntegrationConnectionStatus;\n\tstatus: AccountIntegrationStatus;\n\tdemo: boolean;\n\tcreatedAt: Date;\n\tupdatedAt: Date;\n\tdeletedAt?: Date | null;\n\n\tintegration: Integration;\n\n\tsettings: Record<string, any>; // settings for requested environment\n}","// shared-types/src/accountPaymentMethod/types.ts\n\nimport { Account } from \"../account\";\nimport { AccountIntegration } from \"../accountIntegration\";\nimport { StatusInfo } from \"../common/Status\";\n\nexport enum AccountPaymentMethodStatus {\n ACTIVE = 'ACTIVE', // Active\n INACTIVE = 'INACTIVE', // Disabled\n}\n\nexport enum AccountPaymentMethodType {\n ONLINE = 'ONLINE',\n BANK_TRANSFER = 'BANK_TRANSFER',\n CASH = 'CASH',\n CASH_ON_DELIVERY = 'CASH_ON_DELIVERY',\n OTHER = 'OTHER',\n}\n\nexport interface AccountPaymentMethod {\n id: string;\n accountId: string;\n accountIntegrationId?: string;\n type: AccountPaymentMethodType;\n name: string;\n description?: string;\n customerInstructions?: string;\n order: number;\n status: AccountPaymentMethodStatus;\n demo: boolean;\n createdAt: Date;\n updatedAt: Date;\n deletedAt?: Date;\n\n accountIntegration?: AccountIntegration;\n account?: Account;\n statusInfo?: StatusInfo;\n typeName?: string;\n}","import { StatusInfo } from \"../common/Status\";\nimport { AccountPaymentMethodStatus, AccountPaymentMethodType } from \"./types\";\n\nexport function getAccountPaymentMethodStatusInfo(status: AccountPaymentMethodStatus): StatusInfo {\n\tconst map: Record<AccountPaymentMethodStatus, StatusInfo> = {\n\t\tACTIVE: { text: 'Activo', class: 'success', actionText: '' },\n\t\tINACTIVE: { text: 'Inactivo', class: 'danger', actionText: '' },\n\t};\n\n\treturn map[status] ?? { text: String(status), class: 'secondary' };\n}\n\nexport function getAccountPaymentMethodTypeName(type: AccountPaymentMethodType): string {\n\tconst map: Record<AccountPaymentMethodType, string> = {\n\t\tONLINE: 'Online',\n\t\tBANK_TRANSFER: 'Transferencia bancaria',\n\t\tCASH: 'Efectivo',\n\t\tCASH_ON_DELIVERY: 'Efectivo en la entrega',\n\t\tOTHER: 'Otro',\n\t};\n\treturn map[type] ?? type;\n}","import { CartItemValidation } from \"./dto\";\nimport { Customer } from \"../customer\";\nimport { AccountDomain } from \"../accountDomain\";\nimport { AccountPaymentMethod } from \"../accountPaymentMethod\";\n\n/**\n * Entidad Cart\n * Define el carrito de compras de un cliente en el sitio web.\n */\n\nexport interface Cart {\n id: string;\n code: string;\n customerId?: string;\n sessionId?: string;\n items: CartItem[];\n currency: string;\n subtotal: number;\n total: number;\n accountPaymentMethodId?: string;\n deliveryType: CartDeliveryType;\n deliveryFirstName?: string;\n deliveryLastName?: string;\n deliveryAddress?: string;\n deliveryPhone?: string;\n deliveryOptionId?: string;\n pickupBranchId?: string;\n itemCount: number;\n createdAt: Date;\n updatedAt: Date;\n status: CartStatus;\n source: CartSource;\n sourceAccountDomainId?: string;\n recoveryToken?: string;\n customerNote?: string;\n hasIssues: boolean; // Indica si el carrito tiene problemas que resolver\n issuesCount: number; // Número de items con problemas\n // Nuevos campos de precios\n subtotalPrice?: number;\n totalDiscounts?: number;\n totalShippingPrice?: number;\n totalTax?: number;\n totalPrice?: number;\n taxDetails?: any;\n\n customer?: Partial<Customer> | null;\n accountDomain?: Partial<AccountDomain> | null;\n accountPaymentMethod?: Partial<AccountPaymentMethod> | null;\n}\n\nexport interface CartItem {\n id: string;\n productId: string;\n productVariantId: string;\n name: string;\n unitPrice: number; // Precio cuando se agregó al carrito\n quantity: number;\n image?: string;\n thumbnailUrl?: string; // URL del thumbnail de la variante\n sku?: string;\n attributeDetails: CartItemAttributeDetail[]; // Detalles legibles de atributos\n \n validation?: CartItemValidation; // Información de validación del item en dto\n}\n\n\nexport interface CartItemAttributeDetail {\n name: string; // Nombre del atributo (ej: \"Talle\", \"Color\")\n alias: string; // Alias del atributo (ej: \"size\", \"color\")\n value: string; // Valor del atributo (ej: \"M\", \"Rojo\")\n type?: string; // Tipo del atributo (opcional)\n}\n\nexport enum CartStatus {\n ACTIVE = 'ACTIVE',\n LOCKED = 'LOCKED',\n EXPIRED = 'EXPIRED',\n CONVERTED = 'CONVERTED',\n ABANDONED = 'ABANDONED',\n MERGED = 'MERGED'\n}\n\nexport enum CartSource {\n WEB = 'WEB',\n POS = 'POS',\n API = 'API'\n}\n\nexport enum CartDeliveryType {\n SHIPPING = 'SHIPPING',\n PICKUP = 'PICKUP'\n}\n\n\n\n\n","import { OrderSource } from \"../order\";\n\n/**\n * Add an item to the cart\n*/\nexport interface CartItemAddDto {\n cartId: string;\n productId: string;\n variantId?: string;\n quantity: number;\n attributes?: { [key: string]: string | number; };\n userEmail?: string;\n userId?: string;\n}\n\n/**\n * Update an item in the cart\n */\nexport interface CartItemUpdateDto {\n cartId: string;\n itemId: string;\n quantity: number;\n}\n\n/**\n * Remove an item from the cart\n */\nexport interface CartItemRemoveDto {\n cartId: string;\n itemId: string;\n}\n\nexport interface CartUpdateDto {\n cartId: string;\n source: OrderSource;\n accountDomainId?: string;\n customer: {\n email: string;\n };\n delivery: {\n type: 'SHIPPING' | 'PICKUP';\n deliveryOptionId?: string;\n pickupBranchId?: string;\n firstname: string;\n lastname: string;\n phone: {\n countryCode: string;\n national: string;\n international: string;\n type: string;\n validated: boolean;\n };\n address: {\n country: string;\n department: string;\n locality: string;\n street: string;\n complement?: string;\n notes?: string;\n postalCode: string;\n mapPosition: {\n lat: number;\n lng: number;\n };\n };\n };\n billing: {\n name: string;\n address: string;\n city: string;\n department: string;\n };\n}\n\n/**\n * Confirm a cart\n */\nexport interface CartConfirmDto {\n cartId: string;\n}\n\n/**\n * Validation information for a cart item\n */\nexport interface CartItemValidation {\n hasIssues: boolean; // Indica si hay problemas con este item\n issues: string[]; // Lista de problemas encontrados (mensajes legibles)\n errorCode?: CartItemErrorCode; // Código específico del error principal\n currentPrice?: number; // Precio actual del producto (si cambió)\n availableStock?: number; // Stock disponible actual\n isProductActive?: boolean; // Si el producto está activo\n}\n\n/**\n * Error codes for cart items\n */\nexport enum CartItemErrorCode {\n PRICE_INCREASED = 'PRICE_INCREASED', // Precio aumentó\n PRICE_DECREASED = 'PRICE_DECREASED', // Precio disminuyó \n PRODUCT_INACTIVE = 'PRODUCT_INACTIVE', // Producto ya no está disponible\n STOCK_INSUFFICIENT = 'STOCK_INSUFFICIENT', // Stock insuficiente (hay algo disponible)\n STOCK_UNAVAILABLE = 'STOCK_UNAVAILABLE', // Sin stock (0 disponible)\n VALIDATION_ERROR = 'VALIDATION_ERROR' // Error general de validación\n}\n","/**\n * Entidad Customer\n * Cliente de la tienda\n*/\nimport { Phone } from \"../common/Phone\";\n\nexport interface Customer {\n id: string;\n accountId: string;\n firstName?: string;\n lastName?: string;\n email: string;\n phone?: Phone;\n status: CustomerStatus;\n createdAt: Date;\n updatedAt: Date;\n deletedAt?: Date | null;\n}\n\nexport enum CustomerStatus {\n ACTIVE = 'ACTIVE',\n INACTIVE = 'INACTIVE',\n BLACKLISTED = 'BLACKLISTED', // e.g., for fraudulent activity\n PENDING = 'PENDING', // e.g., email verification needed\n}","import { AccountIntegration } from \"../accountIntegration\";\n/**\n * Entidad Integration\n * Define las integraciones de terceros disponibles en la plataforma (ej. pasarelas de pago, transportistas).\n * Almacena información sobre el proveedor, categoría y esquema de parámetros requeridos.\n */\n\nexport enum IntegrationCategory {\n\tPAYMENT_GATEWAY = 'PAYMENT_GATEWAY',\n\tSHIPPING_CARRIER = 'SHIPPING_CARRIER',\n\tMARKETPLACE = 'MARKETPLACE',\n\tEMAIL_MARKETING = 'EMAIL_MARKETING',\n\tANALYTICS = 'ANALYTICS',\n\tACCOUNTING = 'ACCOUNTING',\n\tSOCIAL_MEDIA = 'SOCIAL_MEDIA',\n\tOTHER = 'OTHER',\n}\n\nexport enum IntegrationStatus {\n\tACTIVE = 'ACTIVE',\n\tINACTIVE = 'INACTIVE',\n\tBETA = 'BETA',\n\tDEPRECATED = 'DEPRECATED',\n}\n\nexport interface Integration {\n\tid: string;\n\tcategory: IntegrationCategory;\n\tproviderKey: string; // Unique identifier key (e.g., 'stripe', 'mercadopago')\n\tname: string; // Human-readable name (e.g., \"Stripe\", \"Mercado Pago\")\n\tslug: string;\n\tdescription?: string;\n\tsetupInstructions?: string; // General instructions or link to docs\n\tlogoUrl?: string; // URL to the integration's logo\n\trequiredParamsSchema?: any; // Define required parameters/credentials structure\n\tsupportedPaymentMethods?: string[]; // List of supported payment methods (e.g., 'visa', 'mastercard', 'american_express', 'bank_transfer', 'cash')\n\tstatus: IntegrationStatus;\n\tcreatedAt: Date;\n\tupdatedAt: Date;\n\tdeletedAt?: Date | null;\n\torder: number;\n\n\taccountIntegration: AccountIntegration | null;\n}","import { Currency, Media } from \"../common\";\nimport { Customer } from \"../customer\";\nimport { AccountIntegration } from \"../accountIntegration\";\nimport { AccountDomain } from \"../accountDomain\";\nimport { Product } from \"../product\";\nimport { FulfillmentStatus } from \"../fulfillment/types\";\nimport { StatusInfo } from \"../common/Status\";\nimport { PaymentStatus } from \"../payment\";\nimport { AccountPaymentMethod } from \"../accountPaymentMethod\";\n\n/**\n * Entidad Order\n * Define la orden de compra de un cliente en el sitio web.\n */\n\nexport interface Order {\n id: string;\n accountId: string;\n customerId: string;\n cartId?: string;\n code: string;\n deliveryType: OrderDeliveryType;\n deliveryFirstName?: string;\n deliveryLastName?: string;\n deliveryAddress?: any;\n deliveryPhone?: any;\n deliveryOptionId?: string;\n pickupBranchId?: string;\n accountPaymentMethodId?: string;\n paymentMethodIntegrationId?: string;\n billingInformation?: any;\n currency: Currency;\n currencySymbol?: string;\n subtotalPrice: number;\n totalDiscounts: number;\n totalShippingPrice: number;\n totalTax: number;\n taxDetails?: any;\n totalPrice: number;\n totalRefunded: number;\n status: OrderStatus;\n statusInfo?: StatusInfo;\n paymentStatus: OrderPaymentStatus;\n paymentStatusInfo?: StatusInfo;\n fulfillmentStatus: FulfillmentStatus;\n statusHistory?: StatusChangeHistory[];\n customerNote?: string;\n internalNote?: string;\n source: OrderSource;\n sourceAccountDomainId?: string;\n demo: boolean;\n createdAt: Date;\n updatedAt: Date;\n cancelledAt?: Date;\n cancelReason?: string;\n deletedAt?: Date;\n items?: OrderItem[];\n\n customer?: Customer | null;\n paymentMethodIntegration?: AccountIntegration | null;\n accountDomain?: AccountDomain;\n accountPaymentMethod?: Partial<AccountPaymentMethod> | null;\n\n statusFlow?: StatusFlow[];\n // Estados permitidos para cambiar el estado de la orden\n statusChangeAllowed?: OrderStatus[];\n}\n\nexport interface OrderItem {\n id: string;\n accountId: string;\n orderId: string;\n productId: string;\n productVariantId: string;\n sku?: string;\n productName: string;\n variantName?: string;\n currency: Currency;\n currencySymbol?: string;\n unitPrice: number;\n totalDiscount: number;\n totalPrice: number;\n quantity: number;\n quantityFulfilled: number;\n quantityRefunded: number;\n quantityReturned: number;\n totalTax: number;\n taxName?: string;\n createdAt: Date;\n updatedAt: Date;\n\n // Snapshot del producto en el momento de la compra\n productSnapshot?: OrderItemSnapshot;\n\n product?: Product;\n}\n\nexport enum OrderStatus {\n PENDING = 'PENDING', // Order placed, awaiting payment confirmation\n CONFIRMED = 'CONFIRMED', // Payment received, order confirmed\n PROCESSING = 'PROCESSING', // Order being prepared\n PROCESSED = 'PROCESSED', // Order ready to be shipped\n ON_HOLD = 'ON_HOLD', // Order temporarily paused\n COMPLETED = 'COMPLETED', // Order finished (e.g., after return period)\n CANCELLED = 'CANCELLED', // Order cancelled before fulfillment\n FAILED = 'FAILED', // Order failed (e.g., payment failed irrecoverably)\n}\n\nexport enum OrderPaymentStatus {\n PENDING = 'PENDING',\n PARTIAL = 'PARTIAL',\n PAID = 'PAID',\n OVERPAID = 'OVERPAID',\n REFUNDED = 'REFUNDED',\n PARTIALLY_REFUNDED = 'PARTIALLY_REFUNDED'\n}\n\nexport enum OrderSource {\n WEB = 'WEB',\n POS = 'POS',\n API = 'API'\n}\n\nexport enum OrderDeliveryType {\n SHIPPING = 'SHIPPING',\n PICKUP = 'PICKUP',\n}\n\nexport interface StatusChangeHistory {\n status: OrderStatus;\n timestamp: Date;\n reason?: string;\n userId?: string;\n metadata?: Record<string, any>;\n}\n\nexport interface OrderItemSnapshot {\n sku?: string;\n productName: string;\n variantName?: string;\n media?: Media[];\n}\n\ntype StatusByType = {\n order: OrderStatus;\n fulfillment: FulfillmentStatus;\n payment: PaymentStatus;\n};\n\nexport type StatusFlow<T extends keyof StatusByType = keyof StatusByType> = {\n type: T;\n status: StatusByType[T];\n text?: string;\n doneAt: Date | null;\n};\n\nexport type NextStatusAction<T extends keyof StatusByType = keyof StatusByType> = {\n type: T;\n status: StatusByType[T];\n text: string;\n};","import { StatusInfo } from \"../common/Status\";\nimport { OrderStatus } from \"./types\";\n\nexport function getOrderStatusInfo(status: OrderStatus): StatusInfo {\n\tconst map: Record<OrderStatus, StatusInfo> = {\n\t\tPENDING: { text: 'Pendiente', class: 'secondary', actionText: '' },\n\t\tCONFIRMED: { text: 'Confirmada', class: 'info', actionText: 'Confirmar orden' },\n\t\tPROCESSING: { text: 'En proceso', class: 'warning', actionText: 'Procesar orden' },\n\t\tPROCESSED: { text: 'Procesada', class: 'primary', actionText: 'Orden procesada' },\n\t\tON_HOLD: { text: 'En espera', class: 'secondary', actionText: 'Orden en espera' },\n\t\tCOMPLETED: { text: 'Completada', class: 'success', actionText: 'Completar orden' }, \n\t\tCANCELLED: { text: 'Cancelada', class: 'danger', actionText: 'Cancelar orden' },\n\t\tFAILED: { text: 'Fallida', class: 'danger', actionText: '' },\n\t};\n\n\treturn map[status] ?? { text: String(status), class: 'secondary' };\n}","// shared-types/src/payment/types.ts\n\nimport { Currency } from \"../common\";\nimport { AccountPaymentMethod } from \"../accountPaymentMethod\";\n\nexport enum PaymentStatus {\n PENDING = 'PENDING', // Pendiente\n PREAUTHORIZED = 'PREAUTHORIZED',\n APPROVED = 'APPROVED', // Pago aprobado online\n PAID = 'PAID', // Pago realizado por redes fisicas\n REJECTED = 'REJECTED', // Pago rechazado\n REFUND_IN_PROCESS = 'REFUND_IN_PROCESS', // En proceso de reembolso con la plataforma de pagos\n PARTIAL_REFUND = 'PARTIAL_REFUND', // Pago parcialmente reembolsado\n REFUNDED = 'REFUNDED', // Pago reembolsado\n ERROR = 'ERROR' // Represents an error in porcessing the payment. Ex: a webhook comes without an esternal reference, so we can't match in our system\n}\n\nexport enum PaymentMethodType {\n BANK_TRANSFER = 'BANK_TRANSFER',\n CREDIT_CARD = 'CREDIT_CARD',\n DEBIT_CARD = 'DEBIT_CARD',\n MERCADOPAGO = 'MERCADOPAGO',\n PHYSICAL = 'PHYSICAL',\n INTERNATIONAL = 'INTERNATIONAL',\n PAYPAL = 'PAYPAL',\n CASH = 'CASH',\n OTHER = 'OTHER', // Added for flexibility\n}\nexport interface Payment {\n id: string;\n accountId: string;\n orderId: string;\n invoiceId?: string;\n accountPaymentMethodId?: string;\n gatewayPaymentId?: string;\n referenceCode?: string;\n paymentMethodType?: PaymentMethodType;\n currency: Currency;\n amount: number;\n amountReceived: number;\n amountRefunded: number;\n paidAt?: string | Date;\n refundedAt?: string | Date;\n status: PaymentStatus;\n cardBrand?: string;\n cardBrandInfo?: PaymentCardBrand;\n cardLast4?: string;\n data?: Record<string, unknown>\n metadata?: Record<string, any>;\n demo: boolean;\n createdAt: string | Date;\n updatedAt: string | Date;\n deletedAt?: string | Date;\n\n accountPaymentMethod?: Partial<AccountPaymentMethod> | null;\n}\n\n// Provider-level types (entity-agnostic, reusable across projects)\nexport type PaymentProviderKey = 'MERCADOPAGO' | 'MANUAL';\n\n// TODO: Eventually refactor what is passed to the payment provider constructor, as it most likely just need\nexport interface PaymentProviderContext {\n data: Record<string, unknown>\n}\n\nexport interface PaymentProviderInitInput {\n // Arbitrary provider input. Caller builds this from their domain data\n data: Record<string, any>;\n}\n\nexport interface PaymentProviderInitOutput {\n data: Record<string, any>;\n status: PaymentStatus\n}\n\nexport interface PaymentProviderCaptureInput {\n data: Record<string, any>;\n}\n\nexport interface PaymentProviderCaptureOutput {\n data: Record<string, any>;\n}\n\nexport interface PaymentProviderRefundInput {\n amount: number;\n data: Record<string, any>;\n}\n\nexport interface PaymentProviderRefundOutput {\n data: Record<string, any>;\n}\n\nexport interface PaymentProviderWebhookResult {\n //TODO: Ideally, if later an order can have multiple payments, the way to link thrid party payments with our own payment entity, should be throu something like a \n // payment session in our system, that would be set as the external reference in the third party payment\n order_code: string | null\n status: PaymentStatus\n data: Record<string, unknown>\n // TODO: Ideally i think this should live inside the data field, not have separate columns and just let the consumer know what\n // attributes to query to resolve them\n paymentDetails: {\n method?: string,\n last4?: string\n }\n}\n\nexport interface WebhookPayload {\n // Id of payment provider webhook belongs to, to pass data for processing\n provider: string;\n accountId: string;\n payload: {\n query: Record<string, unknown>\n body: Record<string, unknown>\n headers: Record<string, unknown>\n }\n}\n\nexport enum PaymentCardBrandKey {\n mp_account_money = 'mp_account_money',\n}\n\nexport interface PaymentCardBrand {\n key: string;\n name: string;\n image: string;\n}\n\nexport function getPaymentCardBrand(key: PaymentCardBrandKey): PaymentCardBrand {\n const map: Record<PaymentCardBrandKey, PaymentCardBrand> = {\n mp_account_money: {\n key: PaymentCardBrandKey.mp_account_money,\n name: 'Mercado Pago',\n image: 'https://storage.googleapis.com/retaila-assets/payments/mercadopago.png',\n },\n }\n return map[key] || {\n key,\n name: '',\n image: null,\n }\n}\n\nexport interface PaymentProviderAdapter {\n readonly key: PaymentProviderKey;\n initPayment(input: PaymentProviderInitInput): Promise<PaymentProviderInitOutput>;\n capture(input: PaymentProviderCaptureInput): Promise<PaymentProviderCaptureOutput>\n refund(input: PaymentProviderRefundInput): Promise<PaymentProviderRefundOutput>;\n processWebhook(input: WebhookPayload['payload']): Promise<PaymentProviderWebhookResult>\n}","import { StatusInfo } from \"../common/Status\";\nimport { PaymentStatus } from \"./types\";\n\nexport function getPaymentStatusInfo(status: PaymentStatus): StatusInfo {\n\tconst map: Record<PaymentStatus, StatusInfo> = {\n\t\tPENDING: { text: 'Pago pendiente', class: 'warning', actionText: '' },\n\t\tPREAUTHORIZED: { text: 'Pago preautorizado', class: 'info', actionText: 'Preautorizar pago' },\n\t\tAPPROVED: { text: 'Pago aprobado', class: 'success', actionText: 'Aprobar pago' },\n\t\tPAID: { text: 'Pago realizado', class: 'success', actionText: 'Pago realizado' },\n\t\tREJECTED: { text: 'Pago rechazado', class: 'danger', actionText: 'Rechazar pago' },\n\t\tREFUND_IN_PROCESS: { text: 'Pago en proceso de reembolso', class: 'warning', actionText: 'Reembolsar pago' },\n\t\tPARTIAL_REFUND: { text: 'Pago parcialmente reembolsado', class: 'warning', actionText: 'Reembolsar pago' },\n\t\tREFUNDED: { text: 'Pago reembolsado', class: 'success', actionText: 'Reembolsado' },\n\t\tERROR: { text: 'Error en pago', class: 'danger', actionText: 'Error en pago' },\n\t};\n\n\treturn map[status] ?? { text: String(status), class: 'secondary' };\n}","import { Media } from \"../common\";\nimport { StatusInfo } from \"../common/Status\";\nimport { ProductCategory } from \"../productCategory\";\n\n/**\n * Entidad Product\n * Representa un producto vendible en la tienda. Es la entidad base que puede tener múltiples variantes.\n */\n\nexport interface Product {\n id: string;\n accountId: string;\n code: string;\n brandId?: string | null;\n supplierId?: string | null;\n productType: ProductType;\n sku?: string | null;\n barcode?: string | null;\n name: string; // e.g., \"Zapatos\", \"Pantalones\", \"Camisas\"\n slug: string;\n description?: string | null;\n isFeatured: boolean;\n\n // Inventory & Shipping\n allowBackorder: boolean; // Permite realizar pedidos aunque no haya stock disponible. Se aplica a las variantes si no está definido allí\n weight?: number | null;\n weightUnit?: string | null; // e.g., \"kg\"\n height?: number | null;\n width?: number | null;\n depth?: number | null; \n dimensionUnit?: string | null; // e.g., \"cm\"\n shippingLeadTime?: string | null; // e.g., \"1-3 days\"\n\n status: ProductStatus; // ACTIVE, INACTIVE\n statusInfo?: StatusInfo;\n \n createdAt: Date;\n updatedAt: Date;\n deletedAt?: Date | null;\n\n media?: Media[]\n\n variants?: ProductVariant[];\n categories?: ProductCategory[];\n}\n\nexport enum ProductStatus {\n ACTIVE = 'ACTIVE', // Available for sale\n INACTIVE = 'INACTIVE', // Not visible/purchasable\n ARCHIVED = 'ARCHIVED', // Not visible, kept for records\n DRAFT = 'DRAFT', // Incomplete product setup\n}\n\nexport enum ProductType {\n SIMPLE = 'SIMPLE', // Product without variants (may have a default hidden variant)\n VARIABLE = 'VARIABLE', // Product with distinct variants (color, size, etc.)\n BUNDLE = 'BUNDLE', // A package of other products/variants\n GIFT_CARD = 'GIFT_CARD', // Virtual or physical gift card\n}\n\n\nexport interface ProductVariant {\n id: string;\n accountId: string;\n productId: string;\n\n sku?: string | null;\n barcode?: string | null; // EAN, UPC, etc.\n\n // Pricing\n currency: string; // ISO 4217 currency code\n price: number;\n compareAtPrice?: number;\n allowBackorder?: boolean;\n \n // Inventory & Shipping\n stock: number;\n weight?: number | null;\n weightUnit?: string | null;\n height?: number | null;\n width?: number | null;\n depth?: number | null;\n dimensionUnit?: string | null;\n shippingLeadTime?: string | null; // e.g., \"1-3 days\"\n \n order: number;\n\n createdAt: Date;\n updatedAt: Date;\n deletedAt?: Date;\n\n}","import { StatusInfo } from \"../common/Status\";\nimport { ProductStatus } from \"./types\";\n\nexport function getProductStatusInfo(status: ProductStatus): StatusInfo {\n\tconst map: Record<ProductStatus, StatusInfo> = {\n\t\tACTIVE: { text: 'Activo', class: 'success' },\n\t\tINACTIVE: { text: 'Inactivo', class: 'danger' },\n\t\tARCHIVED: { text: 'Archivado', class: 'secondary' },\n\t\tDRAFT: { text: 'Borrador', class: 'secondary' },\n\t};\n\n\treturn map[status] ?? { text: String(status), class: 'secondary' };\n}","/**\n * Entidad ProductAttribute\n * Define los atributos disponibles que se pueden asignar a las variantes de producto (ej. Color, Talla).\n * Especifica el nombre y tipo del atributo para ayudar en la representación y filtrado.\n */\n\nimport { ProductCategory } from \"../productCategory/types\";\n\nexport interface ProductAttribute {\n id: string;\n accountId: string;\n name: string; // e.g., \"Color de zapatos\", \"Talle de pantalones\", \"Material\"\n alias: string; // e.g., \"Color\", \"Talla\", \"Material\"\n slug: string;\n type: ProductAttributeType; // Helps frontend render appropriate controls\n isRequired: boolean; // isRequired for product variant\n suffix: string; // suffix for number type\n status: ProductAttributeStatus; // ACTIVE, INACTIVE\n \n createdAt: Date;\n updatedAt: Date;\n deletedAt?: Date | null;\n\n // dejo las categorias planas y los links de la tabla pivot por si necesito acceder a ellas\n productCategories: ProductCategory[]; // conveniente\n productCategoryLinks: Array<{ categoryId: string; isRequired: boolean; displayOrder: number }>;\n\n options: ProductAttributeOption[];\n displayOrder: number; // order to display the attribute in the frontend\n}\n\nexport enum ProductAttributeStatus {\n ACTIVE = 'ACTIVE',\n INACTIVE = 'INACTIVE',\n}\n\n\nexport enum ProductAttributeType {\n TEXT = 'TEXT', // text input\n NUMBER = 'NUMBER', // number input\n COLOR = 'COLOR', // Special type for color swatches\n SELECT = 'SELECT', // Dropdown list\n BOOLEAN = 'BOOLEAN', // checkbox input\n}\n\n/**\n * Una opción específica para un atributo (ej. \"Talle 42\" para el atributo \"Talle\").\n */\nexport interface ProductAttributeOption {\n id: string;\n accountId: string;\n productAttributeId: string;\n value: string;\n imageId?: string | null;\n order: number;\n createdAt: Date;\n updatedAt: Date;\n deletedAt?: Date | null;\n\n count: number; // number of options\n}","import { StandardCategory } from \"../standardCategory\";\n\n/**\n * Entidad ProductCategory\n * Define las categorías de productos.\n * Soporta una estructura jerárquica (categorías y subcategorías) mediante el campo parentId.\n * Cada categoría debe estar asociada a una categoría estándar del sistema.\n */\n\nexport interface ProductCategory {\n id: string;\n accountId: string;\n parentId?: string;\n standardCategoryId: string;\n name: string; // e.g., \"Zapatos\", \"Pantalones\", \"Camisas\"\n slug: string;\n description?: string;\n imageId?: string | null;\n order: number;\n isFeatured: boolean;\n status: ProductCategoryStatus; // ACTIVE, INACTIVE\n createdAt: Date;\n updatedAt: Date;\n deletedAt?: Date | null;\n\n children: ProductCategory[];\n parent: ProductCategory | null;\n standardCategory: StandardCategory;\n}\n\n\nexport enum ProductCategoryStatus {\n ACTIVE = 'ACTIVE',\n INACTIVE = 'INACTIVE',\n}\n\n","/**\n * Entidad StandardCategory\n * Define las categorías estándar de productos.\n * Estas categorías estan pensadas para unificar o agrupar productos de diferentes cuentas.\n */\n\nexport interface StandardCategory {\n id: string;\n parentId?: string;\n name: string; // e.g., \"Zapatos\", \"Pantalones\", \"Camisas\"\n slug: string;\n description?: string;\n imageId?: string | null;\n order: number;\n status: StandardCategoryStatus; // ACTIVE, INACTIVE\n metadata?: {\n icon?: string;\n displayInMenu?: boolean;\n seoTitle?: string;\n seoDescription?: string;\n attributes?: string[];\n };\n createdAt: Date;\n updatedAt: Date;\n deletedAt?: Date | null;\n\n children: StandardCategory[];\n parent: StandardCategory | null;\n}\n\nexport enum StandardCategoryStatus {\n ACTIVE = 'ACTIVE',\n INACTIVE = 'INACTIVE'\n}\n\n","/**\n * Entidad StoreBanner\n * Banners para la portada de la web de la tienda\n */\n\nimport { Media } from \"../common\";\n\nexport interface StoreBanner {\n id: string;\n accountId: string;\n title: string;\n desktopMediaId: string;\n mobileMediaId?: string | null;\n linkUrl?: string | null;\n altText?: string | null;\n displayOrder: number;\n startDate?: Date | null;\n endDate?: Date | null;\n status: StoreBannerStatus;\n createdAt: Date;\n updatedAt: Date;\n deletedAt?: Date | null;\n\n // Relationships\n desktopMedia?: Partial<Media> | null;\n mobileMedia?: Partial<Media> | null;\n}\n\nexport enum StoreBannerStatus {\n ACTIVE = \"ACTIVE\",\n INACTIVE = \"INACTIVE\"\n}\n\n ","/**\n * Entidad StorePage\n * Páginas de la web de la tienda\n */\n\nexport interface StorePage {\n id: string;\n accountId: string;\n type: StorePageType;\n title: string;\n slug: string;\n content?: string | null;\n seoTitle?: string | null;\n seoDescription?: string | null;\n \n status: StorePageStatus;\n canDelete: boolean;\n createdAt: Date;\n updatedAt: Date;\n deletedAt?: Date | null;\n}\n\nexport enum StorePageStatus {\n PUBLISHED = 'PUBLISHED',\n DRAFT = 'DRAFT',\n ARCHIVED = 'ARCHIVED',\n}\n\nexport enum StorePageType {\n ABOUT_US = 'ABOUT_US',\n CONTACT = 'CONTACT',\n FAQ = 'FAQ',\n TERMS_AND_CONDITIONS = 'TERMS_AND_CONDITIONS',\n PRIVACY_POLICY = 'PRIVACY_POLICY',\n RETURN_POLICY = 'RETURN_POLICY',\n SHIPPING_POLICY = 'SHIPPING_POLICY',\n BRANCHES = 'BRANCHES',\n JOBS = 'JOBS',\n OTHER = 'OTHER',\n}\n\n\n ","export enum PubSubTopics {\n ORDER_PLACED = 'order-placed',\n ORDER_CONFIRMED = 'order-confirmed',\n ORDER_PROCESSING = 'order-processing',\n ORDER_PROCESSED = 'order-processed',\n ORDER_COMPLETED = 'order-completed',\n ORDER_CANCELLED = 'order-cancelled',\n PAYMENT_PAID = 'payment-paid',\n NOTIFICATION_CREATED = 'notification-created',\n }","import { Account } from \"../account/types\";\nimport { Customer } from \"../customer/types\";\n\n\n// origen principal del hilo de conversación\nexport enum SupportConversationChannel {\n\tWEB = 'WEB',\n\tEMAIL = 'EMAIL',\n\tWHATSAPP = 'WHATSAPP'\n}\n\n// quién puede ver el hilo en el tenant\nexport enum SupportConversationVisibility {\n\tINTERNAL = 'INTERNAL',\n\tMERCHANT = 'MERCHANT'\n}\n\nexport enum SupportConversationPriority {\n\tLOW = 'LOW',\n\tMEDIUM = 'MEDIUM',\n\tHIGH = 'HIGH',\n\tURGENT = 'URGENT'\n}\n\nexport enum SupportConversationStatus {\n\tOPEN = 'OPEN',\n\tCLOSED = 'CLOSED',\n\tPENDING = 'PENDING'\n}\n\nexport enum SupportConversationMessageDeliveryStatus {\n\tQUEUED = 'QUEUED',\n\tSENT = 'SENT',\n\tDELIVERED = 'DELIVERED',\n\tREAD = 'READ',\n\tFAILED = 'FAILED'\n}\n\nexport enum SupportConversationMessageAiAnalysisStatus {\n\tPENDING = 'PENDING',\n\tPROCESSING = 'PROCESSING',\n\tCOMPLETED = 'COMPLETED',\n\tFAILED = 'FAILED'\n}\n\n// Dirección del mensaje con respecto al sistema: entrante o saliente\nexport enum SupportConversationMessageDirection {\n\tINBOUND = 'INBOUND',\n\tOUTBOUND = 'OUTBOUND'\n }\n \n // Tipo de emisor del mensaje\n export enum SupportConversationMessageSenderType {\n\tCUSTOMER = 'CUSTOMER',\n\tACCOUNT_USER = 'ACCOUNT_USER',\n\tANONYMOUS = 'ANONYMOUS',\n\tSYSTEM = 'SYSTEM',\n\tAI = 'AI'\n }\n\nexport interface SupportConversation {\n\tid: string;\n\taccountId: string;\n\tsubject?: string | null; // Asunto opcional del hilo (para email o contacto web)\n\tchannel: SupportConversationChannel; // Canal principal de la conversación (email/whatsapp/web, etc.)\n\tassigneeId?: string | null; // Asignación interna (agente/usuario de la cuenta que atiende la conversación)\n\tvisibility: SupportConversationVisibility;\n\tpriority: SupportConversationPriority; // Priorización operativa\n\trequiresMerchantAction: boolean; // Indica si el comercio debe responder o tomar acción\n\trequiresInternalAction: boolean; // Indica si el equipo interno debe intervenir (respuesta, etc.)\n\tcustomerId?: string | null; // Identificador del cliente si está registrado en el sistema\n\tcustomerName?: string | null; // Nombre del contacto (snapshot, no necesariamente el del Customer)\n\tcustomerLastname?: string | null; // Apellido del contacto (snapshot)\n\tcustomerEmail?: string | null; // Email del contacto (snapshot)\n\tcustomerPhone?: string | null; // Teléfono del contacto (snapshot)\n\tstatus: SupportConversationStatus; // Estado simple (string para mantenerlo liviano)\n\tlastMessageAt?: Date | null;\n\tunreadForAgent: number; // Mensajes no leídos por el agente interno\n\tunreadForCustomer: number; // Mensajes no leídos por el cliente/comercio\n\tmetadata?: Object | null; // Metadatos flexibles (headers email, ids de chat, etc.)\n\taiSuggestion?: Object | null; // Sugerencias/Resumen asistidos por IA\n\tcreatedAt: Date;\n\tupdatedAt: Date;\n\tdeletedAt?: Date | null;\n\n\taccount: Account;\n\t// assignee: AccountUser | null;\n\tcustomer: Customer | null;\n\tmessages: SupportConversationMessage[];\n}\n\n\nexport interface SupportConversationMessage {\n id: string;\n accountId: string;\n conversationId: string;\n direction: SupportConversationMessageDirection; // Dirección simple (entrante/saliente)\n senderType: SupportConversationMessageSenderType; // Tipo de emisor del mensaje (cliente, usuario interno, anónimo, sistema o IA)\n senderId?: string | null; // Identificador del emisor cuando aplica (Customer o AccountUser). Puede ser null para anónimos, sistema o IA\n body: string;\n isAiGenerated: boolean;\n isSystem: boolean;\n deliveryStatus: SupportConversationMessageDeliveryStatus; // Estado de entrega (para OUTBOUND). Por defecto QUEUED para ser enviado por el canal.\n requiresAiAnalysis: boolean;\n aiAnalysisStatus: SupportConversationMessageAiAnalysisStatus;\n aiAnalyzedAt?: Date | null;\n externalMessageId?: string | null; // Identificadores de proveedor externo (messageId, threadId)\n externalThreadId?: string | null;\n attachments?: Array<{\n url: string;\n type?: string;\n name?: string;\n sizeBytes?: number;\n }>; // Adjuntos simples (urls o descriptores livianos) \n metadata?: Object | null; // Metadatos flexibles (headers, payloads originales, etc.)\n createdAt: Date;\n updatedAt: Date;\n deletedAt?: Date | null;\n}\n","import { FulfillmentItem } from \"../fulfillmentItem\";\n\nexport enum FulfillmentStatus {\n PENDING = 'pending',\n PACKED = 'packed',\n SHIPPED = 'shipped',\n DELIVERED = 'delivered',\n CANCELLED = 'cancelled',\n}\n\nexport type Fulfillment = {\n id: string;\n accountId: string;\n orderId: string;\n accountBranchId: string;\n carrier: string;\n trackingNumber: string | null;\n items: FulfillmentItem[];\n status: FulfillmentStatus;\n data: Record<string, unknown> | null;\n packedAt: Date | null;\n shippedAt: Date | null;\n deliveredAt: Date | null;\n cancelledAt: Date | null;\n createdAt: Date;\n updatedAt: Date;\n deletedAt?: Date;\n}","import { StatusInfo } from \"../common/Status\";\nimport { FulfillmentStatus } from \"./types\";\n\nexport function getFulfillmentStatusInfo(status: FulfillmentStatus): StatusInfo {\n\tconst map: Record<FulfillmentStatus, StatusInfo> = {\n\t\tpending: { text: 'Pendiente', class: 'warning', actionText: '' },\n\t\tpacked: { text: 'Paquete listo', class: 'info', actionText: 'Paquete listo' },\n\t\tshipped: { text: 'Enviado', class: 'warning', actionText: 'Enviado' },\n\t\tdelivered: { text: 'Entregado', class: 'success', actionText: 'Entregado' },\n\t\tcancelled: { text: 'Cancelado', class: 'danger', actionText: 'Cancelado' },\n\t};\n\n\treturn map[status] ?? { text: String(status), class: 'secondary' };\n}"],"mappings":";;;AAqBO,IAAK,YAAL,kBAAKA,eAAL;AACL,EAAAA,WAAA,WAAQ;AACR,EAAAA,WAAA,WAAQ;AACR,EAAAA,WAAA,aAAU;AACV,EAAAA,WAAA,cAAW;AACX,EAAAA,WAAA,WAAQ;AACR,EAAAA,WAAA,aAAU;AACV,EAAAA,WA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N,EAAAA,4CAAA,aAAU;AACV,EAAAA,4CAAA,gBAAa;AACb,EAAAA,4CAAA,eAAY;AACZ,EAAAA,4CAAA,YAAS;AAJE,SAAAA;AAAA,GAAA;AAQL,IAAK,sCAAL,kBAAKC,yCAAL;AACN,EAAAA,qCAAA,aAAU;AACV,EAAAA,qCAAA,cAAW;AAFA,SAAAA;AAAA,GAAA;AAMH,IAAK,uCAAL,kBAAKC,0CAAL;AACR,EAAAA,sCAAA,cAAW;AACX,EAAAA,sCAAA,kBAAe;AACf,EAAAA,sCAAA,eAAY;AACZ,EAAAA,sCAAA,YAAS;AACT,EAAAA,sCAAA,QAAK;AALQ,SAAAA;AAAA,GAAA;;;AClDP,IAAK,oBAAL,kBAAKC,uBAAL;AACH,EAAAA,mBAAA,aAAU;AACV,EAAAA,mBAAA,YAAS;AACT,EAAAA,mBAAA,aAAU;AACV,EAAAA,mBAAA,eAAY;AACZ,EAAAA,mBAAA,eAAY;AALJ,SAAAA;AAAA,GAAA;;;ACCL,SAAS,yBAAyB,QAAuC;AAC/E,QAAM,MAA6C;AAAA,IAClD,SAAS,EAAE,MAAM,aAAa,OAAO,WAAW,YAAY,GAAG;AAAA,IAC/D,QAAQ,EAAE,MAAM,iBAAiB,OAAO,QAAQ,YAAY,gBAAgB;AAAA,IAC5E,SAAS,EAAE,MAAM,WAAW,OAAO,WAAW,YAAY,UAAU;AAAA,IACpE,WAAW,EAAE,MAAM,aAAa,OAAO,WAAW,YAAY,YAAY;AAAA,IAC1E,WAAW,EAAE,MAAM,aAAa,OAAO,UAAU,YAAY,YAAY;AAAA,EAC1E;AAEA,SAAO,IAAI,MAAM,KAAK,EAAE,MAAM,OAAO,MAAM,GAAG,OAAO,YAAY;AAClE;","names":["MediaType","Currency","AccountStatus","AccountBranchStatus","AccountBranchScheduleStatus","AccountBranchScheduleDay","AccountDeliveryOptionPriceLogic","AccountDeliveryOptionStatus","AccountDeliveryOptionZoneStatus","AccountDomainStatus","AccountIntegrationStatus","AccountIntegrationConnectionStatus","AccountIntegrationEnvironment","AccountPaymentMethodStatus","AccountPaymentMethodType","CartStatus","CartSource","CartDeliveryType","CartItemErrorCode","CustomerStatus","IntegrationCategory","IntegrationStatus","OrderStatus","OrderPaymentStatus","OrderSource","OrderDeliveryType","PaymentStatus","PaymentMethodType","PaymentCardBrandKey","ProductStatus","ProductType","ProductAttributeStatus","ProductAttributeType","ProductCategoryStatus","StandardCategoryStatus","StoreBannerStatus","StorePageStatus","StorePageType","PubSubTopics","SupportConversationChannel","SupportConversationVisibility","SupportConversationPriority","SupportConversationStatus","SupportConversationMessageDeliveryStatus","SupportConversationMessageAiAnalysisStatus","SupportConversationMessageDirection","SupportConversationMessageSenderType","FulfillmentStatus"]}
1
+ {"version":3,"sources":["../src/common/Media.ts","../src/common/Currency.ts","../src/account/types.ts","../src/accountBranch/types.ts","../src/accountDeliveryOption/types.ts","../src/accountDomain/types.ts","../src/accountIntegration/types.ts","../src/accountPaymentMethod/types.ts","../src/accountPaymentMethod/helpers.ts","../src/cart/types.ts","../src/cart/dto.ts","../src/customer/types.ts","../src/integration/types.ts","../src/order/types.ts","../src/order/helpers.ts","../src/payment/types.ts","../src/payment/helpers.ts","../src/product/types.ts","../src/product/helpers.ts","../src/productAttribute/types.ts","../src/productCategory/types.ts","../src/standardCategory/types.ts","../src/storeBanner/types.ts","../src/storePage/types.ts","../src/pubsub/types.ts","../src/supportConversation/types.ts","../src/fulfillment/types.ts","../src/fulfillment/helpers.ts"],"sourcesContent":["/**\n * Entidad Media\n * Se utiliza para almacenar y gestionar archivos y recursos multimedia.\n */\n\nexport interface Media {\n id: string;\n accountId: string;\n filename: string;\n url: string;\n thumbnailUrl: string;\n mimeType: string;\n extension: string;\n size: number;\n type: MediaType;\n altText: string;\n createdAt: Date;\n updatedAt: Date;\n deletedAt?: Date | null;\n}\n\nexport enum MediaType {\n IMAGE = 'IMAGE',\n VIDEO = 'VIDEO',\n FAVICON = 'FAVICON',\n DOCUMENT = 'DOCUMENT',\n AUDIO = 'AUDIO',\n ARCHIVE = 'ARCHIVE',\n OTHER = 'OTHER',\n}\n\n\n","export enum Currency {\n ARS = 'ARS', // Peso argentino\n BRL = 'BRL', // Real brasileño\n CLP = 'CLP', // Peso chileno\n COP = 'COP', // Peso colombiano\n EUR = 'EUR', // Euro\n MXN = 'MXN', // Peso mexicano\n PEN = 'PEN', // Sol peruano\n PYG = 'PYG', // Guaraní paraguayo\n USD = 'USD', // Dólar estadounidense\n UYU = 'UYU', // Peso uruguayo\n}\n\n\n\nexport function getCurrencySymbol(currencyCode: Currency): string {\n const currencySymbols: { [key: string]: string } = {\n [Currency.USD]: 'U$S',\n [Currency.EUR]: '€',\n [Currency.UYU]: '$',\n [Currency.ARS]: '$',\n [Currency.BRL]: 'R$',\n };\n \n return currencySymbols[currencyCode] || currencyCode.toString();\n} \n\n\n","// shared-types/src/account/types.ts - Account entity types\n\nexport interface Account {\n id: string;\n name: string;\n slug: string;\n address?: string;\n logoId?: string;\n currency: string;\n instagram?: string;\n facebook?: string;\n whatsapp?: string;\n phone?: string;\n email: string;\n timezone: string;\n hasDelivery: boolean;\n status: AccountStatus;\n themeConfig?: ThemeConfig;\n privateKey?: string;\n demo: boolean;\n createdAt: Date;\n updatedAt: Date;\n deletedAt?: Date;\n}\n\nexport enum AccountStatus {\n ACTIVE = 'ACTIVE',\n INACTIVE = 'INACTIVE',\n PENDING = 'PENDING',\n SUSPENDED = 'SUSPENDED',\n}\n\nexport interface ThemeConfig {\n backgroundColor: string;\n textColor: string;\n primaryColor: string;\n secondaryColor: string;\n}\n ","import { AccountDeliveryOption } from \"../accountDeliveryOption/types\";\nimport { Address, MapPosition, Phone } from \"../common\";\n\n/**\n * Entidad AccountBranch\n * Representa una sucursal de una cuenta.\n */\n\nexport interface AccountBranch {\n id: string;\n accountId: string;\n name: string;\n address?: Address; \n addressInstructions?: string;\n addressCoordinates?: MapPosition | null;\n phone?: Phone | null;\n email?: string | null;\n demo:boolean;\n status: AccountBranchStatus; \n createdAt: Date;\n updatedAt: Date;\n deletedAt?: Date | null;\n\n schedule: AccountBranchSchedule[];\n deliveryOptions: AccountDeliveryOption[];\n}\n\nexport enum AccountBranchStatus {\n ACTIVE = \"ACTIVE\",\n INACTIVE = \"INACTIVE\"\n}\n\n \nexport interface AccountBranchSchedule {\n id: string;\n accountBranchId: string;\n day: AccountBranchScheduleDay;\n start: number;\n end: number;\n status: AccountBranchScheduleStatus;\n demo:boolean;\n createdAt: Date;\n updatedAt: Date;\n deletedAt?: Date | null;\n}\n\nexport enum AccountBranchScheduleStatus {\n ACTIVE = \"ACTIVE\",\n INACTIVE = \"INACTIVE\"\n}\n\nexport enum AccountBranchScheduleDay {\n MONDAY = \"MONDAY\",\n TUESDAY = \"TUESDAY\",\n WEDNESDAY = \"WEDNESDAY\",\n THURSDAY = \"THURSDAY\",\n FRIDAY = \"FRIDAY\",\n SATURDAY = \"SATURDAY\",\n SUNDAY = \"SUNDAY\"\n}","import { Address, MapPosition } from \"../common\";\nimport { AccountIntegration } from \"../accountIntegration/types\";\nimport { AccountBranch } from \"../accountBranch/types\";\n\n/**\n * Entidad AccountDeliveryOption\n * Representa una opción de envío de una cuenta.\n */\n\nexport interface AccountDeliveryOption {\n\tid: string;\n\taccountId: string;\n\taccountBranchId: string;\n\tname: string;\n\tintegrationId?: string;\n\tisScheduled: boolean;\n\tpriceLogic: AccountDeliveryOptionPriceLogic;\n\tstatus: AccountDeliveryOptionStatus;\n\tdemo:boolean;\n\tcreatedAt: Date;\n\tupdatedAt: Date;\n\tdeletedAt?: Date | null;\n\n\tzones: AccountDeliveryOptionZone[];\n\tintegration?: AccountIntegration | null;\n\tcalculatedCost?: AccountDeliveryOptionCalculatedCost | null;\n\taccountBranch?: AccountBranch | null;\n}\n\nexport enum AccountDeliveryOptionPriceLogic {\n\tFIXED = \"FIXED\",\n\tPER_KM = \"PER_KM\",\n}\n\nexport enum AccountDeliveryOptionStatus {\n\tACTIVE = \"ACTIVE\",\n\tINACTIVE = \"INACTIVE\",\n}\n\nexport interface AccountDeliveryOptionCalculatedCost {\n\tbasePrice: number;\n\tdistanceKm: number;\n\tfinalPrice: number;\n\tpriceLogic: AccountDeliveryOptionPriceLogic;\n\tcurrency: string;\n}\n\n\nexport interface AccountDeliveryOptionZone {\n\tid: string;\n\taccountId: string;\n\taccountDeliveryOptionId: string;\n\tname: string;\n\tprice: number;\n\tpriceMin: number;\n\tarea: string;\n\tstatus: AccountDeliveryOptionZoneStatus;\n\tdemo:boolean;\n\tcreatedAt: Date;\n\tupdatedAt: Date;\n\tdeletedAt?: Date | null;\n}\n\nexport enum AccountDeliveryOptionZoneStatus {\n\tACTIVE = \"ACTIVE\",\n\tINACTIVE = \"INACTIVE\",\n}","/**\n * Entidad AccountDomain\n * Representa un dominio personalizado asociado a una cuenta.\n * Permite dominios completos y subdominios, con control de estado y verificación.\n */\n\nexport interface AccountDomain {\n id: string;\n accountId: string;\n domain: string; /** Dominio completo (ej: example.com) */\n subdomain?: string;/** Subdominio opcional (ej: shop, blog) */\n isPrimary: boolean; /** Indica si este es el dominio principal de la cuenta */\n status: AccountDomainStatus; /** Estado del dominio: PENDING, ACTIVE, INACTIVE */\n verifiedAt?: Date; /** Fecha de verificación del dominio */\n \n createdAt: Date;\n updatedAt: Date;\n deletedAt?: Date | null;\n}\n\nexport enum AccountDomainStatus {\n PENDING = \"PENDING\",\n ACTIVE = \"ACTIVE\",\n INACTIVE = \"INACTIVE\"\n}\n\n ","import { Integration } from \"../integration\";\n/**\n * Entidad AccountIntegration\n * Contiene información de la integración y sus credenciales.\n */\n\nexport enum AccountIntegrationStatus {\n\tACTIVE = 'ACTIVE',\n\tINACTIVE = 'INACTIVE',\n\tBETA = 'BETA',\n\tDEPRECATED = 'DEPRECATED',\n}\nexport enum AccountIntegrationConnectionStatus {\n\tCONNECTED = 'CONNECTED',\n\tDISCONNECTED = 'DISCONNECTED',\n\tERROR = 'ERROR',\n\tWARNING = 'WARNING',\n}\n\nexport enum AccountIntegrationEnvironment {\n\tPRODUCTION = 'PRODUCTION',\n\tDEVELOPMENT = 'DEVELOPMENT',\n}\n\nexport interface AccountIntegration {\n\tid: string;\n\taccountId: string;\n\tintegrationId: string;\n\tsettingsProduction: Object | null;\n\tsettingsDevelopment: Object | null;\n\tenvironment: AccountIntegrationEnvironment;\n\tproductionStatus: AccountIntegrationConnectionStatus;\n\tdevelopmentStatus: AccountIntegrationConnectionStatus;\n\tstatus: AccountIntegrationStatus;\n\tdemo: boolean;\n\tcreatedAt: Date;\n\tupdatedAt: Date;\n\tdeletedAt?: Date | null;\n\n\tintegration: Integration;\n\n\tsettings: Record<string, any>; // settings for requested environment\n}","// shared-types/src/accountPaymentMethod/types.ts\n\nimport { Account } from \"../account\";\nimport { AccountIntegration } from \"../accountIntegration\";\nimport { StatusInfo } from \"../common/Status\";\n\nexport enum AccountPaymentMethodStatus {\n ACTIVE = 'ACTIVE', // Active\n INACTIVE = 'INACTIVE', // Disabled\n}\n\nexport interface AccountPaymentMethod {\n id: string;\n accountId: string;\n accountIntegrationId?: string;\n name: string;\n description?: string;\n customerInstructions?: string;\n order: number;\n availableForWeb?: boolean;\n \n status: AccountPaymentMethodStatus;\n demo: boolean;\n createdAt: Date;\n updatedAt: Date;\n deletedAt?: Date;\n\n accountIntegration?: AccountIntegration;\n account?: Account;\n statusInfo?: StatusInfo;\n typeName?: string;\n}","import { StatusInfo } from \"../common/Status\";\nimport { AccountPaymentMethodStatus } from \"./types\";\n\nexport function getAccountPaymentMethodStatusInfo(status: AccountPaymentMethodStatus): StatusInfo {\n\tconst map: Record<AccountPaymentMethodStatus, StatusInfo> = {\n\t\tACTIVE: { text: 'Activo', class: 'success', actionText: '' },\n\t\tINACTIVE: { text: 'Inactivo', class: 'danger', actionText: '' },\n\t};\n\n\treturn map[status] ?? { text: String(status), class: 'secondary' };\n}","import { CartItemValidation } from \"./dto\";\nimport { Customer } from \"../customer\";\nimport { AccountDomain } from \"../accountDomain\";\nimport { AccountPaymentMethod } from \"../accountPaymentMethod\";\n\n/**\n * Entidad Cart\n * Define el carrito de compras de un cliente en el sitio web.\n */\n\nexport interface Cart {\n id: string;\n code: string;\n customerId?: string;\n sessionId?: string;\n items: CartItem[];\n currency: string;\n subtotal: number;\n total: number;\n accountPaymentMethodId?: string;\n deliveryType: CartDeliveryType;\n deliveryFirstName?: string;\n deliveryLastName?: string;\n deliveryAddress?: string;\n deliveryPhone?: string;\n deliveryOptionId?: string;\n pickupBranchId?: string;\n itemCount: number;\n createdAt: Date;\n updatedAt: Date;\n status: CartStatus;\n source: CartSource;\n sourceAccountDomainId?: string;\n recoveryToken?: string;\n customerNote?: string;\n hasIssues: boolean; // Indica si el carrito tiene problemas que resolver\n issuesCount: number; // Número de items con problemas\n // Nuevos campos de precios\n subtotalPrice?: number;\n totalDiscounts?: number;\n totalShippingPrice?: number;\n totalTax?: number;\n totalPrice?: number;\n taxDetails?: any;\n\n customer?: Partial<Customer> | null;\n accountDomain?: Partial<AccountDomain> | null;\n accountPaymentMethod?: Partial<AccountPaymentMethod> | null;\n}\n\nexport interface CartItem {\n id: string;\n productId: string;\n productVariantId: string;\n name: string;\n unitPrice: number; // Precio cuando se agregó al carrito\n quantity: number;\n image?: string;\n thumbnailUrl?: string; // URL del thumbnail de la variante\n sku?: string;\n attributeDetails: CartItemAttributeDetail[]; // Detalles legibles de atributos\n \n validation?: CartItemValidation; // Información de validación del item en dto\n}\n\n\nexport interface CartItemAttributeDetail {\n name: string; // Nombre del atributo (ej: \"Talle\", \"Color\")\n alias: string; // Alias del atributo (ej: \"size\", \"color\")\n value: string; // Valor del atributo (ej: \"M\", \"Rojo\")\n type?: string; // Tipo del atributo (opcional)\n}\n\nexport enum CartStatus {\n ACTIVE = 'ACTIVE',\n LOCKED = 'LOCKED',\n EXPIRED = 'EXPIRED',\n CONVERTED = 'CONVERTED',\n ABANDONED = 'ABANDONED',\n MERGED = 'MERGED'\n}\n\nexport enum CartSource {\n WEB = 'WEB',\n POS = 'POS',\n API = 'API'\n}\n\nexport enum CartDeliveryType {\n SHIPPING = 'SHIPPING',\n PICKUP = 'PICKUP'\n}\n\n\n\n\n","import { OrderSource } from \"../order\";\n\n/**\n * Add an item to the cart\n*/\nexport interface CartItemAddDto {\n cartId: string;\n productId: string;\n variantId?: string;\n quantity: number;\n attributes?: { [key: string]: string | number; };\n userEmail?: string;\n userId?: string;\n}\n\n/**\n * Update an item in the cart\n */\nexport interface CartItemUpdateDto {\n cartId: string;\n itemId: string;\n quantity: number;\n}\n\n/**\n * Remove an item from the cart\n */\nexport interface CartItemRemoveDto {\n cartId: string;\n itemId: string;\n}\n\nexport interface CartUpdateDto {\n cartId: string;\n source: OrderSource;\n accountDomainId?: string;\n customer: {\n email: string;\n };\n delivery: {\n type: 'SHIPPING' | 'PICKUP';\n deliveryOptionId?: string;\n pickupBranchId?: string;\n firstname: string;\n lastname: string;\n phone: {\n countryCode: string;\n national: string;\n international: string;\n type: string;\n validated: boolean;\n };\n address: {\n country: string;\n department: string;\n locality: string;\n street: string;\n complement?: string;\n notes?: string;\n postalCode: string;\n mapPosition: {\n lat: number;\n lng: number;\n };\n };\n };\n billing: {\n name: string;\n address: string;\n city: string;\n department: string;\n };\n}\n\n/**\n * Confirm a cart\n */\nexport interface CartConfirmDto {\n cartId: string;\n}\n\n/**\n * Validation information for a cart item\n */\nexport interface CartItemValidation {\n hasIssues: boolean; // Indica si hay problemas con este item\n issues: string[]; // Lista de problemas encontrados (mensajes legibles)\n errorCode?: CartItemErrorCode; // Código específico del error principal\n currentPrice?: number; // Precio actual del producto (si cambió)\n availableStock?: number; // Stock disponible actual\n isProductActive?: boolean; // Si el producto está activo\n}\n\n/**\n * Error codes for cart items\n */\nexport enum CartItemErrorCode {\n PRICE_INCREASED = 'PRICE_INCREASED', // Precio aumentó\n PRICE_DECREASED = 'PRICE_DECREASED', // Precio disminuyó \n PRODUCT_INACTIVE = 'PRODUCT_INACTIVE', // Producto ya no está disponible\n STOCK_INSUFFICIENT = 'STOCK_INSUFFICIENT', // Stock insuficiente (hay algo disponible)\n STOCK_UNAVAILABLE = 'STOCK_UNAVAILABLE', // Sin stock (0 disponible)\n VALIDATION_ERROR = 'VALIDATION_ERROR' // Error general de validación\n}\n","/**\n * Entidad Customer\n * Cliente de la tienda\n*/\nimport { Phone } from \"../common/Phone\";\n\nexport interface Customer {\n id: string;\n accountId: string;\n firstName?: string;\n lastName?: string;\n email: string;\n phone?: Phone;\n status: CustomerStatus;\n createdAt: Date;\n updatedAt: Date;\n deletedAt?: Date | null;\n}\n\nexport enum CustomerStatus {\n ACTIVE = 'ACTIVE',\n INACTIVE = 'INACTIVE',\n BLACKLISTED = 'BLACKLISTED', // e.g., for fraudulent activity\n PENDING = 'PENDING', // e.g., email verification needed\n}","import { AccountIntegration } from \"../accountIntegration\";\n/**\n * Entidad Integration\n * Define las integraciones de terceros disponibles en la plataforma (ej. pasarelas de pago, transportistas).\n * Almacena información sobre el proveedor, categoría y esquema de parámetros requeridos.\n */\n\nexport enum IntegrationCategory {\n\tPAYMENT_GATEWAY = 'PAYMENT_GATEWAY',\n\tSHIPPING_CARRIER = 'SHIPPING_CARRIER',\n\tMARKETPLACE = 'MARKETPLACE',\n\tEMAIL_MARKETING = 'EMAIL_MARKETING',\n\tANALYTICS = 'ANALYTICS',\n\tACCOUNTING = 'ACCOUNTING',\n\tSOCIAL_MEDIA = 'SOCIAL_MEDIA',\n\tOTHER = 'OTHER',\n}\n\nexport enum IntegrationStatus {\n\tACTIVE = 'ACTIVE',\n\tINACTIVE = 'INACTIVE',\n\tBETA = 'BETA',\n\tDEPRECATED = 'DEPRECATED',\n}\n\nexport interface Integration {\n\tid: string;\n\tcategory: IntegrationCategory;\n\tproviderKey: string; // Unique identifier key (e.g., 'stripe', 'mercadopago')\n\tname: string; // Human-readable name (e.g., \"Stripe\", \"Mercado Pago\")\n\tslug: string;\n\tdescription?: string;\n\tsetupInstructions?: string; // General instructions or link to docs\n\tlogoUrl?: string; // URL to the integration's logo\n\trequiredParamsSchema?: any; // Define required parameters/credentials structure\n\tsupportedPaymentMethods?: string[]; // List of supported payment methods (e.g., 'visa', 'mastercard', 'american_express', 'bank_transfer', 'cash')\n\tpaymentCanRecapture?: boolean; // Can the payment be recaptured by the provider?\n\tpaymentCanRefund?: boolean; // Can the payment be refunded by the provider?\n\tstatus: IntegrationStatus;\n\tcreatedAt: Date;\n\tupdatedAt: Date;\n\tdeletedAt?: Date | null;\n\torder: number;\n\n\taccountIntegration: AccountIntegration | null;\n}","import { Currency, Media } from \"../common\";\nimport { Customer } from \"../customer\";\nimport { AccountIntegration } from \"../accountIntegration\";\nimport { AccountDomain } from \"../accountDomain\";\nimport { Product } from \"../product\";\nimport { FulfillmentStatus } from \"../fulfillment/types\";\nimport { StatusInfo } from \"../common/Status\";\nimport { PaymentStatus } from \"../payment\";\nimport { AccountPaymentMethod } from \"../accountPaymentMethod\";\n\n/**\n * Entidad Order\n * Define la orden de compra de un cliente en el sitio web.\n */\n\nexport interface Order {\n id: string;\n accountId: string;\n customerId: string;\n cartId?: string;\n code: string;\n deliveryType: OrderDeliveryType;\n deliveryFirstName?: string;\n deliveryLastName?: string;\n deliveryAddress?: any;\n deliveryPhone?: any;\n deliveryOptionId?: string;\n pickupBranchId?: string;\n accountPaymentMethodId?: string;\n paymentMethodIntegrationId?: string;\n billingInformation?: any;\n currency: Currency;\n currencySymbol?: string;\n subtotalPrice: number;\n totalDiscounts: number;\n totalShippingPrice: number;\n totalTax: number;\n taxDetails?: any;\n totalPrice: number;\n totalRefunded: number;\n status: OrderStatus;\n statusInfo?: StatusInfo;\n paymentStatus: OrderPaymentStatus;\n paymentStatusInfo?: StatusInfo;\n fulfillmentStatus: FulfillmentStatus;\n statusHistory?: StatusChangeHistory[];\n customerNote?: string;\n internalNote?: string;\n source: OrderSource;\n sourceAccountDomainId?: string;\n demo: boolean;\n createdAt: Date;\n updatedAt: Date;\n cancelledAt?: Date;\n cancelReason?: string;\n deletedAt?: Date;\n items?: OrderItem[];\n\n customer?: Customer | null;\n paymentMethodIntegration?: AccountIntegration | null;\n accountDomain?: AccountDomain;\n accountPaymentMethod?: Partial<AccountPaymentMethod> | null;\n\n statusFlow?: StatusFlow[];\n // Estados permitidos para cambiar el estado de la orden\n statusChangeAllowed?: OrderStatus[];\n}\n\nexport interface OrderItem {\n id: string;\n accountId: string;\n orderId: string;\n productId: string;\n productVariantId: string;\n sku?: string;\n productName: string;\n variantName?: string;\n currency: Currency;\n currencySymbol?: string;\n unitPrice: number;\n totalDiscount: number;\n totalPrice: number;\n quantity: number;\n quantityFulfilled: number;\n quantityRefunded: number;\n quantityReturned: number;\n totalTax: number;\n taxName?: string;\n createdAt: Date;\n updatedAt: Date;\n\n // Snapshot del producto en el momento de la compra\n productSnapshot?: OrderItemSnapshot;\n\n product?: Product;\n}\n\nexport enum OrderStatus {\n PENDING = 'PENDING', // Order placed, awaiting payment confirmation\n CONFIRMED = 'CONFIRMED', // Payment received, order confirmed\n PROCESSING = 'PROCESSING', // Order being prepared\n PROCESSED = 'PROCESSED', // Order ready to be shipped\n ON_HOLD = 'ON_HOLD', // Order temporarily paused\n COMPLETED = 'COMPLETED', // Order finished (e.g., after return period)\n CANCELLED = 'CANCELLED', // Order cancelled before fulfillment\n FAILED = 'FAILED', // Order failed (e.g., payment failed irrecoverably)\n}\n\nexport enum OrderPaymentStatus {\n PENDING = 'PENDING',\n PARTIAL = 'PARTIAL',\n PAID = 'PAID',\n OVERPAID = 'OVERPAID',\n REFUNDED = 'REFUNDED',\n PARTIALLY_REFUNDED = 'PARTIALLY_REFUNDED'\n}\n\nexport enum OrderSource {\n WEB = 'WEB',\n POS = 'POS',\n API = 'API'\n}\n\nexport enum OrderDeliveryType {\n SHIPPING = 'SHIPPING',\n PICKUP = 'PICKUP',\n}\n\nexport interface StatusChangeHistory {\n type: 'order' | 'fulfillment' | 'payment';\n status: OrderStatus | FulfillmentStatus | PaymentStatus;\n timestamp: Date;\n reason?: string;\n userId?: string;\n metadata?: Record<string, any>;\n}\n\nexport interface OrderItemSnapshot {\n sku?: string;\n productName: string;\n variantName?: string;\n media?: Media[];\n}\n\ntype StatusByType = {\n order: OrderStatus;\n fulfillment: FulfillmentStatus;\n payment: PaymentStatus;\n};\n\nexport type StatusFlow<T extends keyof StatusByType = keyof StatusByType> = {\n type: T;\n status: StatusByType[T];\n text?: string;\n doneAt: Date | null;\n};\n\nexport type NextStatusAction<T extends keyof StatusByType = keyof StatusByType> = {\n type: T;\n status: StatusByType[T];\n text: string;\n};","import { StatusInfo } from \"../common/Status\";\nimport { OrderStatus } from \"./types\";\n\nexport function getOrderStatusInfo(status: OrderStatus): StatusInfo {\n\tconst map: Record<OrderStatus, StatusInfo> = {\n\t\tPENDING: { text: 'Pendiente', class: 'secondary', actionText: '' },\n\t\tCONFIRMED: { text: 'Confirmada', class: 'info', actionText: 'Confirmar orden' },\n\t\tPROCESSING: { text: 'En proceso', class: 'warning', actionText: 'Procesar orden' },\n\t\tPROCESSED: { text: 'Procesada', class: 'primary', actionText: 'Orden procesada' },\n\t\tON_HOLD: { text: 'En espera', class: 'secondary', actionText: 'Orden en espera' },\n\t\tCOMPLETED: { text: 'Completada', class: 'success', actionText: 'Completar orden' }, \n\t\tCANCELLED: { text: 'Cancelada', class: 'danger', actionText: 'Cancelar orden' },\n\t\tFAILED: { text: 'Fallida', class: 'danger', actionText: '' },\n\t};\n\n\treturn map[status] ?? { text: String(status), class: 'secondary' };\n}","// shared-types/src/payment/types.ts\n\nimport { Currency } from \"../common\";\nimport { AccountPaymentMethod } from \"../accountPaymentMethod\";\nimport { Order } from \"../order\";\n\n\nexport enum PaymentStatus {\n PENDING = 'PENDING', // Pendiente\n PREAUTHORIZED = 'PREAUTHORIZED',\n APPROVED = 'APPROVED', // Pago aprobado online\n PAID = 'PAID', // Pago realizado por redes fisicas\n REJECTED = 'REJECTED', // Pago rechazado\n REFUND_IN_PROCESS = 'REFUND_IN_PROCESS', // En proceso de reembolso con la plataforma de pagos\n PARTIAL_REFUND = 'PARTIAL_REFUND', // Pago parcialmente reembolsado\n REFUNDED = 'REFUNDED', // Pago reembolsado\n ERROR = 'ERROR' // Represents an error in porcessing the payment. Ex: a webhook comes without an esternal reference, so we can't match in our system\n}\n\nexport enum PaymentMethodType {\n BANK_TRANSFER = 'BANK_TRANSFER',\n CREDIT_CARD = 'CREDIT_CARD',\n DEBIT_CARD = 'DEBIT_CARD',\n MERCADOPAGO = 'MERCADOPAGO',\n PHYSICAL = 'PHYSICAL',\n INTERNATIONAL = 'INTERNATIONAL',\n PAYPAL = 'PAYPAL',\n CASH = 'CASH',\n OTHER = 'OTHER', // Added for flexibility\n}\nexport interface Payment {\n id: string;\n accountId: string;\n orderId: string;\n invoiceId?: string;\n accountPaymentMethodId?: string;\n accountIntegrationId?: string;\n referenceCode?: string;\n paymentMethodType?: PaymentMethodType;\n currency: Currency;\n amount: number;\n amountReceived: number;\n amountRefunded: number;\n paidAt?: string | Date;\n refundedAt?: string | Date;\n status: PaymentStatus;\n cardBrand?: string;\n cardBrandInfo?: PaymentCardBrand;\n cardLast4?: string;\n data?: Record<string, any>\n metadata?: Record<string, any>;\n internalComment?: string;\n demo: boolean;\n createdAt: string | Date;\n updatedAt: string | Date;\n deletedAt?: string | Date;\n\n accountPaymentMethod?: Partial<AccountPaymentMethod> | null;\n order?: Order;\n}\n\n// Provider-level types (entity-agnostic, reusable across projects)\nexport type PaymentProviderKey = 'MERCADOPAGO' | 'MANUAL';\n\n// TODO: Eventually refactor what is passed to the payment provider constructor, as it most likely just need\nexport interface PaymentProviderContext {\n data: Record<string, unknown>\n}\n\nexport interface PaymentProviderInitInput {\n // Arbitrary provider input. Caller builds this from their domain data\n data: Record<string, any>;\n}\n\nexport interface PaymentProviderInitOutput {\n data: Record<string, any>;\n status: PaymentStatus\n}\n\nexport interface PaymentProviderCaptureInput {\n data: Record<string, any>;\n}\n\nexport interface PaymentProviderCaptureOutput {\n data: Record<string, any>;\n}\n\nexport interface PaymentProviderRefundInput {\n amount: number;\n data: Record<string, any>;\n}\n\nexport interface PaymentProviderRefundOutput {\n data: Record<string, any>;\n}\n\nexport interface PaymentProviderWebhookResult {\n //TODO: Ideally, if later an order can have multiple payments, the way to link thrid party payments with our own payment entity, should be throu something like a \n // payment session in our system, that would be set as the external reference in the third party payment\n order_code: string | null\n status: PaymentStatus\n data: Record<string, unknown>\n // TODO: Ideally i think this should live inside the data field, not have separate columns and just let the consumer know what\n // attributes to query to resolve them\n paymentDetails: {\n method?: string,\n last4?: string\n }\n}\n\nexport interface WebhookPayload {\n // Id of payment provider webhook belongs to, to pass data for processing\n provider: string;\n accountId: string;\n payload: {\n query: Record<string, unknown>\n body: Record<string, unknown>\n headers: Record<string, unknown>\n }\n}\n\nexport enum PaymentCardBrandKey {\n mp_account_money = 'mp_account_money',\n}\n\nexport interface PaymentCardBrand {\n key: string;\n name: string;\n image: string;\n}\n\nexport function getPaymentCardBrand(key: PaymentCardBrandKey): PaymentCardBrand {\n const map: Record<PaymentCardBrandKey, PaymentCardBrand> = {\n mp_account_money: {\n key: PaymentCardBrandKey.mp_account_money,\n name: 'Mercado Pago',\n image: 'https://storage.googleapis.com/retaila-assets/payments/mercadopago.png',\n },\n }\n return map[key] || {\n key,\n name: '',\n image: null,\n }\n}\n\nexport interface PaymentProviderAdapter {\n readonly key: PaymentProviderKey;\n initPayment(input: PaymentProviderInitInput): Promise<PaymentProviderInitOutput>;\n capture(input: PaymentProviderCaptureInput): Promise<PaymentProviderCaptureOutput>\n refund(input: PaymentProviderRefundInput): Promise<PaymentProviderRefundOutput>;\n processWebhook(input: WebhookPayload['payload']): Promise<PaymentProviderWebhookResult>\n}","import { StatusInfo } from \"../common/Status\";\nimport { PaymentStatus } from \"./types\";\n\nexport function getPaymentStatusInfo(status: PaymentStatus): StatusInfo {\n\tconst map: Record<PaymentStatus, StatusInfo> = {\n\t\tPENDING: { text: 'Pago pendiente', class: 'warning', actionText: '' },\n\t\tPREAUTHORIZED: { text: 'Pago preautorizado', class: 'info', actionText: 'Preautorizar pago' },\n\t\tAPPROVED: { text: 'Pago aprobado', class: 'success', actionText: 'Aprobar pago' },\n\t\tPAID: { text: 'Pago realizado', class: 'success', actionText: 'Pago realizado' },\n\t\tREJECTED: { text: 'Pago rechazado', class: 'danger', actionText: 'Rechazar pago' },\n\t\tREFUND_IN_PROCESS: { text: 'Pago en proceso de reembolso', class: 'warning', actionText: 'Reembolsar pago' },\n\t\tPARTIAL_REFUND: { text: 'Pago parcialmente reembolsado', class: 'warning', actionText: 'Reembolsar pago' },\n\t\tREFUNDED: { text: 'Pago reembolsado', class: 'success', actionText: 'Reembolsado' },\n\t\tERROR: { text: 'Error en pago', class: 'danger', actionText: 'Error en pago' },\n\t};\n\n\treturn map[status] ?? { text: String(status), class: 'secondary' };\n}","import { Media } from \"../common\";\nimport { StatusInfo } from \"../common/Status\";\nimport { ProductCategory } from \"../productCategory\";\n\n/**\n * Entidad Product\n * Representa un producto vendible en la tienda. Es la entidad base que puede tener múltiples variantes.\n */\n\nexport interface Product {\n id: string;\n accountId: string;\n code: string;\n brandId?: string | null;\n supplierId?: string | null;\n productType: ProductType;\n sku?: string | null;\n barcode?: string | null;\n name: string; // e.g., \"Zapatos\", \"Pantalones\", \"Camisas\"\n slug: string;\n description?: string | null;\n isFeatured: boolean;\n\n // Inventory & Shipping\n allowBackorder: boolean; // Permite realizar pedidos aunque no haya stock disponible. Se aplica a las variantes si no está definido allí\n weight?: number | null;\n weightUnit?: string | null; // e.g., \"kg\"\n height?: number | null;\n width?: number | null;\n depth?: number | null; \n dimensionUnit?: string | null; // e.g., \"cm\"\n shippingLeadTime?: string | null; // e.g., \"1-3 days\"\n\n status: ProductStatus; // ACTIVE, INACTIVE\n statusInfo?: StatusInfo;\n \n createdAt: Date;\n updatedAt: Date;\n deletedAt?: Date | null;\n\n media?: Media[]\n\n variants?: ProductVariant[];\n categories?: ProductCategory[];\n}\n\nexport enum ProductStatus {\n ACTIVE = 'ACTIVE', // Available for sale\n INACTIVE = 'INACTIVE', // Not visible/purchasable\n ARCHIVED = 'ARCHIVED', // Not visible, kept for records\n DRAFT = 'DRAFT', // Incomplete product setup\n}\n\nexport enum ProductType {\n SIMPLE = 'SIMPLE', // Product without variants (may have a default hidden variant)\n VARIABLE = 'VARIABLE', // Product with distinct variants (color, size, etc.)\n BUNDLE = 'BUNDLE', // A package of other products/variants\n GIFT_CARD = 'GIFT_CARD', // Virtual or physical gift card\n}\n\n\nexport interface ProductVariant {\n id: string;\n accountId: string;\n productId: string;\n\n sku?: string | null;\n barcode?: string | null; // EAN, UPC, etc.\n\n // Pricing\n currency: string; // ISO 4217 currency code\n price: number;\n compareAtPrice?: number;\n allowBackorder?: boolean;\n \n // Inventory & Shipping\n stock: number;\n weight?: number | null;\n weightUnit?: string | null;\n height?: number | null;\n width?: number | null;\n depth?: number | null;\n dimensionUnit?: string | null;\n shippingLeadTime?: string | null; // e.g., \"1-3 days\"\n \n order: number;\n\n createdAt: Date;\n updatedAt: Date;\n deletedAt?: Date;\n\n}","import { StatusInfo } from \"../common/Status\";\nimport { ProductStatus } from \"./types\";\n\nexport function getProductStatusInfo(status: ProductStatus): StatusInfo {\n\tconst map: Record<ProductStatus, StatusInfo> = {\n\t\tACTIVE: { text: 'Activo', class: 'success' },\n\t\tINACTIVE: { text: 'Inactivo', class: 'danger' },\n\t\tARCHIVED: { text: 'Archivado', class: 'secondary' },\n\t\tDRAFT: { text: 'Borrador', class: 'secondary' },\n\t};\n\n\treturn map[status] ?? { text: String(status), class: 'secondary' };\n}","/**\n * Entidad ProductAttribute\n * Define los atributos disponibles que se pueden asignar a las variantes de producto (ej. Color, Talla).\n * Especifica el nombre y tipo del atributo para ayudar en la representación y filtrado.\n */\n\nimport { ProductCategory } from \"../productCategory/types\";\n\nexport interface ProductAttribute {\n id: string;\n accountId: string;\n name: string; // e.g., \"Color de zapatos\", \"Talle de pantalones\", \"Material\"\n alias: string; // e.g., \"Color\", \"Talla\", \"Material\"\n slug: string;\n type: ProductAttributeType; // Helps frontend render appropriate controls\n isRequired: boolean; // isRequired for product variant\n suffix: string; // suffix for number type\n status: ProductAttributeStatus; // ACTIVE, INACTIVE\n \n createdAt: Date;\n updatedAt: Date;\n deletedAt?: Date | null;\n\n // dejo las categorias planas y los links de la tabla pivot por si necesito acceder a ellas\n productCategories: ProductCategory[]; // conveniente\n productCategoryLinks: Array<{ categoryId: string; isRequired: boolean; displayOrder: number }>;\n\n options: ProductAttributeOption[];\n displayOrder: number; // order to display the attribute in the frontend\n}\n\nexport enum ProductAttributeStatus {\n ACTIVE = 'ACTIVE',\n INACTIVE = 'INACTIVE',\n}\n\n\nexport enum ProductAttributeType {\n TEXT = 'TEXT', // text input\n NUMBER = 'NUMBER', // number input\n COLOR = 'COLOR', // Special type for color swatches\n SELECT = 'SELECT', // Dropdown list\n BOOLEAN = 'BOOLEAN', // checkbox input\n}\n\n/**\n * Una opción específica para un atributo (ej. \"Talle 42\" para el atributo \"Talle\").\n */\nexport interface ProductAttributeOption {\n id: string;\n accountId: string;\n productAttributeId: string;\n value: string;\n imageId?: string | null;\n order: number;\n createdAt: Date;\n updatedAt: Date;\n deletedAt?: Date | null;\n\n count: number; // number of options\n}","import { StandardCategory } from \"../standardCategory\";\n\n/**\n * Entidad ProductCategory\n * Define las categorías de productos.\n * Soporta una estructura jerárquica (categorías y subcategorías) mediante el campo parentId.\n * Cada categoría debe estar asociada a una categoría estándar del sistema.\n */\n\nexport interface ProductCategory {\n id: string;\n accountId: string;\n parentId?: string;\n standardCategoryId: string;\n name: string; // e.g., \"Zapatos\", \"Pantalones\", \"Camisas\"\n slug: string;\n description?: string;\n imageId?: string | null;\n order: number;\n isFeatured: boolean;\n status: ProductCategoryStatus; // ACTIVE, INACTIVE\n createdAt: Date;\n updatedAt: Date;\n deletedAt?: Date | null;\n\n children: ProductCategory[];\n parent: ProductCategory | null;\n standardCategory: StandardCategory;\n}\n\n\nexport enum ProductCategoryStatus {\n ACTIVE = 'ACTIVE',\n INACTIVE = 'INACTIVE',\n}\n\n","/**\n * Entidad StandardCategory\n * Define las categorías estándar de productos.\n * Estas categorías estan pensadas para unificar o agrupar productos de diferentes cuentas.\n */\n\nexport interface StandardCategory {\n id: string;\n parentId?: string;\n name: string; // e.g., \"Zapatos\", \"Pantalones\", \"Camisas\"\n slug: string;\n description?: string;\n imageId?: string | null;\n order: number;\n status: StandardCategoryStatus; // ACTIVE, INACTIVE\n metadata?: {\n icon?: string;\n displayInMenu?: boolean;\n seoTitle?: string;\n seoDescription?: string;\n attributes?: string[];\n };\n createdAt: Date;\n updatedAt: Date;\n deletedAt?: Date | null;\n\n children: StandardCategory[];\n parent: StandardCategory | null;\n}\n\nexport enum StandardCategoryStatus {\n ACTIVE = 'ACTIVE',\n INACTIVE = 'INACTIVE'\n}\n\n","/**\n * Entidad StoreBanner\n * Banners para la portada de la web de la tienda\n */\n\nimport { Media } from \"../common\";\n\nexport interface StoreBanner {\n id: string;\n accountId: string;\n title: string;\n desktopMediaId: string;\n mobileMediaId?: string | null;\n linkUrl?: string | null;\n altText?: string | null;\n displayOrder: number;\n startDate?: Date | null;\n endDate?: Date | null;\n status: StoreBannerStatus;\n createdAt: Date;\n updatedAt: Date;\n deletedAt?: Date | null;\n\n // Relationships\n desktopMedia?: Partial<Media> | null;\n mobileMedia?: Partial<Media> | null;\n}\n\nexport enum StoreBannerStatus {\n ACTIVE = \"ACTIVE\",\n INACTIVE = \"INACTIVE\"\n}\n\n ","/**\n * Entidad StorePage\n * Páginas de la web de la tienda\n */\n\nexport interface StorePage {\n id: string;\n accountId: string;\n type: StorePageType;\n title: string;\n slug: string;\n content?: string | null;\n seoTitle?: string | null;\n seoDescription?: string | null;\n \n status: StorePageStatus;\n canDelete: boolean;\n createdAt: Date;\n updatedAt: Date;\n deletedAt?: Date | null;\n}\n\nexport enum StorePageStatus {\n PUBLISHED = 'PUBLISHED',\n DRAFT = 'DRAFT',\n ARCHIVED = 'ARCHIVED',\n}\n\nexport enum StorePageType {\n ABOUT_US = 'ABOUT_US',\n CONTACT = 'CONTACT',\n FAQ = 'FAQ',\n TERMS_AND_CONDITIONS = 'TERMS_AND_CONDITIONS',\n PRIVACY_POLICY = 'PRIVACY_POLICY',\n RETURN_POLICY = 'RETURN_POLICY',\n SHIPPING_POLICY = 'SHIPPING_POLICY',\n BRANCHES = 'BRANCHES',\n JOBS = 'JOBS',\n OTHER = 'OTHER',\n}\n\n\n ","export enum PubSubTopics {\n ORDER_PLACED = 'order-placed',\n ORDER_CONFIRMED = 'order-confirmed',\n ORDER_PROCESSING = 'order-processing',\n ORDER_PROCESSED = 'order-processed',\n ORDER_COMPLETED = 'order-completed',\n ORDER_CANCELLED = 'order-cancelled',\n PAYMENT_PAID = 'payment-paid',\n NOTIFICATION_CREATED = 'notification-created',\n }","import { Account } from \"../account/types\";\nimport { Customer } from \"../customer/types\";\n\n\n// origen principal del hilo de conversación\nexport enum SupportConversationChannel {\n\tWEB = 'WEB',\n\tEMAIL = 'EMAIL',\n\tWHATSAPP = 'WHATSAPP'\n}\n\n// quién puede ver el hilo en el tenant\nexport enum SupportConversationVisibility {\n\tINTERNAL = 'INTERNAL',\n\tMERCHANT = 'MERCHANT'\n}\n\nexport enum SupportConversationPriority {\n\tLOW = 'LOW',\n\tMEDIUM = 'MEDIUM',\n\tHIGH = 'HIGH',\n\tURGENT = 'URGENT'\n}\n\nexport enum SupportConversationStatus {\n\tOPEN = 'OPEN',\n\tCLOSED = 'CLOSED',\n\tPENDING = 'PENDING'\n}\n\nexport enum SupportConversationMessageDeliveryStatus {\n\tQUEUED = 'QUEUED',\n\tSENT = 'SENT',\n\tDELIVERED = 'DELIVERED',\n\tREAD = 'READ',\n\tFAILED = 'FAILED'\n}\n\nexport enum SupportConversationMessageAiAnalysisStatus {\n\tPENDING = 'PENDING',\n\tPROCESSING = 'PROCESSING',\n\tCOMPLETED = 'COMPLETED',\n\tFAILED = 'FAILED'\n}\n\n// Dirección del mensaje con respecto al sistema: entrante o saliente\nexport enum SupportConversationMessageDirection {\n\tINBOUND = 'INBOUND',\n\tOUTBOUND = 'OUTBOUND'\n }\n \n // Tipo de emisor del mensaje\n export enum SupportConversationMessageSenderType {\n\tCUSTOMER = 'CUSTOMER',\n\tACCOUNT_USER = 'ACCOUNT_USER',\n\tANONYMOUS = 'ANONYMOUS',\n\tSYSTEM = 'SYSTEM',\n\tAI = 'AI'\n }\n\nexport interface SupportConversation {\n\tid: string;\n\taccountId: string;\n\tsubject?: string | null; // Asunto opcional del hilo (para email o contacto web)\n\tchannel: SupportConversationChannel; // Canal principal de la conversación (email/whatsapp/web, etc.)\n\tassigneeId?: string | null; // Asignación interna (agente/usuario de la cuenta que atiende la conversación)\n\tvisibility: SupportConversationVisibility;\n\tpriority: SupportConversationPriority; // Priorización operativa\n\trequiresMerchantAction: boolean; // Indica si el comercio debe responder o tomar acción\n\trequiresInternalAction: boolean; // Indica si el equipo interno debe intervenir (respuesta, etc.)\n\tcustomerId?: string | null; // Identificador del cliente si está registrado en el sistema\n\tcustomerName?: string | null; // Nombre del contacto (snapshot, no necesariamente el del Customer)\n\tcustomerLastname?: string | null; // Apellido del contacto (snapshot)\n\tcustomerEmail?: string | null; // Email del contacto (snapshot)\n\tcustomerPhone?: string | null; // Teléfono del contacto (snapshot)\n\tstatus: SupportConversationStatus; // Estado simple (string para mantenerlo liviano)\n\tlastMessageAt?: Date | null;\n\tunreadForAgent: number; // Mensajes no leídos por el agente interno\n\tunreadForCustomer: number; // Mensajes no leídos por el cliente/comercio\n\tmetadata?: Object | null; // Metadatos flexibles (headers email, ids de chat, etc.)\n\taiSuggestion?: Object | null; // Sugerencias/Resumen asistidos por IA\n\tcreatedAt: Date;\n\tupdatedAt: Date;\n\tdeletedAt?: Date | null;\n\n\taccount: Account;\n\t// assignee: AccountUser | null;\n\tcustomer: Customer | null;\n\tmessages: SupportConversationMessage[];\n}\n\n\nexport interface SupportConversationMessage {\n id: string;\n accountId: string;\n conversationId: string;\n direction: SupportConversationMessageDirection; // Dirección simple (entrante/saliente)\n senderType: SupportConversationMessageSenderType; // Tipo de emisor del mensaje (cliente, usuario interno, anónimo, sistema o IA)\n senderId?: string | null; // Identificador del emisor cuando aplica (Customer o AccountUser). Puede ser null para anónimos, sistema o IA\n body: string;\n isAiGenerated: boolean;\n isSystem: boolean;\n deliveryStatus: SupportConversationMessageDeliveryStatus; // Estado de entrega (para OUTBOUND). Por defecto QUEUED para ser enviado por el canal.\n requiresAiAnalysis: boolean;\n aiAnalysisStatus: SupportConversationMessageAiAnalysisStatus;\n aiAnalyzedAt?: Date | null;\n externalMessageId?: string | null; // Identificadores de proveedor externo (messageId, threadId)\n externalThreadId?: string | null;\n attachments?: Array<{\n url: string;\n type?: string;\n name?: string;\n sizeBytes?: number;\n }>; // Adjuntos simples (urls o descriptores livianos) \n metadata?: Object | null; // Metadatos flexibles (headers, payloads originales, etc.)\n createdAt: Date;\n updatedAt: Date;\n deletedAt?: Date | null;\n}\n","import { FulfillmentItem } from \"../fulfillmentItem\";\n\nexport enum FulfillmentStatus {\n PENDING = 'pending',\n PACKED = 'packed',\n SHIPPED = 'shipped',\n DELIVERED = 'delivered',\n CANCELLED = 'cancelled',\n}\n\nexport type Fulfillment = {\n id: string;\n accountId: string;\n orderId: string;\n accountBranchId: string;\n carrier: string;\n trackingNumber: string | null;\n items: FulfillmentItem[];\n status: FulfillmentStatus;\n data: Record<string, unknown> | null;\n packedAt: Date | null;\n shippedAt: Date | null;\n deliveredAt: Date | null;\n cancelledAt: Date | null;\n createdAt: Date;\n updatedAt: Date;\n deletedAt?: Date;\n}","import { StatusInfo } from \"../common/Status\";\nimport { FulfillmentStatus } from \"./types\";\n\nexport function getFulfillmentStatusInfo(status: FulfillmentStatus): StatusInfo {\n\tconst map: Record<FulfillmentStatus, StatusInfo> = {\n\t\tpending: { text: 'Pendiente', class: 'warning', actionText: '' },\n\t\tpacked: { text: 'Paquete listo', class: 'info', actionText: 'Paquete listo' },\n\t\tshipped: { text: 'Enviado', class: 'warning', actionText: 'Enviado' },\n\t\tdelivered: { text: 'Entregado', class: 'success', actionText: 'Entregado' },\n\t\tcancelled: { text: 'Cancelado', class: 'danger', actionText: 'Cancelado' },\n\t};\n\n\treturn map[status] ?? { text: String(status), class: 'secondary' };\n}"],"mappings":";;;AAqBO,IAAK,YAAL,kBAAKA,eAAL;AACL,EAAAA,WAAA,WAAQ;AACR,EAAAA,WAAA,WAAQ;AACR,EAAAA,WAAA,aAAU;AACV,EAAAA,WAAA,cAAW;AACX,EAAAA,WAAA,WAAQ;AACR,EAAAA,WAAA,aAAU;AACV,EAAAA,WAAA,WAAQ;AAPE,SAAAA;AAAA,GAAA;;;ACrBL,IAAK,WAAL,kBAAKC,cAAL;AACL,EAAAA,UAAA,SAAM;AACN,EAAAA,UAAA,SAAM;AACN,EAAAA,UAAA,SAAM;AACN,EAAAA,UAAA,SAAM;AACN,EAAAA,UAAA,SAAM;AACN,EAAAA,UAAA,SAAM;AACN,EAAAA,UAAA,SAAM;AACN,EAAAA,UAAA,SAAM;AACN,EAAAA,UAAA,SAAM;AACN,EAAAA,UAAA,SAAM;AAVI,SAAAA;AAAA,GAAA;AAeL,SAAS,kBAAkB,cAAgC;AAChE,QAAM,kBAA6C;AAAA,IAC/C,CAAC,eAAY,GAAG;AAAA,IAChB,CAAC,eAAY,GAAG;AAAA,IAChB,CAAC,eAAY,GAAG;AAAA,IAChB,CAAC,eAAY,GAAG;AAAA,IAChB,CAAC,eAAY,GAAG;AAAA,EACpB;AAEA,SAAO,gBAAgB,YAAY,KAAK,aAAa,SAAS;AAChE;;;ACAO,IAAK,gBAAL,kBAAKC,mBAAL;AACL,EAAAA,eAAA,YAAS;AACT,EAAAA,eAAA,cAAW;AACX,EAAAA,eAAA,aAAU;AACV,EAAAA,eAAA,eAAY;AAJF,SAAAA;AAAA,GAAA;;;ACEL,IAAK,sBAAL,kBAAKC,yBAAL;AACL,EAAAA,qBAAA,YAAS;AACT,EAAAA,qBAAA,cAAW;AAFD,SAAAA;AAAA,GAAA;AAmBL,IAAK,8BAAL,kBAAKC,iCAAL;AACL,EAAAA,6BAAA,YAAS;AAC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AA;AAQL,IAAK,6CAAL,kBAAKC,gDAAL;AACN,EAAAA,4CAAA,aAAU;AACV,EAAAA,4CAAA,gBAAa;AACb,EAAAA,4CAAA,eAAY;AACZ,EAAAA,4CAAA,YAAS;AAJE,SAAAA;AAAA,GAAA;AAQL,IAAK,sCAAL,kBAAKC,yCAAL;AACN,EAAAA,qCAAA,aAAU;AACV,EAAAA,qCAAA,cAAW;AAFA,SAAAA;AAAA,GAAA;AAMH,IAAK,uCAAL,kBAAKC,0CAAL;AACR,EAAAA,sCAAA,cAAW;AACX,EAAAA,sCAAA,kBAAe;AACf,EAAAA,sCAAA,eAAY;AACZ,EAAAA,sCAAA,YAAS;AACT,EAAAA,sCAAA,QAAK;AALQ,SAAAA;AAAA,GAAA;;;AClDP,IAAK,oBAAL,kBAAKC,uBAAL;AACH,EAAAA,mBAAA,aAAU;AACV,EAAAA,mBAAA,YAAS;AACT,EAAAA,mBAAA,aAAU;AACV,EAAAA,mBAAA,eAAY;AACZ,EAAAA,mBAAA,eAAY;AALJ,SAAAA;AAAA,GAAA;;;ACCL,SAAS,yBAAyB,QAAuC;AAC/E,QAAM,MAA6C;AAAA,IAClD,SAAS,EAAE,MAAM,aAAa,OAAO,WAAW,YAAY,GAAG;AAAA,IAC/D,QAAQ,EAAE,MAAM,iBAAiB,OAAO,QAAQ,YAAY,gBAAgB;AAAA,IAC5E,SAAS,EAAE,MAAM,WAAW,OAAO,WAAW,YAAY,UAAU;AAAA,IACpE,WAAW,EAAE,MAAM,aAAa,OAAO,WAAW,YAAY,YAAY;AAAA,IAC1E,WAAW,EAAE,MAAM,aAAa,OAAO,UAAU,YAAY,YAAY;AAAA,EAC1E;AAEA,SAAO,IAAI,MAAM,KAAK,EAAE,MAAM,OAAO,MAAM,GAAG,OAAO,YAAY;AAClE;","names":["MediaType","Currency","AccountStatus","AccountBranchStatus","AccountBranchScheduleStatus","AccountBranchScheduleDay","AccountDeliveryOptionPriceLogic","AccountDeliveryOptionStatus","AccountDeliveryOptionZoneStatus","AccountDomainStatus","AccountIntegrationStatus","AccountIntegrationConnectionStatus","AccountIntegrationEnvironment","AccountPaymentMethodStatus","CartStatus","CartSource","CartDeliveryType","CartItemErrorCode","CustomerStatus","IntegrationCategory","IntegrationStatus","OrderStatus","OrderPaymentStatus","OrderSource","OrderDeliveryType","PaymentStatus","PaymentMethodType","PaymentCardBrandKey","ProductStatus","ProductType","ProductAttributeStatus","ProductAttributeType","ProductCategoryStatus","StandardCategoryStatus","StoreBannerStatus","StorePageStatus","StorePageType","PubSubTopics","SupportConversationChannel","SupportConversationVisibility","SupportConversationPriority","SupportConversationStatus","SupportConversationMessageDeliveryStatus","SupportConversationMessageAiAnalysisStatus","SupportConversationMessageDirection","SupportConversationMessageSenderType","FulfillmentStatus"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@retaila/shared-types",
3
- "version": "1.1.51",
3
+ "version": "1.1.53",
4
4
  "description": "Tipos compartidos para el proyecto Retail",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",