@zorionapp/gg-toolkit 4.14.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/README.md +11 -0
- package/decorator/index.d.ts +1 -0
- package/decorator/index.js +5 -0
- package/decorator/index.js.map +1 -0
- package/decorator/swagger.decorators.d.ts +4 -0
- package/decorator/swagger.decorators.js +41 -0
- package/decorator/swagger.decorators.js.map +1 -0
- package/dto/index.d.ts +5 -0
- package/dto/index.js +9 -0
- package/dto/index.js.map +1 -0
- package/dto/merchant.dto.d.ts +16 -0
- package/dto/merchant.dto.js +113 -0
- package/dto/merchant.dto.js.map +1 -0
- package/dto/meta.dto.d.ts +8 -0
- package/dto/meta.dto.js +36 -0
- package/dto/meta.dto.js.map +1 -0
- package/dto/pagination.dto.d.ts +8 -0
- package/dto/pagination.dto.js +44 -0
- package/dto/pagination.dto.js.map +1 -0
- package/dto/user.dto.d.ts +33 -0
- package/dto/user.dto.js +258 -0
- package/dto/user.dto.js.map +1 -0
- package/dto/wallet.dto.d.ts +14 -0
- package/dto/wallet.dto.js +95 -0
- package/dto/wallet.dto.js.map +1 -0
- package/enum/antifraud.enums.d.ts +42 -0
- package/enum/antifraud.enums.js +52 -0
- package/enum/antifraud.enums.js.map +1 -0
- package/enum/currency.enum.d.ts +391 -0
- package/enum/currency.enum.js +400 -0
- package/enum/currency.enum.js.map +1 -0
- package/enum/db-schemas.enum.d.ts +10 -0
- package/enum/db-schemas.enum.js +15 -0
- package/enum/db-schemas.enum.js.map +1 -0
- package/enum/exchange.enums.d.ts +20 -0
- package/enum/exchange.enums.js +27 -0
- package/enum/exchange.enums.js.map +1 -0
- package/enum/index.d.ts +17 -0
- package/enum/index.js +21 -0
- package/enum/index.js.map +1 -0
- package/enum/invoice.enums.d.ts +12 -0
- package/enum/invoice.enums.js +18 -0
- package/enum/invoice.enums.js.map +1 -0
- package/enum/merchant-agent.enums.d.ts +15 -0
- package/enum/merchant-agent.enums.js +22 -0
- package/enum/merchant-agent.enums.js.map +1 -0
- package/enum/merchant.enums.d.ts +8 -0
- package/enum/merchant.enums.js +14 -0
- package/enum/merchant.enums.js.map +1 -0
- package/enum/mop.enums.d.ts +20 -0
- package/enum/mop.enums.js +26 -0
- package/enum/mop.enums.js.map +1 -0
- package/enum/notification.enum.d.ts +73 -0
- package/enum/notification.enum.js +83 -0
- package/enum/notification.enum.js.map +1 -0
- package/enum/operation.enums.d.ts +22 -0
- package/enum/operation.enums.js +29 -0
- package/enum/operation.enums.js.map +1 -0
- package/enum/otp.enums.d.ts +12 -0
- package/enum/otp.enums.js +19 -0
- package/enum/otp.enums.js.map +1 -0
- package/enum/payment.enums.d.ts +69 -0
- package/enum/payment.enums.js +82 -0
- package/enum/payment.enums.js.map +1 -0
- package/enum/refill.enums.d.ts +10 -0
- package/enum/refill.enums.js +16 -0
- package/enum/refill.enums.js.map +1 -0
- package/enum/refund.enums.d.ts +6 -0
- package/enum/refund.enums.js +12 -0
- package/enum/refund.enums.js.map +1 -0
- package/enum/transfer.enums.d.ts +66 -0
- package/enum/transfer.enums.js +78 -0
- package/enum/transfer.enums.js.map +1 -0
- package/enum/user.enums.d.ts +32 -0
- package/enum/user.enums.js +44 -0
- package/enum/user.enums.js.map +1 -0
- package/enum/wallet.enums.d.ts +30 -0
- package/enum/wallet.enums.js +39 -0
- package/enum/wallet.enums.js.map +1 -0
- package/microservices/commands/index.d.ts +1 -0
- package/microservices/commands/index.js +5 -0
- package/microservices/commands/index.js.map +1 -0
- package/microservices/commands/rmq.command.d.ts +34 -0
- package/microservices/commands/rmq.command.js +34 -0
- package/microservices/commands/rmq.command.js.map +1 -0
- package/microservices/events/index.d.ts +1 -0
- package/microservices/events/index.js +5 -0
- package/microservices/events/index.js.map +1 -0
- package/microservices/events/rmq.event.d.ts +5 -0
- package/microservices/events/rmq.event.js +10 -0
- package/microservices/events/rmq.event.js.map +1 -0
- package/microservices/index.d.ts +2 -0
- package/microservices/index.js +6 -0
- package/microservices/index.js.map +1 -0
- package/models/abstract-entity.d.ts +5 -0
- package/models/abstract-entity.js +30 -0
- package/models/abstract-entity.js.map +1 -0
- package/models/index.d.ts +1 -0
- package/models/index.js +5 -0
- package/models/index.js.map +1 -0
- package/nominal-type/currency/currency-type.validator.d.ts +15 -0
- package/nominal-type/currency/currency-type.validator.js +61 -0
- package/nominal-type/currency/currency-type.validator.js.map +1 -0
- package/nominal-type/currency/currency.ntype.d.ts +61 -0
- package/nominal-type/currency/currency.ntype.js +136 -0
- package/nominal-type/currency/currency.ntype.js.map +1 -0
- package/nominal-type/index.d.ts +5 -0
- package/nominal-type/index.js +9 -0
- package/nominal-type/index.js.map +1 -0
- package/nominal-type/money/money-type.validator.d.ts +13 -0
- package/nominal-type/money/money-type.validator.js +62 -0
- package/nominal-type/money/money-type.validator.js.map +1 -0
- package/nominal-type/money/money.ntype.d.ts +136 -0
- package/nominal-type/money/money.ntype.js +395 -0
- package/nominal-type/money/money.ntype.js.map +1 -0
- package/nominal-type/mop/mop-type.map.d.ts +2 -0
- package/nominal-type/mop/mop-type.map.js +653 -0
- package/nominal-type/mop/mop-type.map.js.map +1 -0
- package/nominal-type/mop/mop.ntype.d.ts +28 -0
- package/nominal-type/mop/mop.ntype.js +39 -0
- package/nominal-type/mop/mop.ntype.js.map +1 -0
- package/nominal-type/mop/mop.validator.d.ts +7 -0
- package/nominal-type/mop/mop.validator.js +24 -0
- package/nominal-type/mop/mop.validator.js.map +1 -0
- package/nominal-type/operation-id/operation-id.ntype.d.ts +30 -0
- package/nominal-type/operation-id/operation-id.ntype.js +33 -0
- package/nominal-type/operation-id/operation-id.ntype.js.map +1 -0
- package/nominal-type/operation-id/operation-id.validator.d.ts +7 -0
- package/nominal-type/operation-id/operation-id.validator.js +23 -0
- package/nominal-type/operation-id/operation-id.validator.js.map +1 -0
- package/nominal-type/wallet-id/wallet-id.ntype.d.ts +58 -0
- package/nominal-type/wallet-id/wallet-id.ntype.js +154 -0
- package/nominal-type/wallet-id/wallet-id.ntype.js.map +1 -0
- package/nominal-type/wallet-id/wallet-id.validator.d.ts +50 -0
- package/nominal-type/wallet-id/wallet-id.validator.js +79 -0
- package/nominal-type/wallet-id/wallet-id.validator.js.map +1 -0
- package/package.json +55 -0
- package/transformer/currency-dto.transformer.d.ts +1 -0
- package/transformer/currency-dto.transformer.js +15 -0
- package/transformer/currency-dto.transformer.js.map +1 -0
- package/transformer/currency-typeorm.transformer.d.ts +6 -0
- package/transformer/currency-typeorm.transformer.js +21 -0
- package/transformer/currency-typeorm.transformer.js.map +1 -0
- package/transformer/index.d.ts +5 -0
- package/transformer/index.js +9 -0
- package/transformer/index.js.map +1 -0
- package/transformer/money-dto.transformer.d.ts +4 -0
- package/transformer/money-dto.transformer.js +21 -0
- package/transformer/money-dto.transformer.js.map +1 -0
- package/transformer/money-typeorm.transformer.d.ts +7 -0
- package/transformer/money-typeorm.transformer.js +25 -0
- package/transformer/money-typeorm.transformer.js.map +1 -0
- package/transformer/to-boolean.transformer.d.ts +1 -0
- package/transformer/to-boolean.transformer.js +29 -0
- package/transformer/to-boolean.transformer.js.map +1 -0
- package/util/compact-object.d.ts +8 -0
- package/util/compact-object.js +43 -0
- package/util/compact-object.js.map +1 -0
- package/util/index.d.ts +3 -0
- package/util/index.js +7 -0
- package/util/index.js.map +1 -0
- package/util/money-math-formulas.d.ts +13 -0
- package/util/money-math-formulas.js +18 -0
- package/util/money-math-formulas.js.map +1 -0
- package/util/response-wrapper.d.ts +16 -0
- package/util/response-wrapper.js +41 -0
- package/util/response-wrapper.js.map +1 -0
- package/validator/index.d.ts +2 -0
- package/validator/index.js +6 -0
- package/validator/index.js.map +1 -0
- package/validator/is-login.validator.d.ts +3 -0
- package/validator/is-login.validator.js +26 -0
- package/validator/is-login.validator.js.map +1 -0
- package/validator/is-valid-enum.validator.d.ts +2 -0
- package/validator/is-valid-enum.validator.js +7 -0
- package/validator/is-valid-enum.validator.js.map +1 -0
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Transfer = void 0;
|
|
4
|
+
const ts_enum_util_1 = require("ts-enum-util");
|
|
5
|
+
/**
|
|
6
|
+
* @namespace Transfer
|
|
7
|
+
* @description This namespace contains enums and functions related to transfers.
|
|
8
|
+
* todo: probably can be rewritten to class
|
|
9
|
+
*/
|
|
10
|
+
var Transfer;
|
|
11
|
+
(function (Transfer) {
|
|
12
|
+
/**
|
|
13
|
+
* @enum Type
|
|
14
|
+
* @description Specifies the different type of transfers that can be made.
|
|
15
|
+
*/
|
|
16
|
+
let Type;
|
|
17
|
+
(function (Type) {
|
|
18
|
+
Type["Withdraw"] = "Withdraw";
|
|
19
|
+
Type["Purchase"] = "Purchase";
|
|
20
|
+
Type["AdminRefill"] = "AdminRefill";
|
|
21
|
+
Type["Transfer"] = "Transfer";
|
|
22
|
+
Type["Refund"] = "Refund";
|
|
23
|
+
Type["AdminWithdraw"] = "AdminWithdraw";
|
|
24
|
+
Type["Refill"] = "Refill";
|
|
25
|
+
Type["Transit"] = "Transit";
|
|
26
|
+
Type["Commission"] = "Commission";
|
|
27
|
+
Type["Hold"] = "Hold";
|
|
28
|
+
Type["RollingReserve"] = "RollingReserve";
|
|
29
|
+
Type["Emission"] = "Emission";
|
|
30
|
+
Type["Bonus"] = "Bonus";
|
|
31
|
+
})(Type = Transfer.Type || (Transfer.Type = {}));
|
|
32
|
+
/**
|
|
33
|
+
* @enum TypeNumeric
|
|
34
|
+
* @description Numeric mapping of the different types of transfers.
|
|
35
|
+
*/
|
|
36
|
+
let TypeNumeric;
|
|
37
|
+
(function (TypeNumeric) {
|
|
38
|
+
TypeNumeric[TypeNumeric["Refill"] = 1] = "Refill";
|
|
39
|
+
TypeNumeric[TypeNumeric["Transfer"] = 2] = "Transfer";
|
|
40
|
+
TypeNumeric[TypeNumeric["Withdraw"] = 3] = "Withdraw";
|
|
41
|
+
TypeNumeric[TypeNumeric["Purchase"] = 4] = "Purchase";
|
|
42
|
+
TypeNumeric[TypeNumeric["AdminWithdraw"] = 5] = "AdminWithdraw";
|
|
43
|
+
TypeNumeric[TypeNumeric["Refund"] = 6] = "Refund";
|
|
44
|
+
TypeNumeric[TypeNumeric["AdminRefill"] = 7] = "AdminRefill";
|
|
45
|
+
TypeNumeric[TypeNumeric["Transit"] = 8] = "Transit";
|
|
46
|
+
TypeNumeric[TypeNumeric["Commission"] = 9] = "Commission";
|
|
47
|
+
TypeNumeric[TypeNumeric["Hold"] = 10] = "Hold";
|
|
48
|
+
TypeNumeric[TypeNumeric["RollingReserve"] = 11] = "RollingReserve";
|
|
49
|
+
TypeNumeric[TypeNumeric["Emission"] = 12] = "Emission";
|
|
50
|
+
TypeNumeric[TypeNumeric["Bonus"] = 13] = "Bonus";
|
|
51
|
+
})(TypeNumeric = Transfer.TypeNumeric || (Transfer.TypeNumeric = {}));
|
|
52
|
+
/**
|
|
53
|
+
* @enum Status
|
|
54
|
+
* @description Specifies the different transfers statuses that can be made.
|
|
55
|
+
*/
|
|
56
|
+
let Status;
|
|
57
|
+
(function (Status) {
|
|
58
|
+
Status["Created"] = "Created";
|
|
59
|
+
Status["Pending"] = "Pending";
|
|
60
|
+
Status["Success"] = "Success";
|
|
61
|
+
Status["Failure"] = "Failure";
|
|
62
|
+
})(Status = Transfer.Status || (Transfer.Status = {}));
|
|
63
|
+
/**
|
|
64
|
+
* @function typeToNumeric
|
|
65
|
+
* @description A function to map a Type enum value to TypeNumeric enum value
|
|
66
|
+
*
|
|
67
|
+
* @param {Type} type - A value of Type enum
|
|
68
|
+
*
|
|
69
|
+
* @returns {TypeNumeric} - Corresponding TypeNumeric value
|
|
70
|
+
*
|
|
71
|
+
* @throws {TypeError} - If the provided type does not have a corresponding TypeNumeric
|
|
72
|
+
*/
|
|
73
|
+
Transfer.typeToNumeric = (type) => {
|
|
74
|
+
const typeKey = (0, ts_enum_util_1.$enum)(Type).getKeyOrThrow(type);
|
|
75
|
+
return (0, ts_enum_util_1.$enum)(TypeNumeric).getValueOrThrow(typeKey);
|
|
76
|
+
};
|
|
77
|
+
})(Transfer || (exports.Transfer = Transfer = {}));
|
|
78
|
+
//# sourceMappingURL=transfer.enums.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transfer.enums.js","sourceRoot":"","sources":["../../../../libs/gg-toolkit/enum/transfer.enums.ts"],"names":[],"mappings":";;;AAAA,+CAAqC;AAErC;;;;GAIG;AACH,IAAiB,QAAQ,CAmExB;AAnED,WAAiB,QAAQ;IACvB;;;OAGG;IACH,IAAY,IAcX;IAdD,WAAY,IAAI;QACd,6BAAqB,CAAA;QACrB,6BAAqB,CAAA;QACrB,mCAA2B,CAAA;QAC3B,6BAAqB,CAAA;QACrB,yBAAiB,CAAA;QACjB,uCAA+B,CAAA;QAC/B,yBAAiB,CAAA;QACjB,2BAAmB,CAAA;QACnB,iCAAyB,CAAA;QACzB,qBAAa,CAAA;QACb,yCAAiC,CAAA;QACjC,6BAAqB,CAAA;QACrB,uBAAe,CAAA;IACjB,CAAC,EAdW,IAAI,GAAJ,aAAI,KAAJ,aAAI,QAcf;IAED;;;OAGG;IACH,IAAY,WAcX;IAdD,WAAY,WAAW;QACrB,iDAAU,CAAA;QACV,qDAAY,CAAA;QACZ,qDAAY,CAAA;QACZ,qDAAY,CAAA;QACZ,+DAAiB,CAAA;QACjB,iDAAU,CAAA;QACV,2DAAe,CAAA;QACf,mDAAW,CAAA;QACX,yDAAc,CAAA;QACd,8CAAS,CAAA;QACT,kEAAmB,CAAA;QACnB,sDAAa,CAAA;QACb,gDAAU,CAAA;IACZ,CAAC,EAdW,WAAW,GAAX,oBAAW,KAAX,oBAAW,QActB;IAED;;;OAGG;IACH,IAAY,MAKX;IALD,WAAY,MAAM;QAChB,6BAAmB,CAAA;QACnB,6BAAmB,CAAA;QACnB,6BAAmB,CAAA;QACnB,6BAAmB,CAAA;IACrB,CAAC,EALW,MAAM,GAAN,eAAM,KAAN,eAAM,QAKjB;IAED;;;;;;;;;OASG;IACU,sBAAa,GAAG,CAAC,IAAU,EAAe,EAAE;QACvD,MAAM,OAAO,GAAG,IAAA,oBAAK,EAAC,IAAI,CAAC,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC;QAEhD,OAAO,IAAA,oBAAK,EAAC,WAAW,CAAC,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC;IACrD,CAAC,CAAC;AACJ,CAAC,EAnEgB,QAAQ,wBAAR,QAAQ,QAmExB"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
export declare namespace User {
|
|
2
|
+
enum Status {
|
|
3
|
+
Active = "active",
|
|
4
|
+
InActive = "in_active",
|
|
5
|
+
IncorrectOtpBlocked = "incorrect_otp_blocked",
|
|
6
|
+
IncorrectPasswordBlocked = "incorrect_password_blocked",
|
|
7
|
+
PasswordRecoveryBlocked = "password_recovery_blocked",
|
|
8
|
+
ChangePasswordRequired = "change_password_required",
|
|
9
|
+
Blocked = "blocked"
|
|
10
|
+
}
|
|
11
|
+
enum Sex {
|
|
12
|
+
Male = "male",
|
|
13
|
+
Female = "female",
|
|
14
|
+
Other = "other"
|
|
15
|
+
}
|
|
16
|
+
enum Role {
|
|
17
|
+
Test = "gg-test",
|
|
18
|
+
Beta = "gg-beta",
|
|
19
|
+
Admin = "gg-admin",
|
|
20
|
+
Fin = "gg-fin",
|
|
21
|
+
Support = "gg-support",
|
|
22
|
+
SeniorSupport = "gg-senior-support",
|
|
23
|
+
Antifraud = "gg-antifraud"
|
|
24
|
+
}
|
|
25
|
+
enum VerificationStatus {
|
|
26
|
+
Unverified = "unverified",
|
|
27
|
+
Pending = "pending",
|
|
28
|
+
Verified = "verified",
|
|
29
|
+
Retry = "retry",
|
|
30
|
+
Rejected = "rejected"
|
|
31
|
+
}
|
|
32
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.User = void 0;
|
|
4
|
+
var User;
|
|
5
|
+
(function (User) {
|
|
6
|
+
let Status;
|
|
7
|
+
(function (Status) {
|
|
8
|
+
Status["Active"] = "active";
|
|
9
|
+
Status["InActive"] = "in_active";
|
|
10
|
+
Status["IncorrectOtpBlocked"] = "incorrect_otp_blocked";
|
|
11
|
+
Status["IncorrectPasswordBlocked"] = "incorrect_password_blocked";
|
|
12
|
+
Status["PasswordRecoveryBlocked"] = "password_recovery_blocked";
|
|
13
|
+
Status["ChangePasswordRequired"] = "change_password_required";
|
|
14
|
+
Status["Blocked"] = "blocked";
|
|
15
|
+
})(Status = User.Status || (User.Status = {}));
|
|
16
|
+
let Sex;
|
|
17
|
+
(function (Sex) {
|
|
18
|
+
Sex["Male"] = "male";
|
|
19
|
+
Sex["Female"] = "female";
|
|
20
|
+
Sex["Other"] = "other";
|
|
21
|
+
})(Sex = User.Sex || (User.Sex = {}));
|
|
22
|
+
let Role;
|
|
23
|
+
(function (Role) {
|
|
24
|
+
// Role to indicate testing user
|
|
25
|
+
Role["Test"] = "gg-test";
|
|
26
|
+
// Users
|
|
27
|
+
Role["Beta"] = "gg-beta";
|
|
28
|
+
// Administrators
|
|
29
|
+
Role["Admin"] = "gg-admin";
|
|
30
|
+
Role["Fin"] = "gg-fin";
|
|
31
|
+
Role["Support"] = "gg-support";
|
|
32
|
+
Role["SeniorSupport"] = "gg-senior-support";
|
|
33
|
+
Role["Antifraud"] = "gg-antifraud";
|
|
34
|
+
})(Role = User.Role || (User.Role = {}));
|
|
35
|
+
let VerificationStatus;
|
|
36
|
+
(function (VerificationStatus) {
|
|
37
|
+
VerificationStatus["Unverified"] = "unverified";
|
|
38
|
+
VerificationStatus["Pending"] = "pending";
|
|
39
|
+
VerificationStatus["Verified"] = "verified";
|
|
40
|
+
VerificationStatus["Retry"] = "retry";
|
|
41
|
+
VerificationStatus["Rejected"] = "rejected";
|
|
42
|
+
})(VerificationStatus = User.VerificationStatus || (User.VerificationStatus = {}));
|
|
43
|
+
})(User || (exports.User = User = {}));
|
|
44
|
+
//# sourceMappingURL=user.enums.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"user.enums.js","sourceRoot":"","sources":["../../../../libs/gg-toolkit/enum/user.enums.ts"],"names":[],"mappings":";;;AAAA,IAAiB,IAAI,CAuCpB;AAvCD,WAAiB,IAAI;IACnB,IAAY,MAQX;IARD,WAAY,MAAM;QAChB,2BAAiB,CAAA;QACjB,gCAAsB,CAAA;QACtB,uDAA6C,CAAA;QAC7C,iEAAuD,CAAA;QACvD,+DAAqD,CAAA;QACrD,6DAAmD,CAAA;QACnD,6BAAmB,CAAA;IACrB,CAAC,EARW,MAAM,GAAN,WAAM,KAAN,WAAM,QAQjB;IAED,IAAY,GAIX;IAJD,WAAY,GAAG;QACb,oBAAa,CAAA;QACb,wBAAiB,CAAA;QACjB,sBAAe,CAAA;IACjB,CAAC,EAJW,GAAG,GAAH,QAAG,KAAH,QAAG,QAId;IAED,IAAY,IAaX;IAbD,WAAY,IAAI;QACd,gCAAgC;QAChC,wBAAgB,CAAA;QAEhB,QAAQ;QACR,wBAAgB,CAAA;QAEhB,iBAAiB;QACjB,0BAAkB,CAAA;QAClB,sBAAc,CAAA;QACd,8BAAsB,CAAA;QACtB,2CAAmC,CAAA;QACnC,kCAA0B,CAAA;IAC5B,CAAC,EAbW,IAAI,GAAJ,SAAI,KAAJ,SAAI,QAaf;IAED,IAAY,kBAMX;IAND,WAAY,kBAAkB;QAC5B,+CAAyB,CAAA;QACzB,yCAAmB,CAAA;QACnB,2CAAqB,CAAA;QACrB,qCAAe,CAAA;QACf,2CAAqB,CAAA;IACvB,CAAC,EANW,kBAAkB,GAAlB,uBAAkB,KAAlB,uBAAkB,QAM7B;AACH,CAAC,EAvCgB,IAAI,oBAAJ,IAAI,QAuCpB"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export declare namespace Wallet {
|
|
2
|
+
enum Type {
|
|
3
|
+
User = "user",
|
|
4
|
+
Merchant = "merchant",
|
|
5
|
+
Emission = "emission"
|
|
6
|
+
}
|
|
7
|
+
enum State {
|
|
8
|
+
Deleted = "deleted",
|
|
9
|
+
NonCompliant = "non_compliant",
|
|
10
|
+
Blocked = "blocked",
|
|
11
|
+
Active = "active",
|
|
12
|
+
Deactivated = "deactivated"
|
|
13
|
+
}
|
|
14
|
+
enum PurposeNumber {
|
|
15
|
+
GG = 0,
|
|
16
|
+
GT = 1,
|
|
17
|
+
GC = 2,
|
|
18
|
+
GR = 3,
|
|
19
|
+
GH = 4,
|
|
20
|
+
GB = 5
|
|
21
|
+
}
|
|
22
|
+
enum PurposeMethod {
|
|
23
|
+
GG = "main",
|
|
24
|
+
GT = "transit",
|
|
25
|
+
GC = "commission",
|
|
26
|
+
GR = "rolling",
|
|
27
|
+
GH = "hold",
|
|
28
|
+
GB = "bonus"
|
|
29
|
+
}
|
|
30
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Wallet = void 0;
|
|
4
|
+
var Wallet;
|
|
5
|
+
(function (Wallet) {
|
|
6
|
+
let Type;
|
|
7
|
+
(function (Type) {
|
|
8
|
+
Type["User"] = "user";
|
|
9
|
+
Type["Merchant"] = "merchant";
|
|
10
|
+
Type["Emission"] = "emission";
|
|
11
|
+
})(Type = Wallet.Type || (Wallet.Type = {}));
|
|
12
|
+
let State;
|
|
13
|
+
(function (State) {
|
|
14
|
+
State["Deleted"] = "deleted";
|
|
15
|
+
State["NonCompliant"] = "non_compliant";
|
|
16
|
+
State["Blocked"] = "blocked";
|
|
17
|
+
State["Active"] = "active";
|
|
18
|
+
State["Deactivated"] = "deactivated";
|
|
19
|
+
})(State = Wallet.State || (Wallet.State = {}));
|
|
20
|
+
let PurposeNumber;
|
|
21
|
+
(function (PurposeNumber) {
|
|
22
|
+
PurposeNumber[PurposeNumber["GG"] = 0] = "GG";
|
|
23
|
+
PurposeNumber[PurposeNumber["GT"] = 1] = "GT";
|
|
24
|
+
PurposeNumber[PurposeNumber["GC"] = 2] = "GC";
|
|
25
|
+
PurposeNumber[PurposeNumber["GR"] = 3] = "GR";
|
|
26
|
+
PurposeNumber[PurposeNumber["GH"] = 4] = "GH";
|
|
27
|
+
PurposeNumber[PurposeNumber["GB"] = 5] = "GB";
|
|
28
|
+
})(PurposeNumber = Wallet.PurposeNumber || (Wallet.PurposeNumber = {}));
|
|
29
|
+
let PurposeMethod;
|
|
30
|
+
(function (PurposeMethod) {
|
|
31
|
+
PurposeMethod["GG"] = "main";
|
|
32
|
+
PurposeMethod["GT"] = "transit";
|
|
33
|
+
PurposeMethod["GC"] = "commission";
|
|
34
|
+
PurposeMethod["GR"] = "rolling";
|
|
35
|
+
PurposeMethod["GH"] = "hold";
|
|
36
|
+
PurposeMethod["GB"] = "bonus";
|
|
37
|
+
})(PurposeMethod = Wallet.PurposeMethod || (Wallet.PurposeMethod = {}));
|
|
38
|
+
})(Wallet || (exports.Wallet = Wallet = {}));
|
|
39
|
+
//# sourceMappingURL=wallet.enums.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wallet.enums.js","sourceRoot":"","sources":["../../../../libs/gg-toolkit/enum/wallet.enums.ts"],"names":[],"mappings":";;;AAAA,IAAiB,MAAM,CAgCtB;AAhCD,WAAiB,MAAM;IACrB,IAAY,IAIX;IAJD,WAAY,IAAI;QACd,qBAAa,CAAA;QACb,6BAAqB,CAAA;QACrB,6BAAqB,CAAA;IACvB,CAAC,EAJW,IAAI,GAAJ,WAAI,KAAJ,WAAI,QAIf;IAED,IAAY,KAMX;IAND,WAAY,KAAK;QACf,4BAAmB,CAAA;QACnB,uCAA8B,CAAA;QAC9B,4BAAmB,CAAA;QACnB,0BAAiB,CAAA;QACjB,oCAA2B,CAAA;IAC7B,CAAC,EANW,KAAK,GAAL,YAAK,KAAL,YAAK,QAMhB;IAED,IAAY,aAOX;IAPD,WAAY,aAAa;QACvB,6CAAM,CAAA;QACN,6CAAM,CAAA;QACN,6CAAM,CAAA;QACN,6CAAM,CAAA;QACN,6CAAM,CAAA;QACN,6CAAM,CAAA;IACR,CAAC,EAPW,aAAa,GAAb,oBAAa,KAAb,oBAAa,QAOxB;IAED,IAAY,aAOX;IAPD,WAAY,aAAa;QACvB,4BAAW,CAAA;QACX,+BAAc,CAAA;QACd,kCAAiB,CAAA;QACjB,+BAAc,CAAA;QACd,4BAAW,CAAA;QACX,6BAAY,CAAA;IACd,CAAC,EAPW,aAAa,GAAb,oBAAa,KAAb,oBAAa,QAOxB;AACH,CAAC,EAhCgB,MAAM,sBAAN,MAAM,QAgCtB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './rmq.command';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../libs/gg-toolkit/microservices/commands/index.ts"],"names":[],"mappings":";;;AAAA,wDAA8B"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { ClassConstructor } from 'class-transformer';
|
|
2
|
+
/**
|
|
3
|
+
* Abstract class representing a command for RMQ.
|
|
4
|
+
*
|
|
5
|
+
* @template Request The type of the request data which will be queried by RMQ.
|
|
6
|
+
* @template Response The type of the response data expected from RMQ microservice.
|
|
7
|
+
*/
|
|
8
|
+
export declare abstract class RmqCommand<Request, Response = Record<string, unknown>> {
|
|
9
|
+
readonly data: Request;
|
|
10
|
+
/**
|
|
11
|
+
* Gets the pattern used to match the command.
|
|
12
|
+
* This method needs to be overridden in the derived class to return the specific pattern string.
|
|
13
|
+
*
|
|
14
|
+
* @static
|
|
15
|
+
* @abstract
|
|
16
|
+
* @returns {string} The command pattern.
|
|
17
|
+
* @throws {NotImplementedException} Thrown if the method is not overridden.
|
|
18
|
+
*/
|
|
19
|
+
static get pattern(): string;
|
|
20
|
+
/**
|
|
21
|
+
* The class constructor for mapping the response data. This should be overridden
|
|
22
|
+
* in the derived class to provide the appropriate class constructor for
|
|
23
|
+
* transforming the response data.
|
|
24
|
+
*
|
|
25
|
+
* @abstract
|
|
26
|
+
*/
|
|
27
|
+
abstract readonly mapClass: Response extends Array<any> ? ClassConstructor<Response[0]> : ClassConstructor<Response>;
|
|
28
|
+
/**
|
|
29
|
+
* Constructs an instance of RmqCommand with the provided request data.
|
|
30
|
+
*
|
|
31
|
+
* @param {Request} data The request data.
|
|
32
|
+
*/
|
|
33
|
+
constructor(data: Request);
|
|
34
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RmqCommand = void 0;
|
|
4
|
+
const common_1 = require("@nestjs/common");
|
|
5
|
+
/**
|
|
6
|
+
* Abstract class representing a command for RMQ.
|
|
7
|
+
*
|
|
8
|
+
* @template Request The type of the request data which will be queried by RMQ.
|
|
9
|
+
* @template Response The type of the response data expected from RMQ microservice.
|
|
10
|
+
*/
|
|
11
|
+
class RmqCommand {
|
|
12
|
+
/**
|
|
13
|
+
* Gets the pattern used to match the command.
|
|
14
|
+
* This method needs to be overridden in the derived class to return the specific pattern string.
|
|
15
|
+
*
|
|
16
|
+
* @static
|
|
17
|
+
* @abstract
|
|
18
|
+
* @returns {string} The command pattern.
|
|
19
|
+
* @throws {NotImplementedException} Thrown if the method is not overridden.
|
|
20
|
+
*/
|
|
21
|
+
static get pattern() {
|
|
22
|
+
throw new common_1.NotImplementedException('"pattern" should be overridden in the derived class');
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Constructs an instance of RmqCommand with the provided request data.
|
|
26
|
+
*
|
|
27
|
+
* @param {Request} data The request data.
|
|
28
|
+
*/
|
|
29
|
+
constructor(data) {
|
|
30
|
+
this.data = data;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
exports.RmqCommand = RmqCommand;
|
|
34
|
+
//# sourceMappingURL=rmq.command.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rmq.command.js","sourceRoot":"","sources":["../../../../../libs/gg-toolkit/microservices/commands/rmq.command.ts"],"names":[],"mappings":";;;AAAA,2CAAyD;AAGzD;;;;;GAKG;AACH,MAAsB,UAAU;IAC9B;;;;;;;;OAQG;IACI,MAAM,KAAK,OAAO;QACvB,MAAM,IAAI,gCAAuB,CAAC,qDAAqD,CAAC,CAAC;IAC3F,CAAC;IAaD;;;;OAIG;IACH,YAAmC,IAAa;QAAb,SAAI,GAAJ,IAAI,CAAS;IAAG,CAAC;CACrD;AA/BD,gCA+BC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './rmq.event';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../libs/gg-toolkit/microservices/events/index.ts"],"names":[],"mappings":";;;AAAA,sDAA4B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rmq.event.js","sourceRoot":"","sources":["../../../../../libs/gg-toolkit/microservices/events/rmq.event.ts"],"names":[],"mappings":";;;AAAA,MAAsB,QAAQ;IAG5B,YAAmC,IAAO;QAAP,SAAI,GAAJ,IAAI,CAAG;IAAG,CAAC;CAC/C;AAJD,4BAIC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../libs/gg-toolkit/microservices/index.ts"],"names":[],"mappings":";;;AAAA,qDAA2B;AAC3B,mDAAyB"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AbstractEntity = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const core_1 = require("@mikro-orm/core");
|
|
6
|
+
const uuid_1 = require("uuid");
|
|
7
|
+
let AbstractEntity = class AbstractEntity {
|
|
8
|
+
constructor() {
|
|
9
|
+
this.id = (0, uuid_1.v4)();
|
|
10
|
+
this.createdAt = new Date();
|
|
11
|
+
this.updatedAt = new Date();
|
|
12
|
+
}
|
|
13
|
+
};
|
|
14
|
+
exports.AbstractEntity = AbstractEntity;
|
|
15
|
+
tslib_1.__decorate([
|
|
16
|
+
(0, core_1.PrimaryKey)({ type: core_1.t.uuid }),
|
|
17
|
+
tslib_1.__metadata("design:type", String)
|
|
18
|
+
], AbstractEntity.prototype, "id", void 0);
|
|
19
|
+
tslib_1.__decorate([
|
|
20
|
+
(0, core_1.Property)({ type: 'timestamptz', name: 'created_at' }),
|
|
21
|
+
tslib_1.__metadata("design:type", Date)
|
|
22
|
+
], AbstractEntity.prototype, "createdAt", void 0);
|
|
23
|
+
tslib_1.__decorate([
|
|
24
|
+
(0, core_1.Property)({ type: 'timestamptz', name: 'updated_at', onUpdate: () => new Date() }),
|
|
25
|
+
tslib_1.__metadata("design:type", Date)
|
|
26
|
+
], AbstractEntity.prototype, "updatedAt", void 0);
|
|
27
|
+
exports.AbstractEntity = AbstractEntity = tslib_1.__decorate([
|
|
28
|
+
(0, core_1.Entity)({ abstract: true })
|
|
29
|
+
], AbstractEntity);
|
|
30
|
+
//# sourceMappingURL=abstract-entity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"abstract-entity.js","sourceRoot":"","sources":["../../../../libs/gg-toolkit/models/abstract-entity.ts"],"names":[],"mappings":";;;;AAAA,0CAAkE;AAClE,+BAA0B;AAGnB,IAAe,cAAc,GAA7B,MAAe,cAAc;IAA7B;QAEE,OAAE,GAAW,IAAA,SAAE,GAAE,CAAC;QAGlB,cAAS,GAAS,IAAI,IAAI,EAAE,CAAC;QAG7B,cAAS,GAAS,IAAI,IAAI,EAAE,CAAC;IACtC,CAAC;CAAA,CAAA;AATqB,wCAAc;AAE3B;IADN,IAAA,iBAAU,EAAC,EAAE,IAAI,EAAE,QAAC,CAAC,IAAI,EAAE,CAAC;;0CACJ;AAGlB;IADN,IAAA,eAAQ,EAAC,EAAE,IAAI,EAAE,aAAa,EAAE,IAAI,EAAE,YAAY,EAAE,CAAC;sCACpC,IAAI;iDAAc;AAG7B;IADN,IAAA,eAAQ,EAAC,EAAE,IAAI,EAAE,aAAa,EAAE,IAAI,EAAE,YAAY,EAAE,QAAQ,EAAE,GAAG,EAAE,CAAC,IAAI,IAAI,EAAE,EAAE,CAAC;sCAChE,IAAI;iDAAc;yBARhB,cAAc;IADnC,IAAA,aAAM,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;GACL,cAAc,CASnC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './abstract-entity';
|
package/models/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../libs/gg-toolkit/models/index.ts"],"names":[],"mappings":";;;AAAA,4DAAkC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { NTypeValidator } from '@horizon-republic/nominal-types';
|
|
2
|
+
import { ValidationArguments } from 'class-validator';
|
|
3
|
+
import { Currency } from './currency.ntype';
|
|
4
|
+
export interface CurrencyDecoratorValidatorOptions {
|
|
5
|
+
isOptional?: boolean;
|
|
6
|
+
isArray?: boolean;
|
|
7
|
+
notEmptyArray?: boolean;
|
|
8
|
+
}
|
|
9
|
+
export declare class CurrencyValidator extends NTypeValidator<Currency> {
|
|
10
|
+
message(validationArguments: ValidationArguments | undefined): string;
|
|
11
|
+
rule(value: Currency['value']): Promise<boolean> | boolean;
|
|
12
|
+
protected static isValidCurrencyName(value: string): boolean;
|
|
13
|
+
protected static generateInvalidCurrencyMessage(key: string): string;
|
|
14
|
+
static validateForTransformDecorator(key: string, value: any, options?: CurrencyDecoratorValidatorOptions): boolean;
|
|
15
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var CurrencyValidator_1;
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.CurrencyValidator = void 0;
|
|
5
|
+
const tslib_1 = require("tslib");
|
|
6
|
+
const nominal_types_1 = require("@horizon-republic/nominal-types");
|
|
7
|
+
const common_1 = require("@nestjs/common");
|
|
8
|
+
const class_validator_1 = require("class-validator");
|
|
9
|
+
const enum_1 = require("../../enum");
|
|
10
|
+
const currency_ntype_1 = require("./currency.ntype");
|
|
11
|
+
let CurrencyValidator = CurrencyValidator_1 = class CurrencyValidator extends nominal_types_1.NTypeValidator {
|
|
12
|
+
message(validationArguments) {
|
|
13
|
+
return CurrencyValidator_1.generateInvalidCurrencyMessage(validationArguments.property);
|
|
14
|
+
}
|
|
15
|
+
rule(value) {
|
|
16
|
+
if (value instanceof Array)
|
|
17
|
+
return value.every((item) => CurrencyValidator_1.isValidCurrencyName(item));
|
|
18
|
+
return CurrencyValidator_1.isValidCurrencyName(value);
|
|
19
|
+
}
|
|
20
|
+
static isValidCurrencyName(value) {
|
|
21
|
+
return enum_1.Currency.Name[value] !== undefined;
|
|
22
|
+
}
|
|
23
|
+
static generateInvalidCurrencyMessage(key) {
|
|
24
|
+
return `${key} must be one of [${Object.values(enum_1.Currency.Name).join(', ')}]`;
|
|
25
|
+
}
|
|
26
|
+
static validateForTransformDecorator(key, value, options) {
|
|
27
|
+
const { isOptional = false, isArray = false, notEmptyArray = false } = options !== null && options !== void 0 ? options : {};
|
|
28
|
+
if (!isArray && value instanceof currency_ntype_1.Currency)
|
|
29
|
+
return true;
|
|
30
|
+
if (isArray) {
|
|
31
|
+
if (!(value instanceof Array))
|
|
32
|
+
throw new common_1.BadRequestException(`${key} should be an array`);
|
|
33
|
+
if (notEmptyArray && value.length === 0)
|
|
34
|
+
throw new common_1.BadRequestException(`${key} should not be empty`);
|
|
35
|
+
if (value.every((item) => item instanceof currency_ntype_1.Currency))
|
|
36
|
+
return true;
|
|
37
|
+
const isValid = value.every((item) => CurrencyValidator_1.isValidCurrencyName(item));
|
|
38
|
+
if (!isValid) {
|
|
39
|
+
const currencyValidationMsg = CurrencyValidator_1.generateInvalidCurrencyMessage('Array element');
|
|
40
|
+
const msg = `${key} contains invalid currency. ${currencyValidationMsg}`;
|
|
41
|
+
throw new common_1.BadRequestException(msg);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
if (!isArray) {
|
|
45
|
+
if (value instanceof Array)
|
|
46
|
+
throw new common_1.BadRequestException(`${key} should not be an array`);
|
|
47
|
+
if (!CurrencyValidator_1.isValidCurrencyName(value)) {
|
|
48
|
+
throw new common_1.BadRequestException(CurrencyValidator_1.generateInvalidCurrencyMessage(key));
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
const isDefined = value !== null && value !== undefined;
|
|
52
|
+
if (!isDefined && !isOptional)
|
|
53
|
+
throw new common_1.BadRequestException(`${key} should not be empty`);
|
|
54
|
+
return true;
|
|
55
|
+
}
|
|
56
|
+
};
|
|
57
|
+
exports.CurrencyValidator = CurrencyValidator;
|
|
58
|
+
exports.CurrencyValidator = CurrencyValidator = CurrencyValidator_1 = tslib_1.__decorate([
|
|
59
|
+
(0, class_validator_1.ValidatorConstraint)({ name: CurrencyValidator.name, async: false })
|
|
60
|
+
], CurrencyValidator);
|
|
61
|
+
//# sourceMappingURL=currency-type.validator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"currency-type.validator.js","sourceRoot":"","sources":["../../../../../libs/gg-toolkit/nominal-type/currency/currency-type.validator.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { Logger } from '@nestjs/common';
|
|
2
|
+
import { ApiPropertyOptions } from '@nestjs/swagger';
|
|
3
|
+
import { Currency as CurrencyNS } from '../../enum';
|
|
4
|
+
export type CurrencyRequestDecoratorsOptions = {
|
|
5
|
+
apiProperty?: ApiPropertyOptions;
|
|
6
|
+
};
|
|
7
|
+
export type CurrencyResourceDecoratorsOptions = {
|
|
8
|
+
optional?: boolean;
|
|
9
|
+
apiProperty?: ApiPropertyOptions;
|
|
10
|
+
array?: boolean;
|
|
11
|
+
validation?: {
|
|
12
|
+
notEmptyArray?: boolean;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
declare const Currency_base: (abstract new (value: any) => {
|
|
16
|
+
readonly "__#2@#_nominalType": "currency";
|
|
17
|
+
readonly value: any;
|
|
18
|
+
toString(): any;
|
|
19
|
+
toJSON(): any;
|
|
20
|
+
isIdentical(value: any): boolean;
|
|
21
|
+
}) & {
|
|
22
|
+
readonly apiPropertyOptions: ApiPropertyOptions;
|
|
23
|
+
getOrmType(): import("@mikro-orm/core").Constructor<import("@mikro-orm/core").Type<any, any>>;
|
|
24
|
+
getValidator(): import("@mikro-orm/core").Constructor<import("class-validator").ValidatorConstraintInterface>;
|
|
25
|
+
getResourceDecorators(...args: any[]): <TFunction extends Function, Y>(target: object | TFunction, propertyKey?: string | symbol, descriptor?: TypedPropertyDescriptor<Y>) => void;
|
|
26
|
+
getPipe(): import("@nestjs/common").PipeTransform<any, any>;
|
|
27
|
+
createInstance<T extends {
|
|
28
|
+
readonly "__#2@#_nominalType": "currency";
|
|
29
|
+
readonly value: any;
|
|
30
|
+
toString(): any;
|
|
31
|
+
toJSON(): any;
|
|
32
|
+
isIdentical(value: any): boolean;
|
|
33
|
+
}>(this: new (...args: any[]) => T, ...args: any[]): T;
|
|
34
|
+
};
|
|
35
|
+
export declare class Currency extends Currency_base {
|
|
36
|
+
static readonly apiPropertyOptions: ApiPropertyOptions;
|
|
37
|
+
protected static logger: Logger;
|
|
38
|
+
protected readonly precision: CurrencyNS.Precision;
|
|
39
|
+
protected readonly countryCode: CurrencyNS.CountryCode;
|
|
40
|
+
protected readonly digitalCode: CurrencyNS.DigitalCode;
|
|
41
|
+
static Name: typeof CurrencyNS.Name;
|
|
42
|
+
static Precision: typeof CurrencyNS.Precision;
|
|
43
|
+
static CountryCode: typeof CurrencyNS.CountryCode;
|
|
44
|
+
static DigitalCode: typeof CurrencyNS.DigitalCode;
|
|
45
|
+
constructor(name?: CurrencyNS.Name);
|
|
46
|
+
toString(): string;
|
|
47
|
+
getName(): CurrencyNS.Name;
|
|
48
|
+
getPrecision(): number;
|
|
49
|
+
getDigitalCode(): number;
|
|
50
|
+
getCountryCode(): string;
|
|
51
|
+
isCrypto(): boolean;
|
|
52
|
+
isDefault(): boolean;
|
|
53
|
+
isEqualTo(currency: Currency): boolean;
|
|
54
|
+
isNotEqual(currency: Currency): boolean;
|
|
55
|
+
eq(currency: Currency): boolean;
|
|
56
|
+
ne(currency: Currency): boolean;
|
|
57
|
+
static getRequestDecorators(params?: CurrencyRequestDecoratorsOptions): <TFunction extends Function, Y>(target: object | TFunction, propertyKey?: string | symbol, descriptor?: TypedPropertyDescriptor<Y>) => void;
|
|
58
|
+
static getResponseDecorators(propertyName: string): <TFunction extends Function, Y>(target: object | TFunction, propertyKey?: string | symbol, descriptor?: TypedPropertyDescriptor<Y>) => void;
|
|
59
|
+
static getResourceDecorators(params?: CurrencyResourceDecoratorsOptions): <TFunction extends Function, Y>(target: object | TFunction, propertyKey?: string | symbol, descriptor?: TypedPropertyDescriptor<Y>) => void;
|
|
60
|
+
}
|
|
61
|
+
export {};
|