@experteam-mx/ngx-services 18.5.7 → 18.5.8

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.
@@ -0,0 +1,134 @@
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 { CheckpointEventReasonsOut, CheckpointsOut, IncidentIn, IncidentOut, IncidentReasonComplementIn, IncidentReasonComplementOut, IncidentReasonComplementsOut, IncidentReasonIn, IncidentReasonOut, IncidentReasonsOut, IncidentsOut } from './models/api-inventories.types';
6
+ import * as i0 from "@angular/core";
7
+ export declare class ApiInventoriesService {
8
+ private environments;
9
+ private http;
10
+ constructor(environments: Environment, http: HttpClient);
11
+ /**
12
+ * Retrieves the URL for the Inventories API from the environment configurations.
13
+ *
14
+ * @return {string} The URL of the Inventories API.
15
+ */
16
+ get url(): string;
17
+ /**
18
+ * Retrieves a list of checkpoints based on query parameters.
19
+ *
20
+ * @param {QueryParams} params - Query parameters for filtering the checkpoints.
21
+ * @returns {Observable<CheckpointsOut>} The list of checkpoints.
22
+ */
23
+ getCheckpoints(params: QueryParams): Observable<CheckpointsOut>;
24
+ /**
25
+ * Retrieves a list of checkpoint event reasons based on query parameters.
26
+ *
27
+ * @param {QueryParams} params - Query parameters for filtering the checkpoint event reasons.
28
+ * @returns {Observable<CheckpointEventReasonsOut>} The list of checkpoint event reasons.
29
+ */
30
+ getCheckpointEventReasons(params: QueryParams): Observable<CheckpointEventReasonsOut>;
31
+ /**
32
+ * Retrieves a list of incidents based on query parameters.
33
+ *
34
+ * @param {QueryParams} params - Query parameters for filtering the incidents.
35
+ * @returns {Observable<IncidentsOut>} An observable that emits the list of incidents.
36
+ */
37
+ getIncidents(params: QueryParams): Observable<IncidentsOut>;
38
+ /**
39
+ * Fetches the incident details based on the provided incident ID.
40
+ *
41
+ * @param {number} id - The identifier of the incident record to get detail.
42
+ * @return {Observable<IncidentOut>} An observable that emits the detail incident data.
43
+ */
44
+ getIncident(id: Number): Observable<IncidentOut>;
45
+ /**
46
+ * Creates a new incident.
47
+ *
48
+ * @param {IncidentIn} body - The data for the new incident.
49
+ * @returns {Observable<IncidentOut>} An observable the created incident detail.
50
+ */
51
+ postIncident(body: IncidentIn): Observable<IncidentOut>;
52
+ /**
53
+ * Updates an existing incident.
54
+ *
55
+ * @param {number} id - The identifier of the incident record to update.
56
+ * @param {IncidentIn} body - The incident data to be updated.
57
+ * @returns {Observable<IncidentOut>} An observable detail of the updated incident.
58
+ */
59
+ putIncident(id: Number, body: IncidentIn): Observable<IncidentOut>;
60
+ /**
61
+ * Delete an existing incident.
62
+ *
63
+ * @param {number} id - The unique identifier of the incident to be deleted.
64
+ * @returns {Observable<IncidentOut>} An observable that emits the result of the delete incident.
65
+ */
66
+ deleteIncident(id: Number): Observable<IncidentOut>;
67
+ /**
68
+ * Retrieves a list of incident reasons based on query parameters.
69
+ *
70
+ * @param {QueryParams} params - Query parameters for filtering the incident reasons.
71
+ * @returns {Observable<IncidentReasonsOut>} An observable that emits the list of incident reasons.
72
+ */
73
+ getIncidentReasons(params: QueryParams): Observable<IncidentReasonsOut>;
74
+ /**
75
+ * Fetches the incident reason details based on the provided incident reason ID.
76
+ *
77
+ * @param {number} id - The identifier of the incident reason record to get detail.
78
+ * @return {Observable<IncidentReasonOut>} An observable that emits the detail incident reason data.
79
+ */
80
+ getIncidentReason(id: Number): Observable<IncidentReasonOut>;
81
+ /**
82
+ * Creates a new incident reason.
83
+ *
84
+ * @param {IncidentReasonIn} body - The data for the new incident reason.
85
+ * @returns {Observable<IncidentReasonOut>} An observable the created incident reason detail.
86
+ */
87
+ postIncidentReason(body: IncidentReasonIn): Observable<IncidentReasonOut>;
88
+ /**
89
+ * Updates an existing incident reason.
90
+ *
91
+ * @param {number} id - The identifier of the incident reason record to update.
92
+ * @param {IncidentIn} body - The incident reason data to be updated.
93
+ * @returns {Observable<IncidentReasonOut>} An observable detail of the updated incident reason.
94
+ */
95
+ putIncidentReason(id: Number, body: IncidentReasonIn): Observable<IncidentReasonOut>;
96
+ /**
97
+ * Delete an existing incident reason.
98
+ *
99
+ * @param {number} id - The unique identifier of the incident reason to be deleted.
100
+ * @returns {Observable<IncidentReasonOut>} An observable that emits the result of the delete incident reason.
101
+ */
102
+ deleteIncidentReason(id: Number): Observable<IncidentReasonOut>;
103
+ /**
104
+ * Retrieves a list of incident reason complements based on query parameters.
105
+ *
106
+ * @param {QueryParams} params - Query parameters for filtering the incident reason complements.
107
+ * @returns {Observable<IncidentReasonComplementsOut>} An observable that emits the list of incident reason complements.
108
+ */
109
+ getIncidentReasonComplements(params: QueryParams): Observable<IncidentReasonComplementsOut>;
110
+ /**
111
+ * Creates a new incident reason complement.
112
+ *
113
+ * @param {IncidentReasonIn} body - The data for the new incident reason complement.
114
+ * @returns {Observable<IncidentReasonComplementOut>} An observable the created incident reason complement detail.
115
+ */
116
+ postIncidentReasonComplement(body: IncidentReasonComplementIn): Observable<IncidentReasonComplementOut>;
117
+ /**
118
+ * Updates an existing incident reason complement.
119
+ *
120
+ * @param {number} id - The identifier of the incident reason complement record to update.
121
+ * @param {IncidentIn} body - The incident reason complement data to be updated.
122
+ * @returns {Observable<IncidentReasonComplementOut>} An observable detail of the updated incident reason complement.
123
+ */
124
+ putIncidentReasonComplement(id: Number, body: IncidentReasonComplementIn): Observable<IncidentReasonComplementOut>;
125
+ /**
126
+ * Delete an existing incident reason complement.
127
+ *
128
+ * @param {number} id - The unique identifier of the incident reason complement to be deleted.
129
+ * @returns {Observable<IncidentReasonComplementOut>} An observable that emits the result of the delete incident reason complement.
130
+ */
131
+ deleteIncidentReasonComplement(id: Number): Observable<IncidentReasonComplementOut>;
132
+ static ɵfac: i0.ɵɵFactoryDeclaration<ApiInventoriesService, never>;
133
+ static ɵprov: i0.ɵɵInjectableDeclaration<ApiInventoriesService>;
134
+ }
@@ -0,0 +1,18 @@
1
+ export declare enum Event {
2
+ damage = "damage",
3
+ lost = "lost",
4
+ rejected = "rejected",
5
+ return = "return "
6
+ }
7
+ export declare enum DefaultValueType {
8
+ payment_type = "payment_type",
9
+ currency_code = "currency_code",
10
+ destination = "destination",
11
+ payment_amount = "payment_amount"
12
+ }
13
+ export declare enum AlphaNumeric {
14
+ alpha_numeric = "alpha_numeric",
15
+ numeric = "numeric",
16
+ alphabetic = "alphabetic",
17
+ amount = "amount"
18
+ }
@@ -0,0 +1,40 @@
1
+ import { AlphaNumeric, DefaultValueType, Event } from './api-inventories.enum';
2
+ import { ActiveLessSymfonyModel, SymfonyModel } from './api.models';
3
+ export interface Checkpoint extends ActiveLessSymfonyModel {
4
+ code: string;
5
+ name: string;
6
+ event: Event;
7
+ isFinisher: boolean;
8
+ }
9
+ export interface CheckpointEventReason extends ActiveLessSymfonyModel {
10
+ code: string;
11
+ name: string;
12
+ extraFields: {
13
+ [key: string]: string;
14
+ };
15
+ checkpoint: Checkpoint | null;
16
+ }
17
+ export interface Incident extends SymfonyModel {
18
+ checkpoint: Checkpoint | null;
19
+ countryId: string;
20
+ event: Event;
21
+ name: string;
22
+ isFinisher: boolean;
23
+ }
24
+ export interface IncidentReason extends SymfonyModel {
25
+ checkpointEventReason: CheckpointEventReason | null;
26
+ description: string;
27
+ incident: Incident | null;
28
+ isDefaultChecking: boolean;
29
+ name: string;
30
+ }
31
+ export interface IncidentReasonComplement extends SymfonyModel {
32
+ alphaNumeric: AlphaNumeric | null;
33
+ eventReasonCodeKey: string;
34
+ description: string;
35
+ defaultValueType: DefaultValueType | null;
36
+ incidentReason: IncidentReason;
37
+ maxLength: number;
38
+ name: string;
39
+ readOnly: boolean;
40
+ }
@@ -0,0 +1,56 @@
1
+ import { AlphaNumeric, DefaultValueType, Event } from './api-inventories.enum';
2
+ import { CheckpointEventReason, Checkpoint, Incident, IncidentReason, IncidentReasonComplement } from './api-inventories.interfaces';
3
+ export type CheckpointsOut = {
4
+ total: number;
5
+ checkpoints: Checkpoint[];
6
+ };
7
+ export type CheckpointEventReasonsOut = {
8
+ total: number;
9
+ checkpointEventReasons: CheckpointEventReason[];
10
+ };
11
+ export type IncidentsOut = {
12
+ total: number;
13
+ incidents: Incident[];
14
+ };
15
+ export type IncidentOut = {
16
+ incident: Incident;
17
+ };
18
+ export type IncidentIn = {
19
+ checkpointId: Number | null;
20
+ countryId: string;
21
+ name: string;
22
+ isActive: boolean;
23
+ event: Event | null;
24
+ };
25
+ export type IncidentReasonsOut = {
26
+ total: number;
27
+ incidentReasons: IncidentReason[];
28
+ };
29
+ export type IncidentReasonOut = {
30
+ incidentReason: IncidentReason;
31
+ };
32
+ export type IncidentReasonIn = {
33
+ checkpointEventReasonId?: number;
34
+ description: string;
35
+ incidentId?: number;
36
+ isActive: boolean;
37
+ name: string;
38
+ };
39
+ export type IncidentReasonComplementsOut = {
40
+ total: number;
41
+ incidentReasonComplements: IncidentReasonComplement[];
42
+ };
43
+ export type IncidentReasonComplementOut = {
44
+ incidentReasonComplement: IncidentReasonComplement;
45
+ };
46
+ export type IncidentReasonComplementIn = {
47
+ alphaNumeric?: AlphaNumeric;
48
+ eventReasonCodeKey: string;
49
+ description: string;
50
+ defaultValueType?: DefaultValueType;
51
+ incidentReasonId?: Number;
52
+ maxLength: number;
53
+ name: string;
54
+ readOnly?: boolean;
55
+ isActive?: boolean;
56
+ };
@@ -23,6 +23,7 @@ export type Environment = {
23
23
  apiEToolsAutoBilling?: string;
24
24
  apiExternalOperationsKey?: string;
25
25
  apiExternalOperationsUrl?: string;
26
+ apiInventoriesUrl?: string;
26
27
  apiInvoicesUrl?: string;
27
28
  apiOpenItemsUrl?: string;
28
29
  apiReportsUrl?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@experteam-mx/ngx-services",
3
- "version": "18.5.7",
3
+ "version": "18.5.8",
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
@@ -7,6 +7,7 @@ export * from './lib/apis/api-catalogs.service';
7
7
  export * from './lib/apis/api-companies.service';
8
8
  export * from './lib/apis/api-e-tools-auto-billing.service';
9
9
  export * from './lib/apis/api-external-pickups.service';
10
+ export * from './lib/apis/api-inventories.service';
10
11
  export * from './lib/apis/api-invoices.service';
11
12
  export * from './lib/apis/api-open-items.service';
12
13
  export * from './lib/apis/api-reports.service';
@@ -22,6 +23,9 @@ export * from './lib/apis/models/api-companies.types';
22
23
  export * from './lib/apis/models/api-e-tools-auto-billing.interfaces';
23
24
  export * from './lib/apis/models/api-e-tools-auto-billing.types';
24
25
  export * from './lib/apis/models/api-external-pickups.types';
26
+ export * from './lib/apis/models/api-inventories.interfaces';
27
+ export * from './lib/apis/models/api-inventories.enum';
28
+ export * from './lib/apis/models/api-inventories.types';
25
29
  export * from './lib/apis/models/api-invoices.interfaces';
26
30
  export * from './lib/apis/models/api-invoices.types';
27
31
  export * from './lib/apis/models/api-open-items.interfaces';