@experteam-mx/ngx-services 18.3.5 → 18.3.7
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-billing-do.service.mjs +41 -0
- package/esm2022/lib/apis/api-billing-mx.service.mjs +62 -0
- package/esm2022/lib/apis/api-companies.service.mjs +20 -21
- package/esm2022/lib/apis/api-external-pickups.service.mjs +72 -0
- package/esm2022/lib/apis/api-invoices.service.mjs +69 -9
- package/esm2022/lib/apis/api-open-items.service.mjs +6 -6
- package/esm2022/lib/apis/api-reports.service.mjs +11 -1
- package/esm2022/lib/apis/api-security.service.mjs +22 -33
- package/esm2022/lib/apis/api-shipments.service.mjs +3 -3
- package/esm2022/lib/apis/models/api-billing.interfaces.mjs +2 -0
- package/esm2022/lib/apis/models/api-billing.types.mjs +2 -0
- package/esm2022/lib/apis/models/api-catalog.interfaces.mjs +1 -1
- package/esm2022/lib/apis/models/api-companies.types.mjs +1 -1
- package/esm2022/lib/apis/models/api-external-pickups.types.mjs +2 -0
- package/esm2022/lib/apis/models/api-invoices.interfaces.mjs +1 -1
- package/esm2022/lib/apis/models/api-invoices.types.mjs +1 -1
- package/esm2022/lib/apis/models/api-open-items.interfaces.mjs +1 -1
- package/esm2022/lib/apis/models/api-open-items.types.mjs +1 -1
- package/esm2022/lib/apis/models/api-reports.types.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/ngx-services.models.mjs +1 -1
- package/esm2022/lib/websockets/web-sockets.service.mjs +115 -0
- package/esm2022/public-api.mjs +10 -1
- package/fesm2022/experteam-mx-ngx-services.mjs +469 -134
- package/fesm2022/experteam-mx-ngx-services.mjs.map +1 -1
- package/lib/apis/api-billing-do.service.d.ts +24 -0
- package/lib/apis/api-billing-mx.service.d.ts +39 -0
- package/lib/apis/api-companies.service.d.ts +9 -9
- package/lib/apis/api-external-pickups.service.d.ts +45 -0
- package/lib/apis/api-invoices.service.d.ts +52 -9
- package/lib/apis/api-open-items.service.d.ts +7 -7
- package/lib/apis/api-reports.service.d.ts +7 -0
- package/lib/apis/api-security.service.d.ts +21 -29
- package/lib/apis/api-shipments.service.d.ts +2 -2
- package/lib/apis/models/api-billing.interfaces.d.ts +41 -0
- package/lib/apis/models/api-billing.types.d.ts +17 -0
- package/lib/apis/models/api-catalog.interfaces.d.ts +6 -0
- package/lib/apis/models/api-companies.types.d.ts +7 -13
- package/lib/apis/models/api-external-pickups.types.d.ts +31 -0
- package/lib/apis/models/api-invoices.interfaces.d.ts +35 -1
- package/lib/apis/models/api-invoices.types.d.ts +28 -5
- package/lib/apis/models/api-open-items.interfaces.d.ts +2 -2
- package/lib/apis/models/api-open-items.types.d.ts +2 -2
- package/lib/apis/models/api-reports.types.d.ts +2 -3
- package/lib/apis/models/api-security.interfaces.d.ts +0 -4
- package/lib/apis/models/api-security.types.d.ts +8 -8
- package/lib/ngx-services.models.d.ts +10 -0
- package/lib/websockets/web-sockets.service.d.ts +49 -0
- package/package.json +11 -2
- package/public-api.d.ts +7 -0
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
import { Module, Role, RoleType, Session, User } from './api-security.interfaces';
|
|
2
|
-
export type
|
|
2
|
+
export type AuthLoginIn = {
|
|
3
3
|
username: string;
|
|
4
4
|
password: string;
|
|
5
5
|
role?: string;
|
|
6
6
|
};
|
|
7
|
-
export type
|
|
7
|
+
export type AuthLoginOut = {
|
|
8
8
|
access_token: string;
|
|
9
9
|
token_type: string;
|
|
10
10
|
expires_in: number;
|
|
11
11
|
};
|
|
12
|
-
export type
|
|
12
|
+
export type SessionIn = {
|
|
13
13
|
modelType: string;
|
|
14
14
|
modelId: number;
|
|
15
15
|
token?: string;
|
|
16
16
|
};
|
|
17
|
-
export type
|
|
17
|
+
export type SessionOut = {
|
|
18
18
|
session: Session;
|
|
19
19
|
};
|
|
20
20
|
export type GetUserOut = {
|
|
21
21
|
user: User;
|
|
22
22
|
};
|
|
23
|
-
export interface
|
|
23
|
+
export interface AuthMeOut extends GetUserOut {
|
|
24
24
|
}
|
|
25
25
|
export type ChangeLanguageIn = {
|
|
26
26
|
languageId: number;
|
|
@@ -36,10 +36,10 @@ export type Pivot = {
|
|
|
36
36
|
module_id: string;
|
|
37
37
|
permission_id: string;
|
|
38
38
|
};
|
|
39
|
-
export type
|
|
39
|
+
export type RoleOut = {
|
|
40
40
|
role: Role;
|
|
41
41
|
};
|
|
42
|
-
export type
|
|
42
|
+
export type RoleIn = {
|
|
43
43
|
name: string;
|
|
44
44
|
role_type_id: number;
|
|
45
45
|
company_country_id: number;
|
|
@@ -51,7 +51,7 @@ export type RoleTypesOut = {
|
|
|
51
51
|
role_types: RoleType[];
|
|
52
52
|
total: number;
|
|
53
53
|
};
|
|
54
|
-
export type
|
|
54
|
+
export type ModulesOut = {
|
|
55
55
|
modules: Module[];
|
|
56
56
|
total: number;
|
|
57
57
|
};
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
export type Environment = {
|
|
2
|
+
apiBillingMX: string;
|
|
3
|
+
apiBillingDO: string;
|
|
2
4
|
apiCompaniesUrl: string;
|
|
5
|
+
apiExternalOperationsKey: string;
|
|
6
|
+
apiExternalOperationsUrl: string;
|
|
3
7
|
apiInvoicesUrl: string;
|
|
4
8
|
apiOpenItemsUrl: string;
|
|
5
9
|
apiReportsUrl: string;
|
|
@@ -8,4 +12,10 @@ export type Environment = {
|
|
|
8
12
|
authCookie: string;
|
|
9
13
|
cacheTtl?: number;
|
|
10
14
|
secretKey: string;
|
|
15
|
+
sockets?: {
|
|
16
|
+
app_key: string;
|
|
17
|
+
debug?: boolean;
|
|
18
|
+
port: number;
|
|
19
|
+
url: string;
|
|
20
|
+
};
|
|
11
21
|
};
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { Channel } from 'pusher-js';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import { Environment } from '../ngx-services.models';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class WebSocketsService {
|
|
6
|
+
private environments;
|
|
7
|
+
private pusher;
|
|
8
|
+
constructor(environments: Environment);
|
|
9
|
+
/**
|
|
10
|
+
* Publishes an event to the specified channel with the given data.
|
|
11
|
+
*
|
|
12
|
+
* @param {Channel} channel - The channel instance where the event will be published.
|
|
13
|
+
* @param {string} eventName - The name of the event to be published.
|
|
14
|
+
* @param {T} data - The payload data to be sent with the event.
|
|
15
|
+
* @return {Promise<boolean>} A promise that resolves to a boolean indicating
|
|
16
|
+
* whether the event was successfully triggered on the channel.
|
|
17
|
+
*/
|
|
18
|
+
pub<T>(channel: Channel, eventName: string, data: T): Promise<boolean>;
|
|
19
|
+
/**
|
|
20
|
+
* Subscribes to a specified channel, retrying multiple times upon failure.
|
|
21
|
+
*
|
|
22
|
+
* @param {string} channelName - The name of the channel to be subscribed to.
|
|
23
|
+
* @return {Promise<Channel>} A promise that resolves to the subscribed channel object if successful.
|
|
24
|
+
* @throws {Error} If the subscription fails after the maximum number of retry attempts.
|
|
25
|
+
*/
|
|
26
|
+
channelSub(channelName: string): Promise<Channel>;
|
|
27
|
+
/**
|
|
28
|
+
* Binds an event listener to a specified event on a given channel using Pusher or a Channel object,
|
|
29
|
+
* and returns an Observable that emits event data of type T.
|
|
30
|
+
*
|
|
31
|
+
* @param {Channel|string} channel - The channel to bind the event to. It can be a Channel object or a string representing the channel name.
|
|
32
|
+
* @param {string} event - The name of the event to bind to the channel.
|
|
33
|
+
* @return {Observable<T>} An Observable that emits data of type T when the specified event is triggered.
|
|
34
|
+
*/
|
|
35
|
+
eventBind<T>(channel: Channel | string, event: string): Observable<T>;
|
|
36
|
+
/**
|
|
37
|
+
* Unbinds an event from the specified channel and returns an observable
|
|
38
|
+
* that emits data when the event callback is triggered.
|
|
39
|
+
*
|
|
40
|
+
* @param {Channel} channel - The channel object from which the event should be unbound.
|
|
41
|
+
* @param {string} event - The name of the event to unbind.
|
|
42
|
+
* @return {Observable<T>} An observable that emits data from the unbound event callback.
|
|
43
|
+
*/
|
|
44
|
+
eventUnbind<T>(channel: Channel, event: string): Observable<unknown>;
|
|
45
|
+
private connect;
|
|
46
|
+
private wait;
|
|
47
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<WebSocketsService, never>;
|
|
48
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<WebSocketsService>;
|
|
49
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@experteam-mx/ngx-services",
|
|
3
|
-
"version": "18.3.
|
|
3
|
+
"version": "18.3.7",
|
|
4
4
|
"description": "Angular common services for Experteam apps",
|
|
5
5
|
"author": "Experteam Cía. Ltda.",
|
|
6
6
|
"keywords": [
|
|
@@ -22,6 +22,14 @@
|
|
|
22
22
|
{
|
|
23
23
|
"name": "Byron Bladimir Taco Taco",
|
|
24
24
|
"email": "metal82fest@hotmail.com"
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"name": "Gianni Santucci",
|
|
28
|
+
"email": "gianni.d.santucci@gmail.com"
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"name": "Jefferson Morocho",
|
|
32
|
+
"email": "morochoji5@hotmail.com"
|
|
25
33
|
}
|
|
26
34
|
],
|
|
27
35
|
"repository": {
|
|
@@ -35,7 +43,8 @@
|
|
|
35
43
|
"peerDependencies": {
|
|
36
44
|
"@angular/common": "^18.2.0",
|
|
37
45
|
"@angular/core": "^18.2.0",
|
|
38
|
-
"ngx-cookie-service": "^18.0.0"
|
|
46
|
+
"ngx-cookie-service": "^18.0.0",
|
|
47
|
+
"pusher-js": "^7.5.0"
|
|
39
48
|
},
|
|
40
49
|
"sideEffects": false,
|
|
41
50
|
"module": "fesm2022/experteam-mx-ngx-services.mjs",
|
package/public-api.d.ts
CHANGED
|
@@ -1,12 +1,17 @@
|
|
|
1
1
|
export * from './lib/ngx-services.module';
|
|
2
|
+
export * from './lib/apis/api-billing-do.service';
|
|
3
|
+
export * from './lib/apis/api-billing-mx.service';
|
|
2
4
|
export * from './lib/apis/api-companies.service';
|
|
5
|
+
export * from './lib/apis/api-external-pickups.service';
|
|
3
6
|
export * from './lib/apis/api-invoices.service';
|
|
4
7
|
export * from './lib/apis/api-open-items.service';
|
|
5
8
|
export * from './lib/apis/api-reports.service';
|
|
6
9
|
export * from './lib/apis/api-security.service';
|
|
7
10
|
export * from './lib/apis/api-shipments.service';
|
|
11
|
+
export * from './lib/apis/models/api-billing.types';
|
|
8
12
|
export * from './lib/apis/models/api-companies.interfaces';
|
|
9
13
|
export * from './lib/apis/models/api-companies.types';
|
|
14
|
+
export * from './lib/apis/models/api-external-pickups.types';
|
|
10
15
|
export * from './lib/apis/models/api-invoices.interfaces';
|
|
11
16
|
export * from './lib/apis/models/api-invoices.types';
|
|
12
17
|
export * from './lib/apis/models/api-open-items.interfaces';
|
|
@@ -16,8 +21,10 @@ export * from './lib/apis/models/api-security.interfaces';
|
|
|
16
21
|
export * from './lib/apis/models/api-security.types';
|
|
17
22
|
export * from './lib/apis/models/api-shipments.types';
|
|
18
23
|
export * from './lib/apis/models/api.models';
|
|
24
|
+
export * from './lib/websockets/web-sockets.service';
|
|
19
25
|
export * from './lib/cypher/crypto.service';
|
|
20
26
|
export * from './lib/interceptors/api-headers.interceptor';
|
|
21
27
|
export * from './lib/interceptors/api-token.interceptor';
|
|
22
28
|
export * from './lib/interceptors/http-caching.interceptor';
|
|
29
|
+
export * from 'pusher-js';
|
|
23
30
|
export * from './lib/helpers/http';
|