@lucaapp/service-utils 1.20.0 → 1.22.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/dist/lib/kafka/events/consumer.d.ts +1 -1
- package/dist/lib/kafka/events/location.d.ts +7 -0
- package/dist/lib/kafka/events/location.js +2 -0
- package/dist/lib/kafka/events/locationGroup.d.ts +1 -1
- package/dist/lib/kafka/events/locationGroupEmployees.d.ts +1 -1
- package/dist/lib/kafka/events/operator.d.ts +1 -2
- package/dist/lib/kafka/events/payment.d.ts +1 -1
- package/dist/lib/kafka/events/wsEvent.d.ts +1 -1
- package/dist/lib/kafka/events.d.ts +5 -1
- package/dist/lib/kafka/events.js +2 -0
- package/dist/lib/kafka/types.d.ts +4 -4
- package/dist/lib/serviceIdentity/serviceIdentity.d.ts +1 -1
- package/dist/types/http.d.ts +1 -1
- package/dist/types/json.d.ts +2 -2
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
type Operator = {
|
|
2
2
|
uuid: string;
|
|
3
3
|
firstName: string;
|
|
4
4
|
lastName: string;
|
|
@@ -13,6 +13,5 @@ declare type Operator = {
|
|
|
13
13
|
businessEntityCity: string | null;
|
|
14
14
|
createdAt: Date;
|
|
15
15
|
updatedAt: Date;
|
|
16
|
-
deletedAt: Date | null;
|
|
17
16
|
};
|
|
18
17
|
export type { Operator };
|
|
@@ -5,20 +5,23 @@ import type { LocationGroupEmployees } from './events/locationGroupEmployees';
|
|
|
5
5
|
import type { WsEvent } from './events/wsEvent';
|
|
6
6
|
import { Service } from '../serviceIdentity';
|
|
7
7
|
import { LocationGroup } from './events/locationGroup';
|
|
8
|
+
import { Location } from './events/location';
|
|
8
9
|
declare enum KafkaTopic {
|
|
9
10
|
PAYMENTS = "payments",
|
|
10
11
|
CONSUMERS = "consumers",
|
|
11
12
|
OPERATORS = "operators",
|
|
13
|
+
LOCATIONS = "locations",
|
|
12
14
|
LOCATION_GROUPS = "location_groups",
|
|
13
15
|
LOCATION_GROUP_EMPLOYEES = "location_group_employees",
|
|
14
16
|
WS_EVENT_backend = "wsevent_backend",
|
|
15
17
|
WS_EVENT_backend_pay = "wsevent_backend-pay",
|
|
16
18
|
WS_EVENT_backend_pos = "wsevent_backend-pos"
|
|
17
19
|
}
|
|
18
|
-
|
|
20
|
+
type MessageFormats = {
|
|
19
21
|
[KafkaTopic.PAYMENTS]: Payment;
|
|
20
22
|
[KafkaTopic.CONSUMERS]: Consumer;
|
|
21
23
|
[KafkaTopic.OPERATORS]: Operator;
|
|
24
|
+
[KafkaTopic.LOCATIONS]: Location;
|
|
22
25
|
[KafkaTopic.LOCATION_GROUPS]: LocationGroup;
|
|
23
26
|
[KafkaTopic.LOCATION_GROUP_EMPLOYEES]: LocationGroupEmployees;
|
|
24
27
|
[KafkaTopic.WS_EVENT_backend]: WsEvent;
|
|
@@ -29,6 +32,7 @@ declare const MessageIssuer: {
|
|
|
29
32
|
payments: Service;
|
|
30
33
|
consumers: Service;
|
|
31
34
|
operators: Service;
|
|
35
|
+
locations: Service;
|
|
32
36
|
location_groups: Service;
|
|
33
37
|
location_group_employees: Service;
|
|
34
38
|
wsevent_backend: Service;
|
package/dist/lib/kafka/events.js
CHANGED
|
@@ -7,6 +7,7 @@ var KafkaTopic;
|
|
|
7
7
|
KafkaTopic["PAYMENTS"] = "payments";
|
|
8
8
|
KafkaTopic["CONSUMERS"] = "consumers";
|
|
9
9
|
KafkaTopic["OPERATORS"] = "operators";
|
|
10
|
+
KafkaTopic["LOCATIONS"] = "locations";
|
|
10
11
|
KafkaTopic["LOCATION_GROUPS"] = "location_groups";
|
|
11
12
|
KafkaTopic["LOCATION_GROUP_EMPLOYEES"] = "location_group_employees";
|
|
12
13
|
KafkaTopic["WS_EVENT_backend"] = "wsevent_backend";
|
|
@@ -18,6 +19,7 @@ const MessageIssuer = {
|
|
|
18
19
|
[KafkaTopic.PAYMENTS]: serviceIdentity_1.Service.BACKEND_PAY,
|
|
19
20
|
[KafkaTopic.CONSUMERS]: serviceIdentity_1.Service.BACKEND,
|
|
20
21
|
[KafkaTopic.OPERATORS]: serviceIdentity_1.Service.BACKEND,
|
|
22
|
+
[KafkaTopic.LOCATIONS]: serviceIdentity_1.Service.BACKEND,
|
|
21
23
|
[KafkaTopic.LOCATION_GROUPS]: serviceIdentity_1.Service.BACKEND,
|
|
22
24
|
[KafkaTopic.LOCATION_GROUP_EMPLOYEES]: serviceIdentity_1.Service.BACKEND,
|
|
23
25
|
[KafkaTopic.WS_EVENT_backend]: serviceIdentity_1.Service.BACKEND,
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { KafkaTopic, MessageFormats } from './events';
|
|
2
2
|
import { Environment } from '../serviceIdentity';
|
|
3
3
|
import { KafkaMessage } from 'kafkajs';
|
|
4
|
-
|
|
4
|
+
type KafkaEvent<T extends KafkaTopic> = {
|
|
5
5
|
id: string;
|
|
6
|
-
type: 'create' | 'update' | 'destroy';
|
|
6
|
+
type: 'create' | 'update' | 'soft-destroy' | 'destroy';
|
|
7
7
|
entity: MessageFormats[T];
|
|
8
8
|
};
|
|
9
|
-
|
|
9
|
+
type KafkaConfiguration = {
|
|
10
10
|
environment: Environment;
|
|
11
11
|
broker: string;
|
|
12
12
|
clientId: string;
|
|
@@ -14,7 +14,7 @@ declare type KafkaConfiguration = {
|
|
|
14
14
|
password?: string;
|
|
15
15
|
ssl?: boolean;
|
|
16
16
|
};
|
|
17
|
-
|
|
17
|
+
type EventPayloadHandler<T extends KafkaTopic> = (message: Omit<KafkaMessage, 'value'> & {
|
|
18
18
|
value: KafkaEvent<T>;
|
|
19
19
|
}) => Promise<void>;
|
|
20
20
|
export type { KafkaEvent, KafkaConfiguration, EventPayloadHandler, };
|
package/dist/types/http.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export type HttpMethod = 'GET' | 'POST' | 'PUT' | 'DELETE' | 'HEAD' | 'PATCH' | 'OPTIONS' | 'TRACE' | 'CONNECT';
|
package/dist/types/json.d.ts
CHANGED