@heliofi/common 0.2.218 → 0.2.220

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.
@@ -2,11 +2,11 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.MAX_URL_LENGTH = exports.isValidUrl = exports.ALLOWED_CUSTOM_SCHEMES = void 0;
4
4
  const HTTP_URL_REGEX = /^https?:\/\/.(www\.)?[-a-zA-Z0-9@:%._+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_+.~#?&//=]*)$/;
5
- const CUSTOM_SCHEME_REGEX = /^[a-zA-Z][a-zA-Z0-9+\-.]*:\/\/.+$/;
5
+ const CUSTOM_SCHEME_REGEX = /^[a-zA-Z][a-zA-Z0-9+\-.]*:\/\/.*$/;
6
6
  exports.ALLOWED_CUSTOM_SCHEMES = [
7
7
  'wsopplus://',
8
- 'wsopplus-stage://',
9
- 'wsopplus-test://',
8
+ 'wsoplivestage://',
9
+ 'wsoplivetest://',
10
10
  'exp://',
11
11
  ];
12
12
  const isValidUrl = (url) => {
@@ -1 +1 @@
1
- {"version":3,"file":"urlValidation.js","sourceRoot":"","sources":["../../../../src/domain/constants/urlValidation.ts"],"names":[],"mappings":";;;AAAA,MAAM,cAAc,GAClB,8FAA8F,CAAC;AAEjG,MAAM,mBAAmB,GAAG,mCAAmC,CAAC;AAEnD,QAAA,sBAAsB,GAAG;IACpC,aAAa;IACb,mBAAmB;IACnB,kBAAkB;IAClB,QAAQ;CACT,CAAC;AAEK,MAAM,UAAU,GAAG,CAAC,GAAW,EAAW,EAAE;IACjD,IAAI,cAAc,CAAC,IAAI,CAAC,GAAG,CAAC;QAAE,OAAO,IAAI,CAAC;IAC1C,IAAI,CAAC,mBAAmB,CAAC,IAAI,CAAC,GAAG,CAAC;QAAE,OAAO,KAAK,CAAC;IAEjD,OAAO,8BAAsB,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAC5C,GAAG,CAAC,WAAW,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC,CACrC,CAAC;AACJ,CAAC,CAAC;AAPW,QAAA,UAAU,cAOrB;AAEW,QAAA,cAAc,GAAG,GAAG,CAAC"}
1
+ {"version":3,"file":"urlValidation.js","sourceRoot":"","sources":["../../../../src/domain/constants/urlValidation.ts"],"names":[],"mappings":";;;AAAA,MAAM,cAAc,GAClB,8FAA8F,CAAC;AAEjG,MAAM,mBAAmB,GAAG,mCAAmC,CAAC;AAEnD,QAAA,sBAAsB,GAAG;IACpC,aAAa;IACb,kBAAkB;IAClB,iBAAiB;IACjB,QAAQ;CACT,CAAC;AAEK,MAAM,UAAU,GAAG,CAAC,GAAW,EAAW,EAAE;IACjD,IAAI,cAAc,CAAC,IAAI,CAAC,GAAG,CAAC;QAAE,OAAO,IAAI,CAAC;IAC1C,IAAI,CAAC,mBAAmB,CAAC,IAAI,CAAC,GAAG,CAAC;QAAE,OAAO,KAAK,CAAC;IAEjD,OAAO,8BAAsB,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAC5C,GAAG,CAAC,WAAW,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC,CACrC,CAAC;AACJ,CAAC,CAAC;AAPW,QAAA,UAAU,cAOrB;AAEW,QAAA,cAAc,GAAG,GAAG,CAAC"}
@@ -0,0 +1,5 @@
1
+ export declare class GetOnrampCurrenciesDto {
2
+ country: string;
3
+ depositCustomerToken?: string;
4
+ state?: string;
5
+ }
@@ -0,0 +1,36 @@
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.GetOnrampCurrenciesDto = void 0;
13
+ const class_validator_1 = require("class-validator");
14
+ class GetOnrampCurrenciesDto {
15
+ }
16
+ exports.GetOnrampCurrenciesDto = GetOnrampCurrenciesDto;
17
+ __decorate([
18
+ (0, class_validator_1.IsString)(),
19
+ (0, class_validator_1.IsNotEmpty)(),
20
+ (0, class_validator_1.Length)(2, 2, {
21
+ message: 'Country must be a valid Alpha2 country code. (EG: US, UK, etc)',
22
+ }),
23
+ __metadata("design:type", String)
24
+ ], GetOnrampCurrenciesDto.prototype, "country", void 0);
25
+ __decorate([
26
+ (0, class_validator_1.IsString)(),
27
+ (0, class_validator_1.IsOptional)(),
28
+ __metadata("design:type", String)
29
+ ], GetOnrampCurrenciesDto.prototype, "depositCustomerToken", void 0);
30
+ __decorate([
31
+ (0, class_validator_1.IsString)(),
32
+ (0, class_validator_1.IsOptional)(),
33
+ (0, class_validator_1.Length)(5, 5, { message: 'State must be 5 characters. (EG: us-ny, ca-qc)' }),
34
+ __metadata("design:type", String)
35
+ ], GetOnrampCurrenciesDto.prototype, "state", void 0);
36
+ //# sourceMappingURL=getOnrampCurrencies.dto.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getOnrampCurrencies.dto.js","sourceRoot":"","sources":["../../../../../../src/domain/model/onramp/dtos/getOnrampCurrencies.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAA2E;AAE3E,MAAa,sBAAsB;CAgBlC;AAhBD,wDAgBC;AAVC;IALC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;IACZ,IAAA,wBAAM,EAAC,CAAC,EAAE,CAAC,EAAE;QACZ,OAAO,EAAE,gEAAgE;KAC1E,CAAC;;uDACc;AAIhB;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;oEACiB;AAK9B;IAHC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;IACZ,IAAA,wBAAM,EAAC,CAAC,EAAE,CAAC,EAAE,EAAE,OAAO,EAAE,gDAAgD,EAAE,CAAC;;qDAC7D"}
@@ -3,7 +3,7 @@ export declare class GetOnrampQuotesDto {
3
3
  fiat: string;
4
4
  crypto: string;
5
5
  amount: number;
6
+ country: string;
6
7
  paymentMethod?: string;
7
8
  walletAddress?: string;
8
- country?: string;
9
9
  }
@@ -36,18 +36,21 @@ __decorate([
36
36
  __metadata("design:type", Number)
37
37
  ], GetOnrampQuotesDto.prototype, "amount", void 0);
38
38
  __decorate([
39
- (0, class_validator_1.IsOptional)(),
40
39
  (0, class_validator_1.IsString)(),
40
+ (0, class_validator_1.IsNotEmpty)(),
41
+ (0, class_validator_1.Length)(2, 2, {
42
+ message: 'Country must be a valid Alpha2 country code. (EG: US, UK, etc)',
43
+ }),
41
44
  __metadata("design:type", String)
42
- ], GetOnrampQuotesDto.prototype, "paymentMethod", void 0);
45
+ ], GetOnrampQuotesDto.prototype, "country", void 0);
43
46
  __decorate([
44
47
  (0, class_validator_1.IsOptional)(),
45
48
  (0, class_validator_1.IsString)(),
46
49
  __metadata("design:type", String)
47
- ], GetOnrampQuotesDto.prototype, "walletAddress", void 0);
50
+ ], GetOnrampQuotesDto.prototype, "paymentMethod", void 0);
48
51
  __decorate([
49
52
  (0, class_validator_1.IsOptional)(),
50
53
  (0, class_validator_1.IsString)(),
51
54
  __metadata("design:type", String)
52
- ], GetOnrampQuotesDto.prototype, "country", void 0);
55
+ ], GetOnrampQuotesDto.prototype, "walletAddress", void 0);
53
56
  //# sourceMappingURL=getOnrampQuotes.dto.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"getOnrampQuotes.dto.js","sourceRoot":"","sources":["../../../../../../src/domain/model/onramp/dtos/getOnrampQuotes.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAMyB;AAEzB,MAAa,kBAAkB;CA6B9B;AA7BD,gDA6BC;AA1BC;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;gEACiB;AAI9B;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;gDACA;AAIb;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;kDACE;AAKf;IAHC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;IACZ,IAAA,4BAAU,GAAE;;kDACE;AAIf;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;yDACY;AAIvB;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;yDACY;AAIvB;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;mDACM"}
1
+ {"version":3,"file":"getOnrampQuotes.dto.js","sourceRoot":"","sources":["../../../../../../src/domain/model/onramp/dtos/getOnrampQuotes.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAOyB;AAEzB,MAAa,kBAAkB;CAgC9B;AAhCD,gDAgCC;AA7BC;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;gEACiB;AAI9B;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;gDACA;AAIb;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;kDACE;AAKf;IAHC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;IACZ,IAAA,4BAAU,GAAE;;kDACE;AAOf;IALC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;IACZ,IAAA,wBAAM,EAAC,CAAC,EAAE,CAAC,EAAE;QACZ,OAAO,EAAE,gEAAgE;KAC1E,CAAC;;mDACc;AAIhB;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;yDACY;AAIvB;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;yDACY"}
@@ -1,3 +1,4 @@
1
+ export * from './getOnrampCurrencies.dto';
1
2
  export * from './getOnrampPaymentMethods.dto';
2
3
  export * from './getOnrampQuotes.dto';
3
4
  export * from './initiateOnrampTransaction.dto';
@@ -14,6 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./getOnrampCurrencies.dto"), exports);
17
18
  __exportStar(require("./getOnrampPaymentMethods.dto"), exports);
18
19
  __exportStar(require("./getOnrampQuotes.dto"), exports);
19
20
  __exportStar(require("./initiateOnrampTransaction.dto"), exports);
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/domain/model/onramp/dtos/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,gEAA8C;AAC9C,wDAAsC;AACtC,kEAAgD;AAChD,uDAAqC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/domain/model/onramp/dtos/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4DAA0C;AAC1C,gEAA8C;AAC9C,wDAAsC;AACtC,kEAAgD;AAChD,uDAAqC"}
@@ -73,6 +73,9 @@ __decorate([
73
73
  __decorate([
74
74
  (0, class_validator_1.IsOptional)(),
75
75
  (0, class_validator_1.IsString)(),
76
+ (0, class_validator_1.Length)(2, 2, {
77
+ message: 'Country must be a valid Alpha2 country code. (EG US, UK, etc)',
78
+ }),
76
79
  __metadata("design:type", String)
77
80
  ], OnrampCheckoutDto.prototype, "country", void 0);
78
81
  __decorate([
@@ -1 +1 @@
1
- {"version":3,"file":"onrampCheckout.dto.js","sourceRoot":"","sources":["../../../../../../src/domain/model/onramp/dtos/onrampCheckout.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAOyB;AAEzB,MAAa,iBAAiB;CAqD7B;AArDD,8CAqDC;AAlDC;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;+DACiB;AAI9B;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;iDACE;AAIf;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;iDACE;AAIf;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;sDACO;AAKpB;IAHC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;IACZ,IAAA,4BAAU,GAAE;;iDACE;AAIf;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;wDACS;AAItB;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;kDACG;AAIhB;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;wDACS;AAItB;IAFC,IAAA,2BAAS,GAAE;IACX,IAAA,4BAAU,GAAE;;iDACG;AAIhB;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;gDACI;AAIf;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;yDACa;AAIxB;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;kDACM;AAIjB;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;sDACU"}
1
+ {"version":3,"file":"onrampCheckout.dto.js","sourceRoot":"","sources":["../../../../../../src/domain/model/onramp/dtos/onrampCheckout.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAQyB;AAEzB,MAAa,iBAAiB;CAwD7B;AAxDD,8CAwDC;AArDC;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;+DACiB;AAI9B;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;iDACE;AAIf;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;iDACE;AAIf;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;sDACO;AAKpB;IAHC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;IACZ,IAAA,4BAAU,GAAE;;iDACE;AAIf;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;wDACS;AAItB;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;kDACG;AAIhB;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;wDACS;AAItB;IAFC,IAAA,2BAAS,GAAE;IACX,IAAA,4BAAU,GAAE;;iDACG;AAIhB;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;gDACI;AAIf;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;yDACa;AAOxB;IALC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;IACV,IAAA,wBAAM,EAAC,CAAC,EAAE,CAAC,EAAE;QACZ,OAAO,EAAE,+DAA+D;KACzE,CAAC;;kDACe;AAIjB;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;sDACU"}