@lucaapp/service-utils 1.65.0 → 2.0.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/serviceIdentity/service.d.ts +0 -2
- package/dist/lib/serviceIdentity/service.js +0 -2
- package/package.json +4 -4
- package/dist/lib/kafka/events/operatorLocationGroup.d.ts +0 -16
- package/dist/lib/kafka/events/operatorLocationGroup.js +0 -12
- package/dist/lib/money/sequelize/index.d.ts +0 -1
- package/dist/lib/money/sequelize/index.js +0 -17
- package/dist/lib/money/sequelize/money.d.ts +0 -21
- package/dist/lib/money/sequelize/money.js +0 -56
- package/dist/types/pino.d.ts +0 -2
- package/dist/types/pino.ded.d.ts +0 -2
- package/dist/types/pino.ded.js +0 -2
- package/dist/types/pino.js +0 -2
|
@@ -2,8 +2,6 @@ declare enum Service {
|
|
|
2
2
|
BACKEND = "backend",
|
|
3
3
|
BACKEND_PAY = "backend-pay",
|
|
4
4
|
BACKEND_POS = "backend-pos",
|
|
5
|
-
BACKEND_ID = "backend-id",
|
|
6
|
-
BACKEND_ATTESTATION = "backend-attestation",
|
|
7
5
|
BACKEND_PUBSUB = "backend-pubsub",
|
|
8
6
|
BACKEND_AI = "backend-ai",
|
|
9
7
|
BACKEND_PYTHON = "backend-python",
|
|
@@ -6,8 +6,6 @@ var Service;
|
|
|
6
6
|
Service["BACKEND"] = "backend";
|
|
7
7
|
Service["BACKEND_PAY"] = "backend-pay";
|
|
8
8
|
Service["BACKEND_POS"] = "backend-pos";
|
|
9
|
-
Service["BACKEND_ID"] = "backend-id";
|
|
10
|
-
Service["BACKEND_ATTESTATION"] = "backend-attestation";
|
|
11
9
|
Service["BACKEND_PUBSUB"] = "backend-pubsub";
|
|
12
10
|
Service["BACKEND_AI"] = "backend-ai";
|
|
13
11
|
Service["BACKEND_PYTHON"] = "backend-python";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lucaapp/service-utils",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -23,10 +23,10 @@
|
|
|
23
23
|
"@hapi/boom": "^10.0.1",
|
|
24
24
|
"@sentry/node": "^9.10.1",
|
|
25
25
|
"@tsconfig/node22": "22.0.0",
|
|
26
|
-
"@types/express": "4.17.
|
|
26
|
+
"@types/express": "4.17.23",
|
|
27
27
|
"@types/express-serve-static-core": "^4.17.43",
|
|
28
28
|
"@types/node": "22.13.11",
|
|
29
|
-
"@types/response-time": "^2.3.
|
|
29
|
+
"@types/response-time": "^2.3.9",
|
|
30
30
|
"@types/swagger-ui-express": "4.1.3",
|
|
31
31
|
"axios": "^1.8.2",
|
|
32
32
|
"body-parser": "^2.2.0",
|
|
@@ -83,7 +83,7 @@
|
|
|
83
83
|
"rollup": "4.22.4",
|
|
84
84
|
"cookie": ">= 1.0.2",
|
|
85
85
|
"string-width": "4.2.3",
|
|
86
|
-
"@types/express": "4.17.
|
|
86
|
+
"@types/express": "4.17.23",
|
|
87
87
|
"esbuild": "^0.25.5",
|
|
88
88
|
"axios": "^1.8.2",
|
|
89
89
|
"vite": "6.2.5"
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
export declare enum OperatorRole {
|
|
2
|
-
Owner = "Owner",// level 6
|
|
3
|
-
Admin = "Admin",// level 5
|
|
4
|
-
Finance = "Finance",// level 4
|
|
5
|
-
Manager = "Manager",// level 3
|
|
6
|
-
Supervisor = "Supervisor",// level 2
|
|
7
|
-
Viewer = "Viewer"
|
|
8
|
-
}
|
|
9
|
-
export type OperatorLocationGroup = {
|
|
10
|
-
uuid: string;
|
|
11
|
-
operatorId: string;
|
|
12
|
-
locationGroupId: string;
|
|
13
|
-
role: OperatorRole;
|
|
14
|
-
createdAt: Date;
|
|
15
|
-
updatedAt: Date;
|
|
16
|
-
};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.OperatorRole = void 0;
|
|
4
|
-
var OperatorRole;
|
|
5
|
-
(function (OperatorRole) {
|
|
6
|
-
OperatorRole["Owner"] = "Owner";
|
|
7
|
-
OperatorRole["Admin"] = "Admin";
|
|
8
|
-
OperatorRole["Finance"] = "Finance";
|
|
9
|
-
OperatorRole["Manager"] = "Manager";
|
|
10
|
-
OperatorRole["Supervisor"] = "Supervisor";
|
|
11
|
-
OperatorRole["Viewer"] = "Viewer";
|
|
12
|
-
})(OperatorRole || (exports.OperatorRole = OperatorRole = {}));
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './money';
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./money"), exports);
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { DataTypes } from 'sequelize';
|
|
2
|
-
declare class MONEY extends DataTypes.ABSTRACT.prototype.constructor {
|
|
3
|
-
static key: string;
|
|
4
|
-
static warn: () => void;
|
|
5
|
-
key: string;
|
|
6
|
-
escape: boolean;
|
|
7
|
-
types: {
|
|
8
|
-
postgres: string[];
|
|
9
|
-
sqlite: string[];
|
|
10
|
-
};
|
|
11
|
-
static toSql(): string;
|
|
12
|
-
validate(value: unknown, options: unknown): boolean;
|
|
13
|
-
_sanitize(value: unknown): number;
|
|
14
|
-
static stringify(value: unknown): string;
|
|
15
|
-
static dialectTypes: string;
|
|
16
|
-
static parse(value: unknown): number;
|
|
17
|
-
}
|
|
18
|
-
export declare const ExtendedDataTypes: {
|
|
19
|
-
MONEY: typeof MONEY & (() => typeof MONEY);
|
|
20
|
-
};
|
|
21
|
-
export {};
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ExtendedDataTypes = void 0;
|
|
4
|
-
const sequelize_1 = require("sequelize");
|
|
5
|
-
// Define the MONEY data type
|
|
6
|
-
class MONEY extends sequelize_1.DataTypes.ABSTRACT.prototype.constructor {
|
|
7
|
-
constructor() {
|
|
8
|
-
super(...arguments);
|
|
9
|
-
this.key = MONEY.key;
|
|
10
|
-
// Optional: disable escaping after stringifier. Do this at your own risk, since this opens opportunity for SQL injections.
|
|
11
|
-
this.escape = false;
|
|
12
|
-
// Optional: map dialect datatype names (mandatory if not creating dialect-specific datatype classes as in the example below)
|
|
13
|
-
this.types = {
|
|
14
|
-
postgres: ['pg_new_type'],
|
|
15
|
-
sqlite: ['sqlite_new_type'],
|
|
16
|
-
};
|
|
17
|
-
}
|
|
18
|
-
// Mandatory: complete definition of the new type in the database
|
|
19
|
-
static toSql() {
|
|
20
|
-
return 'INTEGER(11) UNSIGNED ZEROFILL';
|
|
21
|
-
}
|
|
22
|
-
// Optional: validator function
|
|
23
|
-
validate(value, options) {
|
|
24
|
-
return typeof value === 'number' && !Number.isNaN(value);
|
|
25
|
-
}
|
|
26
|
-
// Optional: sanitizer
|
|
27
|
-
_sanitize(value) {
|
|
28
|
-
// Force all numbers to be positive
|
|
29
|
-
return value < 0 ? 0 : Math.round(value);
|
|
30
|
-
}
|
|
31
|
-
// Optional: value stringifier before sending to database
|
|
32
|
-
static stringify(value) {
|
|
33
|
-
return value.toString();
|
|
34
|
-
}
|
|
35
|
-
// Optional: parser for values received from the database
|
|
36
|
-
static parse(value) {
|
|
37
|
-
return Number.parseInt(value);
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
// Mandatory: set the type key
|
|
41
|
-
MONEY.key = 'MONEY';
|
|
42
|
-
MONEY.warn = () => { };
|
|
43
|
-
MONEY.dialectTypes = 'test';
|
|
44
|
-
// Create a new type that extends DataTypes and includes MONEY
|
|
45
|
-
exports.ExtendedDataTypes = {
|
|
46
|
-
// ...DataTypes,
|
|
47
|
-
MONEY: sequelize_1.Utils.classToInvokable(MONEY),
|
|
48
|
-
};
|
|
49
|
-
// Export the extended DataTypes
|
|
50
|
-
// export { ExtendedDataTypes as DataTypes };
|
|
51
|
-
// // Type declaration merging
|
|
52
|
-
// declare module 'sequelize' {
|
|
53
|
-
// interface DataTypes {
|
|
54
|
-
// MONEY: typeof MONEY;
|
|
55
|
-
// }
|
|
56
|
-
// }
|
package/dist/types/pino.d.ts
DELETED
package/dist/types/pino.ded.d.ts
DELETED
package/dist/types/pino.ded.js
DELETED
package/dist/types/pino.js
DELETED