@openbox/shared-types 0.2.56 → 0.2.57

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.
@@ -1,5 +1,5 @@
1
1
  import { GetManyResponse } from '../../../interfaces';
2
2
  import { CustomersBranchesResponse } from '../customers.branches.types';
3
3
  export type CustomersBranchesGetManyResponse = GetManyResponse & {
4
- data: Array<CustomersBranchesResponse>;
4
+ data: Array<Omit<CustomersBranchesResponse, 'branches'>>;
5
5
  };
@@ -11,9 +11,9 @@ export type CustomersBranches = {
11
11
  zipcode?: string;
12
12
  default?: boolean;
13
13
  customer: CustomersResponse;
14
- city: SystemCitiesResponse;
15
14
  country: SystemCountriesResponse;
16
15
  state: SystemStatesResponse;
16
+ city: SystemCitiesResponse;
17
17
  directory: SystemDirectoryResponse[];
18
18
  };
19
19
  export type CustomersBranchesRequest = Omit<CustomersBranches, 'id' | 'city' | 'country' | 'state' | 'customer' | 'directory'> & {
@@ -25,4 +25,4 @@ export type CustomersBranchesRequest = Omit<CustomersBranches, 'id' | 'city' | '
25
25
  email?: string;
26
26
  cellphone?: string;
27
27
  };
28
- export type CustomersBranchesResponse = CustomersBranches;
28
+ export type CustomersBranchesResponse = Omit<CustomersBranches, 'customer'>;
@@ -1,7 +1,7 @@
1
1
  import { GetManyResponse } from '../../../interfaces';
2
- import { CustomersResponse } from '../customers.types';
2
+ import { CustomersGetSingleResponse } from '../GetSingle/Response';
3
3
  export type CustomersGetManyResponse = GetManyResponse & {
4
- data: Array<CustomersResponse & {
4
+ data: Array<Omit<CustomersGetSingleResponse, 'branches'> & {
5
5
  index: number;
6
6
  }>;
7
7
  };
@@ -1,2 +1,5 @@
1
+ import { CustomersBranchesResponse } from '../../Branches/customers.branches.types';
1
2
  import { CustomersResponse } from '../customers.types';
2
- export type CustomersGetSingleResponse = CustomersResponse;
3
+ export type CustomersGetSingleResponse = CustomersResponse & {
4
+ branches: CustomersBranchesResponse[];
5
+ };
@@ -4,7 +4,6 @@ import { SystemPersonTypeGetSingleResponse } from '../../system/PersonTypes/GetS
4
4
  import { SystemSellingTypeGetSingleResponse } from '../../system/SellingTypes/GetSingle/Response';
5
5
  import { SystemTaxerTypesGetSingleResponse } from '../../system/TaxerTypes/GetSingle/Response';
6
6
  import { CustomersBranchesCreateSingleRequest } from '../Branches';
7
- import { CustomersBranchesResponse } from '../Branches/customers.branches.types';
8
7
  export type Customers = {
9
8
  id: string;
10
9
  name?: string;
@@ -31,14 +30,13 @@ export type Customers = {
31
30
  personType: SystemPersonTypeGetSingleResponse;
32
31
  personTypeNatural: SystemNaturalTypesGetSingleResponse;
33
32
  taxerType: SystemTaxerTypesGetSingleResponse;
34
- branch?: CustomersBranchesResponse;
35
33
  directory: SystemDirectoryResponse[];
36
34
  };
37
- export type CustomersRequest = Omit<Customers, 'id' | 'taxerType' | 'personType' | 'type' | 'personTypeNatural' | 'branch' | 'directory'> & {
35
+ export type CustomersRequest = Omit<Customers, 'id' | 'taxerType' | 'personType' | 'type' | 'personTypeNatural' | 'directory'> & {
38
36
  type: number;
39
37
  personType: number;
40
- taxerType?: number;
41
38
  personTypeNatural?: number;
39
+ taxerType?: number;
42
40
  branch: CustomersBranchesCreateSingleRequest;
43
41
  };
44
42
  export type CustomersResponse = Customers;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openbox/shared-types",
3
- "version": "0.2.56",
3
+ "version": "0.2.57",
4
4
  "description": "Shared Types for Openbox Cloud. ",
5
5
  "types": "lib/index.d.js",
6
6
  "main": "lib/index.js",
@@ -2,5 +2,5 @@ import { GetManyResponse } from '../../../interfaces'
2
2
  import { CustomersBranchesResponse } from '../customers.branches.types'
3
3
 
4
4
  export type CustomersBranchesGetManyResponse = GetManyResponse & {
5
- data: Array<CustomersBranchesResponse>
5
+ data: Array<Omit<CustomersBranchesResponse, 'branches'>>
6
6
  }
@@ -4,11 +4,6 @@ import { SystemDirectoryResponse } from '../../system/Directory/system.directory
4
4
  import { SystemStatesResponse } from '../../system/States/system.states.types'
5
5
  import { CustomersResponse } from '../Customers/customers.types'
6
6
 
7
- // export type CustomerBranchesContactInfo = {
8
- // phones: Array<string>
9
- // emails: Array<string>
10
- // }
11
-
12
7
  export type CustomersBranches = {
13
8
  id: string
14
9
  name: string
@@ -17,9 +12,9 @@ export type CustomersBranches = {
17
12
  zipcode?: string
18
13
  default?: boolean
19
14
  customer: CustomersResponse
20
- city: SystemCitiesResponse
21
15
  country: SystemCountriesResponse
22
16
  state: SystemStatesResponse
17
+ city: SystemCitiesResponse
23
18
  directory: SystemDirectoryResponse[]
24
19
  }
25
20
 
@@ -35,4 +30,4 @@ export type CustomersBranchesRequest = Omit<
35
30
  email?: string
36
31
  cellphone?: string
37
32
  }
38
- export type CustomersBranchesResponse = CustomersBranches
33
+ export type CustomersBranchesResponse = Omit<CustomersBranches, 'customer'>
@@ -1,6 +1,6 @@
1
1
  import { GetManyResponse } from '../../../interfaces'
2
- import { CustomersResponse } from '../customers.types'
2
+ import { CustomersGetSingleResponse } from '../GetSingle/Response'
3
3
 
4
4
  export type CustomersGetManyResponse = GetManyResponse & {
5
- data: Array<CustomersResponse & { index: number }>
5
+ data: Array<Omit<CustomersGetSingleResponse, 'branches'> & { index: number }>
6
6
  }
@@ -1,3 +1,6 @@
1
+ import { CustomersBranchesResponse } from '../../Branches/customers.branches.types'
1
2
  import { CustomersResponse } from '../customers.types'
2
3
 
3
- export type CustomersGetSingleResponse = CustomersResponse
4
+ export type CustomersGetSingleResponse = CustomersResponse & {
5
+ branches: CustomersBranchesResponse[]
6
+ }
@@ -4,7 +4,6 @@ import { SystemPersonTypeGetSingleResponse } from '../../system/PersonTypes/GetS
4
4
  import { SystemSellingTypeGetSingleResponse } from '../../system/SellingTypes/GetSingle/Response'
5
5
  import { SystemTaxerTypesGetSingleResponse } from '../../system/TaxerTypes/GetSingle/Response'
6
6
  import { CustomersBranchesCreateSingleRequest } from '../Branches'
7
- import { CustomersBranchesResponse } from '../Branches/customers.branches.types'
8
7
 
9
8
  export type Customers = {
10
9
  id: string
@@ -32,17 +31,16 @@ export type Customers = {
32
31
  personType: SystemPersonTypeGetSingleResponse
33
32
  personTypeNatural: SystemNaturalTypesGetSingleResponse
34
33
  taxerType: SystemTaxerTypesGetSingleResponse
35
- branch?: CustomersBranchesResponse
36
34
  directory: SystemDirectoryResponse[]
37
35
  }
38
36
  export type CustomersRequest = Omit<
39
37
  Customers,
40
- 'id' | 'taxerType' | 'personType' | 'type' | 'personTypeNatural' | 'branch' | 'directory'
38
+ 'id' | 'taxerType' | 'personType' | 'type' | 'personTypeNatural' | 'directory'
41
39
  > & {
42
40
  type: number
43
41
  personType: number
44
- taxerType?: number
45
42
  personTypeNatural?: number
43
+ taxerType?: number
46
44
  branch: CustomersBranchesCreateSingleRequest
47
45
  }
48
46
  export type CustomersResponse = Customers