@dohana/shared 1.0.0
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/README.md +27 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.js +26 -0
- package/dist/index.js.map +1 -0
- package/dist/lib/consts/index.d.ts +1 -0
- package/dist/lib/consts/index.js +18 -0
- package/dist/lib/consts/index.js.map +1 -0
- package/dist/lib/consts/password-helper/index.d.ts +1 -0
- package/dist/lib/consts/password-helper/index.js +18 -0
- package/dist/lib/consts/password-helper/index.js.map +1 -0
- package/dist/lib/consts/password-helper/passwordHelper.d.ts +5 -0
- package/dist/lib/consts/password-helper/passwordHelper.js +9 -0
- package/dist/lib/consts/password-helper/passwordHelper.js.map +1 -0
- package/dist/lib/decorators/api-response.decorator.d.ts +2 -0
- package/dist/lib/decorators/api-response.decorator.js +19 -0
- package/dist/lib/decorators/api-response.decorator.js.map +1 -0
- package/dist/lib/decorators/external-api.decorator.d.ts +1 -0
- package/dist/lib/decorators/external-api.decorator.js +7 -0
- package/dist/lib/decorators/external-api.decorator.js.map +1 -0
- package/dist/lib/decorators/index.d.ts +2 -0
- package/dist/lib/decorators/index.js +19 -0
- package/dist/lib/decorators/index.js.map +1 -0
- package/dist/lib/dto/data-wrapper-dto.d.ts +9 -0
- package/dist/lib/dto/data-wrapper-dto.js +35 -0
- package/dist/lib/dto/data-wrapper-dto.js.map +1 -0
- package/dist/lib/dto/index.d.ts +6 -0
- package/dist/lib/dto/index.js +23 -0
- package/dist/lib/dto/index.js.map +1 -0
- package/dist/lib/dto/pagination-request.d.ts +4 -0
- package/dist/lib/dto/pagination-request.js +48 -0
- package/dist/lib/dto/pagination-request.js.map +1 -0
- package/dist/lib/dto/pagination-response.d.ts +8 -0
- package/dist/lib/dto/pagination-response.js +49 -0
- package/dist/lib/dto/pagination-response.js.map +1 -0
- package/dist/lib/dto/pagination-with-filters-request.d.ts +8 -0
- package/dist/lib/dto/pagination-with-filters-request.js +31 -0
- package/dist/lib/dto/pagination-with-filters-request.js.map +1 -0
- package/dist/lib/dto/shared/index.d.ts +1 -0
- package/dist/lib/dto/shared/index.js +18 -0
- package/dist/lib/dto/shared/index.js.map +1 -0
- package/dist/lib/dto/shared/shared.d.ts +13 -0
- package/dist/lib/dto/shared/shared.js +3 -0
- package/dist/lib/dto/shared/shared.js.map +1 -0
- package/dist/lib/dto/user/index.d.ts +1 -0
- package/dist/lib/dto/user/index.js +18 -0
- package/dist/lib/dto/user/index.js.map +1 -0
- package/dist/lib/dto/user/user-info.dto.d.ts +11 -0
- package/dist/lib/dto/user/user-info.dto.js +7 -0
- package/dist/lib/dto/user/user-info.dto.js.map +1 -0
- package/dist/lib/entities/area/index.d.ts +12 -0
- package/dist/lib/entities/area/index.js +3 -0
- package/dist/lib/entities/area/index.js.map +1 -0
- package/dist/lib/entities/article/index.d.ts +32 -0
- package/dist/lib/entities/article/index.js +3 -0
- package/dist/lib/entities/article/index.js.map +1 -0
- package/dist/lib/entities/index.d.ts +11 -0
- package/dist/lib/entities/index.js +28 -0
- package/dist/lib/entities/index.js.map +1 -0
- package/dist/lib/entities/investor/index.d.ts +23 -0
- package/dist/lib/entities/investor/index.js +3 -0
- package/dist/lib/entities/investor/index.js.map +1 -0
- package/dist/lib/entities/key-builder/index.d.ts +94 -0
- package/dist/lib/entities/key-builder/index.js +148 -0
- package/dist/lib/entities/key-builder/index.js.map +1 -0
- package/dist/lib/entities/notification/index.d.ts +3 -0
- package/dist/lib/entities/notification/index.js +20 -0
- package/dist/lib/entities/notification/index.js.map +1 -0
- package/dist/lib/entities/notification/notification-template.d.ts +12 -0
- package/dist/lib/entities/notification/notification-template.js +3 -0
- package/dist/lib/entities/notification/notification-template.js.map +1 -0
- package/dist/lib/entities/notification/notification.d.ts +12 -0
- package/dist/lib/entities/notification/notification.js +3 -0
- package/dist/lib/entities/notification/notification.js.map +1 -0
- package/dist/lib/entities/notification/subject.d.ts +5 -0
- package/dist/lib/entities/notification/subject.js +3 -0
- package/dist/lib/entities/notification/subject.js.map +1 -0
- package/dist/lib/entities/post/index.d.ts +58 -0
- package/dist/lib/entities/post/index.js +3 -0
- package/dist/lib/entities/post/index.js.map +1 -0
- package/dist/lib/entities/project/index.d.ts +29 -0
- package/dist/lib/entities/project/index.js +3 -0
- package/dist/lib/entities/project/index.js.map +1 -0
- package/dist/lib/entities/tag/index.d.ts +9 -0
- package/dist/lib/entities/tag/index.js +3 -0
- package/dist/lib/entities/tag/index.js.map +1 -0
- package/dist/lib/entities/transaction/index.d.ts +13 -0
- package/dist/lib/entities/transaction/index.js +3 -0
- package/dist/lib/entities/transaction/index.js.map +1 -0
- package/dist/lib/entities/user/index.d.ts +36 -0
- package/dist/lib/entities/user/index.js +18 -0
- package/dist/lib/entities/user/index.js.map +1 -0
- package/dist/lib/entities/user/user-token.d.ts +10 -0
- package/dist/lib/entities/user/user-token.js +3 -0
- package/dist/lib/entities/user/user-token.js.map +1 -0
- package/dist/lib/entities/wallet/index.d.ts +12 -0
- package/dist/lib/entities/wallet/index.js +18 -0
- package/dist/lib/entities/wallet/index.js.map +1 -0
- package/dist/lib/entities/wallet/wallet-type.enum.d.ts +4 -0
- package/dist/lib/entities/wallet/wallet-type.enum.js +9 -0
- package/dist/lib/entities/wallet/wallet-type.enum.js.map +1 -0
- package/dist/lib/exceptions/api.exception.d.ts +3 -0
- package/dist/lib/exceptions/api.exception.js +8 -0
- package/dist/lib/exceptions/api.exception.js.map +1 -0
- package/dist/lib/exceptions/db.exception.d.ts +2 -0
- package/dist/lib/exceptions/db.exception.js +7 -0
- package/dist/lib/exceptions/db.exception.js.map +1 -0
- package/dist/lib/exceptions/index.d.ts +3 -0
- package/dist/lib/exceptions/index.js +20 -0
- package/dist/lib/exceptions/index.js.map +1 -0
- package/dist/lib/exceptions/platform.exception.d.ts +2 -0
- package/dist/lib/exceptions/platform.exception.js +7 -0
- package/dist/lib/exceptions/platform.exception.js.map +1 -0
- package/dist/lib/services/index.d.ts +1 -0
- package/dist/lib/services/index.js +18 -0
- package/dist/lib/services/index.js.map +1 -0
- package/dist/lib/services/oauth-redirect.d.ts +22 -0
- package/dist/lib/services/oauth-redirect.js +89 -0
- package/dist/lib/services/oauth-redirect.js.map +1 -0
- package/dist/lib/shared/index.d.ts +10 -0
- package/dist/lib/shared/index.js +5 -0
- package/dist/lib/shared/index.js.map +1 -0
- package/dist/lib/types/area/area-level.enums.d.ts +6 -0
- package/dist/lib/types/area/area-level.enums.js +11 -0
- package/dist/lib/types/area/area-level.enums.js.map +1 -0
- package/dist/lib/types/area/index.d.ts +1 -0
- package/dist/lib/types/area/index.js +18 -0
- package/dist/lib/types/area/index.js.map +1 -0
- package/dist/lib/types/article/article-status.enum.d.ts +5 -0
- package/dist/lib/types/article/article-status.enum.js +10 -0
- package/dist/lib/types/article/article-status.enum.js.map +1 -0
- package/dist/lib/types/article/index.d.ts +3 -0
- package/dist/lib/types/article/index.js +19 -0
- package/dist/lib/types/article/index.js.map +1 -0
- package/dist/lib/types/article/up-down-vote-type.enum.d.ts +4 -0
- package/dist/lib/types/article/up-down-vote-type.enum.js +9 -0
- package/dist/lib/types/article/up-down-vote-type.enum.js.map +1 -0
- package/dist/lib/types/auth/auth.types.d.ts +25 -0
- package/dist/lib/types/auth/auth.types.js +18 -0
- package/dist/lib/types/auth/auth.types.js.map +1 -0
- package/dist/lib/types/auth/index.d.ts +1 -0
- package/dist/lib/types/auth/index.js +18 -0
- package/dist/lib/types/auth/index.js.map +1 -0
- package/dist/lib/types/index.d.ts +11 -0
- package/dist/lib/types/index.js +28 -0
- package/dist/lib/types/index.js.map +1 -0
- package/dist/lib/types/investor/index.d.ts +1 -0
- package/dist/lib/types/investor/index.js +18 -0
- package/dist/lib/types/investor/index.js.map +1 -0
- package/dist/lib/types/investor/investor.types.d.ts +1 -0
- package/dist/lib/types/investor/investor.types.js +3 -0
- package/dist/lib/types/investor/investor.types.js.map +1 -0
- package/dist/lib/types/notification/index.d.ts +3 -0
- package/dist/lib/types/notification/index.js +19 -0
- package/dist/lib/types/notification/index.js.map +1 -0
- package/dist/lib/types/notification/notification.status.d.ts +6 -0
- package/dist/lib/types/notification/notification.status.js +11 -0
- package/dist/lib/types/notification/notification.status.js.map +1 -0
- package/dist/lib/types/notification/notification.types.d.ts +4 -0
- package/dist/lib/types/notification/notification.types.js +9 -0
- package/dist/lib/types/notification/notification.types.js.map +1 -0
- package/dist/lib/types/pagination/index.d.ts +11 -0
- package/dist/lib/types/pagination/index.js +9 -0
- package/dist/lib/types/pagination/index.js.map +1 -0
- package/dist/lib/types/post/index.d.ts +4 -0
- package/dist/lib/types/post/index.js +21 -0
- package/dist/lib/types/post/index.js.map +1 -0
- package/dist/lib/types/post/post-status.enum.d.ts +6 -0
- package/dist/lib/types/post/post-status.enum.js +11 -0
- package/dist/lib/types/post/post-status.enum.js.map +1 -0
- package/dist/lib/types/post/post-type.enum.d.ts +4 -0
- package/dist/lib/types/post/post-type.enum.js +9 -0
- package/dist/lib/types/post/post-type.enum.js.map +1 -0
- package/dist/lib/types/post/post.types.d.ts +1 -0
- package/dist/lib/types/post/post.types.js +3 -0
- package/dist/lib/types/post/post.types.js.map +1 -0
- package/dist/lib/types/post/price-type.enum.d.ts +5 -0
- package/dist/lib/types/post/price-type.enum.js +10 -0
- package/dist/lib/types/post/price-type.enum.js.map +1 -0
- package/dist/lib/types/project/index.d.ts +2 -0
- package/dist/lib/types/project/index.js +19 -0
- package/dist/lib/types/project/index.js.map +1 -0
- package/dist/lib/types/project/project-status.enum.d.ts +6 -0
- package/dist/lib/types/project/project-status.enum.js +11 -0
- package/dist/lib/types/project/project-status.enum.js.map +1 -0
- package/dist/lib/types/project/project.types.d.ts +1 -0
- package/dist/lib/types/project/project.types.js +3 -0
- package/dist/lib/types/project/project.types.js.map +1 -0
- package/dist/lib/types/tag/index.d.ts +1 -0
- package/dist/lib/types/tag/index.js +3 -0
- package/dist/lib/types/tag/index.js.map +1 -0
- package/dist/lib/types/user/index.d.ts +4 -0
- package/dist/lib/types/user/index.js +19 -0
- package/dist/lib/types/user/index.js.map +1 -0
- package/dist/lib/types/user/user-plan.enum.d.ts +6 -0
- package/dist/lib/types/user/user-plan.enum.js +11 -0
- package/dist/lib/types/user/user-plan.enum.js.map +1 -0
- package/dist/lib/types/user/user.enums.d.ts +6 -0
- package/dist/lib/types/user/user.enums.js +12 -0
- package/dist/lib/types/user/user.enums.js.map +1 -0
- package/dist/lib/types/wallet/index.d.ts +2 -0
- package/dist/lib/types/wallet/index.js +3 -0
- package/dist/lib/types/wallet/index.js.map +1 -0
- package/dist/lib/utils/checkIsResponseError.d.ts +2 -0
- package/dist/lib/utils/checkIsResponseError.js +12 -0
- package/dist/lib/utils/checkIsResponseError.js.map +1 -0
- package/dist/lib/utils/common.d.ts +3 -0
- package/dist/lib/utils/common.js +30 -0
- package/dist/lib/utils/common.js.map +1 -0
- package/dist/lib/utils/email-normalization.d.ts +1 -0
- package/dist/lib/utils/email-normalization.js +49 -0
- package/dist/lib/utils/email-normalization.js.map +1 -0
- package/dist/lib/utils/env.d.ts +1 -0
- package/dist/lib/utils/env.js +67 -0
- package/dist/lib/utils/env.js.map +1 -0
- package/dist/lib/utils/hmac.d.ts +1 -0
- package/dist/lib/utils/hmac.js +10 -0
- package/dist/lib/utils/hmac.js.map +1 -0
- package/dist/lib/utils/index.d.ts +6 -0
- package/dist/lib/utils/index.js +23 -0
- package/dist/lib/utils/index.js.map +1 -0
- package/dist/lib/utils/ttl.d.ts +5 -0
- package/dist/lib/utils/ttl.js +47 -0
- package/dist/lib/utils/ttl.js.map +1 -0
- package/package.json +94 -0
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./notification.types"), exports);
|
|
18
|
+
__exportStar(require("./notification.status"), exports);
|
|
19
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/lib/types/notification/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAEA,uDAAqC;AACrC,wDAAsC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NotificationStatus = void 0;
|
|
4
|
+
var NotificationStatus;
|
|
5
|
+
(function (NotificationStatus) {
|
|
6
|
+
NotificationStatus["CREATED"] = "CREATED";
|
|
7
|
+
NotificationStatus["SENT"] = "SENT";
|
|
8
|
+
NotificationStatus["FAIL"] = "FAIL";
|
|
9
|
+
NotificationStatus["READ"] = "READ";
|
|
10
|
+
})(NotificationStatus || (exports.NotificationStatus = NotificationStatus = {}));
|
|
11
|
+
//# sourceMappingURL=notification.status.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"notification.status.js","sourceRoot":"","sources":["../../../../src/lib/types/notification/notification.status.ts"],"names":[],"mappings":";;;AAAA,IAAY,kBAKX;AALD,WAAY,kBAAkB;IAC5B,yCAAmB,CAAA;IACnB,mCAAa,CAAA;IACb,mCAAa,CAAA;IACb,mCAAa,CAAA;AACf,CAAC,EALW,kBAAkB,kCAAlB,kBAAkB,QAK7B"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NotificationTypes = void 0;
|
|
4
|
+
var NotificationTypes;
|
|
5
|
+
(function (NotificationTypes) {
|
|
6
|
+
NotificationTypes["TEXT"] = "TEXT";
|
|
7
|
+
NotificationTypes["ACTION"] = "ACTION";
|
|
8
|
+
})(NotificationTypes || (exports.NotificationTypes = NotificationTypes = {}));
|
|
9
|
+
//# sourceMappingURL=notification.types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"notification.types.js","sourceRoot":"","sources":["../../../../src/lib/types/notification/notification.types.ts"],"names":[],"mappings":";;;AAAA,IAAY,iBAGX;AAHD,WAAY,iBAAiB;IAC3B,kCAAa,CAAA;IACb,sCAAiB,CAAA;AACnB,CAAC,EAHW,iBAAiB,iCAAjB,iBAAiB,QAG5B"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.OrderDirectionEnum = void 0;
|
|
4
|
+
var OrderDirectionEnum;
|
|
5
|
+
(function (OrderDirectionEnum) {
|
|
6
|
+
OrderDirectionEnum[OrderDirectionEnum["ASC"] = 1] = "ASC";
|
|
7
|
+
OrderDirectionEnum[OrderDirectionEnum["DESC"] = -1] = "DESC";
|
|
8
|
+
})(OrderDirectionEnum || (exports.OrderDirectionEnum = OrderDirectionEnum = {}));
|
|
9
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/lib/types/pagination/index.ts"],"names":[],"mappings":";;;AASA,IAAY,kBAGX;AAHD,WAAY,kBAAkB;IAC5B,yDAAO,CAAA;IACP,4DAAS,CAAA;AACX,CAAC,EAHW,kBAAkB,kCAAlB,kBAAkB,QAG7B"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./post.types"), exports);
|
|
18
|
+
__exportStar(require("./post-status.enum"), exports);
|
|
19
|
+
__exportStar(require("./post-type.enum"), exports);
|
|
20
|
+
__exportStar(require("./price-type.enum"), exports);
|
|
21
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/lib/types/post/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,+CAA6B;AAC7B,qDAAmC;AACnC,mDAAiC;AACjC,oDAAkC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PostStatusEnum = void 0;
|
|
4
|
+
var PostStatusEnum;
|
|
5
|
+
(function (PostStatusEnum) {
|
|
6
|
+
PostStatusEnum["DRAFT"] = "DRAFT";
|
|
7
|
+
PostStatusEnum["CREATED"] = "CREATED";
|
|
8
|
+
PostStatusEnum["VISIBLE"] = "VISIBLE";
|
|
9
|
+
PostStatusEnum["INVISIBLE"] = "INVISIBLE";
|
|
10
|
+
})(PostStatusEnum || (exports.PostStatusEnum = PostStatusEnum = {}));
|
|
11
|
+
//# sourceMappingURL=post-status.enum.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"post-status.enum.js","sourceRoot":"","sources":["../../../../src/lib/types/post/post-status.enum.ts"],"names":[],"mappings":";;;AAAA,IAAY,cAKX;AALD,WAAY,cAAc;IACxB,iCAAe,CAAA;IACf,qCAAmB,CAAA;IACnB,qCAAmB,CAAA;IACnB,yCAAuB,CAAA;AACzB,CAAC,EALW,cAAc,8BAAd,cAAc,QAKzB"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PostTypeEnum = void 0;
|
|
4
|
+
var PostTypeEnum;
|
|
5
|
+
(function (PostTypeEnum) {
|
|
6
|
+
PostTypeEnum["LEASE"] = "LEASE";
|
|
7
|
+
PostTypeEnum["SELL"] = "SELL";
|
|
8
|
+
})(PostTypeEnum || (exports.PostTypeEnum = PostTypeEnum = {}));
|
|
9
|
+
//# sourceMappingURL=post-type.enum.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"post-type.enum.js","sourceRoot":"","sources":["../../../../src/lib/types/post/post-type.enum.ts"],"names":[],"mappings":";;;AAAA,IAAY,YAGX;AAHD,WAAY,YAAY;IACtB,+BAAe,CAAA;IACf,6BAAa,CAAA;AACf,CAAC,EAHW,YAAY,4BAAZ,YAAY,QAGvB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type PostId = string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"post.types.js","sourceRoot":"","sources":["../../../../src/lib/types/post/post.types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PriceTypeEnum = void 0;
|
|
4
|
+
var PriceTypeEnum;
|
|
5
|
+
(function (PriceTypeEnum) {
|
|
6
|
+
PriceTypeEnum["SELF_AGREEMENT"] = "SELF_AGREEMENT";
|
|
7
|
+
PriceTypeEnum["PER_M2"] = "PER_M2";
|
|
8
|
+
PriceTypeEnum["FIX_PRICE"] = "FIX_PRICE";
|
|
9
|
+
})(PriceTypeEnum || (exports.PriceTypeEnum = PriceTypeEnum = {}));
|
|
10
|
+
//# sourceMappingURL=price-type.enum.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"price-type.enum.js","sourceRoot":"","sources":["../../../../src/lib/types/post/price-type.enum.ts"],"names":[],"mappings":";;;AAAA,IAAY,aAIX;AAJD,WAAY,aAAa;IACvB,kDAAiC,CAAA;IACjC,kCAAiB,CAAA;IACjB,wCAAuB,CAAA;AACzB,CAAC,EAJW,aAAa,6BAAb,aAAa,QAIxB"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./project.types"), exports);
|
|
18
|
+
__exportStar(require("./project-status.enum"), exports);
|
|
19
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/lib/types/project/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,kDAAgC;AAChC,wDAAsC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ProjectStatusEnum = void 0;
|
|
4
|
+
var ProjectStatusEnum;
|
|
5
|
+
(function (ProjectStatusEnum) {
|
|
6
|
+
ProjectStatusEnum["CREATED"] = "CREATED";
|
|
7
|
+
ProjectStatusEnum["HAND_OVER"] = "HAND_OVER";
|
|
8
|
+
ProjectStatusEnum["READY_FOR_SALE"] = "READY_FOR_SALE";
|
|
9
|
+
ProjectStatusEnum["ON_SALE"] = "ON_SALE";
|
|
10
|
+
})(ProjectStatusEnum || (exports.ProjectStatusEnum = ProjectStatusEnum = {}));
|
|
11
|
+
//# sourceMappingURL=project-status.enum.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"project-status.enum.js","sourceRoot":"","sources":["../../../../src/lib/types/project/project-status.enum.ts"],"names":[],"mappings":";;;AAAA,IAAY,iBAKX;AALD,WAAY,iBAAiB;IAC3B,wCAAmB,CAAA;IACnB,4CAAuB,CAAA;IACvB,sDAAiC,CAAA;IACjC,wCAAmB,CAAA;AACrB,CAAC,EALW,iBAAiB,iCAAjB,iBAAiB,QAK5B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type ProjectId = string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"project.types.js","sourceRoot":"","sources":["../../../../src/lib/types/project/project.types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type TagId = string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/lib/types/tag/index.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./user-plan.enum"), exports);
|
|
18
|
+
__exportStar(require("./user.enums"), exports);
|
|
19
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/lib/types/user/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAEA,mDAAiC;AACjC,+CAA6B"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.UserPlan = void 0;
|
|
4
|
+
var UserPlan;
|
|
5
|
+
(function (UserPlan) {
|
|
6
|
+
UserPlan[UserPlan["free"] = 0] = "free";
|
|
7
|
+
UserPlan[UserPlan["silver"] = 1] = "silver";
|
|
8
|
+
UserPlan[UserPlan["gold"] = 2] = "gold";
|
|
9
|
+
UserPlan[UserPlan["diamond"] = 3] = "diamond";
|
|
10
|
+
})(UserPlan || (exports.UserPlan = UserPlan = {}));
|
|
11
|
+
//# sourceMappingURL=user-plan.enum.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"user-plan.enum.js","sourceRoot":"","sources":["../../../../src/lib/types/user/user-plan.enum.ts"],"names":[],"mappings":";;;AAAA,IAAY,QAKX;AALD,WAAY,QAAQ;IAClB,uCAAI,CAAA;IACJ,2CAAM,CAAA;IACN,uCAAI,CAAA;IACJ,6CAAO,CAAA;AACT,CAAC,EALW,QAAQ,wBAAR,QAAQ,QAKnB"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.UserRoleEnum = exports.AuthProviderEnum = void 0;
|
|
4
|
+
var AuthProviderEnum;
|
|
5
|
+
(function (AuthProviderEnum) {
|
|
6
|
+
AuthProviderEnum["GOOGLE"] = "google";
|
|
7
|
+
})(AuthProviderEnum || (exports.AuthProviderEnum = AuthProviderEnum = {}));
|
|
8
|
+
var UserRoleEnum;
|
|
9
|
+
(function (UserRoleEnum) {
|
|
10
|
+
UserRoleEnum["USER"] = "user";
|
|
11
|
+
})(UserRoleEnum || (exports.UserRoleEnum = UserRoleEnum = {}));
|
|
12
|
+
//# sourceMappingURL=user.enums.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"user.enums.js","sourceRoot":"","sources":["../../../../src/lib/types/user/user.enums.ts"],"names":[],"mappings":";;;AAAA,IAAY,gBAEX;AAFD,WAAY,gBAAgB;IAC1B,qCAAiB,CAAA;AACnB,CAAC,EAFW,gBAAgB,gCAAhB,gBAAgB,QAE3B;AAED,IAAY,YAEX;AAFD,WAAY,YAAY;IACtB,6BAAa,CAAA;AACf,CAAC,EAFW,YAAY,4BAAZ,YAAY,QAEvB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/lib/types/wallet/index.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.checkIsResponseError = void 0;
|
|
4
|
+
const checkIsResponseError = (err) => {
|
|
5
|
+
return (!!err &&
|
|
6
|
+
typeof err === 'object' &&
|
|
7
|
+
'error' in err &&
|
|
8
|
+
'message' in err &&
|
|
9
|
+
'statusCode' in err);
|
|
10
|
+
};
|
|
11
|
+
exports.checkIsResponseError = checkIsResponseError;
|
|
12
|
+
//# sourceMappingURL=checkIsResponseError.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"checkIsResponseError.js","sourceRoot":"","sources":["../../../src/lib/utils/checkIsResponseError.ts"],"names":[],"mappings":";;;AAKO,MAAM,oBAAoB,GAAG,CAAC,GAAY,EAAyB,EAAE;IAC1E,OAAO,CACL,CAAC,CAAC,GAAG;QACL,OAAO,GAAG,KAAK,QAAQ;QACvB,OAAO,IAAI,GAAG;QACd,SAAS,IAAI,GAAG;QAChB,YAAY,IAAI,GAAG,CACpB,CAAC;AACJ,CAAC,CAAC;AARW,QAAA,oBAAoB,wBAQ/B"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.makeid = makeid;
|
|
4
|
+
exports.getDateDataTimeout = getDateDataTimeout;
|
|
5
|
+
const types_1 = require("../types");
|
|
6
|
+
function makeid(length) {
|
|
7
|
+
let result = '';
|
|
8
|
+
const characters = 'abcdefghijklmnopqrstuvwxyz'.toUpperCase();
|
|
9
|
+
const charactersLength = characters.length;
|
|
10
|
+
let counter = 0;
|
|
11
|
+
while (counter < length) {
|
|
12
|
+
result += characters.charAt(Math.floor(Math.random() * charactersLength));
|
|
13
|
+
counter += 1;
|
|
14
|
+
}
|
|
15
|
+
return result;
|
|
16
|
+
}
|
|
17
|
+
function getDateDataTimeout(plan) {
|
|
18
|
+
let secondsTimeout = 0;
|
|
19
|
+
if (plan == types_1.UserPlan.free)
|
|
20
|
+
secondsTimeout = 7 * 24 * 60 * 60;
|
|
21
|
+
else if (plan == types_1.UserPlan.silver)
|
|
22
|
+
secondsTimeout = 7 * 24 * 60 * 60;
|
|
23
|
+
else if (plan == types_1.UserPlan.gold)
|
|
24
|
+
secondsTimeout = 30 * 24 * 60 * 60;
|
|
25
|
+
else if (plan == types_1.UserPlan.diamond)
|
|
26
|
+
secondsTimeout = 60 * 24 * 60 * 60;
|
|
27
|
+
const now = new Date();
|
|
28
|
+
return new Date(now.getTime() + secondsTimeout * 1000);
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=common.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"common.js","sourceRoot":"","sources":["../../../src/lib/utils/common.ts"],"names":[],"mappings":";;AAEA,wBAUC;AAGD,gDASC;AAxBD,oCAAoC;AAEpC,SAAgB,MAAM,CAAC,MAAc;IACnC,IAAI,MAAM,GAAG,EAAE,CAAC;IAChB,MAAM,UAAU,GAAG,4BAA4B,CAAC,WAAW,EAAE,CAAC;IAC9D,MAAM,gBAAgB,GAAG,UAAU,CAAC,MAAM,CAAC;IAC3C,IAAI,OAAO,GAAG,CAAC,CAAC;IAChB,OAAO,OAAO,GAAG,MAAM,EAAE,CAAC;QACxB,MAAM,IAAI,UAAU,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,gBAAgB,CAAC,CAAC,CAAC;QAC1E,OAAO,IAAI,CAAC,CAAC;IACf,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC;AAGD,SAAgB,kBAAkB,CAAC,IAAc;IAC/C,IAAI,cAAc,GAAG,CAAC,CAAC;IACvB,IAAI,IAAI,IAAI,gBAAQ,CAAC,IAAI;QAAE,cAAc,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC;SACxD,IAAI,IAAI,IAAI,gBAAQ,CAAC,MAAM;QAAE,cAAc,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC;SAC/D,IAAI,IAAI,IAAI,gBAAQ,CAAC,IAAI;QAAE,cAAc,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC;SAC9D,IAAI,IAAI,IAAI,gBAAQ,CAAC,OAAO;QAAE,cAAc,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC;IAEtE,MAAM,GAAG,GAAG,IAAI,IAAI,EAAE,CAAC;IACvB,OAAO,IAAI,IAAI,CAAC,GAAG,CAAC,OAAO,EAAE,GAAG,cAAc,GAAG,IAAI,CAAC,CAAC;AACzD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function normalizeEmail(email: string): string;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.normalizeEmail = normalizeEmail;
|
|
7
|
+
const lodash_lowercase_1 = __importDefault(require("lodash.lowercase"));
|
|
8
|
+
const PLUS_ONLY = /\+.*$/;
|
|
9
|
+
const PLUS_AND_DOT = /\.|\+.*$/g;
|
|
10
|
+
const normalizableProviders = {
|
|
11
|
+
'gmail.com': {
|
|
12
|
+
cut: PLUS_AND_DOT,
|
|
13
|
+
},
|
|
14
|
+
'googlemail.com': {
|
|
15
|
+
cut: PLUS_AND_DOT,
|
|
16
|
+
aliasOf: 'gmail.com',
|
|
17
|
+
},
|
|
18
|
+
'hotmail.com': {
|
|
19
|
+
cut: PLUS_ONLY,
|
|
20
|
+
},
|
|
21
|
+
'live.com': {
|
|
22
|
+
cut: PLUS_AND_DOT,
|
|
23
|
+
},
|
|
24
|
+
'outlook.com': {
|
|
25
|
+
cut: PLUS_ONLY,
|
|
26
|
+
},
|
|
27
|
+
};
|
|
28
|
+
function normalizeEmail(email) {
|
|
29
|
+
if (typeof email !== 'string') {
|
|
30
|
+
throw new TypeError('normalize-email expects a string');
|
|
31
|
+
}
|
|
32
|
+
const lowerCasedEmail = (0, lodash_lowercase_1.default)(email);
|
|
33
|
+
const emailParts = lowerCasedEmail.split(/@/);
|
|
34
|
+
if (emailParts.length !== 2) {
|
|
35
|
+
return email;
|
|
36
|
+
}
|
|
37
|
+
let username = emailParts[0];
|
|
38
|
+
let domain = emailParts[1];
|
|
39
|
+
if (normalizableProviders.hasOwnProperty(domain)) {
|
|
40
|
+
if (normalizableProviders[domain].hasOwnProperty('cut')) {
|
|
41
|
+
username = username.replace(normalizableProviders[domain].cut, '');
|
|
42
|
+
}
|
|
43
|
+
if (normalizableProviders[domain].hasOwnProperty('aliasOf')) {
|
|
44
|
+
domain = normalizableProviders[domain].aliasOf;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
return `${username}@${domain}`;
|
|
48
|
+
}
|
|
49
|
+
//# sourceMappingURL=email-normalization.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"email-normalization.js","sourceRoot":"","sources":["../../../src/lib/utils/email-normalization.ts"],"names":[],"mappings":";;;;;AAuBA,wCA0BC;AAjDD,wEAAyC;AAEzC,MAAM,SAAS,GAAG,OAAO,CAAC;AAC1B,MAAM,YAAY,GAAG,WAAW,CAAC;AACjC,MAAM,qBAAqB,GAAG;IAC5B,WAAW,EAAE;QACX,GAAG,EAAE,YAAY;KAClB;IACD,gBAAgB,EAAE;QAChB,GAAG,EAAE,YAAY;QACjB,OAAO,EAAE,WAAW;KACrB;IACD,aAAa,EAAE;QACb,GAAG,EAAE,SAAS;KACf;IACD,UAAU,EAAE;QACV,GAAG,EAAE,YAAY;KAClB;IACD,aAAa,EAAE;QACb,GAAG,EAAE,SAAS;KACf;CACF,CAAC;AAEF,SAAgB,cAAc,CAAC,KAAa;IAC1C,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;QAC9B,MAAM,IAAI,SAAS,CAAC,kCAAkC,CAAC,CAAC;IAC1D,CAAC;IAED,MAAM,eAAe,GAAG,IAAA,0BAAS,EAAC,KAAK,CAAC,CAAC;IACzC,MAAM,UAAU,GAAG,eAAe,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAE9C,IAAI,UAAU,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC5B,OAAO,KAAK,CAAC;IACf,CAAC;IAED,IAAI,QAAQ,GAAG,UAAU,CAAC,CAAC,CAAC,CAAC;IAC7B,IAAI,MAAM,GAAG,UAAU,CAAC,CAAC,CAAC,CAAC;IAE3B,IAAI,qBAAqB,CAAC,cAAc,CAAC,MAAM,CAAC,EAAE,CAAC;QACjD,IAAI,qBAAqB,CAAC,MAAM,CAAC,CAAC,cAAc,CAAC,KAAK,CAAC,EAAE,CAAC;YACxD,QAAQ,GAAG,QAAQ,CAAC,OAAO,CAAC,qBAAqB,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC;QACrE,CAAC;QAED,IAAI,qBAAqB,CAAC,MAAM,CAAC,CAAC,cAAc,CAAC,SAAS,CAAC,EAAE,CAAC;YAC5D,MAAM,GAAG,qBAAqB,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC;QACjD,CAAC;IACH,CAAC;IAED,OAAO,GAAG,QAAQ,IAAI,MAAM,EAAE,CAAC;AACjC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const getEnvVariable: (name: string, context?: any) => string;
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.getEnvVariable = void 0;
|
|
37
|
+
const process = __importStar(require("process"));
|
|
38
|
+
const hasCloudflareProxyContext = (context) => {
|
|
39
|
+
return !!context?.cloudflare?.env;
|
|
40
|
+
};
|
|
41
|
+
const hasCloudflareContext = (context) => {
|
|
42
|
+
return !!context?.env;
|
|
43
|
+
};
|
|
44
|
+
const getEnvVariable = (name, context) => {
|
|
45
|
+
if (typeof process !== 'undefined' &&
|
|
46
|
+
process.env &&
|
|
47
|
+
typeof process.env[name] === 'string') {
|
|
48
|
+
return process.env[name];
|
|
49
|
+
}
|
|
50
|
+
if (hasCloudflareProxyContext(context)) {
|
|
51
|
+
return context.cloudflare.env[name] || '';
|
|
52
|
+
}
|
|
53
|
+
if (hasCloudflareContext(context)) {
|
|
54
|
+
return context.env[name] || '';
|
|
55
|
+
}
|
|
56
|
+
if (context && typeof context[name] === 'string') {
|
|
57
|
+
return context[name];
|
|
58
|
+
}
|
|
59
|
+
try {
|
|
60
|
+
return globalThis[name];
|
|
61
|
+
}
|
|
62
|
+
catch (_) {
|
|
63
|
+
}
|
|
64
|
+
return '';
|
|
65
|
+
};
|
|
66
|
+
exports.getEnvVariable = getEnvVariable;
|
|
67
|
+
//# sourceMappingURL=env.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"env.js","sourceRoot":"","sources":["../../../src/lib/utils/env.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iDAAmC;AAInC,MAAM,yBAAyB,GAAG,CAChC,OAAY,EAC8B,EAAE;IAC5C,OAAO,CAAC,CAAC,OAAO,EAAE,UAAU,EAAE,GAAG,CAAC;AACpC,CAAC,CAAC;AAEF,MAAM,oBAAoB,GAAG,CAAC,OAAY,EAA4B,EAAE;IACtE,OAAO,CAAC,CAAC,OAAO,EAAE,GAAG,CAAC;AACxB,CAAC,CAAC;AASK,MAAM,cAAc,GAAG,CAAC,IAAY,EAAE,OAAa,EAAU,EAAE;IAEpE,IACE,OAAO,OAAO,KAAK,WAAW;QAC9B,OAAO,CAAC,GAAG;QACX,OAAO,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,QAAQ,EACrC,CAAC;QACD,OAAO,OAAO,CAAC,GAAG,CAAC,IAAI,CAAW,CAAC;IACrC,CAAC;IAMD,IAAI,yBAAyB,CAAC,OAAO,CAAC,EAAE,CAAC;QACvC,OAAO,OAAO,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC;IAC5C,CAAC;IAGD,IAAI,oBAAoB,CAAC,OAAO,CAAC,EAAE,CAAC;QAClC,OAAO,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC;IACjC,CAAC;IAGD,IAAI,OAAO,IAAI,OAAO,OAAO,CAAC,IAAI,CAAC,KAAK,QAAQ,EAAE,CAAC;QACjD,OAAO,OAAO,CAAC,IAAI,CAAW,CAAC;IACjC,CAAC;IAGD,IAAI,CAAC;QACH,OAAO,UAAU,CAAC,IAA+B,CAAC,CAAC;IACrD,CAAC;IAAC,OAAO,CAAC,EAAE,CAAC;IAEb,CAAC;IAED,OAAO,EAAE,CAAC;AACZ,CAAC,CAAC;AApCW,QAAA,cAAc,kBAoCzB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function createHash(key: string, valueToHash: string): string;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createHash = createHash;
|
|
4
|
+
const common_1 = require("@nestjs/common");
|
|
5
|
+
const crypto_1 = require("crypto");
|
|
6
|
+
function createHash(key, valueToHash) {
|
|
7
|
+
common_1.Logger.verbose('Creating Hmac');
|
|
8
|
+
return (0, crypto_1.createHmac)('sha256', key).update(valueToHash).digest('hex');
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=hmac.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hmac.js","sourceRoot":"","sources":["../../../src/lib/utils/hmac.ts"],"names":[],"mappings":";;AAGA,gCAIC;AAPD,2CAAwC;AACxC,mCAAoC;AAEpC,SAAgB,UAAU,CAAC,GAAW,EAAE,WAAmB;IACzD,eAAM,CAAC,OAAO,CAAC,eAAe,CAAC,CAAC;IAEhC,OAAO,IAAA,mBAAU,EAAC,QAAQ,EAAE,GAAG,CAAC,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AACrE,CAAC"}
|