@experteam-mx/ngx-services 18.7.26 → 18.7.27

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 { HttpClient } from '@angular/common/http';
2
2
  import { Environment } from '../ngx-services.models';
3
3
  import { Observable } from 'rxjs';
4
4
  import { QueryParams } from './models/api.models';
5
- import { SuppliesOut, SupplyIn, SupplyOut, SupplyTypesOut } from './models/api-supplies.types';
5
+ import { SuppliesOut, SupplyIn, SupplyLocationIn, SupplyLocationOut, SupplyLocationsOut, SupplyLocationTransactionIn, SupplyLocationTransactionOut, SupplyOut, SupplyTransactionTypesOut, SupplyTypesOut } from './models/api-supplies.types';
6
6
  import * as i0 from "@angular/core";
7
7
  export declare class ApiSuppliesService {
8
8
  private environments;
@@ -50,6 +50,44 @@ export declare class ApiSuppliesService {
50
50
  * @return {Observable<SupplyTypesOut>} An Observable that emits the supply types data.
51
51
  */
52
52
  getSupplyTypes(params: QueryParams): Observable<SupplyTypesOut>;
53
+ /**
54
+ * Creates a new supply location.
55
+ *
56
+ * @param {SupplyLocationIn} body - The supply location data to create.
57
+ * @return {Observable<SupplyLocationOut>} An Observable that emits the created supply location data.
58
+ */
59
+ postSupplyLocations(body: SupplyLocationIn): Observable<SupplyLocationOut>;
60
+ /**
61
+ * Fetches the supply locations based on the provided query parameters.
62
+ *
63
+ * @param {QueryParams} params - The query parameters to filter the supply locations.
64
+ * @return {Observable<SupplyLocationsOut>} An Observable that emits the supply locations data.
65
+ */
66
+ getSupplyLocations(params: QueryParams): Observable<SupplyLocationsOut>;
67
+ /**
68
+ * Creates a new supply location transaction.
69
+ *
70
+ * @param {SupplyLocationTransactionIn} body - The transaction data to create.
71
+ * @return {Observable<SupplyLocationTransactionOut>} An Observable that emits the created transaction data.
72
+ */
73
+ postSupplyLocationTransaction(body: SupplyLocationTransactionIn): Observable<SupplyLocationTransactionOut>;
74
+ /**
75
+ * Fetches the supply transaction types based on the provided query parameters.
76
+ *
77
+ * @param {QueryParams} params - The query parameters to filter the transaction types.
78
+ * @return {Observable<SupplyTransactionTypesOut>} An Observable that emits the supply transaction types data.
79
+ */
80
+ getSupplyTransactionTypes(params: QueryParams): Observable<SupplyTransactionTypesOut>;
81
+ /**
82
+ * Exports the supply locations to an Excel file.
83
+ *
84
+ * @param {QueryParams} params - The query parameters to filter the data before export.
85
+ * @return {Observable<{ mime_type: string; base64: string }>} An Observable that emits the exported file's MIME type and Base64 content.
86
+ */
87
+ getSupplyLocationsExportToExcel(params: QueryParams): Observable<{
88
+ mime_type: string;
89
+ base64: string;
90
+ }>;
53
91
  static ɵfac: i0.ɵɵFactoryDeclaration<ApiSuppliesService, never>;
54
92
  static ɵprov: i0.ɵɵInjectableDeclaration<ApiSuppliesService>;
55
93
  }
@@ -5,7 +5,7 @@ export interface Supply extends ActiveLessSymfonyModel {
5
5
  countryId: number;
6
6
  enabledForDropoff: boolean;
7
7
  supplyType: SupplyType;
8
- supplyPacking: SupplyPacking;
8
+ supplyPacking: SupplyPacking | null;
9
9
  }
10
10
  export interface SupplyType extends SymfonyModel {
11
11
  name: string;
@@ -16,5 +16,25 @@ export interface SupplyPacking extends SymfonyModel {
16
16
  height: number;
17
17
  depth: number;
18
18
  width: number;
19
- emobileCode: string;
19
+ emobileCode: string | null;
20
+ }
21
+ export interface SupplyLocation extends SymfonyModel {
22
+ supply: Supply;
23
+ locationId: number;
24
+ stock: number;
25
+ lastInventoryDate: string;
26
+ lastInventoryDifference: number;
27
+ locationName: string;
28
+ }
29
+ export interface SupplyTransactionType extends ActiveLessSymfonyModel {
30
+ code: string;
31
+ description: string;
32
+ sign: number;
33
+ }
34
+ export interface SupplyLocationTransaction extends ActiveLessSymfonyModel {
35
+ supplyLocation: SupplyLocation;
36
+ supplyTransactionType: SupplyTransactionType;
37
+ userId: number;
38
+ quantity: number;
39
+ stock: number;
20
40
  }
@@ -1,4 +1,4 @@
1
- import { Supply, SupplyType } from './api-supplies.interfaces';
1
+ import { Supply, SupplyLocation, SupplyLocationTransaction, SupplyTransactionType, SupplyType } from './api-supplies.interfaces';
2
2
  export type SuppliesOut = {
3
3
  supplies: Supply[];
4
4
  total: number;
@@ -24,3 +24,27 @@ export type SupplyTypesOut = {
24
24
  supplyTypes: SupplyType[];
25
25
  total: number;
26
26
  };
27
+ export type SupplyLocationIn = {
28
+ supplyId: number;
29
+ locationId: number;
30
+ stock: number;
31
+ };
32
+ export type SupplyLocationOut = {
33
+ supplyLocation: SupplyLocation;
34
+ };
35
+ export type SupplyLocationsOut = {
36
+ supplyLocations: SupplyLocation[];
37
+ total: number;
38
+ };
39
+ export type SupplyLocationTransactionIn = {
40
+ supplyLocationId: number;
41
+ supplyTransactionTypeId: number;
42
+ quantity: number;
43
+ };
44
+ export type SupplyLocationTransactionOut = {
45
+ supplyLocationTransaction: SupplyLocationTransaction;
46
+ };
47
+ export type SupplyTransactionTypesOut = {
48
+ supplyTransactionTypes: SupplyTransactionType[];
49
+ total: number;
50
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@experteam-mx/ngx-services",
3
- "version": "18.7.26",
3
+ "version": "18.7.27",
4
4
  "description": "Angular common services for Experteam apps",
5
5
  "author": "Experteam Cía. Ltda.",
6
6
  "keywords": [