sinfactura-types 0.0.1 → 0.0.3

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.
@@ -0,0 +1,18 @@
1
+ declare global {
2
+ interface Account {
3
+ storeId: string;
4
+ accountId: string;
5
+ createdAt: number;
6
+ dated: number;
7
+ customerId?: string;
8
+ fullName?: string;
9
+ subject?: string;
10
+ details: string;
11
+ debit?: number;
12
+ credit?: number;
13
+ amount?: number;
14
+ currencyValue?: number;
15
+ balance?: number;
16
+ }
17
+ }
18
+ export {};
package/dist/afip.d.ts ADDED
@@ -0,0 +1,84 @@
1
+ declare global {
2
+ interface CuitAfip {
3
+ errorConstancia?: {
4
+ apellido: string;
5
+ error: string;
6
+ idPersona: string;
7
+ nombre: string;
8
+ };
9
+ datosGenerales?: {
10
+ apellido?: string;
11
+ domicilioFiscal: {
12
+ codPostal: string;
13
+ datoAdicional?: string;
14
+ descripcionProvincia: string;
15
+ direccion: string;
16
+ idProvincia: number;
17
+ localidad?: string;
18
+ tipoDatoAdicional?: string;
19
+ tipoDomicilio: string;
20
+ };
21
+ estadoClave: string;
22
+ fechaContratoSocial?: string;
23
+ idPersona: string;
24
+ mesCierre: number;
25
+ razonSocial?: string;
26
+ nombre?: string;
27
+ tipoClave: string;
28
+ tipoPersona: 'FISICA' | 'JURIDICA';
29
+ };
30
+ datosMonotributo?: {
31
+ actividad?: {
32
+ descripcionActividad: string;
33
+ idActividad: number;
34
+ nomenclador: number;
35
+ orden: number;
36
+ periodo: number;
37
+ }[];
38
+ actividadMonotributista: {
39
+ descripcionActividad: string;
40
+ idActividad: number;
41
+ nomenclador: number;
42
+ orden: number;
43
+ periodo: number;
44
+ };
45
+ categoriaMonotributo: {
46
+ descripcionCategoria: string;
47
+ idCategoria: number;
48
+ idImpuesto: number;
49
+ perdiodo: number;
50
+ };
51
+ impuestos: {
52
+ descripcionImpuesto: string;
53
+ idImpuesto: number;
54
+ periodo: number;
55
+ }[];
56
+ impuesto: {
57
+ descripcionImpuesto: string;
58
+ idImpuesto: number;
59
+ periodo: number;
60
+ }[];
61
+ };
62
+ datosRegimenGeneral?: {
63
+ actividad: {
64
+ descripcionActividad: string;
65
+ idActividad: number;
66
+ nomenclador: number;
67
+ orden: number;
68
+ periodo: number;
69
+ }[];
70
+ impuesto: {
71
+ descripcionImpuesto: string;
72
+ idImpuesto: number;
73
+ periodo: number;
74
+ }[];
75
+ regimen?: {
76
+ descripcionRegimen: string;
77
+ idImpuesto: number;
78
+ idRegimen: number;
79
+ periodo: number;
80
+ }[];
81
+ };
82
+ }
83
+ }
84
+ export {};
package/dist/api.d.ts ADDED
@@ -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,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: number;
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 {};
package/dist/cash.d.ts ADDED
@@ -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,47 @@
1
+ declare global {
2
+ interface CustomerAfip {
3
+ cuit: number;
4
+ razonSocial: string;
5
+ condFiscal: number;
6
+ condFiscalName: string;
7
+ address: string;
8
+ postalCode: string;
9
+ city: string;
10
+ province: string;
11
+ }
12
+ interface Customer {
13
+ storeId: string;
14
+ customerId: string;
15
+ disabled: boolean;
16
+ search: string;
17
+ photoURL: string;
18
+ fullName: string;
19
+ cuit: string;
20
+ phone: string;
21
+ email: string;
22
+ address: string;
23
+ postalCode: string;
24
+ city: string;
25
+ province: string;
26
+ discount: number;
27
+ minBuy?: number;
28
+ priceList: number;
29
+ paymentMethod: number;
30
+ deliveryMethod: number;
31
+ afip: CustomerAfip[];
32
+ createdAt: number;
33
+ updatedAt?: number;
34
+ lastBuy?: number;
35
+ lastLog?: number;
36
+ hash?: string;
37
+ salt?: string;
38
+ balance?: number;
39
+ favorites?: Favorite[];
40
+ }
41
+ interface Favorite {
42
+ productId: string;
43
+ dated: number;
44
+ name: string;
45
+ }
46
+ }
47
+ export {};
@@ -0,0 +1,10 @@
1
+ declare global {
2
+ interface FirebaseResponse {
3
+ displayName: string;
4
+ accessToken?: string;
5
+ status?: boolean;
6
+ message?: string;
7
+ providerId: string;
8
+ }
9
+ }
10
+ 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 {};
File without changes
@@ -0,0 +1,42 @@
1
+ declare global {
2
+ interface Invoice {
3
+ storeId: string;
4
+ invoiceId: string;
5
+ customerId: string;
6
+ createdAt: number;
7
+ dated: number;
8
+ invoiceType: number;
9
+ pointOfSale: number;
10
+ invoiceNumber: number;
11
+ razonSocial: string;
12
+ address: string;
13
+ location: string;
14
+ concept: number;
15
+ cuitType: number;
16
+ cuit: number;
17
+ currency: 'PES' | 'DOL';
18
+ currencyValue?: number;
19
+ fiscalCondition: string;
20
+ paymentCondition: string;
21
+ deliveryContition: string;
22
+ items: InvoiceItem[];
23
+ neto: number;
24
+ neto10: number;
25
+ neto21: number;
26
+ iva10: number;
27
+ iva21: number;
28
+ iva: number;
29
+ total: number;
30
+ dolar: number;
31
+ cae: string;
32
+ caeExpiration: string;
33
+ }
34
+ interface InvoiceItem {
35
+ code: string;
36
+ description: string;
37
+ quantity: number;
38
+ iva: number;
39
+ neto: number;
40
+ }
41
+ }
42
+ export {};
package/dist/log.d.ts ADDED
@@ -0,0 +1,15 @@
1
+ declare global {
2
+ interface Log {
3
+ storeId: string;
4
+ logId: string;
5
+ createdAt: number;
6
+ dated: number;
7
+ userId: string;
8
+ customerId?: string;
9
+ customerName?: string;
10
+ url: string;
11
+ details?: string;
12
+ moreDetails?: string;
13
+ }
14
+ }
15
+ export {};
@@ -0,0 +1,15 @@
1
+ declare global {
2
+ interface NotificationInterface {
3
+ storeId: string;
4
+ notificationId: string;
5
+ createdAt: number;
6
+ type: 'order' | 'mercadopago' | 'dollarOficial' | 'dollarInformal' | 'dollarBna';
7
+ title: string;
8
+ orderId?: string;
9
+ read?: boolean;
10
+ description?: string;
11
+ details?: string;
12
+ total?: number;
13
+ }
14
+ }
15
+ export {};
@@ -0,0 +1,32 @@
1
+ declare global {
2
+ interface Order {
3
+ storeId: string;
4
+ orderId: string;
5
+ customerId: string;
6
+ customer: Partial<Customer>;
7
+ createdAt: number;
8
+ updatedAt?: number;
9
+ readyAt?: number;
10
+ deliveredAt?: number;
11
+ deliveredDate?: number;
12
+ comments?: string;
13
+ currency: number;
14
+ paymentMethod: number;
15
+ deliveryMethod: number;
16
+ invoiceMethod?: {
17
+ condFiscal: number;
18
+ condFiscalName: string;
19
+ cuit: number;
20
+ razonSocial: string;
21
+ };
22
+ cost: number;
23
+ total: number;
24
+ discount: number;
25
+ orderPrinted?: boolean;
26
+ tagPrinted?: boolean;
27
+ invoices?: Partial<Invoice>[];
28
+ disabled?: boolean;
29
+ items: Partial<BasketItem>[];
30
+ }
31
+ }
32
+ export {};
@@ -0,0 +1,50 @@
1
+ declare global {
2
+ interface Product {
3
+ storeId: string;
4
+ productId: string;
5
+ createdAt: number;
6
+ updatedAt: number;
7
+ disabled: boolean;
8
+ search: string;
9
+ sku: string;
10
+ name: string;
11
+ description?: string;
12
+ pictures?: {
13
+ url: string;
14
+ base64?: string;
15
+ primary?: boolean;
16
+ }[];
17
+ stock: number;
18
+ limit?: number;
19
+ incomes?: {
20
+ stockId: string;
21
+ orderId?: string;
22
+ supplierName?: string;
23
+ quantity: number;
24
+ cost: number;
25
+ }[];
26
+ sales?: {
27
+ stockId: string;
28
+ orderId: string;
29
+ fullName: string;
30
+ quantity: number;
31
+ price: number;
32
+ }[];
33
+ totalIncomes?: number;
34
+ totalSales?: number;
35
+ zone?: string;
36
+ currency: number;
37
+ ivaType: number;
38
+ category: number;
39
+ brand: number;
40
+ inOffer: boolean;
41
+ isNew: boolean;
42
+ isService: boolean;
43
+ cost: number;
44
+ price1: number;
45
+ price2: number;
46
+ price3: number;
47
+ price4: number;
48
+ }
49
+ }
50
+ export {};
@@ -0,0 +1,133 @@
1
+ declare global {
2
+ interface Config {
3
+ storeId: number;
4
+ appVersion: number;
5
+ fiscalConditions: FiscalCondition[];
6
+ ivaTypes: Method[];
7
+ notificationOptions: Method[];
8
+ stats: {
9
+ store: number;
10
+ };
11
+ }
12
+ interface Store {
13
+ storeId: string;
14
+ createdAt: number;
15
+ name: string;
16
+ address: {
17
+ street: string;
18
+ postalCode: string;
19
+ city: string;
20
+ province: string;
21
+ };
22
+ cuit: number;
23
+ phone: number;
24
+ email: string;
25
+ config: {
26
+ priceDecimals: 0 | 1 | 2 | 3;
27
+ stock: boolean;
28
+ changePrice: boolean;
29
+ currency: number;
30
+ };
31
+ photoURL: string;
32
+ photoData?: string;
33
+ newPhotoURL?: string;
34
+ removePhotoURL?: string;
35
+ currencies: Method[];
36
+ cashInMethods: Method[];
37
+ cashOutMethods: Method[];
38
+ debitMethods: Method[];
39
+ priceLists: Method[];
40
+ accountMethods: Method[];
41
+ deliveryMethods: Method[];
42
+ paymentMethods: Method[];
43
+ brands: Brand[];
44
+ categories: Category[];
45
+ themeColors?: {
46
+ main?: string;
47
+ navbar?: string;
48
+ };
49
+ stats: {
50
+ customers?: number;
51
+ invoices?: number;
52
+ orders?: number;
53
+ products?: number;
54
+ users?: number;
55
+ };
56
+ mercadopago?: {
57
+ accessToken?: string;
58
+ code?: string;
59
+ refreshToken?: string;
60
+ };
61
+ afip: {
62
+ address?: string;
63
+ city?: string;
64
+ condFiscal?: number;
65
+ cuit?: number;
66
+ condFiscalName?: string;
67
+ postalCode?: string;
68
+ province?: string;
69
+ razonSocial?: string;
70
+ pointOfSale?: number;
71
+ activitiesStartedAt?: number;
72
+ invoiceNote?: string;
73
+ showInvoiceLogo?: string;
74
+ cert?: string;
75
+ csr?: string;
76
+ key?: string;
77
+ accessTicket_EB?: string;
78
+ accessTicket_RSF?: string;
79
+ };
80
+ appVersion: number;
81
+ ivaTypes: Method[];
82
+ fiscalConditions: FiscalCondition[];
83
+ notificationOptions?: {
84
+ id: string;
85
+ name: string;
86
+ }[];
87
+ minWithDni: number;
88
+ }
89
+ type StoreAttributeNames = keyof Store;
90
+ interface Method {
91
+ id: number;
92
+ name: string;
93
+ value?: number;
94
+ removable?: boolean;
95
+ editable?: boolean;
96
+ }
97
+ interface Category {
98
+ categoryId: number;
99
+ name: string;
100
+ photoURL?: string;
101
+ photoData?: string;
102
+ removePhotoURL?: string;
103
+ isFather?: boolean;
104
+ father?: number;
105
+ disabled?: boolean;
106
+ isNew?: boolean;
107
+ }
108
+ interface Brand {
109
+ brandId: number;
110
+ name: string;
111
+ photoURL?: string;
112
+ photoData?: string;
113
+ removePhotoURL?: string;
114
+ isFather?: boolean;
115
+ father?: number;
116
+ disabled?: boolean;
117
+ isNew?: boolean;
118
+ }
119
+ interface FiscalCondition {
120
+ CbteTipo: {
121
+ FAC: number;
122
+ NC: number;
123
+ ND: number;
124
+ NVC: number;
125
+ REC: number;
126
+ };
127
+ DocTipo: number;
128
+ condFiscal: number;
129
+ id: number;
130
+ name: string;
131
+ }
132
+ }
133
+ export {};
package/dist/user.d.ts ADDED
@@ -0,0 +1,45 @@
1
+ declare global {
2
+ interface User {
3
+ storeId: string;
4
+ userId: string;
5
+ createdAt: number;
6
+ fullName: string;
7
+ phone: string;
8
+ email: string;
9
+ password?: string;
10
+ roles: string;
11
+ photoURL: string;
12
+ disabled: boolean;
13
+ search: string;
14
+ accessToken: string;
15
+ roleSeller?: boolean;
16
+ roleProducts?: boolean;
17
+ roleCustomers?: boolean;
18
+ roleAfip?: boolean;
19
+ notifications?: UserNotifications;
20
+ permissions?: UserPermissions;
21
+ }
22
+ type UserNotifications = {
23
+ orders?: boolean;
24
+ mercadopago?: boolean;
25
+ dollarOficial?: boolean;
26
+ dollarInformal?: boolean;
27
+ dollarBna?: boolean;
28
+ };
29
+ type UserPermissions = {
30
+ currency?: boolean;
31
+ customers?: boolean;
32
+ products?: boolean;
33
+ seller?: boolean;
34
+ accountant?: boolean;
35
+ payments?: boolean;
36
+ cash?: boolean;
37
+ };
38
+ interface UserGoogle extends User {
39
+ displayName: string;
40
+ }
41
+ interface Auth extends User {
42
+ refreshToken: string;
43
+ }
44
+ }
45
+ export {};
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "sinfactura-types",
3
3
  "private": false,
4
- "version": "0.0.1",
4
+ "version": "0.0.3",
5
5
  "type": "module",
6
6
  "keywords": [
7
7
  "typescript",
@@ -13,7 +13,6 @@
13
13
  ],
14
14
  "license": "MIT",
15
15
  "homepage": "https://sinfactura.com",
16
- "main": "index.ts",
17
16
  "repository": {
18
17
  "url": "https://github.com/sinfactura/types",
19
18
  "type": "git"
@@ -30,6 +29,7 @@
30
29
  "author": "Moises Samuel Maison Maison",
31
30
  "types": "dist/index.d.ts",
32
31
  "devDependencies": {
32
+ "@mui/material": "^5.15.4",
33
33
  "typescript": "^5.3.3"
34
34
  }
35
35
  }