@lucaapp/service-utils 2.0.2 → 2.0.4

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,8 +1,9 @@
1
+ import type { OperatorDeviceRole } from '../../../types/operatorDevice';
1
2
  export type OperatorDevice = {
2
3
  uuid: string;
3
4
  name: string;
4
5
  os: string;
5
- role: 'scanner' | 'employee' | 'manager' | 'link' | 'terminal' | 'external';
6
+ role: OperatorDeviceRole;
6
7
  operatorId: string;
7
8
  locationId: string | null;
8
9
  createdAt: Date;
@@ -0,0 +1,3 @@
1
+ export type OperatorDeviceSyncRequest = {
2
+ operatorId: string;
3
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -13,11 +13,13 @@ import { ConsumerPushNotification } from './events/consumerPushNotification';
13
13
  import { OperatorLocationGroup } from '../../types/operatorLocationGroup';
14
14
  import { PaymentSyncError } from './events/paymentSyncError';
15
15
  import { OperatorDevice } from './events/operatorDevice';
16
+ import { OperatorDeviceSyncRequest } from './events/operatorDeviceSyncRequest';
16
17
  declare enum KafkaTopic {
17
18
  PAYMENTS = "payments",
18
19
  CONSUMERS = "consumers",
19
20
  OPERATORS = "operators",
20
21
  OPERATOR_DEVICES = "operator_devices",
22
+ OPERATOR_DEVICE_SYNC_REQUEST = "operator_device_sync_request",
21
23
  LOCATIONS = "locations",
22
24
  LOCATION_GROUPS = "location_groups",
23
25
  OPERATOR_LOCATION_GROUPS = "operator_location_groups",
@@ -36,6 +38,7 @@ type MessageFormats = {
36
38
  [KafkaTopic.CONSUMERS]: Consumer;
37
39
  [KafkaTopic.OPERATORS]: Operator;
38
40
  [KafkaTopic.OPERATOR_DEVICES]: OperatorDevice;
41
+ [KafkaTopic.OPERATOR_DEVICE_SYNC_REQUEST]: OperatorDeviceSyncRequest;
39
42
  [KafkaTopic.LOCATIONS]: Location;
40
43
  [KafkaTopic.LOCATION_GROUPS]: LocationGroup;
41
44
  [KafkaTopic.OPERATOR_LOCATION_GROUPS]: OperatorLocationGroup;
@@ -54,6 +57,7 @@ declare const MessageIssuer: {
54
57
  consumers: Service;
55
58
  operators: Service;
56
59
  operator_devices: Service;
60
+ operator_device_sync_request: Service;
57
61
  locations: Service;
58
62
  location_groups: Service;
59
63
  operator_location_groups: Service;
@@ -8,6 +8,7 @@ var KafkaTopic;
8
8
  KafkaTopic["CONSUMERS"] = "consumers";
9
9
  KafkaTopic["OPERATORS"] = "operators";
10
10
  KafkaTopic["OPERATOR_DEVICES"] = "operator_devices";
11
+ KafkaTopic["OPERATOR_DEVICE_SYNC_REQUEST"] = "operator_device_sync_request";
11
12
  KafkaTopic["LOCATIONS"] = "locations";
12
13
  KafkaTopic["LOCATION_GROUPS"] = "location_groups";
13
14
  KafkaTopic["OPERATOR_LOCATION_GROUPS"] = "operator_location_groups";
@@ -26,6 +27,7 @@ const MessageIssuer = {
26
27
  [KafkaTopic.CONSUMERS]: serviceIdentity_1.Service.BACKEND,
27
28
  [KafkaTopic.OPERATORS]: serviceIdentity_1.Service.BACKEND,
28
29
  [KafkaTopic.OPERATOR_DEVICES]: serviceIdentity_1.Service.BACKEND,
30
+ [KafkaTopic.OPERATOR_DEVICE_SYNC_REQUEST]: serviceIdentity_1.Service.BACKEND_PAY,
29
31
  [KafkaTopic.LOCATIONS]: serviceIdentity_1.Service.BACKEND,
30
32
  [KafkaTopic.LOCATION_GROUPS]: serviceIdentity_1.Service.BACKEND,
31
33
  [KafkaTopic.OPERATOR_LOCATION_GROUPS]: serviceIdentity_1.Service.BACKEND,
@@ -0,0 +1,8 @@
1
+ export declare enum OperatorDeviceRole {
2
+ SCANNER = "scanner",
3
+ EMPLOYEE = "employee",
4
+ MANAGER = "manager",
5
+ LINK = "link",
6
+ TERMINAL = "terminal",
7
+ EXTERNAL = "external"
8
+ }
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.OperatorDeviceRole = void 0;
4
+ var OperatorDeviceRole;
5
+ (function (OperatorDeviceRole) {
6
+ OperatorDeviceRole["SCANNER"] = "scanner";
7
+ OperatorDeviceRole["EMPLOYEE"] = "employee";
8
+ OperatorDeviceRole["MANAGER"] = "manager";
9
+ OperatorDeviceRole["LINK"] = "link";
10
+ OperatorDeviceRole["TERMINAL"] = "terminal";
11
+ OperatorDeviceRole["EXTERNAL"] = "external";
12
+ })(OperatorDeviceRole || (exports.OperatorDeviceRole = OperatorDeviceRole = {}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lucaapp/service-utils",
3
- "version": "2.0.2",
3
+ "version": "2.0.4",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "files": [