@experteam-mx/ngx-services 0.1.1 → 15.1.0
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.
- package/esm2020/lib/apis/api-companies.service.mjs +255 -0
- package/esm2020/lib/apis/api-security.service.mjs +53 -53
- package/esm2020/lib/apis/models/api-catalog.interfaces.mjs +2 -0
- package/esm2020/lib/apis/models/api-companies.interfaces.mjs +2 -0
- package/esm2020/lib/apis/models/api-companies.types.mjs +2 -0
- package/esm2020/lib/apis/models/api-security.interfaces.mjs +2 -0
- package/esm2020/lib/apis/models/api-security.types.mjs +2 -0
- package/esm2020/lib/apis/models/api.models.mjs +2 -0
- package/esm2020/lib/helpers/http.mjs +27 -6
- package/esm2020/lib/interceptors/api-token.interceptor.mjs +10 -6
- package/esm2020/lib/interceptors/http-caching.interceptor.mjs +38 -0
- package/esm2020/lib/ngx-services.models.mjs +1 -1
- package/esm2020/public-api.mjs +10 -3
- package/fesm2015/experteam-mx-ngx-services.mjs +445 -129
- package/fesm2015/experteam-mx-ngx-services.mjs.map +1 -1
- package/fesm2020/experteam-mx-ngx-services.mjs +438 -129
- package/fesm2020/experteam-mx-ngx-services.mjs.map +1 -1
- package/lib/apis/api-companies.service.d.ts +163 -0
- package/lib/apis/api-security.service.d.ts +37 -37
- package/lib/apis/models/api-catalog.interfaces.d.ts +71 -0
- package/lib/apis/models/api-companies.interfaces.d.ts +380 -0
- package/lib/apis/models/api-companies.types.d.ts +75 -0
- package/lib/apis/{api-security.models.d.ts → models/api-security.interfaces.d.ts} +3 -38
- package/lib/apis/models/api-security.types.d.ts +30 -0
- package/lib/apis/{api.models.d.ts → models/api.models.d.ts} +3 -11
- package/lib/helpers/http.d.ts +11 -4
- package/lib/interceptors/api-token.interceptor.d.ts +3 -1
- package/lib/interceptors/http-caching.interceptor.d.ts +12 -0
- package/lib/ngx-services.models.d.ts +2 -0
- package/package.json +3 -2
- package/public-api.d.ts +8 -2
- package/esm2020/experteam-ngx-services.mjs +0 -5
- package/esm2020/lib/apis/api-catalog.models.mjs +0 -2
- package/esm2020/lib/apis/api-security.models.mjs +0 -2
- package/esm2020/lib/apis/api.models.mjs +0 -2
- package/fesm2015/experteam-ngx-services.mjs +0 -283
- package/fesm2015/experteam-ngx-services.mjs.map +0 -1
- package/fesm2020/experteam-ngx-services.mjs +0 -280
- package/fesm2020/experteam-ngx-services.mjs.map +0 -1
- package/lib/apis/api-catalog.models.d.ts +0 -5
|
@@ -0,0 +1,380 @@
|
|
|
1
|
+
import { LaravelModel } from './api.models';
|
|
2
|
+
import { Currency, State } from './api-catalog.interfaces';
|
|
3
|
+
export interface Account extends LaravelModel {
|
|
4
|
+
number: string;
|
|
5
|
+
description: string;
|
|
6
|
+
account_type_id: number;
|
|
7
|
+
country_id: number;
|
|
8
|
+
is_default: boolean;
|
|
9
|
+
}
|
|
10
|
+
export interface Company extends LaravelModel {
|
|
11
|
+
id: number;
|
|
12
|
+
created_at: string;
|
|
13
|
+
updated_at: string;
|
|
14
|
+
name: string;
|
|
15
|
+
contact_name: string;
|
|
16
|
+
contact_email: string;
|
|
17
|
+
contact_phone: string;
|
|
18
|
+
state: string;
|
|
19
|
+
city: string;
|
|
20
|
+
county_name: string;
|
|
21
|
+
zip_code: string;
|
|
22
|
+
address1: string;
|
|
23
|
+
address2: string;
|
|
24
|
+
address3: string;
|
|
25
|
+
is_active: boolean;
|
|
26
|
+
}
|
|
27
|
+
export interface CompanyCountry extends LaravelModel {
|
|
28
|
+
company_id: number;
|
|
29
|
+
country_id: number;
|
|
30
|
+
headquarters_city_code: string;
|
|
31
|
+
lp_code: string;
|
|
32
|
+
company: Company;
|
|
33
|
+
contact_name: string;
|
|
34
|
+
contact_email: string;
|
|
35
|
+
contact_phone_code: string;
|
|
36
|
+
contact_phone_number: string;
|
|
37
|
+
state: string;
|
|
38
|
+
city: string;
|
|
39
|
+
zip_code: string;
|
|
40
|
+
county_name: string;
|
|
41
|
+
address1: string;
|
|
42
|
+
address2: string;
|
|
43
|
+
address3: string;
|
|
44
|
+
}
|
|
45
|
+
export interface CompanyCountryTax extends LaravelModel {
|
|
46
|
+
code: string;
|
|
47
|
+
name: string;
|
|
48
|
+
percentage: number;
|
|
49
|
+
company_country_id: number;
|
|
50
|
+
shipment_scopes: number[];
|
|
51
|
+
base_percentage: number;
|
|
52
|
+
tax_type: string;
|
|
53
|
+
}
|
|
54
|
+
export interface CountryCurrencyRate extends CountryReferenceCurrency {
|
|
55
|
+
rate: number;
|
|
56
|
+
}
|
|
57
|
+
export interface CountryReference extends LaravelModel {
|
|
58
|
+
language_id: number;
|
|
59
|
+
decimal_point: number;
|
|
60
|
+
decimal_separator: string;
|
|
61
|
+
thousands_separator: string;
|
|
62
|
+
use_billing: boolean;
|
|
63
|
+
use_payments: boolean;
|
|
64
|
+
restricted_import_countries: number[];
|
|
65
|
+
currency_id: number;
|
|
66
|
+
max_quantity_document_piece: number;
|
|
67
|
+
max_quantity_package_piece: number;
|
|
68
|
+
weight_restriction_piece: number;
|
|
69
|
+
restriction_shipment: number;
|
|
70
|
+
restriction_dimension: number;
|
|
71
|
+
max_declared_value: number;
|
|
72
|
+
territories: number[];
|
|
73
|
+
some_openings: boolean;
|
|
74
|
+
locale: string;
|
|
75
|
+
country_id: number;
|
|
76
|
+
label_printer_name: string;
|
|
77
|
+
receipt_printer_name: string;
|
|
78
|
+
others_printer_name: string;
|
|
79
|
+
}
|
|
80
|
+
export interface CountryReferenceCurrency extends LaravelModel {
|
|
81
|
+
country_id: number;
|
|
82
|
+
currency_id: number;
|
|
83
|
+
is_local: boolean;
|
|
84
|
+
can_transact: boolean;
|
|
85
|
+
code: string;
|
|
86
|
+
name: string;
|
|
87
|
+
is_default: boolean;
|
|
88
|
+
is_declared_insured: boolean;
|
|
89
|
+
currency: Currency;
|
|
90
|
+
}
|
|
91
|
+
export interface Employee extends LaravelModel {
|
|
92
|
+
name: string;
|
|
93
|
+
last_name: string;
|
|
94
|
+
number: string;
|
|
95
|
+
company_id: number;
|
|
96
|
+
country_id: number;
|
|
97
|
+
external: boolean;
|
|
98
|
+
phone_code: string;
|
|
99
|
+
phone_number: string;
|
|
100
|
+
is_active: boolean;
|
|
101
|
+
password: string;
|
|
102
|
+
roles: string[];
|
|
103
|
+
locations: Location[];
|
|
104
|
+
}
|
|
105
|
+
export interface Exchange extends LaravelModel {
|
|
106
|
+
company_country_currency_id: number;
|
|
107
|
+
valid_since: string;
|
|
108
|
+
valid_until: string | null;
|
|
109
|
+
value: number;
|
|
110
|
+
type: string;
|
|
111
|
+
}
|
|
112
|
+
export interface Installation extends LaravelModel {
|
|
113
|
+
system_id: number;
|
|
114
|
+
mac_address: string;
|
|
115
|
+
ip_address: string;
|
|
116
|
+
location_id: number;
|
|
117
|
+
}
|
|
118
|
+
export interface Location extends LaravelModel {
|
|
119
|
+
name: string;
|
|
120
|
+
contact_name: string;
|
|
121
|
+
email: string;
|
|
122
|
+
facility_code: string;
|
|
123
|
+
location_code: string;
|
|
124
|
+
type: string;
|
|
125
|
+
state_name: string;
|
|
126
|
+
state_id: number;
|
|
127
|
+
state_code: string;
|
|
128
|
+
city_name: string;
|
|
129
|
+
zip_code: string;
|
|
130
|
+
county_name: string;
|
|
131
|
+
address1: string;
|
|
132
|
+
address2: string;
|
|
133
|
+
address3: string;
|
|
134
|
+
service_area_code: string;
|
|
135
|
+
iata_code: string;
|
|
136
|
+
phone_code: string;
|
|
137
|
+
phone_number: string;
|
|
138
|
+
gmt_offset: string;
|
|
139
|
+
company_country_id: number;
|
|
140
|
+
country_zone_id: number;
|
|
141
|
+
country_region_id: number;
|
|
142
|
+
management_area_id: number;
|
|
143
|
+
google_maps_id: string;
|
|
144
|
+
route_number: string;
|
|
145
|
+
locker_enabled: boolean;
|
|
146
|
+
queue_manager_enabled: boolean;
|
|
147
|
+
commission_account: string;
|
|
148
|
+
service_point_id: string;
|
|
149
|
+
is_occurs: boolean;
|
|
150
|
+
accounts: Account[];
|
|
151
|
+
company_country: CompanyCountry;
|
|
152
|
+
state: State;
|
|
153
|
+
}
|
|
154
|
+
export interface LocationEmployee extends LaravelModel {
|
|
155
|
+
location_id: number;
|
|
156
|
+
employee_id: number;
|
|
157
|
+
is_active: boolean;
|
|
158
|
+
is_supervisor: boolean;
|
|
159
|
+
employee: Employee;
|
|
160
|
+
location: Location;
|
|
161
|
+
}
|
|
162
|
+
export interface Parameter {
|
|
163
|
+
name: string;
|
|
164
|
+
value: any;
|
|
165
|
+
status?: string;
|
|
166
|
+
}
|
|
167
|
+
export interface SupplyEntity extends LaravelModel {
|
|
168
|
+
name: string;
|
|
169
|
+
description: string;
|
|
170
|
+
country_id: number;
|
|
171
|
+
enabled_for_dropoff: boolean;
|
|
172
|
+
supply_type: SupplyType;
|
|
173
|
+
supply_packing: SupplyPacking;
|
|
174
|
+
}
|
|
175
|
+
export interface SupplyPacking extends LaravelModel {
|
|
176
|
+
value: number;
|
|
177
|
+
weight: number;
|
|
178
|
+
height: number;
|
|
179
|
+
depth: number;
|
|
180
|
+
width: number;
|
|
181
|
+
emobile_code: string | null;
|
|
182
|
+
}
|
|
183
|
+
export interface SupplyType extends LaravelModel {
|
|
184
|
+
name: string;
|
|
185
|
+
}
|
|
186
|
+
export interface Workflow {
|
|
187
|
+
page: string;
|
|
188
|
+
enabled: boolean;
|
|
189
|
+
}
|
|
190
|
+
export interface LocationEmployee extends LaravelModel {
|
|
191
|
+
location_id: number;
|
|
192
|
+
employee_id: number;
|
|
193
|
+
is_active: boolean;
|
|
194
|
+
is_supervisor: boolean;
|
|
195
|
+
employee: Employee;
|
|
196
|
+
location: Location;
|
|
197
|
+
}
|
|
198
|
+
export interface Employee extends LaravelModel {
|
|
199
|
+
name: string;
|
|
200
|
+
last_name: string;
|
|
201
|
+
number: string;
|
|
202
|
+
company_id: number;
|
|
203
|
+
country_id: number;
|
|
204
|
+
external: boolean;
|
|
205
|
+
phone_code: string;
|
|
206
|
+
phone_number: string;
|
|
207
|
+
is_active: boolean;
|
|
208
|
+
password: string;
|
|
209
|
+
roles: string[];
|
|
210
|
+
locations: Location[];
|
|
211
|
+
}
|
|
212
|
+
export interface Location extends LaravelModel {
|
|
213
|
+
name: string;
|
|
214
|
+
contact_name: string;
|
|
215
|
+
email: string;
|
|
216
|
+
facility_code: string;
|
|
217
|
+
location_code: string;
|
|
218
|
+
type: string;
|
|
219
|
+
state_name: string;
|
|
220
|
+
state_id: number;
|
|
221
|
+
state_code: string;
|
|
222
|
+
city_name: string;
|
|
223
|
+
zip_code: string;
|
|
224
|
+
county_name: string;
|
|
225
|
+
address1: string;
|
|
226
|
+
address2: string;
|
|
227
|
+
address3: string;
|
|
228
|
+
service_area_code: string;
|
|
229
|
+
iata_code: string;
|
|
230
|
+
phone_code: string;
|
|
231
|
+
phone_number: string;
|
|
232
|
+
gmt_offset: string;
|
|
233
|
+
company_country_id: number;
|
|
234
|
+
country_zone_id: number;
|
|
235
|
+
country_region_id: number;
|
|
236
|
+
management_area_id: number;
|
|
237
|
+
google_maps_id: string;
|
|
238
|
+
route_number: string;
|
|
239
|
+
locker_enabled: boolean;
|
|
240
|
+
queue_manager_enabled: boolean;
|
|
241
|
+
commission_account: string;
|
|
242
|
+
service_point_id: string;
|
|
243
|
+
is_occurs: boolean;
|
|
244
|
+
accounts: Account[];
|
|
245
|
+
company_country: CompanyCountry;
|
|
246
|
+
state: State;
|
|
247
|
+
}
|
|
248
|
+
export interface Company extends LaravelModel {
|
|
249
|
+
id: number;
|
|
250
|
+
created_at: string;
|
|
251
|
+
updated_at: string;
|
|
252
|
+
name: string;
|
|
253
|
+
contact_name: string;
|
|
254
|
+
contact_email: string;
|
|
255
|
+
contact_phone: string;
|
|
256
|
+
state: string;
|
|
257
|
+
city: string;
|
|
258
|
+
county_name: string;
|
|
259
|
+
zip_code: string;
|
|
260
|
+
address1: string;
|
|
261
|
+
address2: string;
|
|
262
|
+
address3: string;
|
|
263
|
+
is_active: boolean;
|
|
264
|
+
}
|
|
265
|
+
export interface CompanyCountry extends LaravelModel {
|
|
266
|
+
company_id: number;
|
|
267
|
+
country_id: number;
|
|
268
|
+
headquarters_city_code: string;
|
|
269
|
+
lp_code: string;
|
|
270
|
+
company: Company;
|
|
271
|
+
contact_name: string;
|
|
272
|
+
contact_email: string;
|
|
273
|
+
contact_phone_code: string;
|
|
274
|
+
contact_phone_number: string;
|
|
275
|
+
state: string;
|
|
276
|
+
city: string;
|
|
277
|
+
zip_code: string;
|
|
278
|
+
county_name: string;
|
|
279
|
+
address1: string;
|
|
280
|
+
address2: string;
|
|
281
|
+
address3: string;
|
|
282
|
+
}
|
|
283
|
+
export interface Installation extends LaravelModel {
|
|
284
|
+
system_id: number;
|
|
285
|
+
mac_address: string;
|
|
286
|
+
ip_address: string;
|
|
287
|
+
location_id: number;
|
|
288
|
+
}
|
|
289
|
+
export interface SupplyEntity extends LaravelModel {
|
|
290
|
+
name: string;
|
|
291
|
+
description: string;
|
|
292
|
+
country_id: number;
|
|
293
|
+
enabled_for_dropoff: boolean;
|
|
294
|
+
supply_type: SupplyType;
|
|
295
|
+
supply_packing: SupplyPacking;
|
|
296
|
+
}
|
|
297
|
+
export interface SupplyType extends LaravelModel {
|
|
298
|
+
name: string;
|
|
299
|
+
}
|
|
300
|
+
export interface SupplyPacking extends LaravelModel {
|
|
301
|
+
value: number;
|
|
302
|
+
weight: number;
|
|
303
|
+
height: number;
|
|
304
|
+
depth: number;
|
|
305
|
+
width: number;
|
|
306
|
+
emobile_code: string | null;
|
|
307
|
+
}
|
|
308
|
+
export interface Employee extends LaravelModel {
|
|
309
|
+
name: string;
|
|
310
|
+
last_name: string;
|
|
311
|
+
number: string;
|
|
312
|
+
company_id: number;
|
|
313
|
+
country_id: number;
|
|
314
|
+
external: boolean;
|
|
315
|
+
phone_code: string;
|
|
316
|
+
phone_number: string;
|
|
317
|
+
is_active: boolean;
|
|
318
|
+
password: string;
|
|
319
|
+
roles: string[];
|
|
320
|
+
locations: Location[];
|
|
321
|
+
}
|
|
322
|
+
export interface CountryReferenceCurrency extends LaravelModel {
|
|
323
|
+
country_id: number;
|
|
324
|
+
currency_id: number;
|
|
325
|
+
is_local: boolean;
|
|
326
|
+
can_transact: boolean;
|
|
327
|
+
code: string;
|
|
328
|
+
name: string;
|
|
329
|
+
is_default: boolean;
|
|
330
|
+
is_declared_insured: boolean;
|
|
331
|
+
currency: Currency;
|
|
332
|
+
}
|
|
333
|
+
export interface CompanyCountryTax extends LaravelModel {
|
|
334
|
+
code: string;
|
|
335
|
+
name: string;
|
|
336
|
+
percentage: number;
|
|
337
|
+
company_country_id: number;
|
|
338
|
+
shipment_scopes: number[];
|
|
339
|
+
base_percentage: number;
|
|
340
|
+
tax_type: string;
|
|
341
|
+
}
|
|
342
|
+
export interface Exchange extends LaravelModel {
|
|
343
|
+
company_country_currency_id: number;
|
|
344
|
+
valid_since: string;
|
|
345
|
+
valid_until: string | null;
|
|
346
|
+
value: number;
|
|
347
|
+
type: string;
|
|
348
|
+
}
|
|
349
|
+
export interface Parameter {
|
|
350
|
+
name: string;
|
|
351
|
+
value: any;
|
|
352
|
+
status?: string;
|
|
353
|
+
}
|
|
354
|
+
export interface CountryReference extends LaravelModel {
|
|
355
|
+
language_id: number;
|
|
356
|
+
decimal_point: number;
|
|
357
|
+
decimal_separator: string;
|
|
358
|
+
thousands_separator: string;
|
|
359
|
+
use_billing: boolean;
|
|
360
|
+
use_payments: boolean;
|
|
361
|
+
restricted_import_countries: number[];
|
|
362
|
+
currency_id: number;
|
|
363
|
+
max_quantity_document_piece: number;
|
|
364
|
+
max_quantity_package_piece: number;
|
|
365
|
+
weight_restriction_piece: number;
|
|
366
|
+
restriction_shipment: number;
|
|
367
|
+
restriction_dimension: number;
|
|
368
|
+
max_declared_value: number;
|
|
369
|
+
territories: number[];
|
|
370
|
+
some_openings: boolean;
|
|
371
|
+
locale: string;
|
|
372
|
+
country_id: number;
|
|
373
|
+
label_printer_name: string;
|
|
374
|
+
receipt_printer_name: string;
|
|
375
|
+
others_printer_name: string;
|
|
376
|
+
}
|
|
377
|
+
export interface Workflow {
|
|
378
|
+
page: string;
|
|
379
|
+
enabled: boolean;
|
|
380
|
+
}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { Account, CompanyCountry, CompanyCountryTax, CountryReference, CountryReferenceCurrency, Employee, Exchange, Installation, Location, LocationEmployee, Parameter, SupplyEntity, Workflow } from './api-companies.interfaces';
|
|
2
|
+
export type LocationEmployeesData = {
|
|
3
|
+
location_employees: LocationEmployee[];
|
|
4
|
+
total: number;
|
|
5
|
+
};
|
|
6
|
+
export type InstallationsData = {
|
|
7
|
+
installations: Installation[];
|
|
8
|
+
total: number;
|
|
9
|
+
};
|
|
10
|
+
export type InstallationData = {
|
|
11
|
+
installation: Installation;
|
|
12
|
+
};
|
|
13
|
+
export type LocationsData = {
|
|
14
|
+
locations: Location[];
|
|
15
|
+
total: number;
|
|
16
|
+
};
|
|
17
|
+
export type LocationData = {
|
|
18
|
+
location: Location;
|
|
19
|
+
};
|
|
20
|
+
export type SupplyEntitiesData = {
|
|
21
|
+
supply_entities: SupplyEntity[];
|
|
22
|
+
total: number;
|
|
23
|
+
};
|
|
24
|
+
export type EmployeesData = {
|
|
25
|
+
employees: Employee[];
|
|
26
|
+
total: number;
|
|
27
|
+
};
|
|
28
|
+
export type EmployeeData = {
|
|
29
|
+
employee: Employee;
|
|
30
|
+
};
|
|
31
|
+
export type CompanyCountriesData = {
|
|
32
|
+
company_countries: CompanyCountry[];
|
|
33
|
+
total: number;
|
|
34
|
+
};
|
|
35
|
+
export type CompanyCountryData = {
|
|
36
|
+
company_country: CompanyCountry;
|
|
37
|
+
};
|
|
38
|
+
export type CountryReferenceCurrenciesData = {
|
|
39
|
+
country_reference_currencies: CountryReferenceCurrency[];
|
|
40
|
+
total: number;
|
|
41
|
+
};
|
|
42
|
+
export type CompanyCountryTaxesData = {
|
|
43
|
+
company_country_taxes: CompanyCountryTax[];
|
|
44
|
+
total: number;
|
|
45
|
+
};
|
|
46
|
+
export type ExchangesData = {
|
|
47
|
+
exchanges: Exchange[];
|
|
48
|
+
total: number;
|
|
49
|
+
};
|
|
50
|
+
export type AccountEntitiesData = {
|
|
51
|
+
account_entities: Account[];
|
|
52
|
+
total: number;
|
|
53
|
+
};
|
|
54
|
+
export type ParametersProps = {
|
|
55
|
+
paramNames: string[];
|
|
56
|
+
};
|
|
57
|
+
export type ParametersData = {
|
|
58
|
+
parameters: Parameter[];
|
|
59
|
+
total: number;
|
|
60
|
+
};
|
|
61
|
+
export type ParameterValueProps = {
|
|
62
|
+
paramName: string;
|
|
63
|
+
};
|
|
64
|
+
export type ParameterValueData = {
|
|
65
|
+
value: any;
|
|
66
|
+
};
|
|
67
|
+
export type CountryReferencesData = {
|
|
68
|
+
country_references: CountryReference[];
|
|
69
|
+
};
|
|
70
|
+
export type CountryReferenceData = {
|
|
71
|
+
country_reference: CountryReference;
|
|
72
|
+
};
|
|
73
|
+
export type WorkflowsData = {
|
|
74
|
+
workflow: Workflow[];
|
|
75
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { LaravelModel } from './api.models';
|
|
2
|
-
import { Language } from './api-catalog.
|
|
2
|
+
import { Language } from './api-catalog.interfaces';
|
|
3
3
|
export interface Session extends LaravelModel {
|
|
4
4
|
name: string;
|
|
5
5
|
username: string;
|
|
@@ -12,7 +12,7 @@ export interface Session extends LaravelModel {
|
|
|
12
12
|
location_id: number;
|
|
13
13
|
installation_id: number;
|
|
14
14
|
company_country_id: number;
|
|
15
|
-
|
|
15
|
+
country_reference_currency_id: number;
|
|
16
16
|
opening_id: number;
|
|
17
17
|
locale: string;
|
|
18
18
|
permissions: string[];
|
|
@@ -45,7 +45,7 @@ export interface User extends LaravelModel {
|
|
|
45
45
|
username: string;
|
|
46
46
|
email: string;
|
|
47
47
|
model_type: string;
|
|
48
|
-
model_id:
|
|
48
|
+
model_id: number;
|
|
49
49
|
auth_type: string;
|
|
50
50
|
language_id: number;
|
|
51
51
|
permissions: string[];
|
|
@@ -53,38 +53,3 @@ export interface User extends LaravelModel {
|
|
|
53
53
|
session: Session;
|
|
54
54
|
language: Language;
|
|
55
55
|
}
|
|
56
|
-
export type LoginIn = {
|
|
57
|
-
username: string;
|
|
58
|
-
password: string;
|
|
59
|
-
role?: string;
|
|
60
|
-
};
|
|
61
|
-
export type LoginOut = {
|
|
62
|
-
access_token: string;
|
|
63
|
-
token_type: string;
|
|
64
|
-
expires_in: number;
|
|
65
|
-
};
|
|
66
|
-
export type CreateSessionIn = {
|
|
67
|
-
modelType: string;
|
|
68
|
-
modelId: number;
|
|
69
|
-
token?: string;
|
|
70
|
-
};
|
|
71
|
-
export type CreateSessionOut = {
|
|
72
|
-
session: Session;
|
|
73
|
-
};
|
|
74
|
-
export type GetUserIn = {
|
|
75
|
-
userId: number;
|
|
76
|
-
};
|
|
77
|
-
export type GetUserOut = {
|
|
78
|
-
user: User;
|
|
79
|
-
};
|
|
80
|
-
export interface MeOut extends GetUserOut {
|
|
81
|
-
}
|
|
82
|
-
export type GetUserInfoIn = {
|
|
83
|
-
token: string;
|
|
84
|
-
};
|
|
85
|
-
export type ChangeLanguageIn = {
|
|
86
|
-
languageId: number;
|
|
87
|
-
};
|
|
88
|
-
export type ChangeLanguageOut = {
|
|
89
|
-
user: User;
|
|
90
|
-
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { Session, User } from './api-security.interfaces';
|
|
2
|
+
export type LoginIn = {
|
|
3
|
+
username: string;
|
|
4
|
+
password: string;
|
|
5
|
+
role?: string;
|
|
6
|
+
};
|
|
7
|
+
export type LoginOut = {
|
|
8
|
+
access_token: string;
|
|
9
|
+
token_type: string;
|
|
10
|
+
expires_in: number;
|
|
11
|
+
};
|
|
12
|
+
export type CreateSessionIn = {
|
|
13
|
+
modelType: string;
|
|
14
|
+
modelId: number;
|
|
15
|
+
token?: string;
|
|
16
|
+
};
|
|
17
|
+
export type CreateSessionOut = {
|
|
18
|
+
session: Session;
|
|
19
|
+
};
|
|
20
|
+
export type GetUserOut = {
|
|
21
|
+
user: User;
|
|
22
|
+
};
|
|
23
|
+
export interface MeOut extends GetUserOut {
|
|
24
|
+
}
|
|
25
|
+
export type GetUserInfoIn = {
|
|
26
|
+
token: string;
|
|
27
|
+
};
|
|
28
|
+
export type ChangeLanguageIn = {
|
|
29
|
+
languageId: number;
|
|
30
|
+
};
|
|
@@ -5,17 +5,6 @@ export interface ApiSuccess<T> extends ApiResponse {
|
|
|
5
5
|
status: 'success';
|
|
6
6
|
data: T;
|
|
7
7
|
}
|
|
8
|
-
export interface ApiFail<T> extends ApiResponse {
|
|
9
|
-
status: 'fail';
|
|
10
|
-
data: T;
|
|
11
|
-
}
|
|
12
|
-
export interface ApiError extends ApiResponse {
|
|
13
|
-
status: 'error';
|
|
14
|
-
message: string;
|
|
15
|
-
}
|
|
16
|
-
export interface FailMessage {
|
|
17
|
-
message: string;
|
|
18
|
-
}
|
|
19
8
|
export interface ApiModel {
|
|
20
9
|
id: number;
|
|
21
10
|
}
|
|
@@ -29,3 +18,6 @@ export interface SymfonyModel extends ApiModel {
|
|
|
29
18
|
createdAt: Date | string;
|
|
30
19
|
updatedAt: Date | string;
|
|
31
20
|
}
|
|
21
|
+
export interface QueryParams {
|
|
22
|
+
[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
|
|
23
|
+
}
|
package/lib/helpers/http.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { HttpHeaders } from '@angular/common/http';
|
|
1
|
+
import { HttpHeaders, HttpParams } from '@angular/common/http';
|
|
2
|
+
import { QueryParams } from '../apis/models/api.models';
|
|
2
3
|
/**
|
|
3
4
|
* Convert an object of key-value pairs into a URL query string.
|
|
4
5
|
*
|
|
@@ -6,9 +7,15 @@ import { HttpHeaders } from '@angular/common/http';
|
|
|
6
7
|
*
|
|
7
8
|
* @return {string} - The generated query string.
|
|
8
9
|
*/
|
|
9
|
-
export declare const queryString: (params:
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
export declare const queryString: (params: QueryParams) => string;
|
|
11
|
+
/**
|
|
12
|
+
* Creates an instance of HttpParams using the provided params object.
|
|
13
|
+
*
|
|
14
|
+
* @param {Object} params - The object containing the params to the HttpParams constructor.
|
|
15
|
+
*
|
|
16
|
+
* @returns {HttpParams} - An instance of HttpParams created from the params object.
|
|
17
|
+
*/
|
|
18
|
+
export declare const httpParams: (params: QueryParams) => HttpParams;
|
|
12
19
|
/**
|
|
13
20
|
* Returns the headers for generating PDF files.
|
|
14
21
|
*
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { HttpEvent, HttpHandler, HttpInterceptor, HttpRequest } from '@angular/common/http';
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
3
|
import { CookieService } from 'ngx-cookie-service';
|
|
4
|
+
import { Environment } from '../ngx-services.models';
|
|
4
5
|
import * as i0 from "@angular/core";
|
|
5
6
|
export declare class ApiTokenInterceptor implements HttpInterceptor {
|
|
7
|
+
private environments;
|
|
6
8
|
private cookie;
|
|
7
|
-
constructor(cookie: CookieService);
|
|
9
|
+
constructor(environments: Environment, cookie: CookieService);
|
|
8
10
|
/**
|
|
9
11
|
* Intercepts the HTTP request and adds the Authorization header.
|
|
10
12
|
*
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { HttpEvent, HttpHandler, HttpInterceptor, HttpRequest } from '@angular/common/http';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import { Environment } from '../ngx-services.models';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class HttpCachingInterceptor implements HttpInterceptor {
|
|
6
|
+
private envs;
|
|
7
|
+
private cache;
|
|
8
|
+
constructor(envs: Environment);
|
|
9
|
+
intercept(req: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>>;
|
|
10
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<HttpCachingInterceptor, never>;
|
|
11
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<HttpCachingInterceptor>;
|
|
12
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@experteam-mx/ngx-services",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "15.1.0",
|
|
4
4
|
"description": "Angular common services for Experteam apps",
|
|
5
5
|
"author": "Experteam Cía. Ltda.",
|
|
6
6
|
"keywords": [
|
|
@@ -18,7 +18,8 @@
|
|
|
18
18
|
],
|
|
19
19
|
"repository": {
|
|
20
20
|
"type": "git",
|
|
21
|
-
"url": "https://git.dhl.com/EXPAM-CRA10/ngx-
|
|
21
|
+
"url": "https://git.dhl.com/EXPAM-CRA10/ngx-libraries.git",
|
|
22
|
+
"directory": "projects/experteam/ngx-services"
|
|
22
23
|
},
|
|
23
24
|
"peerDependencies": {
|
|
24
25
|
"@angular/common": "^15.2.0",
|
package/public-api.d.ts
CHANGED
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
export * from './lib/ngx-services.module';
|
|
2
|
+
export * from './lib/apis/api-companies.service';
|
|
2
3
|
export * from './lib/apis/api-security.service';
|
|
3
|
-
export * from './lib/apis/api
|
|
4
|
-
export * from './lib/
|
|
4
|
+
export * from './lib/apis/models/api.models';
|
|
5
|
+
export * from './lib/apis/models/api-companies.interfaces';
|
|
6
|
+
export * from './lib/apis/models/api-companies.types';
|
|
7
|
+
export * from './lib/apis/models/api-security.interfaces';
|
|
8
|
+
export * from './lib/apis/models/api-security.types';
|
|
5
9
|
export * from './lib/interceptors/api-headers.interceptor';
|
|
10
|
+
export * from './lib/interceptors/api-token.interceptor';
|
|
11
|
+
export * from './lib/interceptors/http-caching.interceptor';
|
|
6
12
|
export * from './lib/helpers/http';
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Generated bundle index. Do not edit.
|
|
3
|
-
*/
|
|
4
|
-
export * from './public-api';
|
|
5
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZXhwZXJ0ZWFtLW5neC1zZXJ2aWNlcy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3Byb2plY3RzL2V4cGVydGVhbS9uZ3gtc2VydmljZXMvc3JjL2V4cGVydGVhbS1uZ3gtc2VydmljZXMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7O0dBRUc7QUFFSCxjQUFjLGNBQWMsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogR2VuZXJhdGVkIGJ1bmRsZSBpbmRleC4gRG8gbm90IGVkaXQuXG4gKi9cblxuZXhwb3J0ICogZnJvbSAnLi9wdWJsaWMtYXBpJztcbiJdfQ==
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
export {};
|
|
2
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXBpLWNhdGFsb2cubW9kZWxzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvZXhwZXJ0ZWFtL25neC1zZXJ2aWNlcy9zcmMvbGliL2FwaXMvYXBpLWNhdGFsb2cubW9kZWxzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiIiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBTeW1mb255TW9kZWwgfSBmcm9tICcuL2FwaS5tb2RlbHMnXHJcblxyXG4vLyBtb2RlbHNcclxuZXhwb3J0IGludGVyZmFjZSBMYW5ndWFnZSBleHRlbmRzIFN5bWZvbnlNb2RlbCB7XHJcbiAgY29kZTogc3RyaW5nXHJcbiAgbmFtZTogc3RyaW5nXHJcbn1cclxuIl19
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
export {};
|
|
2
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXBpLXNlY3VyaXR5Lm1vZGVscy5qcyIsInNvdXJjZVJvb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