@openbox/shared-types 0.1.6 → 0.1.8

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/.prettierrc CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "singleQuote": true,
3
- "trailingComma": "all",
3
+ "trailingComma": "none",
4
4
  "printWidth": 120
5
5
  }
@@ -0,0 +1,7 @@
1
+ class IManyServices {
2
+ ids: string[];
3
+ }
4
+
5
+ export default {
6
+ IManyServices
7
+ }
package/Services/index.ts CHANGED
@@ -1,48 +1,5 @@
1
- import { CompanyForReports, SellingTypes } from "../AuxiliarTypes";
1
+ import GetMany from "./GetMany";
2
2
 
3
- /**
4
- * Definicion de tipo para la respuesta de services GET /
5
- */
6
- export type ServicesGET = {
7
- id: string;
8
- name: string;
9
- cost: number;
10
- sellingType: ServicesSellingTypes;
11
- description: string;
12
- incIva: boolean;
13
- incRenta10: boolean;
14
- incRenta5: boolean;
15
- active: boolean;
16
- cratedAt: string;
17
- isUsed: boolean;
18
- };
19
-
20
- /**
21
- * Definidicion para la respuesta de services GET /:id
22
- */
23
- export interface ServicesGID extends ServicesGET {}
24
-
25
- /**
26
- * Defnición de respuesta recibida en GET/report/general de services
27
- */
28
-
29
- export type ServicesGeneralReport = {
30
- company: CompanyForReports;
31
- services: ServicesGET[];
32
- };
33
-
34
- /**
35
- * Definición de estructura de campos del obejeto sellynTypes
36
- */
37
- export interface ServicesSellingTypes extends SellingTypes {
38
- includeInServices: boolean;
39
- includeInCustomers: boolean;
40
- };
41
-
42
- /**
43
- * Definición de estrucutra para la respuesta de GET/:id/integrations/:shortName y GET/integration para services
44
- */
45
-
46
- export type AccountingServicesIntegrations = {
47
- accountingCatalogSales: string;
48
- };
3
+ export default{
4
+ GetMany
5
+ }
package/index.d.ts CHANGED
@@ -1,15 +1,5 @@
1
- // import * as Accounting from "./Accounting";
2
- // import * as AuxiliarTypes from "./AuxiliarTypes";
3
- import * as Customers from "./Customers";
4
- // import * as Invoices from "./Invoices";
5
- // import * as Providers from "./Providers";
6
1
  import * as Services from "./Services";
7
2
 
8
3
  export {
9
- // Accounting,
10
- // AuxiliarTypes,
11
- Customers,
12
- // Invoices,
13
- // Providers,
14
4
  Services,
15
5
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openbox/shared-types",
3
- "version": "0.1.6",
3
+ "version": "0.1.8",
4
4
  "description": "Shared Types for Openbox Cloud. ",
5
5
  "types": "index.d.ts",
6
6
  "main": "index.d.ts",
@@ -1,232 +0,0 @@
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,39 +0,0 @@
1
- /**
2
- * Definición de estructura de la respuesta del campo company para los reportes
3
- */
4
- export type CompanyForReports = {
5
- name: string;
6
- nit: string;
7
- nrc: string;
8
- };
9
-
10
- /**
11
- * Definición de structura de campos de country
12
- */
13
- export type Country = {
14
- id: number;
15
- name: string;
16
- }
17
- /**
18
- * Definición de structura de campos de state
19
- */
20
- export type State = {
21
- id: number;
22
- name: string;
23
- }
24
- /**
25
- * Definición de structura de campos de city
26
- */
27
- export type City = {
28
- id: number;
29
- name: string;
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,131 +0,0 @@
1
- import { City, CompanyForReports, Country, State } from "../AuxiliarTypes";
2
- import { SellingTypes } from "../AuxiliarTypes";
3
-
4
- /**
5
- * Definición de estructura de respuesta de GET/
6
- */
7
- export type CustomersGET = {
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;
24
- }
25
-
26
- /**
27
- * Definición de estructura de respuesta de GET/ GET/:id de customer
28
- */
29
- export type CustomerGID = {
30
- id:string;
31
- name:string;
32
- shortName:string
33
- isProvider:boolean;
34
- isCustomer:boolean;
35
- dui:string | null;
36
- nrc:string | null;
37
- nit:string | null;
38
- giro:string | null;
39
- isActiveCustomer:boolean;
40
- isActiveProvider:boolean;
41
- isUsedCustomer:boolean;
42
- isUsedProvider:boolean;
43
- createdAt:string;
44
- personType:PersonType;
45
- customerTypeNatural:CustomerTypeNatural | null;
46
- customerType: SellingTypes;
47
- customerTaxerType:CustomerTaxerType;
48
- branch: CustomerBranches;
49
- }
50
-
51
- type CustomerBranches = {
52
- id:string;
53
- name:string;
54
- contactName:string;
55
- contactInfo:ContactInfo;
56
- address1:string;
57
- address2:string | null;
58
- createdAt:string;
59
- default:boolean;
60
- country:Country;
61
- state:State;
62
- city:City;
63
- }
64
-
65
- /**
66
- * Definición de estructura de campos de customerTributary
67
- */
68
- type CustomerTributary = {
69
- dui:string;
70
- nit:string;
71
- nrc:string;
72
- giro:string;
73
- personType:PersonType;
74
- customerTaxerType:CustomerTaxerType;
75
- customerTypeNatural:CustomerTypeNatural | null;
76
- }
77
-
78
- /**
79
- * Definición de estrructura de campos para reporte general de clientes
80
- */
81
- type CustomersReportGeneral = {
82
- company:CompanyForReports;
83
- name:string;
84
- customers: CustomersGET
85
- }
86
-
87
- /**
88
- * Definición de estrructura de campos para reporte general de clientes
89
- */
90
- type CustomersReport = {
91
- company:CompanyForReports;
92
- name:string;
93
- customer: CustomerGID
94
- }
95
-
96
- type AccountingCustomerIntegration = {
97
- accountingCatalogSales:string;
98
- accountingCatalogCXC:string;
99
- }
100
-
101
- /**
102
- * Definición de estructura de personType
103
- */
104
- type PersonType = {
105
- id:number;
106
- name:string
107
- }
108
-
109
- /**
110
- * Definición de estructura de customerTypeNatural
111
- */
112
- type CustomerTypeNatural = {
113
- id:number;
114
- name:string
115
- }
116
-
117
- /**
118
- * Definición de estructura de customerTaxerType
119
- */
120
- type CustomerTaxerType = {
121
- id:number;
122
- name:string
123
- }
124
-
125
- /**
126
- * Definición de campos de contacInfo
127
- */
128
- type ContactInfo = {
129
- emails:string[];
130
- phones:string[];
131
- }
package/Invoices/index.ts DELETED
@@ -1,262 +0,0 @@
1
- import { CompanyForReports } from "../AuxiliarTypes";
2
- import { CustomerTypeNatural, PersonType } from "../Customers";
3
-
4
- /**
5
- * Definición de campos de invoicesZone
6
- */
7
- export class InvoicesZone{
8
- id:string;
9
- name:string;
10
- active:boolean;
11
- }
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
- // * 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
- // }
43
-
44
- /**
45
- * Definición de los campos de docuemntTypes
46
- */
47
- export class DocumentTypes{
48
- id:number;
49
- name:string;
50
- code:string;
51
- includeInTaxes:boolean;
52
- showForNonTaxers:boolean | null;
53
- }
54
-
55
- /**
56
- * Definición de campos y tipo de dato para paymentCondition
57
- */
58
- export class InvoicesPaymentConditions{
59
- id:string;
60
- name:string;
61
- active:boolean
62
- cashPayment:boolean
63
- }
64
-
65
- /**
66
- * Definición de campos para invoicesSeller
67
- */
68
- export class InvoicesSellers{
69
- id:string;
70
- name:string;
71
- active:boolean
72
- invoicesZone:InvoicesZone
73
- }
74
-
75
- /**
76
- * Definición de campos y tipos para estados de ventas
77
- */
78
- export class InvoicesStatuses{
79
- id:string;
80
- name:string;
81
- }
82
-
83
- // /**
84
- // * Definición de campos y tipos para recurrencias
85
- // */
86
- // export class InvoicesRecurrencies{
87
- // id:string;
88
- // name:string;
89
- // }
90
-
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
- // }
102
-
103
- /**
104
- * Definicion de campos y tipos recibidos en la respuesta GET / de ventas
105
- */
106
- export class InvoicesGET{
107
- id:string;
108
- authorization:string;
109
- sequence:string;
110
- invoiceDate:string;
111
- customerName:string;
112
- ventaTotal:string;
113
- documentType:DocumentTypes;
114
- status:InvoicesStatuses;
115
- invoiceRawDate:string;
116
- }
117
-
118
- /**
119
- * Definicion de campos de invoice para GET/:id
120
- */
121
- export class InvoiceGID{
122
- id:string;
123
- authorization:string;
124
- sequence:string;
125
- customerName:string;
126
- customerAddress1:string;
127
- customerAddress2:string;
128
- customerCountry:string;
129
- customerState:string;
130
- customerCity:string;
131
- customerDui:string;
132
- customerNit:string;
133
- customerNrc:string;
134
- customerGiro:string;
135
- sum:string;
136
- iva:string;
137
- ivaPercibido:string;
138
- renta5:string;
139
- renta10:string;
140
- subtotal:string;
141
- ivaRetenido:string;
142
- ventasExentas:string;
143
- ventasNoSujetas:string;
144
- ventaTotal:string;
145
- ventaTotalText:string;
146
- origin:string;
147
- createdAt:string;
148
- invoiceDate:string;
149
- paymentConditionName:string;
150
- sellerName:string;
151
- zoneName:string;
152
- createEntry:boolean;
153
- customer:InvoicesStatuses
154
- customerBranch:InvoicesStatuses;
155
- personType:PersonType;
156
- customerTypeNatural:CustomerTypeNatural
157
- documentType:DocumentTypes;
158
- invoicesPaymentsCondition:InvoicesPaymentConditions;
159
- invoicesSeller:InvoicesSellers;
160
- invoicesZone:InvoicesZone;
161
- status:InvoicesStatuses
162
- accountingEntry:string | null;
163
- invoiceRawDate:string | null;
164
- details:InvoiceDetails[];
165
- totals:InvoicesTotals[];
166
- }
167
-
168
- /**
169
- * Definicion de campos y tipos para detaisl
170
- */
171
- export class InvoiceDetails{
172
- service:string;
173
- quantity:number;
174
- unitPrice:number;
175
- totalIvaPrice:number;
176
- ivaPrice:number;
177
- incIva:boolean
178
- incRenta5:boolean
179
- incRenta10:boolean
180
- chargeDescription:string
181
- ventaPrice:number
182
- vNoSujeta:number
183
- vExenta:number
184
- vGravada:number
185
- sellingType:number
186
- renta10Price:number
187
- renta5Price:number
188
- price:number
189
- }
190
-
191
- /**
192
- * Definición de campos y tipos para invoicesTotals
193
- */
194
- export class InvoicesTotals{
195
- name:string;
196
- amount:number;
197
- show:boolean;
198
- style:string[]
199
- }
200
-
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
- // }
209
-
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
- // }
219
-
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
- // }
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
- // }
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,87 +0,0 @@
1
- // import { City, CompanyForReports, Country, State, } from "../AuxiliarTypes";
2
- // import { ContactInfo, CustomerBranches, CustomerTaxerType, CustomerTypeNatural, PersonType } from "../Customers";
3
- // import { SellingTypes } from "../Services";
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
- // }
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
- // }
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
- // }
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
- // }
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
- // }
83
-
84
- // export class AccountingProviderIntegration{
85
- // accountingCatalogPurchases:string;
86
- // accountingCatalogCXP:string;
87
- // }