@alacard-project/shared 1.1.8 → 1.1.13
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/browser.d.ts +1 -6
- package/dist/browser.js +1 -6
- package/dist/browser.js.map +1 -1
- package/dist/constants/iam.constants.d.ts +12 -0
- package/dist/constants/iam.constants.js +16 -0
- package/dist/constants/iam.constants.js.map +1 -0
- package/dist/constants/index.d.ts +4 -0
- package/dist/constants/index.js +4 -0
- package/dist/constants/index.js.map +1 -1
- package/dist/constants/microservices.constants.d.ts +10 -0
- package/dist/constants/microservices.constants.js +10 -0
- package/dist/constants/microservices.constants.js.map +1 -1
- package/dist/constants/orchestrator-messages.constants.d.ts +5 -0
- package/dist/constants/orchestrator-messages.constants.js +9 -0
- package/dist/constants/orchestrator-messages.constants.js.map +1 -0
- package/dist/constants/partner-messages.constants.d.ts +7 -0
- package/dist/constants/partner-messages.constants.js +11 -0
- package/dist/constants/partner-messages.constants.js.map +1 -0
- package/dist/constants/user.constants.d.ts +10 -0
- package/dist/constants/user.constants.js +14 -0
- package/dist/constants/user.constants.js.map +1 -0
- package/dist/contracts/card.contract.d.ts +38 -0
- package/dist/contracts/index.d.ts +1 -0
- package/dist/contracts/index.js +1 -0
- package/dist/contracts/index.js.map +1 -1
- package/dist/contracts/invoice.contract.d.ts +137 -0
- package/dist/contracts/invoice.contract.js +3 -0
- package/dist/contracts/invoice.contract.js.map +1 -0
- package/dist/contracts/terminal.contract.d.ts +43 -1
- package/dist/contracts/transaction.contract.d.ts +12 -0
- package/dist/decorators/permissions.decorator.d.ts +2 -2
- package/dist/decorators/permissions.decorator.js.map +1 -1
- package/dist/decorators/roles.decorator.d.ts +1 -1
- package/dist/dto/auth.dto.d.ts +1 -0
- package/dist/dto/auth.dto.js +5 -0
- package/dist/dto/auth.dto.js.map +1 -1
- package/dist/dto/card.dto.d.ts +5 -1
- package/dist/dto/card.dto.js +20 -0
- package/dist/dto/card.dto.js.map +1 -1
- package/dist/dto/iam.dto.d.ts +24 -0
- package/dist/dto/iam.dto.js +76 -0
- package/dist/dto/iam.dto.js.map +1 -0
- package/dist/dto/index.d.ts +1 -0
- package/dist/dto/index.js +1 -0
- package/dist/dto/index.js.map +1 -1
- package/dist/dto/invoice.dto.d.ts +29 -2
- package/dist/dto/invoice.dto.js +70 -4
- package/dist/dto/invoice.dto.js.map +1 -1
- package/dist/dto/partner.dto.d.ts +29 -0
- package/dist/dto/partner.dto.js +106 -1
- package/dist/dto/partner.dto.js.map +1 -1
- package/dist/dto/transaction.dto.d.ts +7 -0
- package/dist/dto/transaction.dto.js +35 -0
- package/dist/dto/transaction.dto.js.map +1 -1
- package/dist/dto/user.dto.d.ts +36 -13
- package/dist/dto/user.dto.js +104 -17
- package/dist/dto/user.dto.js.map +1 -1
- package/dist/enums/iam.enum.d.ts +7 -0
- package/dist/enums/iam.enum.js +9 -1
- package/dist/enums/iam.enum.js.map +1 -1
- package/dist/enums/index.d.ts +3 -0
- package/dist/enums/index.js +3 -0
- package/dist/enums/index.js.map +1 -1
- package/dist/enums/job.enum.d.ts +18 -0
- package/dist/enums/job.enum.js +24 -0
- package/dist/enums/job.enum.js.map +1 -0
- package/dist/enums/partner.enum.d.ts +5 -0
- package/dist/enums/partner.enum.js +10 -0
- package/dist/enums/partner.enum.js.map +1 -0
- package/dist/enums/permission.enum.d.ts +1 -1
- package/dist/enums/permission.enum.js +20 -20
- package/dist/enums/permission.enum.js.map +1 -1
- package/dist/enums/saga.enum.d.ts +8 -0
- package/dist/enums/saga.enum.js +13 -0
- package/dist/enums/saga.enum.js.map +1 -0
- package/dist/enums/user.enum.d.ts +7 -1
- package/dist/enums/user.enum.js +8 -1
- package/dist/enums/user.enum.js.map +1 -1
- package/dist/filters/global-exception.filter.d.ts +1 -1
- package/dist/index.d.ts +3 -9
- package/dist/index.js +3 -9
- package/dist/index.js.map +1 -1
- package/dist/middleware/prisma-logging.middleware.d.ts +1 -1
- package/dist/resilience/circuit-breaker.service.js +9 -2
- package/dist/resilience/circuit-breaker.service.js.map +1 -1
- package/dist/resilience/redis-throttler-storage.d.ts +11 -0
- package/dist/resilience/redis-throttler-storage.js +76 -0
- package/dist/resilience/redis-throttler-storage.js.map +1 -0
- package/dist/resilience/resilience.module.js +3 -2
- package/dist/resilience/resilience.module.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types/client.types.d.ts +8 -0
- package/dist/types/client.types.js +3 -0
- package/dist/types/client.types.js.map +1 -0
- package/dist/types/iam.types.d.ts +30 -0
- package/dist/types/index.d.ts +3 -0
- package/dist/types/index.js +3 -0
- package/dist/types/index.js.map +1 -1
- package/dist/types/orchestrator.types.d.ts +24 -0
- package/dist/types/orchestrator.types.js +3 -0
- package/dist/types/orchestrator.types.js.map +1 -0
- package/dist/types/saga.types.d.ts +24 -0
- package/dist/types/saga.types.js +3 -0
- package/dist/types/saga.types.js.map +1 -0
- package/dist/types/user.types.d.ts +28 -0
- package/dist/utils/app.utils.js +62 -2
- package/dist/utils/app.utils.js.map +1 -1
- package/dist/utils/grpc-tracing.interceptor.d.ts +3 -1
- package/dist/utils/grpc-tracing.interceptor.js +20 -2
- package/dist/utils/grpc-tracing.interceptor.js.map +1 -1
- package/dist/utils/health.utils.d.ts +1 -1
- package/dist/utils/proto-path.js +23 -2
- package/dist/utils/proto-path.js.map +1 -1
- package/dist/utils/tracing.service.js +5 -1
- package/dist/utils/tracing.service.js.map +1 -1
- package/dist/utils/tracing.utils.js +40 -1
- package/dist/utils/tracing.utils.js.map +1 -1
- package/package.json +16 -3
package/dist/dto/user.dto.js
CHANGED
|
@@ -9,67 +9,154 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
9
9
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.
|
|
12
|
+
exports.UpdatePublicProfileDto = exports.CreatePublicProfileDto = exports.UpdateEmployeeProfileDto = exports.CreateEmployeeProfileDto = exports.UpdateUserStatusDto = exports.CreateUserDto = void 0;
|
|
13
13
|
const class_validator_1 = require("class-validator");
|
|
14
|
-
const
|
|
15
|
-
class
|
|
14
|
+
const user_enum_1 = require("../enums/user.enum");
|
|
15
|
+
class CreateUserDto {
|
|
16
16
|
}
|
|
17
|
-
exports.
|
|
17
|
+
exports.CreateUserDto = CreateUserDto;
|
|
18
18
|
__decorate([
|
|
19
19
|
(0, class_validator_1.IsUUID)(),
|
|
20
20
|
__metadata("design:type", String)
|
|
21
|
-
],
|
|
21
|
+
], CreateUserDto.prototype, "identityId", void 0);
|
|
22
|
+
__decorate([
|
|
23
|
+
(0, class_validator_1.IsEnum)(user_enum_1.UserType),
|
|
24
|
+
__metadata("design:type", String)
|
|
25
|
+
], CreateUserDto.prototype, "userType", void 0);
|
|
26
|
+
class UpdateUserStatusDto {
|
|
27
|
+
}
|
|
28
|
+
exports.UpdateUserStatusDto = UpdateUserStatusDto;
|
|
29
|
+
__decorate([
|
|
30
|
+
(0, class_validator_1.IsEnum)(user_enum_1.UserStatus),
|
|
31
|
+
__metadata("design:type", String)
|
|
32
|
+
], UpdateUserStatusDto.prototype, "status", void 0);
|
|
33
|
+
class CreateEmployeeProfileDto {
|
|
34
|
+
}
|
|
35
|
+
exports.CreateEmployeeProfileDto = CreateEmployeeProfileDto;
|
|
36
|
+
__decorate([
|
|
37
|
+
(0, class_validator_1.IsString)(),
|
|
38
|
+
__metadata("design:type", String)
|
|
39
|
+
], CreateEmployeeProfileDto.prototype, "fullName", void 0);
|
|
40
|
+
__decorate([
|
|
41
|
+
(0, class_validator_1.IsOptional)(),
|
|
42
|
+
(0, class_validator_1.IsString)(),
|
|
43
|
+
__metadata("design:type", String)
|
|
44
|
+
], CreateEmployeeProfileDto.prototype, "shortName", void 0);
|
|
22
45
|
__decorate([
|
|
23
46
|
(0, class_validator_1.IsEmail)(),
|
|
24
47
|
__metadata("design:type", String)
|
|
25
|
-
],
|
|
48
|
+
], CreateEmployeeProfileDto.prototype, "email", void 0);
|
|
26
49
|
__decorate([
|
|
50
|
+
(0, class_validator_1.IsOptional)(),
|
|
27
51
|
(0, class_validator_1.IsString)(),
|
|
52
|
+
__metadata("design:type", String)
|
|
53
|
+
], CreateEmployeeProfileDto.prototype, "workPhone", void 0);
|
|
54
|
+
__decorate([
|
|
28
55
|
(0, class_validator_1.IsOptional)(),
|
|
56
|
+
(0, class_validator_1.IsString)(),
|
|
29
57
|
__metadata("design:type", String)
|
|
30
|
-
],
|
|
58
|
+
], CreateEmployeeProfileDto.prototype, "mobilePhone", void 0);
|
|
31
59
|
__decorate([
|
|
60
|
+
(0, class_validator_1.IsOptional)(),
|
|
32
61
|
(0, class_validator_1.IsString)(),
|
|
62
|
+
__metadata("design:type", String)
|
|
63
|
+
], CreateEmployeeProfileDto.prototype, "position", void 0);
|
|
64
|
+
__decorate([
|
|
33
65
|
(0, class_validator_1.IsOptional)(),
|
|
66
|
+
(0, class_validator_1.IsString)(),
|
|
34
67
|
__metadata("design:type", String)
|
|
35
|
-
],
|
|
68
|
+
], CreateEmployeeProfileDto.prototype, "department", void 0);
|
|
36
69
|
__decorate([
|
|
37
|
-
(0, class_validator_1.
|
|
70
|
+
(0, class_validator_1.IsOptional)(),
|
|
71
|
+
(0, class_validator_1.IsString)(),
|
|
38
72
|
__metadata("design:type", String)
|
|
39
|
-
],
|
|
73
|
+
], CreateEmployeeProfileDto.prototype, "fax", void 0);
|
|
74
|
+
class UpdateEmployeeProfileDto {
|
|
75
|
+
}
|
|
76
|
+
exports.UpdateEmployeeProfileDto = UpdateEmployeeProfileDto;
|
|
40
77
|
__decorate([
|
|
78
|
+
(0, class_validator_1.IsOptional)(),
|
|
41
79
|
(0, class_validator_1.IsString)(),
|
|
80
|
+
__metadata("design:type", String)
|
|
81
|
+
], UpdateEmployeeProfileDto.prototype, "fullName", void 0);
|
|
82
|
+
__decorate([
|
|
42
83
|
(0, class_validator_1.IsOptional)(),
|
|
84
|
+
(0, class_validator_1.IsString)(),
|
|
43
85
|
__metadata("design:type", String)
|
|
44
|
-
],
|
|
86
|
+
], UpdateEmployeeProfileDto.prototype, "shortName", void 0);
|
|
45
87
|
__decorate([
|
|
88
|
+
(0, class_validator_1.IsOptional)(),
|
|
46
89
|
(0, class_validator_1.IsString)(),
|
|
90
|
+
__metadata("design:type", String)
|
|
91
|
+
], UpdateEmployeeProfileDto.prototype, "workPhone", void 0);
|
|
92
|
+
__decorate([
|
|
47
93
|
(0, class_validator_1.IsOptional)(),
|
|
94
|
+
(0, class_validator_1.IsString)(),
|
|
48
95
|
__metadata("design:type", String)
|
|
49
|
-
],
|
|
96
|
+
], UpdateEmployeeProfileDto.prototype, "mobilePhone", void 0);
|
|
50
97
|
__decorate([
|
|
98
|
+
(0, class_validator_1.IsOptional)(),
|
|
51
99
|
(0, class_validator_1.IsString)(),
|
|
100
|
+
__metadata("design:type", String)
|
|
101
|
+
], UpdateEmployeeProfileDto.prototype, "position", void 0);
|
|
102
|
+
__decorate([
|
|
52
103
|
(0, class_validator_1.IsOptional)(),
|
|
104
|
+
(0, class_validator_1.IsString)(),
|
|
53
105
|
__metadata("design:type", String)
|
|
54
|
-
],
|
|
106
|
+
], UpdateEmployeeProfileDto.prototype, "department", void 0);
|
|
55
107
|
__decorate([
|
|
108
|
+
(0, class_validator_1.IsOptional)(),
|
|
56
109
|
(0, class_validator_1.IsString)(),
|
|
110
|
+
__metadata("design:type", String)
|
|
111
|
+
], UpdateEmployeeProfileDto.prototype, "fax", void 0);
|
|
112
|
+
class CreatePublicProfileDto {
|
|
113
|
+
}
|
|
114
|
+
exports.CreatePublicProfileDto = CreatePublicProfileDto;
|
|
115
|
+
__decorate([
|
|
57
116
|
(0, class_validator_1.IsOptional)(),
|
|
117
|
+
(0, class_validator_1.IsString)(),
|
|
118
|
+
__metadata("design:type", String)
|
|
119
|
+
], CreatePublicProfileDto.prototype, "firstName", void 0);
|
|
120
|
+
__decorate([
|
|
121
|
+
(0, class_validator_1.IsOptional)(),
|
|
122
|
+
(0, class_validator_1.IsString)(),
|
|
123
|
+
__metadata("design:type", String)
|
|
124
|
+
], CreatePublicProfileDto.prototype, "lastName", void 0);
|
|
125
|
+
__decorate([
|
|
126
|
+
(0, class_validator_1.IsString)(),
|
|
58
127
|
__metadata("design:type", String)
|
|
59
|
-
],
|
|
128
|
+
], CreatePublicProfileDto.prototype, "username", void 0);
|
|
60
129
|
__decorate([
|
|
130
|
+
(0, class_validator_1.IsOptional)(),
|
|
61
131
|
(0, class_validator_1.IsString)(),
|
|
132
|
+
__metadata("design:type", String)
|
|
133
|
+
], CreatePublicProfileDto.prototype, "phone", void 0);
|
|
134
|
+
__decorate([
|
|
62
135
|
(0, class_validator_1.IsOptional)(),
|
|
136
|
+
(0, class_validator_1.IsEmail)(),
|
|
63
137
|
__metadata("design:type", String)
|
|
64
|
-
],
|
|
138
|
+
], CreatePublicProfileDto.prototype, "email", void 0);
|
|
139
|
+
class UpdatePublicProfileDto {
|
|
140
|
+
}
|
|
141
|
+
exports.UpdatePublicProfileDto = UpdatePublicProfileDto;
|
|
65
142
|
__decorate([
|
|
143
|
+
(0, class_validator_1.IsOptional)(),
|
|
66
144
|
(0, class_validator_1.IsString)(),
|
|
145
|
+
__metadata("design:type", String)
|
|
146
|
+
], UpdatePublicProfileDto.prototype, "firstName", void 0);
|
|
147
|
+
__decorate([
|
|
67
148
|
(0, class_validator_1.IsOptional)(),
|
|
149
|
+
(0, class_validator_1.IsString)(),
|
|
68
150
|
__metadata("design:type", String)
|
|
69
|
-
],
|
|
151
|
+
], UpdatePublicProfileDto.prototype, "lastName", void 0);
|
|
70
152
|
__decorate([
|
|
153
|
+
(0, class_validator_1.IsOptional)(),
|
|
71
154
|
(0, class_validator_1.IsString)(),
|
|
155
|
+
__metadata("design:type", String)
|
|
156
|
+
], UpdatePublicProfileDto.prototype, "phone", void 0);
|
|
157
|
+
__decorate([
|
|
72
158
|
(0, class_validator_1.IsOptional)(),
|
|
159
|
+
(0, class_validator_1.IsEmail)(),
|
|
73
160
|
__metadata("design:type", String)
|
|
74
|
-
],
|
|
161
|
+
], UpdatePublicProfileDto.prototype, "email", void 0);
|
|
75
162
|
//# sourceMappingURL=user.dto.js.map
|
package/dist/dto/user.dto.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"user.dto.js","sourceRoot":"","sources":["../../src/dto/user.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAgF;AAChF,
|
|
1
|
+
{"version":3,"file":"user.dto.js","sourceRoot":"","sources":["../../src/dto/user.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAgF;AAChF,kDAA0D;AAE1D,MAAa,aAAa;CAMzB;AAND,sCAMC;AAJG;IADC,IAAA,wBAAM,GAAE;;iDACW;AAGpB;IADC,IAAA,wBAAM,EAAC,oBAAQ,CAAC;;+CACG;AAGxB,MAAa,mBAAmB;CAG/B;AAHD,kDAGC;AADG;IADC,IAAA,wBAAM,EAAC,sBAAU,CAAC;;mDACC;AAGxB,MAAa,wBAAwB;CA8BpC;AA9BD,4DA8BC;AA5BG;IADC,IAAA,0BAAQ,GAAE;;0DACO;AAIlB;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;2DACQ;AAGnB;IADC,IAAA,yBAAO,GAAE;;uDACK;AAIf;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;2DACQ;AAInB;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;6DACU;AAIrB;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;0DACO;AAIlB;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;4DACS;AAIpB;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;qDACE;AAGjB,MAAa,wBAAwB;CA4BpC;AA5BD,4DA4BC;AAzBG;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;0DACO;AAIlB;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;2DACQ;AAInB;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;2DACQ;AAInB;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;6DACU;AAIrB;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;0DACO;AAIlB;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;4DACS;AAIpB;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;qDACE;AAGjB,MAAa,sBAAsB;CAmBlC;AAnBD,wDAmBC;AAhBG;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;yDACQ;AAInB;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;wDACO;AAGlB;IADC,IAAA,0BAAQ,GAAE;;wDACO;AAIlB;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;qDACI;AAIf;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,yBAAO,GAAE;;qDACK;AAGnB,MAAa,sBAAsB;CAgBlC;AAhBD,wDAgBC;AAbG;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;yDACQ;AAInB;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;wDACO;AAIlB;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;qDACI;AAIf;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,yBAAO,GAAE;;qDACK"}
|
package/dist/enums/iam.enum.d.ts
CHANGED
|
@@ -9,6 +9,13 @@ export declare enum IdentifierType {
|
|
|
9
9
|
}
|
|
10
10
|
export declare enum IdentityStatus {
|
|
11
11
|
ACTIVE = "ACTIVE",
|
|
12
|
+
SUSPENDED = "SUSPENDED",
|
|
13
|
+
LOCKED = "LOCKED",
|
|
12
14
|
BLOCKED = "BLOCKED",
|
|
13
15
|
DELETED = "DELETED"
|
|
14
16
|
}
|
|
17
|
+
export declare enum PermissionScope {
|
|
18
|
+
GLOBAL = "GLOBAL",
|
|
19
|
+
COMPANY = "COMPANY",
|
|
20
|
+
OWN = "OWN"
|
|
21
|
+
}
|
package/dist/enums/iam.enum.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.IdentityStatus = exports.IdentifierType = exports.SubjectType = void 0;
|
|
3
|
+
exports.PermissionScope = exports.IdentityStatus = exports.IdentifierType = exports.SubjectType = void 0;
|
|
4
4
|
var SubjectType;
|
|
5
5
|
(function (SubjectType) {
|
|
6
6
|
SubjectType["EMPLOYEE"] = "EMPLOYEE";
|
|
@@ -15,7 +15,15 @@ var IdentifierType;
|
|
|
15
15
|
var IdentityStatus;
|
|
16
16
|
(function (IdentityStatus) {
|
|
17
17
|
IdentityStatus["ACTIVE"] = "ACTIVE";
|
|
18
|
+
IdentityStatus["SUSPENDED"] = "SUSPENDED";
|
|
19
|
+
IdentityStatus["LOCKED"] = "LOCKED";
|
|
18
20
|
IdentityStatus["BLOCKED"] = "BLOCKED";
|
|
19
21
|
IdentityStatus["DELETED"] = "DELETED";
|
|
20
22
|
})(IdentityStatus || (exports.IdentityStatus = IdentityStatus = {}));
|
|
23
|
+
var PermissionScope;
|
|
24
|
+
(function (PermissionScope) {
|
|
25
|
+
PermissionScope["GLOBAL"] = "GLOBAL";
|
|
26
|
+
PermissionScope["COMPANY"] = "COMPANY";
|
|
27
|
+
PermissionScope["OWN"] = "OWN";
|
|
28
|
+
})(PermissionScope || (exports.PermissionScope = PermissionScope = {}));
|
|
21
29
|
//# sourceMappingURL=iam.enum.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"iam.enum.js","sourceRoot":"","sources":["../../src/enums/iam.enum.ts"],"names":[],"mappings":";;;AACA,IAAY,WAIX;AAJD,WAAY,WAAW;IACnB,oCAAqB,CAAA;IACrB,gCAAiB,CAAA;IACjB,kCAAmB,CAAA;AACvB,CAAC,EAJW,WAAW,2BAAX,WAAW,QAItB;AAGD,IAAY,cAGX;AAHD,WAAY,cAAc;IACtB,iCAAe,CAAA;IACf,uCAAqB,CAAA;AACzB,CAAC,EAHW,cAAc,8BAAd,cAAc,QAGzB;AAGD,IAAY,
|
|
1
|
+
{"version":3,"file":"iam.enum.js","sourceRoot":"","sources":["../../src/enums/iam.enum.ts"],"names":[],"mappings":";;;AACA,IAAY,WAIX;AAJD,WAAY,WAAW;IACnB,oCAAqB,CAAA;IACrB,gCAAiB,CAAA;IACjB,kCAAmB,CAAA;AACvB,CAAC,EAJW,WAAW,2BAAX,WAAW,QAItB;AAGD,IAAY,cAGX;AAHD,WAAY,cAAc;IACtB,iCAAe,CAAA;IACf,uCAAqB,CAAA;AACzB,CAAC,EAHW,cAAc,8BAAd,cAAc,QAGzB;AAGD,IAAY,cAMX;AAND,WAAY,cAAc;IACtB,mCAAiB,CAAA;IACjB,yCAAuB,CAAA;IACvB,mCAAiB,CAAA;IACjB,qCAAmB,CAAA;IACnB,qCAAmB,CAAA;AACvB,CAAC,EANW,cAAc,8BAAd,cAAc,QAMzB;AACD,IAAY,eAIX;AAJD,WAAY,eAAe;IACvB,oCAAiB,CAAA;IACjB,sCAAmB,CAAA;IACnB,8BAAW,CAAA;AACf,CAAC,EAJW,eAAe,+BAAf,eAAe,QAI1B"}
|
package/dist/enums/index.d.ts
CHANGED
package/dist/enums/index.js
CHANGED
|
@@ -26,4 +26,7 @@ __exportStar(require("./permission.enum"), exports);
|
|
|
26
26
|
__exportStar(require("./events.enum"), exports);
|
|
27
27
|
__exportStar(require("./card.enum"), exports);
|
|
28
28
|
__exportStar(require("./transaction.enum"), exports);
|
|
29
|
+
__exportStar(require("./saga.enum"), exports);
|
|
30
|
+
__exportStar(require("./job.enum"), exports);
|
|
31
|
+
__exportStar(require("./partner.enum"), exports);
|
|
29
32
|
//# sourceMappingURL=index.js.map
|
package/dist/enums/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/enums/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,6CAA2B;AAC3B,8CAA4B;AAC5B,6CAA2B;AAC3B,gDAA8B;AAC9B,iDAA+B;AAC/B,sDAAoC;AACpC,+CAA6B;AAC7B,8CAA4B;AAC5B,oDAAkC;AAClC,gDAA8B;AAC9B,8CAA4B;AAC5B,qDAAmC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/enums/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,6CAA2B;AAC3B,8CAA4B;AAC5B,6CAA2B;AAC3B,gDAA8B;AAC9B,iDAA+B;AAC/B,sDAAoC;AACpC,+CAA6B;AAC7B,8CAA4B;AAC5B,oDAAkC;AAClC,gDAA8B;AAC9B,8CAA4B;AAC5B,qDAAmC;AACnC,8CAA4B;AAC5B,6CAA2B;AAC3B,iDAA+B"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export declare enum JobStatus {
|
|
2
|
+
PENDING = "PENDING",
|
|
3
|
+
IN_PROGRESS = "IN_PROGRESS",
|
|
4
|
+
COMPLETED = "COMPLETED",
|
|
5
|
+
FAILED = "FAILED",
|
|
6
|
+
SKIPPED = "SKIPPED"
|
|
7
|
+
}
|
|
8
|
+
export declare enum JobType {
|
|
9
|
+
WALLET_ALLOCATION = "WALLET_ALLOCATION",
|
|
10
|
+
SYSTEM_CLEANUP = "SYSTEM_CLEANUP",
|
|
11
|
+
NOTIFICATION_RETRY = "NOTIFICATION_RETRY",
|
|
12
|
+
DBF_SYNC = "DBF_SYNC",
|
|
13
|
+
SESSION_CLEANUP = "SESSION_CLEANUP",
|
|
14
|
+
TOKEN_CLEANUP = "TOKEN_CLEANUP",
|
|
15
|
+
SAGA_CLEANUP = "SAGA_CLEANUP",
|
|
16
|
+
DAILY_NOTIFICATIONS = "DAILY_NOTIFICATIONS",
|
|
17
|
+
RECONCILIATION = "RECONCILIATION"
|
|
18
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.JobType = exports.JobStatus = void 0;
|
|
4
|
+
var JobStatus;
|
|
5
|
+
(function (JobStatus) {
|
|
6
|
+
JobStatus["PENDING"] = "PENDING";
|
|
7
|
+
JobStatus["IN_PROGRESS"] = "IN_PROGRESS";
|
|
8
|
+
JobStatus["COMPLETED"] = "COMPLETED";
|
|
9
|
+
JobStatus["FAILED"] = "FAILED";
|
|
10
|
+
JobStatus["SKIPPED"] = "SKIPPED";
|
|
11
|
+
})(JobStatus || (exports.JobStatus = JobStatus = {}));
|
|
12
|
+
var JobType;
|
|
13
|
+
(function (JobType) {
|
|
14
|
+
JobType["WALLET_ALLOCATION"] = "WALLET_ALLOCATION";
|
|
15
|
+
JobType["SYSTEM_CLEANUP"] = "SYSTEM_CLEANUP";
|
|
16
|
+
JobType["NOTIFICATION_RETRY"] = "NOTIFICATION_RETRY";
|
|
17
|
+
JobType["DBF_SYNC"] = "DBF_SYNC";
|
|
18
|
+
JobType["SESSION_CLEANUP"] = "SESSION_CLEANUP";
|
|
19
|
+
JobType["TOKEN_CLEANUP"] = "TOKEN_CLEANUP";
|
|
20
|
+
JobType["SAGA_CLEANUP"] = "SAGA_CLEANUP";
|
|
21
|
+
JobType["DAILY_NOTIFICATIONS"] = "DAILY_NOTIFICATIONS";
|
|
22
|
+
JobType["RECONCILIATION"] = "RECONCILIATION";
|
|
23
|
+
})(JobType || (exports.JobType = JobType = {}));
|
|
24
|
+
//# sourceMappingURL=job.enum.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"job.enum.js","sourceRoot":"","sources":["../../src/enums/job.enum.ts"],"names":[],"mappings":";;;AAAA,IAAY,SAMX;AAND,WAAY,SAAS;IACjB,gCAAmB,CAAA;IACnB,wCAA2B,CAAA;IAC3B,oCAAuB,CAAA;IACvB,8BAAiB,CAAA;IACjB,gCAAmB,CAAA;AACvB,CAAC,EANW,SAAS,yBAAT,SAAS,QAMpB;AAED,IAAY,OAUX;AAVD,WAAY,OAAO;IACf,kDAAuC,CAAA;IACvC,4CAAiC,CAAA;IACjC,oDAAyC,CAAA;IACzC,gCAAqB,CAAA;IACrB,8CAAmC,CAAA;IACnC,0CAA+B,CAAA;IAC/B,wCAA6B,CAAA;IAC7B,sDAA2C,CAAA;IAC3C,4CAAiC,CAAA;AACrC,CAAC,EAVW,OAAO,uBAAP,OAAO,QAUlB"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PartnerCompanyStatus = void 0;
|
|
4
|
+
var PartnerCompanyStatus;
|
|
5
|
+
(function (PartnerCompanyStatus) {
|
|
6
|
+
PartnerCompanyStatus["ACTIVE"] = "ACTIVE";
|
|
7
|
+
PartnerCompanyStatus["SUSPENDED"] = "SUSPENDED";
|
|
8
|
+
PartnerCompanyStatus["DELETED"] = "DELETED";
|
|
9
|
+
})(PartnerCompanyStatus || (exports.PartnerCompanyStatus = PartnerCompanyStatus = {}));
|
|
10
|
+
//# sourceMappingURL=partner.enum.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"partner.enum.js","sourceRoot":"","sources":["../../src/enums/partner.enum.ts"],"names":[],"mappings":";;;AAAA,IAAY,oBAIX;AAJD,WAAY,oBAAoB;IAC5B,yCAAiB,CAAA;IACjB,+CAAuB,CAAA;IACvB,2CAAmB,CAAA;AACvB,CAAC,EAJW,oBAAoB,oCAApB,oBAAoB,QAI/B"}
|
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
var
|
|
5
|
-
(function (
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
})(
|
|
3
|
+
exports.AppPermission = void 0;
|
|
4
|
+
var AppPermission;
|
|
5
|
+
(function (AppPermission) {
|
|
6
|
+
AppPermission["USERS_VIEW"] = "users:view";
|
|
7
|
+
AppPermission["USERS_MANAGE"] = "users:manage";
|
|
8
|
+
AppPermission["ROLES_MANAGE"] = "roles:manage";
|
|
9
|
+
AppPermission["PERMISSIONS_MANAGE"] = "permissions:manage";
|
|
10
|
+
AppPermission["CLIENTS_VIEW"] = "clients:view";
|
|
11
|
+
AppPermission["CLIENTS_MANAGE"] = "clients:manage";
|
|
12
|
+
AppPermission["PARTNERS_VIEW"] = "partners:view";
|
|
13
|
+
AppPermission["PARTNERS_MANAGE"] = "partners:manage";
|
|
14
|
+
AppPermission["INVOICES_VIEW"] = "invoices:view";
|
|
15
|
+
AppPermission["INVOICES_MANAGE"] = "invoices:manage";
|
|
16
|
+
AppPermission["TRANSACTIONS_VIEW"] = "transactions:view";
|
|
17
|
+
AppPermission["TRANSACTIONS_MANAGE"] = "transactions:manage";
|
|
18
|
+
AppPermission["CONFIG_VIEW"] = "config:view";
|
|
19
|
+
AppPermission["CONFIG_MANAGE"] = "config:manage";
|
|
20
|
+
AppPermission["LOGS_VIEW"] = "logs:view";
|
|
21
|
+
AppPermission["METRICS_VIEW"] = "metrics:view";
|
|
22
|
+
})(AppPermission || (exports.AppPermission = AppPermission = {}));
|
|
23
23
|
//# sourceMappingURL=permission.enum.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"permission.enum.js","sourceRoot":"","sources":["../../src/enums/permission.enum.ts"],"names":[],"mappings":";;;AAAA,IAAY,
|
|
1
|
+
{"version":3,"file":"permission.enum.js","sourceRoot":"","sources":["../../src/enums/permission.enum.ts"],"names":[],"mappings":";;;AAAA,IAAY,aA8BX;AA9BD,WAAY,aAAa;IAErB,0CAAyB,CAAA;IACzB,8CAA6B,CAAA;IAG7B,8CAA6B,CAAA;IAC7B,0DAAyC,CAAA;IAGzC,8CAA6B,CAAA;IAC7B,kDAAiC,CAAA;IAGjC,gDAA+B,CAAA;IAC/B,oDAAmC,CAAA;IAGnC,gDAA+B,CAAA;IAC/B,oDAAmC,CAAA;IACnC,wDAAuC,CAAA;IACvC,4DAA2C,CAAA;IAG3C,4CAA2B,CAAA;IAC3B,gDAA+B,CAAA;IAG/B,wCAAuB,CAAA;IACvB,8CAA6B,CAAA;AACjC,CAAC,EA9BW,aAAa,6BAAb,aAAa,QA8BxB"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SagaStatus = void 0;
|
|
4
|
+
var SagaStatus;
|
|
5
|
+
(function (SagaStatus) {
|
|
6
|
+
SagaStatus["PENDING"] = "PENDING";
|
|
7
|
+
SagaStatus["IN_PROGRESS"] = "IN_PROGRESS";
|
|
8
|
+
SagaStatus["COMPLETED"] = "COMPLETED";
|
|
9
|
+
SagaStatus["FAILED"] = "FAILED";
|
|
10
|
+
SagaStatus["COMPENSATING"] = "COMPENSATING";
|
|
11
|
+
SagaStatus["COMPENSATED"] = "COMPENSATED";
|
|
12
|
+
})(SagaStatus || (exports.SagaStatus = SagaStatus = {}));
|
|
13
|
+
//# sourceMappingURL=saga.enum.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"saga.enum.js","sourceRoot":"","sources":["../../src/enums/saga.enum.ts"],"names":[],"mappings":";;;AAAA,IAAY,UAOX;AAPD,WAAY,UAAU;IAClB,iCAAmB,CAAA;IACnB,yCAA2B,CAAA;IAC3B,qCAAuB,CAAA;IACvB,+BAAiB,CAAA;IACjB,2CAA6B,CAAA;IAC7B,yCAA2B,CAAA;AAC/B,CAAC,EAPW,UAAU,0BAAV,UAAU,QAOrB"}
|
|
@@ -11,7 +11,13 @@ export declare enum UserStatus {
|
|
|
11
11
|
INACTIVE = "INACTIVE",
|
|
12
12
|
PENDING = "PENDING",
|
|
13
13
|
SUSPENDED = "SUSPENDED",
|
|
14
|
-
BLOCKED = "BLOCKED"
|
|
14
|
+
BLOCKED = "BLOCKED",
|
|
15
|
+
DELETED = "DELETED"
|
|
16
|
+
}
|
|
17
|
+
export declare enum UserType {
|
|
18
|
+
EMPLOYEE = "EMPLOYEE",
|
|
19
|
+
CLIENT = "CLIENT",
|
|
20
|
+
PARTNER = "PARTNER"
|
|
15
21
|
}
|
|
16
22
|
export declare enum UserScope {
|
|
17
23
|
READ = "READ",
|
package/dist/enums/user.enum.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.UserScope = exports.UserStatus = exports.UserRole = void 0;
|
|
3
|
+
exports.UserScope = exports.UserType = exports.UserStatus = exports.UserRole = void 0;
|
|
4
4
|
var UserRole;
|
|
5
5
|
(function (UserRole) {
|
|
6
6
|
UserRole["SUPER_ADMIN"] = "SUPER_ADMIN";
|
|
@@ -17,7 +17,14 @@ var UserStatus;
|
|
|
17
17
|
UserStatus["PENDING"] = "PENDING";
|
|
18
18
|
UserStatus["SUSPENDED"] = "SUSPENDED";
|
|
19
19
|
UserStatus["BLOCKED"] = "BLOCKED";
|
|
20
|
+
UserStatus["DELETED"] = "DELETED";
|
|
20
21
|
})(UserStatus || (exports.UserStatus = UserStatus = {}));
|
|
22
|
+
var UserType;
|
|
23
|
+
(function (UserType) {
|
|
24
|
+
UserType["EMPLOYEE"] = "EMPLOYEE";
|
|
25
|
+
UserType["CLIENT"] = "CLIENT";
|
|
26
|
+
UserType["PARTNER"] = "PARTNER";
|
|
27
|
+
})(UserType || (exports.UserType = UserType = {}));
|
|
21
28
|
var UserScope;
|
|
22
29
|
(function (UserScope) {
|
|
23
30
|
UserScope["READ"] = "READ";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"user.enum.js","sourceRoot":"","sources":["../../src/enums/user.enum.ts"],"names":[],"mappings":";;;AAAA,IAAY,QAOX;AAPD,WAAY,QAAQ;IAChB,uCAA2B,CAAA;IAC3B,2BAAe,CAAA;IACf,+BAAmB,CAAA;IACnB,qCAAyB,CAAA;IACzB,+BAAmB,CAAA;IACnB,6BAAiB,CAAA;AACrB,CAAC,EAPW,QAAQ,wBAAR,QAAQ,QAOnB;AAED,IAAY,
|
|
1
|
+
{"version":3,"file":"user.enum.js","sourceRoot":"","sources":["../../src/enums/user.enum.ts"],"names":[],"mappings":";;;AAAA,IAAY,QAOX;AAPD,WAAY,QAAQ;IAChB,uCAA2B,CAAA;IAC3B,2BAAe,CAAA;IACf,+BAAmB,CAAA;IACnB,qCAAyB,CAAA;IACzB,+BAAmB,CAAA;IACnB,6BAAiB,CAAA;AACrB,CAAC,EAPW,QAAQ,wBAAR,QAAQ,QAOnB;AAED,IAAY,UAOX;AAPD,WAAY,UAAU;IAClB,+BAAiB,CAAA;IACjB,mCAAqB,CAAA;IACrB,iCAAmB,CAAA;IACnB,qCAAuB,CAAA;IACvB,iCAAmB,CAAA;IACnB,iCAAmB,CAAA;AACvB,CAAC,EAPW,UAAU,0BAAV,UAAU,QAOrB;AAED,IAAY,QAIX;AAJD,WAAY,QAAQ;IAChB,iCAAqB,CAAA;IACrB,6BAAiB,CAAA;IACjB,+BAAmB,CAAA;AACvB,CAAC,EAJW,QAAQ,wBAAR,QAAQ,QAInB;AAED,IAAY,SASX;AATD,WAAY,SAAS;IACjB,0BAAa,CAAA;IACb,4BAAe,CAAA;IACf,8BAAiB,CAAA;IACjB,4BAAe,CAAA;IACf,0CAA6B,CAAA;IAC7B,sCAAyB,CAAA;IACzB,oDAAuC,CAAA;IACvC,oCAAuB,CAAA;AAC3B,CAAC,EATW,SAAS,yBAAT,SAAS,QASpB"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ExceptionFilter, ArgumentsHost } from '@nestjs/common';
|
|
2
|
-
import type { IRemoteLogger } from '
|
|
2
|
+
import type { IRemoteLogger } from '@alacard-project/shared-dto';
|
|
3
3
|
export declare class GlobalExceptionFilter implements ExceptionFilter {
|
|
4
4
|
private readonly logger;
|
|
5
5
|
private remoteLogger?;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,13 +1,7 @@
|
|
|
1
1
|
import 'reflect-metadata';
|
|
2
|
-
export * from '
|
|
3
|
-
export * from '
|
|
4
|
-
export * from './types';
|
|
5
|
-
export * from './contracts';
|
|
6
|
-
export * from './dto';
|
|
7
|
-
export * from './errors/app.error';
|
|
8
|
-
export * from './errors/error-map';
|
|
2
|
+
export * from '@alacard-project/shared-proto';
|
|
3
|
+
export * from '@alacard-project/shared-dto';
|
|
9
4
|
export * from './decorators';
|
|
10
|
-
export * from './utils/proto-path';
|
|
11
5
|
export * from './utils/user.utils';
|
|
12
6
|
export * from './utils/app.utils';
|
|
13
7
|
export * from './utils/health.utils';
|
|
@@ -18,9 +12,9 @@ export * from './utils/grpc-tracing.interceptor';
|
|
|
18
12
|
export * from './utils/http-tracing.interceptor';
|
|
19
13
|
export * from './utils/grpc-tracing-server.interceptor';
|
|
20
14
|
export * from './resilience/circuit-breaker.service';
|
|
15
|
+
export * from './resilience/redis-throttler-storage';
|
|
21
16
|
export * from './resilience/resilience.module';
|
|
22
17
|
export * from './utils/filters';
|
|
23
18
|
export * from './utils/interceptors';
|
|
24
19
|
export * from './utils/app-logger';
|
|
25
20
|
export * from './middleware';
|
|
26
|
-
export * from './types/logger.interface';
|
package/dist/index.js
CHANGED
|
@@ -15,15 +15,9 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
require("reflect-metadata");
|
|
18
|
-
__exportStar(require("
|
|
19
|
-
__exportStar(require("
|
|
20
|
-
__exportStar(require("./types"), exports);
|
|
21
|
-
__exportStar(require("./contracts"), exports);
|
|
22
|
-
__exportStar(require("./dto"), exports);
|
|
23
|
-
__exportStar(require("./errors/app.error"), exports);
|
|
24
|
-
__exportStar(require("./errors/error-map"), exports);
|
|
18
|
+
__exportStar(require("@alacard-project/shared-proto"), exports);
|
|
19
|
+
__exportStar(require("@alacard-project/shared-dto"), exports);
|
|
25
20
|
__exportStar(require("./decorators"), exports);
|
|
26
|
-
__exportStar(require("./utils/proto-path"), exports);
|
|
27
21
|
__exportStar(require("./utils/user.utils"), exports);
|
|
28
22
|
__exportStar(require("./utils/app.utils"), exports);
|
|
29
23
|
__exportStar(require("./utils/health.utils"), exports);
|
|
@@ -34,10 +28,10 @@ __exportStar(require("./utils/grpc-tracing.interceptor"), exports);
|
|
|
34
28
|
__exportStar(require("./utils/http-tracing.interceptor"), exports);
|
|
35
29
|
__exportStar(require("./utils/grpc-tracing-server.interceptor"), exports);
|
|
36
30
|
__exportStar(require("./resilience/circuit-breaker.service"), exports);
|
|
31
|
+
__exportStar(require("./resilience/redis-throttler-storage"), exports);
|
|
37
32
|
__exportStar(require("./resilience/resilience.module"), exports);
|
|
38
33
|
__exportStar(require("./utils/filters"), exports);
|
|
39
34
|
__exportStar(require("./utils/interceptors"), exports);
|
|
40
35
|
__exportStar(require("./utils/app-logger"), exports);
|
|
41
36
|
__exportStar(require("./middleware"), exports);
|
|
42
|
-
__exportStar(require("./types/logger.interface"), exports);
|
|
43
37
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4BAA0B;AAC1B,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4BAA0B;AAC1B,gEAA8C;AAC9C,8DAA4C;AAC5C,+CAA6B;AAC7B,qDAAmC;AACnC,oDAAkC;AAClC,uDAAqC;AACrC,wDAAsC;AACtC,0DAAwC;AACxC,yDAAuC;AACvC,mEAAiD;AACjD,mEAAiD;AACjD,0EAAwD;AACxD,uEAAqD;AACrD,uEAAqD;AACrD,iEAA+C;AAC/C,kDAAgC;AAChC,uDAAqC;AAErC,qDAAmC;AACnC,+CAA6B"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { Logger } from '@nestjs/common';
|
|
2
|
-
import { IRemoteLogger } from '
|
|
2
|
+
import { IRemoteLogger } from '@alacard-project/shared-dto';
|
|
3
3
|
export declare function createPrismaLoggingMiddleware(logger: Logger, remoteLogger?: IRemoteLogger): (params: any, next: (params: any) => Promise<any>) => Promise<any>;
|
|
@@ -13,6 +13,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
13
13
|
exports.CircuitBreakerService = void 0;
|
|
14
14
|
const common_1 = require("@nestjs/common");
|
|
15
15
|
const opossum_1 = __importDefault(require("opossum"));
|
|
16
|
+
const tracing_service_1 = require("../utils/tracing.service");
|
|
16
17
|
let CircuitBreakerService = CircuitBreakerService_1 = class CircuitBreakerService {
|
|
17
18
|
constructor() {
|
|
18
19
|
this.logger = new common_1.Logger(CircuitBreakerService_1.name);
|
|
@@ -21,7 +22,8 @@ let CircuitBreakerService = CircuitBreakerService_1 = class CircuitBreakerServic
|
|
|
21
22
|
async execute(key, fn, options = {}) {
|
|
22
23
|
let breaker = this.breakers.get(key);
|
|
23
24
|
if (!breaker) {
|
|
24
|
-
|
|
25
|
+
const genericExecutor = (task) => task();
|
|
26
|
+
breaker = new opossum_1.default(genericExecutor, {
|
|
25
27
|
timeout: 10000,
|
|
26
28
|
errorThresholdPercentage: 50,
|
|
27
29
|
resetTimeout: 30000,
|
|
@@ -32,7 +34,12 @@ let CircuitBreakerService = CircuitBreakerService_1 = class CircuitBreakerServic
|
|
|
32
34
|
breaker.on('close', () => this.logger.log(`Circuit breaker [${key}] is CLOSED`));
|
|
33
35
|
this.breakers.set(key, breaker);
|
|
34
36
|
}
|
|
35
|
-
|
|
37
|
+
const store = tracing_service_1.TracingService.getStorage().getStore();
|
|
38
|
+
if (store) {
|
|
39
|
+
const boundFn = () => tracing_service_1.TracingService.getStorage().run(store, fn);
|
|
40
|
+
return breaker.fire(boundFn);
|
|
41
|
+
}
|
|
42
|
+
return breaker.fire(fn);
|
|
36
43
|
}
|
|
37
44
|
};
|
|
38
45
|
exports.CircuitBreakerService = CircuitBreakerService;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"circuit-breaker.service.js","sourceRoot":"","sources":["../../src/resilience/circuit-breaker.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,2CAAoD;AACpD,sDAA8B;
|
|
1
|
+
{"version":3,"file":"circuit-breaker.service.js","sourceRoot":"","sources":["../../src/resilience/circuit-breaker.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,2CAAoD;AACpD,sDAA8B;AAC9B,8DAA0D;AAGnD,IAAM,qBAAqB,6BAA3B,MAAM,qBAAqB;IAA3B;QACc,WAAM,GAAG,IAAI,eAAM,CAAC,uBAAqB,CAAC,IAAI,CAAC,CAAC;QAChD,aAAQ,GAAG,IAAI,GAAG,EAAe,CAAC;IAiCvD,CAAC;IA/BG,KAAK,CAAC,OAAO,CAAI,GAAW,EAAE,EAAoB,EAAE,UAAe,EAAE;QACjE,IAAI,OAAO,GAAG,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;QAErC,IAAI,CAAC,OAAO,EAAE,CAAC;YAIX,MAAM,eAAe,GAAG,CAAC,IAAsB,EAAE,EAAE,CAAC,IAAI,EAAE,CAAC;YAE3D,OAAO,GAAG,IAAI,iBAAO,CAAC,eAAe,EAAE;gBACnC,OAAO,EAAE,KAAK;gBACd,wBAAwB,EAAE,EAAE;gBAC5B,YAAY,EAAE,KAAK;gBACnB,GAAG,OAAO;aACb,CAAC,CAAC;YAEH,OAAO,CAAC,EAAE,CAAC,MAAM,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,oBAAoB,GAAG,WAAW,CAAC,CAAC,CAAC;YAC/E,OAAO,CAAC,EAAE,CAAC,UAAU,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,oBAAoB,GAAG,gBAAgB,CAAC,CAAC,CAAC;YACvF,OAAO,CAAC,EAAE,CAAC,OAAO,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,oBAAoB,GAAG,aAAa,CAAC,CAAC,CAAC;YAEjF,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;QACpC,CAAC;QAED,MAAM,KAAK,GAAG,gCAAc,CAAC,UAAU,EAAE,CAAC,QAAQ,EAAE,CAAC;QACrD,IAAI,KAAK,EAAE,CAAC;YACR,MAAM,OAAO,GAAG,GAAG,EAAE,CAAC,gCAAc,CAAC,UAAU,EAAE,CAAC,GAAG,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;YACjE,OAAO,OAAO,CAAC,IAAI,CAAC,OAAO,CAAe,CAAC;QAC/C,CAAC;QAED,OAAO,OAAO,CAAC,IAAI,CAAC,EAAE,CAAe,CAAC;IAC1C,CAAC;CACJ,CAAA;AAnCY,sDAAqB;gCAArB,qBAAqB;IADjC,IAAA,mBAAU,GAAE;GACA,qBAAqB,CAmCjC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { OnModuleDestroy, OnModuleInit } from '@nestjs/common';
|
|
2
|
+
import { ThrottlerStorage } from '@nestjs/throttler';
|
|
3
|
+
export declare class RedisThrottlerStorage implements ThrottlerStorage, OnModuleInit, OnModuleDestroy {
|
|
4
|
+
private redis;
|
|
5
|
+
private readonly host;
|
|
6
|
+
private readonly port;
|
|
7
|
+
constructor();
|
|
8
|
+
onModuleInit(): void;
|
|
9
|
+
increment(key: string, ttl: number): Promise<any>;
|
|
10
|
+
onModuleDestroy(): void;
|
|
11
|
+
}
|