@experteam-mx/ngx-services 18.9.10 → 18.9.12

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, 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';
5
+ import { CancellationReasonIn, CancellationReasonOut, CancellationReasonsOut, CountriesOut, CountryIn, CountryOut, CurrenciesOut, ExtraChargeIn, ExtraChargeOut, ExtraChargesOut, GenericFolioIn, GenericFolioOut, GenericFoliosOut, HolidayIn, HolidayOut, HolidaysOut, IdentificationTypeIn, IdentificationTypeOut, 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;
@@ -28,6 +28,55 @@ export declare class ApiCatalogsService {
28
28
  * @return {Observable<IdentificationTypesOut[]>} An observable that emits an array of identification type.
29
29
  */
30
30
  getIdentificationTypes(params: QueryParams): Observable<IdentificationTypesOut>;
31
+ /**
32
+ * Retrieve a single identification type by its id.
33
+ *
34
+ * Sends an HTTP GET request to the indentification type endpoint and returns an Observable that emits
35
+ * the IdentificationTypeOut payload extracted from the API success envelope.
36
+ *
37
+ * @param id - The numeric identifier of the identification type to fetch.
38
+ * @returns An Observable that emits the requested IdentificationTypeOut. The Observable will error
39
+ * if the HTTP request fails (for example network issues or non-2xx responses).
40
+ */
41
+ getIdentificationType(id: number): Observable<IdentificationTypeOut>;
42
+ /**
43
+ * Sends a POST request to create a new identification type and returns the created resource.
44
+ *
45
+ * The request payload is sent as an object with a `body` property containing the provided
46
+ * IdentificationTypeIn value (i.e. { body: IdentificationTypeIn }). On success the HTTP response is expected
47
+ * to follow the ApiSuccess<T> shape; the operator maps that response to the inner `data`
48
+ * object and emits it as a IdentificationTypeOut.
49
+ *
50
+ * @param body - The identification type payload to create (IdentificationTypeIn).
51
+ * @returns Observable<IdentificationTypeOut> that emits the created identification type on success.
52
+ */
53
+ postIdentificationtType(body: IdentificationTypeIn): Observable<IdentificationTypeOut>;
54
+ /**
55
+ * Update a identification type by its ID.
56
+ *
57
+ * Sends an HTTP PUT to `${this.url}/identification-types/${id}` with the provided payload.
58
+ * The request body is sent as an object with a `body` property containing the
59
+ * `IdentificationTypeIn` data. The server response is expected to be an `ApiSuccess<IdentificationTypeOut>`
60
+ * and this method returns an Observable that emits the unwrapped `IdentificationTypeOut`.
61
+ *
62
+ * @param id - The identifier of the identification type to update.
63
+ * @param body - The update payload for the identification type.
64
+ * @returns An Observable that emits the updated `IdentificationTypeOut` on success.
65
+ */
66
+ putIdentificationType(id: number, body: IdentificationTypeIn): Observable<IdentificationTypeOut>;
67
+ /**
68
+ * Delete a identification type by its ID.
69
+ *
70
+ * Sends an HTTP DELETE request to the backend endpoint `/identification-types/{id}` and
71
+ * returns an Observable that emits the API response's `data` payload (typically an empty object).
72
+ *
73
+ * The implementation maps an ApiSuccess wrapper to its `data` property before emitting.
74
+ *
75
+ * @param id - The numeric identifier of the identification type to delete.
76
+ * @returns An Observable that emits the deleted resource payload ({} expected) on success.
77
+ * The Observable will emit an error if the HTTP request fails.
78
+ */
79
+ deleteIdentificationType(id: number): Observable<{}>;
31
80
  /**
32
81
  * Fetches the extra charges based on the provided query parameters.
33
82
  *
@@ -0,0 +1,7 @@
1
+ export declare enum ViewSectionOption {
2
+ SHIPMENT = "shipment",
3
+ PICKUP = "pickup",
4
+ EMPLOYEE_DHL = "employee_dhl",
5
+ BILLING = "billing",
6
+ CUSTOMER_RESTRICTION = "customer_restriction"
7
+ }
@@ -1,3 +1,4 @@
1
+ import { ViewSectionOption } from './api-catalog.enum';
1
2
  import { SymfonyModel, Translations } from './api.models';
2
3
  export interface Country extends SymfonyModel {
3
4
  name: string;
@@ -75,9 +76,9 @@ export interface IdentificationType extends SymfonyModel {
75
76
  countryId: number;
76
77
  identificationType: number | null;
77
78
  name: string;
78
- viewSection?: {
79
- [key: string]: boolean;
80
- };
79
+ viewSection?: Record<ViewSectionOption, boolean>;
80
+ regex: string | null;
81
+ isExternalValidation: boolean;
81
82
  }
82
83
  export interface OperationType extends SymfonyModel {
83
84
  code: string;
@@ -1,3 +1,4 @@
1
+ import { ViewSectionOption } from './api-catalog.enum';
1
2
  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
3
  export type OperationTypesOut = {
3
4
  total: number;
@@ -7,6 +8,19 @@ export interface IdentificationTypesOut {
7
8
  total: number;
8
9
  identificationTypes: IdentificationType[];
9
10
  }
11
+ export type IdentificationTypeOut = {
12
+ IdentificationType: IdentificationType;
13
+ };
14
+ export type IdentificationTypeIn = {
15
+ code: string;
16
+ countryId: number;
17
+ identificationType?: number | null;
18
+ name: string;
19
+ viewSection: Record<ViewSectionOption, boolean>;
20
+ regex: string | null;
21
+ isExternalValidation?: boolean;
22
+ isActive: boolean;
23
+ };
10
24
  export type ExtraChargesOut = {
11
25
  total: number;
12
26
  extracharges: ExtraCharge[];
@@ -96,6 +96,8 @@ export interface ShipmentReports {
96
96
  shipper_phone_number: string;
97
97
  shipper_postal_code: string;
98
98
  shipper_state_name: string | null;
99
+ subtotal: number;
100
+ tax: number;
99
101
  total: number;
100
102
  tracking: string | null;
101
103
  updated_at: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@experteam-mx/ngx-services",
3
- "version": "18.9.10",
3
+ "version": "18.9.12",
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
@@ -34,6 +34,7 @@ export * from './lib/apis/models/api-billing-sv.interfaces';
34
34
  export * from './lib/apis/models/api-billing-sv.types';
35
35
  export * from './lib/apis/models/api-cash-operations.interfaces';
36
36
  export * from './lib/apis/models/api-cash-operations.types';
37
+ export * from './lib/apis/models/api-catalog.enum';
37
38
  export * from './lib/apis/models/api-catalog.interfaces';
38
39
  export * from './lib/apis/models/api-catalog.types';
39
40
  export * from './lib/apis/models/api-companies.interfaces';