@experteam-mx/ngx-services 18.7.24 → 18.7.25
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-events.service.mjs +53 -0
- package/esm2022/lib/apis/models/api-events.enum.mjs +7 -0
- package/esm2022/lib/apis/models/api-events.interfaces.mjs +2 -0
- package/esm2022/lib/apis/models/api-events.types.mjs +2 -0
- package/esm2022/lib/ngx-services.models.mjs +1 -1
- package/esm2022/public-api.mjs +5 -1
- package/fesm2022/experteam-mx-ngx-services.mjs +57 -1
- package/fesm2022/experteam-mx-ngx-services.mjs.map +1 -1
- package/lib/apis/api-events.service.d.ts +33 -0
- package/lib/apis/models/api-events.enum.d.ts +5 -0
- package/lib/apis/models/api-events.interfaces.d.ts +21 -0
- package/lib/apis/models/api-events.types.d.ts +14 -0
- package/lib/ngx-services.models.d.ts +2 -0
- package/package.json +1 -1
- package/public-api.d.ts +4 -0
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { HttpClient } from '@angular/common/http';
|
|
2
|
+
import { Environment } from '../ngx-services.models';
|
|
3
|
+
import { Observable } from 'rxjs';
|
|
4
|
+
import { OperationModuleEndIn, OperationModuleOut, OperationModuleStartIn } from './models/api-events.types';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
export declare class ApiEventsService {
|
|
7
|
+
private environments;
|
|
8
|
+
private http;
|
|
9
|
+
constructor(environments: Environment, http: HttpClient);
|
|
10
|
+
/**
|
|
11
|
+
* Gets the API endpoint URL for Events from the environments configuration.
|
|
12
|
+
*
|
|
13
|
+
* @return {string} The URL for the Events API. Returns an empty string if not defined.
|
|
14
|
+
*/
|
|
15
|
+
get url(): string;
|
|
16
|
+
/**
|
|
17
|
+
* Sends a request to start an event
|
|
18
|
+
*
|
|
19
|
+
* @param {OperationModuleStartIn} body - The event information to be submitted.
|
|
20
|
+
* @return {Observable<OperationModuleOut>} An Observable emitting the server's response containing the created event details.
|
|
21
|
+
*/
|
|
22
|
+
postOperationModulesStart(body: OperationModuleStartIn): Observable<OperationModuleOut>;
|
|
23
|
+
/**
|
|
24
|
+
* Updates the discount information for a specific item.
|
|
25
|
+
*
|
|
26
|
+
* @param {number} id - The unique identifier of the item whose event is to be updated.
|
|
27
|
+
* @param {OperationModuleEndIn} body - The payload containing the updated event details.
|
|
28
|
+
* @return {Observable<OperationModuleOut>} An observable emitting the updated event details.
|
|
29
|
+
*/
|
|
30
|
+
putOperationModulesEnd(id: number, body: OperationModuleEndIn): Observable<OperationModuleOut>;
|
|
31
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ApiEventsService, never>;
|
|
32
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<ApiEventsService>;
|
|
33
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { OperationModuleStatus } from './api-events.enum';
|
|
2
|
+
import { SymfonyModel } from './api.models';
|
|
3
|
+
export interface OperationModule extends SymfonyModel {
|
|
4
|
+
lastUserId: number;
|
|
5
|
+
event: OperationEvent;
|
|
6
|
+
lastAction: OperationAction;
|
|
7
|
+
status: OperationModuleStatus;
|
|
8
|
+
extraFields: {
|
|
9
|
+
[key: string]: string | number | boolean | null;
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
export interface OperationEvent extends SymfonyModel {
|
|
13
|
+
code: string;
|
|
14
|
+
name: string;
|
|
15
|
+
description: string;
|
|
16
|
+
}
|
|
17
|
+
export interface OperationAction extends SymfonyModel {
|
|
18
|
+
code: string;
|
|
19
|
+
name: string;
|
|
20
|
+
description: string;
|
|
21
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { OperationModuleStatus } from './api-events.enum';
|
|
2
|
+
import { OperationModule } from './api-events.interfaces';
|
|
3
|
+
export type OperationModuleStartIn = {
|
|
4
|
+
eventCode: string;
|
|
5
|
+
};
|
|
6
|
+
export type OperationModuleEndIn = {
|
|
7
|
+
status: OperationModuleStatus;
|
|
8
|
+
extraFields?: {
|
|
9
|
+
[key: string]: string | number | boolean | null;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
export type OperationModuleOut = {
|
|
13
|
+
operationModule: OperationModule;
|
|
14
|
+
};
|
|
@@ -5,6 +5,7 @@ import { InjectionToken } from '@angular/core';
|
|
|
5
5
|
*
|
|
6
6
|
* Properties:
|
|
7
7
|
* - apiCompaniesUrl: The URL for the companies API endpoint.
|
|
8
|
+
* - apiEventsUrl: The URL for the events API endpoint.
|
|
8
9
|
* - apiInvoicesUrl: The URL for the invoices API endpoint.
|
|
9
10
|
* - apiReportsUrl: The URL for the reports API endpoint.
|
|
10
11
|
* - apiSecurityUrl: The URL for the security-related API endpoint.
|
|
@@ -25,6 +26,7 @@ export type Environment = {
|
|
|
25
26
|
apiCompaniesUrl?: string;
|
|
26
27
|
apiCompositionUrl?: string;
|
|
27
28
|
apiDiscountsUrl?: string;
|
|
29
|
+
apiEventsUrl?: string;
|
|
28
30
|
apiEToolsAutoBilling?: string;
|
|
29
31
|
apiExternalOperationsKey?: string;
|
|
30
32
|
apiExternalOperationsUrl?: string;
|
package/package.json
CHANGED
package/public-api.d.ts
CHANGED
|
@@ -10,6 +10,7 @@ export * from './lib/apis/api-catalogs.service';
|
|
|
10
10
|
export * from './lib/apis/api-companies.service';
|
|
11
11
|
export * from './lib/apis/api-composition.service';
|
|
12
12
|
export * from './lib/apis/api-discounts.service';
|
|
13
|
+
export * from './lib/apis/api-events.service';
|
|
13
14
|
export * from './lib/apis/api-e-tools-auto-billing.service';
|
|
14
15
|
export * from './lib/apis/api-external-pickups.service';
|
|
15
16
|
export * from './lib/apis/api-inventories.service';
|
|
@@ -40,6 +41,9 @@ export * from './lib/apis/models/api-composition.interfaces';
|
|
|
40
41
|
export * from './lib/apis/models/api-composition.types';
|
|
41
42
|
export * from './lib/apis/models/api-discounts.interfaces';
|
|
42
43
|
export * from './lib/apis/models/api-discounts.types';
|
|
44
|
+
export * from './lib/apis/models/api-events.enum';
|
|
45
|
+
export * from './lib/apis/models/api-events.interfaces';
|
|
46
|
+
export * from './lib/apis/models/api-events.types';
|
|
43
47
|
export * from './lib/apis/models/api-e-tools-auto-billing.interfaces';
|
|
44
48
|
export * from './lib/apis/models/api-e-tools-auto-billing.types';
|
|
45
49
|
export * from './lib/apis/models/api-external-pickups.types';
|