@experteam-mx/ngx-services 16.1.1 → 18.0.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.
Files changed (72) hide show
  1. package/README.md +8 -8
  2. package/esm2022/lib/apis/api-companies.service.mjs +9 -7
  3. package/esm2022/lib/apis/api-security.service.mjs +15 -12
  4. package/esm2022/lib/apis/models/api-catalog.interfaces.mjs +2 -0
  5. package/esm2022/lib/apis/models/api-companies.interfaces.mjs +1 -1
  6. package/esm2022/lib/apis/models/api-security.interfaces.mjs +1 -1
  7. package/esm2022/lib/apis/models/api.models.mjs +1 -1
  8. package/esm2022/lib/helpers/http.mjs +4 -2
  9. package/esm2022/lib/interceptors/api-headers.interceptor.mjs +4 -4
  10. package/esm2022/lib/interceptors/api-token.interceptor.mjs +14 -8
  11. package/esm2022/lib/interceptors/http-caching.interceptor.mjs +8 -7
  12. package/esm2022/lib/ngx-services.models.mjs +1 -1
  13. package/esm2022/lib/ngx-services.module.mjs +7 -11
  14. package/esm2022/public-api.mjs +2 -9
  15. package/fesm2022/experteam-mx-ngx-services.mjs +53 -165
  16. package/fesm2022/experteam-mx-ngx-services.mjs.map +1 -1
  17. package/index.d.ts +5 -5
  18. package/lib/apis/api-companies.service.d.ts +163 -163
  19. package/lib/apis/api-security.service.d.ts +79 -79
  20. package/lib/apis/models/{api-catalogs.interfaces.d.ts → api-catalog.interfaces.d.ts} +71 -75
  21. package/lib/apis/models/api-companies.interfaces.d.ts +380 -380
  22. package/lib/apis/models/api-companies.types.d.ts +75 -75
  23. package/lib/apis/models/api-security.interfaces.d.ts +55 -55
  24. package/lib/apis/models/api-security.types.d.ts +30 -30
  25. package/lib/apis/models/api.models.d.ts +23 -23
  26. package/lib/helpers/http.d.ts +38 -38
  27. package/lib/interceptors/api-headers.interceptor.d.ts +16 -16
  28. package/lib/interceptors/api-token.interceptor.d.ts +21 -19
  29. package/lib/interceptors/http-caching.interceptor.d.ts +12 -12
  30. package/lib/ngx-services.models.d.ts +6 -9
  31. package/lib/ngx-services.module.d.ts +16 -17
  32. package/package.json +10 -16
  33. package/public-api.d.ts +12 -19
  34. package/esm2020/experteam-mx-ngx-services.mjs +0 -5
  35. package/esm2020/lib/apis/api-catalogs.service.mjs +0 -42
  36. package/esm2020/lib/apis/api-companies.service.mjs +0 -255
  37. package/esm2020/lib/apis/api-external-ops.service.mjs +0 -53
  38. package/esm2020/lib/apis/api-security.service.mjs +0 -128
  39. package/esm2020/lib/apis/models/api-catalogs.interfaces.mjs +0 -2
  40. package/esm2020/lib/apis/models/api-catalogs.types.mjs +0 -2
  41. package/esm2020/lib/apis/models/api-companies.interfaces.mjs +0 -2
  42. package/esm2020/lib/apis/models/api-companies.types.mjs +0 -2
  43. package/esm2020/lib/apis/models/api-external-ops.interfaces.mjs +0 -2
  44. package/esm2020/lib/apis/models/api-external-ops.types.mjs +0 -2
  45. package/esm2020/lib/apis/models/api-security.interfaces.mjs +0 -2
  46. package/esm2020/lib/apis/models/api-security.types.mjs +0 -2
  47. package/esm2020/lib/apis/models/api.models.mjs +0 -2
  48. package/esm2020/lib/helpers/http.mjs +0 -64
  49. package/esm2020/lib/interceptors/api-headers.interceptor.mjs +0 -34
  50. package/esm2020/lib/interceptors/api-key.interceptor.mjs +0 -38
  51. package/esm2020/lib/interceptors/api-token.interceptor.mjs +0 -35
  52. package/esm2020/lib/interceptors/http-caching.interceptor.mjs +0 -38
  53. package/esm2020/lib/ngx-services.models.mjs +0 -2
  54. package/esm2020/lib/ngx-services.module.mjs +0 -37
  55. package/esm2020/public-api.mjs +0 -27
  56. package/esm2022/lib/apis/api-catalogs.service.mjs +0 -42
  57. package/esm2022/lib/apis/api-external-ops.service.mjs +0 -53
  58. package/esm2022/lib/apis/models/api-catalogs.interfaces.mjs +0 -2
  59. package/esm2022/lib/apis/models/api-catalogs.types.mjs +0 -2
  60. package/esm2022/lib/apis/models/api-external-ops.interfaces.mjs +0 -2
  61. package/esm2022/lib/apis/models/api-external-ops.types.mjs +0 -2
  62. package/esm2022/lib/interceptors/api-key.interceptor.mjs +0 -38
  63. package/fesm2015/experteam-mx-ngx-services.mjs +0 -723
  64. package/fesm2015/experteam-mx-ngx-services.mjs.map +0 -1
  65. package/fesm2020/experteam-mx-ngx-services.mjs +0 -705
  66. package/fesm2020/experteam-mx-ngx-services.mjs.map +0 -1
  67. package/lib/apis/api-catalogs.service.d.ts +0 -26
  68. package/lib/apis/api-external-ops.service.d.ts +0 -34
  69. package/lib/apis/models/api-catalogs.types.d.ts +0 -5
  70. package/lib/apis/models/api-external-ops.interfaces.d.ts +0 -23
  71. package/lib/apis/models/api-external-ops.types.d.ts +0 -18
  72. package/lib/interceptors/api-key.interceptor.d.ts +0 -19
@@ -1,75 +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
+ 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,55 +1,55 @@
1
- import { LaravelModel } from './api.models';
2
- import { Language } from './api-catalogs.interfaces';
3
- export interface Session extends LaravelModel {
4
- name: string;
5
- username: string;
6
- email: string;
7
- model_type: string;
8
- model_id: number;
9
- auth_type: string;
10
- language_id: number;
11
- country_id: number;
12
- location_id: number;
13
- installation_id: number;
14
- company_country_id: number;
15
- country_reference_currency_id: number;
16
- opening_id: number;
17
- locale: string;
18
- permissions: string[];
19
- roles: Role[];
20
- session: Session;
21
- }
22
- export interface Role extends LaravelModel {
23
- code: string;
24
- name: string;
25
- guard_name: string;
26
- permissions: Permission[];
27
- role_type_id: number;
28
- role_type: RoleType;
29
- company_country_id: number;
30
- }
31
- export interface RoleType extends LaravelModel {
32
- name: string;
33
- level: number;
34
- }
35
- export interface Permission extends LaravelModel {
36
- name: string;
37
- guard_name: string;
38
- pivot: {
39
- role_id: number;
40
- permission_id: number;
41
- };
42
- }
43
- export interface User extends LaravelModel {
44
- name: string;
45
- username: string;
46
- email: string;
47
- model_type: string;
48
- model_id: number;
49
- auth_type: string;
50
- language_id: number;
51
- permissions: string[];
52
- role: Role;
53
- session: Session;
54
- language: Language;
55
- }
1
+ import { LaravelModel } from './api.models';
2
+ import { Language } from './api-catalog.interfaces';
3
+ export interface Session extends LaravelModel {
4
+ name: string;
5
+ username: string;
6
+ email: string;
7
+ model_type: string;
8
+ model_id: number;
9
+ auth_type: string;
10
+ language_id: number;
11
+ country_id: number;
12
+ location_id: number;
13
+ installation_id: number;
14
+ company_country_id: number;
15
+ country_reference_currency_id: number;
16
+ opening_id: number;
17
+ locale: string;
18
+ permissions: string[];
19
+ roles: Role[];
20
+ session: Session;
21
+ }
22
+ export interface Role extends LaravelModel {
23
+ code: string;
24
+ name: string;
25
+ guard_name: string;
26
+ permissions: Permission[];
27
+ role_type_id: number;
28
+ role_type: RoleType;
29
+ company_country_id: number;
30
+ }
31
+ export interface RoleType extends LaravelModel {
32
+ name: string;
33
+ level: number;
34
+ }
35
+ export interface Permission extends LaravelModel {
36
+ name: string;
37
+ guard_name: string;
38
+ pivot: {
39
+ role_id: number;
40
+ permission_id: number;
41
+ };
42
+ }
43
+ export interface User extends LaravelModel {
44
+ name: string;
45
+ username: string;
46
+ email: string;
47
+ model_type: string;
48
+ model_id: number;
49
+ auth_type: string;
50
+ language_id: number;
51
+ permissions: string[];
52
+ role: Role;
53
+ session: Session;
54
+ language: Language;
55
+ }
@@ -1,30 +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
- };
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
+ };
@@ -1,23 +1,23 @@
1
- export interface ApiResponse {
2
- status: 'success' | 'fail' | 'error';
3
- }
4
- export interface ApiSuccess<T> extends ApiResponse {
5
- status: 'success';
6
- data: T;
7
- }
8
- export interface ApiModel {
9
- id: number;
10
- }
11
- export interface LaravelModel extends ApiModel {
12
- is_active: boolean;
13
- created_at: Date | string;
14
- updated_at: Date | string;
15
- }
16
- export interface SymfonyModel extends ApiModel {
17
- isActive: boolean;
18
- createdAt: Date | string;
19
- updatedAt: Date | string;
20
- }
21
- export interface QueryParams {
22
- [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
23
- }
1
+ export interface ApiResponse {
2
+ status: 'success' | 'fail' | 'error';
3
+ }
4
+ export interface ApiSuccess<T> extends ApiResponse {
5
+ status: 'success';
6
+ data: T;
7
+ }
8
+ export interface ApiModel {
9
+ id: number;
10
+ }
11
+ export interface LaravelModel extends ApiModel {
12
+ is_active: boolean;
13
+ created_at: Date | string;
14
+ updated_at: Date | string;
15
+ }
16
+ export interface SymfonyModel extends ApiModel {
17
+ isActive: boolean;
18
+ createdAt: Date | string;
19
+ updatedAt: Date | string;
20
+ }
21
+ export type QueryParams = {
22
+ [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
23
+ };
@@ -1,38 +1,38 @@
1
- import { HttpHeaders, HttpParams } from '@angular/common/http';
2
- import { QueryParams } from '../apis/models/api.models';
3
- /**
4
- * Convert an object of key-value pairs into a URL query string.
5
- *
6
- * @param {Object} params - The key-value pairs to converted into a query string.
7
- *
8
- * @return {string} - The generated query string.
9
- */
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;
19
- /**
20
- * Returns the headers for generating PDF files.
21
- *
22
- * @param {string} format - The format of the headers, 'object' or 'http_header'.
23
- *
24
- * @returns {HttpHeaders | { [header: string]: string | string[] }} - The headers for generating PDF files.
25
- */
26
- export declare const pdfHeaders: (format?: 'object' | 'http_header') => HttpHeaders | {
27
- [header: string]: string | string[];
28
- };
29
- /**
30
- * Returns the headers for generating XML files.
31
- *
32
- * @param {string} format - The format of the headers, 'object' or 'http_header'.
33
- *
34
- * @returns {HttpHeaders | { [header: string]: string | string[] }} - The headers for generating XML files.
35
- */
36
- export declare const xmlHeaders: (format?: 'object' | 'http_header') => HttpHeaders | {
37
- [header: string]: string | string[];
38
- };
1
+ import { HttpHeaders, HttpParams } from '@angular/common/http';
2
+ import { QueryParams } from '../apis/models/api.models';
3
+ /**
4
+ * Convert an object of key-value pairs into a URL query string.
5
+ *
6
+ * @param {Object} params - The key-value pairs to converted into a query string.
7
+ *
8
+ * @return {string} - The generated query string.
9
+ */
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;
19
+ /**
20
+ * Returns the headers for generating PDF files.
21
+ *
22
+ * @param {string} format - The format of the headers, 'object' or 'http_header'.
23
+ *
24
+ * @returns {HttpHeaders | { [header: string]: string | string[] }} - The headers for generating PDF files.
25
+ */
26
+ export declare const pdfHeaders: (format?: "object" | "http_header") => HttpHeaders | {
27
+ [header: string]: string | string[];
28
+ };
29
+ /**
30
+ * Returns the headers for generating XML files.
31
+ *
32
+ * @param {string} format - The format of the headers, 'object' or 'http_header'.
33
+ *
34
+ * @returns {HttpHeaders | { [header: string]: string | string[] }} - The headers for generating XML files.
35
+ */
36
+ export declare const xmlHeaders: (format?: "object" | "http_header") => HttpHeaders | {
37
+ [header: string]: string | string[];
38
+ };
@@ -1,16 +1,16 @@
1
- import { HttpEvent, HttpHandler, HttpInterceptor, HttpRequest } from '@angular/common/http';
2
- import { Observable } from 'rxjs';
3
- import * as i0 from "@angular/core";
4
- export declare class ApiHeadersInterceptor implements HttpInterceptor {
5
- /**
6
- * Intercepts HTTP requests and adds common headers.
7
- *
8
- * @param {HttpRequest<unknown>} request - The HTTP request intercepted.
9
- * @param {HttpHandler} next - The next handler in the chain.
10
- *
11
- * @returns {Observable<HttpEvent<unknown>>} - Observable of the HTTP event after interception.
12
- */
13
- intercept(request: HttpRequest<unknown>, next: HttpHandler): Observable<HttpEvent<unknown>>;
14
- static ɵfac: i0.ɵɵFactoryDeclaration<ApiHeadersInterceptor, never>;
15
- static ɵprov: i0.ɵɵInjectableDeclaration<ApiHeadersInterceptor>;
16
- }
1
+ import { HttpEvent, HttpHandler, HttpInterceptor, HttpRequest } from '@angular/common/http';
2
+ import { Observable } from 'rxjs';
3
+ import * as i0 from "@angular/core";
4
+ export declare class ApiHeadersInterceptor implements HttpInterceptor {
5
+ /**
6
+ * Intercepts HTTP requests and adds common headers.
7
+ *
8
+ * @param {HttpRequest<unknown>} request - The HTTP request intercepted.
9
+ * @param {HttpHandler} next - The next handler in the chain.
10
+ *
11
+ * @returns {Observable<HttpEvent<unknown>>} - Observable of the HTTP event after interception.
12
+ */
13
+ intercept(request: HttpRequest<unknown>, next: HttpHandler): Observable<HttpEvent<unknown>>;
14
+ static ɵfac: i0.ɵɵFactoryDeclaration<ApiHeadersInterceptor, never>;
15
+ static ɵprov: i0.ɵɵInjectableDeclaration<ApiHeadersInterceptor>;
16
+ }
@@ -1,19 +1,21 @@
1
- import { HttpEvent, HttpHandler, HttpInterceptor, HttpRequest } from '@angular/common/http';
2
- import { Observable } from 'rxjs';
3
- import { CookieService } from 'ngx-cookie-service';
4
- import * as i0 from "@angular/core";
5
- export declare class ApiTokenInterceptor implements HttpInterceptor {
6
- private cookie;
7
- constructor(cookie: CookieService);
8
- /**
9
- * Intercepts the HTTP request and adds the Authorization header.
10
- *
11
- * @param {HttpRequest<unknown>} request - The HTTP request to intercept.
12
- * @param {HttpHandler} next - The next HTTP handler in the chain.
13
- *
14
- * @returns {Observable<HttpEvent<unknown>>} - An observable containing the HTTP event.
15
- */
16
- intercept(request: HttpRequest<unknown>, next: HttpHandler): Observable<HttpEvent<unknown>>;
17
- static ɵfac: i0.ɵɵFactoryDeclaration<ApiTokenInterceptor, never>;
18
- static ɵprov: i0.ɵɵInjectableDeclaration<ApiTokenInterceptor>;
19
- }
1
+ import { HttpEvent, HttpHandler, HttpInterceptor, HttpRequest } from '@angular/common/http';
2
+ import { Observable } from 'rxjs';
3
+ import { CookieService } from 'ngx-cookie-service';
4
+ import { Environment } from '../ngx-services.models';
5
+ import * as i0 from "@angular/core";
6
+ export declare class ApiTokenInterceptor implements HttpInterceptor {
7
+ private environments;
8
+ private cookie;
9
+ constructor(environments: Environment, cookie: CookieService);
10
+ /**
11
+ * Intercepts the HTTP request and adds the Authorization header.
12
+ *
13
+ * @param {HttpRequest<unknown>} request - The HTTP request to intercept.
14
+ * @param {HttpHandler} next - The next HTTP handler in the chain.
15
+ *
16
+ * @returns {Observable<HttpEvent<unknown>>} - An observable containing the HTTP event.
17
+ */
18
+ intercept(request: HttpRequest<unknown>, next: HttpHandler): Observable<HttpEvent<unknown>>;
19
+ static ɵfac: i0.ɵɵFactoryDeclaration<ApiTokenInterceptor, never>;
20
+ static ɵprov: i0.ɵɵInjectableDeclaration<ApiTokenInterceptor>;
21
+ }
@@ -1,12 +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
- }
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
+ }
@@ -1,9 +1,6 @@
1
- export type Environment = {
2
- cacheTtl?: number;
3
- keyName?: string;
4
- keyValue?: string;
5
- apiCatalogsUrl?: string;
6
- apiCompaniesUrl?: string;
7
- apiExternalOps?: string;
8
- apiSecurityUrl?: string;
9
- };
1
+ export type Environment = {
2
+ cacheTtl?: number;
3
+ tokenName: string;
4
+ apiSecurityUrl: string;
5
+ apiCompaniesUrl: string;
6
+ };
@@ -1,17 +1,16 @@
1
- import { ModuleWithProviders } from '@angular/core';
2
- import { Environment } from './ngx-services.models';
3
- import * as i0 from "@angular/core";
4
- import * as i1 from "@angular/common/http";
5
- export declare class NgxServicesModule {
6
- /**
7
- * Returns a module with providers for the NgxServicesModule.
8
- *
9
- * @param {Environment} environment - The environment configuration object.
10
- *
11
- * @return {ModuleWithProviders<NgxServicesModule>} The module with providers for the NgxServicesModule.
12
- */
13
- static forRoot(environment: Environment): ModuleWithProviders<NgxServicesModule>;
14
- static ɵfac: i0.ɵɵFactoryDeclaration<NgxServicesModule, never>;
15
- static ɵmod: i0.ɵɵNgModuleDeclaration<NgxServicesModule, never, [typeof i1.HttpClientModule], never>;
16
- static ɵinj: i0.ɵɵInjectorDeclaration<NgxServicesModule>;
17
- }
1
+ import { ModuleWithProviders } from '@angular/core';
2
+ import { Environment } from './ngx-services.models';
3
+ import * as i0 from "@angular/core";
4
+ export declare class NgxServicesModule {
5
+ /**
6
+ * Returns a module with providers for the NgxServicesModule.
7
+ *
8
+ * @param {Environment} environment - The environment configuration object.
9
+ *
10
+ * @return {ModuleWithProviders<NgxServicesModule>} The module with providers for the NgxServicesModule.
11
+ */
12
+ static forRoot(environment: Environment): ModuleWithProviders<NgxServicesModule>;
13
+ static ɵfac: i0.ɵɵFactoryDeclaration<NgxServicesModule, never>;
14
+ static ɵmod: i0.ɵɵNgModuleDeclaration<NgxServicesModule, never, never, never>;
15
+ static ɵinj: i0.ɵɵInjectorDeclaration<NgxServicesModule>;
16
+ }
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@experteam-mx/ngx-services",
3
- "version": "16.1.1",
3
+ "version": "18.0.0",
4
4
  "description": "Angular common services for Experteam apps",
5
5
  "author": "Experteam Cía. Ltda.",
6
6
  "keywords": [
7
7
  "angular",
8
- "angular-16",
8
+ "angular-18",
9
9
  "ng",
10
10
  "service",
11
11
  "angular-service"
@@ -18,23 +18,19 @@
18
18
  ],
19
19
  "repository": {
20
20
  "type": "git",
21
- "url": "https://git.dhl.com/EXPAM-CRA10/ngx-services.git",
21
+ "url": "https://git.dhl.com/EXPAM-CRA10/ngx-libraries.git",
22
22
  "directory": "projects/experteam/ngx-services"
23
23
  },
24
24
  "peerDependencies": {
25
- "@angular/common": "^16.2.0",
26
- "@angular/core": "^16.2.0",
27
- "ngx-cookie-service": "^16.1.0"
25
+ "@angular/common": "^18.2.0",
26
+ "@angular/core": "^18.2.0",
27
+ "ngx-cookie-service": "^18.0.0"
28
28
  },
29
29
  "dependencies": {
30
30
  "tslib": "^2.3.0"
31
31
  },
32
32
  "sideEffects": false,
33
- "module": "fesm2015/experteam-mx-ngx-services.mjs",
34
- "es2020": "fesm2020/experteam-mx-ngx-services.mjs",
35
- "esm2020": "esm2020/experteam-mx-ngx-services.mjs",
36
- "fesm2020": "fesm2020/experteam-mx-ngx-services.mjs",
37
- "fesm2015": "fesm2015/experteam-mx-ngx-services.mjs",
33
+ "module": "fesm2022/experteam-mx-ngx-services.mjs",
38
34
  "typings": "index.d.ts",
39
35
  "exports": {
40
36
  "./package.json": {
@@ -42,11 +38,9 @@
42
38
  },
43
39
  ".": {
44
40
  "types": "./index.d.ts",
45
- "esm2020": "./esm2020/experteam-mx-ngx-services.mjs",
46
- "es2020": "./fesm2020/experteam-mx-ngx-services.mjs",
47
- "es2015": "./fesm2015/experteam-mx-ngx-services.mjs",
48
- "node": "./fesm2015/experteam-mx-ngx-services.mjs",
49
- "default": "./fesm2020/experteam-mx-ngx-services.mjs"
41
+ "esm2022": "./esm2022/experteam-mx-ngx-services.mjs",
42
+ "esm": "./esm2022/experteam-mx-ngx-services.mjs",
43
+ "default": "./fesm2022/experteam-mx-ngx-services.mjs"
50
44
  }
51
45
  }
52
46
  }