@experteam-mx/ngx-services 18.4.9 → 18.5.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.
@@ -0,0 +1,39 @@
1
+ import { HttpClient } from '@angular/common/http';
2
+ import { Observable } from 'rxjs';
3
+ import { Environment } from '../ngx-services.models';
4
+ import { ExternalShipmentAddressesIn, ExternalShipmentAddressesOut, ExternalShipmentFileOut, ExternalShipmentHistoriesIn } from './models/api-e-tools-auto-billing.types';
5
+ import * as i0 from "@angular/core";
6
+ export declare class ApiEToolsAutoBillingService {
7
+ private environments;
8
+ private http;
9
+ constructor(environments: Environment, http: HttpClient);
10
+ /**
11
+ * Retrieves the URL for the shipments API from the environment configurations.
12
+ *
13
+ * @return {string} The URL of the shipments API.
14
+ */
15
+ get url(): string;
16
+ /**
17
+ * Updates external shipment addresses using the provided parameters and returns the updated addresses.
18
+ *
19
+ * @param {ExternalShipmentAddressesIn} body - The input parameters containing details of the shipment addresses to be updated.
20
+ * @return {Observable<ExternalShipmentAddressesOut>} An observable containing the updated external shipment addresses.
21
+ */
22
+ patchExternalShipmentAddresses(body: ExternalShipmentAddressesIn): Observable<ExternalShipmentAddressesOut>;
23
+ /**
24
+ * Fetches the external shipment file by its identifier.
25
+ *
26
+ * @param {number} fileId - The unique identifier of the external shipment file to be retrieved.
27
+ * @return {Observable<ExternalShipmentFileOut>} An observable containing the external shipment file data.
28
+ */
29
+ getExternalShipmentFile(fileId: number): Observable<ExternalShipmentFileOut>;
30
+ /**
31
+ * Retrieves the history entries for a specific external shipment.
32
+ *
33
+ * @param {number} id - The ID of the external shipment to retrieve history for.
34
+ * @return {Observable<ExternalShipmentHistoriesIn>} An observable containing the external shipment history entries.
35
+ */
36
+ getExternalShipmentHistories(id: number): Observable<ExternalShipmentHistoriesIn>;
37
+ static ɵfac: i0.ɵɵFactoryDeclaration<ApiEToolsAutoBillingService, never>;
38
+ static ɵprov: i0.ɵɵInjectableDeclaration<ApiEToolsAutoBillingService>;
39
+ }
@@ -2,7 +2,7 @@ import { Environment } from '../ngx-services.models';
2
2
  import { HttpClient } from '@angular/common/http';
3
3
  import { Observable } from 'rxjs';
4
4
  import { QueryParams } from './models/api.models';
5
- import { CollectionPaymentsOut, ExistPendingInvoicesIn, ExistPendingPaymentsIn, ShipmentsReportOut } from './models/api-reports.types';
5
+ import { CollectionPaymentsOut, ExistPendingInvoicesIn, ExistPendingPaymentsIn, ExternalShipmentsOut, ShipmentsReportOut } from './models/api-reports.types';
6
6
  import * as i0 from "@angular/core";
7
7
  export declare class ApiReportsService {
8
8
  private environments;
@@ -44,6 +44,13 @@ export declare class ApiReportsService {
44
44
  * @return {Observable<ShipmentsReportOut>} An observable emitting the shipment report data.
45
45
  */
46
46
  getShipmentsReport(params: QueryParams): Observable<ShipmentsReportOut>;
47
+ /**
48
+ * Retrieves a report of external shipments based on the provided query parameters.
49
+ *
50
+ * @param {QueryParams} params - An object representing the query parameters for filtering the external shipments report.
51
+ * @return {Observable<ExternalShipmentsOut>} An observable that emits the external shipments report data.
52
+ */
53
+ getExternalShipmentsReport(params: QueryParams): Observable<ExternalShipmentsOut>;
47
54
  static ɵfac: i0.ɵɵFactoryDeclaration<ApiReportsService, never>;
48
55
  static ɵprov: i0.ɵɵInjectableDeclaration<ApiReportsService>;
49
56
  }
@@ -0,0 +1,42 @@
1
+ import { ActiveLessSymfonyModel } from './api.models';
2
+ export interface ExternalShipmentAddress extends ActiveLessSymfonyModel {
3
+ addressLine1: string;
4
+ addressLine2: string;
5
+ addressLine3: string;
6
+ cityName: string;
7
+ companyName: string;
8
+ countryId: number;
9
+ email: string;
10
+ externalShipmentId: number;
11
+ fullName: string;
12
+ identificationNumber: string;
13
+ identificationTypeId: number;
14
+ phoneCode: string;
15
+ phoneNumber: string;
16
+ postalCode: string;
17
+ roleType: string;
18
+ serviceAreaCode: string;
19
+ }
20
+ export interface ExternalShipmentStatus extends ActiveLessSymfonyModel {
21
+ name: string;
22
+ isActive: boolean;
23
+ }
24
+ export interface ExternalShipmentHistory extends ActiveLessSymfonyModel {
25
+ externalShipmentId: number;
26
+ externalShipmentStatus: ExternalShipmentStatus;
27
+ messages: string[];
28
+ }
29
+ export interface ExternalShipmentFile extends ActiveLessSymfonyModel {
30
+ companyCountryId: string;
31
+ name: string;
32
+ finished: false;
33
+ statusId: number;
34
+ externalShipmentFileHistories: ExternalShipmentFileHistory[];
35
+ externalShipmentId: number;
36
+ content: string;
37
+ }
38
+ export interface ExternalShipmentFileHistory extends ActiveLessSymfonyModel {
39
+ statusId: number;
40
+ messages: string[];
41
+ externalShipmentFileId: number;
42
+ }
@@ -0,0 +1,25 @@
1
+ import { ExternalShipmentAddress, ExternalShipmentFile, ExternalShipmentHistory } from './api-e-tools-auto-billing.interfaces';
2
+ export type ExternalShipmentAddressesIn = {
3
+ addressLine1: string;
4
+ addressLine2: string;
5
+ addressLine3: string;
6
+ cityName: string;
7
+ companyName: string;
8
+ email: string;
9
+ fullName: string;
10
+ identificationNumber: string;
11
+ identificationTypeId: number;
12
+ phoneCode: string;
13
+ phoneNumber: string;
14
+ postalCode: string;
15
+ };
16
+ export type ExternalShipmentAddressesOut = {
17
+ externalShipmentAddress: ExternalShipmentAddress;
18
+ };
19
+ export type ExternalShipmentFileOut = {
20
+ externalShipmentFile: ExternalShipmentFile;
21
+ };
22
+ export type ExternalShipmentHistoriesIn = {
23
+ total: number;
24
+ externalShipmentHistories: ExternalShipmentHistory[];
25
+ };
@@ -1,4 +1,4 @@
1
- import { LaravelModel, Translations } from './api.models';
1
+ import { ActiveLessLaravelModel, ApiModel, LaravelModel, Translations } from './api.models';
2
2
  import { DocumentPayment } from './api-invoices.interfaces';
3
3
  import { OperationType } from './api-catalog.interfaces';
4
4
  export interface CollectionPayment extends LaravelModel {
@@ -47,120 +47,124 @@ export interface DocumentCategory extends LaravelModel {
47
47
  updated_at: string;
48
48
  translations: Translations;
49
49
  }
50
- export interface Shipment {
51
- id: number;
52
- document_id: number;
53
- shipment_scope_name: string;
54
- is_document: boolean;
55
- origin_service_area_code: string;
56
- origin_facility_code: string;
57
- destination_facility_code: string;
58
- destination_service_area_code: string;
59
- shipment_pieces_tracking_numbers: string[];
60
- shipment_tracking_number: string;
61
- shipper_full_name: string;
62
- shipper_company_name: string;
63
- shipper_email: string;
64
- shipper_phone_number: string;
65
- shipper_phone_code: string;
66
- shipper_full_phone_number: string;
67
- shipper_address_line1: string;
68
- shipper_address_line2: string;
69
- shipper_city_name: string;
70
- shipper_state_name: string;
71
- shipper_state_code: string;
72
- shipper_postal_code: string;
73
- receiver_full_name: string;
74
- receiver_company_name: string;
75
- receiver_address_line1: string;
76
- receiver_address_line2: string;
77
- receiver_city_name: string;
78
- receiver_state_name: string;
79
- receiver_state_code: string;
80
- receiver_postal_code: string;
81
- shipper_account: string;
82
- promotion_code: string;
83
- customer_identification_type_id: number;
84
- customer_identification_number: string;
50
+ export interface Shipment extends LaravelModel {
51
+ amount_1: number;
52
+ amount_2: number;
53
+ amount_collected: number;
54
+ authorization_numbers: string[];
55
+ commercial_invoice: boolean;
56
+ company_country_id: number;
57
+ company_id: number;
58
+ company_name: string;
59
+ country_code: string;
60
+ country_id: number;
61
+ country_name: string;
62
+ currency_code: string | null;
85
63
  customer_email: string;
86
64
  customer_full_phone_number: string;
87
- price_override_approver_id: number;
88
- price_override_reason_id: number;
89
- price_override_approver_name: string;
90
- price_override_reason_name: string;
91
- is_proforma: boolean;
65
+ customer_identification_number: string;
66
+ customer_identification_type_id: number;
67
+ date: string;
68
+ date_og: string;
69
+ declared_value: number;
70
+ delivery_date_time: string;
71
+ destination_facility_code: string;
72
+ destination_service_area_code: string;
73
+ document_id: number;
74
+ document_payments?: DocumentPayment[];
75
+ ein_number: string;
76
+ installation_id: number;
77
+ installation_number: number;
78
+ insured_value: number;
79
+ invoice?: string[];
80
+ invoice_document_id?: number | null;
81
+ is_document: boolean;
92
82
  is_kiosk: boolean;
93
- to_landing: boolean;
83
+ is_manual: boolean;
84
+ is_marketing_consent: boolean;
94
85
  is_price_override: boolean;
86
+ is_proforma: boolean;
95
87
  is_promotion_code: boolean;
96
88
  is_retail_rate: boolean;
97
- payment_type_1: string;
98
- payment_code_1: string;
99
- amount_1: number;
100
- reference_1: string;
101
- payment_type_2: string;
102
- payment_code_2: string;
103
- amount_2: number;
104
- reference_2: string;
105
- document_payments?: DocumentPayment[];
89
+ is_term_condition: boolean;
90
+ itn_number: string;
91
+ location_facility_code: string;
106
92
  location_id: number;
107
- installation_id: number;
108
- user_id: number;
109
- user_username: string;
110
- company_id: number;
111
- country_id: number;
112
- company_country_id: number;
113
- country_name: string;
114
- company_name: string;
115
- country_code: string;
116
93
  location_name: string;
117
- location_facility_code: string;
118
- installation_number: number;
94
+ origin_facility_code: string;
95
+ origin_service_area_code: string;
96
+ payment_code_1: string;
97
+ payment_code_2: string;
98
+ payment_type_1: string;
99
+ payment_type_2: string;
100
+ price_override_approver_id: number;
101
+ price_override_approver_name: string;
102
+ price_override_reason_id: number;
103
+ price_override_reason_name: string;
119
104
  product_global_code: string;
120
105
  product_local_code: string;
121
- shipment_gmt_offset: string;
122
- shipment_pieces_number: number;
123
- shipment_bill_weight: number;
124
- total_published_value: number;
125
- total_partner_account_value: number;
126
- question_id: number;
106
+ product_subtotal: number;
107
+ product_tax: number;
108
+ product_total: number;
109
+ promotion_code: string;
127
110
  question_description: string;
111
+ question_id: number;
128
112
  question_type: string;
129
- amount_collected: number;
130
- shipment_value: number;
131
- declared_value: number;
132
- insured_value: number;
133
- shipment_status_id: number;
134
- transaction_id: string;
135
- shipment_type: string;
136
- ein_number: string;
137
- itn_number: string;
138
- created_at: string;
139
- updated_at: string;
113
+ receiver_address_line1: string;
114
+ receiver_address_line2: string;
115
+ receiver_city_name: string;
116
+ receiver_company_name: string;
117
+ receiver_full_name: string;
118
+ receiver_postal_code: string;
119
+ receiver_state_code: string;
120
+ receiver_state_name: string;
121
+ reference_1: string;
122
+ reference_2: string;
140
123
  retail_rate_adjustment: number;
124
+ selected?: boolean;
125
+ send_to_api_inventories: boolean;
126
+ shipment?: string[];
127
+ shipment_bill_weight: number;
128
+ shipment_gmt_offset: string;
129
+ shipment_id: number;
130
+ shipment_pieces_number: number;
131
+ shipment_pieces_tracking_numbers: string[];
132
+ shipment_scope_name: string;
141
133
  shipment_status_code: string;
142
134
  shipment_status_description: string;
143
- shipment_status_translations: {
144
- description: {
145
- [key: string]: string;
146
- };
135
+ shipment_status_id: number;
136
+ shipment_tracking_number: string;
137
+ shipment_type: string;
138
+ shipment_value: number;
139
+ shipper_account: string;
140
+ shipper_address_line1: string;
141
+ shipper_address_line2: string;
142
+ shipper_city_name: string;
143
+ shipper_company_name: string;
144
+ shipper_email: string;
145
+ shipper_full_name: string;
146
+ shipper_full_phone_number: string;
147
+ shipper_phone_code: string;
148
+ shipper_phone_number: string;
149
+ shipper_postal_code: string;
150
+ shipper_state_code: string;
151
+ shipper_state_name: string;
152
+ subtotal: number;
153
+ tax: number;
154
+ to_landing: boolean;
155
+ total: number;
156
+ total_partner_account_value: number;
157
+ total_published_value: number;
158
+ transaction_id: string;
159
+ user_id: number;
160
+ user_username: string;
161
+ additional_documents: {
162
+ country_id: number;
163
+ include_indemnity_letter: boolean;
164
+ include_pdf: boolean;
165
+ shipment_content_type_id: number;
166
+ shipment_scope_id: number;
147
167
  };
148
- authorization_numbers: string[];
149
- is_term_condition: boolean;
150
- is_marketing_consent: boolean;
151
- is_manual: boolean;
152
- commercial_invoice: boolean;
153
- shipment_id: number;
154
- date: string;
155
- date_og: string;
156
- invoice_document_id?: number | null;
157
- currency_code: string | null;
158
- send_to_api_inventories: boolean;
159
- selected?: boolean;
160
- delivery_date_time: string;
161
- product_subtotal: number;
162
- product_tax: number;
163
- product_total: number;
164
168
  product_taxes: {
165
169
  code: string;
166
170
  percent: number;
@@ -187,11 +191,41 @@ export interface Shipment {
187
191
  local_service_name: string;
188
192
  is_discount: false;
189
193
  }[];
190
- additional_documents: {
191
- country_id: number;
192
- include_indemnity_letter: boolean;
193
- include_pdf: boolean;
194
- shipment_content_type_id: number;
195
- shipment_scope_id: number;
194
+ shipment_status_translations: {
195
+ description: {
196
+ [key: string]: string;
197
+ };
196
198
  };
197
199
  }
200
+ export interface ReportExternalShipment extends ActiveLessLaravelModel {
201
+ account_number: string;
202
+ collection_date: string;
203
+ document_id: number | null;
204
+ document_number: string | null;
205
+ external_shipment_addresses: ReportExternalShipmentAddress[];
206
+ external_shipment_file_id: number;
207
+ external_shipment_status_id: number;
208
+ external_shipment_status_name: string;
209
+ external_shipment_status_translations: Translations;
210
+ installation_id: number;
211
+ subtotal: number;
212
+ tax: number;
213
+ total: number;
214
+ tracking_number: string;
215
+ user_id: number;
216
+ }
217
+ export interface ReportExternalShipmentAddress extends ApiModel {
218
+ address_line_1: string;
219
+ address_line_2: string;
220
+ city_name: string;
221
+ company_name: string;
222
+ country_id: number;
223
+ email: string;
224
+ full_name: string;
225
+ identification_number: string | null;
226
+ identification_type_id: number | null;
227
+ phone_number: string;
228
+ postal_code: string;
229
+ role_type: string;
230
+ service_area_code: string;
231
+ }
@@ -1,4 +1,4 @@
1
- import { CollectionPayment, Shipment } from './api-reports.interfaces';
1
+ import { CollectionPayment, ReportExternalShipment, Shipment } from './api-reports.interfaces';
2
2
  export type CollectionPaymentsOut = {
3
3
  collection_payments: CollectionPayment[];
4
4
  total: number;
@@ -13,3 +13,7 @@ export type ExistPendingPaymentsIn = {
13
13
  export type ExistPendingInvoicesIn = {
14
14
  installation_id: number;
15
15
  };
16
+ export type ExternalShipmentsOut = {
17
+ external_shipments: ReportExternalShipment[];
18
+ total: number;
19
+ };
@@ -13,11 +13,19 @@ export interface LaravelModel extends ApiModel {
13
13
  created_at: Date | string;
14
14
  updated_at: Date | string;
15
15
  }
16
+ export interface ActiveLessLaravelModel extends ApiModel {
17
+ created_at: Date | string;
18
+ updated_at: Date | string;
19
+ }
16
20
  export interface SymfonyModel extends ApiModel {
17
21
  isActive: boolean;
18
22
  createdAt: Date | string;
19
23
  updatedAt: Date | string;
20
24
  }
25
+ export interface ActiveLessSymfonyModel extends ApiModel {
26
+ createdAt: Date | string;
27
+ updatedAt: Date | string;
28
+ }
21
29
  export type QueryParams = {
22
30
  [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
23
31
  };
@@ -19,6 +19,7 @@ export type Environment = {
19
19
  apiBillingMX?: string;
20
20
  apiCatalogsUrl?: string;
21
21
  apiCompaniesUrl?: string;
22
+ apiEToolsAutoBilling?: string;
22
23
  apiExternalOperationsKey?: string;
23
24
  apiExternalOperationsUrl?: string;
24
25
  apiInvoicesUrl?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@experteam-mx/ngx-services",
3
- "version": "18.4.9",
3
+ "version": "18.5.0",
4
4
  "description": "Angular common services for Experteam apps",
5
5
  "author": "Experteam Cía. Ltda.",
6
6
  "keywords": [
package/public-api.d.ts CHANGED
@@ -4,6 +4,7 @@ export * from './lib/apis/api-billing-do.service';
4
4
  export * from './lib/apis/api-billing-mx.service';
5
5
  export * from './lib/apis/api-catalogs.service';
6
6
  export * from './lib/apis/api-companies.service';
7
+ export * from './lib/apis/api-e-tools-auto-billing.service';
7
8
  export * from './lib/apis/api-external-pickups.service';
8
9
  export * from './lib/apis/api-invoices.service';
9
10
  export * from './lib/apis/api-open-items.service';
@@ -15,6 +16,8 @@ export * from './lib/apis/models/api-catalog.interfaces';
15
16
  export * from './lib/apis/models/api-catalog.types';
16
17
  export * from './lib/apis/models/api-companies.interfaces';
17
18
  export * from './lib/apis/models/api-companies.types';
19
+ export * from './lib/apis/models/api-e-tools-auto-billing.interfaces';
20
+ export * from './lib/apis/models/api-e-tools-auto-billing.types';
18
21
  export * from './lib/apis/models/api-external-pickups.types';
19
22
  export * from './lib/apis/models/api-invoices.interfaces';
20
23
  export * from './lib/apis/models/api-invoices.types';