sinfactura-types 1.5.4 → 1.5.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (72) hide show
  1. package/dist/basket.d.ts +1 -1
  2. package/dist/currency.d.ts +39 -0
  3. package/dist/currency.js +1 -0
  4. package/dist/customer.d.ts +1 -1
  5. package/dist/index.d.ts +1 -0
  6. package/dist/index.js +1 -0
  7. package/dist/invoice.d.ts +2 -2
  8. package/dist/notification.d.ts +0 -6
  9. package/dist/order.d.ts +13 -1
  10. package/dist/product.d.ts +1 -1
  11. package/dist/src/account.d.ts +21 -0
  12. package/dist/src/account.js +1 -0
  13. package/dist/src/afip.d.ts +82 -0
  14. package/dist/src/afip.js +1 -0
  15. package/dist/src/api.d.ts +11 -0
  16. package/dist/src/api.js +1 -0
  17. package/dist/src/audit.d.ts +35 -0
  18. package/dist/src/audit.js +1 -0
  19. package/dist/src/auth.d.ts +20 -0
  20. package/dist/src/auth.js +1 -0
  21. package/dist/src/basket.d.ts +27 -0
  22. package/dist/src/basket.js +1 -0
  23. package/dist/src/brands.d.ts +14 -0
  24. package/dist/src/brands.js +1 -0
  25. package/dist/src/cash.d.ts +14 -0
  26. package/dist/src/cash.js +1 -0
  27. package/dist/src/categories.d.ts +14 -0
  28. package/dist/src/categories.js +1 -0
  29. package/dist/src/currency.d.ts +39 -0
  30. package/dist/src/currency.js +1 -0
  31. package/dist/src/customer.d.ts +63 -0
  32. package/dist/src/customer.js +1 -0
  33. package/dist/src/imports.d.ts +21 -0
  34. package/dist/src/imports.js +1 -0
  35. package/dist/src/index.d.ts +28 -0
  36. package/dist/src/index.js +28 -0
  37. package/dist/src/invoice.d.ts +63 -0
  38. package/dist/src/invoice.js +1 -0
  39. package/dist/src/log.d.ts +22 -0
  40. package/dist/src/log.js +1 -0
  41. package/dist/src/maintenance.d.ts +14 -0
  42. package/dist/src/maintenance.js +1 -0
  43. package/dist/src/mercadopago.d.ts +66 -0
  44. package/dist/src/mercadopago.js +1 -0
  45. package/dist/src/notification.d.ts +26 -0
  46. package/dist/src/notification.js +1 -0
  47. package/dist/src/order.d.ts +74 -0
  48. package/dist/src/order.js +1 -0
  49. package/dist/src/payment.d.ts +105 -0
  50. package/dist/src/payment.js +1 -0
  51. package/dist/src/product.d.ts +50 -0
  52. package/dist/src/product.js +1 -0
  53. package/dist/src/provinces.d.ts +2 -0
  54. package/dist/src/provinces.js +27 -0
  55. package/dist/src/return.d.ts +35 -0
  56. package/dist/src/return.js +1 -0
  57. package/dist/src/stock.d.ts +22 -0
  58. package/dist/src/stock.js +1 -0
  59. package/dist/src/store.d.ts +257 -0
  60. package/dist/src/store.js +1 -0
  61. package/dist/src/subscription.d.ts +292 -0
  62. package/dist/src/subscription.js +24 -0
  63. package/dist/src/supplier.d.ts +57 -0
  64. package/dist/src/supplier.js +1 -0
  65. package/dist/src/user.d.ts +49 -0
  66. package/dist/src/user.js +1 -0
  67. package/dist/src/whatsapp.d.ts +92 -0
  68. package/dist/src/whatsapp.js +1 -0
  69. package/dist/store.d.ts +24 -3
  70. package/dist/supplier.d.ts +1 -1
  71. package/dist/tsconfig.tsbuildinfo +1 -1
  72. package/package.json +2 -2
package/dist/basket.d.ts CHANGED
@@ -6,7 +6,7 @@ declare global {
6
6
  createdAt: number;
7
7
  updatedAt: number;
8
8
  quantity: number;
9
- currency: number;
9
+ currency: string;
10
10
  cost: number;
11
11
  total: number;
12
12
  items: BasketItem[];
@@ -0,0 +1,39 @@
1
+ declare global {
2
+ type CurrencyVariant = "oficial" | "blue" | "mep" | "ccl" | "turista" | "informal" | "cripto" | "oficial-bcra";
3
+ interface PlatformCurrency {
4
+ catalogId: string;
5
+ isoCode: string;
6
+ variant: CurrencyVariant;
7
+ displayName: string;
8
+ afipCode: "PES" | "DOL" | null;
9
+ decimals: number;
10
+ enabled: boolean;
11
+ createdAt: number;
12
+ updatedAt?: number;
13
+ }
14
+ interface StoreCurrencySubscription {
15
+ catalogId: string;
16
+ value: number;
17
+ order?: number;
18
+ autoUpdate?: {
19
+ sourceId: string;
20
+ strategy: "overwrite" | "overwrite-if-stale" | "notify-only";
21
+ lastUpdatedAt?: number;
22
+ lastValue?: number;
23
+ };
24
+ }
25
+ interface StoreCurrencySubscriptionView extends StoreCurrencySubscription {
26
+ isoCode: string;
27
+ variant: CurrencyVariant;
28
+ displayName: string;
29
+ afipCode?: "PES" | "DOL" | null;
30
+ decimals?: number;
31
+ }
32
+ interface Currency {
33
+ catalogId: string;
34
+ dated: string;
35
+ value: number;
36
+ source?: string;
37
+ }
38
+ }
39
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -45,7 +45,7 @@ declare global {
45
45
  salt?: string;
46
46
  search: string;
47
47
  updatedAt?: number;
48
- currencyId?: number;
48
+ currencyId?: string;
49
49
  deliveryAddress?: {
50
50
  fullName: string;
51
51
  address: string;
package/dist/index.d.ts CHANGED
@@ -7,6 +7,7 @@ export * from "./basket";
7
7
  export * from "./brands";
8
8
  export * from "./cash";
9
9
  export * from "./categories";
10
+ export * from "./currency";
10
11
  export * from "./customer";
11
12
  export * from "./imports";
12
13
  export * from "./invoice";
package/dist/index.js CHANGED
@@ -7,6 +7,7 @@ export * from "./basket";
7
7
  export * from "./brands";
8
8
  export * from "./cash";
9
9
  export * from "./categories";
10
+ export * from "./currency";
10
11
  export * from "./customer";
11
12
  export * from "./imports";
12
13
  export * from "./invoice";
package/dist/invoice.d.ts CHANGED
@@ -15,7 +15,7 @@ declare global {
15
15
  concept: number;
16
16
  cuitType: number;
17
17
  cuit: string;
18
- currency?: "PES" | "DOL";
18
+ currency?: string;
19
19
  currencyValue?: number;
20
20
  fiscalCondition: string;
21
21
  paymentCondition: string;
@@ -48,7 +48,7 @@ declare global {
48
48
  fiscalCondition: FiscalCondition;
49
49
  netos: Neto;
50
50
  ivaTypes: Method[];
51
- currency: "PES" | "DOL";
51
+ currency: string;
52
52
  currencyValue: number;
53
53
  total: number;
54
54
  observations?: string;
@@ -22,11 +22,5 @@ declare global {
22
22
  total?: number;
23
23
  TableName?: string;
24
24
  }
25
- interface Currency {
26
- currencyId: string;
27
- dated: string;
28
- value: number;
29
- name?: string;
30
- }
31
25
  }
32
26
  export {};
package/dist/order.d.ts CHANGED
@@ -10,7 +10,7 @@ declare global {
10
10
  deliveredAt?: number;
11
11
  deliveredDate?: number;
12
12
  comments?: string;
13
- currency: number;
13
+ currency: string;
14
14
  paymentMethod: number;
15
15
  deliveryMethod: number;
16
16
  invoiceMethod?: {
@@ -39,6 +39,18 @@ declare global {
39
39
  province: string;
40
40
  postalCode: string;
41
41
  };
42
+ mercadopago?: {
43
+ dynamicQr?: {
44
+ qrData: string;
45
+ inStoreOrderId: string;
46
+ posId: string;
47
+ externalReference: string;
48
+ amount: number;
49
+ currency: string;
50
+ expiresAt: number;
51
+ createdAt: number;
52
+ };
53
+ };
42
54
  }
43
55
  interface ZebraTag {
44
56
  orderId: string;
package/dist/product.d.ts CHANGED
@@ -33,7 +33,7 @@ declare global {
33
33
  totalIncomes?: number;
34
34
  totalSales?: number;
35
35
  zone?: string;
36
- currency: number;
36
+ currency: string;
37
37
  ivaType: number;
38
38
  categoryId: string;
39
39
  brandId: string;
@@ -0,0 +1,21 @@
1
+ declare global {
2
+ interface Account {
3
+ storeId: string;
4
+ accountId: string;
5
+ orderId?: string;
6
+ createdAt: number;
7
+ dated: number;
8
+ customerId?: string;
9
+ fullName?: string;
10
+ subject?: string;
11
+ details: string;
12
+ debit?: number;
13
+ credit?: number;
14
+ amount?: number;
15
+ currencyValue?: number;
16
+ balance?: number;
17
+ userId: string;
18
+ deleted?: boolean;
19
+ }
20
+ }
21
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,82 @@
1
+ declare global {
2
+ interface AfipImpuesto {
3
+ descripcionImpuesto: string;
4
+ idImpuesto: number;
5
+ periodo: number;
6
+ }
7
+ interface AfipActividad {
8
+ descripcionActividad: string;
9
+ idActividad: number;
10
+ nomenclador: number;
11
+ orden: number;
12
+ periodo: number;
13
+ }
14
+ interface AfipErrorConstancia {
15
+ apellido?: string;
16
+ error: string[];
17
+ idPersona: number;
18
+ nombre?: string;
19
+ razonSocial?: string;
20
+ }
21
+ interface AfipDomicilioFiscal {
22
+ codPostal: string;
23
+ datoAdicional?: string;
24
+ descripcionProvincia: string;
25
+ direccion: string;
26
+ idProvincia: number;
27
+ localidad?: string;
28
+ tipoDatoAdicional?: string;
29
+ tipoDomicilio: string;
30
+ }
31
+ interface AfipDatosGenerales {
32
+ apellido?: string;
33
+ domicilioFiscal: AfipDomicilioFiscal;
34
+ esSucesion: string;
35
+ estadoClave: string;
36
+ fechaContratoSocial?: string;
37
+ idPersona: number;
38
+ mesCierre: number;
39
+ razonSocial?: string;
40
+ nombre?: string;
41
+ tipoClave: string;
42
+ tipoPersona: "FISICA" | "JURIDICA";
43
+ }
44
+ interface AfipCategoria {
45
+ descripcionCategoria: string;
46
+ idCategoria: number;
47
+ idImpuesto: number;
48
+ perdiodo: number;
49
+ }
50
+ interface AfipRegimen {
51
+ descripcionRegimen: string;
52
+ idImpuesto: number;
53
+ idRegimen: number;
54
+ periodo: number;
55
+ tipoRegimen?: string;
56
+ }
57
+ interface AfipDatosMonotributo {
58
+ actividad?: AfipActividad[];
59
+ actividadMonotributista: AfipActividad;
60
+ categoriaMonotributo: AfipCategoria;
61
+ impuestos?: AfipImpuesto[];
62
+ impuesto: AfipImpuesto[];
63
+ }
64
+ interface AfipDatosRegimenGeneral {
65
+ actividad: AfipActividad[];
66
+ categoriaAutonomo?: AfipCategoria;
67
+ impuesto: AfipImpuesto[];
68
+ regimen?: AfipRegimen[];
69
+ }
70
+ interface AfipErrorRegimenGeneral {
71
+ error: string[];
72
+ mensaje: string;
73
+ }
74
+ interface CuitAfip {
75
+ datosGenerales?: AfipDatosGenerales;
76
+ datosMonotributo?: AfipDatosMonotributo;
77
+ datosRegimenGeneral?: AfipDatosRegimenGeneral;
78
+ errorConstancia?: AfipErrorConstancia;
79
+ errorRegimenGeneral?: AfipErrorRegimenGeneral;
80
+ }
81
+ }
82
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,11 @@
1
+ declare global {
2
+ interface ResponseApi<T = Record<string, string>> {
3
+ status: boolean;
4
+ error: string | null;
5
+ message: string | null;
6
+ data: T;
7
+ ConsumedCapacity?: Record<string, string | number>;
8
+ LastEvaluatedKey?: Record<string, string>;
9
+ }
10
+ }
11
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,35 @@
1
+ declare global {
2
+ interface OrderAudit {
3
+ storeId: string;
4
+ auditId: string;
5
+ orderId: string;
6
+ userId: string;
7
+ fullName?: string;
8
+ action: OrderAuditAction;
9
+ createdAt: number;
10
+ dated: number;
11
+ changes?: OrderAuditChange[];
12
+ itemChanges?: {
13
+ added: Partial<BasketItem>[];
14
+ removed: Partial<BasketItem>[];
15
+ modified: Array<{
16
+ productId: string;
17
+ name?: string;
18
+ oldQuantity: number;
19
+ newQuantity: number;
20
+ oldPrice: number;
21
+ newPrice: number;
22
+ }>;
23
+ };
24
+ oldTotal?: number;
25
+ newTotal?: number;
26
+ returnId?: string;
27
+ }
28
+ interface OrderAuditChange {
29
+ field: string;
30
+ oldValue: unknown;
31
+ newValue: unknown;
32
+ }
33
+ type OrderAuditAction = 'order_created' | 'order_edited' | 'order_ready' | 'order_delivered' | 'order_delivery_cancelled' | 'order_disabled' | 'order_enabled' | 'order_returned' | 'discount_changed' | 'payment_method_changed' | 'delivery_method_changed' | 'delivery_address_changed' | 'invoice_created' | 'credit_note_created';
34
+ }
35
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,20 @@
1
+ declare global {
2
+ interface Login {
3
+ email: string;
4
+ password: string;
5
+ }
6
+ interface Social {
7
+ accessToken?: string;
8
+ }
9
+ interface Register {
10
+ email: string;
11
+ password: string;
12
+ cuit: string;
13
+ fullName: string;
14
+ phone?: number;
15
+ }
16
+ interface Recover {
17
+ email: string;
18
+ }
19
+ }
20
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,27 @@
1
+ declare global {
2
+ interface Basket {
3
+ storeId: string;
4
+ customerId: string;
5
+ customer: Partial<Customer>;
6
+ createdAt: number;
7
+ updatedAt: number;
8
+ quantity: number;
9
+ currency: string;
10
+ cost: number;
11
+ total: number;
12
+ items: BasketItem[];
13
+ }
14
+ interface BasketItem {
15
+ dated: number;
16
+ productId: string;
17
+ sku: string;
18
+ pictures: Product['pictures'];
19
+ name: string;
20
+ zone?: string;
21
+ quantity: number;
22
+ ivaType: number;
23
+ cost: number;
24
+ price: number;
25
+ }
26
+ }
27
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,14 @@
1
+ declare global {
2
+ interface Brand {
3
+ storeId: string;
4
+ brandId: string;
5
+ name: string;
6
+ photoURL?: string;
7
+ photoData?: string;
8
+ removePhotoURL?: string;
9
+ isFather: boolean;
10
+ father?: string;
11
+ disabled: boolean;
12
+ }
13
+ }
14
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,14 @@
1
+ declare global {
2
+ interface Cash {
3
+ storeId: string;
4
+ cashId: string;
5
+ createdAt: number;
6
+ dated: number;
7
+ description: string;
8
+ income?: number;
9
+ outcome?: number;
10
+ balance?: number;
11
+ subject?: string;
12
+ }
13
+ }
14
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,14 @@
1
+ declare global {
2
+ interface Category {
3
+ storeId: string;
4
+ categoryId: string;
5
+ name: string;
6
+ photoURL?: string;
7
+ photoData?: string;
8
+ removePhotoURL?: string;
9
+ isFather: boolean;
10
+ father?: string;
11
+ disabled: boolean;
12
+ }
13
+ }
14
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,39 @@
1
+ declare global {
2
+ type CurrencyVariant = "oficial" | "blue" | "mep" | "ccl" | "turista" | "informal" | "cripto" | "oficial-bcra";
3
+ interface PlatformCurrency {
4
+ catalogId: string;
5
+ isoCode: string;
6
+ variant: CurrencyVariant;
7
+ displayName: string;
8
+ afipCode: "PES" | "DOL" | null;
9
+ decimals: number;
10
+ enabled: boolean;
11
+ createdAt: number;
12
+ updatedAt?: number;
13
+ }
14
+ interface StoreCurrencySubscription {
15
+ catalogId: string;
16
+ value: number;
17
+ order?: number;
18
+ autoUpdate?: {
19
+ sourceId: string;
20
+ strategy: "overwrite" | "overwrite-if-stale" | "notify-only";
21
+ lastUpdatedAt?: number;
22
+ lastValue?: number;
23
+ };
24
+ }
25
+ interface StoreCurrencySubscriptionView extends StoreCurrencySubscription {
26
+ isoCode: string;
27
+ variant: CurrencyVariant;
28
+ displayName: string;
29
+ afipCode?: "PES" | "DOL" | null;
30
+ decimals?: number;
31
+ }
32
+ interface Currency {
33
+ catalogId: string;
34
+ dated: string;
35
+ value: number;
36
+ source?: string;
37
+ }
38
+ }
39
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,63 @@
1
+ declare global {
2
+ interface CustomerAfip {
3
+ cuit: string;
4
+ razonSocial: string;
5
+ condFiscal: number;
6
+ condFiscalName: string;
7
+ address: string;
8
+ postalCode: string;
9
+ city: string;
10
+ province: string;
11
+ }
12
+ interface CustomerMarketing {
13
+ adds?: boolean;
14
+ email?: boolean;
15
+ phone?: boolean;
16
+ sms?: boolean;
17
+ whatsapp?: boolean;
18
+ }
19
+ interface Customer {
20
+ storeId: string;
21
+ customerId: string;
22
+ address: string;
23
+ afip: CustomerAfip[];
24
+ balance?: number;
25
+ city: string;
26
+ createdAt: number;
27
+ cuit: string;
28
+ deliveryMethod: number;
29
+ disabled: boolean;
30
+ discount: number;
31
+ email: string;
32
+ favorites?: Partial<Product>[];
33
+ fullName: string;
34
+ hash?: string;
35
+ lastBuy?: number;
36
+ lastLog?: number;
37
+ marketing?: CustomerMarketing;
38
+ minBuy?: number;
39
+ paymentMethod: number;
40
+ phone: string;
41
+ photoURL: string;
42
+ postalCode: string;
43
+ priceList: number;
44
+ province: string;
45
+ salt?: string;
46
+ search: string;
47
+ updatedAt?: number;
48
+ currencyId?: string;
49
+ deliveryAddress?: {
50
+ fullName: string;
51
+ address: string;
52
+ phone: string;
53
+ city: string;
54
+ province: string;
55
+ postalCode: string;
56
+ };
57
+ }
58
+ interface AuthCustomer extends Customer {
59
+ accessToken: string;
60
+ refreshToken: string;
61
+ }
62
+ }
63
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,21 @@
1
+ declare global {
2
+ interface ProductSale {
3
+ pk: string;
4
+ sk: string;
5
+ orderId: string;
6
+ customerId: string;
7
+ fullName: string;
8
+ quantity: number;
9
+ price: number;
10
+ }
11
+ interface ProductIncome {
12
+ pk: string;
13
+ sk: string;
14
+ orderId?: string;
15
+ supplierId: string;
16
+ supplierName?: string;
17
+ quantity: number;
18
+ cost: number;
19
+ }
20
+ }
21
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,28 @@
1
+ export * from "./account";
2
+ export * from "./afip";
3
+ export * from "./api";
4
+ export * from "./audit";
5
+ export * from "./auth";
6
+ export * from "./basket";
7
+ export * from "./brands";
8
+ export * from "./cash";
9
+ export * from "./categories";
10
+ export * from "./currency";
11
+ export * from "./customer";
12
+ export * from "./imports";
13
+ export * from "./invoice";
14
+ export * from "./log";
15
+ export * from "./maintenance";
16
+ export * from "./mercadopago";
17
+ export * from "./notification";
18
+ export * from "./order";
19
+ export * from "./payment";
20
+ export * from "./product";
21
+ export * from "./return";
22
+ export * from "./stock";
23
+ export * from "./store";
24
+ export * from "./subscription";
25
+ export * from "./supplier";
26
+ export * from "./user";
27
+ export * from "./whatsapp";
28
+ export * from "./provinces";
@@ -0,0 +1,28 @@
1
+ export * from "./account";
2
+ export * from "./afip";
3
+ export * from "./api";
4
+ export * from "./audit";
5
+ export * from "./auth";
6
+ export * from "./basket";
7
+ export * from "./brands";
8
+ export * from "./cash";
9
+ export * from "./categories";
10
+ export * from "./currency";
11
+ export * from "./customer";
12
+ export * from "./imports";
13
+ export * from "./invoice";
14
+ export * from "./log";
15
+ export * from "./maintenance";
16
+ export * from "./mercadopago";
17
+ export * from "./notification";
18
+ export * from "./order";
19
+ export * from "./payment";
20
+ export * from "./product";
21
+ export * from "./return";
22
+ export * from "./stock";
23
+ export * from "./store";
24
+ export * from "./subscription";
25
+ export * from "./supplier";
26
+ export * from "./user";
27
+ export * from "./whatsapp";
28
+ export * from "./provinces";