@openbox/shared-types 0.3.13 → 0.3.15

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.
@@ -30,7 +30,7 @@ export type InvoicesCalculationsTotalsItem = {
30
30
  show: true | false;
31
31
  };
32
32
  export type InvoicesCalculationsTotalsResponse = {
33
- sumas: InvoicesCalculationsTotalsItem;
33
+ sum: InvoicesCalculationsTotalsItem;
34
34
  iva: InvoicesCalculationsTotalsItem;
35
35
  subtotal: InvoicesCalculationsTotalsItem;
36
36
  ivaRetenido: InvoicesCalculationsTotalsItem;
@@ -1,5 +1,5 @@
1
- import { InvoiceHeaderSection } from '../CreateSingle/Request';
2
- export type InvoicesCreateSingleReservedRequest = Pick<InvoiceHeaderSection, 'document' | 'authorization'> & {
1
+ import { InvoicesCreateSingleHeader } from '../CreateSingle/Request';
2
+ export type InvoicesCreateSingleReservedRequest = Pick<InvoicesCreateSingleHeader, 'document' | 'authorization'> & {
3
3
  sequenceFrom: number;
4
4
  sequenceTo: number;
5
5
  };
@@ -1,44 +1,46 @@
1
- export type InvoiceHeaderSection = {
1
+ export type InvoicesCreateSingleHeader = {
2
+ document: string;
3
+ authorization: string;
4
+ sequence: number;
5
+ invoiceDate: string;
2
6
  customer: string;
3
7
  customerBranch: string;
4
- invoicesSeller: string;
5
8
  invoicesPaymentsCondition: string;
6
- invoiceDate: string;
7
- sequence: number;
8
- document: string;
9
- authorization: string;
9
+ invoicesSeller: string;
10
10
  };
11
- export type InvoiceTotalsSection = {
11
+ export type InvoicesCreateSingleTotals = {
12
12
  sum: number;
13
13
  iva: number;
14
14
  subtotal: number;
15
15
  ivaRetenido: number;
16
+ ivaPercibido: number;
16
17
  renta5: number;
17
18
  renta10: number;
18
- ivaPercibido: number;
19
19
  ventasExentas: number;
20
20
  ventasNoSujetas: number;
21
21
  ventaTotal: number;
22
- ventaTotalText: string;
23
22
  };
24
- export type InvoiceDetailsSection = {
23
+ export type InvoicesCreateSingleDetail = {
24
+ service: string;
25
25
  quantity: number;
26
- unitPrice: number;
27
26
  chargeDescription: string;
27
+ price: number;
28
28
  incIva: boolean;
29
29
  incRenta5: boolean;
30
30
  incRenta10: boolean;
31
- ventaPrice: number;
31
+ unitPrice: number;
32
32
  ivaPrice: number;
33
- renta5Price: number;
34
- renta10Price: number;
33
+ ventaPrice: number;
35
34
  vNoSujeta: number;
36
35
  vExenta: number;
37
36
  vGravada: number;
38
- service: string;
37
+ totalIvaPrice: number;
38
+ rentaPrice5: number;
39
+ rentaPrice10?: number;
40
+ sellingType: number;
39
41
  };
40
42
  export type InvoicesCreateSingleRequest = {
41
- header: InvoiceHeaderSection;
42
- totals: InvoiceTotalsSection;
43
- details: InvoiceDetailsSection[];
43
+ header: InvoicesCreateSingleHeader;
44
+ totals: InvoicesCreateSingleTotals;
45
+ details: InvoicesCreateSingleDetail[];
44
46
  };
@@ -1,2 +1,12 @@
1
- import { InvoicesCreateSingleReservedRequest } from '../CreateReserved/Request';
2
- export type InvoicesUpdateSingleRequest = Partial<InvoicesCreateSingleReservedRequest>;
1
+ import { InvoicesCreateSingleDetail, InvoicesCreateSingleHeader, InvoicesCreateSingleTotals } from '../CreateSingle/Request';
2
+ export type InvoicesUpdateSingleHeader = Omit<InvoicesCreateSingleHeader, 'document' | 'authorization' | 'sequence'>;
3
+ export type InvoicesUpdateSingleTotals = InvoicesCreateSingleTotals;
4
+ export type InvoicesUpdateSingleDetail = InvoicesCreateSingleDetail & {
5
+ id: string;
6
+ action: 'create' | 'update' | 'delete';
7
+ };
8
+ export type InvoicesUpdateSingleRequest = {
9
+ header: InvoicesUpdateSingleHeader;
10
+ totals: InvoicesUpdateSingleTotals;
11
+ details: InvoicesUpdateSingleDetail[];
12
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openbox/shared-types",
3
- "version": "0.3.13",
3
+ "version": "0.3.15",
4
4
  "description": "Shared Types for Openbox Cloud. ",
5
5
  "types": "lib/index.d.js",
6
6
  "main": "lib/index.js",
@@ -37,7 +37,7 @@ export type InvoicesCalculationsTotalsItem = {
37
37
  }
38
38
 
39
39
  export type InvoicesCalculationsTotalsResponse = {
40
- sumas: InvoicesCalculationsTotalsItem
40
+ sum: InvoicesCalculationsTotalsItem
41
41
  iva: InvoicesCalculationsTotalsItem
42
42
  subtotal: InvoicesCalculationsTotalsItem
43
43
  ivaRetenido: InvoicesCalculationsTotalsItem
@@ -1,7 +1,7 @@
1
- import { InvoiceHeaderSection } from '../CreateSingle/Request'
1
+ import { InvoicesCreateSingleHeader } from '../CreateSingle/Request'
2
2
 
3
3
  export type InvoicesCreateSingleReservedRequest = Pick<
4
- InvoiceHeaderSection,
4
+ InvoicesCreateSingleHeader,
5
5
  'document' | 'authorization'
6
6
  > & {
7
7
  sequenceFrom: number
@@ -1,47 +1,52 @@
1
- export type InvoiceHeaderSection = {
1
+ export type InvoicesCreateSingleHeader = {
2
+ document: string
3
+ authorization: string
4
+ sequence: number
5
+ invoiceDate: string
2
6
  customer: string
3
7
  customerBranch: string
4
- invoicesSeller: string
5
8
  invoicesPaymentsCondition: string
6
- invoiceDate: string
7
- sequence: number
8
- document: string
9
- authorization: string
9
+ invoicesSeller: string
10
10
  }
11
11
 
12
- export type InvoiceTotalsSection = {
12
+ export type InvoicesCreateSingleTotals = {
13
13
  sum: number
14
14
  iva: number
15
15
  subtotal: number
16
16
  ivaRetenido: number
17
+ ivaPercibido: number
17
18
  renta5: number
18
19
  renta10: number
19
- ivaPercibido: number
20
20
  ventasExentas: number
21
21
  ventasNoSujetas: number
22
22
  ventaTotal: number
23
- ventaTotalText: string
24
23
  }
25
24
 
26
- export type InvoiceDetailsSection = {
25
+ export type InvoicesCreateSingleDetail = {
26
+ // Basic values
27
+ service: string
27
28
  quantity: number
28
- unitPrice: number
29
29
  chargeDescription: string
30
+ price: number
30
31
  incIva: boolean
31
32
  incRenta5: boolean
32
33
  incRenta10: boolean
33
- ventaPrice: number
34
+
35
+ // Calculated values
36
+ unitPrice: number
34
37
  ivaPrice: number
35
- renta5Price: number
36
- renta10Price: number
38
+ ventaPrice: number
37
39
  vNoSujeta: number
38
40
  vExenta: number
39
41
  vGravada: number
40
- service: string
42
+ totalIvaPrice: number
43
+ rentaPrice5: number
44
+ rentaPrice10?: number
45
+ sellingType: number
41
46
  }
42
47
 
43
48
  export type InvoicesCreateSingleRequest = {
44
- header: InvoiceHeaderSection
45
- totals: InvoiceTotalsSection
46
- details: InvoiceDetailsSection[]
49
+ header: InvoicesCreateSingleHeader
50
+ totals: InvoicesCreateSingleTotals
51
+ details: InvoicesCreateSingleDetail[]
47
52
  }
@@ -1,3 +1,23 @@
1
- import { InvoicesCreateSingleReservedRequest } from '../CreateReserved/Request'
1
+ import {
2
+ InvoicesCreateSingleDetail,
3
+ InvoicesCreateSingleHeader,
4
+ InvoicesCreateSingleTotals,
5
+ } from '../CreateSingle/Request'
2
6
 
3
- export type InvoicesUpdateSingleRequest = Partial<InvoicesCreateSingleReservedRequest>
7
+ export type InvoicesUpdateSingleHeader = Omit<
8
+ InvoicesCreateSingleHeader,
9
+ 'document' | 'authorization' | 'sequence'
10
+ >
11
+
12
+ export type InvoicesUpdateSingleTotals = InvoicesCreateSingleTotals
13
+
14
+ export type InvoicesUpdateSingleDetail = InvoicesCreateSingleDetail & {
15
+ id: string
16
+ action: 'create' | 'update' | 'delete'
17
+ }
18
+
19
+ export type InvoicesUpdateSingleRequest = {
20
+ header: InvoicesUpdateSingleHeader
21
+ totals: InvoicesUpdateSingleTotals
22
+ details: InvoicesUpdateSingleDetail[]
23
+ }