@experteam-mx/ngx-services 18.6.0 → 18.7.0

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/esm2022/lib/apis/api-billing-pa.service.mjs +76 -0
  2. package/esm2022/lib/apis/api-composition.service.mjs +45 -0
  3. package/esm2022/lib/apis/models/api-billing-pa.interfaces.mjs +2 -0
  4. package/esm2022/lib/apis/models/api-billing-pa.types.mjs +2 -0
  5. package/esm2022/lib/apis/models/api-companies.interfaces.mjs +1 -1
  6. package/esm2022/lib/apis/models/api-composition.interfaces.mjs +2 -0
  7. package/esm2022/lib/apis/models/api-composition.types.mjs +2 -0
  8. package/esm2022/lib/apis/models/api-invoices.interfaces.mjs +1 -1
  9. package/esm2022/lib/apis/models/api-invoices.types.mjs +1 -1
  10. package/esm2022/lib/apis/models/api-reports.interfaces.mjs +1 -1
  11. package/esm2022/lib/apis/models/api-reports.types.mjs +1 -1
  12. package/esm2022/lib/apis/models/api-security.interfaces.mjs +1 -1
  13. package/esm2022/lib/apis/models/api-security.types.mjs +1 -1
  14. package/esm2022/lib/apis/models/api-shipments.enums.mjs +8 -0
  15. package/esm2022/lib/ngx-services.models.mjs +1 -1
  16. package/esm2022/public-api.mjs +8 -2
  17. package/fesm2022/experteam-mx-ngx-services.mjs +114 -2
  18. package/fesm2022/experteam-mx-ngx-services.mjs.map +1 -1
  19. package/lib/apis/api-billing-pa.service.d.ts +47 -0
  20. package/lib/apis/api-composition.service.d.ts +27 -0
  21. package/lib/apis/models/api-billing-pa.interfaces.d.ts +26 -0
  22. package/lib/apis/models/api-billing-pa.types.d.ts +16 -0
  23. package/lib/apis/models/api-companies.interfaces.d.ts +36 -30
  24. package/lib/apis/models/api-composition.interfaces.d.ts +289 -0
  25. package/lib/apis/models/api-composition.types.d.ts +4 -0
  26. package/lib/apis/models/api-invoices.interfaces.d.ts +1 -3
  27. package/lib/apis/models/api-invoices.types.d.ts +15 -13
  28. package/lib/apis/models/api-reports.interfaces.d.ts +3 -3
  29. package/lib/apis/models/api-reports.types.d.ts +2 -2
  30. package/lib/apis/models/api-security.interfaces.d.ts +17 -13
  31. package/lib/apis/models/api-security.types.d.ts +2 -17
  32. package/lib/apis/models/api-shipments.enums.d.ts +6 -0
  33. package/lib/ngx-services.models.d.ts +2 -0
  34. package/package.json +1 -1
  35. package/public-api.d.ts +7 -1
@@ -0,0 +1,47 @@
1
+ import { Environment } from '../ngx-services.models';
2
+ import { HttpClient } from '@angular/common/http';
3
+ import { QueryParams } from './models/api.models';
4
+ import { Observable } from 'rxjs';
5
+ import { BillingPaCustomerOut, DistrictsOut, ParishesOut, ProvincesOut } from './models/api-billing-pa.types';
6
+ import * as i0 from "@angular/core";
7
+ export declare class ApiBillingPaService {
8
+ private environments;
9
+ private http;
10
+ constructor(environments: Environment, http: HttpClient);
11
+ /**
12
+ * Retrieves the URL for the Billing Pa API from the environment configurations.
13
+ *
14
+ * @return {string} The URL of the Billing Pa API.
15
+ */
16
+ get url(): string;
17
+ /**
18
+ * Retrieves a list of districts based on query parameters.
19
+ *
20
+ * @param {QueryParams} params - Query parameters for filtering the districts.
21
+ * @returns {Observable<DistrictsOut>} The list of districts.
22
+ */
23
+ getDistricts(params: QueryParams): Observable<DistrictsOut>;
24
+ /**
25
+ * Retrieves a list of parishes based on query parameters.
26
+ *
27
+ * @param {QueryParams} params - Query parameters for filtering the parishes.
28
+ * @returns {Observable<ParishesOut>} The list of parishes.
29
+ */
30
+ getParishes(params: QueryParams): Observable<ParishesOut>;
31
+ /**
32
+ * Retrieves a list of provinces based on query parameters.
33
+ *
34
+ * @param {QueryParams} params - Query parameters for filtering the provinces.
35
+ * @returns {Observable<ProvincesOut>} The list of provinces.
36
+ */
37
+ getProvinces(params: QueryParams): Observable<ProvincesOut>;
38
+ /**
39
+ * Retrieves the details of a customer based on query parameters.
40
+ *
41
+ * @param {QueryParams} params - Query parameters for get customer.
42
+ * @return {Observable<BillingPaCustomerOut>} An observable that emits customer data.
43
+ */
44
+ getValidateCustomer(params: QueryParams): Observable<BillingPaCustomerOut>;
45
+ static ɵfac: i0.ɵɵFactoryDeclaration<ApiBillingPaService, never>;
46
+ static ɵprov: i0.ɵɵInjectableDeclaration<ApiBillingPaService>;
47
+ }
@@ -0,0 +1,27 @@
1
+ import { HttpClient } from '@angular/common/http';
2
+ import { Environment } from '../ngx-services.models';
3
+ import { Observable } from 'rxjs';
4
+ import { CookieService } from 'ngx-cookie-service';
5
+ import { ShipmentOut } from './models/api-composition.types';
6
+ import * as i0 from "@angular/core";
7
+ export declare class ApiCompositionService {
8
+ private environments;
9
+ private cookie;
10
+ private http;
11
+ constructor(environments: Environment, cookie: CookieService, http: HttpClient);
12
+ /**
13
+ * Retrieves the API security URL from the environment configuration.
14
+ *
15
+ * @return {string} The API security URL.
16
+ */
17
+ get url(): string;
18
+ /**
19
+ * Retrieves shipment details based on the provided shipment ID.
20
+ *
21
+ * @param {number} id - The unique identifier of the shipment to retrieve.
22
+ * @return {Observable<ShipmentOut>} An observable that emits the details of the shipment.
23
+ */
24
+ getShipment(id: number): Observable<ShipmentOut>;
25
+ static ɵfac: i0.ɵɵFactoryDeclaration<ApiCompositionService, never>;
26
+ static ɵprov: i0.ɵɵInjectableDeclaration<ApiCompositionService>;
27
+ }
@@ -0,0 +1,26 @@
1
+ import { LaravelModel } from './api.models';
2
+ export interface BillingPaCustomer {
3
+ document_id: number;
4
+ name: string;
5
+ number: string;
6
+ type_ruc: number;
7
+ type_ruc_code: string;
8
+ verification_code: string;
9
+ type_rec: string;
10
+ identification_type_id: number;
11
+ }
12
+ export interface District extends LaravelModel {
13
+ code: string;
14
+ name: string;
15
+ province_id: number;
16
+ }
17
+ export interface Parish extends LaravelModel {
18
+ code: string;
19
+ name: string;
20
+ district_id: number;
21
+ province_id: number;
22
+ }
23
+ export interface Province extends LaravelModel {
24
+ code: string;
25
+ name: string;
26
+ }
@@ -0,0 +1,16 @@
1
+ import { BillingPaCustomer, District, Parish, Province } from './api-billing-pa.interfaces';
2
+ export type DistrictsOut = {
3
+ total: number;
4
+ districts: District[];
5
+ };
6
+ export type BillingPaCustomerOut = {
7
+ customer: BillingPaCustomer;
8
+ };
9
+ export type ParishesOut = {
10
+ total: number;
11
+ parishes: Parish[];
12
+ };
13
+ export type ProvincesOut = {
14
+ total: number;
15
+ provinces: Province[];
16
+ };
@@ -148,45 +148,51 @@ export interface Installation extends LaravelModel {
148
148
  system: System;
149
149
  }
150
150
  export interface Location extends LaravelModel {
151
- name: string;
152
- contact_name: string;
153
- email: string;
154
- facility_code: string;
155
- location_code: string;
156
- type: string;
157
- state_name: string;
158
- state_id: number;
159
- state_code: string;
160
- city_name: string;
161
- zip_code: string;
162
- county_name: string;
151
+ accounts: Account[];
163
152
  address1: string;
164
153
  address2: string;
165
154
  address3: string;
166
- service_area_code: string;
167
- iata_code: string;
168
- phone_code: string;
169
- phone_number: string;
170
- gmt_offset: string;
155
+ billing_code: string | null;
156
+ city_name: string;
157
+ commission_account: string | null;
158
+ company_country: CompanyCountry;
171
159
  company_country_id: number;
172
- country_zone_id: number;
173
- country_region_id: number;
174
- management_area_id: number;
160
+ contact_name: string | null;
161
+ country_region: null;
162
+ country_region_id: number | null;
163
+ country_zone: null;
164
+ country_zone_id: number | null;
165
+ county_name: string;
166
+ default_account_id: number | null;
167
+ email: string | null;
168
+ etools_auto_billing_enabled: boolean;
169
+ extra_fields: {
170
+ [key: string]: string | number | boolean | null;
171
+ };
172
+ facility_code: string;
173
+ facility_id: number;
174
+ gmt_offset: string;
175
175
  google_maps_id: string;
176
- route_number: string;
176
+ iata_code: string;
177
+ is_occurs: boolean;
178
+ location_code: string | null;
177
179
  locker_enabled: boolean;
180
+ management_area: null;
181
+ management_area_id: number | null;
182
+ name: string;
183
+ phone_code: string;
184
+ phone_number: string;
178
185
  queue_manager_enabled: boolean;
179
- commission_account: string;
186
+ route_number: string;
187
+ service_area_code: string;
180
188
  service_point_id: string;
181
- is_occurs: boolean;
182
- default_account_id: number;
183
- extra_fields: {
184
- [key: string]: string;
185
- };
186
- facility_id: number;
187
- accounts: Account[];
188
- company_country: CompanyCountry;
189
189
  state: State;
190
+ state_code: string | null;
191
+ state_id: number;
192
+ state_name: string;
193
+ supervisor: Employee;
194
+ type: string;
195
+ zip_code: string;
190
196
  }
191
197
  export interface LocationEmployee extends LaravelModel {
192
198
  location_id: number;
@@ -0,0 +1,289 @@
1
+ import { ActiveLessSymfonyModel, SymfonyModel } from './api.models';
2
+ import { CustomerType } from './api-shipments.enums';
3
+ export interface ShipmentComposition extends SymfonyModel {
4
+ currencyCode: string;
5
+ extraCharges: ExtraChargeComposition[];
6
+ globalProductCode: string;
7
+ globalProductName: string;
8
+ localProductCode: string;
9
+ localProductName: string;
10
+ trackingNumber: string;
11
+ contentDescription: string;
12
+ realWeight: number;
13
+ piecesNumber: number;
14
+ productSubtotal: number;
15
+ productTax: number;
16
+ productTotal: number;
17
+ declaredValue: number;
18
+ insuredValue: number;
19
+ accountNumber: string;
20
+ userId: number;
21
+ installationId: number;
22
+ companyCountryId: number;
23
+ productId: number;
24
+ countryReferenceCurrencyId: number;
25
+ commercialExchangeRate: number;
26
+ ibsExchangeRate: number;
27
+ shipmentStatusId: number;
28
+ shipmentAddresses: ShipmentAddresses[];
29
+ shipmentPieces: ShipmentPieces[];
30
+ shipmentCompanyCountryExtraCharges: ShipmentCompanyCountryExtraCharges[];
31
+ shipmentGsop: ShipmentGsop;
32
+ additionalData: AdditionalData;
33
+ transactionId: string;
34
+ requiresPayment: boolean;
35
+ originServiceAreaCode: string;
36
+ originFacilityCode: string;
37
+ destinationServiceAreaCode: string;
38
+ destinationFacilityCode: string;
39
+ productTaxes: string[];
40
+ isInspected: boolean;
41
+ extraFields: {
42
+ [key: string]: string | number | boolean;
43
+ };
44
+ shipmentContentTypeId: number;
45
+ commercialInvoice: CommercialInvoice;
46
+ shipmentScopeId: number;
47
+ shipmentGroupId: number;
48
+ product: string[];
49
+ declaredCurrency: string;
50
+ insuredCurrency: string;
51
+ deliveryDateTime: string;
52
+ date: string;
53
+ promotionCode: string;
54
+ priceOverrideApproverId: number;
55
+ priceOverrideReasonId: number;
56
+ customs: Customs;
57
+ exportReasonId: number;
58
+ exportReason: string[];
59
+ shipmentBookPickup: ShipmentBookPickup;
60
+ questionId: number;
61
+ isInsured: boolean;
62
+ itnNumber: string;
63
+ einNumber: string;
64
+ otherAccountNumber: string;
65
+ dutiesAndTaxesAccountNumber: string;
66
+ discountId: string;
67
+ discountReference: string;
68
+ totalPublishedValue: number;
69
+ totalPartnerAccountValue: number;
70
+ isMarketingConsent: boolean;
71
+ isTermCondition: boolean;
72
+ isDocument: boolean;
73
+ isCash: boolean;
74
+ isPriceOverride: boolean;
75
+ isProforma: boolean;
76
+ isPromotionCode: boolean;
77
+ isRetailRate: boolean;
78
+ isOtherOrigin: boolean;
79
+ isOccurs: boolean;
80
+ isDutiesAndTaxes: boolean;
81
+ }
82
+ export interface ExtraChargeComposition {
83
+ globalServiceCode: string;
84
+ localServiceCode: string;
85
+ globalServiceName: string;
86
+ localServiceName: string;
87
+ subtotal: number;
88
+ tax: number;
89
+ total: number;
90
+ taxes: Tax[];
91
+ }
92
+ export interface Tax {
93
+ code: string;
94
+ percent: number;
95
+ baseAmount: number;
96
+ amount: number;
97
+ }
98
+ export interface ShipmentAddresses extends SymfonyModel {
99
+ index: number;
100
+ identificationTypeId: number;
101
+ identificationNumber: string;
102
+ companyName: string;
103
+ fullName: string;
104
+ email: string;
105
+ phoneCode: string;
106
+ phoneNumber: string;
107
+ postalCode: string;
108
+ stateCode: string;
109
+ countyName: string;
110
+ cityName: string;
111
+ addressLine1: string;
112
+ addressLine2: string;
113
+ addressLine3: string;
114
+ countryId: number;
115
+ identificationType: IdentificationTypeComposition;
116
+ roleType: CustomerType;
117
+ }
118
+ export interface IdentificationTypeComposition extends SymfonyModel {
119
+ name: string;
120
+ companyCountryId: number;
121
+ }
122
+ export interface ShipmentPieces extends ActiveLessSymfonyModel {
123
+ number: number;
124
+ height: number;
125
+ length: number;
126
+ width: number;
127
+ realWeight: number;
128
+ volumetricWeight: number;
129
+ dataIdentifier: string;
130
+ trackingNumber: string;
131
+ licensePlateBarCode: string;
132
+ shipmentPieceCompanyCountrySupplies: ShipmentPieceCompanyCountrySupplies[];
133
+ }
134
+ export interface ShipmentPieceCompanyCountrySupplies extends ActiveLessSymfonyModel {
135
+ supplyId: number;
136
+ quantity: number;
137
+ subtotal: number;
138
+ taxBase: number;
139
+ taxPercent: number;
140
+ tax: number;
141
+ total: number;
142
+ description: string;
143
+ supply: Supply;
144
+ }
145
+ export interface Supply extends ActiveLessSymfonyModel {
146
+ name: string;
147
+ description: string;
148
+ countryId: number;
149
+ enabledForDropoff: boolean;
150
+ supplyType: SupplyTypeComposition;
151
+ supplyPacking: SupplyPackingComposition;
152
+ }
153
+ export interface SupplyTypeComposition extends SymfonyModel {
154
+ name: string;
155
+ }
156
+ export interface SupplyPackingComposition extends ActiveLessSymfonyModel {
157
+ value: number;
158
+ weight: number;
159
+ height: number;
160
+ depth: number;
161
+ width: number;
162
+ }
163
+ export interface CommercialInvoice extends ActiveLessSymfonyModel {
164
+ documentTypeId: number;
165
+ tradingTransactionTypeId: number;
166
+ documentFunctionId: number;
167
+ number: string;
168
+ remarks: string;
169
+ items: Item[];
170
+ documentType: DocumentType;
171
+ tradingTransactionType: TradingTransactionType;
172
+ documentFunction: DocumentFunction;
173
+ }
174
+ export interface Item extends ActiveLessSymfonyModel {
175
+ description: string;
176
+ quantity: number;
177
+ quantityUnitId: number;
178
+ subtotal: number;
179
+ manufactureCountryCode: string;
180
+ realWeight: number;
181
+ commodityId: number;
182
+ quantityUnit: QuantityUnit;
183
+ manufactureCountry: ManufactureCountry;
184
+ commodity: Commodity;
185
+ }
186
+ export interface QuantityUnit extends SymfonyModel {
187
+ code: string;
188
+ name: string;
189
+ }
190
+ export interface ManufactureCountry {
191
+ id: string;
192
+ code: string;
193
+ name: string;
194
+ locationType: string[];
195
+ unit: string[];
196
+ timezone: string;
197
+ hasImportService: boolean;
198
+ isActive: boolean;
199
+ regions: string[];
200
+ zones: string[];
201
+ isoCode: string;
202
+ }
203
+ export interface Commodity extends SymfonyModel {
204
+ code: string;
205
+ name: string;
206
+ countryId: number;
207
+ }
208
+ export interface DocumentType extends SymfonyModel {
209
+ code: string;
210
+ name: string;
211
+ description: string;
212
+ }
213
+ export interface TradingTransactionType extends SymfonyModel {
214
+ code: string;
215
+ name: string;
216
+ description: string;
217
+ }
218
+ export interface DocumentFunction extends SymfonyModel {
219
+ code: string;
220
+ name: string;
221
+ }
222
+ export interface ShipmentGsop extends ActiveLessSymfonyModel {
223
+ productContentCode: string;
224
+ originServiceAreaCode: string;
225
+ destinationServiceAreaCode: string;
226
+ internalServiceCode: string;
227
+ awbBarCode: string;
228
+ dhlRoutingBarCode: string;
229
+ }
230
+ export interface ShipmentCompanyCountryExtraCharges extends ActiveLessSymfonyModel {
231
+ subtotal: number;
232
+ tax: number;
233
+ total: number;
234
+ extraChargeId: number;
235
+ extraChargeCode: string;
236
+ }
237
+ export interface AdditionalData {
238
+ awbTypeCode: string;
239
+ countryCode: string;
240
+ shipmentTypeCode: string;
241
+ productGlobalCode: string;
242
+ productLocalCode: string;
243
+ currencyCode: string;
244
+ userUsername: string;
245
+ locationFacilityCode: string;
246
+ }
247
+ export interface Customs {
248
+ criteria: Criteria;
249
+ rules: Rules[];
250
+ }
251
+ export interface Criteria {
252
+ origin: string;
253
+ destination: string;
254
+ dutiable: boolean;
255
+ declaredValue: number;
256
+ }
257
+ export interface Rules {
258
+ id: number;
259
+ level: string;
260
+ attributes: Attributes[];
261
+ }
262
+ export interface Attributes {
263
+ id: number;
264
+ field: string;
265
+ dhlCode: string;
266
+ values: Values;
267
+ }
268
+ export interface Values {
269
+ shipment: string;
270
+ customer: CustomerComposition;
271
+ invoiceHeader: string;
272
+ invoiceItem: string[];
273
+ }
274
+ export interface CustomerComposition {
275
+ SP: string;
276
+ RV: string;
277
+ }
278
+ export interface ShipmentBookPickup extends ActiveLessSymfonyModel {
279
+ pickupDate: string;
280
+ readyByTime: string;
281
+ closeTime: string;
282
+ confirmationNumber: string;
283
+ packageLocationId: number;
284
+ remarks: string;
285
+ packageLocation: PackageLocation;
286
+ }
287
+ export interface PackageLocation extends SymfonyModel {
288
+ name: string;
289
+ }
@@ -0,0 +1,4 @@
1
+ import { ShipmentComposition } from './api-composition.interfaces';
2
+ export type ShipmentOut = {
3
+ shipment: ShipmentComposition;
4
+ };
@@ -22,8 +22,6 @@ export interface Document extends LaravelModel {
22
22
  fax: string;
23
23
  };
24
24
  document_id: number;
25
- created_at: string;
26
- updated_at: string;
27
25
  transaction_id: string;
28
26
  extra_fields: {
29
27
  observation: string;
@@ -155,7 +153,7 @@ export interface Customer extends LaravelModel {
155
153
  company_id: number;
156
154
  identification_type_id: number;
157
155
  extra_fields: {
158
- [key: string]: string;
156
+ [key: string]: string | number | boolean | null;
159
157
  };
160
158
  country_id: number;
161
159
  customer_type_id: number;
@@ -48,29 +48,31 @@ export type OperationCancelBillingOut = {
48
48
  };
49
49
  export type OperationDocumentIn = {
50
50
  country_document_type_id: number;
51
+ document_id: number;
51
52
  customer: {
53
+ customer_type_id: number;
52
54
  company_name: string;
53
55
  full_name: string;
54
56
  email: string;
55
- phone_code: string;
56
- phone_number: string;
57
- address_line1: string;
58
- address_line2: string;
59
- address_line3: string;
57
+ phone_code: string | null;
58
+ phone_number: string | null;
59
+ address_line1: string | null;
60
+ address_line2: string | null;
61
+ address_line3: string | null;
60
62
  identification_number: string;
61
63
  identification_type_id: number;
62
- postal_code: string;
63
- state: string;
64
- county_name: string;
65
- city_name: string;
64
+ postal_code: string | null;
65
+ state: string | null;
66
+ county_name: string | null;
67
+ city_name: string | null;
66
68
  country_id: number;
67
69
  extra_fields: {
68
- [key: string]: string;
69
- };
70
+ [key: string]: string | number | boolean;
71
+ } | null;
70
72
  };
71
73
  document_extra_fields: {
72
- [key: string]: string;
73
- };
74
+ [key: string]: string | number | boolean;
75
+ } | null;
74
76
  };
75
77
  export type OperationDocumentOut = {
76
78
  document: Document;
@@ -18,7 +18,7 @@ export interface CollectionPayment extends LaravelModel {
18
18
  user_id: number;
19
19
  user_username: string;
20
20
  document_type_id: number;
21
- document_type: DocumentType;
21
+ document_type: DocumentTypeReports;
22
22
  document_category_id: number;
23
23
  document_category: DocumentCategory;
24
24
  receipt_number: string;
@@ -30,7 +30,7 @@ export interface CollectionPayment extends LaravelModel {
30
30
  operation_type_id: number;
31
31
  operation_type: OperationType;
32
32
  }
33
- export interface DocumentType extends LaravelModel {
33
+ export interface DocumentTypeReports extends LaravelModel {
34
34
  _id: number;
35
35
  name: string;
36
36
  code: string;
@@ -47,7 +47,7 @@ export interface DocumentCategory extends LaravelModel {
47
47
  updated_at: string;
48
48
  translations: Translations;
49
49
  }
50
- export interface Shipment extends LaravelModel {
50
+ export interface ShipmentReports extends LaravelModel {
51
51
  amount_1: number;
52
52
  amount_2: number;
53
53
  amount_collected: number;
@@ -1,10 +1,10 @@
1
- import { CollectionPayment, PromotionCodeDiscount, ReportExternalShipment, Shipment } from './api-reports.interfaces';
1
+ import { CollectionPayment, PromotionCodeDiscount, ReportExternalShipment, ShipmentReports } from './api-reports.interfaces';
2
2
  export type CollectionPaymentsOut = {
3
3
  collection_payments: CollectionPayment[];
4
4
  total: number;
5
5
  };
6
6
  export type ShipmentsReportOut = {
7
- shipments: Shipment[];
7
+ shipments: ShipmentReports[];
8
8
  total: number;
9
9
  };
10
10
  export type ExistPendingPaymentsIn = {
@@ -1,23 +1,23 @@
1
1
  import { LaravelModel } from './api.models';
2
2
  import { Pivot } from './api-security.types';
3
3
  export interface Session extends LaravelModel {
4
- name: string;
5
- username: string;
6
- email: string;
7
4
  model_type: string;
8
5
  model_id: number;
9
- auth_type: string;
10
- language_id: number;
11
- country_id: number;
12
- location_id: number;
6
+ status: string;
7
+ last_activity: string;
8
+ user_agent: string;
9
+ gmt_offset: string;
10
+ opening_id: number;
11
+ user_id: number;
13
12
  installation_id: number;
13
+ locale: string | null;
14
+ decimal_point: number;
15
+ country_id: number;
16
+ company_id: number;
14
17
  company_country_id: number;
18
+ location_id: number;
15
19
  country_reference_currency_id: number;
16
- opening_id: number;
17
- locale: string;
18
- permissions: string[];
19
- roles: Role[];
20
- session: Session;
20
+ location_employee_id: number;
21
21
  }
22
22
  export interface Role extends LaravelModel {
23
23
  name: string;
@@ -26,7 +26,6 @@ export interface Role extends LaravelModel {
26
26
  role_type_id: number;
27
27
  regional_country_id: number | null;
28
28
  role_type: RoleType;
29
- permissions: Permission[];
30
29
  }
31
30
  export interface RoleType extends LaravelModel {
32
31
  name: string;
@@ -49,6 +48,11 @@ export interface User extends LaravelModel {
49
48
  email: string;
50
49
  roles: Role[];
51
50
  }
51
+ export interface UserMe extends Omit<User, 'roles'> {
52
+ permissions: string[];
53
+ session: Session | null;
54
+ role: Role;
55
+ }
52
56
  export interface Module extends LaravelModel {
53
57
  name: string;
54
58
  code: string;
@@ -1,4 +1,4 @@
1
- import { Module, Permission, Role, RoleType, Session, User } from './api-security.interfaces';
1
+ import { Module, Role, RoleType, Session, User, UserMe } from './api-security.interfaces';
2
2
  export type AuthLoginIn = {
3
3
  username: string;
4
4
  password: string;
@@ -35,22 +35,7 @@ export type GetUsersOut = {
35
35
  total: number;
36
36
  };
37
37
  export type AuthMeOut = {
38
- user: {
39
- id: number;
40
- name: string;
41
- username: string;
42
- model_type: string;
43
- model_id: number;
44
- is_active: boolean;
45
- created_at: string;
46
- updated_at: string;
47
- auth_type: string;
48
- language_id: number;
49
- email: string;
50
- role: Role;
51
- permissions: Permission[];
52
- session: Session | null;
53
- };
38
+ user: UserMe;
54
39
  };
55
40
  export type ChangeLanguageIn = {
56
41
  languageId: number;
@@ -0,0 +1,6 @@
1
+ export declare enum CustomerType {
2
+ SHIPPER = "SP",
3
+ CONSIGNEE = "RV",
4
+ IMPORTER = "IP",
5
+ EXPORTER = "EP"
6
+ }