@retaila/shared-types 1.1.1 → 1.1.2

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.
Files changed (152) hide show
  1. package/dist/index.d.mts +883 -0
  2. package/dist/index.d.ts +883 -16
  3. package/dist/index.js +389 -32
  4. package/dist/index.js.map +1 -1
  5. package/dist/index.mjs +332 -0
  6. package/dist/index.mjs.map +1 -0
  7. package/package.json +23 -3
  8. package/dist/account/index.d.ts +0 -2
  9. package/dist/account/index.d.ts.map +0 -1
  10. package/dist/account/index.js +0 -20
  11. package/dist/account/index.js.map +0 -1
  12. package/dist/account/types.d.ts +0 -34
  13. package/dist/account/types.d.ts.map +0 -1
  14. package/dist/account/types.js +0 -12
  15. package/dist/account/types.js.map +0 -1
  16. package/dist/accountBranch/index.d.ts +0 -2
  17. package/dist/accountBranch/index.d.ts.map +0 -1
  18. package/dist/accountBranch/index.js +0 -20
  19. package/dist/accountBranch/index.js.map +0 -1
  20. package/dist/accountBranch/types.d.ts +0 -53
  21. package/dist/accountBranch/types.d.ts.map +0 -1
  22. package/dist/accountBranch/types.js +0 -24
  23. package/dist/accountBranch/types.js.map +0 -1
  24. package/dist/accountDeliveryOption/index.d.ts +0 -2
  25. package/dist/accountDeliveryOption/index.d.ts.map +0 -1
  26. package/dist/accountDeliveryOption/index.js +0 -20
  27. package/dist/accountDeliveryOption/index.js.map +0 -1
  28. package/dist/accountDeliveryOption/types.d.ts +0 -58
  29. package/dist/accountDeliveryOption/types.d.ts.map +0 -1
  30. package/dist/accountDeliveryOption/types.js +0 -19
  31. package/dist/accountDeliveryOption/types.js.map +0 -1
  32. package/dist/accountDomain/index.d.ts +0 -2
  33. package/dist/accountDomain/index.d.ts.map +0 -1
  34. package/dist/accountDomain/index.js +0 -20
  35. package/dist/accountDomain/index.js.map +0 -1
  36. package/dist/accountDomain/types.d.ts +0 -23
  37. package/dist/accountDomain/types.d.ts.map +0 -1
  38. package/dist/accountDomain/types.js +0 -15
  39. package/dist/accountDomain/types.js.map +0 -1
  40. package/dist/accountIntegration/index.d.ts +0 -2
  41. package/dist/accountIntegration/index.d.ts.map +0 -1
  42. package/dist/accountIntegration/index.js +0 -20
  43. package/dist/accountIntegration/index.js.map +0 -1
  44. package/dist/accountIntegration/types.d.ts +0 -28
  45. package/dist/accountIntegration/types.d.ts.map +0 -1
  46. package/dist/accountIntegration/types.js +0 -21
  47. package/dist/accountIntegration/types.js.map +0 -1
  48. package/dist/cart/dto.d.ts +0 -97
  49. package/dist/cart/dto.d.ts.map +0 -1
  50. package/dist/cart/dto.js +0 -16
  51. package/dist/cart/dto.js.map +0 -1
  52. package/dist/cart/index.d.ts +0 -3
  53. package/dist/cart/index.d.ts.map +0 -1
  54. package/dist/cart/index.js +0 -21
  55. package/dist/cart/index.js.map +0 -1
  56. package/dist/cart/types.d.ts +0 -64
  57. package/dist/cart/types.d.ts.map +0 -1
  58. package/dist/cart/types.js +0 -19
  59. package/dist/cart/types.js.map +0 -1
  60. package/dist/common/Address.d.ts +0 -13
  61. package/dist/common/Address.d.ts.map +0 -1
  62. package/dist/common/Address.js +0 -3
  63. package/dist/common/Address.js.map +0 -1
  64. package/dist/common/BaseEntity.d.ts +0 -16
  65. package/dist/common/BaseEntity.d.ts.map +0 -1
  66. package/dist/common/BaseEntity.js +0 -4
  67. package/dist/common/BaseEntity.js.map +0 -1
  68. package/dist/common/Currency.d.ts +0 -9
  69. package/dist/common/Currency.d.ts.map +0 -1
  70. package/dist/common/Currency.js +0 -23
  71. package/dist/common/Currency.js.map +0 -1
  72. package/dist/common/Media.d.ts +0 -28
  73. package/dist/common/Media.d.ts.map +0 -1
  74. package/dist/common/Media.js +0 -17
  75. package/dist/common/Media.js.map +0 -1
  76. package/dist/common/Phone.d.ts +0 -8
  77. package/dist/common/Phone.d.ts.map +0 -1
  78. package/dist/common/Phone.js +0 -3
  79. package/dist/common/Phone.js.map +0 -1
  80. package/dist/common/index.d.ts +0 -6
  81. package/dist/common/index.d.ts.map +0 -1
  82. package/dist/common/index.js +0 -23
  83. package/dist/common/index.js.map +0 -1
  84. package/dist/index.d.ts.map +0 -1
  85. package/dist/integration/index.d.ts +0 -2
  86. package/dist/integration/index.d.ts.map +0 -1
  87. package/dist/integration/index.js +0 -20
  88. package/dist/integration/index.js.map +0 -1
  89. package/dist/integration/types.d.ts +0 -36
  90. package/dist/integration/types.d.ts.map +0 -1
  91. package/dist/integration/types.js +0 -27
  92. package/dist/integration/types.js.map +0 -1
  93. package/dist/order/dto.d.ts +0 -9
  94. package/dist/order/dto.d.ts.map +0 -1
  95. package/dist/order/dto.js +0 -3
  96. package/dist/order/dto.js.map +0 -1
  97. package/dist/order/index.d.ts +0 -3
  98. package/dist/order/index.d.ts.map +0 -1
  99. package/dist/order/index.js +0 -21
  100. package/dist/order/index.js.map +0 -1
  101. package/dist/order/types.d.ts +0 -105
  102. package/dist/order/types.d.ts.map +0 -1
  103. package/dist/order/types.js +0 -40
  104. package/dist/order/types.js.map +0 -1
  105. package/dist/product/index.d.ts +0 -2
  106. package/dist/product/index.d.ts.map +0 -1
  107. package/dist/product/index.js +0 -20
  108. package/dist/product/index.js.map +0 -1
  109. package/dist/product/types.d.ts +0 -66
  110. package/dist/product/types.d.ts.map +0 -1
  111. package/dist/product/types.js +0 -18
  112. package/dist/product/types.js.map +0 -1
  113. package/dist/productAttribute/index.d.ts +0 -2
  114. package/dist/productAttribute/index.d.ts.map +0 -1
  115. package/dist/productAttribute/index.js +0 -20
  116. package/dist/productAttribute/index.js.map +0 -1
  117. package/dist/productAttribute/types.d.ts +0 -48
  118. package/dist/productAttribute/types.d.ts.map +0 -1
  119. package/dist/productAttribute/types.js +0 -22
  120. package/dist/productAttribute/types.js.map +0 -1
  121. package/dist/productCategory/index.d.ts +0 -2
  122. package/dist/productCategory/index.d.ts.map +0 -1
  123. package/dist/productCategory/index.js +0 -20
  124. package/dist/productCategory/index.js.map +0 -1
  125. package/dist/productCategory/types.d.ts +0 -31
  126. package/dist/productCategory/types.d.ts.map +0 -1
  127. package/dist/productCategory/types.js +0 -9
  128. package/dist/productCategory/types.js.map +0 -1
  129. package/dist/standardCategory/index.d.ts +0 -2
  130. package/dist/standardCategory/index.d.ts.map +0 -1
  131. package/dist/standardCategory/index.js +0 -20
  132. package/dist/standardCategory/index.js.map +0 -1
  133. package/dist/standardCategory/types.d.ts +0 -32
  134. package/dist/standardCategory/types.d.ts.map +0 -1
  135. package/dist/standardCategory/types.js +0 -14
  136. package/dist/standardCategory/types.js.map +0 -1
  137. package/dist/storeBanner/index.d.ts +0 -2
  138. package/dist/storeBanner/index.d.ts.map +0 -1
  139. package/dist/storeBanner/index.js +0 -20
  140. package/dist/storeBanner/index.js.map +0 -1
  141. package/dist/storeBanner/types.d.ts +0 -28
  142. package/dist/storeBanner/types.d.ts.map +0 -1
  143. package/dist/storeBanner/types.js +0 -13
  144. package/dist/storeBanner/types.js.map +0 -1
  145. package/dist/storePage/index.d.ts +0 -2
  146. package/dist/storePage/index.d.ts.map +0 -1
  147. package/dist/storePage/index.js +0 -20
  148. package/dist/storePage/index.js.map +0 -1
  149. package/dist/storePage/types.d.ts +0 -37
  150. package/dist/storePage/types.d.ts.map +0 -1
  151. package/dist/storePage/types.js +0 -27
  152. package/dist/storePage/types.js.map +0 -1
@@ -0,0 +1,883 @@
1
+ interface BaseEntity {
2
+ id: string;
3
+ createdAt: Date;
4
+ updatedAt: Date;
5
+ deletedAt?: Date;
6
+ }
7
+ interface BaseEntityWithAccount extends BaseEntity {
8
+ accountId: string;
9
+ }
10
+ interface BaseEntityWithUser extends BaseEntity {
11
+ userId: string;
12
+ }
13
+ interface BaseEntityWithAccountAndUser extends BaseEntityWithAccount {
14
+ userId: string;
15
+ }
16
+
17
+ interface Address {
18
+ country: string;
19
+ department: string;
20
+ locality: string;
21
+ street: string;
22
+ number: string;
23
+ mapPosition?: MapPosition;
24
+ }
25
+ interface MapPosition {
26
+ lat: number;
27
+ lng: number;
28
+ }
29
+
30
+ /**
31
+ * Entidad Media
32
+ * Se utiliza para almacenar y gestionar archivos y recursos multimedia.
33
+ */
34
+ interface Media {
35
+ id: string;
36
+ accountId: string;
37
+ filename: string;
38
+ url: string;
39
+ thumbnailUrl: string;
40
+ mimeType: string;
41
+ extension: string;
42
+ size: number;
43
+ type: MediaType;
44
+ altText: string;
45
+ createdAt: Date;
46
+ updatedAt: Date;
47
+ deletedAt?: Date | null;
48
+ }
49
+ declare enum MediaType {
50
+ IMAGE = "IMAGE",
51
+ VIDEO = "VIDEO",
52
+ DOCUMENT = "DOCUMENT",
53
+ AUDIO = "AUDIO",
54
+ ARCHIVE = "ARCHIVE",
55
+ OTHER = "OTHER"
56
+ }
57
+
58
+ interface Phone {
59
+ countryCode: string;
60
+ national: string;
61
+ international: string;
62
+ type: 'mobile' | 'landline';
63
+ validated: boolean;
64
+ }
65
+
66
+ declare enum Currency {
67
+ USD = "USD",
68
+ EUR = "EUR",
69
+ UYU = "UYU",
70
+ ARS = "ARS",
71
+ BRL = "BRL"
72
+ }
73
+ declare function getCurrencySymbol(currencyCode: Currency): string;
74
+
75
+ interface Account {
76
+ id: string;
77
+ name: string;
78
+ address?: string;
79
+ logoId?: string;
80
+ currency: string;
81
+ instagram?: string;
82
+ facebook?: string;
83
+ whatsapp?: string;
84
+ phone?: string;
85
+ email: string;
86
+ timezone: string;
87
+ hasDelivery: boolean;
88
+ status: AccountStatus;
89
+ themeConfig?: ThemeConfig;
90
+ privateKey?: string;
91
+ demo: boolean;
92
+ createdAt: Date;
93
+ updatedAt: Date;
94
+ deletedAt?: Date;
95
+ }
96
+ declare enum AccountStatus {
97
+ ACTIVE = "ACTIVE",
98
+ INACTIVE = "INACTIVE",
99
+ PENDING = "PENDING",
100
+ SUSPENDED = "SUSPENDED"
101
+ }
102
+ interface ThemeConfig {
103
+ backgroundColor: string;
104
+ textColor: string;
105
+ primaryColor: string;
106
+ secondaryColor: string;
107
+ }
108
+
109
+ interface AccountIntegrationConfigDTO {
110
+ accountId: string;
111
+ integrationId: string;
112
+ settingsProduction?: Record<string, any>;
113
+ settingsDevelopment?: Record<string, any>;
114
+ environment: AccountIntegrationEnvironment;
115
+ status?: AccountIntegrationStatus;
116
+ }
117
+
118
+ /**
119
+ * Entidad Integration
120
+ * Define las integraciones de terceros disponibles en la plataforma (ej. pasarelas de pago, transportistas).
121
+ * Almacena información sobre el proveedor, categoría y esquema de parámetros requeridos.
122
+ */
123
+ declare enum IntegrationCategory {
124
+ PAYMENT_GATEWAY = "PAYMENT_GATEWAY",
125
+ SHIPPING_CARRIER = "SHIPPING_CARRIER",
126
+ MARKETPLACE = "MARKETPLACE",
127
+ EMAIL_MARKETING = "EMAIL_MARKETING",
128
+ ANALYTICS = "ANALYTICS",
129
+ ACCOUNTING = "ACCOUNTING",
130
+ SOCIAL_MEDIA = "SOCIAL_MEDIA",
131
+ OTHER = "OTHER"
132
+ }
133
+ declare enum IntegrationStatus {
134
+ ACTIVE = "ACTIVE",
135
+ INACTIVE = "INACTIVE",
136
+ BETA = "BETA",
137
+ DEPRECATED = "DEPRECATED"
138
+ }
139
+ interface Integration {
140
+ id: string;
141
+ category: IntegrationCategory;
142
+ providerKey: string;
143
+ name: string;
144
+ description?: string;
145
+ setupInstructions?: string;
146
+ logoUrl?: string;
147
+ requiredParamsSchema?: any;
148
+ status: IntegrationStatus;
149
+ createdAt: Date;
150
+ updatedAt: Date;
151
+ deletedAt?: Date | null;
152
+ accountIntegration: AccountIntegration | null;
153
+ }
154
+
155
+ /**
156
+ * Entidad AccountIntegration
157
+ * Contiene información de la integración y sus credenciales.
158
+ */
159
+ declare enum AccountIntegrationStatus {
160
+ ACTIVE = "ACTIVE",
161
+ INACTIVE = "INACTIVE",
162
+ BETA = "BETA",
163
+ DEPRECATED = "DEPRECATED"
164
+ }
165
+ declare enum AccountIntegrationConnectionStatus {
166
+ CONNECTED = "CONNECTED",
167
+ DISCONNECTED = "DISCONNECTED",
168
+ ERROR = "ERROR",
169
+ WARNING = "WARNING"
170
+ }
171
+ declare enum AccountIntegrationEnvironment {
172
+ PRODUCTION = "PRODUCTION",
173
+ DEVELOPMENT = "DEVELOPMENT"
174
+ }
175
+ interface AccountIntegration {
176
+ id: string;
177
+ accountId: string;
178
+ integrationId: string;
179
+ settingsProduction: Object | null;
180
+ settingsDevelopment: Object | null;
181
+ environment: AccountIntegrationEnvironment;
182
+ productionStatus: AccountIntegrationConnectionStatus;
183
+ developmentStatus: AccountIntegrationConnectionStatus;
184
+ status: AccountIntegrationStatus;
185
+ demo: boolean;
186
+ createdAt: Date;
187
+ updatedAt: Date;
188
+ deletedAt?: Date | null;
189
+ integration: Integration;
190
+ }
191
+
192
+ /**
193
+ * Entidad AccountDeliveryOption
194
+ * Representa una opción de envío de una cuenta.
195
+ */
196
+ interface AccountDeliveryOption {
197
+ id: string;
198
+ accountId: string;
199
+ accountBranchId: string;
200
+ name: string;
201
+ integrationId?: string;
202
+ isScheduled: boolean;
203
+ priceLogic: AccountDeliveryOptionPriceLogic;
204
+ status: AccountDeliveryOptionStatus;
205
+ demo: boolean;
206
+ createdAt: Date;
207
+ updatedAt: Date;
208
+ deletedAt?: Date | null;
209
+ zones: AccountDeliveryOptionZone[];
210
+ integration?: AccountIntegration | null;
211
+ calculatedCost?: AccountDeliveryOptionCalculatedCost | null;
212
+ accountBranch?: AccountBranch | null;
213
+ }
214
+ declare enum AccountDeliveryOptionPriceLogic {
215
+ FIXED = "FIXED",
216
+ PER_KM = "PER_KM"
217
+ }
218
+ declare enum AccountDeliveryOptionStatus {
219
+ ACTIVE = "ACTIVE",
220
+ INACTIVE = "INACTIVE"
221
+ }
222
+ interface AccountDeliveryOptionCalculatedCost {
223
+ basePrice: number;
224
+ distanceKm: number;
225
+ finalPrice: number;
226
+ priceLogic: AccountDeliveryOptionPriceLogic;
227
+ currency: string;
228
+ }
229
+ interface AccountDeliveryOptionZone {
230
+ id: string;
231
+ accountId: string;
232
+ accountDeliveryOptionId: string;
233
+ name: string;
234
+ price: number;
235
+ priceMin: number;
236
+ area: string;
237
+ status: AccountDeliveryOptionZoneStatus;
238
+ demo: boolean;
239
+ createdAt: Date;
240
+ updatedAt: Date;
241
+ deletedAt?: Date | null;
242
+ }
243
+ declare enum AccountDeliveryOptionZoneStatus {
244
+ ACTIVE = "ACTIVE",
245
+ INACTIVE = "INACTIVE"
246
+ }
247
+
248
+ /**
249
+ * Entidad AccountBranch
250
+ * Representa una sucursal de una cuenta.
251
+ */
252
+ interface AccountBranch {
253
+ id: string;
254
+ accountId: string;
255
+ name: string;
256
+ address?: Address;
257
+ addressInstructions?: string;
258
+ addressCoordinates?: MapPosition | null;
259
+ phone?: Phone | null;
260
+ email?: string | null;
261
+ demo: boolean;
262
+ status: AccountBranchStatus;
263
+ createdAt: Date;
264
+ updatedAt: Date;
265
+ deletedAt?: Date | null;
266
+ schedule: AccountBranchSchedule[];
267
+ deliveryOptions: AccountDeliveryOption[];
268
+ }
269
+ declare enum AccountBranchStatus {
270
+ ACTIVE = "ACTIVE",
271
+ INACTIVE = "INACTIVE"
272
+ }
273
+ interface AccountBranchSchedule {
274
+ id: string;
275
+ accountBranchId: string;
276
+ day: AccountBranchScheduleDay;
277
+ start: number;
278
+ end: number;
279
+ status: AccountBranchScheduleStatus;
280
+ demo: boolean;
281
+ createdAt: Date;
282
+ updatedAt: Date;
283
+ deletedAt?: Date | null;
284
+ }
285
+ declare enum AccountBranchScheduleStatus {
286
+ ACTIVE = "ACTIVE",
287
+ INACTIVE = "INACTIVE"
288
+ }
289
+ declare enum AccountBranchScheduleDay {
290
+ MONDAY = "MONDAY",
291
+ TUESDAY = "TUESDAY",
292
+ WEDNESDAY = "WEDNESDAY",
293
+ THURSDAY = "THURSDAY",
294
+ FRIDAY = "FRIDAY",
295
+ SATURDAY = "SATURDAY",
296
+ SUNDAY = "SUNDAY"
297
+ }
298
+
299
+ /**
300
+ * Entidad AccountDomain
301
+ * Representa un dominio personalizado asociado a una cuenta.
302
+ * Permite dominios completos y subdominios, con control de estado y verificación.
303
+ */
304
+ interface AccountDomain {
305
+ id: string;
306
+ accountId: string;
307
+ domain: string; /** Dominio completo (ej: example.com) */
308
+ subdomain?: string; /** Subdominio opcional (ej: shop, blog) */
309
+ isPrimary: boolean; /** Indica si este es el dominio principal de la cuenta */
310
+ status: AccountDomainStatus; /** Estado del dominio: PENDING, ACTIVE, INACTIVE */
311
+ verifiedAt?: Date; /** Fecha de verificación del dominio */
312
+ createdAt: Date;
313
+ updatedAt: Date;
314
+ deletedAt?: Date | null;
315
+ }
316
+ declare enum AccountDomainStatus {
317
+ PENDING = "PENDING",
318
+ ACTIVE = "ACTIVE",
319
+ INACTIVE = "INACTIVE"
320
+ }
321
+
322
+ /**
323
+ * Entidad Order
324
+ * Define la orden de compra de un cliente en el sitio web.
325
+ */
326
+ interface Order {
327
+ id: string;
328
+ accountId: string;
329
+ customerId: string;
330
+ cartId?: string;
331
+ code: string;
332
+ deliveryType?: OrderDeliveryType;
333
+ deliveryFirstName?: string;
334
+ deliveryLastName?: string;
335
+ deliveryAddress?: any;
336
+ deliveryPhone?: any;
337
+ deliveryOptionId?: string;
338
+ pickupBranchId?: string;
339
+ paymentMethodIntegrationId?: string;
340
+ billingInformation?: any;
341
+ currency: Currency;
342
+ subtotalPrice: number;
343
+ totalDiscounts: number;
344
+ totalShippingPrice: number;
345
+ totalTax: number;
346
+ taxDetails?: any;
347
+ totalPrice: number;
348
+ totalRefunded: number;
349
+ status: OrderStatus;
350
+ paymentStatus: OrderPaymentStatus;
351
+ fulfillmentStatus: OrderFulfillmentStatus;
352
+ statusHistory?: StatusChangeHistory[];
353
+ customerNote?: string;
354
+ internalNote?: string;
355
+ source: OrderSource;
356
+ demo: boolean;
357
+ createdAt: Date;
358
+ updatedAt: Date;
359
+ cancelledAt?: Date;
360
+ cancelReason?: string;
361
+ deletedAt?: Date;
362
+ items?: OrderItem[];
363
+ }
364
+ interface OrderItem {
365
+ id: string;
366
+ accountId: string;
367
+ orderId: string;
368
+ productId: string;
369
+ productVariantId: string;
370
+ sku?: string;
371
+ productName: string;
372
+ variantName?: string;
373
+ currency: Currency;
374
+ unitPrice: number;
375
+ totalDiscount: number;
376
+ totalPrice: number;
377
+ quantity: number;
378
+ quantityFulfilled: number;
379
+ quantityRefunded: number;
380
+ quantityReturned: number;
381
+ totalTax: number;
382
+ taxName?: string;
383
+ createdAt: Date;
384
+ updatedAt: Date;
385
+ }
386
+ declare enum OrderStatus {
387
+ PENDING = "PENDING",// Order placed, awaiting payment confirmation
388
+ CONFIRMED = "CONFIRMED",// Payment received, order confirmed
389
+ PROCESSING = "PROCESSING",// Order being prepared
390
+ PROCESSED = "PROCESSED",// Order ready to be shipped
391
+ ON_HOLD = "ON_HOLD",// Order temporarily paused
392
+ COMPLETED = "COMPLETED",// Order finished (e.g., after return period)
393
+ CANCELLED = "CANCELLED",// Order cancelled before fulfillment
394
+ FAILED = "FAILED"
395
+ }
396
+ declare enum OrderPaymentStatus {
397
+ PENDING = "PENDING",
398
+ PARTIAL = "PARTIAL",
399
+ PAID = "PAID",
400
+ OVERPAID = "OVERPAID",
401
+ REFUNDED = "REFUNDED",
402
+ PARTIALLY_REFUNDED = "PARTIALLY_REFUNDED"
403
+ }
404
+ declare enum OrderFulfillmentStatus {
405
+ PENDING = "PENDING",
406
+ PARTIAL = "PARTIAL",
407
+ FULFILLED = "FULFILLED"
408
+ }
409
+ declare enum OrderSource {
410
+ WEB = "WEB",
411
+ POS = "POS",
412
+ API = "API"
413
+ }
414
+ declare enum OrderDeliveryType {
415
+ SHIPPING = "shipping",
416
+ PICKUP = "pickup"
417
+ }
418
+ interface StatusChangeHistory {
419
+ status: OrderStatus;
420
+ timestamp: Date;
421
+ reason?: string;
422
+ userId?: string;
423
+ metadata?: Record<string, any>;
424
+ }
425
+
426
+ interface OrderCreateFromCartDto {
427
+ cartId: string;
428
+ paymentMethodIntegrationId?: string;
429
+ customerNote?: string;
430
+ }
431
+ interface AdminOrderStatusChangeDto {
432
+ status: OrderStatus;
433
+ }
434
+
435
+ declare enum TransactionStatus {
436
+ PENDING = "PENDING",// Pendiente
437
+ PREAUTHORIZED = "PREAUTHORIZED",
438
+ APPROVED = "APPROVED",// Pago aprobado online
439
+ PAID = "PAID",// Pago realizado por redes fisicas
440
+ REJECTED = "REJECTED",// Pago rechazado
441
+ REFUND_IN_PROCESS = "REFUND_IN_PROCESS",// En proceso de reembolso con la plataforma de pagos
442
+ PARTIAL_REFUND = "PARTIAL_REFUND",// Pago parcialmente reembolsado
443
+ REFUNDED = "REFUNDED"
444
+ }
445
+ declare enum PaymentMethodType {
446
+ BANK_TRANSFER = "BANK_TRANSFER",
447
+ CREDIT_CARD = "CREDIT_CARD",
448
+ DEBIT_CARD = "DEBIT_CARD",
449
+ MERCADOPAGO = "MERCADOPAGO",
450
+ PHYSICAL = "PHYSICAL",
451
+ INTERNATIONAL = "INTERNATIONAL",
452
+ PAYPAL = "PAYPAL",
453
+ CASH = "CASH",
454
+ OTHER = "OTHER"
455
+ }
456
+ interface Payment {
457
+ id: string;
458
+ accountId: string;
459
+ orderId: string;
460
+ invoiceId?: string;
461
+ gatewayPaymentId?: string;
462
+ referenceCode?: string;
463
+ paymentMethodType?: PaymentMethodType;
464
+ currency: Currency;
465
+ amount: number;
466
+ amountReceived: number;
467
+ amountRefunded: number;
468
+ paidAt?: string | Date;
469
+ refundedAt?: string | Date;
470
+ status: TransactionStatus;
471
+ cardBrand?: string;
472
+ cardLast4?: string;
473
+ gatewayProvider?: string;
474
+ gatewayMetadata?: Record<string, any>;
475
+ paymentRedirectUrl?: string;
476
+ demo: boolean;
477
+ createdAt: string | Date;
478
+ updatedAt: string | Date;
479
+ deletedAt?: string | Date;
480
+ }
481
+
482
+ /**
483
+ * Entidad Product
484
+ * Representa un producto vendible en la tienda. Es la entidad base que puede tener múltiples variantes.
485
+ */
486
+ interface Product {
487
+ id: string;
488
+ accountId: string;
489
+ code: string;
490
+ brandId?: string | null;
491
+ supplierId?: string | null;
492
+ productType: ProductType;
493
+ sku?: string | null;
494
+ barcode?: string | null;
495
+ name: string;
496
+ slug: string;
497
+ description?: string | null;
498
+ isFeatured: boolean;
499
+ allowBackorder: boolean;
500
+ weight?: number | null;
501
+ weightUnit?: string | null;
502
+ height?: number | null;
503
+ width?: number | null;
504
+ depth?: number | null;
505
+ dimensionUnit?: string | null;
506
+ shippingLeadTime?: string | null;
507
+ status: ProductStatus;
508
+ createdAt: Date;
509
+ updatedAt: Date;
510
+ deletedAt?: Date | null;
511
+ }
512
+ declare enum ProductStatus {
513
+ ACTIVE = "ACTIVE",// Available for sale
514
+ INACTIVE = "INACTIVE",// Not visible/purchasable
515
+ ARCHIVED = "ARCHIVED",// Not visible, kept for records
516
+ DRAFT = "DRAFT"
517
+ }
518
+ declare enum ProductType {
519
+ SIMPLE = "SIMPLE",// Product without variants (may have a default hidden variant)
520
+ VARIABLE = "VARIABLE",// Product with distinct variants (color, size, etc.)
521
+ BUNDLE = "BUNDLE",// A package of other products/variants
522
+ GIFT_CARD = "GIFT_CARD"
523
+ }
524
+ interface ProductVariant {
525
+ id: string;
526
+ accountId: string;
527
+ productId: string;
528
+ sku?: string | null;
529
+ barcode?: string | null;
530
+ currency: string;
531
+ price: number;
532
+ compareAtPrice?: number;
533
+ allowBackorder?: boolean;
534
+ stock: number;
535
+ weight?: number | null;
536
+ weightUnit?: string | null;
537
+ height?: number | null;
538
+ width?: number | null;
539
+ depth?: number | null;
540
+ dimensionUnit?: string | null;
541
+ shippingLeadTime?: string | null;
542
+ order: number;
543
+ createdAt: Date;
544
+ updatedAt: Date;
545
+ deletedAt?: Date;
546
+ }
547
+
548
+ /**
549
+ * Entidad ProductAttribute
550
+ * Define los atributos disponibles que se pueden asignar a las variantes de producto (ej. Color, Talla).
551
+ * Especifica el nombre y tipo del atributo para ayudar en la representación y filtrado.
552
+ */
553
+ interface ProductAttribute {
554
+ id: string;
555
+ accountId: string;
556
+ name: string;
557
+ alias: string;
558
+ slug: string;
559
+ type: ProductAttributeType;
560
+ isRequired: boolean;
561
+ suffix: string;
562
+ status: ProductAttributeStatus;
563
+ createdAt: Date;
564
+ updatedAt: Date;
565
+ deletedAt?: Date | null;
566
+ options: ProductAttributeOption[];
567
+ displayOrder: number;
568
+ }
569
+ declare enum ProductAttributeStatus {
570
+ ACTIVE = "ACTIVE",
571
+ INACTIVE = "INACTIVE"
572
+ }
573
+ declare enum ProductAttributeType {
574
+ TEXT = "TEXT",// text input
575
+ NUMBER = "NUMBER",// number input
576
+ COLOR = "COLOR",// Special type for color swatches
577
+ SELECT = "SELECT",// Dropdown list
578
+ BOOLEAN = "BOOLEAN"
579
+ }
580
+ /**
581
+ * Una opción específica para un atributo (ej. "Talle 42" para el atributo "Talle").
582
+ */
583
+ interface ProductAttributeOption {
584
+ id: string;
585
+ accountId: string;
586
+ productAttributeId: string;
587
+ value: string;
588
+ imageId?: string | null;
589
+ order: number;
590
+ createdAt: Date;
591
+ updatedAt: Date;
592
+ deletedAt?: Date | null;
593
+ count: number;
594
+ }
595
+
596
+ /**
597
+ * Entidad StandardCategory
598
+ * Define las categorías estándar de productos.
599
+ * Estas categorías estan pensadas para unificar o agrupar productos de diferentes cuentas.
600
+ */
601
+ interface StandardCategory {
602
+ id: string;
603
+ parentId?: string;
604
+ name: string;
605
+ slug: string;
606
+ description?: string;
607
+ imageId?: string | null;
608
+ order: number;
609
+ status: StandardCategoryStatus;
610
+ metadata?: {
611
+ icon?: string;
612
+ displayInMenu?: boolean;
613
+ seoTitle?: string;
614
+ seoDescription?: string;
615
+ attributes?: string[];
616
+ };
617
+ createdAt: Date;
618
+ updatedAt: Date;
619
+ deletedAt?: Date | null;
620
+ children: StandardCategory[];
621
+ parent: StandardCategory | null;
622
+ }
623
+ declare enum StandardCategoryStatus {
624
+ ACTIVE = "ACTIVE",
625
+ INACTIVE = "INACTIVE"
626
+ }
627
+
628
+ /**
629
+ * Entidad ProductCategory
630
+ * Define las categorías de productos.
631
+ * Soporta una estructura jerárquica (categorías y subcategorías) mediante el campo parentId.
632
+ * Cada categoría debe estar asociada a una categoría estándar del sistema.
633
+ */
634
+ interface ProductCategory {
635
+ id: string;
636
+ accountId: string;
637
+ parentId?: string;
638
+ standardCategoryId: string;
639
+ name: string;
640
+ slug: string;
641
+ description?: string;
642
+ imageId?: string | null;
643
+ order: number;
644
+ isFeatured: boolean;
645
+ status: ProductCategoryStatus;
646
+ createdAt: Date;
647
+ updatedAt: Date;
648
+ deletedAt?: Date | null;
649
+ children: ProductCategory[];
650
+ parent: ProductCategory | null;
651
+ standardCategory: StandardCategory;
652
+ }
653
+ declare enum ProductCategoryStatus {
654
+ ACTIVE = "ACTIVE",
655
+ INACTIVE = "INACTIVE"
656
+ }
657
+
658
+ /**
659
+ * Entidad StoreBanner
660
+ * Banners para la portada de la web de la tienda
661
+ */
662
+
663
+ interface StoreBanner {
664
+ id: string;
665
+ accountId: string;
666
+ title: string;
667
+ desktopMediaId: string;
668
+ mobileMediaId?: string | null;
669
+ linkUrl?: string | null;
670
+ altText?: string | null;
671
+ displayOrder: number;
672
+ startDate?: Date | null;
673
+ endDate?: Date | null;
674
+ status: StoreBannerStatus;
675
+ createdAt: Date;
676
+ updatedAt: Date;
677
+ deletedAt?: Date | null;
678
+ desktopMedia?: Partial<Media> | null;
679
+ mobileMedia?: Partial<Media> | null;
680
+ }
681
+ declare enum StoreBannerStatus {
682
+ ACTIVE = "ACTIVE",
683
+ INACTIVE = "INACTIVE"
684
+ }
685
+
686
+ /**
687
+ * Entidad StorePage
688
+ * Páginas de la web de la tienda
689
+ */
690
+ interface StorePage {
691
+ id: string;
692
+ accountId: string;
693
+ type: StorePageType;
694
+ title: string;
695
+ slug: string;
696
+ content?: string | null;
697
+ seoTitle?: string | null;
698
+ seoDescription?: string | null;
699
+ status: StorePageStatus;
700
+ canDelete: boolean;
701
+ createdAt: Date;
702
+ updatedAt: Date;
703
+ deletedAt?: Date | null;
704
+ }
705
+ declare enum StorePageStatus {
706
+ PUBLISHED = "PUBLISHED",
707
+ DRAFT = "DRAFT",
708
+ ARCHIVED = "ARCHIVED"
709
+ }
710
+ declare enum StorePageType {
711
+ ABOUT_US = "ABOUT_US",
712
+ CONTACT = "CONTACT",
713
+ FAQ = "FAQ",
714
+ TERMS_AND_CONDITIONS = "TERMS_AND_CONDITIONS",
715
+ PRIVACY_POLICY = "PRIVACY_POLICY",
716
+ RETURN_POLICY = "RETURN_POLICY",
717
+ SHIPPING_POLICY = "SHIPPING_POLICY",
718
+ BRANCHES = "BRANCHES",
719
+ JOBS = "JOBS",
720
+ OTHER = "OTHER"
721
+ }
722
+
723
+ /**
724
+ * Add an item to the cart
725
+ */
726
+ interface CartItemAddDto {
727
+ cartId: string;
728
+ productId: string;
729
+ variantId?: string;
730
+ quantity: number;
731
+ attributes?: {
732
+ [key: string]: string | number;
733
+ };
734
+ userEmail?: string;
735
+ userId?: string;
736
+ }
737
+ /**
738
+ * Update an item in the cart
739
+ */
740
+ interface CartItemUpdateDto {
741
+ cartId: string;
742
+ itemId: string;
743
+ quantity: number;
744
+ }
745
+ /**
746
+ * Remove an item from the cart
747
+ */
748
+ interface CartItemRemoveDto {
749
+ cartId: string;
750
+ itemId: string;
751
+ }
752
+ interface CartUpdateDto {
753
+ cartId: string;
754
+ customer: {
755
+ email: string;
756
+ };
757
+ delivery: {
758
+ type: 'shipping' | 'pickup';
759
+ deliveryOptionId?: string;
760
+ pickupBranchId?: string;
761
+ firstname: string;
762
+ lastname: string;
763
+ phone: {
764
+ countryCode: string;
765
+ national: string;
766
+ international: string;
767
+ type: string;
768
+ validated: boolean;
769
+ };
770
+ address: {
771
+ country: string;
772
+ department: string;
773
+ locality: string;
774
+ street: string;
775
+ complement?: string;
776
+ notes?: string;
777
+ postalCode: string;
778
+ mapPosition: {
779
+ lat: number;
780
+ lng: number;
781
+ };
782
+ };
783
+ };
784
+ billing: {
785
+ name: string;
786
+ address: string;
787
+ city: string;
788
+ department: string;
789
+ };
790
+ }
791
+ /**
792
+ * Confirm a cart
793
+ */
794
+ interface CartConfirmDto {
795
+ cartId: string;
796
+ }
797
+ /**
798
+ * Validation information for a cart item
799
+ */
800
+ interface CartItemValidation {
801
+ hasIssues: boolean;
802
+ issues: string[];
803
+ errorCode?: CartItemErrorCode;
804
+ currentPrice?: number;
805
+ availableStock?: number;
806
+ isProductActive?: boolean;
807
+ }
808
+ /**
809
+ * Error codes for cart items
810
+ */
811
+ declare enum CartItemErrorCode {
812
+ PRICE_INCREASED = "PRICE_INCREASED",// Precio aumentó
813
+ PRICE_DECREASED = "PRICE_DECREASED",// Precio disminuyó
814
+ PRODUCT_INACTIVE = "PRODUCT_INACTIVE",// Producto ya no está disponible
815
+ STOCK_INSUFFICIENT = "STOCK_INSUFFICIENT",// Stock insuficiente (hay algo disponible)
816
+ STOCK_UNAVAILABLE = "STOCK_UNAVAILABLE",// Sin stock (0 disponible)
817
+ VALIDATION_ERROR = "VALIDATION_ERROR"
818
+ }
819
+
820
+ /**
821
+ * Entidad Cart
822
+ * Define el carrito de compras de un cliente en el sitio web.
823
+ */
824
+ interface Cart {
825
+ id: string;
826
+ code: string;
827
+ customerId?: string;
828
+ sessionId?: string;
829
+ items: CartItem[];
830
+ subtotal: number;
831
+ total: number;
832
+ currency: string;
833
+ itemCount: number;
834
+ createdAt: Date;
835
+ updatedAt: Date;
836
+ status: CartStatus;
837
+ source: CartSource;
838
+ recoveryToken?: string;
839
+ userEmail?: string;
840
+ userId?: string;
841
+ customerNote?: string;
842
+ hasIssues: boolean;
843
+ issuesCount: number;
844
+ subtotalPrice?: number;
845
+ totalDiscounts?: number;
846
+ totalShippingPrice?: number;
847
+ totalTax?: number;
848
+ totalPrice?: number;
849
+ taxDetails?: any;
850
+ }
851
+ interface CartItem {
852
+ id: string;
853
+ productId: string;
854
+ productVariantId: string;
855
+ name: string;
856
+ unitPrice: number;
857
+ quantity: number;
858
+ image?: string;
859
+ thumbnailUrl?: string;
860
+ sku?: string;
861
+ attributeDetails: CartItemAttributeDetail[];
862
+ validation?: CartItemValidation;
863
+ }
864
+ interface CartItemAttributeDetail {
865
+ name: string;
866
+ value: string;
867
+ type?: string;
868
+ }
869
+ declare enum CartStatus {
870
+ ACTIVE = "ACTIVE",
871
+ LOCKED = "LOCKED",
872
+ EXPIRED = "EXPIRED",
873
+ CONVERTED = "CONVERTED",
874
+ ABANDONED = "ABANDONED",
875
+ MERGED = "MERGED"
876
+ }
877
+ declare enum CartSource {
878
+ WEB = "WEB",
879
+ POS = "POS",
880
+ API = "API"
881
+ }
882
+
883
+ export { type Account, type AccountBranch, type AccountBranchSchedule, AccountBranchScheduleDay, AccountBranchScheduleStatus, AccountBranchStatus, type AccountDeliveryOption, type AccountDeliveryOptionCalculatedCost, AccountDeliveryOptionPriceLogic, AccountDeliveryOptionStatus, type AccountDeliveryOptionZone, AccountDeliveryOptionZoneStatus, type AccountDomain, AccountDomainStatus, type AccountIntegration, type AccountIntegrationConfigDTO, AccountIntegrationConnectionStatus, AccountIntegrationEnvironment, AccountIntegrationStatus, AccountStatus, type Address, type AdminOrderStatusChangeDto, type BaseEntity, type BaseEntityWithAccount, type BaseEntityWithAccountAndUser, type BaseEntityWithUser, type Cart, type CartConfirmDto, type CartItem, type CartItemAddDto, type CartItemAttributeDetail, CartItemErrorCode, type CartItemRemoveDto, type CartItemUpdateDto, type CartItemValidation, CartSource, CartStatus, type CartUpdateDto, Currency, type Integration, IntegrationCategory, IntegrationStatus, type MapPosition, type Media, MediaType, type Order, type OrderCreateFromCartDto, OrderDeliveryType, OrderFulfillmentStatus, type OrderItem, OrderPaymentStatus, OrderSource, OrderStatus, type Payment, PaymentMethodType, type Phone, type Product, type ProductAttribute, type ProductAttributeOption, ProductAttributeStatus, ProductAttributeType, type ProductCategory, ProductCategoryStatus, ProductStatus, ProductType, type ProductVariant, type StandardCategory, StandardCategoryStatus, type StatusChangeHistory, type StoreBanner, StoreBannerStatus, type StorePage, StorePageStatus, StorePageType, type ThemeConfig, TransactionStatus, getCurrencySymbol };