@heliofi/common 0.2.214 → 0.2.217

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.
@@ -1,2 +1,3 @@
1
- export declare const urlValidationRegex: RegExp;
1
+ export declare const ALLOWED_CUSTOM_SCHEMES: string[];
2
+ export declare const isValidUrl: (url: string) => boolean;
2
3
  export declare const MAX_URL_LENGTH = 256;
@@ -1,6 +1,21 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.MAX_URL_LENGTH = exports.urlValidationRegex = void 0;
4
- exports.urlValidationRegex = /http(s)?:\/\/.(www\.)?[-a-zA-Z0-9@:%._+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_+.~#?&//=]*)/g;
3
+ exports.MAX_URL_LENGTH = exports.isValidUrl = exports.ALLOWED_CUSTOM_SCHEMES = void 0;
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+\-.]*:\/\/.+$/;
6
+ exports.ALLOWED_CUSTOM_SCHEMES = [
7
+ 'wsopplus://',
8
+ 'wsopplus-stage://',
9
+ 'wsopplus-test://',
10
+ 'exp://',
11
+ ];
12
+ const isValidUrl = (url) => {
13
+ if (HTTP_URL_REGEX.test(url))
14
+ return true;
15
+ if (!CUSTOM_SCHEME_REGEX.test(url))
16
+ return false;
17
+ return exports.ALLOWED_CUSTOM_SCHEMES.some((scheme) => url.toLowerCase().startsWith(scheme));
18
+ };
19
+ exports.isValidUrl = isValidUrl;
5
20
  exports.MAX_URL_LENGTH = 256;
6
21
  //# sourceMappingURL=urlValidation.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"urlValidation.js","sourceRoot":"","sources":["../../../../src/domain/constants/urlValidation.ts"],"names":[],"mappings":";;;AAAa,QAAA,kBAAkB,GAC7B,+FAA+F,CAAC;AAErF,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,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"}
@@ -14,5 +14,6 @@ export declare class Charge extends Entity {
14
14
  depositCustomerId?: string;
15
15
  cancelRedirectUrl?: string;
16
16
  expiresAt?: string;
17
+ windowClosed?: boolean;
17
18
  shopifyPaymentDetails: ShopifyPaymentDetails;
18
19
  }
@@ -1 +1 @@
1
- {"version":3,"file":"Charge.entity.js","sourceRoot":"","sources":["../../../../../../src/domain/model/charge/entities/Charge.entity.ts"],"names":[],"mappings":";;;AAAA,yCAAsC;AAKtC,MAAa,MAAO,SAAQ,eAAM;CAwBjC;AAxBD,wBAwBC"}
1
+ {"version":3,"file":"Charge.entity.js","sourceRoot":"","sources":["../../../../../../src/domain/model/charge/entities/Charge.entity.ts"],"names":[],"mappings":";;;AAAA,yCAAsC;AAKtC,MAAa,MAAO,SAAQ,eAAM;CA0BjC;AA1BD,wBA0BC"}
@@ -19,6 +19,7 @@ export declare class DepositCustomerEnrichedEntity extends Entity {
19
19
  remainingDueMinimalUnit?: string;
20
20
  depositedCurrency?: {
21
21
  symbol: string;
22
+ decimals: number;
22
23
  blockchain: {
23
24
  symbol: string;
24
25
  };
@@ -1 +1 @@
1
- {"version":3,"file":"DepositCustomerEnriched.entity.js","sourceRoot":"","sources":["../../../../../../src/domain/model/deposit/entities/DepositCustomerEnriched.entity.ts"],"names":[],"mappings":";;;AAAA,yCAAsC;AAQtC,MAAa,6BAA8B,SAAQ,eAAM;CAqCxD;AArCD,sEAqCC"}
1
+ {"version":3,"file":"DepositCustomerEnriched.entity.js","sourceRoot":"","sources":["../../../../../../src/domain/model/deposit/entities/DepositCustomerEnriched.entity.ts"],"names":[],"mappings":";;;AAAA,yCAAsC;AAQtC,MAAa,6BAA8B,SAAQ,eAAM;CAsCxD;AAtCD,sEAsCC"}
@@ -9,6 +9,7 @@ export declare class SweepAttempt extends Entity {
9
9
  requiredAmountMinimalUnit?: string;
10
10
  depositedCurrency?: {
11
11
  symbol: string;
12
+ decimals: number;
12
13
  blockchain: {
13
14
  symbol: string;
14
15
  };
@@ -1 +1 @@
1
- {"version":3,"file":"RecentSweepAttempt.js","sourceRoot":"","sources":["../../../../../../src/domain/model/sweep-attempt/entities/RecentSweepAttempt.ts"],"names":[],"mappings":";;;AAAA,yCAAsC;AAGtC,MAAa,YAAa,SAAQ,eAAM;CAqBvC;AArBD,oCAqBC"}
1
+ {"version":3,"file":"RecentSweepAttempt.js","sourceRoot":"","sources":["../../../../../../src/domain/model/sweep-attempt/entities/RecentSweepAttempt.ts"],"names":[],"mappings":";;;AAAA,yCAAsC;AAGtC,MAAa,YAAa,SAAQ,eAAM;CAsBvC;AAtBD,oCAsBC"}