@experteam-mx/ngx-services 18.9.4 → 18.9.7

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.
@@ -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 { CancellationReasonIn, CancellationReasonOut, CancellationReasonsOut, CountriesOut, CountryIn, CountryOut, CurrenciesOut, ExtraChargeIn, ExtraChargeOut, ExtraChargesOut, GenericFolioIn, GenericFolioOut, GenericFoliosOut, IdentificationTypesOut, LanguagesOut, ManagementAreasOut, OperationTypesOut, ProductIn, ProductOut, QuestionIn, QuestionOut, QuestionsOut, RegionsOut, ShipmentContentTypesOut, ShipmentGroupsOut, ShipmentIncomeTypeIn, ShipmentIncomeTypeOut, ShipmentIncomeTypesOut, ShipmentScopesOut, ShipmentStatusesOut, UniqueFolioIn, UniqueFolioOut, UniqueFoliosOut, UnitsOut, ZonesOut } from './models/api-catalog.types';
5
+ import { CancellationReasonIn, CancellationReasonOut, CancellationReasonsOut, CountriesOut, CountryIn, CountryOut, CurrenciesOut, ExtraChargeIn, ExtraChargeOut, ExtraChargesOut, GenericFolioIn, GenericFolioOut, GenericFoliosOut, HolidayIn, HolidayOut, HolidaysOut, IdentificationTypesOut, LanguagesOut, ManagementAreasOut, OperationTypesOut, ProductIn, ProductOut, QuestionIn, QuestionOut, QuestionsOut, RegionsOut, ShipmentContentTypesOut, ShipmentGroupsOut, ShipmentIncomeTypeIn, ShipmentIncomeTypeOut, ShipmentIncomeTypesOut, ShipmentScopesOut, ShipmentStatusesOut, UniqueFolioIn, UniqueFolioOut, UniqueFoliosOut, UnitsOut, ZonesOut } from './models/api-catalog.types';
6
6
  import * as i0 from "@angular/core";
7
7
  export declare class ApiCatalogsService {
8
8
  private environments;
@@ -320,6 +320,65 @@ export declare class ApiCatalogsService {
320
320
  * The Observable will emit an error if the HTTP request fails.
321
321
  */
322
322
  deleteQuestion(id: number): Observable<{}>;
323
+ /**
324
+ * Fetches holidays from the catalogs API.
325
+ *
326
+ * Sends an HTTP GET request to `${this.url}/holidays` using the supplied query parameters
327
+ * and returns the unwrapped payload (`data`) from the API response.
328
+ *
329
+ * @param params - Query parameters to include in the request (e.g. paging, filters, sorting).
330
+ * @returns An Observable that emits the HolidaysOut payload (the `data` field from ApiSuccess<HolidaysOut>).
331
+ */
332
+ getHolidays(params: QueryParams): Observable<HolidaysOut>;
333
+ /**
334
+ * Retrieve a single holiday by its id.
335
+ *
336
+ * Sends an HTTP GET request to the holidays endpoint and returns an Observable that emits
337
+ * the HolidayOut payload extracted from the API success envelope.
338
+ *
339
+ * @param id - The numeric identifier of the holiday to fetch.
340
+ * @returns An Observable that emits the requested HolidayOut. The Observable will error
341
+ * if the HTTP request fails (for example network issues or non-2xx responses).
342
+ */
343
+ getHoliday(id: number): Observable<HolidayOut>;
344
+ /**
345
+ * Sends a POST request to create a new holiday and returns the created resource.
346
+ *
347
+ * The request payload is sent as an object with a `body` property containing the provided
348
+ * HolidayIn value (i.e. { body: HolidayIn }). On success the HTTP response is expected
349
+ * to follow the ApiSuccess<T> shape; the operator maps that response to the inner `data`
350
+ * object and emits it as a HolidayOut.
351
+ *
352
+ * @param body - The holiday payload to create (HolidayIn).
353
+ * @returns Observable<HolidayOut> that emits the created holiday on success.
354
+ */
355
+ postHoliday(body: HolidayIn): Observable<HolidayOut>;
356
+ /**
357
+ * Update a holiday by its ID.
358
+ *
359
+ * Sends an HTTP PUT to `${this.url}/holidays/${id}` with the provided payload.
360
+ * The request body is sent as an object with a `body` property containing the
361
+ * `HolidayIn` data. The server response is expected to be an `ApiSuccess<HolidayOut>`
362
+ * and this method returns an Observable that emits the unwrapped `HolidayOut`.
363
+ *
364
+ * @param id - The identifier of the holiday to update.
365
+ * @param body - The update payload for the holiday.
366
+ * @returns An Observable that emits the updated `HolidayOut` on success.
367
+ */
368
+ putHoliday(id: number, body: HolidayIn): Observable<HolidayOut>;
369
+ /**
370
+ * Deletes a question by its ID.
371
+ *
372
+ * Sends an HTTP DELETE request to the backend endpoint `/questions/{id}` and
373
+ * returns an Observable that emits the API response's `data` payload (typically an empty object).
374
+ *
375
+ * The implementation maps an ApiSuccess wrapper to its `data` property before emitting.
376
+ *
377
+ * @param id - The numeric identifier of the question to delete.
378
+ * @returns An Observable that emits the deleted resource payload ({} expected) on success.
379
+ * The Observable will emit an error if the HTTP request fails.
380
+ */
381
+ deleteHoliday(id: number): Observable<{}>;
323
382
  static ɵfac: i0.ɵɵFactoryDeclaration<ApiCatalogsService, never>;
324
383
  static ɵprov: i0.ɵɵInjectableDeclaration<ApiCatalogsService>;
325
384
  }
@@ -196,3 +196,8 @@ export interface Question extends SymfonyModel {
196
196
  countryId: number;
197
197
  isRequiredValue: boolean;
198
198
  }
199
+ export interface Holiday extends SymfonyModel {
200
+ date: string;
201
+ description: string;
202
+ country: Country;
203
+ }
@@ -1,4 +1,4 @@
1
- import { CancellationReason, Country, Currency, ExtraCharge, GenericFolio, IdentificationType, Language, ManagementArea, OperationType, Product, Question, Region, ShipmentContentType, ShipmentGroup, ShipmentIncomeType, ShipmentScope, ShipmentStatus, UniqueFolio, Unit, Zone } from './api-catalog.interfaces';
1
+ import { CancellationReason, Country, Currency, ExtraCharge, GenericFolio, Holiday, IdentificationType, Language, ManagementArea, OperationType, Product, Question, Region, ShipmentContentType, ShipmentGroup, ShipmentIncomeType, ShipmentScope, ShipmentStatus, UniqueFolio, Unit, Zone } from './api-catalog.interfaces';
2
2
  export type OperationTypesOut = {
3
3
  total: number;
4
4
  operationTypes: OperationType[];
@@ -174,3 +174,16 @@ export type QuestionIn = {
174
174
  countryId: number;
175
175
  isRequiredValue: boolean;
176
176
  };
177
+ export type HolidaysOut = {
178
+ holidays: Holiday[];
179
+ total: number;
180
+ };
181
+ export type HolidayOut = {
182
+ holiday: Holiday;
183
+ };
184
+ export type HolidayIn = {
185
+ date: string;
186
+ description: string;
187
+ countryId: number;
188
+ isActive: boolean;
189
+ };
@@ -1,6 +1,5 @@
1
- import { ActiveLessLaravelModel, ActiveLessSymfonyModel, ApiModel, LaravelModel, Translations } from './api.models';
2
- import { DocumentPayment } from './api-invoices.interfaces';
3
1
  import { OperationType } from './api-catalog.interfaces';
2
+ import { ActiveLessLaravelModel, ActiveLessSymfonyModel, ApiModel, LaravelModel, Translations } from './api.models';
4
3
  export interface CollectionPayment extends LaravelModel {
5
4
  _id: number;
6
5
  country_code: string;
@@ -47,159 +46,74 @@ export interface DocumentCategoryReports extends LaravelModel {
47
46
  updated_at: string;
48
47
  translations: Translations;
49
48
  }
50
- export interface ShipmentReports extends LaravelModel {
51
- amount_1: number;
52
- amount_2: number;
53
- amount_collected: number;
49
+ export interface ShipmentReports {
54
50
  authorization_numbers: string[];
55
51
  commercial_invoice: boolean;
56
- company_country_id: number;
57
- company_id: number;
58
52
  company_name: string;
59
- country_code: string;
60
53
  country_id: number;
61
54
  country_name: string;
62
- currency_code: string | null;
63
- customer_email: string;
64
- customer_full_phone_number: string;
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;
55
+ currency_code: string;
56
+ customer_identification_number: string | null;
57
+ customer_identification_type_id: number | null;
73
58
  document_id: number;
74
- document_payments?: DocumentPayment[];
75
- ein_number: string;
59
+ id: number;
76
60
  installation_id: number;
77
61
  installation_number: number;
78
- insured_value: number;
79
- invoice?: string[];
80
- invoice_document_id?: number | null;
62
+ invoice_document_id: number | null;
81
63
  is_document: boolean;
82
- is_kiosk: boolean;
83
64
  is_manual: boolean;
84
- is_marketing_consent: boolean;
85
- is_price_override: boolean;
86
- is_proforma: boolean;
87
- is_promotion_code: boolean;
88
- is_retail_rate: boolean;
89
- is_term_condition: boolean;
90
- itn_number: string;
91
- location_facility_code: string;
65
+ itn_number: string | null;
92
66
  location_id: number;
93
67
  location_name: string;
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;
104
- product_global_code: string;
105
- product_local_code: string;
68
+ price_override_approver_name: string | null;
69
+ price_override_reason_name: string | null;
106
70
  product_subtotal: number;
107
71
  product_tax: number;
108
- product_total: number;
109
- promotion_code: string;
110
- question_description: string;
111
- question_id: number;
112
- question_type: string;
113
- receiver_address_line1: string;
114
- receiver_address_line2: string;
115
- receiver_city_name: string;
72
+ question_description: string | null;
116
73
  receiver_company_name: string;
117
74
  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;
123
- retail_rate_adjustment: number;
124
- selected?: boolean;
125
75
  send_to_api_inventories: boolean;
126
- shipment?: string[];
127
- shipment_bill_weight: number;
128
- shipment_gmt_offset: string;
129
76
  shipment_id: number;
130
- shipment_pieces_number: number;
131
77
  shipment_pieces_tracking_numbers: string[];
132
- shipment_scope_name: string;
133
78
  shipment_status_code: string;
134
79
  shipment_status_description: string;
135
80
  shipment_status_id: number;
81
+ shipment_status_translations: Translations;
136
82
  shipment_tags: ShipmentTag[];
137
83
  shipment_tracking_number: string;
138
84
  shipment_type: string;
139
- shipment_value: number;
85
+ shipment_value: string;
140
86
  shipper_account: string;
141
87
  shipper_address_line1: string;
142
- shipper_address_line2: string;
143
- shipper_address_line3: string;
88
+ shipper_address_line2: string | null;
89
+ shipper_address_line3: string | null;
144
90
  shipper_city_name: string;
145
91
  shipper_company_name: string;
146
92
  shipper_email: string;
147
93
  shipper_full_name: string;
148
94
  shipper_full_phone_number: string;
149
- shipper_identification_number: string;
150
- shipper_phone_code: string;
95
+ shipper_identification_number: string | null;
151
96
  shipper_phone_number: string;
152
97
  shipper_postal_code: string;
153
- shipper_state_code: string;
154
- shipper_state_name: string;
155
- subtotal: number;
156
- tax: number;
157
- to_landing: boolean;
98
+ shipper_state_name: string | null;
158
99
  total: number;
159
- total_partner_account_value: number;
160
- total_published_value: number;
161
- transaction_id: string;
100
+ tracking: string | null;
101
+ updated_at: string;
162
102
  user_id: number;
163
103
  user_username: string;
164
104
  additional_documents: {
165
105
  country_id: number;
166
106
  include_indemnity_letter: boolean;
167
- include_pdf: boolean;
168
107
  shipment_content_type_id: number;
169
108
  shipment_scope_id: number;
170
109
  };
171
- product_taxes: {
172
- code: string;
173
- percent: number;
174
- base_amount: number;
175
- amount: number;
176
- }[];
177
- shipment_company_country_extra_charges: {
178
- _id: number;
179
- subtotal: number;
180
- tax: number;
181
- total: number;
182
- extra_charge_id: number;
183
- taxes: {
184
- code: string;
185
- percent: number;
186
- base_amount: number;
187
- amount: number;
188
- }[];
189
- created_at: string;
190
- updated_at: string;
191
- global_service_code: string;
192
- local_service_code: string;
193
- global_service_name: string;
194
- local_service_name: string;
195
- is_discount: false;
196
- }[];
197
- shipment_status_translations: {
198
- description: {
199
- [key: string]: string;
110
+ document_payments: {
111
+ payment: {
112
+ countryPaymentType: {
113
+ code: string;
114
+ };
200
115
  };
201
- };
202
- tracking?: string;
116
+ }[];
203
117
  }
204
118
  export interface ShipmentTag extends ActiveLessSymfonyModel {
205
119
  name: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@experteam-mx/ngx-services",
3
- "version": "18.9.4",
3
+ "version": "18.9.7",
4
4
  "description": "Angular common services for Experteam apps",
5
5
  "author": "Experteam Cía. Ltda.",
6
6
  "keywords": [