@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.
@@ -1,4 +1,4 @@
1
- declare type Consumer = {
1
+ type Consumer = {
2
2
  uuid: string;
3
3
  username: string;
4
4
  createdAt: Date;
@@ -1,4 +1,4 @@
1
- declare type LocationGroup = {
1
+ type LocationGroup = {
2
2
  uuid: string;
3
3
  operatorId: string;
4
4
  createdAt: Date;
@@ -1,4 +1,4 @@
1
- declare type LocationGroupEmployees = {
1
+ type LocationGroupEmployees = {
2
2
  uuid: string;
3
3
  firstName: string;
4
4
  lastName: string | null;
@@ -1,4 +1,4 @@
1
- declare type Operator = {
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 };
@@ -1,4 +1,4 @@
1
- declare type Payment = {
1
+ type Payment = {
2
2
  uuid: string;
3
3
  locationId: string;
4
4
  locationName: string | null;
@@ -1,4 +1,4 @@
1
- declare type WsEvent = {
1
+ type WsEvent = {
2
2
  subId: string;
3
3
  type: string;
4
4
  data: any;
@@ -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
- declare type MessageFormats = {
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
- declare type KafkaEvent<T extends KafkaTopic> = {
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
- declare type KafkaConfiguration = {
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
- declare type EventPayloadHandler<T extends KafkaTopic> = (message: Omit<KafkaMessage, 'value'> & {
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, };
@@ -2,7 +2,7 @@ import * as jose from 'jose';
2
2
  import { HttpMethod } from 'types/http';
3
3
  import { Request, RequestHandler } from 'express';
4
4
  import { Service } from './service';
5
- declare type JWKS = {
5
+ type JWKS = {
6
6
  keys: jose.JWK[];
7
7
  };
8
8
  declare class ServiceIdentity {
@@ -1 +1 @@
1
- export declare type HttpMethod = 'GET' | 'POST' | 'PUT' | 'DELETE' | 'HEAD' | 'PATCH' | 'OPTIONS' | 'TRACE' | 'CONNECT';
1
+ export type HttpMethod = 'GET' | 'POST' | 'PUT' | 'DELETE' | 'HEAD' | 'PATCH' | 'OPTIONS' | 'TRACE' | 'CONNECT';
@@ -1,4 +1,4 @@
1
- export declare type Literal = boolean | null | number | string;
2
- export declare type Json = Literal | {
1
+ export type Literal = boolean | null | number | string;
2
+ export type Json = Literal | {
3
3
  [key: string]: Json;
4
4
  } | Json[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lucaapp/service-utils",
3
- "version": "1.20.0",
3
+ "version": "1.21.0",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "files": [