@heliofi/common 0.2.157 → 0.2.160-alpha.1

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.
Files changed (37) hide show
  1. package/dist/src/domain/decorators/PartialRequired.d.ts +1 -1
  2. package/dist/src/domain/decorators/PartialRequired.js +32 -7
  3. package/dist/src/domain/decorators/PartialRequired.js.map +1 -1
  4. package/dist/src/domain/model/auth/decorators/IsHelioScope.d.ts +2 -0
  5. package/dist/src/domain/model/auth/decorators/IsHelioScope.js +12 -0
  6. package/dist/src/domain/model/auth/decorators/IsHelioScope.js.map +1 -0
  7. package/dist/src/domain/model/auth/decorators/RequireSignatureOrTransaction.d.ts +2 -0
  8. package/dist/src/domain/model/auth/decorators/RequireSignatureOrTransaction.js +14 -0
  9. package/dist/src/domain/model/auth/decorators/RequireSignatureOrTransaction.js.map +1 -0
  10. package/dist/src/domain/model/auth/dtos/bitcoinSignOn.dto.js +2 -2
  11. package/dist/src/domain/model/auth/dtos/bitcoinSignOn.dto.js.map +1 -1
  12. package/dist/src/domain/model/auth/dtos/evmSignOn.dto.js +2 -2
  13. package/dist/src/domain/model/auth/dtos/evmSignOn.dto.js.map +1 -1
  14. package/dist/src/domain/model/auth/dtos/identityProviderLogin.dto.d.ts +4 -0
  15. package/dist/src/domain/model/auth/dtos/identityProviderLogin.dto.js +23 -0
  16. package/dist/src/domain/model/auth/dtos/identityProviderLogin.dto.js.map +1 -0
  17. package/dist/src/domain/model/auth/dtos/index.d.ts +1 -0
  18. package/dist/src/domain/model/auth/dtos/index.js +1 -0
  19. package/dist/src/domain/model/auth/dtos/index.js.map +1 -1
  20. package/dist/src/domain/model/auth/dtos/signOn.dto.d.ts +4 -2
  21. package/dist/src/domain/model/auth/dtos/signOn.dto.js +13 -3
  22. package/dist/src/domain/model/auth/dtos/signOn.dto.js.map +1 -1
  23. package/dist/src/domain/model/auth/dtos/signOnWeb3authSocialNetwork.dto.js +2 -2
  24. package/dist/src/domain/model/auth/dtos/signOnWeb3authSocialNetwork.dto.js.map +1 -1
  25. package/dist/src/domain/model/auth/dtos/transactionSignOn.dto.js +2 -2
  26. package/dist/src/domain/model/auth/dtos/transactionSignOn.dto.js.map +1 -1
  27. package/dist/src/domain/model/deposit/entities/DepositWalletEnrichedWithDepositCustomer.entity.d.ts +7 -0
  28. package/dist/src/domain/model/deposit/entities/DepositWalletEnrichedWithDepositCustomer.entity.js +8 -0
  29. package/dist/src/domain/model/deposit/entities/DepositWalletEnrichedWithDepositCustomer.entity.js.map +1 -0
  30. package/dist/src/domain/model/deposit/entities/index.d.ts +1 -0
  31. package/dist/src/domain/model/deposit/entities/index.js +1 -0
  32. package/dist/src/domain/model/deposit/entities/index.js.map +1 -1
  33. package/dist/src/domain/model/shared/queries/baseQuery.dto.d.ts +1 -0
  34. package/dist/src/domain/model/shared/queries/baseQuery.dto.js +5 -0
  35. package/dist/src/domain/model/shared/queries/baseQuery.dto.js.map +1 -1
  36. package/dist/tsconfig.tsbuildinfo +1 -1
  37. package/package.json +2 -2
@@ -1,2 +1,2 @@
1
1
  import { ValidationOptions } from 'class-validator';
2
- export declare function PartialRequired(property: string, validationOptions?: ValidationOptions): (object: unknown, propertyName: string) => void;
2
+ export declare function PartialRequired(properties: string | string[], validationOptions?: ValidationOptions): (object: unknown, propertyName: string) => void;
@@ -2,19 +2,44 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.PartialRequired = PartialRequired;
4
4
  const class_validator_1 = require("class-validator");
5
- function PartialRequired(property, validationOptions) {
5
+ function PartialRequired(properties, validationOptions) {
6
6
  return function decorator(object, propertyName) {
7
+ const propsArray = Array.isArray(properties) ? properties : [properties];
7
8
  (0, class_validator_1.registerDecorator)({
8
9
  name: 'partialRequired',
9
10
  target: object.constructor,
10
11
  propertyName,
11
- constraints: [property],
12
- options: validationOptions,
12
+ constraints: [propsArray],
13
+ options: {
14
+ message: propsArray.length === 1
15
+ ? `${propsArray[0]} must be provided`
16
+ : `At least one of [${propsArray.join(', ')}] must be provided`,
17
+ always: true,
18
+ ...validationOptions,
19
+ },
13
20
  validator: {
14
- validate(value, args) {
15
- const [relatedPropertyName] = args.constraints;
16
- const relatedValue = args.object?.[relatedPropertyName];
17
- return value != null || relatedValue != null;
21
+ validate(_value, args) {
22
+ const [props] = args.constraints;
23
+ const obj = args.object;
24
+ const isValuePresent = (val) => {
25
+ if (val == null)
26
+ return false;
27
+ if (typeof val === 'string') {
28
+ return val.trim() !== '';
29
+ }
30
+ if (Array.isArray(val)) {
31
+ return val.length > 0;
32
+ }
33
+ return true;
34
+ };
35
+ return props.some((prop) => isValuePresent(obj[prop]));
36
+ },
37
+ defaultMessage(args) {
38
+ const [props] = args.constraints;
39
+ if (props.length === 1) {
40
+ return `${props[0]} must be provided`;
41
+ }
42
+ return `At least one of [${props.join(', ')}] must be provided`;
18
43
  },
19
44
  },
20
45
  });
@@ -1 +1 @@
1
- {"version":3,"file":"PartialRequired.js","sourceRoot":"","sources":["../../../../src/domain/decorators/PartialRequired.ts"],"names":[],"mappings":";;AAMA,0CAqBC;AA3BD,qDAIyB;AAEzB,SAAgB,eAAe,CAC7B,QAAgB,EAChB,iBAAqC;IAErC,OAAO,SAAS,SAAS,CAAC,MAAe,EAAE,YAAoB;QAC7D,IAAA,mCAAiB,EAAC;YAChB,IAAI,EAAE,iBAAiB;YAEvB,MAAM,EAAE,MAAO,CAAC,WAAW;YAC3B,YAAY;YACZ,WAAW,EAAE,CAAC,QAAQ,CAAC;YACvB,OAAO,EAAE,iBAAiB;YAC1B,SAAS,EAAE;gBACT,QAAQ,CAAC,KAAc,EAAE,IAAyB;oBAChD,MAAM,CAAC,mBAAmB,CAAC,GAAG,IAAI,CAAC,WAAW,CAAC;oBAC/C,MAAM,YAAY,GAAI,IAAI,CAAC,MAAkB,EAAE,CAAC,mBAAmB,CAAC,CAAC;oBACrE,OAAO,KAAK,IAAI,IAAI,IAAI,YAAY,IAAI,IAAI,CAAC;gBAC/C,CAAC;aACF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EAAE,CAAC;4BACvB,OAAO,GAAG,CAAC,MAAM,GAAG,CAAC,CAAC;wBACxB,CAAC;wBACD,OAAO,IAAI,CAAC;oBACd,CAAC,CAAC;oBAEF,OAAO,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,cAAc,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;gBACzD,CAAC;gBACD,cAAc,CAAC,IAAyB;oBACtC,MAAM,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC,WAAyB,CAAC;oBAE/C,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;wBACvB,OAAO,GAAG,KAAK,CAAC,CAAC,CAAC,mBAAmB,CAAC;oBACxC,CAAC;oBAED,OAAO,oBAAoB,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,oBAAoB,CAAC;gBAClE,CAAC;aACF;SACF,CAAC,CAAC;IACL,CAAC,CAAC;AACJ,CAAC"}
@@ -0,0 +1,2 @@
1
+ import { ValidationOptions } from 'class-validator';
2
+ export declare function IsHelioScope(validationOptions?: ValidationOptions): PropertyDecorator;
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.IsHelioScope = IsHelioScope;
4
+ const class_validator_1 = require("class-validator");
5
+ const entities_1 = require("../entities");
6
+ function IsHelioScope(validationOptions) {
7
+ return (0, class_validator_1.IsIn)([entities_1.AuthScope.DASHBOARD, entities_1.AuthScope.CHECKOUT], {
8
+ each: true,
9
+ ...validationOptions,
10
+ });
11
+ }
12
+ //# sourceMappingURL=IsHelioScope.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IsHelioScope.js","sourceRoot":"","sources":["../../../../../../src/domain/model/auth/decorators/IsHelioScope.ts"],"names":[],"mappings":";;AAGA,oCAOC;AAVD,qDAA0D;AAC1D,0CAAwC;AAExC,SAAgB,YAAY,CAC1B,iBAAqC;IAErC,OAAO,IAAA,sBAAI,EAAC,CAAC,oBAAS,CAAC,SAAS,EAAE,oBAAS,CAAC,QAAQ,CAAC,EAAE;QACrD,IAAI,EAAE,IAAI;QACV,GAAG,iBAAiB;KACrB,CAAC,CAAC;AACL,CAAC"}
@@ -0,0 +1,2 @@
1
+ import { ValidationOptions } from 'class-validator';
2
+ export declare function RequireSignatureOrTransaction(validationOptions?: ValidationOptions): (object: unknown, propertyName: string) => void;
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.RequireSignatureOrTransaction = RequireSignatureOrTransaction;
4
+ const PartialRequired_1 = require("../../../decorators/PartialRequired");
5
+ function RequireSignatureOrTransaction(validationOptions) {
6
+ return function decorator(object, propertyName) {
7
+ const partialRequiredDecorator = (0, PartialRequired_1.PartialRequired)(['signature', 'transaction'], {
8
+ message: 'Either signature or transaction must be provided',
9
+ ...validationOptions,
10
+ });
11
+ partialRequiredDecorator(object, propertyName);
12
+ };
13
+ }
14
+ //# sourceMappingURL=RequireSignatureOrTransaction.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RequireSignatureOrTransaction.js","sourceRoot":"","sources":["../../../../../../src/domain/model/auth/decorators/RequireSignatureOrTransaction.ts"],"names":[],"mappings":";;AAyBA,sEAcC;AAtCD,yEAAsE;AAwBtE,SAAgB,6BAA6B,CAC3C,iBAAqC;IAErC,OAAO,SAAS,SAAS,CAAC,MAAe,EAAE,YAAoB;QAC7D,MAAM,wBAAwB,GAAG,IAAA,iCAAe,EAC9C,CAAC,WAAW,EAAE,aAAa,CAAC,EAC5B;YACE,OAAO,EAAE,kDAAkD;YAC3D,GAAG,iBAAiB;SACrB,CACF,CAAC;QAEF,wBAAwB,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC;IACjD,CAAC,CAAC;AACJ,CAAC"}
@@ -15,7 +15,7 @@ const class_transformer_1 = require("class-transformer");
15
15
  const constants_1 = require("../../../constants");
16
16
  const wallet_1 = require("../../wallet");
17
17
  const btcProperties_dto_1 = require("./btcProperties.dto");
18
- const entities_1 = require("../entities");
18
+ const IsHelioScope_1 = require("../decorators/IsHelioScope");
19
19
  class BitcoinSignOnDto {
20
20
  }
21
21
  exports.BitcoinSignOnDto = BitcoinSignOnDto;
@@ -61,7 +61,7 @@ __decorate([
61
61
  __decorate([
62
62
  (0, class_validator_1.IsOptional)(),
63
63
  (0, class_validator_1.IsArray)(),
64
- (0, class_validator_1.IsEnum)(entities_1.AuthScope, { each: true }),
64
+ (0, IsHelioScope_1.IsHelioScope)(),
65
65
  __metadata("design:type", Array)
66
66
  ], BitcoinSignOnDto.prototype, "scopes", void 0);
67
67
  //# sourceMappingURL=bitcoinSignOn.dto.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"bitcoinSignOn.dto.js","sourceRoot":"","sources":["../../../../../../src/domain/model/auth/dtos/bitcoinSignOn.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAOyB;AACzB,yDAAyC;AACzC,kDAA8C;AAC9C,yCAA4C;AAC5C,2DAAuD;AACvD,0CAAwC;AAExC,MAAa,gBAAgB;CAqC5B;AArCD,4CAqCC;AAlCC;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;mDACK;AAIlB;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,wBAAM,EAAC,oBAAQ,CAAC;;kDACG;AAKpB;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,wBAAM,EAAC,qBAAY,CAAC;;gDACA;AAIrB;IAFC,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,oCAAgB,CAAC;IAC5B,IAAA,gCAAc,GAAE;8BACF,oCAAgB;uDAAC;AAGhC;IADC,IAAA,4BAAU,GAAE;;iDACI;AAIjB;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;+CACC;AAId;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;mDACK;AAIlB;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;qDACO;AAKpB;IAHC,IAAA,4BAAU,GAAE;IACZ,IAAA,yBAAO,GAAE;IACT,IAAA,wBAAM,EAAC,oBAAS,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;;gDACb"}
1
+ {"version":3,"file":"bitcoinSignOn.dto.js","sourceRoot":"","sources":["../../../../../../src/domain/model/auth/dtos/bitcoinSignOn.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAOyB;AACzB,yDAAyC;AACzC,kDAA8C;AAC9C,yCAA4C;AAC5C,2DAAuD;AAEvD,6DAA0D;AAE1D,MAAa,gBAAgB;CAqC5B;AArCD,4CAqCC;AAlCC;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;mDACK;AAIlB;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,wBAAM,EAAC,oBAAQ,CAAC;;kDACG;AAKpB;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,wBAAM,EAAC,qBAAY,CAAC;;gDACA;AAIrB;IAFC,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,oCAAgB,CAAC;IAC5B,IAAA,gCAAc,GAAE;8BACF,oCAAgB;uDAAC;AAGhC;IADC,IAAA,4BAAU,GAAE;;iDACI;AAIjB;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;+CACC;AAId;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;mDACK;AAIlB;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;qDACO;AAKpB;IAHC,IAAA,4BAAU,GAAE;IACZ,IAAA,yBAAO,GAAE;IACT,IAAA,2BAAY,GAAE;;gDACM"}
@@ -14,7 +14,7 @@ const class_validator_1 = require("class-validator");
14
14
  const class_transformer_1 = require("class-transformer");
15
15
  const evmMessage_dto_1 = require("./evmMessage.dto");
16
16
  const constants_1 = require("../../../constants");
17
- const entities_1 = require("../entities");
17
+ const IsHelioScope_1 = require("../decorators/IsHelioScope");
18
18
  class EVMSignOnDto {
19
19
  }
20
20
  exports.EVMSignOnDto = EVMSignOnDto;
@@ -56,7 +56,7 @@ __decorate([
56
56
  __decorate([
57
57
  (0, class_validator_1.IsOptional)(),
58
58
  (0, class_validator_1.IsArray)(),
59
- (0, class_validator_1.IsEnum)(entities_1.AuthScope, { each: true }),
59
+ (0, IsHelioScope_1.IsHelioScope)(),
60
60
  __metadata("design:type", Array)
61
61
  ], EVMSignOnDto.prototype, "scopes", void 0);
62
62
  //# sourceMappingURL=evmSignOn.dto.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"evmSignOn.dto.js","sourceRoot":"","sources":["../../../../../../src/domain/model/auth/dtos/evmSignOn.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAOyB;AACzB,yDAAyC;AACzC,qDAAiD;AACjD,kDAA8C;AAC9C,0CAAwC;AAExC,MAAa,YAAY;CAiCxB;AAjCD,oCAiCC;AA7BC;IAHC,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,8BAAa,CAAC;IACzB,IAAA,4BAAU,GAAE;IACZ,IAAA,gCAAc,GAAE;8BACR,8BAAa;6CAAC;AAIvB;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;+CACK;AAIlB;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,wBAAM,EAAC,oBAAQ,CAAC;;8CACG;AAIpB;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;2CACC;AAId;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;+CACK;AAIlB;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;iDACO;AAGpB;IADC,IAAA,4BAAU,GAAE;;6CACI;AAKjB;IAHC,IAAA,4BAAU,GAAE;IACZ,IAAA,yBAAO,GAAE;IACT,IAAA,wBAAM,EAAC,oBAAS,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;;4CACb"}
1
+ {"version":3,"file":"evmSignOn.dto.js","sourceRoot":"","sources":["../../../../../../src/domain/model/auth/dtos/evmSignOn.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAOyB;AACzB,yDAAyC;AACzC,qDAAiD;AACjD,kDAA8C;AAE9C,6DAA0D;AAE1D,MAAa,YAAY;CAiCxB;AAjCD,oCAiCC;AA7BC;IAHC,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,8BAAa,CAAC;IACzB,IAAA,4BAAU,GAAE;IACZ,IAAA,gCAAc,GAAE;8BACR,8BAAa;6CAAC;AAIvB;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;+CACK;AAIlB;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,wBAAM,EAAC,oBAAQ,CAAC;;8CACG;AAIpB;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;2CACC;AAId;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;+CACK;AAIlB;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;iDACO;AAGpB;IADC,IAAA,4BAAU,GAAE;;6CACI;AAKjB;IAHC,IAAA,4BAAU,GAAE;IACZ,IAAA,yBAAO,GAAE;IACT,IAAA,2BAAY,GAAE;;4CACM"}
@@ -0,0 +1,4 @@
1
+ import { Platform } from '../../../constants';
2
+ export declare class IdentityProviderLoginDto {
3
+ platform?: Platform;
4
+ }
@@ -0,0 +1,23 @@
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.IdentityProviderLoginDto = void 0;
13
+ const class_validator_1 = require("class-validator");
14
+ const constants_1 = require("../../../constants");
15
+ class IdentityProviderLoginDto {
16
+ }
17
+ exports.IdentityProviderLoginDto = IdentityProviderLoginDto;
18
+ __decorate([
19
+ (0, class_validator_1.IsOptional)(),
20
+ (0, class_validator_1.IsEnum)(constants_1.Platform),
21
+ __metadata("design:type", String)
22
+ ], IdentityProviderLoginDto.prototype, "platform", void 0);
23
+ //# sourceMappingURL=identityProviderLogin.dto.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"identityProviderLogin.dto.js","sourceRoot":"","sources":["../../../../../../src/domain/model/auth/dtos/identityProviderLogin.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAqD;AACrD,kDAA8C;AAE9C,MAAa,wBAAwB;CAIpC;AAJD,4DAIC;AADC;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,wBAAM,EAAC,oBAAQ,CAAC;;0DACG"}
@@ -7,6 +7,7 @@ export * from './storeTwitterToken.dto';
7
7
  export * from './evmMessage.dto';
8
8
  export * from './signOnWeb3authSocialNetwork.dto';
9
9
  export * from './bitcoinSignOn.dto';
10
+ export * from './identityProviderLogin.dto';
10
11
  export * from './btcProperties.dto';
11
12
  export * from './external/externalAuthSignIn.dto';
12
13
  export * from './external/externalAuthSignUp.dto';
@@ -23,6 +23,7 @@ __exportStar(require("./storeTwitterToken.dto"), exports);
23
23
  __exportStar(require("./evmMessage.dto"), exports);
24
24
  __exportStar(require("./signOnWeb3authSocialNetwork.dto"), exports);
25
25
  __exportStar(require("./bitcoinSignOn.dto"), exports);
26
+ __exportStar(require("./identityProviderLogin.dto"), exports);
26
27
  __exportStar(require("./btcProperties.dto"), exports);
27
28
  __exportStar(require("./external/externalAuthSignIn.dto"), exports);
28
29
  __exportStar(require("./external/externalAuthSignUp.dto"), exports);
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/domain/model/auth/dtos/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,kDAAgC;AAChC,+CAA6B;AAC7B,0DAAwC;AACxC,oDAAkC;AAClC,uDAAqC;AACrC,0DAAwC;AACxC,mDAAiC;AACjC,oEAAkD;AAClD,sDAAoC;AACpC,sDAAoC;AACpC,oEAAkD;AAClD,oEAAkD;AAClD,wEAAsD;AACtD,6DAA2C;AAC3C,2DAAyC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/domain/model/auth/dtos/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,kDAAgC;AAChC,+CAA6B;AAC7B,0DAAwC;AACxC,oDAAkC;AAClC,uDAAqC;AACrC,0DAAwC;AACxC,mDAAiC;AACjC,oEAAkD;AAClD,sDAAoC;AACpC,8DAA4C;AAC5C,sDAAoC;AACpC,oEAAkD;AAClD,oEAAkD;AAClD,wEAAsD;AACtD,6DAA2C;AAC3C,2DAAyC"}
@@ -3,11 +3,13 @@ import { WalletOrigin } from '../../wallet';
3
3
  import { AuthScope } from '../entities';
4
4
  export declare class SignOnDto {
5
5
  publicKey: string;
6
- signature: string;
6
+ signature?: string;
7
+ transaction?: string;
7
8
  authMessage: string;
8
9
  nonce: string;
9
10
  platform?: Platform;
10
11
  origin?: WalletOrigin;
11
- nonceV2: boolean;
12
+ nonceV2?: boolean;
12
13
  scopes?: AuthScope[];
14
+ private _sigOrTx?;
13
15
  }
@@ -13,7 +13,8 @@ exports.SignOnDto = void 0;
13
13
  const class_validator_1 = require("class-validator");
14
14
  const constants_1 = require("../../../constants");
15
15
  const wallet_1 = require("../../wallet");
16
- const entities_1 = require("../entities");
16
+ const IsHelioScope_1 = require("../decorators/IsHelioScope");
17
+ const RequireSignatureOrTransaction_1 = require("../decorators/RequireSignatureOrTransaction");
17
18
  class SignOnDto {
18
19
  }
19
20
  exports.SignOnDto = SignOnDto;
@@ -23,10 +24,15 @@ __decorate([
23
24
  __metadata("design:type", String)
24
25
  ], SignOnDto.prototype, "publicKey", void 0);
25
26
  __decorate([
27
+ (0, class_validator_1.IsOptional)(),
26
28
  (0, class_validator_1.IsString)(),
27
- (0, class_validator_1.IsNotEmpty)(),
28
29
  __metadata("design:type", String)
29
30
  ], SignOnDto.prototype, "signature", void 0);
31
+ __decorate([
32
+ (0, class_validator_1.IsOptional)(),
33
+ (0, class_validator_1.IsString)(),
34
+ __metadata("design:type", String)
35
+ ], SignOnDto.prototype, "transaction", void 0);
30
36
  __decorate([
31
37
  (0, class_validator_1.IsString)(),
32
38
  (0, class_validator_1.IsNotEmpty)(),
@@ -54,7 +60,11 @@ __decorate([
54
60
  __decorate([
55
61
  (0, class_validator_1.IsOptional)(),
56
62
  (0, class_validator_1.IsArray)(),
57
- (0, class_validator_1.IsEnum)(entities_1.AuthScope, { each: true }),
63
+ (0, IsHelioScope_1.IsHelioScope)(),
58
64
  __metadata("design:type", Array)
59
65
  ], SignOnDto.prototype, "scopes", void 0);
66
+ __decorate([
67
+ (0, RequireSignatureOrTransaction_1.RequireSignatureOrTransaction)(),
68
+ __metadata("design:type", Boolean)
69
+ ], SignOnDto.prototype, "_sigOrTx", void 0);
60
70
  //# sourceMappingURL=signOn.dto.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"signOn.dto.js","sourceRoot":"","sources":["../../../../../../src/domain/model/auth/dtos/signOn.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAMyB;AACzB,kDAA8C;AAC9C,yCAA4C;AAC5C,0CAAwC;AAExC,MAAa,SAAS;CAiCrB;AAjCD,8BAiCC;AA9BC;IAFC,IAAA,0BAAQ,GAAE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IAAA,wBAAM,EAAC,qBAAY,CAAC;;yCACC;AAGtB;IADC,IAAA,4BAAU,GAAE;;0CACK;AAKlB;IAHC,IAAA,4BAAU,GAAE;IACZ,IAAA,yBAAO,GAAE;IACT,IAAA,2BAAY,GAAE;;yCACM;AAGb;IADP,IAAA,6DAA6B,GAAE;;2CACL"}
@@ -12,7 +12,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.SignOnWeb3authSocialNetworkDto = void 0;
13
13
  const class_validator_1 = require("class-validator");
14
14
  const constants_1 = require("../../../constants");
15
- const entities_1 = require("../entities");
15
+ const IsHelioScope_1 = require("../decorators/IsHelioScope");
16
16
  class SignOnWeb3authSocialNetworkDto {
17
17
  }
18
18
  exports.SignOnWeb3authSocialNetworkDto = SignOnWeb3authSocialNetworkDto;
@@ -29,7 +29,7 @@ __decorate([
29
29
  __decorate([
30
30
  (0, class_validator_1.IsOptional)(),
31
31
  (0, class_validator_1.IsArray)(),
32
- (0, class_validator_1.IsEnum)(entities_1.AuthScope, { each: true }),
32
+ (0, IsHelioScope_1.IsHelioScope)(),
33
33
  __metadata("design:type", Array)
34
34
  ], SignOnWeb3authSocialNetworkDto.prototype, "scopes", void 0);
35
35
  //# sourceMappingURL=signOnWeb3authSocialNetwork.dto.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"signOnWeb3authSocialNetwork.dto.js","sourceRoot":"","sources":["../../../../../../src/domain/model/auth/dtos/signOnWeb3authSocialNetwork.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAMyB;AACzB,kDAA8C;AAC9C,0CAAwC;AAExC,MAAa,8BAA8B;CAa1C;AAbD,wEAaC;AAVC;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;oEACQ;AAIrB;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,wBAAM,EAAC,oBAAQ,CAAC;;gEACG;AAKpB;IAHC,IAAA,4BAAU,GAAE;IACZ,IAAA,yBAAO,GAAE;IACT,IAAA,wBAAM,EAAC,oBAAS,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;;8DACb"}
1
+ {"version":3,"file":"signOnWeb3authSocialNetwork.dto.js","sourceRoot":"","sources":["../../../../../../src/domain/model/auth/dtos/signOnWeb3authSocialNetwork.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAMyB;AACzB,kDAA8C;AAE9C,6DAA0D;AAE1D,MAAa,8BAA8B;CAa1C;AAbD,wEAaC;AAVC;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;oEACQ;AAIrB;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,wBAAM,EAAC,oBAAQ,CAAC;;gEACG;AAKpB;IAHC,IAAA,4BAAU,GAAE;IACZ,IAAA,yBAAO,GAAE;IACT,IAAA,2BAAY,GAAE;;8DACM"}
@@ -12,7 +12,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.TransactionSignOnDto = void 0;
13
13
  const class_validator_1 = require("class-validator");
14
14
  const constants_1 = require("../../../constants");
15
- const entities_1 = require("../entities");
15
+ const IsHelioScope_1 = require("../decorators/IsHelioScope");
16
16
  class TransactionSignOnDto {
17
17
  }
18
18
  exports.TransactionSignOnDto = TransactionSignOnDto;
@@ -48,7 +48,7 @@ __decorate([
48
48
  __decorate([
49
49
  (0, class_validator_1.IsOptional)(),
50
50
  (0, class_validator_1.IsArray)(),
51
- (0, class_validator_1.IsEnum)(entities_1.AuthScope, { each: true }),
51
+ (0, IsHelioScope_1.IsHelioScope)(),
52
52
  __metadata("design:type", Array)
53
53
  ], TransactionSignOnDto.prototype, "scopes", void 0);
54
54
  //# sourceMappingURL=transactionSignOn.dto.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"transactionSignOn.dto.js","sourceRoot":"","sources":["../../../../../../src/domain/model/auth/dtos/transactionSignOn.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAMyB;AACzB,kDAA8C;AAC9C,0CAAwC;AAExC,MAAa,oBAAoB;CA4BhC;AA5BD,oDA4BC;AAzBC;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;yDACO;AAIpB;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;uDACK;AAIlB;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;yDACO;AAIpB;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;mDACC;AAGd;IADC,IAAA,4BAAU,GAAE;;qDACK;AAIlB;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,wBAAM,EAAC,oBAAQ,CAAC;;sDACG;AAKpB;IAHC,IAAA,4BAAU,GAAE;IACZ,IAAA,yBAAO,GAAE;IACT,IAAA,wBAAM,EAAC,oBAAS,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;;oDACb"}
1
+ {"version":3,"file":"transactionSignOn.dto.js","sourceRoot":"","sources":["../../../../../../src/domain/model/auth/dtos/transactionSignOn.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAMyB;AACzB,kDAA8C;AAE9C,6DAA0D;AAM1D,MAAa,oBAAoB;CA4BhC;AA5BD,oDA4BC;AAzBC;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;yDACO;AAIpB;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;uDACK;AAIlB;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;yDACO;AAIpB;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;mDACC;AAGd;IADC,IAAA,4BAAU,GAAE;;qDACK;AAIlB;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,wBAAM,EAAC,oBAAQ,CAAC;;sDACG;AAKpB;IAHC,IAAA,4BAAU,GAAE;IACZ,IAAA,yBAAO,GAAE;IACT,IAAA,2BAAY,GAAE;;oDACM"}
@@ -0,0 +1,7 @@
1
+ import { DepositWalletEnrichedEntity } from './DepositWalletEnriched.entity';
2
+ import { DepositCustomerEnrichedEntity } from './DepositCustomerEnriched.entity';
3
+ import { DepositEnrichedEntity } from './DepositEnriched.entity';
4
+ export declare class DepositWalletEnrichedWithDepositCustomerEntity extends DepositWalletEnrichedEntity {
5
+ depositCustomer: DepositCustomerEnrichedEntity;
6
+ deposit: DepositEnrichedEntity;
7
+ }
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DepositWalletEnrichedWithDepositCustomerEntity = void 0;
4
+ const DepositWalletEnriched_entity_1 = require("./DepositWalletEnriched.entity");
5
+ class DepositWalletEnrichedWithDepositCustomerEntity extends DepositWalletEnriched_entity_1.DepositWalletEnrichedEntity {
6
+ }
7
+ exports.DepositWalletEnrichedWithDepositCustomerEntity = DepositWalletEnrichedWithDepositCustomerEntity;
8
+ //# sourceMappingURL=DepositWalletEnrichedWithDepositCustomer.entity.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DepositWalletEnrichedWithDepositCustomer.entity.js","sourceRoot":"","sources":["../../../../../../src/domain/model/deposit/entities/DepositWalletEnrichedWithDepositCustomer.entity.ts"],"names":[],"mappings":";;;AAAA,iFAA6E;AAI7E,MAAa,8CAA+C,SAAQ,0DAA2B;CAG9F;AAHD,wGAGC"}
@@ -9,3 +9,4 @@ export * from './DepositWithStats.entity';
9
9
  export * from './PlainDeposit';
10
10
  export * from './DepositSearchResult.entity';
11
11
  export * from './DepositCurrenciesExchangeRate.entity';
12
+ export * from './DepositWalletEnrichedWithDepositCustomer.entity';
@@ -25,4 +25,5 @@ __exportStar(require("./DepositWithStats.entity"), exports);
25
25
  __exportStar(require("./PlainDeposit"), exports);
26
26
  __exportStar(require("./DepositSearchResult.entity"), exports);
27
27
  __exportStar(require("./DepositCurrenciesExchangeRate.entity"), exports);
28
+ __exportStar(require("./DepositWalletEnrichedWithDepositCustomer.entity"), exports);
28
29
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/domain/model/deposit/entities/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,sEAAoD;AACpD,iEAA+C;AAC/C,2DAAyC;AACzC,mDAAiC;AACjC,2DAAyC;AACzC,mEAAiD;AACjD,yDAAuC;AACvC,4DAA0C;AAC1C,iDAA+B;AAC/B,+DAA6C;AAC7C,yEAAuD"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/domain/model/deposit/entities/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,sEAAoD;AACpD,iEAA+C;AAC/C,2DAAyC;AACzC,mDAAiC;AACjC,2DAAyC;AACzC,mEAAiD;AACjD,yDAAuC;AACvC,4DAA0C;AAC1C,iDAA+B;AAC/B,+DAA6C;AAC7C,yEAAuD;AACvD,oFAAkE"}
@@ -6,4 +6,5 @@ export declare class BaseQueryDto {
6
6
  sort?: string;
7
7
  order?: string;
8
8
  startDate?: string;
9
+ endDate?: string;
9
10
  }
@@ -52,4 +52,9 @@ __decorate([
52
52
  (0, class_validator_1.IsOptional)(),
53
53
  __metadata("design:type", String)
54
54
  ], BaseQueryDto.prototype, "startDate", void 0);
55
+ __decorate([
56
+ (0, class_validator_1.IsString)(),
57
+ (0, class_validator_1.IsOptional)(),
58
+ __metadata("design:type", String)
59
+ ], BaseQueryDto.prototype, "endDate", void 0);
55
60
  //# sourceMappingURL=baseQuery.dto.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"baseQuery.dto.js","sourceRoot":"","sources":["../../../../../../src/domain/model/shared/queries/baseQuery.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAiE;AACjE,oDAAqD;AAErD,MAAa,YAAY;CA8BxB;AA9BD,oCA8BC;AA1BC;IAHC,IAAA,2BAAc,GAAE;IAChB,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;0CACC;AAKd;IAHC,IAAA,2BAAc,GAAE;IAChB,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;2CACE;AAIf;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;gDACO;AAIpB;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;4CACG;AAIhB;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;0CACC;AAId;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;2CACE;AAIf;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;+CACM"}
1
+ {"version":3,"file":"baseQuery.dto.js","sourceRoot":"","sources":["../../../../../../src/domain/model/shared/queries/baseQuery.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAiE;AACjE,oDAAqD;AAErD,MAAa,YAAY;CAkCxB;AAlCD,oCAkCC;AA9BC;IAHC,IAAA,2BAAc,GAAE;IAChB,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;0CACC;AAKd;IAHC,IAAA,2BAAc,GAAE;IAChB,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;2CACE;AAIf;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;gDACO;AAIpB;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;4CACG;AAIhB;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;0CACC;AAId;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;2CACE;AAIf;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;+CACM;AAInB;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;6CACI"}