@openbox/shared-types 0.2.60 → 0.2.62

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.
Files changed (35) hide show
  1. package/lib/invoices/Invoices/CreateMany/Request.d.ts +2 -2
  2. package/lib/invoices/Invoices/CreateMany/Response.d.ts +1 -1
  3. package/lib/invoices/Invoices/CreateReserved/Request.d.ts +1 -1
  4. package/lib/invoices/Invoices/CreateReserved/Response.d.ts +1 -1
  5. package/lib/invoices/Invoices/CreateSingle/Request.d.ts +1 -1
  6. package/lib/invoices/Invoices/CreateSingle/Response.d.ts +1 -1
  7. package/lib/invoices/Invoices/DeleteMany/Response.d.ts +1 -1
  8. package/lib/invoices/Invoices/DeleteSingle/Response.d.ts +1 -1
  9. package/lib/invoices/Invoices/GetDocumentTypes/Response.d.ts +1 -1
  10. package/lib/invoices/Invoices/GetMany/Request.d.ts +1 -1
  11. package/lib/invoices/Invoices/GetMany/Response.d.ts +5 -7
  12. package/lib/invoices/Invoices/GetSingle/Response.d.ts +1 -1
  13. package/lib/invoices/Invoices/UpdateMany/Request.d.ts +2 -2
  14. package/lib/invoices/Invoices/UpdateMany/Response.d.ts +1 -1
  15. package/lib/invoices/Invoices/UpdateSingle/Request.d.ts +2 -2
  16. package/lib/invoices/Invoices/UpdateSingle/Response.d.ts +1 -1
  17. package/lib/invoices/Invoices/invoices.interfaces.d.ts +22 -29
  18. package/package.json +1 -1
  19. package/src/invoices/Invoices/CreateMany/Request.ts +2 -2
  20. package/src/invoices/Invoices/CreateMany/Response.ts +1 -1
  21. package/src/invoices/Invoices/CreateReserved/Request.ts +1 -1
  22. package/src/invoices/Invoices/CreateReserved/Response.ts +1 -1
  23. package/src/invoices/Invoices/CreateSingle/Request.ts +1 -1
  24. package/src/invoices/Invoices/CreateSingle/Response.ts +1 -1
  25. package/src/invoices/Invoices/DeleteMany/Response.ts +1 -1
  26. package/src/invoices/Invoices/DeleteSingle/Response.ts +1 -1
  27. package/src/invoices/Invoices/GetDocumentTypes/Response.ts +1 -1
  28. package/src/invoices/Invoices/GetMany/Request.ts +1 -1
  29. package/src/invoices/Invoices/GetMany/Response.ts +3 -11
  30. package/src/invoices/Invoices/GetSingle/Response.ts +1 -1
  31. package/src/invoices/Invoices/UpdateMany/Request.ts +2 -2
  32. package/src/invoices/Invoices/UpdateMany/Response.ts +1 -1
  33. package/src/invoices/Invoices/UpdateSingle/Request.ts +2 -3
  34. package/src/invoices/Invoices/UpdateSingle/Response.ts +1 -1
  35. package/src/invoices/Invoices/invoices.interfaces.ts +30 -33
@@ -1,2 +1,2 @@
1
- import { InvoicesInvoicesCreateSingleRequest } from '../CreateSingle/Request';
2
- export type InvoicesInvoicesCreateManyRequest = InvoicesInvoicesCreateSingleRequest[];
1
+ import { InvoicesCreateSingleRequest } from '../CreateSingle/Request';
2
+ export type InvoicesCreateManyRequest = InvoicesCreateSingleRequest[];
@@ -1,2 +1,2 @@
1
1
  import { ManyResponse } from '../../../interfaces';
2
- export type InvoicesInvoicesCreateManyResponse = ManyResponse;
2
+ export type InvoicesCreateManyResponse = ManyResponse;
@@ -1,5 +1,5 @@
1
1
  import { InvoiceHeader } from '../CreateSingle/Request';
2
- export type InvoicesInvoicesCreateSingleReservedRequest = Pick<InvoiceHeader, 'document' | 'authorization'> & {
2
+ export type InvoicesCreateSingleReservedRequest = Pick<InvoiceHeader, 'document' | 'authorization'> & {
3
3
  sequenceFrom: number;
4
4
  sequenceTo: number;
5
5
  };
@@ -1,2 +1,2 @@
1
1
  import { SingleResponse } from '../../../interfaces';
2
- export type InvoicesInvoicesCreateSingleReservedResponse = SingleResponse;
2
+ export type InvoicesCreateSingleReservedResponse = SingleResponse;
@@ -37,7 +37,7 @@ export type InvoiceDetails = {
37
37
  vGravada: number;
38
38
  service: string;
39
39
  };
40
- export type InvoicesInvoicesCreateSingleRequest = {
40
+ export type InvoicesCreateSingleRequest = {
41
41
  header: InvoiceHeader;
42
42
  totals: InvoiceTotals;
43
43
  details: InvoiceDetails[];
@@ -1,2 +1,2 @@
1
1
  import { SingleResponse } from '../../../interfaces';
2
- export type InvoicesInvoicesCreateSingleResponse = SingleResponse;
2
+ export type InvoicesCreateSingleResponse = SingleResponse;
@@ -1,2 +1,2 @@
1
1
  import { ManyResponse } from '../../../interfaces';
2
- export type InvoicesInvoicesDeleteManyResponse = ManyResponse;
2
+ export type InvoicesDeleteManyResponse = ManyResponse;
@@ -1,2 +1,2 @@
1
1
  import { SingleResponse } from '../../../interfaces';
2
- export type InvoicesInvoicesDeleteSingleResponse = SingleResponse;
2
+ export type InvoicesDeleteSingleResponse = SingleResponse;
@@ -1,2 +1,2 @@
1
1
  import { InvoicesDocumentTypes } from '../../DocumentTypes/invoices.document-types.interface';
2
- export type InvoicesInvoicesGetManyDocumentTypesResponse = InvoicesDocumentTypes[];
2
+ export type InvoicesGetManyDocumentTypesResponse = InvoicesDocumentTypes[];
@@ -1,5 +1,5 @@
1
1
  import { GetManyRequest } from '../../../interfaces';
2
- export type InvoicesInvoicesGetManyRequest = GetManyRequest & {
2
+ export type InvoicesGetManyRequest = GetManyRequest & {
3
3
  documentType?: number;
4
4
  customer?: string;
5
5
  seller?: string;
@@ -1,9 +1,7 @@
1
1
  import { GetManyResponse } from '../../../interfaces';
2
- import { Invoices } from '../invoices.interfaces';
3
- export type InvoicesInvoicesGetManyResponse = GetManyResponse & {
4
- data: Pick<Invoices, 'id' | 'authorization' | 'sequence' | 'invoiceDate' | 'customerName' | 'ventaTotal' | 'document'> & {
5
- isLastInvoice: boolean;
6
- invoiceRawDate: string;
7
- createdAt: string;
8
- }[];
2
+ import { InvoicesResponse } from '../invoices.interfaces';
3
+ export type InvoicesGetManyResponse = GetManyResponse & {
4
+ data: Array<InvoicesResponse & {
5
+ index: number;
6
+ }>;
9
7
  };
@@ -1,2 +1,2 @@
1
1
  import { Invoices } from '../invoices.interfaces';
2
- export type InvoicesInvoicesGetSingleRequest = Invoices;
2
+ export type InvoicesGetSingleRequest = Invoices;
@@ -1,2 +1,2 @@
1
- import { InvoicesInvoicesUpdateSingleRequest } from '../UpdateSingle/Request';
2
- export type InvoicesInvoicesUpdateManyRequest = InvoicesInvoicesUpdateSingleRequest[];
1
+ import { InvoicesUpdateSingleRequest } from '../UpdateSingle/Request';
2
+ export type InvoicesUpdateManyRequest = InvoicesUpdateSingleRequest[];
@@ -1,2 +1,2 @@
1
1
  import { ManyResponse } from '../../../interfaces';
2
- export type InvoicesInvoicesUpdateManyResponse = ManyResponse;
2
+ export type InvoicesUpdateManyResponse = ManyResponse;
@@ -1,2 +1,2 @@
1
- import { InvoicesInvoicesCreateSingleReservedRequest } from '../CreateReserved/Request';
2
- export type InvoicesInvoicesUpdateSingleRequest = Partial<InvoicesInvoicesCreateSingleReservedRequest>;
1
+ import { InvoicesCreateSingleReservedRequest } from '../CreateReserved/Request';
2
+ export type InvoicesUpdateSingleRequest = Partial<InvoicesCreateSingleReservedRequest>;
@@ -1,2 +1,2 @@
1
1
  import { SingleResponse } from '../../../interfaces';
2
- export type InvoicesInvoicesUpdateSingleResponse = SingleResponse;
2
+ export type InvoicesUpdateSingleResponse = SingleResponse;
@@ -1,20 +1,25 @@
1
1
  import { CustomersBranchesResponse } from '../../customers/Branches/customers.branches.types';
2
2
  import { CustomersResponse } from '../../customers/Customers/customers.types';
3
- import { SystemNaturalTypesGetSingleResponse } from '../../system/NaturalTypes/GetSingle/Response';
4
- import { SystemPersonTypeGetSingleResponse } from '../../system/PersonTypes/GetSingle/Response';
5
- import { InvoicesCalculationsDetailsResponse, InvoicesCalculationsTotalsResponse } from '../Calculation';
6
- import { InvoicesDocumentTypes } from '../DocumentTypes/invoices.document-types.interface';
7
- import { InvoicesDocumentsResponse } from '../Documents/invoices.documents.interfaces';
3
+ import { SystemNaturalTypesResponse } from '../../system/NaturalTypes/system.natural-types.types';
4
+ import { SystemPersonTypesResponse } from '../../system/PersonTypes/system.person-types.types';
5
+ import { InvoicesDocumentTypesResponse } from '../DocumentTypes/invoices.document-types.interface';
8
6
  import { InvoicesPaymentConditionsResponse } from '../PaymentConditions/invoices.payment-conditions.interface';
9
7
  import { InvoicesSellersResponse } from '../Sellers/invoices.sellers.interface';
10
- import { InvoicesStatusesResponse } from '../Statuses/invoices.statuses.interfaces';
11
- import { InvoicesZones } from '../Zones/invoices.zones.interfaces';
12
- export type InvoicesDetails = InvoicesCalculationsDetailsResponse;
13
- export type InvoicesTotals = InvoicesCalculationsTotalsResponse;
8
+ import { InvoicesZonesResponse } from '../Zones/invoices.zones.interfaces';
14
9
  export type Invoices = {
15
10
  id: string;
16
11
  authorization: string;
17
12
  sequence: string;
13
+ customerName: string;
14
+ customerAddress1: string;
15
+ customerAddress2: string;
16
+ customerCountry: string;
17
+ customerState: string;
18
+ customerCity: string;
19
+ customerDui: string;
20
+ customerNit: string;
21
+ customerNrc: string;
22
+ customerGiro: string;
18
23
  sum: number;
19
24
  iva: number;
20
25
  ivaPercibido: number;
@@ -26,32 +31,20 @@ export type Invoices = {
26
31
  ventasNoSujetas: number;
27
32
  ventaTotal: number;
28
33
  ventaTotalText: string;
29
- customerName: string;
30
- customerAddress1: string;
31
- customerAddress2: string;
32
- customerCountry: string;
33
- customerState: string;
34
- customerCity: string;
35
- customerDui: string;
36
- customerNit: string;
37
- customerNrc: string;
38
- customerGiro: string;
34
+ origin: string;
35
+ invoiceDate: string;
39
36
  paymentConditionName: string;
40
37
  sellerName: string;
41
38
  zoneName: string;
42
39
  createEntry: boolean;
43
- createdAt: string;
44
- invoiceDate: string;
40
+ NCDTotal: boolean;
45
41
  customerBranch: CustomersBranchesResponse;
46
42
  customer: CustomersResponse;
47
43
  invoicesPaymentsCondition: InvoicesPaymentConditionsResponse;
48
44
  invoicesSeller: InvoicesSellersResponse;
49
- invoicesZone: InvoicesZones;
50
- status: InvoicesStatusesResponse;
51
- personType: SystemPersonTypeGetSingleResponse;
52
- customerTypeNatural: SystemNaturalTypesGetSingleResponse;
53
- documentType: InvoicesDocumentTypes;
54
- document: InvoicesDocumentsResponse;
55
- details: InvoicesDetails[];
56
- totals: InvoicesTotals[];
45
+ invoicesZone: InvoicesZonesResponse;
46
+ personType: SystemPersonTypesResponse;
47
+ customerTypeNatural: SystemNaturalTypesResponse;
48
+ documentType: InvoicesDocumentTypesResponse;
57
49
  };
50
+ export type InvoicesResponse = Invoices;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openbox/shared-types",
3
- "version": "0.2.60",
3
+ "version": "0.2.62",
4
4
  "description": "Shared Types for Openbox Cloud. ",
5
5
  "types": "lib/index.d.js",
6
6
  "main": "lib/index.js",
@@ -1,3 +1,3 @@
1
- import { InvoicesInvoicesCreateSingleRequest } from '../CreateSingle/Request'
1
+ import { InvoicesCreateSingleRequest } from '../CreateSingle/Request'
2
2
 
3
- export type InvoicesInvoicesCreateManyRequest = InvoicesInvoicesCreateSingleRequest[]
3
+ export type InvoicesCreateManyRequest = InvoicesCreateSingleRequest[]
@@ -1,3 +1,3 @@
1
1
  import { ManyResponse } from '../../../interfaces'
2
2
 
3
- export type InvoicesInvoicesCreateManyResponse = ManyResponse
3
+ export type InvoicesCreateManyResponse = ManyResponse
@@ -1,6 +1,6 @@
1
1
  import { InvoiceHeader } from '../CreateSingle/Request'
2
2
 
3
- export type InvoicesInvoicesCreateSingleReservedRequest = Pick<
3
+ export type InvoicesCreateSingleReservedRequest = Pick<
4
4
  InvoiceHeader,
5
5
  'document' | 'authorization'
6
6
  > & {
@@ -1,3 +1,3 @@
1
1
  import { SingleResponse } from '../../../interfaces'
2
2
 
3
- export type InvoicesInvoicesCreateSingleReservedResponse = SingleResponse
3
+ export type InvoicesCreateSingleReservedResponse = SingleResponse
@@ -40,7 +40,7 @@ export type InvoiceDetails = {
40
40
  service: string
41
41
  }
42
42
 
43
- export type InvoicesInvoicesCreateSingleRequest = {
43
+ export type InvoicesCreateSingleRequest = {
44
44
  header: InvoiceHeader
45
45
  totals: InvoiceTotals
46
46
  details: InvoiceDetails[]
@@ -1,3 +1,3 @@
1
1
  import { SingleResponse } from '../../../interfaces'
2
2
 
3
- export type InvoicesInvoicesCreateSingleResponse = SingleResponse
3
+ export type InvoicesCreateSingleResponse = SingleResponse
@@ -1,3 +1,3 @@
1
1
  import { ManyResponse } from '../../../interfaces'
2
2
 
3
- export type InvoicesInvoicesDeleteManyResponse = ManyResponse
3
+ export type InvoicesDeleteManyResponse = ManyResponse
@@ -1,3 +1,3 @@
1
1
  import { SingleResponse } from '../../../interfaces'
2
2
 
3
- export type InvoicesInvoicesDeleteSingleResponse = SingleResponse
3
+ export type InvoicesDeleteSingleResponse = SingleResponse
@@ -1,3 +1,3 @@
1
1
  import { InvoicesDocumentTypes } from '../../DocumentTypes/invoices.document-types.interface'
2
2
 
3
- export type InvoicesInvoicesGetManyDocumentTypesResponse = InvoicesDocumentTypes[]
3
+ export type InvoicesGetManyDocumentTypesResponse = InvoicesDocumentTypes[]
@@ -1,6 +1,6 @@
1
1
  import { GetManyRequest } from '../../../interfaces'
2
2
 
3
- export type InvoicesInvoicesGetManyRequest = GetManyRequest & {
3
+ export type InvoicesGetManyRequest = GetManyRequest & {
4
4
  documentType?: number
5
5
  customer?: string
6
6
  seller?: string
@@ -1,14 +1,6 @@
1
1
  import { GetManyResponse } from '../../../interfaces'
2
- import { Invoices } from '../invoices.interfaces'
2
+ import { InvoicesResponse } from '../invoices.interfaces'
3
3
 
4
- export type InvoicesInvoicesGetManyResponse = GetManyResponse & {
5
- data: Pick<
6
- Invoices,
7
- 'id' | 'authorization' | 'sequence' | 'invoiceDate' | 'customerName' | 'ventaTotal' | 'document'
8
- > &
9
- {
10
- isLastInvoice: boolean
11
- invoiceRawDate: string
12
- createdAt: string
13
- }[]
4
+ export type InvoicesGetManyResponse = GetManyResponse & {
5
+ data: Array<InvoicesResponse & { index: number }>
14
6
  }
@@ -1,3 +1,3 @@
1
1
  import { Invoices } from '../invoices.interfaces'
2
2
 
3
- export type InvoicesInvoicesGetSingleRequest = Invoices
3
+ export type InvoicesGetSingleRequest = Invoices
@@ -1,3 +1,3 @@
1
- import { InvoicesInvoicesUpdateSingleRequest } from '../UpdateSingle/Request'
1
+ import { InvoicesUpdateSingleRequest } from '../UpdateSingle/Request'
2
2
 
3
- export type InvoicesInvoicesUpdateManyRequest = InvoicesInvoicesUpdateSingleRequest[]
3
+ export type InvoicesUpdateManyRequest = InvoicesUpdateSingleRequest[]
@@ -1,3 +1,3 @@
1
1
  import { ManyResponse } from '../../../interfaces'
2
2
 
3
- export type InvoicesInvoicesUpdateManyResponse = ManyResponse
3
+ export type InvoicesUpdateManyResponse = ManyResponse
@@ -1,4 +1,3 @@
1
- import { InvoicesInvoicesCreateSingleReservedRequest } from '../CreateReserved/Request'
1
+ import { InvoicesCreateSingleReservedRequest } from '../CreateReserved/Request'
2
2
 
3
- export type InvoicesInvoicesUpdateSingleRequest =
4
- Partial<InvoicesInvoicesCreateSingleReservedRequest>
3
+ export type InvoicesUpdateSingleRequest = Partial<InvoicesCreateSingleReservedRequest>
@@ -1,3 +1,3 @@
1
1
  import { SingleResponse } from '../../../interfaces'
2
2
 
3
- export type InvoicesInvoicesUpdateSingleResponse = SingleResponse
3
+ export type InvoicesUpdateSingleResponse = SingleResponse
@@ -1,25 +1,26 @@
1
1
  import { CustomersBranchesResponse } from '../../customers/Branches/customers.branches.types'
2
2
  import { CustomersResponse } from '../../customers/Customers/customers.types'
3
- import { SystemNaturalTypesGetSingleResponse } from '../../system/NaturalTypes/GetSingle/Response'
4
- import { SystemPersonTypeGetSingleResponse } from '../../system/PersonTypes/GetSingle/Response'
5
- import {
6
- InvoicesCalculationsDetailsResponse,
7
- InvoicesCalculationsTotalsResponse,
8
- } from '../Calculation'
9
- import { InvoicesDocumentTypes } from '../DocumentTypes/invoices.document-types.interface'
10
- import { InvoicesDocumentsResponse } from '../Documents/invoices.documents.interfaces'
3
+ import { SystemNaturalTypesResponse } from '../../system/NaturalTypes/system.natural-types.types'
4
+ import { SystemPersonTypesResponse } from '../../system/PersonTypes/system.person-types.types'
5
+ import { InvoicesDocumentTypesResponse } from '../DocumentTypes/invoices.document-types.interface'
11
6
  import { InvoicesPaymentConditionsResponse } from '../PaymentConditions/invoices.payment-conditions.interface'
12
7
  import { InvoicesSellersResponse } from '../Sellers/invoices.sellers.interface'
13
- import { InvoicesStatusesResponse } from '../Statuses/invoices.statuses.interfaces'
14
- import { InvoicesZones } from '../Zones/invoices.zones.interfaces'
15
-
16
- export type InvoicesDetails = InvoicesCalculationsDetailsResponse
17
- export type InvoicesTotals = InvoicesCalculationsTotalsResponse
8
+ import { InvoicesZonesResponse } from '../Zones/invoices.zones.interfaces'
18
9
 
19
10
  export type Invoices = {
20
11
  id: string
21
12
  authorization: string
22
13
  sequence: string
14
+ customerName: string
15
+ customerAddress1: string
16
+ customerAddress2: string
17
+ customerCountry: string
18
+ customerState: string
19
+ customerCity: string
20
+ customerDui: string
21
+ customerNit: string
22
+ customerNrc: string
23
+ customerGiro: string
23
24
  sum: number
24
25
  iva: number
25
26
  ivaPercibido: number
@@ -31,32 +32,28 @@ export type Invoices = {
31
32
  ventasNoSujetas: number
32
33
  ventaTotal: number
33
34
  ventaTotalText: string
34
- customerName: string
35
- customerAddress1: string
36
- customerAddress2: string
37
- customerCountry: string
38
- customerState: string
39
- customerCity: string
40
- customerDui: string
41
- customerNit: string
42
- customerNrc: string
43
- customerGiro: string
35
+ origin: string
36
+ invoiceDate: string
44
37
  paymentConditionName: string
45
38
  sellerName: string
46
39
  zoneName: string
47
40
  createEntry: boolean
48
- createdAt: string
49
- invoiceDate: string
41
+ NCDTotal: boolean
50
42
  customerBranch: CustomersBranchesResponse
51
43
  customer: CustomersResponse
52
44
  invoicesPaymentsCondition: InvoicesPaymentConditionsResponse
53
45
  invoicesSeller: InvoicesSellersResponse
54
- invoicesZone: InvoicesZones
55
- status: InvoicesStatusesResponse
56
- personType: SystemPersonTypeGetSingleResponse
57
- customerTypeNatural: SystemNaturalTypesGetSingleResponse
58
- documentType: InvoicesDocumentTypes
59
- document: InvoicesDocumentsResponse
60
- details: InvoicesDetails[]
61
- totals: InvoicesTotals[]
46
+ invoicesZone: InvoicesZonesResponse
47
+ // status: InvoicesStatusesEntity
48
+ personType: SystemPersonTypesResponse
49
+ customerTypeNatural: SystemNaturalTypesResponse
50
+ documentType: InvoicesDocumentTypesResponse
51
+ // invoiceDetails: InvoicesDetailsEntity[]
52
+ // echarges: Echarges
53
+ // accountingEntry: AccountingEntriesEntity
54
+ // relatedDocument: InvoicesEntity
55
+ // invoices: InvoicesEntity[]
56
+ // legalInstallments: LegalInstallmentsEntity[]
62
57
  }
58
+
59
+ export type InvoicesResponse = Invoices