@heliofi/launchpad-common 1.7.12 → 1.7.14
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/src/domain/model/shared/DateRangeObject.interface.d.ts +4 -0
- package/dist/src/domain/model/shared/DateRangeObject.interface.js +3 -0
- package/dist/src/domain/model/shared/DateRangeObject.interface.js.map +1 -0
- package/dist/src/domain/model/shared/DateRangeValidator.d.ts +7 -0
- package/dist/src/domain/model/shared/DateRangeValidator.js +41 -0
- package/dist/src/domain/model/shared/DateRangeValidator.js.map +1 -0
- package/dist/src/domain/model/shared/index.d.ts +2 -0
- package/dist/src/domain/model/shared/index.js +2 -0
- package/dist/src/domain/model/shared/index.js.map +1 -1
- package/dist/src/domain/model/token-pair/entities/TokenPairWithTradingData.entity.d.ts +1 -0
- package/dist/src/domain/model/token-pair/entities/TokenPairWithTradingData.entity.js.map +1 -1
- package/dist/src/domain/model/wallet-points/dtos/RewardsDetailsExportRequest.dto.d.ts +6 -0
- package/dist/src/domain/model/wallet-points/dtos/RewardsDetailsExportRequest.dto.js +38 -0
- package/dist/src/domain/model/wallet-points/dtos/RewardsDetailsExportRequest.dto.js.map +1 -0
- package/dist/src/domain/model/wallet-points/index.d.ts +1 -0
- package/dist/src/domain/model/wallet-points/index.js +1 -0
- package/dist/src/domain/model/wallet-points/index.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -2
- package/dist/src/domain/constants/configPartner.d.ts +0 -4
- package/dist/src/domain/constants/configPartner.js +0 -9
- package/dist/src/domain/constants/configPartner.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DateRangeObject.interface.js","sourceRoot":"","sources":["../../../../../src/domain/model/shared/DateRangeObject.interface.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ValidationArguments, ValidationOptions, ValidatorConstraintInterface } from 'class-validator';
|
|
2
|
+
import { DateRangeObject } from './DateRangeObject.interface';
|
|
3
|
+
export declare class DateRangeValidator implements ValidatorConstraintInterface {
|
|
4
|
+
validate(_: DateRangeObject, args: ValidationArguments): boolean;
|
|
5
|
+
defaultMessage(args: ValidationArguments): string;
|
|
6
|
+
}
|
|
7
|
+
export declare function ValidDateRange(validationOptions?: ValidationOptions): (object: Function) => void;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.ValidDateRange = exports.DateRangeValidator = void 0;
|
|
10
|
+
const class_validator_1 = require("class-validator");
|
|
11
|
+
let DateRangeValidator = class DateRangeValidator {
|
|
12
|
+
validate(_, args) {
|
|
13
|
+
const object = args.object;
|
|
14
|
+
if (!object || !object.startDate) {
|
|
15
|
+
return false;
|
|
16
|
+
}
|
|
17
|
+
const start = new Date(object.startDate);
|
|
18
|
+
const end = object.endDate ? new Date(object.endDate) : new Date();
|
|
19
|
+
return start < end;
|
|
20
|
+
}
|
|
21
|
+
defaultMessage(args) {
|
|
22
|
+
return `Invalid date range object: ${args.object}`;
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
DateRangeValidator = __decorate([
|
|
26
|
+
(0, class_validator_1.ValidatorConstraint)({ name: 'dateRangeValidator', async: false })
|
|
27
|
+
], DateRangeValidator);
|
|
28
|
+
exports.DateRangeValidator = DateRangeValidator;
|
|
29
|
+
function ValidDateRange(validationOptions) {
|
|
30
|
+
return (object) => {
|
|
31
|
+
(0, class_validator_1.registerDecorator)({
|
|
32
|
+
target: object,
|
|
33
|
+
propertyName: 'dateRangeValidation',
|
|
34
|
+
options: validationOptions,
|
|
35
|
+
constraints: [],
|
|
36
|
+
validator: DateRangeValidator,
|
|
37
|
+
});
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
exports.ValidDateRange = ValidDateRange;
|
|
41
|
+
//# sourceMappingURL=DateRangeValidator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DateRangeValidator.js","sourceRoot":"","sources":["../../../../../src/domain/model/shared/DateRangeValidator.ts"],"names":[],"mappings":";;;;;;;;;AAAA,qDAMyB;AAKlB,IAAM,kBAAkB,GAAxB,MAAM,kBAAkB;IAC7B,QAAQ,CAAC,CAAkB,EAAE,IAAyB;QACpD,MAAM,MAAM,GAAG,IAAI,CAAC,MAAyB,CAAC;QAE9C,IAAI,CAAC,MAAM,IAAI,CAAC,MAAM,CAAC,SAAS,EAAE;YAChC,OAAO,KAAK,CAAC;SACd;QAED,MAAM,KAAK,GAAG,IAAI,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;QACzC,MAAM,GAAG,GAAG,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,IAAI,IAAI,EAAE,CAAC;QAEnE,OAAO,KAAK,GAAG,GAAG,CAAC;IACrB,CAAC;IAED,cAAc,CAAC,IAAyB;QACtC,OAAO,8BAA8B,IAAI,CAAC,MAAM,EAAE,CAAC;IACrD,CAAC;CACF,CAAA;AAjBY,kBAAkB;IAD9B,IAAA,qCAAmB,EAAC,EAAE,IAAI,EAAE,oBAAoB,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC;GACrD,kBAAkB,CAiB9B;AAjBY,gDAAkB;AAmB/B,SAAgB,cAAc,CAAC,iBAAqC;IAElE,OAAO,CAAC,MAAgB,EAAQ,EAAE;QAChC,IAAA,mCAAiB,EAAC;YAChB,MAAM,EAAE,MAAM;YACd,YAAY,EAAE,qBAAqB;YACnC,OAAO,EAAE,iBAAiB;YAC1B,WAAW,EAAE,EAAE;YACf,SAAS,EAAE,kBAAkB;SAC9B,CAAC,CAAC;IACL,CAAC,CAAC;AACJ,CAAC;AAXD,wCAWC"}
|
|
@@ -15,4 +15,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./TransformerPaginatedResponse.interface"), exports);
|
|
18
|
+
__exportStar(require("./DateRangeObject.interface"), exports);
|
|
19
|
+
__exportStar(require("./DateRangeValidator"), exports);
|
|
18
20
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/domain/model/shared/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2EAAyD"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/domain/model/shared/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2EAAyD;AACzD,8DAA4C;AAC5C,uDAAqC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TokenPairWithTradingData.entity.js","sourceRoot":"","sources":["../../../../../../src/domain/model/token-pair/entities/TokenPairWithTradingData.entity.ts"],"names":[],"mappings":";;;AAAA,+EAAqE;AAKrE,MAAa,wBAAyB,SAAQ,kDAAoB;
|
|
1
|
+
{"version":3,"file":"TokenPairWithTradingData.entity.js","sourceRoot":"","sources":["../../../../../../src/domain/model/token-pair/entities/TokenPairWithTradingData.entity.ts"],"names":[],"mappings":";;;AAAA,+EAAqE;AAKrE,MAAa,wBAAyB,SAAQ,kDAAoB;CA4BjE;AA5BD,4DA4BC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.RewardsDetailsExportRequest = void 0;
|
|
13
|
+
const class_validator_1 = require("class-validator");
|
|
14
|
+
const DateRangeValidator_1 = require("../../shared/DateRangeValidator");
|
|
15
|
+
let RewardsDetailsExportRequest = class RewardsDetailsExportRequest {
|
|
16
|
+
};
|
|
17
|
+
__decorate([
|
|
18
|
+
(0, class_validator_1.IsString)(),
|
|
19
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
20
|
+
__metadata("design:type", String)
|
|
21
|
+
], RewardsDetailsExportRequest.prototype, "walletAddress", void 0);
|
|
22
|
+
__decorate([
|
|
23
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
24
|
+
(0, class_validator_1.IsDateString)(),
|
|
25
|
+
__metadata("design:type", String)
|
|
26
|
+
], RewardsDetailsExportRequest.prototype, "startDate", void 0);
|
|
27
|
+
__decorate([
|
|
28
|
+
(0, class_validator_1.IsDateString)(),
|
|
29
|
+
(0, class_validator_1.IsOptional)(),
|
|
30
|
+
__metadata("design:type", String)
|
|
31
|
+
], RewardsDetailsExportRequest.prototype, "endDate", void 0);
|
|
32
|
+
RewardsDetailsExportRequest = __decorate([
|
|
33
|
+
(0, DateRangeValidator_1.ValidDateRange)({
|
|
34
|
+
message: 'Invalid date range: start date must precede end date',
|
|
35
|
+
})
|
|
36
|
+
], RewardsDetailsExportRequest);
|
|
37
|
+
exports.RewardsDetailsExportRequest = RewardsDetailsExportRequest;
|
|
38
|
+
//# sourceMappingURL=RewardsDetailsExportRequest.dto.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RewardsDetailsExportRequest.dto.js","sourceRoot":"","sources":["../../../../../../src/domain/model/wallet-points/dtos/RewardsDetailsExportRequest.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAKyB;AAGzB,wEAAiE;AAK1D,IAAM,2BAA2B,GAAjC,MAAM,2BAA2B;CAYvC,CAAA;AAXC;IAAC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;kEACS;AAEtB;IAAC,IAAA,4BAAU,GAAE;IACZ,IAAA,8BAAY,GAAE;;8DACG;AAElB;IAAC,IAAA,8BAAY,GAAE;IACd,IAAA,4BAAU,GAAE;;4DACG;AAXL,2BAA2B;IAHvC,IAAA,mCAAc,EAAC;QACd,OAAO,EAAE,sDAAsD;KAChE,CAAC;GACW,2BAA2B,CAYvC;AAZY,kEAA2B"}
|
|
@@ -4,5 +4,6 @@ export * from './entities/TxRewardsResponse.entity';
|
|
|
4
4
|
export * from './dtos/TxRewardsRequest.dto';
|
|
5
5
|
export * from './dtos/WalletVolumeBackOption.dto';
|
|
6
6
|
export * from './dtos/WalletVolumeSyncOption.dto';
|
|
7
|
+
export * from './dtos/RewardsDetailsExportRequest.dto';
|
|
7
8
|
export * from './entities/RewardBadge.entity';
|
|
8
9
|
export * from './constants';
|
|
@@ -20,6 +20,7 @@ __exportStar(require("./entities/TxRewardsResponse.entity"), exports);
|
|
|
20
20
|
__exportStar(require("./dtos/TxRewardsRequest.dto"), exports);
|
|
21
21
|
__exportStar(require("./dtos/WalletVolumeBackOption.dto"), exports);
|
|
22
22
|
__exportStar(require("./dtos/WalletVolumeSyncOption.dto"), exports);
|
|
23
|
+
__exportStar(require("./dtos/RewardsDetailsExportRequest.dto"), exports);
|
|
23
24
|
__exportStar(require("./entities/RewardBadge.entity"), exports);
|
|
24
25
|
__exportStar(require("./constants"), exports);
|
|
25
26
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/domain/model/wallet-points/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,kEAAgD;AAChD,+DAA6C;AAC7C,sEAAoD;AACpD,8DAA4C;AAC5C,oEAAkD;AAClD,oEAAkD;AAClD,gEAA8C;AAC9C,8CAA4B"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/domain/model/wallet-points/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,kEAAgD;AAChD,+DAA6C;AAC7C,sEAAoD;AACpD,8DAA4C;AAC5C,oEAAkD;AAClD,oEAAkD;AAClD,yEAAuD;AACvD,gEAA8C;AAC9C,8CAA4B"}
|