@experteam-mx/ngx-services 18.7.32 → 18.8.1

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.
@@ -697,6 +697,18 @@ export declare class ApiCompaniesService {
697
697
  * @returns {Observable<TDXAccountSettingsOut>} An observable containing the updated TDX account setting.
698
698
  */
699
699
  putTDXAccountSettings(id: number, body: TDXAccountSettingsIn): Observable<TDXAccountSettingsOut>;
700
+ /**
701
+ * Retrieves the employees of a specific location using a provided token.
702
+ *
703
+ * @param params - Input parameters for the request, defined by the `LocationEmployeesIn` interface.
704
+ * @returns An `Observable<LocationEmployeesOut>` that emits the employees
705
+ * associated with the given location.
706
+ * @returns The response type is `ApiSuccess<LocationEmployeesOut>`, from which the `data` field is extracted.
707
+ */
708
+ getLocationEmployeesByToken(params: {
709
+ token: string;
710
+ queryParams: QueryParams;
711
+ }): Observable<LocationEmployeesOut>;
700
712
  static ɵfac: i0.ɵɵFactoryDeclaration<ApiCompaniesService, never>;
701
713
  static ɵprov: i0.ɵɵInjectableDeclaration<ApiCompaniesService>;
702
714
  }
@@ -1,7 +1,7 @@
1
1
  import { HttpClient } from '@angular/common/http';
2
2
  import { Observable } from 'rxjs';
3
3
  import { Environment } from '../ngx-services.models';
4
- import { CancelPaymentReceiptIn, CountryPaymentTypeFieldIn, CountryPaymentTypeFieldOut, CountryPaymentTypeFieldsOut, CountryPaymentTypeIn, CountryPaymentTypeOut, CountryPaymentTypesOut, CustomerDocumentTypesOut, CustomersOut, CustomerTypesOut, GetDocumentsOut, OperationAccountPaymentIn, OperationAccountPaymentOut, OperationCancelBillingIn, OperationCancelBillingOut, OperationDocumentIn, OperationDocumentOut, OperationDocumentRequestsOut, OperationPrintDocumentOut, OperationShipmentExternalIn, OperationShipmentExternalOut, PaymentTypeFieldAccountIn, PaymentTypeFieldAccountOut, PaymentTypeFieldAccountsOut, PaymentTypeFieldCardTypeIn, PaymentTypeFieldCardTypeOut, PaymentTypeFieldCardTypesOut, PaymentTypesOut, PrintCollectionReceiptOut, ToleranceIn, ToleranceOut, TolerancesOut } from './models/api-invoices.types';
4
+ import { CancelPaymentReceiptIn, CountryPaymentTypeFieldIn, CountryPaymentTypeFieldOut, CountryPaymentTypeFieldsOut, CountryPaymentTypeIn, CountryPaymentTypeOut, CountryPaymentTypesOut, CustomerDocumentTypesOut, CustomersOut, CustomerTypesOut, DocumentStatusesOut, GetDocumentsOut, OperationAccountPaymentIn, OperationAccountPaymentOut, OperationCancelBillingIn, OperationCancelBillingOut, OperationDocumentIn, OperationDocumentOut, OperationDocumentRequestsOut, OperationPrintDocumentOut, OperationPrintXmlOut, OperationShipmentExternalIn, OperationShipmentExternalOut, PaymentTypeFieldAccountIn, PaymentTypeFieldAccountOut, PaymentTypeFieldAccountsOut, PaymentTypeFieldCardTypeIn, PaymentTypeFieldCardTypeOut, PaymentTypeFieldCardTypesOut, PaymentTypesOut, PrintCollectionReceiptOut, ToleranceIn, ToleranceOut, TolerancesOut } from './models/api-invoices.types';
5
5
  import { QueryParams } from './models/api.models';
6
6
  import * as i0 from "@angular/core";
7
7
  export declare class ApiInvoicesService {
@@ -254,6 +254,27 @@ export declare class ApiInvoicesService {
254
254
  * @returns An Observable that emits the documents data when the HTTP request completes
255
255
  */
256
256
  getDocuments(params: QueryParams): Observable<GetDocumentsOut>;
257
+ /**
258
+ * Fetches document status values from the API.
259
+ *
260
+ * Sends an HTTP GET request to the service's `/document-status` endpoint using the supplied query parameters
261
+ * and returns the decoded `data` payload from the API success envelope.
262
+ *
263
+ * @param params - Query parameters to apply to the request (e.g. filtering, pagination, search).
264
+ * @returns An Observable that emits a DocumentStatusesOut object containing the document status data.
265
+ */
266
+ getDocumentStatuses(params: QueryParams): Observable<DocumentStatusesOut>;
267
+ /**
268
+ * Retrieves the XML print representation for a given operation (invoice).
269
+ *
270
+ * Sends an HTTP GET request to the backend endpoint `/operation/print/xml/{documentId}` and
271
+ * unwraps the `data` field from the API success response before emitting it.
272
+ *
273
+ * @param documentId - The numeric identifier of the document to fetch.
274
+ * @returns An Observable that emits the OperationPrintXmlOut payload on success and completes.
275
+ * The Observable will error if the HTTP request fails or the response does not contain the expected data.
276
+ */
277
+ getOperationPrintXml(documentId: number): Observable<OperationPrintXmlOut>;
257
278
  static ɵfac: i0.ɵɵFactoryDeclaration<ApiInvoicesService, never>;
258
279
  static ɵprov: i0.ɵɵInjectableDeclaration<ApiInvoicesService>;
259
280
  }
@@ -1,4 +1,5 @@
1
1
  import { Account, AccountCategory, AccountType, BoardingProcess, Company, CompanyCountry, CompanyCountryTax, CountryExchange, CountryReference, CountryReferenceCurrency, CountryReferenceExtraCharge, CountryReferenceProduct, Employee, EmployeeCustomerDhl, ExtraChargeEntity, Installation, Location, LocationEmployee, Parameter, ParameterConfig, ProductEntity, SupplyEntity, System, TDXAccountSetting, WorkflowConfig } from './api-companies.interfaces';
2
+ import { QueryParams } from './api.models';
2
3
  export type LocationEmployeesOut = {
3
4
  location_employees: LocationEmployee[];
4
5
  total: number;
@@ -451,3 +452,6 @@ export type TDXAccountSettingsIn = {
451
452
  product_id: number;
452
453
  is_active: boolean;
453
454
  };
455
+ export type LocationEmployeesIn = {
456
+ token: string;
457
+ } & QueryParams;
@@ -51,6 +51,7 @@ export interface Document extends LaravelModel {
51
51
  items: DocumentItem[];
52
52
  document_payments: DocumentPayment[];
53
53
  payments: Payment[];
54
+ document: Document | null;
54
55
  }
55
56
  export interface DocumentTypeRange extends LaravelModel {
56
57
  id: number;
@@ -84,6 +85,20 @@ export interface DocumentItem extends LaravelModel {
84
85
  id: number;
85
86
  document_id: number;
86
87
  details: {
88
+ code: string;
89
+ description: string;
90
+ relation: string;
91
+ } | {
92
+ code: string;
93
+ description: string;
94
+ header: {
95
+ awbNumber: string;
96
+ accountNumber: string;
97
+ pieces: string[];
98
+ total: number;
99
+ };
100
+ ticket_data: Record<string, string | null>;
101
+ } | {
87
102
  account: number;
88
103
  country_reference_currency_id: number;
89
104
  customer_company_name: string;
@@ -248,3 +263,7 @@ export interface DocumentRequests extends ActiveLessLaravelModel {
248
263
  times: string[];
249
264
  observation: string;
250
265
  }
266
+ export interface DocumentStatus extends LaravelModel {
267
+ name: string;
268
+ code: number;
269
+ }
@@ -1,4 +1,4 @@
1
- import { CountryPaymentType, CountryPaymentTypeField, Customer, CustomerCountryDocumentType, CustomerType, Document, DocumentRequests, PaymentType, PaymentTypeFieldAccount, PaymentTypeFieldCardType, Tolerance } from './api-invoices.interfaces';
1
+ import { CountryPaymentType, CountryPaymentTypeField, Customer, CustomerCountryDocumentType, CustomerType, Document, DocumentRequests, DocumentStatus, PaymentType, PaymentTypeFieldAccount, PaymentTypeFieldCardType, Tolerance } from './api-invoices.interfaces';
2
2
  export interface OperationAccountPaymentIn {
3
3
  document_type_range_id: number | null;
4
4
  document_number: string | null;
@@ -186,3 +186,10 @@ export type GetDocumentsOut = {
186
186
  documents: Document[];
187
187
  total: number;
188
188
  };
189
+ export type DocumentStatusesOut = {
190
+ document_status: DocumentStatus[];
191
+ total: number;
192
+ };
193
+ export type OperationPrintXmlOut = {
194
+ xml: string;
195
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@experteam-mx/ngx-services",
3
- "version": "18.7.32",
3
+ "version": "18.8.1",
4
4
  "description": "Angular common services for Experteam apps",
5
5
  "author": "Experteam Cía. Ltda.",
6
6
  "keywords": [