@lucaapp/service-utils 1.20.0 → 1.21.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/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 +1 -1
- 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 };
|
|
@@ -15,7 +15,7 @@ declare enum KafkaTopic {
|
|
|
15
15
|
WS_EVENT_backend_pay = "wsevent_backend-pay",
|
|
16
16
|
WS_EVENT_backend_pos = "wsevent_backend-pos"
|
|
17
17
|
}
|
|
18
|
-
|
|
18
|
+
type MessageFormats = {
|
|
19
19
|
[KafkaTopic.PAYMENTS]: Payment;
|
|
20
20
|
[KafkaTopic.CONSUMERS]: Consumer;
|
|
21
21
|
[KafkaTopic.OPERATORS]: Operator;
|
|
@@ -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