@openbox/shared-types 0.1.1 → 0.1.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.
package/.eslintrc.js ADDED
@@ -0,0 +1,28 @@
1
+ module.exports = {
2
+ parser: '@typescript-eslint/parser',
3
+ parserOptions: {
4
+ project: 'tsconfig.json',
5
+ sourceType: 'module',
6
+ },
7
+ plugins: ['@typescript-eslint/eslint-plugin'],
8
+ extends: [
9
+ 'plugin:@typescript-eslint/recommended',
10
+ 'plugin:prettier/recommended',
11
+ ],
12
+ root: true,
13
+ env: {
14
+ node: true,
15
+ jest: true,
16
+ },
17
+ ignorePatterns: ['.eslintrc.js'],
18
+ rules: {
19
+ "prettier/prettier": [
20
+ "error",
21
+ { "printWidth": 120 }
22
+ ],
23
+ '@typescript-eslint/interface-name-prefix': 'off',
24
+ '@typescript-eslint/explicit-function-return-type': 'off',
25
+ '@typescript-eslint/explicit-module-boundary-types': 'off',
26
+ '@typescript-eslint/no-explicit-any': 'off',
27
+ },
28
+ };
package/.prettierrc ADDED
@@ -0,0 +1,5 @@
1
+ {
2
+ "singleQuote": true,
3
+ "trailingComma": "all",
4
+ "printWidth": 120
5
+ }
@@ -1,236 +1,232 @@
1
- import { CompanyForReports } from "../AuxiliarTypes";
2
-
3
- /**
4
- * Definición de estructura y tipos de campos para tipos de partidas
5
- */
6
- export class EntryTypes{
7
- id:number;
8
- name:string;
9
- code:string;
10
- }
11
-
12
- /**
13
- * Definición de estructura y tipos de campos para accountingCatalogs
14
- */
15
- export class AccountingCatalogs{
16
- id:string;
17
- code:string;
18
- name:string;
19
- description:string;
20
- isParent:string;
21
- isAcreedora:string;
22
- isBalance:string;
23
- parentCatalog:object;
24
- subAccounts:boolean;
25
- }
26
-
27
- /**
28
- * Definicion de estructura y tipos de datos para entries series
29
- */
30
- export class EntriesSeries{
31
- nextSerie:number;
32
- }
33
-
34
- /**
35
- * Definicion de estrucutra para firmantes
36
- */
37
- export class SignaturesForReport{
38
- legal:string;
39
- accountant:string;
40
- auditor:string;
41
- }
42
-
43
- /**
44
- * Definición de estructuras para cuentas en reportes
45
- */
46
- export class AccountsForGeneralReport{
47
- code:string
48
- name:string
49
- total:number
50
- accounts:AccountsForGeneralReport
51
- }
52
-
53
- /**
54
- * Estrucutra para reporte general en contabilidad
55
- */
56
- export class GeneralBalanceReport{
57
- signatures:SignaturesForReport;
58
- company:CompanyForReports;
59
- name:string;
60
- accounts:AccountsForGeneralReport
61
- }
62
-
63
- /**
64
- * Definición de estructura para cuentas contabels de estado de resultados
65
- */
66
- export class AccountsForEstadoReport{
67
- name:string;
68
- total:number;
69
- type:null | string
70
- children: null | AccountsForEstadoReport
71
- }
72
-
73
-
74
- /**
75
- * Estrucutra para reporte esatdo de resultados en contabilidad
76
- */
77
- export class EstadoResultadosReport{
78
- signatures:SignaturesForReport;
79
- company:CompanyForReports;
80
- name:string;
81
- accounts:AccountsForEstadoReport
82
- }
83
-
84
- /**
85
- * Definición de estructura para cuentas contabels para balancede comprobacion
86
- */
87
- export class AccountsForComprobationBalnceReport{
88
- code:string;
89
- name:string;
90
- initialBalance:number;
91
- cargo:number;
92
- abono:number;
93
- currentBalance:number;
94
- actualBalance:number;
95
- }
96
-
97
-
98
- /**
99
- * Estrucutra para reporte balance de comprobacion en contabilidad
100
- */
101
- export class ComprobationBalanceReport{
102
- signatures:SignaturesForReport;
103
- company:CompanyForReports;
104
- name:string;
105
- accounts:AccountsForComprobationBalnceReport
106
- }
107
-
108
- /**
109
- * Definicion de movements para reporte de diario mayor
110
- */
111
- export class MovementsForDiarioReport{
112
- date:string;
113
- cargo:number;
114
- abono:number;
115
- balance:number;
116
- }
117
-
118
- /**
119
- * Definición de estructura para cuentas contabels para diario mayor
120
- */
121
- export class AccountsForDirarioMayorReport{
122
- code:string;
123
- name:string;
124
- initialBalance:number;
125
- movements:MovementsForDiarioReport | MovementsForAuxiliarReport;
126
- currentBalance:number;
127
- actualBalance:number;
128
- }
129
-
130
- /**
131
- * Estrucutra para reporte diario mayor en contabilidad
132
- */
133
- export class DirarioMayorReport{
134
- signatures:SignaturesForReport;
135
- company:CompanyForReports;
136
- name:string;
137
- accounts:AccountsForDirarioMayorReport
138
- }
139
-
140
- /**
141
- * Estructura y tipos para movimeintos en reporte de auxiliares y movimiento de cuentas
142
- */
143
- export class MovementsForAuxiliarReport{
144
- entryNumber:string;
145
- entryName:string;
146
- date:string;
147
- cargo:number;
148
- abono:number;
149
- balance:number;
150
- }
151
-
152
- /**
153
- * Estrucutra para reporte auxiliar y movimiento de cuentas en contabilidad
154
- */
155
- export class auxiliarReport{
156
- signatures:SignaturesForReport;
157
- company:CompanyForReports;
158
- name:string;
159
- accounts:AccountsForDirarioMayorReport
160
- }
161
-
162
- /**
163
- * Estrucutra para reporte catalogo de cuentas en contabilidad
164
- */
165
- export class AcountingCatalogReport{
166
- signatures:SignaturesForReport;
167
- company:CompanyForReports;
168
- name:string;
169
- accounts:AccountingCatalogs
170
- }
171
-
172
-
173
- /**
174
- * Estrucutra de configuraciones generales de contabilidad
175
- */
176
- export class SettingGeneralAccounting{
177
- periodStart:string;
178
- periodEnd:string;
179
- accountingDebitCatalog:string;
180
- accountingCreditCatalog:string;
181
- }
182
-
183
- /**
184
- * Estructura para listado de partidas contables
185
- */
186
- export class EntriesStructure{
187
- id:string;
188
- serie:string;
189
- title:string;
190
- date:string;
191
- squared:string;
192
- accounted:string;
193
- createdAt:string;
194
- cargo:number;
195
- accountingEntryType:EntryTypes;
196
- }
197
-
198
- /**
199
- * Estrucutra para partida contable individual
200
- */
201
- export class EntryStructure{
202
- id:string;
203
- serie:string;
204
- title:string;
205
- date:string;
206
- squared:string;
207
- accounted:string;
208
- origin:string;
209
- createdAt:string;
210
- accountingEntryType:EntryTypes;
211
- accountingEntryDetails:EntryDetailsStructure[];
212
- rawDate:string;
213
- }
214
-
215
- /**
216
- * Estructurra de detalles para partida contable individual
217
- */
218
- export class EntryDetailsStructure{
219
- id:string;
220
- catalogName:string;
221
- concept:string;
222
- cargo:number;
223
- abono:number;
224
- order:number;
225
- accountingCatalog:AccountingCatalogForDetails;
226
- }
227
-
228
-
229
- /**
230
- * Estructura para catalogos de los detalles de partidas
231
- */
232
- export class AccountingCatalogForDetails{
233
- id:string;
234
- name:string;
235
- code:string;
236
- }
1
+ // import { CompanyForReports } from "../AuxiliarTypes";
2
+
3
+ // /**
4
+ // * Definición de estructura y tipos de campos para tipos de partidas
5
+ // */
6
+ // export class EntryTypes{
7
+ // id:number;
8
+ // name:string;
9
+ // code:string;
10
+ // }
11
+
12
+ // /**
13
+ // * Definición de estructura y tipos de campos para accountingCatalogs
14
+ // */
15
+ // export class AccountingCatalogs{
16
+ // id:string;
17
+ // code:string;
18
+ // name:string;
19
+ // description:string;
20
+ // isParent:string;
21
+ // isAcreedora:string;
22
+ // isBalance:string;
23
+ // parentCatalog:object;
24
+ // subAccounts:boolean;
25
+ // }
26
+
27
+ // /**
28
+ // * Definicion de estructura y tipos de datos para entries series
29
+ // */
30
+ // export class EntriesSeries{
31
+ // nextSerie:number;
32
+ // }
33
+
34
+ // /**
35
+ // * Definicion de estrucutra para firmantes
36
+ // */
37
+ // export class SignaturesForReport{
38
+ // legal:string;
39
+ // accountant:string;
40
+ // auditor:string;
41
+ // }
42
+
43
+ // /**
44
+ // * Definición de estructuras para cuentas en reportes
45
+ // */
46
+ // export class AccountsForGeneralReport{
47
+ // code:string
48
+ // name:string
49
+ // total:number
50
+ // accounts:AccountsForGeneralReport
51
+ // }
52
+
53
+ // /**
54
+ // * Estrucutra para reporte general en contabilidad
55
+ // */
56
+ // export class GeneralBalanceReport{
57
+ // signatures:SignaturesForReport;
58
+ // company:CompanyForReports;
59
+ // name:string;
60
+ // accounts:AccountsForGeneralReport
61
+ // }
62
+
63
+ // /**
64
+ // * Definición de estructura para cuentas contabels de estado de resultados
65
+ // */
66
+ // export class AccountsForEstadoReport{
67
+ // name:string;
68
+ // total:number;
69
+ // type:null | string
70
+ // children: null | AccountsForEstadoReport
71
+ // }
72
+
73
+ // /**
74
+ // * Estrucutra para reporte esatdo de resultados en contabilidad
75
+ // */
76
+ // export class EstadoResultadosReport{
77
+ // signatures:SignaturesForReport;
78
+ // company:CompanyForReports;
79
+ // name:string;
80
+ // accounts:AccountsForEstadoReport
81
+ // }
82
+
83
+ // /**
84
+ // * Definición de estructura para cuentas contabels para balancede comprobacion
85
+ // */
86
+ // export class AccountsForComprobationBalnceReport{
87
+ // code:string;
88
+ // name:string;
89
+ // initialBalance:number;
90
+ // cargo:number;
91
+ // abono:number;
92
+ // currentBalance:number;
93
+ // actualBalance:number;
94
+ // }
95
+
96
+ // /**
97
+ // * Estrucutra para reporte balance de comprobacion en contabilidad
98
+ // */
99
+ // export class ComprobationBalanceReport{
100
+ // signatures:SignaturesForReport;
101
+ // company:CompanyForReports;
102
+ // name:string;
103
+ // accounts:AccountsForComprobationBalnceReport
104
+ // }
105
+
106
+ // /**
107
+ // * Definicion de movements para reporte de diario mayor
108
+ // */
109
+ // export class MovementsForDiarioReport{
110
+ // date:string;
111
+ // cargo:number;
112
+ // abono:number;
113
+ // balance:number;
114
+ // }
115
+
116
+ // /**
117
+ // * Definición de estructura para cuentas contabels para diario mayor
118
+ // */
119
+ // export class AccountsForDirarioMayorReport{
120
+ // code:string;
121
+ // name:string;
122
+ // initialBalance:number;
123
+ // movements:MovementsForDiarioReport | MovementsForAuxiliarReport;
124
+ // currentBalance:number;
125
+ // actualBalance:number;
126
+ // }
127
+
128
+ // /**
129
+ // * Estrucutra para reporte diario mayor en contabilidad
130
+ // */
131
+ // export class DirarioMayorReport{
132
+ // signatures:SignaturesForReport;
133
+ // company:CompanyForReports;
134
+ // name:string;
135
+ // accounts:AccountsForDirarioMayorReport
136
+ // }
137
+
138
+ // /**
139
+ // * Estructura y tipos para movimeintos en reporte de auxiliares y movimiento de cuentas
140
+ // */
141
+ // export class MovementsForAuxiliarReport{
142
+ // entryNumber:string;
143
+ // entryName:string;
144
+ // date:string;
145
+ // cargo:number;
146
+ // abono:number;
147
+ // balance:number;
148
+ // }
149
+
150
+ // /**
151
+ // * Estrucutra para reporte auxiliar y movimiento de cuentas en contabilidad
152
+ // */
153
+ // export class auxiliarReport{
154
+ // signatures:SignaturesForReport;
155
+ // company:CompanyForReports;
156
+ // name:string;
157
+ // accounts:AccountsForDirarioMayorReport
158
+ // }
159
+
160
+ // /**
161
+ // * Estrucutra para reporte catalogo de cuentas en contabilidad
162
+ // */
163
+ // export class AcountingCatalogReport{
164
+ // signatures:SignaturesForReport;
165
+ // company:CompanyForReports;
166
+ // name:string;
167
+ // accounts:AccountingCatalogs
168
+ // }
169
+
170
+ // /**
171
+ // * Estrucutra de configuraciones generales de contabilidad
172
+ // */
173
+ // export class SettingGeneralAccounting{
174
+ // periodStart:string;
175
+ // periodEnd:string;
176
+ // accountingDebitCatalog:string;
177
+ // accountingCreditCatalog:string;
178
+ // }
179
+
180
+ // /**
181
+ // * Estructura para listado de partidas contables
182
+ // */
183
+ // export class EntriesStructure{
184
+ // id:string;
185
+ // serie:string;
186
+ // title:string;
187
+ // date:string;
188
+ // squared:string;
189
+ // accounted:string;
190
+ // createdAt:string;
191
+ // cargo:number;
192
+ // accountingEntryType:EntryTypes;
193
+ // }
194
+
195
+ // /**
196
+ // * Estrucutra para partida contable individual
197
+ // */
198
+ // export class EntryStructure{
199
+ // id:string;
200
+ // serie:string;
201
+ // title:string;
202
+ // date:string;
203
+ // squared:string;
204
+ // accounted:string;
205
+ // origin:string;
206
+ // createdAt:string;
207
+ // accountingEntryType:EntryTypes;
208
+ // accountingEntryDetails:EntryDetailsStructure[];
209
+ // rawDate:string;
210
+ // }
211
+
212
+ // /**
213
+ // * Estructurra de detalles para partida contable individual
214
+ // */
215
+ // export class EntryDetailsStructure{
216
+ // id:string;
217
+ // catalogName:string;
218
+ // concept:string;
219
+ // cargo:number;
220
+ // abono:number;
221
+ // order:number;
222
+ // accountingCatalog:AccountingCatalogForDetails;
223
+ // }
224
+
225
+ // /**
226
+ // * Estructura para catalogos de los detalles de partidas
227
+ // */
228
+ // export class AccountingCatalogForDetails{
229
+ // id:string;
230
+ // name:string;
231
+ // code:string;
232
+ // }
@@ -1,31 +1,39 @@
1
-
2
1
  /**
3
2
  * Definición de estructura de la respuesta del campo company para los reportes
4
3
  */
5
- export class CompanyForReports{
6
- name:string;
7
- nit:string;
8
- nrc:string;
9
- }
4
+ export type CompanyForReports = {
5
+ name: string;
6
+ nit: string;
7
+ nrc: string;
8
+ };
10
9
 
11
10
  /**
12
11
  * Definición de structura de campos de country
13
12
  */
14
- export class Country{
15
- id:number;
16
- name:string;
13
+ export type Country = {
14
+ id: number;
15
+ name: string;
17
16
  }
18
17
  /**
19
18
  * Definición de structura de campos de state
20
19
  */
21
- export class State{
22
- id:number;
23
- name:string;
20
+ export type State = {
21
+ id: number;
22
+ name: string;
24
23
  }
25
24
  /**
26
25
  * Definición de structura de campos de city
27
26
  */
28
- export class City{
29
- id:number;
30
- name:string;
27
+ export type City = {
28
+ id: number;
29
+ name: string;
31
30
  }
31
+
32
+ /**
33
+ * Campos para el objeto Sellingtypes
34
+ */
35
+ export type SellingTypes = {
36
+ id: number
37
+ name: string
38
+ isGravada: boolean
39
+ }
@@ -1,32 +1,32 @@
1
1
  import { City, CompanyForReports, Country, State } from "../AuxiliarTypes";
2
- import { SellingTypes } from "../Services";
2
+ import { SellingTypes } from "../AuxiliarTypes";
3
3
 
4
4
  /**
5
- * Definición de estructura de respuesta de GET/
5
+ * Definición de estructura de respuesta de GET/
6
6
  */
7
- export class Customers{
7
+ export type CustomersGET = {
8
8
  id:string;
9
- name:string;
10
- shortName:string
11
- isProvider:boolean;
12
- isCustomer:boolean;
13
- dui:string | null;
14
- nrc:string | null;
15
- nit:string | null;
16
- giro:string | null;
17
- isActiveCustomer:boolean;
18
- isActiveProvider:boolean;
19
- isUsedCustomer:boolean;
20
- isUsedProvider:boolean;
21
- createdAt:string;
22
- personType:PersonType;
23
- customerTypeNatural:CustomerTypeNatural | null;
9
+ name:string;
10
+ shortName:string
11
+ isProvider:boolean;
12
+ isCustomer:boolean;
13
+ dui:string | null;
14
+ nrc:string | null;
15
+ nit:string | null;
16
+ giro:string | null;
17
+ isActiveCustomer:boolean;
18
+ isActiveProvider:boolean;
19
+ isUsedCustomer:boolean;
20
+ isUsedProvider:boolean;
21
+ createdAt:string;
22
+ personType:PersonType;
23
+ customerTypeNatural:CustomerTypeNatural | null;
24
24
  }
25
25
 
26
26
  /**
27
27
  * Definición de estructura de respuesta de GET/ GET/:id de customer
28
28
  */
29
- export class Customer{
29
+ export type CustomerGID = {
30
30
  id:string;
31
31
  name:string;
32
32
  shortName:string
@@ -45,11 +45,10 @@ customerTypeNatural:CustomerTypeNatural | null;
45
45
  customerTypeNatural:CustomerTypeNatural | null;
46
46
  customerType: SellingTypes;
47
47
  customerTaxerType:CustomerTaxerType;
48
- customerBranches: CustomerBranches;
48
+ branch: CustomerBranches;
49
49
  }
50
50
 
51
-
52
- export class CustomerBranches{
51
+ type CustomerBranches = {
53
52
  id:string;
54
53
  name:string;
55
54
  contactName:string;
@@ -66,7 +65,7 @@ export class CustomerBranches{
66
65
  /**
67
66
  * Definición de estructura de campos de customerTributary
68
67
  */
69
- export class CustomerTributary{
68
+ type CustomerTributary = {
70
69
  dui:string;
71
70
  nit:string;
72
71
  nrc:string;
@@ -76,37 +75,33 @@ export class CustomerBranches{
76
75
  customerTypeNatural:CustomerTypeNatural | null;
77
76
  }
78
77
 
79
-
80
78
  /**
81
79
  * Definición de estrructura de campos para reporte general de clientes
82
80
  */
83
- export class CustomersReportGeneral{
81
+ type CustomersReportGeneral = {
84
82
  company:CompanyForReports;
85
83
  name:string;
86
- customers: Customers
84
+ customers: CustomersGET
87
85
  }
88
86
 
89
-
90
87
  /**
91
88
  * Definición de estrructura de campos para reporte general de clientes
92
89
  */
93
- export class CustomersReport{
90
+ type CustomersReport = {
94
91
  company:CompanyForReports;
95
92
  name:string;
96
- customer: Customer
93
+ customer: CustomerGID
97
94
  }
98
95
 
99
-
100
- export class AccountingCustomerIntegration{
96
+ type AccountingCustomerIntegration = {
101
97
  accountingCatalogSales:string;
102
98
  accountingCatalogCXC:string;
103
99
  }
104
100
 
105
-
106
101
  /**
107
102
  * Definición de estructura de personType
108
103
  */
109
- export class PersonType{
104
+ type PersonType = {
110
105
  id:number;
111
106
  name:string
112
107
  }
@@ -114,7 +109,7 @@ export class AccountingCustomerIntegration{
114
109
  /**
115
110
  * Definición de estructura de customerTypeNatural
116
111
  */
117
- export class CustomerTypeNatural{
112
+ type CustomerTypeNatural = {
118
113
  id:number;
119
114
  name:string
120
115
  }
@@ -122,7 +117,7 @@ export class AccountingCustomerIntegration{
122
117
  /**
123
118
  * Definición de estructura de customerTaxerType
124
119
  */
125
- export class CustomerTaxerType{
120
+ type CustomerTaxerType = {
126
121
  id:number;
127
122
  name:string
128
123
  }
@@ -130,7 +125,7 @@ export class AccountingCustomerIntegration{
130
125
  /**
131
126
  * Definición de campos de contacInfo
132
127
  */
133
- export class ContactInfo{
128
+ type ContactInfo = {
134
129
  emails:string[];
135
130
  phones:string[];
136
131
  }
package/Invoices/index.ts CHANGED
@@ -10,38 +10,36 @@ name:string;
10
10
  active:boolean;
11
11
  }
12
12
 
13
- /**
14
- * Definición de campos para invoicesDocuments
15
- */
16
- export class InvoicesDocuments{
17
- id:string;
18
- authorization:string;
19
- initial:number;
20
- final:number;
21
- current:number;
22
- active:boolean;
23
- used:boolean;
24
- isCurrentDocument:boolean;
25
- documentType:DocumentTypes;
26
- }
27
-
28
-
29
- /**
30
- * Definición de campos de documento indivual
31
- */
32
- export class InvoiceDocument{
33
- id:string;
34
- authorization:string;
35
- initial:number;
36
- final:number;
37
- current:number;
38
- active:boolean;
39
- used:boolean;
40
- isCurrentDocument:boolean;
41
- documentLayout:object;
42
- documentType:DocumentTypes;
43
- }
13
+ // /**
14
+ // * Definición de campos para invoicesDocuments
15
+ // */
16
+ // export class InvoicesDocuments{
17
+ // id:string;
18
+ // authorization:string;
19
+ // initial:number;
20
+ // final:number;
21
+ // current:number;
22
+ // active:boolean;
23
+ // used:boolean;
24
+ // isCurrentDocument:boolean;
25
+ // documentType:DocumentTypes;
26
+ // }
44
27
 
28
+ // /**
29
+ // * Definición de campos de documento indivual
30
+ // */
31
+ // export class InvoiceDocument{
32
+ // id:string;
33
+ // authorization:string;
34
+ // initial:number;
35
+ // final:number;
36
+ // current:number;
37
+ // active:boolean;
38
+ // used:boolean;
39
+ // isCurrentDocument:boolean;
40
+ // documentLayout:object;
41
+ // documentType:DocumentTypes;
42
+ // }
45
43
 
46
44
  /**
47
45
  * Definición de los campos de docuemntTypes
@@ -54,7 +52,6 @@ documentType:DocumentTypes;
54
52
  showForNonTaxers:boolean | null;
55
53
  }
56
54
 
57
-
58
55
  /**
59
56
  * Definición de campos y tipo de dato para paymentCondition
60
57
  */
@@ -83,30 +80,30 @@ export class InvoicesStatuses{
83
80
  name:string;
84
81
  }
85
82
 
86
- /**
87
- * Definición de campos y tipos para recurrencias
88
- */
89
- export class InvoicesRecurrencies{
90
- id:string;
91
- name:string;
92
- }
83
+ // /**
84
+ // * Definición de campos y tipos para recurrencias
85
+ // */
86
+ // export class InvoicesRecurrencies{
87
+ // id:string;
88
+ // name:string;
89
+ // }
93
90
 
94
- /**
95
- * Definicion de campos y tipos apra configuraciones de modulo de ventas
96
- */
97
- export class InvoicesSettings{
98
- automaticIntegration:string;
99
- activeIntegration:string;
100
- registerService:string;
101
- recurrencyFrecuency:number;
102
- recurrencyOption:string;
103
- cashPaymentAccountingCatalog:string;
104
- }
91
+ // /**
92
+ // * Definicion de campos y tipos apra configuraciones de modulo de ventas
93
+ // */
94
+ // export class InvoicesSettings{
95
+ // automaticIntegration:string;
96
+ // activeIntegration:string;
97
+ // registerService:string;
98
+ // recurrencyFrecuency:number;
99
+ // recurrencyOption:string;
100
+ // cashPaymentAccountingCatalog:string;
101
+ // }
105
102
 
106
103
  /**
107
104
  * Definicion de campos y tipos recibidos en la respuesta GET / de ventas
108
105
  */
109
- export class Invoices{
106
+ export class InvoicesGET{
110
107
  id:string;
111
108
  authorization:string;
112
109
  sequence:string;
@@ -121,7 +118,7 @@ export class Invoices{
121
118
  /**
122
119
  * Definicion de campos de invoice para GET/:id
123
120
  */
124
- export class Invoice{
121
+ export class InvoiceGID{
125
122
  id:string;
126
123
  authorization:string;
127
124
  sequence:string;
@@ -201,67 +198,65 @@ export class InvoicesTotals{
201
198
  style:string[]
202
199
  }
203
200
 
204
- /**
205
- * Definición de estructura de campos y tipos para reporte general de ventas
206
- */
207
- export class InvoiceGeneralReport{
208
- company:CompanyForReports;
209
- name:string;
210
- invoices:InvoicesForReport
211
- }
212
-
213
- /**
214
- * DEfinición de estructura y tipos para xampos de reporte de lsuitado de ventas
215
- */
216
- export class InvoicesReportList{
217
- company:CompanyForReports;
218
- name:string;
219
- total:string;
220
- invoices:InvociesForReportList[]
221
- }
222
-
223
- /**
224
- * Definición de estrucutra y tipos para el campo invoices de reporte de listado de ventas
225
- */
226
- export class InvociesForReportList{
227
- customer:string;
228
- code:string;
229
- date:string;
230
- documentNumber:string;
231
- total:string;
232
- status:InvoicesStatuses;
233
- }
201
+ // /**
202
+ // * Definición de estructura de campos y tipos para reporte general de ventas
203
+ // */
204
+ // export class InvoiceGeneralReport{
205
+ // company:CompanyForReports;
206
+ // name:string;
207
+ // invoices:InvoicesForReport
208
+ // }
234
209
 
235
- /**
236
- * Definición de estructura y tipos para el campo invoices en reporte general de ventas
237
- */
238
- export class InvoicesForReport{
239
- name:string;
240
- code:string;
241
- count:number;
242
- documents:DocumentsForGeneralReport;
243
- vGravadaTotal:number;
244
- vNSujetaTotal:number;
245
- vExentaTotal:number;
246
- ivaTotal:number;
247
- ivaRetenidoTotal:number;
248
- totalTotal:number;
249
- }
210
+ // /**
211
+ // * DEfinición de estructura y tipos para xampos de reporte de lsuitado de ventas
212
+ // */
213
+ // export class InvoicesReportList{
214
+ // company:CompanyForReports;
215
+ // name:string;
216
+ // total:string;
217
+ // invoices:InvociesForReportList[]
218
+ // }
250
219
 
251
- /**
252
- * Definición de estructura y tipos para el campo documents en reporte general de ventas
253
- */
254
- export class DocumentsForGeneralReport{
255
- customer:string
256
- date:string
257
- documentNumber:string
258
- status:InvoicesStatuses
259
- vGravada:string
260
- vNSujeta:string
261
- vExenta:string
262
- iva:string
263
- ivaRetenido:string
264
- total:string
265
- }
220
+ // /**
221
+ // * Definición de estrucutra y tipos para el campo invoices de reporte de listado de ventas
222
+ // */
223
+ // export class InvociesForReportList{
224
+ // customer:string;
225
+ // code:string;
226
+ // date:string;
227
+ // documentNumber:string;
228
+ // total:string;
229
+ // status:InvoicesStatuses;
230
+ // }
266
231
 
232
+ // /**
233
+ // * Definición de estructura y tipos para el campo invoices en reporte general de ventas
234
+ // */
235
+ // export class InvoicesForReport{
236
+ // name:string;
237
+ // code:string;
238
+ // count:number;
239
+ // documents:DocumentsForGeneralReport;
240
+ // vGravadaTotal:number;
241
+ // vNSujetaTotal:number;
242
+ // vExentaTotal:number;
243
+ // ivaTotal:number;
244
+ // ivaRetenidoTotal:number;
245
+ // totalTotal:number;
246
+ // }
267
247
 
248
+ // /**
249
+ // * Definición de estructura y tipos para el campo documents en reporte general de ventas
250
+ // */
251
+ // export class DocumentsForGeneralReport{
252
+ // customer:string
253
+ // date:string
254
+ // documentNumber:string
255
+ // status:InvoicesStatuses
256
+ // vGravada:string
257
+ // vNSujeta:string
258
+ // vExenta:string
259
+ // iva:string
260
+ // ivaRetenido:string
261
+ // total:string
262
+ // }
@@ -1,89 +1,87 @@
1
- import { City, CompanyForReports, Country, State, } from "../AuxiliarTypes";
2
- import { ContactInfo, CustomerBranches, CustomerTaxerType, CustomerTypeNatural, PersonType } from "../Customers";
3
- import { SellingTypes } from "../Services";
1
+ // import { City, CompanyForReports, Country, State, } from "../AuxiliarTypes";
2
+ // import { ContactInfo, CustomerBranches, CustomerTaxerType, CustomerTypeNatural, PersonType } from "../Customers";
3
+ // import { SellingTypes } from "../Services";
4
4
 
5
- /**
6
- * Definición de estructura de respuesta de GET/
7
- */
8
- export class Providers{
9
- id:string;
10
- name:string;
11
- shortName:string
12
- isProvider:boolean;
13
- isCustomer:boolean;
14
- dui:string | null;
15
- nrc:string | null;
16
- nit:string | null;
17
- giro:string | null;
18
- isActiveCustomer:boolean;
19
- isActiveProvider:boolean;
20
- isUsedCustomer:boolean;
21
- isUsedProvider:boolean;
22
- createdAt:string;
23
- personType:PersonType;
24
- customerTypeNatural:CustomerTypeNatural | null;
25
- }
5
+ // /**
6
+ // * Definición de estructura de respuesta de GET/
7
+ // */
8
+ // export class Providers{
9
+ // id:string;
10
+ // name:string;
11
+ // shortName:string
12
+ // isProvider:boolean;
13
+ // isCustomer:boolean;
14
+ // dui:string | null;
15
+ // nrc:string | null;
16
+ // nit:string | null;
17
+ // giro:string | null;
18
+ // isActiveCustomer:boolean;
19
+ // isActiveProvider:boolean;
20
+ // isUsedCustomer:boolean;
21
+ // isUsedProvider:boolean;
22
+ // createdAt:string;
23
+ // personType:PersonType;
24
+ // customerTypeNatural:CustomerTypeNatural | null;
25
+ // }
26
26
 
27
- /**
28
- * Definición de estructura de respuesta de GET/:id de provider
29
- */
30
- export class Provider{
31
- id:string;
32
- name:string;
33
- shortName:string
34
- isProvider:boolean;
35
- isCustomer:boolean;
36
- dui:string | null;
37
- nrc:string | null;
38
- nit:string | null;
39
- giro:string | null;
40
- isActiveCustomer:boolean;
41
- isActiveProvider:boolean;
42
- isUsedCustomer:boolean;
43
- isUsedProvider:boolean;
44
- createdAt:string;
45
- personType:PersonType;
46
- customerTypeNatural:CustomerTypeNatural | null;
47
- customerType: SellingTypes;
48
- customerTaxerType:CustomerTaxerType;
49
- customerBranches: CustomerBranches;
50
- }
27
+ // /**
28
+ // * Definición de estructura de respuesta de GET/:id de provider
29
+ // */
30
+ // export class Provider{
31
+ // id:string;
32
+ // name:string;
33
+ // shortName:string
34
+ // isProvider:boolean;
35
+ // isCustomer:boolean;
36
+ // dui:string | null;
37
+ // nrc:string | null;
38
+ // nit:string | null;
39
+ // giro:string | null;
40
+ // isActiveCustomer:boolean;
41
+ // isActiveProvider:boolean;
42
+ // isUsedCustomer:boolean;
43
+ // isUsedProvider:boolean;
44
+ // createdAt:string;
45
+ // personType:PersonType;
46
+ // customerTypeNatural:CustomerTypeNatural | null;
47
+ // customerType: SellingTypes;
48
+ // customerTaxerType:CustomerTaxerType;
49
+ // customerBranches: CustomerBranches;
50
+ // }
51
51
 
52
- export class ProviderBranches{
53
- id:string;
54
- name:string;
55
- contactName:string;
56
- contactInfo:ContactInfo;
57
- address1:string;
58
- address2:string | null;
59
- createdAt:string;
60
- default:boolean;
61
- country:Country;
62
- state:State;
63
- city:City;
64
- }
52
+ // export class ProviderBranches{
53
+ // id:string;
54
+ // name:string;
55
+ // contactName:string;
56
+ // contactInfo:ContactInfo;
57
+ // address1:string;
58
+ // address2:string | null;
59
+ // createdAt:string;
60
+ // default:boolean;
61
+ // country:Country;
62
+ // state:State;
63
+ // city:City;
64
+ // }
65
65
 
66
+ // /**
67
+ // * Definición de estrructura de campos para reporte general de clientes
68
+ // */
69
+ // export class ProvidersReportGeneral{
70
+ // company:CompanyForReports;
71
+ // name:string;
72
+ // providers: Providers
73
+ // }
66
74
 
67
- /**
68
- * Definición de estrructura de campos para reporte general de clientes
69
- */
70
- export class ProvidersReportGeneral{
71
- company:CompanyForReports;
72
- name:string;
73
- providers: Providers
74
- }
75
+ // /**
76
+ // * Definición de estrructura de campos para reporte general de clientes
77
+ // */
78
+ // export class ProviderReport{
79
+ // company:CompanyForReports;
80
+ // name:string;
81
+ // provider: Provider
82
+ // }
75
83
 
76
- /**
77
- * Definición de estrructura de campos para reporte general de clientes
78
- */
79
- export class ProviderReport{
80
- company:CompanyForReports;
81
- name:string;
82
- provider: Provider
83
- }
84
-
85
-
86
- export class AccountingProviderIntegration{
87
- accountingCatalogPurchases:string;
88
- accountingCatalogCXP:string;
89
- }
84
+ // export class AccountingProviderIntegration{
85
+ // accountingCatalogPurchases:string;
86
+ // accountingCatalogCXP:string;
87
+ // }
package/Services/index.ts CHANGED
@@ -1,9 +1,9 @@
1
- import { CompanyForReports } from "../AuxiliarTypes";
1
+ import { CompanyForReports, SellingTypes } from "../AuxiliarTypes";
2
2
 
3
3
  /**
4
4
  * Definicion de tipo para la respuesta de services GET /
5
5
  */
6
- export class ServicesGET {
6
+ export type ServicesGET = {
7
7
  id: string;
8
8
  name: string;
9
9
  cost: number;
@@ -15,37 +15,34 @@ export class ServicesGET {
15
15
  active: boolean;
16
16
  cratedAt: string;
17
17
  isUsed: boolean;
18
- }
18
+ };
19
19
 
20
20
  /**
21
21
  * Definidicion para la respuesta de services GET /:id
22
22
  */
23
- export class ServicesGID extends ServicesGET {}
23
+ export interface ServicesGID extends ServicesGET {}
24
24
 
25
25
  /**
26
26
  * Defnición de respuesta recibida en GET/report/general de services
27
27
  */
28
28
 
29
- export class ServicesGeneralReport {
29
+ export type ServicesGeneralReport = {
30
30
  company: CompanyForReports;
31
31
  services: ServicesGET[];
32
- }
32
+ };
33
33
 
34
34
  /**
35
35
  * Definición de estructura de campos del obejeto sellynTypes
36
36
  */
37
- export class ServicesSellingTypes {
38
- id: string;
39
- name: string;
40
- includeInServices?: boolean;
41
- includeInCustomers?: boolean;
42
- isGravada: boolean;
43
- }
37
+ export interface ServicesSellingTypes extends SellingTypes {
38
+ includeInServices: boolean;
39
+ includeInCustomers: boolean;
40
+ };
44
41
 
45
42
  /**
46
43
  * Definición de estrucutra para la respuesta de GET/:id/integrations/:shortName y GET/integration para services
47
44
  */
48
45
 
49
- export class AccountingServicesIntegrations {
46
+ export type AccountingServicesIntegrations = {
50
47
  accountingCatalogSales: string;
51
- }
48
+ };
package/index.d.ts CHANGED
@@ -1,8 +1,15 @@
1
- import * as Accounting from "./Accounting";
2
- import * as AuxiliarTypes from "./AuxiliarTypes";
1
+ // import * as Accounting from "./Accounting";
2
+ // import * as AuxiliarTypes from "./AuxiliarTypes";
3
3
  import * as Customers from "./Customers";
4
- import * as Invoices from "./Invoices";
5
- import * as Providers from "./Providers";
4
+ // import * as Invoices from "./Invoices";
5
+ // import * as Providers from "./Providers";
6
6
  import * as Services from "./Services";
7
7
 
8
- export { Accounting, AuxiliarTypes, Customers, Invoices, Providers, Services };
8
+ export {
9
+ // Accounting,
10
+ // AuxiliarTypes,
11
+ Customers,
12
+ // Invoices,
13
+ // Providers,
14
+ Services,
15
+ };
package/package.json CHANGED
@@ -1,9 +1,18 @@
1
1
  {
2
2
  "name": "@openbox/shared-types",
3
- "version": "0.1.1",
3
+ "version": "0.1.6",
4
4
  "description": "Shared Types for Openbox Cloud. ",
5
5
  "types": "index.d.ts",
6
6
  "main": "index.d.ts",
7
7
  "author": "Openbox Developer Team",
8
- "license": "ISC"
8
+ "license": "ISC",
9
+ "dependencies": {},
10
+ "devDependencies": {
11
+ "@typescript-eslint/eslint-plugin": "^5.4.0",
12
+ "@typescript-eslint/parser": "^5.4.0",
13
+ "eslint": "^8.2.0",
14
+ "eslint-config-prettier": "^8.3.0",
15
+ "eslint-plugin-prettier": "^4.0.0",
16
+ "prettier": "^2.4.1"
17
+ }
9
18
  }