@openbox/shared-types 0.5.1 → 0.5.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.
- package/lib/invoices/Calculation/CalculateSingle/Request.d.ts +0 -8
- package/lib/invoices/Calculation/CalculateSingle/Response.d.ts +12 -32
- package/lib/invoices/invoices.enums.d.ts +0 -4
- package/lib/invoices/invoices.enums.js +1 -6
- package/lib/invoices/invoices.enums.js.map +1 -1
- package/lib/partners/V1/index.d.ts +1 -0
- package/lib/partners/V1/index.js +1 -0
- package/lib/partners/V1/index.js.map +1 -1
- package/lib/partners/V1/invoices/CreateSingle/Response.d.ts +22 -0
- package/lib/partners/V1/invoices/CreateSingle/Response.js +11 -0
- package/lib/partners/V1/invoices/CreateSingle/Response.js.map +1 -0
- package/lib/partners/V1/invoices/index.d.ts +1 -0
- package/lib/partners/V1/invoices/index.js +18 -0
- package/lib/partners/V1/invoices/index.js.map +1 -0
- package/package.json +1 -1
- package/src/invoices/Calculation/CalculateSingle/Request.ts +0 -10
- package/src/invoices/Calculation/CalculateSingle/Response.ts +11 -56
- package/src/invoices/invoices.enums.ts +0 -5
- package/src/partners/V1/index.ts +1 -0
- package/src/partners/V1/invoices/CreateSingle/Response.ts +24 -0
- package/src/partners/V1/invoices/index.ts +1 -0
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { InvoicesDiscountsTypesKeys } from '../../invoices.enums';
|
|
2
1
|
export type InvoicesCalculationsDetailsRequest = {
|
|
3
2
|
id?: string;
|
|
4
3
|
service: string;
|
|
@@ -10,15 +9,8 @@ export type InvoicesCalculationsDetailsRequest = {
|
|
|
10
9
|
incRenta10: boolean;
|
|
11
10
|
chargeDescription: string;
|
|
12
11
|
};
|
|
13
|
-
export type InvoicesCalculationsDiscountsRequest = {
|
|
14
|
-
id?: string;
|
|
15
|
-
type: InvoicesDiscountsTypesKeys;
|
|
16
|
-
quantity: number;
|
|
17
|
-
description: string;
|
|
18
|
-
};
|
|
19
12
|
export type InvoicesCalculationsCalculateSingleRequest = {
|
|
20
13
|
documentType: number;
|
|
21
14
|
customer: string;
|
|
22
15
|
details: InvoicesCalculationsDetailsRequest[];
|
|
23
|
-
discounts: InvoicesCalculationsDiscountsRequest[] | null;
|
|
24
16
|
};
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { InvoicesDiscountsTypesKeys } from '../../invoices.enums';
|
|
2
1
|
export type InvoicesCalculationsDetailsResponse = {
|
|
3
2
|
id?: string;
|
|
4
3
|
service: string;
|
|
@@ -23,18 +22,6 @@ export type InvoicesCalculationsDetailsResponse = {
|
|
|
23
22
|
vNoSujetaToShow: number;
|
|
24
23
|
vGravadaToShow: number;
|
|
25
24
|
};
|
|
26
|
-
export type InvoicesCalculationsDiscountsResponse = {
|
|
27
|
-
id?: string;
|
|
28
|
-
type: InvoicesDiscountsTypesKeys;
|
|
29
|
-
quantity: number;
|
|
30
|
-
description: string;
|
|
31
|
-
descuNoSuj: number;
|
|
32
|
-
descuExenta: number;
|
|
33
|
-
descuGravada: number;
|
|
34
|
-
descuNoSujToShow: number;
|
|
35
|
-
descuExentaToShow: number;
|
|
36
|
-
descuGravadaToShow: number;
|
|
37
|
-
};
|
|
38
25
|
export type InvoicesCalculationsTotalsItem = {
|
|
39
26
|
id: string;
|
|
40
27
|
name: string;
|
|
@@ -42,27 +29,20 @@ export type InvoicesCalculationsTotalsItem = {
|
|
|
42
29
|
amount: number;
|
|
43
30
|
style?: string[];
|
|
44
31
|
show: true | false;
|
|
45
|
-
type?: 'currency' | 'percentage';
|
|
46
32
|
};
|
|
47
|
-
export
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
reteRenta: InvoicesCalculationsTotalsItem;
|
|
60
|
-
montoTotalOperacion: InvoicesCalculationsTotalsItem;
|
|
61
|
-
totalIva: InvoicesCalculationsTotalsItem;
|
|
62
|
-
totalPagar: InvoicesCalculationsTotalsItem;
|
|
63
|
-
}
|
|
33
|
+
export type InvoicesCalculationsTotalsResponse = {
|
|
34
|
+
sum: InvoicesCalculationsTotalsItem;
|
|
35
|
+
iva: InvoicesCalculationsTotalsItem;
|
|
36
|
+
subtotal: InvoicesCalculationsTotalsItem;
|
|
37
|
+
ivaRetenido: InvoicesCalculationsTotalsItem;
|
|
38
|
+
ivaPercibido: InvoicesCalculationsTotalsItem;
|
|
39
|
+
renta5: InvoicesCalculationsTotalsItem;
|
|
40
|
+
renta10: InvoicesCalculationsTotalsItem;
|
|
41
|
+
ventasExentas: InvoicesCalculationsTotalsItem;
|
|
42
|
+
ventasNoSujetas: InvoicesCalculationsTotalsItem;
|
|
43
|
+
ventaTotal: InvoicesCalculationsTotalsItem;
|
|
44
|
+
};
|
|
64
45
|
export type InvoicesCalculationsCalculateSingleResponse = {
|
|
65
46
|
details: InvoicesCalculationsDetailsResponse[];
|
|
66
|
-
discounts: InvoicesCalculationsDiscountsResponse[];
|
|
67
47
|
totals: InvoicesCalculationsTotalsResponse;
|
|
68
48
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.InvoicesStatusesTypesEnum = exports.InvoicesDocumentTypesEnum = void 0;
|
|
4
4
|
var InvoicesDocumentTypesEnum;
|
|
5
5
|
(function (InvoicesDocumentTypesEnum) {
|
|
6
6
|
InvoicesDocumentTypesEnum[InvoicesDocumentTypesEnum["FCF"] = 1] = "FCF";
|
|
@@ -20,9 +20,4 @@ var InvoicesStatusesTypesEnum;
|
|
|
20
20
|
InvoicesStatusesTypesEnum[InvoicesStatusesTypesEnum["Presentada"] = 6] = "Presentada";
|
|
21
21
|
InvoicesStatusesTypesEnum[InvoicesStatusesTypesEnum["Contingencia"] = 7] = "Contingencia";
|
|
22
22
|
})(InvoicesStatusesTypesEnum = exports.InvoicesStatusesTypesEnum || (exports.InvoicesStatusesTypesEnum = {}));
|
|
23
|
-
var InvoicesDiscountsTypesKeys;
|
|
24
|
-
(function (InvoicesDiscountsTypesKeys) {
|
|
25
|
-
InvoicesDiscountsTypesKeys["AMOUNT_DISCOUNT"] = "AMOUNT_DISCOUNT";
|
|
26
|
-
InvoicesDiscountsTypesKeys["PERCENTAGE_DISCOUNT"] = "PERCENTAGE_DISCOUNT";
|
|
27
|
-
})(InvoicesDiscountsTypesKeys = exports.InvoicesDiscountsTypesKeys || (exports.InvoicesDiscountsTypesKeys = {}));
|
|
28
23
|
//# sourceMappingURL=invoices.enums.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"invoices.enums.js","sourceRoot":"","sources":["../../src/invoices/invoices.enums.ts"],"names":[],"mappings":";;;AAAA,IAAY,yBAOX;AAPD,WAAY,yBAAyB;IACnC,uEAAO,CAAA;IACP,uEAAO,CAAA;IACP,uEAAO,CAAA;IACP,qEAAM,CAAA;IACN,qEAAM,CAAA;IACN,qEAAM,CAAA;AACR,CAAC,EAPW,yBAAyB,GAAzB,iCAAyB,KAAzB,iCAAyB,QAOpC;AAED,IAAY,yBAQX;AARD,WAAY,yBAAyB;IACnC,+EAAW,CAAA;IACX,+EAAW,CAAA;IACX,+EAAW,CAAA;IACX,mFAAa,CAAA;IACb,6EAAU,CAAA;IACV,qFAAc,CAAA;IACd,yFAAgB,CAAA;AAClB,CAAC,EARW,yBAAyB,GAAzB,iCAAyB,KAAzB,iCAAyB,QAQpC
|
|
1
|
+
{"version":3,"file":"invoices.enums.js","sourceRoot":"","sources":["../../src/invoices/invoices.enums.ts"],"names":[],"mappings":";;;AAAA,IAAY,yBAOX;AAPD,WAAY,yBAAyB;IACnC,uEAAO,CAAA;IACP,uEAAO,CAAA;IACP,uEAAO,CAAA;IACP,qEAAM,CAAA;IACN,qEAAM,CAAA;IACN,qEAAM,CAAA;AACR,CAAC,EAPW,yBAAyB,GAAzB,iCAAyB,KAAzB,iCAAyB,QAOpC;AAED,IAAY,yBAQX;AARD,WAAY,yBAAyB;IACnC,+EAAW,CAAA;IACX,+EAAW,CAAA;IACX,+EAAW,CAAA;IACX,mFAAa,CAAA;IACb,6EAAU,CAAA;IACV,qFAAc,CAAA;IACd,yFAAgB,CAAA;AAClB,CAAC,EARW,yBAAyB,GAAzB,iCAAyB,KAAzB,iCAAyB,QAQpC"}
|
package/lib/partners/V1/index.js
CHANGED
|
@@ -15,4 +15,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./auth"), exports);
|
|
18
|
+
__exportStar(require("./invoices"), exports);
|
|
18
19
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/partners/V1/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,yCAAsB"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/partners/V1/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,yCAAsB;AACtB,6CAA0B"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export declare enum PartnersV1InvoicesCreateSingleResponseStatus {
|
|
2
|
+
EMITIDA = "EMITIDA",
|
|
3
|
+
PRESENTADA = "PRESENTADA",
|
|
4
|
+
ANULADA = "ANULADA",
|
|
5
|
+
CONTINGENCIA = "CONTINGENCIA"
|
|
6
|
+
}
|
|
7
|
+
export type PartnersV1InvoicesCreateSingleResponseHaciendaResponse = {
|
|
8
|
+
estado: string;
|
|
9
|
+
ambiente: '01' | '00';
|
|
10
|
+
observaciones: Array<string>;
|
|
11
|
+
selloRecibido: string;
|
|
12
|
+
descripcionMsg: string;
|
|
13
|
+
fhProcesamiento: string;
|
|
14
|
+
codigoGeneracion: string;
|
|
15
|
+
};
|
|
16
|
+
export type PartnersV1InvoicesCreateSingleResponse = {
|
|
17
|
+
id: string;
|
|
18
|
+
pdfURL: string;
|
|
19
|
+
jsonURL: string;
|
|
20
|
+
status: PartnersV1InvoicesCreateSingleResponseStatus;
|
|
21
|
+
haciendaReponse: PartnersV1InvoicesCreateSingleResponseHaciendaResponse;
|
|
22
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PartnersV1InvoicesCreateSingleResponseStatus = void 0;
|
|
4
|
+
var PartnersV1InvoicesCreateSingleResponseStatus;
|
|
5
|
+
(function (PartnersV1InvoicesCreateSingleResponseStatus) {
|
|
6
|
+
PartnersV1InvoicesCreateSingleResponseStatus["EMITIDA"] = "EMITIDA";
|
|
7
|
+
PartnersV1InvoicesCreateSingleResponseStatus["PRESENTADA"] = "PRESENTADA";
|
|
8
|
+
PartnersV1InvoicesCreateSingleResponseStatus["ANULADA"] = "ANULADA";
|
|
9
|
+
PartnersV1InvoicesCreateSingleResponseStatus["CONTINGENCIA"] = "CONTINGENCIA";
|
|
10
|
+
})(PartnersV1InvoicesCreateSingleResponseStatus = exports.PartnersV1InvoicesCreateSingleResponseStatus || (exports.PartnersV1InvoicesCreateSingleResponseStatus = {}));
|
|
11
|
+
//# sourceMappingURL=Response.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Response.js","sourceRoot":"","sources":["../../../../../src/partners/V1/invoices/CreateSingle/Response.ts"],"names":[],"mappings":";;;AAAA,IAAY,4CAKX;AALD,WAAY,4CAA4C;IACtD,mEAAmB,CAAA;IACnB,yEAAyB,CAAA;IACzB,mEAAmB,CAAA;IACnB,6EAA6B,CAAA;AAC/B,CAAC,EALW,4CAA4C,GAA5C,oDAA4C,KAA5C,oDAA4C,QAKvD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './CreateSingle/Response';
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./CreateSingle/Response"), exports);
|
|
18
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/partners/V1/invoices/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0DAAuC"}
|
package/package.json
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import { InvoicesDiscountsTypesKeys } from '../../invoices.enums'
|
|
2
|
-
|
|
3
1
|
export type InvoicesCalculationsDetailsRequest = {
|
|
4
2
|
id?: string
|
|
5
3
|
service: string
|
|
@@ -12,16 +10,8 @@ export type InvoicesCalculationsDetailsRequest = {
|
|
|
12
10
|
chargeDescription: string
|
|
13
11
|
}
|
|
14
12
|
|
|
15
|
-
export type InvoicesCalculationsDiscountsRequest = {
|
|
16
|
-
id?: string
|
|
17
|
-
type: InvoicesDiscountsTypesKeys
|
|
18
|
-
quantity: number
|
|
19
|
-
description: string
|
|
20
|
-
}
|
|
21
|
-
|
|
22
13
|
export type InvoicesCalculationsCalculateSingleRequest = {
|
|
23
14
|
documentType: number
|
|
24
15
|
customer: string
|
|
25
16
|
details: InvoicesCalculationsDetailsRequest[]
|
|
26
|
-
discounts: InvoicesCalculationsDiscountsRequest[] | null
|
|
27
17
|
}
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import { InvoicesDiscountsTypesKeys } from '../../invoices.enums'
|
|
2
|
-
|
|
3
1
|
export type InvoicesCalculationsDetailsResponse = {
|
|
4
2
|
// Returns the same information received
|
|
5
3
|
id?: string
|
|
@@ -30,24 +28,6 @@ export type InvoicesCalculationsDetailsResponse = {
|
|
|
30
28
|
vGravadaToShow: number
|
|
31
29
|
}
|
|
32
30
|
|
|
33
|
-
export type InvoicesCalculationsDiscountsResponse = {
|
|
34
|
-
// Returns the same information received
|
|
35
|
-
id?: string
|
|
36
|
-
type: InvoicesDiscountsTypesKeys
|
|
37
|
-
quantity: number
|
|
38
|
-
description: string
|
|
39
|
-
|
|
40
|
-
// returns the calculated information
|
|
41
|
-
descuNoSuj: number
|
|
42
|
-
descuExenta: number
|
|
43
|
-
descuGravada: number
|
|
44
|
-
|
|
45
|
-
// Returns values to show in discounts table
|
|
46
|
-
descuNoSujToShow: number
|
|
47
|
-
descuExentaToShow: number
|
|
48
|
-
descuGravadaToShow: number
|
|
49
|
-
}
|
|
50
|
-
|
|
51
31
|
export type InvoicesCalculationsTotalsItem = {
|
|
52
32
|
id: string
|
|
53
33
|
name: string
|
|
@@ -55,47 +35,22 @@ export type InvoicesCalculationsTotalsItem = {
|
|
|
55
35
|
amount: number
|
|
56
36
|
style?: string[]
|
|
57
37
|
show: true | false
|
|
58
|
-
type?: 'currency' | 'percentage'
|
|
59
38
|
}
|
|
60
39
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
// }
|
|
73
|
-
|
|
74
|
-
export interface InvoicesCalculationsTotalsResponse {
|
|
75
|
-
// Totales antes de impuestos
|
|
76
|
-
totalNoSuj: InvoicesCalculationsTotalsItem // ventasNoSujetas
|
|
77
|
-
totalExenta: InvoicesCalculationsTotalsItem // ventasExentas
|
|
78
|
-
totalGravada: InvoicesCalculationsTotalsItem
|
|
79
|
-
subTotalVentas: InvoicesCalculationsTotalsItem // sum
|
|
80
|
-
|
|
81
|
-
// Descuentos
|
|
82
|
-
descuNoSuj: InvoicesCalculationsTotalsItem
|
|
83
|
-
descuExenta: InvoicesCalculationsTotalsItem
|
|
84
|
-
descuGravada: InvoicesCalculationsTotalsItem
|
|
85
|
-
porcentajeDescuento: InvoicesCalculationsTotalsItem
|
|
86
|
-
totalDescu: InvoicesCalculationsTotalsItem
|
|
87
|
-
|
|
88
|
-
// Totales con impuestos
|
|
89
|
-
subTotal: InvoicesCalculationsTotalsItem // subtotal
|
|
90
|
-
ivaRete1: InvoicesCalculationsTotalsItem // ivaRetenido
|
|
91
|
-
reteRenta: InvoicesCalculationsTotalsItem
|
|
92
|
-
montoTotalOperacion: InvoicesCalculationsTotalsItem
|
|
93
|
-
totalIva: InvoicesCalculationsTotalsItem // iva
|
|
94
|
-
totalPagar: InvoicesCalculationsTotalsItem // ventaTotal
|
|
40
|
+
export type InvoicesCalculationsTotalsResponse = {
|
|
41
|
+
sum: InvoicesCalculationsTotalsItem
|
|
42
|
+
iva: InvoicesCalculationsTotalsItem
|
|
43
|
+
subtotal: InvoicesCalculationsTotalsItem
|
|
44
|
+
ivaRetenido: InvoicesCalculationsTotalsItem
|
|
45
|
+
ivaPercibido: InvoicesCalculationsTotalsItem
|
|
46
|
+
renta5: InvoicesCalculationsTotalsItem
|
|
47
|
+
renta10: InvoicesCalculationsTotalsItem
|
|
48
|
+
ventasExentas: InvoicesCalculationsTotalsItem
|
|
49
|
+
ventasNoSujetas: InvoicesCalculationsTotalsItem
|
|
50
|
+
ventaTotal: InvoicesCalculationsTotalsItem
|
|
95
51
|
}
|
|
96
52
|
|
|
97
53
|
export type InvoicesCalculationsCalculateSingleResponse = {
|
|
98
54
|
details: InvoicesCalculationsDetailsResponse[]
|
|
99
|
-
discounts: InvoicesCalculationsDiscountsResponse[]
|
|
100
55
|
totals: InvoicesCalculationsTotalsResponse
|
|
101
56
|
}
|
package/src/partners/V1/index.ts
CHANGED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export enum PartnersV1InvoicesCreateSingleResponseStatus {
|
|
2
|
+
EMITIDA = 'EMITIDA',
|
|
3
|
+
PRESENTADA = 'PRESENTADA',
|
|
4
|
+
ANULADA = 'ANULADA',
|
|
5
|
+
CONTINGENCIA = 'CONTINGENCIA',
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export type PartnersV1InvoicesCreateSingleResponseHaciendaResponse = {
|
|
9
|
+
estado: string
|
|
10
|
+
ambiente: '01' | '00'
|
|
11
|
+
observaciones: Array<string>
|
|
12
|
+
selloRecibido: string
|
|
13
|
+
descripcionMsg: string
|
|
14
|
+
fhProcesamiento: string
|
|
15
|
+
codigoGeneracion: string
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export type PartnersV1InvoicesCreateSingleResponse = {
|
|
19
|
+
id: string
|
|
20
|
+
pdfURL: string
|
|
21
|
+
jsonURL: string
|
|
22
|
+
status: PartnersV1InvoicesCreateSingleResponseStatus
|
|
23
|
+
haciendaReponse: PartnersV1InvoicesCreateSingleResponseHaciendaResponse
|
|
24
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './CreateSingle/Response'
|