@heliofi/common 0.2.315 → 0.2.316

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 (29) hide show
  1. package/dist/src/domain/model/auth/dtos/accountLookupEmail.dto.d.ts +3 -0
  2. package/dist/src/domain/model/auth/dtos/accountLookupEmail.dto.js +26 -0
  3. package/dist/src/domain/model/auth/dtos/accountLookupEmail.dto.js.map +1 -0
  4. package/dist/src/domain/model/auth/dtos/accountLookupEmail.spec.d.ts +1 -0
  5. package/dist/src/domain/model/auth/dtos/accountLookupEmail.spec.js +22 -0
  6. package/dist/src/domain/model/auth/dtos/accountLookupEmail.spec.js.map +1 -0
  7. package/dist/src/domain/model/auth/dtos/accountLookupWallet.dto.d.ts +3 -0
  8. package/dist/src/domain/model/auth/dtos/accountLookupWallet.dto.js +23 -0
  9. package/dist/src/domain/model/auth/dtos/accountLookupWallet.dto.js.map +1 -0
  10. package/dist/src/domain/model/auth/dtos/index.d.ts +2 -0
  11. package/dist/src/domain/model/auth/dtos/index.js +2 -0
  12. package/dist/src/domain/model/auth/dtos/index.js.map +1 -1
  13. package/dist/src/domain/model/auth/entities/AccountLookup.d.ts +7 -0
  14. package/dist/src/domain/model/auth/entities/AccountLookup.js +11 -0
  15. package/dist/src/domain/model/auth/entities/AccountLookup.js.map +1 -0
  16. package/dist/src/domain/model/auth/entities/EmailAccountLookupResult.d.ts +4 -0
  17. package/dist/src/domain/model/auth/entities/EmailAccountLookupResult.js +7 -0
  18. package/dist/src/domain/model/auth/entities/EmailAccountLookupResult.js.map +1 -0
  19. package/dist/src/domain/model/auth/entities/WalletAccountLookupResult.d.ts +4 -0
  20. package/dist/src/domain/model/auth/entities/WalletAccountLookupResult.js +7 -0
  21. package/dist/src/domain/model/auth/entities/WalletAccountLookupResult.js.map +1 -0
  22. package/dist/src/domain/model/auth/entities/index.d.ts +3 -0
  23. package/dist/src/domain/model/auth/entities/index.js +3 -0
  24. package/dist/src/domain/model/auth/entities/index.js.map +1 -1
  25. package/dist/src/domain/model/feature-flags/entities/BetaFeature.entity.d.ts +1 -1
  26. package/dist/src/domain/model/feature-flags/entities/BetaFeature.entity.js +1 -1
  27. package/dist/src/domain/model/feature-flags/entities/BetaFeature.entity.js.map +1 -1
  28. package/dist/tsconfig.tsbuildinfo +1 -1
  29. package/package.json +2 -2
@@ -0,0 +1,3 @@
1
+ export declare class AccountLookupEmailDto {
2
+ email: string;
3
+ }
@@ -0,0 +1,26 @@
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.AccountLookupEmailDto = void 0;
13
+ const class_transformer_1 = require("class-transformer");
14
+ const class_validator_1 = require("class-validator");
15
+ class AccountLookupEmailDto {
16
+ }
17
+ exports.AccountLookupEmailDto = AccountLookupEmailDto;
18
+ __decorate([
19
+ (0, class_transformer_1.Transform)(({ value }) => (typeof value === 'string' ? value.trim() : value)),
20
+ (0, class_validator_1.IsString)(),
21
+ (0, class_validator_1.IsNotEmpty)(),
22
+ (0, class_validator_1.IsEmail)(),
23
+ (0, class_validator_1.MaxLength)(320),
24
+ __metadata("design:type", String)
25
+ ], AccountLookupEmailDto.prototype, "email", void 0);
26
+ //# sourceMappingURL=accountLookupEmail.dto.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"accountLookupEmail.dto.js","sourceRoot":"","sources":["../../../../../../src/domain/model/auth/dtos/accountLookupEmail.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,yDAA8C;AAC9C,qDAA2E;AAE3E,MAAa,qBAAqB;CAQjC;AARD,sDAQC;AADC;IALC,IAAA,6BAAS,EAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,CAAC,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;IAC5E,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;IACZ,IAAA,yBAAO,GAAE;IACT,IAAA,2BAAS,EAAC,GAAG,CAAC;;oDACD"}
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const class_transformer_1 = require("class-transformer");
4
+ const class_validator_1 = require("class-validator");
5
+ const accountLookupEmail_dto_1 = require("./accountLookupEmail.dto");
6
+ const build = (email) => (0, class_transformer_1.plainToInstance)(accountLookupEmail_dto_1.AccountLookupEmailDto, { email });
7
+ describe('AccountLookupEmailDto', () => {
8
+ it('trims before validating, so padding is not rejected', async () => {
9
+ const dto = build(' merchant@example.com ');
10
+ expect(await (0, class_validator_1.validate)(dto)).toHaveLength(0);
11
+ expect(dto.email).toBe('merchant@example.com');
12
+ });
13
+ it('preserves casing', async () => {
14
+ const dto = build('Merchant@Example.COM');
15
+ expect(await (0, class_validator_1.validate)(dto)).toHaveLength(0);
16
+ expect(dto.email).toBe('Merchant@Example.COM');
17
+ });
18
+ it.each(['', ' ', 'not-an-email'])('rejects %j', async (email) => {
19
+ expect(await (0, class_validator_1.validate)(build(email))).not.toHaveLength(0);
20
+ });
21
+ });
22
+ //# sourceMappingURL=accountLookupEmail.spec.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"accountLookupEmail.spec.js","sourceRoot":"","sources":["../../../../../../src/domain/model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
+ publicKey: string;
3
+ }
@@ -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.AccountLookupWalletDto = void 0;
13
+ const class_validator_1 = require("class-validator");
14
+ class AccountLookupWalletDto {
15
+ }
16
+ exports.AccountLookupWalletDto = AccountLookupWalletDto;
17
+ __decorate([
18
+ (0, class_validator_1.IsString)(),
19
+ (0, class_validator_1.IsNotEmpty)(),
20
+ (0, class_validator_1.MaxLength)(128),
21
+ __metadata("design:type", String)
22
+ ], AccountLookupWalletDto.prototype, "publicKey", void 0);
23
+ //# sourceMappingURL=accountLookupWallet.dto.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"accountLookupWallet.dto.js","sourceRoot":"","sources":["../../../../../../src/domain/model/auth/dtos/accountLookupWallet.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAkE;AAElE,MAAa,sBAAsB;CAKlC;AALD,wDAKC;AADC;IAHC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;IACZ,IAAA,2BAAS,EAAC,GAAG,CAAC;;yDACG"}
@@ -14,4 +14,6 @@ export * from './external/externalAuthSignUp.dto';
14
14
  export * from './external/externalUpdateKybStatus.dto';
15
15
  export * from './external/externalAuthErrorType.enum';
16
16
  export * from './authTokenSwapPayload.dto';
17
+ export * from './accountLookupEmail.dto';
18
+ export * from './accountLookupWallet.dto';
17
19
  export * from './TwitterRedirectUrl.dto';
@@ -30,5 +30,7 @@ __exportStar(require("./external/externalAuthSignUp.dto"), exports);
30
30
  __exportStar(require("./external/externalUpdateKybStatus.dto"), exports);
31
31
  __exportStar(require("./external/externalAuthErrorType.enum"), exports);
32
32
  __exportStar(require("./authTokenSwapPayload.dto"), exports);
33
+ __exportStar(require("./accountLookupEmail.dto"), exports);
34
+ __exportStar(require("./accountLookupWallet.dto"), exports);
33
35
  __exportStar(require("./TwitterRedirectUrl.dto"), exports);
34
36
  //# sourceMappingURL=index.js.map
@@ -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,8DAA4C;AAC5C,sDAAoC;AACpC,oEAAkD;AAClD,oEAAkD;AAClD,yEAAuD;AACvD,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,yEAAuD;AACvD,wEAAsD;AACtD,6DAA2C;AAC3C,2DAAyC;AACzC,4DAA0C;AAC1C,2DAAyC"}
@@ -0,0 +1,7 @@
1
+ export declare enum AccountLookupState {
2
+ COMMERCE_ACCOUNT = "COMMERCE_ACCOUNT",
3
+ PLATFORM_ONLY = "PLATFORM_ONLY",
4
+ PAYOUT_WALLET_CONFLICT = "PAYOUT_WALLET_CONFLICT",
5
+ NONE = "NONE"
6
+ }
7
+ export type EmailAccountLookupState = AccountLookupState.COMMERCE_ACCOUNT | AccountLookupState.PLATFORM_ONLY | AccountLookupState.NONE;
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AccountLookupState = void 0;
4
+ var AccountLookupState;
5
+ (function (AccountLookupState) {
6
+ AccountLookupState["COMMERCE_ACCOUNT"] = "COMMERCE_ACCOUNT";
7
+ AccountLookupState["PLATFORM_ONLY"] = "PLATFORM_ONLY";
8
+ AccountLookupState["PAYOUT_WALLET_CONFLICT"] = "PAYOUT_WALLET_CONFLICT";
9
+ AccountLookupState["NONE"] = "NONE";
10
+ })(AccountLookupState || (exports.AccountLookupState = AccountLookupState = {}));
11
+ //# sourceMappingURL=AccountLookup.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AccountLookup.js","sourceRoot":"","sources":["../../../../../../src/domain/model/auth/entities/AccountLookup.ts"],"names":[],"mappings":";;;AAKA,IAAY,kBASX;AATD,WAAY,kBAAkB;IAE5B,2DAAqC,CAAA;IAErC,qDAA+B,CAAA;IAE/B,uEAAiD,CAAA;IAEjD,mCAAa,CAAA;AACf,CAAC,EATW,kBAAkB,kCAAlB,kBAAkB,QAS7B"}
@@ -0,0 +1,4 @@
1
+ import { EmailAccountLookupState } from './AccountLookup';
2
+ export declare class EmailAccountLookupResult {
3
+ state: EmailAccountLookupState;
4
+ }
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.EmailAccountLookupResult = void 0;
4
+ class EmailAccountLookupResult {
5
+ }
6
+ exports.EmailAccountLookupResult = EmailAccountLookupResult;
7
+ //# sourceMappingURL=EmailAccountLookupResult.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EmailAccountLookupResult.js","sourceRoot":"","sources":["../../../../../../src/domain/model/auth/entities/EmailAccountLookupResult.ts"],"names":[],"mappings":";;;AAOA,MAAa,wBAAwB;CAEpC;AAFD,4DAEC"}
@@ -0,0 +1,4 @@
1
+ import { AccountLookupState } from './AccountLookup';
2
+ export declare class WalletAccountLookupResult {
3
+ state: AccountLookupState;
4
+ }
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.WalletAccountLookupResult = void 0;
4
+ class WalletAccountLookupResult {
5
+ }
6
+ exports.WalletAccountLookupResult = WalletAccountLookupResult;
7
+ //# sourceMappingURL=WalletAccountLookupResult.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WalletAccountLookupResult.js","sourceRoot":"","sources":["../../../../../../src/domain/model/auth/entities/WalletAccountLookupResult.ts"],"names":[],"mappings":";;;AAGA,MAAa,yBAAyB;CAErC;AAFD,8DAEC"}
@@ -9,4 +9,7 @@ export * from './AccessCodeAuthToken';
9
9
  export * from './AccessCodeAuthPublicConfig.entity';
10
10
  export * from './AccessCodeAuthResponse.entity';
11
11
  export * from './TwitterRedirectUrl.entity';
12
+ export * from './AccountLookup';
13
+ export * from './EmailAccountLookupResult';
14
+ export * from './WalletAccountLookupResult';
12
15
  export * from './external';
@@ -25,5 +25,8 @@ __exportStar(require("./AccessCodeAuthToken"), exports);
25
25
  __exportStar(require("./AccessCodeAuthPublicConfig.entity"), exports);
26
26
  __exportStar(require("./AccessCodeAuthResponse.entity"), exports);
27
27
  __exportStar(require("./TwitterRedirectUrl.entity"), exports);
28
+ __exportStar(require("./AccountLookup"), exports);
29
+ __exportStar(require("./EmailAccountLookupResult"), exports);
30
+ __exportStar(require("./WalletAccountLookupResult"), exports);
28
31
  __exportStar(require("./external"), exports);
29
32
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/domain/model/auth/entities/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,iDAA+B;AAC/B,6CAA2B;AAC3B,sDAAoC;AACpC,qDAAmC;AACnC,+DAA6C;AAC7C,mEAAiD;AACjD,sDAAoC;AACpC,wDAAsC;AACtC,sEAAoD;AACpD,kEAAgD;AAChD,8DAA4C;AAC5C,6CAA2B"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/domain/model/auth/entities/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,iDAA+B;AAC/B,6CAA2B;AAC3B,sDAAoC;AACpC,qDAAmC;AACnC,+DAA6C;AAC7C,mEAAiD;AACjD,sDAAoC;AACpC,wDAAsC;AACtC,sEAAoD;AACpD,kEAAgD;AAChD,8DAA4C;AAC5C,kDAAgC;AAChC,6DAA2C;AAC3C,8DAA4C;AAC5C,6CAA2B"}
@@ -3,7 +3,7 @@ export declare enum BetaFeature {
3
3
  MOONPAY_HEADLESS_FRAMES = "MOONPAY_HEADLESS_FRAMES",
4
4
  GLIDE_DEPOSITS = "GLIDE_DEPOSITS",
5
5
  CHECKOUT_V2 = "checkout_v2",
6
- TRON_ENERGY_RENTAL = "TRON_ENERGY_RENTAL",
6
+ TRON_ENERGY_RENTAL_DISABLED = "TRON_ENERGY_RENTAL_DISABLED",
7
7
  THEMES_V2 = "themesV2",
8
8
  MOONPAY_IP_MATCHING_DISABLED = "MOONPAY_IP_MATCHING_DISABLED"
9
9
  }
@@ -7,7 +7,7 @@ var BetaFeature;
7
7
  BetaFeature["MOONPAY_HEADLESS_FRAMES"] = "MOONPAY_HEADLESS_FRAMES";
8
8
  BetaFeature["GLIDE_DEPOSITS"] = "GLIDE_DEPOSITS";
9
9
  BetaFeature["CHECKOUT_V2"] = "checkout_v2";
10
- BetaFeature["TRON_ENERGY_RENTAL"] = "TRON_ENERGY_RENTAL";
10
+ BetaFeature["TRON_ENERGY_RENTAL_DISABLED"] = "TRON_ENERGY_RENTAL_DISABLED";
11
11
  BetaFeature["THEMES_V2"] = "themesV2";
12
12
  BetaFeature["MOONPAY_IP_MATCHING_DISABLED"] = "MOONPAY_IP_MATCHING_DISABLED";
13
13
  })(BetaFeature || (exports.BetaFeature = BetaFeature = {}));
@@ -1 +1 @@
1
- {"version":3,"file":"BetaFeature.entity.js","sourceRoot":"","sources":["../../../../../../src/domain/model/feature-flags/entities/BetaFeature.entity.ts"],"names":[],"mappings":";;;AAAA,IAAY,WASX;AATD,WAAY,WAAW;IACrB,4BAAa,CAAA;IACb,kEAAmD,CAAA;IACnD,gDAAiC,CAAA;IACjC,0CAA2B,CAAA;IAC3B,wDAAyC,CAAA;IACzC,qCAAsB,CAAA;IAEtB,4EAA6D,CAAA;AAC/D,CAAC,EATW,WAAW,2BAAX,WAAW,QAStB"}
1
+ {"version":3,"file":"BetaFeature.entity.js","sourceRoot":"","sources":["../../../../../../src/domain/model/feature-flags/entities/BetaFeature.entity.ts"],"names":[],"mappings":";;;AAAA,IAAY,WASX;AATD,WAAY,WAAW;IACrB,4BAAa,CAAA;IACb,kEAAmD,CAAA;IACnD,gDAAiC,CAAA;IACjC,0CAA2B,CAAA;IAC3B,0EAA2D,CAAA;IAC3D,qCAAsB,CAAA;IAEtB,4EAA6D,CAAA;AAC/D,CAAC,EATW,WAAW,2BAAX,WAAW,QAStB"}