@experteam-mx/ngx-services 18.9.14 → 18.9.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.
- package/esm2022/lib/apis/api-inventories.service.mjs +15 -1
- package/esm2022/lib/apis/api-quote.service.mjs +87 -0
- package/esm2022/lib/apis/api-reports.service.mjs +29 -1
- package/esm2022/lib/apis/models/api-inventories.types.mjs +1 -1
- package/esm2022/lib/apis/models/api-quote.interfaces.mjs +2 -0
- package/esm2022/lib/apis/models/api-quote.types.mjs +2 -0
- package/esm2022/lib/apis/models/api-reports.interfaces.mjs +1 -1
- package/esm2022/lib/apis/models/api-reports.types.mjs +1 -1
- package/esm2022/lib/ngx-services.models.mjs +1 -1
- package/esm2022/public-api.mjs +5 -1
- package/fesm2022/experteam-mx-ngx-services.mjs +126 -1
- package/fesm2022/experteam-mx-ngx-services.mjs.map +1 -1
- package/lib/apis/api-inventories.service.d.ts +12 -1
- package/lib/apis/api-quote.service.d.ts +65 -0
- package/lib/apis/api-reports.service.d.ts +26 -1
- package/lib/apis/models/api-inventories.types.d.ts +6 -0
- package/lib/apis/models/api-quote.interfaces.d.ts +13 -0
- package/lib/apis/models/api-quote.types.d.ts +17 -0
- package/lib/apis/models/api-reports.interfaces.d.ts +78 -3
- package/lib/apis/models/api-reports.types.d.ts +5 -1
- package/lib/ngx-services.models.d.ts +1 -0
- package/package.json +1 -1
- package/public-api.d.ts +4 -0
|
@@ -2,7 +2,7 @@ import { Environment } from '../ngx-services.models';
|
|
|
2
2
|
import { HttpClient } from '@angular/common/http';
|
|
3
3
|
import { QueryParams } from './models/api.models';
|
|
4
4
|
import { Observable } from 'rxjs';
|
|
5
|
-
import { CheckpointEventReasonsOut, CheckpointsOut, IncidentIn, IncidentOut, IncidentReasonComplementIn, IncidentReasonComplementOut, IncidentReasonComplementsOut, IncidentReasonIn, IncidentReasonOut, IncidentReasonsOut, IncidentsOut } from './models/api-inventories.types';
|
|
5
|
+
import { CheckpointEventReasonsOut, CheckpointsOut, IncidentIn, IncidentOut, IncidentReasonComplementIn, IncidentReasonComplementOut, IncidentReasonComplementsOut, IncidentReasonIn, IncidentReasonOut, IncidentReasonsOut, IncidentsOut, PackagesInStockIn, PackagesInStockOut } from './models/api-inventories.types';
|
|
6
6
|
import * as i0 from "@angular/core";
|
|
7
7
|
export declare class ApiInventoriesService {
|
|
8
8
|
private environments;
|
|
@@ -129,6 +129,17 @@ export declare class ApiInventoriesService {
|
|
|
129
129
|
* @returns {Observable<IncidentReasonComplementOut>} An observable that emits the result of the delete incident reason complement.
|
|
130
130
|
*/
|
|
131
131
|
deleteIncidentReasonComplement(id: Number): Observable<IncidentReasonComplementOut>;
|
|
132
|
+
/**
|
|
133
|
+
* Posts packages that are currently in stock.
|
|
134
|
+
*
|
|
135
|
+
* @param body - The input data containing package stock information
|
|
136
|
+
* @returns {Observable<PackagesInStockOut>} An Observable that emits the packages in stock output data
|
|
137
|
+
*
|
|
138
|
+
* @remarks
|
|
139
|
+
* This method sends a POST request to the `/packages/in-stock` endpoint and
|
|
140
|
+
* extracts the data property from the API success response.
|
|
141
|
+
*/
|
|
142
|
+
postPackagesInStock(body: PackagesInStockIn): Observable<PackagesInStockOut>;
|
|
132
143
|
static ɵfac: i0.ɵɵFactoryDeclaration<ApiInventoriesService, never>;
|
|
133
144
|
static ɵprov: i0.ɵɵInjectableDeclaration<ApiInventoriesService>;
|
|
134
145
|
}
|
|
@@ -0,0 +1,65 @@
|
|
|
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 { QuoteEventIn, QuoteEventOut, QuoteEventsOut, QuoteEventTypesOut } from './models/api-quote.types';
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
7
|
+
/**
|
|
8
|
+
* Service to manage quote-related events.
|
|
9
|
+
*
|
|
10
|
+
* This service provides methods to retrieve, create, and get event types
|
|
11
|
+
* related to quote processes.
|
|
12
|
+
*/
|
|
13
|
+
export declare class ApiQuoteService {
|
|
14
|
+
private environments;
|
|
15
|
+
private http;
|
|
16
|
+
constructor(environments: Environment, http: HttpClient);
|
|
17
|
+
/**
|
|
18
|
+
* Base URL for the Quotes API.
|
|
19
|
+
*/
|
|
20
|
+
get url(): string;
|
|
21
|
+
/**
|
|
22
|
+
* Retrieves all registered events for a specific quote.
|
|
23
|
+
*
|
|
24
|
+
* @param id - Quote identifier.
|
|
25
|
+
* @param params - Optional query parameters such as pagination or filtering.
|
|
26
|
+
* @returns Observable containing the list of quote events.
|
|
27
|
+
*
|
|
28
|
+
* @example
|
|
29
|
+
* ```ts
|
|
30
|
+
* this.apiQuoteService.getQuoteEvents(10, { page: 1 })
|
|
31
|
+
* .subscribe((events) => console.log(events))
|
|
32
|
+
* ```
|
|
33
|
+
*/
|
|
34
|
+
getQuoteEvents(id: number, params: QueryParams): Observable<QuoteEventsOut>;
|
|
35
|
+
/**
|
|
36
|
+
* Registers a new event related to a specific quote.
|
|
37
|
+
*
|
|
38
|
+
* @param id - Quote identifier.
|
|
39
|
+
* @param body - Event payload to be created.
|
|
40
|
+
* @returns Observable containing the newly created event.
|
|
41
|
+
*
|
|
42
|
+
* @example
|
|
43
|
+
* ```ts
|
|
44
|
+
* const event: QuoteEventIn = { code: 'WON', note: 'Client approved' }
|
|
45
|
+
* this.apiQuoteService.postQuoteEvents(10, event)
|
|
46
|
+
* .subscribe((response) => console.log(response))
|
|
47
|
+
* ```
|
|
48
|
+
*/
|
|
49
|
+
postQuoteEvents(id: number, body: QuoteEventIn): Observable<QuoteEventOut>;
|
|
50
|
+
/**
|
|
51
|
+
* Retrieves the available quote event types.
|
|
52
|
+
*
|
|
53
|
+
* @param params - Optional query parameters such as pagination or filtering.
|
|
54
|
+
* @returns Observable containing the list of event types.
|
|
55
|
+
*
|
|
56
|
+
* @example
|
|
57
|
+
* ```ts
|
|
58
|
+
* this.apiQuoteService.getQuoteEventTypes({ page: 1 })
|
|
59
|
+
* .subscribe((types) => console.log(types))
|
|
60
|
+
* ```
|
|
61
|
+
*/
|
|
62
|
+
getQuoteEventTypes(params: QueryParams): Observable<QuoteEventTypesOut>;
|
|
63
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ApiQuoteService, never>;
|
|
64
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<ApiQuoteService>;
|
|
65
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { HttpClient, HttpResponse } from '@angular/common/http';
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
3
|
import { Environment } from '../ngx-services.models';
|
|
4
|
-
import { CollectionPaymentsOut, ExternalShipmentsOut, FileCheckOut, InvoicesOut, PartialWithdrawalsOut, PromotionCodeDiscountsOut, ShipmentsReportOut } from './models/api-reports.types';
|
|
4
|
+
import { CollectionPaymentsOut, ExternalShipmentsOut, FileCheckOut, InvoicesOut, PartialWithdrawalsOut, PromotionCodeDiscountsOut, ShipmentsLandingReportOut, ShipmentsReportOut } from './models/api-reports.types';
|
|
5
5
|
import { QueryParams } from './models/api.models';
|
|
6
6
|
import * as i0 from "@angular/core";
|
|
7
7
|
export declare class ApiReportsService {
|
|
@@ -28,6 +28,31 @@ export declare class ApiReportsService {
|
|
|
28
28
|
* @return {Observable<ShipmentsReportOut>} An observable emitting the shipment report data.
|
|
29
29
|
*/
|
|
30
30
|
getShipmentsReport(params: QueryParams): Observable<ShipmentsReportOut>;
|
|
31
|
+
/**
|
|
32
|
+
* Retrieves the shipments landing report from the reports API.
|
|
33
|
+
*
|
|
34
|
+
* Sends a GET request to the `/shipments-landing-report` endpoint with the provided query parameters.
|
|
35
|
+
* The HTTP response is expected to be wrapped in an `ApiSuccess` envelope, from which the `data`
|
|
36
|
+
* payload is extracted and returned as the stream value.
|
|
37
|
+
*
|
|
38
|
+
* @param params - Query parameters used to filter or paginate the shipments landing report.
|
|
39
|
+
* @returns An observable that emits the parsed `ShipmentsLandingReportOut` data from the API response.
|
|
40
|
+
*
|
|
41
|
+
* @remarks
|
|
42
|
+
* - The underlying HTTP call uses `HttpClient.get` with `params` serialized as query string values.
|
|
43
|
+
* - The response is piped through `map` to unwrap `data` from `ApiSuccess<T>`.
|
|
44
|
+
* - Errors from the HTTP request are propagated through the observable stream.
|
|
45
|
+
*
|
|
46
|
+
* @example
|
|
47
|
+
* ```ts
|
|
48
|
+
* // Basic usage:
|
|
49
|
+
* service.getShipmentsLandingReport({ page: 1, perPage: 25 })
|
|
50
|
+
* .subscribe(report => {
|
|
51
|
+
* // handle ShipmentsLandingReportOut
|
|
52
|
+
* });
|
|
53
|
+
* ```
|
|
54
|
+
*/
|
|
55
|
+
getShipmentsLandingReport(params: QueryParams): Observable<ShipmentsLandingReportOut>;
|
|
31
56
|
/**
|
|
32
57
|
* Retrieves a report of external shipments based on the provided query parameters.
|
|
33
58
|
*
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ActiveLessSymfonyModel, SymfonyModel } from './api.models';
|
|
2
|
+
export interface QuoteEvent extends ActiveLessSymfonyModel {
|
|
3
|
+
date: string;
|
|
4
|
+
quoteEventType: QuoteEventType;
|
|
5
|
+
comment: string;
|
|
6
|
+
userId: number;
|
|
7
|
+
userUsername: string;
|
|
8
|
+
userName: string;
|
|
9
|
+
}
|
|
10
|
+
export interface QuoteEventType extends SymfonyModel {
|
|
11
|
+
code: string;
|
|
12
|
+
name: string;
|
|
13
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { QuoteEvent, QuoteEventType } from './api-quote.interfaces';
|
|
2
|
+
export type QuoteEventsOut = {
|
|
3
|
+
total: number;
|
|
4
|
+
quoteEvents: QuoteEvent[];
|
|
5
|
+
};
|
|
6
|
+
export type QuoteEventIn = {
|
|
7
|
+
date: string;
|
|
8
|
+
quoteEventTypeId: number;
|
|
9
|
+
comment: string;
|
|
10
|
+
};
|
|
11
|
+
export interface QuoteEventOut {
|
|
12
|
+
quoteEvent: QuoteEvent;
|
|
13
|
+
}
|
|
14
|
+
export interface QuoteEventTypesOut {
|
|
15
|
+
total: number;
|
|
16
|
+
quoteEventTypes: QuoteEventType[];
|
|
17
|
+
}
|
|
@@ -117,6 +117,75 @@ export interface ShipmentReports {
|
|
|
117
117
|
};
|
|
118
118
|
}[];
|
|
119
119
|
}
|
|
120
|
+
export interface ShipmentLandingReport extends ActiveLessLaravelModel {
|
|
121
|
+
authorization_numbers: string[];
|
|
122
|
+
commercial_invoice: boolean;
|
|
123
|
+
company_id: number;
|
|
124
|
+
company_name: string;
|
|
125
|
+
country_id: number;
|
|
126
|
+
currency_code: string | null;
|
|
127
|
+
document_id: number;
|
|
128
|
+
hasCreditCardPayment: boolean;
|
|
129
|
+
installation_id: number;
|
|
130
|
+
installation_number: number;
|
|
131
|
+
invoice_document_id: number | null;
|
|
132
|
+
is_document: boolean;
|
|
133
|
+
is_manual: boolean;
|
|
134
|
+
itn_number: string;
|
|
135
|
+
location_code: string;
|
|
136
|
+
location_facility_code: string;
|
|
137
|
+
location_id: number;
|
|
138
|
+
location_name: string;
|
|
139
|
+
price_override_approver_name: string;
|
|
140
|
+
price_override_reason_name: string;
|
|
141
|
+
product_global_name: string;
|
|
142
|
+
product_local_name: string;
|
|
143
|
+
question_description: string | null;
|
|
144
|
+
receiver_address_line1: string;
|
|
145
|
+
receiver_city_name: string;
|
|
146
|
+
receiver_company_name: string;
|
|
147
|
+
receiver_country_name: string;
|
|
148
|
+
receiver_full_name: string;
|
|
149
|
+
receiver_postal_code: string;
|
|
150
|
+
receiver_state_name: string;
|
|
151
|
+
send_to_api_inventories: boolean;
|
|
152
|
+
shipment_description: string;
|
|
153
|
+
shipment_group_id: number;
|
|
154
|
+
shipment_group_name: string;
|
|
155
|
+
shipment_pieces_tracking_numbers: string[];
|
|
156
|
+
shipment_status_code: string;
|
|
157
|
+
shipment_status_id: number;
|
|
158
|
+
shipment_status_name_EN: string;
|
|
159
|
+
shipment_status_name_ES: string;
|
|
160
|
+
shipment_status_name_FR: string;
|
|
161
|
+
shipment_status_name_PT: string;
|
|
162
|
+
shipment_tags: ShipmentTag[];
|
|
163
|
+
shipment_tracking_number: string;
|
|
164
|
+
shipment_type: string;
|
|
165
|
+
shipment_value: string;
|
|
166
|
+
shipper_account: string;
|
|
167
|
+
shipper_address_line1: string;
|
|
168
|
+
shipper_address_line2: string;
|
|
169
|
+
shipper_address_line3: string;
|
|
170
|
+
shipper_city_name: string;
|
|
171
|
+
shipper_company_name: string;
|
|
172
|
+
shipper_email: string;
|
|
173
|
+
shipper_full_name: string;
|
|
174
|
+
shipper_full_phone_number: string;
|
|
175
|
+
shipper_identification_number: string;
|
|
176
|
+
shipper_phone_number: string;
|
|
177
|
+
shipper_postal_code: string;
|
|
178
|
+
shipper_state_name: string;
|
|
179
|
+
tracking: string | null;
|
|
180
|
+
user_id: number;
|
|
181
|
+
user_username: string;
|
|
182
|
+
additional_documents: {
|
|
183
|
+
country_id: number;
|
|
184
|
+
include_indemnity_letter: boolean;
|
|
185
|
+
shipment_content_type_id: number;
|
|
186
|
+
shipment_scope_id: number;
|
|
187
|
+
};
|
|
188
|
+
}
|
|
120
189
|
export interface ShipmentTag extends ActiveLessSymfonyModel {
|
|
121
190
|
name: string;
|
|
122
191
|
code: string;
|
|
@@ -172,16 +241,22 @@ export interface PromotionCodeDiscount extends ApiModel {
|
|
|
172
241
|
origin_full_name: string;
|
|
173
242
|
promotion_code: string;
|
|
174
243
|
discount_percentage: number;
|
|
175
|
-
|
|
244
|
+
product_subtotals: ProductSubtotal[];
|
|
176
245
|
}
|
|
177
|
-
export interface
|
|
246
|
+
export interface ProductSubtotal {
|
|
178
247
|
country_reference_currency_id: number;
|
|
179
248
|
currency_id: number;
|
|
180
249
|
currency_code: string;
|
|
181
|
-
|
|
250
|
+
value: number;
|
|
182
251
|
shipment_total: number;
|
|
183
252
|
discount_amount: number;
|
|
184
253
|
}
|
|
254
|
+
export interface ProductSubtotal {
|
|
255
|
+
country_reference_currency_id: number;
|
|
256
|
+
currency_id: number;
|
|
257
|
+
currency_code: string;
|
|
258
|
+
value: number;
|
|
259
|
+
}
|
|
185
260
|
export interface WithdrawalAmount {
|
|
186
261
|
country_reference_currency_id: number;
|
|
187
262
|
currency_id: number;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CollectionPayment, Invoice, PartialWithdrawal, PromotionCodeDiscount, ReportExternalShipment, ShipmentReports } from './api-reports.interfaces';
|
|
1
|
+
import { CollectionPayment, Invoice, PartialWithdrawal, PromotionCodeDiscount, ReportExternalShipment, ShipmentLandingReport, ShipmentReports } from './api-reports.interfaces';
|
|
2
2
|
import { QueryParams } from './api.models';
|
|
3
3
|
import { Session } from './api-security.interfaces';
|
|
4
4
|
export type CollectionPaymentsOut = {
|
|
@@ -9,6 +9,10 @@ export type ShipmentsReportOut = {
|
|
|
9
9
|
shipments: ShipmentReports[];
|
|
10
10
|
total: number;
|
|
11
11
|
};
|
|
12
|
+
export type ShipmentsLandingReportOut = {
|
|
13
|
+
shipments_landing: ShipmentLandingReport[];
|
|
14
|
+
total: number;
|
|
15
|
+
};
|
|
12
16
|
export type ExternalShipmentsOut = {
|
|
13
17
|
external_shipments: ReportExternalShipment[];
|
|
14
18
|
total: number;
|
package/package.json
CHANGED
package/public-api.d.ts
CHANGED
|
@@ -18,6 +18,7 @@ export * from './lib/apis/api-inventories.service';
|
|
|
18
18
|
export * from './lib/apis/api-invoices.service';
|
|
19
19
|
export * from './lib/apis/api-notifications.service';
|
|
20
20
|
export * from './lib/apis/api-open-items.service';
|
|
21
|
+
export * from './lib/apis/api-quote.service';
|
|
21
22
|
export * from './lib/apis/api-reports.service';
|
|
22
23
|
export * from './lib/apis/api-security.service';
|
|
23
24
|
export * from './lib/apis/api-services.service';
|
|
@@ -60,7 +61,10 @@ export * from './lib/apis/models/api-notifications.interfaces';
|
|
|
60
61
|
export * from './lib/apis/models/api-notifications.types';
|
|
61
62
|
export * from './lib/apis/models/api-open-items.interfaces';
|
|
62
63
|
export * from './lib/apis/models/api-open-items.types';
|
|
64
|
+
export * from './lib/apis/models/api-quote.interfaces';
|
|
65
|
+
export * from './lib/apis/models/api-quote.types';
|
|
63
66
|
export * from './lib/apis/models/api-reports.interfaces';
|
|
67
|
+
export * from './lib/apis/models/api-reports.types';
|
|
64
68
|
export * from './lib/apis/models/api-security.interfaces';
|
|
65
69
|
export * from './lib/apis/models/api-security.types';
|
|
66
70
|
export * from './lib/apis/models/api-services.interfaces';
|