@experteam-mx/ngx-services 18.4.2 → 18.4.4
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/esm2022/lib/apis/api-catalogs.service.mjs +43 -0
- package/esm2022/lib/apis/api-security.service.mjs +43 -21
- package/esm2022/lib/apis/models/api-catalog.interfaces.mjs +1 -1
- package/esm2022/lib/apis/models/api-catalog.types.mjs +2 -0
- package/esm2022/lib/apis/models/api-reports.interfaces.mjs +1 -1
- package/esm2022/lib/apis/models/api-security.interfaces.mjs +1 -1
- package/esm2022/lib/apis/models/api-security.types.mjs +1 -1
- package/esm2022/lib/apis/models/api.models.mjs +1 -1
- package/esm2022/lib/ngx-services.models.mjs +1 -1
- package/esm2022/public-api.mjs +4 -1
- package/fesm2022/experteam-mx-ngx-services.mjs +82 -21
- package/fesm2022/experteam-mx-ngx-services.mjs.map +1 -1
- package/lib/apis/api-catalogs.service.d.ts +26 -0
- package/lib/apis/api-security.service.d.ts +28 -9
- package/lib/apis/models/api-catalog.interfaces.d.ts +6 -1
- package/lib/apis/models/api-catalog.types.d.ts +5 -0
- package/lib/apis/models/api-reports.interfaces.d.ts +3 -2
- package/lib/apis/models/api-security.interfaces.d.ts +2 -6
- package/lib/apis/models/api-security.types.d.ts +33 -4
- package/lib/apis/models/api.models.d.ts +1 -1
- package/lib/ngx-services.models.d.ts +1 -0
- package/package.json +1 -1
- package/public-api.d.ts +3 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { QueryParams } from './models/api.models';
|
|
2
|
-
import { AuthLoginIn, AuthLoginOut, AuthMeOut, ChangeLanguageIn, GetUserOut, ModulesOut, RoleIn, RoleOut, RolesOut, RoleTypesOut, SessionIn, SessionOut } from './models/api-security.types';
|
|
2
|
+
import { AuthLoginIn, AuthLoginOut, AuthMeOut, AuthUserLoginIn, ChangeLanguageIn, GetUserOut, GetUsersOut, ModulesOut, PutUsersIn, PutUsersOut, RoleIn, RoleOut, RolesOut, RoleTypesOut, SessionIn, SessionOut } from './models/api-security.types';
|
|
3
3
|
import { HttpClient } from '@angular/common/http';
|
|
4
4
|
import { Environment } from '../ngx-services.models';
|
|
5
5
|
import { Observable } from 'rxjs';
|
|
@@ -17,17 +17,19 @@ export declare class ApiSecurityService {
|
|
|
17
17
|
*/
|
|
18
18
|
get url(): string;
|
|
19
19
|
/**
|
|
20
|
-
*
|
|
20
|
+
* Handles the login authentication request by sending the login data to the authentication endpoint.
|
|
21
21
|
*
|
|
22
|
-
* @param {
|
|
23
|
-
* @
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
22
|
+
* @param {AuthLoginIn} body The payload containing login credentials.
|
|
23
|
+
* @return {Observable<AuthLoginOut>} An observable emitting the authentication response data.
|
|
24
|
+
*/
|
|
25
|
+
postAuthLogin(body: AuthLoginIn): Observable<AuthLoginOut>;
|
|
26
|
+
/**
|
|
27
|
+
* Handles the user login process by sending user credentials to the authentication endpoint.
|
|
27
28
|
*
|
|
28
|
-
* @
|
|
29
|
+
* @param {AuthUserLoginIn} body - The request payload containing user login details such as username and password.
|
|
30
|
+
* @return {Observable<AuthLoginOut>} An observable that emits the authenticated user's login data upon successful login.
|
|
29
31
|
*/
|
|
30
|
-
|
|
32
|
+
postAuthUserLogin(body: AuthUserLoginIn): Observable<AuthLoginOut>;
|
|
31
33
|
/**
|
|
32
34
|
* Logs out the current user by making a POST request to the logout endpoint.
|
|
33
35
|
*
|
|
@@ -69,6 +71,23 @@ export declare class ApiSecurityService {
|
|
|
69
71
|
* @return {Observable<GetUserOut>} An observable containing the user information.
|
|
70
72
|
*/
|
|
71
73
|
getUser(id: number): Observable<GetUserOut>;
|
|
74
|
+
/**
|
|
75
|
+
* Fetches a list of users from the server based on the specified query parameters.
|
|
76
|
+
*
|
|
77
|
+
* @param {QueryParams} params - The query parameters to filter the list of users.
|
|
78
|
+
* @return {Observable<GetUsersOut>} An observable that emits the list of users retrieved from the server.
|
|
79
|
+
*/
|
|
80
|
+
getUsers(params: QueryParams): Observable<GetUsersOut>;
|
|
81
|
+
/**
|
|
82
|
+
* Updates the information of a specified user on the server.
|
|
83
|
+
*
|
|
84
|
+
* @param {Object} params - The parameter object.
|
|
85
|
+
* @param {Object} params.user - The user object containing updated data.
|
|
86
|
+
* @param {string} params.user.id - The unique identifier of the user to be updated.
|
|
87
|
+
*
|
|
88
|
+
* @return {void} This method does not return a value.
|
|
89
|
+
*/
|
|
90
|
+
putUsers({ user }: PutUsersIn): Observable<PutUsersOut>;
|
|
72
91
|
/**
|
|
73
92
|
* Changes the language for the authenticated user.
|
|
74
93
|
*
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { SymfonyModel } from './api.models';
|
|
1
|
+
import { SymfonyModel, Translations } from './api.models';
|
|
2
2
|
export interface Country extends SymfonyModel {
|
|
3
3
|
name: string;
|
|
4
4
|
code: string;
|
|
@@ -75,3 +75,8 @@ export interface IdentificationType extends SymfonyModel {
|
|
|
75
75
|
identificationType: number | null;
|
|
76
76
|
name: string;
|
|
77
77
|
}
|
|
78
|
+
export interface OperationType extends SymfonyModel {
|
|
79
|
+
code: string;
|
|
80
|
+
name: string;
|
|
81
|
+
translations?: Translations;
|
|
82
|
+
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { LaravelModel, Translations } from './api.models';
|
|
2
2
|
import { DocumentPayment } from './api-invoices.interfaces';
|
|
3
|
+
import { OperationType } from './api-catalog.interfaces';
|
|
3
4
|
export interface CollectionPayment extends LaravelModel {
|
|
4
5
|
_id: number;
|
|
5
6
|
country_code: string;
|
|
@@ -20,14 +21,14 @@ export interface CollectionPayment extends LaravelModel {
|
|
|
20
21
|
document_type: DocumentType;
|
|
21
22
|
document_category_id: number;
|
|
22
23
|
document_category: DocumentCategory;
|
|
23
|
-
collection_origin: string;
|
|
24
|
-
collection_type: string;
|
|
25
24
|
receipt_number: string;
|
|
26
25
|
customer_name: string;
|
|
27
26
|
account: string;
|
|
28
27
|
amount: number;
|
|
29
28
|
currency_id: number;
|
|
30
29
|
currency_code: string;
|
|
30
|
+
operation_type_id: number;
|
|
31
|
+
operation_type: OperationType;
|
|
31
32
|
}
|
|
32
33
|
export interface DocumentType extends LaravelModel {
|
|
33
34
|
_id: number;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { LaravelModel } from './api.models';
|
|
2
|
-
import { Language } from './api-catalog.interfaces';
|
|
3
2
|
import { Pivot } from './api-security.types';
|
|
4
3
|
export interface Session extends LaravelModel {
|
|
5
4
|
name: string;
|
|
@@ -43,15 +42,12 @@ export interface Permission extends LaravelModel {
|
|
|
43
42
|
export interface User extends LaravelModel {
|
|
44
43
|
name: string;
|
|
45
44
|
username: string;
|
|
46
|
-
email: string;
|
|
47
45
|
model_type: string;
|
|
48
46
|
model_id: number;
|
|
49
47
|
auth_type: string;
|
|
50
48
|
language_id: number;
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
session: Session;
|
|
54
|
-
language: Language;
|
|
49
|
+
email: string;
|
|
50
|
+
roles: Role[];
|
|
55
51
|
}
|
|
56
52
|
export interface Module extends LaravelModel {
|
|
57
53
|
name: string;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Module, Role, RoleType, Session, User } from './api-security.interfaces';
|
|
1
|
+
import { Module, Permission, Role, RoleType, Session, User } from './api-security.interfaces';
|
|
2
2
|
export type AuthLoginIn = {
|
|
3
3
|
username: string;
|
|
4
4
|
password: string;
|
|
5
|
-
role?:
|
|
5
|
+
role?: number;
|
|
6
6
|
system_name?: string;
|
|
7
7
|
};
|
|
8
8
|
export type AuthLoginOut = {
|
|
@@ -10,6 +10,9 @@ export type AuthLoginOut = {
|
|
|
10
10
|
token_type: string;
|
|
11
11
|
expires_in: number;
|
|
12
12
|
};
|
|
13
|
+
export type AuthUserLoginIn = {
|
|
14
|
+
username: string;
|
|
15
|
+
};
|
|
13
16
|
export type SessionIn = {
|
|
14
17
|
modelType: string;
|
|
15
18
|
modelId: number;
|
|
@@ -18,11 +21,37 @@ export type SessionIn = {
|
|
|
18
21
|
export type SessionOut = {
|
|
19
22
|
session: Session;
|
|
20
23
|
};
|
|
24
|
+
export type PutUsersIn = {
|
|
25
|
+
user: User;
|
|
26
|
+
};
|
|
27
|
+
export type PutUsersOut = {
|
|
28
|
+
user: User;
|
|
29
|
+
};
|
|
21
30
|
export type GetUserOut = {
|
|
22
31
|
user: User;
|
|
23
32
|
};
|
|
24
|
-
export
|
|
25
|
-
|
|
33
|
+
export type GetUsersOut = {
|
|
34
|
+
users: User[];
|
|
35
|
+
total: number;
|
|
36
|
+
};
|
|
37
|
+
export type AuthMeOut = {
|
|
38
|
+
user: {
|
|
39
|
+
id: number;
|
|
40
|
+
name: string;
|
|
41
|
+
username: string;
|
|
42
|
+
model_type: string;
|
|
43
|
+
model_id: number;
|
|
44
|
+
is_active: boolean;
|
|
45
|
+
created_at: string;
|
|
46
|
+
updated_at: string;
|
|
47
|
+
auth_type: string;
|
|
48
|
+
language_id: number;
|
|
49
|
+
email: string;
|
|
50
|
+
role: Role;
|
|
51
|
+
permissions: Permission[];
|
|
52
|
+
session: Session | null;
|
|
53
|
+
};
|
|
54
|
+
};
|
|
26
55
|
export type ChangeLanguageIn = {
|
|
27
56
|
languageId: number;
|
|
28
57
|
};
|
|
@@ -17,6 +17,7 @@ import { InjectionToken } from '@angular/core';
|
|
|
17
17
|
export type Environment = {
|
|
18
18
|
apiBillingDO?: string;
|
|
19
19
|
apiBillingMX?: string;
|
|
20
|
+
apiCatalogsUrl?: string;
|
|
20
21
|
apiCompaniesUrl?: string;
|
|
21
22
|
apiExternalOperationsKey?: string;
|
|
22
23
|
apiExternalOperationsUrl?: string;
|
package/package.json
CHANGED
package/public-api.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ export * from './lib/ngx-services.models';
|
|
|
2
2
|
export * from './lib/ngx-services.module';
|
|
3
3
|
export * from './lib/apis/api-billing-do.service';
|
|
4
4
|
export * from './lib/apis/api-billing-mx.service';
|
|
5
|
+
export * from './lib/apis/api-catalogs.service';
|
|
5
6
|
export * from './lib/apis/api-companies.service';
|
|
6
7
|
export * from './lib/apis/api-external-pickups.service';
|
|
7
8
|
export * from './lib/apis/api-invoices.service';
|
|
@@ -10,6 +11,8 @@ export * from './lib/apis/api-reports.service';
|
|
|
10
11
|
export * from './lib/apis/api-security.service';
|
|
11
12
|
export * from './lib/apis/api-shipments.service';
|
|
12
13
|
export * from './lib/apis/models/api-billing.types';
|
|
14
|
+
export * from './lib/apis/models/api-catalog.interfaces';
|
|
15
|
+
export * from './lib/apis/models/api-catalog.types';
|
|
13
16
|
export * from './lib/apis/models/api-companies.interfaces';
|
|
14
17
|
export * from './lib/apis/models/api-companies.types';
|
|
15
18
|
export * from './lib/apis/models/api-external-pickups.types';
|