@heliofi/common 0.2.214 → 0.2.218
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/constants/urlValidation.d.ts +2 -1
- package/dist/src/domain/constants/urlValidation.js +17 -2
- package/dist/src/domain/constants/urlValidation.js.map +1 -1
- package/dist/src/domain/model/charge/entities/Charge.entity.d.ts +1 -0
- package/dist/src/domain/model/charge/entities/Charge.entity.js.map +1 -1
- package/dist/src/domain/model/company/dtos/UpdateOnramperApiKey.dto.d.ts +1 -1
- package/dist/src/domain/model/company/dtos/UpdateOnramperApiKey.dto.js +2 -2
- package/dist/src/domain/model/company/dtos/UpdateOnramperApiKey.dto.js.map +1 -1
- package/dist/src/domain/model/company/entities/OnramperApiKeyConfig.entity.d.ts +0 -1
- package/dist/src/domain/model/company/entities/OnramperApiKeyConfig.entity.js.map +1 -1
- package/dist/src/domain/model/deposit/entities/DepositCustomerEnriched.entity.d.ts +1 -0
- package/dist/src/domain/model/deposit/entities/DepositCustomerEnriched.entity.js.map +1 -1
- package/dist/src/domain/model/sweep-attempt/entities/RecentSweepAttempt.d.ts +1 -0
- package/dist/src/domain/model/sweep-attempt/entities/RecentSweepAttempt.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -2
|
@@ -1,6 +1,21 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.MAX_URL_LENGTH = exports.
|
|
4
|
-
|
|
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":";;;
|
|
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 +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;
|
|
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"}
|
|
@@ -25,10 +25,10 @@ __decorate([
|
|
|
25
25
|
__metadata("design:type", String)
|
|
26
26
|
], UpdateOnramperApiKeyDto.prototype, "onramperApiKeySecret", void 0);
|
|
27
27
|
__decorate([
|
|
28
|
-
(0, class_validator_1.
|
|
28
|
+
(0, class_validator_1.IsString)(),
|
|
29
29
|
(0, class_validator_1.IsOptional)(),
|
|
30
30
|
__metadata("design:type", String)
|
|
31
|
-
], UpdateOnramperApiKeyDto.prototype, "
|
|
31
|
+
], UpdateOnramperApiKeyDto.prototype, "onramperWebhookSecret", void 0);
|
|
32
32
|
__decorate([
|
|
33
33
|
(0, class_validator_1.IsBoolean)(),
|
|
34
34
|
(0, class_validator_1.IsOptional)(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UpdateOnramperApiKey.dto.js","sourceRoot":"","sources":["../../../../../../src/domain/model/company/dtos/UpdateOnramperApiKey.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"UpdateOnramperApiKey.dto.js","sourceRoot":"","sources":["../../../../../../src/domain/model/company/dtos/UpdateOnramperApiKey.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAkE;AAElE,MAAa,uBAAuB;CAgBnC;AAhBD,0DAgBC;AAbC;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;+DACW;AAIxB;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;qEACiB;AAI9B;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;sEACkB;AAI/B;IAFC,IAAA,2BAAS,GAAE;IACX,IAAA,4BAAU,GAAE;;0DACO"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OnramperApiKeyConfig.entity.js","sourceRoot":"","sources":["../../../../../../src/domain/model/company/entities/OnramperApiKeyConfig.entity.ts"],"names":[],"mappings":";;;AAAA,MAAa,oBAAoB;
|
|
1
|
+
{"version":3,"file":"OnramperApiKeyConfig.entity.js","sourceRoot":"","sources":["../../../../../../src/domain/model/company/entities/OnramperApiKeyConfig.entity.ts"],"names":[],"mappings":";;;AAAA,MAAa,oBAAoB;CAIhC;AAJD,oDAIC"}
|
|
@@ -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;
|
|
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"}
|
|
@@ -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;
|
|
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"}
|